diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index e9628d8201a..4a3db9eb970 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,16 +1,24 @@ ## Description -Describe the changes made and why they were made. (Ignore if these details are present on the associated Apache Fineract JIRA ticket.) +Describe the changes made and why they were made. (Ignore if these details are present on the associated Apache Fineract +JIRA ticket.) ## Checklist Please make sure these boxes are checked before submitting your pull request - thanks! -- [ ] Write the commit message as per [our guidelines](https://github.com/apache/fineract/blob/develop/CONTRIBUTING.md#pull-requests) -- [ ] Acknowledge that we will not review PRs that are not passing the build _("green")_ - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers. -- [ ] Create/update [unit or integration tests](https://fineract.apache.org/docs/current/#_testing) for verifying the changes made. +- [ ] Write the commit message as + per [our guidelines](https://github.com/apache/fineract/blob/develop/CONTRIBUTING.md#pull-requests) +- [ ] Acknowledge that we will not review PRs that are not passing the build _("green")_ - it is your responsibility to + get a proposed PR to pass the build, not primarily the project's maintainers. +- [ ] Create/update [unit or integration tests](https://fineract.apache.org/docs/current/#_testing) for verifying the + changes made. - [ ] Follow our [coding conventions](https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions). -- [ ] Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes -- [ ] [This PR must not be a "code dump"](https://cwiki.apache.org/confluence/display/FINERACT/Pull+Request+Size+Limit). Large changes can be made in a branch, with assistance. Ask for help on the [developer mailing list](https://fineract.apache.org/#contribute). +- [ ] Add required Swagger annotation and update API documentation at + fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes +- [ ] [This PR must not be a "code dump"](https://cwiki.apache.org/confluence/display/FINERACT/Pull+Request+Size+Limit). + Large changes can be made in a branch, with assistance. Ask for help on + the [developer mailing list](https://fineract.apache.org/#contribute). -Your assigned reviewer(s) will follow our [guidelines for code reviews](https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide). +Your assigned reviewer(s) will follow +our [guidelines for code reviews](https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide). diff --git a/.github/workflows/build-cucumber.yml b/.github/workflows/build-cucumber.yml index ddb3224fc66..d6f729c00eb 100644 --- a/.github/workflows/build-cucumber.yml +++ b/.github/workflows/build-cucumber.yml @@ -1,6 +1,6 @@ name: Fineract Build & Cucumber tests (without E2E tests) -on: [push, pull_request] +on: [ push, pull_request ] permissions: contents: read diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 18a6d6b6656..f00ee07893f 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -1,6 +1,6 @@ name: Fineract Docker Builds -on: [push, pull_request] +on: [ push, pull_request ] permissions: contents: read @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - db_type: [mariadb, postgresql] + db_type: [ mariadb, postgresql ] include: - db_type: mariadb compose_file: docker-compose.yml diff --git a/.github/workflows/build-documentation.yml b/.github/workflows/build-documentation.yml index 10af8cb47c0..494e6c8d7ab 100644 --- a/.github/workflows/build-documentation.yml +++ b/.github/workflows/build-documentation.yml @@ -1,5 +1,5 @@ name: Fineract Documentation build -on: [push, pull_request] +on: [ push, pull_request ] permissions: contents: read jobs: diff --git a/.github/workflows/build-e2e-tests.yml b/.github/workflows/build-e2e-tests.yml index 4eece516891..002a47b7c72 100644 --- a/.github/workflows/build-e2e-tests.yml +++ b/.github/workflows/build-e2e-tests.yml @@ -1,6 +1,6 @@ name: Fineract E2E Tests -on: [push, pull_request] +on: [ push, pull_request ] permissions: contents: read @@ -15,8 +15,8 @@ jobs: fail-fast: false matrix: # Define the number of shards (1-based indexing) - shard_index: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] - total_shards: [15] + shard_index: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ] + total_shards: [ 15 ] env: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} diff --git a/.github/workflows/build-mariadb.yml b/.github/workflows/build-mariadb.yml index 2dce16dba90..20ac23a7fd2 100644 --- a/.github/workflows/build-mariadb.yml +++ b/.github/workflows/build-mariadb.yml @@ -1,6 +1,6 @@ name: Fineract Cargo & Unit- & Integration tests - MariaDB -on: [push, pull_request] +on: [ push, pull_request ] permissions: contents: read @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - task: [test-core-1, test-core-2, test-core-3, test-core-4, test-core-5] + task: [ test-core-1, test-core-2, test-core-3, test-core-4, test-core-5 ] services: mariadb: diff --git a/.github/workflows/build-mysql.yml b/.github/workflows/build-mysql.yml index 89798cf8a67..87f5a5789e4 100644 --- a/.github/workflows/build-mysql.yml +++ b/.github/workflows/build-mysql.yml @@ -1,6 +1,6 @@ name: Fineract Cargo & Unit- & Integration tests - MySQL -on: [push, pull_request] +on: [ push, pull_request ] permissions: contents: read @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - task: [test-core-1, test-core-2, test-core-3, test-core-4, test-core-5] + task: [ test-core-1, test-core-2, test-core-3, test-core-4, test-core-5 ] services: mysql: diff --git a/.github/workflows/build-postgresql.yml b/.github/workflows/build-postgresql.yml index a16a579a1ca..ac550f051a0 100644 --- a/.github/workflows/build-postgresql.yml +++ b/.github/workflows/build-postgresql.yml @@ -1,6 +1,6 @@ name: Fineract Cargo & Unit- & Integration tests - PostgreSQL -on: [push, pull_request] +on: [ push, pull_request ] permissions: contents: read @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - task: [test-core-1, test-core-2, test-core-3, test-core-4, test-core-5] + task: [ test-core-1, test-core-2, test-core-3, test-core-4, test-core-5 ] services: postgresql: diff --git a/.github/workflows/liquibase-only-postgresql.yml b/.github/workflows/liquibase-only-postgresql.yml index 0461677702b..8d5951bd1a1 100644 --- a/.github/workflows/liquibase-only-postgresql.yml +++ b/.github/workflows/liquibase-only-postgresql.yml @@ -1,6 +1,6 @@ name: Fineract Liquibase Only mode - PostgreSQL -on: [push, pull_request] +on: [ push, pull_request ] permissions: contents: read diff --git a/.github/workflows/pr-title-check.yml b/.github/workflows/pr-title-check.yml index 0256a09a1da..2203bd1e5f0 100644 --- a/.github/workflows/pr-title-check.yml +++ b/.github/workflows/pr-title-check.yml @@ -2,7 +2,7 @@ name: Fineract PR Compliance on: pull_request: - types: [opened, edited, reopened, synchronize] + types: [ opened, edited, reopened, synchronize ] permissions: pull-requests: read diff --git a/.github/workflows/publish-dockerhub.yml b/.github/workflows/publish-dockerhub.yml index e38c399bc68..e1252ab5db6 100644 --- a/.github/workflows/publish-dockerhub.yml +++ b/.github/workflows/publish-dockerhub.yml @@ -35,7 +35,7 @@ jobs: id: git_hashes - name: Build the Apache Fineract image - run: | + run: | TAGS=${{ github.ref_name }} if [ "${{ github.ref_name }}" == "develop" ]; then TAGS="$TAGS,${{ steps.git_hashes.outputs.short_hash }},${{ steps.git_hashes.outputs.long_hash }}" diff --git a/.github/workflows/smoke-messaging.yml b/.github/workflows/smoke-messaging.yml index c74daad6c20..aa31d18b8ae 100644 --- a/.github/workflows/smoke-messaging.yml +++ b/.github/workflows/smoke-messaging.yml @@ -1,6 +1,6 @@ name: Fineract Messaging Smoke Tests -on: [push, pull_request] +on: [ push, pull_request ] permissions: contents: read diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml index c48ee8e94d5..11895d40305 100644 --- a/.github/workflows/sonarqube.yml +++ b/.github/workflows/sonarqube.yml @@ -10,14 +10,14 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 60 env: - TZ: Asia/Kolkata - SONAR_ORGANIZATION: ${{ secrets.SONAR_ORGANIZATION }} - SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} - DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} - JAVA_BINARIES: . + TZ: Asia/Kolkata + SONAR_ORGANIZATION: ${{ secrets.SONAR_ORGANIZATION }} + SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY }} + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} + DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} + JAVA_BINARIES: . steps: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index c92027ecb10..53bf4ab6b1e 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -4,7 +4,7 @@ name: Mark stale issues and pull requests on: schedule: - - cron: "0 0 * * *" + - cron: "0 0 * * *" permissions: contents: read jobs: @@ -15,12 +15,12 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 60 steps: - - uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - # stale-issue-message: 'Stale issue message' - # stale-issue-label: 'no-issue-activity' - stale-pr-message: 'This pull request seems to be stale. Are you still planning to work on it? We will automatically close it in 30 days.' - stale-pr-label: 'stale' - days-before-stale: 30 - days-before-close: 30 + - uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + # stale-issue-message: 'Stale issue message' + # stale-issue-label: 'no-issue-activity' + stale-pr-message: 'This pull request seems to be stale. Are you still planning to work on it? We will automatically close it in 30 days.' + stale-pr-label: 'stale' + days-before-stale: 30 + days-before-close: 30 diff --git a/.github/workflows/verify-api-backward-compatibility.yml b/.github/workflows/verify-api-backward-compatibility.yml index 66026da22a6..a7096b73af4 100644 --- a/.github/workflows/verify-api-backward-compatibility.yml +++ b/.github/workflows/verify-api-backward-compatibility.yml @@ -1,6 +1,6 @@ name: Verify API Backward Compatibility -on: [pull_request] +on: [ pull_request ] permissions: contents: read diff --git a/.github/workflows/verify-commits.yml b/.github/workflows/verify-commits.yml index 0efc73d081e..b64d1d7d389 100644 --- a/.github/workflows/verify-commits.yml +++ b/.github/workflows/verify-commits.yml @@ -19,7 +19,7 @@ name: Fineract Signed Commits Check on: pull_request: - types: [opened, synchronize, reopened] + types: [ opened, synchronize, reopened ] permissions: contents: read diff --git a/.github/workflows/verify-liquibase-backward-compatibility.yml b/.github/workflows/verify-liquibase-backward-compatibility.yml index 744bf27e074..56f8f813a3f 100644 --- a/.github/workflows/verify-liquibase-backward-compatibility.yml +++ b/.github/workflows/verify-liquibase-backward-compatibility.yml @@ -1,6 +1,6 @@ name: Verify Liquibase Backward Compatibility -on: [pull_request] +on: [ pull_request ] permissions: contents: read diff --git a/.profileconfig.json b/.profileconfig.json index b2f42d90d09..6cf53c36677 100644 --- a/.profileconfig.json +++ b/.profileconfig.json @@ -1,64 +1,64 @@ { - "jfrConfig": { - "settings": "profile" - }, - "asyncProfilerConfig": { - "jfrsync": true, - "alloc": true, - "event": "wall", - "misc": "" - }, - "file": "$PROJECT_DIR/profile.jfr", - "conversionConfig": { - "nonProjectPackagePrefixes": [ - "java.", - "javax.", - "kotlin.", - "jdk.", - "com.google.", - "org.apache.", - "org.spring.", - "sun.", - "scala." - ], - "enableMarkers": true, - "initialVisibleThreads": 10, - "initialSelectedThreads": 10, - "includeGCThreads": false, - "includeInitialSystemProperty": false, - "includeInitialEnvironmentVariables": false, - "includeSystemProcesses": false, - "ignoredEvents": [ - "jdk.ActiveSetting", - "jdk.ActiveRecording", - "jdk.BooleanFlag", - "jdk.IntFlag", - "jdk.DoubleFlag", - "jdk.LongFlag", - "jdk.NativeLibrary", - "jdk.StringFlag", - "jdk.UnsignedIntFlag", - "jdk.UnsignedLongFlag", - "jdk.InitialSystemProperty", - "jdk.InitialEnvironmentVariable", - "jdk.SystemProcess", - "jdk.ModuleExport", - "jdk.ModuleRequire" - ], - "minRequiredItemsPerThread": 3 - }, - "additionalGradleTargets": [ - { - "targetPrefix": "quarkus", - "optionForVmArgs": "-Djvm.args", - "description": "Example quarkus config, adding profiling arguments via -Djvm.args option to the Gradle task run" - } + "jfrConfig": { + "settings": "profile" + }, + "asyncProfilerConfig": { + "jfrsync": true, + "alloc": true, + "event": "wall", + "misc": "" + }, + "file": "$PROJECT_DIR/profile.jfr", + "conversionConfig": { + "nonProjectPackagePrefixes": [ + "java.", + "javax.", + "kotlin.", + "jdk.", + "com.google.", + "org.apache.", + "org.spring.", + "sun.", + "scala." ], - "additionalMavenTargets": [ - { - "targetPrefix": "quarkus:", - "optionForVmArgs": "-Djvm.args", - "description": "Example quarkus config, adding profiling arguments via -Djvm.args option to the Maven goal run" - } - ] + "enableMarkers": true, + "initialVisibleThreads": 10, + "initialSelectedThreads": 10, + "includeGCThreads": false, + "includeInitialSystemProperty": false, + "includeInitialEnvironmentVariables": false, + "includeSystemProcesses": false, + "ignoredEvents": [ + "jdk.ActiveSetting", + "jdk.ActiveRecording", + "jdk.BooleanFlag", + "jdk.IntFlag", + "jdk.DoubleFlag", + "jdk.LongFlag", + "jdk.NativeLibrary", + "jdk.StringFlag", + "jdk.UnsignedIntFlag", + "jdk.UnsignedLongFlag", + "jdk.InitialSystemProperty", + "jdk.InitialEnvironmentVariable", + "jdk.SystemProcess", + "jdk.ModuleExport", + "jdk.ModuleRequire" + ], + "minRequiredItemsPerThread": 3 + }, + "additionalGradleTargets": [ + { + "targetPrefix": "quarkus", + "optionForVmArgs": "-Djvm.args", + "description": "Example quarkus config, adding profiling arguments via -Djvm.args option to the Gradle task run" + } + ], + "additionalMavenTargets": [ + { + "targetPrefix": "quarkus:", + "optionForVmArgs": "-Djvm.args", + "description": "Example quarkus config, adding profiling arguments via -Djvm.args option to the Maven goal run" + } + ] } \ No newline at end of file diff --git a/.theia/settings.json b/.theia/settings.json index 45dc9183963..1b91f12a1d2 100644 --- a/.theia/settings.json +++ b/.theia/settings.json @@ -1,8 +1,8 @@ { - "files.exclude": { - "**/.classpath": true, - "**/.project": true, - "**/.settings": true, - "**/.factorypath": true - } + "files.exclude": { + "**/.classpath": true, + "**/.project": true, + "**/.settings": true, + "**/.factorypath": true + } } diff --git a/STATIC_WEAVING.md b/STATIC_WEAVING.md index ae8ba7805af..55241abc917 100644 --- a/STATIC_WEAVING.md +++ b/STATIC_WEAVING.md @@ -4,7 +4,9 @@ This document explains the static weaving setup for JPA entities in the Fineract ## Overview -Static weaving is a process that enhances JPA entities at build time to improve runtime performance. This is done using the `org.eclipse.persistence.tools.weaving.jpa.StaticWeave` which processes the compiled classes and applies the necessary bytecode transformations. +Static weaving is a process that enhances JPA entities at build time to improve runtime performance. This is done using +the `org.eclipse.persistence.tools.weaving.jpa.StaticWeave` which processes the compiled classes and applies the +necessary bytecode transformations. ## Configuration @@ -13,7 +15,8 @@ The static weaving is configured in `static-weaving.gradle` and applied to all J ## How It Works 1. **Compilation**: Java source files are compiled to the standard classes directory (`build/classes/java/main`). -2. **Weaving**: Weaving happens as last step of **compileJava** task, which outputs them to the standard classes directory (`build/classes/java/main`). +2. **Weaving**: Weaving happens as last step of **compileJava** task, which outputs them to the standard classes + directory (`build/classes/java/main`). ## Adding Static Weaving to a Module diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index de2e63c05c1..5f17eef7747 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -54,7 +54,7 @@ dependencies { implementation 'com.sun.activation:jakarta.activation' implementation 'com.sun.mail:jakarta.mail' implementation 'org.freemarker:freemarker' - implementation ('com.tmatesoft.svnkit:svnkit') { + implementation('com.tmatesoft.svnkit:svnkit') { exclude group: 'net.i2p.crypto', module: 'eddsa' } implementation 'org.bouncycastle:bcprov-jdk18on' diff --git a/buildSrc/src/main/groovy/org.apache.fineract.release.gradle b/buildSrc/src/main/groovy/org.apache.fineract.release.gradle index 254d80e2236..9a08ae44faf 100644 --- a/buildSrc/src/main/groovy/org.apache.fineract.release.gradle +++ b/buildSrc/src/main/groovy/org.apache.fineract.release.gradle @@ -32,26 +32,26 @@ fineract { git { dir = "${projectDir.absolutePath}/.git" sections = [ - [ - section: "user", - name: "name", - value: "${findProperty('fineract.config.name')}", - ], - [ - section: "user", - name: "email", - value: "${findProperty('fineract.config.email')}", - ], - [ - section: "user", - name: "signingkey", - value: "${findProperty('fineract.config.gnupg.keyName')}", - ], - [ - section: "commit", - name: "gpgsign", - value: "true", - ], + [ + section: "user", + name : "name", + value : "${findProperty('fineract.config.name')}", + ], + [ + section: "user", + name : "email", + value : "${findProperty('fineract.config.email')}", + ], + [ + section: "user", + name : "signingkey", + value : "${findProperty('fineract.config.gnupg.keyName')}", + ], + [ + section: "commit", + name : "gpgsign", + value : "true", + ], ] } template { @@ -88,155 +88,155 @@ fineract { } steps = [ - test: [ - order: 0, - description: 'Test', - email: [ - from: "${findProperty('fineract.config.email')}", - to: "${findProperty('fineract.config.email')}", - mime: 'text/plain', - subject: "[FINERACT] [TEST] 📣 🏁 🗳️ 🚀 📈 🔀 🌠 Propose new release ${version}", - messageTemplate: [ - templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step01.headsup.message.ftl" - ] + test : [ + order : 0, + description: 'Test', + email : [ + from : "${findProperty('fineract.config.email')}", + to : "${findProperty('fineract.config.email')}", + mime : 'text/plain', + subject : "[FINERACT] [TEST] 📣 🏁 🗳️ 🚀 📈 🔀 🌠 Propose new release ${version}", + messageTemplate: [ + templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step01.headsup.message.ftl" + ] + ], + subversion : [ + url : 'https://dist.apache.org/repos/dist/dev/fineract', + directory: "${System.getProperty("java.io.tmpdir")}" + ], + jira : [ + query: "project in (\'FINERACT\') and fixVersion = ${findProperty('fineract.release.version')} and status in (CLOSED, RESOLVED)" + ], + template : [ + templateFile: "${projectDir}/buildSrc/src/main/resources/jira/changelog.txt.ftl" + ], + gpg : [ + files: [ + "${projectDir}/buildSrc/build/libs/buildSrc.jar" + ] + ] ], - subversion: [ - url: 'https://dist.apache.org/repos/dist/dev/fineract', - directory: "${System.getProperty("java.io.tmpdir")}" + step1 : [ + order : 1, + description: 'Send heads-up email to 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.step01.headsup.subject.ftl" + ], + messageTemplate: [ + templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step01.headsup.message.ftl" + ] + ] ], - jira: [ - query: "project in (\'FINERACT\') and fixVersion = ${findProperty('fineract.release.version')} and status in (CLOSED, RESOLVED)" + step2 : [ + order : 2, + description: 'Clean up JIRA', ], - template: [ - templateFile: "${projectDir}/buildSrc/src/main/resources/jira/changelog.txt.ftl" + step3 : [ + order : 3, + description: 'Create a release branch', + 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.step03.branch.subject.ftl" + ], + messageTemplate: [ + templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step03.branch.message.ftl" + ] + ] ], - gpg: [ - files: [ - "${projectDir}/buildSrc/build/libs/buildSrc.jar" - ] - ] - ], - step1: [ - order: 1, - description: 'Send heads-up email to 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.step01.headsup.subject.ftl" - ], - messageTemplate: [ - templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step01.headsup.message.ftl" - ] - ] - ], - step2: [ - order: 2, - description: 'Clean up JIRA', - ], - step3: [ - order: 3, - description: 'Create a release branch', - 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.step03.branch.subject.ftl" - ], - messageTemplate: [ - templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step03.branch.message.ftl" - ] - ] - ], - step4: [ - order: 4, - description: 'Freeze JIRA version', - ], - step5: [ - order: 5, - description: 'Create release tag', - git: [ - messageTemplate: [ - templateFile: "${projectDir}/buildSrc/src/main/resources/git/release.step05.tag.message.ftl" - ] - ] - ], - step6: [ - order: 6, - description: 'Create a distribution', - ], - step7: [ - order: 7, - description: 'Sign the distribution artifacts', - gpg: [ - files: [ - "${rootDir}/fineract-war/build/distributions/apache-fineract-src-${project.version}.tar.gz", - "${rootDir}/fineract-war/build/distributions/apache-fineract-bin-${project.version}.tar.gz" - ] - ] - ], - step8: [ - order: 8, - description: 'Upload distribution artifacts to staging environment', - subversion: [ - url: 'https://dist.apache.org/repos/dist/dev/fineract', - directory: "${System.getProperty("java.io.tmpdir")}/fineract-dist-dev" + step4 : [ + order : 4, + description: 'Freeze JIRA version', + ], + step5 : [ + order : 5, + description: 'Create release tag', + git : [ + messageTemplate: [ + templateFile: "${projectDir}/buildSrc/src/main/resources/git/release.step05.tag.message.ftl" + ] + ] + ], + step6 : [ + order : 6, + description: 'Create a distribution', + ], + step7 : [ + order : 7, + description: 'Sign the distribution artifacts', + gpg : [ + files: [ + "${rootDir}/fineract-war/build/distributions/apache-fineract-src-${project.version}.tar.gz", + "${rootDir}/fineract-war/build/distributions/apache-fineract-bin-${project.version}.tar.gz" + ] + ] + ], + step8 : [ + order : 8, + description: 'Upload distribution artifacts to staging environment', + subversion : [ + url : 'https://dist.apache.org/repos/dist/dev/fineract', + directory: "${System.getProperty("java.io.tmpdir")}/fineract-dist-dev" + ], + ], + step9 : [ + order : 9, + description: 'Verify distribution in staging environment', + ], + step10: [ + order : 10, + description: 'Start voting on the dev mailing list', + ], + step11: [ + order : 11, + description: 'Conclude the vote and announce results', + ], + step12: [ + order : 12, + description: 'Upload distribution artifacts to release environment', + subversion : [ + url : 'https://dist.apache.org/repos/dist/release/fineract', + directory: "${System.getProperty("java.io.tmpdir")}/fineract-dist-release" + ], ], - ], - step9: [ - order: 9, - description: 'Verify distribution in staging environment', - ], - step10: [ - order: 10, - description: 'Start voting on the dev mailing list', - ], - step11: [ - order: 11, - description: 'Conclude the vote and announce results', - ], - step12: [ - order: 12, - description: 'Upload distribution artifacts to release environment', - subversion: [ - url: 'https://dist.apache.org/repos/dist/release/fineract', - directory: "${System.getProperty("java.io.tmpdir")}/fineract-dist-release" + step13: [ + order : 13, + description: 'Close release branch and merge to \'develop\'', ], - ], - step13: [ - order: 13, - description: 'Close release branch and merge to \'develop\'', - ], - step14: [ - order: 14, - description: 'Update website (not yet automated)', - ], - step15: [ - order: 15, - description: 'Send email to announcement mailing list', - jira: [ - projectId: "12319420", - query: "project in (\'FINERACT\') and fixVersion = ${findProperty('fineract.release.version')} and status in (CLOSED, RESOLVED, WONTFIX)" + step14: [ + order : 14, + description: 'Update website (not yet automated)', ], - 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.step15.announce.subject.ftl" - ], - messageTemplate: [ - templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step15.announce.message.ftl" - ] + step15: [ + order : 15, + description: 'Send email to announcement mailing list', + jira : [ + projectId: "12319420", + query : "project in (\'FINERACT\') and fixVersion = ${findProperty('fineract.release.version')} and status in (CLOSED, RESOLVED, WONTFIX)" + ], + 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.step15.announce.subject.ftl" + ], + messageTemplate: [ + templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step15.announce.message.ftl" + ] + ] ] - ] ] } 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..bf9d3e36cae 100644 --- a/buildSrc/src/main/groovy/org/apache/fineract/gradle/FineractPlugin.groovy +++ b/buildSrc/src/main/groovy/org/apache/fineract/gradle/FineractPlugin.groovy @@ -75,13 +75,13 @@ class FineractPlugin implements Plugin { doLast { log.warn("Fineract Publish Doc...") - def url = extension.config.doc.url?:"git@github.com:apache/fineract-site.git"; - def branch = extension.config.doc.branch?:"asf-site" - def directory = extension.config.doc.directory?:System.getProperty("java.io.tmpdir")+"/fineract-site" + def url = extension.config.doc.url ?: "git@github.com:apache/fineract-site.git"; + def branch = extension.config.doc.branch ?: "asf-site" + def directory = extension.config.doc.directory ?: System.getProperty("java.io.tmpdir") + "/fineract-site" def d = new File(directory) - if(d.exists()) { + if (d.exists()) { gitService.pull(directory) } else { gitService.clone(url, branch, directory) @@ -92,7 +92,7 @@ class FineractPlugin implements Plugin { def source = new File("fineract-doc/build/docs/html/en"); def target = new File(directory + "/docs/current") - if(!target.name) { + if (!target.name) { target.mkdirs() } @@ -195,21 +195,21 @@ class FineractPlugin implements Plugin { String issue = project.properties?['fineract.release.issue'] String date = project.properties?['fineract.releaseBranch.date'] - if(!version || !issue || !date) { + if (!version || !issue || !date) { TextIO textIO = TextIoFactory.getTextIO() - if(!version) { + if (!version) { version = textIO.newStringInputReader() .withPattern("\\d+.\\d+.\\d+") .read("Release Version"); } - if(!issue) { + if (!issue) { issue = textIO.newStringInputReader() .withMaxLength(4) .withPattern("\\d+") .read("Jira Issue"); } - if(!date) { + if (!date) { date = textIO.newStringInputReader() .withMaxLength(10) .withPattern("\\d\\d\\d\\d-\\d\\d-\\d\\d") @@ -226,8 +226,8 @@ class FineractPlugin implements Plugin { this.context?.project?['fineract.release.issue'] = issue this.context?.project?['fineract.releaseBranch.date'] = date - if(step.email) { - emailService.send( processEmailParams(step.email, this.context) ) + if (step.email) { + emailService.send(processEmailParams(step.email, this.context)) } } } @@ -251,15 +251,15 @@ class FineractPlugin implements Plugin { String version = project.properties?['fineract.release.version'] String date = project.properties?['fineract.release.date'] - if(!version || !date) { + if (!version || !date) { TextIO textIO = TextIoFactory.getTextIO() - if(!version) { + if (!version) { version = textIO.newStringInputReader() .withPattern("\\d+.\\d+.\\d+") .read("Release Version"); } - if(!date) { + if (!date) { date = textIO.newStringInputReader() .withMaxLength(10) .withPattern("\\d\\d\\d\\d-\\d\\d-\\d\\d") @@ -277,8 +277,8 @@ class FineractPlugin implements Plugin { this.context?.project?['fineract.release.version'] = version this.context?.project?['fineract.release.date'] = date - if(step.email) { - emailService.send( processEmailParams(step.email, this.context) ) + if (step.email) { + emailService.send(processEmailParams(step.email, this.context)) } } } @@ -300,7 +300,7 @@ class FineractPlugin implements Plugin { String version = project.properties?['fineract.release.version'] - if(!version) { + if (!version) { TextIO textIO = TextIoFactory.getTextIO() if (!version) { @@ -314,7 +314,7 @@ class FineractPlugin implements Plugin { def params = processGitParams(step.git, this.context) - params.tag = params.tag?:version + params.tag = params.tag ?: version gitService.createTag(params.tag, params.message) } @@ -345,7 +345,7 @@ class FineractPlugin implements Plugin { String version = project.properties?['fineract.release.version'] - if(!version) { + if (!version) { TextIO textIO = TextIoFactory.getTextIO() version = textIO.newStringInputReader() @@ -357,7 +357,7 @@ class FineractPlugin implements Plugin { subversionService.checkout(step.subversion) - def directory = step.subversion.directory?:System.getProperty("java.io.tmpdir") + "/fineract-dist-dev" + def directory = step.subversion.directory ?: System.getProperty("java.io.tmpdir") + "/fineract-dist-dev" def source = new File("fineract-war/build/distributions") def target = new File("${directory}/${version}") @@ -440,7 +440,7 @@ class FineractPlugin implements Plugin { private FineractPluginExtension.FineractPluginStep step(FineractPluginExtension extension, String id) { FineractPluginExtension.FineractPluginStep step = extension.steps[id] - if(step) { + if (step) { log.warn("Fineract release step ${step.order}: ${step.description}.") } else { throw new RuntimeException("Could not find any parameters for step with ID '${id}'") @@ -450,12 +450,12 @@ class FineractPlugin implements Plugin { } private FineractPluginExtension.FineractPluginEmailParams processEmailParams(FineractPluginExtension.FineractPluginEmailParams params, Object data) { - if(params.subjectTemplate) { + if (params.subjectTemplate) { def result = templateService.render(params.subjectTemplate, data) params.subject = result.output } - if(params.messageTemplate) { + if (params.messageTemplate) { def result = templateService.render(params.messageTemplate, data) params.message = result.output @@ -465,7 +465,7 @@ class FineractPlugin implements Plugin { } private FineractPluginExtension.FineractPluginGitParams processGitParams(FineractPluginExtension.FineractPluginGitParams params, Object data) { - if(params.messageTemplate) { + if (params.messageTemplate) { def result = templateService.render(params.messageTemplate, data) params.message = result.output @@ -475,11 +475,11 @@ class FineractPlugin implements Plugin { } private Map context(Project project) { - return Map.of("project", project.getProperties().findAll { it.key != "password"}) + return Map.of("project", project.getProperties().findAll { it.key != "password" }) } private void printInstructions(Project project, String step) { - String version = project.properties?['fineract.release.version']?:"0.0.0" + String version = project.properties?['fineract.release.version'] ?: "0.0.0" this.context?.project?['fineract.release.version'] = version diff --git a/buildSrc/src/main/groovy/org/apache/fineract/gradle/FineractPluginExtension.groovy b/buildSrc/src/main/groovy/org/apache/fineract/gradle/FineractPluginExtension.groovy index b38834f33c8..99677a439f1 100644 --- a/buildSrc/src/main/groovy/org/apache/fineract/gradle/FineractPluginExtension.groovy +++ b/buildSrc/src/main/groovy/org/apache/fineract/gradle/FineractPluginExtension.groovy @@ -127,7 +127,7 @@ class FineractPluginExtension { String query List result = new ArrayList<>() int pageOffset = 0 - int pageSize= 50 + int pageSize = 50 int total = 1000 List includes = ["summary", "status", "assignee", "fixVersions"] } diff --git a/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/EmailService.groovy b/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/EmailService.groovy index ac93770bdcb..48c3fdea144 100644 --- a/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/EmailService.groovy +++ b/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/EmailService.groovy @@ -42,7 +42,7 @@ class EmailService { this.properties.put("mail.smtp.host", config.host) this.properties.put("mail.smtp.auth", "true") this.properties.put("mail.smtp.starttls.enable", config.tls.toString()) - if(config.ssl) { + if (config.ssl) { this.properties.put("mail.smtp.port", "465") this.properties.put("mail.smtp.socketFactory.port", "465"); this.properties.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory"); @@ -67,10 +67,10 @@ class EmailService { Message msg = new MimeMessage(session) msg.setFrom(new InternetAddress(params.from, params.name)) msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(params.to)) - if(params.cc) { + if (params.cc) { msg.setRecipients(Message.RecipientType.CC, InternetAddress.parse(params.cc)) } - if(params.bcc) { + if (params.bcc) { msg.setRecipients(Message.RecipientType.BCC, InternetAddress.parse(params.bcc)) } msg.setSubject(params.subject, "UTF-8") diff --git a/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/GitService.groovy b/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/GitService.groovy index 1090854c277..948b3c23eba 100644 --- a/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/GitService.groovy +++ b/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/GitService.groovy @@ -88,7 +88,7 @@ class GitService { def status = git.status().call() - if(!status.isClean()) { + if (!status.isClean()) { git.add().addFilepattern(".").call() git.commit().setSign(true).setMessage("chore: Publish current docs").call() @@ -121,7 +121,7 @@ class GitService { git.push().setPushTags().setForce(true).setDryRun(dryRun).call() log.warn("Tag created: ${name} (${ref.name})") - } catch(Exception e) { + } catch (Exception e) { log.error(e.toString(), e) } } diff --git a/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/GpgService.groovy b/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/GpgService.groovy index 3d3126a8a5e..ab48876c2b9 100644 --- a/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/GpgService.groovy +++ b/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/GpgService.groovy @@ -52,8 +52,8 @@ class GpgService { // TODO: provide implementation for *.gpg key rings def keyBox = config.publicKeyring.endsWith(".kbx") ? new BcKeyBox(new FileInputStream(config.publicKeyring)) : null - if(keyBox) { - for(def keyBlob : keyBox.getKeyBlobs()) { + if (keyBox) { + for (def keyBlob : keyBox.getKeyBlobs()) { switch (keyBlob.type) { case BlobType.X509_BLOB: break @@ -67,7 +67,7 @@ class GpgService { if (k.isEncryptionKey()) { def keyName = Long.toHexString(k.keyID).toUpperCase(java.util.Locale.ROOT) - if(config.keyName.substring(config.keyName.length()-keyName.length()) == keyName) { + if (config.keyName.substring(config.keyName.length() - keyName.length()) == keyName) { publicKey = k; log.warn("Found: ${publicKey.getUserIDs().next()}") break @@ -84,7 +84,7 @@ class GpgService { def secretKey = secretRingCollection.getSecretKey(publicKey.keyID) - if(secretKey!=null) { + if (secretKey != null) { this.privateKey = secretKey.extractPrivateKey(new JcePBESecretKeyDecryptorBuilder().setProvider(BouncyCastleProvider.PROVIDER_NAME).build(config.password.toCharArray())) } } else { @@ -137,8 +137,8 @@ class GpgService { byte[] hash = digest.digest() BigInteger bigInt = new BigInteger(1, hash) output = bigInt.toString(16) - while ( output.length() < 32 ) { - output = "0"+output + while (output.length() < 32) { + output = "0" + output } } catch (Exception e) { log.error(e.toString(), e) diff --git a/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/JiraService.groovy b/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/JiraService.groovy index b6ff34cf092..b19391e62a4 100644 --- a/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/JiraService.groovy +++ b/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/JiraService.groovy @@ -47,16 +47,16 @@ class JiraService { loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY) OkHttpClient.Builder okClient = new OkHttpClient.Builder() - .connectionPool(connectionPool) - .addInterceptor(loggingInterceptor) - .addInterceptor(new Interceptor() { - @Override - Response intercept(@NotNull Interceptor.Chain chain) throws IOException { - def request = chain.request() - request = request.newBuilder().header("Authorization", credentials).build() - return chain.proceed(request) - } - }) + .connectionPool(connectionPool) + .addInterceptor(loggingInterceptor) + .addInterceptor(new Interceptor() { + @Override + Response intercept(@NotNull Interceptor.Chain chain) throws IOException { + def request = chain.request() + request = request.newBuilder().header("Authorization", credentials).build() + return chain.proceed(request) + } + }) ObjectMapper mapper = new ObjectMapper() .configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) @@ -79,19 +79,19 @@ class JiraService { def query = [:] query['jql'] = params.query - query['startAt'] = params.pageOffset?:0 - query['maxResults'] = params.pageSize?:50 + query['startAt'] = params.pageOffset ?: 0 + query['maxResults'] = params.pageSize ?: 50 // query['expand'] = [ // "names", // "schema", // "operations" // ] // query['fields'] = params.fields?:"*all" - query['fields'] = params.includes?:[ - "summary", - "status", - "assignee", - "fixVersions" + query['fields'] = params.includes ?: [ + "summary", + "status", + "assignee", + "fixVersions" ] // params.total = params.total?:1000 @@ -101,7 +101,7 @@ class JiraService { params.result.addAll(result?.issues as List) - if(result?.issues.size()>=params.pageSize && params.result.size() < params.total) { + if (result?.issues.size() >= params.pageSize && params.result.size() < params.total) { params.pageOffset += params.pageSize search(params); } diff --git a/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/SubversionService.groovy b/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/SubversionService.groovy index bb771a45fcb..9e0ceeca367 100644 --- a/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/SubversionService.groovy +++ b/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/SubversionService.groovy @@ -43,7 +43,7 @@ class SubversionService { this.client.eventHandler = new ISVNEventHandler() { @Override void handleEvent(SVNEvent event, double progress) throws SVNException { - println ">>> PROGRESS: ${progress>0?:'-'}" + println ">>> PROGRESS: ${progress > 0 ?: '-'}" } @Override diff --git a/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/TemplateService.groovy b/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/TemplateService.groovy index bcb8f72650a..116be5156a2 100644 --- a/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/TemplateService.groovy +++ b/buildSrc/src/main/groovy/org/apache/fineract/gradle/service/TemplateService.groovy @@ -52,22 +52,23 @@ class TemplateService { te.printStackTrace(pw, false, true, false); pw.flush(); // To commit the HTTP response } - }} + } + } ) } FineractPluginExtension.FineractPluginTemplateParams render(FineractPluginExtension.FineractPluginTemplateParams params, Object data) { Template template = null; - if(params.templateFile) { + if (params.templateFile) { template = new Template("template", new FileReader(new File(params.templateFile), Charset.forName("UTF-8")), this.config) } - if(params.template) { + if (params.template) { template = new Template("template", new StringReader(params.template), this.config) } - if(template) { - if(params.outputFile) { + if (template) { + if (params.outputFile) { def output = new File(params.outputFile) output.createNewFile() diff --git a/buildSrc/src/main/resources/META-INF/gradle-plugins/org.apache.fineract.gradle.properties b/buildSrc/src/main/resources/META-INF/gradle-plugins/org.apache.fineract.gradle.properties index acbd8557877..084e5435aad 100644 --- a/buildSrc/src/main/resources/META-INF/gradle-plugins/org.apache.fineract.gradle.properties +++ b/buildSrc/src/main/resources/META-INF/gradle-plugins/org.apache.fineract.gradle.properties @@ -16,5 +16,4 @@ # specific language governing permissions and limitations # under the License. # - implementation-class=org.apache.fineract.gradle.FineractPlugin diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index ca876834d4f..8187d9cda29 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -20,8 +20,8 @@ --> + "-//Puppy Crawl//DTD Check Configuration 1.3//EN" + "http://www.puppycrawl.com/dtds/configuration_1_3.dtd"> @@ -50,21 +50,21 @@ - + - - + value="Parameter name ''{0}'' must match pattern ''{1}''."/> + + - - - - + + + + - + @@ -74,12 +74,12 @@ - + - - + + @@ -89,62 +89,64 @@ - + - - - - + + + + - - - + + + + value="Use 'jakarta.validation.constraints.NotNull' (API/DTO) or 'org.springframework.lang.NonNull' (services) instead of JetBrains annotations: ''{0}''"/> - - - + + + - + - - + + + value="Type name ''{0}'' must match pattern ''{1}''."/> - + + value="Method type name ''{0}'' must match pattern ''{1}''."/> - + + value="Package name ''{0}'' must match pattern ''{1}''."/> - + @@ -153,78 +155,79 @@ - - - - - - + + + + + + - + - + - - - + value="GenericWhitespace ''{0}'' is followed by whitespace."/> + + + - + + value="Method name ''{0}'' must match pattern ''{1}''."/> - + + value="Class type name ''{0}'' must match pattern ''{1}''."/> - - + + - + value="WhitespaceAround: ''{0}'' is not followed by whitespace."/> + + value="Member name ''{0}'' must match pattern ''{1}''."/> - + - + + value="Local variable name ''{0}'' must match pattern ''{1}''."/> - + + + + + + + < ! - - Do NOT 'scope' this one; any JavaDoc (public/protected/private) IFF present, should be style checked. - - > + + + + + + + + + + < ! - - TODO Enable proper JavaDoc paragraphs (requires removing /** from all license headers) - - > + + + + --> + "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN" + "https://checkstyle.org/dtds/suppressions_1_2.dtd"> - - - - - - - - + + + + + + + + - - + + - - + + - - - - - - - - - + + + + + + + + + - - + + - + - - + + - - + + - - - - - + + + + + - + - - + + - - + + - - - + + + diff --git a/fineract-accounting/build.gradle b/fineract-accounting/build.gradle index 9f7ab3ab4e1..0838be69768 100644 --- a/fineract-accounting/build.gradle +++ b/fineract-accounting/build.gradle @@ -52,9 +52,9 @@ apply from: 'dependencies.gradle' // https://github.com/andygoossens/gradle-modernizer-plugin modernizer { ignoreClassNamePatterns = [ - '.*AbstractPersistableCustom', - '.*EntityTables', - '.*domain.*' + '.*AbstractPersistableCustom', + '.*EntityTables', + '.*domain.*' ] } @@ -66,7 +66,7 @@ if (project.hasProperty('env') && project.getProperty('env') == 'eclipse') { eclipse { project { - buildCommand([ LaunchConfigHandle: "/.externalToolBuilders/OpenJPA Enhance Builder.launch" ], 'org.eclipse.ui.externaltools.ExternalToolBuilder') + buildCommand([LaunchConfigHandle: "/.externalToolBuilders/OpenJPA Enhance Builder.launch"], 'org.eclipse.ui.externaltools.ExternalToolBuilder') } } diff --git a/fineract-accounting/dependencies.gradle b/fineract-accounting/dependencies.gradle index ba2bfda6637..d51e7eb28b6 100644 --- a/fineract-accounting/dependencies.gradle +++ b/fineract-accounting/dependencies.gradle @@ -29,7 +29,7 @@ dependencies { implementation('org.apache.avro:avro') implementation( project(path: ':fineract-avro-schemas') - ) + ) implementation( 'org.springframework.boot:spring-boot-starter-web', @@ -55,11 +55,11 @@ dependencies { 'org.mapstruct:mapstruct', 'io.github.resilience4j:resilience4j-spring-boot3', - ) + ) compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' annotationProcessor 'org.mapstruct:mapstruct-processor' - implementation ('org.springframework.boot:spring-boot-starter-data-jpa') { + implementation('org.springframework.boot:spring-boot-starter-data-jpa') { exclude group: 'org.hibernate' } implementation('org.eclipse.persistence:org.eclipse.persistence.jpa') { @@ -68,13 +68,13 @@ dependencies { // testCompile dependencies are ONLY used in src/test, not src/main. // Do NOT repeat dependencies which are ALREADY in implementation or runtimeOnly! // - testImplementation( 'io.github.classgraph:classgraph' ) - testImplementation ('org.springframework.boot:spring-boot-starter-test') { + testImplementation('io.github.classgraph:classgraph') + testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'com.jayway.jsonpath', module: 'json-path' exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' exclude group: 'jakarta.activation' exclude group: 'javax.activation' exclude group: 'org.skyscreamer' } - testImplementation ('org.mockito:mockito-inline') + testImplementation('org.mockito:mockito-inline') } diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResourceSwagger.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResourceSwagger.java index 568314ea3e1..2a79ae29d02 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResourceSwagger.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingConstants.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingConstants.java index 8976f172f81..fb400a626ba 100755 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingConstants.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/api/AccrualAccountingConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/handler/ExecutePeriodicAccrualCommandHandler.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/handler/ExecutePeriodicAccrualCommandHandler.java index adf8bbc6e41..6ee90547345 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/handler/ExecutePeriodicAccrualCommandHandler.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/handler/ExecutePeriodicAccrualCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/request/AccrualAccountRequest.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/request/AccrualAccountRequest.java index 2f50675a5ec..32a41f1e440 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/request/AccrualAccountRequest.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/request/AccrualAccountRequest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/serialization/AccrualAccountingDataValidator.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/serialization/AccrualAccountingDataValidator.java index a34be4720f9..6e219d82e01 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/serialization/AccrualAccountingDataValidator.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/serialization/AccrualAccountingDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.time.LocalDate; import java.util.ArrayList; @@ -31,6 +32,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.accounting.accrual.api.AccrualAccountingConstants; @@ -55,7 +57,8 @@ public void validateLoanPeriodicAccrualData(final String json) { if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, LOAN_PERIODIC_REQUEST_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/service/AccrualAccountingWritePlatformService.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/service/AccrualAccountingWritePlatformService.java index 8a471a62e6b..58d29dde26e 100755 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/service/AccrualAccountingWritePlatformService.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/accrual/service/AccrualAccountingWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/api/GLClosureJsonInputParams.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/api/GLClosureJsonInputParams.java index bea52b20ba9..99807f75ab9 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/api/GLClosureJsonInputParams.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/api/GLClosureJsonInputParams.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResourceSwagger.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResourceSwagger.java index 5e2f366961d..b7b9e2bd2ba 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResourceSwagger.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/api/GLClosuresApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.closure.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; /** diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/command/GLClosureCommand.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/command/GLClosureCommand.java index 8ae14b7ea02..464996dc25f 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/command/GLClosureCommand.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/command/GLClosureCommand.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.accounting.closure.api.GLClosureJsonInputParams; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/data/GLClosureData.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/data/GLClosureData.java index 3df4b7009bf..39e6aec87c5 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/data/GLClosureData.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/data/GLClosureData.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.Collection; + import lombok.Data; import org.apache.fineract.organisation.office.data.OfficeData; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/data/request/GLClosureRequest.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/data/request/GLClosureRequest.java index e3faa74cd41..290d2205d95 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/data/request/GLClosureRequest.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/data/request/GLClosureRequest.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,7 @@ import java.io.Serializable; public record GLClosureRequest(Long id, Long officeId, String closingDate, String comments, String dateFormat, - String locale) implements Serializable { + String locale) implements Serializable { @Serial private static final long serialVersionUID = 1L; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/domain/GLClosure.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/domain/GLClosure.java index 5c363883f36..312410c5f32 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/domain/GLClosure.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/domain/GLClosure.java @@ -6,9 +6,9 @@ * 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 @@ -24,9 +24,11 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.time.LocalDate; import java.util.LinkedHashMap; import java.util.Map; + import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; @@ -38,7 +40,7 @@ @Entity @Table(name = "acc_gl_closure", uniqueConstraints = { - @UniqueConstraint(columnNames = { "office_id", "closing_date" }, name = "office_id_closing_date") }) + @UniqueConstraint(columnNames = {"office_id", "closing_date"}, name = "office_id_closing_date")}) @NoArgsConstructor(access = AccessLevel.PROTECTED) @Getter public class GLClosure extends AbstractAuditableCustom { @@ -79,7 +81,7 @@ public Map update(final JsonCommand command) { } private void handlePropertyUpdate(final JsonCommand command, final Map actualChanges, final String paramName, - final String propertyToBeUpdated) { + final String propertyToBeUpdated) { if (command.isChangeInStringParameterNamed(paramName, propertyToBeUpdated)) { final String newValue = command.stringValueOfParameterNamed(paramName); actualChanges.put(paramName, newValue); diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/domain/GLClosureRepository.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/domain/GLClosureRepository.java index 75bfe7aba48..9e32576cd43 100755 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/domain/GLClosureRepository.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/domain/GLClosureRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureDuplicateException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureDuplicateException.java index 35a4efa3515..8b83ea2f0b2 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureDuplicateException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureDuplicateException.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.closure.exception; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureInvalidDeleteException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureInvalidDeleteException.java index 3ead13eb438..fce50ce8f43 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureInvalidDeleteException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureInvalidDeleteException.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.closure.exception; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureInvalidException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureInvalidException.java index 46d1b322b14..ddfb6d71e81 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureInvalidException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureInvalidException.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.closure.exception; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureNotFoundException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureNotFoundException.java index fab656449aa..fb80473ffea 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureNotFoundException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/exception/GLClosureNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/handler/CreateGLClosureCommandHandler.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/handler/CreateGLClosureCommandHandler.java index 86a94460d31..6ea2aa18885 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/handler/CreateGLClosureCommandHandler.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/handler/CreateGLClosureCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/handler/DeleteGLClosureCommandHandler.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/handler/DeleteGLClosureCommandHandler.java index 3fab9751833..95629bc786e 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/handler/DeleteGLClosureCommandHandler.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/handler/DeleteGLClosureCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/handler/UpdateGLClosureCommandHandler.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/handler/UpdateGLClosureCommandHandler.java index 49862064669..e8d17653fd9 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/handler/UpdateGLClosureCommandHandler.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/handler/UpdateGLClosureCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/serialization/GLClosureCommandFromApiJsonDeserializer.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/serialization/GLClosureCommandFromApiJsonDeserializer.java index d3951ce7321..115ef8c95a2 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/serialization/GLClosureCommandFromApiJsonDeserializer.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/serialization/GLClosureCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,10 +20,12 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.time.LocalDate; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.accounting.closure.api.GLClosureJsonInputParams; @@ -49,7 +51,8 @@ public GLClosureCommand commandFromApiJson(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final Set supportedParameters = GLClosureJsonInputParams.getAllValues(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, supportedParameters); diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureReadPlatformService.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureReadPlatformService.java index 7caa6ce258b..425070bd9ef 100755 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureReadPlatformService.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.closure.service; import java.util.List; + import org.apache.fineract.accounting.closure.data.GLClosureData; public interface GLClosureReadPlatformService { diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureReadPlatformServiceImpl.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureReadPlatformServiceImpl.java index 18c78f54c32..5267664566e 100755 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureReadPlatformServiceImpl.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.LocalDate; import java.util.Arrays; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.closure.data.GLClosureData; import org.apache.fineract.accounting.closure.exception.GLClosureNotFoundException; @@ -97,7 +98,7 @@ public GLClosureData retrieveGLClosureById(final long glClosureId) { final GLClosureMapper rm = new GLClosureMapper(); final String sql = "select " + rm.schema() + " and glClosure.id = ?"; - final GLClosureData glAccountData = this.jdbcTemplate.queryForObject(sql, rm, new Object[] { glClosureId }); // NOSONAR + final GLClosureData glAccountData = this.jdbcTemplate.queryForObject(sql, rm, new Object[]{glClosureId}); // NOSONAR return glAccountData; } catch (final EmptyResultDataAccessException e) { diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureWritePlatformService.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureWritePlatformService.java index f5c4823e5e7..be4232df527 100755 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureWritePlatformService.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureWritePlatformServiceJpaRepositoryImpl.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureWritePlatformServiceJpaRepositoryImpl.java index 97f3c026718..ef9ef09e6b9 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/closure/service/GLClosureWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.accounting.closure.api.GLClosureJsonInputParams; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/common/AccountingDropdownReadPlatformService.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/common/AccountingDropdownReadPlatformService.java index d6a23a3e106..09a78b68361 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/common/AccountingDropdownReadPlatformService.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/common/AccountingDropdownReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Map; + import org.apache.fineract.accounting.glaccount.data.GLAccountData; import org.apache.fineract.infrastructure.core.data.EnumOptionData; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/common/AccountingValidations.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/common/AccountingValidations.java index aac47c5b6ad..a3a19dfb6b9 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/common/AccountingValidations.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/common/AccountingValidations.java @@ -6,9 +6,9 @@ * 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 @@ -20,7 +20,8 @@ public final class AccountingValidations { - private AccountingValidations() {} + private AccountingValidations() { + } public static boolean isCashBasedAccounting(final Integer accountingRuleType) { return AccountingRuleType.CASH_BASED.getValue().equals(accountingRuleType); diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResourceSwagger.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResourceSwagger.java index 2b0f9e984c5..e4d62e4ab91 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResourceSwagger.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -27,7 +27,8 @@ */ final class FinancialActivityAccountsApiResourceSwagger { - private FinancialActivityAccountsApiResourceSwagger() {} + private FinancialActivityAccountsApiResourceSwagger() { + } @Schema(description = "GetFinancialActivityAccountsResponse") public static final class GetFinancialActivityAccountsResponse { @@ -89,7 +90,8 @@ private PutFinancialActivityAccountsResponse() { public static final class PutFinancialActivityAccountscommentsSwagger { - private PutFinancialActivityAccountscommentsSwagger() {} + private PutFinancialActivityAccountscommentsSwagger() { + } @Schema(example = "1") public Long glAccountId; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsConstants.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsConstants.java index bc915b3f456..e66f8484055 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsConstants.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsJsonInputParams.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsJsonInputParams.java index 4e6a10bdef5..30a7d1708c6 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsJsonInputParams.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/api/FinancialActivityAccountsJsonInputParams.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/data/FinancialActivityAccountData.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/data/FinancialActivityAccountData.java index 3c761a649c1..1367f1ab7fd 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/data/FinancialActivityAccountData.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/data/FinancialActivityAccountData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Map; + import lombok.Data; import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.glaccount.data.GLAccountData; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/data/request/FinancialActivityAccRequest.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/data/request/FinancialActivityAccRequest.java index 9c81886ed62..d58d17448f9 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/data/request/FinancialActivityAccRequest.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/data/request/FinancialActivityAccRequest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/domain/FinancialActivityAccount.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/domain/FinancialActivityAccount.java index b08d9fd6bb6..4f21be8d753 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/domain/FinancialActivityAccount.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/domain/FinancialActivityAccount.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/domain/FinancialActivityAccountRepository.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/domain/FinancialActivityAccountRepository.java index 3a6d0c9fb18..296a6177cd2 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/domain/FinancialActivityAccountRepository.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/domain/FinancialActivityAccountRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/domain/FinancialActivityAccountRepositoryWrapper.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/domain/FinancialActivityAccountRepositoryWrapper.java index 6ff241e711e..7223b81f83b 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/domain/FinancialActivityAccountRepositoryWrapper.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/domain/FinancialActivityAccountRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.financialactivityaccount.domain; import java.util.List; + import org.apache.fineract.accounting.financialactivityaccount.exception.FinancialActivityAccountNotFoundException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/DuplicateFinancialActivityAccountFoundException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/DuplicateFinancialActivityAccountFoundException.java index a83b920a1c0..d9077320cd9 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/DuplicateFinancialActivityAccountFoundException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/DuplicateFinancialActivityAccountFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/FinancialActivityAccountInvalidException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/FinancialActivityAccountInvalidException.java index 384b48d1ac4..c9fb74ac97e 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/FinancialActivityAccountInvalidException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/FinancialActivityAccountInvalidException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/FinancialActivityAccountNotFoundException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/FinancialActivityAccountNotFoundException.java index 22f101813fc..02f4e566400 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/FinancialActivityAccountNotFoundException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/exception/FinancialActivityAccountNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/handler/CreateFinancialActivityAccountHandler.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/handler/CreateFinancialActivityAccountHandler.java index 4e6bccc255a..85f062c58f5 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/handler/CreateFinancialActivityAccountHandler.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/handler/CreateFinancialActivityAccountHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/handler/DeleteFinancialActivityAccountCommandHandler.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/handler/DeleteFinancialActivityAccountCommandHandler.java index e9a19eb9f86..a0a6710ab44 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/handler/DeleteFinancialActivityAccountCommandHandler.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/handler/DeleteFinancialActivityAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/handler/UpdateFinancialActivityAccountCommandHandler.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/handler/UpdateFinancialActivityAccountCommandHandler.java index fe5c54a12d2..ce3c843dab4 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/handler/UpdateFinancialActivityAccountCommandHandler.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/handler/UpdateFinancialActivityAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/serialization/FinancialActivityAccountDataValidator.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/serialization/FinancialActivityAccountDataValidator.java index e69cddba766..3579eafdc8b 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/serialization/FinancialActivityAccountDataValidator.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/serialization/FinancialActivityAccountDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,11 +20,13 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.accounting.common.AccountingConstants.FinancialActivity; @@ -105,7 +107,8 @@ private void validateJSONAndCheckForUnsupportedParams(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, this.supportedParameters); } diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountReadPlatformService.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountReadPlatformService.java index c06b06bc1b3..a4b92e7c72d 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountReadPlatformService.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.financialactivityaccount.service; import java.util.List; + import org.apache.fineract.accounting.financialactivityaccount.data.FinancialActivityAccountData; public interface FinancialActivityAccountReadPlatformService { diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountReadPlatformServiceImpl.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountReadPlatformServiceImpl.java index 6c69a934a08..887725aa39a 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountReadPlatformServiceImpl.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.sql.SQLException; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.common.AccountingConstants.FinancialActivity; import org.apache.fineract.accounting.common.AccountingDropdownReadPlatformService; @@ -46,7 +47,7 @@ public class FinancialActivityAccountReadPlatformServiceImpl implements Financia @Override public List retrieveAll() { String sql = "select " + financialActivityAccountMapper.schema(); - return this.jdbcTemplate.query(sql, financialActivityAccountMapper, new Object[] {}); // NOSONAR + return this.jdbcTemplate.query(sql, financialActivityAccountMapper, new Object[]{}); // NOSONAR } @Override @@ -57,7 +58,7 @@ public FinancialActivityAccountData retrieve(Long financialActivityAccountId) { sqlBuilder.append(this.financialActivityAccountMapper.schema()); sqlBuilder.append(" where faa.id=?"); return this.jdbcTemplate.queryForObject(sqlBuilder.toString(), this.financialActivityAccountMapper, - new Object[] { financialActivityAccountId }); + new Object[]{financialActivityAccountId}); } catch (final EmptyResultDataAccessException e) { throw new FinancialActivityAccountNotFoundException(financialActivityAccountId, e); } diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountWritePlatformService.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountWritePlatformService.java index 23a3063caa3..f4e69ed84eb 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountWritePlatformService.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountWritePlatformServiceImpl.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountWritePlatformServiceImpl.java index 3f01e695dbd..3d5b62ca5a3 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountWritePlatformServiceImpl.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/financialactivityaccount/service/FinancialActivityAccountWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.accounting.financialactivityaccount.service; import jakarta.persistence.PersistenceException; + import java.util.HashMap; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; @@ -140,7 +142,7 @@ public CommandProcessingResult deleteGLAccountActivityMapping(Long financialActi } private void handleFinancialActivityAccountDataIntegrityIssues(final JsonCommand command, final Throwable realCause, - final Exception dve) { + final Exception dve) { if (realCause.getMessage().contains("financial_activity_type")) { final Integer financialActivityId = command .integerValueSansLocaleOfParameterNamed(FinancialActivityAccountsJsonInputParams.FINANCIAL_ACTIVITY_ID.getValue()); diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResourceSwagger.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResourceSwagger.java index ca97d53eb9a..4cdb87bab61 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResourceSwagger.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.accounting.glaccount.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.Collection; import java.util.List; + import org.apache.fineract.accounting.glaccount.data.GLAccountData; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.core.data.EnumOptionData; @@ -192,7 +194,8 @@ private PutGLAccountsResponse() { @Schema public static final class PutGLAccountsResponsechangesSwagger { - private PutGLAccountsResponsechangesSwagger() {} + private PutGLAccountsResponsechangesSwagger() { + } @Schema(example = "Cash at Bangalore") public String name; @@ -212,7 +215,8 @@ private DeleteGLAccountsResponse() { private static final class DeleteGLAccountsResponseChangesSwagger { - private DeleteGLAccountsResponseChangesSwagger() {} + private DeleteGLAccountsResponseChangesSwagger() { + } } diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/command/GLAccountCommand.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/command/GLAccountCommand.java index f7b673e4948..6e829d740c9 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/command/GLAccountCommand.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/command/GLAccountCommand.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.fineract.accounting.glaccount.api.GLAccountJsonInputParams; import org.apache.fineract.accounting.glaccount.domain.GLAccountType; import org.apache.fineract.accounting.glaccount.domain.GLAccountUsage; @@ -31,8 +32,9 @@ * Immutable command for adding a general Ledger Account */ -public record GLAccountCommand(Long id, String name, Long parentId, String glCode, Boolean disabled, Boolean manualEntriesAllowed, - Integer type, Integer usage, String description, Long tagId) { +public record GLAccountCommand(Long id, String name, Long parentId, String glCode, Boolean disabled, + Boolean manualEntriesAllowed, + Integer type, Integer usage, String description, Long tagId) { public void validateForCreate() { diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/data/GLAccountDataForLookup.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/data/GLAccountDataForLookup.java index 607c02900a9..43171a10db8 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/data/GLAccountDataForLookup.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/data/GLAccountDataForLookup.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/domain/TrialBalance.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/domain/TrialBalance.java index 41836a3ac03..2463d907c5f 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/domain/TrialBalance.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/domain/TrialBalance.java @@ -6,9 +6,9 @@ * 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 @@ -22,9 +22,11 @@ import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.Objects; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -59,7 +61,7 @@ public class TrialBalance extends AbstractPersistableCustom { private BigDecimal closingBalance; public static TrialBalance getInstance(final Long officeId, final Long glAccountId, final BigDecimal amount, final LocalDate entryDate, - final LocalDate transactionDate) { + final LocalDate transactionDate) { return new TrialBalance().setOfficeId(officeId).setGlAccountId(glAccountId).setAmount(amount).setEntryDate(entryDate) .setTransactionDate(transactionDate); } 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..44369752f36 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 @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ 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; import org.springframework.data.jpa.repository.Query; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/domain/TrialBalanceRepositoryWrapper.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/domain/TrialBalanceRepositoryWrapper.java index 28cae367941..85b0f4dc335 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/domain/TrialBalanceRepositoryWrapper.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/domain/TrialBalanceRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.glaccount.domain; import java.util.List; + import org.apache.fineract.accounting.trialbalance.exception.TrialBalanceNotFoundException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountDisableException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountDisableException.java index ca47194a452..c9c71d96734 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountDisableException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountDisableException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountDuplicateException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountDuplicateException.java index c7906d7a578..500b500ea81 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountDuplicateException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountDuplicateException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidClassificationException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidClassificationException.java index f0ecc86dfa2..80ece824d88 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidClassificationException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidClassificationException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidDeleteException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidDeleteException.java index 1711428967d..58873369d5a 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidDeleteException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidDeleteException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidParentException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidParentException.java index 529d4d261f2..e1d2f686cea 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidParentException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidParentException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidUpdateException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidUpdateException.java index e7d11c1391d..afc95f8f720 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidUpdateException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidUpdateException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidUsageException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidUsageException.java index c0996c638e3..6b340e2ddad 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidUsageException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountInvalidUsageException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/InvalidParentGLAccountHeadException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/InvalidParentGLAccountHeadException.java index fe4c7598ef3..6236768ff2c 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/InvalidParentGLAccountHeadException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/exception/InvalidParentGLAccountHeadException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/handler/CreateGLAccountCommandHandler.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/handler/CreateGLAccountCommandHandler.java index 0f0c719016a..40a9ec0cc9f 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/handler/CreateGLAccountCommandHandler.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/handler/CreateGLAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/handler/DeleteGLAccountCommandHandler.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/handler/DeleteGLAccountCommandHandler.java index 368165e3709..2e653732c59 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/handler/DeleteGLAccountCommandHandler.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/handler/DeleteGLAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/handler/UpdateGLAccountCommandHandler.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/handler/UpdateGLAccountCommandHandler.java index 33a0cd96779..b9a3957a827 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/handler/UpdateGLAccountCommandHandler.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/handler/UpdateGLAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 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..9845d8fdb3b 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 @@ -6,9 +6,9 @@ * 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 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..459db91ba3d 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 @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.accounting.glaccount.domain.TrialBalance; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/serialization/GLAccountCommandFromApiJsonDeserializer.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/serialization/GLAccountCommandFromApiJsonDeserializer.java index 5695a3e4081..fdea7ec812b 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/serialization/GLAccountCommandFromApiJsonDeserializer.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/serialization/GLAccountCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,9 +20,11 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.accounting.glaccount.api.GLAccountJsonInputParams; @@ -48,7 +50,8 @@ public GLAccountCommand commandFromApiJson(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final Set supportedParameters = GLAccountJsonInputParams.getAllValues(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, supportedParameters); diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountReadPlatformService.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountReadPlatformService.java index 046da52d142..090296da914 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountReadPlatformService.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.glaccount.service; import java.util.List; + import org.apache.fineract.accounting.glaccount.data.GLAccountData; import org.apache.fineract.accounting.glaccount.data.GLAccountDataForLookup; import org.apache.fineract.accounting.glaccount.domain.GLAccountType; @@ -27,7 +28,7 @@ public interface GLAccountReadPlatformService { List retrieveAllGLAccounts(Integer accountClassification, String searchParam, Integer usage, - Boolean manualTransactionsAllowed, Boolean disabled, JournalEntryAssociationParametersData associationParametersData); + Boolean manualTransactionsAllowed, Boolean disabled, JournalEntryAssociationParametersData associationParametersData); GLAccountData retrieveGLAccountById(long glAccountId, JournalEntryAssociationParametersData associationParametersData); diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountReadPlatformServiceImpl.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountReadPlatformServiceImpl.java index 30783e53d45..c0c670c37f3 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountReadPlatformServiceImpl.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.sql.SQLException; import java.util.Arrays; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.accounting.common.AccountingEnumerations; @@ -65,7 +66,7 @@ private static final class GLAccountMapper implements RowMapper { public String schema() { StringBuilder sb = new StringBuilder(); sb.append( - " gl.id as id, name as name, parent_id as parentId, gl_code as glCode, disabled as disabled, manual_journal_entries_allowed as manualEntriesAllowed, ") + " gl.id as id, name as name, parent_id as parentId, gl_code as glCode, disabled as disabled, manual_journal_entries_allowed as manualEntriesAllowed, ") .append("classification_enum as classification, account_usage as accountUsage, gl.description as description, ") .append(NAME_DECORATED_BASE_ON_HIERARCHY).append(" as nameDecorated, ") .append("cv.id as codeId, cv.code_value as codeValue "); @@ -109,8 +110,8 @@ public GLAccountData mapRow(final ResultSet rs, @SuppressWarnings("unused") fina @Override public List retrieveAllGLAccounts(final Integer accountClassification, final String searchParam, final Integer usage, - final Boolean manualTransactionsAllowed, final Boolean disabled, - JournalEntryAssociationParametersData associationParametersData) { + final Boolean manualTransactionsAllowed, final Boolean disabled, + JournalEntryAssociationParametersData associationParametersData) { if (accountClassification != null && !checkValidGLAccountType(accountClassification)) { throw new GLAccountInvalidClassificationException(accountClassification); } @@ -202,7 +203,7 @@ public GLAccountData retrieveGLAccountById(final long glAccountId, JournalEntryA .append(" ORDER BY gl_j.entry_date DESC,gl_j.id DESC LIMIT 1"); } - return this.jdbcTemplate.queryForObject(sql.toString(), rm, new Object[] { glAccountId }); + return this.jdbcTemplate.queryForObject(sql.toString(), rm, new Object[]{glAccountId}); } catch (final EmptyResultDataAccessException e) { throw new GLAccountNotFoundException(glAccountId, e); } @@ -253,7 +254,7 @@ public List retrieveAllEnabledHeaderGLAccounts(final GLAccountTyp public List retrieveAccountsByTagId(final Long ruleId, final Integer transactionType) { final GLAccountDataLookUpMapper mapper = new GLAccountDataLookUpMapper(); final String sql = "Select " + GLAccountDataLookUpMapper.LOOKUP_SCHEMA + " where rule.id=? and tags.acc_type_enum=?"; - return this.jdbcTemplate.query(sql, mapper, (Object[]) new Object[] { ruleId, transactionType });// NOSONAR + return this.jdbcTemplate.query(sql, mapper, (Object[]) new Object[]{ruleId, transactionType});// NOSONAR } private static final class GLAccountDataLookUpMapper implements RowMapper { diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountWritePlatformService.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountWritePlatformService.java index c68f8b28a38..49e58e380bc 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountWritePlatformService.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountWritePlatformServiceJpaRepositoryImpl.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountWritePlatformServiceJpaRepositoryImpl.java index 0b86e2fa7b2..55d2a12348f 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/glaccount/service/GLAccountWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.glaccount.service; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.common.AccountingConstants; import org.apache.fineract.accounting.glaccount.api.GLAccountJsonInputParams; @@ -238,7 +239,7 @@ private GLAccount validateParentGLAccount(final Long parentAccountId) { * @param dve */ private void handleGLAccountDataIntegrityIssues(final JsonCommand command, final Throwable realCause, - final NonTransientDataAccessException dve) { + final NonTransientDataAccessException dve) { if (realCause.getMessage().contains("acc_gl_code")) { final String glCode = command.stringValueOfParameterNamed(GLAccountJsonInputParams.GL_CODE.getValue()); throw new GLAccountDuplicateException(glCode); diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/JournalEntryMapper.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/JournalEntryMapper.java index 1f35e6c48bd..6695d66c8d6 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/JournalEntryMapper.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/JournalEntryMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntryJsonInputParams.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntryJsonInputParams.java index 95b74783c1e..199fdd27248 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntryJsonInputParams.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntryJsonInputParams.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/command/JournalEntryCommand.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/command/JournalEntryCommand.java index 45177d8b167..a1546cdf258 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/command/JournalEntryCommand.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/command/JournalEntryCommand.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.journalentry.api.JournalEntryJsonInputParams; @@ -118,7 +119,7 @@ public void validateForCreate() { * @param credit */ private void validateSingleDebitOrCredit(final DataValidatorBuilder baseDataValidator, final String paramSuffix, final int arrayPos, - final SingleDebitOrCreditEntryCommand credit) { + final SingleDebitOrCreditEntryCommand credit) { baseDataValidator.reset().parameter(paramSuffix + "[" + arrayPos + "].glAccountId").value(credit.getGlAccountId()).notNull() .integerGreaterThanZero(); baseDataValidator.reset().parameter(paramSuffix + "[" + arrayPos + "].amount").value(credit.getAmount()).notNull() diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/command/SingleDebitOrCreditEntryCommand.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/command/SingleDebitOrCreditEntryCommand.java index d003f9313a3..9b7435af891 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/command/SingleDebitOrCreditEntryCommand.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/command/SingleDebitOrCreditEntryCommand.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.util.Set; + import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/CreditDebit.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/CreditDebit.java index 0cac02234c6..44c4b35af85 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/CreditDebit.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/CreditDebit.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.journalentry.data; import java.math.BigDecimal; + import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryAssociationParametersData.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryAssociationParametersData.java index 970401a6f96..987240212e9 100755 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryAssociationParametersData.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryAssociationParametersData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryData.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryData.java index db3197312d8..2ec5dfcf238 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryData.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; + import lombok.Data; import org.apache.fineract.accounting.glaccount.data.GLAccountData; import org.apache.fineract.infrastructure.core.data.EnumOptionData; @@ -97,11 +98,12 @@ public class JournalEntryData { private String externalAssetOwner; private transient Long savingTransactionId; - public JournalEntryData() {} + public JournalEntryData() { + } // for opening bal bulk import public JournalEntryData(Long officeId, LocalDate transactionDate, String currencyCode, List credits, - List debits, String locale, String dateFormat) { + List debits, String locale, String dateFormat) { this.officeId = officeId; this.dateFormat = dateFormat; this.locale = locale; @@ -143,8 +145,8 @@ public JournalEntryData(Long officeId, LocalDate transactionDate, String currenc } private JournalEntryData(Long officeId, LocalDate transactionDate, String currencyCode, Long paymentTypeId, Integer rowIndex, - List credits, List debits, String accountNumber, String checkNumber, String routingCode, - String receiptNumber, String bankNumber, String comments, String locale, String dateFormat) { + List credits, List debits, String accountNumber, String checkNumber, String routingCode, + String receiptNumber, String bankNumber, String comments, String locale, String dateFormat) { this.officeId = officeId; this.dateFormat = dateFormat; @@ -187,12 +189,12 @@ private JournalEntryData(Long officeId, LocalDate transactionDate, String curren } public JournalEntryData(final Long id, final Long officeId, final String officeName, final String glAccountName, final Long glAccountId, - final String glAccountCode, final EnumOptionData glAccountClassification, final LocalDate transactionDate, - final EnumOptionData entryType, final BigDecimal amount, final String transactionId, final Boolean manualEntry, - final EnumOptionData entityType, final Long entityId, final Long createdByUserId, final LocalDate submittedOnDate, - final String createdByUserName, final String comments, final Boolean reversed, final String referenceNumber, - final BigDecimal officeRunningBalance, final BigDecimal organizationRunningBalance, final Boolean runningBalanceComputed, - final TransactionDetailData transactionDetailData, final CurrencyData currency, final String externalAssetOwner) { + final String glAccountCode, final EnumOptionData glAccountClassification, final LocalDate transactionDate, + final EnumOptionData entryType, final BigDecimal amount, final String transactionId, final Boolean manualEntry, + final EnumOptionData entityType, final Long entityId, final Long createdByUserId, final LocalDate submittedOnDate, + final String createdByUserName, final String comments, final Boolean reversed, final String referenceNumber, + final BigDecimal officeRunningBalance, final BigDecimal organizationRunningBalance, final Boolean runningBalanceComputed, + final TransactionDetailData transactionDetailData, final CurrencyData currency, final String externalAssetOwner) { this.id = id; this.officeId = officeId; this.officeName = officeName; @@ -223,14 +225,14 @@ public JournalEntryData(final Long id, final Long officeId, final String officeN } public static JournalEntryData importInstance(Long officeId, LocalDate transactionDate, String currencyCode, Long paymentTypeId, - Integer rowIndex, List credits, List debits, String accountNumber, String checkNumber, - String routingCode, String receiptNumber, String bankNumber, String comments, String locale, String dateFormat) { + Integer rowIndex, List credits, List debits, String accountNumber, String checkNumber, + String routingCode, String receiptNumber, String bankNumber, String comments, String locale, String dateFormat) { return new JournalEntryData(officeId, transactionDate, currencyCode, paymentTypeId, rowIndex, credits, debits, accountNumber, checkNumber, routingCode, receiptNumber, bankNumber, comments, locale, dateFormat); } public static JournalEntryData importInstance1(Long officeId, LocalDate transactionDate, String currencyCode, List credits, - List debits, String locale, String dateFormat) { + List debits, String locale, String dateFormat) { return new JournalEntryData(officeId, transactionDate, currencyCode, credits, debits, locale, dateFormat); } diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryDataValidator.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryDataValidator.java index e8ded465b95..1c6ebcf8e16 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryDataValidator.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.journalentry.data; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Collections; @@ -26,6 +27,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.fineract.accounting.journalentry.api.JournalEntryJsonInputParams; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -49,7 +51,8 @@ public JournalEntryDataValidator(final FromJsonHelper fromApiJsonHelper) { } public void validateForUpdateRunningBalance(final JsonCommand command) { - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, command.json(), RUNNING_BALANCE_UPDATE_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors).resource("GLJournalEntry"); diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryIdentifier.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryIdentifier.java index ce1ff798155..4c84199f058 100755 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryIdentifier.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/JournalEntryIdentifier.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/OfficeOpeningBalancesData.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/OfficeOpeningBalancesData.java index 8e5c59d6c3b..ccf63f43a10 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/OfficeOpeningBalancesData.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/OfficeOpeningBalancesData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.glaccount.data.GLAccountData; @@ -39,9 +40,9 @@ public final class OfficeOpeningBalancesData { private final List expenseAccountOpeningBalances; public static OfficeOpeningBalancesData createNew(final Long officeId, final String officeName, final LocalDate transactionDate, - final GLAccountData contraAccount, final List assetAccountOpeningBalances, - final List liabityAccountOpeningBalances, final List incomeAccountOpeningBalances, - final List equityAccountOpeningBalances, final List expenseAccountOpeningBalances) { + final GLAccountData contraAccount, final List assetAccountOpeningBalances, + final List liabityAccountOpeningBalances, final List incomeAccountOpeningBalances, + final List equityAccountOpeningBalances, final List expenseAccountOpeningBalances) { return new OfficeOpeningBalancesData(officeId, officeName, transactionDate, contraAccount, assetAccountOpeningBalances, liabityAccountOpeningBalances, incomeAccountOpeningBalances, equityAccountOpeningBalances, expenseAccountOpeningBalances); } diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/TransactionDetailData.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/TransactionDetailData.java index 834b683f77a..d2ee446f5b0 100755 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/TransactionDetailData.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/TransactionDetailData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/TransactionTypeEnumData.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/TransactionTypeEnumData.java index e6463c3e114..fc4b93f4935 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/TransactionTypeEnumData.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/data/TransactionTypeEnumData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/domain/JournalEntry.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/domain/JournalEntry.java index d190e9f18d0..6abd7bcb048 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/domain/JournalEntry.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/domain/JournalEntry.java @@ -6,9 +6,9 @@ * 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 @@ -24,8 +24,10 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import lombok.Setter; import org.apache.commons.lang3.StringUtils; @@ -111,9 +113,9 @@ protected JournalEntry() { } protected JournalEntry(final Office office, final PaymentDetail paymentDetail, final GLAccount glAccount, final String currencyCode, - final String transactionId, final boolean manualEntry, final LocalDate transactionDate, final Integer type, - final BigDecimal amount, final String description, final Integer entityType, final Long entityId, final String referenceNumber, - final Long loanTransactionId, final Long savingsTransactionId, final Long clientTransactionId, final Long shareTransactionId) { + final String transactionId, final boolean manualEntry, final LocalDate transactionDate, final Integer type, + final BigDecimal amount, final String description, final Integer entityType, final Long entityId, final String referenceNumber, + final Long loanTransactionId, final Long savingsTransactionId, final Long clientTransactionId, final Long shareTransactionId) { this.office = office; this.glAccount = glAccount; this.reversalJournalEntry = null; @@ -137,10 +139,10 @@ protected JournalEntry(final Office office, final PaymentDetail paymentDetail, f } public static JournalEntry createNew(final Office office, final PaymentDetail paymentDetail, final GLAccount glAccount, - final String currencyCode, final String transactionId, final boolean manualEntry, final LocalDate transactionDate, - final JournalEntryType journalEntryType, final BigDecimal amount, final String description, final Integer entityType, - final Long entityId, final String referenceNumber, final Long loanTransaction, final Long savingsTransaction, - final Long clientTransaction, Long shareTransactionId) { + final String currencyCode, final String transactionId, final boolean manualEntry, final LocalDate transactionDate, + final JournalEntryType journalEntryType, final BigDecimal amount, final String description, final Integer entityType, + final Long entityId, final String referenceNumber, final Long loanTransaction, final Long savingsTransaction, + final Long clientTransaction, Long shareTransactionId) { return new JournalEntry(office, paymentDetail, glAccount, currencyCode, transactionId, manualEntry, transactionDate, journalEntryType.getValue(), amount, description, entityType, entityId, referenceNumber, loanTransaction, savingsTransaction, clientTransaction, shareTransactionId); 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..89f7583554f 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 @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/exception/JournalEntriesNotFoundException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/exception/JournalEntriesNotFoundException.java index 7ff6baf78a6..45c1375263b 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/exception/JournalEntriesNotFoundException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/exception/JournalEntriesNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/exception/JournalEntryInvalidException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/exception/JournalEntryInvalidException.java index ac1a7ee775f..333ea6d1aa3 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/exception/JournalEntryInvalidException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/exception/JournalEntryInvalidException.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.journalentry.exception; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** @@ -85,7 +86,7 @@ public String errorCode() { } public JournalEntryInvalidException(final GlJournalEntryInvalidReason reason, final LocalDate date, final String accountName, - final String accountGLCode) { + final String accountGLCode) { super(reason.errorCode(), reason.errorMessage(), date, accountName, accountGLCode); } } diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/exception/JournalEntryNotFoundException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/exception/JournalEntryNotFoundException.java index 5a0086f9eef..bb562beaae2 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/exception/JournalEntryNotFoundException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/exception/JournalEntryNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/exception/JournalEntryRuntimeException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/exception/JournalEntryRuntimeException.java index 28aac3263fd..aa68c3be322 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/exception/JournalEntryRuntimeException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/exception/JournalEntryRuntimeException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/serialization/JournalEntryCommandFromApiJsonDeserializer.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/serialization/JournalEntryCommandFromApiJsonDeserializer.java index 21266f8a591..c4f89da9093 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/serialization/JournalEntryCommandFromApiJsonDeserializer.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/serialization/JournalEntryCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -29,6 +30,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.accounting.journalentry.api.JournalEntryJsonInputParams; @@ -59,7 +61,8 @@ public JournalEntryCommand commandFromApiJson(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final Set supportedParameters = this.getSupportedParameters(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, supportedParameters); @@ -115,7 +118,7 @@ public JournalEntryCommand commandFromApiJson(final String json) { * @param paramName */ private SingleDebitOrCreditEntryCommand[] populateCreditsOrDebitsArray(final JsonObject topLevelJsonElement, final Locale locale, - final String paramName) { + final String paramName) { final JsonArray array = topLevelJsonElement.get(paramName).getAsJsonArray(); SingleDebitOrCreditEntryCommand[] debitOrCredits = new SingleDebitOrCreditEntryCommand[array.size()]; for (int i = 0; i < array.size(); i++) { diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalAmountHolder.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalAmountHolder.java index 2ec625bbee7..f3fbf84aafc 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalAmountHolder.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalAmountHolder.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.journalentry.service; import java.math.BigDecimal; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryReadPlatformService.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryReadPlatformService.java index 6b778fb0b46..b66188d62f5 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryReadPlatformService.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.journalentry.service; import java.time.LocalDate; + import org.apache.fineract.accounting.journalentry.data.JournalEntryAssociationParametersData; import org.apache.fineract.accounting.journalentry.data.JournalEntryData; import org.apache.fineract.accounting.journalentry.data.OfficeOpeningBalancesData; @@ -30,8 +31,8 @@ public interface JournalEntryReadPlatformService { JournalEntryData retrieveGLJournalEntryById(long glJournalEntryId, JournalEntryAssociationParametersData associationParametersData); Page retrieveAll(SearchParameters searchParameters, Long glAccountId, Boolean onlyManualEntries, LocalDate fromDate, - LocalDate toDate, LocalDate submittedOnDateFrom, LocalDate submittedOnDateTo, String transactionId, Integer entityType, - JournalEntryAssociationParametersData associationParametersData); + LocalDate toDate, LocalDate submittedOnDateFrom, LocalDate submittedOnDateTo, String transactionId, Integer entityType, + JournalEntryAssociationParametersData associationParametersData); OfficeOpeningBalancesData retrieveOfficeOpeningBalances(Long officeId, String currencyCode); diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryRunningBalanceUpdateService.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryRunningBalanceUpdateService.java index d6f4586e96f..82d32c88a8d 100755 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryRunningBalanceUpdateService.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryRunningBalanceUpdateService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/domain/ProductToGLAccountMapping.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/domain/ProductToGLAccountMapping.java index 34442ba2169..5ca638c2d4a 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/domain/ProductToGLAccountMapping.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/domain/ProductToGLAccountMapping.java @@ -6,9 +6,9 @@ * 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 @@ -39,8 +39,8 @@ @NoArgsConstructor @Accessors(chain = true) @Entity -@Table(name = "acc_product_mapping", uniqueConstraints = { @UniqueConstraint(columnNames = { "product_id", "product_type", - "financial_account_type", "payment_type" }, name = "financial_action") }) +@Table(name = "acc_product_mapping", uniqueConstraints = {@UniqueConstraint(columnNames = {"product_id", "product_type", + "financial_account_type", "payment_type"}, name = "financial_action")}) public class ProductToGLAccountMapping extends AbstractPersistableCustom { @ManyToOne(optional = true) @@ -81,8 +81,8 @@ public class ProductToGLAccountMapping extends AbstractPersistableCustom { private CodeValue buydownFeeClassification; public static ProductToGLAccountMapping createNew(final GLAccount glAccount, final Long productId, final int productType, - final int financialAccountType, final CodeValue chargeOffReason, final CodeValue capitalizedIncomeClassification, - final CodeValue buydownFeeClassification) { + final int financialAccountType, final CodeValue chargeOffReason, final CodeValue capitalizedIncomeClassification, + final CodeValue buydownFeeClassification) { return new ProductToGLAccountMapping().setGlAccount(glAccount).setProductId(productId).setProductType(productType) .setFinancialAccountType(financialAccountType).setChargeOffReason(chargeOffReason) diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/domain/ProductToGLAccountMappingRepository.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/domain/ProductToGLAccountMappingRepository.java index 885e5932141..7d54e140dda 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/domain/ProductToGLAccountMappingRepository.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/domain/ProductToGLAccountMappingRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.producttoaccountmapping.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; @@ -28,61 +29,61 @@ public interface ProductToGLAccountMappingRepository extends JpaRepository, JpaSpecificationExecutor { ProductToGLAccountMapping findByProductIdAndProductTypeAndFinancialAccountTypeAndPaymentTypeId(Long productId, int productType, - int financialAccountType, Long paymentType); + int financialAccountType, Long paymentType); @Query("select mapping from ProductToGLAccountMapping mapping where mapping.productId= :productId and mapping.productType= :productType and mapping.financialAccountType= :financialAccountType and mapping.charge.id= :chargeId") ProductToGLAccountMapping findProductIdAndProductTypeAndFinancialAccountTypeAndChargeId(@Param("productId") Long productId, - @Param("productType") int productType, @Param("financialAccountType") int financialAccountType, - @Param("chargeId") Long ChargeId); + @Param("productType") int productType, @Param("financialAccountType") int financialAccountType, + @Param("chargeId") Long ChargeId); @Query("select mapping from ProductToGLAccountMapping mapping where mapping.productId =:productId and mapping.productType =:productType and mapping.financialAccountType=:financialAccountType and mapping.paymentType is NULL and mapping.charge is NULL and mapping.chargeOffReason is NULL and mapping.writeOffReason is NULL and mapping.capitalizedIncomeClassification is NULL and mapping.buydownFeeClassification is NULL") ProductToGLAccountMapping findCoreProductToFinAccountMapping(@Param("productId") Long productId, @Param("productType") int productType, - @Param("financialAccountType") int financialAccountType); + @Param("financialAccountType") int financialAccountType); /*** * The financial Account Type for a fund source will always be an asset (1) ***/ @Query("select mapping from ProductToGLAccountMapping mapping where mapping.productId =:productId and mapping.productType =:productType and mapping.financialAccountType=1 and mapping.paymentType is not NULL") List findAllPaymentTypeToFundSourceMappings(@Param("productId") Long productId, - @Param("productType") int productType); + @Param("productType") int productType); /*** * The financial Account Type for income from interest will always be 4 ***/ @Query("select mapping from ProductToGLAccountMapping mapping where mapping.productId =:productId and mapping.productType =:productType and mapping.financialAccountType=4 and mapping.charge is not NULL") List findAllFeeToIncomeAccountMappings(@Param("productId") Long productId, - @Param("productType") int productType); + @Param("productType") int productType); /*** * The financial Account Type for income from interest will always be 5 ***/ @Query("select mapping from ProductToGLAccountMapping mapping where mapping.productId =:productId and mapping.productType =:productType and mapping.financialAccountType=5 and mapping.charge is not NULL") List findAllPenaltyToIncomeAccountMappings(@Param("productId") Long productId, - @Param("productType") int productType); + @Param("productType") int productType); List findByProductIdAndProductType(Long productId, int productType); @Query("select mapping from ProductToGLAccountMapping mapping where mapping.productId =:productId and mapping.productType =:productType and mapping.chargeOffReason is not NULL") List findAllChargeOffReasonsMappings(@Param("productId") Long productId, - @Param("productType") int productType); + @Param("productType") int productType); List findAllProductToGLAccountMappingsByProductIdAndProductTypeAndFinancialAccountType(Long productId, - int productType, int financialAccountType); + int productType, int financialAccountType); @Query("select mapping from ProductToGLAccountMapping mapping where mapping.productId =:productId and mapping.productType =:productType and mapping.writeOffReason is not NULL") List findAllWriteOffReasonsMappings(@Param("productId") Long productId, - @Param("productType") int productType); + @Param("productType") int productType); @Query("select mapping from ProductToGLAccountMapping mapping where mapping.chargeOffReason.id =:chargeOffReasonId AND mapping.productId =:productId AND mapping.productType =:productType") ProductToGLAccountMapping findChargeOffReasonMapping(@Param("productId") Long productId, @Param("productType") Integer productType, - @Param("chargeOffReasonId") Long chargeOffReasonId); + @Param("chargeOffReasonId") Long chargeOffReasonId); @Query("select mapping from ProductToGLAccountMapping mapping where mapping.productId =:productId AND mapping.productType =:productType AND mapping.charge IS NULL AND mapping.paymentType IS NULL AND mapping.chargeOffReason IS NULL AND mapping.writeOffReason IS NULL AND mapping.capitalizedIncomeClassification is NULL AND mapping.buydownFeeClassification is NULL") List findAllRegularMappings(@Param("productId") Long productId, @Param("productType") Integer productType); @Query("select mapping from ProductToGLAccountMapping mapping where mapping.productId =:productId and mapping.productType =:productType and mapping.paymentType is not NULL") List findAllPaymentTypeMappings(@Param("productId") Long productId, - @Param("productType") Integer productType); + @Param("productType") Integer productType); @Query("select mapping from ProductToGLAccountMapping mapping where mapping.productId =:productId AND mapping.productType =:productType AND mapping.charge.penalty = TRUE") List findAllPenaltyMappings(@Param("productId") Long productId, @Param("productType") Integer productType); @@ -92,22 +93,22 @@ List findAllPaymentTypeMappings(@Param("productId") L @Query("select mapping from ProductToGLAccountMapping mapping where mapping.productId =:productId and mapping.productType =:productType and mapping.capitalizedIncomeClassification is not NULL") List findAllCapitalizedIncomeClassificationsMappings(@Param("productId") Long productId, - @Param("productType") int productType); + @Param("productType") int productType); @Query("select mapping from ProductToGLAccountMapping mapping where mapping.productId =:productId and mapping.productType =:productType and mapping.buydownFeeClassification is not NULL") List findAllBuyDownFeeClassificationsMappings(@Param("productId") Long productId, - @Param("productType") int productType); + @Param("productType") int productType); @Query("select mapping from ProductToGLAccountMapping mapping where mapping.buydownFeeClassification.id = :classificationId AND mapping.productId = :productId AND mapping.productType = :productType") ProductToGLAccountMapping findBuydownFeeClassificationMapping(@Param("productId") Long productId, - @Param("productType") Integer productType, @Param("classificationId") Long classificationId); + @Param("productType") Integer productType, @Param("classificationId") Long classificationId); @Query("select mapping from ProductToGLAccountMapping mapping where mapping.capitalizedIncomeClassification.id = :classificationId AND mapping.productId = :productId AND mapping.productType = :productType") ProductToGLAccountMapping findCapitalizedIncomeClassificationMapping(@Param("productId") Long productId, - @Param("productType") Integer productType, @Param("classificationId") Long classificationId); + @Param("productType") Integer productType, @Param("classificationId") Long classificationId); @Query("select mapping from ProductToGLAccountMapping mapping where mapping.writeOffReason.id = :writeOffReasonId AND mapping.productId = :productId AND mapping.productType = :productType") ProductToGLAccountMapping findWriteOffReasonMapping(@Param("productId") Long productId, @Param("productType") Integer productType, - @Param("writeOffReasonId") Long writeOffReasonId); + @Param("writeOffReasonId") Long writeOffReasonId); } diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingInvalidException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingInvalidException.java index 192dca069f2..cf244d55252 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingInvalidException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingInvalidException.java @@ -6,9 +6,9 @@ * 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 @@ -26,7 +26,7 @@ public class ProductToGLAccountMappingInvalidException extends AbstractPlatformDomainRuleException { public ProductToGLAccountMappingInvalidException(final String paramName, final String accountName, final Long accountId, - final String actualAccountCategory, final String expectedAccountCategory) { + final String actualAccountCategory, final String expectedAccountCategory) { super("error.msg." + paramName + ".invalid.account.type", "Passed in GLAccount " + paramName + " with Id " + accountId + "maps to the account " + accountName + " of type " + actualAccountCategory + ", the expected account type was one among " + expectedAccountCategory, diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingNotFoundException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingNotFoundException.java index d1f8f98bc7c..c84f45d0364 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingNotFoundException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/exception/ProductToGLAccountMappingNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/serialization/ProductToGLAccountMappingFromApiJsonDeserializer.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/serialization/ProductToGLAccountMappingFromApiJsonDeserializer.java index 511ce5e801b..7ebc91b6118 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/serialization/ProductToGLAccountMappingFromApiJsonDeserializer.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/serialization/ProductToGLAccountMappingFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -23,9 +23,11 @@ import static org.apache.fineract.portfolio.savings.SavingsApiConstants.isDormancyTrackingActiveParamName; import com.google.gson.JsonElement; + import java.util.ArrayList; import java.util.List; import java.util.Locale; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.accounting.common.AccountingConstants.LoanProductAccountingParams; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingHelper.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingHelper.java index 059ac484514..b8ee32bde92 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingHelper.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingHelper.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; @@ -30,6 +31,7 @@ import java.util.Optional; import java.util.Set; import java.util.function.Predicate; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.common.AccountingConstants.CashAccountsForLoan; import org.apache.fineract.accounting.common.AccountingConstants.LoanProductAccountingParams; @@ -70,7 +72,7 @@ public class ProductToGLAccountMappingHelper { private final CodeValueRepository codeValueRepository; public void saveProductToAccountMapping(final JsonElement element, final String paramName, final Long productId, - final int placeHolderTypeId, final GLAccountType expectedAccountType, final PortfolioProductType portfolioProductType) { + final int placeHolderTypeId, final GLAccountType expectedAccountType, final PortfolioProductType portfolioProductType) { final Long accountId = this.fromApiJsonHelper.extractLongNamed(paramName, element); if (accountId != null) { // optional entries may be null final GLAccount glAccount = getAccountByIdAndType(paramName, expectedAccountType, accountId); @@ -82,8 +84,8 @@ public void saveProductToAccountMapping(final JsonElement element, final String } public void mergeProductToAccountMappingChanges(final JsonElement element, final String paramName, final Long productId, - final int accountTypeId, final String accountTypeName, final Map changes, - final GLAccountType expectedAccountType, final PortfolioProductType portfolioProductType) { + final int accountTypeId, final String accountTypeName, final Map changes, + final GLAccountType expectedAccountType, final PortfolioProductType portfolioProductType) { final Long accountId = this.fromApiJsonHelper.extractLongNamed(paramName, element); // get the existing product @@ -124,8 +126,8 @@ public void mergeProductToAccountMappingChanges(final JsonElement element, final } public void createOrmergeProductToAccountMappingChanges(final JsonElement element, final String paramName, final Long productId, - final int accountTypeId, final Map changes, final GLAccountType expectedAccountType, - final PortfolioProductType portfolioProductType) { + final int accountTypeId, final Map changes, final GLAccountType expectedAccountType, + final PortfolioProductType portfolioProductType) { final Long accountId = this.fromApiJsonHelper.extractLongNamed(paramName, element); // get the existing product @@ -157,7 +159,7 @@ public void createOrmergeProductToAccountMappingChanges(final JsonElement elemen * @param changes */ public void savePaymentChannelToFundSourceMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes, final PortfolioProductType portfolioProductType) { + final Map changes, final PortfolioProductType portfolioProductType) { final JsonArray paymentChannelMappingArray = this.fromApiJsonHelper .extractJsonArrayNamed(LoanProductAccountingParams.PAYMENT_CHANNEL_FUND_SOURCE_MAPPING.getValue(), element); if (paymentChannelMappingArray != null) { @@ -184,7 +186,7 @@ public void savePaymentChannelToFundSourceMappings(final JsonCommand command, fi * @param changes */ public void saveChargesToGLAccountMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes, final PortfolioProductType portfolioProductType, final boolean isPenalty) { + final Map changes, final PortfolioProductType portfolioProductType, final boolean isPenalty) { String arrayName; if (isPenalty) { arrayName = LoanProductAccountingParams.PENALTY_INCOME_ACCOUNT_MAPPING.getValue(); @@ -208,9 +210,9 @@ public void saveChargesToGLAccountMappings(final JsonCommand command, final Json } public void saveReasonToGLAccountMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes, final PortfolioProductType portfolioProductType, - final LoanProductAccountingParams arrayNameParam, final LoanProductAccountingParams reasonCodeValueIdParam, - final CashAccountsForLoan cashAccountsForLoan) { + final Map changes, final PortfolioProductType portfolioProductType, + final LoanProductAccountingParams arrayNameParam, final LoanProductAccountingParams reasonCodeValueIdParam, + final CashAccountsForLoan cashAccountsForLoan) { final String arrayName = arrayNameParam.getValue(); final JsonArray reasonToExpenseAccountMappingArray = this.fromApiJsonHelper.extractJsonArrayNamed(arrayName, element); @@ -231,8 +233,8 @@ public void saveReasonToGLAccountMappings(final JsonCommand command, final JsonE } public void saveClassificationToGLAccountMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes, final PortfolioProductType portfolioProductType, - final LoanProductAccountingParams classificationParameter) { + final Map changes, final PortfolioProductType portfolioProductType, + final LoanProductAccountingParams classificationParameter) { final String arrayName = classificationParameter.getValue(); final JsonArray classificationToIncomeAccountMappingArray = this.fromApiJsonHelper.extractJsonArrayNamed(arrayName, element); @@ -261,7 +263,7 @@ public void saveClassificationToGLAccountMappings(final JsonCommand command, fin * @param changes */ public void updateChargeToIncomeAccountMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes, final PortfolioProductType portfolioProductType, final boolean isPenalty) { + final Map changes, final PortfolioProductType portfolioProductType, final boolean isPenalty) { // find all existing payment Channel to Fund source Mappings List existingChargeToIncomeAccountMappings; String arrayFragmentName; @@ -302,12 +304,12 @@ public void updateChargeToIncomeAccountMappings(final JsonCommand command, final if (inputChargeToIncomeAccountMap.size() == 0) { this.accountMappingRepository.deleteAll(existingChargeToIncomeAccountMappings); } /** - * Else,
- * update existing mappings OR
- * delete old mappings (which are already present, but not passed in as a part of Jsoncommand)
- * Create new mappings for charges that are passed in as a part of the Jsoncommand but not already present - * - **/ + * Else,
+ * update existing mappings OR
+ * delete old mappings (which are already present, but not passed in as a part of Jsoncommand)
+ * Create new mappings for charges that are passed in as a part of the Jsoncommand but not already present + * + **/ else { for (final ProductToGLAccountMapping chargeToIncomeAccountMapping : existingChargeToIncomeAccountMappings) { final Long currentCharge = chargeToIncomeAccountMapping.getCharge().getId(); @@ -350,7 +352,7 @@ public void updateChargeToIncomeAccountMappings(final JsonCommand command, final * @param changes */ public void updatePaymentChannelToFundSourceMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes, final PortfolioProductType portfolioProductType) { + final Map changes, final PortfolioProductType portfolioProductType) { // find all existing payment Channel to Fund source Mappings final List existingPaymentChannelToFundSourceMappings = this.accountMappingRepository .findAllPaymentTypeToFundSourceMappings(productId, portfolioProductType.getValue()); @@ -382,13 +384,13 @@ public void updatePaymentChannelToFundSourceMappings(final JsonCommand command, if (inputPaymentChannelFundSourceMap.isEmpty()) { this.accountMappingRepository.deleteAll(existingPaymentChannelToFundSourceMappings); } /** - * Else,
- * update existing mappings OR
- * delete old mappings (which re already present, but not passed in as a part of Jsoncommand)
- * Create new mappings for payment types that are passed in as a part of the Jsoncommand but not already - * present - * - **/ + * Else,
+ * update existing mappings OR
+ * delete old mappings (which re already present, but not passed in as a part of Jsoncommand)
+ * Create new mappings for payment types that are passed in as a part of the Jsoncommand but not already + * present + * + **/ else { for (final ProductToGLAccountMapping existingPaymentChannelToFundSourceMapping : existingPaymentChannelToFundSourceMappings) { final Long currentPaymentChannelId = existingPaymentChannelToFundSourceMapping.getPaymentType().getId(); @@ -417,23 +419,25 @@ public void updatePaymentChannelToFundSourceMappings(final JsonCommand command, } private Long getReasonIdByCashAccountForLoan(final ProductToGLAccountMapping productToGLAccountMapping, - final CashAccountsForLoan cashAccountsForLoan) { + final CashAccountsForLoan cashAccountsForLoan) { return switch (cashAccountsForLoan) { - case LOSSES_WRITTEN_OFF -> productToGLAccountMapping != null && productToGLAccountMapping.getWriteOffReason() != null - ? productToGLAccountMapping.getWriteOffReason().getId() - : null; - case CHARGE_OFF_EXPENSE -> productToGLAccountMapping != null && productToGLAccountMapping.getChargeOffReason() != null - ? productToGLAccountMapping.getChargeOffReason().getId() - : null; + case LOSSES_WRITTEN_OFF -> + productToGLAccountMapping != null && productToGLAccountMapping.getWriteOffReason() != null + ? productToGLAccountMapping.getWriteOffReason().getId() + : null; + case CHARGE_OFF_EXPENSE -> + productToGLAccountMapping != null && productToGLAccountMapping.getChargeOffReason() != null + ? productToGLAccountMapping.getChargeOffReason().getId() + : null; default -> throw new IllegalStateException("Unexpected value: " + cashAccountsForLoan); }; } public void updateReasonToGLAccountMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes, final PortfolioProductType portfolioProductType, - final List existingReasonToGLAccountMappings, - final LoanProductAccountingParams reasonToExpenseAccountMappingsParam, final LoanProductAccountingParams reasonCodeValueIdParam, - final CashAccountsForLoan cashAccountsForLoan) { + final Map changes, final PortfolioProductType portfolioProductType, + final List existingReasonToGLAccountMappings, + final LoanProductAccountingParams reasonToExpenseAccountMappingsParam, final LoanProductAccountingParams reasonCodeValueIdParam, + final CashAccountsForLoan cashAccountsForLoan) { final JsonArray reasonToGLAccountMappingArray = this.fromApiJsonHelper .extractJsonArrayNamed(reasonToExpenseAccountMappingsParam.getValue(), element); @@ -490,15 +494,15 @@ public void updateReasonToGLAccountMappings(final JsonCommand command, final Jso } public void updateClassificationToGLAccountMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes, final PortfolioProductType portfolioProductType, - final LoanProductAccountingParams classificationParameter) { + final Map changes, final PortfolioProductType portfolioProductType, + final LoanProductAccountingParams classificationParameter) { final List existingClassificationToGLAccountMappings = classificationParameter .equals(LoanProductAccountingParams.CAPITALIZED_INCOME_CLASSIFICATION_TO_INCOME_ACCOUNT_MAPPINGS) - ? this.accountMappingRepository.findAllCapitalizedIncomeClassificationsMappings(productId, - portfolioProductType.getValue()) - : this.accountMappingRepository.findAllBuyDownFeeClassificationsMappings(productId, - portfolioProductType.getValue()); + ? this.accountMappingRepository.findAllCapitalizedIncomeClassificationsMappings(productId, + portfolioProductType.getValue()) + : this.accountMappingRepository.findAllBuyDownFeeClassificationsMappings(productId, + portfolioProductType.getValue()); final JsonArray classificationToGLAccountMappingArray = this.fromApiJsonHelper .extractJsonArrayNamed(classificationParameter.getValue(), element); @@ -526,8 +530,8 @@ public void updateClassificationToGLAccountMappings(final JsonCommand command, f for (final ProductToGLAccountMapping existingClassificationToGLAccountMapping : existingClassificationToGLAccountMappings) { final Long currentClassificationId = classificationParameter .equals(LoanProductAccountingParams.CAPITALIZED_INCOME_CLASSIFICATION_TO_INCOME_ACCOUNT_MAPPINGS) - ? existingClassificationToGLAccountMapping.getCapitalizedIncomeClassification().getId() - : existingClassificationToGLAccountMapping.getBuydownFeeClassification().getId(); + ? existingClassificationToGLAccountMapping.getCapitalizedIncomeClassification().getId() + : existingClassificationToGLAccountMapping.getBuydownFeeClassification().getId(); if (currentClassificationId != null) { existingClassifications.add(currentClassificationId); @@ -563,7 +567,7 @@ public void updateClassificationToGLAccountMappings(final JsonCommand command, f * */ private void savePaymentChannelToFundSourceMapping(final Long productId, final Long paymentTypeId, - final Long paymentTypeSpecificFundAccountId, final PortfolioProductType portfolioProductType) { + final Long paymentTypeSpecificFundAccountId, final PortfolioProductType portfolioProductType) { final PaymentType paymentType = this.paymentTypeRepositoryWrapper.findOneWithNotFoundDetection(paymentTypeId); final GLAccount glAccount = getAccountById(LoanProductAccountingParams.FUND_SOURCE.getValue(), paymentTypeSpecificFundAccountId); final ProductToGLAccountMapping accountMapping = new ProductToGLAccountMapping().setGlAccount(glAccount).setProductId(productId) @@ -577,7 +581,7 @@ private void savePaymentChannelToFundSourceMapping(final Long productId, final L * */ private void saveChargeToFundSourceMapping(final Long productId, final Long chargeId, final Long incomeAccountId, - final PortfolioProductType portfolioProductType, final boolean isPenalty) { + final PortfolioProductType portfolioProductType, final boolean isPenalty) { final Charge charge = this.chargeRepositoryWrapper.findOneWithNotFoundDetection(chargeId); // TODO Vishwas: Need to validate if given charge is fee or Penalty @@ -606,16 +610,18 @@ private void saveChargeToFundSourceMapping(final Long productId, final Long char private Predicate matching(final CashAccountsForLoan typeDef, final Long reasonId) { return switch (typeDef) { - case CHARGE_OFF_EXPENSE -> (mapping) -> (mapping.getChargeOffReason() != null && mapping.getChargeOffReason().getId() != null - && mapping.getChargeOffReason().getId().equals(reasonId)); - case LOSSES_WRITTEN_OFF -> (mapping) -> (mapping.getWriteOffReason() != null && mapping.getWriteOffReason().getId() != null - && mapping.getWriteOffReason().getId().equals(reasonId)); + case CHARGE_OFF_EXPENSE -> + (mapping) -> (mapping.getChargeOffReason() != null && mapping.getChargeOffReason().getId() != null + && mapping.getChargeOffReason().getId().equals(reasonId)); + case LOSSES_WRITTEN_OFF -> + (mapping) -> (mapping.getWriteOffReason() != null && mapping.getWriteOffReason().getId() != null + && mapping.getWriteOffReason().getId().equals(reasonId)); default -> throw new IllegalStateException("Unexpected value: " + typeDef); }; } private void saveReasonToExpenseMapping(final Long productId, final Long reasonId, final Long expenseAccountId, - final PortfolioProductType portfolioProductType, final CashAccountsForLoan cashAccountsForLoan) { + final PortfolioProductType portfolioProductType, final CashAccountsForLoan cashAccountsForLoan) { final Optional glAccount = accountRepository.findById(expenseAccountId); final Optional codeValueOptional = codeValueRepository.findById(reasonId); @@ -641,7 +647,7 @@ private void saveReasonToExpenseMapping(final Long productId, final Long reasonI } private void saveClassificationToIncomeMapping(final Long productId, final Long classificationId, final Long incomeAccountId, - final PortfolioProductType portfolioProductType, final LoanProductAccountingParams classificationParameter) { + final PortfolioProductType portfolioProductType, final LoanProductAccountingParams classificationParameter) { final Optional glAccount = accountRepository.findById(incomeAccountId); @@ -720,7 +726,7 @@ public GLAccount getAccountByIdAndType(final String paramName, final List * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Map; + import org.apache.fineract.accounting.common.AccountingConstants.LoanProductAccountingParams; import org.apache.fineract.accounting.producttoaccountmapping.data.AdvancedMappingToExpenseAccountData; import org.apache.fineract.accounting.producttoaccountmapping.data.ChargeToGLAccountMapper; @@ -55,5 +56,5 @@ public interface ProductToGLAccountMappingReadPlatformService { List fetchWriteOffReasonMappingsForLoanProduct(Long loanProductId); List fetchClassificationMappingsForLoanProduct(Long loanProductId, - LoanProductAccountingParams classificationParameter); + LoanProductAccountingParams classificationParameter); } diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingReadPlatformServiceImpl.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingReadPlatformServiceImpl.java index 5cbd6dfffe8..c95101ebc4a 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingReadPlatformServiceImpl.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.accounting.common.AccountingConstants.AccrualAccountsForLoan; @@ -217,7 +218,7 @@ public List fetchPaymentTypeToFundSourceMappingsFo * @return */ private List fetchPaymentTypeToFundSourceMappings(final PortfolioProductType portfolioProductType, - final Long loanProductId) { + final Long loanProductId) { final List mappings = productToGLAccountMappingRepository.findAllPaymentTypeMappings(loanProductId, portfolioProductType.getValue()); @@ -256,7 +257,7 @@ public List fetchPenaltyToIncomeAccountMappingsForSavin } private List fetchChargeToIncomeAccountMappings(final PortfolioProductType portfolioProductType, - final Long loanProductId, final boolean penalty) { + final Long loanProductId, final boolean penalty) { final List mappings = penalty ? productToGLAccountMappingRepository.findAllPenaltyMappings(loanProductId, portfolioProductType.getValue()) : productToGLAccountMappingRepository.findAllFeeMappings(loanProductId, portfolioProductType.getValue()); @@ -275,13 +276,13 @@ private List fetchChargeToIncomeAccountMappings(final P } private List fetchChargeOffReasonMappings(final PortfolioProductType portfolioProductType, - final Long loanProductId) { + final Long loanProductId) { return fetchAdvancedMappingToExpenseAccountData( productToGLAccountMappingRepository.findAllChargeOffReasonsMappings(loanProductId, portfolioProductType.getValue())); } private List fetchWriteOffReasonMappings(final PortfolioProductType portfolioProductType, - final Long loanProductId) { + final Long loanProductId) { return fetchAdvancedMappingToExpenseAccountData( productToGLAccountMappingRepository.findAllWriteOffReasonsMappings(loanProductId, portfolioProductType.getValue())); } @@ -304,13 +305,13 @@ private List fetchAdvancedMappingToExpenseA } private List fetchClassificationMappings(final PortfolioProductType portfolioProductType, - final Long loanProductId, LoanProductAccountingParams classificationParameter) { + final Long loanProductId, LoanProductAccountingParams classificationParameter) { final List mappings = classificationParameter .equals(LoanProductAccountingParams.CAPITALIZED_INCOME_CLASSIFICATION_TO_INCOME_ACCOUNT_MAPPINGS) - ? productToGLAccountMappingRepository.findAllCapitalizedIncomeClassificationsMappings(loanProductId, - portfolioProductType.getValue()) - : productToGLAccountMappingRepository.findAllBuyDownFeeClassificationsMappings(loanProductId, - portfolioProductType.getValue()); + ? productToGLAccountMappingRepository.findAllCapitalizedIncomeClassificationsMappings(loanProductId, + portfolioProductType.getValue()) + : productToGLAccountMappingRepository.findAllBuyDownFeeClassificationsMappings(loanProductId, + portfolioProductType.getValue()); List classificationToGLAccountMappers = mappings.isEmpty() ? null : new ArrayList<>(); for (final ProductToGLAccountMapping mapping : mappings) { @@ -321,8 +322,8 @@ private List fetchClassificationMappings(final Po final CodeValueData classificationCodeValue = classificationParameter .equals(LoanProductAccountingParams.CAPITALIZED_INCOME_CLASSIFICATION_TO_INCOME_ACCOUNT_MAPPINGS) - ? codeValueMapper.map(mapping.getCapitalizedIncomeClassification()) - : codeValueMapper.map(mapping.getBuydownFeeClassification()); + ? codeValueMapper.map(mapping.getCapitalizedIncomeClassification()) + : codeValueMapper.map(mapping.getBuydownFeeClassification()); final ClassificationToGLAccountData classificationToGLAccountMapper = new ClassificationToGLAccountData() .setClassificationCodeValue(classificationCodeValue).setIncomeAccount(glAccountData); @@ -383,7 +384,7 @@ public List fetchWriteOffReasonMappingsForL @Override public List fetchClassificationMappingsForLoanProduct(Long loanProductId, - LoanProductAccountingParams classificationParameter) { + LoanProductAccountingParams classificationParameter) { return fetchClassificationMappings(PortfolioProductType.LOAN, loanProductId, classificationParameter); } diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingWritePlatformService.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingWritePlatformService.java index 90ade7b0ff0..261ea25bd57 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingWritePlatformService.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ProductToGLAccountMappingWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.producttoaccountmapping.service; import java.util.Map; + import org.apache.fineract.accounting.common.AccountingRuleType; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.portfolio.savings.DepositAccountType; @@ -30,15 +31,15 @@ public interface ProductToGLAccountMappingWritePlatformService { void createSavingProductToGLAccountMapping(Long savingProductId, JsonCommand command, DepositAccountType accountType); Map updateLoanProductToGLAccountMapping(Long loanProductId, JsonCommand command, boolean accountingRuleChanged, - AccountingRuleType accountingRuleTypeId, boolean enableIncomeCapitalization, boolean enableBuyDownFee, - boolean merchantBuyDownFee); + AccountingRuleType accountingRuleTypeId, boolean enableIncomeCapitalization, boolean enableBuyDownFee, + boolean merchantBuyDownFee); Map updateSavingsProductToGLAccountMapping(Long savingsProductId, JsonCommand command, boolean accountingRuleChanged, - int accountingRuleTypeId, DepositAccountType accountType); + int accountingRuleTypeId, DepositAccountType accountType); void createShareProductToGLAccountMapping(Long shareProductId, JsonCommand command); Map updateShareProductToGLAccountMapping(Long shareProductId, JsonCommand command, boolean accountingRuleChanged, - int accountingRuleTypeId); + int accountingRuleTypeId); } diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/SavingsProductToGLAccountMappingHelper.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/SavingsProductToGLAccountMappingHelper.java index fd77457cf2f..7a7501773e9 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/SavingsProductToGLAccountMappingHelper.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/SavingsProductToGLAccountMappingHelper.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.accounting.producttoaccountmapping.service; import com.google.gson.JsonElement; + import java.util.HashMap; import java.util.Map; + import org.apache.fineract.accounting.common.AccountingConstants.AccrualAccountsForSavings; import org.apache.fineract.accounting.common.AccountingConstants.CashAccountsForSavings; import org.apache.fineract.accounting.common.AccountingConstants.SavingProductAccountingParams; @@ -41,9 +43,9 @@ public class SavingsProductToGLAccountMappingHelper extends ProductToGLAccountMappingHelper { public SavingsProductToGLAccountMappingHelper(final GLAccountRepository glAccountRepository, - final ProductToGLAccountMappingRepository glAccountMappingRepository, final FromJsonHelper fromApiJsonHelper, - final ChargeRepositoryWrapper chargeRepositoryWrapper, final GLAccountRepositoryWrapper accountRepositoryWrapper, - final PaymentTypeRepositoryWrapper paymentTypeRepositoryWrapper, final CodeValueRepository codeValueRepository) { + final ProductToGLAccountMappingRepository glAccountMappingRepository, final FromJsonHelper fromApiJsonHelper, + final ChargeRepositoryWrapper chargeRepositoryWrapper, final GLAccountRepositoryWrapper accountRepositoryWrapper, + final PaymentTypeRepositoryWrapper paymentTypeRepositoryWrapper, final CodeValueRepository codeValueRepository) { super(glAccountRepository, glAccountMappingRepository, fromApiJsonHelper, chargeRepositoryWrapper, accountRepositoryWrapper, paymentTypeRepositoryWrapper, codeValueRepository); } @@ -53,22 +55,22 @@ public SavingsProductToGLAccountMappingHelper(final GLAccountRepository glAccoun ***/ public void saveSavingsToAssetAccountMapping(final JsonElement element, final String paramName, final Long productId, - final int placeHolderTypeId) { + final int placeHolderTypeId) { saveProductToAccountMapping(element, paramName, productId, placeHolderTypeId, GLAccountType.ASSET, PortfolioProductType.SAVING); } public void saveSavingsToIncomeAccountMapping(final JsonElement element, final String paramName, final Long productId, - final int placeHolderTypeId) { + final int placeHolderTypeId) { saveProductToAccountMapping(element, paramName, productId, placeHolderTypeId, GLAccountType.INCOME, PortfolioProductType.SAVING); } public void saveSavingsToExpenseAccountMapping(final JsonElement element, final String paramName, final Long productId, - final int placeHolderTypeId) { + final int placeHolderTypeId) { saveProductToAccountMapping(element, paramName, productId, placeHolderTypeId, GLAccountType.EXPENSE, PortfolioProductType.SAVING); } public void saveSavingsToLiabilityAccountMapping(final JsonElement element, final String paramName, final Long productId, - final int placeHolderTypeId) { + final int placeHolderTypeId) { saveProductToAccountMapping(element, paramName, productId, placeHolderTypeId, GLAccountType.LIABILITY, PortfolioProductType.SAVING); } @@ -77,31 +79,31 @@ public void saveSavingsToLiabilityAccountMapping(final JsonElement element, fina ***/ public void mergeSavingsToAssetAccountMappingChanges(final JsonElement element, final String paramName, final Long productId, - final int accountTypeId, final String accountTypeName, final Map changes) { + final int accountTypeId, final String accountTypeName, final Map changes) { mergeProductToAccountMappingChanges(element, paramName, productId, accountTypeId, accountTypeName, changes, GLAccountType.ASSET, PortfolioProductType.SAVING); } public void mergeSavingsToIncomeAccountMappingChanges(final JsonElement element, final String paramName, final Long productId, - final int accountTypeId, final String accountTypeName, final Map changes) { + final int accountTypeId, final String accountTypeName, final Map changes) { mergeProductToAccountMappingChanges(element, paramName, productId, accountTypeId, accountTypeName, changes, GLAccountType.INCOME, PortfolioProductType.SAVING); } public void mergeSavingsToExpenseAccountMappingChanges(final JsonElement element, final String paramName, final Long productId, - final int accountTypeId, final String accountTypeName, final Map changes) { + final int accountTypeId, final String accountTypeName, final Map changes) { mergeProductToAccountMappingChanges(element, paramName, productId, accountTypeId, accountTypeName, changes, GLAccountType.EXPENSE, PortfolioProductType.SAVING); } public void mergeSavingsToLiabilityAccountMappingChanges(final JsonElement element, final String paramName, final Long productId, - final int accountTypeId, final String accountTypeName, final Map changes) { + final int accountTypeId, final String accountTypeName, final Map changes) { mergeProductToAccountMappingChanges(element, paramName, productId, accountTypeId, accountTypeName, changes, GLAccountType.LIABILITY, PortfolioProductType.SAVING); } public void createOrmergeSavingsToLiabilityAccountMappingChanges(final JsonElement element, final String paramName, - final Long productId, final int accountTypeId, final Map changes) { + final Long productId, final int accountTypeId, final Map changes) { createOrmergeProductToAccountMappingChanges(element, paramName, productId, accountTypeId, changes, GLAccountType.LIABILITY, PortfolioProductType.SAVING); } @@ -109,31 +111,31 @@ public void createOrmergeSavingsToLiabilityAccountMappingChanges(final JsonEleme /*** Abstractions for payments channel related to savings products ***/ public void savePaymentChannelToFundSourceMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes) { + final Map changes) { savePaymentChannelToFundSourceMappings(command, element, productId, changes, PortfolioProductType.SAVING); } public void updatePaymentChannelToFundSourceMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes) { + final Map changes) { updatePaymentChannelToFundSourceMappings(command, element, productId, changes, PortfolioProductType.SAVING); } public void saveChargesToIncomeAccountMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes) { + final Map changes) { // save both fee and penalty charges saveChargesToGLAccountMappings(command, element, productId, changes, PortfolioProductType.SAVING, true); saveChargesToGLAccountMappings(command, element, productId, changes, PortfolioProductType.SAVING, false); } public void updateChargesToIncomeAccountMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes) { + final Map changes) { // update both fee and penalty charges updateChargeToIncomeAccountMappings(command, element, productId, changes, PortfolioProductType.SAVING, true); updateChargeToIncomeAccountMappings(command, element, productId, changes, PortfolioProductType.SAVING, false); } public Map populateChangesForNewSavingsProductToGLAccountMappingCreation(final JsonElement element, - final AccountingRuleType accountingRuleType) { + final AccountingRuleType accountingRuleType) { final Map changes = new HashMap<>(); final Long savingsReferenceId = this.fromApiJsonHelper.extractLongNamed(SavingProductAccountingParams.SAVINGS_REFERENCE.getValue(), @@ -156,7 +158,7 @@ public Map populateChangesForNewSavingsProductToGLAccountMapping element); switch (accountingRuleType) { case NONE: - break; + break; case CASH_BASED: changes.put(SavingProductAccountingParams.SAVINGS_CONTROL.getValue(), savingsControlId); changes.put(SavingProductAccountingParams.SAVINGS_REFERENCE.getValue(), savingsReferenceId); @@ -167,7 +169,7 @@ public Map populateChangesForNewSavingsProductToGLAccountMapping changes.put(SavingProductAccountingParams.OVERDRAFT_PORTFOLIO_CONTROL.getValue(), overdraftControlId); changes.put(SavingProductAccountingParams.INCOME_FROM_INTEREST.getValue(), incomeFromInterest); changes.put(SavingProductAccountingParams.LOSSES_WRITTEN_OFF.getValue(), writeOffId); - break; + break; case ACCRUAL_PERIODIC: final Long feeReceivableId = this.fromApiJsonHelper .extractLongNamed(SavingProductAccountingParams.FEES_RECEIVABLE.getValue(), element); @@ -188,9 +190,9 @@ public Map populateChangesForNewSavingsProductToGLAccountMapping changes.put(SavingProductAccountingParams.FEES_RECEIVABLE.getValue(), feeReceivableId); changes.put(SavingProductAccountingParams.PENALTIES_RECEIVABLE.getValue(), penaltyReceivableId); changes.put(SavingProductAccountingParams.INTEREST_PAYABLE.getValue(), interestPayableId); - break; + break; case ACCRUAL_UPFRONT: - break; + break; } return changes; } @@ -204,10 +206,10 @@ public Map populateChangesForNewSavingsProductToGLAccountMapping * @param accountingRuleType */ public void handleChangesToSavingsProductToGLAccountMappings(final Long savingsProductId, final Map changes, - final JsonElement element, final AccountingRuleType accountingRuleType) { + final JsonElement element, final AccountingRuleType accountingRuleType) { switch (accountingRuleType) { case NONE: - break; + break; case CASH_BASED: // asset mergeSavingsToAssetAccountMappingChanges(element, SavingProductAccountingParams.SAVINGS_REFERENCE.getValue(), @@ -248,7 +250,7 @@ public void handleChangesToSavingsProductToGLAccountMappings(final Long savingsP CashAccountsForSavings.TRANSFERS_SUSPENSE.toString(), changes); createOrmergeSavingsToLiabilityAccountMappingChanges(element, SavingProductAccountingParams.ESCHEAT_LIABILITY.getValue(), savingsProductId, CashAccountsForSavings.ESCHEAT_LIABILITY.getValue(), changes); - break; + break; case ACCRUAL_PERIODIC: // asset mergeSavingsToAssetAccountMappingChanges(element, SavingProductAccountingParams.SAVINGS_REFERENCE.getValue(), @@ -309,9 +311,9 @@ public void handleChangesToSavingsProductToGLAccountMappings(final Long savingsP createOrmergeSavingsToLiabilityAccountMappingChanges(element, SavingProductAccountingParams.ESCHEAT_LIABILITY.getValue(), savingsProductId, AccrualAccountsForSavings.ESCHEAT_LIABILITY.getValue(), changes); - break; + break; case ACCRUAL_UPFRONT: - break; + break; } } diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ShareProductToGLAccountMappingHelper.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ShareProductToGLAccountMappingHelper.java index b7314f693ac..219329d33d6 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ShareProductToGLAccountMappingHelper.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/service/ShareProductToGLAccountMappingHelper.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.accounting.producttoaccountmapping.service; import com.google.gson.JsonElement; + import java.util.HashMap; import java.util.Map; + import org.apache.fineract.accounting.common.AccountingConstants.CashAccountsForShares; import org.apache.fineract.accounting.common.AccountingConstants.SharesProductAccountingParams; import org.apache.fineract.accounting.common.AccountingRuleType; @@ -40,9 +42,9 @@ public class ShareProductToGLAccountMappingHelper extends ProductToGLAccountMappingHelper { public ShareProductToGLAccountMappingHelper(final GLAccountRepository glAccountRepository, - final ProductToGLAccountMappingRepository glAccountMappingRepository, final FromJsonHelper fromApiJsonHelper, - final ChargeRepositoryWrapper chargeRepositoryWrapper, final GLAccountRepositoryWrapper accountRepositoryWrapper, - final PaymentTypeRepositoryWrapper paymentTypeRepositoryWrapper, final CodeValueRepository codeValueRepository) { + final ProductToGLAccountMappingRepository glAccountMappingRepository, final FromJsonHelper fromApiJsonHelper, + final ChargeRepositoryWrapper chargeRepositoryWrapper, final GLAccountRepositoryWrapper accountRepositoryWrapper, + final PaymentTypeRepositoryWrapper paymentTypeRepositoryWrapper, final CodeValueRepository codeValueRepository) { super(glAccountRepository, glAccountMappingRepository, fromApiJsonHelper, chargeRepositoryWrapper, accountRepositoryWrapper, paymentTypeRepositoryWrapper, codeValueRepository); } @@ -52,22 +54,22 @@ public ShareProductToGLAccountMappingHelper(final GLAccountRepository glAccountR ***/ public void saveSharesToAssetAccountMapping(final JsonElement element, final String paramName, final Long productId, - final int placeHolderTypeId) { + final int placeHolderTypeId) { saveProductToAccountMapping(element, paramName, productId, placeHolderTypeId, GLAccountType.ASSET, PortfolioProductType.SHARES); } public void saveSharesToIncomeAccountMapping(final JsonElement element, final String paramName, final Long productId, - final int placeHolderTypeId) { + final int placeHolderTypeId) { saveProductToAccountMapping(element, paramName, productId, placeHolderTypeId, GLAccountType.INCOME, PortfolioProductType.SHARES); } public void saveSharesToEquityAccountMapping(final JsonElement element, final String paramName, final Long productId, - final int placeHolderTypeId) { + final int placeHolderTypeId) { saveProductToAccountMapping(element, paramName, productId, placeHolderTypeId, GLAccountType.EQUITY, PortfolioProductType.SHARES); } public void saveSharesToLiabilityAccountMapping(final JsonElement element, final String paramName, final Long productId, - final int placeHolderTypeId) { + final int placeHolderTypeId) { saveProductToAccountMapping(element, paramName, productId, placeHolderTypeId, GLAccountType.LIABILITY, PortfolioProductType.SHARES); } @@ -76,25 +78,25 @@ public void saveSharesToLiabilityAccountMapping(final JsonElement element, final ***/ public void mergeSharesToAssetAccountMappingChanges(final JsonElement element, final String paramName, final Long productId, - final int accountTypeId, final String accountTypeName, final Map changes) { + final int accountTypeId, final String accountTypeName, final Map changes) { mergeProductToAccountMappingChanges(element, paramName, productId, accountTypeId, accountTypeName, changes, GLAccountType.ASSET, PortfolioProductType.SHARES); } public void mergeSharesToIncomeAccountMappingChanges(final JsonElement element, final String paramName, final Long productId, - final int accountTypeId, final String accountTypeName, final Map changes) { + final int accountTypeId, final String accountTypeName, final Map changes) { mergeProductToAccountMappingChanges(element, paramName, productId, accountTypeId, accountTypeName, changes, GLAccountType.INCOME, PortfolioProductType.SHARES); } public void mergeSharesToEquityAccountMappingChanges(final JsonElement element, final String paramName, final Long productId, - final int accountTypeId, final String accountTypeName, final Map changes) { + final int accountTypeId, final String accountTypeName, final Map changes) { mergeProductToAccountMappingChanges(element, paramName, productId, accountTypeId, accountTypeName, changes, GLAccountType.EQUITY, PortfolioProductType.SHARES); } public void mergeSharesToLiabilityAccountMappingChanges(final JsonElement element, final String paramName, final Long productId, - final int accountTypeId, final String accountTypeName, final Map changes) { + final int accountTypeId, final String accountTypeName, final Map changes) { mergeProductToAccountMappingChanges(element, paramName, productId, accountTypeId, accountTypeName, changes, GLAccountType.LIABILITY, PortfolioProductType.SHARES); } @@ -102,29 +104,29 @@ public void mergeSharesToLiabilityAccountMappingChanges(final JsonElement elemen /*** Abstractions for payments channel related to Shares products ***/ public void savePaymentChannelToFundSourceMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes) { + final Map changes) { savePaymentChannelToFundSourceMappings(command, element, productId, changes, PortfolioProductType.SHARES); } public void updatePaymentChannelToFundSourceMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes) { + final Map changes) { updatePaymentChannelToFundSourceMappings(command, element, productId, changes, PortfolioProductType.SHARES); } public void saveChargesToIncomeAccountMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes) { + final Map changes) { saveChargesToGLAccountMappings(command, element, productId, changes, PortfolioProductType.SHARES, true); saveChargesToGLAccountMappings(command, element, productId, changes, PortfolioProductType.SHARES, false); } public void updateChargesToIncomeAccountMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes) { + final Map changes) { updateChargeToIncomeAccountMappings(command, element, productId, changes, PortfolioProductType.SHARES, true); updateChargeToIncomeAccountMappings(command, element, productId, changes, PortfolioProductType.SHARES, false); } public Map populateChangesForNewSharesProductToGLAccountMappingCreation(final JsonElement element, - final AccountingRuleType accountingRuleType) { + final AccountingRuleType accountingRuleType) { final Map changes = new HashMap<>(); final Long shareReferenceId = this.fromApiJsonHelper.extractLongNamed(SharesProductAccountingParams.SHARES_REFERENCE.getValue(), @@ -137,17 +139,17 @@ public Map populateChangesForNewSharesProductToGLAccountMappingC switch (accountingRuleType) { case NONE: - break; + break; case CASH_BASED: changes.put(SharesProductAccountingParams.SHARES_REFERENCE.getValue(), shareReferenceId); changes.put(SharesProductAccountingParams.INCOME_FROM_FEES.getValue(), incomeFromFeeAccountId); changes.put(SharesProductAccountingParams.SHARES_SUSPENSE.getValue(), shareSuspenseId); changes.put(SharesProductAccountingParams.SHARES_EQUITY.getValue(), shareEquityId); - break; + break; case ACCRUAL_PERIODIC: - break; + break; case ACCRUAL_UPFRONT: - break; + break; } return changes; } @@ -161,10 +163,10 @@ public Map populateChangesForNewSharesProductToGLAccountMappingC * @param accountingRuleType */ public void handleChangesToSharesProductToGLAccountMappings(final Long sharesProductId, final Map changes, - final JsonElement element, final AccountingRuleType accountingRuleType) { + final JsonElement element, final AccountingRuleType accountingRuleType) { switch (accountingRuleType) { case NONE: - break; + break; case CASH_BASED: // asset mergeSharesToAssetAccountMappingChanges(element, SharesProductAccountingParams.SHARES_REFERENCE.getValue(), sharesProductId, @@ -183,11 +185,11 @@ public void handleChangesToSharesProductToGLAccountMappings(final Long sharesPro // equity mergeSharesToEquityAccountMappingChanges(element, SharesProductAccountingParams.SHARES_EQUITY.getValue(), sharesProductId, CashAccountsForShares.SHARES_EQUITY.getValue(), CashAccountsForShares.SHARES_EQUITY.toString(), changes); - break; + break; case ACCRUAL_PERIODIC: - break; + break; case ACCRUAL_UPFRONT: - break; + break; } } diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResourceSwagger.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResourceSwagger.java index 86a139d60a0..885243c7005 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResourceSwagger.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/api/ProvisioningEntriesApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/constant/ProvisioningEntriesApiConstants.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/constant/ProvisioningEntriesApiConstants.java index 833840d0f8e..556084bd38e 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/constant/ProvisioningEntriesApiConstants.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/constant/ProvisioningEntriesApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/data/LoanProductProvisioningEntryData.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/data/LoanProductProvisioningEntryData.java index 0e1f6da4e28..1ac826b11dc 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/data/LoanProductProvisioningEntryData.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/data/LoanProductProvisioningEntryData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.provisioning.data; import java.math.BigDecimal; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/data/ProvisioningEntryData.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/data/ProvisioningEntryData.java index f80213d1dcf..70fdbbc0b62 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/data/ProvisioningEntryData.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/data/ProvisioningEntryData.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.Collection; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/data/request/ProvisionEntryRequest.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/data/request/ProvisionEntryRequest.java index 7d54325e199..9da5214a839 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/data/request/ProvisionEntryRequest.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/data/request/ProvisionEntryRequest.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,8 @@ import java.io.Serial; import java.io.Serializable; -public record ProvisionEntryRequest(String date, Boolean createjournalentries, String locale, String dateFormat) implements Serializable { +public record ProvisionEntryRequest(String date, Boolean createjournalentries, String locale, + String dateFormat) implements Serializable { @Serial private static final long serialVersionUID = 1L; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/exception/NoProvisioningCriteriaDefinitionFound.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/exception/NoProvisioningCriteriaDefinitionFound.java index 202e638060a..23e242d51e7 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/exception/NoProvisioningCriteriaDefinitionFound.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/exception/NoProvisioningCriteriaDefinitionFound.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/exception/ProvisioningEntryAlreadyCreatedException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/exception/ProvisioningEntryAlreadyCreatedException.java index 4cf63ae345b..1f27d3afede 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/exception/ProvisioningEntryAlreadyCreatedException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/exception/ProvisioningEntryAlreadyCreatedException.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.provisioning.exception; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; public class ProvisioningEntryAlreadyCreatedException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/exception/ProvisioningEntryNotfoundException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/exception/ProvisioningEntryNotfoundException.java index 163f3fc5415..9474e810ee7 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/exception/ProvisioningEntryNotfoundException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/exception/ProvisioningEntryNotfoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/exception/ProvisioningJournalEntriesCannotbeCreatedException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/exception/ProvisioningJournalEntriesCannotbeCreatedException.java index c175444b499..9f234ab57b1 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/exception/ProvisioningJournalEntriesCannotbeCreatedException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/exception/ProvisioningJournalEntriesCannotbeCreatedException.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.provisioning.exception; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.exception.AbstractPlatformResourceNotFoundException; public class ProvisioningJournalEntriesCannotbeCreatedException extends AbstractPlatformResourceNotFoundException { diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/serialization/ProvisioningEntriesDefinitionJsonDeserializer.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/serialization/ProvisioningEntriesDefinitionJsonDeserializer.java index dd2a8ca6d72..d3c2573ef0e 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/serialization/ProvisioningEntriesDefinitionJsonDeserializer.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/serialization/ProvisioningEntriesDefinitionJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.time.LocalDate; import java.util.ArrayList; @@ -29,6 +30,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.accounting.provisioning.constant.ProvisioningEntriesApiConstants; @@ -54,7 +56,8 @@ public void validateForCreate(final String json) { "locale, dateformat, date, createjournalentries params are missing in the request"); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, supportedParameters); final List dataValidationErrors = new ArrayList<>(); final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors).resource("provisioningcriteria"); diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesReadPlatformService.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesReadPlatformService.java index 8275af3f208..37d2232c5e5 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesReadPlatformService.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.Collection; + import org.apache.fineract.accounting.provisioning.data.LoanProductProvisioningEntryData; import org.apache.fineract.accounting.provisioning.data.ProvisioningEntryData; import org.apache.fineract.infrastructure.core.service.Page; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesReadPlatformServiceImpl.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesReadPlatformServiceImpl.java index d34c559719a..85c608ab54b 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesReadPlatformServiceImpl.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.accounting.provisioning.data.LoanProductProvisioningEntryData; @@ -63,7 +64,7 @@ private static final class LoanProductProvisioningEntryMapper implements RowMapp private LoanProductProvisioningEntryMapper(DatabaseSpecificSQLGenerator sqlGenerator) { sqlQuery = new StringBuilder().append( - "select (CASE WHEN loan.loan_type_enum=1 THEN mclient.office_id ELSE mgroup.office_id END) as office_id, loan.loan_type_enum, pcd.criteria_id as criteriaid, loan.product_id,loan.currency_code,") + "select (CASE WHEN loan.loan_type_enum=1 THEN mclient.office_id ELSE mgroup.office_id END) as office_id, loan.loan_type_enum, pcd.criteria_id as criteriaid, loan.product_id,loan.currency_code,") .append("GREATEST(" + sqlGenerator.dateDiff("?", "sch.duedate") + ", 0) as numberofdaysoverdue,sch.duedate, pcd.category_id, pcd.provision_percentage,") .append("loan.total_outstanding_derived as outstandingbalance, pcd.liability_account, pcd.expense_account from m_loan_repayment_schedule sch") @@ -236,7 +237,7 @@ public Page retrieveAllProvisioningEntries(Integer offset sqlBuilder.append(" offset ").append(offset); } - Object[] whereClauseItemsitems = new Object[] {}; + Object[] whereClauseItemsitems = new Object[]{}; return this.provisioningEntryDataPaginationHelper.fetchPage(this.jdbcTemplate, sqlBuilder.toString(), whereClauseItemsitems, mapper); } @@ -277,7 +278,7 @@ public ProvisioningEntryData retrieveExistingProvisioningIdDateWithJournals() { ProvisioningEntryData data = null; ProvisioningEntryIdDateRowMapper mapper = new ProvisioningEntryIdDateRowMapper(); try { - data = this.jdbcTemplate.queryForObject(mapper.schema(), mapper, new Object[] {}); + data = this.jdbcTemplate.queryForObject(mapper.schema(), mapper, new Object[]{}); } catch (EmptyResultDataAccessException e) { data = null; } diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResourceSwagger.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResourceSwagger.java index 7a1cb92e2de..f6766f9d7e7 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResourceSwagger.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -51,7 +51,8 @@ private PutAccountingRulesResponse() { public static class PutAccountingRulesResponsechangesSwagger { - PutAccountingRulesResponsechangesSwagger() {} + PutAccountingRulesResponsechangesSwagger() { + } @Schema(example = "Employee Salary posting rule") public String name; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleJsonInputParams.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleJsonInputParams.java index df4e12ab498..8a72e7c379b 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleJsonInputParams.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/api/AccountingRuleJsonInputParams.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/data/AccountingRuleData.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/data/AccountingRuleData.java index 630d4628d1d..9034caa7ef6 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/data/AccountingRuleData.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/data/AccountingRuleData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/data/AccountingTagRuleData.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/data/AccountingTagRuleData.java index 7e36b1744bb..c414ffee628 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/data/AccountingTagRuleData.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/data/AccountingTagRuleData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/data/request/AccountRuleRequest.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/data/request/AccountRuleRequest.java index 0b83aea6f76..fec8ef7ec5a 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/data/request/AccountRuleRequest.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/data/request/AccountRuleRequest.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,7 @@ import java.io.Serializable; public record AccountRuleRequest(String name, Long officeId, Long accountToDebit, Long accountToCredit, - String description) implements Serializable { + String description) implements Serializable { @Serial private static final long serialVersionUID = 1L; diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingRule.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingRule.java index 7f968a6165d..0240e57d2d9 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingRule.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingRule.java @@ -6,9 +6,9 @@ * 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 @@ -27,12 +27,14 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.util.ArrayList; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -51,7 +53,7 @@ @Accessors(chain = true) @Entity @Table(name = "acc_accounting_rule", uniqueConstraints = { - @UniqueConstraint(columnNames = { "name" }, name = "accounting_rule_name_unique") }) + @UniqueConstraint(columnNames = {"name"}, name = "accounting_rule_name_unique")}) public class AccountingRule extends AbstractPersistableCustom { @Column(name = "name", nullable = false, length = 500) @@ -85,7 +87,7 @@ public class AccountingRule extends AbstractPersistableCustom { private boolean allowMultipleDebitEntries; public static AccountingRule fromJson(final Office office, final GLAccount accountToDebit, final GLAccount accountToCredit, - final JsonCommand command, final boolean allowMultipleCreditEntries, final boolean allowMultipleDebitEntries) { + final JsonCommand command, final boolean allowMultipleCreditEntries, final boolean allowMultipleDebitEntries) { final String name = command.stringValueOfParameterNamed(AccountingRuleJsonInputParams.NAME.getValue()); final String description = command.stringValueOfParameterNamed(AccountingRuleJsonInputParams.DESCRIPTION.getValue()); final boolean systemDefined = false; @@ -113,7 +115,7 @@ public Map update(final JsonCommand command) { } private void handlePropertyUpdate(final JsonCommand command, final Map actualChanges, final String paramName, - final String propertyToBeUpdated) { + final String propertyToBeUpdated) { if (command.isChangeInStringParameterNamed(paramName, propertyToBeUpdated)) { final String newValue = command.stringValueOfParameterNamed(paramName); actualChanges.put(paramName, newValue); @@ -127,7 +129,7 @@ private void handlePropertyUpdate(final JsonCommand command, final Map actualChanges, final String paramName, - final boolean propertyToBeUpdated) { + final boolean propertyToBeUpdated) { if (command.isChangeInBooleanParameterNamed(paramName, propertyToBeUpdated)) { final Boolean newValue = command.booleanObjectValueOfParameterNamed(paramName); actualChanges.put(paramName, newValue); @@ -146,7 +148,7 @@ private void handlePropertyUpdate(final JsonCommand command, final Map actualChanges, final String paramName, - final Long propertyToBeUpdated) { + final Long propertyToBeUpdated) { if (command.isChangeInLongParameterNamed(paramName, propertyToBeUpdated)) { final Long newValue = command.longValueOfParameterNamed(paramName); actualChanges.put(paramName, newValue); diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingRuleRepository.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingRuleRepository.java index 17d807c2219..41f2557adf9 100755 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingRuleRepository.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingRuleRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingRuleRepositoryWrapper.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingRuleRepositoryWrapper.java index 09cdbf4f94a..ee6a34acaf0 100755 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingRuleRepositoryWrapper.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingRuleRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingTagRule.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingTagRule.java index 7952c337c13..6cf0e81507b 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingTagRule.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/domain/AccountingTagRule.java @@ -6,9 +6,9 @@ * 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 @@ -37,7 +37,7 @@ @Accessors(chain = true) @Entity @Table(name = "acc_rule_tags", uniqueConstraints = { - @UniqueConstraint(columnNames = { "acc_rule_id", "tag_id", "acc_type_enum" }, name = "UNIQUE_ACCOUNT_RULE_TAGS") }) + @UniqueConstraint(columnNames = {"acc_rule_id", "tag_id", "acc_type_enum"}, name = "UNIQUE_ACCOUNT_RULE_TAGS")}) public class AccountingTagRule extends AbstractPersistableCustom { @ManyToOne diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleDataException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleDataException.java index 551ffdeb35a..357835cf974 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleDataException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleDataException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleDuplicateException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleDuplicateException.java index 6bc678f07df..15acacbfc91 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleDuplicateException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleDuplicateException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleInvalidDeleteException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleInvalidDeleteException.java index ad649a65801..bc6e995b68e 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleInvalidDeleteException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleInvalidDeleteException.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.rule.exception; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleInvalidException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleInvalidException.java index 2b21d4077ff..d86c26028d0 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleInvalidException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleInvalidException.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.rule.exception; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleNotFoundException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleNotFoundException.java index c32d47ba9e1..ed314cab2e8 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleNotFoundException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/exception/AccountingRuleNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/handler/CreateAccountingRuleCommandHandler.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/handler/CreateAccountingRuleCommandHandler.java index 8a8dc9ddc22..2e2bb1ef923 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/handler/CreateAccountingRuleCommandHandler.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/handler/CreateAccountingRuleCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/handler/DeleteAccountingRuleCommandHandler.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/handler/DeleteAccountingRuleCommandHandler.java index c53743261c1..51401d66576 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/handler/DeleteAccountingRuleCommandHandler.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/handler/DeleteAccountingRuleCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/handler/UpdateAccountingRuleCommandHandler.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/handler/UpdateAccountingRuleCommandHandler.java index 9c811808359..f2ef803932e 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/handler/UpdateAccountingRuleCommandHandler.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/handler/UpdateAccountingRuleCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/serialization/AccountingRuleCommandFromApiJsonDeserializer.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/serialization/AccountingRuleCommandFromApiJsonDeserializer.java index 20b1983e63c..a51d99ba5f7 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/serialization/AccountingRuleCommandFromApiJsonDeserializer.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/serialization/AccountingRuleCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,11 +20,13 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.accounting.rule.api.AccountingRuleJsonInputParams; @@ -53,7 +55,8 @@ public void validateForCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, this.supportedParameters); final List dataValidationErrors = new ArrayList<>(); @@ -102,7 +105,7 @@ public void validateForCreate(final String json) { final StringBuilder defaultUserMessage = new StringBuilder("The parameter ").append(creditAccount).append(" or") .append(creditTag).append(" required"); final ApiParameterError error = ApiParameterError.parameterError(validationErrorCode.toString(), defaultUserMessage.toString(), - creditAccount + "," + creditTag, new Object[] { creditAccount, creditTag }); + creditAccount + "," + creditTag, new Object[]{creditAccount, creditTag}); dataValidationErrors.add(error); } @@ -114,7 +117,7 @@ public void validateForCreate(final String json) { final StringBuilder defaultUserMessage = new StringBuilder("The parameter ").append(debitAccount).append(" or").append(debitTag) .append(" required"); final ApiParameterError error = ApiParameterError.parameterError(validationErrorCode.toString(), defaultUserMessage.toString(), - debitAccount + "," + debitTag, new Object[] { debitAccount, debitTag }); + debitAccount + "," + debitTag, new Object[]{debitAccount, debitTag}); dataValidationErrors.add(error); } @@ -145,7 +148,7 @@ private void throwExceptionIfValidationWarningsExist(final List>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, this.supportedParameters); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/service/AccountingRuleReadPlatformService.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/service/AccountingRuleReadPlatformService.java index bd5abee191f..04da91383d8 100755 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/service/AccountingRuleReadPlatformService.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/service/AccountingRuleReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.rule.service; import java.util.List; + import org.apache.fineract.accounting.rule.data.AccountingRuleData; public interface AccountingRuleReadPlatformService { diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/service/AccountingRuleReadPlatformServiceImpl.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/service/AccountingRuleReadPlatformServiceImpl.java index 21ecff0d1d0..36ff2d2b11f 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/service/AccountingRuleReadPlatformServiceImpl.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/service/AccountingRuleReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.common.AccountingEnumerations; import org.apache.fineract.accounting.glaccount.data.GLAccountDataForLookup; @@ -56,13 +57,13 @@ private static final class AccountingRuleDataExtractor implements ResultSetExtra private final boolean isAssociationParametersExists; AccountingRuleDataExtractor(final JdbcTemplate jdbcTemplate, final GLAccountReadPlatformService glAccountReadPlatformService, - final boolean isAssociationParametersExists) { + final boolean isAssociationParametersExists) { this.jdbcTemplate = jdbcTemplate; this.glAccountReadPlatformService = glAccountReadPlatformService; this.isAssociationParametersExists = isAssociationParametersExists; final StringBuilder sqlBuilder = new StringBuilder(400); sqlBuilder.append(" rule.id as id,rule.name as name, rule.office_id as officeId,office.name as officeName,").append( - " rule.description as description, rule.system_defined as systemDefined, rule.allow_multiple_debits as allowMultipleDebitEntries, rule.allow_multiple_credits as allowMultipleCreditEntries, ") + " rule.description as description, rule.system_defined as systemDefined, rule.allow_multiple_debits as allowMultipleDebitEntries, rule.allow_multiple_credits as allowMultipleCreditEntries, ") .append("debitAccount.id AS debitAccountId, debitAccount.name as debitAccountName, debitAccount.gl_code as debitAccountGLCode, ") .append("creditAccount.id AS creditAccountId, creditAccount.name as creditAccountName, creditAccount.gl_code as creditAccountGLCode") .append(" from m_office AS office, acc_accounting_rule AS rule ") @@ -142,21 +143,21 @@ public Map extractData(final ResultSet rs) throws SQLE private List getCreditOrDebitTags(final Long creditOrDebitAccount, final Integer transactionType) { final AccountingTagRuleDataMapper mapper = new AccountingTagRuleDataMapper(); final String taggedAccountsSchema = "Select " + mapper.taggedAccountSchema() + " where rule.id = ? and tag.acc_type_enum=?"; - return this.jdbcTemplate.query(taggedAccountsSchema, mapper, new Object[] { creditOrDebitAccount, transactionType }); // NOSONAR + return this.jdbcTemplate.query(taggedAccountsSchema, mapper, new Object[]{creditOrDebitAccount, transactionType}); // NOSONAR } } @Override public List retrieveAllAccountingRules(final String hierarchySearchString, - final boolean isAssociationParametersExists) { + final boolean isAssociationParametersExists) { final AccountingRuleDataExtractor resultSetExtractor = new AccountingRuleDataExtractor(this.jdbcTemplate, this.glAccountReadPlatformService, isAssociationParametersExists); - Object[] arguments = new Object[] {}; + Object[] arguments = new Object[]{}; String sql = "select " + resultSetExtractor.schema() + " and system_defined=false "; if (hierarchySearchString != null) { sql = sql + " and office.hierarchy like ?"; - arguments = new Object[] { hierarchySearchString }; + arguments = new Object[]{hierarchySearchString}; } sql = sql + " order by rule.id asc"; final Map extractedData = this.jdbcTemplate.query(sql, resultSetExtractor, arguments); // NOSONAR @@ -171,7 +172,7 @@ public AccountingRuleData retrieveAccountingRuleById(final Long accountingRuleId final String sql = "select " + resultSetExtractor.schema() + " and rule.id = ?"; final Map extractedData = this.jdbcTemplate.query(sql, resultSetExtractor, // NOSONAR - new Object[] { accountingRuleId }); + new Object[]{accountingRuleId}); final AccountingRuleData accountingRuleData = extractedData.get(accountingRuleId); if (accountingRuleData == null) { throw new AccountingRuleNotFoundException(accountingRuleId); diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/service/AccountingRuleWritePlatformService.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/service/AccountingRuleWritePlatformService.java index c18ecc43da5..4d149d8359f 100755 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/service/AccountingRuleWritePlatformService.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/service/AccountingRuleWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/service/AccountingRuleWritePlatformServiceJpaRepositoryImpl.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/service/AccountingRuleWritePlatformServiceJpaRepositoryImpl.java index 036242502ec..85406624bc4 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/service/AccountingRuleWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/service/AccountingRuleWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -70,7 +71,7 @@ public class AccountingRuleWritePlatformServiceJpaRepositoryImpl implements Acco * @param dve */ private void handleAccountingRuleIntegrityIssues(final JsonCommand command, final Throwable realCause, - final NonTransientDataAccessException dve) { + final NonTransientDataAccessException dve) { if (realCause.getMessage().contains("accounting_rule_name_unique")) { throw new AccountingRuleDuplicateException(command.stringValueOfParameterNamed(AccountingRuleJsonInputParams.NAME.getValue())); } else if (realCause.getMessage().contains("UNIQUE_ACCOUNT_RULE_TAGS")) { @@ -282,7 +283,7 @@ public CommandProcessingResult updateAccountingRule(final Long accountingRuleId, } private Set determineCreditTagToAddAndRemoveOldTags(final String[] creditOrDebitTags, final JournalEntryType type, - final AccountingRule accountingRule) { + final AccountingRule accountingRule) { final Set incomingTags = new HashSet<>(Arrays.asList(creditOrDebitTags)); final Set existingTags = accountingRule.getAccountingTagRulesByType(type); @@ -331,7 +332,7 @@ public CommandProcessingResult deleteAccountingRule(final Long accountingRuleId) } private List saveDebitOrCreditTags(final Set creditOrDebitTagArray, final JournalEntryType transactionType, - final List accountingTagRules) { + final List accountingTagRules) { for (final String creditOrDebitTag : creditOrDebitTagArray) { if (creditOrDebitTag != null && StringUtils.isNotBlank(creditOrDebitTag)) { final Long creditOrDebitTagIdLongValue = Long.valueOf(creditOrDebitTag); diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/starter/AccountingRuleConfiguration.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/starter/AccountingRuleConfiguration.java index d84671aa1f2..1d7eacc1a3e 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/starter/AccountingRuleConfiguration.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/rule/starter/AccountingRuleConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -40,7 +40,7 @@ public class AccountingRuleConfiguration { @Bean @ConditionalOnMissingBean(AccountingRuleReadPlatformService.class) public AccountingRuleReadPlatformService accountingRuleReadPlatformService(JdbcTemplate jdbcTemplate, - GLAccountReadPlatformService glAccountReadPlatformService) { + GLAccountReadPlatformService glAccountReadPlatformService) { return new AccountingRuleReadPlatformServiceImpl(jdbcTemplate, glAccountReadPlatformService); } diff --git a/fineract-accounting/src/main/java/org/apache/fineract/accounting/trialbalance/exception/TrialBalanceNotFoundException.java b/fineract-accounting/src/main/java/org/apache/fineract/accounting/trialbalance/exception/TrialBalanceNotFoundException.java index 5cda18b47f3..afa97e4a14e 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/accounting/trialbalance/exception/TrialBalanceNotFoundException.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/accounting/trialbalance/exception/TrialBalanceNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/java/org/apache/fineract/infrastructure/event/business/domain/journalentry/JournalEntryBusinessEvent.java b/fineract-accounting/src/main/java/org/apache/fineract/infrastructure/event/business/domain/journalentry/JournalEntryBusinessEvent.java index 0309cfa7c36..7f862a785f6 100644 --- a/fineract-accounting/src/main/java/org/apache/fineract/infrastructure/event/business/domain/journalentry/JournalEntryBusinessEvent.java +++ b/fineract-accounting/src/main/java/org/apache/fineract/infrastructure/event/business/domain/journalentry/JournalEntryBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-accounting/src/main/resources/jpa/accounting/db/changelog/tenant/module/accounting/module-changelog-master.xml b/fineract-accounting/src/main/resources/jpa/accounting/db/changelog/tenant/module/accounting/module-changelog-master.xml index 8ba6c7855fd..500c7ad2d3d 100644 --- a/fineract-accounting/src/main/resources/jpa/accounting/db/changelog/tenant/module/accounting/module-changelog-master.xml +++ b/fineract-accounting/src/main/resources/jpa/accounting/db/changelog/tenant/module/accounting/module-changelog-master.xml @@ -20,7 +20,7 @@ --> - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> + diff --git a/fineract-accounting/src/main/resources/jpa/static-weaving/module/fineract-accounting/persistence.xml b/fineract-accounting/src/main/resources/jpa/static-weaving/module/fineract-accounting/persistence.xml index eed32406779..9e5daea9c05 100644 --- a/fineract-accounting/src/main/resources/jpa/static-weaving/module/fineract-accounting/persistence.xml +++ b/fineract-accounting/src/main/resources/jpa/static-weaving/module/fineract-accounting/persistence.xml @@ -92,7 +92,7 @@ false - + diff --git a/fineract-avro-schemas/build.gradle b/fineract-avro-schemas/build.gradle index 5afaaec48e4..13640205784 100644 --- a/fineract-avro-schemas/build.gradle +++ b/fineract-avro-schemas/build.gradle @@ -41,7 +41,7 @@ abstract class PreprocessAvroSchemasTask extends DefaultTask { def template = getBigDecimalTemplate().get().asFile.getText("UTF-8") def input = getInputDir().get().asFile def output = getOutputDir().get().asFile - + input.eachFileRecurse { file -> if (file.isFile()) { def relativePath = input.toPath().relativize(file.toPath()) diff --git a/fineract-avro-schemas/src/main/java/org/apache/fineract/avro/generator/ByteBufferSerializable.java b/fineract-avro-schemas/src/main/java/org/apache/fineract/avro/generator/ByteBufferSerializable.java index db401154be6..6e110dfc7b6 100644 --- a/fineract-avro-schemas/src/main/java/org/apache/fineract/avro/generator/ByteBufferSerializable.java +++ b/fineract-avro-schemas/src/main/java/org/apache/fineract/avro/generator/ByteBufferSerializable.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/build.gradle b/fineract-branch/build.gradle index 068ca03aeff..62941e5126a 100644 --- a/fineract-branch/build.gradle +++ b/fineract-branch/build.gradle @@ -52,9 +52,9 @@ apply from: 'dependencies.gradle' // https://github.com/andygoossens/gradle-modernizer-plugin modernizer { ignoreClassNamePatterns = [ - '.*AbstractPersistableCustom', - '.*EntityTables', - '.*domain.*' + '.*AbstractPersistableCustom', + '.*EntityTables', + '.*domain.*' ] } @@ -66,7 +66,7 @@ if (project.hasProperty('env') && project.getProperty('env') == 'eclipse') { eclipse { project { - buildCommand([ LaunchConfigHandle: "/.externalToolBuilders/OpenJPA Enhance Builder.launch" ], 'org.eclipse.ui.externaltools.ExternalToolBuilder') + buildCommand([LaunchConfigHandle: "/.externalToolBuilders/OpenJPA Enhance Builder.launch"], 'org.eclipse.ui.externaltools.ExternalToolBuilder') } } diff --git a/fineract-branch/dependencies.gradle b/fineract-branch/dependencies.gradle index 467fc305f44..88fe34de5a6 100644 --- a/fineract-branch/dependencies.gradle +++ b/fineract-branch/dependencies.gradle @@ -50,11 +50,11 @@ dependencies { 'io.github.resilience4j:resilience4j-spring-boot3', 'org.apache.httpcomponents:httpcore', - ) + ) compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' annotationProcessor 'org.mapstruct:mapstruct-processor' - implementation ('org.springframework.boot:spring-boot-starter-data-jpa') { + implementation('org.springframework.boot:spring-boot-starter-data-jpa') { exclude group: 'org.hibernate' } implementation('org.eclipse.persistence:org.eclipse.persistence.jpa') { @@ -63,13 +63,13 @@ dependencies { // testCompile dependencies are ONLY used in src/test, not src/main. // Do NOT repeat dependencies which are ALREADY in implementation or runtimeOnly! // - testImplementation( 'io.github.classgraph:classgraph' ) - testImplementation ('org.springframework.boot:spring-boot-starter-test') { + testImplementation('io.github.classgraph:classgraph') + testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'com.jayway.jsonpath', module: 'json-path' exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' exclude group: 'jakarta.activation' exclude group: 'javax.activation' exclude group: 'org.skyscreamer' } - testImplementation ('org.mockito:mockito-inline') + testImplementation('org.mockito:mockito-inline') } diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResourceSwagger.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResourceSwagger.java index 89a0589d089..271149424b7 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResourceSwagger.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/api/TellerApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.organisation.teller.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalDateTime; import java.util.Collection; + import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.organisation.staff.data.StaffData; @@ -137,7 +139,8 @@ private PutTellersResponse() { static final class PutTellersResponseChanges { - private PutTellersResponseChanges() {} + private PutTellersResponseChanges() { + } @Schema(example = "teller cash handling") public String description; @@ -281,7 +284,8 @@ private PutTellersTellerIdCashiersCashierIdResponse() { static final class PutTellersTellerIdCashiersCashierIdResponseChanges { - private PutTellersTellerIdCashiersCashierIdResponseChanges() {} + private PutTellersTellerIdCashiersCashierIdResponseChanges() { + } @Schema(example = "25 February 2015") public LocalDate endDate; diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierData.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierData.java index 1024962f8fc..be7edf5ecc9 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierData.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serializable; import java.time.LocalDate; import java.util.Collection; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -97,8 +98,8 @@ public final class CashierData implements Serializable { * @return */ public static CashierData instance(final Long id, final Long officeId, String officeName, final Long staffId, final String staffName, - final Long tellerId, final String tellerName, final String description, final LocalDate startDate, final LocalDate endDate, - final Boolean isFullDay, final String startTime, final String endTime) { + final Long tellerId, final String tellerName, final String description, final LocalDate startDate, final LocalDate endDate, + final Boolean isFullDay, final String startTime, final String endTime) { return new CashierData().setId(id).setOfficeId(officeId).setOfficeName(officeName).setStaffId(staffId).setStaffName(staffName) .setTellerId(tellerId).setTellerName(tellerName).setDescription(description).setStartDate(startDate).setEndDate(endDate) .setIsFullDay(isFullDay).setStartTime(startTime).setEndTime(endTime); @@ -108,7 +109,7 @@ public static CashierData instance(final Long id, final Long officeId, String of * Creates a new cashier. */ public static CashierData template(final Long officeId, final String officeName, final Long tellerId, final String tellerName, - final Collection staffOptions) { + final Collection staffOptions) { return new CashierData().setOfficeId(officeId).setOfficeName(officeName).setTellerId(tellerId).setTellerName(tellerName) .setStaffOptions(staffOptions); } diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierTransactionData.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierTransactionData.java index 9343b5354d0..4d8293eb3d1 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierTransactionData.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierTransactionData.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.Collection; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -58,9 +59,9 @@ public final class CashierTransactionData implements Serializable { private Collection currencyOptions; public static CashierTransactionData instance(final Long id, final Long cashierId, CashierTxnType txnType, final BigDecimal txnAmount, - final LocalDate txnDate, final String txnNote, final String entityType, final Long entityId, final OffsetDateTime createdDate, - final Long officeId, final String officeName, final Long tellerId, final String tellerName, final String cashierName, - final CashierData cashierData, LocalDate startDate, LocalDate endDate) { + final LocalDate txnDate, final String txnNote, final String entityType, final Long entityId, final OffsetDateTime createdDate, + final Long officeId, final String officeName, final Long tellerId, final String tellerName, final String cashierName, + final CashierData cashierData, LocalDate startDate, LocalDate endDate) { return new CashierTransactionData().setId(id).setCashierId(cashierId).setTxnType(txnType).setTxnAmount(txnAmount) .setTxnDate(txnDate).setTxnNote(txnNote).setEntityType(entityType).setEntityId(entityId).setCreatedDate(createdDate) .setOfficeId(officeId).setOfficeName(officeName).setTellerId(tellerId).setTellerName(tellerName).setCashierName(cashierName) @@ -68,8 +69,8 @@ public static CashierTransactionData instance(final Long id, final Long cashierI } public static CashierTransactionData template(final Long cashierId, final Long tellerId, final String tellerName, final Long officeId, - final String officeName, final String cashierName, final CashierData cashierData, LocalDate startDate, LocalDate endDate, - final Collection currencyOptions) { + final String officeName, final String cashierName, final CashierData cashierData, LocalDate startDate, LocalDate endDate, + final Collection currencyOptions) { return new CashierTransactionData().setCashierId(cashierId).setOfficeId(officeId).setOfficeName(officeName).setTellerId(tellerId) .setTellerName(tellerName).setCashierName(cashierName).setCashierData(cashierData).setStartDate(startDate) .setEndDate(endDate).setCurrencyOptions(currencyOptions); diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierTransactionDataValidator.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierTransactionDataValidator.java index 7667fdfba50..520fe9278fe 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierTransactionDataValidator.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierTransactionDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.OffsetDateTime; import java.util.HashMap; import java.util.Map; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.core.service.MathUtil; @@ -50,7 +51,7 @@ public class CashierTransactionDataValidator { @Autowired public CashierTransactionDataValidator(final TellerManagementReadPlatformService tellerManagementReadPlatformService, - final NamedParameterJdbcTemplate jdbcTemplate) { + final NamedParameterJdbcTemplate jdbcTemplate) { this.tellerManagementReadPlatformService = tellerManagementReadPlatformService; this.jdbcTemplate = jdbcTemplate; } diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierTransactionTypeTotalsData.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierTransactionTypeTotalsData.java index c831c3379be..8b88e1a2128 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierTransactionTypeTotalsData.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierTransactionTypeTotalsData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.math.BigDecimal; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierTransactionsWithSummaryData.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierTransactionsWithSummaryData.java index 4f8652c04b4..954042db2c0 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierTransactionsWithSummaryData.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/CashierTransactionsWithSummaryData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.math.BigDecimal; + import org.apache.fineract.infrastructure.core.service.Page; public final class CashierTransactionsWithSummaryData implements Serializable { @@ -38,8 +39,8 @@ public final class CashierTransactionsWithSummaryData implements Serializable { private final Page cashierTransactions; private CashierTransactionsWithSummaryData(final Page cashierTransactions, final BigDecimal sumCashAllocation, - final BigDecimal sumInwardCash, final BigDecimal sumOutwardCash, final BigDecimal sumCashSettlement, final BigDecimal netCash, - final String officeName, final Long tellerId, final String tellerName, final Long cashierId, final String cashierName) { + final BigDecimal sumInwardCash, final BigDecimal sumOutwardCash, final BigDecimal sumCashSettlement, final BigDecimal netCash, + final String officeName, final Long tellerId, final String tellerName, final Long cashierId, final String cashierName) { this.cashierTransactions = cashierTransactions; this.sumCashAllocation = sumCashAllocation; this.sumInwardCash = sumInwardCash; @@ -54,9 +55,9 @@ private CashierTransactionsWithSummaryData(final Page ca } public static CashierTransactionsWithSummaryData instance(final Page cashierTransactions, - final BigDecimal sumCashAllocation, final BigDecimal sumInwardCash, final BigDecimal sumOutwardCash, - final BigDecimal sumCashSettlement, final String officeName, final Long tellerId, final String tellerName, final Long cashierId, - final String cashierName) { + final BigDecimal sumCashAllocation, final BigDecimal sumInwardCash, final BigDecimal sumOutwardCash, + final BigDecimal sumCashSettlement, final String officeName, final Long tellerId, final String tellerName, final Long cashierId, + final String cashierName) { final BigDecimal netCash = sumCashAllocation.add(sumInwardCash).subtract(sumOutwardCash).subtract(sumCashSettlement); return new CashierTransactionsWithSummaryData(cashierTransactions, sumCashAllocation, sumInwardCash, sumOutwardCash, diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/TellerData.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/TellerData.java index 5b9bbc71a9c..f8f8bc6ccf7 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/TellerData.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/TellerData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serializable; import java.time.LocalDate; import java.util.Collection; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -88,8 +89,8 @@ public final class TellerData implements Serializable { * @return the new created {@code TellerData} */ public static TellerData instance(final Long id, final Long officeId, final Long debitAccountId, final Long creditAccountId, - final String name, final String description, final LocalDate startDate, final LocalDate endDate, final TellerStatus status, - final String officeName, final Boolean hasTransactions, final Boolean hasMappedCashiers) { + final String name, final String description, final LocalDate startDate, final LocalDate endDate, final TellerStatus status, + final String officeName, final Boolean hasTransactions, final Boolean hasMappedCashiers) { return new TellerData().setId(id).setOfficeId(officeId).setDebitAccountId(debitAccountId).setCreditAccountId(creditAccountId) .setName(name).setDescription(description).setStartDate(startDate).setEndDate(endDate).setStatus(status) .setOfficeName(officeName).setHasTransactions(hasTransactions).setHasMappedCashiers(hasMappedCashiers); diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/TellerJournalData.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/TellerJournalData.java index 1bd2bd2c0fa..1b214b393bc 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/TellerJournalData.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/TellerJournalData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -71,7 +72,7 @@ public final class TellerJournalData implements Serializable { * @return the new created {@code TellerJournalData} */ public static TellerJournalData instance(final Long officeId, final Long tellerId, final LocalDate day, final Double openingBalance, - final Double settledBalance, final Double closingBalance, final Double sumReceipts, final Double sumPayments) { + final Double settledBalance, final Double closingBalance, final Double sumReceipts, final Double sumPayments) { return new TellerJournalData().setOfficeId(officeId).setTellerId(tellerId).setDay(day).setOpeningBalance(openingBalance) .setSettledBalance(settledBalance).setClosingBalance(closingBalance).setSumReceipts(sumReceipts) .setSumPayments(sumPayments); diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/TellerTransactionData.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/TellerTransactionData.java index bf3514029c4..7bc0acf857d 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/TellerTransactionData.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/data/TellerTransactionData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -72,7 +73,7 @@ public final class TellerTransactionData implements Serializable { * @return the new created {@code TellerTransactionData} */ public static TellerTransactionData instance(final Long id, final Long officeId, final Long tellerId, final Long cashierId, - final Long clientId, final EnumOptionData type, final Double amount, final LocalDate postingDate) { + final Long clientId, final EnumOptionData type, final Double amount, final LocalDate postingDate) { return new TellerTransactionData().setId(id).setOfficeId(officeId).setTellerId(tellerId).setCashierId(cashierId) .setClientId(clientId).setType(type).setAmount(amount).setPostingDate(postingDate); } diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/Cashier.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/Cashier.java index 4089a805977..7957c5ca47d 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/Cashier.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/Cashier.java @@ -6,9 +6,9 @@ * 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 @@ -27,9 +27,11 @@ import jakarta.persistence.Table; import jakarta.persistence.Transient; import jakarta.persistence.UniqueConstraint; + import java.time.LocalDate; import java.util.LinkedHashMap; import java.util.Map; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; @@ -49,7 +51,7 @@ */ @Entity @Table(name = "m_cashiers", uniqueConstraints = { - @UniqueConstraint(name = "ux_cashiers_staff_teller", columnNames = { "staff_id", "teller_id" }) }) + @UniqueConstraint(name = "ux_cashiers_staff_teller", columnNames = {"staff_id", "teller_id"})}) @Getter @Setter @NoArgsConstructor @@ -89,7 +91,7 @@ public class Cashier extends AbstractPersistableCustom { private String endTime; public static Cashier fromJson(final Office cashierOffice, final Teller teller, final Staff staff, final String startTime, - final String endTime, final JsonCommand command) { + final String endTime, final JsonCommand command) { final String description = command.stringValueOfParameterNamed("description"); final LocalDate startDate = command.localDateValueOfParameterNamed("startDate"); final LocalDate endDate = command.localDateValueOfParameterNamed("endDate"); diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierRepository.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierRepository.java index dce7f1fb265..d30a7c12b6a 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierRepository.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierRepositoryWrapper.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierRepositoryWrapper.java index 147c29ad234..b5b5ce76041 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierRepositoryWrapper.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierTransaction.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierTransaction.java index 098a1c68319..9529f2e7f25 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierTransaction.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierTransaction.java @@ -6,9 +6,9 @@ * 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 @@ -25,11 +25,13 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.Transient; + import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalDateTime; import java.util.LinkedHashMap; import java.util.Map; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierTransactionRepository.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierTransactionRepository.java index 5e3dbbadaa9..4b1df9742f4 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierTransactionRepository.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierTransactionRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierTxnType.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierTxnType.java index 06dc0facff7..9d6eafe5372 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierTxnType.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/CashierTxnType.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.organisation.teller.domain; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; @@ -47,18 +48,18 @@ public static CashierTxnType getCashierTxnType(Integer id) { switch (id) { case 101: retVal = ALLOCATE; - break; + break; case 102: retVal = SETTLE; - break; + break; case 103: retVal = INWARD_CASH_TXN; - break; + break; case 104: retVal = OUTWARD_CASH_TXN; - break; + break; default: - break; + break; } return retVal; } diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/Teller.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/Teller.java index 91e22d10e27..a78dd8effc6 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/Teller.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/Teller.java @@ -6,9 +6,9 @@ * 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 @@ -26,10 +26,12 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.time.LocalDate; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; @@ -41,7 +43,7 @@ import org.apache.fineract.organisation.office.domain.Office; @Entity -@Table(name = "m_tellers", uniqueConstraints = { @UniqueConstraint(name = "ux_tellers_name", columnNames = { "name" }) }) +@Table(name = "m_tellers", uniqueConstraints = {@UniqueConstraint(name = "ux_tellers_name", columnNames = {"name"})}) @Getter @Setter @NoArgsConstructor diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerJournal.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerJournal.java index 67697438e54..4fc588e40b5 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerJournal.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerJournal.java @@ -6,9 +6,9 @@ * 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 @@ -18,4 +18,5 @@ */ package org.apache.fineract.organisation.teller.domain; -public class TellerJournal {} +public class TellerJournal { +} diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerRepository.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerRepository.java index 2fdea2a6885..df28e2fe9de 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerRepository.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.organisation.teller.domain; import java.util.Collection; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerRepositoryWrapper.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerRepositoryWrapper.java index f0b335d1e41..62f106450d4 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerRepositoryWrapper.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerStatus.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerStatus.java index aebe5033806..802b414ed60 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerStatus.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerStatus.java @@ -6,9 +6,9 @@ * 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 @@ -43,16 +43,16 @@ public static TellerStatus fromInt(final Integer statusValue) { switch (statusValue) { case 100: status = TellerStatus.PENDING; - break; + break; case 300: status = TellerStatus.ACTIVE; - break; + break; case 400: status = TellerStatus.INACTIVE; - break; + break; case 600: status = TellerStatus.CLOSED; - break; + break; } return status; } diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerTransaction.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerTransaction.java index fbccb706a06..7d1900190bc 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerTransaction.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerTransaction.java @@ -6,9 +6,9 @@ * 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 @@ -24,7 +24,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerTransactionRepository.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerTransactionRepository.java index 1fa4e91674b..7d44de12ff5 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerTransactionRepository.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/TellerTransactionRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/model/CashiersForTeller.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/model/CashiersForTeller.java index bc855cb4d17..6ef38180b8d 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/model/CashiersForTeller.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/model/CashiersForTeller.java @@ -6,9 +6,9 @@ * 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 @@ -21,8 +21,9 @@ import java.io.Serializable; import java.util.Collection; + import org.apache.fineract.organisation.teller.data.CashierData; public record CashiersForTeller(Long tellerId, String tellerName, Long officeId, String officeName, - Collection cashiers) implements Serializable { + Collection cashiers) implements Serializable { } diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/model/request/CashierRequest.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/model/request/CashierRequest.java index a7eedd218df..13a9dc08952 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/model/request/CashierRequest.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/model/request/CashierRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/model/request/CashierTransactionRequest.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/model/request/CashierTransactionRequest.java index bb2309bf517..95941dfc0a5 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/model/request/CashierTransactionRequest.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/model/request/CashierTransactionRequest.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.math.BigDecimal; + import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/model/request/TellerRequest.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/model/request/TellerRequest.java index fae09776619..6ac1a4af386 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/model/request/TellerRequest.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/domain/model/request/TellerRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierAlreadyAllocated.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierAlreadyAllocated.java index 5c19e79dbc5..4b7845bc254 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierAlreadyAllocated.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierAlreadyAllocated.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierDateRangeOutOfTellerDateRangeException.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierDateRangeOutOfTellerDateRangeException.java index c9b1aa3bfda..a3d286e7489 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierDateRangeOutOfTellerDateRangeException.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierDateRangeOutOfTellerDateRangeException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierExistForTellerException.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierExistForTellerException.java index f668f5e8846..3be7c222403 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierExistForTellerException.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierExistForTellerException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierInsufficientAmountException.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierInsufficientAmountException.java index 9c01e156dfe..6002bd11b2a 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierInsufficientAmountException.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierInsufficientAmountException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierNotFoundException.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierNotFoundException.java index 247844ce482..3fab33ac53b 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierNotFoundException.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/CashierNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/InvalidDateInputException.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/InvalidDateInputException.java index c099d1d0e98..0298b5d7ad2 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/InvalidDateInputException.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/InvalidDateInputException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/TellerNotFoundException.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/TellerNotFoundException.java index 677ec723e12..32cfe8c9580 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/TellerNotFoundException.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/exception/TellerNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/AllocateCashToCashierCommandHandler.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/AllocateCashToCashierCommandHandler.java index 4ce37fc8f07..1c78ca7d52f 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/AllocateCashToCashierCommandHandler.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/AllocateCashToCashierCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/AllocateCashierToTellerCommandHandler.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/AllocateCashierToTellerCommandHandler.java index 64e3184ab7c..fb03401bcb7 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/AllocateCashierToTellerCommandHandler.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/AllocateCashierToTellerCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/CreateTellerCommandHandler.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/CreateTellerCommandHandler.java index 4df7cfaa6ff..47db6555ad1 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/CreateTellerCommandHandler.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/CreateTellerCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/CreateTellerTransactionCommandHandler.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/CreateTellerTransactionCommandHandler.java index 5a30ba09e01..1cbbf74a5ad 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/CreateTellerTransactionCommandHandler.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/CreateTellerTransactionCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/DeleteCashierAllocationCommandHandler.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/DeleteCashierAllocationCommandHandler.java index adcb9109eef..acfd72be00a 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/DeleteCashierAllocationCommandHandler.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/DeleteCashierAllocationCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/DeleteTellerCommandHandler.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/DeleteTellerCommandHandler.java index c4e8ebb34b7..2907b3b9067 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/DeleteTellerCommandHandler.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/DeleteTellerCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/ModifyCashierCommandHandler.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/ModifyCashierCommandHandler.java index cabda9a1473..aaa91c9ab45 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/ModifyCashierCommandHandler.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/ModifyCashierCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/SettleCashFromCashierCommandHandler.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/SettleCashFromCashierCommandHandler.java index 2acf9aa8f7e..82c50419dbd 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/SettleCashFromCashierCommandHandler.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/SettleCashFromCashierCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/UpdateCashierAllocationCommandHandler.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/UpdateCashierAllocationCommandHandler.java index bd8db12f49c..0c0cff8588a 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/UpdateCashierAllocationCommandHandler.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/UpdateCashierAllocationCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/UpdateTellerCommandHandler.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/UpdateTellerCommandHandler.java index d90e6859be7..d729be3e877 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/UpdateTellerCommandHandler.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/handler/UpdateTellerCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/serialization/TellerCommandFromApiJsonDeserializer.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/serialization/TellerCommandFromApiJsonDeserializer.java index 5b6f3f57047..9f3cdcdbb72 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/serialization/TellerCommandFromApiJsonDeserializer.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/serialization/TellerCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -29,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/service/CashierWritePlatformService.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/service/CashierWritePlatformService.java index ce7a7196b86..9f31ce994a8 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/service/CashierWritePlatformService.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/service/CashierWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/service/TellerManagementReadPlatformService.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/service/TellerManagementReadPlatformService.java index 4b7fa79a9fe..5ea518e989f 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/service/TellerManagementReadPlatformService.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/service/TellerManagementReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.Collection; + import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.infrastructure.core.service.SearchParameters; import org.apache.fineract.organisation.teller.data.CashierData; @@ -56,9 +57,9 @@ public interface TellerManagementReadPlatformService { Collection retrieveCashiersForTellers(Long tellerId); Page retrieveCashierTransactions(Long cashierId, boolean includeAllTellers, LocalDate fromDate, - LocalDate toDate, String currencyCode, SearchParameters searchParameters); + LocalDate toDate, String currencyCode, SearchParameters searchParameters); CashierTransactionsWithSummaryData retrieveCashierTransactionsWithSummary(Long cashierId, boolean includeAllTellers, LocalDate fromDate, - LocalDate toDate, String currencyCode, SearchParameters searchParameters); + LocalDate toDate, String currencyCode, SearchParameters searchParameters); } diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/service/TellerTransactionWritePlatformService.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/service/TellerTransactionWritePlatformService.java index 13a6e58e677..79d62e6bf3a 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/service/TellerTransactionWritePlatformService.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/service/TellerTransactionWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/service/TellerWritePlatformService.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/service/TellerWritePlatformService.java index ba1e8c589bc..02b3e07fbf4 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/service/TellerWritePlatformService.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/service/TellerWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/util/DateRange.java b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/util/DateRange.java index d1271a11826..ccc3926da0d 100644 --- a/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/util/DateRange.java +++ b/fineract-branch/src/main/java/org/apache/fineract/organisation/teller/util/DateRange.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.time.format.DateTimeParseException; import java.util.StringTokenizer; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/fineract-branch/src/main/resources/db/changelog/tenant/module/branch/module-changelog-master.xml b/fineract-branch/src/main/resources/db/changelog/tenant/module/branch/module-changelog-master.xml index 035b136c7da..824a47e9687 100644 --- a/fineract-branch/src/main/resources/db/changelog/tenant/module/branch/module-changelog-master.xml +++ b/fineract-branch/src/main/resources/db/changelog/tenant/module/branch/module-changelog-master.xml @@ -20,7 +20,7 @@ --> - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> + diff --git a/fineract-branch/src/main/resources/jpa/static-weaving/module/fineract-branch/persistence.xml b/fineract-branch/src/main/resources/jpa/static-weaving/module/fineract-branch/persistence.xml index af19d5faf24..6c172ff1362 100644 --- a/fineract-branch/src/main/resources/jpa/static-weaving/module/fineract-branch/persistence.xml +++ b/fineract-branch/src/main/resources/jpa/static-weaving/module/fineract-branch/persistence.xml @@ -98,7 +98,7 @@ false - + diff --git a/fineract-branch/src/test/java/org/apache/fineract/organisation/teller/serialization/TellerCommandFromApiJsonDeserializerTest.java b/fineract-branch/src/test/java/org/apache/fineract/organisation/teller/serialization/TellerCommandFromApiJsonDeserializerTest.java index d883a0b4d49..e0c74e99829 100644 --- a/fineract-branch/src/test/java/org/apache/fineract/organisation/teller/serialization/TellerCommandFromApiJsonDeserializerTest.java +++ b/fineract-branch/src/test/java/org/apache/fineract/organisation/teller/serialization/TellerCommandFromApiJsonDeserializerTest.java @@ -6,9 +6,9 @@ * 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 @@ -23,10 +23,12 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; + import java.math.BigDecimal; import java.util.HashMap; import java.util.Map; import java.util.Optional; + import org.apache.fineract.infrastructure.core.exception.InvalidJsonException; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; @@ -83,7 +85,7 @@ public void testCashTxnCurrencyCodeExceedingMaxLengthThrowsValidationException() @NonNull private String cashTxnJson(@Nullable BigDecimal txnAmount, @Nullable String txnDate, @Nullable String txnNote, - @Nullable String currencyCode) throws JsonProcessingException { + @Nullable String currencyCode) throws JsonProcessingException { Map map = new HashMap<>(); map.put("dateFormat", "dd MMMM yyyy"); map.put("locale", "en"); @@ -106,7 +108,7 @@ private void assertPlatformValidationException(String message, String code, Exec } private void assertPlatformException(String expectedMessage, String expectedCode, - PlatformApiDataValidationException platformApiDataValidationException) { + PlatformApiDataValidationException platformApiDataValidationException) { Assertions.assertEquals(expectedMessage, platformApiDataValidationException.getErrors().get(0).getDefaultUserMessage()); Assertions.assertEquals(expectedCode, platformApiDataValidationException.getErrors().get(0).getUserMessageGlobalisationCode()); } diff --git a/fineract-charge/build.gradle b/fineract-charge/build.gradle index 2bc9d7e294d..045eb3ddd2f 100644 --- a/fineract-charge/build.gradle +++ b/fineract-charge/build.gradle @@ -52,9 +52,9 @@ apply from: 'dependencies.gradle' // https://github.com/andygoossens/gradle-modernizer-plugin modernizer { ignoreClassNamePatterns = [ - '.*AbstractPersistableCustom', - '.*EntityTables', - '.*domain.*' + '.*AbstractPersistableCustom', + '.*EntityTables', + '.*domain.*' ] } @@ -66,7 +66,7 @@ if (project.hasProperty('env') && project.getProperty('env') == 'eclipse') { eclipse { project { - buildCommand([ LaunchConfigHandle: "/.externalToolBuilders/OpenJPA Enhance Builder.launch" ], 'org.eclipse.ui.externaltools.ExternalToolBuilder') + buildCommand([LaunchConfigHandle: "/.externalToolBuilders/OpenJPA Enhance Builder.launch"], 'org.eclipse.ui.externaltools.ExternalToolBuilder') } } diff --git a/fineract-charge/dependencies.gradle b/fineract-charge/dependencies.gradle index 2da607586ac..c40762d5d9a 100644 --- a/fineract-charge/dependencies.gradle +++ b/fineract-charge/dependencies.gradle @@ -50,11 +50,11 @@ dependencies { 'io.github.resilience4j:resilience4j-spring-boot3', 'org.apache.httpcomponents:httpcore', - ) + ) compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' annotationProcessor 'org.mapstruct:mapstruct-processor' - implementation ('org.springframework.boot:spring-boot-starter-data-jpa') { + implementation('org.springframework.boot:spring-boot-starter-data-jpa') { exclude group: 'org.hibernate' } implementation('org.eclipse.persistence:org.eclipse.persistence.jpa') { @@ -63,13 +63,13 @@ dependencies { // testCompile dependencies are ONLY used in src/test, not src/main. // Do NOT repeat dependencies which are ALREADY in implementation or runtimeOnly! // - testImplementation( 'io.github.classgraph:classgraph' ) - testImplementation ('org.springframework.boot:spring-boot-starter-test') { + testImplementation('io.github.classgraph:classgraph') + testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'com.jayway.jsonpath', module: 'json-path' exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' exclude group: 'jakarta.activation' exclude group: 'javax.activation' exclude group: 'org.skyscreamer' } - testImplementation ('org.mockito:mockito-inline') + testImplementation('org.mockito:mockito-inline') } diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiConstants.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiConstants.java index bc9626a17e9..bf486f7176c 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiConstants.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiResourceSwagger.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiResourceSwagger.java index a7172f06312..b62fe458e5c 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiResourceSwagger.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/api/ChargesApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.charge.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.math.BigDecimal; import java.util.Set; @@ -30,7 +31,8 @@ final class ChargesApiResourceSwagger { @Schema(description = "GetChargesResponse") public static final class GetChargesResponse { - private GetChargesResponse() {} + private GetChargesResponse() { + } static final class GetChargesCurrencyResponse { @@ -50,7 +52,8 @@ static final class GetChargesCurrencyResponse { static final class GetChargesTimeTypeResponse { - private GetChargesTimeTypeResponse() {} + private GetChargesTimeTypeResponse() { + } @Schema(example = "1") public Long id; @@ -62,7 +65,8 @@ private GetChargesTimeTypeResponse() {} static final class GetChargesAppliesToResponse { - private GetChargesAppliesToResponse() {} + private GetChargesAppliesToResponse() { + } @Schema(example = "1") public Long id; @@ -74,7 +78,8 @@ private GetChargesAppliesToResponse() {} static final class GetChargesCalculationTypeResponse { - private GetChargesCalculationTypeResponse() {} + private GetChargesCalculationTypeResponse() { + } @Schema(example = "1") public Long id; @@ -86,7 +91,8 @@ private GetChargesCalculationTypeResponse() {} static final class GetChargesPaymentModeResponse { - private GetChargesPaymentModeResponse() {} + private GetChargesPaymentModeResponse() { + } @Schema(example = "1") public Long id; @@ -98,7 +104,8 @@ private GetChargesPaymentModeResponse() {} static final class GetChargesTaxGroup { - private GetChargesTaxGroup() {} + private GetChargesTaxGroup() { + } @Schema(example = "1") public Long id; @@ -129,7 +136,8 @@ private GetChargesTaxGroup() {} @Schema(description = "PostChargesRequest") public static final class PostChargesRequest { - private PostChargesRequest() {} + private PostChargesRequest() { + } @Schema(example = "Loan Service fee") public String name; @@ -164,7 +172,8 @@ private PostChargesRequest() {} @Schema(description = "PostChargesResponse") public static final class PostChargesResponse { - private PostChargesResponse() {} + private PostChargesResponse() { + } @Schema(example = "1") public Long resourceId; @@ -173,7 +182,8 @@ private PostChargesResponse() {} @Schema(description = "PutChargesChargeIdRequest") public static final class PutChargesChargeIdRequest { - private PutChargesChargeIdRequest() {} + private PutChargesChargeIdRequest() { + } @Schema(example = "Loan service fee(changed)") public String name; @@ -226,7 +236,8 @@ private PutChargesChargeIdRequest() {} @Schema(description = "PutChargesChargeIdResponse") public static final class PutChargesChargeIdResponse { - private PutChargesChargeIdResponse() {} + private PutChargesChargeIdResponse() { + } @Schema(example = "1") public Long resourceId; @@ -236,7 +247,8 @@ private PutChargesChargeIdResponse() {} @Schema(description = "DeleteChargesChargeIdResponse") public static final class DeleteChargesChargeIdResponse { - private DeleteChargesChargeIdResponse() {} + private DeleteChargesChargeIdResponse() { + } @Schema(example = "1") public Long resourceId; @@ -245,11 +257,13 @@ private DeleteChargesChargeIdResponse() {} @Schema(description = "GetChargesTemplateResponse") public static final class GetChargesTemplateResponse { - private GetChargesTemplateResponse() {} + private GetChargesTemplateResponse() { + } static final class GetChargesTemplateLoanChargeCalculationTypeOptions { - private GetChargesTemplateLoanChargeCalculationTypeOptions() {} + private GetChargesTemplateLoanChargeCalculationTypeOptions() { + } @Schema(example = "1") public Long id; @@ -261,7 +275,8 @@ private GetChargesTemplateLoanChargeCalculationTypeOptions() {} static final class GetChargesTemplateLoanChargeTimeTypeOptions { - private GetChargesTemplateLoanChargeTimeTypeOptions() {} + private GetChargesTemplateLoanChargeTimeTypeOptions() { + } @Schema(example = "2") public Long id; @@ -273,7 +288,8 @@ private GetChargesTemplateLoanChargeTimeTypeOptions() {} static final class GetChargesTemplateFeeFrequencyOptions { - private GetChargesTemplateFeeFrequencyOptions() {} + private GetChargesTemplateFeeFrequencyOptions() { + } @Schema(example = "0") public Long id; diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/Charge.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/Charge.java index 2f8e909a958..ba25f9316eb 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/Charge.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/Charge.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.math.BigDecimal; import java.time.MonthDay; import java.util.ArrayList; @@ -33,6 +34,7 @@ import java.util.Locale; import java.util.Map; import java.util.Objects; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.accounting.glaccount.data.GLAccountData; @@ -58,7 +60,7 @@ import org.apache.fineract.portfolio.tax.domain.TaxGroup; @Entity -@Table(name = "m_charge", uniqueConstraints = { @UniqueConstraint(columnNames = { "name" }, name = "name") }) +@Table(name = "m_charge", uniqueConstraints = {@UniqueConstraint(columnNames = {"name"}, name = "name")}) public class Charge extends AbstractPersistableCustom { public static final String CHARGE_TIME_PARAM_NAME = "chargeTimeType"; @@ -162,7 +164,7 @@ public class Charge extends AbstractPersistableCustom { private TaxGroup taxGroup; public static Charge fromJson(final JsonCommand command, final GLAccount account, final TaxGroup taxGroup, - final PaymentType paymentType) { + final PaymentType paymentType) { final String name = command.stringValueOfParameterNamed("name"); final BigDecimal amount = command.bigDecimalValueOfParameterNamed("amount"); @@ -206,14 +208,15 @@ public static Charge fromJson(final JsonCommand command, final GLAccount account restartCountFrequency, countFrequencyType, account, taxGroup, enablePaymentType, paymentType); } - protected Charge() {} + protected Charge() { + } private Charge(final String name, final BigDecimal amount, final String currencyCode, final ChargeAppliesTo chargeAppliesTo, - final ChargeTimeType chargeTime, final ChargeCalculationType chargeCalculationType, final boolean penalty, final boolean active, - final ChargePaymentMode paymentMode, final MonthDay feeOnMonthDay, final Integer feeInterval, final BigDecimal minCap, - final BigDecimal maxCap, final Integer feeFrequency, final boolean enableFreeWithdrawalCharge, - final Integer freeWithdrawalFrequency, final Integer restartFrequency, final PeriodFrequencyType restartFrequencyEnum, - final GLAccount account, final TaxGroup taxGroup, final boolean enablePaymentType, final PaymentType paymentType) { + final ChargeTimeType chargeTime, final ChargeCalculationType chargeCalculationType, final boolean penalty, final boolean active, + final ChargePaymentMode paymentMode, final MonthDay feeOnMonthDay, final Integer feeInterval, final BigDecimal minCap, + final BigDecimal maxCap, final Integer feeFrequency, final boolean enableFreeWithdrawalCharge, + final Integer freeWithdrawalFrequency, final Integer restartFrequency, final PeriodFrequencyType restartFrequencyEnum, + final GLAccount account, final TaxGroup taxGroup, final boolean enablePaymentType, final PaymentType paymentType) { this.name = name; this.amount = amount; this.currencyCode = currencyCode; diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeAppliesTo.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeAppliesTo.java index 4f0defe346e..85f932c15b0 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeAppliesTo.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeAppliesTo.java @@ -6,9 +6,9 @@ * 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 @@ -49,19 +49,19 @@ public static ChargeAppliesTo fromInt(final Integer chargeAppliesTo) { switch (chargeAppliesTo) { case 1: chargeAppliesToType = LOAN; - break; + break; case 2: chargeAppliesToType = SAVINGS; - break; + break; case 3: chargeAppliesToType = CLIENT; - break; + break; case 4: chargeAppliesToType = SHARES; - break; + break; default: chargeAppliesToType = INVALID; - break; + break; } } @@ -85,7 +85,7 @@ public boolean isSharesCharge() { } public static Object[] validValues() { - return new Object[] { ChargeAppliesTo.LOAN.getValue(), ChargeAppliesTo.SAVINGS.getValue(), ChargeAppliesTo.CLIENT.getValue(), - ChargeAppliesTo.SHARES.getValue() }; + return new Object[]{ChargeAppliesTo.LOAN.getValue(), ChargeAppliesTo.SAVINGS.getValue(), ChargeAppliesTo.CLIENT.getValue(), + ChargeAppliesTo.SHARES.getValue()}; } } diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeCalculationType.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeCalculationType.java index 83272248146..23536bc87e2 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeCalculationType.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeCalculationType.java @@ -6,9 +6,9 @@ * 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 @@ -44,29 +44,29 @@ public String getCode() { } public static Object[] validValuesForLoan() { - return new Integer[] { ChargeCalculationType.FLAT.getValue(), ChargeCalculationType.PERCENT_OF_AMOUNT.getValue(), + return new Integer[]{ChargeCalculationType.FLAT.getValue(), ChargeCalculationType.PERCENT_OF_AMOUNT.getValue(), ChargeCalculationType.PERCENT_OF_AMOUNT_AND_INTEREST.getValue(), ChargeCalculationType.PERCENT_OF_INTEREST.getValue(), - ChargeCalculationType.PERCENT_OF_DISBURSEMENT_AMOUNT.getValue() }; + ChargeCalculationType.PERCENT_OF_DISBURSEMENT_AMOUNT.getValue()}; } public static Object[] validValuesForSavings() { - return new Integer[] { ChargeCalculationType.FLAT.getValue(), ChargeCalculationType.PERCENT_OF_AMOUNT.getValue() }; + return new Integer[]{ChargeCalculationType.FLAT.getValue(), ChargeCalculationType.PERCENT_OF_AMOUNT.getValue()}; } public static Object[] validValuesForShares() { - return new Integer[] { ChargeCalculationType.FLAT.getValue(), ChargeCalculationType.PERCENT_OF_AMOUNT.getValue() }; + return new Integer[]{ChargeCalculationType.FLAT.getValue(), ChargeCalculationType.PERCENT_OF_AMOUNT.getValue()}; } public static Object[] validValuesForClients() { - return new Integer[] { ChargeCalculationType.FLAT.getValue() }; + return new Integer[]{ChargeCalculationType.FLAT.getValue()}; } public static Object[] validValuesForShareAccountActivation() { - return new Integer[] { ChargeCalculationType.FLAT.getValue() }; + return new Integer[]{ChargeCalculationType.FLAT.getValue()}; } public static Object[] validValuesForTrancheDisbursement() { - return new Integer[] { ChargeCalculationType.FLAT.getValue(), ChargeCalculationType.PERCENT_OF_DISBURSEMENT_AMOUNT.getValue() }; + return new Integer[]{ChargeCalculationType.FLAT.getValue(), ChargeCalculationType.PERCENT_OF_DISBURSEMENT_AMOUNT.getValue()}; } public static ChargeCalculationType fromInt(final Integer chargeCalculation) { diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargePaymentMode.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargePaymentMode.java index ce7f73a266f..af83d742c34 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargePaymentMode.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargePaymentMode.java @@ -6,9 +6,9 @@ * 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 @@ -40,7 +40,7 @@ public String getCode() { } public static Object[] validValues() { - return new Integer[] { ChargePaymentMode.REGULAR.getValue(), ChargePaymentMode.ACCOUNT_TRANSFER.getValue() }; + return new Integer[]{ChargePaymentMode.REGULAR.getValue(), ChargePaymentMode.ACCOUNT_TRANSFER.getValue()}; } public static ChargePaymentMode fromInt(final Integer paymentMode) { @@ -48,10 +48,10 @@ public static ChargePaymentMode fromInt(final Integer paymentMode) { switch (paymentMode) { case 1: chargeAppliesToType = ACCOUNT_TRANSFER; - break; + break; default: chargeAppliesToType = REGULAR; - break; + break; } return chargeAppliesToType; } diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeRepository.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeRepository.java index da0b63dce35..e72912eb3bc 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeRepository.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeRepositoryWrapper.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeRepositoryWrapper.java index 68cb44c44d5..94917d6651e 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeRepositoryWrapper.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeCannotBeAppliedToException.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeCannotBeAppliedToException.java index 4927c25d2f5..8970f03467f 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeCannotBeAppliedToException.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeCannotBeAppliedToException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeCannotBeDeletedException.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeCannotBeDeletedException.java index a1af6c56a60..094caa8221f 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeCannotBeDeletedException.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeCannotBeDeletedException.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,7 @@ public class ChargeCannotBeDeletedException extends AbstractPlatformDomainRuleException { public ChargeCannotBeDeletedException(final String globalisationMessageCode, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs); } diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeCannotBeUpdatedException.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeCannotBeUpdatedException.java index e528b8a966f..2824256d259 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeCannotBeUpdatedException.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeCannotBeUpdatedException.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,7 @@ public class ChargeCannotBeUpdatedException extends AbstractPlatformDomainRuleException { public ChargeCannotBeUpdatedException(final String globalisationMessageCode, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs); } diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeDueAtDisbursementCannotBePenaltyException.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeDueAtDisbursementCannotBePenaltyException.java index 2a66f312479..1ade31fc7ce 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeDueAtDisbursementCannotBePenaltyException.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeDueAtDisbursementCannotBePenaltyException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeIsNotActiveException.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeIsNotActiveException.java index f52db104118..9bedb04f07d 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeIsNotActiveException.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeIsNotActiveException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeMustBePenaltyException.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeMustBePenaltyException.java index 972093dd0c1..950260b18ff 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeMustBePenaltyException.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeMustBePenaltyException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeNotFoundException.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeNotFoundException.java index 663f3159ef8..3768c585c9d 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeNotFoundException.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeAddedException.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeAddedException.java index 4bbcce8fdc1..ad3b95ea457 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeAddedException.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeAddedException.java @@ -6,9 +6,9 @@ * 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 @@ -26,7 +26,7 @@ public class LoanChargeCannotBeAddedException extends AbstractPlatformDomainRuleException { public LoanChargeCannotBeAddedException(final String entity, final String postFix, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg." + entity + ".cannot.be.added.as." + postFix, defaultUserMessage, defaultUserMessageArgs); } diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeDeletedException.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeDeletedException.java index 58ebf6f1e5e..fd6e1939993 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeDeletedException.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeDeletedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBePayedException.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBePayedException.java index df98cdf2fb6..f3856b8c3ef 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBePayedException.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBePayedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeUpdatedException.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeUpdatedException.java index 4790d613034..9ea76bb4ab5 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeUpdatedException.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeUpdatedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeWaivedException.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeWaivedException.java index fb32cea5b67..e4015f3089a 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeWaivedException.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeCannotBeWaivedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeNotFoundException.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeNotFoundException.java index a91e282c6aa..3ed9b814037 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeNotFoundException.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeWaiveCannotBeReversedException.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeWaiveCannotBeReversedException.java index ac5408375f7..9d6328b14e4 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeWaiveCannotBeReversedException.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeWaiveCannotBeReversedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeWithoutMandatoryFieldException.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeWithoutMandatoryFieldException.java index 02ea39498c5..12486f9ebc0 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeWithoutMandatoryFieldException.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/LoanChargeWithoutMandatoryFieldException.java @@ -6,9 +6,9 @@ * 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 @@ -26,7 +26,7 @@ public class LoanChargeWithoutMandatoryFieldException extends AbstractPlatformDomainRuleException { public LoanChargeWithoutMandatoryFieldException(final String entity, final String postFix, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg." + entity + "." + postFix + ".cannot.be.blank", defaultUserMessage, defaultUserMessageArgs); } diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ShareAccountChargeWithoutMandatoryFieldException.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ShareAccountChargeWithoutMandatoryFieldException.java index adf56eb71fd..50b644b9402 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ShareAccountChargeWithoutMandatoryFieldException.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/exception/ShareAccountChargeWithoutMandatoryFieldException.java @@ -6,9 +6,9 @@ * 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 @@ -26,7 +26,7 @@ public class ShareAccountChargeWithoutMandatoryFieldException extends AbstractPlatformDomainRuleException { public ShareAccountChargeWithoutMandatoryFieldException(final String entity, final String postFix, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg." + entity + "." + postFix + ".cannot.be.blank", defaultUserMessage, defaultUserMessageArgs); } diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/handler/CreateChargeDefinitionCommandHandler.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/handler/CreateChargeDefinitionCommandHandler.java index c5ee1586eaa..8a902811b04 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/handler/CreateChargeDefinitionCommandHandler.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/handler/CreateChargeDefinitionCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/handler/DeleteChargeDefinitionCommandHandler.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/handler/DeleteChargeDefinitionCommandHandler.java index e97fb278a39..b601d79f7b3 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/handler/DeleteChargeDefinitionCommandHandler.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/handler/DeleteChargeDefinitionCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/handler/UpdateChargeDefinitionCommandHandler.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/handler/UpdateChargeDefinitionCommandHandler.java index 537255b9e95..5d3ca3296ee 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/handler/UpdateChargeDefinitionCommandHandler.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/handler/UpdateChargeDefinitionCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/request/ChargeRequest.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/request/ChargeRequest.java index 2fde7d37e10..f56d16f46b7 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/request/ChargeRequest.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/request/ChargeRequest.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.math.BigDecimal; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/serialization/ChargeDefinitionCommandFromApiJsonDeserializer.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/serialization/ChargeDefinitionCommandFromApiJsonDeserializer.java index 30e05c41f6e..393228dec25 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/serialization/ChargeDefinitionCommandFromApiJsonDeserializer.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/serialization/ChargeDefinitionCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.MonthDay; @@ -31,6 +32,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -464,7 +466,7 @@ public void validateChargeTimeNCalculationType(Integer chargeTimeType, Integer c } private void performChargeTimeNCalculationTypeValidation(DataValidatorBuilder baseDataValidator, final Integer chargeTimeType, - final Integer chargeCalculationType) { + final Integer chargeCalculationType) { if (chargeTimeType.equals(ChargeTimeType.SHAREACCOUNT_ACTIVATION.getValue())) { baseDataValidator.reset().parameter(CHARGE_CALCULATION_TYPE).value(chargeCalculationType) .isOneOfTheseValues(ChargeCalculationType.validValuesForShareAccountActivation()); diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeDropdownReadPlatformService.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeDropdownReadPlatformService.java index abd3b7400ae..c897d993c99 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeDropdownReadPlatformService.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeDropdownReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.charge.service; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; public interface ChargeDropdownReadPlatformService { diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeDropdownReadPlatformServiceImpl.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeDropdownReadPlatformServiceImpl.java index f7706093cd4..5bc32696191 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeDropdownReadPlatformServiceImpl.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeDropdownReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.charge.domain.ChargeAppliesTo; import org.apache.fineract.portfolio.charge.domain.ChargeCalculationType; diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeEnumerations.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeEnumerations.java index 44a8d7f5a4b..cac6648195f 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeEnumerations.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -41,71 +41,71 @@ public static EnumOptionData chargeTimeType(final ChargeTimeType type) { case DISBURSEMENT: optionData = new EnumOptionData(ChargeTimeType.DISBURSEMENT.getValue().longValue(), ChargeTimeType.DISBURSEMENT.getCode(), "Disbursement"); - break; + break; case SPECIFIED_DUE_DATE: optionData = new EnumOptionData(ChargeTimeType.SPECIFIED_DUE_DATE.getValue().longValue(), ChargeTimeType.SPECIFIED_DUE_DATE.getCode(), "Specified due date"); - break; + break; case SAVINGS_ACTIVATION: optionData = new EnumOptionData(ChargeTimeType.SAVINGS_ACTIVATION.getValue().longValue(), ChargeTimeType.SAVINGS_ACTIVATION.getCode(), "Savings Activation"); - break; + break; case SAVINGS_CLOSURE: optionData = new EnumOptionData(ChargeTimeType.SAVINGS_CLOSURE.getValue().longValue(), ChargeTimeType.SAVINGS_CLOSURE.getCode(), "Savings Closure"); - break; + break; case WITHDRAWAL_FEE: optionData = new EnumOptionData(ChargeTimeType.WITHDRAWAL_FEE.getValue().longValue(), ChargeTimeType.WITHDRAWAL_FEE.getCode(), "Withdrawal Fee"); - break; + break; case ANNUAL_FEE: optionData = new EnumOptionData(ChargeTimeType.ANNUAL_FEE.getValue().longValue(), ChargeTimeType.ANNUAL_FEE.getCode(), "Annual Fee"); - break; + break; case MONTHLY_FEE: optionData = new EnumOptionData(ChargeTimeType.MONTHLY_FEE.getValue().longValue(), ChargeTimeType.MONTHLY_FEE.getCode(), "Monthly Fee"); - break; + break; case WEEKLY_FEE: optionData = new EnumOptionData(ChargeTimeType.WEEKLY_FEE.getValue().longValue(), ChargeTimeType.WEEKLY_FEE.getCode(), "Weekly Fee"); - break; + break; case INSTALMENT_FEE: optionData = new EnumOptionData(ChargeTimeType.INSTALMENT_FEE.getValue().longValue(), ChargeTimeType.INSTALMENT_FEE.getCode(), "Installment Fee"); - break; + break; case OVERDUE_INSTALLMENT: optionData = new EnumOptionData(ChargeTimeType.OVERDUE_INSTALLMENT.getValue().longValue(), ChargeTimeType.OVERDUE_INSTALLMENT.getCode(), "Overdue Fees"); - break; + break; case OVERDRAFT_FEE: optionData = new EnumOptionData(ChargeTimeType.OVERDRAFT_FEE.getValue().longValue(), ChargeTimeType.OVERDRAFT_FEE.getCode(), "Overdraft Fee"); - break; + break; case TRANCHE_DISBURSEMENT: optionData = new EnumOptionData(ChargeTimeType.TRANCHE_DISBURSEMENT.getValue().longValue(), ChargeTimeType.TRANCHE_DISBURSEMENT.getCode(), "Tranche Disbursement"); - break; + break; case SHAREACCOUNT_ACTIVATION: optionData = new EnumOptionData(ChargeTimeType.SHAREACCOUNT_ACTIVATION.getValue().longValue(), ChargeTimeType.SHAREACCOUNT_ACTIVATION.getCode(), "Share Account Activate"); - break; + break; case SHARE_PURCHASE: optionData = new EnumOptionData(ChargeTimeType.SHARE_PURCHASE.getValue().longValue(), ChargeTimeType.SHARE_PURCHASE.getCode(), "Share Purchase"); - break; + break; case SHARE_REDEEM: optionData = new EnumOptionData(ChargeTimeType.SHARE_REDEEM.getValue().longValue(), ChargeTimeType.SHARE_REDEEM.getCode(), "Share Redeem"); - break; + break; case SAVINGS_NOACTIVITY_FEE: optionData = new EnumOptionData(ChargeTimeType.SAVINGS_NOACTIVITY_FEE.getValue().longValue(), ChargeTimeType.SAVINGS_NOACTIVITY_FEE.getCode(), "Saving No Activity Fee"); - break; + break; default: optionData = new EnumOptionData(ChargeTimeType.INVALID.getValue().longValue(), ChargeTimeType.INVALID.getCode(), "Invalid"); - break; + break; } return optionData; } @@ -119,21 +119,21 @@ public static EnumOptionData chargeAppliesTo(final ChargeAppliesTo type) { switch (type) { case LOAN: optionData = new EnumOptionData(ChargeAppliesTo.LOAN.getValue().longValue(), ChargeAppliesTo.LOAN.getCode(), "Loan"); - break; + break; case SAVINGS: optionData = new EnumOptionData(ChargeAppliesTo.SAVINGS.getValue().longValue(), ChargeAppliesTo.SAVINGS.getCode(), "Savings"); - break; + break; case CLIENT: optionData = new EnumOptionData(ChargeAppliesTo.CLIENT.getValue().longValue(), ChargeAppliesTo.CLIENT.getCode(), "Client"); - break; + break; case SHARES: optionData = new EnumOptionData(ChargeAppliesTo.SHARES.getValue().longValue(), ChargeAppliesTo.SHARES.getCode(), "Shares"); - break; + break; default: optionData = new EnumOptionData(ChargeAppliesTo.INVALID.getValue().longValue(), ChargeAppliesTo.INVALID.getCode(), "Invalid"); - break; + break; } return optionData; } @@ -148,27 +148,27 @@ public static EnumOptionData chargeCalculationType(final ChargeCalculationType t case FLAT: optionData = new EnumOptionData(ChargeCalculationType.FLAT.getValue().longValue(), ChargeCalculationType.FLAT.getCode(), "Flat"); - break; + break; case PERCENT_OF_AMOUNT: optionData = new EnumOptionData(ChargeCalculationType.PERCENT_OF_AMOUNT.getValue().longValue(), ChargeCalculationType.PERCENT_OF_AMOUNT.getCode(), "% Amount"); - break; + break; case PERCENT_OF_AMOUNT_AND_INTEREST: optionData = new EnumOptionData(ChargeCalculationType.PERCENT_OF_AMOUNT_AND_INTEREST.getValue().longValue(), ChargeCalculationType.PERCENT_OF_AMOUNT_AND_INTEREST.getCode(), "% Loan Amount + Interest"); - break; + break; case PERCENT_OF_INTEREST: optionData = new EnumOptionData(ChargeCalculationType.PERCENT_OF_INTEREST.getValue().longValue(), ChargeCalculationType.PERCENT_OF_INTEREST.getCode(), "% Interest"); - break; + break; case PERCENT_OF_DISBURSEMENT_AMOUNT: optionData = new EnumOptionData(ChargeCalculationType.PERCENT_OF_DISBURSEMENT_AMOUNT.getValue().longValue(), ChargeCalculationType.PERCENT_OF_DISBURSEMENT_AMOUNT.getCode(), "% Disbursement Amount"); - break; + break; default: optionData = new EnumOptionData(ChargeCalculationType.INVALID.getValue().longValue(), ChargeCalculationType.INVALID.getCode(), "Invalid"); - break; + break; } return optionData; } @@ -183,11 +183,11 @@ public static EnumOptionData chargePaymentMode(final ChargePaymentMode type) { case ACCOUNT_TRANSFER: optionData = new EnumOptionData(ChargePaymentMode.ACCOUNT_TRANSFER.getValue().longValue(), ChargePaymentMode.ACCOUNT_TRANSFER.getCode(), "Account transfer"); - break; + break; default: optionData = new EnumOptionData(ChargePaymentMode.REGULAR.getValue().longValue(), ChargePaymentMode.REGULAR.getCode(), "Regular"); - break; + break; } return optionData; } diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeReadPlatformService.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeReadPlatformService.java index 137c42f0f63..5a5a4ce7d4f 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeReadPlatformService.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.charge.service; import java.util.List; + import org.apache.fineract.portfolio.charge.data.ChargeData; import org.apache.fineract.portfolio.charge.domain.ChargeTimeType; diff --git a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeWritePlatformService.java b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeWritePlatformService.java index c157173f5a5..21f91bf25bc 100644 --- a/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeWritePlatformService.java +++ b/fineract-charge/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-charge/src/main/resources/jpa/charge/db/changelog/tenant/module/charge/module-changelog-master.xml b/fineract-charge/src/main/resources/jpa/charge/db/changelog/tenant/module/charge/module-changelog-master.xml index 570460d3f9d..f4ce51f60ff 100644 --- a/fineract-charge/src/main/resources/jpa/charge/db/changelog/tenant/module/charge/module-changelog-master.xml +++ b/fineract-charge/src/main/resources/jpa/charge/db/changelog/tenant/module/charge/module-changelog-master.xml @@ -20,7 +20,7 @@ --> - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> + diff --git a/fineract-charge/src/main/resources/jpa/static-weaving/module/fineract-charge/persistence.xml b/fineract-charge/src/main/resources/jpa/static-weaving/module/fineract-charge/persistence.xml index 3230acc9561..c9350ca82c4 100644 --- a/fineract-charge/src/main/resources/jpa/static-weaving/module/fineract-charge/persistence.xml +++ b/fineract-charge/src/main/resources/jpa/static-weaving/module/fineract-charge/persistence.xml @@ -83,7 +83,7 @@ false - + diff --git a/fineract-client-feign/build.gradle b/fineract-client-feign/build.gradle index c158b75aa68..20f08a5891a 100644 --- a/fineract-client-feign/build.gradle +++ b/fineract-client-feign/build.gradle @@ -50,16 +50,16 @@ tasks.register('buildJavaSdk', org.openapitools.generator.gradle.plugin.tasks.Ge generateApiTests = false ignoreFileOverride = "$projectDir/.openapi-generator-ignore" configOptions = [ - dateLibrary : 'java8', - library : 'feign', - feignVersion : '13.6', - feignApacheHttpClient : 'true', - useFeign13 : 'true', - useFeignApacheHttpClient : 'true', - hideGenerationTimestamp : 'true', - containerDefaultToNull : 'true', - oauth2Implementation : 'none', - useJakartaEe : 'true' + dateLibrary : 'java8', + library : 'feign', + feignVersion : '13.6', + feignApacheHttpClient : 'true', + useFeign13 : 'true', + useFeignApacheHttpClient: 'true', + hideGenerationTimestamp : 'true', + containerDefaultToNull : 'true', + oauth2Implementation : 'none', + useJakartaEe : 'true' ] dependsOn(':fineract-provider:resolve') @@ -69,8 +69,8 @@ sourceSets { main { java { srcDirs = [ - new File(buildDir, "generated/java/src/main/java"), - "$projectDir/src/main/java" + new File(buildDir, "generated/java/src/main/java"), + "$projectDir/src/main/java" ] destinationDirectory = layout.buildDirectory.dir('classes/java/main').get().asFile } @@ -101,9 +101,9 @@ task cleanupGeneratedJavaFiles() { into targetDir filter { line -> line - .replaceAll(", \\)", ")") - .replaceAll(", , @HeaderMap", ", @HeaderMap") - .replaceAll("\\(, ", "(") + .replaceAll(", \\)", ")") + .replaceAll(", , @HeaderMap", ", @HeaderMap") + .replaceAll("\\(, ", "(") } duplicatesStrategy = DuplicatesStrategy.EXCLUDE } @@ -180,10 +180,10 @@ jacocoTestReport { afterEvaluate { classDirectories.setFrom(files(classDirectories.files.collect { fileTree(dir: it, exclude: [ - '**/build/generated/**', - '**/org/apache/fineract/client/models/**', - '**/org/apache/fineract/client/services/**Api.class', - '**/org/apache/fineract/client/auth/**' + '**/build/generated/**', + '**/org/apache/fineract/client/models/**', + '**/org/apache/fineract/client/services/**Api.class', + '**/org/apache/fineract/client/auth/**' ]) })) } diff --git a/fineract-client-feign/dependencies.gradle b/fineract-client-feign/dependencies.gradle index ebc09f7973b..cd0a3ae2307 100644 --- a/fineract-client-feign/dependencies.gradle +++ b/fineract-client-feign/dependencies.gradle @@ -34,7 +34,7 @@ dependencies { 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.15', 'org.apache.commons:commons-lang3:3.12.0', 'org.projectlombok:lombok' - ) + ) // Test dependencies testImplementation( @@ -43,5 +43,5 @@ dependencies { 'org.mockito:mockito-core:5.14.2', 'org.assertj:assertj-core:3.26.3', 'org.wiremock:wiremock-standalone' - ) + ) } diff --git a/fineract-client-feign/src/main/java/org/apache/fineract/client/adapter/ExternalIdAdapter.java b/fineract-client-feign/src/main/java/org/apache/fineract/client/adapter/ExternalIdAdapter.java index 00bd2f0ee0c..bffc0286a21 100644 --- a/fineract-client-feign/src/main/java/org/apache/fineract/client/adapter/ExternalIdAdapter.java +++ b/fineract-client-feign/src/main/java/org/apache/fineract/client/adapter/ExternalIdAdapter.java @@ -6,9 +6,9 @@ * 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 @@ -25,7 +25,9 @@ import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.module.SimpleModule; + import java.io.IOException; + import org.apache.fineract.client.models.ExternalId; /** @@ -34,7 +36,8 @@ */ public final class ExternalIdAdapter { - private ExternalIdAdapter() {} + private ExternalIdAdapter() { + } /** * Jackson Serializer for ExternalId. Serializes an ExternalId object to its string value, or null if the ExternalId diff --git a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/BasicAuthRequestInterceptor.java b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/BasicAuthRequestInterceptor.java index 355bec7dbdd..ead6d1c1809 100644 --- a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/BasicAuthRequestInterceptor.java +++ b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/BasicAuthRequestInterceptor.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import feign.RequestInterceptor; import feign.RequestTemplate; + import java.nio.charset.StandardCharsets; import java.util.Base64; diff --git a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FeignException.java b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FeignException.java index a80430c00b2..f942549fb1d 100644 --- a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FeignException.java +++ b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FeignException.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.client.feign; import feign.Request; + import java.nio.charset.Charset; /** diff --git a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FineractErrorDecoder.java b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FineractErrorDecoder.java index 9a0867648d5..26f704f7660 100644 --- a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FineractErrorDecoder.java +++ b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FineractErrorDecoder.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import feign.Response; import feign.codec.ErrorDecoder; + import java.io.IOException; import java.io.InputStream; diff --git a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FineractFeignClient.java b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FineractFeignClient.java index bec17022007..1016067ea55 100644 --- a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FineractFeignClient.java +++ b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FineractFeignClient.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FineractFeignClientConfig.java b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FineractFeignClientConfig.java index 098dadfbb58..fdff17179c1 100644 --- a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FineractFeignClientConfig.java +++ b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FineractFeignClientConfig.java @@ -6,9 +6,9 @@ * 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 @@ -27,11 +27,13 @@ import feign.jackson.JacksonDecoder; import feign.jackson.JacksonEncoder; import feign.slf4j.Slf4jLogger; + import java.security.cert.X509Certificate; import java.util.concurrent.TimeUnit; import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; + import org.apache.fineract.client.feign.support.ApiResponseDecoder; import org.apache.hc.client5.http.config.RequestConfig; import org.apache.hc.client5.http.impl.classic.CloseableHttpClient; @@ -183,15 +185,17 @@ public X509Certificate[] getAcceptedIssuers() { } @Override - public void checkClientTrusted(X509Certificate[] certs, String authType) {} + public void checkClientTrusted(X509Certificate[] certs, String authType) { + } @Override - public void checkServerTrusted(X509Certificate[] certs, String authType) {} + public void checkServerTrusted(X509Certificate[] certs, String authType) { + } }; } private SSLContext createTrustAllSslContext() throws Exception { - TrustManager[] trustAllCerts = new TrustManager[] { createTrustAllManager() }; + TrustManager[] trustAllCerts = new TrustManager[]{createTrustAllManager()}; SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(null, trustAllCerts, new java.security.SecureRandom()); diff --git a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FineractMultipartEncoder.java b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FineractMultipartEncoder.java index 7f816790025..9d2eedce0db 100644 --- a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FineractMultipartEncoder.java +++ b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/FineractMultipartEncoder.java @@ -6,9 +6,9 @@ * 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 @@ -21,12 +21,14 @@ import feign.RequestTemplate; import feign.codec.EncodeException; import feign.codec.Encoder; + import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.lang.reflect.Type; import java.nio.charset.StandardCharsets; import java.nio.file.Files; + import org.apache.hc.client5.http.entity.mime.MultipartEntityBuilder; import org.apache.hc.core5.http.HttpEntity; diff --git a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/ObjectMapperFactory.java b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/ObjectMapperFactory.java index 18e163041e7..5d6424975e5 100644 --- a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/ObjectMapperFactory.java +++ b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/ObjectMapperFactory.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/TenantIdRequestInterceptor.java b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/TenantIdRequestInterceptor.java index 15578cd3ec2..305df1d6d2b 100644 --- a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/TenantIdRequestInterceptor.java +++ b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/TenantIdRequestInterceptor.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/services/DocumentsApiFixed.java b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/services/DocumentsApiFixed.java index 1d9aad2360b..b94dfb63b89 100644 --- a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/services/DocumentsApiFixed.java +++ b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/services/DocumentsApiFixed.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import feign.Param; import feign.RequestLine; import feign.Response; + import java.util.List; + import org.apache.fineract.client.models.DocumentCreateResponse; import org.apache.fineract.client.models.DocumentData; import org.apache.fineract.client.models.DocumentDeleteResponse; @@ -45,7 +47,7 @@ public interface DocumentsApiFixed { */ @RequestLine("POST /v1/{entityType}/{entityId}/documents") DocumentCreateResponse createDocument(@Param("entityType") String entityType, @Param("entityId") Long entityId, - org.apache.fineract.client.feign.FineractMultipartEncoder.MultipartData multipartData); + org.apache.fineract.client.feign.FineractMultipartEncoder.MultipartData multipartData); /** * Remove a Document @@ -60,7 +62,7 @@ DocumentCreateResponse createDocument(@Param("entityType") String entityType, @P */ @RequestLine("DELETE /v1/{entityType}/{entityId}/documents/{documentId}") DocumentDeleteResponse deleteDocument(@Param("entityType") String entityType, @Param("entityId") Long entityId, - @Param("documentId") Long documentId); + @Param("documentId") Long documentId); /** * Retrieve Binary File associated with Document Request used to download the file associated with the document @@ -92,7 +94,7 @@ DocumentDeleteResponse deleteDocument(@Param("entityType") String entityType, @P */ @RequestLine("GET /v1/{entityType}/{entityId}/documents/{documentId}") DocumentData getDocument(@Param("entityType") String entityType, @Param("entityId") Long entityId, - @Param("documentId") Long documentId); + @Param("documentId") Long documentId); /** * List documents Example Requests: clients/1/documents client_identifiers/1/documents @@ -115,5 +117,5 @@ DocumentData getDocument(@Param("entityType") String entityType, @Param("entityI */ @RequestLine("PUT /v1/{entityType}/{entityId}/documents/{documentId}") DocumentUpdateResponse updateDocument(@Param("entityType") String entityType, @Param("entityId") Long entityId, - @Param("documentId") Long documentId, org.apache.fineract.client.feign.FineractMultipartEncoder.MultipartData multipartData); + @Param("documentId") Long documentId, org.apache.fineract.client.feign.FineractMultipartEncoder.MultipartData multipartData); } diff --git a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/services/ImagesApi.java b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/services/ImagesApi.java index 7186f0121fd..4b41944883f 100644 --- a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/services/ImagesApi.java +++ b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/services/ImagesApi.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import feign.QueryMap; import feign.RequestLine; import feign.Response; + import java.io.File; import java.util.Map; diff --git a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/services/RunReportsApi.java b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/services/RunReportsApi.java index dfcaa298b6f..d373a346ca9 100644 --- a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/services/RunReportsApi.java +++ b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/services/RunReportsApi.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import feign.QueryMap; import feign.RequestLine; import feign.Response; + import java.util.Map; + import org.apache.fineract.client.models.RunReportsResponse; public interface RunReportsApi { diff --git a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/support/ApiResponseDecoder.java b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/support/ApiResponseDecoder.java index 2d3a4088f34..753ca91160a 100644 --- a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/support/ApiResponseDecoder.java +++ b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/support/ApiResponseDecoder.java @@ -6,9 +6,9 @@ * 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 @@ -20,9 +20,11 @@ import feign.Response; import feign.codec.Decoder; + import java.io.IOException; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; + import org.apache.fineract.client.models.ApiResponse; /** diff --git a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/util/CallFailedRuntimeException.java b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/util/CallFailedRuntimeException.java index 9e8c9ce1ceb..73a1dd2db59 100644 --- a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/util/CallFailedRuntimeException.java +++ b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/util/CallFailedRuntimeException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/util/FeignCalls.java b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/util/FeignCalls.java index 5d40d0dd391..c69bdd08c40 100644 --- a/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/util/FeignCalls.java +++ b/fineract-client-feign/src/main/java/org/apache/fineract/client/feign/util/FeignCalls.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.client.feign.util; import java.util.function.Supplier; + import org.apache.fineract.client.feign.FeignException; /** @@ -26,7 +27,8 @@ */ public final class FeignCalls { - private FeignCalls() {} + private FeignCalls() { + } /** * Execute a Feign call, expecting success, returning strongly typed body. This covers the most typical use and is diff --git a/fineract-client-feign/src/main/java/org/apache/fineract/client/util/FeignParts.java b/fineract-client-feign/src/main/java/org/apache/fineract/client/util/FeignParts.java index 724f6766499..ca20f5bbc65 100644 --- a/fineract-client-feign/src/main/java/org/apache/fineract/client/util/FeignParts.java +++ b/fineract-client-feign/src/main/java/org/apache/fineract/client/util/FeignParts.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.client.util; import feign.Response; + import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.util.Optional; + import org.apache.fineract.client.feign.services.DocumentsApiFixed; import org.apache.fineract.client.feign.services.ImagesApi; @@ -37,7 +39,8 @@ */ public final class FeignParts { - private FeignParts() {} + private FeignParts() { + } /** * Determine the media type based on file extension. diff --git a/fineract-client-feign/src/test/java/org/apache/fineract/client/adapter/ExternalIdAdapterTest.java b/fineract-client-feign/src/test/java/org/apache/fineract/client/adapter/ExternalIdAdapterTest.java index 0840a1aa2c2..4ce06efa360 100644 --- a/fineract-client-feign/src/test/java/org/apache/fineract/client/adapter/ExternalIdAdapterTest.java +++ b/fineract-client-feign/src/test/java/org/apache/fineract/client/adapter/ExternalIdAdapterTest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/FeignExceptionTest.java b/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/FeignExceptionTest.java index a61d5e0f1ed..f6294cad64a 100644 --- a/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/FeignExceptionTest.java +++ b/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/FeignExceptionTest.java @@ -6,9 +6,9 @@ * 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 @@ -24,8 +24,10 @@ import static org.junit.jupiter.api.Assertions.assertTrue; import feign.Request; + import java.nio.charset.StandardCharsets; import java.util.Collections; + import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; diff --git a/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/FineractErrorDecoderTest.java b/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/FineractErrorDecoderTest.java index 59d580fe887..c8ef6241267 100644 --- a/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/FineractErrorDecoderTest.java +++ b/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/FineractErrorDecoderTest.java @@ -6,9 +6,9 @@ * 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 @@ -24,12 +24,14 @@ import feign.Request; import feign.Response; + import java.io.ByteArrayInputStream; import java.nio.charset.StandardCharsets; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map; + import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -171,7 +173,8 @@ public java.io.Reader asReader(java.nio.charset.Charset charset) { } @Override - public void close() {} + public void close() { + } }; } diff --git a/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/FineractFeignClientConfigTest.java b/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/FineractFeignClientConfigTest.java index d2de297de5f..7262e366aac 100644 --- a/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/FineractFeignClientConfigTest.java +++ b/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/FineractFeignClientConfigTest.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import feign.RequestLine; + import java.util.concurrent.TimeUnit; + import org.junit.jupiter.api.Test; class FineractFeignClientConfigTest { diff --git a/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/ObjectMapperFactoryTest.java b/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/ObjectMapperFactoryTest.java index 237ee4779fd..50f55fb497c 100644 --- a/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/ObjectMapperFactoryTest.java +++ b/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/ObjectMapperFactoryTest.java @@ -6,9 +6,9 @@ * 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 @@ -25,8 +25,10 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; + import java.io.IOException; import java.time.LocalDate; + import org.junit.jupiter.api.Test; class ObjectMapperFactoryTest { @@ -103,7 +105,8 @@ static class TestObject { private LocalDate date; - TestObject() {} + TestObject() { + } TestObject(LocalDate date) { this.date = date; diff --git a/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/integration/EncoderDecoderIntegrationTest.java b/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/integration/EncoderDecoderIntegrationTest.java index e486de21b54..5f6c4abce45 100644 --- a/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/integration/EncoderDecoderIntegrationTest.java +++ b/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/integration/EncoderDecoderIntegrationTest.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import com.github.tomakehurst.wiremock.WireMockServer; import com.github.tomakehurst.wiremock.core.WireMockConfiguration; import feign.RequestLine; + import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalDateTime; @@ -35,6 +36,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; + import org.apache.fineract.client.feign.FineractFeignClientConfig; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; diff --git a/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/integration/FineractFeignClientIntegrationTest.java b/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/integration/FineractFeignClientIntegrationTest.java index 851c86777af..b9f26a18c2e 100644 --- a/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/integration/FineractFeignClientIntegrationTest.java +++ b/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/integration/FineractFeignClientIntegrationTest.java @@ -6,9 +6,9 @@ * 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 @@ -33,9 +33,11 @@ import com.github.tomakehurst.wiremock.WireMockServer; import com.github.tomakehurst.wiremock.core.WireMockConfiguration; import feign.RequestLine; + import java.time.LocalDate; import java.time.LocalDateTime; import java.util.concurrent.TimeUnit; + import org.apache.fineract.client.feign.FeignException; import org.apache.fineract.client.feign.FineractFeignClientConfig; import org.junit.jupiter.api.AfterEach; diff --git a/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/performance/ConnectionPoolPerformanceTest.java b/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/performance/ConnectionPoolPerformanceTest.java index 74a3121abc5..e8243d31536 100644 --- a/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/performance/ConnectionPoolPerformanceTest.java +++ b/fineract-client-feign/src/test/java/org/apache/fineract/client/feign/performance/ConnectionPoolPerformanceTest.java @@ -6,9 +6,9 @@ * 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 @@ -26,12 +26,14 @@ import com.github.tomakehurst.wiremock.WireMockServer; import com.github.tomakehurst.wiremock.core.WireMockConfiguration; import feign.RequestLine; + import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; + import org.apache.fineract.client.feign.FineractFeignClientConfig; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; diff --git a/fineract-client-feign/src/test/java/org/apache/fineract/client/services/DocumentsApiFixedIntegrationTest.java b/fineract-client-feign/src/test/java/org/apache/fineract/client/services/DocumentsApiFixedIntegrationTest.java index b59be072c4d..3c7aed8b8a4 100644 --- a/fineract-client-feign/src/test/java/org/apache/fineract/client/services/DocumentsApiFixedIntegrationTest.java +++ b/fineract-client-feign/src/test/java/org/apache/fineract/client/services/DocumentsApiFixedIntegrationTest.java @@ -6,9 +6,9 @@ * 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 @@ -27,12 +27,14 @@ import com.github.tomakehurst.wiremock.WireMockServer; import com.github.tomakehurst.wiremock.core.WireMockConfiguration; import feign.Response; + import java.io.File; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.util.List; import java.util.concurrent.TimeUnit; + import org.apache.fineract.client.feign.FineractFeignClientConfig; import org.apache.fineract.client.feign.services.DocumentsApiFixed; import org.apache.fineract.client.models.DocumentData; @@ -169,8 +171,8 @@ void testDeleteDocumentForLoan() { @Test void testMultipleEntityTypes() { - String[] entityTypes = { "clients", "loans", "savings", "groups" }; - Long[] entityIds = { 100L, 200L, 300L, 400L }; + String[] entityTypes = {"clients", "loans", "savings", "groups"}; + Long[] entityIds = {100L, 200L, 300L, 400L}; for (int i = 0; i < entityTypes.length; i++) { String entityType = entityTypes[i]; diff --git a/fineract-client-feign/src/test/java/org/apache/fineract/client/services/ImagesApiIntegrationTest.java b/fineract-client-feign/src/test/java/org/apache/fineract/client/services/ImagesApiIntegrationTest.java index 8053b6a3e3e..cf9b89878f2 100644 --- a/fineract-client-feign/src/test/java/org/apache/fineract/client/services/ImagesApiIntegrationTest.java +++ b/fineract-client-feign/src/test/java/org/apache/fineract/client/services/ImagesApiIntegrationTest.java @@ -6,9 +6,9 @@ * 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 @@ -30,12 +30,14 @@ import com.github.tomakehurst.wiremock.WireMockServer; import com.github.tomakehurst.wiremock.core.WireMockConfiguration; import feign.Response; + import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeUnit; + import org.apache.fineract.client.feign.FineractFeignClientConfig; import org.apache.fineract.client.feign.services.ImagesApi; import org.junit.jupiter.api.AfterEach; @@ -62,7 +64,7 @@ void setUp() throws IOException { .connectTimeout(5, TimeUnit.SECONDS).readTimeout(10, TimeUnit.SECONDS).build(); testImageFile = new File(tempDir, "test-image.jpg"); - Files.write(testImageFile.toPath(), new byte[] { (byte) 0xFF, (byte) 0xD8, (byte) 0xFF, 0x01, 0x02, 0x03 }); + Files.write(testImageFile.toPath(), new byte[]{(byte) 0xFF, (byte) 0xD8, (byte) 0xFF, 0x01, 0x02, 0x03}); } @AfterEach @@ -74,7 +76,7 @@ void tearDown() { @Test void testRetrieveClientImage() throws IOException { - byte[] imageData = new byte[] { (byte) 0xFF, (byte) 0xD8, (byte) 0xFF, 0x10, 0x11, 0x12 }; + byte[] imageData = new byte[]{(byte) 0xFF, (byte) 0xD8, (byte) 0xFF, 0x10, 0x11, 0x12}; wireMockServer.stubFor(get(urlEqualTo("/v1/clients/123/images")) .willReturn(aResponse().withStatus(200).withHeader(CONTENT_TYPE, "image/jpeg").withBody(imageData))); @@ -89,7 +91,7 @@ void testRetrieveClientImage() throws IOException { @Test void testRetrieveClientImageWithMaxDimensions() throws IOException { - byte[] resizedImage = new byte[] { (byte) 0xFF, (byte) 0xD8, (byte) 0xFF, 0x20, 0x21 }; + byte[] resizedImage = new byte[]{(byte) 0xFF, (byte) 0xD8, (byte) 0xFF, 0x20, 0x21}; wireMockServer.stubFor(get(urlPathEqualTo("/v1/clients/123/images")).withQueryParam("maxWidth", equalTo("100")) .withQueryParam("maxHeight", equalTo("100")) .willReturn(aResponse().withStatus(200).withHeader(CONTENT_TYPE, "image/jpeg").withBody(resizedImage))); @@ -107,7 +109,7 @@ void testRetrieveClientImageWithMaxDimensions() throws IOException { @Test void testRetrieveClientImageWithMaxWidthOnly() throws IOException { - byte[] resizedImage = new byte[] { (byte) 0xFF, (byte) 0xD8, (byte) 0xFF, 0x30 }; + byte[] resizedImage = new byte[]{(byte) 0xFF, (byte) 0xD8, (byte) 0xFF, 0x30}; wireMockServer.stubFor(get(urlPathEqualTo("/v1/clients/123/images")).withQueryParam("maxWidth", equalTo("200")) .willReturn(aResponse().withStatus(200).withHeader(CONTENT_TYPE, "image/jpeg").withBody(resizedImage))); @@ -145,7 +147,7 @@ void testDeleteStaffImage() { @Test void testRetrieveImageWithPngFormat() throws IOException { - byte[] pngImage = new byte[] { (byte) 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A }; + byte[] pngImage = new byte[]{(byte) 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A}; wireMockServer.stubFor(get(urlEqualTo("/v1/clients/123/images")) .willReturn(aResponse().withStatus(200).withHeader(CONTENT_TYPE, "image/png").withBody(pngImage))); @@ -159,15 +161,15 @@ void testRetrieveImageWithPngFormat() throws IOException { @Test void testMultipleEntityTypes() { - String[] entityTypes = { "clients", "staff" }; - Long[] entityIds = { 100L, 200L }; + String[] entityTypes = {"clients", "staff"}; + Long[] entityIds = {100L, 200L}; for (int i = 0; i < entityTypes.length; i++) { String entityType = entityTypes[i]; Long entityId = entityIds[i]; wireMockServer.stubFor(get(urlEqualTo("/v1/" + entityType + "/" + entityId + "/images")) - .willReturn(aResponse().withStatus(200).withHeader(CONTENT_TYPE, "image/jpeg").withBody(new byte[] { 0x01 }))); + .willReturn(aResponse().withStatus(200).withHeader(CONTENT_TYPE, "image/jpeg").withBody(new byte[]{0x01}))); } ImagesApi api = config.createClient(ImagesApi.class); diff --git a/fineract-client-feign/src/test/java/org/apache/fineract/client/services/RunReportsApiIntegrationTest.java b/fineract-client-feign/src/test/java/org/apache/fineract/client/services/RunReportsApiIntegrationTest.java index 528cc7600ca..9472f2585d0 100644 --- a/fineract-client-feign/src/test/java/org/apache/fineract/client/services/RunReportsApiIntegrationTest.java +++ b/fineract-client-feign/src/test/java/org/apache/fineract/client/services/RunReportsApiIntegrationTest.java @@ -6,9 +6,9 @@ * 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 @@ -27,11 +27,13 @@ import com.github.tomakehurst.wiremock.WireMockServer; import com.github.tomakehurst.wiremock.core.WireMockConfiguration; import feign.Response; + import java.io.IOException; import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeUnit; + import org.apache.fineract.client.feign.FineractFeignClientConfig; import org.apache.fineract.client.feign.services.RunReportsApi; import org.apache.fineract.client.models.RunReportsResponse; diff --git a/fineract-client-feign/src/test/java/org/apache/fineract/client/util/FeignPartsTest.java b/fineract-client-feign/src/test/java/org/apache/fineract/client/util/FeignPartsTest.java index c095cb9fe59..1fc401cbee8 100644 --- a/fineract-client-feign/src/test/java/org/apache/fineract/client/util/FeignPartsTest.java +++ b/fineract-client-feign/src/test/java/org/apache/fineract/client/util/FeignPartsTest.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import feign.Request; import feign.Response; + import java.io.File; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -30,6 +31,7 @@ import java.util.List; import java.util.Map; import java.util.Optional; + import org.junit.jupiter.api.Test; import org.junit.jupiter.api.io.TempDir; @@ -230,7 +232,7 @@ void testFileNameWithInvalidContentDisposition() { @Test void testProbeContentTypeForJpegFile() throws IOException { File jpegFile = new File(tempDir, "test.jpg"); - Files.write(jpegFile.toPath(), new byte[] { (byte) 0xFF, (byte) 0xD8, (byte) 0xFF }); + Files.write(jpegFile.toPath(), new byte[]{(byte) 0xFF, (byte) 0xD8, (byte) 0xFF}); String contentType = FeignParts.probeContentType(jpegFile); diff --git a/fineract-client/README.md b/fineract-client/README.md index 9babfda9b07..00385350150 100644 --- a/fineract-client/README.md +++ b/fineract-client/README.md @@ -1,7 +1,10 @@ This is the source of the official Apache Fineract Java Client library. -It is mostly autogenerated using **Swagger Codegen**, but includes a number of hand-written utility classes to aid in its usage. +It is mostly autogenerated using **Swagger Codegen**, but includes a number of hand-written utility classes to aid in +its usage. -There is some [documentation about it here](https://github.com/apache/fineract/blob/develop/fineract-doc/src/docs/en/chapters/sdk/client.adoc). +There is +some [documentation about it here](https://github.com/apache/fineract/blob/develop/fineract-doc/src/docs/en/chapters/sdk/client.adoc). -Please contribute improvements to this (a submodule of Apache Fineract) if this client library has gaps for what you need it for. +Please contribute improvements to this (a submodule of Apache Fineract) if this client library has gaps for what you +need it for. diff --git a/fineract-client/build.gradle b/fineract-client/build.gradle index 4acfe358a29..6c0ae6bcd2f 100644 --- a/fineract-client/build.gradle +++ b/fineract-client/build.gradle @@ -62,12 +62,12 @@ task buildJavaSdk(type: org.openapitools.generator.gradle.plugin.tasks.GenerateT invokerPackage = 'org.apache.fineract.client' modelPackage = 'org.apache.fineract.client.models' configOptions = [ - dateLibrary: 'java8', - useRxJava2: 'false', - library: 'retrofit2', - hideGenerationTimestamp: 'true', - containerDefaultToNull: 'true', - oauth2Implementation: 'none' + dateLibrary : 'java8', + useRxJava2 : 'false', + library : 'retrofit2', + hideGenerationTimestamp: 'true', + containerDefaultToNull : 'true', + oauth2Implementation : 'none' ] generateModelTests = false generateApiTests = false @@ -75,7 +75,7 @@ task buildJavaSdk(type: org.openapitools.generator.gradle.plugin.tasks.GenerateT dependsOn(':fineract-provider:resolve') } -task buildTypescriptAngularSdk(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask){ +task buildTypescriptAngularSdk(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask) { generatorName = 'typescript-angular' verbose = false validateSpec = false @@ -86,16 +86,16 @@ task buildTypescriptAngularSdk(type: org.openapitools.generator.gradle.plugin.ta invokerPackage = 'apache-fineract-client/invoker' modelPackage = 'apache-fineract-client/models' configOptions = [ - apiModulePrefix: 'apacheFineractClient', - configurationPrefix: 'apacheFineractClient', - ngVersion: '12.0.0', - npmName: '@apache/fineract-client', - npmRepository: "${npmRepository}" + apiModulePrefix : 'apacheFineractClient', + configurationPrefix: 'apacheFineractClient', + ngVersion : '12.0.0', + npmName : '@apache/fineract-client', + npmRepository : "${npmRepository}" ] dependsOn(':fineract-provider:resolve') } -task buildAsciidoc(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask){ +task buildAsciidoc(type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask) { generatorName = 'asciidoc' verbose = false validateSpec = false @@ -106,18 +106,18 @@ task buildAsciidoc(type: org.openapitools.generator.gradle.plugin.tasks.Generate invokerPackage = 'org.apache.fineract.client' modelPackage = 'org.apache.fineract.client.models' configOptions = [ - appName: 'Apache Fineract REST API', - appDescription: '''Apache Fineract is a secure, multi-tenanted microfinance platform. + appName : 'Apache Fineract REST API', + appDescription : '''Apache Fineract is a secure, multi-tenanted microfinance platform. The goal of the Apache Fineract API is to empower developers to build apps on top of the Apache Fineract Platform. The https://cui.fineract.dev[reference app] (username: mifos, password: password) works on the same demo tenant as the interactive links in this documentation. Until we complete the new REST API documentation you still have the legacy documentation available https://fineract.apache.org/legacy-docs/apiLive.htm[here]. Please check https://fineract.apache.org/docs/current[the Fineract documentation] for more information.''', - headerAttributes: 'false', - infoEmail: 'dev@fineract.apache.org', - infoUrl: 'https://fineract.apache.org', - licenseInfo: 'Apache 2.0', - licenseUrl: 'http://www.apache.org/licenses/LICENSE-2.0.html', - useMethodAndPath: 'true' + headerAttributes: 'false', + infoEmail : 'dev@fineract.apache.org', + infoUrl : 'https://fineract.apache.org', + licenseInfo : 'Apache 2.0', + licenseUrl : 'http://www.apache.org/licenses/LICENSE-2.0.html', + useMethodAndPath: 'true' ] dependsOn(':fineract-provider:resolve') } @@ -149,7 +149,7 @@ tasks.withType(Jar).configureEach { task cleanupGeneratedJavaFiles() { def tempDir = file("$buildDir/generated/temp-java") def targetDir = file("$buildDir/generated/java") - + inputs.dir(tempDir) outputs.dir(targetDir) @@ -168,10 +168,10 @@ task cleanupGeneratedJavaFiles() { into targetDir filter { line -> line - .replaceAll("import org\\.joda\\.time\\.\\*;", "") - .replaceAll(", \\)", ")") - .replaceAll(", , @HeaderMap", ", @HeaderMap") - .replaceAll("\\(, ", "(") + .replaceAll("import org\\.joda\\.time\\.\\*;", "") + .replaceAll(", \\)", ")") + .replaceAll(", , @HeaderMap", ", @HeaderMap") + .replaceAll("\\(, ", "(") } // Also set duplicates strategy for the copy task duplicatesStrategy = DuplicatesStrategy.EXCLUDE @@ -191,7 +191,7 @@ tasks.named('compileJava') { tasks.named('sourcesJar') { dependsOn(cleanupGeneratedJavaFiles) mustRunAfter(cleanupGeneratedJavaFiles) - + from(sourceSets.main.java.srcDirs) { include "**/*.java" } diff --git a/fineract-client/dependencies.gradle b/fineract-client/dependencies.gradle index aad45729a1e..3ddf3b9243c 100644 --- a/fineract-client/dependencies.gradle +++ b/fineract-client/dependencies.gradle @@ -33,7 +33,7 @@ dependencies { 'com.github.spotbugs:spotbugs-annotations', 'com.squareup.okhttp3:okhttp', 'com.squareup.okhttp3:logging-interceptor', - ) + ) testImplementation 'org.assertj:assertj-core' } diff --git a/fineract-client/src/main/java/org/apache/fineract/client/services/DocumentsApiFixed.java b/fineract-client/src/main/java/org/apache/fineract/client/services/DocumentsApiFixed.java index 6470541775f..f142b2e899a 100644 --- a/fineract-client/src/main/java/org/apache/fineract/client/services/DocumentsApiFixed.java +++ b/fineract-client/src/main/java/org/apache/fineract/client/services/DocumentsApiFixed.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.client.services; import java.util.List; + import okhttp3.ResponseBody; import org.apache.fineract.client.models.DocumentCreateResponse; import org.apache.fineract.client.models.DocumentData; @@ -55,8 +56,8 @@ public interface DocumentsApiFixed { @retrofit2.http.Multipart @POST("v1/{entityType}/{entityId}/documents") Call createDocument(@retrofit2.http.Path("entityType") String entityType, - @retrofit2.http.Path("entityId") Long entityId, @retrofit2.http.Part okhttp3.MultipartBody.Part file, - @retrofit2.http.Part("name") String name, @retrofit2.http.Part("description") String description); + @retrofit2.http.Path("entityId") Long entityId, @retrofit2.http.Part okhttp3.MultipartBody.Part file, + @retrofit2.http.Part("name") String name, @retrofit2.http.Part("description") String description); /** * Remove a Document @@ -71,7 +72,7 @@ Call createDocument(@retrofit2.http.Path("entityType") S */ @DELETE("v1/{entityType}/{entityId}/documents/{documentId}") Call deleteDocument(@retrofit2.http.Path("entityType") String entityType, - @retrofit2.http.Path("entityId") Long entityId, @retrofit2.http.Path("documentId") Long documentId); + @retrofit2.http.Path("entityId") Long entityId, @retrofit2.http.Path("documentId") Long documentId); /** * Retrieve Binary File associated with Document Request used to download the file associated with the document @@ -87,7 +88,7 @@ Call deleteDocument(@retrofit2.http.Path("entityType") S */ @GET("v1/{entityType}/{entityId}/documents/{documentId}/attachment") Call downloadFile(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId, - @retrofit2.http.Path("documentId") Long documentId); + @retrofit2.http.Path("documentId") Long documentId); /** * Retrieve a Document Example Requests: clients/1/documents/1 loans/1/documents/1 @@ -103,7 +104,7 @@ Call downloadFile(@retrofit2.http.Path("entityType") String entity */ @GET("v1/{entityType}/{entityId}/documents/{documentId}") Call getDocument(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId, - @retrofit2.http.Path("documentId") Long documentId); + @retrofit2.http.Path("documentId") Long documentId); /** * List documents Example Requests: clients/1/documents client_identifiers/1/documents @@ -117,7 +118,7 @@ Call getDocument(@retrofit2.http.Path("entityType") String entityT */ @GET("v1/{entityType}/{entityId}/documents") Call> retrieveAllDocuments(@retrofit2.http.Path("entityType") String entityType, - @retrofit2.http.Path("entityId") Long entityId); + @retrofit2.http.Path("entityId") Long entityId); /** * Update a Document Note: A document is updated using a Multi-part form upload Body Parts name Name or summary of @@ -140,8 +141,8 @@ Call> retrieveAllDocuments(@retrofit2.http.Path("entityType") @retrofit2.http.Multipart @PUT("v1/{entityType}/{entityId}/documents/{documentId}") Call updateDocument(@retrofit2.http.Path("entityType") String entityType, - @retrofit2.http.Path("entityId") Long entityId, @retrofit2.http.Path("documentId") Long documentId, - @retrofit2.http.Part okhttp3.MultipartBody.Part file, @retrofit2.http.Part("name") String name, - @retrofit2.http.Part("description") String description); + @retrofit2.http.Path("entityId") Long entityId, @retrofit2.http.Path("documentId") Long documentId, + @retrofit2.http.Part okhttp3.MultipartBody.Part file, @retrofit2.http.Part("name") String name, + @retrofit2.http.Part("description") String description); } diff --git a/fineract-client/src/main/java/org/apache/fineract/client/services/ImagesApi.java b/fineract-client/src/main/java/org/apache/fineract/client/services/ImagesApi.java index a7f05d65b51..957e6526f54 100644 --- a/fineract-client/src/main/java/org/apache/fineract/client/services/ImagesApi.java +++ b/fineract-client/src/main/java/org/apache/fineract/client/services/ImagesApi.java @@ -6,9 +6,9 @@ * 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 @@ -39,17 +39,17 @@ public interface ImagesApi { @POST("v1/{entityType}/{entityId}/images") @retrofit2.http.Multipart Call create(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId, - @retrofit2.http.Part okhttp3.MultipartBody.Part file); + @retrofit2.http.Part okhttp3.MultipartBody.Part file); @GET("v1/{entityType}/{entityId}/images") Call get(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId, - @retrofit2.http.Query("maxWidth") Integer maxWidth, @retrofit2.http.Query("maxHeight") Integer maxHeight, - @retrofit2.http.Query("output") String output); + @retrofit2.http.Query("maxWidth") Integer maxWidth, @retrofit2.http.Query("maxHeight") Integer maxHeight, + @retrofit2.http.Query("output") String output); @PUT("v1/{entityType}/{entityId}/images") @retrofit2.http.Multipart Call update(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId, - @retrofit2.http.Part okhttp3.MultipartBody.Part file); + @retrofit2.http.Part okhttp3.MultipartBody.Part file); @DELETE("v1/{entityType}/{entityId}/images") Call delete(@retrofit2.http.Path("entityType") String entityType, @retrofit2.http.Path("entityId") Long entityId); diff --git a/fineract-client/src/main/java/org/apache/fineract/client/services/RunReportsApi.java b/fineract-client/src/main/java/org/apache/fineract/client/services/RunReportsApi.java index e45f8c7ad72..850d2a0c1e9 100644 --- a/fineract-client/src/main/java/org/apache/fineract/client/services/RunReportsApi.java +++ b/fineract-client/src/main/java/org/apache/fineract/client/services/RunReportsApi.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.client.services; import java.util.Map; + import okhttp3.ResponseBody; import org.apache.fineract.client.models.RunReportsResponse; import retrofit2.Call; @@ -51,7 +52,7 @@ public interface RunReportsApi { */ @GET("v1/runreports/{reportName}") Call runReportGetData(@retrofit2.http.Path("reportName") String reportName, - @QueryMap Map parameters); + @QueryMap Map parameters); /** * Run Report which returns a response such as a PDF, CSV, XLS or XSLX file. diff --git a/fineract-client/src/main/java/org/apache/fineract/client/util/CallFailedRuntimeException.java b/fineract-client/src/main/java/org/apache/fineract/client/util/CallFailedRuntimeException.java index eb77e570ac6..83246b85466 100644 --- a/fineract-client/src/main/java/org/apache/fineract/client/util/CallFailedRuntimeException.java +++ b/fineract-client/src/main/java/org/apache/fineract/client/util/CallFailedRuntimeException.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.client.util; import java.io.IOException; + import lombok.extern.slf4j.Slf4j; import retrofit2.Call; import retrofit2.Response; diff --git a/fineract-client/src/main/java/org/apache/fineract/client/util/Calls.java b/fineract-client/src/main/java/org/apache/fineract/client/util/Calls.java index 79d9e08c9fb..16802066314 100644 --- a/fineract-client/src/main/java/org/apache/fineract/client/util/Calls.java +++ b/fineract-client/src/main/java/org/apache/fineract/client/util/Calls.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.client.util; import java.io.IOException; + import retrofit2.Call; import retrofit2.Response; @@ -29,7 +30,8 @@ */ public final class Calls { - private Calls() {} + private Calls() { + } /** * Execute a Call, expecting success, returning strongly typed body. This covers the most typical use and is thus diff --git a/fineract-client/src/main/java/org/apache/fineract/client/util/FineractClient.java b/fineract-client/src/main/java/org/apache/fineract/client/util/FineractClient.java index e13ae0f2911..2657335e752 100644 --- a/fineract-client/src/main/java/org/apache/fineract/client/util/FineractClient.java +++ b/fineract-client/src/main/java/org/apache/fineract/client/util/FineractClient.java @@ -6,9 +6,9 @@ * 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 @@ -29,6 +29,7 @@ import javax.net.ssl.SSLSocketFactory; import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; + import okhttp3.HttpUrl; import okhttp3.OkHttpClient; import okhttp3.logging.HttpLoggingInterceptor; @@ -441,7 +442,8 @@ public static final class Builder { private String username; private String password; - private Builder() {} + private Builder() { + } public Builder baseURL(String baseURL) { this.baseURL = baseURL; @@ -489,20 +491,22 @@ public Builder insecure(boolean insecure) { X509TrustManager insecureX509TrustManager = new X509TrustManager() { @Override - public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {}// NOSONAR + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { + }// NOSONAR @Override - public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {}// NOSONAR + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { + }// NOSONAR @Override public X509Certificate[] getAcceptedIssuers() { - return new X509Certificate[] {}; + return new X509Certificate[]{}; } }; // TODO "SSL" or "TLS" as in hooks.processor.ProcessorHelper? SSLContext sslContext = SSLContext.getInstance("SSL");// NOSONAR - sslContext.init(null, new TrustManager[] { insecureX509TrustManager }, new SecureRandom()); + sslContext.init(null, new TrustManager[]{insecureX509TrustManager}, new SecureRandom()); SSLSocketFactory insecureSslSocketFactory = sslContext.getSocketFactory(); okBuilder.sslSocketFactory(insecureSslSocketFactory, insecureX509TrustManager); diff --git a/fineract-client/src/main/java/org/apache/fineract/client/util/JSON.java b/fineract-client/src/main/java/org/apache/fineract/client/util/JSON.java index b4699e34a25..6686c263089 100644 --- a/fineract-client/src/main/java/org/apache/fineract/client/util/JSON.java +++ b/fineract-client/src/main/java/org/apache/fineract/client/util/JSON.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import com.google.gson.stream.JsonToken; import com.google.gson.stream.JsonWriter; import io.gsonfire.GsonFireBuilder; + import java.io.IOException; import java.lang.annotation.Annotation; import java.lang.reflect.Type; @@ -37,6 +38,7 @@ import java.time.format.DateTimeFormatter; import java.util.Date; import java.util.Objects; + import lombok.Getter; import okhttp3.RequestBody; import okhttp3.ResponseBody; @@ -294,7 +296,7 @@ private GsonCustomConverterFactory(Gson gson) { @Override public Converter requestBodyConverter(Type type, Annotation[] parameterAnnotations, Annotation[] methodAnnotations, - Retrofit retrofit) { + Retrofit retrofit) { return gsonConverterFactory.requestBodyConverter(type, parameterAnnotations, methodAnnotations, retrofit); } } diff --git a/fineract-client/src/main/java/org/apache/fineract/client/util/Parts.java b/fineract-client/src/main/java/org/apache/fineract/client/util/Parts.java index 8cea0a15c07..ce231ec8f33 100644 --- a/fineract-client/src/main/java/org/apache/fineract/client/util/Parts.java +++ b/fineract-client/src/main/java/org/apache/fineract/client/util/Parts.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.File; import java.util.Optional; + import okhttp3.MediaType; import okhttp3.MultipartBody.Part; import okhttp3.RequestBody; @@ -39,7 +40,8 @@ */ public final class Parts { - private Parts() {} + private Parts() { + } public static Part fromFile(File file) { RequestBody rb = RequestBody.create(file, mediaType(file.getName())); diff --git a/fineract-client/src/main/java/org/apache/fineract/client/util/adapter/ExternalIdAdapter.java b/fineract-client/src/main/java/org/apache/fineract/client/util/adapter/ExternalIdAdapter.java index 284c7f69cc3..301b572e40b 100644 --- a/fineract-client/src/main/java/org/apache/fineract/client/util/adapter/ExternalIdAdapter.java +++ b/fineract-client/src/main/java/org/apache/fineract/client/util/adapter/ExternalIdAdapter.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; + import java.io.IOException; + import org.apache.fineract.client.models.ExternalId; public class ExternalIdAdapter extends TypeAdapter { diff --git a/fineract-client/src/test/java/org/apache/fineract/client/test/FineractClientDemo.java b/fineract-client/src/test/java/org/apache/fineract/client/test/FineractClientDemo.java index 93676262e94..dc9181fd1b7 100644 --- a/fineract-client/src/test/java/org/apache/fineract/client/test/FineractClientDemo.java +++ b/fineract-client/src/test/java/org/apache/fineract/client/test/FineractClientDemo.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.client.test; import java.util.List; + import org.apache.fineract.client.models.StaffData; import org.apache.fineract.client.util.Calls; import org.apache.fineract.client.util.FineractClient; diff --git a/fineract-client/src/test/java/org/apache/fineract/client/test/FineractClientTechnicalTest.java b/fineract-client/src/test/java/org/apache/fineract/client/test/FineractClientTechnicalTest.java index 5e63c3a0e17..a05f75f9101 100644 --- a/fineract-client/src/test/java/org/apache/fineract/client/test/FineractClientTechnicalTest.java +++ b/fineract-client/src/test/java/org/apache/fineract/client/test/FineractClientTechnicalTest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-client/src/test/java/org/apache/fineract/client/util/PartsTest.java b/fineract-client/src/test/java/org/apache/fineract/client/util/PartsTest.java index e3adb92ca88..531093a5014 100644 --- a/fineract-client/src/test/java/org/apache/fineract/client/util/PartsTest.java +++ b/fineract-client/src/test/java/org/apache/fineract/client/util/PartsTest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-client/src/test/resources/cucumber.properties b/fineract-client/src/test/resources/cucumber.properties index a745f74406f..00f1d10cfda 100644 --- a/fineract-client/src/test/resources/cucumber.properties +++ b/fineract-client/src/test/resources/cucumber.properties @@ -16,6 +16,5 @@ # specific language governing permissions and limitations # under the License. # - cucumber.publish.quiet=true cucumber.glue=org.apache.fineract diff --git a/fineract-cob/build.gradle b/fineract-cob/build.gradle index 35b92ce025d..efd59d6a4b4 100644 --- a/fineract-cob/build.gradle +++ b/fineract-cob/build.gradle @@ -53,9 +53,9 @@ compileJava { // https://github.com/andygoossens/gradle-modernizer-plugin modernizer { ignoreClassNamePatterns = [ - '.*AbstractPersistableCustom', - '.*EntityTables', - '.*domain.*' + '.*AbstractPersistableCustom', + '.*EntityTables', + '.*domain.*' ] } diff --git a/fineract-cob/dependencies.gradle b/fineract-cob/dependencies.gradle index 1da8d686091..31dcd1f1fdd 100644 --- a/fineract-cob/dependencies.gradle +++ b/fineract-cob/dependencies.gradle @@ -57,8 +57,8 @@ dependencies { 'io.github.resilience4j:resilience4j-spring-boot3', 'org.apache.httpcomponents:httpcore', - ) - implementation ('org.springframework.boot:spring-boot-starter-data-jpa') { + ) + implementation('org.springframework.boot:spring-boot-starter-data-jpa') { exclude group: 'org.hibernate' } implementation('org.eclipse.persistence:org.eclipse.persistence.jpa') { @@ -73,10 +73,10 @@ dependencies { implementation('org.dom4j:dom4j') { exclude group: 'javax.xml.bind' } - implementation ('jakarta.xml.bind:jakarta.xml.bind-api') { + implementation('jakarta.xml.bind:jakarta.xml.bind-api') { exclude group: 'jakarta.activation' } - implementation ('org.springframework.boot:spring-boot-starter-data-jpa') { + implementation('org.springframework.boot:spring-boot-starter-data-jpa') { exclude group: 'org.hibernate' } implementation('org.eclipse.persistence:org.eclipse.persistence.jpa') { @@ -91,7 +91,7 @@ dependencies { // Although fineract (at the time of writing) doesn't have any compile time dep. on httpclient, // it's useful to have this for the Spring Boot TestRestTemplate http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-rest-templates-test-utility 'org.apache.httpcomponents:httpclient' - ) + ) compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' @@ -107,25 +107,25 @@ dependencies { // testCompile dependencies are ONLY used in src/test, not src/main. // Do NOT repeat dependencies which are ALREADY in implementation or runtimeOnly! // - testImplementation( 'io.github.classgraph:classgraph') - testImplementation ('org.springframework.boot:spring-boot-starter-test') { + testImplementation('io.github.classgraph:classgraph') + testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'com.jayway.jsonpath', module: 'json-path' exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' exclude group: 'jakarta.activation' exclude group: 'javax.activation' exclude group: 'org.skyscreamer' } - implementation ('org.mnode.ical4j:ical4j') { + implementation('org.mnode.ical4j:ical4j') { exclude group: 'commons-logging' exclude group: 'javax.activation' exclude group: 'com.sun.mail', module: 'javax.mail' } - implementation ('org.quartz-scheduler:quartz') { + implementation('org.quartz-scheduler:quartz') { exclude group: 'com.zaxxer', module: 'HikariCP-java7' } - testImplementation ('org.mockito:mockito-inline') + testImplementation('org.mockito:mockito-inline') implementation('org.apache.avro:avro') implementation( project(path: ':fineract-avro-schemas') - ) + ) } diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/COBBusinessStep.java b/fineract-cob/src/main/java/org/apache/fineract/cob/COBBusinessStep.java index 2d0cea7d4cb..bfa93b6100a 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/COBBusinessStep.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/COBBusinessStep.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/COBBusinessStepService.java b/fineract-cob/src/main/java/org/apache/fineract/cob/COBBusinessStepService.java index 2b815260cbd..0b55d91466d 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/COBBusinessStepService.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/COBBusinessStepService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Set; import java.util.TreeMap; + import org.apache.fineract.cob.data.BusinessStepNameAndOrder; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.springframework.lang.NonNull; diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/COBBusinessStepServiceImpl.java b/fineract-cob/src/main/java/org/apache/fineract/cob/COBBusinessStepServiceImpl.java index 61aadf26b15..c2206e4acdf 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/COBBusinessStepServiceImpl.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/COBBusinessStepServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.Optional; import java.util.Set; import java.util.TreeMap; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.cob.data.BusinessStepNameAndOrder; @@ -54,7 +55,7 @@ public class COBBusinessStepServiceImpl implements COBBusinessStepService { private final ReloaderService reloaderService; - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings({"unchecked"}) @Override public , S extends AbstractPersistableCustom> S run(TreeMap executionMap, S item) { if (executionMap == null || executionMap.isEmpty()) { diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/COBConstant.java b/fineract-cob/src/main/java/org/apache/fineract/cob/COBConstant.java index 8af61de5a03..74de4864a31 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/COBConstant.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/COBConstant.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/common/CommonPartitioner.java b/fineract-cob/src/main/java/org/apache/fineract/cob/common/CommonPartitioner.java index 5d27f3973d7..6954dd7becc 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/common/CommonPartitioner.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/common/CommonPartitioner.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.Map; import java.util.Set; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.cob.COBConstant; @@ -78,7 +79,7 @@ private long getLoanCount(List loanCOBPartitions) { } private ExecutionContext createExecutionContextForPartition(Set cobBusinessSteps, - COBPartition loanCOBPartition, LocalDate businessDate, boolean isCatchUp) { + COBPartition loanCOBPartition, LocalDate businessDate, boolean isCatchUp) { ExecutionContext executionContext = new ExecutionContext(); executionContext.put(COBConstant.BUSINESS_STEPS, cobBusinessSteps); executionContext.put(COBConstant.COB_PARAMETER, new COBParameter(loanCOBPartition.getMinId(), loanCOBPartition.getMaxId())); diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/common/CustomJobParameterResolver.java b/fineract-cob/src/main/java/org/apache/fineract/cob/common/CustomJobParameterResolver.java index 06328b14614..b81d14a52ae 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/common/CustomJobParameterResolver.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/common/CustomJobParameterResolver.java @@ -6,9 +6,9 @@ * 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 @@ -20,12 +20,14 @@ import com.google.common.reflect.TypeToken; import com.google.gson.Gson; + import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Optional; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.cob.exceptions.CustomJobParameterNotFoundException; import org.apache.fineract.infrastructure.core.serialization.GoogleGsonSerializerHelper; @@ -48,7 +50,7 @@ public class CustomJobParameterResolver { protected Gson gson = GoogleGsonSerializerHelper.createSimpleGson(); public void resolve(StepContribution contribution, ChunkContext chunkContext, String customJobParameterKey, - String parameterNameInExecutionContext) { + String parameterNameInExecutionContext) { Set jobParameterDTOList = getCustomJobParameterSet(chunkContext.getStepContext().getStepExecution()) .orElseThrow(() -> new CustomJobParameterNotFoundException(SpringBatchJobConstants.CUSTOM_JOB_PARAMETER_ID_KEY)); JobParameterDTO businessDateParameter = jobParameterDTOList.stream() @@ -67,7 +69,8 @@ public void resolve(StepContribution contribution, ChunkContext chunkContext, St public Optional> getCustomJobParameterSet(StepExecution stepExecution) { Long customJobParameterId = (Long) getJobParameters(stepExecution).get(SpringBatchJobConstants.CUSTOM_JOB_PARAMETER_ID_KEY); return customJobParameterRepository.findById(customJobParameterId).map(CustomJobParameter::getParameterJson) - .map(json -> gson.fromJson(json, new TypeToken>() {}.getType())); + .map(json -> gson.fromJson(json, new TypeToken>() { + }.getType())); } public Optional getCustomJobParameterById(StepExecution stepExecution, String key) { diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/common/ResetContextTasklet.java b/fineract-cob/src/main/java/org/apache/fineract/cob/common/ResetContextTasklet.java index bf2f9f90634..29230155486 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/common/ResetContextTasklet.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/common/ResetContextTasklet.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/conditions/BatchManagerCondition.java b/fineract-cob/src/main/java/org/apache/fineract/cob/conditions/BatchManagerCondition.java index 8f2ea5ca6d5..3945c3ae1d1 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/conditions/BatchManagerCondition.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/conditions/BatchManagerCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/conditions/BatchWorkerCondition.java b/fineract-cob/src/main/java/org/apache/fineract/cob/conditions/BatchWorkerCondition.java index 919798e636d..cf527238503 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/conditions/BatchWorkerCondition.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/conditions/BatchWorkerCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/converter/COBParameterConverter.java b/fineract-cob/src/main/java/org/apache/fineract/cob/converter/COBParameterConverter.java index 652d50bbee3..553228de005 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/converter/COBParameterConverter.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/converter/COBParameterConverter.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,8 @@ public final class COBParameterConverter { - private COBParameterConverter() {} + private COBParameterConverter() { + } public static COBParameter convert(Object obj) { if (obj instanceof COBParameter) { diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/data/BusinessStep.java b/fineract-cob/src/main/java/org/apache/fineract/cob/data/BusinessStep.java index 17e9d6ca1d0..9a6dd6f9c89 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/data/BusinessStep.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/data/BusinessStep.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/data/BusinessStepDetail.java b/fineract-cob/src/main/java/org/apache/fineract/cob/data/BusinessStepDetail.java index 4a3fbd855ce..0245219c654 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/data/BusinessStepDetail.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/data/BusinessStepDetail.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/data/BusinessStepNameAndOrder.java b/fineract-cob/src/main/java/org/apache/fineract/cob/data/BusinessStepNameAndOrder.java index ddad257e18b..4d9683fd116 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/data/BusinessStepNameAndOrder.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/data/BusinessStepNameAndOrder.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.cob.data; import com.fasterxml.jackson.annotation.JsonTypeInfo; + import java.util.Map; import java.util.Set; import java.util.TreeMap; import java.util.stream.Collectors; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/data/COBIdAndExternalIdAndAccountNo.java b/fineract-cob/src/main/java/org/apache/fineract/cob/data/COBIdAndExternalIdAndAccountNo.java index dc1cd1bb8ab..ed034056a3a 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/data/COBIdAndExternalIdAndAccountNo.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/data/COBIdAndExternalIdAndAccountNo.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/data/COBIdAndLastClosedBusinessDate.java b/fineract-cob/src/main/java/org/apache/fineract/cob/data/COBIdAndLastClosedBusinessDate.java index 534902a0e56..aa397020940 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/data/COBIdAndLastClosedBusinessDate.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/data/COBIdAndLastClosedBusinessDate.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/data/COBParameter.java b/fineract-cob/src/main/java/org/apache/fineract/cob/data/COBParameter.java index 2d44f55b1ca..258ccf96613 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/data/COBParameter.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/data/COBParameter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/data/COBPartition.java b/fineract-cob/src/main/java/org/apache/fineract/cob/data/COBPartition.java index 863d2b1d7ca..90bc926ea28 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/data/COBPartition.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/data/COBPartition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/data/ConfiguredJobNamesDTO.java b/fineract-cob/src/main/java/org/apache/fineract/cob/data/ConfiguredJobNamesDTO.java index 60951f98a2d..0c4fa2e029e 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/data/ConfiguredJobNamesDTO.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/data/ConfiguredJobNamesDTO.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.data; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Data; diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/data/IsCatchUpRunningDTO.java b/fineract-cob/src/main/java/org/apache/fineract/cob/data/IsCatchUpRunningDTO.java index cef50f56a0f..d51f1198919 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/data/IsCatchUpRunningDTO.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/data/IsCatchUpRunningDTO.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.data; import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.Data; diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/data/JobBusinessStepConfigData.java b/fineract-cob/src/main/java/org/apache/fineract/cob/data/JobBusinessStepConfigData.java index 65c80359656..9dc92b537f7 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/data/JobBusinessStepConfigData.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/data/JobBusinessStepConfigData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.data; import java.util.List; + import lombok.Data; @Data diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/data/JobBusinessStepDetail.java b/fineract-cob/src/main/java/org/apache/fineract/cob/data/JobBusinessStepDetail.java index c77c73f92e7..7132620ecb8 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/data/JobBusinessStepDetail.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/data/JobBusinessStepDetail.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.data; import java.util.List; + import lombok.Data; @Data diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/data/LoanCOBParameter.java b/fineract-cob/src/main/java/org/apache/fineract/cob/data/LoanCOBParameter.java index 6c9d7eb6d9a..e05b857c818 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/data/LoanCOBParameter.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/data/LoanCOBParameter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/data/LoanDataForExternalTransfer.java b/fineract-cob/src/main/java/org/apache/fineract/cob/data/LoanDataForExternalTransfer.java index 4913293c2e7..04615929cd3 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/data/LoanDataForExternalTransfer.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/data/LoanDataForExternalTransfer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/data/OldestCOBProcessedLoanDTO.java b/fineract-cob/src/main/java/org/apache/fineract/cob/data/OldestCOBProcessedLoanDTO.java index 9ec72367c94..b31979e90d8 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/data/OldestCOBProcessedLoanDTO.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/data/OldestCOBProcessedLoanDTO.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import lombok.Data; @Data diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/domain/AbstractLockingService.java b/fineract-cob/src/main/java/org/apache/fineract/cob/domain/AbstractLockingService.java index 3fdfab8c177..9f4003cd23b 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/domain/AbstractLockingService.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/domain/AbstractLockingService.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.PreparedStatement; import java.time.LocalDate; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.businessdate.domain.BusinessDateType; diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/domain/AccountLock.java b/fineract-cob/src/main/java/org/apache/fineract/cob/domain/AccountLock.java index 2b563a3e84e..bb25abd9cd6 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/domain/AccountLock.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/domain/AccountLock.java @@ -6,9 +6,9 @@ * 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 @@ -27,10 +27,12 @@ import jakarta.persistence.PrePersist; import jakarta.persistence.Transient; import jakarta.persistence.Version; + import java.io.Serial; import java.io.Serializable; import java.time.LocalDate; import java.time.OffsetDateTime; + import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/domain/AccountLockRepository.java b/fineract-cob/src/main/java/org/apache/fineract/cob/domain/AccountLockRepository.java index 9d1a34dd7b4..4bea4443f82 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/domain/AccountLockRepository.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/domain/AccountLockRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Optional; + import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.repository.NoRepositoryBean; diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/domain/BatchBusinessStep.java b/fineract-cob/src/main/java/org/apache/fineract/cob/domain/BatchBusinessStep.java index f3d95f7e216..17a35fcb5af 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/domain/BatchBusinessStep.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/domain/BatchBusinessStep.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/domain/BatchBusinessStepRepository.java b/fineract-cob/src/main/java/org/apache/fineract/cob/domain/BatchBusinessStepRepository.java index 014c9216293..6e9d4a135e3 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/domain/BatchBusinessStepRepository.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/domain/BatchBusinessStepRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/domain/CustomLoanAccountLockRepository.java b/fineract-cob/src/main/java/org/apache/fineract/cob/domain/CustomLoanAccountLockRepository.java index ba5d8ed4f4a..65d464173f6 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/domain/CustomLoanAccountLockRepository.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/domain/CustomLoanAccountLockRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/domain/LockOwner.java b/fineract-cob/src/main/java/org/apache/fineract/cob/domain/LockOwner.java index f042f31df32..983a37380b7 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/domain/LockOwner.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/domain/LockOwner.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/domain/LockingService.java b/fineract-cob/src/main/java/org/apache/fineract/cob/domain/LockingService.java index 7b2e12ec066..8513614b25a 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/domain/LockingService.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/domain/LockingService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/AccountLockCannotBeOverruledException.java b/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/AccountLockCannotBeOverruledException.java index 16ab50e68cd..0ed92f5af3f 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/AccountLockCannotBeOverruledException.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/AccountLockCannotBeOverruledException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/BusinessStepException.java b/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/BusinessStepException.java index a11a5c57aca..a0b9007ef90 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/BusinessStepException.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/BusinessStepException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/BusinessStepNotBelongsToJobException.java b/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/BusinessStepNotBelongsToJobException.java index 34854bd3070..117e303278d 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/BusinessStepNotBelongsToJobException.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/BusinessStepNotBelongsToJobException.java @@ -6,9 +6,9 @@ * 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 @@ -18,4 +18,5 @@ */ package org.apache.fineract.cob.exceptions; -public class BusinessStepNotBelongsToJobException extends RuntimeException {} +public class BusinessStepNotBelongsToJobException extends RuntimeException { +} diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/CustomJobParameterNotFoundException.java b/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/CustomJobParameterNotFoundException.java index 812f0f33d10..f5017ff6c04 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/CustomJobParameterNotFoundException.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/CustomJobParameterNotFoundException.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,7 @@ public class CustomJobParameterNotFoundException extends AbstractPlatformResourceNotFoundException { public CustomJobParameterNotFoundException(String globalisationMessageCode, String defaultUserMessage, - Object... defaultUserMessageArgs) { + Object... defaultUserMessageArgs) { super(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs); } diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/LockCannotBeAppliedException.java b/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/LockCannotBeAppliedException.java index aac761ce49e..827dc9ad319 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/LockCannotBeAppliedException.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/LockCannotBeAppliedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/LockedReadException.java b/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/LockedReadException.java index 6a94b8c24a1..50872a0bdff 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/LockedReadException.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/exceptions/LockedReadException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/listener/AbstractLoanItemListener.java b/fineract-cob/src/main/java/org/apache/fineract/cob/listener/AbstractLoanItemListener.java index 34e44f9292d..9034b97b729 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/listener/AbstractLoanItemListener.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/listener/AbstractLoanItemListener.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static org.springframework.transaction.TransactionDefinition.PROPAGATION_REQUIRES_NEW; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.cob.domain.AccountLock; diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/listener/COBExecutionListenerRunner.java b/fineract-cob/src/main/java/org/apache/fineract/cob/listener/COBExecutionListenerRunner.java index 998da6e0e39..79006f7ccc0 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/listener/COBExecutionListenerRunner.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/listener/COBExecutionListenerRunner.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.cob.listener; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.util.ArrayList; import java.util.Arrays; import java.util.List; + import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.JobExecutionListener; import org.springframework.context.ApplicationContext; @@ -31,7 +33,7 @@ public class COBExecutionListenerRunner implements JobExecutionListener { private final List beforeJobListeners = new ArrayList<>(); private final List afterJobListeners = new ArrayList<>(); - @SuppressFBWarnings({ "CT_CONSTRUCTOR_THROW" }) + @SuppressFBWarnings({"CT_CONSTRUCTOR_THROW"}) public COBExecutionListenerRunner(ApplicationContext applicationContext, String jobName) { addBeforeListeners(applicationContext, jobName); addAfterListeners(applicationContext, jobName); diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/listener/FineractCOBAfterJobListener.java b/fineract-cob/src/main/java/org/apache/fineract/cob/listener/FineractCOBAfterJobListener.java index feb7cf319e2..46fd6d90eea 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/listener/FineractCOBAfterJobListener.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/listener/FineractCOBAfterJobListener.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/listener/FineractCOBBeforeJobListener.java b/fineract-cob/src/main/java/org/apache/fineract/cob/listener/FineractCOBBeforeJobListener.java index 4261b05f882..34a71339b8b 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/listener/FineractCOBBeforeJobListener.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/listener/FineractCOBBeforeJobListener.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/listener/JobExecutionContextCopyListener.java b/fineract-cob/src/main/java/org/apache/fineract/cob/listener/JobExecutionContextCopyListener.java index 021ff8884f1..c71eebf8b65 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/listener/JobExecutionContextCopyListener.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/listener/JobExecutionContextCopyListener.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.listener; import java.util.List; + import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.BooleanUtils; import org.springframework.batch.core.StepExecution; diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/processor/AbstractItemProcessor.java b/fineract-cob/src/main/java/org/apache/fineract/cob/processor/AbstractItemProcessor.java index 9efdeb1d7e9..ce84dd70264 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/processor/AbstractItemProcessor.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/processor/AbstractItemProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.LocalDate; import java.util.Set; import java.util.TreeMap; + import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Setter; @@ -48,7 +49,7 @@ public abstract class AbstractItemProcessor businessSteps = (Set) executionContext.get("businessSteps"); diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/resolver/BusinessDateResolver.java b/fineract-cob/src/main/java/org/apache/fineract/cob/resolver/BusinessDateResolver.java index 7b57f89407e..1464226a736 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/resolver/BusinessDateResolver.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/resolver/BusinessDateResolver.java @@ -6,9 +6,9 @@ * 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 @@ -19,12 +19,14 @@ package org.apache.fineract.cob.resolver; import java.time.LocalDate; + import org.apache.fineract.cob.COBConstant; import org.springframework.batch.core.StepExecution; public final class BusinessDateResolver { - private BusinessDateResolver() {} + private BusinessDateResolver() { + } public static LocalDate resolve(StepExecution stepExecution) { Object bd = stepExecution.getJobExecution().getExecutionContext().get(COBConstant.BUSINESS_DATE_PARAMETER_NAME); diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/resolver/CatchUpFlagResolver.java b/fineract-cob/src/main/java/org/apache/fineract/cob/resolver/CatchUpFlagResolver.java index 6ddf59df585..af26713e2e1 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/resolver/CatchUpFlagResolver.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/resolver/CatchUpFlagResolver.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,8 @@ public final class CatchUpFlagResolver { - private CatchUpFlagResolver() {} + private CatchUpFlagResolver() { + } public static boolean resolve(StepExecution stepExecution) { Object isCatchUp = stepExecution.getJobExecution().getExecutionContext().get(COBConstant.IS_CATCH_UP_PARAMETER_NAME); diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/service/AbstractAccountLockService.java b/fineract-cob/src/main/java/org/apache/fineract/cob/service/AbstractAccountLockService.java index 29d5aa8a531..b912296afae 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/service/AbstractAccountLockService.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/service/AbstractAccountLockService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.service; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.cob.domain.AccountLock; import org.apache.fineract.cob.domain.AccountLockRepository; diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/service/AccountLockService.java b/fineract-cob/src/main/java/org/apache/fineract/cob/service/AccountLockService.java index 4f55670ac2f..41c4bf0bb6d 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/service/AccountLockService.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/service/AccountLockService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.service; import java.util.List; + import org.apache.fineract.cob.domain.AccountLock; public interface AccountLockService { diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/service/BeforeStepLockingItemReaderHelper.java b/fineract-cob/src/main/java/org/apache/fineract/cob/service/BeforeStepLockingItemReaderHelper.java index eacb0cfb06b..f7c89b29789 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/service/BeforeStepLockingItemReaderHelper.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/service/BeforeStepLockingItemReaderHelper.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.List; import java.util.Objects; import java.util.concurrent.LinkedBlockingQueue; + import lombok.RequiredArgsConstructor; import org.apache.fineract.cob.COBConstant; import org.apache.fineract.cob.converter.COBParameterConverter; @@ -41,7 +42,7 @@ public class BeforeStepLockingItemReaderHelper { private final RetrieveIdService retrieveIdService; private final LockingService loanLockingService; - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings({"unchecked"}) public LinkedBlockingQueue filterRemainingData(@NonNull StepExecution stepExecution) { ExecutionContext executionContext = stepExecution.getExecutionContext(); COBParameter loanCOBParameter = COBParameterConverter.convert(executionContext.get(COBConstant.COB_PARAMETER)); diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepCategory.java b/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepCategory.java index e9464632a5d..15ce7f2aa54 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepCategory.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepCategory.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepCategoryService.java b/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepCategoryService.java index 247e46af9e7..ff1ce63ef52 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepCategoryService.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepCategoryService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepConfigDataParser.java b/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepConfigDataParser.java index 9c9a7b71328..0691a5f7fa0 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepConfigDataParser.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepConfigDataParser.java @@ -6,9 +6,9 @@ * 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 @@ -21,8 +21,10 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.util.ArrayList; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.cob.data.BusinessStep; diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepConfigUpdateHandler.java b/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepConfigUpdateHandler.java index b2922369c4c..c58eb0d5cfb 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepConfigUpdateHandler.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/service/BusinessStepConfigUpdateHandler.java @@ -6,9 +6,9 @@ * 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 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..a18d44a7e98 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 @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.service; import java.util.List; + import org.apache.fineract.cob.data.BusinessStep; import org.apache.fineract.cob.domain.BatchBusinessStep; import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/service/ConfigJobParameterService.java b/fineract-cob/src/main/java/org/apache/fineract/cob/service/ConfigJobParameterService.java index b40c16e1fe5..d9a5c531d13 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/service/ConfigJobParameterService.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/service/ConfigJobParameterService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.service; import java.util.List; + import org.apache.fineract.cob.data.JobBusinessStepConfigData; import org.apache.fineract.cob.data.JobBusinessStepDetail; import org.apache.fineract.infrastructure.core.api.JsonCommand; diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/service/ConfigJobParameterServiceImpl.java b/fineract-cob/src/main/java/org/apache/fineract/cob/service/ConfigJobParameterServiceImpl.java index 544e438bbf8..cad6b167a91 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/service/ConfigJobParameterServiceImpl.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/service/ConfigJobParameterServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.cob.COBBusinessStep; import org.apache.fineract.cob.data.BusinessStep; diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/service/ReloadService.java b/fineract-cob/src/main/java/org/apache/fineract/cob/service/ReloadService.java index 007d7735003..735096bdff0 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/service/ReloadService.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/service/ReloadService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/service/ReloaderService.java b/fineract-cob/src/main/java/org/apache/fineract/cob/service/ReloaderService.java index a8579cb9376..adca37c51aa 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/service/ReloaderService.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/service/ReloaderService.java @@ -6,9 +6,9 @@ * 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 @@ -19,13 +19,14 @@ package org.apache.fineract.cob.service; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.springframework.stereotype.Component; @Component @RequiredArgsConstructor -@SuppressWarnings({ "unchecked", "rawtypes" }) +@SuppressWarnings({"unchecked", "rawtypes"}) public class ReloaderService { private final List reloadServices; diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/service/RetrieveIdService.java b/fineract-cob/src/main/java/org/apache/fineract/cob/service/RetrieveIdService.java index a934a161c3e..7a213cf3106 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/service/RetrieveIdService.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/service/RetrieveIdService.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.sql.SQLException; import java.time.LocalDate; import java.util.List; + import org.apache.fineract.cob.data.COBIdAndExternalIdAndAccountNo; import org.apache.fineract.cob.data.COBIdAndLastClosedBusinessDate; import org.apache.fineract.cob.data.COBParameter; diff --git a/fineract-cob/src/main/java/org/apache/fineract/cob/tasklet/ApplyCommonLockTasklet.java b/fineract-cob/src/main/java/org/apache/fineract/cob/tasklet/ApplyCommonLockTasklet.java index 3d3b1afec4b..228012bf825 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/cob/tasklet/ApplyCommonLockTasklet.java +++ b/fineract-cob/src/main/java/org/apache/fineract/cob/tasklet/ApplyCommonLockTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -22,10 +22,12 @@ import com.google.common.collect.Lists; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Objects; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.cob.converter.COBParameterConverter; diff --git a/fineract-cob/src/main/java/org/apache/fineract/core/exceptionmapper/BusinessStepExceptionMapper.java b/fineract-cob/src/main/java/org/apache/fineract/core/exceptionmapper/BusinessStepExceptionMapper.java index c31df0ff67e..bcb092140f1 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/core/exceptionmapper/BusinessStepExceptionMapper.java +++ b/fineract-cob/src/main/java/org/apache/fineract/core/exceptionmapper/BusinessStepExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/java/org/apache/fineract/core/exceptionmapper/BusinessStepNotBelongsToJobExceptionMapper.java b/fineract-cob/src/main/java/org/apache/fineract/core/exceptionmapper/BusinessStepNotBelongsToJobExceptionMapper.java index b2173399d7f..94e4005c9d4 100644 --- a/fineract-cob/src/main/java/org/apache/fineract/core/exceptionmapper/BusinessStepNotBelongsToJobExceptionMapper.java +++ b/fineract-cob/src/main/java/org/apache/fineract/core/exceptionmapper/BusinessStepNotBelongsToJobExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-cob/src/main/resources/jpa/static-weaving/module/fineract-cob/persistence.xml b/fineract-cob/src/main/resources/jpa/static-weaving/module/fineract-cob/persistence.xml index 0925d1bfc8f..5c4aa47b201 100644 --- a/fineract-cob/src/main/resources/jpa/static-weaving/module/fineract-cob/persistence.xml +++ b/fineract-cob/src/main/resources/jpa/static-weaving/module/fineract-cob/persistence.xml @@ -78,7 +78,7 @@ false - + diff --git a/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/converter/JsonNodeReadingConverter.java b/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/converter/JsonNodeReadingConverter.java index 2cd7e738ec4..8613ce00b6f 100644 --- a/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/converter/JsonNodeReadingConverter.java +++ b/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/converter/JsonNodeReadingConverter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/converter/JsonNodeWritingConverter.java b/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/converter/JsonNodeWritingConverter.java index 25ff040245e..fce2fb4d6de 100644 --- a/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/converter/JsonNodeWritingConverter.java +++ b/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/converter/JsonNodeWritingConverter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/domain/CommandEntity.java b/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/domain/CommandEntity.java index b9e5929a54f..24dab0fcbfd 100644 --- a/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/domain/CommandEntity.java +++ b/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/domain/CommandEntity.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.command.jdbc.store.domain; import com.fasterxml.jackson.databind.JsonNode; + import java.io.Serial; import java.io.Serializable; import java.time.Instant; + import lombok.Getter; import lombok.Setter; import lombok.ToString; diff --git a/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/domain/CommandRepository.java b/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/domain/CommandRepository.java index 7e5e34ea9ad..c5805027229 100644 --- a/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/domain/CommandRepository.java +++ b/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/domain/CommandRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.command.jdbc.store.domain; import java.util.Optional; + import org.springframework.data.repository.ListCrudRepository; import org.springframework.data.repository.query.QueryByExampleExecutor; diff --git a/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/mapping/CommandJsonMapper.java b/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/mapping/CommandJsonMapper.java index f2fa378b9ce..539a49fdd50 100644 --- a/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/mapping/CommandJsonMapper.java +++ b/fineract-command-jdbc/src/main/java/org/apache/fineract/command/jdbc/store/mapping/CommandJsonMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-command-jdbc/src/main/resources/db/changelog/tenant/module/command/parts/0001_command_init.xml b/fineract-command-jdbc/src/main/resources/db/changelog/tenant/module/command/parts/0001_command_init.xml index d2069bcf99e..2fb91ca8b69 100644 --- a/fineract-command-jdbc/src/main/resources/db/changelog/tenant/module/command/parts/0001_command_init.xml +++ b/fineract-command-jdbc/src/main/resources/db/changelog/tenant/module/command/parts/0001_command_init.xml @@ -32,11 +32,11 @@ - - - - - + + + + + @@ -49,11 +49,11 @@ - - - - - + + + + + diff --git a/fineract-command-jdbc/src/main/resources/db/changelog/tenant/module/command/parts/0002_command_fix_structure.xml b/fineract-command-jdbc/src/main/resources/db/changelog/tenant/module/command/parts/0002_command_fix_structure.xml index 9e561ca181a..8230f29f600 100644 --- a/fineract-command-jdbc/src/main/resources/db/changelog/tenant/module/command/parts/0002_command_fix_structure.xml +++ b/fineract-command-jdbc/src/main/resources/db/changelog/tenant/module/command/parts/0002_command_fix_structure.xml @@ -23,38 +23,39 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> - + - - - - + + + + - - - - + + + + - - + + - - - - - - - - + + + + + + + + - + diff --git a/fineract-command-jdbc/src/test/java/org/apache/fineract/command/jdbc/CommandRepositoryTest.java b/fineract-command-jdbc/src/test/java/org/apache/fineract/command/jdbc/CommandRepositoryTest.java index df2b2e80285..872025c8145 100644 --- a/fineract-command-jdbc/src/test/java/org/apache/fineract/command/jdbc/CommandRepositoryTest.java +++ b/fineract-command-jdbc/src/test/java/org/apache/fineract/command/jdbc/CommandRepositoryTest.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static org.apache.fineract.command.core.CommandState.ERROR; import java.time.Instant; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.command.jdbc.store.domain.CommandRepository; import org.apache.fineract.command.jdbc.store.mapping.CommandMapper; diff --git a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/api/DummyApiController.java b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/api/DummyApiController.java index babe94260d1..e038b57cf60 100644 --- a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/api/DummyApiController.java +++ b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/api/DummyApiController.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.concurrent.CompletableFuture; import java.util.function.Supplier; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.command.core.CommandDispatcher; @@ -40,15 +41,15 @@ @Slf4j @RequiredArgsConstructor @RestController -@RequestMapping(value = "/test/dummy", consumes = APPLICATION_JSON_VALUE, produces = { APPLICATION_JSON_VALUE, - APPLICATION_PROBLEM_JSON_VALUE }) +@RequestMapping(value = "/test/dummy", consumes = APPLICATION_JSON_VALUE, produces = {APPLICATION_JSON_VALUE, + APPLICATION_PROBLEM_JSON_VALUE}) class DummyApiController { private final CommandDispatcher pipeline; @PostMapping("/sync") DummyResponse dummySync(@RequestHeader(value = COMMAND_HTTP_HEADER_TENANT_ID, required = false) String tenantId, - @RequestBody DummyRequest request) { + @RequestBody DummyRequest request) { var command = new DummyCommand(); command.setPayload(request); @@ -62,7 +63,7 @@ DummyResponse dummySync(@RequestHeader(value = COMMAND_HTTP_HEADER_TENANT_ID, re @Async @PostMapping("/async") CompletableFuture dummyAsync(@RequestHeader(value = COMMAND_HTTP_HEADER_TENANT_ID, required = false) String tenantId, - @RequestBody DummyRequest request) { + @RequestBody DummyRequest request) { var command = new DummyCommand(); command.setPayload(request); diff --git a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/api/DummyExceptionHandler.java b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/api/DummyExceptionHandler.java index 616d07505d7..3dc04503911 100644 --- a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/api/DummyExceptionHandler.java +++ b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/api/DummyExceptionHandler.java @@ -6,9 +6,9 @@ * 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 @@ -22,10 +22,12 @@ import jakarta.validation.ConstraintViolation; import jakarta.validation.ConstraintViolationException; + import java.net.URI; import java.util.ArrayList; import java.util.List; import java.util.Locale; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.command.test.sample.data.DummyError; @@ -51,10 +53,10 @@ public ResponseEntity handleRuntimeException(Throwable ex) { var problemDetails = ProblemDetail.forStatusAndDetail(HttpStatus.BAD_REQUEST, ex.getLocalizedMessage()); problemDetails.setType(URI.create("https://fineract.apache.org/validation")); problemDetails.setTitle(messageSource.getMessage("org.apache.fineract.common.validation.error", null, Locale.US)); // TODO: - // check - // this, - // get - // locale + // check + // this, + // get + // locale List errors = new ArrayList<>(); diff --git a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/command/DummyCommand.java b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/command/DummyCommand.java index 14829a781da..6a255b5d76a 100644 --- a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/command/DummyCommand.java +++ b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/command/DummyCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class DummyCommand extends Command {} +public class DummyCommand extends Command { +} diff --git a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/command/DummyErrorCommand.java b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/command/DummyErrorCommand.java index 11e07ed0576..e65d912e58d 100644 --- a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/command/DummyErrorCommand.java +++ b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/command/DummyErrorCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class DummyErrorCommand extends Command {} +public class DummyErrorCommand extends Command { +} diff --git a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/data/DummyError.java b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/data/DummyError.java index 952ca351eea..cac26e2d535 100644 --- a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/data/DummyError.java +++ b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/data/DummyError.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/data/DummyErrorRequest.java b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/data/DummyErrorRequest.java index 75e6bce4232..c3bb82af454 100644 --- a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/data/DummyErrorRequest.java +++ b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/data/DummyErrorRequest.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.command.test.sample.data; import jakarta.validation.constraints.NotBlank; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/data/DummyErrorResponse.java b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/data/DummyErrorResponse.java index b26171aa1e4..ecf3b3b2559 100644 --- a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/data/DummyErrorResponse.java +++ b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/data/DummyErrorResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/data/DummyResponse.java b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/data/DummyResponse.java index 786651a9c03..2f998300524 100644 --- a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/data/DummyResponse.java +++ b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/data/DummyResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/exception/DummyException.java b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/exception/DummyException.java index b3320c6171a..02d8a14b368 100644 --- a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/exception/DummyException.java +++ b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/exception/DummyException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/handler/DummyCommandHandler.java b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/handler/DummyCommandHandler.java index 3d52532ea88..f86ccac0653 100644 --- a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/handler/DummyCommandHandler.java +++ b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/handler/DummyCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/handler/DummyErrorCommandHandler.java b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/handler/DummyErrorCommandHandler.java index 0dc036af9a8..71a2bf7c36b 100644 --- a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/handler/DummyErrorCommandHandler.java +++ b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/handler/DummyErrorCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/service/DefaultDummyService.java b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/service/DefaultDummyService.java index 7426e78b7a0..ec47fb1fee4 100644 --- a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/service/DefaultDummyService.java +++ b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/service/DefaultDummyService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.command.test.sample.service; import java.util.Locale; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.command.test.sample.data.DummyRequest; diff --git a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/service/DummyService.java b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/service/DummyService.java index a1f7499ca07..364eb07cfeb 100644 --- a/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/service/DummyService.java +++ b/fineract-command-test/src/main/java/org/apache/fineract/command/test/sample/service/DummyService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-command/README.md b/fineract-command/README.md index f386996ee9b..53058c7013b 100644 --- a/fineract-command/README.md +++ b/fineract-command/README.md @@ -1,28 +1,55 @@ Background and Motivation ------------------------- -Fineract accumulated some technical debt over the years. One area that is implicated is type-safety of internal and external facing APIs, the most prominent of which is Fineract's REST API. In general the package layout of the project reflects a more or less classic layered architecture (REST API, data transfer/value objects, business logic services, storage/repositories). The project predates some of the more modern frameworks and best practices that are available today and on occasions the data structures that are exchanged offer some challenges (e.g. generic types). Fineract's code base reflects that, especially where JSON de-/serialization is involved. Nowadays, this task would be simply delegated to the Jackson framework, but when Fineract (Mifos) started the decision was made to use Google's GSON library and create handcrafted helper classes to deal with JSON parsing. While this provided a lot of flexibility this approach had some downsides: +Fineract accumulated some technical debt over the years. One area that is implicated is type-safety of internal and +external facing APIs, the most prominent of which is Fineract's REST API. In general the package layout of the project +reflects a more or less classic layered architecture (REST API, data transfer/value objects, business logic services, +storage/repositories). The project predates some of the more modern frameworks and best practices that are available +today and on occasions the data structures that are exchanged offer some challenges (e.g. generic types). Fineract's +code base reflects that, especially where JSON de-/serialization is involved. Nowadays, this task would be simply +delegated to the Jackson framework, but when Fineract (Mifos) started the decision was made to use Google's GSON library +and create handcrafted helper classes to deal with JSON parsing. While this provided a lot of flexibility this approach +had some downsides: - the lowest common denominator is the string type (aka JSON blob); this is where we lose the type information - the strings are transformed into JSONObjects; a little bit better than raw strings, but barely more than a hash map - a ton of "magic" strings are needed to get/set values - this approach makes refactoring unnecessarily more difficult -- to be able to serve an OpenAPI descriptor (as JSON and YAML) we had to re-introduce the type information at the REST API level with dummy classes that contain only the specified attributes; those classes are only used with the Swagger annotations and no were else -- some developers skipped the layered architecture and found it too tedious to maintain DTOs and JSON helper classes, and as a result just passed JSONObjects right to the business logic layer -- now the business logic is unnecessarily aware of how Fineract communicates to the outside world and makes replacing/enhancing the communication protocol (e.g. with GRPC) pretty much impossible +- to be able to serve an OpenAPI descriptor (as JSON and YAML) we had to re-introduce the type information at the REST + API level with dummy classes that contain only the specified attributes; those classes are only used with the Swagger + annotations and no were else +- some developers skipped the layered architecture and found it too tedious to maintain DTOs and JSON helper classes, + and as a result just passed JSONObjects right to the business logic layer +- now the business logic is unnecessarily aware of how Fineract communicates to the outside world and makes + replacing/enhancing the communication protocol (e.g. with GRPC) pretty much impossible The list doesn't end here, but in the end things boil down to two main points: - poor developer experience: boilerplate code and missing type safety cost more time -- bugs: the more code the more likely errors get introduced, especially when type safety is missing and we have to rely on runtime errors (vs. compile time). - -There has been already some preparatory work done concerning type safety, but until now we avoided dealing with the real source of this issue. Fineract's architectures devises read from write requests ("CQRS", https://martinfowler.com/bliki/CQRS.html) for improved scalability. - -The read requests are not that problematic, but all write requests pass through a component/service that is called "SynchronousCommandProcessingService. As the name suggests the execution of business logic is synchronous (mostly) due to this part of the architecture. This is not necessarily a problem (not immediately at least), but it's nevertheless a central bottleneck in the system. Even more important: this service is responsible to route incoming commands to their respective handler classes which in turn execute functions on one or more business logic services. The payload of these commands are obviously not always the same... which is the main reason why we decided to use the lowest common denominator to be able to handle these various types and rendered all payloads as strings. This compromise bubbles now up in the REST API and the business logic layers (and actually everything in between). - -Over the years we've also added additional features (e.g. idempotency guarantees for incoming write requests) that make it now very hard to reason about the execution flow. Testing the performance impact of such additions to the critical execution path even can't be properly measured. Note: the current implementation of idempotency relies on database lookups (quite often, for each incoming request) and none of those queries are cached. If we wanted to store already processed requests (IDs) in a faster system (let's Redis) then this can't be done without major refactoring. - -In conclusion, if we really want to fix those issues that are not only cosmetic and affect the performance and the developer experience equally then we urgently need to fix the way how we process write requests aka commands. +- bugs: the more code the more likely errors get introduced, especially when type safety is missing and we have to rely + on runtime errors (vs. compile time). + +There has been already some preparatory work done concerning type safety, but until now we avoided dealing with the real +source of this issue. Fineract's architectures devises read from write requests (" +CQRS", https://martinfowler.com/bliki/CQRS.html) for improved scalability. + +The read requests are not that problematic, but all write requests pass through a component/service that is called " +SynchronousCommandProcessingService. As the name suggests the execution of business logic is synchronous (mostly) due to +this part of the architecture. This is not necessarily a problem (not immediately at least), but it's nevertheless a +central bottleneck in the system. Even more important: this service is responsible to route incoming commands to their +respective handler classes which in turn execute functions on one or more business logic services. The payload of these +commands are obviously not always the same... which is the main reason why we decided to use the lowest common +denominator to be able to handle these various types and rendered all payloads as strings. This compromise bubbles now +up in the REST API and the business logic layers (and actually everything in between). + +Over the years we've also added additional features (e.g. idempotency guarantees for incoming write requests) that make +it now very hard to reason about the execution flow. Testing the performance impact of such additions to the critical +execution path even can't be properly measured. Note: the current implementation of idempotency relies on database +lookups (quite often, for each incoming request) and none of those queries are cached. If we wanted to store already +processed requests (IDs) in a faster system (let's Redis) then this can't be done without major refactoring. + +In conclusion, if we really want to fix those issues that are not only cosmetic and affect the performance and the +developer experience equally then we urgently need to fix the way how we process write requests aka commands. Target Personas --------------- @@ -40,15 +67,19 @@ Goals - fully tested - ensure that the REST API is 100% backward compatible - try to contain the migration and make it as easy as possible for the community to integrate those changes -- introduce types where needed and migrate the (old) JAX-RS REST resource classes to Spring Web MVC (better performance and better testability) +- introduce types where needed and migrate the (old) JAX-RS REST resource classes to Spring Web MVC (better performance + and better testability) - introduce DTOs if not already available and make sure if they exist that they are not outdated -- assemble one DTO as command payload from all incoming REST API parameters (headers, query/path paramters, request bodies) +- assemble one DTO as command payload from all incoming REST API parameters (headers, query/path paramters, request + bodies) - annotate attributes in the DTOs with Jakarta Validation annotations to enforce constraints on their values - wired REST API to the new command processing, one service at a time/pull request -- take a non-critical service (like document management) and migrate it to the new command processing mechanics from top (REST API) to bottom (business logic service) +- take a non-critical service (like document management) and migrate it to the new command processing mechanics from + top (REST API) to bottom (business logic service) - refactor command handlers to new internal API -- make sure that the business service logic classes/functions take only one DTO request input parameter (aka don't let a function have 12 input parameters of type string...) -- when all integration tests run successfully then remove all legacy boilerplate code that is not used anymore +- make sure that the business service logic classes/functions take only one DTO request input parameter (aka don't let a + function have 12 input parameters of type string...) +- when all integration tests run successfully then remove all legacy boilerplate code that is not used anymore - make an ordered list of modules/features (easiest, lowest hanging fruit first) - maintain at least the same performance as the current implementation - optional: improve performance if it can be done in a reasonable time frame @@ -58,7 +89,8 @@ Non-Goals --------- - current command processing will stay untouched, will run independently of new infrastructure -- don't try cleaning up the storage layer; that's a separate effort for later (type safe queries, query peformance, clean entity classes) +- don't try cleaning up the storage layer; that's a separate effort for later (type safe queries, query peformance, + clean entity classes) - doesn't need to be optimized for speed immediately - no changes in the integration tests @@ -75,7 +107,8 @@ Class contains some generic atttributes like: - tenant ID - timestamp -The actual payload (aka command input parameters) are defined as a generic parameter. It is expected that the modules implement classes that introduce the payload types and inherit from the abstract command class. +The actual payload (aka command input parameters) are defined as a generic parameter. It is expected that the modules +implement classes that introduce the payload types and inherit from the abstract command class. 2. Command Processing Service @@ -85,9 +118,13 @@ TBD - asynchronously (optional): with executor service and completable futures (use virtual threads optionally) - non-blocking (optional): high perfomance LMAX Disruptor non-blocking implementation -These different perfromance level implementations need to be absolute drop-in replacements (for each other). It is expected that more performant implementations need more testing due to increased complexity and possible unforseen side effects. In case any problems show up we can always roll back to the required default implementation (synchronous). +These different perfromance level implementations need to be absolute drop-in replacements (for each other). It is +expected that more performant implementations need more testing due to increased complexity and possible unforseen side +effects. In case any problems show up we can always roll back to the required default implementation (synchronous). -NOTE: we should consider providing a command processing implementation based on Apache Camel once this concept is approved and we migrated already a couple of services. They are specialized for exactly this kind of use cases and have more dedicated people working on it's implementation. Could give more flexibility without us needing to maintain code. +NOTE: we should consider providing a command processing implementation based on Apache Camel once this concept is +approved and we migrated already a couple of services. They are specialized for exactly this kind of use cases and have +more dedicated people working on it's implementation. Could give more flexibility without us needing to maintain code. 3. Command Handlers @@ -107,9 +144,11 @@ TBD ETA --- -A first prototype of the a new command processing component is ready for evaluation. There is also an initial smoke test (JMH) available. +A first prototype of the a new command processing component is ready for evaluation. There is also an initial smoke +test (JMH) available. -You can try it out with the following instructions (it's still in a private repository, but will be published soon as an official PR): +You can try it out with the following instructions (it's still in a private repository, but will be published soon as an +official PR): ``` git clone git@github.com:vidakovic/fineract.git diff --git a/fineract-command/build.gradle b/fineract-command/build.gradle index aff455591e6..919fa4937a9 100644 --- a/fineract-command/build.gradle +++ b/fineract-command/build.gradle @@ -49,9 +49,9 @@ apply from: 'dependencies.gradle' // https://github.com/andygoossens/gradle-modernizer-plugin modernizer { ignoreClassNamePatterns = [ - '.*AbstractPersistableCustom', - '.*EntityTables', - '.*domain.*' + '.*AbstractPersistableCustom', + '.*EntityTables', + '.*domain.*' ] } diff --git a/fineract-command/src/main/java/org/apache/fineract/command/core/Command.java b/fineract-command/src/main/java/org/apache/fineract/command/core/Command.java index 8441f3ca620..0e9334415af 100644 --- a/fineract-command/src/main/java/org/apache/fineract/command/core/Command.java +++ b/fineract-command/src/main/java/org/apache/fineract/command/core/Command.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.time.Instant; + import lombok.Data; import lombok.experimental.FieldNameConstants; diff --git a/fineract-command/src/main/java/org/apache/fineract/command/core/CommandConstants.java b/fineract-command/src/main/java/org/apache/fineract/command/core/CommandConstants.java index 35f9c1db86f..8fd39b0e976 100644 --- a/fineract-command/src/main/java/org/apache/fineract/command/core/CommandConstants.java +++ b/fineract-command/src/main/java/org/apache/fineract/command/core/CommandConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-command/src/main/java/org/apache/fineract/command/core/CommandDispatcher.java b/fineract-command/src/main/java/org/apache/fineract/command/core/CommandDispatcher.java index 52d504ade21..e694451f543 100644 --- a/fineract-command/src/main/java/org/apache/fineract/command/core/CommandDispatcher.java +++ b/fineract-command/src/main/java/org/apache/fineract/command/core/CommandDispatcher.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-command/src/main/java/org/apache/fineract/command/core/CommandHandler.java b/fineract-command/src/main/java/org/apache/fineract/command/core/CommandHandler.java index 4bd98b14c84..7fd13ee368e 100644 --- a/fineract-command/src/main/java/org/apache/fineract/command/core/CommandHandler.java +++ b/fineract-command/src/main/java/org/apache/fineract/command/core/CommandHandler.java @@ -6,9 +6,9 @@ * 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 @@ -32,7 +32,8 @@ default RES fallback(Command command, Throwable t) { } default boolean matches(Command command) { - TypeToken handlerType = new TypeToken<>(getClass()) {}; + TypeToken handlerType = new TypeToken<>(getClass()) { + }; return handlerType.getRawType().isAssignableFrom(command.getPayload().getClass()); } diff --git a/fineract-command/src/main/java/org/apache/fineract/command/core/CommandHandlerManager.java b/fineract-command/src/main/java/org/apache/fineract/command/core/CommandHandlerManager.java index 9e00d243591..17a3742e734 100644 --- a/fineract-command/src/main/java/org/apache/fineract/command/core/CommandHandlerManager.java +++ b/fineract-command/src/main/java/org/apache/fineract/command/core/CommandHandlerManager.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-command/src/main/java/org/apache/fineract/command/core/CommandHookAfter.java b/fineract-command/src/main/java/org/apache/fineract/command/core/CommandHookAfter.java index ce479ab7f66..a8f183f3351 100644 --- a/fineract-command/src/main/java/org/apache/fineract/command/core/CommandHookAfter.java +++ b/fineract-command/src/main/java/org/apache/fineract/command/core/CommandHookAfter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-command/src/main/java/org/apache/fineract/command/core/CommandHookManager.java b/fineract-command/src/main/java/org/apache/fineract/command/core/CommandHookManager.java index ca9f2d5e54c..4cbe49f6fec 100644 --- a/fineract-command/src/main/java/org/apache/fineract/command/core/CommandHookManager.java +++ b/fineract-command/src/main/java/org/apache/fineract/command/core/CommandHookManager.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-command/src/main/java/org/apache/fineract/command/core/CommandState.java b/fineract-command/src/main/java/org/apache/fineract/command/core/CommandState.java index 309277545d0..a0ff416c47a 100644 --- a/fineract-command/src/main/java/org/apache/fineract/command/core/CommandState.java +++ b/fineract-command/src/main/java/org/apache/fineract/command/core/CommandState.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-command/src/main/java/org/apache/fineract/command/core/exception/CommandHandlerNotFoundException.java b/fineract-command/src/main/java/org/apache/fineract/command/core/exception/CommandHandlerNotFoundException.java index 9b706b14610..bd158542fb2 100644 --- a/fineract-command/src/main/java/org/apache/fineract/command/core/exception/CommandHandlerNotFoundException.java +++ b/fineract-command/src/main/java/org/apache/fineract/command/core/exception/CommandHandlerNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-command/src/main/java/org/apache/fineract/command/core/exception/CommandIllegalArgumentException.java b/fineract-command/src/main/java/org/apache/fineract/command/core/exception/CommandIllegalArgumentException.java index 9bced649153..deaffa99a4a 100644 --- a/fineract-command/src/main/java/org/apache/fineract/command/core/exception/CommandIllegalArgumentException.java +++ b/fineract-command/src/main/java/org/apache/fineract/command/core/exception/CommandIllegalArgumentException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-command/src/main/java/org/apache/fineract/command/starter/CommandConfiguration.java b/fineract-command/src/main/java/org/apache/fineract/command/starter/CommandConfiguration.java index c5048b75c28..093d52440a3 100644 --- a/fineract-command/src/main/java/org/apache/fineract/command/starter/CommandConfiguration.java +++ b/fineract-command/src/main/java/org/apache/fineract/command/starter/CommandConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-command/src/test/java/org/apache/fineract/command/CommandDispatcherTest.java b/fineract-command/src/test/java/org/apache/fineract/command/CommandDispatcherTest.java index 84c887af5e3..d0ff02ccff5 100644 --- a/fineract-command/src/test/java/org/apache/fineract/command/CommandDispatcherTest.java +++ b/fineract-command/src/test/java/org/apache/fineract/command/CommandDispatcherTest.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.Locale; import java.util.function.Supplier; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.command.core.CommandDispatcher; import org.apache.fineract.command.test.sample.command.DummyCommand; diff --git a/fineract-command/src/test/resources/org/apache/fineract/messages.properties b/fineract-command/src/test/resources/org/apache/fineract/messages.properties index eb14d22f2db..d45e4a7bb66 100644 --- a/fineract-command/src/test/resources/org/apache/fineract/messages.properties +++ b/fineract-command/src/test/resources/org/apache/fineract/messages.properties @@ -16,7 +16,6 @@ # specific language governing permissions and limitations # under the License. # - # common org.apache.fineract.common.validation.error=Validation Error org.apache.fineract.common.validation.AssertFalse.message=must be false diff --git a/fineract-command/src/test/resources/org/apache/fineract/messages_de.properties b/fineract-command/src/test/resources/org/apache/fineract/messages_de.properties index 14444ba9dd7..239b02c67db 100644 --- a/fineract-command/src/test/resources/org/apache/fineract/messages_de.properties +++ b/fineract-command/src/test/resources/org/apache/fineract/messages_de.properties @@ -16,7 +16,6 @@ # specific language governing permissions and limitations # under the License. # - # common org.apache.fineract.common.validation.error=Fehler org.apache.fineract.common.validation.AssertFalse.message=muss falsch sein diff --git a/fineract-command/src/test/resources/org/apache/fineract/messages_en.properties b/fineract-command/src/test/resources/org/apache/fineract/messages_en.properties index eb14d22f2db..d45e4a7bb66 100644 --- a/fineract-command/src/test/resources/org/apache/fineract/messages_en.properties +++ b/fineract-command/src/test/resources/org/apache/fineract/messages_en.properties @@ -16,7 +16,6 @@ # specific language governing permissions and limitations # under the License. # - # common org.apache.fineract.common.validation.error=Validation Error org.apache.fineract.common.validation.AssertFalse.message=must be false diff --git a/fineract-core/build.gradle b/fineract-core/build.gradle index 1a7d533afae..19e520ea426 100644 --- a/fineract-core/build.gradle +++ b/fineract-core/build.gradle @@ -53,9 +53,9 @@ compileJava { // https://github.com/andygoossens/gradle-modernizer-plugin modernizer { ignoreClassNamePatterns = [ - '.*AbstractPersistableCustom', - '.*EntityTables', - '.*domain.*' + '.*AbstractPersistableCustom', + '.*EntityTables', + '.*domain.*' ] } diff --git a/fineract-core/dependencies.gradle b/fineract-core/dependencies.gradle index 13ebd906d9c..13d53a0995d 100644 --- a/fineract-core/dependencies.gradle +++ b/fineract-core/dependencies.gradle @@ -56,8 +56,8 @@ dependencies { 'io.github.resilience4j:resilience4j-spring-boot3', 'org.apache.httpcomponents:httpcore', - ) - implementation ('org.springframework.boot:spring-boot-starter-data-jpa') { + ) + implementation('org.springframework.boot:spring-boot-starter-data-jpa') { exclude group: 'org.hibernate' } implementation('org.eclipse.persistence:org.eclipse.persistence.jpa') { @@ -72,10 +72,10 @@ dependencies { implementation('org.dom4j:dom4j') { exclude group: 'javax.xml.bind' } - implementation ('jakarta.xml.bind:jakarta.xml.bind-api') { + implementation('jakarta.xml.bind:jakarta.xml.bind-api') { exclude group: 'jakarta.activation' } - implementation ('org.springframework.boot:spring-boot-starter-data-jpa') { + implementation('org.springframework.boot:spring-boot-starter-data-jpa') { exclude group: 'org.hibernate' } implementation('org.eclipse.persistence:org.eclipse.persistence.jpa') { @@ -91,7 +91,7 @@ dependencies { // Although fineract (at the time of writing) doesn't have any compile time dep. on httpclient, // it's useful to have this for the Spring Boot TestRestTemplate http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-rest-templates-test-utility 'org.apache.httpcomponents:httpclient' - ) + ) compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' @@ -107,25 +107,25 @@ dependencies { // testCompile dependencies are ONLY used in src/test, not src/main. // Do NOT repeat dependencies which are ALREADY in implementation or runtimeOnly! // - testImplementation( 'io.github.classgraph:classgraph') - testImplementation ('org.springframework.boot:spring-boot-starter-test') { + testImplementation('io.github.classgraph:classgraph') + testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'com.jayway.jsonpath', module: 'json-path' exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' exclude group: 'jakarta.activation' exclude group: 'javax.activation' exclude group: 'org.skyscreamer' } - implementation ('org.mnode.ical4j:ical4j') { + implementation('org.mnode.ical4j:ical4j') { exclude group: 'commons-logging' exclude group: 'javax.activation' exclude group: 'com.sun.mail', module: 'javax.mail' } - implementation ('org.quartz-scheduler:quartz') { + implementation('org.quartz-scheduler:quartz') { exclude group: 'com.zaxxer', module: 'HikariCP-java7' } - testImplementation ('org.mockito:mockito-inline') + testImplementation('org.mockito:mockito-inline') implementation('org.apache.avro:avro') implementation( project(path: ':fineract-avro-schemas') - ) + ) } 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 4a1e13f7eb0..629b02f56e9 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 @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.accounting.financialactivityaccount.data.FinancialActivityData; import org.apache.fineract.accounting.glaccount.domain.GLAccountType; 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..8b3a3591497 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 @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.fineract.accounting.glaccount.domain.GLAccountType; import org.apache.fineract.accounting.glaccount.domain.GLAccountUsage; import org.apache.fineract.accounting.journalentry.domain.JournalEntryType; 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..f61f7b26ad1 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 @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.HashMap; import java.util.Map; + import lombok.Getter; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.data.StringEnumOptionData; diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/financialactivityaccount/data/FinancialActivityData.java b/fineract-core/src/main/java/org/apache/fineract/accounting/financialactivityaccount/data/FinancialActivityData.java index 004f9c0aa8c..fc290a1f2e8 100644 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/financialactivityaccount/data/FinancialActivityData.java +++ b/fineract-core/src/main/java/org/apache/fineract/accounting/financialactivityaccount/data/FinancialActivityData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountJsonInputParams.java b/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountJsonInputParams.java index 18e06a180c8..59023203ccd 100644 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountJsonInputParams.java +++ b/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/api/GLAccountJsonInputParams.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/data/GLAccountData.java b/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/data/GLAccountData.java index 7996064d269..941cc7da83b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/data/GLAccountData.java +++ b/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/data/GLAccountData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serializable; import java.util.Collection; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; @@ -72,7 +73,7 @@ public class GLAccountData implements Serializable { private transient Integer rowIndex; public static GLAccountData importInstance(String name, Long parentId, String glCode, Boolean manualEntriesAllowed, EnumOptionData type, - EnumOptionData usage, String description, CodeValueData tagId, Integer rowIndex) { + EnumOptionData usage, String description, CodeValueData tagId, Integer rowIndex) { return new GLAccountData().setName(name).setParentId(parentId).setGlCode(glCode).setManualEntriesAllowed(manualEntriesAllowed) .setType(type).setUsage(usage).setDescription(description).setTagId(tagId).setRowIndex(rowIndex); } diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccount.java b/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccount.java index 0107fe29652..cf0cbf1aea0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccount.java +++ b/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccount.java @@ -6,9 +6,9 @@ * 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 @@ -26,10 +26,12 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -40,7 +42,7 @@ import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @Entity -@Table(name = "acc_gl_account", uniqueConstraints = { @UniqueConstraint(columnNames = { "gl_code" }, name = "acc_gl_code") }) +@Table(name = "acc_gl_account", uniqueConstraints = {@UniqueConstraint(columnNames = {"gl_code"}, name = "acc_gl_code")}) @Getter @Setter @NoArgsConstructor @@ -113,7 +115,7 @@ public Map update(final JsonCommand command) { } private void handlePropertyUpdate(final JsonCommand command, final Map actualChanges, final String paramName, - final Integer propertyToBeUpdated, final boolean sansLocale) { + final Integer propertyToBeUpdated, final boolean sansLocale) { boolean changeDetected = false; if (sansLocale) { changeDetected = command.isChangeInIntegerSansLocaleParameterNamed(paramName, propertyToBeUpdated); @@ -138,7 +140,7 @@ private void handlePropertyUpdate(final JsonCommand command, final Map actualChanges, final String paramName, - final String propertyToBeUpdated) { + final String propertyToBeUpdated) { if (command.isChangeInStringParameterNamed(paramName, propertyToBeUpdated)) { final String newValue = command.stringValueOfParameterNamed(paramName); actualChanges.put(paramName, newValue); @@ -154,7 +156,7 @@ private void handlePropertyUpdate(final JsonCommand command, final Map actualChanges, final String paramName, - final Long propertyToBeUpdated) { + final Long propertyToBeUpdated) { if (command.isChangeInLongParameterNamed(paramName, propertyToBeUpdated)) { final Long newValue = command.longValueOfParameterNamed(paramName); actualChanges.put(paramName, newValue); @@ -166,7 +168,7 @@ private void handlePropertyUpdate(final JsonCommand command, final Map actualChanges, final String paramName, - final boolean propertyToBeUpdated) { + final boolean propertyToBeUpdated) { if (command.isChangeInBooleanParameterNamed(paramName, propertyToBeUpdated)) { final Boolean newValue = command.booleanObjectValueOfParameterNamed(paramName); actualChanges.put(paramName, newValue); diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountRepository.java b/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountRepository.java index 59dd985a7cf..0d8a7e06658 100644 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.glaccount.domain; import java.util.Optional; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountRepositoryWrapper.java b/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountRepositoryWrapper.java index b66345ef672..54728ff0230 100644 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountRepositoryWrapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/domain/GLAccountRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 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..ea0111f93a2 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 @@ -6,9 +6,9 @@ * 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 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..95eb462e0ad 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 @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.HashMap; import java.util.Map; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; public enum GLAccountUsage { diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountNotFoundException.java b/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountNotFoundException.java index 1e4c450a8fe..70e557733ba 100644 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountNotFoundException.java +++ b/fineract-core/src/main/java/org/apache/fineract/accounting/glaccount/exception/GLAccountNotFoundException.java @@ -6,9 +6,9 @@ * 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 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 index f72a906eeba..70abc997197 100644 --- 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 @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ 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; @@ -30,7 +31,7 @@ import org.mapstruct.Mapping; import org.mapstruct.Named; -@Mapper(config = MapstructMapperConfig.class, uses = { CodeValueMapper.class }) +@Mapper(config = MapstructMapperConfig.class, uses = {CodeValueMapper.class}) public interface GlAccountMapper { @Mapping(target = "usage", source = "glAccount.usage", qualifiedByName = "glAccountUsage") 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 index 83ac11f9aea..8421bb2815a 100644 --- 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 @@ -6,9 +6,9 @@ * 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 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 index e727ab33b29..a0cbb6e7bb6 100644 --- 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 @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/journalentry/data/AdvancedMappingtDTO.java b/fineract-core/src/main/java/org/apache/fineract/accounting/journalentry/data/AdvancedMappingtDTO.java index 14234e6c23e..99a16b4bc5c 100755 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/journalentry/data/AdvancedMappingtDTO.java +++ b/fineract-core/src/main/java/org/apache/fineract/accounting/journalentry/data/AdvancedMappingtDTO.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.journalentry.data; import java.math.BigDecimal; + import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/journalentry/domain/JournalEntryType.java b/fineract-core/src/main/java/org/apache/fineract/accounting/journalentry/domain/JournalEntryType.java index 463f6ee13b0..40560c2ec3b 100755 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/journalentry/domain/JournalEntryType.java +++ b/fineract-core/src/main/java/org/apache/fineract/accounting/journalentry/domain/JournalEntryType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/data/AdvancedMappingToExpenseAccountData.java b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/data/AdvancedMappingToExpenseAccountData.java index 0bfa3ca1ba5..991edd8c64b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/data/AdvancedMappingToExpenseAccountData.java +++ b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/data/AdvancedMappingToExpenseAccountData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.producttoaccountmapping.data; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/data/ChargeToGLAccountMapper.java b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/data/ChargeToGLAccountMapper.java index 4159d5e7f5f..3774a5e7fd0 100755 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/data/ChargeToGLAccountMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/data/ChargeToGLAccountMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.producttoaccountmapping.data; import java.io.Serializable; + import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Setter; diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/data/ClassificationToGLAccountData.java b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/data/ClassificationToGLAccountData.java index fcec6272cd1..b7d6540e513 100644 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/data/ClassificationToGLAccountData.java +++ b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/data/ClassificationToGLAccountData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.producttoaccountmapping.data; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/data/PaymentTypeToGLAccountMapper.java b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/data/PaymentTypeToGLAccountMapper.java index f2f40c6fe9a..49169b1e34b 100755 --- a/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/data/PaymentTypeToGLAccountMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/accounting/producttoaccountmapping/data/PaymentTypeToGLAccountMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.producttoaccountmapping.data; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; 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..2f1739c6634 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 @@ -6,9 +6,9 @@ * 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 @@ -36,8 +36,10 @@ import jakarta.ws.rs.core.Context; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.UriInfo; + import java.util.List; import java.util.Optional; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.domain.BatchRequest; import org.apache.fineract.batch.domain.BatchResponse; @@ -64,11 +66,11 @@ @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,..}..]}.""") @RequiredArgsConstructor public class BatchApiResource { @@ -86,11 +88,11 @@ public class BatchApiResource { * @return serialized JSON */ @POST - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) + @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.""") @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)))) diff --git a/fineract-core/src/main/java/org/apache/fineract/batch/api/BatchApiResourceSwagger.java b/fineract-core/src/main/java/org/apache/fineract/batch/api/BatchApiResourceSwagger.java index 3d62f1000c2..bb6f0c3840b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/batch/api/BatchApiResourceSwagger.java +++ b/fineract-core/src/main/java/org/apache/fineract/batch/api/BatchApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.batch.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.Set; + import org.apache.fineract.batch.domain.Header; /** diff --git a/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandContext.java b/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandContext.java index ff405a9c470..f7d32f6bcfa 100644 --- a/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandContext.java +++ b/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandContext.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandHandlerRegistry.java b/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandHandlerRegistry.java index 632efd84c44..f8b029d10f0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandHandlerRegistry.java +++ b/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandHandlerRegistry.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Map; import java.util.function.BiFunction; + import lombok.RequiredArgsConstructor; @RequiredArgsConstructor diff --git a/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandStrategy.java b/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandStrategy.java index 9809bf7a344..6e402432afc 100644 --- a/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandStrategy.java +++ b/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandStrategy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandStrategyProvider.java b/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandStrategyProvider.java index 5d313d874b8..00362f9215a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandStrategyProvider.java +++ b/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandStrategyProvider.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; + import org.apache.fineract.batch.command.internal.UnknownCommandStrategy; import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; @@ -144,7 +145,7 @@ private static void init() { "getSavingsAccountByIdCommandStrategy"); commandStrategies.put(CommandContext.resource("v1\\/savingsaccounts").method(POST).build(), "applySavingsCommandStrategy"); commandStrategies.put(CommandContext - .resource("v1\\/savingsaccounts\\/" + NUMBER_REGEX + "\\/transactions" + OPTIONAL_COMMAND_PARAM_REGEX).method(POST).build(), + .resource("v1\\/savingsaccounts\\/" + NUMBER_REGEX + "\\/transactions" + OPTIONAL_COMMAND_PARAM_REGEX).method(POST).build(), "savingsAccountTransactionCommandStrategy"); commandStrategies.put(CommandContext .resource("v1\\/savingsaccounts\\/" + NUMBER_REGEX + "\\/transactions\\/" + NUMBER_REGEX + OPTIONAL_COMMAND_PARAM_REGEX) @@ -255,7 +256,7 @@ private static void init() { CommandContext.resource("v1\\/loans\\/external-id\\/" + UUID_PARAM_REGEX + "\\/interest-pauses").method(POST).build(), "createLoanInterestPauseByExternalIdCommandStrategy"); commandStrategies.put(CommandContext - .resource("v1\\/loans\\/external-id\\/" + UUID_PARAM_REGEX + "\\/interest-pauses\\/" + NUMBER_REGEX).method(PUT).build(), + .resource("v1\\/loans\\/external-id\\/" + UUID_PARAM_REGEX + "\\/interest-pauses\\/" + NUMBER_REGEX).method(PUT).build(), "updateLoanInterestPauseByExternalIdCommandStrategy"); commandStrategies.put(CommandContext.resource("v1\\/accounttransfers").method(POST).build(), "createAccountTransferCommandStrategy"); diff --git a/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandStrategyUtils.java b/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandStrategyUtils.java index 71d7813857c..7530c579282 100644 --- a/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandStrategyUtils.java +++ b/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandStrategyUtils.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.batch.domain.BatchRequest; import org.apache.fineract.infrastructure.core.api.MutableUriInfo; diff --git a/fineract-core/src/main/java/org/apache/fineract/batch/command/internal/UnknownCommandStrategy.java b/fineract-core/src/main/java/org/apache/fineract/batch/command/internal/UnknownCommandStrategy.java index 5468254c724..484c6578e4c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/batch/command/internal/UnknownCommandStrategy.java +++ b/fineract-core/src/main/java/org/apache/fineract/batch/command/internal/UnknownCommandStrategy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/batch/domain/BatchRequest.java b/fineract-core/src/main/java/org/apache/fineract/batch/domain/BatchRequest.java index 9ff45eb770a..79d65268186 100644 --- a/fineract-core/src/main/java/org/apache/fineract/batch/domain/BatchRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/batch/domain/BatchRequest.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.batch.domain; import java.util.Set; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-core/src/main/java/org/apache/fineract/batch/domain/BatchResponse.java b/fineract-core/src/main/java/org/apache/fineract/batch/domain/BatchResponse.java index 24dc2bd35c0..3228b21930c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/batch/domain/BatchResponse.java +++ b/fineract-core/src/main/java/org/apache/fineract/batch/domain/BatchResponse.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.batch.domain; import java.util.Set; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-core/src/main/java/org/apache/fineract/batch/domain/Header.java b/fineract-core/src/main/java/org/apache/fineract/batch/domain/Header.java index 3350d153edd..d3fc85b2fc4 100644 --- a/fineract-core/src/main/java/org/apache/fineract/batch/domain/Header.java +++ b/fineract-core/src/main/java/org/apache/fineract/batch/domain/Header.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/batch/exception/BatchReferenceInvalidException.java b/fineract-core/src/main/java/org/apache/fineract/batch/exception/BatchReferenceInvalidException.java index 36c945779cf..cc1301ead76 100644 --- a/fineract-core/src/main/java/org/apache/fineract/batch/exception/BatchReferenceInvalidException.java +++ b/fineract-core/src/main/java/org/apache/fineract/batch/exception/BatchReferenceInvalidException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/batch/exception/ErrorInfo.java b/fineract-core/src/main/java/org/apache/fineract/batch/exception/ErrorInfo.java index d4d2a387133..51649541e05 100644 --- a/fineract-core/src/main/java/org/apache/fineract/batch/exception/ErrorInfo.java +++ b/fineract-core/src/main/java/org/apache/fineract/batch/exception/ErrorInfo.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static lombok.AccessLevel.PROTECTED; import java.util.Set; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; 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..5be733d0b61 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 @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.batch.serialization; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.List; + import org.apache.fineract.batch.domain.BatchRequest; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; import org.springframework.stereotype.Component; @@ -44,7 +46,8 @@ public class BatchRequestJsonHelper extends FromJsonHelper { * @return List<BatchRequest> */ public List extractList(final String json) { - final Type listType = new TypeToken>() {}.getType(); + final Type listType = new TypeToken>() { + }.getType(); return super.getGsonConverter().fromJson(json, listType); } } diff --git a/fineract-core/src/main/java/org/apache/fineract/batch/service/BatchApiService.java b/fineract-core/src/main/java/org/apache/fineract/batch/service/BatchApiService.java index f4105429d7e..293ea11d793 100644 --- a/fineract-core/src/main/java/org/apache/fineract/batch/service/BatchApiService.java +++ b/fineract-core/src/main/java/org/apache/fineract/batch/service/BatchApiService.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.batch.service; import jakarta.ws.rs.core.UriInfo; + import java.util.List; + import org.apache.fineract.batch.domain.BatchRequest; import org.apache.fineract.batch.domain.BatchResponse; diff --git a/fineract-core/src/main/java/org/apache/fineract/batch/service/BatchApiServiceImpl.java b/fineract-core/src/main/java/org/apache/fineract/batch/service/BatchApiServiceImpl.java index fc41c0f60b8..cf64b7049b1 100644 --- a/fineract-core/src/main/java/org/apache/fineract/batch/service/BatchApiServiceImpl.java +++ b/fineract-core/src/main/java/org/apache/fineract/batch/service/BatchApiServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -29,6 +29,7 @@ import jakarta.persistence.EntityManager; import jakarta.persistence.PersistenceContext; import jakarta.ws.rs.core.UriInfo; + import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; @@ -41,6 +42,7 @@ import java.util.function.Function; import java.util.function.Supplier; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.batch.command.CommandContext; @@ -123,7 +125,7 @@ public List handleBatchRequestsWithEnclosingTransaction(final Lis } private List handleBatchRequests(final List requestList, final UriInfo uriInfo, - boolean enclosingTransaction) { + boolean enclosingTransaction) { BatchRequestContextHolder.setIsEnclosingTransaction(enclosingTransaction); try { return enclosingTransaction ? callInTransaction(Function.identity()::apply, () -> handleRequestNodes(requestList, uriInfo)) @@ -143,7 +145,7 @@ private List handleBatchRequests(final List request * @return */ private List callInTransaction(Consumer transactionConfigurator, - Supplier> request) { + Supplier> request) { // Retry logic for enclosingTransaction=true and when the isolation level is REPEATABLE_READ or stricter we need // to restart the transaction as well! @@ -215,7 +217,7 @@ private List handleRequestNodes(final List requestL * @return {@code BatchResponse} */ private void callRequestRecursive(BatchRequest request, BatchRequestNode requestNode, List responseList, - UriInfo uriInfo) { + UriInfo uriInfo) { // run current node BatchResponse response = executeRequest(request, uriInfo); responseList.add(response); @@ -280,7 +282,7 @@ private Either runPreprocessors(BatchRequest req } private Either runPreprocessor(List remainingPreprocessor, - BatchRequest request) { + BatchRequest request) { if (remainingPreprocessor.isEmpty()) { return Either.right(request); } else { @@ -304,7 +306,7 @@ private Either runPreprocessor(List parentRequestFailedRecursive(@NonNull BatchRequest request, @NonNull BatchRequestNode requestNode, - @NonNull BatchResponse response, Long parentId) { + @NonNull BatchResponse response, Long parentId) { List responseList = new ArrayList<>(); if (parentId == null) { // root BatchRequestContextHolder.getEnclosingTransaction().ifPresent(TransactionExecution::setRollbackOnly); @@ -358,7 +360,7 @@ private BatchResponse buildOrThrowErrorResponse(RuntimeException ex, BatchReques private List buildErrorResponses(Throwable ex, @NonNull List responseList) { BatchResponse response = responseList.isEmpty() ? null : responseList.stream().filter(e -> e.getStatusCode() == null || e.getStatusCode() != SC_OK).findFirst() - .orElse(responseList.get(responseList.size() - 1)); + .orElse(responseList.get(responseList.size() - 1)); if (response != null && response.getStatusCode() == SC_OK && ex instanceof TransactionSystemException tse) { ex = new ConcurrencyFailureException(tse.getMessage(), tse.getCause()); diff --git a/fineract-core/src/main/java/org/apache/fineract/batch/service/BatchExecutionException.java b/fineract-core/src/main/java/org/apache/fineract/batch/service/BatchExecutionException.java index eb43781663f..3d47e969a95 100644 --- a/fineract-core/src/main/java/org/apache/fineract/batch/service/BatchExecutionException.java +++ b/fineract-core/src/main/java/org/apache/fineract/batch/service/BatchExecutionException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/batch/service/ResolutionHelper.java b/fineract-core/src/main/java/org/apache/fineract/batch/service/ResolutionHelper.java index 672f7927c44..7c5854383a7 100644 --- a/fineract-core/src/main/java/org/apache/fineract/batch/service/ResolutionHelper.java +++ b/fineract-core/src/main/java/org/apache/fineract/batch/service/ResolutionHelper.java @@ -6,9 +6,9 @@ * 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 @@ -25,11 +25,13 @@ import com.google.gson.JsonPrimitive; import com.jayway.jsonpath.JsonPath; import com.jayway.jsonpath.ReadContext; + import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.domain.BatchRequest; import org.apache.fineract.batch.domain.BatchResponse; diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/annotation/CommandType.java b/fineract-core/src/main/java/org/apache/fineract/commands/annotation/CommandType.java index 96a2919fbfa..764fbe97b94 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/annotation/CommandType.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/annotation/CommandType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/configuration/RetryConfigurationAssembler.java b/fineract-core/src/main/java/org/apache/fineract/commands/configuration/RetryConfigurationAssembler.java index 87af4036604..4cbba0903ea 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/configuration/RetryConfigurationAssembler.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/configuration/RetryConfigurationAssembler.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import io.github.resilience4j.retry.Retry; import io.github.resilience4j.retry.RetryConfig; import io.github.resilience4j.retry.RetryRegistry; + import java.util.Arrays; + import lombok.AllArgsConstructor; import org.apache.fineract.batch.service.BatchExecutionException; import org.apache.fineract.commands.exception.CommandResultPersistenceException; diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/domain/CommandProcessingResultType.java b/fineract-core/src/main/java/org/apache/fineract/commands/domain/CommandProcessingResultType.java index 17f70dfe4bc..5b8bd90e125 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/domain/CommandProcessingResultType.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/domain/CommandProcessingResultType.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.commands.domain; import jakarta.validation.constraints.NotNull; + import java.util.Arrays; import java.util.Map; import java.util.stream.Collectors; + import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/domain/CommandSource.java b/fineract-core/src/main/java/org/apache/fineract/commands/domain/CommandSource.java index e73946f94ba..692612df7fa 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/domain/CommandSource.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/domain/CommandSource.java @@ -6,9 +6,9 @@ * 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 @@ -24,7 +24,9 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.validation.constraints.NotNull; + import java.time.OffsetDateTime; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; @@ -145,7 +147,7 @@ public class CommandSource extends AbstractPersistableCustom { private boolean sanitized; public static CommandSource fullEntryFrom(final CommandWrapper wrapper, final JsonCommand command, final AppUser maker, - String idempotencyKey, Integer status, boolean sanitized) { + String idempotencyKey, Integer status, boolean sanitized) { return CommandSource.builder() // .actionName(wrapper.actionName()) // .entityName(wrapper.entityName()) // diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/domain/CommandSourceRepository.java b/fineract-core/src/main/java/org/apache/fineract/commands/domain/CommandSourceRepository.java index ca0de426e7b..0c7443f0ba3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/domain/CommandSourceRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/domain/CommandSourceRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.commands.domain; import java.time.OffsetDateTime; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Modifying; diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/domain/CommandWrapper.java b/fineract-core/src/main/java/org/apache/fineract/commands/domain/CommandWrapper.java index 243c4ff9f66..0c7ca18ab53 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/domain/CommandWrapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/domain/CommandWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -37,6 +37,7 @@ import static org.apache.fineract.commands.domain.CommandWrapperConstants.ENTITY_WORKINGDAYS; import java.util.Set; + import lombok.Getter; import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.apache.fineract.useradministration.api.PasswordPreferencesApiConstants; @@ -76,22 +77,22 @@ public static CommandWrapper wrap(final String actionName, final String entityNa } public static CommandWrapper fromExistingCommand(final Long commandId, final String actionName, final String entityName, - final Long resourceId, final Long subresourceId, final String resourceGetUrl, final Long productId) { + final Long resourceId, final Long subresourceId, final String resourceGetUrl, final Long productId) { return new CommandWrapper(commandId, actionName, entityName, resourceId, subresourceId, resourceGetUrl, productId); } public static CommandWrapper fromExistingCommand(final Long commandId, final String actionName, final String entityName, - final Long resourceId, final Long subresourceId, final String resourceGetUrl, final Long productId, final Long officeId, - final Long groupId, final Long clientId, final Long loanId, final Long savingsId, final String transactionId, - final Long creditBureauId, final Long organisationCreditBureauId, final String idempotencyKey, - final ExternalId loanExternalId) { + final Long resourceId, final Long subresourceId, final String resourceGetUrl, final Long productId, final Long officeId, + final Long groupId, final Long clientId, final Long loanId, final Long savingsId, final String transactionId, + final Long creditBureauId, final Long organisationCreditBureauId, final String idempotencyKey, + final ExternalId loanExternalId) { return new CommandWrapper(commandId, actionName, entityName, resourceId, subresourceId, resourceGetUrl, productId, officeId, groupId, clientId, loanId, savingsId, transactionId, creditBureauId, organisationCreditBureauId, idempotencyKey, loanExternalId, null); } private CommandWrapper(final Long commandId, final String actionName, final String entityName, final Long resourceId, - final Long subresourceId, final String resourceGetUrl, final Long productId) { + final Long subresourceId, final String resourceGetUrl, final Long productId) { this.commandId = commandId; this.officeId = null; this.groupId = null; @@ -116,10 +117,10 @@ private CommandWrapper(final Long commandId, final String actionName, final Stri } public CommandWrapper(final Long officeId, final Long groupId, final Long clientId, final Long loanId, final Long savingsId, - final String actionName, final String entityName, final Long entityId, final Long subentityId, final String href, - final String json, final String transactionId, final Long productId, final Long templateId, final Long creditBureauId, - final Long organisationCreditBureauId, final String jobName, final String idempotencyKey, final ExternalId loanExternalId, - final Set sanitizeJsonKeys) { + final String actionName, final String entityName, final Long entityId, final Long subentityId, final String href, + final String json, final String transactionId, final Long productId, final Long templateId, final Long creditBureauId, + final Long organisationCreditBureauId, final String jobName, final String idempotencyKey, final ExternalId loanExternalId, + final Set sanitizeJsonKeys) { this.commandId = null; this.officeId = officeId; @@ -146,10 +147,10 @@ public CommandWrapper(final Long officeId, final Long groupId, final Long client } private CommandWrapper(final Long commandId, final String actionName, final String entityName, final Long resourceId, - final Long subresourceId, final String resourceGetUrl, final Long productId, final Long officeId, final Long groupId, - final Long clientId, final Long loanId, final Long savingsId, final String transactionId, final Long creditBureauId, - final Long organisationCreditBureauId, final String idempotencyKey, final ExternalId loanExternalId, - final Set sanitizeJsonKeys) { + final Long subresourceId, final String resourceGetUrl, final Long productId, final Long officeId, final Long groupId, + final Long clientId, final Long loanId, final Long savingsId, final String transactionId, final Long creditBureauId, + final Long organisationCreditBureauId, final String idempotencyKey, final ExternalId loanExternalId, + final Set sanitizeJsonKeys) { this.commandId = commandId; this.officeId = officeId; diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/exception/CommandNotAwaitingApprovalException.java b/fineract-core/src/main/java/org/apache/fineract/commands/exception/CommandNotAwaitingApprovalException.java index 26a28ffdd03..1a38895a75d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/exception/CommandNotAwaitingApprovalException.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/exception/CommandNotAwaitingApprovalException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/exception/CommandNotFoundException.java b/fineract-core/src/main/java/org/apache/fineract/commands/exception/CommandNotFoundException.java index 09a3ed856aa..71a0d40aaf5 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/exception/CommandNotFoundException.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/exception/CommandNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/exception/CommandResultPersistenceException.java b/fineract-core/src/main/java/org/apache/fineract/commands/exception/CommandResultPersistenceException.java index a20b0180755..0e6f93e5919 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/exception/CommandResultPersistenceException.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/exception/CommandResultPersistenceException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/exception/RollbackTransactionNotApprovedException.java b/fineract-core/src/main/java/org/apache/fineract/commands/exception/RollbackTransactionNotApprovedException.java index b0d49e0422c..73d89e1c2b4 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/exception/RollbackTransactionNotApprovedException.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/exception/RollbackTransactionNotApprovedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/exception/UnsupportedCommandException.java b/fineract-core/src/main/java/org/apache/fineract/commands/exception/UnsupportedCommandException.java index f3848e77ffc..480517871fe 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/exception/UnsupportedCommandException.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/exception/UnsupportedCommandException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/handler/NewCommandSourceHandler.java b/fineract-core/src/main/java/org/apache/fineract/commands/handler/NewCommandSourceHandler.java index d2fd82ce1aa..5e69a9d6e77 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/handler/NewCommandSourceHandler.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/handler/NewCommandSourceHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/jobs/PurgeProcessedCommandsConfig.java b/fineract-core/src/main/java/org/apache/fineract/commands/jobs/PurgeProcessedCommandsConfig.java index a0ff3247e79..a6acf5b33e9 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/jobs/PurgeProcessedCommandsConfig.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/jobs/PurgeProcessedCommandsConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/jobs/PurgeProcessedCommandsTasklet.java b/fineract-core/src/main/java/org/apache/fineract/commands/jobs/PurgeProcessedCommandsTasklet.java index de7dc4bf2e4..194a11dd14c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/jobs/PurgeProcessedCommandsTasklet.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/jobs/PurgeProcessedCommandsTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.commands.jobs; import java.time.OffsetDateTime; + import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.commands.domain.CommandProcessingResultType; diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/provider/CommandHandlerProvider.java b/fineract-core/src/main/java/org/apache/fineract/commands/provider/CommandHandlerProvider.java index 38ca3e705f7..eef7c0c9528 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/provider/CommandHandlerProvider.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/provider/CommandHandlerProvider.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.commands.provider; import com.google.common.base.Preconditions; + import java.util.HashMap; + import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.ArrayUtils; diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/service/CommandProcessingService.java b/fineract-core/src/main/java/org/apache/fineract/commands/service/CommandProcessingService.java index 49ed72c787e..d9a33ea28ae 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/service/CommandProcessingService.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/service/CommandProcessingService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/service/IdempotencyKeyGenerator.java b/fineract-core/src/main/java/org/apache/fineract/commands/service/IdempotencyKeyGenerator.java index a9e715507fb..543b72b7e3c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/service/IdempotencyKeyGenerator.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/service/IdempotencyKeyGenerator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.commands.service; import java.util.UUID; + import org.springframework.stereotype.Component; @Component diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/service/IdempotencyKeyResolver.java b/fineract-core/src/main/java/org/apache/fineract/commands/service/IdempotencyKeyResolver.java index 3787b83c570..8a7be4cf954 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/service/IdempotencyKeyResolver.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/service/IdempotencyKeyResolver.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.commands.service; import java.util.Optional; + import lombok.RequiredArgsConstructor; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.infrastructure.core.domain.FineractRequestContextHolder; diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/service/PortfolioCommandSourceWritePlatformService.java b/fineract-core/src/main/java/org/apache/fineract/commands/service/PortfolioCommandSourceWritePlatformService.java index 7a897c5474a..a3ca56dfb41 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/service/PortfolioCommandSourceWritePlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/service/PortfolioCommandSourceWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/service/PortfolioCommandSourceWritePlatformServiceImpl.java b/fineract-core/src/main/java/org/apache/fineract/commands/service/PortfolioCommandSourceWritePlatformServiceImpl.java index 604a07a7a4d..e46fda2e5f9 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/service/PortfolioCommandSourceWritePlatformServiceImpl.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/service/PortfolioCommandSourceWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.commands.service; import com.google.gson.JsonElement; + import java.util.List; import java.util.Objects; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.commands.domain.CommandSource; @@ -62,8 +64,8 @@ public CommandProcessingResult logCommandSource(final CommandWrapper wrapper) { // then allow this operation to proceed. // maker checker doesnt mean anything here. isApprovedByChecker = true; // set to true in case permissions have - // been maker-checker enabled by - // accident. + // been maker-checker enabled by + // accident. } else { // if not user changing their own details - check user has // permission to perform specific task. diff --git a/fineract-core/src/main/java/org/apache/fineract/commands/service/SynchronousCommandProcessingService.java b/fineract-core/src/main/java/org/apache/fineract/commands/service/SynchronousCommandProcessingService.java index db6517ba8f9..f5a2ab16ba4 100644 --- a/fineract-core/src/main/java/org/apache/fineract/commands/service/SynchronousCommandProcessingService.java +++ b/fineract-core/src/main/java/org/apache/fineract/commands/service/SynchronousCommandProcessingService.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import io.github.resilience4j.retry.Retry; + import java.lang.reflect.Type; import java.time.Instant; import java.util.ArrayList; @@ -32,6 +33,7 @@ import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Supplier; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.batch.exception.ErrorInfo; @@ -100,7 +102,7 @@ private CommandProcessingResult retryWrapper(Supplier s @Override public CommandProcessingResult executeCommand(final CommandWrapper wrapper, final JsonCommand command, - final boolean isApprovedByChecker) { + final boolean isApprovedByChecker) { return retryWrapper(() -> { // Do not store the idempotency key because of the exception handling setIdempotencyKeyStoreFlag(false); @@ -142,7 +144,7 @@ public CommandProcessingResult executeCommand(final CommandWrapper wrapper, fina } private CommandProcessingResult executeCommand(final CommandWrapper wrapper, final JsonCommand command, - final boolean isApprovedByChecker, CommandSource commandSource, AppUser user, boolean isEnclosingTransaction) { + final boolean isApprovedByChecker, CommandSource commandSource, AppUser user, boolean isEnclosingTransaction) { final CommandProcessingResult result; try { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/DataIntegrityErrorHandler.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/DataIntegrityErrorHandler.java index 4eb3536983a..ee0fd4b9eec 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/DataIntegrityErrorHandler.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/DataIntegrityErrorHandler.java @@ -6,9 +6,9 @@ * 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 @@ -29,7 +29,7 @@ public class DataIntegrityErrorHandler { public void handleDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve, final String msgType, - final String msgDescription) { + final String msgDescription) { if (realCause.getMessage().contains("external_id")) { final String externalId = command.stringValueOfParameterNamed("externalId"); throw new PlatformDataIntegrityException("error.msg." + msgType + ".duplicate.externalId", diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/data/AccountNumberFormatData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/data/AccountNumberFormatData.java index c04979fa5aa..6d6aa56ee04 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/data/AccountNumberFormatData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/data/AccountNumberFormatData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serializable; import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; public class AccountNumberFormatData implements Serializable { @@ -37,7 +38,7 @@ public class AccountNumberFormatData implements Serializable { private String prefixCharacter; public AccountNumberFormatData(final Long id, final EnumOptionData accountType, final EnumOptionData prefixType, - final String prefixCharacter) { + final String prefixCharacter) { this(id, accountType, prefixType, null, null, prefixCharacter); } @@ -51,8 +52,8 @@ public void templateOnTop(List accountTypeOptions, Map accountTypeOptions, Map> prefixTypeOptions, - final String prefixCharacter) { + final List accountTypeOptions, Map> prefixTypeOptions, + final String prefixCharacter) { this.id = id; this.accountType = accountType; this.prefixType = prefixType; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormat.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormat.java index aaec7836c16..f0fc39a9ad1 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormat.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormat.java @@ -6,9 +6,9 @@ * 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 @@ -27,8 +27,8 @@ import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @Entity -@Table(name = AccountNumberFormatConstants.ACCOUNT_NUMBER_FORMAT_TABLE_NAME, uniqueConstraints = { @UniqueConstraint(columnNames = { - AccountNumberFormatConstants.ACCOUNT_TYPE_ENUM_COLUMN_NAME }, name = AccountNumberFormatConstants.ACCOUNT_TYPE_UNIQUE_CONSTRAINT_NAME) }) +@Table(name = AccountNumberFormatConstants.ACCOUNT_NUMBER_FORMAT_TABLE_NAME, uniqueConstraints = {@UniqueConstraint(columnNames = { + AccountNumberFormatConstants.ACCOUNT_TYPE_ENUM_COLUMN_NAME}, name = AccountNumberFormatConstants.ACCOUNT_TYPE_UNIQUE_CONSTRAINT_NAME)}) public class AccountNumberFormat extends AbstractPersistableCustom { @Column(name = AccountNumberFormatConstants.ACCOUNT_TYPE_ENUM_COLUMN_NAME, nullable = false) diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormatEnumerations.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormatEnumerations.java index b9981464001..de85bbf8195 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormatEnumerations.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormatEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; public final class AccountNumberFormatEnumerations { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormatLookup.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormatLookup.java index b652a5b3a29..15854134bcb 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormatLookup.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormatLookup.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormatRepository.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormatRepository.java index 91f6e799575..be6fead3325 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormatRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormatRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/EntityAccountType.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/EntityAccountType.java index 224223367f7..f3b72352092 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/EntityAccountType.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/EntityAccountType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatConstants.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatConstants.java index 2164c5b9ba4..511995c3342 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberGeneratorService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberGeneratorService.java index 00ff92fbc74..460506b0098 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberGeneratorService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberGeneratorService.java @@ -6,9 +6,9 @@ * 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 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..1f019f2014e 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 @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.HashMap; import java.util.Map; + import lombok.Getter; @Getter diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/ImportData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/ImportData.java index 2b8dc3a6859..1353ccdeea8 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/ImportData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/ImportData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.data; import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -52,8 +53,8 @@ public final class ImportData { private Integer failureCount; public static ImportData instance(final Long importId, final Long documentId, final LocalDate importTime, final LocalDate endTime, - final Boolean completed, final String name, final Long createdBy, final Integer totalRecords, final Integer successCount, - final Integer failureCount) { + final Boolean completed, final String name, final Long createdBy, final Integer totalRecords, final Integer successCount, + final Integer failureCount) { return new ImportData(importId, documentId, importTime, endTime, completed, name, createdBy, totalRecords, successCount, failureCount); } @@ -63,8 +64,8 @@ public static ImportData instance(final Long importId) { } private ImportData(final Long importId, final Long documentId, final LocalDate importTime, final LocalDate endTime, - final Boolean completed, final String name, final Long createdBy, final Integer totalRecords, final Integer successCount, - final Integer failureCount) { + final Boolean completed, final String name, final Long createdBy, final Integer totalRecords, final Integer successCount, + final Integer failureCount) { this.importId = importId; this.documentId = documentId; this.name = name; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookPopulatorService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookPopulatorService.java index 1b983fd4de2..77f0dddd922 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookPopulatorService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookPopulatorService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookService.java index 68889f9dd1f..c3eba6458c2 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.InputStream; import java.util.Collection; + import org.apache.fineract.infrastructure.bulkimport.data.GlobalEntityType; import org.apache.fineract.infrastructure.bulkimport.data.ImportData; import org.glassfish.jersey.media.multipart.FormDataContentDisposition; @@ -27,7 +28,7 @@ public interface BulkImportWorkbookService { Long importWorkbook(String entityType, InputStream inputStream, FormDataContentDisposition fileDetail, String locale, - String dateFormat); + String dateFormat); Collection getImports(GlobalEntityType type); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/command/BusinessDateUpdateCommand.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/command/BusinessDateUpdateCommand.java index a85b362973e..93287058445 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/command/BusinessDateUpdateCommand.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/command/BusinessDateUpdateCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class BusinessDateUpdateCommand extends Command {} +public class BusinessDateUpdateCommand extends Command { +} diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/data/api/BusinessDateResponse.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/data/api/BusinessDateResponse.java index 799f38f0f92..a118cfee31a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/data/api/BusinessDateResponse.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/data/api/BusinessDateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/data/api/BusinessDateUpdateRequest.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/data/api/BusinessDateUpdateRequest.java index 5015d8b6b47..eff569a0f0d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/data/api/BusinessDateUpdateRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/data/api/BusinessDateUpdateRequest.java @@ -6,9 +6,9 @@ * 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 @@ -21,8 +21,10 @@ import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -46,7 +48,7 @@ public class BusinessDateUpdateRequest implements Serializable { @NotBlank(message = "{org.apache.fineract.businessdate.date-format.not-blank}") @DateFormat private String dateFormat; - @Schema(description = "Type of business date", example = "BUSINESS_DATE", allowableValues = { "BUSINESS_DATE", "COB_DATE" }) + @Schema(description = "Type of business date", example = "BUSINESS_DATE", allowableValues = {"BUSINESS_DATE", "COB_DATE"}) @EnumValue(enumClass = BusinessDateType.class, message = "{org.apache.fineract.businessdate.type.invalid}") @NotNull(message = "{org.apache.fineract.businessdate.type.not-blank}") private String type; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/data/api/BusinessDateUpdateResponse.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/data/api/BusinessDateUpdateResponse.java index 013b5f8431f..91d2fec473b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/data/api/BusinessDateUpdateResponse.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/data/api/BusinessDateUpdateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.io.Serializable; import java.time.LocalDate; import java.util.Map; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/data/service/BusinessDateDTO.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/data/service/BusinessDateDTO.java index 57b1db44b49..3c0f491087c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/data/service/BusinessDateDTO.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/data/service/BusinessDateDTO.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.LocalDate; import java.util.HashMap; import java.util.Map; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/domain/BusinessDate.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/domain/BusinessDate.java index e7bec93122c..64250a6d587 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/domain/BusinessDate.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/domain/BusinessDate.java @@ -6,9 +6,9 @@ * 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 @@ -26,7 +26,9 @@ import jakarta.persistence.UniqueConstraint; import jakarta.persistence.Version; import jakarta.validation.constraints.NotNull; + import java.time.LocalDate; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -38,7 +40,7 @@ @NoArgsConstructor @Accessors(chain = true) @Entity -@Table(name = "m_business_date", uniqueConstraints = { @UniqueConstraint(name = "uq_business_date_type", columnNames = { "type" }) }) +@Table(name = "m_business_date", uniqueConstraints = {@UniqueConstraint(name = "uq_business_date_type", columnNames = {"type"})}) public class BusinessDate extends AbstractAuditableWithUTCDateTimeCustom { @Enumerated(EnumType.STRING) diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/domain/BusinessDateRepository.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/domain/BusinessDateRepository.java index 7bf1d1b9206..33a765e1857 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/domain/BusinessDateRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/domain/BusinessDateRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.businessdate.domain; import java.util.Optional; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/domain/BusinessDateType.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/domain/BusinessDateType.java index 6797342c709..8f52957cb74 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/domain/BusinessDateType.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/domain/BusinessDateType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/exception/BusinessDateActionException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/exception/BusinessDateActionException.java index 35d41f21233..96f70f0c6ed 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/exception/BusinessDateActionException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/exception/BusinessDateActionException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/exception/BusinessDateNotFoundException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/exception/BusinessDateNotFoundException.java index 8b5b1d4d787..0d47b901c76 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/exception/BusinessDateNotFoundException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/exception/BusinessDateNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/handler/BusinessDateUpdateHandler.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/handler/BusinessDateUpdateHandler.java index 1c4623615d4..3cde9593c1b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/handler/BusinessDateUpdateHandler.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/handler/BusinessDateUpdateHandler.java @@ -6,9 +6,9 @@ * 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 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..4845b574821 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 @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.businessdate.mapper; import java.util.List; + import org.apache.fineract.infrastructure.businessdate.data.api.BusinessDateResponse; import org.apache.fineract.infrastructure.businessdate.data.api.BusinessDateUpdateRequest; import org.apache.fineract.infrastructure.businessdate.data.api.BusinessDateUpdateResponse; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/service/BusinessDateReadPlatformService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/service/BusinessDateReadPlatformService.java index a482c10c608..f691b54f70d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/service/BusinessDateReadPlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/service/BusinessDateReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.HashMap; import java.util.List; + import org.apache.fineract.infrastructure.businessdate.data.service.BusinessDateDTO; import org.apache.fineract.infrastructure.businessdate.domain.BusinessDateType; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/service/BusinessDateReadPlatformServiceImpl.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/service/BusinessDateReadPlatformServiceImpl.java index 8c9766f31ea..59827f54d15 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/service/BusinessDateReadPlatformServiceImpl.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/service/BusinessDateReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.List; import java.util.Optional; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.businessdate.data.service.BusinessDateDTO; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/service/BusinessDateWritePlatformService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/service/BusinessDateWritePlatformService.java index a82d098f9e4..4922ada156b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/service/BusinessDateWritePlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/service/BusinessDateWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/service/BusinessDateWritePlatformServiceImpl.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/service/BusinessDateWritePlatformServiceImpl.java index 78651615902..4c0d76fe973 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/service/BusinessDateWritePlatformServiceImpl.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/businessdate/service/BusinessDateWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.businessdate.data.service.BusinessDateDTO; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/CacheApiConstants.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/CacheApiConstants.java index a56acf7868e..21db7c40d19 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/CacheApiConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/CacheApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/CacheEnumerations.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/CacheEnumerations.java index 7310e532033..63657a109bc 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/CacheEnumerations.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/CacheEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -36,17 +36,17 @@ public static EnumOptionData cacheType(final CacheType cacheType) { switch (cacheType) { case INVALID: optionData = new EnumOptionData(CacheType.INVALID.getValue().longValue(), CacheType.INVALID.getCode(), "Invalid"); - break; + break; case NO_CACHE: optionData = new EnumOptionData(CacheType.NO_CACHE.getValue().longValue(), CacheType.NO_CACHE.getCode(), "No cache"); - break; + break; case SINGLE_NODE: optionData = new EnumOptionData(CacheType.SINGLE_NODE.getValue().longValue(), CacheType.SINGLE_NODE.getCode(), "Single node"); - break; + break; case MULTI_NODE: optionData = new EnumOptionData(CacheType.MULTI_NODE.getValue().longValue(), CacheType.MULTI_NODE.getCode(), "Multi node"); - break; + break; } return optionData; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/PlatformCacheConfiguration.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/PlatformCacheConfiguration.java index ba8a10c9f30..29b9fe35c00 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/PlatformCacheConfiguration.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/PlatformCacheConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/command/CacheSwitchCommand.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/command/CacheSwitchCommand.java index a8a95889449..62159ec1373 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/command/CacheSwitchCommand.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/command/CacheSwitchCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class CacheSwitchCommand extends Command {} +public class CacheSwitchCommand extends Command { +} diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/data/CacheData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/data/CacheData.java index 6d6eaea5fc6..ca62e66d56a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/data/CacheData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/data/CacheData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/data/CacheSwitchRequest.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/data/CacheSwitchRequest.java index 7aa06c41e71..6bb71322f90 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/data/CacheSwitchRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/data/CacheSwitchRequest.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.cache.data; import jakarta.validation.constraints.NotNull; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/data/CacheSwitchResponse.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/data/CacheSwitchResponse.java index 392412c2ddb..c6c22d163dc 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/data/CacheSwitchResponse.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/data/CacheSwitchResponse.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.util.Map; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/domain/CacheType.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/domain/CacheType.java index ad58ba2adf7..435e588b859 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/domain/CacheType.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/domain/CacheType.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.HashMap; import java.util.Map; + import lombok.Getter; @Getter diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/domain/PlatformCache.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/domain/PlatformCache.java index 1b434c80da5..473f4789489 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/domain/PlatformCache.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/domain/PlatformCache.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/domain/PlatformCacheRepository.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/domain/PlatformCacheRepository.java index 9c78d7a9978..dda580fa835 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/domain/PlatformCacheRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/domain/PlatformCacheRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/handler/CacheSwitchCommandHandler.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/handler/CacheSwitchCommandHandler.java index a07418a25cb..fee6738f9aa 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/handler/CacheSwitchCommandHandler.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/handler/CacheSwitchCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/service/CacheWritePlatformService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/service/CacheWritePlatformService.java index b8d398e57ad..7d0ff2158d2 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/service/CacheWritePlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/service/CacheWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.cache.service; import java.util.Map; + import org.apache.fineract.infrastructure.cache.domain.CacheType; public interface CacheWritePlatformService { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/service/CacheWritePlatformServiceJpaRepositoryImpl.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/service/CacheWritePlatformServiceJpaRepositoryImpl.java index 5afe226a311..d70bc951110 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/service/CacheWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/service/CacheWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.cache.service; import java.util.Map; + import org.apache.fineract.infrastructure.cache.domain.CacheType; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; import org.springframework.beans.factory.annotation.Autowired; @@ -34,7 +35,7 @@ public class CacheWritePlatformServiceJpaRepositoryImpl implements CacheWritePla @Autowired public CacheWritePlatformServiceJpaRepositoryImpl(final ConfigurationDomainService configurationDomainService, - @Qualifier("runtimeDelegatingCacheManager") final RuntimeDelegatingCacheManager cacheService) { + @Qualifier("runtimeDelegatingCacheManager") final RuntimeDelegatingCacheManager cacheService) { this.configurationDomainService = configurationDomainService; this.cacheService = cacheService; } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/service/RuntimeDelegatingCacheManager.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/service/RuntimeDelegatingCacheManager.java index 6e8bcb0dc1c..fa3eff0e74e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/service/RuntimeDelegatingCacheManager.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/cache/service/RuntimeDelegatingCacheManager.java @@ -6,9 +6,9 @@ * 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 @@ -19,11 +19,13 @@ package org.apache.fineract.infrastructure.cache.service; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.util.Arrays; import java.util.Collection; import java.util.HashMap; import java.util.Map; import java.util.Objects; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.cache.CacheApiConstants; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/CodeConstants.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/CodeConstants.java index e2ba4edf01f..6fec253ccbb 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/CodeConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/CodeConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/api/CodeValuesApiResourceSwagger.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/api/CodeValuesApiResourceSwagger.java index 6d79420ef79..002d0b938d3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/api/CodeValuesApiResourceSwagger.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/api/CodeValuesApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -106,7 +106,8 @@ private PutCodeValueDataResponse() { private static final class PutCodeValuechangesSwagger { - private PutCodeValuechangesSwagger() {} + private PutCodeValuechangesSwagger() { + } @Schema(example = "Passport") public String name; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/api/CodesApiResourceSwagger.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/api/CodesApiResourceSwagger.java index 92dbfe02665..c23a45d63ec 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/api/CodesApiResourceSwagger.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/api/CodesApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -86,7 +86,8 @@ private PutCodesResponse() { private static final class PutCodesApichangesSwagger { - private PutCodesApichangesSwagger() {} + private PutCodesApichangesSwagger() { + } @Schema(example = "MyNewCode(changed)") public String name; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/data/CodeData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/data/CodeData.java index d9d94f3af05..77cb70eec41 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/data/CodeData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/data/CodeData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.codes.data; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/data/CodeValueData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/data/CodeValueData.java index 6e6a8284918..93f33bc13ed 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/data/CodeValueData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/data/CodeValueData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.codes.data; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -43,7 +44,7 @@ public class CodeValueData implements Serializable { private Boolean mandatory; public static CodeValueData instance(final Long id, final String name, final String description, final Integer position, - final boolean isActive, final boolean mandatory) { + final boolean isActive, final boolean mandatory) { return new CodeValueData().setId(id).setName(name).setPosition(position).setDescription(description).setActive(isActive) .setMandatory(mandatory); } @@ -67,7 +68,7 @@ public static CodeValueData instance(final Long id, final String name) { } public static CodeValueData instance(final Long id, final String name, final Integer position, final String description, - final boolean isActive, final boolean mandatory) { + final boolean isActive, final boolean mandatory) { return new CodeValueData().setId(id).setName(name).setPosition(position).setDescription(description).setActive(isActive) .setMandatory(mandatory); } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/Code.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/Code.java index f84f3960097..e3dd0f6f9ec 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/Code.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/Code.java @@ -6,9 +6,9 @@ * 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 @@ -25,9 +25,11 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -38,7 +40,7 @@ import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @Entity -@Table(name = "m_code", uniqueConstraints = { @UniqueConstraint(columnNames = { "code_name" }, name = "code_name") }) +@Table(name = "m_code", uniqueConstraints = {@UniqueConstraint(columnNames = {"code_name"}, name = "code_name")}) @Getter @Setter @NoArgsConstructor diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeRepository.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeRepository.java index f20559e39a2..8a78c11a296 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValue.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValue.java index 8e5d9f2d0b0..1f2d8f3092d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValue.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValue.java @@ -6,9 +6,9 @@ * 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 @@ -24,8 +24,10 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.util.LinkedHashMap; import java.util.Map; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -38,7 +40,7 @@ @Entity @Table(name = "m_code_value", uniqueConstraints = { - @UniqueConstraint(columnNames = { "code_id", "code_value" }, name = "code_value_duplicate") }) + @UniqueConstraint(columnNames = {"code_id", "code_value"}, name = "code_value_duplicate")}) @Getter @Setter @NoArgsConstructor @@ -65,7 +67,7 @@ public class CodeValue extends AbstractPersistableCustom { private boolean mandatory; public static CodeValue createNew(final Code code, final String label, final int position, final String description, - final boolean isActive, final boolean mandatory) { + final boolean isActive, final boolean mandatory) { return new CodeValue().setCode(code).setLabel(StringUtils.defaultIfEmpty(label, null)).setPosition(position) .setDescription(description).setActive(isActive).setMandatory(mandatory); } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValueRepository.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValueRepository.java index fbff80ae014..d3e21a9ce47 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValueRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValueRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.codes.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValueRepositoryWrapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValueRepositoryWrapper.java index 5f363c25acc..a45edf57e91 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValueRepositoryWrapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/domain/CodeValueRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/exception/CodeNotFoundException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/exception/CodeNotFoundException.java index 874ec799cfa..1f2fe60c671 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/exception/CodeNotFoundException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/exception/CodeNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/exception/CodeValueNotFoundException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/exception/CodeValueNotFoundException.java index fc9b856668b..12fb29be34a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/exception/CodeValueNotFoundException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/exception/CodeValueNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/exception/SystemDefinedCodeCannotBeChangedException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/exception/SystemDefinedCodeCannotBeChangedException.java index 95f815e6779..17898c9f454 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/exception/SystemDefinedCodeCannotBeChangedException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/exception/SystemDefinedCodeCannotBeChangedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/mapper/CodeValueMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/mapper/CodeValueMapper.java index eca38f69a00..0601ad2df16 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/mapper/CodeValueMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/mapper/CodeValueMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.codes.mapper; import java.util.List; + import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.codes.domain.CodeValue; import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeReadPlatformService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeReadPlatformService.java index b2c5340ff53..0909a71c715 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeReadPlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.codes.service; import java.util.Collection; + import org.apache.fineract.infrastructure.codes.data.CodeData; public interface CodeReadPlatformService { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueReadPlatformService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueReadPlatformService.java index 7243bfba382..9c141e1b7b3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueReadPlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.List; + import org.apache.fineract.infrastructure.codes.data.CodeValueData; /** diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiConstant.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiConstant.java index b8e86d532c8..cd4fcb6e0ef 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiConstant.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiConstant.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationConstants.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationConstants.java index 5064176d114..d153d797af4 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationConstants.java @@ -6,9 +6,9 @@ * 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 @@ -89,5 +89,6 @@ public final class GlobalConfigurationConstants { public static final String ALLOW_CASH_AND_NON_CASH_ACCRUAL = "allow-cash-and-non-cash-accrual"; public static final String BLOCK_TRANSACTIONS_ON_CLOSED_OVERPAID_LOANS = "block-transactions-on-closed-overpaid-loans"; - private GlobalConfigurationConstants() {} + private GlobalConfigurationConstants() { + } } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/data/GlobalConfigurationData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/data/GlobalConfigurationData.java index bf65c8bb2f4..68c1682cf02 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/data/GlobalConfigurationData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/data/GlobalConfigurationData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.configuration.data; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/data/GlobalConfigurationDataValidator.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/data/GlobalConfigurationDataValidator.java index 668d6196a9f..295f0be266e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/data/GlobalConfigurationDataValidator.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/data/GlobalConfigurationDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.time.LocalDate; import java.util.ArrayList; @@ -28,6 +29,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.configuration.api.GlobalConfigurationApiConstant; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -59,7 +61,8 @@ public void validateForUpdate(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, UPDATE_CONFIGURATION_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/data/GlobalConfigurationPropertyData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/data/GlobalConfigurationPropertyData.java index a55846e851f..006264c2f57 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/data/GlobalConfigurationPropertyData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/data/GlobalConfigurationPropertyData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.configuration.data; import java.time.LocalDate; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainService.java index 342ee34ea99..20a60fa8405 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import org.apache.fineract.infrastructure.cache.domain.CacheType; public interface ConfigurationDomainService { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/domain/GlobalConfigurationProperty.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/domain/GlobalConfigurationProperty.java index be576336d31..2b61a8b3e6e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/domain/GlobalConfigurationProperty.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/domain/GlobalConfigurationProperty.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Table; + import java.time.LocalDate; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/domain/GlobalConfigurationRepository.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/domain/GlobalConfigurationRepository.java index f86b36c7fb8..daf5d090fa7 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/domain/GlobalConfigurationRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/domain/GlobalConfigurationRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/domain/GlobalConfigurationRepositoryWrapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/domain/GlobalConfigurationRepositoryWrapper.java index 3d91820f72d..f59b5ccbb48 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/domain/GlobalConfigurationRepositoryWrapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/domain/GlobalConfigurationRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/exception/GlobalConfigurationException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/exception/GlobalConfigurationException.java index 7b20feaf82a..e8a655554ec 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/exception/GlobalConfigurationException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/exception/GlobalConfigurationException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/exception/GlobalConfigurationPropertyNotFoundException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/exception/GlobalConfigurationPropertyNotFoundException.java index f725e5c3689..072ddb9a007 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/exception/GlobalConfigurationPropertyNotFoundException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/exception/GlobalConfigurationPropertyNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/ConfigurationReadPlatformService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/ConfigurationReadPlatformService.java index e6ae44fecdf..ae9ac2abb3d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/ConfigurationReadPlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/ConfigurationReadPlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationValidationService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationValidationService.java index f4018e2b0ef..9a63ac4e0e5 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationValidationService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationValidationService.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static org.apache.commons.collections4.CollectionUtils.isNotEmpty; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.configuration.exception.GlobalConfigurationException; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/MoneyHelperInitializationService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/MoneyHelperInitializationService.java index 34fea1c7d04..4157f3d9d93 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/MoneyHelperInitializationService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/MoneyHelperInitializationService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/MoneyHelperStartupInitializationService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/MoneyHelperStartupInitializationService.java index bdef68fa6a9..fe585e0fce2 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/MoneyHelperStartupInitializationService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/MoneyHelperStartupInitializationService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.configuration.service; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.domain.FineractPlatformTenant; @@ -34,7 +35,7 @@ @Service @Slf4j @RequiredArgsConstructor -@DependsOn({ "tenantDetailsService", "moneyHelperInitializationService", "tenantDatabaseUpgradeService" }) +@DependsOn({"tenantDetailsService", "moneyHelperInitializationService", "tenantDatabaseUpgradeService"}) public class MoneyHelperStartupInitializationService implements InitializingBean { private final TenantDetailsService tenantDetailsService; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/TemporaryConfigurationServiceContainer.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/TemporaryConfigurationServiceContainer.java index 357a09aeffa..1bec3007653 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/TemporaryConfigurationServiceContainer.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/configuration/service/TemporaryConfigurationServiceContainer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/annotation/WithFlushMode.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/annotation/WithFlushMode.java index 2908984a751..12612b4ae88 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/annotation/WithFlushMode.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/annotation/WithFlushMode.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.annotation; import jakarta.persistence.FlushModeType; + import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -28,7 +29,7 @@ * Annotation to specify the flush mode for a method or class. When applied to a class, all public methods will use the * specified flush mode. When applied to a method, it overrides any class-level annotation. */ -@Target({ ElementType.METHOD, ElementType.TYPE }) +@Target({ElementType.METHOD, ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) public @interface WithFlushMode { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/aop/FlushModeAspect.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/aop/FlushModeAspect.java index 4d309b6a2d8..d0dfaa7070f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/aop/FlushModeAspect.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/aop/FlushModeAspect.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ApiFacingEnum.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ApiFacingEnum.java index 55298cf894d..7403620c4d7 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ApiFacingEnum.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ApiFacingEnum.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.List; + import org.apache.fineract.infrastructure.core.data.StringEnumOptionData; public interface ApiFacingEnum & ApiFacingEnum> { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ApiParameterHelper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ApiParameterHelper.java index db4d7f060f6..39f3b571e9c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ApiParameterHelper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ApiParameterHelper.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.infrastructure.core.api; import jakarta.ws.rs.core.MultivaluedMap; + import java.util.Arrays; import java.util.HashSet; import java.util.Locale; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.serialization.JsonParserHelper; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ApiRequestParameterHelper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ApiRequestParameterHelper.java index 7c254de3d8a..5fa5b771757 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ApiRequestParameterHelper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ApiRequestParameterHelper.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.infrastructure.core.api; import jakarta.ws.rs.core.MultivaluedMap; + import java.util.Set; + import org.apache.fineract.infrastructure.core.serialization.ApiRequestJsonSerializationSettings; import org.springframework.stereotype.Component; @@ -37,7 +39,7 @@ public class ApiRequestParameterHelper { public ApiRequestJsonSerializationSettings process(final MultivaluedMap queryParameters, - final Set mandatoryResponseParameters) { + final Set mandatoryResponseParameters) { final Set responseParameters = ApiParameterHelper.extractFieldsForResponseIfProvided(queryParameters); if (!responseParameters.isEmpty()) { responseParameters.addAll(mandatoryResponseParameters); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/DateAdapter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/DateAdapter.java index 95a9c158ba4..92b459414db 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/DateAdapter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/DateAdapter.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; + import java.lang.reflect.Type; import java.time.format.DateTimeFormatter; import java.util.Date; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/DateParam.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/DateParam.java index 1fd8f1845e0..a58f17454b8 100755 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/DateParam.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/DateParam.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.Locale; + import org.apache.fineract.infrastructure.core.data.DateFormat; import org.apache.fineract.infrastructure.core.serialization.JsonParserHelper; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ExternalIdAdapter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ExternalIdAdapter.java index 7d46c9a3d14..f913d32a6ce 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ExternalIdAdapter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ExternalIdAdapter.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; + import java.lang.reflect.Type; + import org.apache.fineract.infrastructure.core.domain.ExternalId; /** diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/IdTypeResolver.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/IdTypeResolver.java index 96a688ced2c..08ca54d14b6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/IdTypeResolver.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/IdTypeResolver.java @@ -6,9 +6,9 @@ * 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 @@ -33,7 +33,8 @@ public enum IdType implements DefaultOption { ID, // EXTERNAL_ID, // - SHORT_NAME,; // + SHORT_NAME, + ; // @Override public boolean isDefault() { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/JodaDateTimeAdapter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/JodaDateTimeAdapter.java index 22c07d3a66a..ae2cebd6cee 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/JodaDateTimeAdapter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/JodaDateTimeAdapter.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; + import java.lang.reflect.Type; import java.time.ZonedDateTime; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/JodaMonthDayAdapter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/JodaMonthDayAdapter.java index aeb4a5bfae9..2f70b703cd6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/JodaMonthDayAdapter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/JodaMonthDayAdapter.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; + import java.lang.reflect.Type; import java.time.MonthDay; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/JsonCommand.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/JsonCommand.java index a629c78dbc4..6776ca5376a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/JsonCommand.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/JsonCommand.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -34,6 +35,7 @@ import java.util.Map; import java.util.Objects; import java.util.Set; + import lombok.Getter; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; @@ -74,9 +76,9 @@ public final class JsonCommand { private final ExternalId loanExternalId; public static JsonCommand from(final String jsonCommand, final JsonElement parsedCommand, final FromJsonHelper fromApiJsonHelper, - final String entityName, final Long resourceId, final Long subresourceId, final Long groupId, final Long clientId, - final Long loanId, final Long savingsId, final String transactionId, final String url, final Long productId, - final Long creditBureauId, final Long organisationCreditBureauId, final String jobName, final ExternalId loanExternalId) { + final String entityName, final Long resourceId, final Long subresourceId, final Long groupId, final Long clientId, + final Long loanId, final Long savingsId, final String transactionId, final String url, final Long productId, + final Long creditBureauId, final Long organisationCreditBureauId, final String jobName, final ExternalId loanExternalId) { return new JsonCommand(null, jsonCommand, parsedCommand, fromApiJsonHelper, entityName, resourceId, subresourceId, groupId, clientId, loanId, savingsId, transactionId, url, productId, creditBureauId, organisationCreditBureauId, jobName, loanExternalId); @@ -84,18 +86,18 @@ public static JsonCommand from(final String jsonCommand, final JsonElement parse } public static JsonCommand fromExistingCommand(final Long commandId, final String jsonCommand, final JsonElement parsedCommand, - final FromJsonHelper fromApiJsonHelper, final String entityName, final Long resourceId, final Long subresourceId, - final String url, final Long productId, final Long creditBureauId, final Long organisationCreditBureauId, final String jobName, - final ExternalId loanExternalId) { + final FromJsonHelper fromApiJsonHelper, final String entityName, final Long resourceId, final Long subresourceId, + final String url, final Long productId, final Long creditBureauId, final Long organisationCreditBureauId, final String jobName, + final ExternalId loanExternalId) { return new JsonCommand(commandId, jsonCommand, parsedCommand, fromApiJsonHelper, entityName, resourceId, subresourceId, null, null, null, null, null, url, productId, creditBureauId, organisationCreditBureauId, jobName, loanExternalId); } public static JsonCommand fromExistingCommand(final Long commandId, final String jsonCommand, final JsonElement parsedCommand, - final FromJsonHelper fromApiJsonHelper, final String entityName, final Long resourceId, final Long subresourceId, - final Long groupId, final Long clientId, final Long loanId, final Long savingsId, final String transactionId, final String url, - final Long productId, Long creditBureauId, final Long organisationCreditBureauId, final String jobName, - final ExternalId loanExternalId) { + final FromJsonHelper fromApiJsonHelper, final String entityName, final Long resourceId, final Long subresourceId, + final Long groupId, final Long clientId, final Long loanId, final Long savingsId, final String transactionId, final String url, + final Long productId, Long creditBureauId, final Long organisationCreditBureauId, final String jobName, + final ExternalId loanExternalId) { return new JsonCommand(commandId, jsonCommand, parsedCommand, fromApiJsonHelper, entityName, resourceId, subresourceId, groupId, clientId, loanId, savingsId, transactionId, url, productId, creditBureauId, organisationCreditBureauId, jobName, loanExternalId); @@ -119,10 +121,10 @@ public static JsonCommand fromExistingCommand(JsonCommand command, final JsonEle } public JsonCommand(final Long commandId, final String jsonCommand, final JsonElement parsedCommand, - final FromJsonHelper fromApiJsonHelper, final String entityName, final Long resourceId, final Long subresourceId, - final Long groupId, final Long clientId, final Long loanId, final Long savingsId, final String transactionId, final String url, - final Long productId, final Long creditBureauId, final Long organisationCreditBureauId, final String jobName, - final ExternalId loanExternalId) { + final FromJsonHelper fromApiJsonHelper, final String entityName, final Long resourceId, final Long subresourceId, + final Long groupId, final Long clientId, final Long loanId, final Long savingsId, final String transactionId, final String url, + final Long productId, final Long creditBureauId, final Long organisationCreditBureauId, final String jobName, + final ExternalId loanExternalId) { this.commandId = commandId; this.jsonCommand = jsonCommand; @@ -149,7 +151,7 @@ public static JsonCommand fromJsonElement(final Long resourceId, final JsonEleme } public static JsonCommand fromJsonElement(final Long resourceId, final JsonElement parsedCommand, - final FromJsonHelper fromApiJsonHelper) { + final FromJsonHelper fromApiJsonHelper) { return new JsonCommand(resourceId, parsedCommand, fromApiJsonHelper); } @@ -375,13 +377,15 @@ public String stringValueOfParameterNamedAllowingNull(final String parameterName } public Map mapValueOfParameterNamed(final String json) { - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final Map value = this.fromApiJsonHelper.extractDataMap(typeOfMap, json); return value; } public Map mapObjectValueOfParameterNamed(final String json) { - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final Map value = this.fromApiJsonHelper.extractObjectMap(typeOfMap, json); return value; } @@ -561,7 +565,7 @@ public JsonArray arrayOfParameterNamed(final String parameterName) { } public boolean isChangeInPasswordParameterNamed(final String parameterName, final String existingValue, - final PlatformPasswordEncoder platformPasswordEncoder, final Long saltValue) { + final PlatformPasswordEncoder platformPasswordEncoder, final Long saltValue) { boolean isChanged = false; if (parameterExists(parameterName)) { final String workingValue = passwordValueOfParameterNamed(parameterName, platformPasswordEncoder, saltValue); @@ -581,7 +585,7 @@ public boolean isChangeInExternalIdParameterNamed(final String parameterName, fi } public String passwordValueOfParameterNamed(final String parameterName, final PlatformPasswordEncoder platformPasswordEncoder, - final Long saltValue) { + final Long saltValue) { final String passwordPlainText = stringValueOfParameterNamed(parameterName); final PlatformUser dummyPlatformUser = new BasicPasswordEncodablePlatformUser().setId(saltValue).setUsername("") diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/LocalDateAdapter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/LocalDateAdapter.java index b2dccfea12b..9445c50cf76 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/LocalDateAdapter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/LocalDateAdapter.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; + import java.lang.reflect.Type; import java.time.LocalDate; import java.time.temporal.ChronoField; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/LocalDateTimeAdapter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/LocalDateTimeAdapter.java index b9a66acec59..f2ff8a8a715 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/LocalDateTimeAdapter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/LocalDateTimeAdapter.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; + import java.lang.reflect.Type; import java.time.LocalDateTime; import java.time.temporal.ChronoField; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/LocalTimeAdapter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/LocalTimeAdapter.java index cb061e4dac6..a32bc7b57aa 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/LocalTimeAdapter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/LocalTimeAdapter.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; + import java.lang.reflect.Type; import java.time.LocalTime; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/MutableUriInfo.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/MutableUriInfo.java index cb3dc1df513..a37c784ed97 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/MutableUriInfo.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/MutableUriInfo.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import jakarta.ws.rs.core.PathSegment; import jakarta.ws.rs.core.UriBuilder; import jakarta.ws.rs.core.UriInfo; + import java.net.URI; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/OffsetDateTimeAdapter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/OffsetDateTimeAdapter.java index c98f5610d4e..48186089915 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/OffsetDateTimeAdapter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/OffsetDateTimeAdapter.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; + import java.lang.reflect.Type; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ParameterListExclusionStrategy.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ParameterListExclusionStrategy.java index 22d5a03b8b5..6d8ee5443c8 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ParameterListExclusionStrategy.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ParameterListExclusionStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.ExclusionStrategy; import com.google.gson.FieldAttributes; + import java.util.Set; // FIXME - KW - General thing to fix about REST API is if use partial response approach of fields=id,name,selectedPermissions diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ParameterListInclusionStrategy.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ParameterListInclusionStrategy.java index 78e5b10d53a..85991cc4719 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ParameterListInclusionStrategy.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/ParameterListInclusionStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.ExclusionStrategy; import com.google.gson.FieldAttributes; + import java.util.Set; public class ParameterListInclusionStrategy implements ExclusionStrategy { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/jersey/PageableParamProvider.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/jersey/PageableParamProvider.java index be3783760e1..a37951758af 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/jersey/PageableParamProvider.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/jersey/PageableParamProvider.java @@ -6,9 +6,9 @@ * 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 @@ -20,11 +20,13 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.MultivaluedMap; + import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; + import org.glassfish.jersey.server.ContainerRequest; import org.glassfish.jersey.server.model.Parameter; import org.glassfish.jersey.server.spi.internal.ValueParamProvider; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/jersey/Pagination.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/jersey/Pagination.java index f5bc10228ff..6af8ecca4ad 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/jersey/Pagination.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/api/jersey/Pagination.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; + import org.springframework.core.annotation.AliasFor; @Target(ElementType.PARAMETER) diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/boot/FineractProfiles.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/boot/FineractProfiles.java index 97aca9634f2..3696c208b89 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/boot/FineractProfiles.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/boot/FineractProfiles.java @@ -6,9 +6,9 @@ * 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 @@ -25,5 +25,6 @@ public final class FineractProfiles { public static final String TEST = "test"; - private FineractProfiles() {} + private FineractProfiles() { + } } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/component/FetcherRule.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/component/FetcherRule.java index 746d8853163..9ceae6ad8f9 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/component/FetcherRule.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/component/FetcherRule.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.function.Function; import java.util.function.Predicate; + import lombok.RequiredArgsConstructor; @RequiredArgsConstructor diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/EnableFineractEventListenerCondition.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/EnableFineractEventListenerCondition.java index f13d28e1ece..292bf0dda34 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/EnableFineractEventListenerCondition.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/EnableFineractEventListenerCondition.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.condition; import java.util.Optional; + import org.apache.fineract.infrastructure.instancemode.api.FineractInstanceModeConstants; import org.springframework.context.annotation.Condition; import org.springframework.context.annotation.ConditionContext; @@ -29,13 +30,13 @@ public class EnableFineractEventListenerCondition implements Condition { @Override public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) { boolean isReadModeEnabled = Optional.ofNullable( - context.getEnvironment().getProperty(FineractInstanceModeConstants.FINERACT_MODE_READ_ENABLE_PROPERTY, Boolean.class)) + context.getEnvironment().getProperty(FineractInstanceModeConstants.FINERACT_MODE_READ_ENABLE_PROPERTY, Boolean.class)) .orElse(true); boolean isWriteModeEnabled = Optional.ofNullable( - context.getEnvironment().getProperty(FineractInstanceModeConstants.FINERACT_MODE_WRITE_ENABLE_PROPERTY, Boolean.class)) + context.getEnvironment().getProperty(FineractInstanceModeConstants.FINERACT_MODE_WRITE_ENABLE_PROPERTY, Boolean.class)) .orElse(true); boolean isBatchModeEnabled = Optional.ofNullable( - context.getEnvironment().getProperty(FineractInstanceModeConstants.FINERACT_MODE_BATCH_ENABLE_PROPERTY, Boolean.class)) + context.getEnvironment().getProperty(FineractInstanceModeConstants.FINERACT_MODE_BATCH_ENABLE_PROPERTY, Boolean.class)) .orElse(true); return (isReadModeEnabled && isBatchModeEnabled && isWriteModeEnabled) // All mode || (!isReadModeEnabled && !isBatchModeEnabled && isWriteModeEnabled); // Write mode diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/EnableFineractEventsCondition.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/EnableFineractEventsCondition.java index b910710282e..bcae8e00d2b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/EnableFineractEventsCondition.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/EnableFineractEventsCondition.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.condition; import java.util.Optional; + import org.apache.fineract.infrastructure.instancemode.api.FineractInstanceModeConstants; import org.springframework.context.annotation.Condition; import org.springframework.context.annotation.ConditionContext; @@ -29,13 +30,13 @@ public class EnableFineractEventsCondition implements Condition { @Override public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) { boolean isReadModeEnabled = Optional.ofNullable( - context.getEnvironment().getProperty(FineractInstanceModeConstants.FINERACT_MODE_READ_ENABLE_PROPERTY, Boolean.class)) + context.getEnvironment().getProperty(FineractInstanceModeConstants.FINERACT_MODE_READ_ENABLE_PROPERTY, Boolean.class)) .orElse(true); boolean isWriteModeEnabled = Optional.ofNullable( - context.getEnvironment().getProperty(FineractInstanceModeConstants.FINERACT_MODE_WRITE_ENABLE_PROPERTY, Boolean.class)) + context.getEnvironment().getProperty(FineractInstanceModeConstants.FINERACT_MODE_WRITE_ENABLE_PROPERTY, Boolean.class)) .orElse(true); boolean isBatchModeEnabled = Optional.ofNullable( - context.getEnvironment().getProperty(FineractInstanceModeConstants.FINERACT_MODE_BATCH_ENABLE_PROPERTY, Boolean.class)) + context.getEnvironment().getProperty(FineractInstanceModeConstants.FINERACT_MODE_BATCH_ENABLE_PROPERTY, Boolean.class)) .orElse(true); return !isReadModeEnabled && (isWriteModeEnabled || isBatchModeEnabled); } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractExternalEventConfigCondition.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractExternalEventConfigCondition.java index 715484bfa6b..ba084addba9 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractExternalEventConfigCondition.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractExternalEventConfigCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractLiquibaseOnlyApplicationCondition.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractLiquibaseOnlyApplicationCondition.java index 1721c6dd1ba..4709da84522 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractLiquibaseOnlyApplicationCondition.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractLiquibaseOnlyApplicationCondition.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.condition; import java.util.List; + import org.apache.fineract.infrastructure.core.boot.FineractProfiles; public class FineractLiquibaseOnlyApplicationCondition extends ProfileCondition { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractModeValidationCondition.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractModeValidationCondition.java index 2e32c09ff55..b5a117109c3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractModeValidationCondition.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractModeValidationCondition.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.condition; import java.util.Optional; + import lombok.extern.slf4j.Slf4j; import org.springframework.context.annotation.Condition; import org.springframework.context.annotation.ConditionContext; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractPartitionJobConfigValidationCondition.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractPartitionJobConfigValidationCondition.java index 4f54c026650..51562ba2448 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractPartitionJobConfigValidationCondition.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractPartitionJobConfigValidationCondition.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.function.Predicate; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.config.ExplicitConfigurationPropertiesFactory; import org.apache.fineract.infrastructure.core.config.FineractProperties; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractRemoteJobMessageHandlerCondition.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractRemoteJobMessageHandlerCondition.java index 95d55a28d28..23ae69ee9ca 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractRemoteJobMessageHandlerCondition.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractRemoteJobMessageHandlerCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractValidationCondition.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractValidationCondition.java index afebbf40758..c7f7bfcd1b4 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractValidationCondition.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractValidationCondition.java @@ -6,9 +6,9 @@ * 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 @@ -28,14 +28,18 @@ public FineractValidationCondition() { } @Conditional(FineractModeValidationCondition.class) - static class FineractModeValidation {} + static class FineractModeValidation { + } @Conditional(FineractPartitionJobConfigValidationCondition.class) - static class FineractPartitionedJobValidation {} + static class FineractPartitionedJobValidation { + } @Conditional(FineractRemoteJobMessageHandlerCondition.class) - static class FineractRemoteJobMessageHandlerValidation {} + static class FineractRemoteJobMessageHandlerValidation { + } @Conditional(FineractExternalEventConfigCondition.class) - static class FineractExternalEventConfigValidation {} + static class FineractExternalEventConfigValidation { + } } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractWebApplicationCondition.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractWebApplicationCondition.java index 44cc02093b3..281afbfb57b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractWebApplicationCondition.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/FineractWebApplicationCondition.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.condition; import java.util.List; + import org.apache.fineract.infrastructure.core.boot.FineractProfiles; public class FineractWebApplicationCondition extends ProfileCondition { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/ProfileCondition.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/ProfileCondition.java index 4404abbce0c..534fe6ff623 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/ProfileCondition.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/ProfileCondition.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.List; + import org.springframework.context.annotation.Condition; import org.springframework.context.annotation.ConditionContext; import org.springframework.core.type.AnnotatedTypeMetadata; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/PropertiesCondition.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/PropertiesCondition.java index 3f18cadde6c..fb0081638e5 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/PropertiesCondition.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/PropertiesCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/SpringPropertiesFactory.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/SpringPropertiesFactory.java index 5f3d3d0a741..e48c4c37404 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/SpringPropertiesFactory.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/condition/SpringPropertiesFactory.java @@ -6,9 +6,9 @@ * 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 @@ -27,7 +27,8 @@ public abstract class SpringPropertiesFactory { - private SpringPropertiesFactory() {} + private SpringPropertiesFactory() { + } public static T get(Environment environment, Class clazz) { ConfigurationProperties configurationProperties = clazz.getAnnotation(ConfigurationProperties.class); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/config/AbstractFineractModuleProperties.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/config/AbstractFineractModuleProperties.java index 93329119fba..de43dbdb463 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/config/AbstractFineractModuleProperties.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/config/AbstractFineractModuleProperties.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/config/ExplicitConfigurationPropertiesFactory.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/config/ExplicitConfigurationPropertiesFactory.java index 98e67389034..5181bd08bc3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/config/ExplicitConfigurationPropertiesFactory.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/config/ExplicitConfigurationPropertiesFactory.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,8 @@ public final class ExplicitConfigurationPropertiesFactory { - private ExplicitConfigurationPropertiesFactory() {} + private ExplicitConfigurationPropertiesFactory() { + } public static T getProperty(ConditionContext context, String propertyName, Class type) { return Binder.get(context.getEnvironment()).bind(propertyName, type).orElse(null); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/config/FineractProperties.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/config/FineractProperties.java index e9b3ae992a5..0c71b8a007a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/config/FineractProperties.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/config/FineractProperties.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.Getter; import lombok.Setter; import lombok.extern.slf4j.Slf4j; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/config/MapstructMapperConfig.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/config/MapstructMapperConfig.java index 30938deffae..fd82006b1e6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/config/MapstructMapperConfig.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/config/MapstructMapperConfig.java @@ -6,9 +6,9 @@ * 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 @@ -26,5 +26,6 @@ import org.mapstruct.ReportingPolicy; @MapperConfig(componentModel = MappingConstants.ComponentModel.SPRING, unmappedTargetPolicy = ReportingPolicy.ERROR, builder = @Builder(disableBuilder = true), uses = { - ExternalIdMapper.class }, injectionStrategy = InjectionStrategy.CONSTRUCTOR) -public class MapstructMapperConfig {} + ExternalIdMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +public class MapstructMapperConfig { +} diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/ApiErrorMessageArg.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/ApiErrorMessageArg.java index 1ced5ad8fa7..261eb7c5d9b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/ApiErrorMessageArg.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/ApiErrorMessageArg.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/ApiGlobalErrorResponse.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/ApiGlobalErrorResponse.java index ecd2c9c509e..73dbbd1e6e7 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/ApiGlobalErrorResponse.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/ApiGlobalErrorResponse.java @@ -6,9 +6,9 @@ * 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 @@ -31,9 +31,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.gson.Gson; + import java.util.ArrayList; import java.util.Collections; import java.util.List; + import lombok.Getter; import lombok.Setter; @@ -69,10 +71,11 @@ public class ApiGlobalErrorResponse { private List errors = new ArrayList<>(); - protected ApiGlobalErrorResponse() {} + protected ApiGlobalErrorResponse() { + } public static ApiGlobalErrorResponse create(int statusCode, String msgCode, String developerMessage, String defaultUserMessage, - List errors) { + List errors) { ApiGlobalErrorResponse response = new ApiGlobalErrorResponse(); response.setHttpStatusCode(String.valueOf(statusCode)); response.setUserMessageGlobalisationCode(msgCode); @@ -132,7 +135,7 @@ public static ApiGlobalErrorResponse unAuthorized(final String defaultUserMessag } public static ApiGlobalErrorResponse domainRuleViolation(final String globalisationMessageCode, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { final List errors = new ArrayList<>(); errors.add(ApiParameterError.generalError(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs)); @@ -141,7 +144,7 @@ public static ApiGlobalErrorResponse domainRuleViolation(final String globalisat } public static ApiGlobalErrorResponse notImplemented(final String globalisationMessageCode, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { final List errors = new ArrayList<>(); errors.add(ApiParameterError.generalError(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs)); @@ -150,7 +153,7 @@ public static ApiGlobalErrorResponse notImplemented(final String globalisationMe } public static ApiGlobalErrorResponse dataIntegrityError(final String globalisationMessageCode, final String defaultUserMessage, - final String parameterName, final Object... defaultUserMessageArgs) { + final String parameterName, final Object... defaultUserMessageArgs) { final List errors = new ArrayList<>(); final String developerMessage = "The request caused a data integrity issue to be fired by the database."; errors.add(ApiParameterError.parameterError(globalisationMessageCode, developerMessage, defaultUserMessage, parameterName, @@ -160,7 +163,7 @@ public static ApiGlobalErrorResponse dataIntegrityError(final String globalisati } public static ApiGlobalErrorResponse notFound(final String globalisationMessageCode, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { String msg = "The requested resource is not available."; final List errors = new ArrayList<>(); errors.add(ApiParameterError.resourceIdentifierNotFound(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs)); @@ -169,7 +172,7 @@ public static ApiGlobalErrorResponse notFound(final String globalisationMessageC } public static ApiGlobalErrorResponse badClientRequest(final String globalisationMessageCode, final String defaultUserMessage, - final List errors) { + final List errors) { return create(SC_BAD_REQUEST, globalisationMessageCode, "The request was invalid. This typically will happen due to validation errors which are provided.", defaultUserMessage, errors); @@ -184,7 +187,7 @@ public static ApiGlobalErrorResponse jobIsDisabled(final String globalisationMes } public static ApiGlobalErrorResponse serverSideError(final String globalisationMessageCode, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { String msg = "An unexpected error occured on the platform server."; final List errors = new ArrayList<>(); errors.add(ApiParameterError.generalError(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs)); @@ -193,7 +196,7 @@ public static ApiGlobalErrorResponse serverSideError(final String globalisationM } public static ApiGlobalErrorResponse serviceUnavailable(final String globalisationMessageCode, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { String msg = "The server is currently unable to handle the request , please try after some time."; final List errors = new ArrayList<>(); errors.add(ApiParameterError.generalError(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs)); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/ApiParameterError.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/ApiParameterError.java index 29f9d2effa8..567ef30c687 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/ApiParameterError.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/ApiParameterError.java @@ -6,9 +6,9 @@ * 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 @@ -58,12 +58,12 @@ public final class ApiParameterError { private final List args; public static ApiParameterError generalError(final String globalisationMessageCode, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { return new ApiParameterError(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs, "id", null); } public static ApiParameterError resourceIdentifierNotFound(final String globalisationMessageCode, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { return new ApiParameterError(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs, "id", null); } @@ -74,12 +74,12 @@ public static ApiParameterError parameterError(final String globalisationMessage } public static ApiParameterError parameterError(final String globalisationMessageCode, final String defaultUserMessage, - final String parameterName, final Object... defaultUserMessageArgs) { + final String parameterName, final Object... defaultUserMessageArgs) { return new ApiParameterError(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs, parameterName, null); } public static ApiParameterError parameterErrorWithValue(final String globalisationMessageCode, final String defaultUserMessage, - final String parameterName, final String value, final Object... defaultUserMessageArgs) { + final String parameterName, final String value, final Object... defaultUserMessageArgs) { return new ApiParameterError(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs, parameterName, value); } @@ -107,7 +107,7 @@ private ApiParameterError(final String globalisationMessageCode, final String de } private ApiParameterError(final String globalisationMessageCode, final String defaultUserMessage, final Object[] defaultUserMessageArgs, - String parameterName, String value) { + String parameterName, String value) { this.userMessageGlobalisationCode = globalisationMessageCode; this.developerMessage = defaultUserMessage; this.defaultUserMessage = defaultUserMessage; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/BaseEnumOptionData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/BaseEnumOptionData.java index ca81d716e37..e38b4452a36 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/BaseEnumOptionData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/BaseEnumOptionData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.data; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.Getter; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResult.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResult.java index 5ec8a948b12..6886f716515 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResult.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResult.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.util.Map; + import lombok.Getter; import lombok.ToString; import org.apache.fineract.infrastructure.core.domain.ExternalId; @@ -52,10 +53,10 @@ public class CommandProcessingResult implements Serializable { private final ExternalId loanExternalId; private CommandProcessingResult(final Long commandId, final Long officeId, final Long groupId, final Long clientId, final Long loanId, - final Long savingsId, final String resourceIdentifier, final Long resourceId, final String transactionId, - final Map changes, final Long productId, final Long gsimId, final Long glimId, - final Map creditBureauReportData, Boolean rollbackTransaction, final Long subResourceId, - final ExternalId resourceExternalId, final ExternalId subResourceExternalId, final ExternalId loanExternalId) { + final Long savingsId, final String resourceIdentifier, final Long resourceId, final String transactionId, + final Map changes, final Long productId, final Long gsimId, final Long glimId, + final Map creditBureauReportData, Boolean rollbackTransaction, final Long subResourceId, + final ExternalId resourceExternalId, final ExternalId subResourceExternalId, final ExternalId loanExternalId) { this.commandId = commandId; this.officeId = officeId; this.groupId = groupId; @@ -78,7 +79,7 @@ private CommandProcessingResult(final Long commandId, final Long officeId, final } protected CommandProcessingResult(final Long resourceId, final Long officeId, final Long commandId, final Map changes, - Long clientId) { + Long clientId) { this(commandId, officeId, null, clientId, null, null, resourceId == null ? null : resourceId.toString(), resourceId, null, changes, null, null, null, null, null, null, ExternalId.empty(), ExternalId.empty(), ExternalId.empty()); } @@ -104,10 +105,10 @@ public static CommandProcessingResult fromCommandProcessingResult(CommandProcess } public static CommandProcessingResult fromDetails(final Long commandId, final Long officeId, final Long groupId, final Long clientId, - final Long loanId, final Long savingsId, final String resourceIdentifier, final Long entityId, final Long gsimId, - final Long glimId, final Map creditBureauReportData, final String transactionId, - final Map changes, final Long productId, final Boolean rollbackTransaction, final Long subResourceId, - final ExternalId resourceExternalId, final ExternalId subResourceExternalId, final ExternalId loanExternalId) { + final Long loanId, final Long savingsId, final String resourceIdentifier, final Long entityId, final Long gsimId, + final Long glimId, final Map creditBureauReportData, final String transactionId, + final Map changes, final Long productId, final Boolean rollbackTransaction, final Long subResourceId, + final ExternalId resourceExternalId, final ExternalId subResourceExternalId, final ExternalId loanExternalId) { return new CommandProcessingResult(commandId, officeId, groupId, clientId, loanId, savingsId, resourceIdentifier, entityId, transactionId, changes, productId, gsimId, glimId, creditBureauReportData, rollbackTransaction, subResourceId, resourceExternalId, subResourceExternalId, loanExternalId); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResultBuilder.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResultBuilder.java index 359820d91a4..56ca341da24 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResultBuilder.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/CommandProcessingResultBuilder.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.data; import java.util.Map; + import org.apache.fineract.infrastructure.core.domain.ExternalId; /** diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/DataValidatorBuilder.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/DataValidatorBuilder.java index 5f28d80ee2b..2c597a7207e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/DataValidatorBuilder.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/DataValidatorBuilder.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.common.base.Splitter; import com.google.gson.JsonArray; + import java.math.BigDecimal; import java.text.ParseException; import java.time.LocalDate; @@ -29,6 +30,7 @@ import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; + import lombok.Getter; import net.fortuna.ical4j.model.property.RRule; import net.fortuna.ical4j.validate.ValidationException; @@ -1160,7 +1162,7 @@ public void throwValidationErrors() throws PlatformApiDataValidationException { } public static ApiParameterError buildValidationParameterApiError(final String resource, final String parameterName, - final String errorCode, final String errorMessage, final Object... defaultUserMessageArgs) { + final String errorCode, final String errorMessage, final Object... defaultUserMessageArgs) { final String validationErrorCode = "validation.msg." + resource + "." + parameterName + errorCode; String defaultEnglishMessage = "The parameter `" + parameterName + "` " + errorMessage; return ApiParameterError.parameterError(validationErrorCode, defaultEnglishMessage, parameterName, defaultUserMessageArgs); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/DateFormat.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/DateFormat.java index f24c785c435..7fca02a4ca4 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/DateFormat.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/DateFormat.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.time.format.ResolverStyle; import java.time.temporal.ChronoField; import java.util.List; + import lombok.Getter; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/EnumOptionData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/EnumOptionData.java index f3c027a84bc..b7f108d4454 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/EnumOptionData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/EnumOptionData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.data; import java.io.Serializable; + import lombok.Getter; /** diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/GenericEnumListConverter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/GenericEnumListConverter.java index 771ff5441dc..5ec18bd9f08 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/GenericEnumListConverter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/GenericEnumListConverter.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.infrastructure.core.data; import jakarta.persistence.AttributeConverter; + import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; + import org.apache.commons.lang3.StringUtils; public abstract class GenericEnumListConverter> implements AttributeConverter, String> { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/PaginationParameters.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/PaginationParameters.java index aba4790538a..1b0722f2605 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/PaginationParameters.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/PaginationParameters.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/PaginationParametersDataValidator.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/PaginationParametersDataValidator.java index f8a17b57fc8..d7d564241a1 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/PaginationParametersDataValidator.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/PaginationParametersDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; + import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; import org.springframework.stereotype.Component; @@ -32,7 +33,7 @@ public class PaginationParametersDataValidator { private static final Set sortOrderValues = new HashSet<>(Arrays.asList("ASC", "DESC")); public void validateParameterValues(PaginationParameters parameters, final Set supportedOrdeByValues, - final String resourceName) { + final String resourceName) { final List dataValidationErrors = new ArrayList<>(); if (parameters.hasOrderBy() && !supportedOrdeByValues.contains(parameters.getOrderBy())) { final String defaultUserMessage = "The orderBy value '" + parameters.getOrderBy() diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/StringEnumOptionData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/StringEnumOptionData.java index ec5c152d732..7f9eb3b7712 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/StringEnumOptionData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/StringEnumOptionData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.data; import java.io.Serializable; + import lombok.Getter; /** diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/UploadRequest.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/UploadRequest.java index 770fdf4bef4..117038c1c2c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/UploadRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/data/UploadRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,8 +20,10 @@ import io.swagger.v3.oas.annotations.media.Schema; import jakarta.ws.rs.core.UriInfo; + import java.io.File; import java.io.InputStream; + import org.glassfish.jersey.media.multipart.FormDataBodyPart; import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.FormDataParam; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/MeasuringUtil.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/MeasuringUtil.java index b6891d12aa1..4b925076d4d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/MeasuringUtil.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/MeasuringUtil.java @@ -6,9 +6,9 @@ * 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 @@ -22,11 +22,13 @@ import java.util.function.BiConsumer; import java.util.function.Consumer; import java.util.function.Supplier; + import org.springframework.util.StopWatch; public final class MeasuringUtil { - private MeasuringUtil() {} + private MeasuringUtil() { + } public static void measure(Runnable r, Consumer c) { measure(() -> { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractAuditableCustom.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractAuditableCustom.java index c0085fe902f..8da05244665 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractAuditableCustom.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractAuditableCustom.java @@ -6,9 +6,9 @@ * 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 @@ -20,9 +20,11 @@ import jakarta.persistence.Column; import jakarta.persistence.MappedSuperclass; + import java.io.Serial; import java.time.LocalDateTime; import java.util.Optional; + import org.springframework.data.domain.Auditable; import org.springframework.data.jpa.domain.AbstractAuditable; 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..070421a0b6d 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 @@ -6,9 +6,9 @@ * 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 @@ -26,9 +26,11 @@ import jakarta.persistence.Column; import jakarta.persistence.MappedSuperclass; import jakarta.validation.constraints.NotNull; + import java.io.Serializable; import java.time.OffsetDateTime; import java.util.Optional; + import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractPersistableCustom.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractPersistableCustom.java index 8f0e756d3fa..39846aa3103 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractPersistableCustom.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/AbstractPersistableCustom.java @@ -6,9 +6,9 @@ * 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 @@ -25,7 +25,9 @@ import jakarta.persistence.PostLoad; import jakarta.persistence.PrePersist; import jakarta.persistence.Transient; + import java.io.Serializable; + import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/ActionContext.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/ActionContext.java index 501e1271067..ddaa358046b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/ActionContext.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/ActionContext.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/AuditableFieldsConstants.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/AuditableFieldsConstants.java index f21a963a416..62863b82024 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/AuditableFieldsConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/AuditableFieldsConstants.java @@ -6,9 +6,9 @@ * 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 @@ -30,5 +30,6 @@ public final class AuditableFieldsConstants { public static final String LAST_MODIFIED_BY_DB_FIELD = "last_modified_by"; public static final String LAST_MODIFIED_DATE_DB_FIELD = "last_modified_on_utc"; - private AuditableFieldsConstants() {} + private AuditableFieldsConstants() { + } } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/Base64EncodedImage.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/Base64EncodedImage.java index eb99e171392..2c7f31155c9 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/Base64EncodedImage.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/Base64EncodedImage.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/BatchRequestContextHolder.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/BatchRequestContextHolder.java index 8965cb33294..b749a2927ca 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/BatchRequestContextHolder.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/BatchRequestContextHolder.java @@ -6,9 +6,9 @@ * 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 @@ -20,11 +20,13 @@ import java.util.Map; import java.util.Optional; + import org.springframework.transaction.TransactionStatus; public final class BatchRequestContextHolder { - private BatchRequestContextHolder() {} + private BatchRequestContextHolder() { + } private static final ThreadLocal> batchAttributes = new ThreadLocal<>(); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/ContextHolder.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/ContextHolder.java index 27654234cb6..f7240d50b92 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/ContextHolder.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/ContextHolder.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/ExternalId.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/ExternalId.java index 0b6972fb978..68e013c839f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/ExternalId.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/ExternalId.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.util.UUID; + import lombok.EqualsAndHashCode; import lombok.Getter; import org.apache.commons.lang3.StringUtils; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractContext.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractContext.java index cd173419bf8..f5776911deb 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractContext.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractContext.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serializable; import java.time.LocalDate; import java.util.HashMap; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.EqualsAndHashCode; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractEvent.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractEvent.java index 41412d7ee2a..37bc9b7a906 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractEvent.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractEvent.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.domain; import java.io.Serializable; + import org.springframework.context.ApplicationEvent; public abstract class FineractEvent extends ApplicationEvent implements ContextHolder, Serializable { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractPlatformTenant.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractPlatformTenant.java index ed2e81ce3c9..293bcef9fee 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractPlatformTenant.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractPlatformTenant.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.domain; import java.io.Serializable; + import lombok.Builder; import lombok.EqualsAndHashCode; import lombok.Getter; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractPlatformTenantConnection.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractPlatformTenantConnection.java index 37f1699116d..85fc2914498 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractPlatformTenantConnection.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractPlatformTenantConnection.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serializable; import java.sql.Connection; import javax.sql.DataSource; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; @@ -67,14 +68,14 @@ public class FineractPlatformTenantConnection implements Serializable { private final String masterPasswordHash; public FineractPlatformTenantConnection(final Long connectionId, final String schemaName, String schemaServer, - final String schemaServerPort, final String schemaConnectionParameters, final String schemaUsername, - final String schemaPassword, final boolean autoUpdateEnabled, final int initialSize, final long validationInterval, - final boolean removeAbandoned, final int removeAbandonedTimeout, final boolean logAbandoned, - final int abandonWhenPercentageFull, final int maxActive, final int minIdle, final int maxIdle, final int suspectTimeout, - final int timeBetweenEvictionRunsMillis, final int minEvictableIdleTimeMillis, final boolean tesOnBorrow, - final String readOnlySchemaServer, final String readOnlySchemaServerPort, final String readOnlySchemaName, - final String readOnlySchemaUsername, final String readOnlySchemaPassword, final String readOnlySchemaConnectionParameters, - final String masterPasswordHash) { + final String schemaServerPort, final String schemaConnectionParameters, final String schemaUsername, + final String schemaPassword, final boolean autoUpdateEnabled, final int initialSize, final long validationInterval, + final boolean removeAbandoned, final int removeAbandonedTimeout, final boolean logAbandoned, + final int abandonWhenPercentageFull, final int maxActive, final int minIdle, final int maxIdle, final int suspectTimeout, + final int timeBetweenEvictionRunsMillis, final int minEvictableIdleTimeMillis, final boolean tesOnBorrow, + final String readOnlySchemaServer, final String readOnlySchemaServerPort, final String readOnlySchemaName, + final String readOnlySchemaUsername, final String readOnlySchemaPassword, final String readOnlySchemaConnectionParameters, + final String masterPasswordHash) { this.connectionId = connectionId; this.schemaName = schemaName; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractRequestContextHolder.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractRequestContextHolder.java index 6a58f07f7bc..cde9b13d565 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractRequestContextHolder.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/FineractRequestContextHolder.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.infrastructure.core.domain; import jakarta.servlet.http.HttpServletRequest; + import java.util.Optional; + import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/JdbcSupport.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/JdbcSupport.java index b37fc159f4b..a9eb0f0f6bc 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/JdbcSupport.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/JdbcSupport.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import java.time.LocalTime; import java.time.OffsetDateTime; import java.time.ZonedDateTime; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.springframework.jdbc.support.JdbcUtils; @@ -36,7 +37,8 @@ */ public final class JdbcSupport { - private JdbcSupport() {} + private JdbcSupport() { + } public static ZonedDateTime getDateTime(final ResultSet rs, final String columnName) throws SQLException { ZonedDateTime dateTime = null; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/LocalDateInterval.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/LocalDateInterval.java index d071ee05894..af2de294204 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/LocalDateInterval.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/domain/LocalDateInterval.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.domain; import java.time.LocalDate; + import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.fineract.infrastructure.core.service.DateUtils; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractIdempotentCommandException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractIdempotentCommandException.java index 50f7d6c5082..27a1aa434a0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractIdempotentCommandException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractIdempotentCommandException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformDomainRuleException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformDomainRuleException.java index a5510b61c0c..a94ab5d87bc 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformDomainRuleException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformDomainRuleException.java @@ -6,9 +6,9 @@ * 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 @@ -24,7 +24,7 @@ public abstract class AbstractPlatformDomainRuleException extends AbstractPlatformException { protected AbstractPlatformDomainRuleException(String globalisationMessageCode, String defaultUserMessage, - Object... defaultUserMessageArgs) { + Object... defaultUserMessageArgs) { super(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs); } } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformException.java index 11d10748d80..ddf088c3cc3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformResourceNotFoundException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformResourceNotFoundException.java index 51d3d57bc95..07d75159c16 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformResourceNotFoundException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformResourceNotFoundException.java @@ -6,9 +6,9 @@ * 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 @@ -24,7 +24,7 @@ public abstract class AbstractPlatformResourceNotFoundException extends AbstractPlatformException { protected AbstractPlatformResourceNotFoundException(final String globalisationMessageCode, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs); } } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformServiceUnavailableException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformServiceUnavailableException.java index 0a8e45c4599..66b9c8db830 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformServiceUnavailableException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/AbstractPlatformServiceUnavailableException.java @@ -6,9 +6,9 @@ * 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 @@ -24,7 +24,7 @@ public abstract class AbstractPlatformServiceUnavailableException extends AbstractPlatformException { protected AbstractPlatformServiceUnavailableException(String globalisationMessageCode, String defaultUserMessage, - Object... defaultUserMessageArgs) { + Object... defaultUserMessageArgs) { super(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs); } } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ErrorHandler.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ErrorHandler.java index 01cbe8861d1..0cf32153ca4 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ErrorHandler.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ErrorHandler.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import jakarta.ws.rs.core.MultivaluedMap; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.ext.ExceptionMapper; + import java.sql.SQLException; import java.text.ParseException; import java.util.Arrays; @@ -33,6 +34,7 @@ import java.util.Set; import java.util.stream.Collectors; import javax.naming.AuthenticationException; + import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import net.fortuna.ical4j.validate.ValidationException; @@ -160,10 +162,10 @@ public static RuntimeException getMappable(@NotNull Throwable thr, String msgCod } public static RuntimeException getMappable(@NotNull Throwable t, String msgCode, String defaultMsg, String param, - final Object... defaultMsgArgs) { + final Object... defaultMsgArgs) { String msg = defaultMsg == null ? t.getMessage() : defaultMsg; String codePfx = "error.msg" + (param == null ? "" : ("." + param)); - Object[] args = defaultMsgArgs == null ? new Object[] { t } : defaultMsgArgs; + Object[] args = defaultMsgArgs == null ? new Object[]{t} : defaultMsgArgs; Throwable cause; if ((cause = PessimisticLockingFailureCode.match(t)) != null) { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/GeneralPlatformDomainRuleException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/GeneralPlatformDomainRuleException.java index f927cf1ba2f..326d42aca77 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/GeneralPlatformDomainRuleException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/GeneralPlatformDomainRuleException.java @@ -6,9 +6,9 @@ * 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 @@ -24,7 +24,7 @@ public final class GeneralPlatformDomainRuleException extends AbstractPlatformDomainRuleException { public GeneralPlatformDomainRuleException(String globalisationMessageCode, String defaultUserMessage, - Object... defaultUserMessageArgs) { + Object... defaultUserMessageArgs) { super(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs); } } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/HttpMessageNotReadableErrorController.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/HttpMessageNotReadableErrorController.java index 8bd56c39973..a56e164c351 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/HttpMessageNotReadableErrorController.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/HttpMessageNotReadableErrorController.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/IdempotentCommandProcessFailedException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/IdempotentCommandProcessFailedException.java index bd0f969fd0d..23eaa414b62 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/IdempotentCommandProcessFailedException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/IdempotentCommandProcessFailedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/IdempotentCommandProcessSucceedException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/IdempotentCommandProcessSucceedException.java index 0542b8b0d8e..8d0e63bdde4 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/IdempotentCommandProcessSucceedException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/IdempotentCommandProcessSucceedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/IdempotentCommandProcessUnderProcessingException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/IdempotentCommandProcessUnderProcessingException.java index ba01dedac05..d8a8ca12768 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/IdempotentCommandProcessUnderProcessingException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/IdempotentCommandProcessUnderProcessingException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ImageDataURLNotValidException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ImageDataURLNotValidException.java index c2270bf975e..97a2746b56b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ImageDataURLNotValidException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ImageDataURLNotValidException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ImageUploadException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ImageUploadException.java index 3fec6bc1abb..2d19a27746f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ImageUploadException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ImageUploadException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/InvalidJsonException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/InvalidJsonException.java index 79eb4fd0540..4bd7cd0902b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/InvalidJsonException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/InvalidJsonException.java @@ -6,9 +6,9 @@ * 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 @@ -22,4 +22,5 @@ * A {@link RuntimeException} that is thrown in the case where invalid JSON is sent in the body of the request to the * platform API. */ -public class InvalidJsonException extends RuntimeException {} +public class InvalidJsonException extends RuntimeException { +} diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/JobIsNotFoundOrNotEnabledException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/JobIsNotFoundOrNotEnabledException.java index 13c7039d920..dd404bcb5ac 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/JobIsNotFoundOrNotEnabledException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/JobIsNotFoundOrNotEnabledException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/MultiException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/MultiException.java index df1367ab1b9..fe7a9c03cde 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/MultiException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/MultiException.java @@ -6,9 +6,9 @@ * 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 @@ -20,12 +20,14 @@ import com.google.common.io.CharStreams; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.io.PrintStream; import java.io.PrintWriter; import java.io.Writer; import java.util.ArrayList; import java.util.Collections; import java.util.List; + import lombok.extern.slf4j.Slf4j; /** diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformApiDataValidationException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformApiDataValidationException.java index 6faf601db3d..61ac2267829 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformApiDataValidationException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformApiDataValidationException.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.exception; import java.util.List; + import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -51,19 +52,19 @@ public PlatformApiDataValidationException(String globalisationMessageCode, Strin } public PlatformApiDataValidationException(String globalisationMessageCode, String defaultUserMessage, List errors, - Throwable cause) { + Throwable cause) { super(globalisationMessageCode, defaultUserMessage, cause); this.errors = errors; } public PlatformApiDataValidationException(String messageCode, String userMessage, String parameterName, Throwable cause, - final Object... userMessageArgs) { + final Object... userMessageArgs) { this("validation.msg.validation.errors.exist", "Validation errors exist.", List.of(ApiParameterError.parameterError(messageCode, userMessage, parameterName, userMessageArgs)), cause); } public PlatformApiDataValidationException(String messageCode, String userMessage, String parameterName, - final Object... userMessageArgs) { + final Object... userMessageArgs) { this("validation.msg.validation.errors.exist", "Validation errors exist.", List.of(ApiParameterError.parameterError(messageCode, userMessage, parameterName, userMessageArgs)), null); } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformDataIntegrityException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformDataIntegrityException.java index c18c345f731..eeedd472003 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformDataIntegrityException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformDataIntegrityException.java @@ -6,9 +6,9 @@ * 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 @@ -26,13 +26,13 @@ public class PlatformDataIntegrityException extends AbstractPlatformException { private final String parameterName; public PlatformDataIntegrityException(final String globalisationMessageCode, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs); this.parameterName = null; } public PlatformDataIntegrityException(final String globalisationMessageCode, final String defaultUserMessage, - final String parameterName, final Object... defaultUserMessageArgs) { + final String parameterName, final Object... defaultUserMessageArgs) { super(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs); this.parameterName = parameterName; } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformInternalServerException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformInternalServerException.java index e387a1c9744..984a31f135b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformInternalServerException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformInternalServerException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformRequestBodyItemLimitValidationException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformRequestBodyItemLimitValidationException.java index a0ee617ddb1..eca0a9709e0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformRequestBodyItemLimitValidationException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformRequestBodyItemLimitValidationException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformServiceUnavailableException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformServiceUnavailableException.java index d1f9c04350c..bfdf76fc81f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformServiceUnavailableException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/PlatformServiceUnavailableException.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,7 @@ public class PlatformServiceUnavailableException extends AbstractPlatformServiceUnavailableException { public PlatformServiceUnavailableException(String globalisationMessageCode, String defaultUserMessage, - Object... defaultUserMessageArgs) { + Object... defaultUserMessageArgs) { super(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs); } } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ResourceNotFoundException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ResourceNotFoundException.java index 11631c613a9..67e81fb1bac 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ResourceNotFoundException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/ResourceNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/UnrecognizedQueryParamException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/UnrecognizedQueryParamException.java index 9e408475387..3ac3b2fb78c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/UnrecognizedQueryParamException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/UnrecognizedQueryParamException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/UnsupportedParameterException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/UnsupportedParameterException.java index 64d2c4d9c2f..9892272c1a3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/UnsupportedParameterException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exception/UnsupportedParameterException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/AccessDeniedExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/AccessDeniedExceptionMapper.java index d0738ce3e12..bd580b0fa42 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/AccessDeniedExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/AccessDeniedExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/BadCredentialsExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/BadCredentialsExceptionMapper.java index a5314e4ba98..efe6ccac94e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/BadCredentialsExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/BadCredentialsExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/ConcurrencyFailureExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/ConcurrencyFailureExceptionMapper.java index bf3d6b35570..49ca19855a2 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/ConcurrencyFailureExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/ConcurrencyFailureExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/DefaultExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/DefaultExceptionMapper.java index 38c5e1eea2a..bcb2d42567c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/DefaultExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/DefaultExceptionMapper.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.ext.ExceptionMapper; + import java.util.Map; import java.util.Objects; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.exception.ErrorHandler; import org.springframework.context.annotation.Scope; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/FineractExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/FineractExceptionMapper.java index df6f8cc5d50..6817099a747 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/FineractExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/FineractExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/IdempotentCommandExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/IdempotentCommandExceptionMapper.java index b969e4e1953..c653ca648a6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/IdempotentCommandExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/IdempotentCommandExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidInstanceTypeMethodExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidInstanceTypeMethodExceptionMapper.java index 6fea99246ac..efae261059d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidInstanceTypeMethodExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidInstanceTypeMethodExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidJsonExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidJsonExceptionMapper.java index 64610409c9d..d2ea1bdaf19 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidJsonExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidJsonExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidTenantIdentifierExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidTenantIdentifierExceptionMapper.java index 956f47cc6cc..60fd60f3400 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidTenantIdentifierExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/InvalidTenantIdentifierExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JakartaOptimisticLockExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JakartaOptimisticLockExceptionMapper.java index f773b2baf08..e4bc3d220a9 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JakartaOptimisticLockExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JakartaOptimisticLockExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JakartaValidationExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JakartaValidationExceptionMapper.java index 49b8fa7b7bb..4e658333839 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JakartaValidationExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JakartaValidationExceptionMapper.java @@ -6,9 +6,9 @@ * 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 @@ -24,7 +24,9 @@ import jakarta.ws.rs.core.Response.Status; import jakarta.ws.rs.ext.ExceptionMapper; import jakarta.ws.rs.ext.Provider; + import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.data.ApiGlobalErrorResponse; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JobIsNotFoundOrNotEnabledExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JobIsNotFoundOrNotEnabledExceptionMapper.java index 2ff0be66c41..ccd5512e5ce 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JobIsNotFoundOrNotEnabledExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JobIsNotFoundOrNotEnabledExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JpaOptimisticLockExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JpaOptimisticLockExceptionMapper.java index a236c44f26d..16b77ae4e4e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JpaOptimisticLockExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JpaOptimisticLockExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JsonPathExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JsonPathExceptionMapper.java index 7f8da34a2a6..00a23ecb304 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JsonPathExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JsonPathExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JsonSyntaxExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JsonSyntaxExceptionMapper.java index a9dfb054d62..eac36407779 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JsonSyntaxExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/JsonSyntaxExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/MalformedJsonExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/MalformedJsonExceptionMapper.java index b85bcdcde79..3d937f5f76e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/MalformedJsonExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/MalformedJsonExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/NoAuthorizationExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/NoAuthorizationExceptionMapper.java index facef9f1384..6e727e31f08 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/NoAuthorizationExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/NoAuthorizationExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/OptimisticLockExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/OptimisticLockExceptionMapper.java index b170c8da20f..5fab04074c6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/OptimisticLockExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/OptimisticLockExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformApiDataValidationExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformApiDataValidationExceptionMapper.java index 707bb8419ff..a9935dd7256 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformApiDataValidationExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformApiDataValidationExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformDataIntegrityExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformDataIntegrityExceptionMapper.java index d67d3c59a19..0ad880df91f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformDataIntegrityExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformDataIntegrityExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformDomainRuleExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformDomainRuleExceptionMapper.java index 721bb4984bb..ef2ea525501 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformDomainRuleExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformDomainRuleExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformInternalServerExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformInternalServerExceptionMapper.java index 68f551b0c53..8fbb99d8979 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformInternalServerExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformInternalServerExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformRequestBodyItemLimitValidationExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformRequestBodyItemLimitValidationExceptionMapper.java index 4e67cb35611..a67a5a45458 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformRequestBodyItemLimitValidationExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformRequestBodyItemLimitValidationExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformResourceNotFoundExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformResourceNotFoundExceptionMapper.java index bbdc0053b36..0d68733ecff 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformResourceNotFoundExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformResourceNotFoundExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformServiceUnavailableExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformServiceUnavailableExceptionMapper.java index 6248dc1d644..72a9dcfd126 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformServiceUnavailableExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/PlatformServiceUnavailableExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/RollbackTransactionNotApprovedExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/RollbackTransactionNotApprovedExceptionMapper.java index 93f8b29d686..94624111d5b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/RollbackTransactionNotApprovedExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/RollbackTransactionNotApprovedExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnAuthenticatedUserExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnAuthenticatedUserExceptionMapper.java index 2d9b00a2574..ff64aa48428 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnAuthenticatedUserExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnAuthenticatedUserExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnrecognizedQueryParamExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnrecognizedQueryParamExceptionMapper.java index 4bb4b21ec29..197bde19d7a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnrecognizedQueryParamExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnrecognizedQueryParamExceptionMapper.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import jakarta.ws.rs.core.Response.Status; import jakarta.ws.rs.ext.ExceptionMapper; import jakarta.ws.rs.ext.Provider; + import java.util.ArrayList; import java.util.List; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.data.ApiGlobalErrorResponse; import org.apache.fineract.infrastructure.core.data.ApiParameterError; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupportedCommandExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupportedCommandExceptionMapper.java index 387d6b84a54..d19596c3ce3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupportedCommandExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupportedCommandExceptionMapper.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import jakarta.ws.rs.core.Response.Status; import jakarta.ws.rs.ext.ExceptionMapper; import jakarta.ws.rs.ext.Provider; + import java.util.ArrayList; import java.util.List; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.commands.exception.UnsupportedCommandException; import org.apache.fineract.infrastructure.core.data.ApiGlobalErrorResponse; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupportedParameterExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupportedParameterExceptionMapper.java index 1309798b67d..d0f530f39ed 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupportedParameterExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupportedParameterExceptionMapper.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import jakarta.ws.rs.core.Response.Status; import jakarta.ws.rs.ext.ExceptionMapper; import jakarta.ws.rs.ext.Provider; + import java.util.ArrayList; import java.util.List; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.data.ApiGlobalErrorResponse; import org.apache.fineract.infrastructure.core.data.ApiParameterError; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupporterOperationExceptionMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupporterOperationExceptionMapper.java index ce79b61cb16..c3c4c870d57 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupporterOperationExceptionMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/UnsupporterOperationExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/BatchCallHandler.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/BatchCallHandler.java index bfabc8008db..af7393e8951 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/BatchCallHandler.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/BatchCallHandler.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.core.filters; import jakarta.ws.rs.core.UriInfo; + import java.util.List; import java.util.function.BiFunction; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.domain.BatchRequest; import org.apache.fineract.batch.domain.BatchResponse; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/BatchFilter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/BatchFilter.java index 23c67359912..62b29438ea9 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/BatchFilter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/BatchFilter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/BatchFilterChain.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/BatchFilterChain.java index 3c83dab0a57..869da0d4aa4 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/BatchFilterChain.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/BatchFilterChain.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/BatchRequestPreprocessor.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/BatchRequestPreprocessor.java index 0addc3efec1..227a2d73373 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/BatchRequestPreprocessor.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/BatchRequestPreprocessor.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/CallerIpTrackingFilter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/CallerIpTrackingFilter.java index f909dc6117e..c4f62018994 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/CallerIpTrackingFilter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/CallerIpTrackingFilter.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; + import java.io.IOException; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -47,9 +49,9 @@ public class CallerIpTrackingFilter extends OncePerRequestFilter { * "HTTP_VIA", // Shows intermediate proxies "REMOTE_ADDR" // Server's perceived client IP */ - private static final String[] IP_HEADER_CANDIDATES = { "X-Forwarded-For", "Proxy-Client-IP", "WL-Proxy-Client-IP", + private static final String[] IP_HEADER_CANDIDATES = {"X-Forwarded-For", "Proxy-Client-IP", "WL-Proxy-Client-IP", "HTTP_X_FORWARDED_FOR", "HTTP_X_FORWARDED", "HTTP_X_CLUSTER_CLIENT_IP", "HTTP_CLIENT_IP", "HTTP_FORWARDED_FOR", - "HTTP_FORWARDED", "HTTP_VIA", "REMOTE_ADDR" }; + "HTTP_FORWARDED", "HTTP_VIA", "REMOTE_ADDR"}; public String getClientIpAddress(HttpServletRequest request) { for (String header : IP_HEADER_CANDIDATES) { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/CorrelationHeaderFilter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/CorrelationHeaderFilter.java index 5797a8cf9d7..e8e96bd4d58 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/CorrelationHeaderFilter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/CorrelationHeaderFilter.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; + import java.io.IOException; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -54,7 +56,7 @@ protected void doFilterInternal(final HttpServletRequest request, final HttpServ } private void handleCorrelations(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain, - FineractProperties.FineractCorrelationProperties correlationProperties) throws IOException, ServletException { + FineractProperties.FineractCorrelationProperties correlationProperties) throws IOException, ServletException { try { String correlationHeaderName = correlationProperties.getHeaderName(); String correlationId = request.getHeader(correlationHeaderName); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/IdempotencyStoreBatchFilter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/IdempotencyStoreBatchFilter.java index 1af80b65b3f..4d4e401a255 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/IdempotencyStoreBatchFilter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/IdempotencyStoreBatchFilter.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.infrastructure.core.filters; import jakarta.ws.rs.core.UriInfo; + import java.util.Optional; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.domain.BatchRequest; import org.apache.fineract.batch.domain.BatchResponse; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/IdempotencyStoreFilter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/IdempotencyStoreFilter.java index 675a27bb49a..2f12e18dcc6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/IdempotencyStoreFilter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/IdempotencyStoreFilter.java @@ -6,9 +6,9 @@ * 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 @@ -22,9 +22,6 @@ import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.Optional; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.mutable.Mutable; @@ -36,6 +33,10 @@ import org.springframework.web.filter.OncePerRequestFilter; import org.springframework.web.util.ContentCachingResponseWrapper; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.Optional; + @RequiredArgsConstructor @Slf4j public class IdempotencyStoreFilter extends OncePerRequestFilter { @@ -46,8 +47,17 @@ public class IdempotencyStoreFilter extends OncePerRequestFilter { @Override protected void doFilterInternal(@NonNull HttpServletRequest request, @NonNull HttpServletResponse response, - @NonNull FilterChain filterChain) throws ServletException, IOException { + @NonNull FilterChain filterChain) throws ServletException, IOException { Mutable wrapper = new MutableObject<>(); + String headerName = fineractProperties.getIdempotencyKeyHeaderName(); + String idempotencyKey = request.getHeader(headerName); + + if (headerName != null && !headerName.isBlank() + && (idempotencyKey == null || idempotencyKey.isBlank())) { + + log.debug("Missing {} header", headerName); + } + if (helper.isAllowedContentTypeRequest(request)) { wrapper.setValue(new ContentCachingResponseWrapper(response)); } @@ -60,7 +70,7 @@ protected void doFilterInternal(@NonNull HttpServletRequest request, @NonNull Ht && helper.isAllowedContentTypeResponse(response); if (isSuccessWithoutStored) { helper.storeCommandResult(response.getStatus(), Optional.ofNullable(wrapper.get()) - .map(ContentCachingResponseWrapper::getContentAsByteArray).map(s -> new String(s, StandardCharsets.UTF_8)).orElse(null), + .map(ContentCachingResponseWrapper::getContentAsByteArray).map(s -> new String(s, StandardCharsets.UTF_8)).orElse(null), commandId.get()); } if (wrapper.get() != null) { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/IdempotencyStoreHelper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/IdempotencyStoreHelper.java index c014ab73430..77998641b54 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/IdempotencyStoreHelper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/IdempotencyStoreHelper.java @@ -6,9 +6,9 @@ * 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 @@ -20,7 +20,9 @@ import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; + import java.util.Optional; + import lombok.RequiredArgsConstructor; import org.apache.fineract.commands.domain.CommandSourceRepository; import org.apache.fineract.commands.service.CommandSourceService; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/RequestResponseFilter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/RequestResponseFilter.java index 659efa86182..2483630cce7 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/RequestResponseFilter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/filters/RequestResponseFilter.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; + import java.io.IOException; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.web.filter.OncePerRequestFilter; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/legacy/JsonLocalDateArrayFormat.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/legacy/JsonLocalDateArrayFormat.java index 7d1578af53f..6423f53a49d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/legacy/JsonLocalDateArrayFormat.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/legacy/JsonLocalDateArrayFormat.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) -public @interface JsonLocalDateArrayFormat {} +public @interface JsonLocalDateArrayFormat { +} diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/jpa/CriteriaQueryFactory.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/jpa/CriteriaQueryFactory.java index 136a2ed946b..773114867fa 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/jpa/CriteriaQueryFactory.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/jpa/CriteriaQueryFactory.java @@ -6,9 +6,9 @@ * 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 @@ -26,10 +26,12 @@ import jakarta.persistence.criteria.Order; import jakarta.persistence.criteria.Predicate; import jakarta.persistence.criteria.Root; + import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.function.Supplier; + import lombok.RequiredArgsConstructor; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/logging/TenantIdentifierLoggingConverter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/logging/TenantIdentifierLoggingConverter.java index dde208c3399..7d2dc26000e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/logging/TenantIdentifierLoggingConverter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/logging/TenantIdentifierLoggingConverter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/persistence/DatabaseSelectingPersistenceUnitPostProcessor.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/persistence/DatabaseSelectingPersistenceUnitPostProcessor.java index ba343f13bce..d380423199e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/persistence/DatabaseSelectingPersistenceUnitPostProcessor.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/persistence/DatabaseSelectingPersistenceUnitPostProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.persistence; import java.util.Map; + import org.apache.fineract.infrastructure.core.service.database.DatabaseType; import org.apache.fineract.infrastructure.core.service.database.DatabaseTypeResolver; import org.eclipse.persistence.config.PersistenceUnitProperties; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/persistence/ExtendedJpaTransactionManager.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/persistence/ExtendedJpaTransactionManager.java index 37b04b999fc..a4e61761401 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/persistence/ExtendedJpaTransactionManager.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/persistence/ExtendedJpaTransactionManager.java @@ -6,9 +6,9 @@ * 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 @@ -20,11 +20,13 @@ import jakarta.persistence.EntityManager; import jakarta.persistence.FlushModeType; + import java.sql.Connection; import java.sql.SQLException; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import java.util.function.Consumer; + import org.springframework.jdbc.datasource.DataSourceUtils; import org.springframework.jdbc.datasource.JdbcTransactionObjectSupport; import org.springframework.orm.jpa.EntityManagerHolder; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/persistence/FlushModeHandler.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/persistence/FlushModeHandler.java index 6daaf57f8a5..53ce1282270 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/persistence/FlushModeHandler.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/persistence/FlushModeHandler.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import jakarta.persistence.EntityManager; import jakarta.persistence.FlushModeType; import jakarta.persistence.PersistenceContext; + import java.util.function.Supplier; + import org.springframework.stereotype.Component; @Component diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/persistence/TransactionLifecycleCallback.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/persistence/TransactionLifecycleCallback.java index fa33ec8a9f1..b94ef0491d3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/persistence/TransactionLifecycleCallback.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/persistence/TransactionLifecycleCallback.java @@ -6,9 +6,9 @@ * 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 @@ -20,9 +20,12 @@ public interface TransactionLifecycleCallback { - default void afterBegin() {} + default void afterBegin() { + } - default void afterCommit() {} + default void afterCommit() { + } - default void afterCompletion() {} + default void afterCompletion() { + } } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/AbstractFromApiJsonDeserializer.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/AbstractFromApiJsonDeserializer.java index d4f64d2734c..400835614df 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/AbstractFromApiJsonDeserializer.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/AbstractFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/ApiRequestJsonSerializationSettings.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/ApiRequestJsonSerializationSettings.java index 8767406260a..51c283e33d0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/ApiRequestJsonSerializationSettings.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/ApiRequestJsonSerializationSettings.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.serialization; import java.util.Set; + import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -36,7 +37,7 @@ public class ApiRequestJsonSerializationSettings { private final boolean includeJson; public static ApiRequestJsonSerializationSettings from(final Set parametersForPartialResponse, final boolean template, - final boolean makerCheckerable, final boolean includeJson) { + final boolean makerCheckerable, final boolean includeJson) { // FIXME - KW - rather than always creating new objects for this could // just send by common ones like, prettyprint=false, empty response diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/CommandProcessingResultJsonSerializer.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/CommandProcessingResultJsonSerializer.java index 99c3f37f759..f2daa3bf4ab 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/CommandProcessingResultJsonSerializer.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/CommandProcessingResultJsonSerializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/CommandSerializer.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/CommandSerializer.java index b06b1f433e2..feaaf88a3fa 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/CommandSerializer.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/CommandSerializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/CommandSerializerDefaultToJson.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/CommandSerializerDefaultToJson.java index 8d9f5dbb9b2..74289e44b1e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/CommandSerializerDefaultToJson.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/CommandSerializerDefaultToJson.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/DatatableCommandFromApiJsonDeserializer.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/DatatableCommandFromApiJsonDeserializer.java index 51e74d6e2c8..948e23de3c6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/DatatableCommandFromApiJsonDeserializer.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/DatatableCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -61,12 +61,14 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; import jakarta.validation.constraints.NotNull; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -99,9 +101,9 @@ public class DatatableCommandFromApiJsonDeserializer { private static final Set SUPPORTED_PARAMETERS_FOR_CHANGE_COLUMNS = Set.of(API_FIELD_NAME, API_FIELD_NEWNAME, API_FIELD_LENGTH, API_FIELD_MANDATORY, API_FIELD_AFTER, API_FIELD_CODE, API_FIELD_NEWCODE, API_FIELD_UNIQUE, API_FIELD_INDEXED); private static final Set SUPPORTED_PARAMETERS_FOR_DROP_COLUMNS = Set.of(API_FIELD_NAME); - private static final Object[] SUPPORTED_COLUMN_TYPES = { API_FIELD_TYPE_STRING, API_FIELD_TYPE_NUMBER, API_FIELD_TYPE_BOOLEAN, + private static final Object[] SUPPORTED_COLUMN_TYPES = {API_FIELD_TYPE_STRING, API_FIELD_TYPE_NUMBER, API_FIELD_TYPE_BOOLEAN, API_FIELD_TYPE_DECIMAL, API_FIELD_TYPE_DATE, API_FIELD_TYPE_DATETIME, API_FIELD_TYPE_TEXT, API_FIELD_TYPE_JSON, - API_FIELD_TYPE_DROPDOWN }; + API_FIELD_TYPE_DROPDOWN}; private final FromJsonHelper fromApiJsonHelper; private final DatabaseTypeResolver databaseTypeResolver; @@ -117,7 +119,8 @@ public void validateForCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS_FOR_CREATE); final List dataValidationErrors = new ArrayList<>(); @@ -369,7 +372,7 @@ public static JdbcJavaType mapApiTypeToJdbcType(@NotNull String apiType) { } private void validateEntitySubType(final DataValidatorBuilder baseDataValidator, final JsonElement element, - final EntityTables entityTable) { + final EntityTables entityTable) { if (entityTable == EntityTables.CLIENT) { String entitySubType = this.fromApiJsonHelper.extractStringNamed(API_PARAM_SUBTYPE, element); baseDataValidator.reset().parameter(API_PARAM_SUBTYPE).value(entitySubType).notBlank(); // Person or Entity diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/DefaultToApiJsonSerializer.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/DefaultToApiJsonSerializer.java index 47fad72b94d..aea8f8e3e3f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/DefaultToApiJsonSerializer.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/DefaultToApiJsonSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.core.serialization; import com.google.gson.Gson; + import java.util.Collection; import java.util.Set; + import org.apache.fineract.infrastructure.core.service.Page; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -38,7 +40,7 @@ public class DefaultToApiJsonSerializer implements ToApiJsonSerializer { @Autowired public DefaultToApiJsonSerializer(final ExcludeNothingWithPrettyPrintingOffJsonSerializerGoogleGson excludeNothingWithPrettyPrintingOff, - final CommandProcessingResultJsonSerializer commandProcessingResultSerializer, final GoogleGsonSerializerHelper helper) { + final CommandProcessingResultJsonSerializer commandProcessingResultSerializer, final GoogleGsonSerializerHelper helper) { this.excludeNothingWithPrettyPrintingOff = excludeNothingWithPrettyPrintingOff; this.commandProcessingResultSerializer = commandProcessingResultSerializer; this.helper = helper; @@ -56,21 +58,21 @@ public String serialize(final Object object) { @Override public String serialize(final ApiRequestJsonSerializationSettings settings, final Collection collection, - final Set supportedResponseParameters) { + final Set supportedResponseParameters) { final Gson delegatedSerializer = findAppropriateSerializer(settings, supportedResponseParameters); return serializeWithSettings(delegatedSerializer, settings, collection.toArray()); } @Override public String serialize(final ApiRequestJsonSerializationSettings settings, final T singleObject, - final Set supportedResponseParameters) { + final Set supportedResponseParameters) { final Gson delegatedSerializer = findAppropriateSerializer(settings, supportedResponseParameters); return serializeWithSettings(delegatedSerializer, settings, singleObject); } @Override public String serialize(final ApiRequestJsonSerializationSettings settings, final Page singleObject, - final Set supportedResponseParameters) { + final Set supportedResponseParameters) { final Gson delegatedSerializer = findAppropriateSerializer(settings, supportedResponseParameters); return serializeWithSettings(delegatedSerializer, settings, singleObject); } @@ -102,7 +104,7 @@ private String serializeWithSettings(final Gson gson, final ApiRequestJsonSerial } private Gson findAppropriateSerializer(final ApiRequestJsonSerializationSettings settings, - final Set supportedResponseParameters) { + final Set supportedResponseParameters) { return settings.isPartialResponseRequired() ? this.helper.createGsonBuilderWithParameterExclusionSerializationStrategy( supportedResponseParameters, settings.getParametersForPartialResponse()) : null; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/ExcludeNothingWithPrettyPrintingOffJsonSerializerGoogleGson.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/ExcludeNothingWithPrettyPrintingOffJsonSerializerGoogleGson.java index d7ef2034276..6ba40ff1e52 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/ExcludeNothingWithPrettyPrintingOffJsonSerializerGoogleGson.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/ExcludeNothingWithPrettyPrintingOffJsonSerializerGoogleGson.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromApiJsonDeserializer.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromApiJsonDeserializer.java index 4580f695f4d..deb2fc688eb 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromApiJsonDeserializer.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromJsonHelper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromJsonHelper.java index 902bbf358d2..83749124b62 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromJsonHelper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromJsonHelper.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.security.InvalidParameterException; @@ -37,6 +38,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -131,7 +133,7 @@ public void checkForUnsupportedParameters(final JsonObject object, final Collect */ @SuppressWarnings("AvoidHidingCauseException") public void checkForUnsupportedNestedParameters(final String parentPropertyName, final JsonObject object, - final Set supportedParams) { + final Set supportedParams) { try { checkForUnsupportedParameters(object, supportedParams); } catch (UnsupportedParameterException exception) { @@ -207,7 +209,7 @@ public MonthDay extractMonthDayNamed(final String parameterName, final JsonEleme } public MonthDay extractMonthDayNamed(final String parameterName, final JsonObject object, final String dateFormat, - final Locale clientApplicationLocale) { + final Locale clientApplicationLocale) { return this.helperDelegator.extractMonthDayNamed(parameterName, object, dateFormat, clientApplicationLocale); } @@ -224,7 +226,7 @@ public LocalDateTime extractLocalDateTimeNamed(final String parameterName, final } public LocalTime extractLocalTimeNamed(final String parameterName, final JsonElement element, final String dateFormat, - final Locale locale) { + final Locale locale) { return this.helperDelegator.extractLocalTimeNamed(parameterName, element, dateFormat, locale, new HashSet<>()); } @@ -233,7 +235,7 @@ public LocalTime extractLocalTimeNamed(final String parameterName, final JsonEle } public LocalDateTime extractLocalDateTimeNamed(final String parameterName, final JsonElement element, final String dateFormat, - final Locale locale) { + final Locale locale) { return this.helperDelegator.extractLocalDateTimeNamed(parameterName, element, dateFormat, locale, new HashSet<>()); } @@ -242,17 +244,17 @@ public LocalDateTime extractLocalDateTimeNamed(final String parameterName, final } public LocalDate extractLocalDateNamed(final String parameterName, final JsonElement element, final String dateFormat, - final Locale locale) { + final Locale locale) { return this.helperDelegator.extractLocalDateNamed(parameterName, element.getAsJsonObject(), dateFormat, locale, new HashSet<>()); } public LocalDate extractLocalDateNamed(final String parameterName, final JsonElement element, - final Set parametersPassedInRequest) { + final Set parametersPassedInRequest) { return this.helperDelegator.extractLocalDateNamed(parameterName, element, parametersPassedInRequest); } public LocalDate extractLocalDateAsArrayNamed(final String parameterName, final JsonElement element, - final Set parametersPassedInRequest) { + final Set parametersPassedInRequest) { return this.helperDelegator.extractLocalDateAsArrayNamed(parameterName, element, parametersPassedInRequest); } @@ -261,7 +263,7 @@ public BigDecimal extractBigDecimalWithLocaleNamed(final String parameterName, f } public BigDecimal extractBigDecimalWithLocaleNamed(final String parameterName, final JsonElement element, - final Set parametersPassedInRequest) { + final Set parametersPassedInRequest) { return this.helperDelegator.extractBigDecimalWithLocaleNamed(parameterName, element, parametersPassedInRequest); } @@ -270,7 +272,7 @@ public BigDecimal extractBigDecimalNamed(final String parameterName, final JsonE } public BigDecimal extractBigDecimalNamed(final String parameterName, final JsonElement element, - final Set parametersPassedInRequest) { + final Set parametersPassedInRequest) { return this.helperDelegator.extractBigDecimalNamed(parameterName, element.getAsJsonObject(), Locale.US, parametersPassedInRequest); } @@ -283,7 +285,7 @@ public Integer extractIntegerSansLocaleNamed(final String parameterName, final J } public Integer extractIntegerWithLocaleNamed(final String parameterName, final JsonElement element, - final Set parametersPassedInRequest) { + final Set parametersPassedInRequest) { return this.helperDelegator.extractIntegerWithLocaleNamed(parameterName, element.getAsJsonObject(), parametersPassedInRequest); } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/GoogleGsonSerializerHelper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/GoogleGsonSerializerHelper.java index 1d2b9d56f0b..c239f0fb629 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/GoogleGsonSerializerHelper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/GoogleGsonSerializerHelper.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import com.google.gson.ExclusionStrategy; import com.google.gson.Gson; import com.google.gson.GsonBuilder; + import java.time.LocalDate; import java.time.LocalDateTime; import java.time.LocalTime; @@ -30,6 +31,7 @@ import java.util.ArrayList; import java.util.HashSet; import java.util.Set; + import org.apache.fineract.infrastructure.core.api.DateAdapter; import org.apache.fineract.infrastructure.core.api.ExternalIdAdapter; import org.apache.fineract.infrastructure.core.api.JodaDateTimeAdapter; @@ -59,7 +61,7 @@ public Gson createGsonBuilderForPartialResponseFiltering(final Set respo } public Gson createGsonBuilderWithParameterExclusionSerializationStrategy(final Set supportedParameters, - final Set responseParameters) { + final Set responseParameters) { final Set parameterNamesToSkip = new HashSet<>(); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/JsonParserHelper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/JsonParserHelper.java index 4bf3fe8da9b..03a4c88998e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/JsonParserHelper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/JsonParserHelper.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; + import java.math.BigDecimal; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; @@ -43,6 +44,7 @@ import java.util.Locale; import java.util.Objects; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DateFormat; @@ -129,7 +131,7 @@ public String extractStringNamed(final String parameterName, final JsonElement e } public BigDecimal extractBigDecimalWithLocaleNamed(final String parameterName, final JsonElement element, - final Set modifiedParameters) { + final Set modifiedParameters) { BigDecimal value = null; if (element.isJsonObject()) { final JsonObject object = element.getAsJsonObject(); @@ -140,7 +142,7 @@ public BigDecimal extractBigDecimalWithLocaleNamed(final String parameterName, f } public BigDecimal extractBigDecimalNamed(final String parameterName, final JsonObject element, final Locale locale, - final Set modifiedParameters) { + final Set modifiedParameters) { BigDecimal value = null; if (element.isJsonObject()) { final JsonObject object = element.getAsJsonObject(); @@ -163,7 +165,7 @@ public BigDecimal extractBigDecimalNamed(final String parameterName, final JsonO } public Integer extractIntegerWithLocaleNamed(final String parameterName, final JsonElement element, - final Set modifiedParameters) { + final Set modifiedParameters) { Integer value = null; if (element.isJsonObject()) { final JsonObject object = element.getAsJsonObject(); @@ -174,7 +176,7 @@ public Integer extractIntegerWithLocaleNamed(final String parameterName, final J } public Integer extractIntegerNamed(final String parameterName, final JsonElement element, final Locale locale, - final Set modifiedParameters) { + final Set modifiedParameters) { Integer value = null; if (element.isJsonObject()) { final JsonObject object = element.getAsJsonObject(); @@ -202,7 +204,7 @@ public Integer extractIntegerNamed(final String parameterName, final JsonElement * @return */ public Integer extractIntegerSansLocaleNamed(final String parameterName, final JsonElement element, - final Set parametersPassedInRequest) { + final Set parametersPassedInRequest) { Integer intValue = null; if (element.isJsonObject()) { final JsonObject object = element.getAsJsonObject(); @@ -322,7 +324,7 @@ public JsonObject extractJsonObjectNamed(final String parameterName, final JsonE * Used with the local date is in array format */ public LocalDate extractLocalDateAsArrayNamed(final String parameterName, final JsonElement element, - final Set parametersPassedInCommand) { + final Set parametersPassedInCommand) { LocalDate value = null; if (element.isJsonObject()) { final JsonObject object = element.getAsJsonObject(); @@ -355,7 +357,7 @@ public MonthDay extractMonthDayNamed(final String parameterName, final JsonEleme } public MonthDay extractMonthDayNamed(final String parameterName, final JsonObject element, String dateFormat, - final Locale clientApplicationLocale) { + final Locale clientApplicationLocale) { MonthDay value = null; if (element.isJsonObject()) { final JsonObject object = element.getAsJsonObject(); @@ -388,7 +390,7 @@ public MonthDay extractMonthDayNamed(final String parameterName, final JsonObjec } public LocalDate extractLocalDateNamed(final String parameterName, final JsonElement element, - final Set parametersPassedInCommand) { + final Set parametersPassedInCommand) { LocalDate value = null; @@ -403,7 +405,7 @@ public LocalDate extractLocalDateNamed(final String parameterName, final JsonEle } public LocalTime extractLocalTimeNamed(final String parameterName, final JsonElement element, - final Set parametersPassedInCommand) { + final Set parametersPassedInCommand) { LocalTime value = null; @@ -415,7 +417,7 @@ public LocalTime extractLocalTimeNamed(final String parameterName, final JsonEle } public LocalDateTime extractLocalDateTimeNamed(final String parameterName, final JsonElement element, - final Set parametersPassedInCommand) { + final Set parametersPassedInCommand) { LocalDateTime value = null; @@ -427,7 +429,7 @@ public LocalDateTime extractLocalDateTimeNamed(final String parameterName, final } public LocalTime extractLocalTimeNamed(final String parameterName, final JsonElement element, String timeFormat, - final Set parametersPassedInCommand) { + final Set parametersPassedInCommand) { LocalTime value = null; @@ -440,7 +442,7 @@ public LocalTime extractLocalTimeNamed(final String parameterName, final JsonEle } public LocalDateTime extractLocalDateTimeNamed(final String parameterName, final JsonElement element, String timeFormat, - final Set parametersPassedInCommand) { + final Set parametersPassedInCommand) { LocalDateTime value = null; @@ -453,7 +455,7 @@ public LocalDateTime extractLocalDateTimeNamed(final String parameterName, final } public LocalTime extractLocalTimeNamed(final String parameterName, final JsonElement element, final String timeFormat, - final Locale clientApplicationLocale, final Set parametersPassedInCommand) { + final Locale clientApplicationLocale, final Set parametersPassedInCommand) { LocalTime value = null; String timeValueAsString = null; if (element.isJsonObject()) { @@ -485,7 +487,7 @@ public LocalTime extractLocalTimeNamed(final String parameterName, final JsonEle } public LocalDateTime extractLocalDateTimeNamed(final String parameterName, final JsonElement element, String timeFormat, - final Locale clientApplicationLocale, final Set parametersPassedInCommand) { + final Locale clientApplicationLocale, final Set parametersPassedInCommand) { LocalDateTime value = null; String timeValueAsString; if (element.isJsonObject()) { @@ -521,7 +523,7 @@ public LocalDateTime extractLocalDateTimeNamed(final String parameterName, final } public LocalDate extractLocalDateNamed(final String parameterName, final JsonElement element, final String dateFormat, - final Locale clientApplicationLocale, final Set parametersPassedInCommand) { + final Locale clientApplicationLocale, final Set parametersPassedInCommand) { LocalDate value = null; if (element.isJsonObject()) { final JsonObject object = element.getAsJsonObject(); @@ -542,13 +544,13 @@ public LocalDate extractLocalDateNamed(final String parameterName, final JsonEle } public static LocalDate convertFrom(final String dateAsString, final String parameterName, final String dateFormat, - final Locale clientApplicationLocale) { + final Locale clientApplicationLocale) { return convertDateTimeFrom(dateAsString, parameterName, dateFormat, clientApplicationLocale).toLocalDate(); } public static LocalDate convertFrom(final String dateAsString, final String parameterName, final DateFormat dateFormat, - final Locale clientApplicationLocale) { + final Locale clientApplicationLocale) { String rawDateFormat = Objects.isNull(dateFormat) ? null : dateFormat.getDateFormat(); @@ -556,7 +558,7 @@ public static LocalDate convertFrom(final String dateAsString, final String para } public static LocalDateTime convertDateTimeFrom(final String dateTimeAsString, final String parameterName, String dateTimeFormat, - final Locale clientApplicationLocale) { + final Locale clientApplicationLocale) { validateDateFormatAndLocale(parameterName, dateTimeFormat, clientApplicationLocale); LocalDateTime eventLocalDateTime = null; @@ -587,7 +589,7 @@ public static LocalDateTime convertDateTimeFrom(final String dateTimeAsString, f } private static void validateDateFormatAndLocale(final String parameterName, final String dateFormat, - final Locale clientApplicationLocale) { + final Locale clientApplicationLocale) { if (StringUtils.isBlank(dateFormat) || clientApplicationLocale == null) { final List dataValidationErrors = new ArrayList<>(); @@ -612,7 +614,7 @@ private static void validateDateFormatAndLocale(final String parameterName, fina } public Integer convertToInteger(final String numericalValueFormatted, final String parameterName, - final Locale clientApplicationLocale) { + final Locale clientApplicationLocale) { if (clientApplicationLocale == null) { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/ThrowableSerialization.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/ThrowableSerialization.java index 94b0b02090e..e824ed99c8e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/ThrowableSerialization.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/ThrowableSerialization.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.serialization; import com.google.common.io.CharStreams; + import java.io.PrintWriter; import java.io.Writer; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/ToApiJsonSerializer.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/ToApiJsonSerializer.java index 310c92ebe46..d7b0cfbfb0d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/ToApiJsonSerializer.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/ToApiJsonSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.Set; + import org.apache.fineract.infrastructure.core.service.Page; public interface ToApiJsonSerializer { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/gson/JsonExclude.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/gson/JsonExclude.java index 2a0b8c1bc35..585d638686a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/gson/JsonExclude.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/gson/JsonExclude.java @@ -6,9 +6,9 @@ * 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 @@ -28,5 +28,6 @@ * {@link JsonExcludeAnnotationBasedExclusionStrategy}. */ @Retention(RetentionPolicy.RUNTIME) -@Target({ ElementType.FIELD }) -public @interface JsonExclude {} +@Target({ElementType.FIELD}) +public @interface JsonExclude { +} diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/gson/JsonExcludeAnnotationBasedExclusionStrategy.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/gson/JsonExcludeAnnotationBasedExclusionStrategy.java index c1c1981eb36..75bea385770 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/gson/JsonExcludeAnnotationBasedExclusionStrategy.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/gson/JsonExcludeAnnotationBasedExclusionStrategy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/gson/LocalDateAdapter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/gson/LocalDateAdapter.java index 5a06665ba3e..9c4f119cd58 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/gson/LocalDateAdapter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/serialization/gson/LocalDateAdapter.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import com.google.gson.TypeAdapter; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; + import java.io.IOException; import java.time.LocalDate; import java.time.format.DateTimeFormatter; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/CommandParameterUtil.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/CommandParameterUtil.java index f4e9a1dc44b..bd83c6a9ebf 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/CommandParameterUtil.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/CommandParameterUtil.java @@ -6,9 +6,9 @@ * 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 @@ -32,7 +32,8 @@ public final class CommandParameterUtil { public static final String DELETE_COMMAND_VALUE = "delete"; public static final String CREATE_COMMAND_VALUE = "create"; - private CommandParameterUtil() {} + private CommandParameterUtil() { + } public static boolean is(final String commandParam, final String commandValue) { return StringUtils.isNotBlank(commandParam) && commandParam.trim().equalsIgnoreCase(commandValue); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/DataEnricher.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/DataEnricher.java index 9a373c0aef7..7009ac35935 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/DataEnricher.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/DataEnricher.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/DataEnricherProcessor.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/DataEnricherProcessor.java index 1a664280a5b..af5aa73ed9a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/DataEnricherProcessor.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/DataEnricherProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/DateUtils.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/DateUtils.java index 472cccc12fc..f582a9b587c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/DateUtils.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/DateUtils.java @@ -6,9 +6,9 @@ * 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 @@ -38,6 +38,7 @@ import java.util.List; import java.util.Locale; import java.util.Optional; + import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.domain.FineractPlatformTenant; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; @@ -263,7 +264,7 @@ public static boolean isDateInTheFuture(final LocalDate localDate) { } public static boolean isDateInRangeFromInclusiveToExclusive(final LocalDate fromInclusive, final LocalDate upToNotInclusive, - final LocalDate target) { + final LocalDate target) { return (DateUtils.isEqual(target, fromInclusive) || DateUtils.isAfter(target, fromInclusive)) && DateUtils.isBefore(target, upToNotInclusive); } @@ -440,7 +441,7 @@ private static DateTimeFormatter getDateTimeFormatter(String format, Locale loca } public static LocalDateTime convertDateTimeStringToLocalDateTime(String dateTimeStr, String dateFormat, String localeStr, - LocalTime fallbackTime) { + LocalTime fallbackTime) { if (dateTimeStr == null || dateTimeStr.isBlank()) { return null; } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/DefaultOption.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/DefaultOption.java index 8249b961f77..b8dd0906675 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/DefaultOption.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/DefaultOption.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/ExternalIdFactory.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/ExternalIdFactory.java index 4c140ad7521..651f3fcd702 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/ExternalIdFactory.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/ExternalIdFactory.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Objects; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/IpAddressUtils.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/IpAddressUtils.java index d6621fc27de..786f3255030 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/IpAddressUtils.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/IpAddressUtils.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,8 @@ public final class IpAddressUtils { - private IpAddressUtils() {} + private IpAddressUtils() { + } public static String getClientIp() { ServletRequestAttributes attrs = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/JdbcTemplateFactory.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/JdbcTemplateFactory.java index eeab9f18515..3dccfbbcbfe 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/JdbcTemplateFactory.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/JdbcTemplateFactory.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/MDCWrapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/MDCWrapper.java index 2f6dfde6efd..99c1670225f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/MDCWrapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/MDCWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/MathUtil.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/MathUtil.java index bf56d652adb..0e9fe7117a2 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/MathUtil.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/MathUtil.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.math.MathContext; + import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.organisation.monetary.domain.MoneyHelper; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/Page.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/Page.java index 76755e4b5b5..e734f093630 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/Page.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/Page.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/PagedLocalRequest.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/PagedLocalRequest.java index 5289850cc40..063108d7dc8 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/PagedLocalRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/PagedLocalRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Locale; import java.util.Objects; + import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Setter; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/PagedRequest.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/PagedRequest.java index b87e4d308a7..0f18bbc8c8c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/PagedRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/PagedRequest.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; + import lombok.Data; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Sort; @@ -53,7 +54,7 @@ public PageRequest toPageable() { } @Data - @SuppressWarnings({ "unused" }) + @SuppressWarnings({"unused"}) private static final class SortOrder { private Sort.Direction direction; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/SearchParameters.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/SearchParameters.java index 366e6485140..4c995bec514 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/SearchParameters.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/SearchParameters.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/StringUtil.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/StringUtil.java index 35c9053a677..58db1fc1811 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/StringUtil.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/StringUtil.java @@ -6,9 +6,9 @@ * 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 @@ -20,7 +20,8 @@ public final class StringUtil { - private StringUtil() {} + private StringUtil() { + } public static String maskValue(String value) { return maskValue(value, 4); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/ThreadLocalContextUtil.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/ThreadLocalContextUtil.java index 9eb04e491ff..14011ec0192 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/ThreadLocalContextUtil.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/ThreadLocalContextUtil.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.HashMap; + import org.apache.fineract.infrastructure.businessdate.domain.BusinessDateType; import org.apache.fineract.infrastructure.core.domain.ActionContext; import org.apache.fineract.infrastructure.core.domain.FineractContext; @@ -39,7 +40,8 @@ public final class ThreadLocalContextUtil { private static final ThreadLocal> businessDateContext = new ThreadLocal<>(); private static final ThreadLocal actionContext = new ThreadLocal<>(); - private ThreadLocalContextUtil() {} + private ThreadLocalContextUtil() { + } public static FineractPlatformTenant getTenant() { return tenantContext.get(); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DataSourcePerTenantServiceFactory.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DataSourcePerTenantServiceFactory.java index e40ffb039ae..6cc87194cdf 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DataSourcePerTenantServiceFactory.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DataSourcePerTenantServiceFactory.java @@ -6,9 +6,9 @@ * 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 @@ -24,8 +24,10 @@ import com.zaxxer.hikari.HikariConfig; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import io.micrometer.core.instrument.MeterRegistry; + import java.util.Optional; import javax.sql.DataSource; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseIndependentQueryService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseIndependentQueryService.java index 480d11897d7..a298baaee2d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseIndependentQueryService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseIndependentQueryService.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.Collection; import java.util.List; import javax.sql.DataSource; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.support.rowset.SqlRowSet; import org.springframework.stereotype.Component; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseIndexMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseIndexMapper.java index 480a08d469d..cca2022aeeb 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseIndexMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseIndexMapper.java @@ -6,9 +6,9 @@ * 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 @@ -20,11 +20,13 @@ import java.util.ArrayList; import java.util.List; + import org.springframework.jdbc.support.rowset.SqlRowSet; public final class DatabaseIndexMapper { - private DatabaseIndexMapper() {} + private DatabaseIndexMapper() { + } public static List getIndexDetails(SqlRowSet rowset) { List indexes = new ArrayList<>(); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabasePasswordDecryptor.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabasePasswordDecryptor.java index 582249e6f6a..7bf89645ccb 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabasePasswordDecryptor.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabasePasswordDecryptor.java @@ -6,9 +6,9 @@ * 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 @@ -21,11 +21,13 @@ import static org.apache.fineract.infrastructure.core.service.database.DatabasePasswordEncryptor.DEFAULT_ENCRYPTION; import java.text.MessageFormat; + import org.apache.fineract.infrastructure.security.utils.EncryptionUtil; public final class DatabasePasswordDecryptor { - private DatabasePasswordDecryptor() {} + private DatabasePasswordDecryptor() { + } @SuppressWarnings("checkstyle:regexpsinglelinejava") public static void main(String[] args) { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabasePasswordEncryptor.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabasePasswordEncryptor.java index b806ded0e15..bd5ae2817e5 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabasePasswordEncryptor.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabasePasswordEncryptor.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.nio.charset.StandardCharsets; import java.text.MessageFormat; import java.util.Optional; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.config.FineractProperties; import org.apache.fineract.infrastructure.security.service.PasswordEncryptor; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseQueryService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseQueryService.java index 14c8cff49e0..a1efad9ac25 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseQueryService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseQueryService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import javax.sql.DataSource; + import org.springframework.jdbc.support.rowset.SqlRowSet; public interface DatabaseQueryService { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseSpecificSQLGenerator.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseSpecificSQLGenerator.java index 9d66e68216a..f180351c5e2 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseSpecificSQLGenerator.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseSpecificSQLGenerator.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.dataqueries.data.ResultsetColumnHeaderData; @@ -228,7 +229,7 @@ public String buildFrom(String definition, String alias, boolean embedded) { } public String buildJoin(@NonNull String definition, String alias, @NonNull String fkCol, String refAlias, @NonNull String refCol, - String joinType) { + String joinType) { String join = Strings.isEmpty(joinType) ? "JOIN" : (joinType + " JOIN"); alias = Strings.isEmpty(alias) ? "" : (" " + alias); return format("%s %s%s ON %s = %s", join, escape(definition), alias, alias(escape(fkCol), alias), alias(escape(refCol), refAlias)); @@ -354,7 +355,7 @@ public Object[] inParametersFor(List ids) { return switch (getDialect()) { case POSTGRESQL -> { try { - yield new Object[] { DataSourceUtils.getConnection(dataSource).createArrayOf("bigint", ids.toArray(new Long[0])) }; + yield new Object[]{DataSourceUtils.getConnection(dataSource).createArrayOf("bigint", ids.toArray(new Long[0]))}; } catch (SQLException e) { throw new RuntimeException(e); } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseType.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseType.java index 269550f1c21..e21bde61d24 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseType.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseTypeResolver.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseTypeResolver.java index 4bdc8739123..5df2ab8a44f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseTypeResolver.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/DatabaseTypeResolver.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.core.service.database; import com.zaxxer.hikari.HikariConfig; + import java.util.Map; import java.util.concurrent.atomic.AtomicReference; + import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/HikariDataSourceFactory.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/HikariDataSourceFactory.java index 162bf13df15..5cb7b406793 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/HikariDataSourceFactory.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/HikariDataSourceFactory.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/IndexDetail.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/IndexDetail.java index 51d79e2e35b..77371290108 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/IndexDetail.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/IndexDetail.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/JavaType.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/JavaType.java index 193a0c99c72..e3cc6f4d1e3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/JavaType.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/JavaType.java @@ -6,9 +6,9 @@ * 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 @@ -37,6 +37,7 @@ import java.util.Locale; import java.util.Map; import java.util.stream.Collectors; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.exception.PlatformServiceUnavailableException; import org.apache.fineract.organisation.monetary.domain.MoneyHelper; @@ -220,7 +221,7 @@ public JavaType getObjectType() { case DOUBLE -> DOUBLE_OBJ; case FLOAT -> FLOAT_OBJ; default -> - throw new PlatformServiceUnavailableException("error.msg.database.type.not.allowed", "Unknown primitive type " + this); + throw new PlatformServiceUnavailableException("error.msg.database.type.not.allowed", "Unknown primitive type " + this); }; } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/JdbcJavaType.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/JdbcJavaType.java index 493bd7b640e..d29ed1b4212 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/JdbcJavaType.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/JdbcJavaType.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.core.service.database; import com.google.common.collect.ImmutableList; + import java.io.Serializable; import java.sql.JDBCType; + import org.apache.fineract.infrastructure.core.exception.PlatformServiceUnavailableException; import org.springframework.lang.NonNull; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/MySQLQueryService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/MySQLQueryService.java index ba1e504935a..63ce2eb68e4 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/MySQLQueryService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/MySQLQueryService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import javax.sql.DataSource; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.support.rowset.SqlRowSet; @@ -51,7 +52,7 @@ public SqlRowSet getTableColumns(DataSource dataSource, String tableName) { final JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); final String sql = "SELECT c.COLUMN_NAME, c.IS_NULLABLE, c.DATA_TYPE, c.CHARACTER_MAXIMUM_LENGTH, c.COLUMN_KEY FROM INFORMATION_SCHEMA.COLUMNS c WHERE TABLE_SCHEMA = schema() AND TABLE_NAME = ? ORDER BY ORDINAL_POSITION"; - final SqlRowSet columnDefinitions = jdbcTemplate.queryForRowSet(sql, new Object[] { tableName }); // NOSONAR + final SqlRowSet columnDefinitions = jdbcTemplate.queryForRowSet(sql, new Object[]{tableName}); // NOSONAR if (columnDefinitions.next()) { return columnDefinitions; } else { @@ -63,7 +64,7 @@ public SqlRowSet getTableColumns(DataSource dataSource, String tableName) { public List getTableIndexes(DataSource dataSource, String tableName) { final JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); final String sql = "SELECT i.INDEX_NAME FROM INFORMATION_SCHEMA.STATISTICS i WHERE TABLE_SCHEMA = schema() AND TABLE_NAME = ?"; - final SqlRowSet indexDefinitions = jdbcTemplate.queryForRowSet(sql, new Object[] { tableName }); // NOSONAR + final SqlRowSet indexDefinitions = jdbcTemplate.queryForRowSet(sql, new Object[]{tableName}); // NOSONAR if (indexDefinitions.next()) { return DatabaseIndexMapper.getIndexDetails(indexDefinitions); } else { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/PostgreSQLQueryService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/PostgreSQLQueryService.java index 092188c57ec..36204907a88 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/PostgreSQLQueryService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/PostgreSQLQueryService.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.List; import java.util.Objects; import javax.sql.DataSource; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.support.rowset.SqlRowSet; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/RoutingDataSource.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/RoutingDataSource.java index d75fadcd8be..4042043e6ad 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/RoutingDataSource.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/RoutingDataSource.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.Connection; import java.sql.SQLException; import javax.sql.DataSource; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Primary; import org.springframework.jdbc.datasource.AbstractDataSource; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/RoutingDataSourceService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/RoutingDataSourceService.java index b97e5eabd2e..6ba0902f553 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/RoutingDataSourceService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/RoutingDataSourceService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/RoutingDataSourceServiceFactory.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/RoutingDataSourceServiceFactory.java index 007a9b9d3aa..cfedced2973 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/RoutingDataSourceServiceFactory.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/RoutingDataSourceServiceFactory.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/SqlOperator.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/SqlOperator.java index ec33b9c6db2..6e7eba64ab4 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/SqlOperator.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/SqlOperator.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; + import lombok.AllArgsConstructor; import lombok.Getter; import org.apache.fineract.infrastructure.core.exception.PlatformServiceUnavailableException; @@ -42,7 +43,7 @@ public enum SqlOperator { @Override public String formatImpl(@NonNull DatabaseSpecificSQLGenerator sqlGenerator, JdbcJavaType columnType, String definition, - String... values) { + String... values) { return format("%s %s %s", definition, getSymbol(), sqlGenerator.formatValue(columnType, "%" + values[0] + "%")); } @@ -55,7 +56,7 @@ public String formatPlaceholderImpl(String definition, int paramCount, String pl @Override public String formatImpl(@NonNull DatabaseSpecificSQLGenerator sqlGenerator, JdbcJavaType columnType, String definition, - String... values) { + String... values) { return format("%s %s %s", definition, getSymbol(), sqlGenerator.formatValue(columnType, "%" + values[0] + "%")); } @@ -68,7 +69,7 @@ public String formatPlaceholderImpl(String definition, int paramCount, String pl @Override public String formatImpl(@NonNull DatabaseSpecificSQLGenerator sqlGenerator, JdbcJavaType columnType, String definition, - String... values) { + String... values) { return format("%s %s %s AND %s", definition, getSymbol(), sqlGenerator.formatValue(columnType, values[0]), sqlGenerator.formatValue(columnType, values[1])); } @@ -82,7 +83,7 @@ public String formatPlaceholderImpl(String definition, int paramCount, String pl @Override public String formatImpl(@NonNull DatabaseSpecificSQLGenerator sqlGenerator, JdbcJavaType columnType, String definition, - String... values) { + String... values) { return format("%s %s %s AND %s", definition, getSymbol(), sqlGenerator.formatValue(columnType, values[0]), sqlGenerator.formatValue(columnType, values[1])); } @@ -96,7 +97,7 @@ public String formatPlaceholderImpl(String definition, int paramCount, String pl @Override public String formatImpl(@NonNull DatabaseSpecificSQLGenerator sqlGenerator, JdbcJavaType columnType, String definition, - String... values) { + String... values) { return format("%s %s (%s)", definition, getSymbol(), Arrays.stream(values).map(e -> sqlGenerator.formatValue(columnType, e)).collect(Collectors.joining(", "))); } @@ -115,7 +116,7 @@ protected String formatNamedParamImpl(String definition, int paramCount, String @Override public String formatImpl(@NonNull DatabaseSpecificSQLGenerator sqlGenerator, JdbcJavaType columnType, String definition, - String... values) { + String... values) { return format("%s %s (%s)", definition, getSymbol(), Arrays.stream(values).map(e -> sqlGenerator.formatValue(columnType, e)).collect(Collectors.joining(", "))); } @@ -154,18 +155,18 @@ public boolean isListType() { } public String formatSql(@NonNull DatabaseSpecificSQLGenerator sqlGenerator, JdbcJavaType columnType, String definition, String alias, - List values) { + List values) { return formatSql(sqlGenerator, columnType, definition, alias, values == null ? null : values.toArray(String[]::new)); } public String formatSql(@NonNull DatabaseSpecificSQLGenerator sqlGenerator, JdbcJavaType columnType, String definition, String alias, - String... values) { + String... values) { validateValues(values); return formatImpl(sqlGenerator, columnType, sqlGenerator.alias(sqlGenerator.escape(definition), alias), values); } protected String formatImpl(@NonNull DatabaseSpecificSQLGenerator sqlGenerator, JdbcJavaType columnType, String definition, - String... values) { + String... values) { return paramCount == 0 ? format("%s %s", definition, symbol) : format("%s %s %s", definition, symbol, sqlGenerator.formatValue(columnType, values[0])); } @@ -188,7 +189,7 @@ public String formatPlaceholder(@NonNull DatabaseSpecificSQLGenerator sqlGenerat } public String formatPlaceholder(@NonNull DatabaseSpecificSQLGenerator sqlGenerator, String definition, int paramCount, String alias, - String placeholder) { + String placeholder) { validateParamCount(paramCount); return formatPlaceholderImpl(sqlGenerator.alias(sqlGenerator.escape(definition), alias), paramCount, placeholder); } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/TomcatJdbcDataSourcePerTenantService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/TomcatJdbcDataSourcePerTenantService.java index 11722bf2f32..67adb85acf9 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/TomcatJdbcDataSourcePerTenantService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/TomcatJdbcDataSourcePerTenantService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.service.database; import com.google.common.collect.Sets; + import java.sql.Connection; import java.sql.SQLException; import java.util.List; @@ -26,6 +27,7 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import javax.sql.DataSource; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.configuration.service.MoneyHelperInitializationService; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/metrics/TenantConnectionPoolMetricsTracker.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/metrics/TenantConnectionPoolMetricsTracker.java index 9b1f1682299..4a29fc95bda 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/metrics/TenantConnectionPoolMetricsTracker.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/metrics/TenantConnectionPoolMetricsTracker.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import io.micrometer.core.instrument.Gauge; import io.micrometer.core.instrument.MeterRegistry; import io.micrometer.core.instrument.Timer; + import java.util.concurrent.TimeUnit; public class TenantConnectionPoolMetricsTracker implements IMetricsTracker { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/metrics/TenantConnectionPoolMetricsTrackerFactory.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/metrics/TenantConnectionPoolMetricsTrackerFactory.java index 6a7631db49f..2bb491a9635 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/metrics/TenantConnectionPoolMetricsTrackerFactory.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/metrics/TenantConnectionPoolMetricsTrackerFactory.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantDataSourceFactory.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantDataSourceFactory.java index 938df631519..86952a0ec7f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantDataSourceFactory.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantDataSourceFactory.java @@ -6,9 +6,9 @@ * 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 @@ -42,7 +42,7 @@ public class TenantDataSourceFactory { @Autowired public TenantDataSourceFactory(@Qualifier("hikariTenantDataSource") HikariDataSource tenantDataSource, - DatabasePasswordEncryptor databasePasswordEncryptor) { + DatabasePasswordEncryptor databasePasswordEncryptor) { this.tenantDataSource = tenantDataSource; this.databasePasswordEncryptor = databasePasswordEncryptor; } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/tenant/JdbcTenantDetailsService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/tenant/JdbcTenantDetailsService.java index e248b301ae6..fad0d4c4708 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/tenant/JdbcTenantDetailsService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/tenant/JdbcTenantDetailsService.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.List; import javax.sql.DataSource; + import org.apache.fineract.infrastructure.core.domain.FineractPlatformTenant; import org.apache.fineract.infrastructure.security.exception.InvalidTenantIdentifierException; import org.springframework.beans.factory.annotation.Autowired; @@ -55,7 +56,7 @@ public FineractPlatformTenant loadTenantById(final String tenantIdentifier) { final TenantMapper rm = new TenantMapper(false); final String sql = "select " + rm.schema() + " where t.identifier = ?"; - return this.jdbcTemplate.queryForObject(sql, rm, new Object[] { tenantIdentifier }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, rm, new Object[]{tenantIdentifier}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new InvalidTenantIdentifierException("The tenant identifier: " + tenantIdentifier + " is not valid.", e); } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/tenant/TenantDetailsService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/tenant/TenantDetailsService.java index 51cde246983..8e7e52d04c2 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/tenant/TenantDetailsService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/tenant/TenantDetailsService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.service.tenant; import java.util.List; + import org.apache.fineract.infrastructure.core.domain.FineractPlatformTenant; public interface TenantDetailsService { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/tenant/TenantMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/tenant/TenantMapper.java index bb17ca50a10..c42657b6fde 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/tenant/TenantMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/tenant/TenantMapper.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; + import org.apache.fineract.infrastructure.core.domain.FineractPlatformTenant; import org.apache.fineract.infrastructure.core.domain.FineractPlatformTenantConnection; import org.springframework.jdbc.core.RowMapper; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/validator/ParseAndValidator.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/validator/ParseAndValidator.java index c88384e36a1..77ef2eb999f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/validator/ParseAndValidator.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/core/validator/ParseAndValidator.java @@ -6,9 +6,9 @@ * 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 @@ -21,9 +21,11 @@ import com.google.common.reflect.TypeToken; import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.lang.reflect.Type; import java.util.Collection; import java.util.Map; + import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -60,8 +62,9 @@ protected static void validateRequestBody(String json) { } protected void validateForSupportedParameters(final String json, final Collection supportedParameters, - final FromJsonHelper fromApiJsonHelper) { - final Type typeOfMap = new TypeToken>() {}.getType(); + final FromJsonHelper fromApiJsonHelper) { + final Type typeOfMap = new TypeToken>() { + }.getType(); fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, supportedParameters); } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DataTableApiConstant.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DataTableApiConstant.java index bad8b26cbca..883c147882f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DataTableApiConstant.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DataTableApiConstant.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ColumnFilter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ColumnFilter.java index 7b72f208559..efbfcf79023 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ColumnFilter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ColumnFilter.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.dataqueries.data; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DataTableValidator.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DataTableValidator.java index 0a5a552cc1e..db38293b422 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DataTableValidator.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DataTableValidator.java @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; import jakarta.validation.constraints.NotNull; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -35,6 +36,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; @@ -61,7 +63,8 @@ public DataTableValidator(final FromJsonHelper fromApiJsonHelper) { public void validateDataTableRegistration(final String json) { - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -72,7 +75,7 @@ public void validateDataTableRegistration(final String json) { if (this.fromApiJsonHelper.parameterExists(DataTableApiConstant.categoryParamName, element)) { final Integer category = this.fromApiJsonHelper.extractIntegerWithLocaleNamed(DataTableApiConstant.categoryParamName, element); - Object[] objectArray = new Integer[] { DataTableApiConstant.CATEGORY_PPI, DataTableApiConstant.CATEGORY_DEFAULT }; + Object[] objectArray = new Integer[]{DataTableApiConstant.CATEGORY_PPI, DataTableApiConstant.CATEGORY_DEFAULT}; baseDataValidator.reset().parameter(DataTableApiConstant.categoryParamName).value(category).isOneOfTheseValues(objectArray); } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DatatableCheckStatusData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DatatableCheckStatusData.java index d491226b417..5fda04d5540 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DatatableCheckStatusData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DatatableCheckStatusData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DatatableChecksData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DatatableChecksData.java index 01f08519dd5..4b5f92a79fe 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DatatableChecksData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DatatableChecksData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DatatableData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DatatableData.java index 8e22cbbca4e..993bacb535d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DatatableData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DatatableData.java @@ -6,9 +6,9 @@ * 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 @@ -36,12 +36,12 @@ public final class DatatableData implements Serializable { private final List columnHeaderData; public static DatatableData create(final String applicationTableName, final String registeredTableName, final String entitySubType, - final List columnHeaderData) { + final List columnHeaderData) { return new DatatableData(applicationTableName, registeredTableName, entitySubType, columnHeaderData); } private DatatableData(final String applicationTableName, final String registeredTableName, final String entitySubType, - final List columnHeaderData) { + final List columnHeaderData) { this.applicationTableName = applicationTableName; this.registeredTableName = registeredTableName; this.entitySubType = entitySubType; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DatatableSearchRequest.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DatatableSearchRequest.java index 87b4a9121e2..9f6f9c75d48 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DatatableSearchRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/DatatableSearchRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/EntityDataTableChecksData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/EntityDataTableChecksData.java index b573624a1df..8ce20010cea 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/EntityDataTableChecksData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/EntityDataTableChecksData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.dataqueries.data; import java.io.Serializable; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; /** @@ -36,7 +37,7 @@ public class EntityDataTableChecksData implements Serializable { private final String productName; public EntityDataTableChecksData(final long id, final String entity, final EnumOptionData status, final String datatableName, - final boolean systemDefined, final Long loanProductId, final String productName) { + final boolean systemDefined, final Long loanProductId, final String productName) { this.id = id; this.entity = entity; this.status = status; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/EntityTables.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/EntityTables.java index 3632e470413..14e068e48e7 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/EntityTables.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/EntityTables.java @@ -6,9 +6,9 @@ * 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 @@ -29,6 +29,7 @@ import com.google.common.collect.ImmutableList; import jakarta.validation.constraints.NotNull; + import java.util.Arrays; import java.util.List; import java.util.Map; @@ -71,7 +72,7 @@ public enum EntityTables { private final ImmutableList checkStatuses; EntityTables(@NotNull String name, @NotNull String apptableName, @NotNull String foreignKeyColumnNameOnDatatable, - @NotNull String refColumn, StatusEnum... statuses) { + @NotNull String refColumn, StatusEnum... statuses) { this.name = name; this.apptableName = apptableName; this.foreignKeyColumnNameOnDatatable = foreignKeyColumnNameOnDatatable; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/GenericResultsetData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/GenericResultsetData.java index 21e52f7f1da..ca7d33bcd7c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/GenericResultsetData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/GenericResultsetData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.dataqueries.data; import java.util.List; + import org.apache.fineract.infrastructure.core.service.database.JdbcJavaType; /** diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportData.java index c512c206b78..a2b40337bce 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportData.java @@ -6,9 +6,9 @@ * 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 @@ -53,8 +53,8 @@ public class ReportData { private Collection allowedParameters; public ReportData(final Long id, final String reportName, final String reportType, final String reportSubType, - final String reportCategory, final String description, final String reportSql, final Boolean coreReport, - final Boolean useReport, final Collection reportParameters) { + final String reportCategory, final String description, final String reportSql, final Boolean coreReport, + final Boolean useReport, final Collection reportParameters) { this.id = id; this.reportName = reportName; this.reportType = reportType; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportExportType.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportExportType.java index 10ea4daba9d..05fd2808bb8 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportExportType.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportExportType.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.dataqueries.data; import java.io.Serializable; + import lombok.Data; import lombok.RequiredArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportParameterData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportParameterData.java index f07f3b42b67..5fd61338c80 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportParameterData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportParameterData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportParameterJoinData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportParameterJoinData.java index edf7b07dd9f..752fd8efe27 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportParameterJoinData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportParameterJoinData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ResultsetColumnHeaderData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ResultsetColumnHeaderData.java index c196954c6a9..785300039c9 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ResultsetColumnHeaderData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ResultsetColumnHeaderData.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.infrastructure.dataqueries.data; import jakarta.validation.constraints.NotNull; + import java.io.Serializable; import java.util.ArrayList; import java.util.List; + import lombok.Getter; import org.apache.fineract.infrastructure.core.exception.PlatformDataIntegrityException; import org.apache.fineract.infrastructure.core.service.database.DatabaseType; @@ -57,15 +59,15 @@ public static ResultsetColumnHeaderData basic(final String columnName, final Str } public static ResultsetColumnHeaderData detailed(final String columnName, final String columnType, final Long columnLength, - final boolean columnNullable, final boolean columnIsPrimaryKey, final List columnValues, - final String columnCode, final boolean columnIsUnique, final boolean columnIsIndexed, DatabaseType dialect) { + final boolean columnNullable, final boolean columnIsPrimaryKey, final List columnValues, + final String columnCode, final boolean columnIsUnique, final boolean columnIsIndexed, DatabaseType dialect) { return new ResultsetColumnHeaderData(columnName, columnType, columnLength, columnNullable, columnIsPrimaryKey, columnValues, columnCode, columnIsUnique, columnIsIndexed, dialect); } private ResultsetColumnHeaderData(final String columnName, String columnType, final Long columnLength, final boolean columnNullable, - final boolean columnIsPrimaryKey, final List columnValues, final String columnCode, - final boolean columnIsUnique, final boolean columnIsIndexed, DatabaseType dialect) { + final boolean columnIsPrimaryKey, final List columnValues, final String columnCode, + final boolean columnIsUnique, final boolean columnIsIndexed, DatabaseType dialect) { this.columnName = columnName; this.columnLength = columnLength; this.isColumnNullable = columnNullable; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ResultsetColumnValueData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ResultsetColumnValueData.java index 9a9e8a10074..a67a274dd07 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ResultsetColumnValueData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ResultsetColumnValueData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ResultsetRowData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ResultsetRowData.java index d000f15e265..30ca295ed76 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ResultsetRowData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ResultsetRowData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/StatusEnum.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/StatusEnum.java index 6a7add1823d..22a61630b85 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/StatusEnum.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/StatusEnum.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Map; import java.util.stream.Collectors; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; public enum StatusEnum { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportType.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportType.java index 11086826655..f8dcb7504ec 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportType.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/DatatableEntryRequiredException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/DatatableEntryRequiredException.java index 5f78ead74d4..60552a2da6f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/DatatableEntryRequiredException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/DatatableEntryRequiredException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/DatatableNotFoundException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/DatatableNotFoundException.java index 00d57bcd94a..a4868654a82 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/DatatableNotFoundException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/DatatableNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/DatatableSystemErrorException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/DatatableSystemErrorException.java index 92968f73979..a7353fb2a16 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/DatatableSystemErrorException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/DatatableSystemErrorException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/CleanupService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/CleanupService.java index 175a3a18b27..eed658d802a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/CleanupService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/CleanupService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableKeywordGenerator.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableKeywordGenerator.java index 4b200ad55c0..f26cbb54422 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableKeywordGenerator.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableKeywordGenerator.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableReadService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableReadService.java index 0956276431a..ac4d8d9d1d3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableReadService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableReadService.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.dataqueries.service; import com.google.gson.JsonObject; + import java.util.List; import java.util.Locale; + import org.apache.fineract.infrastructure.core.service.PagedLocalRequest; import org.apache.fineract.infrastructure.dataqueries.data.DatatableData; import org.apache.fineract.infrastructure.dataqueries.data.EntityTables; @@ -36,13 +38,13 @@ public interface DatatableReadService { DatatableData retrieveDatatable(String datatable); List queryDataTable(@NonNull String datatable, @NonNull String columnName, String columnValue, - @NonNull String resultColumns); + @NonNull String resultColumns); Page queryDataTableAdvanced(@NonNull String datatable, @NonNull PagedLocalRequest pagedRequest); boolean buildDataQueryEmbedded(@NonNull EntityTables entityTable, @NonNull String datatable, @NonNull AdvancedQueryData request, - @NonNull List selectColumns, @NonNull StringBuilder select, @NonNull StringBuilder from, @NonNull StringBuilder where, - @NonNull List params, String mainAlias, String alias, String dateFormat, String dateTimeFormat, Locale locale); + @NonNull List selectColumns, @NonNull StringBuilder select, @NonNull StringBuilder from, @NonNull StringBuilder where, + @NonNull List params, String mainAlias, String alias, String dateFormat, String dateTimeFormat, Locale locale); GenericResultsetData retrieveDataTableGenericResultSet(String datatable, Long appTableId, String order, Long id); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableWriteService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableWriteService.java index afa80ed285c..97df9664d7a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableWriteService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableWriteService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataService.java index c0dffeb49b8..4edb73476cf 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.dataqueries.service; import java.util.List; + import org.apache.fineract.infrastructure.dataqueries.data.GenericResultsetData; import org.apache.fineract.infrastructure.dataqueries.data.ResultsetColumnHeaderData; import org.apache.fineract.infrastructure.dataqueries.data.ResultsetRowData; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/documentmanagement/adapter/EntityImageIdAdapter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/documentmanagement/adapter/EntityImageIdAdapter.java index f763f7268f3..5f34875f6f4 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/documentmanagement/adapter/EntityImageIdAdapter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/documentmanagement/adapter/EntityImageIdAdapter.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.util.Optional; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/BusinessEventListener.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/BusinessEventListener.java index 62cb903625f..f97dadfcd88 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/BusinessEventListener.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/BusinessEventListener.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/AbstractBusinessEvent.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/AbstractBusinessEvent.java index 741a9266475..4451bb1a3ee 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/AbstractBusinessEvent.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/AbstractBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/BulkBusinessEvent.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/BulkBusinessEvent.java index b1e6eae27fb..43d4dc3f830 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/BulkBusinessEvent.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/BulkBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/BusinessEvent.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/BusinessEvent.java index 65c2a9ebb65..92ea07fd210 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/BusinessEvent.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/BusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/NoExternalEvent.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/NoExternalEvent.java index 0706e75ecd6..7d4401ce07c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/NoExternalEvent.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/NoExternalEvent.java @@ -6,9 +6,9 @@ * 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 @@ -18,4 +18,5 @@ */ package org.apache.fineract.infrastructure.event.business.domain; -public interface NoExternalEvent {} +public interface NoExternalEvent { +} diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryBusinessEvent.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryBusinessEvent.java index 3a51b060b39..6dd10f3c446 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryBusinessEvent.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryCreatedBusinessEvent.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryCreatedBusinessEvent.java index a61688b42ad..541319af5d8 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryCreatedBusinessEvent.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryDeletedBusinessEvent.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryDeletedBusinessEvent.java index e1fa56247d4..bdc0a63f895 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryDeletedBusinessEvent.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryDeletedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryDetails.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryDetails.java index 0aada8cc6d0..520263a4420 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryDetails.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryDetails.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.business.domain.datatable; import java.util.Map; + import lombok.Data; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.dataqueries.data.EntityTables; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryUpdatedBusinessEvent.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryUpdatedBusinessEvent.java index ed361fdd280..1cc74bd0e37 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryUpdatedBusinessEvent.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/domain/datatable/DatatableEntryUpdatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/BusinessEventNotifierService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/BusinessEventNotifierService.java index d0176bc4191..706b51ad3ec 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/BusinessEventNotifierService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/BusinessEventNotifierService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/BusinessEventNotifierServiceImpl.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/BusinessEventNotifierServiceImpl.java index 4ae4b37023f..7a3401c8b37 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/BusinessEventNotifierServiceImpl.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/BusinessEventNotifierServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.List; import java.util.Map; import java.util.Stack; + import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Setter; @@ -44,7 +45,7 @@ import org.springframework.transaction.annotation.Transactional; @Service -@SuppressWarnings({ "unchecked", "rawtypes" }) +@SuppressWarnings({"unchecked", "rawtypes"}) @RequiredArgsConstructor @Slf4j public class BusinessEventNotifierServiceImpl implements BusinessEventNotifierService, InitializingBean, TransactionExecutionListener { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/ExternalBusinessEventConfigurationService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/ExternalBusinessEventConfigurationService.java index 2a8374674d4..5926240058f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/ExternalBusinessEventConfigurationService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/ExternalBusinessEventConfigurationService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/ExternalBusinessEventConfigurationServiceImpl.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/ExternalBusinessEventConfigurationServiceImpl.java index e1fb6c920dd..955ce227c70 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/ExternalBusinessEventConfigurationServiceImpl.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/ExternalBusinessEventConfigurationServiceImpl.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/TransactionHelper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/TransactionHelper.java index 7a30304e072..3d2651f9d6f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/TransactionHelper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/business/service/TransactionHelper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/command/ExternalConfigurationsUpdateCommand.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/command/ExternalConfigurationsUpdateCommand.java index c42d79b2ebe..060e9588919 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/command/ExternalConfigurationsUpdateCommand.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/command/ExternalConfigurationsUpdateCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class ExternalConfigurationsUpdateCommand extends Command {} +public class ExternalConfigurationsUpdateCommand extends Command { +} diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/EnableExternalEventQueueCondition.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/EnableExternalEventQueueCondition.java index b3f7182fcc3..6f35852a207 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/EnableExternalEventQueueCondition.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/EnableExternalEventQueueCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/EnableExternalEventTopicCondition.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/EnableExternalEventTopicCondition.java index 5b1fc3af4a6..82faa3b9f0a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/EnableExternalEventTopicCondition.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/EnableExternalEventTopicCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/EventTaskExecutorConfig.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/EventTaskExecutorConfig.java index 84322bb4511..629fbe8ddbc 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/EventTaskExecutorConfig.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/EventTaskExecutorConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/ExternalBusinessEventConfiguration.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/ExternalBusinessEventConfiguration.java index 36cc7e0f1e4..74d738180c5 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/ExternalBusinessEventConfiguration.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/ExternalBusinessEventConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/TaskExecutorConstant.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/TaskExecutorConstant.java index b7c3ef868c0..81319b9a597 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/TaskExecutorConstant.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/config/TaskExecutorConstant.java @@ -6,9 +6,9 @@ * 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 @@ -20,7 +20,8 @@ public final class TaskExecutorConstant { - private TaskExecutorConstant() {} + private TaskExecutorConstant() { + } public static final String EVENT_MARKS_AS_SENT_EXECUTOR_BEAN_NAME = "eventMarksAsSentExecutor"; } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventConfigurationItemResponse.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventConfigurationItemResponse.java index ace42edae10..85be4bbca6e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventConfigurationItemResponse.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventConfigurationItemResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventConfigurationResponse.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventConfigurationResponse.java index f2a9dbbbd30..fabaac0cb3f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventConfigurationResponse.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventConfigurationResponse.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventConfigurationUpdateRequest.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventConfigurationUpdateRequest.java index 613bb7a37c3..a54a525dc51 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventConfigurationUpdateRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventConfigurationUpdateRequest.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.infrastructure.event.external.data; import jakarta.validation.constraints.NotNull; + import java.io.Serial; import java.io.Serializable; import java.util.Map; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventConfigurationUpdateResponse.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventConfigurationUpdateResponse.java index a4d5ae4a14b..824f324d845 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventConfigurationUpdateResponse.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventConfigurationUpdateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.util.HashMap; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventResponse.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventResponse.java index 6f258b7363a..ea34b15c1a8 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventResponse.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/data/ExternalEventResponse.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.Map; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/exception/AcknowledgementTimeoutException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/exception/AcknowledgementTimeoutException.java index f40864f2ad0..799e503cc8a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/exception/AcknowledgementTimeoutException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/exception/AcknowledgementTimeoutException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/exception/ExternalEventConfigurationNotFoundException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/exception/ExternalEventConfigurationNotFoundException.java index 6ffbe330ab2..b6347bdac94 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/exception/ExternalEventConfigurationNotFoundException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/exception/ExternalEventConfigurationNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/handler/ExternalEventConfigurationUpdateHandler.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/handler/ExternalEventConfigurationUpdateHandler.java index 73598384ed1..af60f0cc1f0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/handler/ExternalEventConfigurationUpdateHandler.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/handler/ExternalEventConfigurationUpdateHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/jobs/PurgeExternalEventsConfig.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/jobs/PurgeExternalEventsConfig.java index 810d2bb705d..676d46b4574 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/jobs/PurgeExternalEventsConfig.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/jobs/PurgeExternalEventsConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/jobs/PurgeExternalEventsTasklet.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/jobs/PurgeExternalEventsTasklet.java index 895cda3a23b..7b358943607 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/jobs/PurgeExternalEventsTasklet.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/jobs/PurgeExternalEventsTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.jobs; import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/jobs/SendAsynchronousEventsConfig.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/jobs/SendAsynchronousEventsConfig.java index 268c88fbe42..c9150a745b2 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/jobs/SendAsynchronousEventsConfig.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/jobs/SendAsynchronousEventsConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/jobs/SendAsynchronousEventsTasklet.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/jobs/SendAsynchronousEventsTasklet.java index 474c2cd8d4c..306a4284934 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/jobs/SendAsynchronousEventsTasklet.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/jobs/SendAsynchronousEventsTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import static org.apache.fineract.infrastructure.core.diagnostics.performance.MeasuringUtil.measure; import com.google.common.collect.Lists; + import java.io.IOException; import java.nio.ByteBuffer; import java.time.OffsetDateTime; @@ -31,6 +32,7 @@ import java.util.Map; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.avro.MessageV1; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/producer/ExternalEventProducer.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/producer/ExternalEventProducer.java index 983875843b2..581d17a2a03 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/producer/ExternalEventProducer.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/producer/ExternalEventProducer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.event.external.exception.AcknowledgementTimeoutException; public interface ExternalEventProducer { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/producer/NoopExternalEventEnabled.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/producer/NoopExternalEventEnabled.java index cc015c5306f..be75c2282ed 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/producer/NoopExternalEventEnabled.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/producer/NoopExternalEventEnabled.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/producer/NoopExternalEventProducer.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/producer/NoopExternalEventProducer.java index 6fd13a8d8a3..1dd1ae34cca 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/producer/NoopExternalEventProducer.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/producer/NoopExternalEventProducer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Map; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.event.external.exception.AcknowledgementTimeoutException; import org.springframework.context.annotation.Conditional; @@ -31,5 +32,6 @@ public class NoopExternalEventProducer implements ExternalEventProducer { @Override - public void sendEvents(Map> messages) throws AcknowledgementTimeoutException {} + public void sendEvents(Map> messages) throws AcknowledgementTimeoutException { + } } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/CustomExternalEventConfigurationRepository.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/CustomExternalEventConfigurationRepository.java index 8978e3a5b2a..590d1a54d6a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/CustomExternalEventConfigurationRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/CustomExternalEventConfigurationRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/CustomExternalEventConfigurationRepositoryImpl.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/CustomExternalEventConfigurationRepositoryImpl.java index d32bf4405ab..92988d71fa5 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/CustomExternalEventConfigurationRepositoryImpl.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/CustomExternalEventConfigurationRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/ExternalEventConfigurationRepository.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/ExternalEventConfigurationRepository.java index eb7e91d319a..cd23e0e421a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/ExternalEventConfigurationRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/ExternalEventConfigurationRepository.java @@ -6,9 +6,9 @@ * 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 @@ -22,4 +22,5 @@ import org.springframework.data.jpa.repository.JpaRepository; public interface ExternalEventConfigurationRepository - extends JpaRepository, CustomExternalEventConfigurationRepository {} + extends JpaRepository, CustomExternalEventConfigurationRepository { +} diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/ExternalEventRepository.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/ExternalEventRepository.java index aff28cc7416..dd36812d83e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/ExternalEventRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/ExternalEventRepository.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.List; + import org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEvent; import org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventStatus; import org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventView; @@ -38,7 +39,7 @@ public interface ExternalEventRepository extends JpaRepository * 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 @@ -25,8 +25,10 @@ import jakarta.persistence.Enumerated; import jakarta.persistence.FetchType; import jakarta.persistence.Table; + import java.time.LocalDate; import java.time.OffsetDateTime; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/domain/ExternalEventConfiguration.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/domain/ExternalEventConfiguration.java index d45ab8aec21..05b17dca8fd 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/domain/ExternalEventConfiguration.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/domain/ExternalEventConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/domain/ExternalEventStatus.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/domain/ExternalEventStatus.java index 6efe4da200c..df59b1c0a49 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/domain/ExternalEventStatus.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/domain/ExternalEventStatus.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/domain/ExternalEventView.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/domain/ExternalEventView.java index 4c7b43cafe2..3e83e2219d6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/domain/ExternalEventView.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/repository/domain/ExternalEventView.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationReadPlatformService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationReadPlatformService.java index b9bbc5b5ea3..27b45cc5b97 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationReadPlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationReadPlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationReadPlatformServiceImpl.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationReadPlatformServiceImpl.java index b1b6b1e8ac0..cd2f5b97230 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationReadPlatformServiceImpl.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.service; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.event.external.data.ExternalEventConfigurationResponse; import org.apache.fineract.infrastructure.event.external.repository.ExternalEventConfigurationRepository; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationValidationService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationValidationService.java index 4ec19545d10..e86b1fd3e9a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationValidationService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationValidationService.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import io.github.classgraph.ClassGraph; import io.github.classgraph.ClassInfoList; import io.github.classgraph.ScanResult; + import java.util.List; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationWritePlatformService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationWritePlatformService.java index 22c7c9d2d8c..bbc63a5ea10 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationWritePlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationWritePlatformServiceImpl.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationWritePlatformServiceImpl.java index bb9971ddf4c..6da4cb4dcd5 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationWritePlatformServiceImpl.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.HashMap; + import lombok.AllArgsConstructor; import org.apache.fineract.infrastructure.event.external.data.ExternalEventConfigurationUpdateRequest; import org.apache.fineract.infrastructure.event.external.data.ExternalEventConfigurationUpdateResponse; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventService.java index 544cb88defc..b1b899f7f70 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventService.java @@ -6,9 +6,9 @@ * 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 @@ -20,10 +20,12 @@ import jakarta.persistence.EntityManager; import jakarta.persistence.PersistenceContext; + import java.io.IOException; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.avro.BulkMessageItemV1; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventsConfigurationMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventsConfigurationMapper.java index 2e741bb32a1..b61171f70c0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventsConfigurationMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/ExternalEventsConfigurationMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.service; import java.util.List; + import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.infrastructure.event.external.data.ExternalEventConfigurationItemResponse; import org.apache.fineract.infrastructure.event.external.repository.domain.ExternalEventConfiguration; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/InternalExternalEventService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/InternalExternalEventService.java index 71805455ccc..e0db4272b87 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/InternalExternalEventService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/InternalExternalEventService.java @@ -6,9 +6,9 @@ * 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 @@ -21,11 +21,13 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; + import java.lang.reflect.InvocationTargetException; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -77,7 +79,7 @@ public List getAllExternalEvents(String idempotencyKey, S try { return convertToReadableFormat(externalEvents); } catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException | IllegalAccessException - | JsonProcessingException e) { + | JsonProcessingException e) { throw new RuntimeException("Error while converting external events to readable format", e); } } @@ -148,7 +150,8 @@ private ExternalEventResponse retrieveBulkMessage(BulkMessageItemV1 messageItem, } private Map toJsonMap(String json) throws JsonProcessingException { - return mapper.readValue(json, new TypeReference<>() {}); + return mapper.readValue(json, new TypeReference<>() { + }); } } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/idempotency/DefaultExternalEventIdempotencyKeyGenerator.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/idempotency/DefaultExternalEventIdempotencyKeyGenerator.java index 030db84844a..7b6ea393366 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/idempotency/DefaultExternalEventIdempotencyKeyGenerator.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/idempotency/DefaultExternalEventIdempotencyKeyGenerator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.service.idempotency; import java.util.UUID; + import org.apache.fineract.infrastructure.event.business.domain.BusinessEvent; import org.springframework.stereotype.Component; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/idempotency/ExternalEventIdempotencyKeyGenerator.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/idempotency/ExternalEventIdempotencyKeyGenerator.java index 3de0ba990fe..214dc8c0baa 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/idempotency/ExternalEventIdempotencyKeyGenerator.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/idempotency/ExternalEventIdempotencyKeyGenerator.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/BulkMessageItemFactory.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/BulkMessageItemFactory.java index b2fbd68f982..66c35e6524c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/BulkMessageItemFactory.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/BulkMessageItemFactory.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.IOException; import java.nio.ByteBuffer; + import lombok.RequiredArgsConstructor; import org.apache.fineract.avro.BulkMessageItemV1; import org.apache.fineract.avro.generator.ByteBufferSerializable; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/MessageFactory.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/MessageFactory.java index a723c1c0273..12aeff224a9 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/MessageFactory.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/MessageFactory.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import java.time.format.DateTimeFormatterBuilder; import java.time.temporal.ChronoField; import java.util.UUID; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.avro.MessageV1; @@ -66,8 +67,8 @@ public class MessageFactory implements InitializingBean { private final ByteBufferConverter byteBufferConverter; public MessageV1 createMessage(MessageId id, MessageSource source, MessageType type, MessageCategory category, - MessageCreatedAt createdAt, MessageBusinessDate businessDate, MessageIdempotencyKey idempotencyKey, - MessageDataSchema dataSchema, MessageData data) { + MessageCreatedAt createdAt, MessageBusinessDate businessDate, MessageIdempotencyKey idempotencyKey, + MessageDataSchema dataSchema, MessageData data) { MessageV1 result = new MessageV1(); result.setId(id.getId()); result.setSource(source.getSource()); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/BulkMessageData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/BulkMessageData.java index 8fbed39e6fa..dc48178350b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/BulkMessageData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/BulkMessageData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.service.message.domain; import java.util.Objects; + import lombok.Getter; import org.apache.fineract.avro.BulkMessagePayloadV1; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageBusinessDate.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageBusinessDate.java index 9cfb8d31694..2e0f8f416e0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageBusinessDate.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageBusinessDate.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.Objects; + import lombok.Getter; @Getter diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageCategory.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageCategory.java index 187e7b8b5f9..adc6cfcee18 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageCategory.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageCategory.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.service.message.domain; import java.util.Objects; + import lombok.Getter; @Getter diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageCreatedAt.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageCreatedAt.java index 1387ee68749..1f6dc90a105 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageCreatedAt.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageCreatedAt.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.OffsetDateTime; import java.util.Objects; + import lombok.Getter; @Getter diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageData.java index 0be00a860af..a46a322f2a9 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.nio.ByteBuffer; import java.util.Objects; + import lombok.Getter; @Getter diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageDataSchema.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageDataSchema.java index 5d47c77c4a3..f6e275bce40 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageDataSchema.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageDataSchema.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.service.message.domain; import java.util.Objects; + import lombok.Getter; @Getter diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageId.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageId.java index 230815d89db..2db15f99f24 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageId.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageId.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageIdempotencyKey.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageIdempotencyKey.java index ae9e7332e2c..9b7d04ec447 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageIdempotencyKey.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageIdempotencyKey.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.service.message.domain; import java.util.Objects; + import lombok.Getter; @Getter diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageSource.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageSource.java index 9c096db5850..cb7f4574c08 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageSource.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageSource.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.service.message.domain; import java.util.Objects; + import lombok.Getter; @Getter diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageType.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageType.java index 577f845b988..ec21480a7b0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageType.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/message/domain/MessageType.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.service.message.domain; import java.util.Objects; + import lombok.Getter; @Getter diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/generic/CommandProcessingResultMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/generic/CommandProcessingResultMapper.java index 20d14d408ac..1c37d45618a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/generic/CommandProcessingResultMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/generic/CommandProcessingResultMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/generic/CurrencyDataMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/generic/CurrencyDataMapper.java index 4195640d7a3..f3da22bf8a8 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/generic/CurrencyDataMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/generic/CurrencyDataMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/support/AvroDateTimeMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/support/AvroDateTimeMapper.java index 7ad3011c087..752563955d7 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/support/AvroDateTimeMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/support/AvroDateTimeMapper.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.LocalDateTime; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; + import org.springframework.stereotype.Component; @Component diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/support/AvroMapperConfig.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/support/AvroMapperConfig.java index 8f297aac93e..c59c0782c3c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/support/AvroMapperConfig.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/support/AvroMapperConfig.java @@ -6,9 +6,9 @@ * 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 @@ -25,5 +25,6 @@ import org.mapstruct.ReportingPolicy; @MapperConfig(componentModel = MappingConstants.ComponentModel.SPRING, unmappedTargetPolicy = ReportingPolicy.ERROR, builder = @Builder(disableBuilder = true), uses = { - AvroDateTimeMapper.class, AvroMonthDayMapper.class, ExternalIdMapper.class }, injectionStrategy = InjectionStrategy.CONSTRUCTOR) -public class AvroMapperConfig {} + AvroDateTimeMapper.class, AvroMonthDayMapper.class, ExternalIdMapper.class}, injectionStrategy = InjectionStrategy.CONSTRUCTOR) +public class AvroMapperConfig { +} diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/support/AvroMonthDayMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/support/AvroMonthDayMapper.java index b4bbb004101..b9fbb303019 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/support/AvroMonthDayMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/support/AvroMonthDayMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.service.serialization.mapper.support; import java.time.MonthDay; + import org.springframework.stereotype.Component; @Component diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/support/ExternalIdMapper.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/support/ExternalIdMapper.java index 0bb3354ad85..8fed7e54eb6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/support/ExternalIdMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/support/ExternalIdMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/AbstractBusinessEventWithCustomDataSerializer.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/AbstractBusinessEventWithCustomDataSerializer.java index c3c3d69345d..3bebcf899e6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/AbstractBusinessEventWithCustomDataSerializer.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/AbstractBusinessEventWithCustomDataSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.event.business.domain.BusinessEvent; public abstract class AbstractBusinessEventWithCustomDataSerializer> implements BusinessEventSerializer { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/BusinessEventSerializer.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/BusinessEventSerializer.java index 416e223eb63..23046a96b6f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/BusinessEventSerializer.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/BusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/BusinessEventSerializerFactory.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/BusinessEventSerializerFactory.java index cdfd137d064..4b206b89b02 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/BusinessEventSerializerFactory.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/BusinessEventSerializerFactory.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.service.serialization.serializer; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.event.business.domain.BusinessEvent; import org.springframework.stereotype.Component; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/ExternalEventCustomDataSerializer.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/ExternalEventCustomDataSerializer.java index 4b2570bc273..07d794768cf 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/ExternalEventCustomDataSerializer.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/ExternalEventCustomDataSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.service.serialization.serializer; import java.nio.ByteBuffer; + import org.apache.fineract.infrastructure.event.business.domain.BusinessEvent; public interface ExternalEventCustomDataSerializer> { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/support/ByteBufferConverter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/support/ByteBufferConverter.java index 6e7ecfe8a59..2fce791a4d3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/support/ByteBufferConverter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/support/ByteBufferConverter.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.service.support; import java.nio.ByteBuffer; + import org.springframework.stereotype.Component; @Component diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/ExternalEventSourceData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/ExternalEventSourceData.java index 575eb01335f..935901483ed 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/ExternalEventSourceData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/ExternalEventSourceData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/ExternalEventSourceProvider.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/ExternalEventSourceProvider.java index 7da3e67dce6..58af6a39ff8 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/ExternalEventSourceProvider.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/ExternalEventSourceProvider.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/ExternalEventSourceProviderConfig.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/ExternalEventSourceProviderConfig.java index 779edb4cd29..63f0791295f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/ExternalEventSourceProviderConfig.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/ExternalEventSourceProviderConfig.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.List; + import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/ExternalEventSourceService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/ExternalEventSourceService.java index d4f1cb106b5..f5c33d56796 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/ExternalEventSourceService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/ExternalEventSourceService.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/SimpleExternalEventSourceProvider.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/SimpleExternalEventSourceProvider.java index f23864188c8..7354561d5fd 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/SimpleExternalEventSourceProvider.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/event/external/service/validation/SimpleExternalEventSourceProvider.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/hooks/event/HookEvent.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/hooks/event/HookEvent.java index a9cdaa469d0..2cb127e0989 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/hooks/event/HookEvent.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/hooks/event/HookEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/hooks/event/HookEventSource.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/hooks/event/HookEventSource.java index 751eaba3ceb..f0d879d6c3f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/hooks/event/HookEventSource.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/hooks/event/HookEventSource.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.hooks.event; import java.io.Serializable; + import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/instancemode/api/FineractInstanceModeConstants.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/instancemode/api/FineractInstanceModeConstants.java index 73f0865f969..f5cd64575f5 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/instancemode/api/FineractInstanceModeConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/instancemode/api/FineractInstanceModeConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/instancemode/filter/FineractInstanceModeApiFilter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/instancemode/filter/FineractInstanceModeApiFilter.java index 21db957240f..7640a52ae7f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/instancemode/filter/FineractInstanceModeApiFilter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/instancemode/filter/FineractInstanceModeApiFilter.java @@ -6,9 +6,9 @@ * 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 @@ -26,9 +26,11 @@ import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import jakarta.ws.rs.HttpMethod; + import java.io.IOException; import java.util.List; import java.util.function.Function; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.config.FineractProperties; @@ -117,7 +119,7 @@ static class ExceptionListItem { private final Function pathFunction; public static ExceptionListItem item(Function modeFunction, - Function pathFunction) { + Function pathFunction) { return new ExceptionListItem(modeFunction, pathFunction); } } diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/TenantAwareEqualsHashCodeAdvice.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/TenantAwareEqualsHashCodeAdvice.java index 9a3e295b5d0..696acef5004 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/TenantAwareEqualsHashCodeAdvice.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/TenantAwareEqualsHashCodeAdvice.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.lang.reflect.Method; import java.util.Objects; + import org.apache.fineract.infrastructure.core.domain.FineractPlatformTenant; import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil; import org.springframework.cglib.proxy.Factory; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobDetailData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobDetailData.java index 3e2b636929f..c090c67a001 100755 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobDetailData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobDetailData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.jobs.data; import java.util.Date; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; @@ -55,8 +56,8 @@ public class JobDetailData { private JobDetailHistoryData lastRunHistory; public JobDetailData(Long jobId, String displayName, String shortName, Date nextRunTime, String initializingError, - String cronExpression, boolean active, boolean currentlyRunning, Long version, Date jobRunStartTime, Date jobRunEndTime, - String status, String jobRunErrorMessage, String triggerType, String jobRunErrorLog) { + String cronExpression, boolean active, boolean currentlyRunning, Long version, Date jobRunStartTime, Date jobRunEndTime, + String status, String jobRunErrorMessage, String triggerType, String jobRunErrorLog) { this.jobId = jobId; this.displayName = displayName; this.shortName = shortName; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobDetailHistoryData.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobDetailHistoryData.java index 45e17b4f8a3..73236da19e9 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobDetailHistoryData.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobDetailHistoryData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.jobs.data; import java.util.Date; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobParameterDTO.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobParameterDTO.java index 59a24df70af..fbaaf1ac6f6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobParameterDTO.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobParameterDTO.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobParametersDTO.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobParametersDTO.java index ca1eff751be..139c57f9008 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobParametersDTO.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobParametersDTO.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.jobs.data; import java.util.Set; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/domain/CustomJobParameter.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/domain/CustomJobParameter.java index 8f8da874ba7..0b9b9b6a33e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/domain/CustomJobParameter.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/domain/CustomJobParameter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/domain/CustomJobParameterRepository.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/domain/CustomJobParameterRepository.java index b502e7fcc1e..6779024cf44 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/domain/CustomJobParameterRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/domain/CustomJobParameterRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Optional; import java.util.Set; + import org.apache.fineract.infrastructure.jobs.data.JobParameterDTO; public interface CustomJobParameterRepository { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/domain/CustomJobParameterRepositoryImpl.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/domain/CustomJobParameterRepositoryImpl.java index 10b2f6fb8cd..ecff6d5382e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/domain/CustomJobParameterRepositoryImpl.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/domain/CustomJobParameterRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,11 +19,13 @@ package org.apache.fineract.infrastructure.jobs.domain; import com.google.gson.Gson; + import java.sql.ResultSet; import java.sql.SQLException; import java.util.Objects; import java.util.Optional; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.serialization.GoogleGsonSerializerHelper; import org.apache.fineract.infrastructure.core.service.database.DatabaseSpecificSQLGenerator; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/exception/JobExecutionException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/exception/JobExecutionException.java index bf7d2957649..1bf1745bd3b 100755 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/exception/JobExecutionException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/exception/JobExecutionException.java @@ -6,9 +6,9 @@ * 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 @@ -22,11 +22,13 @@ import static java.util.stream.Collectors.toList; import jakarta.validation.constraints.NotNull; + import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.stream.Collectors; import java.util.stream.Stream; + import org.apache.fineract.infrastructure.core.exception.MultiException; public class JobExecutionException extends MultiException { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobName.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobName.java index 51a501599e9..489823112ce 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobName.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobName.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobRunnerReadService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobRunnerReadService.java index e8e0710a81c..3b614443564 100755 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobRunnerReadService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobRunnerReadService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.jobs.service; import java.util.List; + import org.apache.fineract.infrastructure.core.api.IdTypeResolver; import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.infrastructure.core.service.SearchParameters; @@ -33,7 +34,7 @@ public interface SchedulerJobRunnerReadService { JobDetailData retrieveOne(@NonNull IdTypeResolver.IdType idType, String identifier); Page retrieveJobHistory(@NonNull IdTypeResolver.IdType idType, String identifier, - SearchParameters searchParameters); + SearchParameters searchParameters); @NonNull Long retrieveId(@NonNull IdTypeResolver.IdType idType, String identifier); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/service/StepName.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/service/StepName.java index 7e00b06ac6e..1ff54192610 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/service/StepName.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/jobs/service/StepName.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/domain/BasicPasswordEncodablePlatformUser.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/domain/BasicPasswordEncodablePlatformUser.java index 590942545dd..925c1d1c1df 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/domain/BasicPasswordEncodablePlatformUser.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/domain/BasicPasswordEncodablePlatformUser.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.security.domain; import java.util.Collection; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/domain/PlatformUser.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/domain/PlatformUser.java index f4dcfc77059..d15f8fb3074 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/domain/PlatformUser.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/domain/PlatformUser.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/exception/InvalidInstanceTypeMethodException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/exception/InvalidInstanceTypeMethodException.java index 85d44f8df47..13450ea9b20 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/exception/InvalidInstanceTypeMethodException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/exception/InvalidInstanceTypeMethodException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/exception/InvalidTenantIdentifierException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/exception/InvalidTenantIdentifierException.java index 263ca4767a3..4861b3c51de 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/exception/InvalidTenantIdentifierException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/exception/InvalidTenantIdentifierException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/exception/NoAuthorizationException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/exception/NoAuthorizationException.java index 53b3d2126b5..ab0607ae689 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/exception/NoAuthorizationException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/exception/NoAuthorizationException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/exception/SqlValidationException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/exception/SqlValidationException.java index e6c8c787d01..6f24b448ff1 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/exception/SqlValidationException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/exception/SqlValidationException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PasswordEncryptor.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PasswordEncryptor.java index 64ad4fc941c..3b07a446bb5 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PasswordEncryptor.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PasswordEncryptor.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformPasswordEncoder.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformPasswordEncoder.java index 7775798b79c..4d37d9afeb6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformPasswordEncoder.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformPasswordEncoder.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformSecurityContext.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformSecurityContext.java index c02bce647b3..4ed66d78774 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformSecurityContext.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformSecurityContext.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformUserDetailsService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformUserDetailsService.java index ee9291c3127..6c5fe8335ff 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformUserDetailsService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformUserDetailsService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformUserRightsContext.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformUserRightsContext.java index 519be83d76a..8cb06c7e65e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformUserRightsContext.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformUserRightsContext.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/RandomPasswordGenerator.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/RandomPasswordGenerator.java index a6304f9ab4e..15dbd9f47dc 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/RandomPasswordGenerator.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/RandomPasswordGenerator.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/SqlInjectionPreventerService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/SqlInjectionPreventerService.java index 83794b10927..9227eecab96 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/SqlInjectionPreventerService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/SqlInjectionPreventerService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/SqlValidator.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/SqlValidator.java index 113f7d2831c..326e7b3fc9e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/SqlValidator.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/service/SqlValidator.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/ColumnValidator.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/ColumnValidator.java index 444aad2fea6..a915b5bc144 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/ColumnValidator.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/ColumnValidator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.security.utils; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.ResultSet; @@ -31,6 +32,7 @@ import java.util.Map; import java.util.Objects; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/DefaultSqlValidator.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/DefaultSqlValidator.java index 311473bf8d2..e637a00b2be 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/DefaultSqlValidator.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/DefaultSqlValidator.java @@ -6,9 +6,9 @@ * 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 @@ -19,11 +19,13 @@ package org.apache.fineract.infrastructure.security.utils; import jakarta.annotation.PostConstruct; + import java.util.Comparator; import java.util.LinkedHashMap; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/EncryptionUtil.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/EncryptionUtil.java index ec1e4c2320c..b785602a77f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/EncryptionUtil.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/EncryptionUtil.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.security.utils; import jakarta.validation.constraints.NotNull; + import java.nio.charset.StandardCharsets; import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; @@ -35,7 +36,8 @@ public final class EncryptionUtil { private static SecureRandom random = new SecureRandom(); - private EncryptionUtil() {} + private EncryptionUtil() { + } public static String encryptToBase64(@NotNull String cipherType, @NotNull String masterPassword, @NotNull String data) { try { diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/LogParameterEscapeUtil.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/LogParameterEscapeUtil.java index 8eb145f8076..3c2da688b59 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/LogParameterEscapeUtil.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/LogParameterEscapeUtil.java @@ -6,9 +6,9 @@ * 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 @@ -20,7 +20,8 @@ public final class LogParameterEscapeUtil { - private LogParameterEscapeUtil() {} + private LogParameterEscapeUtil() { + } public static String escapeLogParameter(String logParameter) { return logParameter.replaceAll("[\n\r\t]", "_"); diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLBuilder.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLBuilder.java index 694a65aa6f7..6bc2fb5b7da 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLBuilder.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLBuilder.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.Locale; import java.util.function.Consumer; import java.util.regex.Pattern; + import lombok.Getter; /** diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLCommandCondition.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLCommandCondition.java index 0047a6b24a6..950fef7ebcb 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLCommandCondition.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLCommandCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLInjectionException.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLInjectionException.java index 36ff0d7fbb0..3b2cde4f1bf 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLInjectionException.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/security/utils/SQLInjectionException.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.security.utils; import java.sql.SQLException; + import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; @Deprecated diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/springbatch/PropertyService.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/springbatch/PropertyService.java index 8c135140795..1b5ceff1bce 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/springbatch/PropertyService.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/springbatch/PropertyService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/infrastructure/springbatch/SpringBatchJobConstants.java b/fineract-core/src/main/java/org/apache/fineract/infrastructure/springbatch/SpringBatchJobConstants.java index 016e9ba158e..30d11e3e11a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/infrastructure/springbatch/SpringBatchJobConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/infrastructure/springbatch/SpringBatchJobConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/interoperation/domain/InteropIdentifierType.java b/fineract-core/src/main/java/org/apache/fineract/interoperation/domain/InteropIdentifierType.java index 81b811271da..9153bc0a9a6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/interoperation/domain/InteropIdentifierType.java +++ b/fineract-core/src/main/java/org/apache/fineract/interoperation/domain/InteropIdentifierType.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Map; import java.util.stream.Collectors; + import lombok.Getter; import org.apache.fineract.infrastructure.core.data.StringEnumOptionData; diff --git a/fineract-core/src/main/java/org/apache/fineract/notification/data/NotificationData.java b/fineract-core/src/main/java/org/apache/fineract/notification/data/NotificationData.java index 44fa8cf090a..1d7e610608a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/notification/data/NotificationData.java +++ b/fineract-core/src/main/java/org/apache/fineract/notification/data/NotificationData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.util.Set; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-core/src/main/java/org/apache/fineract/notification/service/UserNotificationService.java b/fineract-core/src/main/java/org/apache/fineract/notification/service/UserNotificationService.java index 06b9a64058c..e03f8a799c0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/notification/service/UserNotificationService.java +++ b/fineract-core/src/main/java/org/apache/fineract/notification/service/UserNotificationService.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,7 @@ public interface UserNotificationService { void notifyUsers(String permission, String objectType, Long objectIdentifier, String notificationContent, String eventType, - Long appUserId, Long officeId); + Long appUserId, Long officeId); boolean hasUnreadUserNotifications(Long appUserId); diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/api/HolidayApiConstants.java b/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/api/HolidayApiConstants.java index 407fb0a982d..6650d18ccf1 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/api/HolidayApiConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/api/HolidayApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/domain/Holiday.java b/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/domain/Holiday.java index a5e2372fe52..0c12f29f06f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/domain/Holiday.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/domain/Holiday.java @@ -6,9 +6,9 @@ * 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 @@ -36,6 +36,7 @@ import jakarta.persistence.ManyToMany; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.time.LocalDate; import java.util.ArrayList; import java.util.HashSet; @@ -43,6 +44,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -57,7 +59,7 @@ import org.apache.fineract.organisation.office.domain.Office; @Entity -@Table(name = "m_holiday", uniqueConstraints = { @UniqueConstraint(columnNames = { "name" }, name = "holiday_name") }) +@Table(name = "m_holiday", uniqueConstraints = {@UniqueConstraint(columnNames = {"name"}, name = "holiday_name")}) @Getter @Setter @NoArgsConstructor @@ -106,7 +108,7 @@ public static Holiday createNew(final Set offices, final JsonCommand com } final Integer status = HolidayStatusType.PENDING_FOR_ACTIVATION.getValue(); final boolean processed = false;// default it to false. Only batch job - // should update this field. + // should update this field. final String description = command.stringValueOfParameterNamed(HolidayApiConstants.descriptionParamName); return new Holiday().setName(StringUtils.trim(name)).setFromDate(fromDate).setToDate(toDate) diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/domain/HolidayStatusType.java b/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/domain/HolidayStatusType.java index b07d29932e6..b6b1e6717f0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/domain/HolidayStatusType.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/domain/HolidayStatusType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/domain/RescheduleType.java b/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/domain/RescheduleType.java index ad2b98235af..df6b4109bbc 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/domain/RescheduleType.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/domain/RescheduleType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayUtil.java b/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayUtil.java index ad912c4955a..60ac6143323 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayUtil.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayUtil.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.organisation.holiday.domain.Holiday; import org.apache.fineract.organisation.workingdays.data.AdjustedDateDetailsDTO; @@ -57,7 +58,7 @@ public static boolean isHoliday(LocalDate date, Holiday holiday) { } public static void updateRepaymentRescheduleDateToWorkingDayIfItIsHoliday(final AdjustedDateDetailsDTO adjustedDateDetailsDTO, - final Holiday holiday) { + final Holiday holiday) { if (holiday.getReScheduleType().isRescheduleToSpecificDate()) { adjustedDateDetailsDTO.setChangedScheduleDate(holiday.getRepaymentsRescheduledTo()); } diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/command/CurrencyUpdateCommand.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/command/CurrencyUpdateCommand.java index b93083edd0c..df14244f7a9 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/command/CurrencyUpdateCommand.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/command/CurrencyUpdateCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class CurrencyUpdateCommand extends Command {} +public class CurrencyUpdateCommand extends Command { +} diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/data/CurrencyConfigurationData.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/data/CurrencyConfigurationData.java index 9ff45a5b305..3476c0075e3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/data/CurrencyConfigurationData.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/data/CurrencyConfigurationData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/data/CurrencyData.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/data/CurrencyData.java index f407bf2ae54..1753c090331 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/data/CurrencyData.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/data/CurrencyData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -57,7 +58,7 @@ public CurrencyData(String code) { } public CurrencyData(final String code, final String name, final int decimalPlaces, final Integer inMultiplesOf, - final String displaySymbol, final String nameCode) { + final String displaySymbol, final String nameCode) { this.code = code; this.name = name; this.decimalPlaces = decimalPlaces; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/data/CurrencyUpdateRequest.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/data/CurrencyUpdateRequest.java index 1c9cf91d95f..024254241f6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/data/CurrencyUpdateRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/data/CurrencyUpdateRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,9 +20,11 @@ import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; + import java.io.Serial; import java.io.Serializable; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/data/CurrencyUpdateResponse.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/data/CurrencyUpdateResponse.java index ab914ebe5b6..6a3f93b9453 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/data/CurrencyUpdateResponse.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/data/CurrencyUpdateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,10 +20,12 @@ import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.media.Schema; + import java.io.Serial; import java.io.Serializable; import java.util.List; import java.util.Map; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrency.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrency.java index d79e2562e5c..f9cbefbb7e4 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrency.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrency.java @@ -6,9 +6,9 @@ * 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 @@ -61,7 +61,7 @@ public static ApplicationCurrency from(final ApplicationCurrency currency, final } public ApplicationCurrency(final String code, final String name, final int decimalPlaces, final Integer inMultiplesOf, - final String nameCode, final String displaySymbol) { + final String nameCode, final String displaySymbol) { this.code = code; this.name = name; this.decimalPlaces = decimalPlaces; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrencyRepository.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrencyRepository.java index 0128bd5156e..98684ad6c38 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrencyRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrencyRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.organisation.monetary.domain; import java.util.List; + import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.springframework.cache.annotation.CacheConfig; import org.springframework.cache.annotation.CacheEvict; 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..18aef17e58b 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 @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/MonetaryCurrency.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/MonetaryCurrency.java index 2b56ae718d0..a219cf87f0e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/MonetaryCurrency.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/MonetaryCurrency.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/Money.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/Money.java index 74bd6098518..ea35a5a2724 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/Money.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/Money.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.math.MathContext; import java.util.Iterator; + import org.apache.fineract.infrastructure.core.service.MathUtil; import org.apache.fineract.organisation.monetary.data.CurrencyData; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/MoneyHelper.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/MoneyHelper.java index 10e55688dbc..8f949546ccd 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/MoneyHelper.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/MoneyHelper.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.MathContext; import java.math.RoundingMode; import java.util.concurrent.ConcurrentHashMap; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.domain.FineractPlatformTenant; import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/OrganisationCurrency.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/OrganisationCurrency.java index c5b750df5c9..c55c2a377dc 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/OrganisationCurrency.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/OrganisationCurrency.java @@ -6,9 +6,9 @@ * 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 @@ -59,7 +59,7 @@ protected OrganisationCurrency() { } public OrganisationCurrency(final String code, final String name, final int decimalPlaces, final Integer inMultiplesOf, - final String nameCode, final String displaySymbol) { + final String nameCode, final String displaySymbol) { this.code = code; this.name = name; this.decimalPlaces = decimalPlaces; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/OrganisationCurrencyRepository.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/OrganisationCurrencyRepository.java index e2e53739f3e..a11703c05d0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/OrganisationCurrencyRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/OrganisationCurrencyRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.organisation.monetary.domain; import java.util.List; + import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.springframework.data.domain.Sort; import org.springframework.data.jpa.repository.JpaRepository; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/OrganisationCurrencyRepositoryWrapper.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/OrganisationCurrencyRepositoryWrapper.java index a67898d9c01..18a70251ddd 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/OrganisationCurrencyRepositoryWrapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/OrganisationCurrencyRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/exception/CurrencyInUseException.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/exception/CurrencyInUseException.java index 580fdc2ae42..c84074f3c87 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/exception/CurrencyInUseException.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/exception/CurrencyInUseException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/exception/CurrencyNotFoundException.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/exception/CurrencyNotFoundException.java index 770e7bcc60c..418a5f21635 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/exception/CurrencyNotFoundException.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/exception/CurrencyNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/exception/InvalidCurrencyException.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/exception/InvalidCurrencyException.java index 40aa5197efd..9f25c3cfc76 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/exception/InvalidCurrencyException.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/exception/InvalidCurrencyException.java @@ -6,9 +6,9 @@ * 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 @@ -26,7 +26,7 @@ public class InvalidCurrencyException extends AbstractPlatformDomainRuleException { public InvalidCurrencyException(final String entity, final String postFix, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg." + entity + "." + postFix + ".invalid.currency", defaultUserMessage, defaultUserMessageArgs); } } diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/exception/OrganizationalCurrencyNotFoundException.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/exception/OrganizationalCurrencyNotFoundException.java index 923fe396a7d..4667cbece83 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/exception/OrganizationalCurrencyNotFoundException.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/exception/OrganizationalCurrencyNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/handler/CurrencyUpdateCommandHandler.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/handler/CurrencyUpdateCommandHandler.java index 7fc73a2fcb4..6dc0467095e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/handler/CurrencyUpdateCommandHandler.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/handler/CurrencyUpdateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/mapper/CurrencyMapper.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/mapper/CurrencyMapper.java index 19ee2120445..0003a20cd03 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/mapper/CurrencyMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/mapper/CurrencyMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/serialization/MoneyDeserializer.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/serialization/MoneyDeserializer.java index ba7a06783dd..e7bceffac97 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/serialization/MoneyDeserializer.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/serialization/MoneyDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,10 @@ import com.google.gson.JsonDeserializer; import com.google.gson.JsonElement; import com.google.gson.JsonParseException; + import java.lang.reflect.Type; import java.math.MathContext; + import lombok.AllArgsConstructor; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; import org.apache.fineract.organisation.monetary.domain.Money; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/serialization/MoneySerializer.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/serialization/MoneySerializer.java index af3fd0b006c..ac65276eabb 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/serialization/MoneySerializer.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/serialization/MoneySerializer.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; + import java.lang.reflect.Type; + import org.apache.fineract.organisation.monetary.domain.Money; @Deprecated(forRemoval = true) diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/CurrencyReadPlatformService.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/CurrencyReadPlatformService.java index 25e51717855..ef0cf76ac98 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/CurrencyReadPlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/CurrencyReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.organisation.monetary.service; import java.util.List; + import org.apache.fineract.organisation.monetary.data.CurrencyData; public interface CurrencyReadPlatformService { diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/CurrencyReadPlatformServiceImpl.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/CurrencyReadPlatformServiceImpl.java index d0eb3079da9..ac7c33cfb81 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/CurrencyReadPlatformServiceImpl.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/CurrencyReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.organisation.monetary.data.CurrencyData; @@ -51,7 +52,7 @@ public List retrieveAllPlatformCurrencies() { public CurrencyData retrieveCurrency(final String code) { final String sql = "select " + this.currencyRowMapper.schema() + " from m_currency c where c.code = ? order by c.name"; - return this.jdbcTemplate.queryForObject(sql, this.currencyRowMapper, new Object[] { code }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, this.currencyRowMapper, new Object[]{code}); // NOSONAR } private static final class CurrencyRowMapper implements RowMapper { diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/CurrencyWritePlatformService.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/CurrencyWritePlatformService.java index b75bcecd99c..8f9636bc42f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/CurrencyWritePlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/CurrencyWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/OrganisationCurrencyReadPlatformService.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/OrganisationCurrencyReadPlatformService.java index 2006568b477..6432b23a258 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/OrganisationCurrencyReadPlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/OrganisationCurrencyReadPlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/OrganisationCurrencyReadPlatformServiceImpl.java b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/OrganisationCurrencyReadPlatformServiceImpl.java index 868f55377be..bc0813dda83 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/OrganisationCurrencyReadPlatformServiceImpl.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/monetary/service/OrganisationCurrencyReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/office/data/OfficeData.java b/fineract-core/src/main/java/org/apache/fineract/organisation/office/data/OfficeData.java index a7d71deba9c..17bce0f31eb 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/office/data/OfficeData.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/office/data/OfficeData.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.LocalDate; import java.util.Collection; import java.util.List; + import lombok.Getter; import org.apache.fineract.infrastructure.core.domain.ExternalId; @@ -47,7 +48,7 @@ public class OfficeData implements Serializable { private String dateFormat; public static OfficeData importInstance(final String name, final Long parentId, final LocalDate openingDate, - final ExternalId externalId) { + final ExternalId externalId) { return new OfficeData(null, name, null, externalId, openingDate, null, parentId, null, null); } @@ -75,8 +76,8 @@ public static OfficeData appendedTemplate(final OfficeData office, final Collect } public OfficeData(final Long id, final String name, final String nameDecorated, final ExternalId externalId, - final LocalDate openingDate, final String hierarchy, final Long parentId, final String parentName, - final Collection allowedParents) { + final LocalDate openingDate, final String hierarchy, final Long parentId, final String parentName, + final Collection allowedParents) { this.id = id; this.name = name; this.nameDecorated = nameDecorated; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/office/data/OfficeTransactionData.java b/fineract-core/src/main/java/org/apache/fineract/organisation/office/data/OfficeTransactionData.java index 54ab353b61a..255bea7dd35 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/office/data/OfficeTransactionData.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/office/data/OfficeTransactionData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.Collection; + import org.apache.fineract.organisation.monetary.data.CurrencyData; /** @@ -52,20 +53,20 @@ public final class OfficeTransactionData { private final Collection allowedOffices; public static OfficeTransactionData instance(final Long id, final LocalDate transactionDate, final Long fromOfficeId, - final String fromOfficeName, final Long toOfficeId, final String toOfficeName, final CurrencyData currency, - final BigDecimal transactionAmount, final String description) { + final String fromOfficeName, final Long toOfficeId, final String toOfficeName, final CurrencyData currency, + final BigDecimal transactionAmount, final String description) { return new OfficeTransactionData(id, transactionDate, fromOfficeId, fromOfficeName, toOfficeId, toOfficeName, currency, transactionAmount, description, null, null); } public static OfficeTransactionData template(final LocalDate transactionDate, final Collection parentLookups, - final Collection currencyOptions) { + final Collection currencyOptions) { return new OfficeTransactionData(null, transactionDate, null, null, null, null, null, null, null, parentLookups, currencyOptions); } private OfficeTransactionData(final Long id, final LocalDate transactionDate, final Long fromOfficeId, final String fromOfficeName, - final Long toOfficeId, final String toOfficeName, final CurrencyData currency, final BigDecimal transactionAmount, - final String description, final Collection allowedOffices, final Collection currencyOptions) { + final Long toOfficeId, final String toOfficeName, final CurrencyData currency, final BigDecimal transactionAmount, + final String description, final Collection allowedOffices, final Collection currencyOptions) { this.id = id; this.fromOfficeId = fromOfficeId; this.fromOfficeName = fromOfficeName; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/office/domain/Office.java b/fineract-core/src/main/java/org/apache/fineract/organisation/office/domain/Office.java index 591f78fd0f5..f1359a4750f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/office/domain/Office.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/office/domain/Office.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.io.Serializable; import java.time.LocalDate; import java.util.ArrayList; @@ -33,6 +34,7 @@ import java.util.List; import java.util.Map; import java.util.Optional; + import lombok.Getter; import lombok.Setter; import org.apache.commons.lang3.StringUtils; @@ -45,8 +47,8 @@ import org.apache.fineract.organisation.office.exception.RootOfficeParentCannotBeUpdated; @Entity -@Table(name = "m_office", uniqueConstraints = { @UniqueConstraint(columnNames = { "name" }, name = "name_org"), - @UniqueConstraint(columnNames = { "external_id" }, name = "externalid_org") }) +@Table(name = "m_office", uniqueConstraints = {@UniqueConstraint(columnNames = {"name"}, name = "name_org"), + @UniqueConstraint(columnNames = {"external_id"}, name = "externalid_org")}) @Getter @Setter public class Office extends AbstractPersistableCustom implements Serializable { diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/office/domain/OfficeRepository.java b/fineract-core/src/main/java/org/apache/fineract/organisation/office/domain/OfficeRepository.java index 373467ee4f9..444ed93e34d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/office/domain/OfficeRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/office/domain/OfficeRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.organisation.office.domain; import java.util.Optional; + import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/office/domain/OfficeRepositoryWrapper.java b/fineract-core/src/main/java/org/apache/fineract/organisation/office/domain/OfficeRepositoryWrapper.java index 325cc5cd2b9..8e29241475d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/office/domain/OfficeRepositoryWrapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/office/domain/OfficeRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/office/exception/CannotUpdateOfficeWithParentOfficeSameAsSelf.java b/fineract-core/src/main/java/org/apache/fineract/organisation/office/exception/CannotUpdateOfficeWithParentOfficeSameAsSelf.java index 0dd7066e55d..0092ce12811 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/office/exception/CannotUpdateOfficeWithParentOfficeSameAsSelf.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/office/exception/CannotUpdateOfficeWithParentOfficeSameAsSelf.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/office/exception/OfficeNotFoundException.java b/fineract-core/src/main/java/org/apache/fineract/organisation/office/exception/OfficeNotFoundException.java index 9c920678490..d8249ec5051 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/office/exception/OfficeNotFoundException.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/office/exception/OfficeNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/office/exception/RootOfficeParentCannotBeUpdated.java b/fineract-core/src/main/java/org/apache/fineract/organisation/office/exception/RootOfficeParentCannotBeUpdated.java index 8e32c045d5f..be5e944cff9 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/office/exception/RootOfficeParentCannotBeUpdated.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/office/exception/RootOfficeParentCannotBeUpdated.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/office/mapper/OfficeDataMapper.java b/fineract-core/src/main/java/org/apache/fineract/organisation/office/mapper/OfficeDataMapper.java index 754d7181dfa..0716354bc8f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/office/mapper/OfficeDataMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/office/mapper/OfficeDataMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.organisation.office.mapper; import java.util.Optional; + import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.organisation.office.data.OfficeData; import org.apache.fineract.organisation.office.domain.Office; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/office/service/OfficeReadPlatformService.java b/fineract-core/src/main/java/org/apache/fineract/organisation/office/service/OfficeReadPlatformService.java index 8d2aeefa613..95d248a3bee 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/office/service/OfficeReadPlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/office/service/OfficeReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.organisation.office.service; import java.util.Collection; + import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.apache.fineract.infrastructure.core.service.SearchParameters; import org.apache.fineract.organisation.office.data.OfficeData; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/data/ProvisioningCategoryData.java b/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/data/ProvisioningCategoryData.java index ca75b0c0ae6..3503dee6d5a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/data/ProvisioningCategoryData.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/data/ProvisioningCategoryData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.organisation.provisioning.data; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCriteriaCannotBeCreatedException.java b/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCriteriaCannotBeCreatedException.java index c3b6f105d12..9d119240828 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCriteriaCannotBeCreatedException.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCriteriaCannotBeCreatedException.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,7 @@ public class ProvisioningCriteriaCannotBeCreatedException extends AbstractPlatformDomainRuleException { public ProvisioningCriteriaCannotBeCreatedException(String globalisationMessageCode, String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs); } diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCriteriaNotFoundException.java b/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCriteriaNotFoundException.java index 855655178a5..468666c8c52 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCriteriaNotFoundException.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCriteriaNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryReadPlatformService.java b/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryReadPlatformService.java index 7641a853357..81e0461b43c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryReadPlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.organisation.provisioning.service; import java.util.List; + import org.apache.fineract.organisation.provisioning.data.ProvisioningCategoryData; public interface ProvisioningCategoryReadPlatformService { diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryWritePlatformService.java b/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryWritePlatformService.java index 556f3171116..94fe0d8eba2 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryWritePlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaWritePlatformService.java b/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaWritePlatformService.java index 8fa72337def..041fd15fde6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaWritePlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/staff/data/StaffData.java b/fineract-core/src/main/java/org/apache/fineract/organisation/staff/data/StaffData.java index e95389d6eb8..6155b6891df 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/staff/data/StaffData.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/staff/data/StaffData.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.io.Serializable; import java.time.LocalDate; import java.util.Collection; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/staff/domain/Staff.java b/fineract-core/src/main/java/org/apache/fineract/organisation/staff/domain/Staff.java index e9152f420c1..949dcd5fdef 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/staff/domain/Staff.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/staff/domain/Staff.java @@ -6,9 +6,9 @@ * 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 @@ -24,7 +24,9 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.time.LocalDate; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @@ -33,9 +35,9 @@ @Getter @Setter @Entity -@Table(name = "m_staff", uniqueConstraints = { @UniqueConstraint(columnNames = { "display_name" }, name = "display_name"), - @UniqueConstraint(columnNames = { "external_id" }, name = "external_id_UNIQUE"), - @UniqueConstraint(columnNames = { "mobile_no" }, name = "mobile_no_UNIQUE") }) +@Table(name = "m_staff", uniqueConstraints = {@UniqueConstraint(columnNames = {"display_name"}, name = "display_name"), + @UniqueConstraint(columnNames = {"external_id"}, name = "external_id_UNIQUE"), + @UniqueConstraint(columnNames = {"mobile_no"}, name = "mobile_no_UNIQUE")}) public class Staff extends AbstractPersistableCustom { @Column(name = "firstname", length = 50) diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/staff/domain/StaffEnumerations.java b/fineract-core/src/main/java/org/apache/fineract/organisation/staff/domain/StaffEnumerations.java index e2f8aa282bb..fc49f78b8c9 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/staff/domain/StaffEnumerations.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/staff/domain/StaffEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -36,18 +36,18 @@ public static EnumOptionData organisationalRole(final StaffOrganisationalRoleTyp switch (type) { case PROGRAM_DIRECTOR: optionData = new EnumOptionData(type.getValue().longValue(), type.getCode(), "Program Director"); - break; + break; case BRANCH_MANAGER: optionData = new EnumOptionData(type.getValue().longValue(), type.getCode(), "Branch Manager"); - break; + break; case FIELD_OFFICER_COORDINATOR: optionData = new EnumOptionData(type.getValue().longValue(), type.getCode(), "Field Officer Coordinator"); - break; + break; case FIELD_OFFICER: optionData = new EnumOptionData(type.getValue().longValue(), type.getCode(), "Field Officer"); - break; + break; case INVALID: - break; + break; } return optionData; } diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/staff/domain/StaffOrganisationalRoleType.java b/fineract-core/src/main/java/org/apache/fineract/organisation/staff/domain/StaffOrganisationalRoleType.java index 65f5fdd9c0b..ae7849abc69 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/staff/domain/StaffOrganisationalRoleType.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/staff/domain/StaffOrganisationalRoleType.java @@ -6,9 +6,9 @@ * 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 @@ -47,16 +47,16 @@ public static StaffOrganisationalRoleType fromInt(final Integer chargeCalculatio switch (chargeCalculation) { case 100: chargeCalculationType = PROGRAM_DIRECTOR; - break; + break; case 200: chargeCalculationType = BRANCH_MANAGER; - break; + break; case 300: chargeCalculationType = FIELD_OFFICER_COORDINATOR; - break; + break; case 400: chargeCalculationType = FIELD_OFFICER; - break; + break; } return chargeCalculationType; } diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/staff/exception/StaffNotFoundException.java b/fineract-core/src/main/java/org/apache/fineract/organisation/staff/exception/StaffNotFoundException.java index da64f36518c..661f8be29f6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/staff/exception/StaffNotFoundException.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/staff/exception/StaffNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiConstants.java b/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiConstants.java index 0dee1d4d97e..cd0ea612adc 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/data/AdjustedDateDetailsDTO.java b/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/data/AdjustedDateDetailsDTO.java index f6e88584356..6ec33b1a85e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/data/AdjustedDateDetailsDTO.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/data/AdjustedDateDetailsDTO.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.organisation.workingdays.data; import java.time.LocalDate; + import lombok.Getter; import lombok.Setter; @@ -47,7 +48,7 @@ public AdjustedDateDetailsDTO(final LocalDate changedScheduleDate, final LocalDa } public AdjustedDateDetailsDTO(final LocalDate changedScheduleDate, final LocalDate changedActualRepaymentDate, - final LocalDate nextRepaymentPeriodDueDate) { + final LocalDate nextRepaymentPeriodDueDate) { this.changedScheduleDate = changedScheduleDate; this.changedActualRepaymentDate = changedActualRepaymentDate; this.nextRepaymentPeriodDueDate = nextRepaymentPeriodDueDate; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/domain/RepaymentRescheduleType.java b/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/domain/RepaymentRescheduleType.java index 871e40dd5d2..3ae37f52a83 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/domain/RepaymentRescheduleType.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/domain/RepaymentRescheduleType.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.HashMap; import java.util.Map; + import lombok.Getter; @Getter diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDays.java b/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDays.java index b55b591c73c..3f2f66ab858 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDays.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDays.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysEnumerations.java b/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysEnumerations.java index c2caf644841..1d9e198fad5 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysEnumerations.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -36,32 +36,32 @@ public static EnumOptionData repaymentRescheduleType(final RepaymentRescheduleTy case INVALID: optionData = new EnumOptionData(RepaymentRescheduleType.INVALID.getValue().longValue(), RepaymentRescheduleType.INVALID.getCode(), "invalid"); - break; + break; case SAME_DAY: optionData = new EnumOptionData(RepaymentRescheduleType.SAME_DAY.getValue().longValue(), RepaymentRescheduleType.SAME_DAY.getCode(), "same day"); - break; + break; case MOVE_TO_NEXT_WORKING_DAY: optionData = new EnumOptionData(RepaymentRescheduleType.MOVE_TO_NEXT_WORKING_DAY.getValue().longValue(), RepaymentRescheduleType.MOVE_TO_NEXT_WORKING_DAY.getCode(), "move to next working day"); - break; + break; case MOVE_TO_NEXT_REPAYMENT_MEETING_DAY: optionData = new EnumOptionData(RepaymentRescheduleType.MOVE_TO_NEXT_REPAYMENT_MEETING_DAY.getValue().longValue(), RepaymentRescheduleType.MOVE_TO_NEXT_REPAYMENT_MEETING_DAY.getCode(), "move to next repayment meeting day"); - break; + break; case MOVE_TO_PREVIOUS_WORKING_DAY: optionData = new EnumOptionData(RepaymentRescheduleType.MOVE_TO_PREVIOUS_WORKING_DAY.getValue().longValue(), RepaymentRescheduleType.MOVE_TO_PREVIOUS_WORKING_DAY.getCode(), "move to previous working day"); - break; + break; case MOVE_TO_NEXT_MEETING_DAY: optionData = new EnumOptionData(RepaymentRescheduleType.MOVE_TO_NEXT_MEETING_DAY.getValue().longValue(), RepaymentRescheduleType.MOVE_TO_NEXT_MEETING_DAY.getCode(), "move to next meeting day"); - break; + break; } return optionData; diff --git a/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysUtil.java b/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysUtil.java index 989e76d9eca..ebefe1cca55 100644 --- a/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysUtil.java +++ b/fineract-core/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysUtil.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.organisation.workingdays.service; import java.time.LocalDate; + import org.apache.fineract.organisation.workingdays.data.AdjustedDateDetailsDTO; import org.apache.fineract.organisation.workingdays.domain.RepaymentRescheduleType; import org.apache.fineract.organisation.workingdays.domain.WorkingDays; @@ -31,7 +32,7 @@ private WorkingDaysUtil() { } public static LocalDate getOffSetDateIfNonWorkingDay(final LocalDate date, final LocalDate nextMeetingDate, - final WorkingDays workingDays) { + final WorkingDays workingDays) { // If date is a working day then return date. if (isWorkingDay(workingDays, date)) { @@ -65,7 +66,7 @@ public static boolean isNonWorkingDay(final WorkingDays workingDays, final Local } public static void updateWorkingDayIfRepaymentDateIsNonWorkingDay(final AdjustedDateDetailsDTO adjustedDateDetailsDTO, - final WorkingDays workingDays) { + final WorkingDays workingDays) { final LocalDate changedScheduleDate = getOffSetDateIfNonWorkingDay(adjustedDateDetailsDTO.getChangedScheduleDate(), adjustedDateDetailsDTO.getNextRepaymentPeriodDueDate(), workingDays); adjustedDateDetailsDTO.setChangedScheduleDate(changedScheduleDate); diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/PortfolioProductType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/PortfolioProductType.java index 2d4b27700e1..a199cdb0363 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/PortfolioProductType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/PortfolioProductType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/TransactionEntryType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/TransactionEntryType.java index bf782535ac4..76ad90a3163 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/TransactionEntryType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/TransactionEntryType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/account/PortfolioAccountType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/account/PortfolioAccountType.java index 5b6f1a69120..00dac7e48b6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/account/PortfolioAccountType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/account/PortfolioAccountType.java @@ -6,9 +6,9 @@ * 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 @@ -48,10 +48,10 @@ public static PortfolioAccountType fromInt(final Integer type) { switch (type) { case 1: enumType = LOAN; - break; + break; case 2: enumType = SAVINGS; - break; + break; default: enumType = INVALID; } diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/account/data/AccountTransferData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/account/data/AccountTransferData.java index 7d019de8361..944bb4464df 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/account/data/AccountTransferData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/account/data/AccountTransferData.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.Collection; + import lombok.Getter; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.organisation.monetary.data.CurrencyData; @@ -60,12 +61,12 @@ public final class AccountTransferData implements Serializable { private final Collection toAccountOptions; public static AccountTransferData template(final OfficeData fromOffice, final ClientData fromClient, - final EnumOptionData fromAccountType, final PortfolioAccountData fromAccount, final LocalDate transferDate, - final OfficeData toOffice, final ClientData toClient, final EnumOptionData toAccountType, final PortfolioAccountData toAccount, - final Collection fromOfficeOptions, final Collection fromClientOptions, - final Collection fromAccountTypeOptions, final Collection fromAccountOptions, - final Collection toOfficeOptions, final Collection toClientOptions, - final Collection toAccountTypeOptions, final Collection toAccountOptions) { + final EnumOptionData fromAccountType, final PortfolioAccountData fromAccount, final LocalDate transferDate, + final OfficeData toOffice, final ClientData toClient, final EnumOptionData toAccountType, final PortfolioAccountData toAccount, + final Collection fromOfficeOptions, final Collection fromClientOptions, + final Collection fromAccountTypeOptions, final Collection fromAccountOptions, + final Collection toOfficeOptions, final Collection toClientOptions, + final Collection toAccountTypeOptions, final Collection toAccountOptions) { final Long id = null; CurrencyData currency = null; BigDecimal transferAmount = BigDecimal.ZERO; @@ -83,9 +84,9 @@ public static AccountTransferData template(final OfficeData fromOffice, final Cl } public static AccountTransferData instance(final Long id, final Boolean reversed, final LocalDate transferDate, - final CurrencyData currency, final BigDecimal transferAmount, final String transferDescription, final OfficeData fromOffice, - final OfficeData toOffice, final ClientData fromClient, final ClientData toClient, final EnumOptionData fromAccountType, - final PortfolioAccountData fromAccount, final EnumOptionData toAccountType, final PortfolioAccountData toAccount) { + final CurrencyData currency, final BigDecimal transferAmount, final String transferDescription, final OfficeData fromOffice, + final OfficeData toOffice, final ClientData fromClient, final ClientData toClient, final EnumOptionData fromAccountType, + final PortfolioAccountData fromAccount, final EnumOptionData toAccountType, final PortfolioAccountData toAccount) { return new AccountTransferData(id, reversed, fromOffice, fromClient, fromAccountType, fromAccount, currency, transferAmount, transferDate, transferDescription, toOffice, toClient, toAccountType, toAccount, null, null, null, null, null, null, null, @@ -93,7 +94,7 @@ public static AccountTransferData instance(final Long id, final Boolean reversed } public static AccountTransferData transferBasicDetails(final Long id, final CurrencyData currency, final BigDecimal transferAmount, - final LocalDate transferDate, final String description, final Boolean reversed) { + final LocalDate transferDate, final String description, final Boolean reversed) { final EnumOptionData fromAccountType = null; final EnumOptionData toAccountType = null; @@ -103,13 +104,13 @@ public static AccountTransferData transferBasicDetails(final Long id, final Curr } private AccountTransferData(final Long id, final Boolean reversed, final OfficeData fromOffice, final ClientData fromClient, - final EnumOptionData fromAccountType, final PortfolioAccountData fromAccount, final CurrencyData currency, - final BigDecimal transferAmount, final LocalDate transferDate, final String transferDescription, final OfficeData toOffice, - final ClientData toClient, final EnumOptionData toAccountType, final PortfolioAccountData toAccount, - final Collection fromOfficeOptions, final Collection fromClientOptions, - final Collection fromAccountTypeOptions, final Collection fromAccountOptions, - final Collection toOfficeOptions, final Collection toClientOptions, - final Collection toAccountTypeOptions, final Collection toAccountOptions) { + final EnumOptionData fromAccountType, final PortfolioAccountData fromAccount, final CurrencyData currency, + final BigDecimal transferAmount, final LocalDate transferDate, final String transferDescription, final OfficeData toOffice, + final ClientData toClient, final EnumOptionData toAccountType, final PortfolioAccountData toAccount, + final Collection fromOfficeOptions, final Collection fromClientOptions, + final Collection fromAccountTypeOptions, final Collection fromAccountOptions, + final Collection toOfficeOptions, final Collection toClientOptions, + final Collection toAccountTypeOptions, final Collection toAccountOptions) { this.id = id; this.reversed = reversed; this.fromOffice = fromOffice; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/account/data/PortfolioAccountData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/account/data/PortfolioAccountData.java index 3b8a869e3ca..753c7b0536e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/account/data/PortfolioAccountData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/account/data/PortfolioAccountData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serializable; import java.math.BigDecimal; import java.util.Optional; + import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -53,8 +54,8 @@ public static PortfolioAccountData lookup(final Long accountId, final String acc } public PortfolioAccountData(final Long id, final String accountNo, final String externalId, final Long groupId, final String groupName, - final Long clientId, final String clientName, final Long productId, final String productName, final Long fieldOfficerId, - final String fieldOfficerName, final CurrencyData currency) { + final Long clientId, final String clientName, final Long productId, final String productName, final Long fieldOfficerId, + final String fieldOfficerName, final CurrencyData currency) { this.id = id; this.accountNo = accountNo; this.externalId = externalId; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransfersReadPlatformService.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransfersReadPlatformService.java index c6d22051dc4..8deff2307cd 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransfersReadPlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransfersReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.Collection; + import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.infrastructure.core.service.SearchParameters; import org.apache.fineract.portfolio.account.PortfolioAccountType; @@ -29,7 +30,7 @@ public interface AccountTransfersReadPlatformService { AccountTransferData retrieveTemplate(Long fromOfficeId, Long fromClientId, Long fromAccountId, Integer fromAccountType, Long toOfficeId, - Long toClientId, Long toAccountId, Integer toAccountType); + Long toClientId, Long toAccountId, Integer toAccountType); Page retrieveAll(SearchParameters searchParameters, Long accountDetailId); @@ -44,7 +45,7 @@ AccountTransferData retrieveTemplate(Long fromOfficeId, Long fromClientId, Long Collection fetchPostInterestTransactionIdsWithPivotDate(Long accountId, LocalDate pivotDate); AccountTransferData retrieveRefundByTransferTemplate(Long fromOfficeId, Long fromClientId, Long fromAccountId, Integer fromAccountType, - Long toOfficeId, Long toClientId, Long toAccountId, Integer toAccountType); + Long toOfficeId, Long toClientId, Long toAccountId, Integer toAccountType); BigDecimal getTotalTransactionAmount(Long accountId, Integer accountType, LocalDate transactionDate); } diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/accountdetails/data/SavingsAccountSummaryData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/accountdetails/data/SavingsAccountSummaryData.java index 009e634eb27..8706ba88d09 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/accountdetails/data/SavingsAccountSummaryData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/accountdetails/data/SavingsAccountSummaryData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.organisation.monetary.data.CurrencyData; @@ -73,10 +74,10 @@ public class SavingsAccountSummaryData { private final EnumOptionData depositType; public SavingsAccountSummaryData(final Long id, final String accountNo, final String externalId, final Long productId, - final String productName, final String shortProductName, final SavingsAccountStatusEnumData status, final CurrencyData currency, - final BigDecimal accountBalance, final BigDecimal onHoldFunds, final BigDecimal savingsAmountOnHold, - final BigDecimal availableBalance, final EnumOptionData accountType, final SavingsAccountApplicationTimelineData timeline, - final EnumOptionData depositType, final SavingsAccountSubStatusEnumData subStatus, final LocalDate lastActiveTransactionDate) { + final String productName, final String shortProductName, final SavingsAccountStatusEnumData status, final CurrencyData currency, + final BigDecimal accountBalance, final BigDecimal onHoldFunds, final BigDecimal savingsAmountOnHold, + final BigDecimal availableBalance, final EnumOptionData accountType, final SavingsAccountApplicationTimelineData timeline, + final EnumOptionData depositType, final SavingsAccountSubStatusEnumData subStatus, final LocalDate lastActiveTransactionDate) { this.id = id; this.accountNo = accountNo; this.externalId = externalId; 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 4788939e3a8..821e043b89b 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 @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.accountdetails.service.AccountEnumerations; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountEnumerations.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountEnumerations.java index 9b946ced381..ab03b1750a7 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountEnumerations.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -41,23 +41,23 @@ public static EnumOptionData loanType(final AccountType type) { switch (type) { case INVALID: optionData = new EnumOptionData(AccountType.INVALID.getValue().longValue(), AccountType.INVALID.getCode(), "Invalid"); - break; + break; case INDIVIDUAL: optionData = new EnumOptionData(AccountType.INDIVIDUAL.getValue().longValue(), AccountType.INDIVIDUAL.getCode(), "Individual"); - break; + break; case GROUP: optionData = new EnumOptionData(AccountType.GROUP.getValue().longValue(), AccountType.GROUP.getCode(), "Group"); - break; + break; case JLG: optionData = new EnumOptionData(AccountType.JLG.getValue().longValue(), AccountType.JLG.getCode(), "JLG"); - break; + break; case GLIM: optionData = new EnumOptionData(AccountType.GLIM.getValue().longValue(), AccountType.GLIM.getCode(), "GLIM"); - break; + break; case GSIM: optionData = new EnumOptionData(AccountType.GSIM.getValue().longValue(), AccountType.GSIM.getCode(), "GSIM"); - break; + break; } return optionData; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/address/data/AddressData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/address/data/AddressData.java index 8e96cacc90a..ac8d1ddd191 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/address/data/AddressData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/address/data/AddressData.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.Collection; + import lombok.Getter; import org.apache.fineract.infrastructure.codes.data.CodeValueData; @@ -81,7 +82,7 @@ public class AddressData implements Serializable { private final Collection addressTypeIdOptions; public AddressData(Long addressTypeId, String street, String addressLine1, String addressLine2, String addressLine3, String city, - String postalCode, Boolean isActive, Long stateProvinceId, Long countryId) { + String postalCode, Boolean isActive, Long stateProvinceId, Long countryId) { this.addressTypeId = addressTypeId; this.isActive = isActive; @@ -112,12 +113,12 @@ public AddressData(Long addressTypeId, String street, String addressLine1, Strin } private AddressData(final String addressType, final Long clientID, final Long addressId, final Long addressTypeId, - final Boolean is_active, final String street, final String addressLine1, final String addressLine2, final String addressLine3, - final String townVillage, final String city, final String countyDistrict, final Long stateProvinceId, final Long countryId, - final String stateName, final String countryName, final String postalCode, final BigDecimal latitude, - final BigDecimal longitude, final String createdBy, final LocalDate createdOn, final String updatedBy, - final LocalDate updatedOn, final Collection countryIdOptions, - final Collection stateProvinceIdOptions, final Collection addressTypeIdOptions) { + final Boolean is_active, final String street, final String addressLine1, final String addressLine2, final String addressLine3, + final String townVillage, final String city, final String countyDistrict, final Long stateProvinceId, final Long countryId, + final String stateName, final String countryName, final String postalCode, final BigDecimal latitude, + final BigDecimal longitude, final String createdBy, final LocalDate createdOn, final String updatedBy, + final LocalDate updatedOn, final Collection countryIdOptions, + final Collection stateProvinceIdOptions, final Collection addressTypeIdOptions) { this.addressType = addressType; this.clientID = clientID; this.addressId = addressId; @@ -147,11 +148,11 @@ private AddressData(final String addressType, final Long clientID, final Long ad } public static AddressData instance(final String addressType, final Long clientID, final Long addressId, final Long addressTypeId, - final Boolean is_active, final String street, final String addressLine1, final String addressLine2, final String addressLine3, - final String townVillage, final String city, final String countyDistrict, final Long stateProvinceId, final Long countryId, - final String stateName, final String countryName, final String postalCode, final BigDecimal latitude, - final BigDecimal longitude, final String createdBy, final LocalDate createdOn, final String updatedBy, - final LocalDate updatedOn) { + final Boolean is_active, final String street, final String addressLine1, final String addressLine2, final String addressLine3, + final String townVillage, final String city, final String countyDistrict, final Long stateProvinceId, final Long countryId, + final String stateName, final String countryName, final String postalCode, final BigDecimal latitude, + final BigDecimal longitude, final String createdBy, final LocalDate createdOn, final String updatedBy, + final LocalDate updatedOn) { return new AddressData(addressType, clientID, addressId, addressTypeId, is_active, street, addressLine1, addressLine2, addressLine3, townVillage, city, countyDistrict, stateProvinceId, countryId, stateName, countryName, postalCode, latitude, longitude, @@ -159,16 +160,16 @@ public static AddressData instance(final String addressType, final Long clientID } public static AddressData instance1(final Long addressId, final String street, final String addressLine1, final String addressLine2, - final String addressLine3, final String townVillage, final String city, final String countyDistrict, final Long stateProvinceId, - final Long countryId, final String postalCode, final BigDecimal latitude, final BigDecimal longitude, final String createdBy, - final LocalDate createdOn, final String updatedBy, final LocalDate updatedOn) { + final String addressLine3, final String townVillage, final String city, final String countyDistrict, final Long stateProvinceId, + final Long countryId, final String postalCode, final BigDecimal latitude, final BigDecimal longitude, final String createdBy, + final LocalDate createdOn, final String updatedBy, final LocalDate updatedOn) { return new AddressData(null, null, addressId, null, false, street, addressLine1, addressLine2, addressLine3, townVillage, city, countyDistrict, stateProvinceId, countryId, null, null, postalCode, latitude, longitude, createdBy, createdOn, updatedBy, updatedOn, null, null, null); } public static AddressData template(final Collection countryIdOptions, - final Collection stateProvinceIdOptions, final Collection addressTypeIdOptions) { + final Collection stateProvinceIdOptions, final Collection addressTypeIdOptions) { final Long client_idtemp = null; final Long addressIdtemp = null; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/CalendarConstants.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/CalendarConstants.java index a9917d98ac7..16bc0124c13 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/CalendarConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/CalendarConstants.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.HashSet; import java.util.Set; + import lombok.Getter; public final class CalendarConstants { diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/data/CalendarData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/data/CalendarData.java index 8830421cfd4..db6b9fbda98 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/data/CalendarData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/data/CalendarData.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.time.OffsetDateTime; import java.util.Collection; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; @@ -96,18 +97,18 @@ public final class CalendarData implements Serializable { private String typeId; public static CalendarData importInstanceNoRepeatsOnDay(LocalDate startDate, boolean repeating, EnumOptionData frequency, - Integer interval, Integer rowIndex, String locale, String dateFormat) { + Integer interval, Integer rowIndex, String locale, String dateFormat) { return new CalendarData(startDate, repeating, frequency, interval, rowIndex, locale, dateFormat); } public static CalendarData importInstanceWithRepeatsOnDay(LocalDate startDate, boolean repeating, EnumOptionData frequency, - Integer interval, EnumOptionData repeatsOnDay, Integer rowIndex, String locale, String dateFormat) { + Integer interval, EnumOptionData repeatsOnDay, Integer rowIndex, String locale, String dateFormat) { return new CalendarData(startDate, repeating, frequency, interval, repeatsOnDay, rowIndex, locale, dateFormat); } private CalendarData(LocalDate startDate, boolean repeating, EnumOptionData frequency, Integer interval, Integer rowIndex, - String locale, String dateFormat) { + String locale, String dateFormat) { this.startDate = startDate; this.repeating = repeating; this.frequency = frequency; @@ -153,7 +154,7 @@ private CalendarData(LocalDate startDate, boolean repeating, EnumOptionData freq } private CalendarData(LocalDate startDate, boolean repeating, EnumOptionData frequency, Integer interval, EnumOptionData repeatsOnDay, - Integer rowIndex, String locale, String dateFormat) { + Integer rowIndex, String locale, String dateFormat) { this.startDate = startDate; this.repeating = repeating; this.frequency = frequency; @@ -199,7 +200,7 @@ private CalendarData(LocalDate startDate, boolean repeating, EnumOptionData freq } public CalendarData(String title, String description, LocalDate startDate, boolean repeating, EnumOptionData frequency, - Integer interval, EnumOptionData repeatsOnDay, String dateFormat, String locale, String typeId) { + Integer interval, EnumOptionData repeatsOnDay, String dateFormat, String locale, String typeId) { this.title = title; this.description = description; this.startDate = startDate; @@ -221,14 +222,14 @@ public void setTitle(String title) { } public static CalendarData instance(final Long id, final Long calendarInstanceId, final Long entityId, final EnumOptionData entityType, - final String title, final String description, final String location, final LocalDate startDate, final LocalDate endDate, - final Integer duration, final EnumOptionData type, final boolean repeating, final String recurrence, - final EnumOptionData frequency, final Integer interval, final EnumOptionData repeatsOnDay, - final EnumOptionData repeatsOnNthDayOfMonth, final EnumOptionData remindBy, final Integer firstReminder, - final Integer secondReminder, final String humanReadable, final OffsetDateTime createdDate, - final OffsetDateTime lastUpdatedDate, final Long createdByUserId, final String createdByUsername, - final Long lastUpdatedByUserId, final String lastUpdatedByUsername, final LocalTime meetingTime, - final Integer repeatsOnDayOfMonth) { + final String title, final String description, final String location, final LocalDate startDate, final LocalDate endDate, + final Integer duration, final EnumOptionData type, final boolean repeating, final String recurrence, + final EnumOptionData frequency, final Integer interval, final EnumOptionData repeatsOnDay, + final EnumOptionData repeatsOnNthDayOfMonth, final EnumOptionData remindBy, final Integer firstReminder, + final Integer secondReminder, final String humanReadable, final OffsetDateTime createdDate, + final OffsetDateTime lastUpdatedDate, final Long createdByUserId, final String createdByUsername, + final Long lastUpdatedByUserId, final String lastUpdatedByUsername, final LocalTime meetingTime, + final Integer repeatsOnDayOfMonth) { final Collection recurringDates = null; final Collection nextTenRecurringDates = null; @@ -250,7 +251,7 @@ public static CalendarData instance(final Long id, final Long calendarInstanceId } public static CalendarData withRecurringDates(final CalendarData calendarData, final Collection recurringDates, - final Collection nextTenRecurringDates, final LocalDate recentEligibleMeetingDate) { + final Collection nextTenRecurringDates, final LocalDate recentEligibleMeetingDate) { return new CalendarData(calendarData.id, calendarData.calendarInstanceId, calendarData.entityId, calendarData.entityType, calendarData.title, calendarData.description, calendarData.location, calendarData.startDate, calendarData.endDate, calendarData.duration, calendarData.type, calendarData.repeating, calendarData.recurrence, calendarData.frequency, @@ -327,9 +328,9 @@ public static CalendarData sensibleDefaultsForNewCalendarCreation() { } public static CalendarData withTemplateOptions(final CalendarData calendarData, final List entityTypeOptions, - final List calendarTypeOptions, final List remindByOptions, - final List repeatsOptions, final List repeatsOnDayOptions, - final List frequencyNthDayTypeOptions) { + final List calendarTypeOptions, final List remindByOptions, + final List repeatsOptions, final List repeatsOnDayOptions, + final List frequencyNthDayTypeOptions) { return new CalendarData(calendarData.id, calendarData.calendarInstanceId, calendarData.entityId, calendarData.entityType, calendarData.title, calendarData.description, calendarData.location, calendarData.startDate, calendarData.endDate, @@ -343,18 +344,18 @@ public static CalendarData withTemplateOptions(final CalendarData calendarData, } private CalendarData(final Long id, final Long calendarInstanceId, final Long entityId, final EnumOptionData entityType, - final String title, final String description, final String location, final LocalDate startDate, final LocalDate endDate, - final Integer duration, final EnumOptionData type, final boolean repeating, final String recurrence, - final EnumOptionData frequency, final Integer interval, final EnumOptionData repeatsOnDay, - final EnumOptionData repeatsOnNthDayOfMonth, final EnumOptionData remindBy, final Integer firstReminder, - final Integer secondReminder, final Collection recurringDates, final Collection nextTenRecurringDates, - final String humanReadable, final LocalDate recentEligibleMeetingDate, final OffsetDateTime createdDate, - final OffsetDateTime lastUpdatedDate, final Long createdByUserId, final String createdByUsername, - final Long lastUpdatedByUserId, final String lastUpdatedByUsername, final Integer repeatsOnDayOfMonth, - final List entityTypeOptions, final List calendarTypeOptions, - final List remindByOptions, final List repeatsOptions, - final List repeatsOnDayOptions, final LocalTime meetingTime, - final List frequencyNthDayTypeOptions) { + final String title, final String description, final String location, final LocalDate startDate, final LocalDate endDate, + final Integer duration, final EnumOptionData type, final boolean repeating, final String recurrence, + final EnumOptionData frequency, final Integer interval, final EnumOptionData repeatsOnDay, + final EnumOptionData repeatsOnNthDayOfMonth, final EnumOptionData remindBy, final Integer firstReminder, + final Integer secondReminder, final Collection recurringDates, final Collection nextTenRecurringDates, + final String humanReadable, final LocalDate recentEligibleMeetingDate, final OffsetDateTime createdDate, + final OffsetDateTime lastUpdatedDate, final Long createdByUserId, final String createdByUsername, + final Long lastUpdatedByUserId, final String lastUpdatedByUsername, final Integer repeatsOnDayOfMonth, + final List entityTypeOptions, final List calendarTypeOptions, + final List remindByOptions, final List repeatsOptions, + final List repeatsOnDayOptions, final LocalTime meetingTime, + final List frequencyNthDayTypeOptions) { this.id = id; this.calendarInstanceId = calendarInstanceId; this.entityId = entityId; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/data/CalendarHistoryDataWrapper.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/data/CalendarHistoryDataWrapper.java index b0964232732..10f7009c35b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/data/CalendarHistoryDataWrapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/data/CalendarHistoryDataWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.Comparator; import java.util.List; import java.util.Set; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.portfolio.calendar.domain.CalendarHistory; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/data/request/CalendarRequest.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/data/request/CalendarRequest.java index fc7e15b817e..fd770a65d8c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/data/request/CalendarRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/data/request/CalendarRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/Calendar.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/Calendar.java index 455e52a1cfc..4412710030e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/Calendar.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/Calendar.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import jakarta.persistence.FetchType; import jakarta.persistence.OneToMany; import jakarta.persistence.Table; + import java.time.LocalDate; import java.time.LocalTime; import java.time.temporal.ChronoField; @@ -35,6 +36,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -99,8 +101,8 @@ protected Calendar() { } public Calendar(final String title, final String description, final String location, final LocalDate startDate, final LocalDate endDate, - final Integer duration, final Integer typeId, final boolean repeating, final String recurrence, final Integer remindById, - final Integer firstReminder, final Integer secondReminder, final LocalTime meetingtime) { + final Integer duration, final Integer typeId, final boolean repeating, final String recurrence, final Integer remindById, + final Integer firstReminder, final Integer secondReminder, final LocalTime meetingtime) { final List dataValidationErrors = new ArrayList<>(); final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors).resource(CALENDAR_RESOURCE_NAME); @@ -130,14 +132,14 @@ public Calendar(final String title, final String description, final String locat } public static Calendar createRepeatingCalendar(final String title, final LocalDate startDate, final Integer typeId, - final CalendarFrequencyType frequencyType, final Integer interval, final Integer repeatsOnDay, - final Integer repeatsOnNthDayOfMonth) { + final CalendarFrequencyType frequencyType, final Integer interval, final Integer repeatsOnDay, + final Integer repeatsOnNthDayOfMonth) { final String recurrence = constructRecurrence(frequencyType, interval, repeatsOnDay, repeatsOnNthDayOfMonth); return createRepeatingCalendar(title, startDate, typeId, recurrence); } public static Calendar createRepeatingCalendar(final String title, final LocalDate startDate, final Integer typeId, - final String recurrence) { + final String recurrence) { final String description = null; final String location = null; final LocalDate endDate = null; @@ -376,7 +378,7 @@ public Map update(final JsonCommand command, final Boolean areAc @SuppressWarnings("null") public Map updateRepeatingCalendar(final LocalDate calendarStartDate, final CalendarFrequencyType frequencyType, - final Integer interval, final Integer repeatsOnDay, final Integer repeatsOnNthDay) { + final Integer interval, final Integer repeatsOnDay, final Integer repeatsOnNthDay) { final Map actualChanges = new LinkedHashMap<>(9); if (calendarStartDate != null && this.startDate != null && !calendarStartDate.equals(this.getStartDateLocalDate())) { @@ -514,7 +516,7 @@ private static String constructRecurrence(final JsonCommand command, final Calen } private static String constructRecurrence(final CalendarFrequencyType frequencyType, final Integer interval, final Integer repeatsOnDay, - final Integer repeatsOnNthDayOfMonth) { + final Integer repeatsOnNthDayOfMonth) { final StringBuilder recurrenceBuilder = new StringBuilder(200); recurrenceBuilder.append("FREQ="); diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarEntityType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarEntityType.java index d08f47267eb..aa1c8be7d8a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarEntityType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarEntityType.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.HashMap; import java.util.Map; + import lombok.Getter; @Getter diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarFrequencyType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarFrequencyType.java index 0f0561e330b..133c8b0bc36 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarFrequencyType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarFrequencyType.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.HashMap; import java.util.Map; + import lombok.Getter; import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType; import org.springframework.util.StringUtils; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarHistory.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarHistory.java index b841d492a46..c6d3a81b345 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarHistory.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarHistory.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -82,7 +84,7 @@ public CalendarHistory(Calendar calendar, LocalDate startDate) { this.location = calendar.getLocation(); this.startDate = startDate; this.endDate = calendar.getStartDate();// Calendar start date become end - // date for history data. + // date for history data. this.duration = calendar.getDuration(); this.typeId = calendar.getTypeId(); this.repeating = calendar.isRepeating(); diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstance.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstance.java index 88b2399edbb..ab68607edf7 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstance.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstance.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarRemindBy.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarRemindBy.java index 4738aaf93b7..ee236df1976 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarRemindBy.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarRemindBy.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.HashMap; import java.util.Map; + import lombok.Getter; @Getter diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarType.java index 5fef3b7205a..34b93510f95 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarType.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.HashMap; import java.util.Map; + import lombok.Getter; @Getter diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarWeekDaysType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarWeekDaysType.java index 58f2f25c919..b46fe657598 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarWeekDaysType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarWeekDaysType.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.HashMap; import java.util.Map; + import lombok.Getter; import org.springframework.util.StringUtils; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarDateException.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarDateException.java index f62050a7677..b2301f32d49 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarDateException.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarDateException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarParameterUpdateNotSupportedException.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarParameterUpdateNotSupportedException.java index b7541ed5abf..4dbd831b4fb 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarParameterUpdateNotSupportedException.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarParameterUpdateNotSupportedException.java @@ -6,9 +6,9 @@ * 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 @@ -26,7 +26,7 @@ public class CalendarParameterUpdateNotSupportedException extends AbstractPlatformDomainRuleException { public CalendarParameterUpdateNotSupportedException(final String postFix, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg.calendar.update.of." + postFix + ".is.not.supported", defaultUserMessage, defaultUserMessageArgs); } } diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/exception/NotValidRecurringDateException.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/exception/NotValidRecurringDateException.java index 627396848e0..6fb72a7c6fe 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/exception/NotValidRecurringDateException.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/exception/NotValidRecurringDateException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarEnumerations.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarEnumerations.java index f2efa0a60e0..10ca9f2d360 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarEnumerations.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.calendar.domain.CalendarEntityType; import org.apache.fineract.portfolio.calendar.domain.CalendarFrequencyType; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarUtils.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarUtils.java index 743e21366ef..ad65f87fc31 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarUtils.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarUtils.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.calendar.service; import com.google.gson.JsonElement; + import java.text.ParseException; import java.time.LocalDate; import java.time.LocalDateTime; @@ -32,6 +33,7 @@ import java.util.Iterator; import java.util.List; import java.util.StringTokenizer; + import lombok.extern.slf4j.Slf4j; import net.fortuna.ical4j.model.Date; import net.fortuna.ical4j.model.DateList; @@ -69,7 +71,7 @@ private CalendarUtils() { } public static LocalDateTime getNextRecurringDate(final String recurringRule, final LocalDateTime seedDate, - final LocalDateTime startDate) { + final LocalDateTime startDate) { final Recur recur = CalendarUtils.getICalRecur(recurringRule); if (recur == null) { return null; @@ -131,7 +133,7 @@ public static Collection getRecurringDates(final String recurringRule } public static Collection getRecurringDatesFrom(final String recurringRule, final LocalDate seedDate, - final LocalDate startDate) { + final LocalDate startDate) { LocalDate currentDate = DateUtils.getLocalDateOfTenant(); final LocalDate periodStartDate = startDate == null ? currentDate : startDate; final LocalDate periodEndDate = currentDate.plusYears(5); @@ -139,7 +141,7 @@ public static Collection getRecurringDatesFrom(final String recurring } public static Collection getRecurringDates(final String recurringRule, final LocalDate seedDate, - final LocalDate periodStartDate, final LocalDate periodEndDate) { + final LocalDate periodStartDate, final LocalDate periodEndDate) { final int maxCount = 10;// Default number of recurring dates boolean isSkipRepaymentOnFirstdayofMonth = false; final Integer numberofDays = 0; @@ -148,15 +150,15 @@ public static Collection getRecurringDates(final String recurringRule } public static Collection getRecurringDates(final String recurringRule, final LocalDate seedDate, - final LocalDate periodStartDate, final LocalDate periodEndDate, final int maxCount, boolean isSkippMeetingOnFirstDay, - final Integer numberOfDays) { + final LocalDate periodStartDate, final LocalDate periodEndDate, final int maxCount, boolean isSkippMeetingOnFirstDay, + final Integer numberOfDays) { final Recur recur = CalendarUtils.getICalRecur(recurringRule); return getRecurringDates(recur, seedDate, periodStartDate, periodEndDate, maxCount, isSkippMeetingOnFirstDay, numberOfDays); } private static Collection getRecurringDates(final Recur recur, final LocalDate seedDate, final LocalDate periodStartDate, - final LocalDate periodEndDate, final int maxCount, boolean isSkippMeetingOnFirstDay, final Integer numberOfDays) { + final LocalDate periodEndDate, final int maxCount, boolean isSkippMeetingOnFirstDay, final Integer numberOfDays) { if (recur == null) { return null; } @@ -171,7 +173,7 @@ private static Collection getRecurringDates(final Recur recur, final } static Collection convertToLocalDateList(final DateList dates, final LocalDate seedDate, - final PeriodFrequencyType frequencyType, boolean isSkippMeetingOnFirstDay, final Integer numberOfDays) { + final PeriodFrequencyType frequencyType, boolean isSkippMeetingOnFirstDay, final Integer numberOfDays) { final Collection recurringDates = new ArrayList<>(); for (final Date date : dates) { @@ -195,11 +197,10 @@ private static LocalDateTime getLocalDateTimeFromICal4JDate(Date date) { } private static Collection skipMeetingOnFirstdayOfMonth(final Collection recurringDates, - final Integer numberOfDays) { + final Integer numberOfDays) { final Collection adjustedRecurringDates = new ArrayList<>(); - for (@SuppressWarnings("rawtypes") - final Iterator iterator = recurringDates.iterator(); iterator.hasNext();) { + for (@SuppressWarnings("rawtypes") final Iterator iterator = recurringDates.iterator(); iterator.hasNext(); ) { LocalDate recuringDate = (LocalDate) iterator.next(); adjustedRecurringDates.add(adjustRecurringDate(recuringDate, numberOfDays)); } @@ -271,8 +272,7 @@ public static String getRRuleReadable(final LocalDate startDate, final String re final WeekDayList weekDayList = recur.getDayList(); StringBuilder sb = new StringBuilder(); - for (@SuppressWarnings("rawtypes") - final Iterator iterator = weekDayList.iterator(); iterator.hasNext();) { + for (@SuppressWarnings("rawtypes") final Iterator iterator = weekDayList.iterator(); iterator.hasNext(); ) { final WeekDay weekDay = (WeekDay) iterator.next(); sb.append(DayNameEnum.from(weekDay.getDay().name()).getCode()); } @@ -364,7 +364,7 @@ public static boolean isValidRecurringDate(final String recurringRule, final Loc } public static boolean isValidRecurringDate(final String recurringRule, final LocalDate seedDate, final LocalDate date, - boolean isSkipRepaymentonFirstDayOfMonth, final Integer numberOfDays) { + boolean isSkipRepaymentonFirstDayOfMonth, final Integer numberOfDays) { final Recur recur = CalendarUtils.getICalRecur(recurringRule); if (recur == null) { @@ -375,7 +375,7 @@ public static boolean isValidRecurringDate(final String recurringRule, final Loc } public static boolean isValidRecurringDate(final Recur recur, final LocalDate seedDate, final LocalDate date, - boolean isSkipRepaymentonFirstDayOfMonth, final int numberOfDays) { + boolean isSkipRepaymentonFirstDayOfMonth, final int numberOfDays) { LocalDate startDate = date; if (isSkipRepaymentonFirstDayOfMonth && date.getDayOfMonth() == (numberOfDays + 1)) { startDate = startDate.minusDays(numberOfDays); @@ -531,8 +531,8 @@ public static NthDayType getRepeatsOnNthDayOfMonth(final String recurringRule) { } public static LocalDate getFirstRepaymentMeetingDate(final Calendar calendar, final LocalDate disbursementDate, - final Integer loanRepaymentInterval, final String frequency, boolean isSkipRepaymentOnFirstDayOfMonth, - final Integer numberOfDays) { + final Integer loanRepaymentInterval, final String frequency, boolean isSkipRepaymentOnFirstDayOfMonth, + final Integer numberOfDays) { final Recur recur = CalendarUtils.getICalRecur(calendar.getRecurrence()); if (recur == null) { return null; @@ -574,8 +574,8 @@ public static LocalDate getFirstRepaymentMeetingDate(final Calendar calendar, fi } public static LocalDate getNewRepaymentMeetingDate(final String recurringRule, final LocalDate seedDate, - final LocalDate oldRepaymentDate, final Integer loanRepaymentInterval, final String frequency, final WorkingDays workingDays, - final boolean isSkipRepaymentOnFirstDayOfMonth, final Integer numberOfDays) { + final LocalDate oldRepaymentDate, final Integer loanRepaymentInterval, final String frequency, final WorkingDays workingDays, + final boolean isSkipRepaymentOnFirstDayOfMonth, final Integer numberOfDays) { final Recur recur = CalendarUtils.getICalRecur(recurringRule); if (recur == null) { return null; @@ -589,8 +589,8 @@ public static LocalDate getNewRepaymentMeetingDate(final String recurringRule, f } public static LocalDate getNextRepaymentMeetingDate(final String recurringRule, final LocalDate seedDate, final LocalDate repaymentDate, - final Integer loanRepaymentInterval, final String frequency, final WorkingDays workingDays, - boolean isSkipRepaymentOnFirstDayOfMonth, final Integer numberOfDays) { + final Integer loanRepaymentInterval, final String frequency, final WorkingDays workingDays, + boolean isSkipRepaymentOnFirstDayOfMonth, final Integer numberOfDays) { final Recur recur = CalendarUtils.getICalRecur(recurringRule); if (recur == null) { @@ -707,7 +707,7 @@ public static String getSqlCalendarTypeOptionsInString(final List calen } public static LocalDate getRecentEligibleMeetingDate(final String recurringRule, final LocalDate seedDate, - final boolean isSkipMeetingOnFirstDay, final Integer numberOfDays) { + final boolean isSkipMeetingOnFirstDay, final Integer numberOfDays) { LocalDate currentDate = DateUtils.getLocalDateOfTenant(); final Recur recur = CalendarUtils.getICalRecur(recurringRule); if (recur == null) { @@ -741,7 +741,7 @@ public static LocalDate getNextScheduleDate(final Calendar calendar, final Local } public static void validateNthDayOfMonthFrequency(DataValidatorBuilder baseDataValidator, final String repeatsOnNthDayOfMonthParamName, - final String repeatsOnDayParamName, final JsonElement element, final FromJsonHelper fromApiJsonHelper) { + final String repeatsOnDayParamName, final JsonElement element, final FromJsonHelper fromApiJsonHelper) { final Integer repeatsOnNthDayOfMonth = fromApiJsonHelper.extractIntegerSansLocaleNamed(repeatsOnNthDayOfMonthParamName, element); baseDataValidator.reset().parameter(repeatsOnNthDayOfMonthParamName).value(repeatsOnNthDayOfMonth).ignoreIfNull() .isOneOfTheseValues(NthDayType.ONE.getValue(), NthDayType.TWO.getValue(), NthDayType.THREE.getValue(), @@ -777,16 +777,16 @@ public static Integer getMonthOnDay(String recurringRule) { } public static LocalDate getNextRepaymentMeetingDate(final String recurringRule, final LocalDate seedDate, final LocalDate repaymentDate, - final Integer loanRepaymentInterval, final String frequency, final WorkingDays workingDays, - boolean isSkipRepaymentOnFirstDayOfMonth, final Integer numberOfDays, boolean applyWorkingDays) { + final Integer loanRepaymentInterval, final String frequency, final WorkingDays workingDays, + boolean isSkipRepaymentOnFirstDayOfMonth, final Integer numberOfDays, boolean applyWorkingDays) { boolean isCalledFirstTime = true; return getNextRepaymentMeetingDate(recurringRule, seedDate, repaymentDate, loanRepaymentInterval, frequency, workingDays, isSkipRepaymentOnFirstDayOfMonth, numberOfDays, isCalledFirstTime, applyWorkingDays); } public static LocalDate getNextRepaymentMeetingDate(final String recurringRule, final LocalDate seedDate, final LocalDate repaymentDate, - final Integer loanRepaymentInterval, final String frequency, boolean isSkipRepaymentOnFirstDayOfMonth, - final Integer numberOfDays) { + final Integer loanRepaymentInterval, final String frequency, boolean isSkipRepaymentOnFirstDayOfMonth, + final Integer numberOfDays) { boolean isCalledFirstTime = true; final WorkingDays workingDays = null; boolean applyWorkingDays = false; @@ -795,8 +795,8 @@ public static LocalDate getNextRepaymentMeetingDate(final String recurringRule, } public static LocalDate getNextRepaymentMeetingDate(final String recurringRule, final LocalDate seedDate, final LocalDate repaymentDate, - final Integer loanRepaymentInterval, final String frequency, final WorkingDays workingDays, - boolean isSkipRepaymentOnFirstDayOfMonth, final Integer numberOfDays, boolean isCalledFirstTime, boolean applyWorkingDays) { + final Integer loanRepaymentInterval, final String frequency, final WorkingDays workingDays, + boolean isSkipRepaymentOnFirstDayOfMonth, final Integer numberOfDays, boolean isCalledFirstTime, boolean applyWorkingDays) { final Recur recur = CalendarUtils.getICalRecur(recurringRule); if (recur == null) { diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/charge/data/ChargeData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/charge/data/ChargeData.java index 789c154912e..9f78b85a376 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/charge/data/ChargeData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/charge/data/ChargeData.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.Collection; import java.util.List; import java.util.Map; + import lombok.Builder; import lombok.EqualsAndHashCode; import lombok.Getter; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeTimeType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeTimeType.java index f713062c5b1..3577a257d12 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeTimeType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/charge/domain/ChargeTimeType.java @@ -6,9 +6,9 @@ * 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 @@ -55,30 +55,30 @@ public String getCode() { } public static Object[] validLoanValues() { - return new Integer[] { ChargeTimeType.DISBURSEMENT.getValue(), ChargeTimeType.SPECIFIED_DUE_DATE.getValue(), + return new Integer[]{ChargeTimeType.DISBURSEMENT.getValue(), ChargeTimeType.SPECIFIED_DUE_DATE.getValue(), ChargeTimeType.INSTALMENT_FEE.getValue(), ChargeTimeType.OVERDUE_INSTALLMENT.getValue(), - ChargeTimeType.TRANCHE_DISBURSEMENT.getValue() }; + ChargeTimeType.TRANCHE_DISBURSEMENT.getValue()}; } public static Object[] validLoanChargeValues() { - return new Integer[] { ChargeTimeType.DISBURSEMENT.getValue(), ChargeTimeType.SPECIFIED_DUE_DATE.getValue(), - ChargeTimeType.INSTALMENT_FEE.getValue() }; + return new Integer[]{ChargeTimeType.DISBURSEMENT.getValue(), ChargeTimeType.SPECIFIED_DUE_DATE.getValue(), + ChargeTimeType.INSTALMENT_FEE.getValue()}; } public static Object[] validSavingsValues() { - return new Integer[] { ChargeTimeType.SPECIFIED_DUE_DATE.getValue(), ChargeTimeType.SAVINGS_ACTIVATION.getValue(), + return new Integer[]{ChargeTimeType.SPECIFIED_DUE_DATE.getValue(), ChargeTimeType.SAVINGS_ACTIVATION.getValue(), ChargeTimeType.SAVINGS_CLOSURE.getValue(), ChargeTimeType.WITHDRAWAL_FEE.getValue(), ChargeTimeType.ANNUAL_FEE.getValue(), ChargeTimeType.MONTHLY_FEE.getValue(), ChargeTimeType.OVERDRAFT_FEE.getValue(), ChargeTimeType.WEEKLY_FEE.getValue(), - ChargeTimeType.SAVINGS_NOACTIVITY_FEE.getValue() }; + ChargeTimeType.SAVINGS_NOACTIVITY_FEE.getValue()}; } public static Object[] validClientValues() { - return new Integer[] { ChargeTimeType.SPECIFIED_DUE_DATE.getValue() }; + return new Integer[]{ChargeTimeType.SPECIFIED_DUE_DATE.getValue()}; } public static Object[] validShareValues() { - return new Integer[] { ChargeTimeType.SHAREACCOUNT_ACTIVATION.getValue(), ChargeTimeType.SHARE_PURCHASE.getValue(), - ChargeTimeType.SHARE_REDEEM.getValue() }; + return new Integer[]{ChargeTimeType.SHAREACCOUNT_ACTIVATION.getValue(), ChargeTimeType.SHARE_PURCHASE.getValue(), + ChargeTimeType.SHARE_REDEEM.getValue()}; } public static ChargeTimeType fromInt(final Integer chargeTime) { @@ -87,55 +87,55 @@ public static ChargeTimeType fromInt(final Integer chargeTime) { switch (chargeTime) { case 1: chargeTimeType = DISBURSEMENT; - break; + break; case 2: chargeTimeType = SPECIFIED_DUE_DATE; - break; + break; case 3: chargeTimeType = SAVINGS_ACTIVATION; - break; + break; case 4: chargeTimeType = SAVINGS_CLOSURE; - break; + break; case 5: chargeTimeType = WITHDRAWAL_FEE; - break; + break; case 6: chargeTimeType = ANNUAL_FEE; - break; + break; case 7: chargeTimeType = MONTHLY_FEE; - break; + break; case 8: chargeTimeType = INSTALMENT_FEE; - break; + break; case 9: chargeTimeType = OVERDUE_INSTALLMENT; - break; + break; case 10: chargeTimeType = OVERDRAFT_FEE; - break; + break; case 11: chargeTimeType = WEEKLY_FEE; - break; + break; case 12: chargeTimeType = TRANCHE_DISBURSEMENT; - break; + break; case 13: chargeTimeType = SHAREACCOUNT_ACTIVATION; - break; + break; case 14: chargeTimeType = SHARE_PURCHASE; - break; + break; case 15: chargeTimeType = SHARE_REDEEM; - break; + break; case 16: chargeTimeType = SAVINGS_NOACTIVITY_FEE; - break; + break; default: chargeTimeType = INVALID; - break; + break; } } return chargeTimeType; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeParameterUpdateNotSupportedException.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeParameterUpdateNotSupportedException.java index 7a7a61f4f5f..49619e7fcdc 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeParameterUpdateNotSupportedException.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/charge/exception/ChargeParameterUpdateNotSupportedException.java @@ -6,9 +6,9 @@ * 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 @@ -26,7 +26,7 @@ public class ChargeParameterUpdateNotSupportedException extends AbstractPlatformDomainRuleException { public ChargeParameterUpdateNotSupportedException(final String postFix, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg.charge.update.of." + postFix + ".is.not.supported", defaultUserMessage, defaultUserMessageArgs); } } diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/adapter/ClientImageIdAdapter.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/adapter/ClientImageIdAdapter.java index b46c79cc5ab..95909616493 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/adapter/ClientImageIdAdapter.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/adapter/ClientImageIdAdapter.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static java.util.Objects.nonNull; import java.util.Optional; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.documentmanagement.adapter.EntityImageIdAdapter; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/api/ClientApiConstants.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/api/ClientApiConstants.java index d1add72687e..a7ab843f2cd 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/api/ClientApiConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/api/ClientApiConstants.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,7 @@ import java.util.HashSet; import java.util.Set; -@SuppressWarnings({ "HideUtilityClassConstructor" }) +@SuppressWarnings({"HideUtilityClassConstructor"}) public class ClientApiConstants { public static final String CLIENT_RESOURCE_NAME = "client"; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientCollateralManagementData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientCollateralManagementData.java index e0f58d4baa8..7d55a69de8a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientCollateralManagementData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientCollateralManagementData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.math.BigDecimal; + import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientData.java index e0f0dc3be46..de93704acab 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientData.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.Collection; import java.util.List; import java.util.Set; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -126,9 +127,9 @@ public final class ClientData implements Comparable, Serializable { private LocalDate submittedOnDate; public static ClientData importClientEntityInstance(Long legalFormId, Integer rowIndex, String fullname, Long officeId, - Long clientTypeId, Long clientClassificationId, Long staffId, Boolean active, LocalDate activationDate, - LocalDate submittedOnDate, ExternalId externalId, LocalDate dateOfBirth, String mobileNo, - ClientNonPersonData clientNonPersonDetails, Collection address, String locale, String dateFormat) { + Long clientTypeId, Long clientClassificationId, Long staffId, Boolean active, LocalDate activationDate, + LocalDate submittedOnDate, ExternalId externalId, LocalDate dateOfBirth, String mobileNo, + ClientNonPersonData clientNonPersonDetails, Collection address, String locale, String dateFormat) { return new ClientData(legalFormId, rowIndex, fullname, null, null, null, submittedOnDate, activationDate, active, externalId, officeId, staffId, mobileNo, dateOfBirth, clientTypeId, null, clientClassificationId, null, address, clientNonPersonDetails, locale, dateFormat); @@ -200,9 +201,9 @@ private ClientData(final Long clientId, final Long officeId) { } public static ClientData importClientPersonInstance(Long legalFormId, Integer rowIndex, String firstname, String lastname, - String middlename, LocalDate submittedOn, LocalDate activationDate, Boolean active, ExternalId externalId, Long officeId, - Long staffId, String mobileNo, LocalDate dob, Long clientTypeId, Long genderId, Long clientClassificationId, Boolean isStaff, - Collection address, String locale, String dateFormat) { + String middlename, LocalDate submittedOn, LocalDate activationDate, Boolean active, ExternalId externalId, Long officeId, + Long staffId, String mobileNo, LocalDate dob, Long clientTypeId, Long genderId, Long clientClassificationId, Boolean isStaff, + Collection address, String locale, String dateFormat) { return new ClientData(legalFormId, rowIndex, null, firstname, lastname, middlename, submittedOn, activationDate, active, externalId, officeId, staffId, mobileNo, dob, clientTypeId, genderId, clientClassificationId, isStaff, address, null, locale, @@ -214,9 +215,9 @@ public static ClientData emptyInstance(Long clientId) { } private ClientData(Long legalFormId, Integer rowIndex, String fullname, String firstname, String lastname, String middlename, - LocalDate submittedOn, LocalDate activationDate, Boolean active, ExternalId externalId, Long officeId, Long staffId, - String mobileNo, LocalDate dob, Long clientTypeId, Long genderId, Long clientClassificationId, Boolean isStaff, - Collection address, ClientNonPersonData clientNonPersonDetails, String locale, String dateFormat) { + LocalDate submittedOn, LocalDate activationDate, Boolean active, ExternalId externalId, Long officeId, Long staffId, + String mobileNo, LocalDate dob, Long clientTypeId, Long genderId, Long clientClassificationId, Boolean isStaff, + Collection address, ClientNonPersonData clientNonPersonDetails, String locale, String dateFormat) { this.rowIndex = rowIndex; this.dateFormat = dateFormat; this.locale = locale; @@ -278,13 +279,13 @@ private ClientData(Long legalFormId, Integer rowIndex, String fullname, String f } public static ClientData template(final Long officeId, final LocalDate joinedDate, final Collection officeOptions, - final Collection staffOptions, final Collection narrations, - final Collection genderOptions, final Collection savingProductOptions, - final Collection clientTypeOptions, final Collection clientClassificationOptions, - final Collection clientNonPersonConstitutionOptions, - final Collection clientNonPersonMainBusinessLineOptions, final List clientLegalFormOptions, - final ClientFamilyMembersData familyMemberOptions, final Collection address, final Boolean isAddressEnabled, - final List datatables) { + final Collection staffOptions, final Collection narrations, + final Collection genderOptions, final Collection savingProductOptions, + final Collection clientTypeOptions, final Collection clientClassificationOptions, + final Collection clientNonPersonConstitutionOptions, + final Collection clientNonPersonMainBusinessLineOptions, final List clientLegalFormOptions, + final ClientFamilyMembersData familyMemberOptions, final Collection address, final Boolean isAddressEnabled, + final List datatables) { final String accountNo = null; final EnumOptionData status = null; final CodeValueData subStatus = null; @@ -345,7 +346,7 @@ public static ClientData templateOnTop(final ClientData clientData, final Client } public static ClientData templateWithSavingAccountOptions(final ClientData clientData, - final Collection savingAccountOptions) { + final Collection savingAccountOptions) { final Set clientCollateralManagements = null; return new ClientData(clientData.accountNo, clientData.status, clientData.subStatus, clientData.officeId, clientData.officeName, clientData.transferToOfficeId, clientData.transferToOfficeName, clientData.id, clientData.firstname, clientData.middlename, @@ -363,7 +364,7 @@ public static ClientData templateWithSavingAccountOptions(final ClientData clien } public static ClientData setParentGroups(final ClientData clientData, final Collection parentGroups, - final Set clientCollateralManagements) { + final Set clientCollateralManagements) { return new ClientData(clientData.accountNo, clientData.status, clientData.subStatus, clientData.officeId, clientData.officeName, clientData.transferToOfficeId, clientData.transferToOfficeName, clientData.id, clientData.firstname, clientData.middlename, clientData.lastname, clientData.fullname, clientData.displayName, clientData.externalId, clientData.mobileNo, @@ -379,7 +380,7 @@ public static ClientData setParentGroups(final ClientData clientData, final Coll } public static ClientData clientIdentifier(final Long id, final String accountNo, final String firstname, final String middlename, - final String lastname, final String fullname, final String displayName, final Long officeId, final String officeName) { + final String lastname, final String fullname, final String displayName, final Long officeId, final String officeName) { final Long transferToOfficeId = null; final String transferToOfficeName = null; @@ -485,13 +486,13 @@ public static ClientData instance(final Long id, final String displayName) { } public static ClientData instance(final String accountNo, final EnumOptionData status, final CodeValueData subStatus, - final Long officeId, final String officeName, final Long transferToOfficeId, final String transferToOfficeName, final Long id, - final String firstname, final String middlename, final String lastname, final String fullname, final String displayName, - final ExternalId externalId, final String mobileNo, final String emailAddress, final LocalDate dateOfBirth, - final CodeValueData gender, final LocalDate activationDate, final Long imageId, final Long staffId, final String staffName, - final ClientTimelineData timeline, final Long savingsProductId, final String savingsProductName, final Long savingsAccountId, - final CodeValueData clientType, final CodeValueData clientClassification, final EnumOptionData legalForm, - final ClientNonPersonData clientNonPerson, final Boolean isStaff) { + final Long officeId, final String officeName, final Long transferToOfficeId, final String transferToOfficeName, final Long id, + final String firstname, final String middlename, final String lastname, final String fullname, final String displayName, + final ExternalId externalId, final String mobileNo, final String emailAddress, final LocalDate dateOfBirth, + final CodeValueData gender, final LocalDate activationDate, final Long imageId, final Long staffId, final String staffName, + final ClientTimelineData timeline, final Long savingsProductId, final String savingsProductName, final Long savingsAccountId, + final CodeValueData clientType, final CodeValueData clientClassification, final EnumOptionData legalForm, + final ClientNonPersonData clientNonPerson, final Boolean isStaff) { final Collection allowedOffices = null; final Collection groups = null; @@ -515,22 +516,22 @@ public static ClientData instance(final String accountNo, final EnumOptionData s } private ClientData(final String accountNo, final EnumOptionData status, final CodeValueData subStatus, final Long officeId, - final String officeName, final Long transferToOfficeId, final String transferToOfficeName, final Long id, - final String firstname, final String middlename, final String lastname, final String fullname, final String displayName, - final ExternalId externalId, final String mobileNo, final String emailAddress, final LocalDate dateOfBirth, - final CodeValueData gender, final LocalDate activationDate, final Long imageId, final Long staffId, final String staffName, - final Collection allowedOffices, final Collection groups, - final Collection staffOptions, final Collection narrations, - final Collection genderOptions, final ClientTimelineData timeline, - final Collection savingProductOptions, final Long savingsProductId, final String savingsProductName, - final Long savingsAccountId, final Collection savingAccountOptions, final CodeValueData clientType, - final CodeValueData clientClassification, final Collection clientTypeOptions, - final Collection clientClassificationOptions, final Collection clientNonPersonConstitutionOptions, - final Collection clientNonPersonMainBusinessLineOptions, final ClientNonPersonData clientNonPerson, - final List clientLegalFormOptions, final ClientFamilyMembersData familyMemberOptions, - final EnumOptionData legalForm, final Collection address, final Boolean isAddressEnabled, - final List datatables, final Boolean isStaff, - final Set clientCollateralManagements) { + final String officeName, final Long transferToOfficeId, final String transferToOfficeName, final Long id, + final String firstname, final String middlename, final String lastname, final String fullname, final String displayName, + final ExternalId externalId, final String mobileNo, final String emailAddress, final LocalDate dateOfBirth, + final CodeValueData gender, final LocalDate activationDate, final Long imageId, final Long staffId, final String staffName, + final Collection allowedOffices, final Collection groups, + final Collection staffOptions, final Collection narrations, + final Collection genderOptions, final ClientTimelineData timeline, + final Collection savingProductOptions, final Long savingsProductId, final String savingsProductName, + final Long savingsAccountId, final Collection savingAccountOptions, final CodeValueData clientType, + final CodeValueData clientClassification, final Collection clientTypeOptions, + final Collection clientClassificationOptions, final Collection clientNonPersonConstitutionOptions, + final Collection clientNonPersonMainBusinessLineOptions, final ClientNonPersonData clientNonPerson, + final List clientLegalFormOptions, final ClientFamilyMembersData familyMemberOptions, + final EnumOptionData legalForm, final Collection address, final Boolean isAddressEnabled, + final List datatables, final Boolean isStaff, + final Set clientCollateralManagements) { this.accountNo = accountNo; this.status = status; if (status != null) { diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientFamilyMemberRequest.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientFamilyMemberRequest.java index a7b41d6c29d..bd09c8243d0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientFamilyMemberRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientFamilyMemberRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientFamilyMembersData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientFamilyMembersData.java index 544100686ff..93b74ad2647 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientFamilyMembersData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientFamilyMembersData.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.io.Serializable; import java.time.LocalDate; import java.util.Collection; + import lombok.Builder; import lombok.Getter; import org.apache.fineract.infrastructure.codes.data.CodeValueData; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientNonPersonData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientNonPersonData.java index 6a67be10c44..70c9c0315e9 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientNonPersonData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientNonPersonData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.time.LocalDate; + import org.apache.fineract.infrastructure.codes.data.CodeValueData; /** @@ -41,13 +42,13 @@ public class ClientNonPersonData implements Serializable { private String dateFormat; public static ClientNonPersonData importInstance(String incorporationNo, LocalDate incorpValidityTillDate, String remarks, - Long mainBusinessLineId, Long constitutionId, String locale, String dateFormat) { + Long mainBusinessLineId, Long constitutionId, String locale, String dateFormat) { return new ClientNonPersonData(incorporationNo, incorpValidityTillDate, remarks, mainBusinessLineId, constitutionId, locale, dateFormat); } private ClientNonPersonData(String incorpNumber, LocalDate incorpValidityTillDate, String remarks, Long mainBusinessLineId, - Long constitutionId, String locale, String dateFormat) { + Long constitutionId, String locale, String dateFormat) { this.incorpNumber = incorpNumber; this.incorpValidityTillDate = incorpValidityTillDate; @@ -61,7 +62,7 @@ private ClientNonPersonData(String incorpNumber, LocalDate incorpValidityTillDat } public ClientNonPersonData(CodeValueData constitution, String incorpNo, LocalDate incorpValidityTillDate, - CodeValueData mainBusinessLine, String remarks) { + CodeValueData mainBusinessLine, String remarks) { this.constitution = constitution; this.incorpNumber = incorpNo; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientTimelineData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientTimelineData.java index ca8c68dfb88..283a5dde372 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientTimelineData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/data/ClientTimelineData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java index 95112867962..f670bfef06e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/Client.java @@ -6,9 +6,9 @@ * 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 @@ -29,12 +29,14 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; + import lombok.Getter; import lombok.Setter; import org.apache.commons.lang3.StringUtils; @@ -55,8 +57,8 @@ @Entity @Getter @Setter -@Table(name = "m_client", uniqueConstraints = { @UniqueConstraint(columnNames = { "account_no" }, name = "account_no_UNIQUE"), // - @UniqueConstraint(columnNames = { "mobile_no" }, name = "mobile_no_UNIQUE") }) +@Table(name = "m_client", uniqueConstraints = {@UniqueConstraint(columnNames = {"account_no"}, name = "account_no_UNIQUE"), // + @UniqueConstraint(columnNames = {"mobile_no"}, name = "mobile_no_UNIQUE")}) public class Client extends AbstractAuditableWithUTCDateTimeCustom { @Column(name = "account_no", length = 20, unique = true, nullable = false) @@ -206,24 +208,25 @@ public class Client extends AbstractAuditableWithUTCDateTimeCustom { protected Set identifiers = new HashSet<>(); public static Client instance(final AppUser currentUser, final ClientStatus status, final Office office, final Group clientParentGroup, - final String accountNo, final String firstname, final String middlename, final String lastname, final String fullname, - final LocalDate activationDate, final LocalDate officeJoiningDate, final ExternalId externalId, final String mobileNo, - final String emailAddress, final Staff staff, final LocalDate submittedOnDate, final Long savingsProductId, - final Long savingsAccountId, final LocalDate dateOfBirth, final CodeValue gender, final CodeValue clientType, - final CodeValue clientClassification, final Integer legalForm, final Boolean isStaff) { + final String accountNo, final String firstname, final String middlename, final String lastname, final String fullname, + final LocalDate activationDate, final LocalDate officeJoiningDate, final ExternalId externalId, final String mobileNo, + final String emailAddress, final Staff staff, final LocalDate submittedOnDate, final Long savingsProductId, + final Long savingsAccountId, final LocalDate dateOfBirth, final CodeValue gender, final CodeValue clientType, + final CodeValue clientClassification, final Integer legalForm, final Boolean isStaff) { return new Client(currentUser, status, office, clientParentGroup, accountNo, firstname, middlename, lastname, fullname, activationDate, officeJoiningDate, externalId, mobileNo, emailAddress, staff, submittedOnDate, savingsProductId, savingsAccountId, dateOfBirth, gender, clientType, clientClassification, legalForm, isStaff); } - protected Client() {} + protected Client() { + } private Client(final AppUser currentUser, final ClientStatus status, final Office office, final Group clientParentGroup, - final String accountNo, final String firstname, final String middlename, final String lastname, final String fullname, - final LocalDate activationDate, final LocalDate officeJoiningDate, final ExternalId externalId, final String mobileNo, - final String emailAddress, final Staff staff, final LocalDate submittedOnDate, final Long savingsProductId, - final Long savingsAccountId, final LocalDate dateOfBirth, final CodeValue gender, final CodeValue clientType, - final CodeValue clientClassification, final Integer legalForm, final Boolean isStaff) { + final String accountNo, final String firstname, final String middlename, final String lastname, final String fullname, + final LocalDate activationDate, final LocalDate officeJoiningDate, final ExternalId externalId, final String mobileNo, + final String emailAddress, final Staff staff, final LocalDate submittedOnDate, final Long savingsProductId, + final Long savingsAccountId, final LocalDate dateOfBirth, final CodeValue gender, final CodeValue clientType, + final CodeValue clientClassification, final Integer legalForm, final Boolean isStaff) { if (StringUtils.isBlank(accountNo)) { this.accountNumber = new RandomPasswordGenerator(19).generate(); diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientIdentifier.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientIdentifier.java index a42810a8b56..2a8f126bab0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientIdentifier.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientIdentifier.java @@ -6,9 +6,9 @@ * 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 @@ -24,8 +24,10 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.util.LinkedHashMap; import java.util.Map; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.codes.domain.CodeValue; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -33,8 +35,8 @@ @Entity @Table(name = "m_client_identifier", uniqueConstraints = { - @UniqueConstraint(columnNames = { "document_type_id", "document_key" }, name = "unique_identifier_key"), - @UniqueConstraint(columnNames = { "client_id", "document_key", "active" }, name = "unique_active_client_identifier") }) + @UniqueConstraint(columnNames = {"document_type_id", "document_key"}, name = "unique_identifier_key"), + @UniqueConstraint(columnNames = {"client_id", "document_key", "active"}, name = "unique_active_client_identifier")}) public class ClientIdentifier extends AbstractAuditableWithUTCDateTimeCustom { @ManyToOne @@ -69,7 +71,7 @@ protected ClientIdentifier() { } private ClientIdentifier(final Client client, final CodeValue documentType, final String documentKey, final String statusName, - String description) { + String description) { this.client = client; this.documentType = documentType; this.documentKey = StringUtils.defaultIfEmpty(documentKey, null); diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientIdentifierRepository.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientIdentifierRepository.java index 576ee40c448..96d20685240 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientIdentifierRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientIdentifierRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientIdentifierStatus.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientIdentifierStatus.java index 4590fa44ee7..49627dc8049 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientIdentifierStatus.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientIdentifierStatus.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientRepository.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientRepository.java index 05578965323..95a7945dc75 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientRepository.java @@ -6,9 +6,9 @@ * 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 @@ -40,9 +40,9 @@ public interface ClientRepository extends JpaRepository, JpaSpecif LEFT JOIN client.transferToOffice transferToOffice WHERE client.id = :clientId AND (office.hierarchy LIKE :officeHierarchy OR transferToOffice.hierarchy LIKE :transferToOfficeHierarchy) - """) + """) Client fetchByClientIdAndHierarchy(@Param("clientId") Long clientId, @Param("officeHierarchy") String officeHierarchy, - @Param("transferToOfficeHierarchy") String transferToOfficeHierarchy); + @Param("transferToOfficeHierarchy") String transferToOfficeHierarchy); @Query("SELECT c.id FROM Client c WHERE c.externalId = :externalId") Long findIdByExternalId(@Param("externalId") ExternalId externalId); diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientStatus.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientStatus.java index 2d74c57ee78..6f81e8c1dc6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientStatus.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/ClientStatus.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/LegalForm.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/LegalForm.java index c69db72e081..a7898d6bd06 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/LegalForm.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/LegalForm.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/search/SearchedClient.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/search/SearchedClient.java index 127ed8b4574..4188cb8eec3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/search/SearchedClient.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/search/SearchedClient.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.time.OffsetDateTime; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.ExternalId; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/search/SearchingClientRepository.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/search/SearchingClientRepository.java index e1827da1b4d..e8f19287079 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/search/SearchingClientRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/search/SearchingClientRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/search/SearchingClientRepositoryImpl.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/search/SearchingClientRepositoryImpl.java index fcfefb751d7..3e932e3643f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/search/SearchingClientRepositoryImpl.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/domain/search/SearchingClientRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -29,8 +29,10 @@ import jakarta.persistence.criteria.Path; import jakarta.persistence.criteria.Predicate; import jakarta.persistence.criteria.Root; + import java.util.ArrayList; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.jpa.CriteriaQueryFactory; import org.apache.fineract.organisation.office.domain.Office; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNotActiveException.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNotActiveException.java index e964059bdb2..ea3e072a42b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNotActiveException.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNotActiveException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNotFoundException.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNotFoundException.java index e12e5247932..3db894ef482 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNotFoundException.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformService.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformService.java index 9c41357d764..db23bf6ccbc 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.Collection; + import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.infrastructure.core.service.SearchParameters; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/ClientCollateralManagementData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/ClientCollateralManagementData.java index 2b4d32289d4..5fa054b1b43 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/ClientCollateralManagementData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/ClientCollateralManagementData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Getter; @@ -42,7 +43,7 @@ public final class ClientCollateralManagementData { private final Long id; public static ClientCollateralManagementData instance(final String name, final BigDecimal quantity, final BigDecimal total, - final BigDecimal totalCollateral, final Long clientId, final List loanTransactionData, final Long id) { + final BigDecimal totalCollateral, final Long clientId, final List loanTransactionData, final Long id) { return new ClientCollateralManagementData(name, quantity, total, totalCollateral, clientId, loanTransactionData, id); } diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/LoanTransactionData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/LoanTransactionData.java index fb645c075d5..9eb6f53b51c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/LoanTransactionData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/LoanTransactionData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.OffsetDateTime; + import lombok.Getter; @Getter @@ -34,7 +35,7 @@ public final class LoanTransactionData { private final OffsetDateTime lastRepaymentDate; private LoanTransactionData(final Long loanId, final OffsetDateTime lastRepaymentDate, final BigDecimal remainingAmount, - final BigDecimal lastRepayment) { + final BigDecimal lastRepayment) { this.lastRepayment = lastRepayment; this.lastRepaymentDate = lastRepaymentDate; this.remainingAmount = remainingAmount; @@ -42,7 +43,7 @@ private LoanTransactionData(final Long loanId, final OffsetDateTime lastRepaymen } public static LoanTransactionData instance(final Long loanId, final OffsetDateTime lastRepaymentDate, final BigDecimal remainingAmount, - final BigDecimal lastRepayment) { + final BigDecimal lastRepayment) { return new LoanTransactionData(loanId, lastRepaymentDate, remainingAmount, lastRepayment); } } diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/CollectionSheetConstants.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/CollectionSheetConstants.java index 2b6af3023cc..209c1fa49c7 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/CollectionSheetConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/CollectionSheetConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/command/CollectionSheetBulkDisbursalCommand.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/command/CollectionSheetBulkDisbursalCommand.java index b45ae1d7327..08066f84d13 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/command/CollectionSheetBulkDisbursalCommand.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/command/CollectionSheetBulkDisbursalCommand.java @@ -6,9 +6,9 @@ * 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 @@ -30,7 +30,7 @@ public class CollectionSheetBulkDisbursalCommand { private final SingleDisbursalCommand[] disburseTransactions; public CollectionSheetBulkDisbursalCommand(final String note, final LocalDate transactionDate, - final SingleDisbursalCommand[] disburseTransactions) { + final SingleDisbursalCommand[] disburseTransactions) { this.note = note; this.transactionDate = transactionDate; this.disburseTransactions = disburseTransactions; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/command/CollectionSheetBulkRepaymentCommand.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/command/CollectionSheetBulkRepaymentCommand.java index 9a73f5b301b..5abafe5ff87 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/command/CollectionSheetBulkRepaymentCommand.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/command/CollectionSheetBulkRepaymentCommand.java @@ -6,9 +6,9 @@ * 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 @@ -30,7 +30,7 @@ public class CollectionSheetBulkRepaymentCommand { private final SingleRepaymentCommand[] repaymentTransactions; public CollectionSheetBulkRepaymentCommand(final String note, final LocalDate transactionDate, - final SingleRepaymentCommand[] repaymentTransactions) { + final SingleRepaymentCommand[] repaymentTransactions) { this.note = note; this.transactionDate = transactionDate; this.repaymentTransactions = repaymentTransactions; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/command/SingleDisbursalCommand.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/command/SingleDisbursalCommand.java index d2dddbbf2b7..b2c74abbb62 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/command/SingleDisbursalCommand.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/command/SingleDisbursalCommand.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/command/SingleRepaymentCommand.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/command/SingleRepaymentCommand.java index 2d1dc0010ff..56a18d3254e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/command/SingleRepaymentCommand.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/collectionsheet/command/SingleRepaymentCommand.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.Getter; import org.apache.fineract.infrastructure.core.domain.ExternalId; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/ConditionType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/ConditionType.java index 8618920b76f..21c127fcf3c 100755 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/ConditionType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/ConditionType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/DayOfWeekType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/DayOfWeekType.java index 0590d06278e..a2a4efbce15 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/DayOfWeekType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/DayOfWeekType.java @@ -6,9 +6,9 @@ * 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 @@ -53,27 +53,27 @@ public static DayOfWeekType fromInt(final Integer dayOfWeek) { switch (dayOfWeek) { case 1: weekDayType = MONDAY; - break; + break; case 2: weekDayType = TUESDAY; - break; + break; case 3: weekDayType = WEDNESDAY; - break; + break; case 4: weekDayType = THURSDAY; - break; + break; case 5: weekDayType = FRIDAY; - break; + break; case 6: weekDayType = SATURDAY; - break; + break; case 7: weekDayType = SUNDAY; - break; + break; default: - break; + break; } } return weekDayType; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInMonthType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInMonthType.java index 3b69f42a37b..0b1e1af1253 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInMonthType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInMonthType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInYearCustomStrategyType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInYearCustomStrategyType.java index a8cfde12a8f..d778b74558a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInYearCustomStrategyType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInYearCustomStrategyType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInYearType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInYearType.java index da23cb1a1ef..54565672b51 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInYearType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/DaysInYearType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/NthDayType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/NthDayType.java index 2631ff0209a..ca19184c24f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/NthDayType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/NthDayType.java @@ -6,9 +6,9 @@ * 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 @@ -51,27 +51,27 @@ public static NthDayType fromInt(final Integer frequency) { switch (frequency) { case 1: repaymentFrequencyNthDayType = NthDayType.ONE; - break; + break; case 2: repaymentFrequencyNthDayType = NthDayType.TWO; - break; + break; case 3: repaymentFrequencyNthDayType = NthDayType.THREE; - break; + break; case 4: repaymentFrequencyNthDayType = NthDayType.FOUR; - break; + break; case 5: repaymentFrequencyNthDayType = NthDayType.FIVE; - break; + break; case -1: repaymentFrequencyNthDayType = NthDayType.LAST; - break; + break; case -2: repaymentFrequencyNthDayType = NthDayType.ONDAY; - break; + break; default: - break; + break; } } return repaymentFrequencyNthDayType; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/PeriodFrequencyType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/PeriodFrequencyType.java index 6899c58ce94..b0c0d809e94 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/PeriodFrequencyType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/common/domain/PeriodFrequencyType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/common/service/CommonEnumerations.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/common/service/CommonEnumerations.java index eb1a64a0fdf..b48f8742672 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/common/service/CommonEnumerations.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/common/service/CommonEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.common.domain.ConditionType; import org.apache.fineract.portfolio.common.domain.DaysInMonthType; @@ -58,23 +59,23 @@ public static EnumOptionData termFrequencyType(final PeriodFrequencyType type, f case DAYS: optionData = new EnumOptionData(PeriodFrequencyType.DAYS.getValue().longValue(), codePrefix + PeriodFrequencyType.DAYS.getCode(), "Days"); - break; + break; case WEEKS: optionData = new EnumOptionData(PeriodFrequencyType.WEEKS.getValue().longValue(), codePrefix + PeriodFrequencyType.WEEKS.getCode(), "Weeks"); - break; + break; case MONTHS: optionData = new EnumOptionData(PeriodFrequencyType.MONTHS.getValue().longValue(), codePrefix + PeriodFrequencyType.MONTHS.getCode(), "Months"); - break; + break; case YEARS: optionData = new EnumOptionData(PeriodFrequencyType.YEARS.getValue().longValue(), codePrefix + PeriodFrequencyType.YEARS.getCode(), "Years"); - break; + break; default: optionData = new EnumOptionData(PeriodFrequencyType.INVALID.getValue().longValue(), PeriodFrequencyType.INVALID.getCode(), "Invalid"); - break; + break; } return optionData; } @@ -89,22 +90,22 @@ public static EnumOptionData conditionType(final ConditionType type, final Strin case EQUAL: optionData = new EnumOptionData(ConditionType.EQUAL.getValue().longValue(), codePrefix + ConditionType.EQUAL.getCode(), "equal"); - break; + break; case NOT_EQUAL: optionData = new EnumOptionData(ConditionType.NOT_EQUAL.getValue().longValue(), codePrefix + ConditionType.NOT_EQUAL.getCode(), "notEqual"); - break; + break; case GREATERTHAN: optionData = new EnumOptionData(ConditionType.GREATERTHAN.getValue().longValue(), codePrefix + ConditionType.GREATERTHAN.getCode(), "greaterthan"); - break; + break; case LESSTHAN: optionData = new EnumOptionData(ConditionType.LESSTHAN.getValue().longValue(), codePrefix + ConditionType.LESSTHAN.getCode(), "lessthan"); - break; + break; default: optionData = new EnumOptionData(ConditionType.INVALID.getValue().longValue(), ConditionType.INVALID.getCode(), "Invalid"); - break; + break; } return optionData; } @@ -128,15 +129,15 @@ public static EnumOptionData daysInMonthType(final DaysInMonthType type) { switch (type) { case ACTUAL: optionData = new EnumOptionData(DaysInMonthType.ACTUAL.getValue().longValue(), DaysInMonthType.ACTUAL.getCode(), "Actual"); - break; + break; case DAYS_30: optionData = new EnumOptionData(DaysInMonthType.DAYS_30.getValue().longValue(), DaysInMonthType.DAYS_30.getCode(), "30 Days"); - break; + break; default: optionData = new EnumOptionData(DaysInMonthType.INVALID.getValue().longValue(), DaysInMonthType.INVALID.getCode(), "Invalid"); - break; + break; } return optionData; } @@ -150,22 +151,22 @@ public static EnumOptionData daysInYearType(final DaysInYearType type) { switch (type) { case ACTUAL: optionData = new EnumOptionData(DaysInYearType.ACTUAL.getValue().longValue(), DaysInYearType.ACTUAL.getCode(), "Actual"); - break; + break; case DAYS_360: optionData = new EnumOptionData(DaysInYearType.DAYS_360.getValue().longValue(), DaysInYearType.DAYS_360.getCode(), "360 Days"); - break; + break; case DAYS_364: optionData = new EnumOptionData(DaysInYearType.DAYS_364.getValue().longValue(), DaysInYearType.DAYS_364.getCode(), "364 Days"); - break; + break; case DAYS_365: optionData = new EnumOptionData(DaysInYearType.DAYS_365.getValue().longValue(), DaysInYearType.DAYS_365.getCode(), "365 Days"); - break; + break; default: optionData = new EnumOptionData(DaysInYearType.INVALID.getValue().longValue(), DaysInYearType.INVALID.getCode(), "Invalid"); - break; + break; } return optionData; } diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/common/service/Validator.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/common/service/Validator.java index 3a0573baa74..25bad85da52 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/common/service/Validator.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/common/service/Validator.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.List; import java.util.function.Consumer; + import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.infrastructure.core.exception.GeneralPlatformDomainRuleException; @@ -29,7 +30,8 @@ public final class Validator { - private Validator() {} + private Validator() { + } public static void validateOrThrow(String resource, Consumer baseDataValidator) { final List dataValidationErrors = getApiParameterErrors(resource, baseDataValidator); diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucket.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucket.java index 8b19ad2bdd1..7af245b8893 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucket.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucket.java @@ -6,9 +6,9 @@ * 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 @@ -29,7 +29,9 @@ import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; import jakarta.persistence.Version; + import java.util.List; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -40,7 +42,7 @@ @NoArgsConstructor @Entity @Table(name = "m_delinquency_bucket", uniqueConstraints = { - @UniqueConstraint(name = "uq_delinquency_bucket_name", columnNames = { "name" }) }) + @UniqueConstraint(name = "uq_delinquency_bucket_name", columnNames = {"name"})}) public class DelinquencyBucket extends AbstractAuditableWithUTCDateTimeCustom { @Column(name = "name", nullable = false) diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucketType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucketType.java index 86d37759300..819806614ec 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucketType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucketType.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.StringEnumOptionData; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyFrequencyType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyFrequencyType.java index 08b18abc8ff..ba2d35dbb4c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyFrequencyType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyFrequencyType.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.StringEnumOptionData; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyMinimumPaymentPeriodAndRule.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyMinimumPaymentPeriodAndRule.java index d2a7cc6349b..ddd4dcc78e4 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyMinimumPaymentPeriodAndRule.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyMinimumPaymentPeriodAndRule.java @@ -6,9 +6,9 @@ * 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 @@ -26,8 +26,10 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.OneToOne; import jakarta.persistence.Table; + import java.io.Serial; import java.math.BigDecimal; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyMinimumPaymentType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyMinimumPaymentType.java index e9245df34b4..2c68c669a1f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyMinimumPaymentType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyMinimumPaymentType.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.ApiFacingEnum; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyRange.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyRange.java index 00d573ffe5d..496186c3c75 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyRange.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyRange.java @@ -6,9 +6,9 @@ * 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 @@ -34,7 +34,7 @@ @NoArgsConstructor @Entity @Table(name = "m_delinquency_range", uniqueConstraints = { - @UniqueConstraint(name = "uq_delinquency_range_classification", columnNames = { "classification" }) }) + @UniqueConstraint(name = "uq_delinquency_range_classification", columnNames = {"classification"})}) public class DelinquencyRange extends AbstractAuditableWithUTCDateTimeCustom { @Column(name = "classification", nullable = false) diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/data/FundData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/data/FundData.java index 14188b40e26..05883fd877f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/data/FundData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/data/FundData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.fund.data; import java.io.Serializable; + import lombok.Getter; /** diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/domain/Fund.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/domain/Fund.java index 081a0081855..afad60cef15 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/domain/Fund.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/domain/Fund.java @@ -6,9 +6,9 @@ * 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 @@ -22,16 +22,18 @@ import jakarta.persistence.Entity; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.util.LinkedHashMap; import java.util.Map; + import lombok.Getter; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @Entity -@Table(name = "m_fund", uniqueConstraints = { @UniqueConstraint(columnNames = { "name" }, name = "fund_name_org"), - @UniqueConstraint(columnNames = { "external_id" }, name = "fund_externalid_org") }) +@Table(name = "m_fund", uniqueConstraints = {@UniqueConstraint(columnNames = {"name"}, name = "fund_name_org"), + @UniqueConstraint(columnNames = {"external_id"}, name = "fund_externalid_org")}) public class Fund extends AbstractPersistableCustom { @Getter diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/domain/FundRepository.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/domain/FundRepository.java index f64cf80da04..d83d4c96b4e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/domain/FundRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/domain/FundRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/exception/FundNotFoundException.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/exception/FundNotFoundException.java index ef5343ed611..54a6f7fd9ce 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/exception/FundNotFoundException.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/exception/FundNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/service/FundReadPlatformService.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/service/FundReadPlatformService.java index fa00a380fcf..e2fd990400d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/service/FundReadPlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/fund/service/FundReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.fund.service; import java.util.List; + import org.apache.fineract.portfolio.fund.data.FundData; public interface FundReadPlatformService { diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/api/GroupingTypesApiConstants.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/api/GroupingTypesApiConstants.java index 47d848a2a30..b26356fc92a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/api/GroupingTypesApiConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/api/GroupingTypesApiConstants.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.HashSet; import java.util.Set; + import org.apache.fineract.portfolio.group.data.CenterData; public final class GroupingTypesApiConstants { diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/data/CenterData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/data/CenterData.java index 98df9b5f27f..01b7406e725 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/data/CenterData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/data/CenterData.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.Collection; import java.util.List; import java.util.Objects; + import org.apache.commons.collections4.CollectionUtils; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.core.data.EnumOptionData; @@ -76,14 +77,14 @@ public final class CenterData implements Serializable { private LocalDate submittedOnDate; public static CenterData importInstance(String name, List groupMembers, LocalDate activationDate, boolean active, - LocalDate submittedOnDate, String externalId, Long officeId, Long staffId, Integer rowIndex, String dateFormat, String locale) { + LocalDate submittedOnDate, String externalId, Long officeId, Long staffId, Integer rowIndex, String dateFormat, String locale) { return new CenterData(name, groupMembers, activationDate, active, submittedOnDate, externalId, officeId, staffId, rowIndex, dateFormat, locale); } private CenterData(String name, List groupMembers, LocalDate activationDate, boolean active, - LocalDate submittedOnDate, String externalId, Long officeId, Long staffId, Integer rowIndex, String dateFormat, String locale) { + LocalDate submittedOnDate, String externalId, Long officeId, Long staffId, Integer rowIndex, String dateFormat, String locale) { this.name = name; this.groupMembers = groupMembers; this.externalId = externalId; @@ -122,9 +123,9 @@ public String getOfficeName() { } public static CenterData template(final Long officeId, final String accountNo, final LocalDate activationDate, - final Collection officeOptions, final Collection staffOptions, - final Collection groupMembersOptions, final BigDecimal totalCollected, final BigDecimal totalOverdue, - final BigDecimal totaldue, final BigDecimal installmentDue) { + final Collection officeOptions, final Collection staffOptions, + final Collection groupMembersOptions, final BigDecimal totalCollected, final BigDecimal totalOverdue, + final BigDecimal totaldue, final BigDecimal installmentDue) { final CalendarData collectionMeetingCalendar = null; final Collection closureReasons = null; final GroupTimelineData timeline = null; @@ -142,9 +143,9 @@ public static CenterData withTemplate(final CenterData templateCenter, final Cen } public static CenterData instance(final Long id, final String accountNo, final String name, final String externalId, - final EnumOptionData status, final LocalDate activationDate, final Long officeId, final String officeName, final Long staffId, - final String staffName, final String hierarchy, final GroupTimelineData timeline, final CalendarData collectionMeetingCalendar, - final BigDecimal totalCollected, final BigDecimal totalOverdue, final BigDecimal totaldue, final BigDecimal installmentDue) { + final EnumOptionData status, final LocalDate activationDate, final Long officeId, final String officeName, final Long staffId, + final String staffName, final String hierarchy, final GroupTimelineData timeline, final CalendarData collectionMeetingCalendar, + final BigDecimal totalCollected, final BigDecimal totalOverdue, final BigDecimal totaldue, final BigDecimal installmentDue) { final Collection groupMembers = null; final Collection officeOptions = null; @@ -158,7 +159,7 @@ public static CenterData instance(final Long id, final String accountNo, final S } public static CenterData withAssociations(final CenterData centerData, final Collection groupMembers, - final CalendarData collectionMeetingCalendar) { + final CalendarData collectionMeetingCalendar) { return new CenterData(centerData.id, centerData.accountNo, centerData.name, centerData.externalId, centerData.status, centerData.activationDate, centerData.officeId, centerData.officeName, centerData.staffId, centerData.staffName, centerData.hierarchy, groupMembers, centerData.officeOptions, centerData.staffOptions, centerData.groupMembersOptions, @@ -194,11 +195,11 @@ public static CenterData withClosureReasons(final Collection clos } private CenterData(final Long id, final String accountNo, final String name, final String externalId, final EnumOptionData status, - final LocalDate activationDate, final Long officeId, final String officeName, final Long staffId, final String staffName, - final String hierarchy, final Collection groupMembers, final Collection officeOptions, - final Collection staffOptions, final Collection groupMembersOptions, - final CalendarData collectionMeetingCalendar, final Collection closureReasons, final GroupTimelineData timeline, - final BigDecimal totalCollected, final BigDecimal totalOverdue, final BigDecimal totaldue, final BigDecimal installmentDue) { + final LocalDate activationDate, final Long officeId, final String officeName, final Long staffId, final String staffName, + final String hierarchy, final Collection groupMembers, final Collection officeOptions, + final Collection staffOptions, final Collection groupMembersOptions, + final CalendarData collectionMeetingCalendar, final Collection closureReasons, final GroupTimelineData timeline, + final BigDecimal totalCollected, final BigDecimal totalOverdue, final BigDecimal totaldue, final BigDecimal installmentDue) { this.id = id; this.accountNo = accountNo; this.name = name; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/data/GroupGeneralData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/data/GroupGeneralData.java index a99fd76f466..4db1939b437 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/data/GroupGeneralData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/data/GroupGeneralData.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.Collection; import java.util.List; import java.util.Objects; + import lombok.Getter; import org.apache.commons.collections4.CollectionUtils; import org.apache.fineract.infrastructure.codes.data.CodeValueData; @@ -81,16 +82,16 @@ public class GroupGeneralData implements Serializable { private LocalDate submittedOnDate; public static GroupGeneralData importInstance(String groupName, List clientMembers, LocalDate activationDate, - LocalDate submittedOnDate, Boolean active, String externalId, Long officeId, Long staffId, Long centerId, Integer rowIndex, - String locale, String dateFormat) { + LocalDate submittedOnDate, Boolean active, String externalId, Long officeId, Long staffId, Long centerId, Integer rowIndex, + String locale, String dateFormat) { return new GroupGeneralData(groupName, clientMembers, activationDate, submittedOnDate, active, externalId, officeId, staffId, centerId, rowIndex, locale, dateFormat); } private GroupGeneralData(String name, List clientMembers, LocalDate activationDate, LocalDate submittedOnDate, - Boolean active, String externalId, Long officeId, Long staffId, Long centerId, Integer rowIndex, String locale, - String dateFormat) { + Boolean active, String externalId, Long officeId, Long staffId, Long centerId, Integer rowIndex, String locale, + String dateFormat) { this.dateFormat = dateFormat; this.locale = locale; this.name = name; @@ -212,9 +213,9 @@ public static GroupGeneralData lookup(final Long groupId, final String accountNo } public static GroupGeneralData template(final Long officeId, final Long centerId, final String accountNo, final String centerName, - final Long staffId, final String staffName, final Collection centerOptions, - final Collection officeOptions, final Collection staffOptions, - final Collection clientOptions, final Collection availableRoles) { + final Long staffId, final String staffName, final Collection centerOptions, + final Collection officeOptions, final Collection staffOptions, + final Collection clientOptions, final Collection availableRoles) { final Collection clientMembers = null; final Collection groupRoles = null; @@ -235,8 +236,8 @@ public static GroupGeneralData withTemplate(final GroupGeneralData templatedGrou } public static GroupGeneralData withAssocations(final GroupGeneralData grouping, final Collection membersOfGroup, - final Collection activeClientMembers, final Collection groupRoles, - final Collection calendarsData, final CalendarData collectionMeetingCalendar) { + final Collection activeClientMembers, final Collection groupRoles, + final Collection calendarsData, final CalendarData collectionMeetingCalendar) { return new GroupGeneralData(grouping.id, grouping.accountNo, grouping.name, grouping.externalId, grouping.status, grouping.activationDate, grouping.officeId, grouping.officeName, grouping.centerId, grouping.centerName, grouping.staffId, grouping.staffName, grouping.hierarchy, grouping.groupLevel, membersOfGroup, activeClientMembers, grouping.centerOptions, @@ -245,9 +246,9 @@ public static GroupGeneralData withAssocations(final GroupGeneralData grouping, } public static GroupGeneralData instance(final Long id, final String accountNo, final String name, final String externalId, - final EnumOptionData status, final LocalDate activationDate, final Long officeId, final String officeName, final Long centerId, - final String centerName, final Long staffId, final String staffName, final String hierarchy, final String groupLevel, - final GroupTimelineData timeline) { + final EnumOptionData status, final LocalDate activationDate, final Long officeId, final String officeName, final Long centerId, + final String centerName, final Long staffId, final String staffName, final String hierarchy, final String groupLevel, + final GroupTimelineData timeline) { final Collection clientMembers = null; final Collection activeClientMembers = null; @@ -268,14 +269,14 @@ public static GroupGeneralData instance(final Long id, final String accountNo, f } private GroupGeneralData(final Long id, final String accountNo, final String name, final String externalId, final EnumOptionData status, - final LocalDate activationDate, final Long officeId, final String officeName, final Long centerId, final String centerName, - final Long staffId, final String staffName, final String hierarchy, final String groupLevel, - final Collection clientMembers, final Collection activeClientMembers, - final Collection centerOptions, final Collection officeOptions, - final Collection staffOptions, final Collection clientOptions, - final Collection groupRoles, final Collection availableRoles, final GroupRoleData role, - final Collection calendarsData, final CalendarData collectionMeetingCalendar, - final Collection closureReasons, final GroupTimelineData timeline) { + final LocalDate activationDate, final Long officeId, final String officeName, final Long centerId, final String centerName, + final Long staffId, final String staffName, final String hierarchy, final String groupLevel, + final Collection clientMembers, final Collection activeClientMembers, + final Collection centerOptions, final Collection officeOptions, + final Collection staffOptions, final Collection clientOptions, + final Collection groupRoles, final Collection availableRoles, final GroupRoleData role, + final Collection calendarsData, final CalendarData collectionMeetingCalendar, + final Collection closureReasons, final GroupTimelineData timeline) { this.id = id; this.accountNo = accountNo; this.name = name; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/data/GroupRoleData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/data/GroupRoleData.java index 4ea41d4d5cf..c9de32aac22 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/data/GroupRoleData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/data/GroupRoleData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.group.data; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.Getter; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/data/GroupTimelineData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/data/GroupTimelineData.java index e6f65fea637..002ffc7d12a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/data/GroupTimelineData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/data/GroupTimelineData.java @@ -6,9 +6,9 @@ * 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 @@ -45,9 +45,9 @@ public class GroupTimelineData implements Serializable { private final String closedByLastname; public GroupTimelineData(final LocalDate submittedOnDate, final String submittedByUsername, final String submittedByFirstname, - final String submittedByLastname, final LocalDate activatedOnDate, final String activatedByUsername, - final String activatedByFirstname, final String activatedByLastname, final LocalDate closedOnDate, - final String closedByUsername, final String closedByFirstname, final String closedByLastname) { + final String submittedByLastname, final LocalDate activatedOnDate, final String activatedByUsername, + final String activatedByFirstname, final String activatedByLastname, final LocalDate closedOnDate, + final String closedByUsername, final String closedByFirstname, final String closedByLastname) { this.submittedOnDate = submittedOnDate; this.submittedByUsername = submittedByUsername; this.submittedByFirstname = submittedByFirstname; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/Group.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/Group.java index a03593cd5cc..88d7ee2a479 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/Group.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/Group.java @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToMany; import jakarta.persistence.Table; + import java.time.LocalDate; import java.util.ArrayList; import java.util.HashSet; @@ -35,6 +36,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.Getter; import lombok.Setter; import org.apache.commons.lang3.StringUtils; @@ -144,8 +146,8 @@ public final class Group extends AbstractPersistableCustom { } public static Group newGroup(final Office office, final Staff staff, final Group parent, final GroupLevel groupLevel, final String name, - final String externalId, final boolean active, final LocalDate activationDate, final Set clientMembers, - final Set groupMembers, final LocalDate submittedOnDate, final AppUser currentUser, final String accountNo) { + final String externalId, final boolean active, final LocalDate activationDate, final Set clientMembers, + final Set groupMembers, final LocalDate submittedOnDate, final AppUser currentUser, final String accountNo) { // By default new group is created in PENDING status, unless explicitly // status is set to active @@ -161,8 +163,8 @@ public static Group newGroup(final Office office, final Staff staff, final Group } private Group(final Office office, final Staff staff, final Group parent, final GroupLevel groupLevel, final String name, - final String externalId, final GroupingTypeStatus status, final LocalDate activationDate, final Set clientMembers, - final Set groupMembers, final LocalDate submittedOnDate, final AppUser currentUser, final String accountNo) { + final String externalId, final GroupingTypeStatus status, final LocalDate activationDate, final Set clientMembers, + final Set groupMembers, final LocalDate submittedOnDate, final AppUser currentUser, final String accountNo) { final List dataValidationErrors = new ArrayList<>(); @@ -216,7 +218,7 @@ private Group(final Office office, final Staff staff, final Group parent, final } private void setStatus(final LocalDate activationDate, final AppUser loginUser, final GroupingTypeStatus status, - final List dataValidationErrors) { + final List dataValidationErrors) { if (status.isActive()) { activate(loginUser, activationDate, dataValidationErrors); @@ -227,7 +229,7 @@ private void setStatus(final LocalDate activationDate, final AppUser loginUser, } private void activate(final AppUser currentUser, final LocalDate activationLocalDate, - final List dataValidationErrors) { + final List dataValidationErrors) { validateStatusNotEqualToActiveAndLogError(dataValidationErrors); if (dataValidationErrors.isEmpty()) { @@ -250,7 +252,7 @@ public void activate(final AppUser currentUser, final LocalDate activationLocalD } private void setActivationDate(final LocalDate activationDate, final AppUser loginUser, - final List dataValidationErrors) { + final List dataValidationErrors) { if (activationDate != null) { this.activationDate = activationDate; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/GroupLevel.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/GroupLevel.java index 2f014d34120..d5d2aaf040f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/GroupLevel.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/GroupLevel.java @@ -6,9 +6,9 @@ * 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 @@ -53,7 +53,7 @@ public GroupLevel() { } public GroupLevel(final Long parentId, final boolean isSuperParent, final String levelName, final boolean recursable, - final boolean canHaveClients) { + final boolean canHaveClients) { this.superParent = isSuperParent; this.parentId = parentId; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRole.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRole.java index d6b2ab10e72..a83d53b7966 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRole.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRole.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.util.LinkedHashMap; import java.util.Map; + import org.apache.fineract.infrastructure.codes.domain.CodeValue; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/GroupingTypeEnumerations.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/GroupingTypeEnumerations.java index 6b31c5170a8..5c22005c784 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/GroupingTypeEnumerations.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/GroupingTypeEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -37,27 +37,27 @@ public static EnumOptionData status(final GroupingTypeStatus status) { case INVALID: optionData = new EnumOptionData(GroupingTypeStatus.INVALID.getValue().longValue(), GroupingTypeStatus.INVALID.getCode(), "Invalid"); - break; + break; case PENDING: optionData = new EnumOptionData(GroupingTypeStatus.PENDING.getValue().longValue(), GroupingTypeStatus.PENDING.getCode(), "Pending"); - break; + break; case ACTIVE: optionData = new EnumOptionData(GroupingTypeStatus.ACTIVE.getValue().longValue(), GroupingTypeStatus.ACTIVE.getCode(), "Active"); - break; + break; case CLOSED: optionData = new EnumOptionData(GroupingTypeStatus.CLOSED.getValue().longValue(), GroupingTypeStatus.CLOSED.getCode(), "Closed"); - break; + break; case TRANSFER_IN_PROGRESS: optionData = new EnumOptionData(GroupingTypeStatus.TRANSFER_IN_PROGRESS.getValue().longValue(), GroupingTypeStatus.TRANSFER_IN_PROGRESS.getCode(), "Transfer in progress"); - break; + break; case TRANSFER_ON_HOLD: optionData = new EnumOptionData(GroupingTypeStatus.TRANSFER_ON_HOLD.getValue().longValue(), GroupingTypeStatus.TRANSFER_ON_HOLD.getCode(), "Transfer on hold"); - break; + break; } return optionData; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/GroupingTypeStatus.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/GroupingTypeStatus.java index 091b19e191e..c8a145ec560 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/GroupingTypeStatus.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/GroupingTypeStatus.java @@ -6,9 +6,9 @@ * 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 @@ -39,19 +39,19 @@ public static GroupingTypeStatus fromInt(final Integer statusValue) { switch (statusValue) { case 100: enumeration = GroupingTypeStatus.PENDING; - break; + break; case 300: enumeration = GroupingTypeStatus.ACTIVE; - break; + break; case 303: enumeration = GroupingTypeStatus.TRANSFER_IN_PROGRESS; - break; + break; case 304: enumeration = GroupingTypeStatus.TRANSFER_ON_HOLD; - break; + break; case 600: enumeration = GroupingTypeStatus.CLOSED; - break; + break; } return enumeration; } diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/StaffAssignmentHistory.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/StaffAssignmentHistory.java index 373bfe10310..5939ab6b823 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/StaffAssignmentHistory.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/domain/StaffAssignmentHistory.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.domain.AbstractAuditableCustom; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.organisation.staff.domain.Staff; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/ClientExistInGroupException.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/ClientExistInGroupException.java index 92e90b99182..22f1da943cc 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/ClientExistInGroupException.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/ClientExistInGroupException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/ClientNotInGroupException.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/ClientNotInGroupException.java index 29c1b528d9e..cc1685e153a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/ClientNotInGroupException.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/ClientNotInGroupException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/GroupExistsInCenterException.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/GroupExistsInCenterException.java index b5b62e0f8bd..74c26fbb859 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/GroupExistsInCenterException.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/GroupExistsInCenterException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/GroupNotActiveException.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/GroupNotActiveException.java index 024495ede3b..a10986b8a65 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/GroupNotActiveException.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/GroupNotActiveException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/GroupNotExistsInCenterException.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/GroupNotExistsInCenterException.java index b5e355e524e..9ffdeef93d1 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/GroupNotExistsInCenterException.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/GroupNotExistsInCenterException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/InvalidGroupStateTransitionException.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/InvalidGroupStateTransitionException.java index 65082c8c964..6d93fee3546 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/InvalidGroupStateTransitionException.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/group/exception/InvalidGroupStateTransitionException.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,7 @@ public class InvalidGroupStateTransitionException extends AbstractPlatformDomainRuleException { public InvalidGroupStateTransitionException(final String levelName, final String action, final String postFix, - final String defaultUserMessage, final Object... defaultUserMessageArgs) { + final String defaultUserMessage, final Object... defaultUserMessageArgs) { super("error.msg." + levelName + "." + action + "." + postFix, defaultUserMessage, defaultUserMessageArgs); } diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/ExpectedDisbursementDateValidator.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/ExpectedDisbursementDateValidator.java index 8a169bb31be..a956ff7d7f9 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/ExpectedDisbursementDateValidator.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/ExpectedDisbursementDateValidator.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanStatus.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanStatus.java index f8e8efe3815..0760f5ce0bc 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanStatus.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanStatus.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceCommon.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceCommon.java index 985c0b08398..c9081e5c456 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceCommon.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformServiceCommon.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorData.java index d19e762d42d..004f8aec476 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteCreateRequest.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteCreateRequest.java index b5e7edfed92..a329519f1d7 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteCreateRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteCreateRequest.java @@ -6,9 +6,9 @@ * 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 @@ -21,8 +21,10 @@ import io.swagger.v3.oas.annotations.Hidden; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteCreateResponse.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteCreateResponse.java index 403a50a6db5..c482de34417 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteCreateResponse.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteCreateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteData.java index 6f998732a89..7ce3d75f95d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.time.OffsetDateTime; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteDeleteRequest.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteDeleteRequest.java index 6ef1049587a..07914cb51e5 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteDeleteRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteDeleteRequest.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.portfolio.note.data; import io.swagger.v3.oas.annotations.Hidden; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteDeleteResponse.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteDeleteResponse.java index cfae896ab01..0a3b7ac3c8d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteDeleteResponse.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteDeleteResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteUpdateRequest.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteUpdateRequest.java index bca0cec30fb..19ff5c4ddc0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteUpdateRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteUpdateRequest.java @@ -6,9 +6,9 @@ * 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 @@ -21,8 +21,10 @@ import io.swagger.v3.oas.annotations.Hidden; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteUpdateResponse.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteUpdateResponse.java index 5ddf70056bf..d0a20df1940 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteUpdateResponse.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/data/NoteUpdateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.util.Map; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/domain/NoteType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/domain/NoteType.java index 19710b3bbca..8ad8afb4399 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/domain/NoteType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/domain/NoteType.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Map; import java.util.stream.Collectors; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; public enum NoteType { diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/service/NoteReadPlatformService.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/service/NoteReadPlatformService.java index b2dfd5c3a3c..f5a4e74fd2d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/service/NoteReadPlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/service/NoteReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.note.service; import java.util.List; + import org.apache.fineract.portfolio.note.data.NoteData; public interface NoteReadPlatformService { diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/service/NoteWritePlatformService.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/service/NoteWritePlatformService.java index 6db5a9fc623..2cba88e7a7e 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/note/service/NoteWritePlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/note/service/NoteWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/PaymentDetailConstants.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/PaymentDetailConstants.java index 8bcbe11d067..53c2a4d796d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/PaymentDetailConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/PaymentDetailConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/domain/PaymentDetail.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/domain/PaymentDetail.java index d7c34206efb..fe882ce2824 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/domain/PaymentDetail.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/domain/PaymentDetail.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.util.Map; + import lombok.Getter; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -57,10 +59,11 @@ public class PaymentDetail extends AbstractPersistableCustom { @Column(name = "bank_number", length = 50) private String bankNumber; - protected PaymentDetail() {} + protected PaymentDetail() { + } public static PaymentDetail generatePaymentDetail(final PaymentType paymentType, final JsonCommand command, - final Map changes) { + final Map changes) { final String accountNumber = command.stringValueOfParameterNamed(PaymentDetailConstants.accountNumberParamName); final String checkNumber = command.stringValueOfParameterNamed(PaymentDetailConstants.checkNumberParamName); final String routingCode = command.stringValueOfParameterNamed(PaymentDetailConstants.routingCodeParamName); @@ -87,12 +90,12 @@ public static PaymentDetail generatePaymentDetail(final PaymentType paymentType, } public static PaymentDetail instance(final PaymentType paymentType, final String accountNumber, final String checkNumber, - final String routingCode, final String receiptNumber, final String bankNumber) { + final String routingCode, final String receiptNumber, final String bankNumber) { return new PaymentDetail(paymentType, accountNumber, checkNumber, routingCode, receiptNumber, bankNumber); } private PaymentDetail(final PaymentType paymentType, final String accountNumber, final String checkNumber, final String routingCode, - final String receiptNumber, final String bankNumber) { + final String receiptNumber, final String bankNumber) { this.paymentType = paymentType; this.accountNumber = accountNumber; this.checkNumber = checkNumber; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/domain/PaymentDetailAssembler.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/domain/PaymentDetailAssembler.java index 8a2af56c4e3..2abe6accdd9 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/domain/PaymentDetailAssembler.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/domain/PaymentDetailAssembler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/domain/PaymentDetailRepository.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/domain/PaymentDetailRepository.java index 1f0126b034b..3bc7ba1a64c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/domain/PaymentDetailRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/domain/PaymentDetailRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/service/PaymentDetailWritePlatformService.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/service/PaymentDetailWritePlatformService.java index 548d269c226..30621a6c9d0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/service/PaymentDetailWritePlatformService.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/service/PaymentDetailWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.paymentdetail.service; import java.util.Map; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/service/PaymentDetailWritePlatformServiceJpaRepositoryImpl.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/service/PaymentDetailWritePlatformServiceJpaRepositoryImpl.java index a2dcd45f360..9e029c65f9d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/service/PaymentDetailWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymentdetail/service/PaymentDetailWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.paymentdetail.service; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.portfolio.paymentdetail.PaymentDetailConstants; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/command/PaymentTypeCreateCommand.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/command/PaymentTypeCreateCommand.java index dc6d98a7669..8569a36fae6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/command/PaymentTypeCreateCommand.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/command/PaymentTypeCreateCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class PaymentTypeCreateCommand extends Command {} +public class PaymentTypeCreateCommand extends Command { +} diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/command/PaymentTypeDeleteCommand.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/command/PaymentTypeDeleteCommand.java index dc251e713ba..f683fa593d1 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/command/PaymentTypeDeleteCommand.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/command/PaymentTypeDeleteCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class PaymentTypeDeleteCommand extends Command {} +public class PaymentTypeDeleteCommand extends Command { +} diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/command/PaymentTypeUpdateCommand.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/command/PaymentTypeUpdateCommand.java index 48fdf2b6182..70d296d9a81 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/command/PaymentTypeUpdateCommand.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/command/PaymentTypeUpdateCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class PaymentTypeUpdateCommand extends Command {} +public class PaymentTypeUpdateCommand extends Command { +} diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeCreateRequest.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeCreateRequest.java index c87363c428d..ecc7934a2c3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeCreateRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeCreateRequest.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,10 @@ import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.PositiveOrZero; import jakarta.validation.constraints.Size; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeCreateResponse.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeCreateResponse.java index 28b2c9b8351..8d0ebc00ce0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeCreateResponse.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeCreateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeData.java index 2af1b04aac1..75e88a3dfab 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeDeleteRequest.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeDeleteRequest.java index 44d4a2eeda0..69b44b2fba1 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeDeleteRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeDeleteRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeDeleteResponse.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeDeleteResponse.java index 89c6072f0c9..2c7eca306d7 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeDeleteResponse.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeDeleteResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeUpdateRequest.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeUpdateRequest.java index 9163a22037f..43a8b0c1408 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeUpdateRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeUpdateRequest.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.PositiveOrZero; import jakarta.validation.constraints.Size; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeUpdateResponse.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeUpdateResponse.java index 6a112043dff..d4eb55c3349 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeUpdateResponse.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/data/PaymentTypeUpdateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/domain/PaymentType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/domain/PaymentType.java index 2305cdd81d8..7ea81a24174 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/domain/PaymentType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/domain/PaymentType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/domain/PaymentTypeRepository.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/domain/PaymentTypeRepository.java index eaa8ed285f2..7454b9dba9d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/domain/PaymentTypeRepository.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/domain/PaymentTypeRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.paymenttype.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/domain/PaymentTypeRepositoryWrapper.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/domain/PaymentTypeRepositoryWrapper.java index e0d77bc5575..fad04977b01 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/domain/PaymentTypeRepositoryWrapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/domain/PaymentTypeRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/exception/PaymentTypeNotFoundException.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/exception/PaymentTypeNotFoundException.java index 56da3cf8548..5f84e8f6ac3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/exception/PaymentTypeNotFoundException.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/exception/PaymentTypeNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/PaymentTypeCreateCommandHandler.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/PaymentTypeCreateCommandHandler.java index e7604f6e88f..600d1156814 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/PaymentTypeCreateCommandHandler.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/PaymentTypeCreateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/PaymentTypeDeleteCommandHandler.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/PaymentTypeDeleteCommandHandler.java index 9c1e9d05075..c4ac75c0e06 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/PaymentTypeDeleteCommandHandler.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/PaymentTypeDeleteCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/PaymentTypeUpdateCommandHandler.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/PaymentTypeUpdateCommandHandler.java index 41914c9e52a..6365ef5cabb 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/PaymentTypeUpdateCommandHandler.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/handler/PaymentTypeUpdateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/mapper/PaymentTypeCreateRequestMapper.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/mapper/PaymentTypeCreateRequestMapper.java index db83e4c0580..57ebfe40ff9 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/mapper/PaymentTypeCreateRequestMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/mapper/PaymentTypeCreateRequestMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/mapper/PaymentTypeMapper.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/mapper/PaymentTypeMapper.java index 7a42d5b18f8..776d9bf83da 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/mapper/PaymentTypeMapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/mapper/PaymentTypeMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.paymenttype.mapper; import java.util.List; + import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData; import org.apache.fineract.portfolio.paymenttype.domain.PaymentType; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/service/PaymentTypeReadService.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/service/PaymentTypeReadService.java index 7a3e3edd7e4..62265ac324f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/service/PaymentTypeReadService.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/service/PaymentTypeReadService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.paymenttype.service; import java.util.List; + import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData; public interface PaymentTypeReadService { diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/service/PaymentTypeReadServiceImpl.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/service/PaymentTypeReadServiceImpl.java index 1100a59f019..78811d5aa42 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/service/PaymentTypeReadServiceImpl.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/service/PaymentTypeReadServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.paymenttype.service; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData; import org.apache.fineract.portfolio.paymenttype.domain.PaymentTypeRepository; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/service/PaymentTypeWriteService.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/service/PaymentTypeWriteService.java index 2d57959fd4f..79c1e3e2903 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/service/PaymentTypeWriteService.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/service/PaymentTypeWriteService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/service/PaymentTypeWriteServiceImpl.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/service/PaymentTypeWriteServiceImpl.java index b024be380f6..f6abac9a081 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/service/PaymentTypeWriteServiceImpl.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/service/PaymentTypeWriteServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.portfolio.paymenttype.service; import jakarta.validation.Valid; + import java.util.Objects; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.Strings; import org.apache.fineract.infrastructure.core.exception.ErrorHandler; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/starter/PaymentTypeConfiguration.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/starter/PaymentTypeConfiguration.java index 2f71ed94f54..f4a72b376ba 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/starter/PaymentTypeConfiguration.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/paymenttype/starter/PaymentTypeConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/rate/data/RateData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/rate/data/RateData.java index 48bb96da782..9f904c2c1b3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/rate/data/RateData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/rate/data/RateData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serializable; import java.math.BigDecimal; + import lombok.Getter; import org.apache.fineract.infrastructure.core.data.EnumOptionData; @@ -41,12 +42,12 @@ public final class RateData implements Serializable { private boolean active; public static RateData instance(final Long id, final String name, final BigDecimal percentage, final EnumOptionData productApply, - final boolean active) { + final boolean active) { return new RateData(id, name, percentage, productApply, active); } private RateData(final Long id, final String name, final BigDecimal percentage, final EnumOptionData productApply, - final boolean active) { + final boolean active) { this.id = id; this.name = name; this.percentage = percentage; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/rate/domain/Rate.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/rate/domain/Rate.java index 8e9744dc47d..ecb5d708ca8 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/rate/domain/Rate.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/rate/domain/Rate.java @@ -6,9 +6,9 @@ * 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 @@ -25,9 +25,11 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.math.BigDecimal; import java.util.LinkedHashMap; import java.util.Map; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.domain.AbstractAuditableCustom; @@ -39,7 +41,7 @@ */ @Entity -@Table(name = "m_rate", uniqueConstraints = { @UniqueConstraint(columnNames = { "name" }, name = "name") }) +@Table(name = "m_rate", uniqueConstraints = {@UniqueConstraint(columnNames = {"name"}, name = "name")}) public class Rate extends AbstractAuditableCustom { @Column(name = "name", length = 250, unique = true) @@ -58,7 +60,8 @@ public class Rate extends AbstractAuditableCustom { @JoinColumn(name = "approve_user", nullable = true) private AppUser approveUser; - public Rate() {} + public Rate() { + } public Rate(String name, BigDecimal percentage, RateAppliesTo productApply, boolean active, AppUser approveUser) { this.name = name; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/rate/domain/RateAppliesTo.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/rate/domain/RateAppliesTo.java index 0801751807c..eed04720700 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/rate/domain/RateAppliesTo.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/rate/domain/RateAppliesTo.java @@ -6,9 +6,9 @@ * 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 @@ -47,10 +47,10 @@ public static RateAppliesTo fromInt(final Integer rateAppliesTo) { switch (rateAppliesTo) { case 1: rateAppliesToType = LOAN; - break; + break; default: rateAppliesToType = INVALID; - break; + break; } } @@ -62,6 +62,6 @@ public boolean isLoanRate() { } public static Object[] validValues() { - return new Object[] { RateAppliesTo.LOAN.getValue() }; + return new Object[]{RateAppliesTo.LOAN.getValue()}; } } diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountOnClosureType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountOnClosureType.java index aed14dcc948..f535c413d58 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountOnClosureType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountOnClosureType.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.savings; import java.util.Arrays; + import lombok.Getter; /** diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountOnHoldTransactionType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountOnHoldTransactionType.java index e1a0d84aa2e..1c97c3b10b0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountOnHoldTransactionType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountOnHoldTransactionType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountType.java index 3c229c7552f..0e0d9b24133 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/DepositAccountType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/DepositsApiConstants.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/DepositsApiConstants.java index 0f44056280e..9fc132e629a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/DepositsApiConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/DepositsApiConstants.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.HashSet; import java.util.Set; + import org.apache.fineract.accounting.common.AccountingConstants.SavingProductAccountingParams; public final class DepositsApiConstants { diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/PreClosurePenalInterestOnType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/PreClosurePenalInterestOnType.java index 2a624aca01b..d0d3488aa3f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/PreClosurePenalInterestOnType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/PreClosurePenalInterestOnType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/RecurringDepositType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/RecurringDepositType.java index b0cca67892a..44df3a46f64 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/RecurringDepositType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/RecurringDepositType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsAccountTransactionType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsAccountTransactionType.java index 0dac31dbb83..87bbdd5e806 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsAccountTransactionType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsAccountTransactionType.java @@ -6,9 +6,9 @@ * 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 @@ -19,11 +19,13 @@ package org.apache.fineract.portfolio.savings; import jakarta.validation.constraints.NotNull; + import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.function.Predicate; import java.util.stream.Collectors; + import lombok.Getter; import org.apache.fineract.portfolio.TransactionEntryType; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsApiConstants.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsApiConstants.java index 605a185d8c0..26ffe838ca0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsApiConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsApiConstants.java @@ -6,9 +6,9 @@ * 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 @@ -18,7 +18,7 @@ */ package org.apache.fineract.portfolio.savings; -@SuppressWarnings({ "HideUtilityClassConstructor" }) +@SuppressWarnings({"HideUtilityClassConstructor"}) public class SavingsApiConstants { public static final String SAVINGS_PRODUCT_RESOURCE_NAME = "savingsproduct"; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsCompoundingInterestPeriodType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsCompoundingInterestPeriodType.java index 5d80b83defa..ba55150d1a3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsCompoundingInterestPeriodType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsCompoundingInterestPeriodType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsInterestCalculationDaysInYearType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsInterestCalculationDaysInYearType.java index 778ecd0df14..228aab6dc58 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsInterestCalculationDaysInYearType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsInterestCalculationDaysInYearType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsInterestCalculationType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsInterestCalculationType.java index b03ed829fe3..f03e50d2f53 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsInterestCalculationType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsInterestCalculationType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsPeriodFrequencyType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsPeriodFrequencyType.java index ec882cf8da3..172a73434dd 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsPeriodFrequencyType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsPeriodFrequencyType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsPostingInterestPeriodType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsPostingInterestPeriodType.java index d6508e41f6b..ed772831e2f 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsPostingInterestPeriodType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsPostingInterestPeriodType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsWithdrawalFeesType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsWithdrawalFeesType.java index 2891fac722e..bce76f49948 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsWithdrawalFeesType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/SavingsWithdrawalFeesType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountApplicationTimelineData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountApplicationTimelineData.java index 2780359b8d4..7a7624f531a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountApplicationTimelineData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountApplicationTimelineData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.time.LocalDate; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.jersey.serializer.legacy.JsonLocalDateArrayFormat; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountChargeData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountChargeData.java index a6abde2e5a8..bd40c15902b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountChargeData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountChargeData.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.LocalDate; import java.time.MonthDay; import java.util.Collection; + import lombok.Getter; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.jersey.serializer.legacy.JsonLocalDateArrayFormat; @@ -157,13 +158,13 @@ public static SavingsAccountChargeData template(final Collection cha } public static SavingsAccountChargeData instance(final Long id, final Long chargeId, final Long accountId, final String name, - final CurrencyData currency, final BigDecimal amount, final BigDecimal amountPaid, final BigDecimal amountWaived, - final BigDecimal amountWrittenOff, final BigDecimal amountOutstanding, final EnumOptionData chargeTimeType, - final LocalDate dueAsOfDate, final EnumOptionData chargeCalculationType, final BigDecimal percentage, - final BigDecimal amountPercentageAppliedTo, final Collection chargeOptions, final boolean penalty, - final MonthDay feeOnMonthDay, final Integer feeInterval, final Boolean isActive, final Boolean isFreeWithdrawal, - final Integer freeWithdrawalChargeFrequency, final Integer restartFrequency, final Integer restartFrequencyEnum, - final LocalDate inactivationDate) { + final CurrencyData currency, final BigDecimal amount, final BigDecimal amountPaid, final BigDecimal amountWaived, + final BigDecimal amountWrittenOff, final BigDecimal amountOutstanding, final EnumOptionData chargeTimeType, + final LocalDate dueAsOfDate, final EnumOptionData chargeCalculationType, final BigDecimal percentage, + final BigDecimal amountPercentageAppliedTo, final Collection chargeOptions, final boolean penalty, + final MonthDay feeOnMonthDay, final Integer feeInterval, final Boolean isActive, final Boolean isFreeWithdrawal, + final Integer freeWithdrawalChargeFrequency, final Integer restartFrequency, final Integer restartFrequencyEnum, + final LocalDate inactivationDate) { return new SavingsAccountChargeData(id, chargeId, accountId, name, chargeTimeType, dueAsOfDate, chargeCalculationType, percentage, amountPercentageAppliedTo, currency, amount, amountPaid, amountWaived, amountWrittenOff, amountOutstanding, chargeOptions, @@ -176,13 +177,13 @@ public boolean isFeeCharge() { } private SavingsAccountChargeData(final Long id, final Long chargeId, final Long accountId, final String name, - final EnumOptionData chargeTimeType, final LocalDate dueAsOfDate, final EnumOptionData chargeCalculationType, - final BigDecimal percentage, final BigDecimal amountPercentageAppliedTo, final CurrencyData currency, final BigDecimal amount, - final BigDecimal amountPaid, final BigDecimal amountWaived, final BigDecimal amountWrittenOff, - final BigDecimal amountOutstanding, final Collection chargeOptions, final boolean penalty, - final MonthDay feeOnMonthDay, final Integer feeInterval, final Boolean isActive, final Boolean isFreeWithdrawal, - final Integer freeWithdrawalChargeFrequency, final Integer restartFrequency, final Integer restartFrequencyEnum, - final LocalDate inactivationDate) { + final EnumOptionData chargeTimeType, final LocalDate dueAsOfDate, final EnumOptionData chargeCalculationType, + final BigDecimal percentage, final BigDecimal amountPercentageAppliedTo, final CurrencyData currency, final BigDecimal amount, + final BigDecimal amountPaid, final BigDecimal amountWaived, final BigDecimal amountWrittenOff, + final BigDecimal amountOutstanding, final Collection chargeOptions, final boolean penalty, + final MonthDay feeOnMonthDay, final Integer feeInterval, final Boolean isActive, final Boolean isFreeWithdrawal, + final Integer freeWithdrawalChargeFrequency, final Integer restartFrequency, final Integer restartFrequencyEnum, + final LocalDate inactivationDate) { this.id = id; this.chargeId = chargeId; this.accountId = accountId; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountData.java index 6733c2325f8..69a5ab0fd6a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountData.java @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import java.util.List; import java.util.Locale; import java.util.Set; + import lombok.Getter; import lombok.Setter; import org.apache.commons.lang3.builder.EqualsBuilder; @@ -155,12 +156,12 @@ public final class SavingsAccountData implements Serializable { private BigDecimal overdraftPosting; public static SavingsAccountData importInstanceIndividual(Long clientId, Long productId, Long fieldOfficerId, LocalDate submittedOnDate, - BigDecimal nominalAnnualInterestRate, EnumOptionData interestCompoundingPeriodTypeEnum, - EnumOptionData interestPostingPeriodTypeEnum, EnumOptionData interestCalculationTypeEnum, - EnumOptionData interestCalculationDaysInYearTypeEnum, BigDecimal minRequiredOpeningBalance, Integer lockinPeriodFrequency, - EnumOptionData lockinPeriodFrequencyTypeEnum, boolean applyWithdrawalFeeForTransfers, Integer rowIndex, String externalId, - Collection charges, boolean allowOverdraft, BigDecimal overdraftLimit, String locale, - String dateFormat) { + BigDecimal nominalAnnualInterestRate, EnumOptionData interestCompoundingPeriodTypeEnum, + EnumOptionData interestPostingPeriodTypeEnum, EnumOptionData interestCalculationTypeEnum, + EnumOptionData interestCalculationDaysInYearTypeEnum, BigDecimal minRequiredOpeningBalance, Integer lockinPeriodFrequency, + EnumOptionData lockinPeriodFrequencyTypeEnum, boolean applyWithdrawalFeeForTransfers, Integer rowIndex, String externalId, + Collection charges, boolean allowOverdraft, BigDecimal overdraftLimit, String locale, + String dateFormat) { return new SavingsAccountData(clientId, productId, fieldOfficerId, submittedOnDate, nominalAnnualInterestRate, interestCompoundingPeriodTypeEnum, interestPostingPeriodTypeEnum, interestCalculationTypeEnum, interestCalculationDaysInYearTypeEnum, minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyTypeEnum, @@ -169,11 +170,11 @@ public static SavingsAccountData importInstanceIndividual(Long clientId, Long pr } private SavingsAccountData(Long clientId, Long productId, Long fieldOfficerId, LocalDate submittedOnDate, - BigDecimal nominalAnnualInterestRate, EnumOptionData interestCompoundingPeriodType, EnumOptionData interestPostingPeriodType, - EnumOptionData interestCalculationType, EnumOptionData interestCalculationDaysInYearType, BigDecimal minRequiredOpeningBalance, - Integer lockinPeriodFrequency, EnumOptionData lockinPeriodFrequencyType, boolean withdrawalFeeForTransfers, Integer rowIndex, - String externalId, Collection charges, boolean allowOverdraft, BigDecimal overdraftLimit, - String locale, String dateFormat) { + BigDecimal nominalAnnualInterestRate, EnumOptionData interestCompoundingPeriodType, EnumOptionData interestPostingPeriodType, + EnumOptionData interestCalculationType, EnumOptionData interestCalculationDaysInYearType, BigDecimal minRequiredOpeningBalance, + Integer lockinPeriodFrequency, EnumOptionData lockinPeriodFrequencyType, boolean withdrawalFeeForTransfers, Integer rowIndex, + String externalId, Collection charges, boolean allowOverdraft, BigDecimal overdraftLimit, + String locale, String dateFormat) { this.id = null; this.accountNo = null; this.depositType = null; @@ -308,7 +309,7 @@ public void setGlAccountIdForInterestOnSavings(final Long glAccountIdForInterest } public void setHelpers(final SavingsAccountTransactionDataSummaryWrapper savingsAccountTransactionSummaryWrapper, - final SavingsHelper savingsHelper) { + final SavingsHelper savingsHelper) { this.savingsAccountTransactionSummaryWrapper = savingsAccountTransactionSummaryWrapper; this.savingsHelper = savingsHelper; } @@ -414,12 +415,12 @@ public Boolean isCashBasedAccountingEnabledOnSavingsProduct() { } public static SavingsAccountData importInstanceGroup(Long groupId, Long productId, Long fieldOfficerId, LocalDate submittedOnDate, - BigDecimal nominalAnnualInterestRate, EnumOptionData interestCompoundingPeriodTypeEnum, - EnumOptionData interestPostingPeriodTypeEnum, EnumOptionData interestCalculationTypeEnum, - EnumOptionData interestCalculationDaysInYearTypeEnum, BigDecimal minRequiredOpeningBalance, Integer lockinPeriodFrequency, - EnumOptionData lockinPeriodFrequencyTypeEnum, boolean applyWithdrawalFeeForTransfers, Integer rowIndex, String externalId, - Collection charges, boolean allowOverdraft, BigDecimal overdraftLimit, String locale, - String dateFormat) { + BigDecimal nominalAnnualInterestRate, EnumOptionData interestCompoundingPeriodTypeEnum, + EnumOptionData interestPostingPeriodTypeEnum, EnumOptionData interestCalculationTypeEnum, + EnumOptionData interestCalculationDaysInYearTypeEnum, BigDecimal minRequiredOpeningBalance, Integer lockinPeriodFrequency, + EnumOptionData lockinPeriodFrequencyTypeEnum, boolean applyWithdrawalFeeForTransfers, Integer rowIndex, String externalId, + Collection charges, boolean allowOverdraft, BigDecimal overdraftLimit, String locale, + String dateFormat) { return new SavingsAccountData(groupId, productId, fieldOfficerId, submittedOnDate, nominalAnnualInterestRate, interestCompoundingPeriodTypeEnum, interestPostingPeriodTypeEnum, interestCalculationTypeEnum, @@ -429,11 +430,11 @@ public static SavingsAccountData importInstanceGroup(Long groupId, Long productI } private SavingsAccountData(Long groupId, Long productId, Long fieldOfficerId, LocalDate submittedOnDate, - BigDecimal nominalAnnualInterestRate, EnumOptionData interestCompoundingPeriodType, EnumOptionData interestPostingPeriodType, - EnumOptionData interestCalculationType, EnumOptionData interestCalculationDaysInYearType, BigDecimal minRequiredOpeningBalance, - Integer lockinPeriodFrequency, EnumOptionData lockinPeriodFrequencyType, boolean withdrawalFeeForTransfers, Integer rowIndex, - String externalId, Collection charges, boolean allowOverdraft, BigDecimal overdraftLimit, Long id, - String locale, String dateFormat) { + BigDecimal nominalAnnualInterestRate, EnumOptionData interestCompoundingPeriodType, EnumOptionData interestPostingPeriodType, + EnumOptionData interestCalculationType, EnumOptionData interestCalculationDaysInYearType, BigDecimal minRequiredOpeningBalance, + Integer lockinPeriodFrequency, EnumOptionData lockinPeriodFrequencyType, boolean withdrawalFeeForTransfers, Integer rowIndex, + String externalId, Collection charges, boolean allowOverdraft, BigDecimal overdraftLimit, Long id, + String locale, String dateFormat) { this.id = id; this.accountNo = null; this.depositType = null; @@ -501,20 +502,20 @@ private SavingsAccountData(Long groupId, Long productId, Long fieldOfficerId, Lo } public static SavingsAccountData instance(final Long id, final String accountNo, final EnumOptionData depositType, - final String externalId, final Long groupId, final String groupName, final Long clientId, final String clientName, - final Long productId, final String productName, final Long fieldOfficerId, final String fieldOfficerName, - final SavingsAccountStatusEnumData status, SavingsAccountSubStatusEnumData subStatus, final String reasonForBlock, - final SavingsAccountApplicationTimelineData timeline, final CurrencyData currency, final BigDecimal interestRate, - final EnumOptionData interestCompoundingPeriodType, final EnumOptionData interestPostingPeriodType, - final EnumOptionData interestCalculationType, final EnumOptionData interestCalculationDaysInYearType, - final BigDecimal minRequiredOpeningBalance, final Integer lockinPeriodFrequency, final EnumOptionData lockinPeriodFrequencyType, - final boolean withdrawalFeeForTransfers, final SavingsAccountSummaryData summary, final boolean allowOverdraft, - final BigDecimal overdraftLimit, final BigDecimal minRequiredBalance, final boolean enforceMinRequiredBalance, - final BigDecimal maxAllowedLienLimit, final boolean lienAllowed, final BigDecimal minBalanceForInterestCalculation, - final BigDecimal onHoldFunds, final BigDecimal nominalAnnualInterestRateOverdraft, - final BigDecimal minOverdraftForInterestCalculation, final boolean withHoldTax, final TaxGroupData taxGroup, - final LocalDate lastActiveTransactionDate, final boolean isDormancyTrackingActive, final Integer daysToInactive, - final Integer daysToDormancy, final Integer daysToEscheat, final BigDecimal savingsAmountOnHold) { + final String externalId, final Long groupId, final String groupName, final Long clientId, final String clientName, + final Long productId, final String productName, final Long fieldOfficerId, final String fieldOfficerName, + final SavingsAccountStatusEnumData status, SavingsAccountSubStatusEnumData subStatus, final String reasonForBlock, + final SavingsAccountApplicationTimelineData timeline, final CurrencyData currency, final BigDecimal interestRate, + final EnumOptionData interestCompoundingPeriodType, final EnumOptionData interestPostingPeriodType, + final EnumOptionData interestCalculationType, final EnumOptionData interestCalculationDaysInYearType, + final BigDecimal minRequiredOpeningBalance, final Integer lockinPeriodFrequency, final EnumOptionData lockinPeriodFrequencyType, + final boolean withdrawalFeeForTransfers, final SavingsAccountSummaryData summary, final boolean allowOverdraft, + final BigDecimal overdraftLimit, final BigDecimal minRequiredBalance, final boolean enforceMinRequiredBalance, + final BigDecimal maxAllowedLienLimit, final boolean lienAllowed, final BigDecimal minBalanceForInterestCalculation, + final BigDecimal onHoldFunds, final BigDecimal nominalAnnualInterestRateOverdraft, + final BigDecimal minOverdraftForInterestCalculation, final boolean withHoldTax, final TaxGroupData taxGroup, + final LocalDate lastActiveTransactionDate, final boolean isDormancyTrackingActive, final Integer daysToInactive, + final Integer daysToDormancy, final Integer daysToEscheat, final BigDecimal savingsAmountOnHold) { final Collection productOptions = null; final Collection fieldOfficerOptions = null; @@ -618,7 +619,7 @@ public static SavingsAccountData lookup(final Long accountId, final String accou } public static SavingsAccountData lookupWithProductDetails(final Long accountId, final String accountNo, - final EnumOptionData depositType, final Long productId, final String productName, final SavingsAccountStatusEnumData status) { + final EnumOptionData depositType, final Long productId, final String productName, final SavingsAccountStatusEnumData status) { final String externalId = null; final Long groupId = null; @@ -687,7 +688,7 @@ public static SavingsAccountData lookupWithProductDetails(final Long accountId, } public static SavingsAccountData withTemplateOptions(final SavingsAccountData account, final SavingsAccountData template, - final Collection transactions, final Collection charges) { + final Collection transactions, final Collection charges) { if (template == null) { final Collection productOptions = null; @@ -723,14 +724,14 @@ public static SavingsAccountData withTemplateOptions(final SavingsAccountData ac } public static SavingsAccountData withTemplateOptions(final SavingsAccountData account, - final Collection productOptions, final Collection fieldOfficerOptions, - final Collection interestCompoundingPeriodTypeOptions, - final Collection interestPostingPeriodTypeOptions, - final Collection interestCalculationTypeOptions, - final Collection interestCalculationDaysInYearTypeOptions, - final Collection lockinPeriodFrequencyTypeOptions, final Collection withdrawalFeeTypeOptions, - final Collection transactions, final Collection charges, - final Collection chargeOptions) { + final Collection productOptions, final Collection fieldOfficerOptions, + final Collection interestCompoundingPeriodTypeOptions, + final Collection interestPostingPeriodTypeOptions, + final Collection interestCalculationTypeOptions, + final Collection interestCalculationDaysInYearTypeOptions, + final Collection lockinPeriodFrequencyTypeOptions, final Collection withdrawalFeeTypeOptions, + final Collection transactions, final Collection charges, + final Collection chargeOptions) { return new SavingsAccountData(account.id, account.accountNo, account.depositType, account.externalId, account.groupId, account.groupName, account.clientId, account.clientName, account.savingsProductId, account.savingsProductName, @@ -750,7 +751,7 @@ public static SavingsAccountData withTemplateOptions(final SavingsAccountData ac } public static SavingsAccountData withClientTemplate(final Long clientId, final String clientName, final Long groupId, - final String groupName) { + final String groupName) { final Long id = null; final String accountNo = null; @@ -821,27 +822,27 @@ public static SavingsAccountData withClientTemplate(final Long clientId, final S } private SavingsAccountData(final Long id, final String accountNo, final EnumOptionData depositType, final String externalId, - final Long groupId, final String groupName, final Long clientId, final String clientName, final Long productId, - final String productName, final Long fieldOfficerId, final String fieldOfficerName, final SavingsAccountStatusEnumData status, - final SavingsAccountSubStatusEnumData subStatus, final String reasonForBlock, - final SavingsAccountApplicationTimelineData timeline, final CurrencyData currency, final BigDecimal nominalAnnualInterestRate, - final EnumOptionData interestPeriodType, final EnumOptionData interestPostingPeriodType, - final EnumOptionData interestCalculationType, final EnumOptionData interestCalculationDaysInYearType, - final BigDecimal minRequiredOpeningBalance, final Integer lockinPeriodFrequency, final EnumOptionData lockinPeriodFrequencyType, - final boolean withdrawalFeeForTransfers, final SavingsAccountSummaryData summary, - final Collection transactions, final Collection productOptions, - final Collection fieldOfficerOptions, final Collection interestCompoundingPeriodTypeOptions, - final Collection interestPostingPeriodTypeOptions, - final Collection interestCalculationTypeOptions, - final Collection interestCalculationDaysInYearTypeOptions, - final Collection lockinPeriodFrequencyTypeOptions, final Collection withdrawalFeeTypeOptions, - final Collection charges, final Collection chargeOptions, final boolean allowOverdraft, - final BigDecimal overdraftLimit, final BigDecimal minRequiredBalance, final boolean enforceMinRequiredBalance, - final BigDecimal maxAllowedLienLimit, final boolean lienAllowd, final BigDecimal minBalanceForInterestCalculation, - final BigDecimal onHoldFunds, final BigDecimal nominalAnnualInterestRateOverdraft, - final BigDecimal minOverdraftForInterestCalculation, final boolean withHoldTax, final TaxGroupData taxGroup, - final LocalDate lastActiveTransactionDate, final boolean isDormancyTrackingActive, final Integer daysToInactive, - final Integer daysToDormancy, final Integer daysToEscheat, final BigDecimal savingsAmountOnHold) { + final Long groupId, final String groupName, final Long clientId, final String clientName, final Long productId, + final String productName, final Long fieldOfficerId, final String fieldOfficerName, final SavingsAccountStatusEnumData status, + final SavingsAccountSubStatusEnumData subStatus, final String reasonForBlock, + final SavingsAccountApplicationTimelineData timeline, final CurrencyData currency, final BigDecimal nominalAnnualInterestRate, + final EnumOptionData interestPeriodType, final EnumOptionData interestPostingPeriodType, + final EnumOptionData interestCalculationType, final EnumOptionData interestCalculationDaysInYearType, + final BigDecimal minRequiredOpeningBalance, final Integer lockinPeriodFrequency, final EnumOptionData lockinPeriodFrequencyType, + final boolean withdrawalFeeForTransfers, final SavingsAccountSummaryData summary, + final Collection transactions, final Collection productOptions, + final Collection fieldOfficerOptions, final Collection interestCompoundingPeriodTypeOptions, + final Collection interestPostingPeriodTypeOptions, + final Collection interestCalculationTypeOptions, + final Collection interestCalculationDaysInYearTypeOptions, + final Collection lockinPeriodFrequencyTypeOptions, final Collection withdrawalFeeTypeOptions, + final Collection charges, final Collection chargeOptions, final boolean allowOverdraft, + final BigDecimal overdraftLimit, final BigDecimal minRequiredBalance, final boolean enforceMinRequiredBalance, + final BigDecimal maxAllowedLienLimit, final boolean lienAllowd, final BigDecimal minBalanceForInterestCalculation, + final BigDecimal onHoldFunds, final BigDecimal nominalAnnualInterestRateOverdraft, + final BigDecimal minOverdraftForInterestCalculation, final boolean withHoldTax, final TaxGroupData taxGroup, + final LocalDate lastActiveTransactionDate, final boolean isDormancyTrackingActive, final Integer daysToInactive, + final Integer daysToDormancy, final Integer daysToEscheat, final BigDecimal savingsAmountOnHold) { this.id = id; this.accountNo = accountNo; this.depositType = depositType; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountStatusEnumData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountStatusEnumData.java index f80686ae78c..95f6a6567b2 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountStatusEnumData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountStatusEnumData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.savings.data; import java.io.Serializable; + import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountSubStatusEnumData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountSubStatusEnumData.java index e7468afac83..963f20640cf 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountSubStatusEnumData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountSubStatusEnumData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.savings.data; import java.io.Serializable; + import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountSummaryData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountSummaryData.java index e6f0393fb1e..fa2bc58fb9a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountSummaryData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountSummaryData.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.LocalDate; import java.util.HashMap; import java.util.List; + import lombok.Getter; import org.apache.fineract.infrastructure.core.jersey.serializer.legacy.JsonLocalDateArrayFormat; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -60,11 +61,11 @@ public class SavingsAccountSummaryData implements Serializable { private transient BigDecimal runningBalanceOnInterestPostingTillDate = BigDecimal.ZERO; public SavingsAccountSummaryData(final CurrencyData currency, final BigDecimal totalDeposits, final BigDecimal totalWithdrawals, - final BigDecimal totalWithdrawalFees, final BigDecimal totalAnnualFees, final BigDecimal totalInterestEarned, - final BigDecimal totalInterestPosted, final BigDecimal accountBalance, final BigDecimal totalFeeCharge, - final BigDecimal totalPenaltyCharge, final BigDecimal totalOverdraftInterestDerived, final BigDecimal totalWithholdTax, - final BigDecimal interestNotPosted, final LocalDate lastInterestCalculationDate, final BigDecimal availableBalance, - final LocalDate interestPostedTillDate) { + final BigDecimal totalWithdrawalFees, final BigDecimal totalAnnualFees, final BigDecimal totalInterestEarned, + final BigDecimal totalInterestPosted, final BigDecimal accountBalance, final BigDecimal totalFeeCharge, + final BigDecimal totalPenaltyCharge, final BigDecimal totalOverdraftInterestDerived, final BigDecimal totalWithholdTax, + final BigDecimal interestNotPosted, final LocalDate lastInterestCalculationDate, final BigDecimal availableBalance, + final LocalDate interestPostedTillDate) { this.currency = currency; this.totalDeposits = totalDeposits; this.totalWithdrawals = totalWithdrawals; @@ -92,8 +93,8 @@ public BigDecimal getRunningBalanceOnPivotDate() { } public void updateSummaryWithPivotConfig(final CurrencyData currency, final SavingsAccountTransactionDataSummaryWrapper wrapper, - final SavingsAccountTransactionToUpdateSummary transaction, - final List savingsAccountTransactions) { + final SavingsAccountTransactionToUpdateSummary transaction, + final List savingsAccountTransactions) { if (transaction != null) { if (transaction.isReversalTransaction()) { @@ -106,27 +107,27 @@ public void updateSummaryWithPivotConfig(final CurrencyData currency, final Savi this.totalDeposits = Money.of(currency, this.totalDeposits).plus(transactionAmount).getAmount(); this.accountBalance = Money.of(currency, this.accountBalance).plus(transactionAmount).getAmount(); } - break; + break; case WITHDRAWAL: if (transaction.isWithdrawal() && transaction.isNotReversed()) { this.totalWithdrawals = Money.of(currency, this.totalWithdrawals).plus(transactionAmount).getAmount(); this.accountBalance = Money.of(currency, this.accountBalance).minus(transactionAmount).getAmount(); } - break; + break; case WITHDRAWAL_FEE: if (transaction.isWithdrawalFeeAndNotReversed() && transaction.isNotReversed()) { this.totalWithdrawalFees = Money.of(currency, this.totalWithdrawalFees).plus(transactionAmount).getAmount(); this.totalFeeCharge = Money.of(currency, this.totalFeeCharge).plus(transactionAmount).getAmount(); this.accountBalance = Money.of(currency, this.accountBalance).minus(transactionAmount).getAmount(); } - break; + break; case ANNUAL_FEE: if (transaction.isAnnualFeeAndNotReversed() && transaction.isNotReversed()) { this.totalAnnualFees = Money.of(currency, this.totalAnnualFees).plus(transactionAmount).getAmount(); this.totalFeeCharge = Money.of(currency, this.totalFeeCharge).plus(transactionAmount).getAmount(); this.accountBalance = Money.of(currency, this.accountBalance).minus(transactionAmount).getAmount(); } - break; + break; case WAIVE_CHARGES: if (transaction.isWaiveFeeChargeAndNotReversed()) { this.totalFeeCharge = Money.of(currency, this.totalFeeCharge).plus(transactionAmount.getAmount()).getAmount(); @@ -134,7 +135,7 @@ public void updateSummaryWithPivotConfig(final CurrencyData currency, final Savi this.totalPenaltyCharge = Money.of(currency, this.totalPenaltyCharge).plus(transactionAmount.getAmount()) .getAmount(); } - break; + break; case PAY_CHARGE: if (transaction.isFeeChargeAndNotReversed()) { this.totalFeeCharge = Money.of(currency, this.totalFeeCharge).plus(transactionAmount).getAmount(); @@ -144,22 +145,22 @@ public void updateSummaryWithPivotConfig(final CurrencyData currency, final Savi if (transaction.isFeeChargeAndNotReversed() || transaction.isPenaltyChargeAndNotReversed()) { this.accountBalance = Money.of(currency, this.accountBalance).minus(transactionAmount).getAmount(); } - break; + break; case OVERDRAFT_INTEREST: if (transaction.isOverdraftInterestAndNotReversed()) { this.totalOverdraftInterestDerived = Money.of(currency, this.totalOverdraftInterestDerived).plus(transactionAmount) .getAmount(); this.accountBalance = Money.of(currency, this.accountBalance).minus(transactionAmount).getAmount(); } - break; + break; case WITHHOLD_TAX: if (transaction.isWithHoldTaxAndNotReversed()) { this.totalWithholdTax = Money.of(currency, this.totalWithholdTax).plus(transactionAmount).getAmount(); this.accountBalance = Money.of(currency, this.accountBalance).minus(transactionAmount).getAmount(); } - break; + break; default: - break; + break; } } else { // boolean isUpdated = false; @@ -201,8 +202,8 @@ public void updateFromInterestPeriodSummaries(final MonetaryCurrency currency, f @SuppressWarnings("unchecked") private HashMap updateRunningBalanceAndPivotDate(final boolean backdatedTxnsAllowedTill, - final List savingsAccountTransactions, Money interestTotal, Money overdraftInterestTotal, - Money withHoldTaxTotal) { + final List savingsAccountTransactions, Money interestTotal, Money overdraftInterestTotal, + Money withHoldTaxTotal) { boolean isUpdated = false; HashMap map = new HashMap<>(); for (int i = savingsAccountTransactions.size() - 1; i >= 0; i--) { @@ -244,7 +245,7 @@ private HashMap updateRunningBalanceAndPivotDate(final boolean ba } public void updateSummary(final CurrencyData currency, final SavingsAccountTransactionDataSummaryWrapper wrapper, - final List transactions) { + final List transactions) { this.totalDeposits = wrapper.calculateTotalDeposits(currency, transactions); this.totalWithdrawals = wrapper.calculateTotalWithdrawals(currency, transactions); diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionData.java index 666a3ce9a8a..42c0858314c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionData.java @@ -6,9 +6,9 @@ * 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 @@ -29,6 +29,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.Getter; import org.apache.fineract.infrastructure.core.domain.LocalDateInterval; import org.apache.fineract.infrastructure.core.jersey.serializer.legacy.JsonLocalDateArrayFormat; @@ -111,12 +112,12 @@ public class SavingsAccountTransactionData implements Serializable { private Long accountDebit; protected SavingsAccountTransactionData(final Long id, final SavingsAccountTransactionEnumData transactionType, - final PaymentDetailData paymentDetailData, final Long savingsId, final String savingsAccountNo, final LocalDate transactionDate, - final CurrencyData currency, final BigDecimal amount, final BigDecimal outstandingChargeAmount, final BigDecimal runningBalance, - final boolean reversed, final AccountTransferData transfer, final Collection paymentTypeOptions, - final LocalDate submittedOnDate, final boolean interestedPostedAsOn, final String submittedByUsername, final String note, - final Boolean isReversal, final Long originalTransactionId, boolean isManualTransaction, final Boolean lienTransaction, - final Long releaseTransactionId, final String reasonForBlock, final Boolean isOverdraft) { + final PaymentDetailData paymentDetailData, final Long savingsId, final String savingsAccountNo, final LocalDate transactionDate, + final CurrencyData currency, final BigDecimal amount, final BigDecimal outstandingChargeAmount, final BigDecimal runningBalance, + final boolean reversed, final AccountTransferData transfer, final Collection paymentTypeOptions, + final LocalDate submittedOnDate, final boolean interestedPostedAsOn, final String submittedByUsername, final String note, + final Boolean isReversal, final Long originalTransactionId, boolean isManualTransaction, final Boolean lienTransaction, + final Long releaseTransactionId, final String reasonForBlock, final Boolean isOverdraft) { this.id = id; this.transactionType = transactionType; TransactionEntryType entryType = null; @@ -154,22 +155,22 @@ protected SavingsAccountTransactionData(final Long id, final SavingsAccountTrans } private static SavingsAccountTransactionData createData(final Long id, final SavingsAccountTransactionEnumData transactionType, - final PaymentDetailData paymentDetailData, final Long accountId, final String accountNo, final LocalDate date, - final CurrencyData currency, final BigDecimal amount, final BigDecimal outstandingChargeAmount, final BigDecimal runningBalance, - final boolean reversed, final AccountTransferData transfer, final Collection paymentTypeOptions, - final LocalDate submittedOnDate, final boolean interestedPostedAsOn, final String submittedByUsername, final String note, - final Boolean lienTransaction) { + final PaymentDetailData paymentDetailData, final Long accountId, final String accountNo, final LocalDate date, + final CurrencyData currency, final BigDecimal amount, final BigDecimal outstandingChargeAmount, final BigDecimal runningBalance, + final boolean reversed, final AccountTransferData transfer, final Collection paymentTypeOptions, + final LocalDate submittedOnDate, final boolean interestedPostedAsOn, final String submittedByUsername, final String note, + final Boolean lienTransaction) { return new SavingsAccountTransactionData(id, transactionType, paymentDetailData, accountId, accountNo, date, currency, amount, outstandingChargeAmount, runningBalance, reversed, transfer, paymentTypeOptions, submittedOnDate, interestedPostedAsOn, submittedByUsername, note, null, null, false, lienTransaction, null, null, false); } public static SavingsAccountTransactionData create(final Long id, final SavingsAccountTransactionEnumData transactionType, - final PaymentDetailData paymentDetailData, final Long savingsId, final String savingsAccountNo, final LocalDate date, - final CurrencyData currency, final BigDecimal amount, final BigDecimal outstandingChargeAmount, final BigDecimal runningBalance, - final boolean reversed, final AccountTransferData transfer, final LocalDate submittedOnDate, final boolean interestedPostedAsOn, - final String submittedByUsername, final String note, final Boolean isReversal, final Long originalTransactionId, - final Boolean lienTransaction, final Long releaseTransactionId, final String reasonForBlock) { + final PaymentDetailData paymentDetailData, final Long savingsId, final String savingsAccountNo, final LocalDate date, + final CurrencyData currency, final BigDecimal amount, final BigDecimal outstandingChargeAmount, final BigDecimal runningBalance, + final boolean reversed, final AccountTransferData transfer, final LocalDate submittedOnDate, final boolean interestedPostedAsOn, + final String submittedByUsername, final String note, final Boolean isReversal, final Long originalTransactionId, + final Boolean lienTransaction, final Long releaseTransactionId, final String reasonForBlock) { return new SavingsAccountTransactionData(id, transactionType, paymentDetailData, savingsId, savingsAccountNo, date, currency, amount, outstandingChargeAmount, runningBalance, reversed, transfer, null, submittedOnDate, interestedPostedAsOn, submittedByUsername, note, isReversal, originalTransactionId, false, lienTransaction, releaseTransactionId, reasonForBlock, @@ -177,20 +178,20 @@ public static SavingsAccountTransactionData create(final Long id, final SavingsA } public static SavingsAccountTransactionData create(final Long id, final SavingsAccountTransactionEnumData transactionType, - final PaymentDetailData paymentDetailData, final Long savingsId, final String savingsAccountNo, final LocalDate date, - final CurrencyData currency, final BigDecimal amount, final BigDecimal outstandingChargeAmount, final BigDecimal runningBalance, - final boolean reversed, final AccountTransferData transfer, final boolean interestedPostedAsOn, - final String submittedByUsername, final String note, final LocalDate submittedOnDate) { + final PaymentDetailData paymentDetailData, final Long savingsId, final String savingsAccountNo, final LocalDate date, + final CurrencyData currency, final BigDecimal amount, final BigDecimal outstandingChargeAmount, final BigDecimal runningBalance, + final boolean reversed, final AccountTransferData transfer, final boolean interestedPostedAsOn, + final String submittedByUsername, final String note, final LocalDate submittedOnDate) { return createData(id, transactionType, paymentDetailData, savingsId, savingsAccountNo, date, currency, amount, outstandingChargeAmount, runningBalance, reversed, transfer, null, submittedOnDate, interestedPostedAsOn, submittedByUsername, note, false); } public static SavingsAccountTransactionData create(final Long id, final SavingsAccountTransactionEnumData transactionType, - final PaymentDetailData paymentDetailData, final Long savingsId, final String savingsAccountNo, final LocalDate date, - final CurrencyData currency, final BigDecimal amount, final BigDecimal outstandingChargeAmount, final BigDecimal runningBalance, - final boolean reversed, final LocalDate submittedOnDate, final boolean interestedPostedAsOn, final BigDecimal cumulativeBalance, - final LocalDate balanceEndDate) { + final PaymentDetailData paymentDetailData, final Long savingsId, final String savingsAccountNo, final LocalDate date, + final CurrencyData currency, final BigDecimal amount, final BigDecimal outstandingChargeAmount, final BigDecimal runningBalance, + final boolean reversed, final LocalDate submittedOnDate, final boolean interestedPostedAsOn, final BigDecimal cumulativeBalance, + final LocalDate balanceEndDate) { SavingsAccountTransactionData data = createData(id, transactionType, paymentDetailData, savingsId, savingsAccountNo, date, currency, amount, outstandingChargeAmount, runningBalance, reversed, null, null, submittedOnDate, interestedPostedAsOn, null, null, false); @@ -220,13 +221,13 @@ public static SavingsAccountTransactionData withWithDrawalTransactionDetails( } public static SavingsAccountTransactionData template(final Long savingsId, final String savingsAccountNo, - final LocalDate defaultLocalDate, final CurrencyData currency) { + final LocalDate defaultLocalDate, final CurrencyData currency) { return createData(null, null, null, savingsId, savingsAccountNo, defaultLocalDate, currency, null, null, null, false, null, null, defaultLocalDate, false, null, null, false); } public static SavingsAccountTransactionData templateOnTop(final SavingsAccountTransactionData savingsAccountTransactionData, - final Collection paymentTypeOptions) { + final Collection paymentTypeOptions) { return createData(savingsAccountTransactionData.getId(), savingsAccountTransactionData.getTransactionType(), savingsAccountTransactionData.getPaymentDetailData(), savingsAccountTransactionData.getAccountId(), savingsAccountTransactionData.getAccountNo(), savingsAccountTransactionData.getDate(), @@ -239,9 +240,9 @@ public static SavingsAccountTransactionData templateOnTop(final SavingsAccountTr } private static SavingsAccountTransactionData createImport(final SavingsAccountTransactionEnumData transactionType, - final PaymentDetailData paymentDetailData, final Long savingsAccountId, final String accountNumber, - final LocalDate transactionDate, final BigDecimal transactionAmount, final boolean reversed, final LocalDate submittedOnDate, - boolean isManualTransaction, final Boolean lienTransaction, final Boolean isOverdraft) { + final PaymentDetailData paymentDetailData, final Long savingsAccountId, final String accountNumber, + final LocalDate transactionDate, final BigDecimal transactionAmount, final boolean reversed, final LocalDate submittedOnDate, + boolean isManualTransaction, final Boolean lienTransaction, final Boolean isOverdraft) { SavingsAccountTransactionData data = new SavingsAccountTransactionData(null, transactionType, paymentDetailData, savingsAccountId, accountNumber, transactionDate, null, transactionAmount, null, null, reversed, null, null, submittedOnDate, false, null, null, null, null, isManualTransaction, lienTransaction, null, null, isOverdraft); @@ -261,8 +262,8 @@ public static SavingsAccountTransactionData copyTransaction(SavingsAccountTransa } public static SavingsAccountTransactionData importInstance(BigDecimal transactionAmount, LocalDate transactionDate, Long paymentTypeId, - String accountNumber, String checkNumber, String routingCode, String receiptNumber, String bankNumber, String note, - Long savingsAccountId, SavingsAccountTransactionEnumData transactionType, Integer rowIndex, String locale, String dateFormat) { + String accountNumber, String checkNumber, String routingCode, String receiptNumber, String bankNumber, String note, + Long savingsAccountId, SavingsAccountTransactionEnumData transactionType, Integer rowIndex, String locale, String dateFormat) { SavingsAccountTransactionData data = createImport(transactionType, null, savingsAccountId, accountNumber, transactionDate, transactionAmount, false, transactionDate, false, false, false); data.rowIndex = rowIndex; @@ -278,15 +279,15 @@ public static SavingsAccountTransactionData importInstance(BigDecimal transactio } private static SavingsAccountTransactionData createImport(SavingsAccountTransactionEnumData transactionType, Long savingsAccountId, - LocalDate transactionDate, BigDecimal transactionAmount, final LocalDate submittedOnDate, boolean isManualTransaction, - Boolean isOverdraft) { + LocalDate transactionDate, BigDecimal transactionAmount, final LocalDate submittedOnDate, boolean isManualTransaction, + Boolean isOverdraft) { // import transaction return createImport(transactionType, null, savingsAccountId, null, transactionDate, transactionAmount, false, submittedOnDate, isManualTransaction, false, isOverdraft); } public static SavingsAccountTransactionData interestPosting(final SavingsAccountData savingsAccount, final LocalDate date, - final Money amount, final boolean isManualTransaction) { + final Money amount, final boolean isManualTransaction) { final LocalDate submittedOnDate = DateUtils.getBusinessLocalDate(); final SavingsAccountTransactionType savingsAccountTransactionType = SavingsAccountTransactionType.INTEREST_POSTING; SavingsAccountTransactionEnumData transactionType = new SavingsAccountTransactionEnumData( @@ -296,7 +297,7 @@ public static SavingsAccountTransactionData interestPosting(final SavingsAccount } public static SavingsAccountTransactionData accrual(final SavingsAccountData savingsAccount, final LocalDate date, final Money amount, - final boolean isManualTransaction) { + final boolean isManualTransaction) { final LocalDate submittedOnDate = DateUtils.getBusinessLocalDate(); final SavingsAccountTransactionType savingsAccountTransactionType = SavingsAccountTransactionType.ACCRUAL; SavingsAccountTransactionEnumData transactionType = new SavingsAccountTransactionEnumData( @@ -306,7 +307,7 @@ public static SavingsAccountTransactionData accrual(final SavingsAccountData sav } public static SavingsAccountTransactionData overdraftInterest(final SavingsAccountData savingsAccount, final LocalDate date, - final Money amount, final boolean isManualTransaction, final Boolean isOverdraft) { + final Money amount, final boolean isManualTransaction, final Boolean isOverdraft) { final LocalDate submittedOnDate = DateUtils.getBusinessLocalDate(); final SavingsAccountTransactionType savingsAccountTransactionType = SavingsAccountTransactionType.OVERDRAFT_INTEREST; SavingsAccountTransactionEnumData transactionType = new SavingsAccountTransactionEnumData( @@ -317,7 +318,7 @@ public static SavingsAccountTransactionData overdraftInterest(final SavingsAccou } public static SavingsAccountTransactionData withHoldTax(final SavingsAccountData savingsAccount, final LocalDate date, - final Money amount, final Map taxDetails) { + final Money amount, final Map taxDetails) { final LocalDate submittedOnDate = DateUtils.getBusinessLocalDate(); SavingsAccountTransactionType savingsAccountTransactionType = SavingsAccountTransactionType.WITHHOLD_TAX; SavingsAccountTransactionEnumData transactionType = new SavingsAccountTransactionEnumData( @@ -436,7 +437,7 @@ public boolean occursOn(final LocalDate occursOnDate) { } public EndOfDayBalance toEndOfDayBalanceBoundedBy(final Money openingBalance, final LocalDateInterval boundedBy, - final boolean isAllowOverdraft) { + final boolean isAllowOverdraft) { final MonetaryCurrency currency = openingBalance.getCurrency(); Money endOfDayBalance = openingBalance.copy(); diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionEnumData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionEnumData.java index 6d694690b4d..caefec50db0 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionEnumData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionEnumData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.savings.data; import java.io.Serializable; + import lombok.Getter; import org.apache.fineract.portfolio.TransactionEntryType; import org.apache.fineract.portfolio.savings.SavingsAccountTransactionType; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionToUpdateSummary.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionToUpdateSummary.java index 199110c82a7..0adc2cbcd6b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionToUpdateSummary.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionToUpdateSummary.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.savings.data; import java.math.BigDecimal; + import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsProductData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsProductData.java index f64de2bcd29..485636819f2 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsProductData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsProductData.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.Collection; import java.util.List; import java.util.Map; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.accounting.common.AccountingRuleType; @@ -116,17 +117,17 @@ public final class SavingsProductData implements Serializable { private final Long daysToEscheat; public static SavingsProductData template(final CurrencyData currency, final EnumOptionData interestCompoundingPeriodType, - final EnumOptionData interestPostingPeriodType, final EnumOptionData interestCalculationType, - final EnumOptionData interestCalculationDaysInYearType, final EnumOptionData accountingRule, - final Collection currencyOptions, final Collection interestCompoundingPeriodTypeOptions, - final Collection interestPostingPeriodTypeOptions, - final Collection interestCalculationTypeOptions, - final Collection interestCalculationDaysInYearTypeOptions, - final Collection lockinPeriodFrequencyTypeOptions, final Collection withdrawalFeeTypeOptions, - final Collection paymentTypeOptions, final Collection accountingRuleOptions, - final Map> accountingMappingOptions, final Collection chargeOptions, - final Collection penaltyOptions, final Collection taxGroupOptions, - final String accountMappingForPayment) { + final EnumOptionData interestPostingPeriodType, final EnumOptionData interestCalculationType, + final EnumOptionData interestCalculationDaysInYearType, final EnumOptionData accountingRule, + final Collection currencyOptions, final Collection interestCompoundingPeriodTypeOptions, + final Collection interestPostingPeriodTypeOptions, + final Collection interestCalculationTypeOptions, + final Collection interestCalculationDaysInYearTypeOptions, + final Collection lockinPeriodFrequencyTypeOptions, final Collection withdrawalFeeTypeOptions, + final Collection paymentTypeOptions, final Collection accountingRuleOptions, + final Map> accountingMappingOptions, final Collection chargeOptions, + final Collection penaltyOptions, final Collection taxGroupOptions, + final String accountMappingForPayment) { final Long id = null; final String name = null; @@ -193,14 +194,14 @@ public static SavingsProductData withCharges(final SavingsProductData product, f * template data for dropdowns. */ public static SavingsProductData withTemplate(final SavingsProductData existingProduct, final Collection currencyOptions, - final Collection interestCompoundingPeriodTypeOptions, - final Collection interestPostingPeriodTypeOptions, - final Collection interestCalculationTypeOptions, - final Collection interestCalculationDaysInYearTypeOptions, - final Collection lockinPeriodFrequencyTypeOptions, final Collection withdrawalFeeTypeOptions, - final Collection paymentTypeOptions, final Collection accountingRuleOptions, - final Map> accountingMappingOptions, final Collection chargeOptions, - final Collection penaltyOptions, Collection taxGroupOptions, final String accountMappingForPayment) { + final Collection interestCompoundingPeriodTypeOptions, + final Collection interestPostingPeriodTypeOptions, + final Collection interestCalculationTypeOptions, + final Collection interestCalculationDaysInYearTypeOptions, + final Collection lockinPeriodFrequencyTypeOptions, final Collection withdrawalFeeTypeOptions, + final Collection paymentTypeOptions, final Collection accountingRuleOptions, + final Map> accountingMappingOptions, final Collection chargeOptions, + final Collection penaltyOptions, Collection taxGroupOptions, final String accountMappingForPayment) { return new SavingsProductData(existingProduct.id, existingProduct.name, existingProduct.shortName, existingProduct.description, existingProduct.currency, existingProduct.nominalAnnualInterestRate, existingProduct.interestCompoundingPeriodType, @@ -220,9 +221,9 @@ public static SavingsProductData withTemplate(final SavingsProductData existingP } public static SavingsProductData withAccountingDetails(final SavingsProductData existingProduct, - final Map accountingMappings, final Collection paymentChannelToFundSourceMappings, - final Collection feeToIncomeAccountMappings, - final Collection penaltyToIncomeAccountMappings) { + final Map accountingMappings, final Collection paymentChannelToFundSourceMappings, + final Collection feeToIncomeAccountMappings, + final Collection penaltyToIncomeAccountMappings) { final Collection currencyOptions = null; final Collection interestCompoundingPeriodTypeOptions = null; @@ -256,16 +257,16 @@ public static SavingsProductData withAccountingDetails(final SavingsProductData } public static SavingsProductData instance(final Long id, final String name, final String shortName, final String description, - final CurrencyData currency, final BigDecimal nominalAnnualInterestRate, final EnumOptionData interestCompoundingPeriodType, - final EnumOptionData interestPostingPeriodType, final EnumOptionData interestCalculationType, - final EnumOptionData interestCalculationDaysInYearType, final BigDecimal minRequiredOpeningBalance, - final Integer lockinPeriodFrequency, final EnumOptionData lockinPeriodFrequencyType, final boolean withdrawalFeeForTransfers, - final EnumOptionData accountingType, final boolean allowOverdraft, final BigDecimal overdraftLimit, - final BigDecimal minRequiredBalance, final boolean enforceMinRequiredBalance, final BigDecimal maxAllowedLienLimit, - final boolean lienAllowed, final BigDecimal minBalanceForInterestCalculation, - final BigDecimal nominalAnnualInterestRateOverdraft, final BigDecimal minOverdraftForInterestCalculation, - final boolean withHoldTax, final TaxGroupData taxGroup, final Boolean isDormancyTrackingActive, final Long daysToInactive, - final Long daysToDormancy, final Long daysToEscheat) { + final CurrencyData currency, final BigDecimal nominalAnnualInterestRate, final EnumOptionData interestCompoundingPeriodType, + final EnumOptionData interestPostingPeriodType, final EnumOptionData interestCalculationType, + final EnumOptionData interestCalculationDaysInYearType, final BigDecimal minRequiredOpeningBalance, + final Integer lockinPeriodFrequency, final EnumOptionData lockinPeriodFrequencyType, final boolean withdrawalFeeForTransfers, + final EnumOptionData accountingType, final boolean allowOverdraft, final BigDecimal overdraftLimit, + final BigDecimal minRequiredBalance, final boolean enforceMinRequiredBalance, final BigDecimal maxAllowedLienLimit, + final boolean lienAllowed, final BigDecimal minBalanceForInterestCalculation, + final BigDecimal nominalAnnualInterestRateOverdraft, final BigDecimal minOverdraftForInterestCalculation, + final boolean withHoldTax, final TaxGroupData taxGroup, final Boolean isDormancyTrackingActive, final Long daysToInactive, + final Long daysToDormancy, final Long daysToEscheat) { final Map accountingMappings = null; final Collection paymentChannelToFundSourceMappings = null; @@ -427,28 +428,28 @@ private SavingsProductData(final Long id, final EnumOptionData accountingRule) { } private SavingsProductData(final Long id, final String name, final String shortName, final String description, - final CurrencyData currency, final BigDecimal nominalAnnualInterestRate, final EnumOptionData interestCompoundingPeriodType, - final EnumOptionData interestPostingPeriodType, final EnumOptionData interestCalculationType, - final EnumOptionData interestCalculationDaysInYearType, final BigDecimal minRequiredOpeningBalance, - final Integer lockinPeriodFrequency, final EnumOptionData lockinPeriodFrequencyType, final boolean withdrawalFeeForTransfers, - final EnumOptionData accountingType, final Map accountingMappings, - final Collection paymentChannelToFundSourceMappings, - final Collection currencyOptions, final Collection interestCompoundingPeriodTypeOptions, - final Collection interestPostingPeriodTypeOptions, - final Collection interestCalculationTypeOptions, - final Collection interestCalculationDaysInYearTypeOptions, - final Collection lockinPeriodFrequencyTypeOptions, final Collection withdrawalFeeTypeOptions, - final Collection paymentTypeOptions, final Collection accountingRuleOptions, - final Map> accountingMappingOptions, final Collection charges, - final Collection chargeOptions, final Collection penaltyOptions, - final Collection feeToIncomeAccountMappings, - final Collection penaltyToIncomeAccountMappings, final boolean allowOverdraft, - final BigDecimal overdraftLimit, final BigDecimal minRequiredBalance, final boolean enforceMinRequiredBalance, - final BigDecimal maxAllowedLienLimit, final boolean lienAllowed, final BigDecimal minBalanceForInterestCalculation, - final BigDecimal nominalAnnualInterestRateOverdraft, final BigDecimal minOverdraftForInterestCalculation, - final boolean withHoldTax, final TaxGroupData taxGroup, final Collection taxGroupOptions, - final Boolean isDormancyTrackingActive, final Long daysToInactive, final Long daysToDormancy, final Long daysToEscheat, - final String accountMappingForPayment) { + final CurrencyData currency, final BigDecimal nominalAnnualInterestRate, final EnumOptionData interestCompoundingPeriodType, + final EnumOptionData interestPostingPeriodType, final EnumOptionData interestCalculationType, + final EnumOptionData interestCalculationDaysInYearType, final BigDecimal minRequiredOpeningBalance, + final Integer lockinPeriodFrequency, final EnumOptionData lockinPeriodFrequencyType, final boolean withdrawalFeeForTransfers, + final EnumOptionData accountingType, final Map accountingMappings, + final Collection paymentChannelToFundSourceMappings, + final Collection currencyOptions, final Collection interestCompoundingPeriodTypeOptions, + final Collection interestPostingPeriodTypeOptions, + final Collection interestCalculationTypeOptions, + final Collection interestCalculationDaysInYearTypeOptions, + final Collection lockinPeriodFrequencyTypeOptions, final Collection withdrawalFeeTypeOptions, + final Collection paymentTypeOptions, final Collection accountingRuleOptions, + final Map> accountingMappingOptions, final Collection charges, + final Collection chargeOptions, final Collection penaltyOptions, + final Collection feeToIncomeAccountMappings, + final Collection penaltyToIncomeAccountMappings, final boolean allowOverdraft, + final BigDecimal overdraftLimit, final BigDecimal minRequiredBalance, final boolean enforceMinRequiredBalance, + final BigDecimal maxAllowedLienLimit, final boolean lienAllowed, final BigDecimal minBalanceForInterestCalculation, + final BigDecimal nominalAnnualInterestRateOverdraft, final BigDecimal minOverdraftForInterestCalculation, + final boolean withHoldTax, final TaxGroupData taxGroup, final Collection taxGroupOptions, + final Boolean isDormancyTrackingActive, final Long daysToInactive, final Long daysToDormancy, final Long daysToEscheat, + final String accountMappingForPayment) { this.id = id; this.name = name; this.shortName = shortName; @@ -485,9 +486,9 @@ private SavingsProductData(final Long id, final String name, final String shortN this.charges = charges;// charges associated with Savings product this.chargeOptions = chargeOptions;// charges available for adding to - // Savings product + // Savings product this.penaltyOptions = penaltyOptions;// penalties available for adding - // to Savings product + // to Savings product this.feeToIncomeAccountMappings = feeToIncomeAccountMappings; this.penaltyToIncomeAccountMappings = penaltyToIncomeAccountMappings; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountChargesPaidByData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountChargesPaidByData.java index 981d24f8609..ab7ea97fbd8 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountChargesPaidByData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountChargesPaidByData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.math.BigDecimal; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.portfolio.savings.data.SavingsAccountChargeData; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountStatusType.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountStatusType.java index ffe2fefaf59..d4ba89826e6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountStatusType.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountStatusType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountSubStatusEnum.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountSubStatusEnum.java index e36337a8484..160852f2234 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountSubStatusEnum.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountSubStatusEnum.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransactionDataSummaryWrapper.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransactionDataSummaryWrapper.java index b0c23c8e574..c60c14618f3 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransactionDataSummaryWrapper.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountTransactionDataSummaryWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.util.List; + import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.portfolio.savings.data.SavingsAccountTransactionData; @@ -112,7 +113,7 @@ public BigDecimal calculateTotalPenaltyCharge(final CurrencyData currency, final } public BigDecimal calculateTotalPenaltyChargeWaived(final CurrencyData currency, - final List transactions) { + final List transactions) { Money total = Money.zero(currency); for (final SavingsAccountTransactionData transaction : transactions) { if (transaction.isWaivePenaltyChargeAndNotReversed() && !transaction.isReversalTransaction()) { diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsHelper.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsHelper.java index 0d31101e5a8..77815dfaf81 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsHelper.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsHelper.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.Collection; import java.util.Collections; import java.util.List; + import org.apache.fineract.infrastructure.core.domain.LocalDateInterval; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; @@ -48,8 +49,8 @@ public SavingsHelper(AccountTransfersReadPlatformService accountTransfersReadPla private static final CompoundInterestHelper COMPOUND_INTEREST_HELPER = new CompoundInterestHelper(); public List determineInterestPostingPeriods(final LocalDate startInterestCalculationLocalDate, - final LocalDate interestPostingUpToDate, final SavingsPostingInterestPeriodType postingPeriodType, - final Integer financialYearBeginningMonth, List postInterestAsOn) { + final LocalDate interestPostingUpToDate, final SavingsPostingInterestPeriodType postingPeriodType, + final Integer financialYearBeginningMonth, List postInterestAsOn) { final List postingPeriods = new ArrayList<>(); @@ -95,8 +96,8 @@ public List determineInterestPostingPeriods(final LocalDate s } private LocalDate determineInterestPostingPeriodEndDateFrom(final LocalDate periodStartDate, - final SavingsPostingInterestPeriodType interestPostingPeriodType, final LocalDate interestPostingUpToDate, - Integer financialYearBeginningMonth) { + final SavingsPostingInterestPeriodType interestPostingPeriodType, final LocalDate interestPostingUpToDate, + Integer financialYearBeginningMonth) { LocalDate periodEndDate = interestPostingUpToDate; final Integer monthOfYear = periodStartDate.getMonthValue(); @@ -124,15 +125,15 @@ private LocalDate determineInterestPostingPeriodEndDateFrom(final LocalDate peri switch (interestPostingPeriodType) { case INVALID: - break; + break; case DAILY: // produce period end date on current day periodEndDate = periodStartDate; - break; + break; case MONTHLY: // produce period end date on last day of current month periodEndDate = periodStartDate.with(TemporalAdjusters.lastDayOfMonth()); - break; + break; case QUATERLY: for (LocalDate quarterlyDate : quarterlyDates) { if (DateUtils.isAfter(quarterlyDate, periodStartDate)) { @@ -145,7 +146,7 @@ private LocalDate determineInterestPostingPeriodEndDateFrom(final LocalDate peri if (!isEndDateSet) { periodEndDate = quarterlyDates.get(0).plusYears(1).with(TemporalAdjusters.lastDayOfMonth()); } - break; + break; case BIANNUAL: for (LocalDate biannualDate : biannualDates) { if (DateUtils.isAfter(biannualDate, periodStartDate)) { @@ -158,7 +159,7 @@ private LocalDate determineInterestPostingPeriodEndDateFrom(final LocalDate peri if (!isEndDateSet) { periodEndDate = biannualDates.get(0).plusYears(1).with(TemporalAdjusters.lastDayOfMonth()); } - break; + break; case ANNUAL: if (financialYearBeginningMonth < monthOfYear) { periodEndDate = periodStartDate.withMonth(financialYearBeginningMonth); @@ -167,7 +168,7 @@ private LocalDate determineInterestPostingPeriodEndDateFrom(final LocalDate peri periodEndDate = periodStartDate.withMonth(financialYearBeginningMonth); } periodEndDate = periodEndDate.with(TemporalAdjusters.lastDayOfMonth()); - break; + break; } // interest posting always occurs on next day after the period end date. periodEndDate = periodEndDate.plusDays(1); @@ -175,7 +176,7 @@ private LocalDate determineInterestPostingPeriodEndDateFrom(final LocalDate peri } public Money calculateInterestForAllPostingPeriods(final MonetaryCurrency currency, final List allPeriods, - LocalDate accountLockedUntil, Boolean immediateWithdrawalOfInterest) { + LocalDate accountLockedUntil, Boolean immediateWithdrawalOfInterest) { return COMPOUND_INTEREST_HELPER.calculateInterestForAllPostingPeriods(currency, allPeriods, accountLockedUntil, immediateWithdrawalOfInterest); } 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..4dd91ab6b21 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 @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.domain.LocalDateInterval; import org.apache.fineract.organisation.monetary.domain.MoneyHelper; import org.apache.fineract.portfolio.savings.SavingsCompoundingInterestPeriodType; @@ -35,7 +36,7 @@ public final class AnnualCompoundingPeriod implements CompoundingPeriod { private final List endOfDayBalances; public static AnnualCompoundingPeriod create(final LocalDateInterval periodInterval, final List allEndOfDayBalances, - final LocalDate upToInterestCalculationDate) { + final LocalDate upToInterestCalculationDate) { final List endOfDayBalancesWithinPeriod = endOfDayBalancesWithinPeriodInterval(periodInterval, allEndOfDayBalances, upToInterestCalculationDate); @@ -45,9 +46,9 @@ public static AnnualCompoundingPeriod create(final LocalDateInterval periodInter @Override public BigDecimal calculateInterest(final SavingsCompoundingInterestPeriodType compoundingInterestPeriodType, - final SavingsInterestCalculationType interestCalculationType, final BigDecimal interestToCompound, - final BigDecimal interestRateAsFraction, final long daysInYear, final BigDecimal minBalanceForInterestCalculation, - final BigDecimal overdraftInterestRateAsFraction, final BigDecimal minOverdraftForInterestCalculation) { + final SavingsInterestCalculationType interestCalculationType, final BigDecimal interestToCompound, + final BigDecimal interestRateAsFraction, final long daysInYear, final BigDecimal minBalanceForInterestCalculation, + final BigDecimal overdraftInterestRateAsFraction, final BigDecimal minOverdraftForInterestCalculation) { BigDecimal interestEarned = BigDecimal.ZERO; @@ -55,21 +56,21 @@ public BigDecimal calculateInterest(final SavingsCompoundingInterestPeriodType c case DAILY_BALANCE: interestEarned = calculateUsingDailyBalanceMethod(compoundingInterestPeriodType, interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; case AVERAGE_DAILY_BALANCE: interestEarned = calculateUsingAverageDailyBalanceMethod(interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; case INVALID: - break; + break; } return interestEarned; } private BigDecimal calculateUsingAverageDailyBalanceMethod(final BigDecimal interestToCompound, final BigDecimal interestRateAsFraction, - final long daysInYear, final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, - final BigDecimal minOverdraftForInterestCalculation) { + final long daysInYear, final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, + final BigDecimal minOverdraftForInterestCalculation) { BigDecimal cumulativeBalance = BigDecimal.ZERO; Integer numberOfDays = 0; @@ -112,9 +113,9 @@ private BigDecimal calculateUsingAverageDailyBalanceMethod(final BigDecimal inte } private BigDecimal calculateUsingDailyBalanceMethod(final SavingsCompoundingInterestPeriodType compoundingInterestPeriodType, - final BigDecimal interestToCompound, final BigDecimal interestRateAsFraction, final long daysInYear, - final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, - final BigDecimal minOverdraftForInterestCalculation) { + final BigDecimal interestToCompound, final BigDecimal interestRateAsFraction, final long daysInYear, + final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, + final BigDecimal minOverdraftForInterestCalculation) { BigDecimal interestEarned = BigDecimal.ZERO; BigDecimal interestOnBalanceUnrounded = BigDecimal.ZERO; @@ -125,13 +126,13 @@ private BigDecimal calculateUsingDailyBalanceMethod(final SavingsCompoundingInte interestOnBalanceUnrounded = balance.calculateInterestOnBalanceAndInterest(interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; case MONTHLY, ANNUAL, BI_ANNUAL, QUATERLY: interestOnBalanceUnrounded = balance.calculateInterestOnBalance(interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; case INVALID: - break; + break; } interestEarned = interestEarned.add(interestOnBalanceUnrounded); @@ -140,7 +141,7 @@ private BigDecimal calculateUsingDailyBalanceMethod(final SavingsCompoundingInte } private static List endOfDayBalancesWithinPeriodInterval(final LocalDateInterval compoundingPeriodInterval, - final List allEndOfDayBalances, final LocalDate upToInterestCalculationDate) { + final List allEndOfDayBalances, final LocalDate upToInterestCalculationDate) { final List endOfDayBalancesForPeriodInterval = new ArrayList<>(); diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/BiAnnualCompoundingPeriod.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/BiAnnualCompoundingPeriod.java index 20ad55506f6..12ae8145d53 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/BiAnnualCompoundingPeriod.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/BiAnnualCompoundingPeriod.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.domain.LocalDateInterval; import org.apache.fineract.organisation.monetary.domain.MoneyHelper; import org.apache.fineract.portfolio.savings.SavingsCompoundingInterestPeriodType; @@ -35,7 +36,7 @@ public final class BiAnnualCompoundingPeriod implements CompoundingPeriod { private final List endOfDayBalances; public static BiAnnualCompoundingPeriod create(final LocalDateInterval periodInterval, final List allEndOfDayBalances, - final LocalDate upToInterestCalculationDate) { + final LocalDate upToInterestCalculationDate) { final List endOfDayBalancesWithinPeriod = endOfDayBalancesWithinPeriodInterval(periodInterval, allEndOfDayBalances, upToInterestCalculationDate); @@ -45,9 +46,9 @@ public static BiAnnualCompoundingPeriod create(final LocalDateInterval periodInt @Override public BigDecimal calculateInterest(final SavingsCompoundingInterestPeriodType compoundingInterestPeriodType, - final SavingsInterestCalculationType interestCalculationType, final BigDecimal interestToCompound, - final BigDecimal interestRateAsFraction, final long daysInYear, final BigDecimal minBalanceForInterestCalculation, - final BigDecimal overdraftInterestRateAsFraction, final BigDecimal minOverdraftForInterestCalculation) { + final SavingsInterestCalculationType interestCalculationType, final BigDecimal interestToCompound, + final BigDecimal interestRateAsFraction, final long daysInYear, final BigDecimal minBalanceForInterestCalculation, + final BigDecimal overdraftInterestRateAsFraction, final BigDecimal minOverdraftForInterestCalculation) { BigDecimal interestEarned = BigDecimal.ZERO; @@ -55,21 +56,21 @@ public BigDecimal calculateInterest(final SavingsCompoundingInterestPeriodType c case DAILY_BALANCE: interestEarned = calculateUsingDailyBalanceMethod(compoundingInterestPeriodType, interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; case AVERAGE_DAILY_BALANCE: interestEarned = calculateUsingAverageDailyBalanceMethod(interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; case INVALID: - break; + break; } return interestEarned; } private BigDecimal calculateUsingAverageDailyBalanceMethod(final BigDecimal interestToCompound, final BigDecimal interestRateAsFraction, - final long daysInYear, final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, - final BigDecimal minOverdraftForInterestCalculation) { + final long daysInYear, final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, + final BigDecimal minOverdraftForInterestCalculation) { BigDecimal cumulativeBalance = BigDecimal.ZERO; Integer numberOfDays = Integer.valueOf(0); @@ -112,9 +113,9 @@ private BigDecimal calculateUsingAverageDailyBalanceMethod(final BigDecimal inte } private BigDecimal calculateUsingDailyBalanceMethod(final SavingsCompoundingInterestPeriodType compoundingInterestPeriodType, - final BigDecimal interestToCompound, final BigDecimal interestRateAsFraction, final long daysInYear, - final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, - final BigDecimal minOverdraftForInterestCalculation) { + final BigDecimal interestToCompound, final BigDecimal interestRateAsFraction, final long daysInYear, + final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, + final BigDecimal minOverdraftForInterestCalculation) { BigDecimal interestEarned = BigDecimal.ZERO; BigDecimal interestOnBalanceUnrounded = BigDecimal.ZERO; @@ -125,15 +126,15 @@ private BigDecimal calculateUsingDailyBalanceMethod(final SavingsCompoundingInte interestOnBalanceUnrounded = balance.calculateInterestOnBalanceAndInterest(interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; case MONTHLY: interestOnBalanceUnrounded = balance.calculateInterestOnBalance(interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; case QUATERLY: interestOnBalanceUnrounded = balance.calculateInterestOnBalance(interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; // case WEEKLY: // break; // case BIWEEKLY: @@ -141,15 +142,15 @@ private BigDecimal calculateUsingDailyBalanceMethod(final SavingsCompoundingInte case BI_ANNUAL: interestOnBalanceUnrounded = balance.calculateInterestOnBalance(interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; case ANNUAL: interestOnBalanceUnrounded = balance.calculateInterestOnBalance(interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; // case NO_COMPOUNDING_SIMPLE_INTEREST: // break; case INVALID: - break; + break; } interestEarned = interestEarned.add(interestOnBalanceUnrounded); @@ -158,7 +159,7 @@ private BigDecimal calculateUsingDailyBalanceMethod(final SavingsCompoundingInte } private static List endOfDayBalancesWithinPeriodInterval(final LocalDateInterval compoundingPeriodInterval, - final List allEndOfDayBalances, final LocalDate upToInterestCalculationDate) { + final List allEndOfDayBalances, final LocalDate upToInterestCalculationDate) { final List endOfDayBalancesForPeriodInterval = new ArrayList<>(); diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/CompoundInterestHelper.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/CompoundInterestHelper.java index c0840503512..e69738527bc 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/CompoundInterestHelper.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/CompoundInterestHelper.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; import org.apache.fineract.organisation.monetary.domain.Money; @@ -39,7 +40,7 @@ public class CompoundInterestHelper { * @return */ public Money calculateInterestForAllPostingPeriods(final MonetaryCurrency currency, final List allPeriods, - LocalDate lockUntil, Boolean interestTransferEnabled) { + LocalDate lockUntil, Boolean interestTransferEnabled) { // sum up the 'rounded' values that are posted each posting period Money interestEarned = Money.zero(currency); diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/CompoundInterestValues.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/CompoundInterestValues.java index 68cfc07cd77..c73d9eb71ba 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/CompoundInterestValues.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/CompoundInterestValues.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/CompoundingPeriod.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/CompoundingPeriod.java index 206341710e4..5ed4892bc22 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/CompoundingPeriod.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/CompoundingPeriod.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.savings.domain.interest; import java.math.BigDecimal; + import org.apache.fineract.infrastructure.core.domain.LocalDateInterval; import org.apache.fineract.portfolio.savings.SavingsCompoundingInterestPeriodType; import org.apache.fineract.portfolio.savings.SavingsInterestCalculationType; @@ -26,9 +27,9 @@ public interface CompoundingPeriod { BigDecimal calculateInterest(SavingsCompoundingInterestPeriodType compoundingInterestPeriodType, - SavingsInterestCalculationType interestCalculationType, BigDecimal interestFromPreviousPostingPeriod, - BigDecimal interestRateAsFraction, long daysInYear, BigDecimal minBalanceForInterestCalculation, - BigDecimal overdraftInterestRateAsFraction, BigDecimal minOverdraftForInterestCalculation); + SavingsInterestCalculationType interestCalculationType, BigDecimal interestFromPreviousPostingPeriod, + BigDecimal interestRateAsFraction, long daysInYear, BigDecimal minBalanceForInterestCalculation, + BigDecimal overdraftInterestRateAsFraction, BigDecimal minOverdraftForInterestCalculation); LocalDateInterval getPeriodInterval(); } diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/DailyCompoundingPeriod.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/DailyCompoundingPeriod.java index c46b5518a94..143ca711233 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/DailyCompoundingPeriod.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/DailyCompoundingPeriod.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.domain.LocalDateInterval; import org.apache.fineract.portfolio.savings.SavingsCompoundingInterestPeriodType; import org.apache.fineract.portfolio.savings.SavingsInterestCalculationType; @@ -33,7 +34,7 @@ public final class DailyCompoundingPeriod implements CompoundingPeriod { private final List endOfDayBalances; public static DailyCompoundingPeriod create(final LocalDateInterval periodInterval, final List allEndOfDayBalances, - final LocalDate upToInterestCalculationDate) { + final LocalDate upToInterestCalculationDate) { final List endOfDayBalancesWithinPeriod = endOfDayBalancesWithinPeriodInterval(periodInterval, allEndOfDayBalances, upToInterestCalculationDate); @@ -42,7 +43,7 @@ public static DailyCompoundingPeriod create(final LocalDateInterval periodInterv } private static List endOfDayBalancesWithinPeriodInterval(final LocalDateInterval compoundingPeriodInterval, - final List allEndOfDayBalances, final LocalDate upToInterestCalculationDate) { + final List allEndOfDayBalances, final LocalDate upToInterestCalculationDate) { final List endOfDayBalancesForPeriodInterval = new ArrayList<>(); @@ -75,9 +76,9 @@ private DailyCompoundingPeriod(final LocalDateInterval periodInterval, final Lis @Override public BigDecimal calculateInterest(final SavingsCompoundingInterestPeriodType compoundingInterestPeriodType, - final SavingsInterestCalculationType interestCalculationType, final BigDecimal interestFromPreviousPostingPeriod, - final BigDecimal interestRateAsFraction, final long daysInYear, final BigDecimal minBalanceForInterestCalculation, - final BigDecimal overdraftInterestRateAsFraction, final BigDecimal minOverdraftForInterestCalculation) { + final SavingsInterestCalculationType interestCalculationType, final BigDecimal interestFromPreviousPostingPeriod, + final BigDecimal interestRateAsFraction, final long daysInYear, final BigDecimal minBalanceForInterestCalculation, + final BigDecimal overdraftInterestRateAsFraction, final BigDecimal minOverdraftForInterestCalculation) { BigDecimal interestEarned = BigDecimal.ZERO; // for daily compounding - each interest calculated from previous daily diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/EndOfDayBalance.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/EndOfDayBalance.java index ce821427c42..218c25750e8 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/EndOfDayBalance.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/EndOfDayBalance.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.domain.LocalDateInterval; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.organisation.monetary.domain.Money; @@ -34,7 +35,7 @@ public class EndOfDayBalance { private final int numberOfDays; public static EndOfDayBalance from(final LocalDate date, final Money openingBalance, final Money endOfDayBalance, - final int numberOfDays) { + final int numberOfDays) { return new EndOfDayBalance(date, openingBalance, endOfDayBalance, numberOfDays); } @@ -61,8 +62,8 @@ public BigDecimal cumulativeBalance(final BigDecimal interestToCompound) { } public BigDecimal calculateInterestOnBalance(final BigDecimal interestToCompound, final BigDecimal interestRateAsFraction, - final long daysInYear, final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, - final BigDecimal minOverdraftForInterestCalculation) { + final long daysInYear, final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, + final BigDecimal minOverdraftForInterestCalculation) { BigDecimal interest = BigDecimal.ZERO.setScale(9, MoneyHelper.getRoundingMode()); final BigDecimal realBalanceForInterestCalculation = this.endOfDayBalance.getAmount().add(interestToCompound); @@ -95,8 +96,8 @@ public BigDecimal calculateInterestOnBalance(final BigDecimal interestToCompound * nominalInterestRateAsFraction x 1/365 n = number of periods rate is compounded */ public BigDecimal calculateInterestOnBalanceAndInterest(final BigDecimal interestToCompound, final BigDecimal interestRateAsFraction, - final long daysInYear, final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, - final BigDecimal minOverdraftForInterestCalculation) { + final long daysInYear, final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, + final BigDecimal minOverdraftForInterestCalculation) { final BigDecimal multiplicand = BigDecimal.ONE.divide(BigDecimal.valueOf(daysInYear), MathContext.DECIMAL64); final BigDecimal presentValue = this.endOfDayBalance.getAmount().add(interestToCompound); diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/MonthlyCompoundingPeriod.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/MonthlyCompoundingPeriod.java index 7d406d026dd..76ae68bbdec 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/MonthlyCompoundingPeriod.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/MonthlyCompoundingPeriod.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.domain.LocalDateInterval; import org.apache.fineract.organisation.monetary.domain.MoneyHelper; import org.apache.fineract.portfolio.savings.SavingsCompoundingInterestPeriodType; @@ -35,7 +36,7 @@ public final class MonthlyCompoundingPeriod implements CompoundingPeriod { private final List endOfDayBalances; public static MonthlyCompoundingPeriod create(final LocalDateInterval periodInterval, final List allEndOfDayBalances, - final LocalDate upToInterestCalculationDate) { + final LocalDate upToInterestCalculationDate) { final List endOfDayBalancesWithinPeriod = endOfDayBalancesWithinPeriodInterval(periodInterval, allEndOfDayBalances, upToInterestCalculationDate); @@ -45,9 +46,9 @@ public static MonthlyCompoundingPeriod create(final LocalDateInterval periodInte @Override public BigDecimal calculateInterest(final SavingsCompoundingInterestPeriodType compoundingInterestPeriodType, - final SavingsInterestCalculationType interestCalculationType, final BigDecimal interestToCompound, - final BigDecimal interestRateAsFraction, final long daysInYear, final BigDecimal minBalanceForInterestCalculation, - final BigDecimal overdraftInterestRateAsFraction, final BigDecimal minOverdraftForInterestCalculation) { + final SavingsInterestCalculationType interestCalculationType, final BigDecimal interestToCompound, + final BigDecimal interestRateAsFraction, final long daysInYear, final BigDecimal minBalanceForInterestCalculation, + final BigDecimal overdraftInterestRateAsFraction, final BigDecimal minOverdraftForInterestCalculation) { BigDecimal interestEarned = BigDecimal.ZERO; @@ -55,21 +56,21 @@ public BigDecimal calculateInterest(final SavingsCompoundingInterestPeriodType c case DAILY_BALANCE: interestEarned = calculateUsingDailyBalanceMethod(compoundingInterestPeriodType, interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; case AVERAGE_DAILY_BALANCE: interestEarned = calculateUsingAverageDailyBalanceMethod(interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; case INVALID: - break; + break; } return interestEarned; } private BigDecimal calculateUsingAverageDailyBalanceMethod(final BigDecimal interestToCompound, final BigDecimal interestRateAsFraction, - final long daysInYear, final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, - final BigDecimal minOverdraftForInterestCalculation) { + final long daysInYear, final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, + final BigDecimal minOverdraftForInterestCalculation) { BigDecimal cumulativeBalance = BigDecimal.ZERO; Integer numberOfDays = Integer.valueOf(0); @@ -112,9 +113,9 @@ private BigDecimal calculateUsingAverageDailyBalanceMethod(final BigDecimal inte } private BigDecimal calculateUsingDailyBalanceMethod(final SavingsCompoundingInterestPeriodType compoundingInterestPeriodType, - final BigDecimal interestToCompound, final BigDecimal interestRateAsFraction, final long daysInYear, - final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, - final BigDecimal minOverdraftForInterestCalculation) { + final BigDecimal interestToCompound, final BigDecimal interestRateAsFraction, final long daysInYear, + final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, + final BigDecimal minOverdraftForInterestCalculation) { BigDecimal interestEarned = BigDecimal.ZERO; BigDecimal interestOnBalanceUnrounded = BigDecimal.ZERO; @@ -125,11 +126,11 @@ private BigDecimal calculateUsingDailyBalanceMethod(final SavingsCompoundingInte interestOnBalanceUnrounded = balance.calculateInterestOnBalanceAndInterest(interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; case MONTHLY: interestOnBalanceUnrounded = balance.calculateInterestOnBalance(interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; // case QUATERLY: // break; // case WEEKLY: @@ -143,9 +144,9 @@ private BigDecimal calculateUsingDailyBalanceMethod(final SavingsCompoundingInte // case NO_COMPOUNDING_SIMPLE_INTEREST: // break; case INVALID: - break; + break; default: - break; + break; } interestEarned = interestEarned.add(interestOnBalanceUnrounded); @@ -154,7 +155,7 @@ private BigDecimal calculateUsingDailyBalanceMethod(final SavingsCompoundingInte } private static List endOfDayBalancesWithinPeriodInterval(final LocalDateInterval compoundingPeriodInterval, - final List allEndOfDayBalances, final LocalDate upToInterestCalculationDate) { + final List allEndOfDayBalances, final LocalDate upToInterestCalculationDate) { final List endOfDayBalancesForPeriodInterval = new ArrayList<>(); diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/PostingPeriod.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/PostingPeriod.java index 65130e998c6..2a4f6d22e96 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/PostingPeriod.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/PostingPeriod.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.Collection; import java.util.List; import java.util.TreeSet; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.infrastructure.core.domain.LocalDateInterval; @@ -75,12 +76,12 @@ public void setOverdraftInterestRateAsFraction(BigDecimal overdraftInterestRateA } public static PostingPeriod createFrom(final LocalDateInterval periodInterval, final Money periodStartingBalance, - final List orderedListOfTransactions, final MonetaryCurrency currency, - final SavingsCompoundingInterestPeriodType interestCompoundingPeriodType, - final SavingsInterestCalculationType interestCalculationType, final BigDecimal interestRateAsFraction, final long daysInYear, - final LocalDate upToInterestCalculationDate, Collection interestPostTransactions, boolean isInterestTransfer, - final Money minBalanceForInterestCalculation, final boolean isSavingsInterestPostingAtCurrentPeriodEnd, - final boolean isUserPosting, Integer financialYearBeginningMonth) { + final List orderedListOfTransactions, final MonetaryCurrency currency, + final SavingsCompoundingInterestPeriodType interestCompoundingPeriodType, + final SavingsInterestCalculationType interestCalculationType, final BigDecimal interestRateAsFraction, final long daysInYear, + final LocalDate upToInterestCalculationDate, Collection interestPostTransactions, boolean isInterestTransfer, + final Money minBalanceForInterestCalculation, final boolean isSavingsInterestPostingAtCurrentPeriodEnd, + final boolean isUserPosting, Integer financialYearBeginningMonth) { final BigDecimal overdraftInterestRateAsFraction = BigDecimal.ZERO; final Money minOverdraftForInterestCalculation = Money.zero(currency); @@ -94,13 +95,13 @@ public static PostingPeriod createFrom(final LocalDateInterval periodInterval, f // isInterestTransfer boolean is to identify newly created transaction is // interest transfer public static PostingPeriod createFrom(final LocalDateInterval periodInterval, final Money periodStartingBalance, - final List orderedListOfTransactions, final MonetaryCurrency currency, - final SavingsCompoundingInterestPeriodType interestCompoundingPeriodType, - final SavingsInterestCalculationType interestCalculationType, final BigDecimal interestRateAsFraction, final long daysInYear, - final LocalDate upToInterestCalculationDate, Collection interestPostTransactions, boolean isInterestTransfer, - final Money minBalanceForInterestCalculation, final boolean isSavingsInterestPostingAtCurrentPeriodEnd, - final BigDecimal overdraftInterestRateAsFraction, final Money minOverdraftForInterestCalculation, boolean isUserPosting, - int financialYearBeginningMonth) { + final List orderedListOfTransactions, final MonetaryCurrency currency, + final SavingsCompoundingInterestPeriodType interestCompoundingPeriodType, + final SavingsInterestCalculationType interestCalculationType, final BigDecimal interestRateAsFraction, final long daysInYear, + final LocalDate upToInterestCalculationDate, Collection interestPostTransactions, boolean isInterestTransfer, + final Money minBalanceForInterestCalculation, final boolean isSavingsInterestPostingAtCurrentPeriodEnd, + final BigDecimal overdraftInterestRateAsFraction, final Money minOverdraftForInterestCalculation, boolean isUserPosting, + int financialYearBeginningMonth) { final List accountEndOfDayBalances = new ArrayList<>(); boolean interestTransfered = false; @@ -167,13 +168,13 @@ public static PostingPeriod createFrom(final LocalDateInterval periodInterval, f } public static PostingPeriod createFromDTO(final LocalDateInterval periodInterval, final Money periodStartingBalance, - final List orderedListOfTransactions, final MonetaryCurrency currency, - final SavingsCompoundingInterestPeriodType interestCompoundingPeriodType, - final SavingsInterestCalculationType interestCalculationType, final BigDecimal interestRateAsFraction, final long daysInYear, - final LocalDate upToInterestCalculationDate, Collection interestPostTransactions, boolean isInterestTransfer, - final Money minBalanceForInterestCalculation, final boolean isSavingsInterestPostingAtCurrentPeriodEnd, - final BigDecimal overdraftInterestRateAsFraction, final Money minOverdraftForInterestCalculation, boolean isUserPosting, - int financialYearBeginningMonth, final boolean isAllowOverdraft) { + final List orderedListOfTransactions, final MonetaryCurrency currency, + final SavingsCompoundingInterestPeriodType interestCompoundingPeriodType, + final SavingsInterestCalculationType interestCalculationType, final BigDecimal interestRateAsFraction, final long daysInYear, + final LocalDate upToInterestCalculationDate, Collection interestPostTransactions, boolean isInterestTransfer, + final Money minBalanceForInterestCalculation, final boolean isSavingsInterestPostingAtCurrentPeriodEnd, + final BigDecimal overdraftInterestRateAsFraction, final Money minOverdraftForInterestCalculation, boolean isUserPosting, + int financialYearBeginningMonth, final boolean isAllowOverdraft) { final List accountEndOfDayBalances = new ArrayList<>(); boolean interestTransfered = false; @@ -241,11 +242,11 @@ public static PostingPeriod createFromDTO(final LocalDateInterval periodInterval } private PostingPeriod(final LocalDateInterval periodInterval, final MonetaryCurrency currency, final Money openingBalance, - final Money closingBalance, final SavingsCompoundingInterestPeriodType interestCompoundingType, - final SavingsInterestCalculationType interestCalculationType, final BigDecimal interestRateAsFraction, final long daysInYear, - final List compoundingPeriods, boolean interestTransfered, final Money minBalanceForInterestCalculation, - final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final BigDecimal overdraftInterestRateAsFraction, - final Money minOverdraftForInterestCalculation, boolean isUserPosting, Integer financialYearBeginningMonth) { + final Money closingBalance, final SavingsCompoundingInterestPeriodType interestCompoundingType, + final SavingsInterestCalculationType interestCalculationType, final BigDecimal interestRateAsFraction, final long daysInYear, + final List compoundingPeriods, boolean interestTransfered, final Money minBalanceForInterestCalculation, + final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final BigDecimal overdraftInterestRateAsFraction, + final Money minOverdraftForInterestCalculation, boolean isUserPosting, Integer financialYearBeginningMonth) { this.periodInterval = periodInterval; this.currency = currency; this.openingBalance = openingBalance; @@ -324,19 +325,19 @@ public Money getInterestEarned() { } private static List compoundingPeriodsInPostingPeriod(final LocalDateInterval postingPeriodInterval, - final SavingsCompoundingInterestPeriodType interestPeriodType, final List allEndOfDayBalances, - final LocalDate upToInterestCalculationDate, int financialYearBeginningMonth) { + final SavingsCompoundingInterestPeriodType interestPeriodType, final List allEndOfDayBalances, + final LocalDate upToInterestCalculationDate, int financialYearBeginningMonth) { final List compoundingPeriods = new ArrayList<>(); CompoundingPeriod compoundingPeriod = null; switch (interestPeriodType) { case INVALID: - break; + break; case DAILY: compoundingPeriod = DailyCompoundingPeriod.create(postingPeriodInterval, allEndOfDayBalances, upToInterestCalculationDate); compoundingPeriods.add(compoundingPeriod); - break; + break; case MONTHLY: final LocalDate postingPeriodEndDate = postingPeriodInterval.endDate(); @@ -361,7 +362,7 @@ private static List compoundingPeriodsInPostingPeriod(final L // move periodStartDate forward to day after this period periodStartDate = periodEndDate.plusDays(1); } - break; + break; // case WEEKLY: // break; // case BIWEEKLY: @@ -390,7 +391,7 @@ private static List compoundingPeriodsInPostingPeriod(final L // move periodStartDate forward to day after this period periodStartDate = periodEndDate.plusDays(1); } - break; + break; case BI_ANNUAL: final LocalDate bPostingPeriodEndDate = postingPeriodInterval.endDate(); @@ -416,7 +417,7 @@ private static List compoundingPeriodsInPostingPeriod(final L // move periodStartDate forward to day after this period periodStartDate = periodEndDate.plusDays(1); } - break; + break; case ANNUAL: final LocalDate aPostingPeriodEndDate = postingPeriodInterval.endDate(); @@ -443,7 +444,7 @@ private static List compoundingPeriodsInPostingPeriod(final L // move periodStartDate forward to day after this period periodStartDate = periodEndDate.plusDays(1); } - break; + break; // case NO_COMPOUNDING_SIMPLE_INTEREST: // break; } @@ -452,8 +453,8 @@ private static List compoundingPeriodsInPostingPeriod(final L } private static LocalDate determineInterestPeriodEndDateFrom(final LocalDate periodStartDate, - final SavingsCompoundingInterestPeriodType interestPeriodType, final LocalDate upToInterestCalculationDate, - int financialYearBeginningMonth) { + final SavingsCompoundingInterestPeriodType interestPeriodType, final LocalDate upToInterestCalculationDate, + int financialYearBeginningMonth) { LocalDate periodEndDate = upToInterestCalculationDate; int previousMonth = financialYearBeginningMonth - 1; @@ -463,10 +464,10 @@ private static LocalDate determineInterestPeriodEndDateFrom(final LocalDate peri int periodsInMonth = 1; switch (interestPeriodType) { case INVALID: - break; + break; case DAILY: periodEndDate = periodStartDate; - break; + break; // case WEEKLY: // periodEndDate = periodStartDate.dayOfWeek().withMaximumValue(); // break; @@ -478,23 +479,23 @@ private static LocalDate determineInterestPeriodEndDateFrom(final LocalDate peri case MONTHLY: // produce period end date on last day of current month periodEndDate = periodStartDate.with(TemporalAdjusters.lastDayOfMonth()); - break; + break; case QUATERLY: periodsInMonth = 4; periodEndDate = getPeriodEndDate(periodEndDate, previousMonth, periodsInMonth, periodStartDate); - break; + break; case BI_ANNUAL: periodsInMonth = 2; periodEndDate = getPeriodEndDate(periodEndDate, previousMonth, periodsInMonth, periodStartDate); - break; + break; case ANNUAL: periodEndDate = periodStartDate.withMonth(previousMonth); periodEndDate = periodEndDate.with(TemporalAdjusters.lastDayOfMonth()); if (DateUtils.isBefore(periodEndDate, periodStartDate)) { periodEndDate = periodEndDate.plusYears(1); } - break; + break; // case NO_COMPOUNDING_SIMPLE_INTEREST: // periodEndDate = periodStartDate.monthOfYear().withMaximumValue(); diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/QuarterlyCompoundingPeriod.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/QuarterlyCompoundingPeriod.java index c2faa8a4711..04b8e01a651 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/QuarterlyCompoundingPeriod.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/QuarterlyCompoundingPeriod.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.domain.LocalDateInterval; import org.apache.fineract.organisation.monetary.domain.MoneyHelper; import org.apache.fineract.portfolio.savings.SavingsCompoundingInterestPeriodType; @@ -34,7 +35,7 @@ public final class QuarterlyCompoundingPeriod implements CompoundingPeriod { private final List endOfDayBalances; public static QuarterlyCompoundingPeriod create(final LocalDateInterval periodInterval, final List allEndOfDayBalances, - final LocalDate upToInterestCalculationDate) { + final LocalDate upToInterestCalculationDate) { final List endOfDayBalancesWithinPeriod = endOfDayBalancesWithinPeriodInterval(periodInterval, allEndOfDayBalances, upToInterestCalculationDate); @@ -44,9 +45,9 @@ public static QuarterlyCompoundingPeriod create(final LocalDateInterval periodIn @Override public BigDecimal calculateInterest(final SavingsCompoundingInterestPeriodType compoundingInterestPeriodType, - final SavingsInterestCalculationType interestCalculationType, final BigDecimal interestToCompound, - final BigDecimal interestRateAsFraction, final long daysInYear, final BigDecimal minBalanceForInterestCalculation, - final BigDecimal overdraftInterestRateAsFraction, final BigDecimal minOverdraftForInterestCalculation) { + final SavingsInterestCalculationType interestCalculationType, final BigDecimal interestToCompound, + final BigDecimal interestRateAsFraction, final long daysInYear, final BigDecimal minBalanceForInterestCalculation, + final BigDecimal overdraftInterestRateAsFraction, final BigDecimal minOverdraftForInterestCalculation) { BigDecimal interestEarned = BigDecimal.ZERO; @@ -54,21 +55,21 @@ public BigDecimal calculateInterest(final SavingsCompoundingInterestPeriodType c case DAILY_BALANCE: interestEarned = calculateUsingDailyBalanceMethod(compoundingInterestPeriodType, interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; case AVERAGE_DAILY_BALANCE: interestEarned = calculateUsingAverageDailyBalanceMethod(interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; case INVALID: - break; + break; } return interestEarned; } private BigDecimal calculateUsingAverageDailyBalanceMethod(final BigDecimal interestToCompound, final BigDecimal interestRateAsFraction, - final long daysInYear, final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, - final BigDecimal minOverdraftForInterestCalculation) { + final long daysInYear, final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, + final BigDecimal minOverdraftForInterestCalculation) { BigDecimal cumulativeBalance = BigDecimal.ZERO; Integer numberOfDays = Integer.valueOf(0); @@ -111,9 +112,9 @@ private BigDecimal calculateUsingAverageDailyBalanceMethod(final BigDecimal inte } private BigDecimal calculateUsingDailyBalanceMethod(final SavingsCompoundingInterestPeriodType compoundingInterestPeriodType, - final BigDecimal interestToCompound, final BigDecimal interestRateAsFraction, final long daysInYear, - final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, - final BigDecimal minOverdraftForInterestCalculation) { + final BigDecimal interestToCompound, final BigDecimal interestRateAsFraction, final long daysInYear, + final BigDecimal minBalanceForInterestCalculation, final BigDecimal overdraftInterestRateAsFraction, + final BigDecimal minOverdraftForInterestCalculation) { BigDecimal interestEarned = BigDecimal.ZERO; BigDecimal interestOnBalanceUnrounded = BigDecimal.ZERO; @@ -124,15 +125,15 @@ private BigDecimal calculateUsingDailyBalanceMethod(final SavingsCompoundingInte interestOnBalanceUnrounded = balance.calculateInterestOnBalanceAndInterest(interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; case MONTHLY: interestOnBalanceUnrounded = balance.calculateInterestOnBalance(interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; case QUATERLY: interestOnBalanceUnrounded = balance.calculateInterestOnBalance(interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; // case WEEKLY: // break; // case BIWEEKLY: @@ -140,15 +141,15 @@ private BigDecimal calculateUsingDailyBalanceMethod(final SavingsCompoundingInte case BI_ANNUAL: interestOnBalanceUnrounded = balance.calculateInterestOnBalance(interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; case ANNUAL: interestOnBalanceUnrounded = balance.calculateInterestOnBalance(interestToCompound, interestRateAsFraction, daysInYear, minBalanceForInterestCalculation, overdraftInterestRateAsFraction, minOverdraftForInterestCalculation); - break; + break; // case NO_COMPOUNDING_SIMPLE_INTEREST: // break; case INVALID: - break; + break; } interestEarned = interestEarned.add(interestOnBalanceUnrounded); @@ -157,7 +158,7 @@ private BigDecimal calculateUsingDailyBalanceMethod(final SavingsCompoundingInte } private static List endOfDayBalancesWithinPeriodInterval(final LocalDateInterval compoundingPeriodInterval, - final List allEndOfDayBalances, final LocalDate upToInterestCalculationDate) { + final List allEndOfDayBalances, final LocalDate upToInterestCalculationDate) { final List endOfDayBalancesForPeriodInterval = new ArrayList<>(); diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/SavingsAccountTransactionDetailsForPostingPeriod.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/SavingsAccountTransactionDetailsForPostingPeriod.java index 3a3145b377f..ec5f7b96910 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/SavingsAccountTransactionDetailsForPostingPeriod.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/domain/interest/SavingsAccountTransactionDetailsForPostingPeriod.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.LocalDateInterval; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsEnumerations.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsEnumerations.java index 2539af180b8..77b9e256cf6 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsEnumerations.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.fineract.accounting.common.AccountingEnumerations; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.savings.DepositAccountOnClosureType; @@ -87,23 +88,23 @@ public static EnumOptionData lockinPeriodFrequencyType(final SavingsPeriodFreque SavingsPeriodFrequencyType.INVALID.getCode(), "Invalid"); switch (type) { case INVALID: - break; + break; case DAYS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.DAYS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.DAYS.getCode(), "Days"); - break; + break; case WEEKS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.WEEKS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.WEEKS.getCode(), "Weeks"); - break; + break; case MONTHS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.MONTHS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.MONTHS.getCode(), "Months"); - break; + break; case YEARS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.YEARS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.YEARS.getCode(), "Years"); - break; + break; } return optionData; } @@ -121,83 +122,83 @@ public static SavingsAccountTransactionEnumData transactionType(final SavingsAcc case INVALID: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.INVALID.getValue().longValue(), SavingsAccountTransactionType.INVALID.getCode(), "Invalid"); - break; + break; case DEPOSIT: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.DEPOSIT.getValue().longValue(), SavingsAccountTransactionType.DEPOSIT.getCode(), "Deposit"); - break; + break; case WITHDRAWAL: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.WITHDRAWAL.getValue().longValue(), SavingsAccountTransactionType.WITHDRAWAL.getCode(), "Withdrawal"); - break; + break; case ACCRUAL: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.ACCRUAL.getValue().longValue(), SavingsAccountTransactionType.ACCRUAL.getCode(), "Accrual"); - break; + break; case INTEREST_POSTING: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.INTEREST_POSTING.getValue().longValue(), SavingsAccountTransactionType.INTEREST_POSTING.getCode(), "Interest posting"); - break; + break; case WITHDRAWAL_FEE: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.WITHDRAWAL_FEE.getValue().longValue(), SavingsAccountTransactionType.WITHDRAWAL_FEE.getCode(), "Withdrawal fee"); - break; + break; case ANNUAL_FEE: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.ANNUAL_FEE.getValue().longValue(), SavingsAccountTransactionType.ANNUAL_FEE.getCode(), "Annual fee"); - break; + break; case APPROVE_TRANSFER: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.APPROVE_TRANSFER.getValue().longValue(), SavingsAccountTransactionType.APPROVE_TRANSFER.getCode(), "Transfer approved"); - break; + break; case INITIATE_TRANSFER: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.INITIATE_TRANSFER.getValue().longValue(), SavingsAccountTransactionType.INITIATE_TRANSFER.getCode(), "Transfer initiated"); - break; + break; case REJECT_TRANSFER: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.REJECT_TRANSFER.getValue().longValue(), SavingsAccountTransactionType.REJECT_TRANSFER.getCode(), "Transfer Rejected"); - break; + break; case WITHDRAW_TRANSFER: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.WITHDRAW_TRANSFER.getValue().longValue(), SavingsAccountTransactionType.WITHDRAW_TRANSFER.getCode(), "Transfer Withdrawn"); - break; + break; case PAY_CHARGE: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.PAY_CHARGE.getValue().longValue(), SavingsAccountTransactionType.PAY_CHARGE.getCode(), "Pay Charge"); - break; + break; case WAIVE_CHARGES: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.WAIVE_CHARGES.getValue().longValue(), SavingsAccountTransactionType.WAIVE_CHARGES.getCode(), "Waive Charge"); - break; + break; case WRITTEN_OFF: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.WRITTEN_OFF.getValue().longValue(), SavingsAccountTransactionType.WRITTEN_OFF.getCode(), "writtenoff"); - break; + break; case OVERDRAFT_INTEREST: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.OVERDRAFT_INTEREST.getValue().longValue(), SavingsAccountTransactionType.OVERDRAFT_INTEREST.getCode(), "Overdraft Interest"); - break; + break; case WITHHOLD_TAX: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.WITHHOLD_TAX.getValue().longValue(), SavingsAccountTransactionType.WITHHOLD_TAX.getCode(), "Withhold Tax"); - break; + break; case DIVIDEND_PAYOUT: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.DIVIDEND_PAYOUT.getValue().longValue(), SavingsAccountTransactionType.DIVIDEND_PAYOUT.getCode(), "Dividend Payout"); - break; + break; case ESCHEAT: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.ESCHEAT.getValue().longValue(), SavingsAccountTransactionType.ESCHEAT.getCode(), "Escheat"); - break; + break; case AMOUNT_HOLD: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.AMOUNT_HOLD.getValue().longValue(), SavingsAccountTransactionType.AMOUNT_HOLD.getCode(), "Amount on hold"); - break; + break; case AMOUNT_RELEASE: optionData = new SavingsAccountTransactionEnumData(SavingsAccountTransactionType.AMOUNT_RELEASE.getValue().longValue(), SavingsAccountTransactionType.AMOUNT_RELEASE.getCode(), "Release Amount"); - break; + break; } return optionData; } @@ -237,63 +238,63 @@ public static SavingsAccountStatusEnumData status(final SavingsAccountStatusType optionData = new SavingsAccountStatusEnumData(SavingsAccountStatusType.INVALID.getValue().longValue(), SavingsAccountStatusType.INVALID.getCode(), "Invalid", submittedAndPendingApproval, isApproved, isRejected, isWithdrawnByApplicant, isActive, isClosed, isPrematureClosed, isTransferInProgress, isTransferOnHold, matured); - break; + break; case SUBMITTED_AND_PENDING_APPROVAL: optionData = new SavingsAccountStatusEnumData( SavingsAccountStatusType.SUBMITTED_AND_PENDING_APPROVAL.getValue().longValue(), SavingsAccountStatusType.SUBMITTED_AND_PENDING_APPROVAL.getCode(), "Submitted and pending approval", submittedAndPendingApproval, isApproved, isRejected, isWithdrawnByApplicant, isActive, isClosed, isPrematureClosed, isTransferInProgress, isTransferOnHold, matured); - break; + break; case REJECTED: optionData = new SavingsAccountStatusEnumData(SavingsAccountStatusType.REJECTED.getValue().longValue(), SavingsAccountStatusType.REJECTED.getCode(), "Rejected", submittedAndPendingApproval, isApproved, isRejected, isWithdrawnByApplicant, isActive, isClosed, isPrematureClosed, isTransferInProgress, isTransferOnHold, matured); - break; + break; case WITHDRAWN_BY_APPLICANT: optionData = new SavingsAccountStatusEnumData(SavingsAccountStatusType.WITHDRAWN_BY_APPLICANT.getValue().longValue(), SavingsAccountStatusType.WITHDRAWN_BY_APPLICANT.getCode(), "Withdrawn by applicant", submittedAndPendingApproval, isApproved, isRejected, isWithdrawnByApplicant, isActive, isClosed, isPrematureClosed, isTransferInProgress, isTransferOnHold, matured); - break; + break; case APPROVED: optionData = new SavingsAccountStatusEnumData(SavingsAccountStatusType.APPROVED.getValue().longValue(), SavingsAccountStatusType.APPROVED.getCode(), "Approved", submittedAndPendingApproval, isApproved, isRejected, isWithdrawnByApplicant, isActive, isClosed, isPrematureClosed, isTransferInProgress, isTransferOnHold, matured); - break; + break; case ACTIVE: optionData = new SavingsAccountStatusEnumData(SavingsAccountStatusType.ACTIVE.getValue().longValue(), SavingsAccountStatusType.ACTIVE.getCode(), "Active", submittedAndPendingApproval, isApproved, isRejected, isWithdrawnByApplicant, isActive, isClosed, isPrematureClosed, isTransferInProgress, isTransferOnHold, matured); - break; + break; case CLOSED: optionData = new SavingsAccountStatusEnumData(SavingsAccountStatusType.CLOSED.getValue().longValue(), SavingsAccountStatusType.CLOSED.getCode(), "Closed", submittedAndPendingApproval, isApproved, isRejected, isWithdrawnByApplicant, isActive, isClosed, isPrematureClosed, isTransferInProgress, isTransferOnHold, matured); - break; + break; case TRANSFER_IN_PROGRESS: optionData = new SavingsAccountStatusEnumData(SavingsAccountStatusType.TRANSFER_IN_PROGRESS.getValue().longValue(), SavingsAccountStatusType.TRANSFER_IN_PROGRESS.getCode(), "Transfer in progress", submittedAndPendingApproval, isApproved, isRejected, isWithdrawnByApplicant, isActive, isClosed, isPrematureClosed, isTransferInProgress, isTransferOnHold, matured); - break; + break; case TRANSFER_ON_HOLD: optionData = new SavingsAccountStatusEnumData(SavingsAccountStatusType.TRANSFER_ON_HOLD.getValue().longValue(), SavingsAccountStatusType.TRANSFER_ON_HOLD.getCode(), "Transfer on hold", submittedAndPendingApproval, isApproved, isRejected, isWithdrawnByApplicant, isActive, isClosed, isPrematureClosed, isTransferInProgress, isTransferOnHold, matured); - break; + break; case PRE_MATURE_CLOSURE: optionData = new SavingsAccountStatusEnumData(SavingsAccountStatusType.PRE_MATURE_CLOSURE.getValue().longValue(), SavingsAccountStatusType.PRE_MATURE_CLOSURE.getCode(), "Premature Closed", submittedAndPendingApproval, isApproved, isRejected, isWithdrawnByApplicant, isActive, isClosed, isPrematureClosed, isTransferInProgress, isTransferOnHold, matured); - break; + break; case MATURED: optionData = new SavingsAccountStatusEnumData(SavingsAccountStatusType.MATURED.getValue().longValue(), SavingsAccountStatusType.MATURED.getCode(), "Matured", submittedAndPendingApproval, isApproved, isRejected, isWithdrawnByApplicant, isActive, isClosed, isPrematureClosed, isTransferInProgress, isTransferOnHold, matured); - break; + break; } return optionData; } @@ -321,34 +322,34 @@ public static SavingsAccountSubStatusEnumData subStatus(final SavingsAccountSubS optionData = new SavingsAccountSubStatusEnumData(SavingsAccountSubStatusEnum.INACTIVE.getValue().longValue(), SavingsAccountSubStatusEnum.INACTIVE.getCode(), "Inactive", none, inactive, dormant, escheat, block, blockCredit, blockDebit); - break; + break; case DORMANT: optionData = new SavingsAccountSubStatusEnumData(SavingsAccountSubStatusEnum.DORMANT.getValue().longValue(), SavingsAccountSubStatusEnum.DORMANT.getCode(), "Dormant", none, inactive, dormant, escheat, block, blockCredit, blockDebit); - break; + break; case ESCHEAT: optionData = new SavingsAccountSubStatusEnumData(SavingsAccountSubStatusEnum.ESCHEAT.getValue().longValue(), SavingsAccountSubStatusEnum.ESCHEAT.getCode(), "Escheat", none, inactive, dormant, escheat, block, blockCredit, blockDebit); - break; + break; case BLOCK: optionData = new SavingsAccountSubStatusEnumData(SavingsAccountSubStatusEnum.BLOCK.getValue().longValue(), SavingsAccountSubStatusEnum.BLOCK.getCode(), "Block", none, inactive, dormant, escheat, block, blockCredit, blockDebit); - break; + break; case BLOCK_CREDIT: optionData = new SavingsAccountSubStatusEnumData(SavingsAccountSubStatusEnum.BLOCK_CREDIT.getValue().longValue(), SavingsAccountSubStatusEnum.BLOCK_CREDIT.getCode(), "BlockCredit", none, inactive, dormant, escheat, block, blockCredit, blockDebit); - break; + break; case BLOCK_DEBIT: optionData = new SavingsAccountSubStatusEnumData(SavingsAccountSubStatusEnum.BLOCK_DEBIT.getValue().longValue(), SavingsAccountSubStatusEnum.BLOCK_DEBIT.getCode(), "BlockDebit", none, inactive, dormant, escheat, block, blockCredit, blockDebit); - break; + break; default: - break; + break; } return optionData; } @@ -365,27 +366,27 @@ public static EnumOptionData interestPostingPeriodType(final SavingsPostingInter switch (type) { case INVALID: - break; + break; case DAILY: optionData = new EnumOptionData(SavingsPostingInterestPeriodType.DAILY.getValue().longValue(), codePrefix + SavingsPostingInterestPeriodType.DAILY.getCode(), "Daily"); - break; + break; case MONTHLY: optionData = new EnumOptionData(SavingsPostingInterestPeriodType.MONTHLY.getValue().longValue(), codePrefix + SavingsPostingInterestPeriodType.MONTHLY.getCode(), "Monthly"); - break; + break; case QUATERLY: optionData = new EnumOptionData(SavingsPostingInterestPeriodType.QUATERLY.getValue().longValue(), codePrefix + SavingsPostingInterestPeriodType.QUATERLY.getCode(), "Quarterly"); - break; + break; case BIANNUAL: optionData = new EnumOptionData(SavingsPostingInterestPeriodType.BIANNUAL.getValue().longValue(), codePrefix + SavingsPostingInterestPeriodType.BIANNUAL.getCode(), "BiAnnual"); - break; + break; case ANNUAL: optionData = new EnumOptionData(SavingsPostingInterestPeriodType.ANNUAL.getValue().longValue(), codePrefix + SavingsPostingInterestPeriodType.ANNUAL.getCode(), "Annually"); - break; + break; } return optionData; @@ -403,11 +404,11 @@ public static EnumOptionData compoundingInterestPeriodType(final SavingsCompound switch (type) { case INVALID: - break; + break; case DAILY: optionData = new EnumOptionData(SavingsCompoundingInterestPeriodType.DAILY.getValue().longValue(), codePrefix + SavingsCompoundingInterestPeriodType.DAILY.getCode(), "Daily"); - break; + break; // case WEEKLY: // optionData = new // EnumOptionData(SavingsCompoundingInterestPeriodType.WEEKLY.getValue().longValue(), @@ -425,19 +426,19 @@ public static EnumOptionData compoundingInterestPeriodType(final SavingsCompound case MONTHLY: optionData = new EnumOptionData(SavingsCompoundingInterestPeriodType.MONTHLY.getValue().longValue(), codePrefix + SavingsCompoundingInterestPeriodType.MONTHLY.getCode(), "Monthly"); - break; + break; case QUATERLY: optionData = new EnumOptionData(SavingsCompoundingInterestPeriodType.QUATERLY.getValue().longValue(), codePrefix + SavingsCompoundingInterestPeriodType.QUATERLY.getCode(), "Quarterly"); - break; + break; case BI_ANNUAL: optionData = new EnumOptionData(SavingsCompoundingInterestPeriodType.BI_ANNUAL.getValue().longValue(), codePrefix + SavingsCompoundingInterestPeriodType.BI_ANNUAL.getCode(), "Semi-Annual"); - break; + break; case ANNUAL: optionData = new EnumOptionData(SavingsCompoundingInterestPeriodType.ANNUAL.getValue().longValue(), codePrefix + SavingsCompoundingInterestPeriodType.ANNUAL.getCode(), "Annually"); - break; + break; // case NO_COMPOUNDING_SIMPLE_INTEREST: // optionData = new // EnumOptionData(SavingsCompoundingInterestPeriodType.NO_COMPOUNDING_SIMPLE_INTEREST.getValue().longValue(), @@ -461,15 +462,15 @@ public static EnumOptionData interestCalculationType(final SavingsInterestCalcul switch (type) { case INVALID: - break; + break; case DAILY_BALANCE: optionData = new EnumOptionData(SavingsInterestCalculationType.DAILY_BALANCE.getValue().longValue(), SavingsInterestCalculationType.DAILY_BALANCE.getCode(), "Daily Balance"); - break; + break; case AVERAGE_DAILY_BALANCE: optionData = new EnumOptionData(SavingsInterestCalculationType.AVERAGE_DAILY_BALANCE.getValue().longValue(), SavingsInterestCalculationType.AVERAGE_DAILY_BALANCE.getCode(), "Average Daily Balance"); - break; + break; } return optionData; @@ -485,15 +486,15 @@ public static EnumOptionData interestCalculationDaysInYearType(final SavingsInte switch (type) { case INVALID: - break; + break; case DAYS_360: optionData = new EnumOptionData(SavingsInterestCalculationDaysInYearType.DAYS_360.getValue().longValue(), SavingsInterestCalculationDaysInYearType.DAYS_360.getCode(), "360 Days"); - break; + break; case DAYS_365: optionData = new EnumOptionData(SavingsInterestCalculationDaysInYearType.DAYS_365.getValue().longValue(), SavingsInterestCalculationDaysInYearType.DAYS_365.getCode(), "365 Days"); - break; + break; } return optionData; @@ -509,15 +510,15 @@ public static EnumOptionData withdrawalFeeType(final SavingsWithdrawalFeesType t switch (type) { case INVALID: - break; + break; case FLAT: optionData = new EnumOptionData(SavingsWithdrawalFeesType.FLAT.getValue().longValue(), SavingsWithdrawalFeesType.FLAT.getCode(), "Flat"); - break; + break; case PERCENT_OF_AMOUNT: optionData = new EnumOptionData(SavingsWithdrawalFeesType.PERCENT_OF_AMOUNT.getValue().longValue(), SavingsWithdrawalFeesType.PERCENT_OF_AMOUNT.getCode(), "% of Amount"); - break; + break; } return optionData; @@ -533,15 +534,15 @@ public static EnumOptionData preClosurePenaltyInterestOnType(final PreClosurePen switch (type) { case INVALID: - break; + break; case WHOLE_TERM: optionData = new EnumOptionData(PreClosurePenalInterestOnType.WHOLE_TERM.getValue().longValue(), PreClosurePenalInterestOnType.WHOLE_TERM.getCode(), "Whole term"); - break; + break; case TILL_PREMATURE_WITHDRAWAL: optionData = new EnumOptionData(PreClosurePenalInterestOnType.TILL_PREMATURE_WITHDRAWAL.getValue().longValue(), PreClosurePenalInterestOnType.TILL_PREMATURE_WITHDRAWAL.getCode(), "Till Premature Withdrawal"); - break; + break; } return optionData; @@ -567,15 +568,15 @@ public static EnumOptionData recurringDepositType(final RecurringDepositType typ switch (type) { case INVALID: - break; + break; case VOLUNTARY: optionData = new EnumOptionData(RecurringDepositType.VOLUNTARY.getValue().longValue(), RecurringDepositType.VOLUNTARY.getCode(), "Voluntary"); - break; + break; case MANDATORY: optionData = new EnumOptionData(RecurringDepositType.MANDATORY.getValue().longValue(), RecurringDepositType.MANDATORY.getCode(), "Mandatory"); - break; + break; } return optionData; @@ -601,23 +602,23 @@ public static EnumOptionData recurringDepositFrequencyType(final SavingsPeriodFr SavingsPeriodFrequencyType.INVALID.getCode(), "Invalid"); switch (type) { case INVALID: - break; + break; case DAYS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.DAYS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.DAYS.getCode(), "Days"); - break; + break; case WEEKS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.WEEKS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.WEEKS.getCode(), "Weeks"); - break; + break; case MONTHS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.MONTHS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.MONTHS.getCode(), "Months"); - break; + break; case YEARS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.YEARS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.YEARS.getCode(), "Years"); - break; + break; } return optionData; } @@ -642,23 +643,23 @@ public static EnumOptionData depositTermFrequencyType(final SavingsPeriodFrequen SavingsPeriodFrequencyType.INVALID.getCode(), "Invalid"); switch (type) { case INVALID: - break; + break; case DAYS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.DAYS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.DAYS.getCode(), "Days"); - break; + break; case WEEKS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.WEEKS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.WEEKS.getCode(), "Weeks"); - break; + break; case MONTHS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.MONTHS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.MONTHS.getCode(), "Months"); - break; + break; case YEARS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.YEARS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.YEARS.getCode(), "Years"); - break; + break; } return optionData; } @@ -673,23 +674,23 @@ public static EnumOptionData inMultiplesOfDepositTermFrequencyType(final Savings SavingsPeriodFrequencyType.INVALID.getCode(), "Invalid"); switch (type) { case INVALID: - break; + break; case DAYS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.DAYS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.DAYS.getCode(), "Days"); - break; + break; case WEEKS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.WEEKS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.WEEKS.getCode(), "Weeks"); - break; + break; case MONTHS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.MONTHS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.MONTHS.getCode(), "Months"); - break; + break; case YEARS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.YEARS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.YEARS.getCode(), "Years"); - break; + break; } return optionData; } @@ -703,23 +704,23 @@ public static EnumOptionData depositType(final DepositAccountType type) { DepositAccountType.INVALID.getCode(), "Invalid"); switch (type) { case INVALID: - break; + break; case SAVINGS_DEPOSIT: optionData = new EnumOptionData(DepositAccountType.SAVINGS_DEPOSIT.getValue().longValue(), DepositAccountType.SAVINGS_DEPOSIT.getCode(), "Savings"); - break; + break; case FIXED_DEPOSIT: optionData = new EnumOptionData(DepositAccountType.FIXED_DEPOSIT.getValue().longValue(), DepositAccountType.FIXED_DEPOSIT.getCode(), "Fixed Deposit"); - break; + break; case RECURRING_DEPOSIT: optionData = new EnumOptionData(DepositAccountType.RECURRING_DEPOSIT.getValue().longValue(), DepositAccountType.RECURRING_DEPOSIT.getCode(), "Recurring Deposit"); - break; + break; case CURRENT_DEPOSIT: optionData = new EnumOptionData(DepositAccountType.CURRENT_DEPOSIT.getValue().longValue(), DepositAccountType.CURRENT_DEPOSIT.getCode(), "Current Deposit"); - break; + break; } return optionData; } @@ -744,23 +745,23 @@ public static EnumOptionData depositPeriodFrequency(final SavingsPeriodFrequency SavingsPeriodFrequencyType.INVALID.getCode(), "Invalid"); switch (type) { case INVALID: - break; + break; case DAYS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.DAYS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.DAYS.getCode(), "Days"); - break; + break; case WEEKS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.WEEKS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.WEEKS.getCode(), "Weeks"); - break; + break; case MONTHS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.MONTHS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.MONTHS.getCode(), "Months"); - break; + break; case YEARS: optionData = new EnumOptionData(SavingsPeriodFrequencyType.YEARS.getValue().longValue(), codePrefix + SavingsPeriodFrequencyType.YEARS.getCode(), "Years"); - break; + break; } return optionData; } @@ -784,23 +785,23 @@ public static EnumOptionData depositAccountOnClosureType(final DepositAccountOnC DepositAccountOnClosureType.INVALID.getCode(), "Invalid"); switch (type) { case INVALID: - break; + break; case WITHDRAW_DEPOSIT: optionData = new EnumOptionData(DepositAccountOnClosureType.WITHDRAW_DEPOSIT.getValue().longValue(), DepositAccountOnClosureType.WITHDRAW_DEPOSIT.getCode(), "Withdraw Deposit"); - break; + break; case TRANSFER_TO_SAVINGS: optionData = new EnumOptionData(DepositAccountOnClosureType.TRANSFER_TO_SAVINGS.getValue().longValue(), DepositAccountOnClosureType.TRANSFER_TO_SAVINGS.getCode(), "Transfer to Savings"); - break; + break; case REINVEST_PRINCIPAL_AND_INTEREST: optionData = new EnumOptionData(DepositAccountOnClosureType.REINVEST_PRINCIPAL_AND_INTEREST.getValue().longValue(), DepositAccountOnClosureType.REINVEST_PRINCIPAL_AND_INTEREST.getCode(), "Re-Invest Maturity Amount"); - break; + break; case REINVEST_PRINCIPAL_ONLY: optionData = new EnumOptionData(DepositAccountOnClosureType.REINVEST_PRINCIPAL_ONLY.getValue().longValue(), DepositAccountOnClosureType.REINVEST_PRINCIPAL_ONLY.getCode(), "Re-Invest Principal Only"); - break; + break; } return optionData; } @@ -824,15 +825,15 @@ public static EnumOptionData onHoldTransactionType(final DepositAccountOnHoldTra DepositAccountType.INVALID.getCode(), "Invalid"); switch (type) { case INVALID: - break; + break; case HOLD: optionData = new EnumOptionData(DepositAccountOnHoldTransactionType.HOLD.getValue().longValue(), DepositAccountOnHoldTransactionType.HOLD.getCode(), "hold"); - break; + break; case RELEASE: optionData = new EnumOptionData(DepositAccountOnHoldTransactionType.RELEASE.getValue().longValue(), DepositAccountOnHoldTransactionType.RELEASE.getCode(), "release"); - break; + break; } return optionData; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/SearchConstants.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/SearchConstants.java index a340a1ace08..420645dc6b5 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/SearchConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/SearchConstants.java @@ -6,9 +6,9 @@ * 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 @@ -35,7 +35,8 @@ public final class SearchConstants { public static final String API_PARAM_DATETIME_FORMAT = "dateTimeFormat"; public static final String API_PARAM_LOCALE = "locale"; - private SearchConstants() {} + private SearchConstants() { + } public enum SearchResponseParameters { diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/AdHocQuerySearchConditions.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/AdHocQuerySearchConditions.java index 208bdebacfd..e48fccbb46d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/AdHocQuerySearchConditions.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/AdHocQuerySearchConditions.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.domain.LoanStatus; public class AdHocQuerySearchConditions { @@ -44,12 +45,12 @@ public class AdHocQuerySearchConditions { private final BigDecimal outstandingAmount; public static AdHocQuerySearchConditions instance(final List loanStatus, final List loanProducts, - final List offices, final String loanDateOption, final LocalDate loanFromDate, final LocalDate loanToDate, - final Boolean includeOutStandingAmountPercentage, final String outStandingAmountPercentageCondition, - final BigDecimal minOutStandingAmountPercentage, final BigDecimal maxOutStandingAmountPercentage, - final BigDecimal outStandingAmountPercentage, final Boolean includeOutstandingAmountParamName, - final String outstandingAmountCondition, final BigDecimal minOutstandingAmount, final BigDecimal maxOutstandingAmount, - final BigDecimal outstandingAmount) { + final List offices, final String loanDateOption, final LocalDate loanFromDate, final LocalDate loanToDate, + final Boolean includeOutStandingAmountPercentage, final String outStandingAmountPercentageCondition, + final BigDecimal minOutStandingAmountPercentage, final BigDecimal maxOutStandingAmountPercentage, + final BigDecimal outStandingAmountPercentage, final Boolean includeOutstandingAmountParamName, + final String outstandingAmountCondition, final BigDecimal minOutstandingAmount, final BigDecimal maxOutstandingAmount, + final BigDecimal outstandingAmount) { return new AdHocQuerySearchConditions(loanStatus, loanProducts, offices, loanDateOption, loanFromDate, loanToDate, includeOutStandingAmountPercentage, outStandingAmountPercentageCondition, minOutStandingAmountPercentage, @@ -59,11 +60,11 @@ public static AdHocQuerySearchConditions instance(final List loanStatus, } public AdHocQuerySearchConditions(final List loanStatus, final List loanProducts, final List offices, - final String loanDateOption, final LocalDate loanFromDate, final LocalDate loanToDate, - final Boolean includeOutStandingAmountPercentage, final String outStandingAmountPercentageCondition, - final BigDecimal minOutStandingAmountPercentage, final BigDecimal maxOutStandingAmountPercentage, - final BigDecimal outStandingAmountPercentage, final Boolean includeOutstandingAmount, final String outstandingAmountCondition, - final BigDecimal minOutstandingAmount, final BigDecimal maxOutstandingAmount, final BigDecimal outstandingAmount) { + final String loanDateOption, final LocalDate loanFromDate, final LocalDate loanToDate, + final Boolean includeOutStandingAmountPercentage, final String outStandingAmountPercentageCondition, + final BigDecimal minOutStandingAmountPercentage, final BigDecimal maxOutStandingAmountPercentage, + final BigDecimal outStandingAmountPercentage, final Boolean includeOutstandingAmount, final String outstandingAmountCondition, + final BigDecimal minOutstandingAmount, final BigDecimal maxOutstandingAmount, final BigDecimal outstandingAmount) { this.loanStatus = loanStatus; this.loanProducts = loanProducts; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/AdvancedQueryData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/AdvancedQueryData.java index b5a9a21c449..60efe4faa5d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/AdvancedQueryData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/AdvancedQueryData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/AdvancedQueryRequest.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/AdvancedQueryRequest.java index 4e5c1ef7b33..463a81d2b77 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/AdvancedQueryRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/AdvancedQueryRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/ColumnFilterData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/ColumnFilterData.java index a4c7ba74636..70f0b1001ba 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/ColumnFilterData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/ColumnFilterData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/FilterData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/FilterData.java index 58345f2bc15..5416005a476 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/FilterData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/FilterData.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.io.Serializable; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/SearchConditions.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/SearchConditions.java index 8138606db83..a710f7e1389 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/SearchConditions.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/SearchConditions.java @@ -6,9 +6,9 @@ * 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 @@ -53,8 +53,8 @@ public SearchConditions(final String searchQueryParam, final String searchResour } public SearchConditions(final String searchQueryParam, final String searchResource, final Boolean clientSearch, - final Boolean groupSearch, final Boolean loanSeach, final Boolean savingSeach, final Boolean shareSeach, - final Boolean clientIdentifierSearch, Boolean exactMatch, final String hierarchy) { + final Boolean groupSearch, final Boolean loanSeach, final Boolean savingSeach, final Boolean shareSeach, + final Boolean clientIdentifierSearch, Boolean exactMatch, final String hierarchy) { this.searchQuery = searchQueryParam; this.searchResource = searchResource; this.clientSearch = clientSearch; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/SearchData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/SearchData.java index 0438156f78b..7d3775b72ee 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/SearchData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/SearchData.java @@ -6,9 +6,9 @@ * 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 @@ -37,8 +37,8 @@ public class SearchData { private final String subEntityType; public SearchData(final Long entityId, final String entityAccountNo, final String entityExternalId, final String entityName, - final String entityType, final Long parentId, final String parentName, final String parentType, final String entityMobileNo, - final EnumOptionData entityStatus, final String subEntityType) { + final String entityType, final Long parentId, final String parentName, final String parentType, final String entityMobileNo, + final EnumOptionData entityStatus, final String subEntityType) { this.entityId = entityId; this.entityAccountNo = entityAccountNo; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/TableQueryData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/TableQueryData.java index fe682442c9e..7a6bb911bc5 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/TableQueryData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/TableQueryData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.search.data; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/TransactionSearchRequest.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/TransactionSearchRequest.java index 5b495350734..4107dc41859 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/TransactionSearchRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/data/TransactionSearchRequest.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.Locale; + import lombok.Getter; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.core.service.MathUtil; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/service/SearchUtil.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/service/SearchUtil.java index 0107308eb6a..8b45e8e99e4 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/search/service/SearchUtil.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/search/service/SearchUtil.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import static org.apache.fineract.portfolio.search.SearchConstants.API_PARAM_COLUMN; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.sql.Date; import java.sql.Timestamp; @@ -38,6 +39,7 @@ import java.util.Map; import java.util.function.Predicate; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.BooleanUtils; @@ -75,12 +77,12 @@ public Map mapHeadersToName(@NonNull Collecti } public ResultsetColumnHeaderData findFiltered(@NonNull Collection columnHeaders, - @NonNull Predicate filter) { + @NonNull Predicate filter) { return columnHeaders.stream().filter(filter).findFirst().orElse(null); } public ResultsetColumnHeaderData getFiltered(@NonNull Collection columnHeaders, - @NonNull Predicate filter) { + @NonNull Predicate filter) { ResultsetColumnHeaderData filtered = findFiltered(columnHeaders, filter); if (filtered == null) { throw new PlatformDataIntegrityException("error.msg.column.not.exists", "Column filtered does not exist"); @@ -89,7 +91,7 @@ public ResultsetColumnHeaderData getFiltered(@NonNull Collection selectColumns, @NonNull List resultColumns, - @NonNull List results) { + @NonNull List results) { JsonObject json = new JsonObject(); for (int i = 0; i < selectColumns.size(); i++) { Object rowValue = rowSet.getObject(selectColumns.get(i)); @@ -122,14 +124,14 @@ public void extractJsonResult(@NonNull SqlRowSet rowSet, @NonNull List s @NonNull public List validateToJdbcColumnNames(List columns, Map headersByName, - boolean allowEmpty) { + boolean allowEmpty) { List columnHeaders = validateToJdbcColumns(columns, headersByName, allowEmpty); return columnHeaders.stream().map(e -> e == null ? null : e.getColumnName()).toList(); } @NonNull public List validateToJdbcColumns(List columns, Map headersByName, - boolean allowEmpty) { + boolean allowEmpty) { final List errors = new ArrayList<>(); List result = new ArrayList<>(); @@ -152,7 +154,7 @@ public String validateToJdbcColumnName(String column, Map headersByName, - boolean allowEmpty) { + boolean allowEmpty) { final List errors = new ArrayList<>(); ResultsetColumnHeaderData columnHeader = validateToJdbcColumnImpl(column, headersByName, errors, allowEmpty); if (!errors.isEmpty()) { @@ -162,7 +164,7 @@ public ResultsetColumnHeaderData validateToJdbcColumn(String column, @NonNull Ma } private ResultsetColumnHeaderData validateToJdbcColumnImpl(String column, @NonNull Map headersByName, - @NonNull List errors, boolean allowEmpty) { + @NonNull List errors, boolean allowEmpty) { if (!allowEmpty && column == null) { errors.add(parameterErrorWithValue("error.msg.column.empty", "Column filter is empty", API_PARAM_COLUMN, null)); } @@ -180,8 +182,8 @@ private ResultsetColumnHeaderData validateToJdbcColumnImpl(String column, @NonNu } public boolean buildQueryCondition(List columnFilters, @NonNull StringBuilder where, @NonNull List params, - String alias, Map headersByName, String dateFormat, String dateTimeFormat, Locale locale, - boolean embedded, @NonNull DatabaseSpecificSQLGenerator sqlGenerator) { + String alias, Map headersByName, String dateFormat, String dateTimeFormat, Locale locale, + boolean embedded, @NonNull DatabaseSpecificSQLGenerator sqlGenerator) { if (columnFilters == null) { return false; } @@ -199,8 +201,8 @@ public boolean buildQueryCondition(List columnFilters, @NonNul } public boolean buildFilterCondition(ColumnFilterData columnFilter, @NonNull StringBuilder where, @NonNull List params, - String alias, Map headersByName, String dateFormat, String dateTimeFormat, Locale locale, - boolean embedded, @NonNull DatabaseSpecificSQLGenerator sqlGenerator) { + String alias, Map headersByName, String dateFormat, String dateTimeFormat, Locale locale, + boolean embedded, @NonNull DatabaseSpecificSQLGenerator sqlGenerator) { String columnName = columnFilter.getColumn(); List filters = columnFilter.getFilters(); int size = filters.size(); @@ -215,8 +217,8 @@ public boolean buildFilterCondition(ColumnFilterData columnFilter, @NonNull Stri List values = filter.getValues(); List objectValues = values == null ? null : values.stream() - .map(e -> parseJdbcColumnValue(columnHeader, e, dateFormat, dateTimeFormat, locale, false, sqlGenerator)) - .toList(); + .map(e -> parseJdbcColumnValue(columnHeader, e, dateFormat, dateTimeFormat, locale, false, sqlGenerator)) + .toList(); buildCondition(columnHeader.getColumnName(), columnHeader.getColumnType(), operator, objectValues, where, params, alias, sqlGenerator); @@ -228,7 +230,7 @@ public boolean buildFilterCondition(ColumnFilterData columnFilter, @NonNull Stri } public void buildCondition(@NonNull String definition, JdbcJavaType columnType, @NonNull SqlOperator operator, List values, - @NonNull StringBuilder where, @NonNull List params, String alias, @NonNull DatabaseSpecificSQLGenerator sqlGenerator) { + @NonNull StringBuilder where, @NonNull List params, String alias, @NonNull DatabaseSpecificSQLGenerator sqlGenerator) { int paramCount = values == null ? 0 : values.size(); where.append(operator.formatPlaceholder(sqlGenerator, definition, paramCount, alias)); if (values != null) { @@ -237,13 +239,13 @@ public void buildCondition(@NonNull String definition, JdbcJavaType columnType, } public Object parseJdbcColumnValue(@NonNull ResultsetColumnHeaderData columnHeader, String columnValue, String dateFormat, - String dateTimeFormat, Locale locale, boolean strict, @NonNull DatabaseSpecificSQLGenerator sqlGenerator) { + String dateTimeFormat, Locale locale, boolean strict, @NonNull DatabaseSpecificSQLGenerator sqlGenerator) { return columnHeader.getColumnType().toJdbcValue(sqlGenerator.getDialect(), parseColumnValue(columnHeader, columnValue, dateFormat, dateTimeFormat, locale, strict, sqlGenerator), false); } public Object parseColumnValue(@NonNull ResultsetColumnHeaderData columnHeader, String columnValue, String dateFormat, - String dateTimeFormat, Locale locale, boolean strict, @NonNull DatabaseSpecificSQLGenerator sqlGenerator) { + String dateTimeFormat, Locale locale, boolean strict, @NonNull DatabaseSpecificSQLGenerator sqlGenerator) { JdbcJavaType colType = columnHeader.getColumnType(); if (!colType.isStringType() || !columnHeader.isMandatory()) { columnValue = StringUtils.trimToNull(columnValue); diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/shareproducts/constants/ShareProductApiConstants.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/shareproducts/constants/ShareProductApiConstants.java index 3819ab94e56..b6471934369 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/shareproducts/constants/ShareProductApiConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/shareproducts/constants/ShareProductApiConstants.java @@ -6,9 +6,9 @@ * 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 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..46f1352c9fb 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 @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.Collection; import java.util.List; import java.util.Map; + import lombok.AllArgsConstructor; import lombok.Getter; import org.apache.fineract.accounting.glaccount.data.GLAccountData; @@ -49,8 +50,8 @@ 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 debitAccount, final EnumOptionData creditAccountType, + final GLAccountData creditAccount, 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, @@ -72,7 +73,7 @@ public static TaxComponentData lookup(final Long id, final String name) { } public static TaxComponentData template(final Map> glAccountOptions, - final Collection glAccountTypeOptions) { + final Collection glAccountTypeOptions) { final Long id = null; final String name = null; final BigDecimal percentage = null; @@ -87,7 +88,7 @@ public static TaxComponentData template(final Map> g } private TaxComponentData(final Long id, final BigDecimal percentage, final GLAccountData debitAccount, - final GLAccountData creditAccount) { + final GLAccountData creditAccount) { this.id = id; this.percentage = percentage; this.name = null; @@ -102,7 +103,7 @@ private TaxComponentData(final Long id, final BigDecimal percentage, final GLAcc } public static TaxComponentData createTaxComponent(final Long id, final BigDecimal percentage, final GLAccountData debitAccount, - final GLAccountData creditAccount) { + final GLAccountData creditAccount) { return new TaxComponentData(id, percentage, debitAccount, creditAccount); } diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxComponentHistoryData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxComponentHistoryData.java index 17b9f18d0c2..68d2fe98cb8 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxComponentHistoryData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxComponentHistoryData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import org.apache.fineract.infrastructure.core.service.DateUtils; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxDetailsData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxDetailsData.java index 9184475aaa8..a0bc12f71ca 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxDetailsData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxDetailsData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.tax.data; import java.math.BigDecimal; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxGroupData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxGroupData.java index 5f9804536f6..0578d019fb2 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxGroupData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxGroupData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.util.Collection; + import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxGroupMappingsData.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxGroupMappingsData.java index 643a89eebbf..7afe2442e09 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxGroupMappingsData.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/data/TaxGroupMappingsData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; 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..1de3ed81fc3 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 @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.portfolio.tax.request; import com.fasterxml.jackson.annotation.JsonInclude; + import java.io.Serial; import java.io.Serializable; import java.math.BigDecimal; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/request/TaxGroupComponent.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/request/TaxGroupComponent.java index 258b719ffe0..a9b223b1f6c 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/request/TaxGroupComponent.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/request/TaxGroupComponent.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/request/TaxGroupRequest.java b/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/request/TaxGroupRequest.java index 87dc00d3f85..162e82f492d 100644 --- a/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/request/TaxGroupRequest.java +++ b/fineract-core/src/main/java/org/apache/fineract/portfolio/tax/request/TaxGroupRequest.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.util.Set; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-core/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiConstants.java b/fineract-core/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiConstants.java index 4dd9ed8eef3..3316b6a9bce 100644 --- a/fineract-core/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiConstants.java @@ -6,9 +6,9 @@ * 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 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 03de47a8153..4867c44d6eb 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 @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ 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; @@ -60,13 +61,13 @@ public final class AppUserData { private Set clients; public static AppUserData importInstance(Long officeId, Long staffId, String username, String firstname, String lastname, String email, - Boolean sendPasswordToEmail, Boolean passwordNeverExpires, List roleIds, Integer rowIndex) { + Boolean sendPasswordToEmail, Boolean passwordNeverExpires, List roleIds, Integer rowIndex) { return new AppUserData(officeId, staffId, username, firstname, lastname, email, sendPasswordToEmail, passwordNeverExpires, roleIds, rowIndex); } private AppUserData(Long officeId, Long staffId, String username, String firstname, String lastname, String email, - Boolean sendPasswordToEmail, Boolean passwordNeverExpires, List roleIds, Integer rowIndex) { + Boolean sendPasswordToEmail, Boolean passwordNeverExpires, List roleIds, Integer rowIndex) { this.id = null; this.username = username; this.officeId = officeId; @@ -100,16 +101,16 @@ public static AppUserData dropdown(final Long id, final String username) { } public static AppUserData instance(final Long id, final String username, final String email, final Long officeId, - final String officeName, final String firstname, final String lastname, final Collection availableRoles, - final Collection selectedRoles, final StaffData staff, final Boolean passwordNeverExpire) { + final String officeName, final String firstname, final String lastname, final Collection availableRoles, + final Collection selectedRoles, final StaffData staff, final Boolean passwordNeverExpire) { return new AppUserData(id, username, email, officeId, officeName, firstname, lastname, availableRoles, selectedRoles, null, staff, passwordNeverExpire); } private AppUserData(final Long id, final String username, final String email, final Long officeId, final String officeName, - final String firstname, final String lastname, final Collection availableRoles, - final Collection selectedRoles, final Collection allowedOffices, final StaffData staff, - final Boolean passwordNeverExpire) { + final String firstname, final String lastname, final Collection availableRoles, + final Collection selectedRoles, final Collection allowedOffices, final StaffData staff, + final Boolean passwordNeverExpire) { this.id = id; this.username = username; this.officeId = officeId; diff --git a/fineract-core/src/main/java/org/apache/fineract/useradministration/data/PermissionData.java b/fineract-core/src/main/java/org/apache/fineract/useradministration/data/PermissionData.java index d1cbc34ac20..fc29a745f03 100644 --- a/fineract-core/src/main/java/org/apache/fineract/useradministration/data/PermissionData.java +++ b/fineract-core/src/main/java/org/apache/fineract/useradministration/data/PermissionData.java @@ -6,9 +6,9 @@ * 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 @@ -39,12 +39,12 @@ public static PermissionData from(final String permissionCode, final boolean isS } public static PermissionData instance(final String grouping, final String code, final String entityName, final String actionName, - final Boolean selected) { + final Boolean selected) { return new PermissionData(grouping, code, entityName, actionName, selected); } private PermissionData(final String grouping, final String code, final String entityName, final String actionName, - final Boolean selected) { + final Boolean selected) { this.grouping = grouping; this.code = code; this.entityName = entityName; diff --git a/fineract-core/src/main/java/org/apache/fineract/useradministration/data/RoleData.java b/fineract-core/src/main/java/org/apache/fineract/useradministration/data/RoleData.java index 2f9e2859af1..bb0480386fb 100644 --- a/fineract-core/src/main/java/org/apache/fineract/useradministration/data/RoleData.java +++ b/fineract-core/src/main/java/org/apache/fineract/useradministration/data/RoleData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/useradministration/data/RolePermissionsData.java b/fineract-core/src/main/java/org/apache/fineract/useradministration/data/RolePermissionsData.java index 574c481c034..e5d22bc3120 100644 --- a/fineract-core/src/main/java/org/apache/fineract/useradministration/data/RolePermissionsData.java +++ b/fineract-core/src/main/java/org/apache/fineract/useradministration/data/RolePermissionsData.java @@ -6,9 +6,9 @@ * 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 @@ -38,7 +38,7 @@ public class RolePermissionsData { private final Collection permissionUsageData; public RolePermissionsData(final Long id, final String name, final String description, final Boolean disabled, - final Collection permissionUsageData) { + final Collection permissionUsageData) { this.id = id; this.name = name; this.description = description; diff --git a/fineract-core/src/main/java/org/apache/fineract/useradministration/domain/AppUser.java b/fineract-core/src/main/java/org/apache/fineract/useradministration/domain/AppUser.java index 29030614f29..4a60c2340f1 100644 --- a/fineract-core/src/main/java/org/apache/fineract/useradministration/domain/AppUser.java +++ b/fineract-core/src/main/java/org/apache/fineract/useradministration/domain/AppUser.java @@ -6,9 +6,9 @@ * 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 @@ -29,6 +29,7 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.time.LocalDate; import java.time.OffsetDateTime; import java.time.ZoneOffset; @@ -40,6 +41,7 @@ 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.infrastructure.core.api.JsonCommand; @@ -59,7 +61,7 @@ import org.springframework.security.core.userdetails.User; @Entity -@Table(name = "m_appuser", uniqueConstraints = @UniqueConstraint(columnNames = { "username" }, name = "username_org")) +@Table(name = "m_appuser", uniqueConstraints = @UniqueConstraint(columnNames = {"username"}, name = "username_org")) public class AppUser extends AbstractPersistableCustom implements PlatformUser { @Getter @@ -209,7 +211,7 @@ protected AppUser() { } public AppUser(final Office office, final User user, final Set roles, final String email, final String firstname, - final String lastname, final Staff staff, final boolean passwordNeverExpire, final Boolean cannotChangePassword) { + final String lastname, final Staff staff, final boolean passwordNeverExpire, final Boolean cannotChangePassword) { this.office = office; this.email = email.trim(); this.username = user.getUsername().trim(); diff --git a/fineract-core/src/main/java/org/apache/fineract/useradministration/domain/Permission.java b/fineract-core/src/main/java/org/apache/fineract/useradministration/domain/Permission.java index 06c84c0cf88..2ff11264b1b 100644 --- a/fineract-core/src/main/java/org/apache/fineract/useradministration/domain/Permission.java +++ b/fineract-core/src/main/java/org/apache/fineract/useradministration/domain/Permission.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Table; + import java.io.Serializable; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @Entity diff --git a/fineract-core/src/main/java/org/apache/fineract/useradministration/domain/Role.java b/fineract-core/src/main/java/org/apache/fineract/useradministration/domain/Role.java index 9009e273f1d..224cdbfdc80 100644 --- a/fineract-core/src/main/java/org/apache/fineract/useradministration/domain/Role.java +++ b/fineract-core/src/main/java/org/apache/fineract/useradministration/domain/Role.java @@ -6,9 +6,9 @@ * 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 @@ -26,18 +26,20 @@ import jakarta.persistence.ManyToMany; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.io.Serializable; import java.util.Collection; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.useradministration.data.RoleData; @Entity -@Table(name = "m_role", uniqueConstraints = { @UniqueConstraint(columnNames = { "name" }, name = "unq_name") }) +@Table(name = "m_role", uniqueConstraints = {@UniqueConstraint(columnNames = {"name"}, name = "unq_name")}) public class Role extends AbstractPersistableCustom implements Serializable { @Column(name = "name", unique = true, nullable = false, length = 100) diff --git a/fineract-core/src/main/java/org/apache/fineract/useradministration/exception/UnAuthenticatedUserException.java b/fineract-core/src/main/java/org/apache/fineract/useradministration/exception/UnAuthenticatedUserException.java index 742dea73bad..062aafbaa09 100644 --- a/fineract-core/src/main/java/org/apache/fineract/useradministration/exception/UnAuthenticatedUserException.java +++ b/fineract-core/src/main/java/org/apache/fineract/useradministration/exception/UnAuthenticatedUserException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/useradministration/service/AppUserConstants.java b/fineract-core/src/main/java/org/apache/fineract/useradministration/service/AppUserConstants.java index 0dbcae5f700..029972ec1b8 100644 --- a/fineract-core/src/main/java/org/apache/fineract/useradministration/service/AppUserConstants.java +++ b/fineract-core/src/main/java/org/apache/fineract/useradministration/service/AppUserConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/main/java/org/apache/fineract/util/LoopContext.java b/fineract-core/src/main/java/org/apache/fineract/util/LoopContext.java index 4636bd41827..eabeef82163 100644 --- a/fineract-core/src/main/java/org/apache/fineract/util/LoopContext.java +++ b/fineract-core/src/main/java/org/apache/fineract/util/LoopContext.java @@ -6,9 +6,9 @@ * 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 @@ -18,4 +18,5 @@ */ package org.apache.fineract.util; -public interface LoopContext {} +public interface LoopContext { +} diff --git a/fineract-core/src/main/java/org/apache/fineract/util/LoopGuard.java b/fineract-core/src/main/java/org/apache/fineract/util/LoopGuard.java index 522aa3d1b10..a3366ea6e59 100644 --- a/fineract-core/src/main/java/org/apache/fineract/util/LoopGuard.java +++ b/fineract-core/src/main/java/org/apache/fineract/util/LoopGuard.java @@ -6,9 +6,9 @@ * 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 @@ -27,7 +27,8 @@ */ public final class LoopGuard { - private LoopGuard() {} + private LoopGuard() { + } public interface LoopBody { diff --git a/fineract-core/src/main/java/org/apache/fineract/util/StreamResponseUtil.java b/fineract-core/src/main/java/org/apache/fineract/util/StreamResponseUtil.java index 9beb490df40..8e4286897b4 100644 --- a/fineract-core/src/main/java/org/apache/fineract/util/StreamResponseUtil.java +++ b/fineract-core/src/main/java/org/apache/fineract/util/StreamResponseUtil.java @@ -6,9 +6,9 @@ * 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 @@ -22,12 +22,14 @@ import jakarta.ws.rs.core.HttpHeaders; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.StreamingOutput; + import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -44,7 +46,8 @@ public final class StreamResponseUtil { private static final ExecutorService executor = Executors.newCachedThreadPool(); - private StreamResponseUtil() {} + private StreamResponseUtil() { + } public static Response ok(final StreamResponseData content) { final var stream = new StreamingOutput() { diff --git a/fineract-core/src/main/java/org/apache/fineract/util/StreamUtil.java b/fineract-core/src/main/java/org/apache/fineract/util/StreamUtil.java index 6a327f3e7c8..b4d58fb626a 100644 --- a/fineract-core/src/main/java/org/apache/fineract/util/StreamUtil.java +++ b/fineract-core/src/main/java/org/apache/fineract/util/StreamUtil.java @@ -6,9 +6,9 @@ * 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 @@ -29,7 +29,8 @@ public final class StreamUtil { - private StreamUtil() {} + private StreamUtil() { + } public static Collector foldLeft(final B init, final BiFunction f) { return Collectors.collectingAndThen(Collectors.reducing(Function.identity(), a -> b -> f.apply(b, a), Function::andThen), diff --git a/fineract-core/src/main/java/org/springframework/batch/core/scope/context/JobSynchronizationManager.java b/fineract-core/src/main/java/org/springframework/batch/core/scope/context/JobSynchronizationManager.java index c4446ee5ebb..691b6753f2f 100644 --- a/fineract-core/src/main/java/org/springframework/batch/core/scope/context/JobSynchronizationManager.java +++ b/fineract-core/src/main/java/org/springframework/batch/core/scope/context/JobSynchronizationManager.java @@ -6,9 +6,9 @@ * 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 @@ -28,7 +28,7 @@ // Temporary solution until spring-batch fixes the concurrency issue // https://github.com/spring-projects/spring-batch/issues/4774 // Mostly copy from spring-batch -@SuppressWarnings({ "HideUtilityClassConstructor" }) +@SuppressWarnings({"HideUtilityClassConstructor"}) public class JobSynchronizationManager { private static final SynchronizationManagerSupport manager = new SynchronizationManagerSupport<>() { @@ -53,8 +53,8 @@ public static JobContext register(JobExecution jobExecution) { Enhancer enhancer = new Enhancer(); enhancer.setSuperclass(JobExecution.class); enhancer.setCallback(new TenantAwareEqualsHashCodeAdvice(jobExecution)); - return manager.register((JobExecution) enhancer.create(new Class[] { JobInstance.class, Long.class, JobParameters.class }, - new Object[] { jobExecution.getJobInstance(), jobExecution.getId(), jobExecution.getJobParameters() })); + return manager.register((JobExecution) enhancer.create(new Class[]{JobInstance.class, Long.class, JobParameters.class}, + new Object[]{jobExecution.getJobInstance(), jobExecution.getId(), jobExecution.getJobParameters()})); } public static void close() { diff --git a/fineract-core/src/main/java/org/springframework/batch/core/scope/context/StepSynchronizationManager.java b/fineract-core/src/main/java/org/springframework/batch/core/scope/context/StepSynchronizationManager.java index ca9e995e92d..027d3b5dab5 100644 --- a/fineract-core/src/main/java/org/springframework/batch/core/scope/context/StepSynchronizationManager.java +++ b/fineract-core/src/main/java/org/springframework/batch/core/scope/context/StepSynchronizationManager.java @@ -6,9 +6,9 @@ * 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 @@ -27,7 +27,7 @@ // Temporary solution until spring-batch fixes the concurrency issue // https://github.com/spring-projects/spring-batch/issues/4774 // Mostly copy from spring-batch -@SuppressWarnings({ "HideUtilityClassConstructor" }) +@SuppressWarnings({"HideUtilityClassConstructor"}) public class StepSynchronizationManager { private static final SynchronizationManagerSupport manager = new SynchronizationManagerSupport<>() { @@ -52,8 +52,8 @@ public static StepContext register(StepExecution stepExecution) { Enhancer enhancer = new Enhancer(); enhancer.setSuperclass(StepExecution.class); enhancer.setCallback(new TenantAwareEqualsHashCodeAdvice(stepExecution)); - return manager.register((StepExecution) enhancer.create(new Class[] { String.class, JobExecution.class }, - new Object[] { stepExecution.getStepName(), stepExecution.getJobExecution() })); + return manager.register((StepExecution) enhancer.create(new Class[]{String.class, JobExecution.class}, + new Object[]{stepExecution.getStepName(), stepExecution.getJobExecution()})); } public static void close() { diff --git a/fineract-core/src/main/resources/jpa/static-weaving/module/fineract-core/persistence.xml b/fineract-core/src/main/resources/jpa/static-weaving/module/fineract-core/persistence.xml index 9d833abefd1..4cf0f138755 100644 --- a/fineract-core/src/main/resources/jpa/static-weaving/module/fineract-core/persistence.xml +++ b/fineract-core/src/main/resources/jpa/static-weaving/module/fineract-core/persistence.xml @@ -74,7 +74,7 @@ false - + diff --git a/fineract-core/src/test/java/org/apache/fineract/batch/exception/ErrorHandlerTest.java b/fineract-core/src/test/java/org/apache/fineract/batch/exception/ErrorHandlerTest.java index dfcb12d527e..71695a07472 100644 --- a/fineract-core/src/test/java/org/apache/fineract/batch/exception/ErrorHandlerTest.java +++ b/fineract-core/src/test/java/org/apache/fineract/batch/exception/ErrorHandlerTest.java @@ -6,9 +6,9 @@ * 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 @@ -22,9 +22,11 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.ext.ExceptionMapper; + import java.util.InputMismatchException; import java.util.Map; import java.util.NoSuchElementException; + import org.apache.fineract.infrastructure.core.exception.ErrorHandler; import org.apache.fineract.infrastructure.core.exceptionmapper.DefaultExceptionMapper; import org.apache.fineract.infrastructure.core.exceptionmapper.FineractExceptionMapper; @@ -63,9 +65,9 @@ public void testErrorHandlerFound() { // given NullPointerException npe = new NullPointerException("Div by zero"); Mockito.when(applicationContext.getBeanNamesForType(forClassWithGenerics(ExceptionMapper.class, NullPointerException.class))) - .thenReturn(new String[] { "exceptionMapper1", "exceptionMapper2", "exceptionMapper3" }); + .thenReturn(new String[]{"exceptionMapper1", "exceptionMapper2", "exceptionMapper3"}); Mockito.when(applicationContext.getBeanNamesForType(FineractExceptionMapper.class)) - .thenReturn(new String[] { "exceptionMapper2", "exceptionMapper4" }); + .thenReturn(new String[]{"exceptionMapper2", "exceptionMapper4"}); Mockito.when(applicationContext.getBean("exceptionMapper2")).thenReturn(exceptionMapper); Mockito.when(exceptionMapper.toResponse(npe)).thenReturn(response); Mockito.when(response.getStatus()).thenReturn(406); @@ -88,11 +90,11 @@ public void testErrorHandlerChecksParentException() { // given InputMismatchException ime = new InputMismatchException("Input Mismatch"); Mockito.when(applicationContext.getBeanNamesForType(forClassWithGenerics(ExceptionMapper.class, InputMismatchException.class))) - .thenReturn(new String[] {}); // no direct handler for InputMismatchException + .thenReturn(new String[]{}); // no direct handler for InputMismatchException Mockito.when(applicationContext.getBeanNamesForType(forClassWithGenerics(ExceptionMapper.class, NoSuchElementException.class))) - .thenReturn(new String[] { "inputMismatchMapper" }); + .thenReturn(new String[]{"inputMismatchMapper"}); Mockito.when(applicationContext.getBeanNamesForType(FineractExceptionMapper.class)) - .thenReturn(new String[] { "inputMismatchMapper", "someOtherMapper", "yetAnotherMapper" }); + .thenReturn(new String[]{"inputMismatchMapper", "someOtherMapper", "yetAnotherMapper"}); Mockito.when(applicationContext.getBean("inputMismatchMapper")).thenReturn(inputMismatchMapper); Mockito.when(inputMismatchMapper.toResponse(ime)).thenReturn(response); Mockito.when(response.getStatus()).thenReturn(406); @@ -116,9 +118,9 @@ public void testErrorHandlerFallsBackToDefault() { // given NullPointerException npe = new NullPointerException("Div by zero"); Mockito.when(applicationContext.getBeanNamesForType(forClassWithGenerics(ExceptionMapper.class, NullPointerException.class))) - .thenReturn(new String[] {}); + .thenReturn(new String[]{}); Mockito.when(applicationContext.getBeanNamesForType(FineractExceptionMapper.class)) - .thenReturn(new String[] { "exceptionMapper2", "exceptionMapper4" }); + .thenReturn(new String[]{"exceptionMapper2", "exceptionMapper4"}); Mockito.when(defaultExceptionMapper.toResponse(npe)).thenReturn(response); Mockito.when(response.getStatus()).thenReturn(406); Mockito.when(response.getEntity()).thenReturn(Map.of("Exception", "message body")); diff --git a/fineract-core/src/test/java/org/apache/fineract/batch/service/BatchApiServiceImplTest.java b/fineract-core/src/test/java/org/apache/fineract/batch/service/BatchApiServiceImplTest.java index ccdcb662844..4a50c436993 100644 --- a/fineract-core/src/test/java/org/apache/fineract/batch/service/BatchApiServiceImplTest.java +++ b/fineract-core/src/test/java/org/apache/fineract/batch/service/BatchApiServiceImplTest.java @@ -6,9 +6,9 @@ * 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 @@ -36,8 +36,10 @@ import io.github.resilience4j.retry.RetryRegistry; import jakarta.persistence.EntityManager; import jakarta.ws.rs.core.UriInfo; + import java.time.Duration; import java.util.List; + import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.command.CommandStrategyProvider; import org.apache.fineract.batch.domain.BatchRequest; @@ -119,7 +121,7 @@ void setUp() { settings.getInstances().getExecuteCommand().setMaxAttempts(3); settings.getInstances().getExecuteCommand().setWaitDuration(Duration.ofMillis(2)); settings.getInstances().getExecuteCommand().setEnableExponentialBackoff(false); - settings.getInstances().getExecuteCommand().setRetryExceptions(new Class[] { RetryException.class }); + settings.getInstances().getExecuteCommand().setRetryExceptions(new Class[]{RetryException.class}); when(fineractProperties.getRetry()).thenReturn(settings); when(registry.retry(anyString(), any(RetryConfig.class))) .thenAnswer(i -> Retry.of((String) i.getArgument(0), (RetryConfig) i.getArgument(1))); @@ -234,7 +236,7 @@ void testHandleBatchRequestsWithEnclosingTransactionReadOnly() { } @ParameterizedTest - @ValueSource(booleans = { true, false }) + @ValueSource(booleans = {true, false}) void testCallInTransactionReadOnlyFlag(boolean isReadOnly) { // Given ExtendedJpaTransactionManager extendedJpaTransactionManager = mock(ExtendedJpaTransactionManager.class); @@ -270,6 +272,7 @@ void testCallInTransactionReadOnlyFlag(boolean isReadOnly) { .getTransaction(argThat(definition -> definition != null && definition.isReadOnly() == isReadOnly)); } - private static final class RetryException extends RuntimeException {} + private static final class RetryException extends RuntimeException { + } } diff --git a/fineract-core/src/test/java/org/apache/fineract/batch/service/ResolutionHelperTest.java b/fineract-core/src/test/java/org/apache/fineract/batch/service/ResolutionHelperTest.java index fcccb567d14..c665f5b55ff 100644 --- a/fineract-core/src/test/java/org/apache/fineract/batch/service/ResolutionHelperTest.java +++ b/fineract-core/src/test/java/org/apache/fineract/batch/service/ResolutionHelperTest.java @@ -6,9 +6,9 @@ * 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 @@ -26,8 +26,10 @@ import static org.mockito.Mockito.when; import com.jayway.jsonpath.ReadContext; + import java.util.ArrayList; import java.util.List; + import org.apache.fineract.batch.domain.BatchRequest; import org.apache.fineract.batch.domain.BatchResponse; import org.apache.fineract.batch.exception.BatchReferenceInvalidException; @@ -119,8 +121,8 @@ void testResolveRequestWithArrayDateParameter() { // Mock the response context ReadContext readContext = mock(ReadContext.class); - when(readContext.read("$.dates[0]")).thenReturn(new int[] { 2023, 5, 15 }); - when(readContext.read("$.dates[1]")).thenReturn(new int[] { 2023, 6, 15 }); + when(readContext.read("$.dates[0]")).thenReturn(new int[]{2023, 5, 15}); + when(readContext.read("$.dates[1]")).thenReturn(new int[]{2023, 6, 15}); BatchRequest resolvedRequest = resolutionHelper.resolveRequest(batchRequest, parentResponse); assertNotNull(resolvedRequest); diff --git a/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/config/FineractPropertiesTest.java b/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/config/FineractPropertiesTest.java index e6b77d5a80e..749857d37c1 100644 --- a/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/config/FineractPropertiesTest.java +++ b/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/config/FineractPropertiesTest.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.infrastructure.core.config; import com.google.common.collect.Maps; + import java.util.Map; + import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/data/DataValidatorBuilderDateFormatTest.java b/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/data/DataValidatorBuilderDateFormatTest.java index a4f1ac63465..774723e715c 100644 --- a/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/data/DataValidatorBuilderDateFormatTest.java +++ b/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/data/DataValidatorBuilderDateFormatTest.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.List; + import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.ValueSource; @@ -32,7 +33,7 @@ class DataValidatorBuilderDateFormatTest { private static final String PARAMETER = "dateFormat"; @ParameterizedTest - @ValueSource(strings = { "dd MMMM yyyy", "yyyy-MM-dd", "dd/MM/yyyy", "MM/dd/yyyy", "dd-MM-yyyy HH:mm:ss" }) + @ValueSource(strings = {"dd MMMM yyyy", "yyyy-MM-dd", "dd/MM/yyyy", "MM/dd/yyyy", "dd-MM-yyyy HH:mm:ss"}) void validDateTimeFormatPatternShouldAcceptValidPatterns(final String pattern) { final List errors = new ArrayList<>(); new DataValidatorBuilder(errors).resource(RESOURCE).parameter(PARAMETER).value(pattern).validDateTimeFormatPattern(); @@ -40,7 +41,7 @@ void validDateTimeFormatPatternShouldAcceptValidPatterns(final String pattern) { } @ParameterizedTest - @ValueSource(strings = { "02 February 2026", "not-a-pattern", "P!@#$", "{{invalid}}" }) + @ValueSource(strings = {"02 February 2026", "not-a-pattern", "P!@#$", "{{invalid}}"}) void validDateTimeFormatPatternShouldRejectInvalidPatterns(final String pattern) { final List errors = new ArrayList<>(); new DataValidatorBuilder(errors).resource(RESOURCE).parameter(PARAMETER).value(pattern).validDateTimeFormatPattern(); diff --git a/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/exception/IdempotencyCommandProcessFailedExceptionTest.java b/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/exception/IdempotencyCommandProcessFailedExceptionTest.java index 97d9a2f3587..5cd9e0de89d 100644 --- a/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/exception/IdempotencyCommandProcessFailedExceptionTest.java +++ b/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/exception/IdempotencyCommandProcessFailedExceptionTest.java @@ -6,9 +6,9 @@ * 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 @@ -22,10 +22,12 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import jakarta.ws.rs.core.Response; + import java.time.LocalDate; import java.time.ZoneId; import java.util.HashMap; import java.util.Map; + import org.apache.fineract.commands.domain.CommandSource; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.infrastructure.businessdate.domain.BusinessDateType; diff --git a/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/exceptionmapper/DefaultExceptionMapperTest.java b/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/exceptionmapper/DefaultExceptionMapperTest.java index 54afb5acb0d..9e531d0decd 100644 --- a/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/exceptionmapper/DefaultExceptionMapperTest.java +++ b/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/exceptionmapper/DefaultExceptionMapperTest.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; + import java.util.Map; + import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/serialization/JsonParserHelperTest.java b/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/serialization/JsonParserHelperTest.java index 3ed490d7e02..2c5b0504439 100644 --- a/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/serialization/JsonParserHelperTest.java +++ b/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/serialization/JsonParserHelperTest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/service/ExternalIdFactoryTest.java b/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/service/ExternalIdFactoryTest.java index db88c5613cc..a897504f095 100644 --- a/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/service/ExternalIdFactoryTest.java +++ b/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/service/ExternalIdFactoryTest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.List; + import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; diff --git a/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/service/database/DatabaseSpecificSQLGeneratorTest.java b/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/service/database/DatabaseSpecificSQLGeneratorTest.java index 37e68d58b38..fae1e00495e 100644 --- a/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/service/database/DatabaseSpecificSQLGeneratorTest.java +++ b/fineract-core/src/test/java/org/apache/fineract/infrastructure/core/service/database/DatabaseSpecificSQLGeneratorTest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/test/java/org/apache/fineract/infrastructure/security/utils/EncryptionUtilTest.java b/fineract-core/src/test/java/org/apache/fineract/infrastructure/security/utils/EncryptionUtilTest.java index 5ddd1e809ac..4b9c8ceae4c 100644 --- a/fineract-core/src/test/java/org/apache/fineract/infrastructure/security/utils/EncryptionUtilTest.java +++ b/fineract-core/src/test/java/org/apache/fineract/infrastructure/security/utils/EncryptionUtilTest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/test/java/org/apache/fineract/infrastructure/security/utils/SQLBuilderTest.java b/fineract-core/src/test/java/org/apache/fineract/infrastructure/security/utils/SQLBuilderTest.java index 45dc0e98c6c..ce495d037ad 100644 --- a/fineract-core/src/test/java/org/apache/fineract/infrastructure/security/utils/SQLBuilderTest.java +++ b/fineract-core/src/test/java/org/apache/fineract/infrastructure/security/utils/SQLBuilderTest.java @@ -6,9 +6,9 @@ * 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 @@ -39,7 +39,7 @@ void testAddCriteriaWithValidEquals() { builder.addCriteria("name =", "John"); // then Assertions.assertEquals(" WHERE name = ?", builder.getSQLTemplate()); - Assertions.assertArrayEquals(new Object[] { "John" }, builder.getArguments()); + Assertions.assertArrayEquals(new Object[]{"John"}, builder.getArguments()); } @Test @@ -128,7 +128,7 @@ void testAddNonNullCriteriaSkipsNull() { builder.addNonNullCriteria("name =", null); // then Assertions.assertEquals("", builder.getSQLTemplate()); - Assertions.assertArrayEquals(new Object[] {}, builder.getArguments()); + Assertions.assertArrayEquals(new Object[]{}, builder.getArguments()); } @Test @@ -139,7 +139,7 @@ void testAddNonNullCriteriaAddsWhenNotNull() { builder.addNonNullCriteria("name =", "John"); // then Assertions.assertEquals(" WHERE name = ?", builder.getSQLTemplate()); - Assertions.assertArrayEquals(new Object[] { "John" }, builder.getArguments()); + Assertions.assertArrayEquals(new Object[]{"John"}, builder.getArguments()); } @Test diff --git a/fineract-core/src/test/java/org/apache/fineract/organisation/monetary/domain/MoneyHelperTenantIsolationTest.java b/fineract-core/src/test/java/org/apache/fineract/organisation/monetary/domain/MoneyHelperTenantIsolationTest.java index 6b72ee0312f..fbf5ee16240 100644 --- a/fineract-core/src/test/java/org/apache/fineract/organisation/monetary/domain/MoneyHelperTenantIsolationTest.java +++ b/fineract-core/src/test/java/org/apache/fineract/organisation/monetary/domain/MoneyHelperTenantIsolationTest.java @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import java.math.MathContext; import java.math.RoundingMode; import java.util.Set; + import org.apache.fineract.infrastructure.core.domain.FineractPlatformTenant; import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil; import org.junit.jupiter.api.AfterEach; diff --git a/fineract-core/src/test/java/org/apache/fineract/organisation/monetary/domain/MoneyTest.java b/fineract-core/src/test/java/org/apache/fineract/organisation/monetary/domain/MoneyTest.java index b87ec9d529c..9e88eab052f 100644 --- a/fineract-core/src/test/java/org/apache/fineract/organisation/monetary/domain/MoneyTest.java +++ b/fineract-core/src/test/java/org/apache/fineract/organisation/monetary/domain/MoneyTest.java @@ -6,9 +6,9 @@ * 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 @@ -32,6 +32,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; + import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; diff --git a/fineract-core/src/test/java/org/apache/fineract/portfolio/savings/domain/SavingsHelperNPExceptionTest.java b/fineract-core/src/test/java/org/apache/fineract/portfolio/savings/domain/SavingsHelperNPExceptionTest.java index c614f88ddd6..a19c93e6fd8 100644 --- a/fineract-core/src/test/java/org/apache/fineract/portfolio/savings/domain/SavingsHelperNPExceptionTest.java +++ b/fineract-core/src/test/java/org/apache/fineract/portfolio/savings/domain/SavingsHelperNPExceptionTest.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.domain.LocalDateInterval; import org.apache.fineract.portfolio.savings.SavingsPostingInterestPeriodType; import org.junit.jupiter.api.Test; diff --git a/fineract-core/src/test/java/org/apache/fineract/portfolio/savings/service/SavingsEnumerationsTest.java b/fineract-core/src/test/java/org/apache/fineract/portfolio/savings/service/SavingsEnumerationsTest.java index 4f0ea3a05f1..af68b254981 100644 --- a/fineract-core/src/test/java/org/apache/fineract/portfolio/savings/service/SavingsEnumerationsTest.java +++ b/fineract-core/src/test/java/org/apache/fineract/portfolio/savings/service/SavingsEnumerationsTest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-core/src/test/java/org/apache/fineract/util/LoopGuardTest.java b/fineract-core/src/test/java/org/apache/fineract/util/LoopGuardTest.java index ab079465249..c7ec6c13d27 100644 --- a/fineract-core/src/test/java/org/apache/fineract/util/LoopGuardTest.java +++ b/fineract-core/src/test/java/org/apache/fineract/util/LoopGuardTest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Predicate; + import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -34,7 +35,7 @@ static class TestContext implements LoopContext { @ParameterizedTest // target value, max iterations - @CsvSource({ "3, 5", // + @CsvSource({"3, 5", // "5, 6", // "2, 10", // "2, 2", // @@ -52,7 +53,7 @@ void testSafeDoWhileLoopExecutesCorrectly(int targetValue, int maxIterations) { @ParameterizedTest // target value, max iterations - @CsvSource({ "2, 5", // + @CsvSource({"2, 5", // "4, 5", // "6, 10", // "2, 2" // @@ -70,7 +71,7 @@ void testSafeWhileLoopExecutesCorrectly(int targetValue, int maxIterations) { @ParameterizedTest // max iterations - @CsvSource({ "10", // + @CsvSource({"10", // "5", // "1", // "0", // @@ -90,7 +91,7 @@ void testSafeDoWhileLoopThrowsOnExceedingMaxIterations(int maxIterations) { @ParameterizedTest // max iterations - @CsvSource({ "10", // + @CsvSource({"10", // "3", // "2" // }) diff --git a/fineract-db/mifospltaform-tenants-first-time-install.sql b/fineract-db/mifospltaform-tenants-first-time-install.sql index aa298cef3d8..832db60a2c5 100644 --- a/fineract-db/mifospltaform-tenants-first-time-install.sql +++ b/fineract-db/mifospltaform-tenants-first-time-install.sql @@ -41,22 +41,23 @@ DROP TABLE IF EXISTS `schema_version`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `schema_version` ( - `version_rank` INT NOT NULL, - `installed_rank` INT NOT NULL, - `version` varchar(50) NOT NULL, - `description` varchar(200) NOT NULL, - `type` varchar(20) NOT NULL, - `script` varchar(1000) NOT NULL, - `checksum` INT DEFAULT NULL, - `installed_by` varchar(100) NOT NULL, - `installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `execution_time` INT NOT NULL, - `success` tinyint NOT NULL, - PRIMARY KEY (`version`), - KEY `schema_version_vr_idx` (`version_rank`), - KEY `schema_version_ir_idx` (`installed_rank`), - KEY `schema_version_s_idx` (`success`) +CREATE TABLE `schema_version` +( + `version_rank` INT NOT NULL, + `installed_rank` INT NOT NULL, + `version` varchar(50) NOT NULL, + `description` varchar(200) NOT NULL, + `type` varchar(20) NOT NULL, + `script` varchar(1000) NOT NULL, + `checksum` INT DEFAULT NULL, + `installed_by` varchar(100) NOT NULL, + `installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `execution_time` INT NOT NULL, + `success` tinyint NOT NULL, + PRIMARY KEY (`version`), + KEY `schema_version_vr_idx` (`version_rank`), + KEY `schema_version_ir_idx` (`installed_rank`), + KEY `schema_version_s_idx` (`success`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -64,12 +65,17 @@ CREATE TABLE `schema_version` ( -- Dumping data for table `schema_version` -- -LOCK TABLES `schema_version` WRITE; +LOCK +TABLES `schema_version` WRITE; /*!40000 ALTER TABLE `schema_version` DISABLE KEYS */; -INSERT INTO `schema_version` (`version_rank`, `installed_rank`, `version`, `description`, `type`, `script`, `checksum`, `installed_by`, `installed_on`, `execution_time`, `success`) VALUES - (1, 1, '1', 'mifos-platform-shared-tenants', 'SQL', 'V1__mifos-platform-shared-tenants.sql', -486745552, 'root', '2014-10-12 22:13:50', 896, 1), - (2, 2, '2', 'externalize-connection-properties', 'SQL', 'V2__externalize-connection-properties.sql', 210473669, 'root', '2014-10-12 22:13:51', 661, 1);/*!40000 ALTER TABLE `schema_version` ENABLE KEYS */; -UNLOCK TABLES; +INSERT INTO `schema_version` (`version_rank`, `installed_rank`, `version`, `description`, `type`, `script`, `checksum`, + `installed_by`, `installed_on`, `execution_time`, `success`) +VALUES (1, 1, '1', 'mifos-platform-shared-tenants', 'SQL', 'V1__mifos-platform-shared-tenants.sql', -486745552, 'root', + '2014-10-12 22:13:50', 896, 1), + (2, 2, '2', 'externalize-connection-properties', 'SQL', 'V2__externalize-connection-properties.sql', 210473669, + 'root', '2014-10-12 22:13:51', 661, 1);/*!40000 ALTER TABLE `schema_version` ENABLE KEYS */; +UNLOCK +TABLES; -- -- Table structure for table `tenants` @@ -78,36 +84,37 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `tenants`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `tenants` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `identifier` varchar(100) NOT NULL, - `name` varchar(100) NOT NULL, - `schema_name` varchar(100) NOT NULL, - `timezone_id` varchar(100) NOT NULL, - `country_id` INT DEFAULT NULL, - `joined_date` date DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - `schema_server` varchar(100) NOT NULL DEFAULT 'localhost', - `schema_server_port` varchar(10) NOT NULL DEFAULT '3306', - `schema_connection_parameters` text DEFAULT NULL, - `schema_username` varchar(100) NOT NULL DEFAULT 'root', - `schema_password` varchar(100) NOT NULL DEFAULT 'mysql', - `auto_update` tinyint NOT NULL DEFAULT '1', - `pool_initial_size` INT DEFAULT 5, - `pool_validation_interval` INT DEFAULT 30000, - `pool_remove_abandoned` tinyint DEFAULT 1, - `pool_remove_abandoned_timeout` INT DEFAULT 60, - `pool_log_abandoned` tinyint DEFAULT 1, - `pool_abandon_when_percentage_full` INT DEFAULT 50, - `pool_test_on_borrow` tinyint DEFAULT 1, - `pool_max_active` INT DEFAULT 40, - `pool_min_idle` INT DEFAULT 20, - `pool_max_idle` INT DEFAULT 10, - `pool_suspect_timeout` INT DEFAULT 60, - `pool_time_between_eviction_runs_millis` INT DEFAULT 34000, - `pool_min_evictable_idle_time_millis` INT DEFAULT 60000, - PRIMARY KEY (`id`) +CREATE TABLE `tenants` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `identifier` varchar(100) NOT NULL, + `name` varchar(100) NOT NULL, + `schema_name` varchar(100) NOT NULL, + `timezone_id` varchar(100) NOT NULL, + `country_id` INT DEFAULT NULL, + `joined_date` date DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + `schema_server` varchar(100) NOT NULL DEFAULT 'localhost', + `schema_server_port` varchar(10) NOT NULL DEFAULT '3306', + `schema_connection_parameters` text DEFAULT NULL, + `schema_username` varchar(100) NOT NULL DEFAULT 'root', + `schema_password` varchar(100) NOT NULL DEFAULT 'mysql', + `auto_update` tinyint NOT NULL DEFAULT '1', + `pool_initial_size` INT DEFAULT 5, + `pool_validation_interval` INT DEFAULT 30000, + `pool_remove_abandoned` tinyint DEFAULT 1, + `pool_remove_abandoned_timeout` INT DEFAULT 60, + `pool_log_abandoned` tinyint DEFAULT 1, + `pool_abandon_when_percentage_full` INT DEFAULT 50, + `pool_test_on_borrow` tinyint DEFAULT 1, + `pool_max_active` INT DEFAULT 40, + `pool_min_idle` INT DEFAULT 20, + `pool_max_idle` INT DEFAULT 10, + `pool_suspect_timeout` INT DEFAULT 60, + `pool_time_between_eviction_runs_millis` INT DEFAULT 34000, + `pool_min_evictable_idle_time_millis` INT DEFAULT 60000, + PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -115,12 +122,15 @@ CREATE TABLE `tenants` ( -- Dumping data for table `tenants` -- -LOCK TABLES `tenants` WRITE; +LOCK +TABLES `tenants` WRITE; /*!40000 ALTER TABLE `tenants` DISABLE KEYS */; -INSERT INTO `tenants` VALUES -(1,'default','default','fineract_default','Asia/Kolkata',NULL,NULL,NULL,NULL,'localhost','3306',NULL,'root','mysql',1,5,30000,1,60,1,50,1,40,20,10,60,34000,60000); +INSERT INTO `tenants` +VALUES (1, 'default', 'default', 'fineract_default', 'Asia/Kolkata', NULL, NULL, NULL, NULL, 'localhost', '3306', NULL, + 'root', 'mysql', 1, 5, 30000, 1, 60, 1, 50, 1, 40, 20, 10, 60, 34000, 60000); /*!40000 ALTER TABLE `tenants` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `timezones` @@ -129,12 +139,13 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `timezones`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `timezones` ( - `id` INT NOT NULL AUTO_INCREMENT, - `country_code` varchar(2) NOT NULL, - `timezonename` varchar(100) NOT NULL, - `comments` varchar(150) DEFAULT NULL, - PRIMARY KEY (`id`) +CREATE TABLE `timezones` +( + `id` INT NOT NULL AUTO_INCREMENT, + `country_code` varchar(2) NOT NULL, + `timezonename` varchar(100) NOT NULL, + `comments` varchar(150) DEFAULT NULL, + PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=416 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -142,11 +153,430 @@ CREATE TABLE `timezones` ( -- Dumping data for table `timezones` -- -LOCK TABLES `timezones` WRITE; +LOCK +TABLES `timezones` WRITE; /*!40000 ALTER TABLE `timezones` DISABLE KEYS */; -INSERT INTO `timezones` VALUES (1,'AD','Europe/Andorra',NULL),(2,'AE','Asia/Dubai',''),(3,'AF','Asia/Kabul',''),(4,'AG','America/Antigua',''),(5,'AI','America/Anguilla',''),(6,'AL','Europe/Tirane',''),(7,'AM','Asia/Yerevan',''),(8,'AO','Africa/Luanda',''),(9,'AQ','Antarctica/McMurdo','McMurdo Station, Ross Island'),(10,'AQ','Antarctica/South_Pole','Amundsen-Scott Station, South Pole'),(11,'AQ','Antarctica/Rothera','Rothera Station, Adelaide Island'),(12,'AQ','Antarctica/Palmer','Palmer Station, Anvers Island'),(13,'AQ','Antarctica/Mawson','Mawson Station, Holme Bay'),(14,'AQ','Antarctica/Davis','Davis Station, Vestfold Hills'),(15,'AQ','Antarctica/Casey','Casey Station, Bailey Peninsula'),(16,'AQ','Antarctica/Vostok','Vostok Station, Lake Vostok'),(17,'AQ','Antarctica/DumontDUrville','Dumont-dUrville Station, Terre Adelie'),(18,'AQ','Antarctica/Syowa','Syowa Station, E Ongul I'),(19,'AQ','Antarctica/Macquarie','Macquarie Island Station, Macquarie Island'),(20,'AR','America/Argentina/Buenos_Aires','Buenos Aires (BA, CF)'),(21,'AR','America/Argentina/Cordoba','most locations (CB, CC, CN, ER, FM, MN, SE, SF)'),(22,'AR','America/Argentina/Salta','(SA, LP, NQ, RN)'),(23,'AR','America/Argentina/Jujuy','Jujuy (JY)'),(24,'AR','America/Argentina/Tucuman','Tucuman (TM)'),(25,'AR','America/Argentina/Catamarca','Catamarca (CT), Chubut (CH)'),(26,'AR','America/Argentina/La_Rioja','La Rioja (LR)'),(27,'AR','America/Argentina/San_Juan','San Juan (SJ)'),(28,'AR','America/Argentina/Mendoza','Mendoza (MZ)'),(29,'AR','America/Argentina/San_Luis','San Luis (SL)'),(30,'AR','America/Argentina/Rio_Gallegos','Santa Cruz (SC)'),(31,'AR','America/Argentina/Ushuaia','Tierra del Fuego (TF)'),(32,'AS','Pacific/Pago_Pago',''),(33,'AT','Europe/Vienna',''),(34,'AU','Australia/Lord_Howe','Lord Howe Island'),(35,'AU','Australia/Hobart','Tasmania - most locations'),(36,'AU','Australia/Currie','Tasmania - King Island'),(37,'AU','Australia/Melbourne','Victoria'),(38,'AU','Australia/Sydney','New South Wales - most locations'),(39,'AU','Australia/Broken_Hill','New South Wales - Yancowinna'),(40,'AU','Australia/Brisbane','Queensland - most locations'),(41,'AU','Australia/Lindeman','Queensland - Holiday Islands'),(42,'AU','Australia/Adelaide','South Australia'),(43,'AU','Australia/Darwin','Northern Territory'),(44,'AU','Australia/Perth','Western Australia - most locations'),(45,'AU','Australia/Eucla','Western Australia - Eucla area'),(46,'AW','America/Aruba',''),(47,'AX','Europe/Mariehamn',''),(48,'AZ','Asia/Baku',''),(49,'BA','Europe/Sarajevo',''),(50,'BB','America/Barbados',''),(51,'BD','Asia/Dhaka',''),(52,'BE','Europe/Brussels',''),(53,'BF','Africa/Ouagadougou',''),(54,'BG','Europe/Sofia',''),(55,'BH','Asia/Bahrain',''),(56,'BI','Africa/Bujumbura',''),(57,'BJ','Africa/Porto-Novo',''),(58,'BL','America/St_Barthelemy',''),(59,'BM','Atlantic/Bermuda',''),(60,'BN','Asia/Brunei',''),(61,'BO','America/La_Paz',''),(62,'BQ','America/Kralendijk',''),(63,'BR','America/Noronha','Atlantic islands'),(64,'BR','America/Belem','Amapa, E Para'),(65,'BR','America/Fortaleza','NE Brazil (MA, PI, CE, RN, PB)'),(66,'BR','America/Recife','Pernambuco'),(67,'BR','America/Araguaina','Tocantins'),(68,'BR','America/Maceio','Alagoas, Sergipe'),(69,'BR','America/Bahia','Bahia'),(70,'BR','America/Sao_Paulo','S & SE Brazil (GO, DF, MG, ES, RJ, SP, PR, SC, RS)'),(71,'BR','America/Campo_Grande','Mato Grosso do Sul'),(72,'BR','America/Cuiaba','Mato Grosso'),(73,'BR','America/Santarem','W Para'),(74,'BR','America/Porto_Velho','Rondonia'),(75,'BR','America/Boa_Vista','Roraima'),(76,'BR','America/Manaus','E Amazonas'),(77,'BR','America/Eirunepe','W Amazonas'),(78,'BR','America/Rio_Branco','Acre'),(79,'BS','America/Nassau',''),(80,'BT','Asia/Thimphu',''),(81,'BW','Africa/Gaborone',''),(82,'BY','Europe/Minsk',''),(83,'BZ','America/Belize',''),(84,'CA','America/St_Johns','Newfoundland Time, including SE Labrador'),(85,'CA','America/Halifax','Atlantic Time - Nova Scotia (most places), PEI'),(86,'CA','America/Glace_Bay','Atlantic Time - Nova Scotia - places that did not observe DST 1966-1971'),(87,'CA','America/Moncton','Atlantic Time - New Brunswick'),(88,'CA','America/Goose_Bay','Atlantic Time - Labrador - most locations'),(89,'CA','America/Blanc-Sablon','Atlantic Standard Time - Quebec - Lower North Shore'),(90,'CA','America/Montreal','Eastern Time - Quebec - most locations'),(91,'CA','America/Toronto','Eastern Time - Ontario - most locations'),(92,'CA','America/Nipigon','Eastern Time - Ontario & Quebec - places that did not observe DST 1967-1973'),(93,'CA','America/Thunder_Bay','Eastern Time - Thunder Bay, Ontario'),(94,'CA','America/Iqaluit','Eastern Time - east Nunavut - most locations'),(95,'CA','America/Pangnirtung','Eastern Time - Pangnirtung, Nunavut'),(96,'CA','America/Resolute','Central Standard Time - Resolute, Nunavut'),(97,'CA','America/Atikokan','Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut'),(98,'CA','America/Rankin_Inlet','Central Time - central Nunavut'),(99,'CA','America/Winnipeg','Central Time - Manitoba & west Ontario'),(100,'CA','America/Rainy_River','Central Time - Rainy River & Fort Frances, Ontario'),(101,'CA','America/Regina','Central Standard Time - Saskatchewan - most locations'),(102,'CA','America/Swift_Current','Central Standard Time - Saskatchewan - midwest'),(103,'CA','America/Edmonton','Mountain Time - Alberta, east British Columbia & west Saskatchewan'),(104,'CA','America/Cambridge_Bay','Mountain Time - west Nunavut'),(105,'CA','America/Yellowknife','Mountain Time - central Northwest Territories'),(106,'CA','America/Inuvik','Mountain Time - west Northwest Territories'),(107,'CA','America/Creston','Mountain Standard Time - Creston, British Columbia'),(108,'CA','America/Dawson_Creek','Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia'),(109,'CA','America/Vancouver','Pacific Time - west British Columbia'),(110,'CA','America/Whitehorse','Pacific Time - south Yukon'),(111,'CA','America/Dawson','Pacific Time - north Yukon'),(112,'CC','Indian/Cocos',''),(113,'CD','Africa/Kinshasa','west Dem. Rep. of Congo'),(114,'CD','Africa/Lubumbashi','east Dem. Rep. of Congo'),(115,'CF','Africa/Bangui',''),(116,'CG','Africa/Brazzaville',''),(117,'CH','Europe/Zurich',''),(118,'CI','Africa/Abidjan',''),(119,'CK','Pacific/Rarotonga',''),(120,'CL','America/Santiago','most locations'),(121,'CL','Pacific/Easter','Easter Island & Sala y Gomez'),(122,'CM','Africa/Douala',''),(123,'CN','Asia/Shanghai','east China - Beijing, Guangdong, Shanghai, etc.'),(124,'CN','Asia/Harbin','Heilongjiang (except Mohe), Jilin'),(125,'CN','Asia/Chongqing','central China - Sichuan, Yunnan, Guangxi, Shaanxi, Guizhou, etc.'),(126,'CN','Asia/Urumqi','most of Tibet & Xinjiang'),(127,'CN','Asia/Kashgar','west Tibet & Xinjiang'),(128,'CO','America/Bogota',''),(129,'CR','America/Costa_Rica',''),(130,'CU','America/Havana',''),(131,'CV','Atlantic/Cape_Verde',''),(132,'CW','America/Curacao',''),(133,'CX','Indian/Christmas',''),(134,'CY','Asia/Nicosia',''),(135,'CZ','Europe/Prague',''),(136,'DE','Europe/Berlin',''),(137,'DJ','Africa/Djibouti',''),(138,'DK','Europe/Copenhagen',''),(139,'DM','America/Dominica',''),(140,'DO','America/Santo_Domingo',''),(141,'DZ','Africa/Algiers',''),(142,'EC','America/Guayaquil','mainland'),(143,'EC','Pacific/Galapagos','Galapagos Islands'),(144,'EE','Europe/Tallinn',''),(145,'EG','Africa/Cairo',''),(146,'EH','Africa/El_Aaiun',''),(147,'ER','Africa/Asmara',''),(148,'ES','Europe/Madrid','mainland'),(149,'ES','Africa/Ceuta','Ceuta & Melilla'),(150,'ES','Atlantic/Canary','Canary Islands'),(151,'ET','Africa/Addis_Ababa',''),(152,'FI','Europe/Helsinki',''),(153,'FJ','Pacific/Fiji',''),(154,'FK','Atlantic/Stanley',''),(155,'FM','Pacific/Chuuk','Chuuk (Truk) and Yap'),(156,'FM','Pacific/Pohnpei','Pohnpei (Ponape)'),(157,'FM','Pacific/Kosrae','Kosrae'),(158,'FO','Atlantic/Faroe',''),(159,'FR','Europe/Paris',''),(160,'GA','Africa/Libreville',''),(161,'GB','Europe/London',''),(162,'GD','America/Grenada',''),(163,'GE','Asia/Tbilisi',''),(164,'GF','America/Cayenne',''),(165,'GG','Europe/Guernsey',''),(166,'GH','Africa/Accra',''),(167,'GI','Europe/Gibraltar',''),(168,'GL','America/Godthab','most locations'),(169,'GL','America/Danmarkshavn','east coast, north of Scoresbysund'),(170,'GL','America/Scoresbysund','Scoresbysund / Ittoqqortoormiit'),(171,'GL','America/Thule','Thule / Pituffik'),(172,'GM','Africa/Banjul',''),(173,'GN','Africa/Conakry',''),(174,'GP','America/Guadeloupe',''),(175,'GQ','Africa/Malabo',''),(176,'GR','Europe/Athens',''),(177,'GS','Atlantic/South_Georgia',''),(178,'GT','America/Guatemala',''),(179,'GU','Pacific/Guam',''),(180,'GW','Africa/Bissau',''),(181,'GY','America/Guyana',''),(182,'HK','Asia/Hong_Kong',''),(183,'HN','America/Tegucigalpa',''),(184,'HR','Europe/Zagreb',''),(185,'HT','America/Port-au-Prince',''),(186,'HU','Europe/Budapest',''),(187,'ID','Asia/Jakarta','Java & Sumatra'),(188,'ID','Asia/Pontianak','west & central Borneo'),(189,'ID','Asia/Makassar','east & south Borneo, Sulawesi (Celebes), Bali, Nusa Tengarra, west Timor'),(190,'ID','Asia/Jayapura','west New Guinea (Irian Jaya) & Malukus (Moluccas)'),(191,'IE','Europe/Dublin',''),(192,'IL','Asia/Jerusalem',''),(193,'IM','Europe/Isle_of_Man',''),(194,'IN','Asia/Kolkata',''),(195,'IO','Indian/Chagos',''),(196,'IQ','Asia/Baghdad',''),(197,'IR','Asia/Tehran',''),(198,'IS','Atlantic/Reykjavik',''),(199,'IT','Europe/Rome',''),(200,'JE','Europe/Jersey',''),(201,'JM','America/Jamaica',''),(202,'JO','Asia/Amman',''),(203,'JP','Asia/Tokyo',''),(204,'KE','Africa/Nairobi',''),(205,'KG','Asia/Bishkek',''),(206,'KH','Asia/Phnom_Penh',''),(207,'KI','Pacific/Tarawa','Gilbert Islands'),(208,'KI','Pacific/Enderbury','Phoenix Islands'),(209,'KI','Pacific/Kiritimati','Line Islands'),(210,'KM','Indian/Comoro',''),(211,'KN','America/St_Kitts',''),(212,'KP','Asia/Pyongyang',''),(213,'KR','Asia/Seoul',''),(214,'KW','Asia/Kuwait',''),(215,'KY','America/Cayman',''),(216,'KZ','Asia/Almaty','most locations'),(217,'KZ','Asia/Qyzylorda','Qyzylorda (Kyzylorda, Kzyl-Orda)'),(218,'KZ','Asia/Aqtobe','Aqtobe (Aktobe)'),(219,'KZ','Asia/Aqtau','Atyrau (Atirau, Guryev), Mangghystau (Mankistau)'),(220,'KZ','Asia/Oral','West Kazakhstan'),(221,'LA','Asia/Vientiane',''),(222,'LB','Asia/Beirut',''),(223,'LC','America/St_Lucia',''),(224,'LI','Europe/Vaduz',''),(225,'LK','Asia/Colombo',''),(226,'LR','Africa/Monrovia',''),(227,'LS','Africa/Maseru',''),(228,'LT','Europe/Vilnius',''),(229,'LU','Europe/Luxembourg',''),(230,'LV','Europe/Riga',''),(231,'LY','Africa/Tripoli',''),(232,'MA','Africa/Casablanca',''),(233,'MC','Europe/Monaco',''),(234,'MD','Europe/Chisinau',''),(235,'ME','Europe/Podgorica',''),(236,'MF','America/Marigot',''),(237,'MG','Indian/Antananarivo',''),(238,'MH','Pacific/Majuro','most locations'),(239,'MH','Pacific/Kwajalein','Kwajalein'),(240,'MK','Europe/Skopje',''),(241,'ML','Africa/Bamako',''),(242,'MM','Asia/Rangoon',''),(243,'MN','Asia/Ulaanbaatar','most locations'),(244,'MN','Asia/Hovd','Bayan-Olgiy, Govi-Altai, Hovd, Uvs, Zavkhan'),(245,'MN','Asia/Choibalsan','Dornod, Sukhbaatar'),(246,'MO','Asia/Macau',''),(247,'MP','Pacific/Saipan',''),(248,'MQ','America/Martinique',''),(249,'MR','Africa/Nouakchott',''),(250,'MS','America/Montserrat',''),(251,'MT','Europe/Malta',''),(252,'MU','Indian/Mauritius',''),(253,'MV','Indian/Maldives',''),(254,'MW','Africa/Blantyre',''),(255,'MX','America/Mexico_City','Central Time - most locations'),(256,'MX','America/Cancun','Central Time - Quintana Roo'),(257,'MX','America/Merida','Central Time - Campeche, Yucatan'),(258,'MX','America/Monterrey','Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border'),(259,'MX','America/Matamoros','US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border'),(260,'MX','America/Mazatlan','Mountain Time - S Baja, Nayarit, Sinaloa'),(261,'MX','America/Chihuahua','Mexican Mountain Time - Chihuahua away from US border'),(262,'MX','America/Ojinaga','US Mountain Time - Chihuahua near US border'),(263,'MX','America/Hermosillo','Mountain Standard Time - Sonora'),(264,'MX','America/Tijuana','US Pacific Time - Baja California near US border'),(265,'MX','America/Santa_Isabel','Mexican Pacific Time - Baja California away from US border'),(266,'MX','America/Bahia_Banderas','Mexican Central Time - Bahia de Banderas'),(267,'MY','Asia/Kuala_Lumpur','peninsular Malaysia'),(268,'MY','Asia/Kuching','Sabah & Sarawak'),(269,'MZ','Africa/Maputo',''),(270,'NA','Africa/Windhoek',''),(271,'NC','Pacific/Noumea',''),(272,'NE','Africa/Niamey',''),(273,'NF','Pacific/Norfolk',''),(274,'NG','Africa/Lagos',''),(275,'NI','America/Managua',''),(276,'NL','Europe/Amsterdam',''),(277,'NO','Europe/Oslo',''),(278,'NP','Asia/Kathmandu',''),(279,'NR','Pacific/Nauru',''),(280,'NU','Pacific/Niue',''),(281,'NZ','Pacific/Auckland','most locations'),(282,'NZ','Pacific/Chatham','Chatham Islands'),(283,'OM','Asia/Muscat',''),(284,'PA','America/Panama',''),(285,'PE','America/Lima',''),(286,'PF','Pacific/Tahiti','Society Islands'),(287,'PF','Pacific/Marquesas','Marquesas Islands'),(288,'PF','Pacific/Gambier','Gambier Islands'),(289,'PG','Pacific/Port_Moresby',''),(290,'PH','Asia/Manila',''),(291,'PK','Asia/Karachi',''),(292,'PL','Europe/Warsaw',''),(293,'PM','America/Miquelon',''),(294,'PN','Pacific/Pitcairn',''),(295,'PR','America/Puerto_Rico',''),(296,'PS','Asia/Gaza','Gaza Strip'),(297,'PS','Asia/Hebron','West Bank'),(298,'PT','Europe/Lisbon','mainland'),(299,'PT','Atlantic/Madeira','Madeira Islands'),(300,'PT','Atlantic/Azores','Azores'),(301,'PW','Pacific/Palau',''),(302,'PY','America/Asuncion',''),(303,'QA','Asia/Qatar',''),(304,'RE','Indian/Reunion',''),(305,'RO','Europe/Bucharest',''),(306,'RS','Europe/Belgrade',''),(307,'RU','Europe/Kaliningrad','Moscow-01 - Kaliningrad'),(308,'RU','Europe/Moscow','Moscow+00 - west Russia'),(309,'RU','Europe/Volgograd','Moscow+00 - Caspian Sea'),(310,'RU','Europe/Samara','Moscow+00 - Samara, Udmurtia'),(311,'RU','Asia/Yekaterinburg','Moscow+02 - Urals'),(312,'RU','Asia/Omsk','Moscow+03 - west Siberia'),(313,'RU','Asia/Novosibirsk','Moscow+03 - Novosibirsk'),(314,'RU','Asia/Novokuznetsk','Moscow+03 - Novokuznetsk'),(315,'RU','Asia/Krasnoyarsk','Moscow+04 - Yenisei River'),(316,'RU','Asia/Irkutsk','Moscow+05 - Lake Baikal'),(317,'RU','Asia/Yakutsk','Moscow+06 - Lena River'),(318,'RU','Asia/Vladivostok','Moscow+07 - Amur River'),(319,'RU','Asia/Sakhalin','Moscow+07 - Sakhalin Island'),(320,'RU','Asia/Magadan','Moscow+08 - Magadan'),(321,'RU','Asia/Kamchatka','Moscow+08 - Kamchatka'),(322,'RU','Asia/Anadyr','Moscow+08 - Bering Sea'),(323,'RW','Africa/Kigali',''),(324,'SA','Asia/Riyadh',''),(325,'SB','Pacific/Guadalcanal',''),(326,'SC','Indian/Mahe',''),(327,'SD','Africa/Khartoum',''),(328,'SE','Europe/Stockholm',''),(329,'SG','Asia/Singapore',''),(330,'SH','Atlantic/St_Helena',''),(331,'SI','Europe/Ljubljana',''),(332,'SJ','Arctic/Longyearbyen',''),(333,'SK','Europe/Bratislava',''),(334,'SL','Africa/Freetown',''),(335,'SM','Europe/San_Marino',''),(336,'SN','Africa/Dakar',''),(337,'SO','Africa/Mogadishu',''),(338,'SR','America/Paramaribo',''),(339,'SS','Africa/Juba',''),(340,'ST','Africa/Sao_Tome',''),(341,'SV','America/El_Salvador',''),(342,'SX','America/Lower_Princes',''),(343,'SY','Asia/Damascus',''),(344,'SZ','Africa/Mbabane',''),(345,'TC','America/Grand_Turk',''),(346,'TD','Africa/Ndjamena',''),(347,'TF','Indian/Kerguelen',''),(348,'TG','Africa/Lome',''),(349,'TH','Asia/Bangkok',''),(350,'TJ','Asia/Dushanbe',''),(351,'TK','Pacific/Fakaofo',''),(352,'TL','Asia/Dili',''),(353,'TM','Asia/Ashgabat',''),(354,'TN','Africa/Tunis',''),(355,'TO','Pacific/Tongatapu',''),(356,'TR','Europe/Istanbul',''),(357,'TT','America/Port_of_Spain',''),(358,'TV','Pacific/Funafuti',''),(359,'TW','Asia/Taipei',''),(360,'TZ','Africa/Dar_es_Salaam',''),(361,'UA','Europe/Kiev','most locations'),(362,'UA','Europe/Uzhgorod','Ruthenia'),(363,'UA','Europe/Zaporozhye','Zaporozhye, E Lugansk / Zaporizhia, E Luhansk'),(364,'UA','Europe/Simferopol','central Crimea'),(365,'UG','Africa/Kampala',''),(366,'UM','Pacific/Johnston','Johnston Atoll'),(367,'UM','Pacific/Midway','Midway Islands'),(368,'UM','Pacific/Wake','Wake Island'),(369,'US','America/New_York','Eastern Time'),(370,'US','America/Detroit','Eastern Time - Michigan - most locations'),(371,'US','America/Kentucky/Louisville','Eastern Time - Kentucky - Louisville area'),(372,'US','America/Kentucky/Monticello','Eastern Time - Kentucky - Wayne County'),(373,'US','America/Indiana/Indianapolis','Eastern Time - Indiana - most locations'),(374,'US','America/Indiana/Vincennes','Eastern Time - Indiana - Daviess, Dubois, Knox & Martin Counties'),(375,'US','America/Indiana/Winamac','Eastern Time - Indiana - Pulaski County'),(376,'US','America/Indiana/Marengo','Eastern Time - Indiana - Crawford County'),(377,'US','America/Indiana/Petersburg','Eastern Time - Indiana - Pike County'),(378,'US','America/Indiana/Vevay','Eastern Time - Indiana - Switzerland County'),(379,'US','America/Chicago','Central Time'),(380,'US','America/Indiana/Tell_City','Central Time - Indiana - Perry County'),(381,'US','America/Indiana/Knox','Central Time - Indiana - Starke County'),(382,'US','America/Menominee','Central Time - Michigan - Dickinson, Gogebic, Iron & Menominee Counties'),(383,'US','America/North_Dakota/Center','Central Time - North Dakota - Oliver County'),(384,'US','America/North_Dakota/New_Salem','Central Time - North Dakota - Morton County (except Mandan area)'),(385,'US','America/North_Dakota/Beulah','Central Time - North Dakota - Mercer County'),(386,'US','America/Denver','Mountain Time'),(387,'US','America/Boise','Mountain Time - south Idaho & east Oregon'),(388,'US','America/Shiprock','Mountain Time - Navajo'),(389,'US','America/Phoenix','Mountain Standard Time - Arizona'),(390,'US','America/Los_Angeles','Pacific Time'),(391,'US','America/Anchorage','Alaska Time'),(392,'US','America/Juneau','Alaska Time - Alaska panhandle'),(393,'US','America/Sitka','Alaska Time - southeast Alaska panhandle'),(394,'US','America/Yakutat','Alaska Time - Alaska panhandle neck'),(395,'US','America/Nome','Alaska Time - west Alaska'),(396,'US','America/Adak','Aleutian Islands'),(397,'US','America/Metlakatla','Metlakatla Time - Annette Island'),(398,'US','Pacific/Honolulu','Hawaii'),(399,'UY','America/Montevideo',''),(400,'UZ','Asia/Samarkand','west Uzbekistan'),(401,'UZ','Asia/Tashkent','east Uzbekistan'),(402,'VA','Europe/Vatican',''),(403,'VC','America/St_Vincent',''),(404,'VE','America/Caracas',''),(405,'VG','America/Tortola',''),(406,'VI','America/St_Thomas',''),(407,'VN','Asia/Ho_Chi_Minh',''),(408,'VU','Pacific/Efate',''),(409,'WF','Pacific/Wallis',''),(410,'WS','Pacific/Apia',''),(411,'YE','Asia/Aden',''),(412,'YT','Indian/Mayotte',''),(413,'ZA','Africa/Johannesburg',''),(414,'ZM','Africa/Lusaka',''),(415,'ZW','Africa/Harare',''); +INSERT INTO `timezones` +VALUES (1, 'AD', 'Europe/Andorra', NULL), + (2, 'AE', 'Asia/Dubai', ''), + (3, 'AF', 'Asia/Kabul', ''), + (4, 'AG', 'America/Antigua', ''), + (5, 'AI', 'America/Anguilla', ''), + (6, 'AL', 'Europe/Tirane', ''), + (7, 'AM', 'Asia/Yerevan', ''), + (8, 'AO', 'Africa/Luanda', ''), + (9, 'AQ', 'Antarctica/McMurdo', 'McMurdo Station, Ross Island'), + (10, 'AQ', 'Antarctica/South_Pole', 'Amundsen-Scott Station, South Pole'), + (11, 'AQ', 'Antarctica/Rothera', 'Rothera Station, Adelaide Island'), + (12, 'AQ', 'Antarctica/Palmer', 'Palmer Station, Anvers Island'), + (13, 'AQ', 'Antarctica/Mawson', 'Mawson Station, Holme Bay'), + (14, 'AQ', 'Antarctica/Davis', 'Davis Station, Vestfold Hills'), + (15, 'AQ', 'Antarctica/Casey', 'Casey Station, Bailey Peninsula'), + (16, 'AQ', 'Antarctica/Vostok', 'Vostok Station, Lake Vostok'), + (17, 'AQ', 'Antarctica/DumontDUrville', 'Dumont-dUrville Station, Terre Adelie'), + (18, 'AQ', 'Antarctica/Syowa', 'Syowa Station, E Ongul I'), + (19, 'AQ', 'Antarctica/Macquarie', 'Macquarie Island Station, Macquarie Island'), + (20, 'AR', 'America/Argentina/Buenos_Aires', 'Buenos Aires (BA, CF)'), + (21, 'AR', 'America/Argentina/Cordoba', 'most locations (CB, CC, CN, ER, FM, MN, SE, SF)'), + (22, 'AR', 'America/Argentina/Salta', '(SA, LP, NQ, RN)'), + (23, 'AR', 'America/Argentina/Jujuy', 'Jujuy (JY)'), + (24, 'AR', 'America/Argentina/Tucuman', 'Tucuman (TM)'), + (25, 'AR', 'America/Argentina/Catamarca', 'Catamarca (CT), Chubut (CH)'), + (26, 'AR', 'America/Argentina/La_Rioja', 'La Rioja (LR)'), + (27, 'AR', 'America/Argentina/San_Juan', 'San Juan (SJ)'), + (28, 'AR', 'America/Argentina/Mendoza', 'Mendoza (MZ)'), + (29, 'AR', 'America/Argentina/San_Luis', 'San Luis (SL)'), + (30, 'AR', 'America/Argentina/Rio_Gallegos', 'Santa Cruz (SC)'), + (31, 'AR', 'America/Argentina/Ushuaia', 'Tierra del Fuego (TF)'), + (32, 'AS', 'Pacific/Pago_Pago', ''), + (33, 'AT', 'Europe/Vienna', ''), + (34, 'AU', 'Australia/Lord_Howe', 'Lord Howe Island'), + (35, 'AU', 'Australia/Hobart', 'Tasmania - most locations'), + (36, 'AU', 'Australia/Currie', 'Tasmania - King Island'), + (37, 'AU', 'Australia/Melbourne', 'Victoria'), + (38, 'AU', 'Australia/Sydney', 'New South Wales - most locations'), + (39, 'AU', 'Australia/Broken_Hill', 'New South Wales - Yancowinna'), + (40, 'AU', 'Australia/Brisbane', 'Queensland - most locations'), + (41, 'AU', 'Australia/Lindeman', 'Queensland - Holiday Islands'), + (42, 'AU', 'Australia/Adelaide', 'South Australia'), + (43, 'AU', 'Australia/Darwin', 'Northern Territory'), + (44, 'AU', 'Australia/Perth', 'Western Australia - most locations'), + (45, 'AU', 'Australia/Eucla', 'Western Australia - Eucla area'), + (46, 'AW', 'America/Aruba', ''), + (47, 'AX', 'Europe/Mariehamn', ''), + (48, 'AZ', 'Asia/Baku', ''), + (49, 'BA', 'Europe/Sarajevo', ''), + (50, 'BB', 'America/Barbados', ''), + (51, 'BD', 'Asia/Dhaka', ''), + (52, 'BE', 'Europe/Brussels', ''), + (53, 'BF', 'Africa/Ouagadougou', ''), + (54, 'BG', 'Europe/Sofia', ''), + (55, 'BH', 'Asia/Bahrain', ''), + (56, 'BI', 'Africa/Bujumbura', ''), + (57, 'BJ', 'Africa/Porto-Novo', ''), + (58, 'BL', 'America/St_Barthelemy', ''), + (59, 'BM', 'Atlantic/Bermuda', ''), + (60, 'BN', 'Asia/Brunei', ''), + (61, 'BO', 'America/La_Paz', ''), + (62, 'BQ', 'America/Kralendijk', ''), + (63, 'BR', 'America/Noronha', 'Atlantic islands'), + (64, 'BR', 'America/Belem', 'Amapa, E Para'), + (65, 'BR', 'America/Fortaleza', 'NE Brazil (MA, PI, CE, RN, PB)'), + (66, 'BR', 'America/Recife', 'Pernambuco'), + (67, 'BR', 'America/Araguaina', 'Tocantins'), + (68, 'BR', 'America/Maceio', 'Alagoas, Sergipe'), + (69, 'BR', 'America/Bahia', 'Bahia'), + (70, 'BR', 'America/Sao_Paulo', 'S & SE Brazil (GO, DF, MG, ES, RJ, SP, PR, SC, RS)'), + (71, 'BR', 'America/Campo_Grande', 'Mato Grosso do Sul'), + (72, 'BR', 'America/Cuiaba', 'Mato Grosso'), + (73, 'BR', 'America/Santarem', 'W Para'), + (74, 'BR', 'America/Porto_Velho', 'Rondonia'), + (75, 'BR', 'America/Boa_Vista', 'Roraima'), + (76, 'BR', 'America/Manaus', 'E Amazonas'), + (77, 'BR', 'America/Eirunepe', 'W Amazonas'), + (78, 'BR', 'America/Rio_Branco', 'Acre'), + (79, 'BS', 'America/Nassau', ''), + (80, 'BT', 'Asia/Thimphu', ''), + (81, 'BW', 'Africa/Gaborone', ''), + (82, 'BY', 'Europe/Minsk', ''), + (83, 'BZ', 'America/Belize', ''), + (84, 'CA', 'America/St_Johns', 'Newfoundland Time, including SE Labrador'), + (85, 'CA', 'America/Halifax', 'Atlantic Time - Nova Scotia (most places), PEI'), + (86, 'CA', 'America/Glace_Bay', 'Atlantic Time - Nova Scotia - places that did not observe DST 1966-1971'), + (87, 'CA', 'America/Moncton', 'Atlantic Time - New Brunswick'), + (88, 'CA', 'America/Goose_Bay', 'Atlantic Time - Labrador - most locations'), + (89, 'CA', 'America/Blanc-Sablon', 'Atlantic Standard Time - Quebec - Lower North Shore'), + (90, 'CA', 'America/Montreal', 'Eastern Time - Quebec - most locations'), + (91, 'CA', 'America/Toronto', 'Eastern Time - Ontario - most locations'), + (92, 'CA', 'America/Nipigon', 'Eastern Time - Ontario & Quebec - places that did not observe DST 1967-1973'), + (93, 'CA', 'America/Thunder_Bay', 'Eastern Time - Thunder Bay, Ontario'), + (94, 'CA', 'America/Iqaluit', 'Eastern Time - east Nunavut - most locations'), + (95, 'CA', 'America/Pangnirtung', 'Eastern Time - Pangnirtung, Nunavut'), + (96, 'CA', 'America/Resolute', 'Central Standard Time - Resolute, Nunavut'), + (97, 'CA', 'America/Atikokan', 'Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut'), + (98, 'CA', 'America/Rankin_Inlet', 'Central Time - central Nunavut'), + (99, 'CA', 'America/Winnipeg', 'Central Time - Manitoba & west Ontario'), + (100, 'CA', 'America/Rainy_River', 'Central Time - Rainy River & Fort Frances, Ontario'), + (101, 'CA', 'America/Regina', 'Central Standard Time - Saskatchewan - most locations'), + (102, 'CA', 'America/Swift_Current', 'Central Standard Time - Saskatchewan - midwest'), + (103, 'CA', 'America/Edmonton', 'Mountain Time - Alberta, east British Columbia & west Saskatchewan'), + (104, 'CA', 'America/Cambridge_Bay', 'Mountain Time - west Nunavut'), + (105, 'CA', 'America/Yellowknife', 'Mountain Time - central Northwest Territories'), + (106, 'CA', 'America/Inuvik', 'Mountain Time - west Northwest Territories'), + (107, 'CA', 'America/Creston', 'Mountain Standard Time - Creston, British Columbia'), + (108, 'CA', 'America/Dawson_Creek', 'Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia'), + (109, 'CA', 'America/Vancouver', 'Pacific Time - west British Columbia'), + (110, 'CA', 'America/Whitehorse', 'Pacific Time - south Yukon'), + (111, 'CA', 'America/Dawson', 'Pacific Time - north Yukon'), + (112, 'CC', 'Indian/Cocos', ''), + (113, 'CD', 'Africa/Kinshasa', 'west Dem. Rep. of Congo'), + (114, 'CD', 'Africa/Lubumbashi', 'east Dem. Rep. of Congo'), + (115, 'CF', 'Africa/Bangui', ''), + (116, 'CG', 'Africa/Brazzaville', ''), + (117, 'CH', 'Europe/Zurich', ''), + (118, 'CI', 'Africa/Abidjan', ''), + (119, 'CK', 'Pacific/Rarotonga', ''), + (120, 'CL', 'America/Santiago', 'most locations'), + (121, 'CL', 'Pacific/Easter', 'Easter Island & Sala y Gomez'), + (122, 'CM', 'Africa/Douala', ''), + (123, 'CN', 'Asia/Shanghai', 'east China - Beijing, Guangdong, Shanghai, etc.'), + (124, 'CN', 'Asia/Harbin', 'Heilongjiang (except Mohe), Jilin'), + (125, 'CN', 'Asia/Chongqing', 'central China - Sichuan, Yunnan, Guangxi, Shaanxi, Guizhou, etc.'), + (126, 'CN', 'Asia/Urumqi', 'most of Tibet & Xinjiang'), + (127, 'CN', 'Asia/Kashgar', 'west Tibet & Xinjiang'), + (128, 'CO', 'America/Bogota', ''), + (129, 'CR', 'America/Costa_Rica', ''), + (130, 'CU', 'America/Havana', ''), + (131, 'CV', 'Atlantic/Cape_Verde', ''), + (132, 'CW', 'America/Curacao', ''), + (133, 'CX', 'Indian/Christmas', ''), + (134, 'CY', 'Asia/Nicosia', ''), + (135, 'CZ', 'Europe/Prague', ''), + (136, 'DE', 'Europe/Berlin', ''), + (137, 'DJ', 'Africa/Djibouti', ''), + (138, 'DK', 'Europe/Copenhagen', ''), + (139, 'DM', 'America/Dominica', ''), + (140, 'DO', 'America/Santo_Domingo', ''), + (141, 'DZ', 'Africa/Algiers', ''), + (142, 'EC', 'America/Guayaquil', 'mainland'), + (143, 'EC', 'Pacific/Galapagos', 'Galapagos Islands'), + (144, 'EE', 'Europe/Tallinn', ''), + (145, 'EG', 'Africa/Cairo', ''), + (146, 'EH', 'Africa/El_Aaiun', ''), + (147, 'ER', 'Africa/Asmara', ''), + (148, 'ES', 'Europe/Madrid', 'mainland'), + (149, 'ES', 'Africa/Ceuta', 'Ceuta & Melilla'), + (150, 'ES', 'Atlantic/Canary', 'Canary Islands'), + (151, 'ET', 'Africa/Addis_Ababa', ''), + (152, 'FI', 'Europe/Helsinki', ''), + (153, 'FJ', 'Pacific/Fiji', ''), + (154, 'FK', 'Atlantic/Stanley', ''), + (155, 'FM', 'Pacific/Chuuk', 'Chuuk (Truk) and Yap'), + (156, 'FM', 'Pacific/Pohnpei', 'Pohnpei (Ponape)'), + (157, 'FM', 'Pacific/Kosrae', 'Kosrae'), + (158, 'FO', 'Atlantic/Faroe', ''), + (159, 'FR', 'Europe/Paris', ''), + (160, 'GA', 'Africa/Libreville', ''), + (161, 'GB', 'Europe/London', ''), + (162, 'GD', 'America/Grenada', ''), + (163, 'GE', 'Asia/Tbilisi', ''), + (164, 'GF', 'America/Cayenne', ''), + (165, 'GG', 'Europe/Guernsey', ''), + (166, 'GH', 'Africa/Accra', ''), + (167, 'GI', 'Europe/Gibraltar', ''), + (168, 'GL', 'America/Godthab', 'most locations'), + (169, 'GL', 'America/Danmarkshavn', 'east coast, north of Scoresbysund'), + (170, 'GL', 'America/Scoresbysund', 'Scoresbysund / Ittoqqortoormiit'), + (171, 'GL', 'America/Thule', 'Thule / Pituffik'), + (172, 'GM', 'Africa/Banjul', ''), + (173, 'GN', 'Africa/Conakry', ''), + (174, 'GP', 'America/Guadeloupe', ''), + (175, 'GQ', 'Africa/Malabo', ''), + (176, 'GR', 'Europe/Athens', ''), + (177, 'GS', 'Atlantic/South_Georgia', ''), + (178, 'GT', 'America/Guatemala', ''), + (179, 'GU', 'Pacific/Guam', ''), + (180, 'GW', 'Africa/Bissau', ''), + (181, 'GY', 'America/Guyana', ''), + (182, 'HK', 'Asia/Hong_Kong', ''), + (183, 'HN', 'America/Tegucigalpa', ''), + (184, 'HR', 'Europe/Zagreb', ''), + (185, 'HT', 'America/Port-au-Prince', ''), + (186, 'HU', 'Europe/Budapest', ''), + (187, 'ID', 'Asia/Jakarta', 'Java & Sumatra'), + (188, 'ID', 'Asia/Pontianak', 'west & central Borneo'), + (189, 'ID', 'Asia/Makassar', 'east & south Borneo, Sulawesi (Celebes), Bali, Nusa Tengarra, west Timor'), + (190, 'ID', 'Asia/Jayapura', 'west New Guinea (Irian Jaya) & Malukus (Moluccas)'), + (191, 'IE', 'Europe/Dublin', ''), + (192, 'IL', 'Asia/Jerusalem', ''), + (193, 'IM', 'Europe/Isle_of_Man', ''), + (194, 'IN', 'Asia/Kolkata', ''), + (195, 'IO', 'Indian/Chagos', ''), + (196, 'IQ', 'Asia/Baghdad', ''), + (197, 'IR', 'Asia/Tehran', ''), + (198, 'IS', 'Atlantic/Reykjavik', ''), + (199, 'IT', 'Europe/Rome', ''), + (200, 'JE', 'Europe/Jersey', ''), + (201, 'JM', 'America/Jamaica', ''), + (202, 'JO', 'Asia/Amman', ''), + (203, 'JP', 'Asia/Tokyo', ''), + (204, 'KE', 'Africa/Nairobi', ''), + (205, 'KG', 'Asia/Bishkek', ''), + (206, 'KH', 'Asia/Phnom_Penh', ''), + (207, 'KI', 'Pacific/Tarawa', 'Gilbert Islands'), + (208, 'KI', 'Pacific/Enderbury', 'Phoenix Islands'), + (209, 'KI', 'Pacific/Kiritimati', 'Line Islands'), + (210, 'KM', 'Indian/Comoro', ''), + (211, 'KN', 'America/St_Kitts', ''), + (212, 'KP', 'Asia/Pyongyang', ''), + (213, 'KR', 'Asia/Seoul', ''), + (214, 'KW', 'Asia/Kuwait', ''), + (215, 'KY', 'America/Cayman', ''), + (216, 'KZ', 'Asia/Almaty', 'most locations'), + (217, 'KZ', 'Asia/Qyzylorda', 'Qyzylorda (Kyzylorda, Kzyl-Orda)'), + (218, 'KZ', 'Asia/Aqtobe', 'Aqtobe (Aktobe)'), + (219, 'KZ', 'Asia/Aqtau', 'Atyrau (Atirau, Guryev), Mangghystau (Mankistau)'), + (220, 'KZ', 'Asia/Oral', 'West Kazakhstan'), + (221, 'LA', 'Asia/Vientiane', ''), + (222, 'LB', 'Asia/Beirut', ''), + (223, 'LC', 'America/St_Lucia', ''), + (224, 'LI', 'Europe/Vaduz', ''), + (225, 'LK', 'Asia/Colombo', ''), + (226, 'LR', 'Africa/Monrovia', ''), + (227, 'LS', 'Africa/Maseru', ''), + (228, 'LT', 'Europe/Vilnius', ''), + (229, 'LU', 'Europe/Luxembourg', ''), + (230, 'LV', 'Europe/Riga', ''), + (231, 'LY', 'Africa/Tripoli', ''), + (232, 'MA', 'Africa/Casablanca', ''), + (233, 'MC', 'Europe/Monaco', ''), + (234, 'MD', 'Europe/Chisinau', ''), + (235, 'ME', 'Europe/Podgorica', ''), + (236, 'MF', 'America/Marigot', ''), + (237, 'MG', 'Indian/Antananarivo', ''), + (238, 'MH', 'Pacific/Majuro', 'most locations'), + (239, 'MH', 'Pacific/Kwajalein', 'Kwajalein'), + (240, 'MK', 'Europe/Skopje', ''), + (241, 'ML', 'Africa/Bamako', ''), + (242, 'MM', 'Asia/Rangoon', ''), + (243, 'MN', 'Asia/Ulaanbaatar', 'most locations'), + (244, 'MN', 'Asia/Hovd', 'Bayan-Olgiy, Govi-Altai, Hovd, Uvs, Zavkhan'), + (245, 'MN', 'Asia/Choibalsan', 'Dornod, Sukhbaatar'), + (246, 'MO', 'Asia/Macau', ''), + (247, 'MP', 'Pacific/Saipan', ''), + (248, 'MQ', 'America/Martinique', ''), + (249, 'MR', 'Africa/Nouakchott', ''), + (250, 'MS', 'America/Montserrat', ''), + (251, 'MT', 'Europe/Malta', ''), + (252, 'MU', 'Indian/Mauritius', ''), + (253, 'MV', 'Indian/Maldives', ''), + (254, 'MW', 'Africa/Blantyre', ''), + (255, 'MX', 'America/Mexico_City', 'Central Time - most locations'), + (256, 'MX', 'America/Cancun', 'Central Time - Quintana Roo'), + (257, 'MX', 'America/Merida', 'Central Time - Campeche, Yucatan'), + (258, 'MX', 'America/Monterrey', + 'Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border'), + (259, 'MX', 'America/Matamoros', 'US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border'), + (260, 'MX', 'America/Mazatlan', 'Mountain Time - S Baja, Nayarit, Sinaloa'), + (261, 'MX', 'America/Chihuahua', 'Mexican Mountain Time - Chihuahua away from US border'), + (262, 'MX', 'America/Ojinaga', 'US Mountain Time - Chihuahua near US border'), + (263, 'MX', 'America/Hermosillo', 'Mountain Standard Time - Sonora'), + (264, 'MX', 'America/Tijuana', 'US Pacific Time - Baja California near US border'), + (265, 'MX', 'America/Santa_Isabel', 'Mexican Pacific Time - Baja California away from US border'), + (266, 'MX', 'America/Bahia_Banderas', 'Mexican Central Time - Bahia de Banderas'), + (267, 'MY', 'Asia/Kuala_Lumpur', 'peninsular Malaysia'), + (268, 'MY', 'Asia/Kuching', 'Sabah & Sarawak'), + (269, 'MZ', 'Africa/Maputo', ''), + (270, 'NA', 'Africa/Windhoek', ''), + (271, 'NC', 'Pacific/Noumea', ''), + (272, 'NE', 'Africa/Niamey', ''), + (273, 'NF', 'Pacific/Norfolk', ''), + (274, 'NG', 'Africa/Lagos', ''), + (275, 'NI', 'America/Managua', ''), + (276, 'NL', 'Europe/Amsterdam', ''), + (277, 'NO', 'Europe/Oslo', ''), + (278, 'NP', 'Asia/Kathmandu', ''), + (279, 'NR', 'Pacific/Nauru', ''), + (280, 'NU', 'Pacific/Niue', ''), + (281, 'NZ', 'Pacific/Auckland', 'most locations'), + (282, 'NZ', 'Pacific/Chatham', 'Chatham Islands'), + (283, 'OM', 'Asia/Muscat', ''), + (284, 'PA', 'America/Panama', ''), + (285, 'PE', 'America/Lima', ''), + (286, 'PF', 'Pacific/Tahiti', 'Society Islands'), + (287, 'PF', 'Pacific/Marquesas', 'Marquesas Islands'), + (288, 'PF', 'Pacific/Gambier', 'Gambier Islands'), + (289, 'PG', 'Pacific/Port_Moresby', ''), + (290, 'PH', 'Asia/Manila', ''), + (291, 'PK', 'Asia/Karachi', ''), + (292, 'PL', 'Europe/Warsaw', ''), + (293, 'PM', 'America/Miquelon', ''), + (294, 'PN', 'Pacific/Pitcairn', ''), + (295, 'PR', 'America/Puerto_Rico', ''), + (296, 'PS', 'Asia/Gaza', 'Gaza Strip'), + (297, 'PS', 'Asia/Hebron', 'West Bank'), + (298, 'PT', 'Europe/Lisbon', 'mainland'), + (299, 'PT', 'Atlantic/Madeira', 'Madeira Islands'), + (300, 'PT', 'Atlantic/Azores', 'Azores'), + (301, 'PW', 'Pacific/Palau', ''), + (302, 'PY', 'America/Asuncion', ''), + (303, 'QA', 'Asia/Qatar', ''), + (304, 'RE', 'Indian/Reunion', ''), + (305, 'RO', 'Europe/Bucharest', ''), + (306, 'RS', 'Europe/Belgrade', ''), + (307, 'RU', 'Europe/Kaliningrad', 'Moscow-01 - Kaliningrad'), + (308, 'RU', 'Europe/Moscow', 'Moscow+00 - west Russia'), + (309, 'RU', 'Europe/Volgograd', 'Moscow+00 - Caspian Sea'), + (310, 'RU', 'Europe/Samara', 'Moscow+00 - Samara, Udmurtia'), + (311, 'RU', 'Asia/Yekaterinburg', 'Moscow+02 - Urals'), + (312, 'RU', 'Asia/Omsk', 'Moscow+03 - west Siberia'), + (313, 'RU', 'Asia/Novosibirsk', 'Moscow+03 - Novosibirsk'), + (314, 'RU', 'Asia/Novokuznetsk', 'Moscow+03 - Novokuznetsk'), + (315, 'RU', 'Asia/Krasnoyarsk', 'Moscow+04 - Yenisei River'), + (316, 'RU', 'Asia/Irkutsk', 'Moscow+05 - Lake Baikal'), + (317, 'RU', 'Asia/Yakutsk', 'Moscow+06 - Lena River'), + (318, 'RU', 'Asia/Vladivostok', 'Moscow+07 - Amur River'), + (319, 'RU', 'Asia/Sakhalin', 'Moscow+07 - Sakhalin Island'), + (320, 'RU', 'Asia/Magadan', 'Moscow+08 - Magadan'), + (321, 'RU', 'Asia/Kamchatka', 'Moscow+08 - Kamchatka'), + (322, 'RU', 'Asia/Anadyr', 'Moscow+08 - Bering Sea'), + (323, 'RW', 'Africa/Kigali', ''), + (324, 'SA', 'Asia/Riyadh', ''), + (325, 'SB', 'Pacific/Guadalcanal', ''), + (326, 'SC', 'Indian/Mahe', ''), + (327, 'SD', 'Africa/Khartoum', ''), + (328, 'SE', 'Europe/Stockholm', ''), + (329, 'SG', 'Asia/Singapore', ''), + (330, 'SH', 'Atlantic/St_Helena', ''), + (331, 'SI', 'Europe/Ljubljana', ''), + (332, 'SJ', 'Arctic/Longyearbyen', ''), + (333, 'SK', 'Europe/Bratislava', ''), + (334, 'SL', 'Africa/Freetown', ''), + (335, 'SM', 'Europe/San_Marino', ''), + (336, 'SN', 'Africa/Dakar', ''), + (337, 'SO', 'Africa/Mogadishu', ''), + (338, 'SR', 'America/Paramaribo', ''), + (339, 'SS', 'Africa/Juba', ''), + (340, 'ST', 'Africa/Sao_Tome', ''), + (341, 'SV', 'America/El_Salvador', ''), + (342, 'SX', 'America/Lower_Princes', ''), + (343, 'SY', 'Asia/Damascus', ''), + (344, 'SZ', 'Africa/Mbabane', ''), + (345, 'TC', 'America/Grand_Turk', ''), + (346, 'TD', 'Africa/Ndjamena', ''), + (347, 'TF', 'Indian/Kerguelen', ''), + (348, 'TG', 'Africa/Lome', ''), + (349, 'TH', 'Asia/Bangkok', ''), + (350, 'TJ', 'Asia/Dushanbe', ''), + (351, 'TK', 'Pacific/Fakaofo', ''), + (352, 'TL', 'Asia/Dili', ''), + (353, 'TM', 'Asia/Ashgabat', ''), + (354, 'TN', 'Africa/Tunis', ''), + (355, 'TO', 'Pacific/Tongatapu', ''), + (356, 'TR', 'Europe/Istanbul', ''), + (357, 'TT', 'America/Port_of_Spain', ''), + (358, 'TV', 'Pacific/Funafuti', ''), + (359, 'TW', 'Asia/Taipei', ''), + (360, 'TZ', 'Africa/Dar_es_Salaam', ''), + (361, 'UA', 'Europe/Kiev', 'most locations'), + (362, 'UA', 'Europe/Uzhgorod', 'Ruthenia'), + (363, 'UA', 'Europe/Zaporozhye', 'Zaporozhye, E Lugansk / Zaporizhia, E Luhansk'), + (364, 'UA', 'Europe/Simferopol', 'central Crimea'), + (365, 'UG', 'Africa/Kampala', ''), + (366, 'UM', 'Pacific/Johnston', 'Johnston Atoll'), + (367, 'UM', 'Pacific/Midway', 'Midway Islands'), + (368, 'UM', 'Pacific/Wake', 'Wake Island'), + (369, 'US', 'America/New_York', 'Eastern Time'), + (370, 'US', 'America/Detroit', 'Eastern Time - Michigan - most locations'), + (371, 'US', 'America/Kentucky/Louisville', 'Eastern Time - Kentucky - Louisville area'), + (372, 'US', 'America/Kentucky/Monticello', 'Eastern Time - Kentucky - Wayne County'), + (373, 'US', 'America/Indiana/Indianapolis', 'Eastern Time - Indiana - most locations'), + (374, 'US', 'America/Indiana/Vincennes', 'Eastern Time - Indiana - Daviess, Dubois, Knox & Martin Counties'), + (375, 'US', 'America/Indiana/Winamac', 'Eastern Time - Indiana - Pulaski County'), + (376, 'US', 'America/Indiana/Marengo', 'Eastern Time - Indiana - Crawford County'), + (377, 'US', 'America/Indiana/Petersburg', 'Eastern Time - Indiana - Pike County'), + (378, 'US', 'America/Indiana/Vevay', 'Eastern Time - Indiana - Switzerland County'), + (379, 'US', 'America/Chicago', 'Central Time'), + (380, 'US', 'America/Indiana/Tell_City', 'Central Time - Indiana - Perry County'), + (381, 'US', 'America/Indiana/Knox', 'Central Time - Indiana - Starke County'), + (382, 'US', 'America/Menominee', 'Central Time - Michigan - Dickinson, Gogebic, Iron & Menominee Counties'), + (383, 'US', 'America/North_Dakota/Center', 'Central Time - North Dakota - Oliver County'), + (384, 'US', 'America/North_Dakota/New_Salem', + 'Central Time - North Dakota - Morton County (except Mandan area)'), + (385, 'US', 'America/North_Dakota/Beulah', 'Central Time - North Dakota - Mercer County'), + (386, 'US', 'America/Denver', 'Mountain Time'), + (387, 'US', 'America/Boise', 'Mountain Time - south Idaho & east Oregon'), + (388, 'US', 'America/Shiprock', 'Mountain Time - Navajo'), + (389, 'US', 'America/Phoenix', 'Mountain Standard Time - Arizona'), + (390, 'US', 'America/Los_Angeles', 'Pacific Time'), + (391, 'US', 'America/Anchorage', 'Alaska Time'), + (392, 'US', 'America/Juneau', 'Alaska Time - Alaska panhandle'), + (393, 'US', 'America/Sitka', 'Alaska Time - southeast Alaska panhandle'), + (394, 'US', 'America/Yakutat', 'Alaska Time - Alaska panhandle neck'), + (395, 'US', 'America/Nome', 'Alaska Time - west Alaska'), + (396, 'US', 'America/Adak', 'Aleutian Islands'), + (397, 'US', 'America/Metlakatla', 'Metlakatla Time - Annette Island'), + (398, 'US', 'Pacific/Honolulu', 'Hawaii'), + (399, 'UY', 'America/Montevideo', ''), + (400, 'UZ', 'Asia/Samarkand', 'west Uzbekistan'), + (401, 'UZ', 'Asia/Tashkent', 'east Uzbekistan'), + (402, 'VA', 'Europe/Vatican', ''), + (403, 'VC', 'America/St_Vincent', ''), + (404, 'VE', 'America/Caracas', ''), + (405, 'VG', 'America/Tortola', ''), + (406, 'VI', 'America/St_Thomas', ''), + (407, 'VN', 'Asia/Ho_Chi_Minh', ''), + (408, 'VU', 'Pacific/Efate', ''), + (409, 'WF', 'Pacific/Wallis', ''), + (410, 'WS', 'Pacific/Apia', ''), + (411, 'YE', 'Asia/Aden', ''), + (412, 'YT', 'Indian/Mayotte', ''), + (413, 'ZA', 'Africa/Johannesburg', ''), + (414, 'ZM', 'Africa/Lusaka', ''), + (415, 'ZW', 'Africa/Harare', ''); /*!40000 ALTER TABLE `timezones` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; diff --git a/fineract-db/multi-tenant-demo-backups/0001-mifos-platform-shared-tenants.sql b/fineract-db/multi-tenant-demo-backups/0001-mifos-platform-shared-tenants.sql index 8160784419c..cad840cab35 100644 --- a/fineract-db/multi-tenant-demo-backups/0001-mifos-platform-shared-tenants.sql +++ b/fineract-db/multi-tenant-demo-backups/0001-mifos-platform-shared-tenants.sql @@ -41,22 +41,23 @@ DROP TABLE IF EXISTS `tenants`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `tenants` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `identifier` varchar(100) NOT NULL, - `name` varchar(100) NOT NULL, - `schema_name` varchar(100) NOT NULL, - `timezone_id` varchar(100) NOT NULL, - `country_id` INT DEFAULT NULL, - `joined_date` date DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - `schema_server` varchar(100) NOT NULL DEFAULT 'localhost', - `schema_server_port` varchar(10) NOT NULL DEFAULT '3306', - `schema_username` varchar(100) NOT NULL DEFAULT 'root', - `schema_password` varchar(100) NOT NULL DEFAULT 'mysql', - `auto_update` tinyint NOT NULL DEFAULT '1', - PRIMARY KEY (`id`) +CREATE TABLE `tenants` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `identifier` varchar(100) NOT NULL, + `name` varchar(100) NOT NULL, + `schema_name` varchar(100) NOT NULL, + `timezone_id` varchar(100) NOT NULL, + `country_id` INT DEFAULT NULL, + `joined_date` date DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + `schema_server` varchar(100) NOT NULL DEFAULT 'localhost', + `schema_server_port` varchar(10) NOT NULL DEFAULT '3306', + `schema_username` varchar(100) NOT NULL DEFAULT 'root', + `schema_password` varchar(100) NOT NULL DEFAULT 'mysql', + `auto_update` tinyint NOT NULL DEFAULT '1', + PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -64,11 +65,15 @@ CREATE TABLE `tenants` ( -- Dumping data for table `tenants` -- -LOCK TABLES `tenants` WRITE; +LOCK +TABLES `tenants` WRITE; /*!40000 ALTER TABLE `tenants` DISABLE KEYS */; -INSERT INTO `tenants` VALUES (1,'default','Default Demo Tenant','fineract_default','Asia/Kolkata',NULL,NULL,NULL,NULL,'localhost','3306','root','mysql',1); +INSERT INTO `tenants` +VALUES (1, 'default', 'Default Demo Tenant', 'fineract_default', 'Asia/Kolkata', NULL, NULL, NULL, NULL, 'localhost', + '3306', 'root', 'mysql', 1); /*!40000 ALTER TABLE `tenants` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `timezones` @@ -77,12 +82,13 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `timezones`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `timezones` ( - `id` INT NOT NULL AUTO_INCREMENT, - `country_code` varchar(2) NOT NULL, - `timezonename` varchar(100) NOT NULL, - `comments` varchar(150) DEFAULT NULL, - PRIMARY KEY (`id`) +CREATE TABLE `timezones` +( + `id` INT NOT NULL AUTO_INCREMENT, + `country_code` varchar(2) NOT NULL, + `timezonename` varchar(100) NOT NULL, + `comments` varchar(150) DEFAULT NULL, + PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=416 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -90,11 +96,430 @@ CREATE TABLE `timezones` ( -- Dumping data for table `timezones` -- -LOCK TABLES `timezones` WRITE; +LOCK +TABLES `timezones` WRITE; /*!40000 ALTER TABLE `timezones` DISABLE KEYS */; -INSERT INTO `timezones` VALUES (1,'AD','Europe/Andorra',NULL),(2,'AE','Asia/Dubai',''),(3,'AF','Asia/Kabul',''),(4,'AG','America/Antigua',''),(5,'AI','America/Anguilla',''),(6,'AL','Europe/Tirane',''),(7,'AM','Asia/Yerevan',''),(8,'AO','Africa/Luanda',''),(9,'AQ','Antarctica/McMurdo','McMurdo Station, Ross Island'),(10,'AQ','Antarctica/South_Pole','Amundsen-Scott Station, South Pole'),(11,'AQ','Antarctica/Rothera','Rothera Station, Adelaide Island'),(12,'AQ','Antarctica/Palmer','Palmer Station, Anvers Island'),(13,'AQ','Antarctica/Mawson','Mawson Station, Holme Bay'),(14,'AQ','Antarctica/Davis','Davis Station, Vestfold Hills'),(15,'AQ','Antarctica/Casey','Casey Station, Bailey Peninsula'),(16,'AQ','Antarctica/Vostok','Vostok Station, Lake Vostok'),(17,'AQ','Antarctica/DumontDUrville','Dumont-dUrville Station, Terre Adelie'),(18,'AQ','Antarctica/Syowa','Syowa Station, E Ongul I'),(19,'AQ','Antarctica/Macquarie','Macquarie Island Station, Macquarie Island'),(20,'AR','America/Argentina/Buenos_Aires','Buenos Aires (BA, CF)'),(21,'AR','America/Argentina/Cordoba','most locations (CB, CC, CN, ER, FM, MN, SE, SF)'),(22,'AR','America/Argentina/Salta','(SA, LP, NQ, RN)'),(23,'AR','America/Argentina/Jujuy','Jujuy (JY)'),(24,'AR','America/Argentina/Tucuman','Tucuman (TM)'),(25,'AR','America/Argentina/Catamarca','Catamarca (CT), Chubut (CH)'),(26,'AR','America/Argentina/La_Rioja','La Rioja (LR)'),(27,'AR','America/Argentina/San_Juan','San Juan (SJ)'),(28,'AR','America/Argentina/Mendoza','Mendoza (MZ)'),(29,'AR','America/Argentina/San_Luis','San Luis (SL)'),(30,'AR','America/Argentina/Rio_Gallegos','Santa Cruz (SC)'),(31,'AR','America/Argentina/Ushuaia','Tierra del Fuego (TF)'),(32,'AS','Pacific/Pago_Pago',''),(33,'AT','Europe/Vienna',''),(34,'AU','Australia/Lord_Howe','Lord Howe Island'),(35,'AU','Australia/Hobart','Tasmania - most locations'),(36,'AU','Australia/Currie','Tasmania - King Island'),(37,'AU','Australia/Melbourne','Victoria'),(38,'AU','Australia/Sydney','New South Wales - most locations'),(39,'AU','Australia/Broken_Hill','New South Wales - Yancowinna'),(40,'AU','Australia/Brisbane','Queensland - most locations'),(41,'AU','Australia/Lindeman','Queensland - Holiday Islands'),(42,'AU','Australia/Adelaide','South Australia'),(43,'AU','Australia/Darwin','Northern Territory'),(44,'AU','Australia/Perth','Western Australia - most locations'),(45,'AU','Australia/Eucla','Western Australia - Eucla area'),(46,'AW','America/Aruba',''),(47,'AX','Europe/Mariehamn',''),(48,'AZ','Asia/Baku',''),(49,'BA','Europe/Sarajevo',''),(50,'BB','America/Barbados',''),(51,'BD','Asia/Dhaka',''),(52,'BE','Europe/Brussels',''),(53,'BF','Africa/Ouagadougou',''),(54,'BG','Europe/Sofia',''),(55,'BH','Asia/Bahrain',''),(56,'BI','Africa/Bujumbura',''),(57,'BJ','Africa/Porto-Novo',''),(58,'BL','America/St_Barthelemy',''),(59,'BM','Atlantic/Bermuda',''),(60,'BN','Asia/Brunei',''),(61,'BO','America/La_Paz',''),(62,'BQ','America/Kralendijk',''),(63,'BR','America/Noronha','Atlantic islands'),(64,'BR','America/Belem','Amapa, E Para'),(65,'BR','America/Fortaleza','NE Brazil (MA, PI, CE, RN, PB)'),(66,'BR','America/Recife','Pernambuco'),(67,'BR','America/Araguaina','Tocantins'),(68,'BR','America/Maceio','Alagoas, Sergipe'),(69,'BR','America/Bahia','Bahia'),(70,'BR','America/Sao_Paulo','S & SE Brazil (GO, DF, MG, ES, RJ, SP, PR, SC, RS)'),(71,'BR','America/Campo_Grande','Mato Grosso do Sul'),(72,'BR','America/Cuiaba','Mato Grosso'),(73,'BR','America/Santarem','W Para'),(74,'BR','America/Porto_Velho','Rondonia'),(75,'BR','America/Boa_Vista','Roraima'),(76,'BR','America/Manaus','E Amazonas'),(77,'BR','America/Eirunepe','W Amazonas'),(78,'BR','America/Rio_Branco','Acre'),(79,'BS','America/Nassau',''),(80,'BT','Asia/Thimphu',''),(81,'BW','Africa/Gaborone',''),(82,'BY','Europe/Minsk',''),(83,'BZ','America/Belize',''),(84,'CA','America/St_Johns','Newfoundland Time, including SE Labrador'),(85,'CA','America/Halifax','Atlantic Time - Nova Scotia (most places), PEI'),(86,'CA','America/Glace_Bay','Atlantic Time - Nova Scotia - places that did not observe DST 1966-1971'),(87,'CA','America/Moncton','Atlantic Time - New Brunswick'),(88,'CA','America/Goose_Bay','Atlantic Time - Labrador - most locations'),(89,'CA','America/Blanc-Sablon','Atlantic Standard Time - Quebec - Lower North Shore'),(90,'CA','America/Montreal','Eastern Time - Quebec - most locations'),(91,'CA','America/Toronto','Eastern Time - Ontario - most locations'),(92,'CA','America/Nipigon','Eastern Time - Ontario & Quebec - places that did not observe DST 1967-1973'),(93,'CA','America/Thunder_Bay','Eastern Time - Thunder Bay, Ontario'),(94,'CA','America/Iqaluit','Eastern Time - east Nunavut - most locations'),(95,'CA','America/Pangnirtung','Eastern Time - Pangnirtung, Nunavut'),(96,'CA','America/Resolute','Central Standard Time - Resolute, Nunavut'),(97,'CA','America/Atikokan','Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut'),(98,'CA','America/Rankin_Inlet','Central Time - central Nunavut'),(99,'CA','America/Winnipeg','Central Time - Manitoba & west Ontario'),(100,'CA','America/Rainy_River','Central Time - Rainy River & Fort Frances, Ontario'),(101,'CA','America/Regina','Central Standard Time - Saskatchewan - most locations'),(102,'CA','America/Swift_Current','Central Standard Time - Saskatchewan - midwest'),(103,'CA','America/Edmonton','Mountain Time - Alberta, east British Columbia & west Saskatchewan'),(104,'CA','America/Cambridge_Bay','Mountain Time - west Nunavut'),(105,'CA','America/Yellowknife','Mountain Time - central Northwest Territories'),(106,'CA','America/Inuvik','Mountain Time - west Northwest Territories'),(107,'CA','America/Creston','Mountain Standard Time - Creston, British Columbia'),(108,'CA','America/Dawson_Creek','Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia'),(109,'CA','America/Vancouver','Pacific Time - west British Columbia'),(110,'CA','America/Whitehorse','Pacific Time - south Yukon'),(111,'CA','America/Dawson','Pacific Time - north Yukon'),(112,'CC','Indian/Cocos',''),(113,'CD','Africa/Kinshasa','west Dem. Rep. of Congo'),(114,'CD','Africa/Lubumbashi','east Dem. Rep. of Congo'),(115,'CF','Africa/Bangui',''),(116,'CG','Africa/Brazzaville',''),(117,'CH','Europe/Zurich',''),(118,'CI','Africa/Abidjan',''),(119,'CK','Pacific/Rarotonga',''),(120,'CL','America/Santiago','most locations'),(121,'CL','Pacific/Easter','Easter Island & Sala y Gomez'),(122,'CM','Africa/Douala',''),(123,'CN','Asia/Shanghai','east China - Beijing, Guangdong, Shanghai, etc.'),(124,'CN','Asia/Harbin','Heilongjiang (except Mohe), Jilin'),(125,'CN','Asia/Chongqing','central China - Sichuan, Yunnan, Guangxi, Shaanxi, Guizhou, etc.'),(126,'CN','Asia/Urumqi','most of Tibet & Xinjiang'),(127,'CN','Asia/Kashgar','west Tibet & Xinjiang'),(128,'CO','America/Bogota',''),(129,'CR','America/Costa_Rica',''),(130,'CU','America/Havana',''),(131,'CV','Atlantic/Cape_Verde',''),(132,'CW','America/Curacao',''),(133,'CX','Indian/Christmas',''),(134,'CY','Asia/Nicosia',''),(135,'CZ','Europe/Prague',''),(136,'DE','Europe/Berlin',''),(137,'DJ','Africa/Djibouti',''),(138,'DK','Europe/Copenhagen',''),(139,'DM','America/Dominica',''),(140,'DO','America/Santo_Domingo',''),(141,'DZ','Africa/Algiers',''),(142,'EC','America/Guayaquil','mainland'),(143,'EC','Pacific/Galapagos','Galapagos Islands'),(144,'EE','Europe/Tallinn',''),(145,'EG','Africa/Cairo',''),(146,'EH','Africa/El_Aaiun',''),(147,'ER','Africa/Asmara',''),(148,'ES','Europe/Madrid','mainland'),(149,'ES','Africa/Ceuta','Ceuta & Melilla'),(150,'ES','Atlantic/Canary','Canary Islands'),(151,'ET','Africa/Addis_Ababa',''),(152,'FI','Europe/Helsinki',''),(153,'FJ','Pacific/Fiji',''),(154,'FK','Atlantic/Stanley',''),(155,'FM','Pacific/Chuuk','Chuuk (Truk) and Yap'),(156,'FM','Pacific/Pohnpei','Pohnpei (Ponape)'),(157,'FM','Pacific/Kosrae','Kosrae'),(158,'FO','Atlantic/Faroe',''),(159,'FR','Europe/Paris',''),(160,'GA','Africa/Libreville',''),(161,'GB','Europe/London',''),(162,'GD','America/Grenada',''),(163,'GE','Asia/Tbilisi',''),(164,'GF','America/Cayenne',''),(165,'GG','Europe/Guernsey',''),(166,'GH','Africa/Accra',''),(167,'GI','Europe/Gibraltar',''),(168,'GL','America/Godthab','most locations'),(169,'GL','America/Danmarkshavn','east coast, north of Scoresbysund'),(170,'GL','America/Scoresbysund','Scoresbysund / Ittoqqortoormiit'),(171,'GL','America/Thule','Thule / Pituffik'),(172,'GM','Africa/Banjul',''),(173,'GN','Africa/Conakry',''),(174,'GP','America/Guadeloupe',''),(175,'GQ','Africa/Malabo',''),(176,'GR','Europe/Athens',''),(177,'GS','Atlantic/South_Georgia',''),(178,'GT','America/Guatemala',''),(179,'GU','Pacific/Guam',''),(180,'GW','Africa/Bissau',''),(181,'GY','America/Guyana',''),(182,'HK','Asia/Hong_Kong',''),(183,'HN','America/Tegucigalpa',''),(184,'HR','Europe/Zagreb',''),(185,'HT','America/Port-au-Prince',''),(186,'HU','Europe/Budapest',''),(187,'ID','Asia/Jakarta','Java & Sumatra'),(188,'ID','Asia/Pontianak','west & central Borneo'),(189,'ID','Asia/Makassar','east & south Borneo, Sulawesi (Celebes), Bali, Nusa Tengarra, west Timor'),(190,'ID','Asia/Jayapura','west New Guinea (Irian Jaya) & Malukus (Moluccas)'),(191,'IE','Europe/Dublin',''),(192,'IL','Asia/Jerusalem',''),(193,'IM','Europe/Isle_of_Man',''),(194,'IN','Asia/Kolkata',''),(195,'IO','Indian/Chagos',''),(196,'IQ','Asia/Baghdad',''),(197,'IR','Asia/Tehran',''),(198,'IS','Atlantic/Reykjavik',''),(199,'IT','Europe/Rome',''),(200,'JE','Europe/Jersey',''),(201,'JM','America/Jamaica',''),(202,'JO','Asia/Amman',''),(203,'JP','Asia/Tokyo',''),(204,'KE','Africa/Nairobi',''),(205,'KG','Asia/Bishkek',''),(206,'KH','Asia/Phnom_Penh',''),(207,'KI','Pacific/Tarawa','Gilbert Islands'),(208,'KI','Pacific/Enderbury','Phoenix Islands'),(209,'KI','Pacific/Kiritimati','Line Islands'),(210,'KM','Indian/Comoro',''),(211,'KN','America/St_Kitts',''),(212,'KP','Asia/Pyongyang',''),(213,'KR','Asia/Seoul',''),(214,'KW','Asia/Kuwait',''),(215,'KY','America/Cayman',''),(216,'KZ','Asia/Almaty','most locations'),(217,'KZ','Asia/Qyzylorda','Qyzylorda (Kyzylorda, Kzyl-Orda)'),(218,'KZ','Asia/Aqtobe','Aqtobe (Aktobe)'),(219,'KZ','Asia/Aqtau','Atyrau (Atirau, Guryev), Mangghystau (Mankistau)'),(220,'KZ','Asia/Oral','West Kazakhstan'),(221,'LA','Asia/Vientiane',''),(222,'LB','Asia/Beirut',''),(223,'LC','America/St_Lucia',''),(224,'LI','Europe/Vaduz',''),(225,'LK','Asia/Colombo',''),(226,'LR','Africa/Monrovia',''),(227,'LS','Africa/Maseru',''),(228,'LT','Europe/Vilnius',''),(229,'LU','Europe/Luxembourg',''),(230,'LV','Europe/Riga',''),(231,'LY','Africa/Tripoli',''),(232,'MA','Africa/Casablanca',''),(233,'MC','Europe/Monaco',''),(234,'MD','Europe/Chisinau',''),(235,'ME','Europe/Podgorica',''),(236,'MF','America/Marigot',''),(237,'MG','Indian/Antananarivo',''),(238,'MH','Pacific/Majuro','most locations'),(239,'MH','Pacific/Kwajalein','Kwajalein'),(240,'MK','Europe/Skopje',''),(241,'ML','Africa/Bamako',''),(242,'MM','Asia/Rangoon',''),(243,'MN','Asia/Ulaanbaatar','most locations'),(244,'MN','Asia/Hovd','Bayan-Olgiy, Govi-Altai, Hovd, Uvs, Zavkhan'),(245,'MN','Asia/Choibalsan','Dornod, Sukhbaatar'),(246,'MO','Asia/Macau',''),(247,'MP','Pacific/Saipan',''),(248,'MQ','America/Martinique',''),(249,'MR','Africa/Nouakchott',''),(250,'MS','America/Montserrat',''),(251,'MT','Europe/Malta',''),(252,'MU','Indian/Mauritius',''),(253,'MV','Indian/Maldives',''),(254,'MW','Africa/Blantyre',''),(255,'MX','America/Mexico_City','Central Time - most locations'),(256,'MX','America/Cancun','Central Time - Quintana Roo'),(257,'MX','America/Merida','Central Time - Campeche, Yucatan'),(258,'MX','America/Monterrey','Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border'),(259,'MX','America/Matamoros','US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border'),(260,'MX','America/Mazatlan','Mountain Time - S Baja, Nayarit, Sinaloa'),(261,'MX','America/Chihuahua','Mexican Mountain Time - Chihuahua away from US border'),(262,'MX','America/Ojinaga','US Mountain Time - Chihuahua near US border'),(263,'MX','America/Hermosillo','Mountain Standard Time - Sonora'),(264,'MX','America/Tijuana','US Pacific Time - Baja California near US border'),(265,'MX','America/Santa_Isabel','Mexican Pacific Time - Baja California away from US border'),(266,'MX','America/Bahia_Banderas','Mexican Central Time - Bahia de Banderas'),(267,'MY','Asia/Kuala_Lumpur','peninsular Malaysia'),(268,'MY','Asia/Kuching','Sabah & Sarawak'),(269,'MZ','Africa/Maputo',''),(270,'NA','Africa/Windhoek',''),(271,'NC','Pacific/Noumea',''),(272,'NE','Africa/Niamey',''),(273,'NF','Pacific/Norfolk',''),(274,'NG','Africa/Lagos',''),(275,'NI','America/Managua',''),(276,'NL','Europe/Amsterdam',''),(277,'NO','Europe/Oslo',''),(278,'NP','Asia/Kathmandu',''),(279,'NR','Pacific/Nauru',''),(280,'NU','Pacific/Niue',''),(281,'NZ','Pacific/Auckland','most locations'),(282,'NZ','Pacific/Chatham','Chatham Islands'),(283,'OM','Asia/Muscat',''),(284,'PA','America/Panama',''),(285,'PE','America/Lima',''),(286,'PF','Pacific/Tahiti','Society Islands'),(287,'PF','Pacific/Marquesas','Marquesas Islands'),(288,'PF','Pacific/Gambier','Gambier Islands'),(289,'PG','Pacific/Port_Moresby',''),(290,'PH','Asia/Manila',''),(291,'PK','Asia/Karachi',''),(292,'PL','Europe/Warsaw',''),(293,'PM','America/Miquelon',''),(294,'PN','Pacific/Pitcairn',''),(295,'PR','America/Puerto_Rico',''),(296,'PS','Asia/Gaza','Gaza Strip'),(297,'PS','Asia/Hebron','West Bank'),(298,'PT','Europe/Lisbon','mainland'),(299,'PT','Atlantic/Madeira','Madeira Islands'),(300,'PT','Atlantic/Azores','Azores'),(301,'PW','Pacific/Palau',''),(302,'PY','America/Asuncion',''),(303,'QA','Asia/Qatar',''),(304,'RE','Indian/Reunion',''),(305,'RO','Europe/Bucharest',''),(306,'RS','Europe/Belgrade',''),(307,'RU','Europe/Kaliningrad','Moscow-01 - Kaliningrad'),(308,'RU','Europe/Moscow','Moscow+00 - west Russia'),(309,'RU','Europe/Volgograd','Moscow+00 - Caspian Sea'),(310,'RU','Europe/Samara','Moscow+00 - Samara, Udmurtia'),(311,'RU','Asia/Yekaterinburg','Moscow+02 - Urals'),(312,'RU','Asia/Omsk','Moscow+03 - west Siberia'),(313,'RU','Asia/Novosibirsk','Moscow+03 - Novosibirsk'),(314,'RU','Asia/Novokuznetsk','Moscow+03 - Novokuznetsk'),(315,'RU','Asia/Krasnoyarsk','Moscow+04 - Yenisei River'),(316,'RU','Asia/Irkutsk','Moscow+05 - Lake Baikal'),(317,'RU','Asia/Yakutsk','Moscow+06 - Lena River'),(318,'RU','Asia/Vladivostok','Moscow+07 - Amur River'),(319,'RU','Asia/Sakhalin','Moscow+07 - Sakhalin Island'),(320,'RU','Asia/Magadan','Moscow+08 - Magadan'),(321,'RU','Asia/Kamchatka','Moscow+08 - Kamchatka'),(322,'RU','Asia/Anadyr','Moscow+08 - Bering Sea'),(323,'RW','Africa/Kigali',''),(324,'SA','Asia/Riyadh',''),(325,'SB','Pacific/Guadalcanal',''),(326,'SC','Indian/Mahe',''),(327,'SD','Africa/Khartoum',''),(328,'SE','Europe/Stockholm',''),(329,'SG','Asia/Singapore',''),(330,'SH','Atlantic/St_Helena',''),(331,'SI','Europe/Ljubljana',''),(332,'SJ','Arctic/Longyearbyen',''),(333,'SK','Europe/Bratislava',''),(334,'SL','Africa/Freetown',''),(335,'SM','Europe/San_Marino',''),(336,'SN','Africa/Dakar',''),(337,'SO','Africa/Mogadishu',''),(338,'SR','America/Paramaribo',''),(339,'SS','Africa/Juba',''),(340,'ST','Africa/Sao_Tome',''),(341,'SV','America/El_Salvador',''),(342,'SX','America/Lower_Princes',''),(343,'SY','Asia/Damascus',''),(344,'SZ','Africa/Mbabane',''),(345,'TC','America/Grand_Turk',''),(346,'TD','Africa/Ndjamena',''),(347,'TF','Indian/Kerguelen',''),(348,'TG','Africa/Lome',''),(349,'TH','Asia/Bangkok',''),(350,'TJ','Asia/Dushanbe',''),(351,'TK','Pacific/Fakaofo',''),(352,'TL','Asia/Dili',''),(353,'TM','Asia/Ashgabat',''),(354,'TN','Africa/Tunis',''),(355,'TO','Pacific/Tongatapu',''),(356,'TR','Europe/Istanbul',''),(357,'TT','America/Port_of_Spain',''),(358,'TV','Pacific/Funafuti',''),(359,'TW','Asia/Taipei',''),(360,'TZ','Africa/Dar_es_Salaam',''),(361,'UA','Europe/Kiev','most locations'),(362,'UA','Europe/Uzhgorod','Ruthenia'),(363,'UA','Europe/Zaporozhye','Zaporozhye, E Lugansk / Zaporizhia, E Luhansk'),(364,'UA','Europe/Simferopol','central Crimea'),(365,'UG','Africa/Kampala',''),(366,'UM','Pacific/Johnston','Johnston Atoll'),(367,'UM','Pacific/Midway','Midway Islands'),(368,'UM','Pacific/Wake','Wake Island'),(369,'US','America/New_York','Eastern Time'),(370,'US','America/Detroit','Eastern Time - Michigan - most locations'),(371,'US','America/Kentucky/Louisville','Eastern Time - Kentucky - Louisville area'),(372,'US','America/Kentucky/Monticello','Eastern Time - Kentucky - Wayne County'),(373,'US','America/Indiana/Indianapolis','Eastern Time - Indiana - most locations'),(374,'US','America/Indiana/Vincennes','Eastern Time - Indiana - Daviess, Dubois, Knox & Martin Counties'),(375,'US','America/Indiana/Winamac','Eastern Time - Indiana - Pulaski County'),(376,'US','America/Indiana/Marengo','Eastern Time - Indiana - Crawford County'),(377,'US','America/Indiana/Petersburg','Eastern Time - Indiana - Pike County'),(378,'US','America/Indiana/Vevay','Eastern Time - Indiana - Switzerland County'),(379,'US','America/Chicago','Central Time'),(380,'US','America/Indiana/Tell_City','Central Time - Indiana - Perry County'),(381,'US','America/Indiana/Knox','Central Time - Indiana - Starke County'),(382,'US','America/Menominee','Central Time - Michigan - Dickinson, Gogebic, Iron & Menominee Counties'),(383,'US','America/North_Dakota/Center','Central Time - North Dakota - Oliver County'),(384,'US','America/North_Dakota/New_Salem','Central Time - North Dakota - Morton County (except Mandan area)'),(385,'US','America/North_Dakota/Beulah','Central Time - North Dakota - Mercer County'),(386,'US','America/Denver','Mountain Time'),(387,'US','America/Boise','Mountain Time - south Idaho & east Oregon'),(388,'US','America/Shiprock','Mountain Time - Navajo'),(389,'US','America/Phoenix','Mountain Standard Time - Arizona'),(390,'US','America/Los_Angeles','Pacific Time'),(391,'US','America/Anchorage','Alaska Time'),(392,'US','America/Juneau','Alaska Time - Alaska panhandle'),(393,'US','America/Sitka','Alaska Time - southeast Alaska panhandle'),(394,'US','America/Yakutat','Alaska Time - Alaska panhandle neck'),(395,'US','America/Nome','Alaska Time - west Alaska'),(396,'US','America/Adak','Aleutian Islands'),(397,'US','America/Metlakatla','Metlakatla Time - Annette Island'),(398,'US','Pacific/Honolulu','Hawaii'),(399,'UY','America/Montevideo',''),(400,'UZ','Asia/Samarkand','west Uzbekistan'),(401,'UZ','Asia/Tashkent','east Uzbekistan'),(402,'VA','Europe/Vatican',''),(403,'VC','America/St_Vincent',''),(404,'VE','America/Caracas',''),(405,'VG','America/Tortola',''),(406,'VI','America/St_Thomas',''),(407,'VN','Asia/Ho_Chi_Minh',''),(408,'VU','Pacific/Efate',''),(409,'WF','Pacific/Wallis',''),(410,'WS','Pacific/Apia',''),(411,'YE','Asia/Aden',''),(412,'YT','Indian/Mayotte',''),(413,'ZA','Africa/Johannesburg',''),(414,'ZM','Africa/Lusaka',''),(415,'ZW','Africa/Harare',''); +INSERT INTO `timezones` +VALUES (1, 'AD', 'Europe/Andorra', NULL), + (2, 'AE', 'Asia/Dubai', ''), + (3, 'AF', 'Asia/Kabul', ''), + (4, 'AG', 'America/Antigua', ''), + (5, 'AI', 'America/Anguilla', ''), + (6, 'AL', 'Europe/Tirane', ''), + (7, 'AM', 'Asia/Yerevan', ''), + (8, 'AO', 'Africa/Luanda', ''), + (9, 'AQ', 'Antarctica/McMurdo', 'McMurdo Station, Ross Island'), + (10, 'AQ', 'Antarctica/South_Pole', 'Amundsen-Scott Station, South Pole'), + (11, 'AQ', 'Antarctica/Rothera', 'Rothera Station, Adelaide Island'), + (12, 'AQ', 'Antarctica/Palmer', 'Palmer Station, Anvers Island'), + (13, 'AQ', 'Antarctica/Mawson', 'Mawson Station, Holme Bay'), + (14, 'AQ', 'Antarctica/Davis', 'Davis Station, Vestfold Hills'), + (15, 'AQ', 'Antarctica/Casey', 'Casey Station, Bailey Peninsula'), + (16, 'AQ', 'Antarctica/Vostok', 'Vostok Station, Lake Vostok'), + (17, 'AQ', 'Antarctica/DumontDUrville', 'Dumont-dUrville Station, Terre Adelie'), + (18, 'AQ', 'Antarctica/Syowa', 'Syowa Station, E Ongul I'), + (19, 'AQ', 'Antarctica/Macquarie', 'Macquarie Island Station, Macquarie Island'), + (20, 'AR', 'America/Argentina/Buenos_Aires', 'Buenos Aires (BA, CF)'), + (21, 'AR', 'America/Argentina/Cordoba', 'most locations (CB, CC, CN, ER, FM, MN, SE, SF)'), + (22, 'AR', 'America/Argentina/Salta', '(SA, LP, NQ, RN)'), + (23, 'AR', 'America/Argentina/Jujuy', 'Jujuy (JY)'), + (24, 'AR', 'America/Argentina/Tucuman', 'Tucuman (TM)'), + (25, 'AR', 'America/Argentina/Catamarca', 'Catamarca (CT), Chubut (CH)'), + (26, 'AR', 'America/Argentina/La_Rioja', 'La Rioja (LR)'), + (27, 'AR', 'America/Argentina/San_Juan', 'San Juan (SJ)'), + (28, 'AR', 'America/Argentina/Mendoza', 'Mendoza (MZ)'), + (29, 'AR', 'America/Argentina/San_Luis', 'San Luis (SL)'), + (30, 'AR', 'America/Argentina/Rio_Gallegos', 'Santa Cruz (SC)'), + (31, 'AR', 'America/Argentina/Ushuaia', 'Tierra del Fuego (TF)'), + (32, 'AS', 'Pacific/Pago_Pago', ''), + (33, 'AT', 'Europe/Vienna', ''), + (34, 'AU', 'Australia/Lord_Howe', 'Lord Howe Island'), + (35, 'AU', 'Australia/Hobart', 'Tasmania - most locations'), + (36, 'AU', 'Australia/Currie', 'Tasmania - King Island'), + (37, 'AU', 'Australia/Melbourne', 'Victoria'), + (38, 'AU', 'Australia/Sydney', 'New South Wales - most locations'), + (39, 'AU', 'Australia/Broken_Hill', 'New South Wales - Yancowinna'), + (40, 'AU', 'Australia/Brisbane', 'Queensland - most locations'), + (41, 'AU', 'Australia/Lindeman', 'Queensland - Holiday Islands'), + (42, 'AU', 'Australia/Adelaide', 'South Australia'), + (43, 'AU', 'Australia/Darwin', 'Northern Territory'), + (44, 'AU', 'Australia/Perth', 'Western Australia - most locations'), + (45, 'AU', 'Australia/Eucla', 'Western Australia - Eucla area'), + (46, 'AW', 'America/Aruba', ''), + (47, 'AX', 'Europe/Mariehamn', ''), + (48, 'AZ', 'Asia/Baku', ''), + (49, 'BA', 'Europe/Sarajevo', ''), + (50, 'BB', 'America/Barbados', ''), + (51, 'BD', 'Asia/Dhaka', ''), + (52, 'BE', 'Europe/Brussels', ''), + (53, 'BF', 'Africa/Ouagadougou', ''), + (54, 'BG', 'Europe/Sofia', ''), + (55, 'BH', 'Asia/Bahrain', ''), + (56, 'BI', 'Africa/Bujumbura', ''), + (57, 'BJ', 'Africa/Porto-Novo', ''), + (58, 'BL', 'America/St_Barthelemy', ''), + (59, 'BM', 'Atlantic/Bermuda', ''), + (60, 'BN', 'Asia/Brunei', ''), + (61, 'BO', 'America/La_Paz', ''), + (62, 'BQ', 'America/Kralendijk', ''), + (63, 'BR', 'America/Noronha', 'Atlantic islands'), + (64, 'BR', 'America/Belem', 'Amapa, E Para'), + (65, 'BR', 'America/Fortaleza', 'NE Brazil (MA, PI, CE, RN, PB)'), + (66, 'BR', 'America/Recife', 'Pernambuco'), + (67, 'BR', 'America/Araguaina', 'Tocantins'), + (68, 'BR', 'America/Maceio', 'Alagoas, Sergipe'), + (69, 'BR', 'America/Bahia', 'Bahia'), + (70, 'BR', 'America/Sao_Paulo', 'S & SE Brazil (GO, DF, MG, ES, RJ, SP, PR, SC, RS)'), + (71, 'BR', 'America/Campo_Grande', 'Mato Grosso do Sul'), + (72, 'BR', 'America/Cuiaba', 'Mato Grosso'), + (73, 'BR', 'America/Santarem', 'W Para'), + (74, 'BR', 'America/Porto_Velho', 'Rondonia'), + (75, 'BR', 'America/Boa_Vista', 'Roraima'), + (76, 'BR', 'America/Manaus', 'E Amazonas'), + (77, 'BR', 'America/Eirunepe', 'W Amazonas'), + (78, 'BR', 'America/Rio_Branco', 'Acre'), + (79, 'BS', 'America/Nassau', ''), + (80, 'BT', 'Asia/Thimphu', ''), + (81, 'BW', 'Africa/Gaborone', ''), + (82, 'BY', 'Europe/Minsk', ''), + (83, 'BZ', 'America/Belize', ''), + (84, 'CA', 'America/St_Johns', 'Newfoundland Time, including SE Labrador'), + (85, 'CA', 'America/Halifax', 'Atlantic Time - Nova Scotia (most places), PEI'), + (86, 'CA', 'America/Glace_Bay', 'Atlantic Time - Nova Scotia - places that did not observe DST 1966-1971'), + (87, 'CA', 'America/Moncton', 'Atlantic Time - New Brunswick'), + (88, 'CA', 'America/Goose_Bay', 'Atlantic Time - Labrador - most locations'), + (89, 'CA', 'America/Blanc-Sablon', 'Atlantic Standard Time - Quebec - Lower North Shore'), + (90, 'CA', 'America/Montreal', 'Eastern Time - Quebec - most locations'), + (91, 'CA', 'America/Toronto', 'Eastern Time - Ontario - most locations'), + (92, 'CA', 'America/Nipigon', 'Eastern Time - Ontario & Quebec - places that did not observe DST 1967-1973'), + (93, 'CA', 'America/Thunder_Bay', 'Eastern Time - Thunder Bay, Ontario'), + (94, 'CA', 'America/Iqaluit', 'Eastern Time - east Nunavut - most locations'), + (95, 'CA', 'America/Pangnirtung', 'Eastern Time - Pangnirtung, Nunavut'), + (96, 'CA', 'America/Resolute', 'Central Standard Time - Resolute, Nunavut'), + (97, 'CA', 'America/Atikokan', 'Eastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut'), + (98, 'CA', 'America/Rankin_Inlet', 'Central Time - central Nunavut'), + (99, 'CA', 'America/Winnipeg', 'Central Time - Manitoba & west Ontario'), + (100, 'CA', 'America/Rainy_River', 'Central Time - Rainy River & Fort Frances, Ontario'), + (101, 'CA', 'America/Regina', 'Central Standard Time - Saskatchewan - most locations'), + (102, 'CA', 'America/Swift_Current', 'Central Standard Time - Saskatchewan - midwest'), + (103, 'CA', 'America/Edmonton', 'Mountain Time - Alberta, east British Columbia & west Saskatchewan'), + (104, 'CA', 'America/Cambridge_Bay', 'Mountain Time - west Nunavut'), + (105, 'CA', 'America/Yellowknife', 'Mountain Time - central Northwest Territories'), + (106, 'CA', 'America/Inuvik', 'Mountain Time - west Northwest Territories'), + (107, 'CA', 'America/Creston', 'Mountain Standard Time - Creston, British Columbia'), + (108, 'CA', 'America/Dawson_Creek', 'Mountain Standard Time - Dawson Creek & Fort Saint John, British Columbia'), + (109, 'CA', 'America/Vancouver', 'Pacific Time - west British Columbia'), + (110, 'CA', 'America/Whitehorse', 'Pacific Time - south Yukon'), + (111, 'CA', 'America/Dawson', 'Pacific Time - north Yukon'), + (112, 'CC', 'Indian/Cocos', ''), + (113, 'CD', 'Africa/Kinshasa', 'west Dem. Rep. of Congo'), + (114, 'CD', 'Africa/Lubumbashi', 'east Dem. Rep. of Congo'), + (115, 'CF', 'Africa/Bangui', ''), + (116, 'CG', 'Africa/Brazzaville', ''), + (117, 'CH', 'Europe/Zurich', ''), + (118, 'CI', 'Africa/Abidjan', ''), + (119, 'CK', 'Pacific/Rarotonga', ''), + (120, 'CL', 'America/Santiago', 'most locations'), + (121, 'CL', 'Pacific/Easter', 'Easter Island & Sala y Gomez'), + (122, 'CM', 'Africa/Douala', ''), + (123, 'CN', 'Asia/Shanghai', 'east China - Beijing, Guangdong, Shanghai, etc.'), + (124, 'CN', 'Asia/Harbin', 'Heilongjiang (except Mohe), Jilin'), + (125, 'CN', 'Asia/Chongqing', 'central China - Sichuan, Yunnan, Guangxi, Shaanxi, Guizhou, etc.'), + (126, 'CN', 'Asia/Urumqi', 'most of Tibet & Xinjiang'), + (127, 'CN', 'Asia/Kashgar', 'west Tibet & Xinjiang'), + (128, 'CO', 'America/Bogota', ''), + (129, 'CR', 'America/Costa_Rica', ''), + (130, 'CU', 'America/Havana', ''), + (131, 'CV', 'Atlantic/Cape_Verde', ''), + (132, 'CW', 'America/Curacao', ''), + (133, 'CX', 'Indian/Christmas', ''), + (134, 'CY', 'Asia/Nicosia', ''), + (135, 'CZ', 'Europe/Prague', ''), + (136, 'DE', 'Europe/Berlin', ''), + (137, 'DJ', 'Africa/Djibouti', ''), + (138, 'DK', 'Europe/Copenhagen', ''), + (139, 'DM', 'America/Dominica', ''), + (140, 'DO', 'America/Santo_Domingo', ''), + (141, 'DZ', 'Africa/Algiers', ''), + (142, 'EC', 'America/Guayaquil', 'mainland'), + (143, 'EC', 'Pacific/Galapagos', 'Galapagos Islands'), + (144, 'EE', 'Europe/Tallinn', ''), + (145, 'EG', 'Africa/Cairo', ''), + (146, 'EH', 'Africa/El_Aaiun', ''), + (147, 'ER', 'Africa/Asmara', ''), + (148, 'ES', 'Europe/Madrid', 'mainland'), + (149, 'ES', 'Africa/Ceuta', 'Ceuta & Melilla'), + (150, 'ES', 'Atlantic/Canary', 'Canary Islands'), + (151, 'ET', 'Africa/Addis_Ababa', ''), + (152, 'FI', 'Europe/Helsinki', ''), + (153, 'FJ', 'Pacific/Fiji', ''), + (154, 'FK', 'Atlantic/Stanley', ''), + (155, 'FM', 'Pacific/Chuuk', 'Chuuk (Truk) and Yap'), + (156, 'FM', 'Pacific/Pohnpei', 'Pohnpei (Ponape)'), + (157, 'FM', 'Pacific/Kosrae', 'Kosrae'), + (158, 'FO', 'Atlantic/Faroe', ''), + (159, 'FR', 'Europe/Paris', ''), + (160, 'GA', 'Africa/Libreville', ''), + (161, 'GB', 'Europe/London', ''), + (162, 'GD', 'America/Grenada', ''), + (163, 'GE', 'Asia/Tbilisi', ''), + (164, 'GF', 'America/Cayenne', ''), + (165, 'GG', 'Europe/Guernsey', ''), + (166, 'GH', 'Africa/Accra', ''), + (167, 'GI', 'Europe/Gibraltar', ''), + (168, 'GL', 'America/Godthab', 'most locations'), + (169, 'GL', 'America/Danmarkshavn', 'east coast, north of Scoresbysund'), + (170, 'GL', 'America/Scoresbysund', 'Scoresbysund / Ittoqqortoormiit'), + (171, 'GL', 'America/Thule', 'Thule / Pituffik'), + (172, 'GM', 'Africa/Banjul', ''), + (173, 'GN', 'Africa/Conakry', ''), + (174, 'GP', 'America/Guadeloupe', ''), + (175, 'GQ', 'Africa/Malabo', ''), + (176, 'GR', 'Europe/Athens', ''), + (177, 'GS', 'Atlantic/South_Georgia', ''), + (178, 'GT', 'America/Guatemala', ''), + (179, 'GU', 'Pacific/Guam', ''), + (180, 'GW', 'Africa/Bissau', ''), + (181, 'GY', 'America/Guyana', ''), + (182, 'HK', 'Asia/Hong_Kong', ''), + (183, 'HN', 'America/Tegucigalpa', ''), + (184, 'HR', 'Europe/Zagreb', ''), + (185, 'HT', 'America/Port-au-Prince', ''), + (186, 'HU', 'Europe/Budapest', ''), + (187, 'ID', 'Asia/Jakarta', 'Java & Sumatra'), + (188, 'ID', 'Asia/Pontianak', 'west & central Borneo'), + (189, 'ID', 'Asia/Makassar', 'east & south Borneo, Sulawesi (Celebes), Bali, Nusa Tengarra, west Timor'), + (190, 'ID', 'Asia/Jayapura', 'west New Guinea (Irian Jaya) & Malukus (Moluccas)'), + (191, 'IE', 'Europe/Dublin', ''), + (192, 'IL', 'Asia/Jerusalem', ''), + (193, 'IM', 'Europe/Isle_of_Man', ''), + (194, 'IN', 'Asia/Kolkata', ''), + (195, 'IO', 'Indian/Chagos', ''), + (196, 'IQ', 'Asia/Baghdad', ''), + (197, 'IR', 'Asia/Tehran', ''), + (198, 'IS', 'Atlantic/Reykjavik', ''), + (199, 'IT', 'Europe/Rome', ''), + (200, 'JE', 'Europe/Jersey', ''), + (201, 'JM', 'America/Jamaica', ''), + (202, 'JO', 'Asia/Amman', ''), + (203, 'JP', 'Asia/Tokyo', ''), + (204, 'KE', 'Africa/Nairobi', ''), + (205, 'KG', 'Asia/Bishkek', ''), + (206, 'KH', 'Asia/Phnom_Penh', ''), + (207, 'KI', 'Pacific/Tarawa', 'Gilbert Islands'), + (208, 'KI', 'Pacific/Enderbury', 'Phoenix Islands'), + (209, 'KI', 'Pacific/Kiritimati', 'Line Islands'), + (210, 'KM', 'Indian/Comoro', ''), + (211, 'KN', 'America/St_Kitts', ''), + (212, 'KP', 'Asia/Pyongyang', ''), + (213, 'KR', 'Asia/Seoul', ''), + (214, 'KW', 'Asia/Kuwait', ''), + (215, 'KY', 'America/Cayman', ''), + (216, 'KZ', 'Asia/Almaty', 'most locations'), + (217, 'KZ', 'Asia/Qyzylorda', 'Qyzylorda (Kyzylorda, Kzyl-Orda)'), + (218, 'KZ', 'Asia/Aqtobe', 'Aqtobe (Aktobe)'), + (219, 'KZ', 'Asia/Aqtau', 'Atyrau (Atirau, Guryev), Mangghystau (Mankistau)'), + (220, 'KZ', 'Asia/Oral', 'West Kazakhstan'), + (221, 'LA', 'Asia/Vientiane', ''), + (222, 'LB', 'Asia/Beirut', ''), + (223, 'LC', 'America/St_Lucia', ''), + (224, 'LI', 'Europe/Vaduz', ''), + (225, 'LK', 'Asia/Colombo', ''), + (226, 'LR', 'Africa/Monrovia', ''), + (227, 'LS', 'Africa/Maseru', ''), + (228, 'LT', 'Europe/Vilnius', ''), + (229, 'LU', 'Europe/Luxembourg', ''), + (230, 'LV', 'Europe/Riga', ''), + (231, 'LY', 'Africa/Tripoli', ''), + (232, 'MA', 'Africa/Casablanca', ''), + (233, 'MC', 'Europe/Monaco', ''), + (234, 'MD', 'Europe/Chisinau', ''), + (235, 'ME', 'Europe/Podgorica', ''), + (236, 'MF', 'America/Marigot', ''), + (237, 'MG', 'Indian/Antananarivo', ''), + (238, 'MH', 'Pacific/Majuro', 'most locations'), + (239, 'MH', 'Pacific/Kwajalein', 'Kwajalein'), + (240, 'MK', 'Europe/Skopje', ''), + (241, 'ML', 'Africa/Bamako', ''), + (242, 'MM', 'Asia/Rangoon', ''), + (243, 'MN', 'Asia/Ulaanbaatar', 'most locations'), + (244, 'MN', 'Asia/Hovd', 'Bayan-Olgiy, Govi-Altai, Hovd, Uvs, Zavkhan'), + (245, 'MN', 'Asia/Choibalsan', 'Dornod, Sukhbaatar'), + (246, 'MO', 'Asia/Macau', ''), + (247, 'MP', 'Pacific/Saipan', ''), + (248, 'MQ', 'America/Martinique', ''), + (249, 'MR', 'Africa/Nouakchott', ''), + (250, 'MS', 'America/Montserrat', ''), + (251, 'MT', 'Europe/Malta', ''), + (252, 'MU', 'Indian/Mauritius', ''), + (253, 'MV', 'Indian/Maldives', ''), + (254, 'MW', 'Africa/Blantyre', ''), + (255, 'MX', 'America/Mexico_City', 'Central Time - most locations'), + (256, 'MX', 'America/Cancun', 'Central Time - Quintana Roo'), + (257, 'MX', 'America/Merida', 'Central Time - Campeche, Yucatan'), + (258, 'MX', 'America/Monterrey', + 'Mexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border'), + (259, 'MX', 'America/Matamoros', 'US Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border'), + (260, 'MX', 'America/Mazatlan', 'Mountain Time - S Baja, Nayarit, Sinaloa'), + (261, 'MX', 'America/Chihuahua', 'Mexican Mountain Time - Chihuahua away from US border'), + (262, 'MX', 'America/Ojinaga', 'US Mountain Time - Chihuahua near US border'), + (263, 'MX', 'America/Hermosillo', 'Mountain Standard Time - Sonora'), + (264, 'MX', 'America/Tijuana', 'US Pacific Time - Baja California near US border'), + (265, 'MX', 'America/Santa_Isabel', 'Mexican Pacific Time - Baja California away from US border'), + (266, 'MX', 'America/Bahia_Banderas', 'Mexican Central Time - Bahia de Banderas'), + (267, 'MY', 'Asia/Kuala_Lumpur', 'peninsular Malaysia'), + (268, 'MY', 'Asia/Kuching', 'Sabah & Sarawak'), + (269, 'MZ', 'Africa/Maputo', ''), + (270, 'NA', 'Africa/Windhoek', ''), + (271, 'NC', 'Pacific/Noumea', ''), + (272, 'NE', 'Africa/Niamey', ''), + (273, 'NF', 'Pacific/Norfolk', ''), + (274, 'NG', 'Africa/Lagos', ''), + (275, 'NI', 'America/Managua', ''), + (276, 'NL', 'Europe/Amsterdam', ''), + (277, 'NO', 'Europe/Oslo', ''), + (278, 'NP', 'Asia/Kathmandu', ''), + (279, 'NR', 'Pacific/Nauru', ''), + (280, 'NU', 'Pacific/Niue', ''), + (281, 'NZ', 'Pacific/Auckland', 'most locations'), + (282, 'NZ', 'Pacific/Chatham', 'Chatham Islands'), + (283, 'OM', 'Asia/Muscat', ''), + (284, 'PA', 'America/Panama', ''), + (285, 'PE', 'America/Lima', ''), + (286, 'PF', 'Pacific/Tahiti', 'Society Islands'), + (287, 'PF', 'Pacific/Marquesas', 'Marquesas Islands'), + (288, 'PF', 'Pacific/Gambier', 'Gambier Islands'), + (289, 'PG', 'Pacific/Port_Moresby', ''), + (290, 'PH', 'Asia/Manila', ''), + (291, 'PK', 'Asia/Karachi', ''), + (292, 'PL', 'Europe/Warsaw', ''), + (293, 'PM', 'America/Miquelon', ''), + (294, 'PN', 'Pacific/Pitcairn', ''), + (295, 'PR', 'America/Puerto_Rico', ''), + (296, 'PS', 'Asia/Gaza', 'Gaza Strip'), + (297, 'PS', 'Asia/Hebron', 'West Bank'), + (298, 'PT', 'Europe/Lisbon', 'mainland'), + (299, 'PT', 'Atlantic/Madeira', 'Madeira Islands'), + (300, 'PT', 'Atlantic/Azores', 'Azores'), + (301, 'PW', 'Pacific/Palau', ''), + (302, 'PY', 'America/Asuncion', ''), + (303, 'QA', 'Asia/Qatar', ''), + (304, 'RE', 'Indian/Reunion', ''), + (305, 'RO', 'Europe/Bucharest', ''), + (306, 'RS', 'Europe/Belgrade', ''), + (307, 'RU', 'Europe/Kaliningrad', 'Moscow-01 - Kaliningrad'), + (308, 'RU', 'Europe/Moscow', 'Moscow+00 - west Russia'), + (309, 'RU', 'Europe/Volgograd', 'Moscow+00 - Caspian Sea'), + (310, 'RU', 'Europe/Samara', 'Moscow+00 - Samara, Udmurtia'), + (311, 'RU', 'Asia/Yekaterinburg', 'Moscow+02 - Urals'), + (312, 'RU', 'Asia/Omsk', 'Moscow+03 - west Siberia'), + (313, 'RU', 'Asia/Novosibirsk', 'Moscow+03 - Novosibirsk'), + (314, 'RU', 'Asia/Novokuznetsk', 'Moscow+03 - Novokuznetsk'), + (315, 'RU', 'Asia/Krasnoyarsk', 'Moscow+04 - Yenisei River'), + (316, 'RU', 'Asia/Irkutsk', 'Moscow+05 - Lake Baikal'), + (317, 'RU', 'Asia/Yakutsk', 'Moscow+06 - Lena River'), + (318, 'RU', 'Asia/Vladivostok', 'Moscow+07 - Amur River'), + (319, 'RU', 'Asia/Sakhalin', 'Moscow+07 - Sakhalin Island'), + (320, 'RU', 'Asia/Magadan', 'Moscow+08 - Magadan'), + (321, 'RU', 'Asia/Kamchatka', 'Moscow+08 - Kamchatka'), + (322, 'RU', 'Asia/Anadyr', 'Moscow+08 - Bering Sea'), + (323, 'RW', 'Africa/Kigali', ''), + (324, 'SA', 'Asia/Riyadh', ''), + (325, 'SB', 'Pacific/Guadalcanal', ''), + (326, 'SC', 'Indian/Mahe', ''), + (327, 'SD', 'Africa/Khartoum', ''), + (328, 'SE', 'Europe/Stockholm', ''), + (329, 'SG', 'Asia/Singapore', ''), + (330, 'SH', 'Atlantic/St_Helena', ''), + (331, 'SI', 'Europe/Ljubljana', ''), + (332, 'SJ', 'Arctic/Longyearbyen', ''), + (333, 'SK', 'Europe/Bratislava', ''), + (334, 'SL', 'Africa/Freetown', ''), + (335, 'SM', 'Europe/San_Marino', ''), + (336, 'SN', 'Africa/Dakar', ''), + (337, 'SO', 'Africa/Mogadishu', ''), + (338, 'SR', 'America/Paramaribo', ''), + (339, 'SS', 'Africa/Juba', ''), + (340, 'ST', 'Africa/Sao_Tome', ''), + (341, 'SV', 'America/El_Salvador', ''), + (342, 'SX', 'America/Lower_Princes', ''), + (343, 'SY', 'Asia/Damascus', ''), + (344, 'SZ', 'Africa/Mbabane', ''), + (345, 'TC', 'America/Grand_Turk', ''), + (346, 'TD', 'Africa/Ndjamena', ''), + (347, 'TF', 'Indian/Kerguelen', ''), + (348, 'TG', 'Africa/Lome', ''), + (349, 'TH', 'Asia/Bangkok', ''), + (350, 'TJ', 'Asia/Dushanbe', ''), + (351, 'TK', 'Pacific/Fakaofo', ''), + (352, 'TL', 'Asia/Dili', ''), + (353, 'TM', 'Asia/Ashgabat', ''), + (354, 'TN', 'Africa/Tunis', ''), + (355, 'TO', 'Pacific/Tongatapu', ''), + (356, 'TR', 'Europe/Istanbul', ''), + (357, 'TT', 'America/Port_of_Spain', ''), + (358, 'TV', 'Pacific/Funafuti', ''), + (359, 'TW', 'Asia/Taipei', ''), + (360, 'TZ', 'Africa/Dar_es_Salaam', ''), + (361, 'UA', 'Europe/Kiev', 'most locations'), + (362, 'UA', 'Europe/Uzhgorod', 'Ruthenia'), + (363, 'UA', 'Europe/Zaporozhye', 'Zaporozhye, E Lugansk / Zaporizhia, E Luhansk'), + (364, 'UA', 'Europe/Simferopol', 'central Crimea'), + (365, 'UG', 'Africa/Kampala', ''), + (366, 'UM', 'Pacific/Johnston', 'Johnston Atoll'), + (367, 'UM', 'Pacific/Midway', 'Midway Islands'), + (368, 'UM', 'Pacific/Wake', 'Wake Island'), + (369, 'US', 'America/New_York', 'Eastern Time'), + (370, 'US', 'America/Detroit', 'Eastern Time - Michigan - most locations'), + (371, 'US', 'America/Kentucky/Louisville', 'Eastern Time - Kentucky - Louisville area'), + (372, 'US', 'America/Kentucky/Monticello', 'Eastern Time - Kentucky - Wayne County'), + (373, 'US', 'America/Indiana/Indianapolis', 'Eastern Time - Indiana - most locations'), + (374, 'US', 'America/Indiana/Vincennes', 'Eastern Time - Indiana - Daviess, Dubois, Knox & Martin Counties'), + (375, 'US', 'America/Indiana/Winamac', 'Eastern Time - Indiana - Pulaski County'), + (376, 'US', 'America/Indiana/Marengo', 'Eastern Time - Indiana - Crawford County'), + (377, 'US', 'America/Indiana/Petersburg', 'Eastern Time - Indiana - Pike County'), + (378, 'US', 'America/Indiana/Vevay', 'Eastern Time - Indiana - Switzerland County'), + (379, 'US', 'America/Chicago', 'Central Time'), + (380, 'US', 'America/Indiana/Tell_City', 'Central Time - Indiana - Perry County'), + (381, 'US', 'America/Indiana/Knox', 'Central Time - Indiana - Starke County'), + (382, 'US', 'America/Menominee', 'Central Time - Michigan - Dickinson, Gogebic, Iron & Menominee Counties'), + (383, 'US', 'America/North_Dakota/Center', 'Central Time - North Dakota - Oliver County'), + (384, 'US', 'America/North_Dakota/New_Salem', + 'Central Time - North Dakota - Morton County (except Mandan area)'), + (385, 'US', 'America/North_Dakota/Beulah', 'Central Time - North Dakota - Mercer County'), + (386, 'US', 'America/Denver', 'Mountain Time'), + (387, 'US', 'America/Boise', 'Mountain Time - south Idaho & east Oregon'), + (388, 'US', 'America/Shiprock', 'Mountain Time - Navajo'), + (389, 'US', 'America/Phoenix', 'Mountain Standard Time - Arizona'), + (390, 'US', 'America/Los_Angeles', 'Pacific Time'), + (391, 'US', 'America/Anchorage', 'Alaska Time'), + (392, 'US', 'America/Juneau', 'Alaska Time - Alaska panhandle'), + (393, 'US', 'America/Sitka', 'Alaska Time - southeast Alaska panhandle'), + (394, 'US', 'America/Yakutat', 'Alaska Time - Alaska panhandle neck'), + (395, 'US', 'America/Nome', 'Alaska Time - west Alaska'), + (396, 'US', 'America/Adak', 'Aleutian Islands'), + (397, 'US', 'America/Metlakatla', 'Metlakatla Time - Annette Island'), + (398, 'US', 'Pacific/Honolulu', 'Hawaii'), + (399, 'UY', 'America/Montevideo', ''), + (400, 'UZ', 'Asia/Samarkand', 'west Uzbekistan'), + (401, 'UZ', 'Asia/Tashkent', 'east Uzbekistan'), + (402, 'VA', 'Europe/Vatican', ''), + (403, 'VC', 'America/St_Vincent', ''), + (404, 'VE', 'America/Caracas', ''), + (405, 'VG', 'America/Tortola', ''), + (406, 'VI', 'America/St_Thomas', ''), + (407, 'VN', 'Asia/Ho_Chi_Minh', ''), + (408, 'VU', 'Pacific/Efate', ''), + (409, 'WF', 'Pacific/Wallis', ''), + (410, 'WS', 'Pacific/Apia', ''), + (411, 'YE', 'Asia/Aden', ''), + (412, 'YT', 'Indian/Mayotte', ''), + (413, 'ZA', 'Africa/Johannesburg', ''), + (414, 'ZM', 'Africa/Lusaka', ''), + (415, 'ZW', 'Africa/Harare', ''); /*!40000 ALTER TABLE `timezones` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; diff --git a/fineract-db/multi-tenant-demo-backups/bare-bones-demo/README.md b/fineract-db/multi-tenant-demo-backups/bare-bones-demo/README.md index 7a0d8a7d6f7..d504ef9b416 100644 --- a/fineract-db/multi-tenant-demo-backups/bare-bones-demo/README.md +++ b/fineract-db/multi-tenant-demo-backups/bare-bones-demo/README.md @@ -5,17 +5,25 @@ This demo database contains: - DDL of latest schema - Minimum reference data required for deployment of platform which is: - - Its mandatory to have one selected currency so we default to US Dollar - - Its mandatory to have one root or head office, so we have one created by default called a 'Head Office' - - Permissions supported/needed by latest release of software are setup - - Its mandatory to have at least one role when creating new users so we have one role created by default called 'Super user' which has the special permission 'Full Authorisation'. Any user with this role can do anything in the system. - - Its required to have at least one application user setup so remaining setup can be done through ui so we have on application user created by default with username 'mifos' with a password of 'password'. Application users must be associated with an office and a role so this user is associated with 'Head office' and 'Super user' role allowing this user to do any operation in any office(branch). + - Its mandatory to have one selected currency so we default to US Dollar + - Its mandatory to have one root or head office, so we have one created by default called a 'Head Office' + - Permissions supported/needed by latest release of software are setup + - Its mandatory to have at least one role when creating new users so we have one role created by default called ' + Super user' which has the special permission 'Full Authorisation'. Any user with this role can do anything in the + system. + - Its required to have at least one application user setup so remaining setup can be done through ui so we have on + application user created by default with username 'mifos' with a password of 'password'. Application users must be + associated with an office and a role so this user is associated with 'Head office' and 'Super user' role allowing + this user to do any operation in any office(branch). - Configuration - - No 'additional data' through the 'datatables' approach is setup - - One 'code' is setup called 'Client Identifier' with default values of {'Passport number'} - (required for Client Identity Document functionalty) - - Enable/Disable configuration has one entry named 'maker-checker' to allow people to enable disable this feature at global level. It is off or disabled by default. + - No 'additional data' through the 'datatables' approach is setup + - One 'code' is setup called 'Client Identifier' with default values of {'Passport number'} - (required for Client + Identity Document functionalty) + - Enable/Disable configuration has one entry named 'maker-checker' to allow people to enable disable this feature at + global level. It is off or disabled by default. - No products (loans, deposit, savings) are setup - No Charges (fees or penalties) are setup - No Staff (employees) are setup (loan officers are optional when submiting new loan application) - No Portfolio data (no clients, groups, loan accounts, deposit accounts, savings accounts) -- No Accounting data (no chart of accounts is setup, by default accounting with respect to portfolio items is off unless enabled when creating a loan product.) +- No Accounting data (no chart of accounts is setup, by default accounting with respect to portfolio items is off unless + enabled when creating a loan product.) diff --git a/fineract-db/multi-tenant-demo-backups/bare-bones-demo/bk_bare_bones_demo.sql b/fineract-db/multi-tenant-demo-backups/bare-bones-demo/bk_bare_bones_demo.sql index a14eb7e55f1..9862a042007 100644 --- a/fineract-db/multi-tenant-demo-backups/bare-bones-demo/bk_bare_bones_demo.sql +++ b/fineract-db/multi-tenant-demo-backups/bare-bones-demo/bk_bare_bones_demo.sql @@ -41,20 +41,21 @@ DROP TABLE IF EXISTS `acc_gl_account`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_gl_account` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(45) NOT NULL, - `parent_id` BIGINT DEFAULT NULL, - `gl_code` varchar(45) NOT NULL, - `disabled` tinyint NOT NULL DEFAULT '0', - `manual_journal_entries_allowed` tinyint NOT NULL DEFAULT '1', - `account_usage` tinyint NOT NULL DEFAULT '2', - `classification_enum` SMALLINT NOT NULL, - `description` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `acc_gl_code` (`gl_code`), - KEY `FK_ACC_0000000001` (`parent_id`), - CONSTRAINT `FK_ACC_0000000001` FOREIGN KEY (`parent_id`) REFERENCES `acc_gl_account` (`id`) +CREATE TABLE `acc_gl_account` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(45) NOT NULL, + `parent_id` BIGINT DEFAULT NULL, + `gl_code` varchar(45) NOT NULL, + `disabled` tinyint NOT NULL DEFAULT '0', + `manual_journal_entries_allowed` tinyint NOT NULL DEFAULT '1', + `account_usage` tinyint NOT NULL DEFAULT '2', + `classification_enum` SMALLINT NOT NULL, + `description` varchar(500) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `acc_gl_code` (`gl_code`), + KEY `FK_ACC_0000000001` (`parent_id`), + CONSTRAINT `FK_ACC_0000000001` FOREIGN KEY (`parent_id`) REFERENCES `acc_gl_account` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -62,10 +63,12 @@ CREATE TABLE `acc_gl_account` ( -- Dumping data for table `acc_gl_account` -- -LOCK TABLES `acc_gl_account` WRITE; +LOCK +TABLES `acc_gl_account` WRITE; /*!40000 ALTER TABLE `acc_gl_account` DISABLE KEYS */; /*!40000 ALTER TABLE `acc_gl_account` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `acc_gl_closure` @@ -74,24 +77,25 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `acc_gl_closure`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_gl_closure` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `office_id` BIGINT NOT NULL, - `closing_date` date NOT NULL, - `is_deleted` INT NOT NULL DEFAULT '0', - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - `comments` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `office_id_closing_date` (`office_id`,`closing_date`), - KEY `FK_acc_gl_closure_m_office` (`office_id`), - KEY `FK_acc_gl_closure_m_appuser` (`createdby_id`), - KEY `FK_acc_gl_closure_m_appuser_2` (`lastmodifiedby_id`), - CONSTRAINT `FK_acc_gl_closure_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_closure_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_closure_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `acc_gl_closure` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `office_id` BIGINT NOT NULL, + `closing_date` date NOT NULL, + `is_deleted` INT NOT NULL DEFAULT '0', + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + `comments` varchar(500) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `office_id_closing_date` (`office_id`,`closing_date`), + KEY `FK_acc_gl_closure_m_office` (`office_id`), + KEY `FK_acc_gl_closure_m_appuser` (`createdby_id`), + KEY `FK_acc_gl_closure_m_appuser_2` (`lastmodifiedby_id`), + CONSTRAINT `FK_acc_gl_closure_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_closure_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_closure_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -99,10 +103,12 @@ CREATE TABLE `acc_gl_closure` ( -- Dumping data for table `acc_gl_closure` -- -LOCK TABLES `acc_gl_closure` WRITE; +LOCK +TABLES `acc_gl_closure` WRITE; /*!40000 ALTER TABLE `acc_gl_closure` DISABLE KEYS */; /*!40000 ALTER TABLE `acc_gl_closure` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `acc_gl_journal_entry` @@ -111,35 +117,36 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `acc_gl_journal_entry`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_gl_journal_entry` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_id` BIGINT NOT NULL, - `office_id` BIGINT NOT NULL, - `reversal_id` BIGINT DEFAULT NULL, - `transaction_id` varchar(50) NOT NULL, - `reversed` tinyint NOT NULL DEFAULT '0', - `manual_entry` tinyint NOT NULL DEFAULT '0', - `entry_date` date NOT NULL, - `type_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `entity_type_enum` SMALLINT DEFAULT NULL, - `entity_id` BIGINT DEFAULT NULL, - `createdby_id` BIGINT NOT NULL, - `lastmodifiedby_id` BIGINT NOT NULL, - `created_date` datetime NOT NULL, - `lastmodified_date` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_acc_gl_journal_entry_m_office` (`office_id`), - KEY `FK_acc_gl_journal_entry_m_appuser` (`createdby_id`), - KEY `FK_acc_gl_journal_entry_m_appuser_2` (`lastmodifiedby_id`), - KEY `FK_acc_gl_journal_entry_acc_gl_journal_entry` (`reversal_id`), - KEY `FK_acc_gl_journal_entry_acc_gl_account` (`account_id`), - CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_account` FOREIGN KEY (`account_id`) REFERENCES `acc_gl_account` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_journal_entry` FOREIGN KEY (`reversal_id`) REFERENCES `acc_gl_journal_entry` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `acc_gl_journal_entry` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `account_id` BIGINT NOT NULL, + `office_id` BIGINT NOT NULL, + `reversal_id` BIGINT DEFAULT NULL, + `transaction_id` varchar(50) NOT NULL, + `reversed` tinyint NOT NULL DEFAULT '0', + `manual_entry` tinyint NOT NULL DEFAULT '0', + `entry_date` date NOT NULL, + `type_enum` SMALLINT NOT NULL, + `amount` decimal(19, 6) NOT NULL, + `description` varchar(500) DEFAULT NULL, + `entity_type_enum` SMALLINT DEFAULT NULL, + `entity_id` BIGINT DEFAULT NULL, + `createdby_id` BIGINT NOT NULL, + `lastmodifiedby_id` BIGINT NOT NULL, + `created_date` datetime NOT NULL, + `lastmodified_date` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `FK_acc_gl_journal_entry_m_office` (`office_id`), + KEY `FK_acc_gl_journal_entry_m_appuser` (`createdby_id`), + KEY `FK_acc_gl_journal_entry_m_appuser_2` (`lastmodifiedby_id`), + KEY `FK_acc_gl_journal_entry_acc_gl_journal_entry` (`reversal_id`), + KEY `FK_acc_gl_journal_entry_acc_gl_account` (`account_id`), + CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_account` FOREIGN KEY (`account_id`) REFERENCES `acc_gl_account` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_journal_entry` FOREIGN KEY (`reversal_id`) REFERENCES `acc_gl_journal_entry` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -147,10 +154,12 @@ CREATE TABLE `acc_gl_journal_entry` ( -- Dumping data for table `acc_gl_journal_entry` -- -LOCK TABLES `acc_gl_journal_entry` WRITE; +LOCK +TABLES `acc_gl_journal_entry` WRITE; /*!40000 ALTER TABLE `acc_gl_journal_entry` DISABLE KEYS */; /*!40000 ALTER TABLE `acc_gl_journal_entry` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `acc_product_mapping` @@ -159,13 +168,14 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `acc_product_mapping`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_product_mapping` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `gl_account_id` BIGINT DEFAULT NULL, - `product_id` BIGINT DEFAULT NULL, - `product_type` SMALLINT DEFAULT NULL, - `financial_account_type` SMALLINT DEFAULT NULL, - PRIMARY KEY (`id`) +CREATE TABLE `acc_product_mapping` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `gl_account_id` BIGINT DEFAULT NULL, + `product_id` BIGINT DEFAULT NULL, + `product_type` SMALLINT DEFAULT NULL, + `financial_account_type` SMALLINT DEFAULT NULL, + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -173,10 +183,12 @@ CREATE TABLE `acc_product_mapping` ( -- Dumping data for table `acc_product_mapping` -- -LOCK TABLES `acc_product_mapping` WRITE; +LOCK +TABLES `acc_product_mapping` WRITE; /*!40000 ALTER TABLE `acc_product_mapping` DISABLE KEYS */; /*!40000 ALTER TABLE `acc_product_mapping` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `c_configuration` @@ -185,11 +197,12 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `c_configuration`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `c_configuration` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(50) DEFAULT NULL, - `enabled` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) +CREATE TABLE `c_configuration` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(50) DEFAULT NULL, + `enabled` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -197,11 +210,14 @@ CREATE TABLE `c_configuration` ( -- Dumping data for table `c_configuration` -- -LOCK TABLES `c_configuration` WRITE; +LOCK +TABLES `c_configuration` WRITE; /*!40000 ALTER TABLE `c_configuration` DISABLE KEYS */; -INSERT INTO `c_configuration` VALUES (1,'maker-checker',0); +INSERT INTO `c_configuration` +VALUES (1, 'maker-checker', 0); /*!40000 ALTER TABLE `c_configuration` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `client additional data` @@ -210,47 +226,48 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `client additional data`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `client additional data` ( - `client_id` BIGINT NOT NULL, - `Gender_cd` INT NOT NULL, - `Date of Birth` date NOT NULL, - `Home address` text NOT NULL, - `Telephone number` varchar(20) NOT NULL, - `Telephone number (2nd)` varchar(20) NOT NULL, - `Email address` varchar(50) NOT NULL, - `EducationLevel_cd` INT NOT NULL, - `MaritalStatus_cd` INT NOT NULL, - `Number of children` INT NOT NULL, - `Citizenship` varchar(50) NOT NULL, - `PovertyStatus_cd` INT NOT NULL, - `YesNo_cd_Employed` INT NOT NULL, - `FieldOfEmployment_cd_Field of employment` INT DEFAULT NULL, - `Employer name` varchar(50) DEFAULT NULL, - `Number of years` INT DEFAULT NULL, - `Monthly salary` decimal(19,6) DEFAULT NULL, - `YesNo_cd_Self employed` INT NOT NULL, - `FieldOfEmployment_cd_Field of self-employment` INT DEFAULT NULL, - `Business address` text, - `Number of employees` INT DEFAULT NULL, - `Monthly salaries paid` decimal(19,6) DEFAULT NULL, - `Monthly net income of business activity` decimal(19,6) DEFAULT NULL, - `Monthly rent` decimal(19,6) DEFAULT NULL, - `Other income generating activities` varchar(100) DEFAULT NULL, - `YesNo_cd_Bookkeeping` INT DEFAULT NULL, - `YesNo_cd_Loans with other institutions` INT NOT NULL, - `From whom` varchar(100) DEFAULT NULL, - `Amount` decimal(19,6) DEFAULT NULL, - `Interest rate pa` decimal(19,6) DEFAULT NULL, - `Number of people depending on overal income` INT NOT NULL, - `YesNo_cd_Bank account` INT NOT NULL, - `YesNo_cd_Business plan provided` INT NOT NULL, - `YesNo_cd_Access to internet` INT DEFAULT NULL, - `Introduced by` varchar(100) DEFAULT NULL, - `Known to introducer since` varchar(100) NOT NULL, - `Last visited by` varchar(100) DEFAULT NULL, - `Last visited on` date NOT NULL, - PRIMARY KEY (`client_id`), - CONSTRAINT `FK_client_additional_data` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `client additional data` +( + `client_id` BIGINT NOT NULL, + `Gender_cd` INT NOT NULL, + `Date of Birth` date NOT NULL, + `Home address` text NOT NULL, + `Telephone number` varchar(20) NOT NULL, + `Telephone number (2nd)` varchar(20) NOT NULL, + `Email address` varchar(50) NOT NULL, + `EducationLevel_cd` INT NOT NULL, + `MaritalStatus_cd` INT NOT NULL, + `Number of children` INT NOT NULL, + `Citizenship` varchar(50) NOT NULL, + `PovertyStatus_cd` INT NOT NULL, + `YesNo_cd_Employed` INT NOT NULL, + `FieldOfEmployment_cd_Field of employment` INT DEFAULT NULL, + `Employer name` varchar(50) DEFAULT NULL, + `Number of years` INT DEFAULT NULL, + `Monthly salary` decimal(19, 6) DEFAULT NULL, + `YesNo_cd_Self employed` INT NOT NULL, + `FieldOfEmployment_cd_Field of self-employment` INT DEFAULT NULL, + `Business address` text, + `Number of employees` INT DEFAULT NULL, + `Monthly salaries paid` decimal(19, 6) DEFAULT NULL, + `Monthly net income of business activity` decimal(19, 6) DEFAULT NULL, + `Monthly rent` decimal(19, 6) DEFAULT NULL, + `Other income generating activities` varchar(100) DEFAULT NULL, + `YesNo_cd_Bookkeeping` INT DEFAULT NULL, + `YesNo_cd_Loans with other institutions` INT NOT NULL, + `From whom` varchar(100) DEFAULT NULL, + `Amount` decimal(19, 6) DEFAULT NULL, + `Interest rate pa` decimal(19, 6) DEFAULT NULL, + `Number of people depending on overal income` INT NOT NULL, + `YesNo_cd_Bank account` INT NOT NULL, + `YesNo_cd_Business plan provided` INT NOT NULL, + `YesNo_cd_Access to internet` INT DEFAULT NULL, + `Introduced by` varchar(100) DEFAULT NULL, + `Known to introducer since` varchar(100) NOT NULL, + `Last visited by` varchar(100) DEFAULT NULL, + `Last visited on` date NOT NULL, + PRIMARY KEY (`client_id`), + CONSTRAINT `FK_client_additional_data` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -258,10 +275,12 @@ CREATE TABLE `client additional data` ( -- Dumping data for table `client additional data` -- -LOCK TABLES `client additional data` WRITE; +LOCK +TABLES `client additional data` WRITE; /*!40000 ALTER TABLE `client additional data` DISABLE KEYS */; /*!40000 ALTER TABLE `client additional data` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `extra_client_details` @@ -270,17 +289,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `extra_client_details`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `extra_client_details` ( - `client_id` BIGINT NOT NULL, - `Business Description` varchar(100) DEFAULT NULL, - `Years in Business` INT DEFAULT NULL, - `Gender_cd` INT DEFAULT NULL, - `Education_cv` varchar(60) DEFAULT NULL, - `Next Visit` date DEFAULT NULL, - `Highest Rate Paid` decimal(19,6) DEFAULT NULL, - `Comment` text, - PRIMARY KEY (`client_id`), - CONSTRAINT `FK_extra_client_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `extra_client_details` +( + `client_id` BIGINT NOT NULL, + `Business Description` varchar(100) DEFAULT NULL, + `Years in Business` INT DEFAULT NULL, + `Gender_cd` INT DEFAULT NULL, + `Education_cv` varchar(60) DEFAULT NULL, + `Next Visit` date DEFAULT NULL, + `Highest Rate Paid` decimal(19, 6) DEFAULT NULL, + `Comment` text, + PRIMARY KEY (`client_id`), + CONSTRAINT `FK_extra_client_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -288,10 +308,12 @@ CREATE TABLE `extra_client_details` ( -- Dumping data for table `extra_client_details` -- -LOCK TABLES `extra_client_details` WRITE; +LOCK +TABLES `extra_client_details` WRITE; /*!40000 ALTER TABLE `extra_client_details` DISABLE KEYS */; /*!40000 ALTER TABLE `extra_client_details` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `extra_family_details` @@ -300,17 +322,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `extra_family_details`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `extra_family_details` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `Name` varchar(40) DEFAULT NULL, - `Date of Birth` date DEFAULT NULL, - `Points Score` INT DEFAULT NULL, - `Education_cd_Highest` INT DEFAULT NULL, - `Other Notes` text, - PRIMARY KEY (`id`), - KEY `FK_Extra Family Details Data_1` (`client_id`), - CONSTRAINT `FK_family_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `extra_family_details` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `client_id` BIGINT NOT NULL, + `Name` varchar(40) DEFAULT NULL, + `Date of Birth` date DEFAULT NULL, + `Points Score` INT DEFAULT NULL, + `Education_cd_Highest` INT DEFAULT NULL, + `Other Notes` text, + PRIMARY KEY (`id`), + KEY `FK_Extra Family Details Data_1` (`client_id`), + CONSTRAINT `FK_family_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -318,10 +341,12 @@ CREATE TABLE `extra_family_details` ( -- Dumping data for table `extra_family_details` -- -LOCK TABLES `extra_family_details` WRITE; +LOCK +TABLES `extra_family_details` WRITE; /*!40000 ALTER TABLE `extra_family_details` DISABLE KEYS */; /*!40000 ALTER TABLE `extra_family_details` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `extra_loan_details` @@ -330,17 +355,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `extra_loan_details`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `extra_loan_details` ( - `loan_id` BIGINT NOT NULL, - `Business Description` varchar(100) DEFAULT NULL, - `Years in Business` INT DEFAULT NULL, - `Gender_cd` INT DEFAULT NULL, - `Education_cv` varchar(60) DEFAULT NULL, - `Next Visit` date DEFAULT NULL, - `Highest Rate Paid` decimal(19,6) DEFAULT NULL, - `Comment` text, - PRIMARY KEY (`loan_id`), - CONSTRAINT `FK_extra_loan_details` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +CREATE TABLE `extra_loan_details` +( + `loan_id` BIGINT NOT NULL, + `Business Description` varchar(100) DEFAULT NULL, + `Years in Business` INT DEFAULT NULL, + `Gender_cd` INT DEFAULT NULL, + `Education_cv` varchar(60) DEFAULT NULL, + `Next Visit` date DEFAULT NULL, + `Highest Rate Paid` decimal(19, 6) DEFAULT NULL, + `Comment` text, + PRIMARY KEY (`loan_id`), + CONSTRAINT `FK_extra_loan_details` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -348,10 +374,12 @@ CREATE TABLE `extra_loan_details` ( -- Dumping data for table `extra_loan_details` -- -LOCK TABLES `extra_loan_details` WRITE; +LOCK +TABLES `extra_loan_details` WRITE; /*!40000 ALTER TABLE `extra_loan_details` DISABLE KEYS */; /*!40000 ALTER TABLE `extra_loan_details` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `impact measurement` @@ -360,17 +388,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `impact measurement`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `impact measurement` ( - `loan_id` BIGINT NOT NULL, - `YesNo_cd_RepaidOnSchedule` INT NOT NULL, - `ReasonNotRepaidOnSchedule` text, - `How was Loan Amount Invested` text NOT NULL, - `Additional Income Generated` decimal(19,6) NOT NULL, - `Additional Income Used For` text NOT NULL, - `YesNo_cd_NewJobsCreated` INT NOT NULL, - `Number of Jobs Created` BIGINT DEFAULT NULL, - PRIMARY KEY (`loan_id`), - CONSTRAINT `FK_impact measurement` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +CREATE TABLE `impact measurement` +( + `loan_id` BIGINT NOT NULL, + `YesNo_cd_RepaidOnSchedule` INT NOT NULL, + `ReasonNotRepaidOnSchedule` text, + `How was Loan Amount Invested` text NOT NULL, + `Additional Income Generated` decimal(19, 6) NOT NULL, + `Additional Income Used For` text NOT NULL, + `YesNo_cd_NewJobsCreated` INT NOT NULL, + `Number of Jobs Created` BIGINT DEFAULT NULL, + PRIMARY KEY (`loan_id`), + CONSTRAINT `FK_impact measurement` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -378,10 +407,12 @@ CREATE TABLE `impact measurement` ( -- Dumping data for table `impact measurement` -- -LOCK TABLES `impact measurement` WRITE; +LOCK +TABLES `impact measurement` WRITE; /*!40000 ALTER TABLE `impact measurement` DISABLE KEYS */; /*!40000 ALTER TABLE `impact measurement` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `loan additional data` @@ -390,18 +421,19 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `loan additional data`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `loan additional data` ( - `loan_id` BIGINT NOT NULL, - `PurposeOfLoan_cd` INT NOT NULL, - `CollateralType_cd` INT NOT NULL, - `Collateral notes` text NOT NULL, - `YesNo_cd_Guarantor` INT NOT NULL, - `Guarantor name` varchar(100) DEFAULT NULL, - `Guarantor relation` varchar(100) DEFAULT NULL, - `Guarantor address` varchar(100) DEFAULT NULL, - `Guarantor telephone number` varchar(20) DEFAULT NULL, - PRIMARY KEY (`loan_id`), - CONSTRAINT `FK_loan_additional_data` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +CREATE TABLE `loan additional data` +( + `loan_id` BIGINT NOT NULL, + `PurposeOfLoan_cd` INT NOT NULL, + `CollateralType_cd` INT NOT NULL, + `Collateral notes` text NOT NULL, + `YesNo_cd_Guarantor` INT NOT NULL, + `Guarantor name` varchar(100) DEFAULT NULL, + `Guarantor relation` varchar(100) DEFAULT NULL, + `Guarantor address` varchar(100) DEFAULT NULL, + `Guarantor telephone number` varchar(20) DEFAULT NULL, + PRIMARY KEY (`loan_id`), + CONSTRAINT `FK_loan_additional_data` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -409,10 +441,12 @@ CREATE TABLE `loan additional data` ( -- Dumping data for table `loan additional data` -- -LOCK TABLES `loan additional data` WRITE; +LOCK +TABLES `loan additional data` WRITE; /*!40000 ALTER TABLE `loan additional data` DISABLE KEYS */; /*!40000 ALTER TABLE `loan additional data` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_appuser` @@ -421,24 +455,25 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_appuser`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_appuser` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `is_deleted` tinyint NOT NULL DEFAULT '0', - `office_id` BIGINT DEFAULT NULL, - `username` varchar(100) NOT NULL, - `firstname` varchar(100) NOT NULL, - `lastname` varchar(100) NOT NULL, - `password` varchar(255) NOT NULL, - `email` varchar(100) NOT NULL, - `firsttime_login_remaining` bit(1) NOT NULL, - `nonexpired` bit(1) NOT NULL, - `nonlocked` bit(1) NOT NULL, - `nonexpired_credentials` bit(1) NOT NULL, - `enabled` bit(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `username_org` (`username`), - KEY `FKB3D587CE0DD567A` (`office_id`), - CONSTRAINT `FKB3D587CE0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `m_appuser` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `is_deleted` tinyint NOT NULL DEFAULT '0', + `office_id` BIGINT DEFAULT NULL, + `username` varchar(100) NOT NULL, + `firstname` varchar(100) NOT NULL, + `lastname` varchar(100) NOT NULL, + `password` varchar(255) NOT NULL, + `email` varchar(100) NOT NULL, + `firsttime_login_remaining` bit(1) NOT NULL, + `nonexpired` bit(1) NOT NULL, + `nonlocked` bit(1) NOT NULL, + `nonexpired_credentials` bit(1) NOT NULL, + `enabled` bit(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `username_org` (`username`), + KEY `FKB3D587CE0DD567A` (`office_id`), + CONSTRAINT `FKB3D587CE0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -446,11 +481,15 @@ CREATE TABLE `m_appuser` ( -- Dumping data for table `m_appuser` -- -LOCK TABLES `m_appuser` WRITE; +LOCK +TABLES `m_appuser` WRITE; /*!40000 ALTER TABLE `m_appuser` DISABLE KEYS */; -INSERT INTO `m_appuser` VALUES (1,0,1,'mifos','App','Administrator','5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a','demomfi@mifos.org','\0','','','',''); +INSERT INTO `m_appuser` +VALUES (1, 0, 1, 'mifos', 'App', 'Administrator', '5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a', + 'demomfi@mifos.org', '\0', '', '', '', ''); /*!40000 ALTER TABLE `m_appuser` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_appuser_role` @@ -459,14 +498,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_appuser_role`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_appuser_role` ( - `appuser_id` BIGINT NOT NULL, - `role_id` BIGINT NOT NULL, - PRIMARY KEY (`appuser_id`,`role_id`), - KEY `FK7662CE59B4100309` (`appuser_id`), - KEY `FK7662CE5915CEC7AB` (`role_id`), - CONSTRAINT `FK7662CE5915CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`), - CONSTRAINT `FK7662CE59B4100309` FOREIGN KEY (`appuser_id`) REFERENCES `m_appuser` (`id`) +CREATE TABLE `m_appuser_role` +( + `appuser_id` BIGINT NOT NULL, + `role_id` BIGINT NOT NULL, + PRIMARY KEY (`appuser_id`, `role_id`), + KEY `FK7662CE59B4100309` (`appuser_id`), + KEY `FK7662CE5915CEC7AB` (`role_id`), + CONSTRAINT `FK7662CE5915CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`), + CONSTRAINT `FK7662CE59B4100309` FOREIGN KEY (`appuser_id`) REFERENCES `m_appuser` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -474,11 +514,14 @@ CREATE TABLE `m_appuser_role` ( -- Dumping data for table `m_appuser_role` -- -LOCK TABLES `m_appuser_role` WRITE; +LOCK +TABLES `m_appuser_role` WRITE; /*!40000 ALTER TABLE `m_appuser_role` DISABLE KEYS */; -INSERT INTO `m_appuser_role` VALUES (1,1); +INSERT INTO `m_appuser_role` +VALUES (1, 1); /*!40000 ALTER TABLE `m_appuser_role` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_calendar` @@ -487,25 +530,26 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_calendar`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_calendar` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `title` varchar(50) NOT NULL, - `description` varchar(100) DEFAULT NULL, - `location` varchar(50) DEFAULT NULL, - `start_date` date NOT NULL, - `end_date` date DEFAULT NULL, - `duration` SMALLINT DEFAULT NULL, - `calendar_type_enum` SMALLINT NOT NULL, - `repeating` tinyint NOT NULL DEFAULT '0', - `recurrence` varchar(100) DEFAULT NULL, - `remind_by_enum` SMALLINT DEFAULT NULL, - `first_reminder` smallint DEFAULT NULL, - `second_reminder` smallint DEFAULT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - PRIMARY KEY (`id`) +CREATE TABLE `m_calendar` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `title` varchar(50) NOT NULL, + `description` varchar(100) DEFAULT NULL, + `location` varchar(50) DEFAULT NULL, + `start_date` date NOT NULL, + `end_date` date DEFAULT NULL, + `duration` SMALLINT DEFAULT NULL, + `calendar_type_enum` SMALLINT NOT NULL, + `repeating` tinyint NOT NULL DEFAULT '0', + `recurrence` varchar(100) DEFAULT NULL, + `remind_by_enum` SMALLINT DEFAULT NULL, + `first_reminder` smallint DEFAULT NULL, + `second_reminder` smallint DEFAULT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -513,10 +557,12 @@ CREATE TABLE `m_calendar` ( -- Dumping data for table `m_calendar` -- -LOCK TABLES `m_calendar` WRITE; +LOCK +TABLES `m_calendar` WRITE; /*!40000 ALTER TABLE `m_calendar` DISABLE KEYS */; /*!40000 ALTER TABLE `m_calendar` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_calendar_instance` @@ -525,14 +571,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_calendar_instance`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_calendar_instance` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `calendar_id` BIGINT NOT NULL, - `entity_id` BIGINT NOT NULL, - `entity_type_enum` SMALLINT NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_calendar_m_calendar_instance` (`calendar_id`), - CONSTRAINT `FK_m_calendar_m_calendar_instance` FOREIGN KEY (`calendar_id`) REFERENCES `m_calendar` (`id`) +CREATE TABLE `m_calendar_instance` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `calendar_id` BIGINT NOT NULL, + `entity_id` BIGINT NOT NULL, + `entity_type_enum` SMALLINT NOT NULL, + PRIMARY KEY (`id`), + KEY `FK_m_calendar_m_calendar_instance` (`calendar_id`), + CONSTRAINT `FK_m_calendar_m_calendar_instance` FOREIGN KEY (`calendar_id`) REFERENCES `m_calendar` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -540,10 +587,12 @@ CREATE TABLE `m_calendar_instance` ( -- Dumping data for table `m_calendar_instance` -- -LOCK TABLES `m_calendar_instance` WRITE; +LOCK +TABLES `m_calendar_instance` WRITE; /*!40000 ALTER TABLE `m_calendar_instance` DISABLE KEYS */; /*!40000 ALTER TABLE `m_calendar_instance` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_charge` @@ -552,19 +601,20 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_charge`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_charge` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL, - `currency_code` varchar(3) NOT NULL, - `charge_applies_to_enum` SMALLINT NOT NULL, - `charge_time_enum` SMALLINT NOT NULL, - `charge_calculation_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `is_penalty` tinyint NOT NULL DEFAULT '0', - `is_active` tinyint NOT NULL, - `is_deleted` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`) +CREATE TABLE `m_charge` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(100) DEFAULT NULL, + `currency_code` varchar(3) NOT NULL, + `charge_applies_to_enum` SMALLINT NOT NULL, + `charge_time_enum` SMALLINT NOT NULL, + `charge_calculation_enum` SMALLINT NOT NULL, + `amount` decimal(19, 6) NOT NULL, + `is_penalty` tinyint NOT NULL DEFAULT '0', + `is_active` tinyint NOT NULL, + `is_deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -572,10 +622,12 @@ CREATE TABLE `m_charge` ( -- Dumping data for table `m_charge` -- -LOCK TABLES `m_charge` WRITE; +LOCK +TABLES `m_charge` WRITE; /*!40000 ALTER TABLE `m_charge` DISABLE KEYS */; /*!40000 ALTER TABLE `m_charge` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_client` @@ -584,24 +636,25 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_client`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_client` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_no` varchar(20) NOT NULL, - `office_id` BIGINT NOT NULL, - `external_id` varchar(100) DEFAULT NULL, - `firstname` varchar(50) DEFAULT NULL, - `middlename` varchar(50) DEFAULT NULL, - `lastname` varchar(50) DEFAULT NULL, - `fullname` varchar(100) DEFAULT NULL, - `display_name` varchar(100) NOT NULL, - `image_key` varchar(500) DEFAULT NULL, - `joined_date` date DEFAULT NULL, - `is_deleted` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `account_no_UNIQUE` (`account_no`), - UNIQUE KEY `external_id` (`external_id`), - KEY `FKCE00CAB3E0DD567A` (`office_id`), - CONSTRAINT `FKCE00CAB3E0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `m_client` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `account_no` varchar(20) NOT NULL, + `office_id` BIGINT NOT NULL, + `external_id` varchar(100) DEFAULT NULL, + `firstname` varchar(50) DEFAULT NULL, + `middlename` varchar(50) DEFAULT NULL, + `lastname` varchar(50) DEFAULT NULL, + `fullname` varchar(100) DEFAULT NULL, + `display_name` varchar(100) NOT NULL, + `image_key` varchar(500) DEFAULT NULL, + `joined_date` date DEFAULT NULL, + `is_deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `account_no_UNIQUE` (`account_no`), + UNIQUE KEY `external_id` (`external_id`), + KEY `FKCE00CAB3E0DD567A` (`office_id`), + CONSTRAINT `FKCE00CAB3E0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -609,10 +662,12 @@ CREATE TABLE `m_client` ( -- Dumping data for table `m_client` -- -LOCK TABLES `m_client` WRITE; +LOCK +TABLES `m_client` WRITE; /*!40000 ALTER TABLE `m_client` DISABLE KEYS */; /*!40000 ALTER TABLE `m_client` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_client_identifier` @@ -621,23 +676,24 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_client_identifier`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_client_identifier` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `document_type_id` INT NOT NULL, - `document_key` varchar(50) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `unique_identifier_key` (`document_type_id`,`document_key`), - UNIQUE KEY `unique_client_identifier` (`client_id`,`document_type_id`), - KEY `FK_m_client_document_m_client` (`client_id`), - KEY `FK_m_client_document_m_code_value` (`document_type_id`), - CONSTRAINT `FK_m_client_document_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FK_m_client_document_m_code_value` FOREIGN KEY (`document_type_id`) REFERENCES `m_code_value` (`id`) +CREATE TABLE `m_client_identifier` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `client_id` BIGINT NOT NULL, + `document_type_id` INT NOT NULL, + `document_key` varchar(50) NOT NULL, + `description` varchar(500) DEFAULT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_identifier_key` (`document_type_id`,`document_key`), + UNIQUE KEY `unique_client_identifier` (`client_id`,`document_type_id`), + KEY `FK_m_client_document_m_client` (`client_id`), + KEY `FK_m_client_document_m_code_value` (`document_type_id`), + CONSTRAINT `FK_m_client_document_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), + CONSTRAINT `FK_m_client_document_m_code_value` FOREIGN KEY (`document_type_id`) REFERENCES `m_code_value` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -645,10 +701,12 @@ CREATE TABLE `m_client_identifier` ( -- Dumping data for table `m_client_identifier` -- -LOCK TABLES `m_client_identifier` WRITE; +LOCK +TABLES `m_client_identifier` WRITE; /*!40000 ALTER TABLE `m_client_identifier` DISABLE KEYS */; /*!40000 ALTER TABLE `m_client_identifier` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_code` @@ -657,12 +715,13 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_code`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_code` ( - `id` INT NOT NULL AUTO_INCREMENT, - `code_name` varchar(100) DEFAULT NULL, - `is_system_defined` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `code_name` (`code_name`) +CREATE TABLE `m_code` +( + `id` INT NOT NULL AUTO_INCREMENT, + `code_name` varchar(100) DEFAULT NULL, + `is_system_defined` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `code_name` (`code_name`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -670,11 +729,18 @@ CREATE TABLE `m_code` ( -- Dumping data for table `m_code` -- -LOCK TABLES `m_code` WRITE; +LOCK +TABLES `m_code` WRITE; /*!40000 ALTER TABLE `m_code` DISABLE KEYS */; -INSERT INTO `m_code` VALUES (1,'Customer Identifier',1),(2,'LoanCollateral',1),(3,'LoanPurpose',1),(4,'Gender',1),(5,'YesNo',1); +INSERT INTO `m_code` +VALUES (1, 'Customer Identifier', 1), + (2, 'LoanCollateral', 1), + (3, 'LoanPurpose', 1), + (4, 'Gender', 1), + (5, 'YesNo', 1); /*!40000 ALTER TABLE `m_code` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_code_value` @@ -683,15 +749,16 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_code_value`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_code_value` ( - `id` INT NOT NULL AUTO_INCREMENT, - `code_id` INT NOT NULL, - `code_value` varchar(100) DEFAULT NULL, - `order_position` INT NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `code_value` (`code_id`,`code_value`), - KEY `FKCFCEA42640BE071Z` (`code_id`), - CONSTRAINT `FKCFCEA42640BE071Z` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`) +CREATE TABLE `m_code_value` +( + `id` INT NOT NULL AUTO_INCREMENT, + `code_id` INT NOT NULL, + `code_value` varchar(100) DEFAULT NULL, + `order_position` INT NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `code_value` (`code_id`,`code_value`), + KEY `FKCFCEA42640BE071Z` (`code_id`), + CONSTRAINT `FKCFCEA42640BE071Z` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -699,11 +766,17 @@ CREATE TABLE `m_code_value` ( -- Dumping data for table `m_code_value` -- -LOCK TABLES `m_code_value` WRITE; +LOCK +TABLES `m_code_value` WRITE; /*!40000 ALTER TABLE `m_code_value` DISABLE KEYS */; -INSERT INTO `m_code_value` VALUES (1,1,'Passport',1),(2,1,'Id',1),(3,1,'Drivers License',2),(4,1,'Any Other Id Type',3); +INSERT INTO `m_code_value` +VALUES (1, 1, 'Passport', 1), + (2, 1, 'Id', 1), + (3, 1, 'Drivers License', 2), + (4, 1, 'Any Other Id Type', 3); /*!40000 ALTER TABLE `m_code_value` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_currency` @@ -712,15 +785,16 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_currency`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_currency` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `code` varchar(3) NOT NULL, - `decimal_places` SMALLINT NOT NULL, - `display_symbol` varchar(10) DEFAULT NULL, - `name` varchar(50) NOT NULL, - `internationalized_name_code` varchar(50) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `code` (`code`) +CREATE TABLE `m_currency` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `code` varchar(3) NOT NULL, + `decimal_places` SMALLINT NOT NULL, + `display_symbol` varchar(10) DEFAULT NULL, + `name` varchar(50) NOT NULL, + `internationalized_name_code` varchar(50) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=164 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -728,9 +802,151 @@ CREATE TABLE `m_currency` ( -- Dumping data for table `m_currency` -- -LOCK TABLES `m_currency` WRITE; +LOCK +TABLES `m_currency` WRITE; /*!40000 ALTER TABLE `m_currency` DISABLE KEYS */; -INSERT INTO `m_currency` VALUES (1,'AED',2,NULL,'UAE Dirham','currency.AED'),(2,'AFN',2,NULL,'Afghanistan Afghani','currency.AFN'),(3,'ALL',2,NULL,'Albanian Lek','currency.ALL'),(4,'AMD',2,NULL,'Armenian Dram','currency.AMD'),(5,'ANG',2,NULL,'Netherlands Antillian Guilder','currency.ANG'),(6,'AOA',2,NULL,'Angolan Kwanza','currency.AOA'),(7,'ARS',2,'$','Argentine Peso','currency.ARS'),(8,'AUD',2,'A$','Australian Dollar','currency.AUD'),(9,'AWG',2,NULL,'Aruban Guilder','currency.AWG'),(10,'AZM',2,NULL,'Azerbaijanian Manat','currency.AZM'),(11,'BAM',2,NULL,'Bosnia and Herzegovina Convertible Marks','currency.BAM'),(12,'BBD',2,NULL,'Barbados Dollar','currency.BBD'),(13,'BDT',2,NULL,'Bangladesh Taka','currency.BDT'),(14,'BGN',2,NULL,'Bulgarian Lev','currency.BGN'),(15,'BHD',3,NULL,'Bahraini Dinar','currency.BHD'),(16,'BIF',0,NULL,'Burundi Franc','currency.BIF'),(17,'BMD',2,NULL,'Bermudian Dollar','currency.BMD'),(18,'BND',2,'B$','Brunei Dollar','currency.BND'),(19,'BOB',2,'Bs.','Bolivian Boliviano','currency.BOB'),(20,'BRL',2,'R$','Brazilian Real','currency.BRL'),(21,'BSD',2,NULL,'Bahamian Dollar','currency.BSD'),(22,'BTN',2,NULL,'Bhutan Ngultrum','currency.BTN'),(23,'BWP',2,NULL,'Botswana Pula','currency.BWP'),(24,'BYR',0,NULL,'Belarussian Ruble','currency.BYR'),(25,'BZD',2,'BZ$','Belize Dollar','currency.BZD'),(26,'CAD',2,NULL,'Canadian Dollar','currency.CAD'),(27,'CDF',2,NULL,'Franc Congolais','currency.CDF'),(28,'CHF',2,NULL,'Swiss Franc','currency.CHF'),(29,'CLP',0,'$','Chilean Peso','currency.CLP'),(30,'CNY',2,NULL,'Chinese Yuan Renminbi','currency.CNY'),(31,'COP',2,'$','Colombian Peso','currency.COP'),(32,'CRC',2,'₡','Costa Rican Colon','currency.CRC'),(33,'CSD',2,NULL,'Serbian Dinar','currency.CSD'),(34,'CUP',2,'$MN','Cuban Peso','currency.CUP'),(35,'CVE',2,NULL,'Cape Verde Escudo','currency.CVE'),(36,'CYP',2,NULL,'Cyprus Pound','currency.CYP'),(37,'CZK',2,NULL,'Czech Koruna','currency.CZK'),(38,'DJF',0,NULL,'Djibouti Franc','currency.DJF'),(39,'DKK',2,NULL,'Danish Krone','currency.DKK'),(40,'DOP',2,'RD$','Dominican Peso','currency.DOP'),(41,'DZD',2,NULL,'Algerian Dinar','currency.DZD'),(42,'EEK',2,NULL,'Estonian Kroon','currency.EEK'),(43,'EGP',2,NULL,'Egyptian Pound','currency.EGP'),(44,'ERN',2,NULL,'Eritrea Nafka','currency.ERN'),(45,'ETB',2,NULL,'Ethiopian Birr','currency.ETB'),(46,'EUR',2,'€','Euro','currency.EUR'),(47,'FJD',2,NULL,'Fiji Dollar','currency.FJD'),(48,'FKP',2,NULL,'Falkland Islands Pound','currency.FKP'),(49,'GBP',2,NULL,'Pound Sterling','currency.GBP'),(50,'GEL',2,NULL,'Georgian Lari','currency.GEL'),(51,'GHC',2,'GHc','Ghana Cedi','currency.GHC'),(52,'GIP',2,NULL,'Gibraltar Pound','currency.GIP'),(53,'GMD',2,NULL,'Gambian Dalasi','currency.GMD'),(54,'GNF',0,NULL,'Guinea Franc','currency.GNF'),(55,'GTQ',2,'Q','Guatemala Quetzal','currency.GTQ'),(56,'GYD',2,NULL,'Guyana Dollar','currency.GYD'),(57,'HKD',2,NULL,'Hong Kong Dollar','currency.HKD'),(58,'HNL',2,'L','Honduras Lempira','currency.HNL'),(59,'HRK',2,NULL,'Croatian Kuna','currency.HRK'),(60,'HTG',2,'G','Haiti Gourde','currency.HTG'),(61,'HUF',2,NULL,'Hungarian Forint','currency.HUF'),(62,'IDR',2,NULL,'Indonesian Rupiah','currency.IDR'),(63,'ILS',2,NULL,'New Israeli Shekel','currency.ILS'),(64,'INR',2,'₹','Indian Rupee','currency.INR'),(65,'IQD',3,NULL,'Iraqi Dinar','currency.IQD'),(66,'IRR',2,NULL,'Iranian Rial','currency.IRR'),(67,'ISK',0,NULL,'Iceland Krona','currency.ISK'),(68,'JMD',2,NULL,'Jamaican Dollar','currency.JMD'),(69,'JOD',3,NULL,'Jordanian Dinar','currency.JOD'),(70,'JPY',0,NULL,'Japanese Yen','currency.JPY'),(71,'KES',2,'KSh','Kenyan Shilling','currency.KES'),(72,'KGS',2,NULL,'Kyrgyzstan Som','currency.KGS'),(73,'KHR',2,NULL,'Cambodia Riel','currency.KHR'),(74,'KMF',0,NULL,'Comoro Franc','currency.KMF'),(75,'KPW',2,NULL,'North Korean Won','currency.KPW'),(76,'KRW',0,NULL,'Korean Won','currency.KRW'),(77,'KWD',3,NULL,'Kuwaiti Dinar','currency.KWD'),(78,'KYD',2,NULL,'Cayman Islands Dollar','currency.KYD'),(79,'KZT',2,NULL,'Kazakhstan Tenge','currency.KZT'),(80,'LAK',2,NULL,'Lao Kip','currency.LAK'),(81,'LBP',2,'L£','Lebanese Pound','currency.LBP'),(82,'LKR',2,NULL,'Sri Lanka Rupee','currency.LKR'),(83,'LRD',2,NULL,'Liberian Dollar','currency.LRD'),(84,'LSL',2,NULL,'Lesotho Loti','currency.LSL'),(85,'LTL',2,NULL,'Lithuanian Litas','currency.LTL'),(86,'LVL',2,NULL,'Latvian Lats','currency.LVL'),(87,'LYD',3,NULL,'Libyan Dinar','currency.LYD'),(88,'MAD',2,NULL,'Moroccan Dirham','currency.MAD'),(89,'MDL',2,NULL,'Moldovan Leu','currency.MDL'),(90,'MGA',2,NULL,'Malagasy Ariary','currency.MGA'),(91,'MKD',2,NULL,'Macedonian Denar','currency.MKD'),(92,'MMK',2,'K','Myanmar Kyat','currency.MMK'),(93,'MNT',2,NULL,'Mongolian Tugrik','currency.MNT'),(94,'MOP',2,NULL,'Macau Pataca','currency.MOP'),(95,'MRO',2,NULL,'Mauritania Ouguiya','currency.MRO'),(96,'MTL',2,NULL,'Maltese Lira','currency.MTL'),(97,'MUR',2,NULL,'Mauritius Rupee','currency.MUR'),(98,'MVR',2,NULL,'Maldives Rufiyaa','currency.MVR'),(99,'MWK',2,NULL,'Malawi Kwacha','currency.MWK'),(100,'MXN',2,'$','Mexican Peso','currency.MXN'),(101,'MYR',2,NULL,'Malaysian Ringgit','currency.MYR'),(102,'MZM',2,NULL,'Mozambique Metical','currency.MZM'),(103,'NAD',2,NULL,'Namibia Dollar','currency.NAD'),(104,'NGN',2,NULL,'Nigerian Naira','currency.NGN'),(105,'NIO',2,'C$','Nicaragua Cordoba Oro','currency.NIO'),(106,'NOK',2,NULL,'Norwegian Krone','currency.NOK'),(107,'NPR',2,NULL,'Nepalese Rupee','currency.NPR'),(108,'NZD',2,NULL,'New Zealand Dollar','currency.NZD'),(109,'OMR',3,NULL,'Rial Omani','currency.OMR'),(110,'PAB',2,'B/.','Panama Balboa','currency.PAB'),(111,'PEN',2,'S/.','Peruvian Nuevo Sol','currency.PEN'),(112,'PGK',2,NULL,'Papua New Guinea Kina','currency.PGK'),(113,'PHP',2,NULL,'Philippine Peso','currency.PHP'),(114,'PKR',2,NULL,'Pakistan Rupee','currency.PKR'),(115,'PLN',2,NULL,'Polish Zloty','currency.PLN'),(116,'PYG',0,'₲','Paraguayan Guarani','currency.PYG'),(117,'QAR',2,NULL,'Qatari Rial','currency.QAR'),(118,'RON',2,NULL,'Romanian Leu','currency.RON'),(119,'RUB',2,NULL,'Russian Ruble','currency.RUB'),(120,'RWF',0,NULL,'Rwanda Franc','currency.RWF'),(121,'SAR',2,NULL,'Saudi Riyal','currency.SAR'),(122,'SBD',2,NULL,'Solomon Islands Dollar','currency.SBD'),(123,'SCR',2,NULL,'Seychelles Rupee','currency.SCR'),(124,'SDD',2,NULL,'Sudanese Dinar','currency.SDD'),(125,'SEK',2,NULL,'Swedish Krona','currency.SEK'),(126,'SGD',2,NULL,'Singapore Dollar','currency.SGD'),(127,'SHP',2,NULL,'St Helena Pound','currency.SHP'),(128,'SIT',2,NULL,'Slovenian Tolar','currency.SIT'),(129,'SKK',2,NULL,'Slovak Koruna','currency.SKK'),(130,'SLL',2,NULL,'Sierra Leone Leone','currency.SLL'),(131,'SOS',2,NULL,'Somali Shilling','currency.SOS'),(132,'SRD',2,NULL,'Surinam Dollar','currency.SRD'),(133,'STD',2,NULL,'Sao Tome and Principe Dobra','currency.STD'),(134,'SVC',2,NULL,'El Salvador Colon','currency.SVC'),(135,'SYP',2,NULL,'Syrian Pound','currency.SYP'),(136,'SZL',2,NULL,'Swaziland Lilangeni','currency.SZL'),(137,'THB',2,NULL,'Thai Baht','currency.THB'),(138,'TJS',2,NULL,'Tajik Somoni','currency.TJS'),(139,'TMM',2,NULL,'Turkmenistan Manat','currency.TMM'),(140,'TND',3,'DT','Tunisian Dinar','currency.TND'),(141,'TOP',2,NULL,'Tonga Pa\'anga','currency.TOP'),(142,'TRY',2,NULL,'Turkish Lira','currency.TRY'),(143,'TTD',2,NULL,'Trinidad and Tobago Dollar','currency.TTD'),(144,'TWD',2,NULL,'New Taiwan Dollar','currency.TWD'),(145,'TZS',2,NULL,'Tanzanian Shilling','currency.TZS'),(146,'UAH',2,NULL,'Ukraine Hryvnia','currency.UAH'),(147,'UGX',2,'USh','Uganda Shilling','currency.UGX'),(148,'USD',2,'$','US Dollar','currency.USD'),(149,'UYU',2,'$U','Peso Uruguayo','currency.UYU'),(150,'UZS',2,NULL,'Uzbekistan Sum','currency.UZS'),(151,'VEB',2,'Bs.F.','Venezuelan Bolivar','currency.VEB'),(152,'VND',2,NULL,'Vietnamese Dong','currency.VND'),(153,'VUV',0,NULL,'Vanuatu Vatu','currency.VUV'),(154,'WST',2,NULL,'Samoa Tala','currency.WST'),(155,'XAF',0,NULL,'CFA Franc BEAC','currency.XAF'),(156,'XCD',2,NULL,'East Caribbean Dollar','currency.XCD'),(157,'XDR',5,NULL,'SDR (Special Drawing Rights)','currency.XDR'),(158,'XOF',0,'CFA','CFA Franc BCEAO','currency.XOF'),(159,'XPF',0,NULL,'CFP Franc','currency.XPF'),(160,'YER',2,NULL,'Yemeni Rial','currency.YER'),(161,'ZAR',2,'R','South African Rand','currency.ZAR'),(162,'ZMK',2,NULL,'Zambian Kwacha','currency.ZMK'),(163,'ZWD',2,NULL,'Zimbabwe Dollar','currency.ZWD'); +INSERT INTO `m_currency` +VALUES (1, 'AED', 2, NULL, 'UAE Dirham', 'currency.AED'), + (2, 'AFN', 2, NULL, 'Afghanistan Afghani', 'currency.AFN'), + (3, 'ALL', 2, NULL, 'Albanian Lek', 'currency.ALL'), + (4, 'AMD', 2, NULL, 'Armenian Dram', 'currency.AMD'), + (5, 'ANG', 2, NULL, 'Netherlands Antillian Guilder', 'currency.ANG'), + (6, 'AOA', 2, NULL, 'Angolan Kwanza', 'currency.AOA'), + (7, 'ARS', 2, '$', 'Argentine Peso', 'currency.ARS'), + (8, 'AUD', 2, 'A$', 'Australian Dollar', 'currency.AUD'), + (9, 'AWG', 2, NULL, 'Aruban Guilder', 'currency.AWG'), + (10, 'AZM', 2, NULL, 'Azerbaijanian Manat', 'currency.AZM'), + (11, 'BAM', 2, NULL, 'Bosnia and Herzegovina Convertible Marks', 'currency.BAM'), + (12, 'BBD', 2, NULL, 'Barbados Dollar', 'currency.BBD'), + (13, 'BDT', 2, NULL, 'Bangladesh Taka', 'currency.BDT'), + (14, 'BGN', 2, NULL, 'Bulgarian Lev', 'currency.BGN'), + (15, 'BHD', 3, NULL, 'Bahraini Dinar', 'currency.BHD'), + (16, 'BIF', 0, NULL, 'Burundi Franc', 'currency.BIF'), + (17, 'BMD', 2, NULL, 'Bermudian Dollar', 'currency.BMD'), + (18, 'BND', 2, 'B$', 'Brunei Dollar', 'currency.BND'), + (19, 'BOB', 2, 'Bs.', 'Bolivian Boliviano', 'currency.BOB'), + (20, 'BRL', 2, 'R$', 'Brazilian Real', 'currency.BRL'), + (21, 'BSD', 2, NULL, 'Bahamian Dollar', 'currency.BSD'), + (22, 'BTN', 2, NULL, 'Bhutan Ngultrum', 'currency.BTN'), + (23, 'BWP', 2, NULL, 'Botswana Pula', 'currency.BWP'), + (24, 'BYR', 0, NULL, 'Belarussian Ruble', 'currency.BYR'), + (25, 'BZD', 2, 'BZ$', 'Belize Dollar', 'currency.BZD'), + (26, 'CAD', 2, NULL, 'Canadian Dollar', 'currency.CAD'), + (27, 'CDF', 2, NULL, 'Franc Congolais', 'currency.CDF'), + (28, 'CHF', 2, NULL, 'Swiss Franc', 'currency.CHF'), + (29, 'CLP', 0, '$', 'Chilean Peso', 'currency.CLP'), + (30, 'CNY', 2, NULL, 'Chinese Yuan Renminbi', 'currency.CNY'), + (31, 'COP', 2, '$', 'Colombian Peso', 'currency.COP'), + (32, 'CRC', 2, '₡', 'Costa Rican Colon', 'currency.CRC'), + (33, 'CSD', 2, NULL, 'Serbian Dinar', 'currency.CSD'), + (34, 'CUP', 2, '$MN', 'Cuban Peso', 'currency.CUP'), + (35, 'CVE', 2, NULL, 'Cape Verde Escudo', 'currency.CVE'), + (36, 'CYP', 2, NULL, 'Cyprus Pound', 'currency.CYP'), + (37, 'CZK', 2, NULL, 'Czech Koruna', 'currency.CZK'), + (38, 'DJF', 0, NULL, 'Djibouti Franc', 'currency.DJF'), + (39, 'DKK', 2, NULL, 'Danish Krone', 'currency.DKK'), + (40, 'DOP', 2, 'RD$', 'Dominican Peso', 'currency.DOP'), + (41, 'DZD', 2, NULL, 'Algerian Dinar', 'currency.DZD'), + (42, 'EEK', 2, NULL, 'Estonian Kroon', 'currency.EEK'), + (43, 'EGP', 2, NULL, 'Egyptian Pound', 'currency.EGP'), + (44, 'ERN', 2, NULL, 'Eritrea Nafka', 'currency.ERN'), + (45, 'ETB', 2, NULL, 'Ethiopian Birr', 'currency.ETB'), + (46, 'EUR', 2, '€', 'Euro', 'currency.EUR'), + (47, 'FJD', 2, NULL, 'Fiji Dollar', 'currency.FJD'), + (48, 'FKP', 2, NULL, 'Falkland Islands Pound', 'currency.FKP'), + (49, 'GBP', 2, NULL, 'Pound Sterling', 'currency.GBP'), + (50, 'GEL', 2, NULL, 'Georgian Lari', 'currency.GEL'), + (51, 'GHC', 2, 'GHc', 'Ghana Cedi', 'currency.GHC'), + (52, 'GIP', 2, NULL, 'Gibraltar Pound', 'currency.GIP'), + (53, 'GMD', 2, NULL, 'Gambian Dalasi', 'currency.GMD'), + (54, 'GNF', 0, NULL, 'Guinea Franc', 'currency.GNF'), + (55, 'GTQ', 2, 'Q', 'Guatemala Quetzal', 'currency.GTQ'), + (56, 'GYD', 2, NULL, 'Guyana Dollar', 'currency.GYD'), + (57, 'HKD', 2, NULL, 'Hong Kong Dollar', 'currency.HKD'), + (58, 'HNL', 2, 'L', 'Honduras Lempira', 'currency.HNL'), + (59, 'HRK', 2, NULL, 'Croatian Kuna', 'currency.HRK'), + (60, 'HTG', 2, 'G', 'Haiti Gourde', 'currency.HTG'), + (61, 'HUF', 2, NULL, 'Hungarian Forint', 'currency.HUF'), + (62, 'IDR', 2, NULL, 'Indonesian Rupiah', 'currency.IDR'), + (63, 'ILS', 2, NULL, 'New Israeli Shekel', 'currency.ILS'), + (64, 'INR', 2, '₹', 'Indian Rupee', 'currency.INR'), + (65, 'IQD', 3, NULL, 'Iraqi Dinar', 'currency.IQD'), + (66, 'IRR', 2, NULL, 'Iranian Rial', 'currency.IRR'), + (67, 'ISK', 0, NULL, 'Iceland Krona', 'currency.ISK'), + (68, 'JMD', 2, NULL, 'Jamaican Dollar', 'currency.JMD'), + (69, 'JOD', 3, NULL, 'Jordanian Dinar', 'currency.JOD'), + (70, 'JPY', 0, NULL, 'Japanese Yen', 'currency.JPY'), + (71, 'KES', 2, 'KSh', 'Kenyan Shilling', 'currency.KES'), + (72, 'KGS', 2, NULL, 'Kyrgyzstan Som', 'currency.KGS'), + (73, 'KHR', 2, NULL, 'Cambodia Riel', 'currency.KHR'), + (74, 'KMF', 0, NULL, 'Comoro Franc', 'currency.KMF'), + (75, 'KPW', 2, NULL, 'North Korean Won', 'currency.KPW'), + (76, 'KRW', 0, NULL, 'Korean Won', 'currency.KRW'), + (77, 'KWD', 3, NULL, 'Kuwaiti Dinar', 'currency.KWD'), + (78, 'KYD', 2, NULL, 'Cayman Islands Dollar', 'currency.KYD'), + (79, 'KZT', 2, NULL, 'Kazakhstan Tenge', 'currency.KZT'), + (80, 'LAK', 2, NULL, 'Lao Kip', 'currency.LAK'), + (81, 'LBP', 2, 'L£', 'Lebanese Pound', 'currency.LBP'), + (82, 'LKR', 2, NULL, 'Sri Lanka Rupee', 'currency.LKR'), + (83, 'LRD', 2, NULL, 'Liberian Dollar', 'currency.LRD'), + (84, 'LSL', 2, NULL, 'Lesotho Loti', 'currency.LSL'), + (85, 'LTL', 2, NULL, 'Lithuanian Litas', 'currency.LTL'), + (86, 'LVL', 2, NULL, 'Latvian Lats', 'currency.LVL'), + (87, 'LYD', 3, NULL, 'Libyan Dinar', 'currency.LYD'), + (88, 'MAD', 2, NULL, 'Moroccan Dirham', 'currency.MAD'), + (89, 'MDL', 2, NULL, 'Moldovan Leu', 'currency.MDL'), + (90, 'MGA', 2, NULL, 'Malagasy Ariary', 'currency.MGA'), + (91, 'MKD', 2, NULL, 'Macedonian Denar', 'currency.MKD'), + (92, 'MMK', 2, 'K', 'Myanmar Kyat', 'currency.MMK'), + (93, 'MNT', 2, NULL, 'Mongolian Tugrik', 'currency.MNT'), + (94, 'MOP', 2, NULL, 'Macau Pataca', 'currency.MOP'), + (95, 'MRO', 2, NULL, 'Mauritania Ouguiya', 'currency.MRO'), + (96, 'MTL', 2, NULL, 'Maltese Lira', 'currency.MTL'), + (97, 'MUR', 2, NULL, 'Mauritius Rupee', 'currency.MUR'), + (98, 'MVR', 2, NULL, 'Maldives Rufiyaa', 'currency.MVR'), + (99, 'MWK', 2, NULL, 'Malawi Kwacha', 'currency.MWK'), + (100, 'MXN', 2, '$', 'Mexican Peso', 'currency.MXN'), + (101, 'MYR', 2, NULL, 'Malaysian Ringgit', 'currency.MYR'), + (102, 'MZM', 2, NULL, 'Mozambique Metical', 'currency.MZM'), + (103, 'NAD', 2, NULL, 'Namibia Dollar', 'currency.NAD'), + (104, 'NGN', 2, NULL, 'Nigerian Naira', 'currency.NGN'), + (105, 'NIO', 2, 'C$', 'Nicaragua Cordoba Oro', 'currency.NIO'), + (106, 'NOK', 2, NULL, 'Norwegian Krone', 'currency.NOK'), + (107, 'NPR', 2, NULL, 'Nepalese Rupee', 'currency.NPR'), + (108, 'NZD', 2, NULL, 'New Zealand Dollar', 'currency.NZD'), + (109, 'OMR', 3, NULL, 'Rial Omani', 'currency.OMR'), + (110, 'PAB', 2, 'B/.', 'Panama Balboa', 'currency.PAB'), + (111, 'PEN', 2, 'S/.', 'Peruvian Nuevo Sol', 'currency.PEN'), + (112, 'PGK', 2, NULL, 'Papua New Guinea Kina', 'currency.PGK'), + (113, 'PHP', 2, NULL, 'Philippine Peso', 'currency.PHP'), + (114, 'PKR', 2, NULL, 'Pakistan Rupee', 'currency.PKR'), + (115, 'PLN', 2, NULL, 'Polish Zloty', 'currency.PLN'), + (116, 'PYG', 0, '₲', 'Paraguayan Guarani', 'currency.PYG'), + (117, 'QAR', 2, NULL, 'Qatari Rial', 'currency.QAR'), + (118, 'RON', 2, NULL, 'Romanian Leu', 'currency.RON'), + (119, 'RUB', 2, NULL, 'Russian Ruble', 'currency.RUB'), + (120, 'RWF', 0, NULL, 'Rwanda Franc', 'currency.RWF'), + (121, 'SAR', 2, NULL, 'Saudi Riyal', 'currency.SAR'), + (122, 'SBD', 2, NULL, 'Solomon Islands Dollar', 'currency.SBD'), + (123, 'SCR', 2, NULL, 'Seychelles Rupee', 'currency.SCR'), + (124, 'SDD', 2, NULL, 'Sudanese Dinar', 'currency.SDD'), + (125, 'SEK', 2, NULL, 'Swedish Krona', 'currency.SEK'), + (126, 'SGD', 2, NULL, 'Singapore Dollar', 'currency.SGD'), + (127, 'SHP', 2, NULL, 'St Helena Pound', 'currency.SHP'), + (128, 'SIT', 2, NULL, 'Slovenian Tolar', 'currency.SIT'), + (129, 'SKK', 2, NULL, 'Slovak Koruna', 'currency.SKK'), + (130, 'SLL', 2, NULL, 'Sierra Leone Leone', 'currency.SLL'), + (131, 'SOS', 2, NULL, 'Somali Shilling', 'currency.SOS'), + (132, 'SRD', 2, NULL, 'Surinam Dollar', 'currency.SRD'), + (133, 'STD', 2, NULL, 'Sao Tome and Principe Dobra', 'currency.STD'), + (134, 'SVC', 2, NULL, 'El Salvador Colon', 'currency.SVC'), + (135, 'SYP', 2, NULL, 'Syrian Pound', 'currency.SYP'), + (136, 'SZL', 2, NULL, 'Swaziland Lilangeni', 'currency.SZL'), + (137, 'THB', 2, NULL, 'Thai Baht', 'currency.THB'), + (138, 'TJS', 2, NULL, 'Tajik Somoni', 'currency.TJS'), + (139, 'TMM', 2, NULL, 'Turkmenistan Manat', 'currency.TMM'), + (140, 'TND', 3, 'DT', 'Tunisian Dinar', 'currency.TND'), + (141, 'TOP', 2, NULL, 'Tonga Pa\'anga','currency.TOP'),(142,'TRY',2,NULL,'Turkish Lira','currency.TRY'),(143,'TTD',2,NULL,'Trinidad and Tobago Dollar','currency.TTD'),(144,'TWD',2,NULL,'New Taiwan Dollar','currency.TWD'),(145,'TZS',2,NULL,'Tanzanian Shilling','currency.TZS'),(146,'UAH',2,NULL,'Ukraine Hryvnia','currency.UAH'),(147,'UGX',2,'USh','Uganda Shilling','currency.UGX'),(148,'USD',2,'$','US Dollar','currency.USD'),(149,'UYU',2,'$U','Peso Uruguayo','currency.UYU'),(150,'UZS',2,NULL,'Uzbekistan Sum','currency.UZS'),(151,'VEB',2,'Bs.F.','Venezuelan Bolivar','currency.VEB'),(152,'VND',2,NULL,'Vietnamese Dong','currency.VND'),(153,'VUV',0,NULL,'Vanuatu Vatu','currency.VUV'),(154,'WST',2,NULL,'Samoa Tala','currency.WST'),(155,'XAF',0,NULL,'CFA Franc BEAC','currency.XAF'),(156,'XCD',2,NULL,'East Caribbean Dollar','currency.XCD'),(157,'XDR',5,NULL,'SDR (Special Drawing Rights)','currency.XDR'),(158,'XOF',0,'CFA','CFA Franc BCEAO','currency.XOF'),(159,'XPF',0,NULL,'CFP Franc','currency.XPF'),(160,'YER',2,NULL,'Yemeni Rial','currency.YER'),(161,'ZAR',2,'R','South African Rand','currency.ZAR'),(162,'ZMK',2,NULL,'Zambian Kwacha','currency.ZMK'),(163,'ZWD',2,NULL,'Zimbabwe Dollar','currency.ZWD'); /*!40000 ALTER TABLE `m_currency` ENABLE KEYS */; UNLOCK TABLES; @@ -1821,9 +2037,30 @@ CREATE TABLE `stretchy_parameter` ( LOCK TABLES `stretchy_parameter` WRITE; /*!40000 ALTER TABLE `stretchy_parameter` DISABLE KEYS */; -INSERT INTO `stretchy_parameter` VALUES (1,'startDateSelect','startDate','startDate','date','date','today',NULL,NULL,NULL,NULL,NULL),(2,'endDateSelect','endDate','endDate','date','date','today',NULL,NULL,NULL,NULL,NULL),(3,'obligDateTypeSelect','obligDateType','obligDateType','select','number','0',NULL,NULL,NULL,'select * from\r\n(select 1 as id, \"Closed\" as `name` union all\r\nselect 2, \"Disbursal\" ) x\r\norder by x.`id`',NULL),(5,'OfficeIdSelectOne','officeId','Office','select','number','0',NULL,'Y',NULL,'select id, \r\nconcat(substring(\"........................................\", 1, \r\n \n\n((LENGTH(`hierarchy`) - LENGTH(REPLACE(`hierarchy`, \'.\', \'\')) - 1) * 4)), \r\n `name`) as tc\r\nfrom m_office\r\nwhere hierarchy like concat\n\n(\'${currentUserHierarchy}\', \'%\')\r\norder by hierarchy',NULL),(6,'loanOfficerIdSelectAll','loanOfficerId','Loan Officer','select','number','0',NULL,NULL,'Y','(select lo.id, lo.display_name as `Name` \r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\njoin m_staff lo on lo.office_id = ounder.id\r\nwhere lo.is_loan_officer = true\r\nand o.id = ${officeId})\r\nunion all\r\n(select -10, \'-\')\r\norder by 2',5),(10,'currencyIdSelectAll','currencyId','Currency','select','number','0',NULL,NULL,'Y','select `code`, `name`\r\nfrom m_organisation_currency\r\norder by `code`',NULL),(20,'fundIdSelectAll','fundId','Fund','select','number','0',NULL,NULL,'Y','(select id, `name`\r\nfrom m_fund)\r\nunion all\r\n(select -10, \'-\')\r\norder by 2',NULL),(25,'loanProductIdSelectAll','loanProductId','Product','select','number','0',NULL,NULL,'Y','select p.id, p.`name`\r\nfrom m_product_loan p\r\nwhere p.currency_code = \'$\{currencyId}\'\r\norder by 2',10),(26,'loanPurposeIdSelectAll','loanPurposeId','Loan Purpose','select','number','0',NULL,NULL,'Y','select -10 as id, \'-\' as code_value\r\nunion all\r\nselect * from (select v.id, v.code_value\r\nfrom m_code c\r\njoin m_code_value v on v.code_id = c.id\r\nwhere c.code_name = \"loanPurpose\"\r\norder by v.order_position) x',NULL),(100,'parTypeSelect','parType','parType','select','number','0',NULL,NULL,NULL,'select * from\r\n(select 1 as id, \"Principal Only\" as `name` union all\r\nselect 2, \"Principal + Interest\" union all\r\nselect 3, \"Principal + Interest + Fees\" union all\r\nselect 4, \"Principal + Interest + Fees + Penalties\") x\r\norder by x.`id`',NULL),(1001,'FullReportList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select r.report_id, r.report_name, r.report_type, r.report_subtype, r.report_category,\r\n \n\nrp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on rp.report_id = r.report_id\r\n \n\nleft join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \n\n\r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on rp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where \n\nur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by \n\nr.report_category, r.report_name, rp.parameter_id',NULL),(1002,'FullParameterList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select sp.parameter_name, sp.parameter_variable, sp.parameter_label, sp.parameter_displayType, \r\nsp.parameter_FormatType, sp.parameter_default, sp.selectOne, sp.selectAll, spp.parameter_name as parentParameterName\r\nfrom stretchy_parameter sp\r\nleft join stretchy_parameter spp on spp.parameter_id = sp.parent_parameter_id\r\nwhere sp.special is null\r\nand exists \r\n (select \'f\' \r\n from stretchy_report sr\r\n join stretchy_report_parameter srp on srp.report_id = sr.report_id\r\n where sr.report_name in(${reportListing})\r\n and srp.parameter_id = sp.parameter_id\r\n )\r\norder by sp.parameter_id',NULL),(1003,'reportCategoryList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select r.report_id, r.report_name, r.report_type, r.report_subtype, \n\nr.report_category,\r\n rp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on \n\nrp.report_id = r.report_id\r\n left join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.report_category = \'${reportCategory}\'\r\n and \n\nr.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on \n\nrp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where ur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \n\n\'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by r.report_category, r.report_name, rp.parameter_id',NULL); +INSERT INTO `stretchy_parameter` VALUES (1,'startDateSelect','startDate','startDate','date','date','today',NULL,NULL,NULL,NULL,NULL),(2,'endDateSelect','endDate','endDate','date','date','today',NULL,NULL,NULL,NULL,NULL),(3,'obligDateTypeSelect','obligDateType','obligDateType','select','number','0',NULL,NULL,NULL,'select * from\r\n(select 1 as id, \"Closed\" as `name` union all\r\nselect 2, \"Disbursal\" ) x\r\norder by x.`id`',NULL),(5,'OfficeIdSelectOne','officeId','Office','select','number','0',NULL,'Y',NULL,'select id, \r\nconcat(substring(\"........................................\", 1, \r\n \n\n((LENGTH(`hierarchy`) - LENGTH(REPLACE(`hierarchy`, \'.\', \'\')) - 1) * 4)), \r\n `name`) as tc\r\nfrom m_office\r\nwhere hierarchy like concat\n\n(\'${currentUserHierarchy}\', \'%\')\r\norder by hierarchy',NULL), + (6, 'loanOfficerIdSelectAll', 'loanOfficerId', 'Loan Officer', 'select', 'number', '0', NULL, NULL, 'Y', + '(select lo.id, lo.display_name as `Name` \r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\njoin m_staff lo on lo.office_id = ounder.id\r\nwhere lo.is_loan_officer = true\r\nand o.id = ${officeId})\r\nunion all\r\n(select -10, \'-\')\r\norder by 2', + 5), (10, 'currencyIdSelectAll', 'currencyId', 'Currency', 'select', 'number', '0', NULL, NULL, 'Y', + 'select `code`, `name`\r\nfrom m_organisation_currency\r\norder by `code`', NULL), + (20, 'fundIdSelectAll', 'fundId', 'Fund', 'select', 'number', '0', NULL, NULL, 'Y', + '(select id, `name`\r\nfrom m_fund)\r\nunion all\r\n(select -10, \' -\')\r\norder by 2', NULL), + (25, 'loanProductIdSelectAll', 'loanProductId', 'Product', 'select', 'number', '0', NULL, NULL, 'Y', + 'select p.id, p.`name`\r\nfrom m_product_loan p\r\nwhere p.currency_code = \'$\{currencyId}\'\r\norder by 2', + 10), (26, 'loanPurposeIdSelectAll', 'loanPurposeId', 'Loan Purpose', 'select', 'number', '0', NULL, NULL, 'Y', + 'select -10 as id, \' -\' as code_value\r\nunion all\r\nselect * from (select v.id, v.code_value\r\nfrom m_code c\r\njoin m_code_value v on v.code_id = c.id\r\nwhere c.code_name = \"loanPurpose\"\r\norder by v.order_position) x', + NULL), (100, 'parTypeSelect', 'parType', 'parType', 'select', 'number', '0', NULL, NULL, NULL, + 'select * from\r\n(select 1 as id, \"Principal Only\" as `name` union all\r\nselect 2, \"Principal + Interest\" union all\r\nselect 3, \"Principal + Interest + Fees\" union all\r\nselect 4, \"Principal + Interest + Fees + Penalties\") x\r\norder by x.`id`', + NULL), (1001, 'FullReportList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, + 'select r.report_id, r.report_name, r.report_type, r.report_subtype, r.report_category,\r\n \n\nrp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on rp.report_id = r.report_id\r\n \n\nleft join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \n\n\r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on rp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where \n\nur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by \n\nr.report_category, r.report_name, rp.parameter_id', + NULL), (1002, 'FullParameterList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, + 'select sp.parameter_name, sp.parameter_variable, sp.parameter_label, sp.parameter_displayType, \r\nsp.parameter_FormatType, sp.parameter_default, sp.selectOne, sp.selectAll, spp.parameter_name as parentParameterName\r\nfrom stretchy_parameter sp\r\nleft join stretchy_parameter spp on spp.parameter_id = sp.parent_parameter_id\r\nwhere sp.special is null\r\nand exists \r\n (select \'f\' \r\n from stretchy_report sr\r\n join stretchy_report_parameter srp on srp.report_id = sr.report_id\r\n where sr.report_name in(${reportListing})\r\n and srp.parameter_id = sp.parameter_id\r\n )\r\norder by sp.parameter_id', + NULL), + (1003, 'reportCategoryList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, + 'select r.report_id, r.report_name, r.report_type, r.report_subtype, \n\nr.report_category,\r\n rp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on \n\nrp.report_id = r.report_id\r\n left join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.report_category = \'${reportCategory}\'\r\n and \n\nr.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on \n\nrp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where ur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \n\n\'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by r.report_category, r.report_name, rp.parameter_id', + NULL); /*!40000 ALTER TABLE `stretchy_parameter` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `stretchy_report` @@ -1832,18 +2069,19 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `stretchy_report`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `stretchy_report` ( - `report_id` INT NOT NULL AUTO_INCREMENT, - `report_name` varchar(100) NOT NULL, - `report_type` varchar(20) NOT NULL, - `report_subtype` varchar(20) DEFAULT NULL, - `report_category` varchar(45) DEFAULT NULL, - `report_sql` text, - `description` text, - `core_report` tinyint DEFAULT '0', - `use_report` tinyint DEFAULT '0', - PRIMARY KEY (`report_id`), - UNIQUE KEY `report_name_UNIQUE` (`report_name`) +CREATE TABLE `stretchy_report` +( + `report_id` INT NOT NULL AUTO_INCREMENT, + `report_name` varchar(100) NOT NULL, + `report_type` varchar(20) NOT NULL, + `report_subtype` varchar(20) DEFAULT NULL, + `report_category` varchar(45) DEFAULT NULL, + `report_sql` text, + `description` text, + `core_report` tinyint DEFAULT '0', + `use_report` tinyint DEFAULT '0', + PRIMARY KEY (`report_id`), + UNIQUE KEY `report_name_UNIQUE` (`report_name`) ) ENGINE=InnoDB AUTO_INCREMENT=95 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1851,11 +2089,87 @@ CREATE TABLE `stretchy_report` ( -- Dumping data for table `stretchy_report` -- -LOCK TABLES `stretchy_report` WRITE; +LOCK +TABLES `stretchy_report` WRITE; /*!40000 ALTER TABLE `stretchy_report` DISABLE KEYS */; -INSERT INTO `stretchy_report` VALUES (1,'Client Listing','Table',NULL,'Client','select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n c.account_no as \"Client Account No.\", \r\nc.display_name as \"Name\", \n\nc.joined_date as \"Joined\", c.external_id as \"External Id\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand \n\nounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\nwhere o.id = ${officeId}\r\nand c.is_deleted=0\r\n\n\norder by ounder.hierarchy, c.account_no','Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \'one to one\' additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t \n\nhave that client browser/memory impact).',1,1),(2,'Client Loans Listing','Table',NULL,'Client','select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client \n\nAccount No.\", \r\nc.display_name as \"Name\", \r\nlo.display_name as \"Loan Officer\", l.account_no as \"Loan Account No.\", l.external_id as \"External Id\", \r\n\n\np.name as Loan, st.enum_message_property as \"Status\", \r\nf.`name` as Fund, purp.code_value as \"Loan Purpose\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount,\n\n\r\nl.arrearstolerance_amount as \"Arrears Tolerance Amount\",\r\nl.number_of_repayments as \"Expected No. Repayments\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\nl.nominal_interest_rate_per_period as \"Nominal Interest Rate Per Period\",\r\n\r\nipf.enum_message_property as \"Interest Rate Frequency\n\n\",\r\nim.enum_message_property as \"Interest Method\",\r\nicp.enum_message_property as \"Interest Calculated in Period\",\r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.repay_every as \"Repayment Frequency\",\r\nrf.enum_message_property as \"Repayment Frequency Period\",\n\n\r\nam.enum_message_property as \"Amortization\",\r\n\r\nl.total_charges_due_at_disbursement_derived as \"Total Charges Due At Disbursement\",\r\n\r\ndate( \n\nl.submittedon_date) as Submitted, date(l.approvedon_date) Approved, l.expected_disbursedon_date As \"Expected Disbursal\",\r\ndate(l.expected_firstrepaymenton_date) as \n\n\"Expected First Repayment\", date(l.interest_calculated_from_date) as \"Interest Calculated From\" ,\r\ndate(l.disbursedon_date) as Disbursed, date\n\n(l.expected_maturedon_date) \"Expected Maturity\",\r\ndate(l.maturedon_date) as \"Matured On\", date(l.closedon_date) as Closed,\r\ndate(l.rejectedon_date) as \n\nRejected, date(l.rescheduledon_date) as Rescheduled, \r\ndate(l.withdrawnon_date) as Withdrawn, date(l.writtenoffon_date) \"Written Off\"\r\nfrom m_office o \r\njoin \n\nm_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on \n\nc.office_id = ounder.id\r\nleft join m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_product_loan p on p.id = \n\nl.product_id\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join r_enum_value st on st.enum_name = \"loan_status_id\" and st.enum_id = l.loan_status_id\r\nleft join \n\nr_enum_value ipf on ipf.enum_name = \"interest_period_frequency_enum\" and ipf.enum_id = l.interest_period_frequency_enum\r\nleft join r_enum_value im on im.enum_name \n\n= \"interest_method_enum\" and im.enum_id = l.interest_method_enum\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = \n\nl.term_period_frequency_enum\r\nleft join r_enum_value icp on icp.enum_name = \"interest_calculated_in_period_enum\" and icp.enum_id = \n\nl.interest_calculated_in_period_enum\r\nleft join r_enum_value rf on rf.enum_name = \"repayment_period_frequency_enum\" and rf.enum_id = \n\nl.repayment_period_frequency_enum\r\nleft join r_enum_value am on am.enum_name = \"amortization_method_enum\" and am.enum_id = l.amortization_method_enum\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\n\r\nleft \n\njoin m_currency cur on cur.code = l.currency_code\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand \n\n(l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \n\n\"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\norder by ounder.hierarchy, 2 , l.id','Individual Client Report\r\n\r\nPretty \n\nwide report that lists the basic details of client loans. \r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t have that client browser/memory impact).',1,1),(5,'Loans Awaiting Disbursal','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No\", c.display_name as \"Name\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount as Principal, \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\",\r\ndate(l.approvedon_date) \"Approved\",\r\ndatediff(l.expected_disbursedon_date, curdate()) as \"Days to Disbursal\",\r\ndate(l.expected_disbursedon_date) \"Expected Disbursal\",\r\npurp.code_value as \"Loan Purpose\",\r\n lo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\norder by ounder.hierarchy, datediff(l.expected_disbursedon_date, curdate()), c.account_no','Individual Client Report',1,1),(6,'Loans Awaiting Disbursal Summary','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, f.`name` as Fund,\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`','Individual Client Report',1,1),(7,'Loans Awaiting Disbursal Summary by Month','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nyear(l.expected_disbursedon_date) as \"Year\", \r\nmonthname(l.expected_disbursedon_date) as \"Month\",\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)','Individual Client Report',1,1),(8,'Loans Pending Approval','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client Name\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, pl.`name` as \"Product\", \r\nl.account_no as \"Loan Account No.\", \r\nl.principal_amount as \"Loan Amount\", \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\ndatediff(curdate(), l.submittedon_date) \"Days Pending Approval\", \r\npurp.code_value as \"Loan Purpose\",\r\nlo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 100 /*Submitted and awaiting approval */\r\norder by ounder.hierarchy, l.submittedon_date, l.account_no','Individual Client Report',1,1),(11,'Active Loans - Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. loans_in_arrears_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(if(laa.loan_id is not null, l.id, null) )) as loans_in_arrears_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(laa.principal_overdue_derived) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(laa.interest_overdue_derived) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(laa.fee_charges_overdue_derived) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(laa.penalty_charges_overdue_derived) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency',NULL,1,1),(12,'Active Loans - Details','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\npenalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(13,'Obligation Met Loans Details','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client\",\r\nl.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.total_repayment_derived as \"Total Repaid\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", \r\ndate(l.closedon_date) as \"Closed\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(14,'Obligation Met Loans Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\ncount(distinct(c.id)) as \"No. of Clients\",\r\ncount(distinct(l.id)) as \"No. of Loans\",\r\nsum(l.principal_amount) as \"Total Loan Amount\", \r\nsum(l.principal_repaid_derived) as \"Total Principal Repaid\",\r\nsum(l.interest_repaid_derived) as \"Total Interest Repaid\",\r\nsum(l.fee_charges_repaid_derived) as \"Total Fees Repaid\",\r\nsum(l.penalty_charges_repaid_derived) as \"Total Penalties Repaid\",\r\nsum(l.interest_waived_derived) as \"Total Interest Waived\",\r\nsum(l.fee_charges_waived_derived) as \"Total Fees Waived\",\r\nsum(l.penalty_charges_waived_derived) as \"Total Penalties Waived\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by ounder.hierarchy, l.currency_code\r\norder by ounder.hierarchy, l.currency_code','Individual Client \n\nReport',1,1),(15,'Portfolio at Risk','Table',NULL,'Loan','select x.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from \r\n(select ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.currency_code\r\norder by l.currency_code) x','Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)',1,1),(16,'Portfolio at Risk by Branch','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\",\r\nx.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as \"branch\", ifnull(cur.display_symbol, l.currency_code) as Currency, \r\n\r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency','Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)',1,1),(20,'Funds Disbursed Between Dates Summary','Table',NULL,'Fund','select ifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nround(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office ounder \r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\ngroup by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)\r\norder by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)',NULL,1,1),(21,'Funds Disbursed Between Dates Summary by Office','Table',NULL,'Fund','select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n \n\nifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office o\r\n\n\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c \n\non c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\n\n\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand o.id = ${officeId}\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand \n\n(l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\ngroup by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, \n\nl.currency_code)\r\norder by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)',NULL,1,1),(48,'Balance Sheet','Pentaho',NULL,'Accounting',NULL,'Balance Sheet',1,1),(49,'Income Statement','Pentaho',NULL,'Accounting',NULL,'Profit and Loss Statement',1,1),(50,'Trial Balance','Pentaho',NULL,'Accounting',NULL,'Trial Balance Report',1,1),(51,'Written-Off Loans','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Written-Off Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Written-Off Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Written-Off Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Written-Off Penalties\',\r\nn.note AS \'Reason For Write-Off\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 6 /*write-off */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=601\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\") \r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no','Individual Lending Report. Written Off Loans',1,1),(52,'Aging Detail','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nmc.account_no as \"Client Account No.\",\r\n mc.display_name AS \"Client Name\",\r\n ml.account_no AS \"Account Number\",\r\n ml.principal_amount AS \"Loan Amount\",\r\n ml.principal_disbursed_derived AS \"Original Principal\",\r\n ml.interest_charged_derived AS \"Original Interest\",\r\n ml.principal_repaid_derived AS \"Principal Paid\",\r\n ml.interest_repaid_derived AS \"Interest Paid\",\r\n laa.principal_overdue_derived AS \"Principal Overdue\",\r\n laa.interest_overdue_derived AS \"Interest Overdue\",\r\nDATEDIFF(CURDATE(), laa.overdue_since_date_derived) as \"Days in Arrears\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<7, \'<1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<8, \' 1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<22, \' 3\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<29, \' 4\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<36, \' 5\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<43, \' 6\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<50, \' 7\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<57, \' 8\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<64, \' 9\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<85, \'12\', \'12+\')))))))))))) )AS \"Weeks In Arrears Band\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<361, \'180 - 360\', \r\n \'> 360\'))))) AS \"Days in Arrears Band\"\r\n\r\n FROM m_office mo \r\n JOIN m_office ounder ON ounder.hierarchy like concat(mo.hierarchy, \'%\')\r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n INNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id\r\n INNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\n left join m_currency cur on cur.code = ml.currency_code\r\n WHERE ml.loan_status_id=300\r\n AND mo.id=${officeId}\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no','Loan arrears aging (Weeks)',1,1),(53,'Aging Summary (Arrears in Weeks)','Table',NULL,'Loan','SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Weeks In Arrears (Up To)\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'1\',2 UNION\r\n SELECT \'2\',3 UNION\r\n SELECT \'3\',4 UNION\r\n SELECT \'4\',5 UNION\r\n SELECT \'5\',6 UNION\r\n SELECT \'6\',7 UNION\r\n SELECT \'7\',8 UNION\r\n SELECT \'8\',9 UNION\r\n SELECT \'9\',10 UNION\r\n SELECT \'10\',11 UNION\r\n SELECT \'11\',12 UNION\r\n SELECT \'12\',13 UNION\r\n SELECT \'12+\',14) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<8, \'1\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<22, \'3\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<29, \'4\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<36, \'5\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<43, \'6\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<50, \'7\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<57, \'8\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<64, \'9\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<85, \'12\',\r\n \'12+\'))))))))))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid','Loan amount in arrears by branch',1,1),(54,'Rescheduled Loans','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Rescheduled Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Rescheduled Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Rescheduled Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Rescheduled Penalties\',\r\nn.note AS \'Reason For Rescheduling\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 7 /*marked for rescheduling */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=602\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no','Individual Lending Report. Rescheduled Loans. The ability to reschedule (or mark that you have rescheduled the loan elsewhere) is a legacy of the older Mifos product. Needed for migration.',1,1),(55,'Active Loans Passed Final Maturity','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(56,'Active Loans Passed Final Maturity Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency',NULL,1,1),(57,'Active Loans in last installment','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(lastInstallment.`hierarchy`) - LENGTH(REPLACE(lastInstallment.`hierarchy`, \'.\', \'\')) - 1))), lastInstallment.branch) as \"Office/Branch\",\r\nlastInstallment.Currency,\r\nlastInstallment.`Loan Officer`, \r\nlastInstallment.`Client Account No`, lastInstallment.`Client`, \r\nlastInstallment.`Loan Account No`, lastInstallment.`Product`, \r\nlastInstallment.`Fund`, lastInstallment.`Loan Amount`, \r\nlastInstallment.`Annual Nominal Interest Rate`, \r\nlastInstallment.`Disbursed`, lastInstallment.`Expected Matured On` ,\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\norder by lastInstallment.hierarchy, lastInstallment.Currency, lastInstallment.`Client Account No`, lastInstallment.`Loan Account No`','Individual Client \n\nReport',1,1),(58,'Active Loans in last installment Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select lastInstallment.branchId as branchId,\r\nlastInstallment.Currency,\r\ncount(distinct(lastInstallment.clientId)) as client_count, \r\ncount(distinct(lastInstallment.loanId)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id as branchId, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.id as clientId, c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\ngroup by lastInstallment.branchId) x on x.branchId = mo.id\r\norder by mo.hierarchy, x.Currency','Individual Client \n\nReport',1,1),(59,'Active Loans by Disbursal Period','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No\", c.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Principal Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\n\r\nl.total_expected_repayment_derived as \"Total Loan (P+I+F+Pen)\",\r\nl.total_repayment_derived as \"Total Repaid (P+I+F+Pen)\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(61,'Aging Summary (Arrears in Months)','Table',NULL,'Loan','SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Days In Arrears\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'0 - 30\',2 UNION\r\n SELECT \'30 - 60\',3 UNION\r\n SELECT \'60 - 90\',4 UNION\r\n SELECT \'90 - 180\',5 UNION\r\n SELECT \'180 - 360\',6 UNION\r\n SELECT \'> 360\',7 ) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<361, \'180 - 360\', \r\n \'> 360\')))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid','Loan amount in arrears by branch',1,1),(91,'Loan Account Schedule','Pentaho',NULL,'Loan',NULL,NULL,1,0),(92,'Branch Expected Cash Flow','Pentaho',NULL,'Loan',NULL,NULL,1,1),(93,'Expected Payments By Date - Basic','Table',NULL,'Loan','SELECT \r\n ounder.name \'Office\', \r\n IFNULL(ms.display_name,\'-\') \'Loan Officer\',\r\n mc.account_no \'Client Account Number\',\r\n mc.display_name \'Name\',\r\n mp.name \'Product\',\r\n ml.account_no \'Loan Account Number\',\r\n mr.duedate \'Due Date\',\r\n mr.installment \'Installment\',\r\n cu.display_symbol \'Currency\',\r\n mr.principal_amount- IFNULL(mr.principal_completed_derived,0) \'Principal Due\',\r\n mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0) \'Interest Due\', \r\n IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0) \'Fees Due\', \r\n IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0) \'Penalty Due\',\r\n (mr.principal_amount- IFNULL(mr.principal_completed_derived,0)) +\r\n (mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0)) + \r\n (IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0)) + \r\n (IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0)) \'Total Due\', \r\n mlaa.total_overdue_derived \'Total Overdue\'\r\n \r\n FROM m_office mo\r\n JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\n \r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n \r\n LEFT JOIN m_client mc ON mc.office_id=ounder.id\r\n LEFT JOIN m_loan ml ON ml.client_id=mc.id AND ml.loan_status_id=300\r\n LEFT JOIN m_loan_arrears_aging mlaa ON mlaa.loan_id=ml.id\r\n LEFT JOIN m_loan_repayment_schedule mr ON mr.loan_id=ml.id AND mr.completed_derived=0\r\n LEFT JOIN m_product_loan mp ON mp.id=ml.product_id\r\n LEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\n LEFT JOIN m_currency cu ON cu.code=ml.currency_code\r\n WHERE mo.id=${officeId}\r\n AND (IFNULL(ml.loan_officer_id, -10) = \"${loanOfficerId}\" OR \"-1\" = \"${loanOfficerId}\")\r\n AND mr.duedate BETWEEN \'${startDate}\' AND \'${endDate}\'\r\n ORDER BY ounder.id,mr.duedate,ml.account_no','Test',1,1),(94,'Expected Payments By Date - Formatted','Pentaho',NULL,'Loan',NULL,NULL,1,1); +INSERT INTO `stretchy_report` +VALUES (1, 'Client Listing', 'Table', NULL, 'Client', + 'select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n c.account_no as \"Client Account No.\", \r\nc.display_name as \"Name\", \n\nc.joined_date as \"Joined\", c.external_id as \"External Id\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand \n\nounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\nwhere o.id = ${officeId}\r\nand c.is_deleted=0\r\n\n\norder by ounder.hierarchy, c.account_no', + 'Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \'one to one\' additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, + there is probably is + a limit of about 20/50k clients returned for html display (export to excel doesn\'t \n\nhave that client browser/memory impact).',1,1), + (2, 'Client Loans Listing', 'Table', NULL, 'Client', + 'select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client \n\nAccount No.\", \r\nc.display_name as \"Name\", \r\nlo.display_name as \"Loan Officer\", l.account_no as \"Loan Account No.\", l.external_id as \"External Id\", \r\n\n\np.name as Loan, st.enum_message_property as \"Status\", \r\nf.`name` as Fund, purp.code_value as \"Loan Purpose\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount,\n\n\r\nl.arrearstolerance_amount as \"Arrears Tolerance Amount\",\r\nl.number_of_repayments as \"Expected No. Repayments\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\nl.nominal_interest_rate_per_period as \"Nominal Interest Rate Per Period\",\r\n\r\nipf.enum_message_property as \"Interest Rate Frequency\n\n\",\r\nim.enum_message_property as \"Interest Method\",\r\nicp.enum_message_property as \"Interest Calculated in Period\",\r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.repay_every as \"Repayment Frequency\",\r\nrf.enum_message_property as \"Repayment Frequency Period\",\n\n\r\nam.enum_message_property as \"Amortization\",\r\n\r\nl.total_charges_due_at_disbursement_derived as \"Total Charges Due At Disbursement\",\r\n\r\ndate( \n\nl.submittedon_date) as Submitted, date(l.approvedon_date) Approved, l.expected_disbursedon_date As \"Expected Disbursal\",\r\ndate(l.expected_firstrepaymenton_date) as \n\n\"Expected First Repayment\", date(l.interest_calculated_from_date) as \"Interest Calculated From\" ,\r\ndate(l.disbursedon_date) as Disbursed, date\n\n(l.expected_maturedon_date) \"Expected Maturity\",\r\ndate(l.maturedon_date) as \"Matured On\", date(l.closedon_date) as Closed,\r\ndate(l.rejectedon_date) as \n\nRejected, date(l.rescheduledon_date) as Rescheduled, \r\ndate(l.withdrawnon_date) as Withdrawn, date(l.writtenoffon_date) \"Written Off\"\r\nfrom m_office o \r\njoin \n\nm_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on \n\nc.office_id = ounder.id\r\nleft join m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_product_loan p on p.id = \n\nl.product_id\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join r_enum_value st on st.enum_name = \"loan_status_id\" and st.enum_id = l.loan_status_id\r\nleft join \n\nr_enum_value ipf on ipf.enum_name = \"interest_period_frequency_enum\" and ipf.enum_id = l.interest_period_frequency_enum\r\nleft join r_enum_value im on im.enum_name \n\n= \"interest_method_enum\" and im.enum_id = l.interest_method_enum\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = \n\nl.term_period_frequency_enum\r\nleft join r_enum_value icp on icp.enum_name = \"interest_calculated_in_period_enum\" and icp.enum_id = \n\nl.interest_calculated_in_period_enum\r\nleft join r_enum_value rf on rf.enum_name = \"repayment_period_frequency_enum\" and rf.enum_id = \n\nl.repayment_period_frequency_enum\r\nleft join r_enum_value am on am.enum_name = \"amortization_method_enum\" and am.enum_id = l.amortization_method_enum\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\n\r\nleft \n\njoin m_currency cur on cur.code = l.currency_code\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand \n\n(l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \n\n\"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\norder by ounder.hierarchy, 2 , l.id', + 'Individual Client Report\r\n\r\nPretty \n\nwide report that lists the basic details of client loans. \r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t have that client browser/memory impact).',1,1), + (5, 'Loans Awaiting Disbursal', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No\", c.display_name as \"Name\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount as Principal, \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\",\r\ndate(l.approvedon_date) \"Approved\",\r\ndatediff(l.expected_disbursedon_date, curdate()) as \"Days to Disbursal\",\r\ndate(l.expected_disbursedon_date) \"Expected Disbursal\",\r\npurp.code_value as \"Loan Purpose\",\r\n lo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\norder by ounder.hierarchy, datediff(l.expected_disbursedon_date, curdate()), c.account_no', + 'Individual Client Report', 1, 1), (6, 'Loans Awaiting Disbursal Summary', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, f.`name` as Fund,\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`', + 'Individual Client Report', 1, 1), + (7, 'Loans Awaiting Disbursal Summary by Month', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nyear(l.expected_disbursedon_date) as \"Year\", \r\nmonthname(l.expected_disbursedon_date) as \"Month\",\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)', + 'Individual Client Report', 1, 1), (8, 'Loans Pending Approval', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client Name\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, pl.`name` as \"Product\", \r\nl.account_no as \"Loan Account No.\", \r\nl.principal_amount as \"Loan Amount\", \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\ndatediff(curdate(), l.submittedon_date) \"Days Pending Approval\", \r\npurp.code_value as \"Loan Purpose\",\r\nlo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 100 /*Submitted and awaiting approval */\r\norder by ounder.hierarchy, l.submittedon_date, l.account_no', + 'Individual Client Report', 1, 1), + (11, 'Active Loans - Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. loans_in_arrears_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(if(laa.loan_id is not null, l.id, null) )) as loans_in_arrears_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(laa.principal_overdue_derived) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(laa.interest_overdue_derived) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(laa.fee_charges_overdue_derived) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(laa.penalty_charges_overdue_derived) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', + NULL, 1, 1), (12, 'Active Loans - Details', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\npenalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), + (13, 'Obligation Met Loans Details', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client\",\r\nl.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.total_repayment_derived as \"Total Repaid\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", \r\ndate(l.closedon_date) as \"Closed\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), (14, 'Obligation Met Loans Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\ncount(distinct(c.id)) as \"No. of Clients\",\r\ncount(distinct(l.id)) as \"No. of Loans\",\r\nsum(l.principal_amount) as \"Total Loan Amount\", \r\nsum(l.principal_repaid_derived) as \"Total Principal Repaid\",\r\nsum(l.interest_repaid_derived) as \"Total Interest Repaid\",\r\nsum(l.fee_charges_repaid_derived) as \"Total Fees Repaid\",\r\nsum(l.penalty_charges_repaid_derived) as \"Total Penalties Repaid\",\r\nsum(l.interest_waived_derived) as \"Total Interest Waived\",\r\nsum(l.fee_charges_waived_derived) as \"Total Fees Waived\",\r\nsum(l.penalty_charges_waived_derived) as \"Total Penalties Waived\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by ounder.hierarchy, l.currency_code\r\norder by ounder.hierarchy, l.currency_code', + 'Individual Client \n\nReport', 1, 1), + (15, 'Portfolio at Risk', 'Table', NULL, 'Loan', + 'select x.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from \r\n(select ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.currency_code\r\norder by l.currency_code) x', + 'Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', + 1, 1), (16, 'Portfolio at Risk by Branch', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\",\r\nx.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as \"branch\", ifnull(cur.display_symbol, l.currency_code) as Currency, \r\n\r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', + 'Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', + 1, 1), (20, 'Funds Disbursed Between Dates Summary', 'Table', NULL, 'Fund', + 'select ifnull(f.`name`, \' -\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nround(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office ounder \r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere disbursedon_date between \' ${startDate}\' and \'${endDate}\'\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\ngroup by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)\r\norder by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)', + NULL, 1, 1), (21, 'Funds Disbursed Between Dates Summary by Office', 'Table', NULL, 'Fund', + 'select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n \n\nifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office o\r\n\n\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c \n\non c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\n\n\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand o.id = ${officeId}\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand \n\n(l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\ngroup by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, \n\nl.currency_code)\r\norder by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)', + NULL, 1, 1), + (48, 'Balance Sheet', 'Pentaho', NULL, 'Accounting', NULL, 'Balance Sheet', 1, 1), + (49, 'Income Statement', 'Pentaho', NULL, 'Accounting', NULL, 'Profit and Loss Statement', 1, 1), + (50, 'Trial Balance', 'Pentaho', NULL, 'Accounting', NULL, 'Trial Balance Report', 1, 1), + (51, 'Written-Off Loans', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Written-Off Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Written-Off Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Written-Off Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Written-Off Penalties\',\r\nn.note AS \'Reason For Write-Off\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 6 /*write-off */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=601\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\") \r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', + 'Individual Lending Report. Written Off Loans', 1, 1), (52, 'Aging Detail', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nmc.account_no as \"Client Account No.\",\r\n mc.display_name AS \"Client Name\",\r\n ml.account_no AS \"Account Number\",\r\n ml.principal_amount AS \"Loan Amount\",\r\n ml.principal_disbursed_derived AS \"Original Principal\",\r\n ml.interest_charged_derived AS \"Original Interest\",\r\n ml.principal_repaid_derived AS \"Principal Paid\",\r\n ml.interest_repaid_derived AS \"Interest Paid\",\r\n laa.principal_overdue_derived AS \"Principal Overdue\",\r\n laa.interest_overdue_derived AS \"Interest Overdue\",\r\nDATEDIFF(CURDATE(), laa.overdue_since_date_derived) as \"Days in Arrears\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<7, \'<1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<8, \' 1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<22, \' 3\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<29, \' 4\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<36, \' 5\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<43, \' 6\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<50, \' 7\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<57, \' 8\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<64, \' 9\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<85, \'12\', \'12+\')))))))))))) )AS \"Weeks In Arrears Band\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<361, \'180 - 360\', \r\n \'> 360\'))))) AS \"Days in Arrears Band\"\r\n\r\n FROM m_office mo \r\n JOIN m_office ounder ON ounder.hierarchy like concat(mo.hierarchy, \'%\')\r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n INNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id\r\n INNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\n left join m_currency cur on cur.code = ml.currency_code\r\n WHERE ml.loan_status_id=300\r\n AND mo.id=${officeId}\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', + 'Loan arrears aging (Weeks)', 1, 1), + (53, 'Aging Summary (Arrears in Weeks)', 'Table', NULL, 'Loan', + 'SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Weeks In Arrears (Up To)\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'1\',2 UNION\r\n SELECT \'2\',3 UNION\r\n SELECT \'3\',4 UNION\r\n SELECT \'4\',5 UNION\r\n SELECT \'5\',6 UNION\r\n SELECT \'6\',7 UNION\r\n SELECT \'7\',8 UNION\r\n SELECT \'8\',9 UNION\r\n SELECT \'9\',10 UNION\r\n SELECT \'10\',11 UNION\r\n SELECT \'11\',12 UNION\r\n SELECT \'12\',13 UNION\r\n SELECT \'12+\',14) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<8, \'1\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<22, \'3\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<29, \'4\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<36, \'5\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<43, \'6\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<50, \'7\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<57, \'8\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<64, \'9\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<85, \'12\',\r\n \'12+\'))))))))))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid', + 'Loan amount in arrears by branch', 1, 1), (54, 'Rescheduled Loans', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Rescheduled Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Rescheduled Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Rescheduled Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Rescheduled Penalties\',\r\nn.note AS \'Reason For Rescheduling\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 7 /*marked for rescheduling */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=602\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', + 'Individual Lending Report. Rescheduled Loans. The ability to reschedule (or mark that you have rescheduled the loan elsewhere) is a legacy of the older Mifos product. Needed for migration.', + 1, 1), + (55, 'Active Loans Passed Final Maturity', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), + (56, 'Active Loans Passed Final Maturity Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', + NULL, 1, 1), (57, 'Active Loans in last installment', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(lastInstallment.`hierarchy`) - LENGTH(REPLACE(lastInstallment.`hierarchy`, \'.\', \'\')) - 1))), lastInstallment.branch) as \"Office/Branch\",\r\nlastInstallment.Currency,\r\nlastInstallment.`Loan Officer`, \r\nlastInstallment.`Client Account No`, lastInstallment.`Client`, \r\nlastInstallment.`Loan Account No`, lastInstallment.`Product`, \r\nlastInstallment.`Fund`, lastInstallment.`Loan Amount`, \r\nlastInstallment.`Annual Nominal Interest Rate`, \r\nlastInstallment.`Disbursed`, lastInstallment.`Expected Matured On` ,\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\norder by lastInstallment.hierarchy, lastInstallment.Currency, lastInstallment.`Client Account No`, lastInstallment.`Loan Account No`', + 'Individual Client \n\nReport', 1, 1), + (58, 'Active Loans in last installment Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select lastInstallment.branchId as branchId,\r\nlastInstallment.Currency,\r\ncount(distinct(lastInstallment.clientId)) as client_count, \r\ncount(distinct(lastInstallment.loanId)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id as branchId, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.id as clientId, c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\ngroup by lastInstallment.branchId) x on x.branchId = mo.id\r\norder by mo.hierarchy, x.Currency', + 'Individual Client \n\nReport', 1, 1), (59, 'Active Loans by Disbursal Period', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No\", c.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Principal Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\n\r\nl.total_expected_repayment_derived as \"Total Loan (P+I+F+Pen)\",\r\nl.total_repayment_derived as \"Total Repaid (P+I+F+Pen)\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), + (61, 'Aging Summary (Arrears in Months)', 'Table', NULL, 'Loan', + 'SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Days In Arrears\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'0 - 30\',2 UNION\r\n SELECT \'30 - 60\',3 UNION\r\n SELECT \'60 - 90\',4 UNION\r\n SELECT \'90 - 180\',5 UNION\r\n SELECT \'180 - 360\',6 UNION\r\n SELECT \'> 360\',7 ) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<361, \'180 - 360\', \r\n \'> 360\')))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid', + 'Loan amount in arrears by branch', 1, 1), + (91, 'Loan Account Schedule', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 0), + (92, 'Branch Expected Cash Flow', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 1), + (93, 'Expected Payments By Date - Basic', 'Table', NULL, 'Loan', + 'SELECT \r\n ounder.name \'Office\', \r\n IFNULL(ms.display_name,\'-\') \'Loan Officer\',\r\n mc.account_no \'Client Account Number\',\r\n mc.display_name \'Name\',\r\n mp.name \'Product\',\r\n ml.account_no \'Loan Account Number\',\r\n mr.duedate \'Due Date\',\r\n mr.installment \'Installment\',\r\n cu.display_symbol \'Currency\',\r\n mr.principal_amount- IFNULL(mr.principal_completed_derived,0) \'Principal Due\',\r\n mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0) \'Interest Due\', \r\n IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0) \'Fees Due\', \r\n IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0) \'Penalty Due\',\r\n (mr.principal_amount- IFNULL(mr.principal_completed_derived,0)) +\r\n (mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0)) + \r\n (IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0)) + \r\n (IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0)) \'Total Due\', \r\n mlaa.total_overdue_derived \'Total Overdue\'\r\n \r\n FROM m_office mo\r\n JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\n \r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n \r\n LEFT JOIN m_client mc ON mc.office_id=ounder.id\r\n LEFT JOIN m_loan ml ON ml.client_id=mc.id AND ml.loan_status_id=300\r\n LEFT JOIN m_loan_arrears_aging mlaa ON mlaa.loan_id=ml.id\r\n LEFT JOIN m_loan_repayment_schedule mr ON mr.loan_id=ml.id AND mr.completed_derived=0\r\n LEFT JOIN m_product_loan mp ON mp.id=ml.product_id\r\n LEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\n LEFT JOIN m_currency cu ON cu.code=ml.currency_code\r\n WHERE mo.id=${officeId}\r\n AND (IFNULL(ml.loan_officer_id, -10) = \"${loanOfficerId}\" OR \"-1\" = \"${loanOfficerId}\")\r\n AND mr.duedate BETWEEN \'${startDate}\' AND \'${endDate}\'\r\n ORDER BY ounder.id,mr.duedate,ml.account_no', + 'Test', 1, 1), (94, 'Expected Payments By Date - Formatted', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 1); /*!40000 ALTER TABLE `stretchy_report` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `stretchy_report_parameter` @@ -1864,12 +2178,13 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `stretchy_report_parameter`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `stretchy_report_parameter` ( - `report_id` INT NOT NULL, - `parameter_id` INT NOT NULL, - `report_parameter_name` varchar(45) DEFAULT NULL, - PRIMARY KEY (`report_id`,`parameter_id`), - UNIQUE KEY `report_id_name_UNIQUE` (`report_id`,`report_parameter_name`) +CREATE TABLE `stretchy_report_parameter` +( + `report_id` INT NOT NULL, + `parameter_id` INT NOT NULL, + `report_parameter_name` varchar(45) DEFAULT NULL, + PRIMARY KEY (`report_id`, `parameter_id`), + UNIQUE KEY `report_id_name_UNIQUE` (`report_id`,`report_parameter_name`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1877,11 +2192,165 @@ CREATE TABLE `stretchy_report_parameter` ( -- Dumping data for table `stretchy_report_parameter` -- -LOCK TABLES `stretchy_report_parameter` WRITE; +LOCK +TABLES `stretchy_report_parameter` WRITE; /*!40000 ALTER TABLE `stretchy_report_parameter` DISABLE KEYS */; -INSERT INTO `stretchy_report_parameter` VALUES (1,5,NULL),(2,5,NULL),(2,6,NULL),(2,10,NULL),(2,20,NULL),(2,25,NULL),(2,26,NULL),(5,5,NULL),(5,6,NULL),(5,10,NULL),(5,20,NULL),(5,25,NULL),(5,26,NULL),(6,5,NULL),(6,6,NULL),(6,10,NULL),(6,20,NULL),(6,25,NULL),(6,26,NULL),(7,5,NULL),(7,6,NULL),(7,10,NULL),(7,20,NULL),(7,25,NULL),(7,26,NULL),(8,5,NULL),(8,6,NULL),(8,10,NULL),(8,25,NULL),(8,26,NULL),(11,5,NULL),(11,6,NULL),(11,10,NULL),(11,20,NULL),(11,25,NULL),(11,26,NULL),(11,100,NULL),(12,5,NULL),(12,6,NULL),(12,10,NULL),(12,20,NULL),(12,25,NULL),(12,26,NULL),(13,1,NULL),(13,2,NULL),(13,3,NULL),(13,5,NULL),(13,6,NULL),(13,10,NULL),(13,20,NULL),(13,25,NULL),(13,26,NULL),(14,1,NULL),(14,2,NULL),(14,3,NULL),(14,5,NULL),(14,6,NULL),(14,10,NULL),(14,20,NULL),(14,25,NULL),(14,26,NULL),(15,5,NULL),(15,6,NULL),(15,10,NULL),(15,20,NULL),(15,25,NULL),(15,26,NULL),(15,100,NULL),(16,5,NULL),(16,6,NULL),(16,10,NULL),(16,20,NULL),(16,25,NULL),(16,26,NULL),(16,100,NULL),(20,1,NULL),(20,2,NULL),(20,10,NULL),(20,20,NULL),(21,1,NULL),(21,2,NULL),(21,5,NULL),(21,10,NULL),(21,20,NULL),(48,5,'branch'),(48,2,'date'),(49,5,'branch'),(49,1,'fromDate'),(49,2,'toDate'),(50,5,'branch'),(50,1,'fromDate'),(50,2,'toDate'),(51,1,NULL),(51,2,NULL),(51,5,NULL),(51,10,NULL),(51,25,NULL),(52,5,NULL),(53,5,NULL),(53,10,NULL),(54,1,NULL),(54,2,NULL),(54,5,NULL),(54,10,NULL),(54,25,NULL),(55,5,NULL),(55,6,NULL),(55,10,NULL),(55,20,NULL),(55,25,NULL),(55,26,NULL),(56,5,NULL),(56,6,NULL),(56,10,NULL),(56,20,NULL),(56,25,NULL),(56,26,NULL),(56,100,NULL),(57,5,NULL),(57,6,NULL),(57,10,NULL),(57,20,NULL),(57,25,NULL),(57,26,NULL),(58,5,NULL),(58,6,NULL),(58,10,NULL),(58,20,NULL),(58,25,NULL),(58,26,NULL),(58,100,NULL),(59,1,NULL),(59,2,NULL),(59,5,NULL),(59,6,NULL),(59,10,NULL),(59,20,NULL),(59,25,NULL),(59,26,NULL),(61,5,NULL),(61,10,NULL),(92,1,'fromDate'),(92,5,'selectOffice'),(92,2,'toDate'),(93,1,NULL),(93,2,NULL),(93,5,NULL),(93,6,NULL),(94,2,'endDate'),(94,6,'loanOfficerId'),(94,5,'officeId'),(94,1,'startDate'); +INSERT INTO `stretchy_report_parameter` +VALUES (1, 5, NULL), + (2, 5, NULL), + (2, 6, NULL), + (2, 10, NULL), + (2, 20, NULL), + (2, 25, NULL), + (2, 26, NULL), + (5, 5, NULL), + (5, 6, NULL), + (5, 10, NULL), + (5, 20, NULL), + (5, 25, NULL), + (5, 26, NULL), + (6, 5, NULL), + (6, 6, NULL), + (6, 10, NULL), + (6, 20, NULL), + (6, 25, NULL), + (6, 26, NULL), + (7, 5, NULL), + (7, 6, NULL), + (7, 10, NULL), + (7, 20, NULL), + (7, 25, NULL), + (7, 26, NULL), + (8, 5, NULL), + (8, 6, NULL), + (8, 10, NULL), + (8, 25, NULL), + (8, 26, NULL), + (11, 5, NULL), + (11, 6, NULL), + (11, 10, NULL), + (11, 20, NULL), + (11, 25, NULL), + (11, 26, NULL), + (11, 100, NULL), + (12, 5, NULL), + (12, 6, NULL), + (12, 10, NULL), + (12, 20, NULL), + (12, 25, NULL), + (12, 26, NULL), + (13, 1, NULL), + (13, 2, NULL), + (13, 3, NULL), + (13, 5, NULL), + (13, 6, NULL), + (13, 10, NULL), + (13, 20, NULL), + (13, 25, NULL), + (13, 26, NULL), + (14, 1, NULL), + (14, 2, NULL), + (14, 3, NULL), + (14, 5, NULL), + (14, 6, NULL), + (14, 10, NULL), + (14, 20, NULL), + (14, 25, NULL), + (14, 26, NULL), + (15, 5, NULL), + (15, 6, NULL), + (15, 10, NULL), + (15, 20, NULL), + (15, 25, NULL), + (15, 26, NULL), + (15, 100, NULL), + (16, 5, NULL), + (16, 6, NULL), + (16, 10, NULL), + (16, 20, NULL), + (16, 25, NULL), + (16, 26, NULL), + (16, 100, NULL), + (20, 1, NULL), + (20, 2, NULL), + (20, 10, NULL), + (20, 20, NULL), + (21, 1, NULL), + (21, 2, NULL), + (21, 5, NULL), + (21, 10, NULL), + (21, 20, NULL), + (48, 5, 'branch'), + (48, 2, 'date'), + (49, 5, 'branch'), + (49, 1, 'fromDate'), + (49, 2, 'toDate'), + (50, 5, 'branch'), + (50, 1, 'fromDate'), + (50, 2, 'toDate'), + (51, 1, NULL), + (51, 2, NULL), + (51, 5, NULL), + (51, 10, NULL), + (51, 25, NULL), + (52, 5, NULL), + (53, 5, NULL), + (53, 10, NULL), + (54, 1, NULL), + (54, 2, NULL), + (54, 5, NULL), + (54, 10, NULL), + (54, 25, NULL), + (55, 5, NULL), + (55, 6, NULL), + (55, 10, NULL), + (55, 20, NULL), + (55, 25, NULL), + (55, 26, NULL), + (56, 5, NULL), + (56, 6, NULL), + (56, 10, NULL), + (56, 20, NULL), + (56, 25, NULL), + (56, 26, NULL), + (56, 100, NULL), + (57, 5, NULL), + (57, 6, NULL), + (57, 10, NULL), + (57, 20, NULL), + (57, 25, NULL), + (57, 26, NULL), + (58, 5, NULL), + (58, 6, NULL), + (58, 10, NULL), + (58, 20, NULL), + (58, 25, NULL), + (58, 26, NULL), + (58, 100, NULL), + (59, 1, NULL), + (59, 2, NULL), + (59, 5, NULL), + (59, 6, NULL), + (59, 10, NULL), + (59, 20, NULL), + (59, 25, NULL), + (59, 26, NULL), + (61, 5, NULL), + (61, 10, NULL), + (92, 1, 'fromDate'), + (92, 5, 'selectOffice'), + (92, 2, 'toDate'), + (93, 1, NULL), + (93, 2, NULL), + (93, 5, NULL), + (93, 6, NULL), + (94, 2, 'endDate'), + (94, 6, 'loanOfficerId'), + (94, 5, 'officeId'), + (94, 1, 'startDate'); /*!40000 ALTER TABLE `stretchy_report_parameter` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `x_registered_table` @@ -1890,10 +2359,11 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `x_registered_table`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `x_registered_table` ( - `registered_table_name` varchar(50) NOT NULL, - `application_table_name` varchar(50) NOT NULL, - PRIMARY KEY (`registered_table_name`) +CREATE TABLE `x_registered_table` +( + `registered_table_name` varchar(50) NOT NULL, + `application_table_name` varchar(50) NOT NULL, + PRIMARY KEY (`registered_table_name`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1901,10 +2371,12 @@ CREATE TABLE `x_registered_table` ( -- Dumping data for table `x_registered_table` -- -LOCK TABLES `x_registered_table` WRITE; +LOCK +TABLES `x_registered_table` WRITE; /*!40000 ALTER TABLE `x_registered_table` DISABLE KEYS */; /*!40000 ALTER TABLE `x_registered_table` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; diff --git a/fineract-db/multi-tenant-demo-backups/bk_mifostenant_default.sql b/fineract-db/multi-tenant-demo-backups/bk_mifostenant_default.sql index 63308294c87..a9187fdeefc 100644 --- a/fineract-db/multi-tenant-demo-backups/bk_mifostenant_default.sql +++ b/fineract-db/multi-tenant-demo-backups/bk_mifostenant_default.sql @@ -41,20 +41,21 @@ DROP TABLE IF EXISTS `acc_gl_account`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_gl_account` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(45) NOT NULL, - `parent_id` BIGINT DEFAULT NULL, - `gl_code` varchar(45) NOT NULL, - `disabled` tinyint NOT NULL DEFAULT '0', - `manual_journal_entries_allowed` tinyint NOT NULL DEFAULT '1', - `account_usage` tinyint NOT NULL DEFAULT '2', - `classification_enum` SMALLINT NOT NULL, - `description` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `acc_gl_code` (`gl_code`), - KEY `FK_ACC_0000000001` (`parent_id`), - CONSTRAINT `FK_ACC_0000000001` FOREIGN KEY (`parent_id`) REFERENCES `acc_gl_account` (`id`) +CREATE TABLE `acc_gl_account` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(45) NOT NULL, + `parent_id` BIGINT DEFAULT NULL, + `gl_code` varchar(45) NOT NULL, + `disabled` tinyint NOT NULL DEFAULT '0', + `manual_journal_entries_allowed` tinyint NOT NULL DEFAULT '1', + `account_usage` tinyint NOT NULL DEFAULT '2', + `classification_enum` SMALLINT NOT NULL, + `description` varchar(500) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `acc_gl_code` (`gl_code`), + KEY `FK_ACC_0000000001` (`parent_id`), + CONSTRAINT `FK_ACC_0000000001` FOREIGN KEY (`parent_id`) REFERENCES `acc_gl_account` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=98 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -62,11 +63,110 @@ CREATE TABLE `acc_gl_account` ( -- Dumping data for table `acc_gl_account` -- -LOCK TABLES `acc_gl_account` WRITE; +LOCK +TABLES `acc_gl_account` WRITE; /*!40000 ALTER TABLE `acc_gl_account` DISABLE KEYS */; -INSERT INTO `acc_gl_account` VALUES (1,'Petty Cash Balances',NULL,'11100',0,1,2,1,NULL),(2,'Cash in Valut 1',NULL,'11101',0,1,1,1,NULL),(3,'Bank Balances',NULL,'11200',0,1,2,1,NULL),(4,'Centenary Opening Account',NULL,'11201',0,1,1,1,NULL),(5,'Centenary Expense Account',NULL,'11202',0,1,1,1,NULL),(6,'Centenary USD Account',NULL,'11203',0,1,1,1,NULL),(7,'Loans and Advances',NULL,'13100',0,1,2,1,NULL),(8,'Loans to Clients',NULL,'13101',0,1,1,1,NULL),(9,'Outstanding Interest',NULL,'13102',0,1,1,1,NULL),(10,'Outstanding Late Payment Interest',NULL,'13103',0,1,1,1,NULL),(11,'Outstanding Bank Fees to be collected',NULL,'13104',0,1,1,1,NULL),(12,'WriteOff Accounts',NULL,'13200',0,1,2,1,NULL),(13,'Write-offs (use for funds coming in)',NULL,'13201',0,1,1,1,NULL),(14,'Write-offs outstanding principal',NULL,'13202',0,1,1,1,NULL),(15,'Write-offs outstanding interest',NULL,'13203',0,1,1,1,NULL),(16,'Write-offs collected bank fees',NULL,'13204',0,1,1,1,NULL),(17,'Write-offs hardware/furniture',NULL,'13205',0,1,1,1,NULL),(18,'Fixed Assets',NULL,'14100',0,1,2,1,NULL),(19,'Office Equipment',NULL,'14101',0,1,1,1,NULL),(20,'Suspense Items (unidentified deposits)',NULL,'15000',0,1,2,1,NULL),(21,'Assets',NULL,'10000',0,1,2,1,NULL),(22,'Liabilities',NULL,'20000',0,1,2,2,NULL),(23,'Shares Account',NULL,'26100',0,1,2,2,NULL),(24,'Shares Captial',NULL,'26101',0,1,1,2,NULL),(25,'Donated Equity',NULL,'26300',0,1,2,2,NULL),(26,'Donated Equity Ameropa Foundation',NULL,'26301',0,1,1,2,NULL),(27,'Donated Equity e.h',NULL,'26302',0,1,1,2,NULL),(28,'Overpaid Amounts',NULL,'27000',0,1,2,2,NULL),(29,'Loss Provision',NULL,'28000',0,1,2,2,NULL),(30,'Provision Outstanding Principal',NULL,'28001',0,1,1,2,NULL),(31,'Provision Oustanding Interest',NULL,'28002',0,1,1,2,NULL),(32,'Income',NULL,'30000',0,1,2,4,NULL),(33,'Interest Income from Loans',NULL,'31100',0,1,2,4,NULL),(34,'Interest on Loans',NULL,'31101',0,1,1,4,NULL),(35,'Late Payment Interest',NULL,'31102',0,1,1,4,NULL),(36,'Income from Micro credit & Lending Activities',NULL,'31300',0,1,2,4,NULL),(37,'Collected Bank Fees Receivable',NULL,'6201',0,1,1,4,NULL),(38,'Deposits from Loans Write Off',NULL,'31400',0,1,2,4,NULL),(39,'Expenditure',NULL,'40000',0,1,2,5,NULL),(40,'Office Expenditure Account',NULL,'42100',0,1,2,5,NULL),(41,'Water Charges',NULL,'42102',0,1,1,5,NULL),(42,'Electricity Charges',NULL,'42103',0,1,1,5,NULL),(43,'Printing and Stationary',NULL,'42105',0,1,1,5,NULL),(44,'Office Rent',NULL,'42107',0,1,1,5,NULL),(45,'Marketing Expense',NULL,'42109',0,1,1,5,NULL),(46,'Office utilities',NULL,'42112',0,1,1,5,'(supplies, toiletries, kitchen)'),(47,'Furniture',NULL,'42113',0,1,1,5,NULL),(48,'CEDA Meeting Expense',NULL,'42114',0,1,1,5,NULL),(49,'Employee Personal Expsense Account',NULL,'42200',0,1,2,5,NULL),(50,'Salary Alice',NULL,'42201',0,1,1,5,NULL),(51,'Salary Irene',NULL,'42202',0,1,1,5,NULL),(52,'Salary Richard',NULL,'42203',0,1,1,5,NULL),(53,'Salary Loan Officer TBA',NULL,'42204',0,1,1,5,NULL),(54,'Medical Insurance Alice & Family',NULL,'42205',0,1,1,5,NULL),(55,'Medical Insurance Irene',NULL,'42206',0,1,1,5,NULL),(56,'Medical Insurance Richard',NULL,'42207',0,1,1,5,NULL),(57,'Medical Insurance Loan Officer TBA',NULL,'42208',0,1,1,5,NULL),(58,'PAYE all employees',NULL,'42209',0,1,1,5,NULL),(59,'NSSF all employees',NULL,'42210',0,1,1,5,NULL),(60,'Lunch Allowances all employees',NULL,'42211',0,1,1,5,NULL),(61,'IT software and maintenance',NULL,'42300',0,1,2,5,NULL),(62,'Mifos maintenance contract 12 months',NULL,'42301',0,1,1,5,NULL),(63,'VPS Contract 12 months',NULL,'42302',0,1,1,5,NULL),(64,'Bulk SMS Service',NULL,'42303',0,1,1,5,NULL),(65,'Support Accounting Software',NULL,'42304',0,1,1,5,NULL),(66,'Mifos Instance Setup',NULL,'42305',0,1,1,5,NULL),(67,'Misc support expense',NULL,'42306',0,1,1,5,NULL),(68,'Warid Mobile Line',NULL,'42307',0,1,1,5,NULL),(69,'Landline',NULL,'42308',0,1,1,5,NULL),(70,'Modem Alice',NULL,'42309',0,1,1,5,NULL),(71,'Modem Irene',NULL,'42310',0,1,1,5,NULL),(72,'Modem Richard',NULL,'42311',0,1,1,5,NULL),(73,'Repairs',NULL,'42312',0,1,1,5,NULL),(74,'Airtime Expenses',NULL,'42400',0,1,2,5,NULL),(75,'Airtime Alice',NULL,'42401',0,1,1,5,NULL),(76,'Airtime Richard',NULL,'42402',0,1,1,5,NULL),(77,'Airtime Loan Office TBA',NULL,'42403',0,1,1,5,NULL),(78,'Special Airtime Alice',NULL,'42404',0,1,1,5,NULL),(79,'Transportation',NULL,'42500',0,1,2,5,NULL),(80,'Flat monthly transportation cost',NULL,'42501',0,1,1,5,NULL),(81,'Faciliation cost for Richard',NULL,'42502',0,1,1,5,NULL),(82,'Faciliation cost for Loan Officer TBA',NULL,'42503',0,1,1,5,NULL),(83,'Consultancy Expenses',NULL,'42600',0,1,2,5,NULL),(84,'Audit Fees',NULL,'42601',0,1,1,5,NULL),(85,'Legal Fees',NULL,'42602',0,1,1,5,NULL),(86,'Miscellaneous Expenses Account',NULL,'42700',0,1,2,5,NULL),(87,'MFI License',NULL,'42703',0,1,1,5,NULL),(88,'Sundy Expenses',NULL,'42704',0,1,1,5,NULL),(89,'Bank Fees',NULL,'42800',0,1,2,5,NULL),(90,'Bank Charges Operating Account',NULL,'42801',0,1,1,5,NULL),(91,'Bank Charges Expense Account',NULL,'42802',0,1,1,5,NULL),(92,'E.H Account',NULL,'42900',0,1,2,5,NULL),(93,'Airtime',NULL,'42901',0,1,1,5,NULL),(94,'Modem',NULL,'42902',0,1,1,5,NULL),(95,'Meals',NULL,'42903',0,1,1,5,NULL),(96,'Transportation',NULL,'42904',0,1,1,5,NULL),(97,'Miscellaneous',NULL,'42905',0,1,1,5,NULL); +INSERT INTO `acc_gl_account` +VALUES (1, 'Petty Cash Balances', NULL, '11100', 0, 1, 2, 1, NULL), + (2, 'Cash in Valut 1', NULL, '11101', 0, 1, 1, 1, NULL), + (3, 'Bank Balances', NULL, '11200', 0, 1, 2, 1, NULL), + (4, 'Centenary Opening Account', NULL, '11201', 0, 1, 1, 1, NULL), + (5, 'Centenary Expense Account', NULL, '11202', 0, 1, 1, 1, NULL), + (6, 'Centenary USD Account', NULL, '11203', 0, 1, 1, 1, NULL), + (7, 'Loans and Advances', NULL, '13100', 0, 1, 2, 1, NULL), + (8, 'Loans to Clients', NULL, '13101', 0, 1, 1, 1, NULL), + (9, 'Outstanding Interest', NULL, '13102', 0, 1, 1, 1, NULL), + (10, 'Outstanding Late Payment Interest', NULL, '13103', 0, 1, 1, 1, NULL), + (11, 'Outstanding Bank Fees to be collected', NULL, '13104', 0, 1, 1, 1, NULL), + (12, 'WriteOff Accounts', NULL, '13200', 0, 1, 2, 1, NULL), + (13, 'Write-offs (use for funds coming in)', NULL, '13201', 0, 1, 1, 1, NULL), + (14, 'Write-offs outstanding principal', NULL, '13202', 0, 1, 1, 1, NULL), + (15, 'Write-offs outstanding interest', NULL, '13203', 0, 1, 1, 1, NULL), + (16, 'Write-offs collected bank fees', NULL, '13204', 0, 1, 1, 1, NULL), + (17, 'Write-offs hardware/furniture', NULL, '13205', 0, 1, 1, 1, NULL), + (18, 'Fixed Assets', NULL, '14100', 0, 1, 2, 1, NULL), + (19, 'Office Equipment', NULL, '14101', 0, 1, 1, 1, NULL), + (20, 'Suspense Items (unidentified deposits)', NULL, '15000', 0, 1, 2, 1, NULL), + (21, 'Assets', NULL, '10000', 0, 1, 2, 1, NULL), + (22, 'Liabilities', NULL, '20000', 0, 1, 2, 2, NULL), + (23, 'Shares Account', NULL, '26100', 0, 1, 2, 2, NULL), + (24, 'Shares Captial', NULL, '26101', 0, 1, 1, 2, NULL), + (25, 'Donated Equity', NULL, '26300', 0, 1, 2, 2, NULL), + (26, 'Donated Equity Ameropa Foundation', NULL, '26301', 0, 1, 1, 2, NULL), + (27, 'Donated Equity e.h', NULL, '26302', 0, 1, 1, 2, NULL), + (28, 'Overpaid Amounts', NULL, '27000', 0, 1, 2, 2, NULL), + (29, 'Loss Provision', NULL, '28000', 0, 1, 2, 2, NULL), + (30, 'Provision Outstanding Principal', NULL, '28001', 0, 1, 1, 2, NULL), + (31, 'Provision Oustanding Interest', NULL, '28002', 0, 1, 1, 2, NULL), + (32, 'Income', NULL, '30000', 0, 1, 2, 4, NULL), + (33, 'Interest Income from Loans', NULL, '31100', 0, 1, 2, 4, NULL), + (34, 'Interest on Loans', NULL, '31101', 0, 1, 1, 4, NULL), + (35, 'Late Payment Interest', NULL, '31102', 0, 1, 1, 4, NULL), + (36, 'Income from Micro credit & Lending Activities', NULL, '31300', 0, 1, 2, 4, NULL), + (37, 'Collected Bank Fees Receivable', NULL, '6201', 0, 1, 1, 4, NULL), + (38, 'Deposits from Loans Write Off', NULL, '31400', 0, 1, 2, 4, NULL), + (39, 'Expenditure', NULL, '40000', 0, 1, 2, 5, NULL), + (40, 'Office Expenditure Account', NULL, '42100', 0, 1, 2, 5, NULL), + (41, 'Water Charges', NULL, '42102', 0, 1, 1, 5, NULL), + (42, 'Electricity Charges', NULL, '42103', 0, 1, 1, 5, NULL), + (43, 'Printing and Stationary', NULL, '42105', 0, 1, 1, 5, NULL), + (44, 'Office Rent', NULL, '42107', 0, 1, 1, 5, NULL), + (45, 'Marketing Expense', NULL, '42109', 0, 1, 1, 5, NULL), + (46, 'Office utilities', NULL, '42112', 0, 1, 1, 5, '(supplies, toiletries, kitchen)'), + (47, 'Furniture', NULL, '42113', 0, 1, 1, 5, NULL), + (48, 'CEDA Meeting Expense', NULL, '42114', 0, 1, 1, 5, NULL), + (49, 'Employee Personal Expsense Account', NULL, '42200', 0, 1, 2, 5, NULL), + (50, 'Salary Alice', NULL, '42201', 0, 1, 1, 5, NULL), + (51, 'Salary Irene', NULL, '42202', 0, 1, 1, 5, NULL), + (52, 'Salary Richard', NULL, '42203', 0, 1, 1, 5, NULL), + (53, 'Salary Loan Officer TBA', NULL, '42204', 0, 1, 1, 5, NULL), + (54, 'Medical Insurance Alice & Family', NULL, '42205', 0, 1, 1, 5, NULL), + (55, 'Medical Insurance Irene', NULL, '42206', 0, 1, 1, 5, NULL), + (56, 'Medical Insurance Richard', NULL, '42207', 0, 1, 1, 5, NULL), + (57, 'Medical Insurance Loan Officer TBA', NULL, '42208', 0, 1, 1, 5, NULL), + (58, 'PAYE all employees', NULL, '42209', 0, 1, 1, 5, NULL), + (59, 'NSSF all employees', NULL, '42210', 0, 1, 1, 5, NULL), + (60, 'Lunch Allowances all employees', NULL, '42211', 0, 1, 1, 5, NULL), + (61, 'IT software and maintenance', NULL, '42300', 0, 1, 2, 5, NULL), + (62, 'Mifos maintenance contract 12 months', NULL, '42301', 0, 1, 1, 5, NULL), + (63, 'VPS Contract 12 months', NULL, '42302', 0, 1, 1, 5, NULL), + (64, 'Bulk SMS Service', NULL, '42303', 0, 1, 1, 5, NULL), + (65, 'Support Accounting Software', NULL, '42304', 0, 1, 1, 5, NULL), + (66, 'Mifos Instance Setup', NULL, '42305', 0, 1, 1, 5, NULL), + (67, 'Misc support expense', NULL, '42306', 0, 1, 1, 5, NULL), + (68, 'Warid Mobile Line', NULL, '42307', 0, 1, 1, 5, NULL), + (69, 'Landline', NULL, '42308', 0, 1, 1, 5, NULL), + (70, 'Modem Alice', NULL, '42309', 0, 1, 1, 5, NULL), + (71, 'Modem Irene', NULL, '42310', 0, 1, 1, 5, NULL), + (72, 'Modem Richard', NULL, '42311', 0, 1, 1, 5, NULL), + (73, 'Repairs', NULL, '42312', 0, 1, 1, 5, NULL), + (74, 'Airtime Expenses', NULL, '42400', 0, 1, 2, 5, NULL), + (75, 'Airtime Alice', NULL, '42401', 0, 1, 1, 5, NULL), + (76, 'Airtime Richard', NULL, '42402', 0, 1, 1, 5, NULL), + (77, 'Airtime Loan Office TBA', NULL, '42403', 0, 1, 1, 5, NULL), + (78, 'Special Airtime Alice', NULL, '42404', 0, 1, 1, 5, NULL), + (79, 'Transportation', NULL, '42500', 0, 1, 2, 5, NULL), + (80, 'Flat monthly transportation cost', NULL, '42501', 0, 1, 1, 5, NULL), + (81, 'Faciliation cost for Richard', NULL, '42502', 0, 1, 1, 5, NULL), + (82, 'Faciliation cost for Loan Officer TBA', NULL, '42503', 0, 1, 1, 5, NULL), + (83, 'Consultancy Expenses', NULL, '42600', 0, 1, 2, 5, NULL), + (84, 'Audit Fees', NULL, '42601', 0, 1, 1, 5, NULL), + (85, 'Legal Fees', NULL, '42602', 0, 1, 1, 5, NULL), + (86, 'Miscellaneous Expenses Account', NULL, '42700', 0, 1, 2, 5, NULL), + (87, 'MFI License', NULL, '42703', 0, 1, 1, 5, NULL), + (88, 'Sundy Expenses', NULL, '42704', 0, 1, 1, 5, NULL), + (89, 'Bank Fees', NULL, '42800', 0, 1, 2, 5, NULL), + (90, 'Bank Charges Operating Account', NULL, '42801', 0, 1, 1, 5, NULL), + (91, 'Bank Charges Expense Account', NULL, '42802', 0, 1, 1, 5, NULL), + (92, 'E.H Account', NULL, '42900', 0, 1, 2, 5, NULL), + (93, 'Airtime', NULL, '42901', 0, 1, 1, 5, NULL), + (94, 'Modem', NULL, '42902', 0, 1, 1, 5, NULL), + (95, 'Meals', NULL, '42903', 0, 1, 1, 5, NULL), + (96, 'Transportation', NULL, '42904', 0, 1, 1, 5, NULL), + (97, 'Miscellaneous', NULL, '42905', 0, 1, 1, 5, NULL); /*!40000 ALTER TABLE `acc_gl_account` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `acc_gl_closure` @@ -75,24 +175,25 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `acc_gl_closure`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_gl_closure` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `office_id` BIGINT NOT NULL, - `closing_date` date NOT NULL, - `is_deleted` INT NOT NULL DEFAULT '0', - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - `comments` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `office_id_closing_date` (`office_id`,`closing_date`), - KEY `FK_acc_gl_closure_m_office` (`office_id`), - KEY `FK_acc_gl_closure_m_appuser` (`createdby_id`), - KEY `FK_acc_gl_closure_m_appuser_2` (`lastmodifiedby_id`), - CONSTRAINT `FK_acc_gl_closure_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_closure_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_closure_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `acc_gl_closure` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `office_id` BIGINT NOT NULL, + `closing_date` date NOT NULL, + `is_deleted` INT NOT NULL DEFAULT '0', + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + `comments` varchar(500) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `office_id_closing_date` (`office_id`,`closing_date`), + KEY `FK_acc_gl_closure_m_office` (`office_id`), + KEY `FK_acc_gl_closure_m_appuser` (`createdby_id`), + KEY `FK_acc_gl_closure_m_appuser_2` (`lastmodifiedby_id`), + CONSTRAINT `FK_acc_gl_closure_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_closure_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_closure_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -100,10 +201,12 @@ CREATE TABLE `acc_gl_closure` ( -- Dumping data for table `acc_gl_closure` -- -LOCK TABLES `acc_gl_closure` WRITE; +LOCK +TABLES `acc_gl_closure` WRITE; /*!40000 ALTER TABLE `acc_gl_closure` DISABLE KEYS */; /*!40000 ALTER TABLE `acc_gl_closure` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `acc_gl_journal_entry` @@ -112,35 +215,36 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `acc_gl_journal_entry`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_gl_journal_entry` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_id` BIGINT NOT NULL, - `office_id` BIGINT NOT NULL, - `reversal_id` BIGINT DEFAULT NULL, - `transaction_id` varchar(50) NOT NULL, - `reversed` tinyint NOT NULL DEFAULT '0', - `manual_entry` tinyint NOT NULL DEFAULT '0', - `entry_date` date NOT NULL, - `type_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `entity_type_enum` SMALLINT DEFAULT NULL, - `entity_id` BIGINT DEFAULT NULL, - `createdby_id` BIGINT NOT NULL, - `lastmodifiedby_id` BIGINT NOT NULL, - `created_date` datetime NOT NULL, - `lastmodified_date` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_acc_gl_journal_entry_m_office` (`office_id`), - KEY `FK_acc_gl_journal_entry_m_appuser` (`createdby_id`), - KEY `FK_acc_gl_journal_entry_m_appuser_2` (`lastmodifiedby_id`), - KEY `FK_acc_gl_journal_entry_acc_gl_journal_entry` (`reversal_id`), - KEY `FK_acc_gl_journal_entry_acc_gl_account` (`account_id`), - CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_account` FOREIGN KEY (`account_id`) REFERENCES `acc_gl_account` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_journal_entry` FOREIGN KEY (`reversal_id`) REFERENCES `acc_gl_journal_entry` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `acc_gl_journal_entry` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `account_id` BIGINT NOT NULL, + `office_id` BIGINT NOT NULL, + `reversal_id` BIGINT DEFAULT NULL, + `transaction_id` varchar(50) NOT NULL, + `reversed` tinyint NOT NULL DEFAULT '0', + `manual_entry` tinyint NOT NULL DEFAULT '0', + `entry_date` date NOT NULL, + `type_enum` SMALLINT NOT NULL, + `amount` decimal(19, 6) NOT NULL, + `description` varchar(500) DEFAULT NULL, + `entity_type_enum` SMALLINT DEFAULT NULL, + `entity_id` BIGINT DEFAULT NULL, + `createdby_id` BIGINT NOT NULL, + `lastmodifiedby_id` BIGINT NOT NULL, + `created_date` datetime NOT NULL, + `lastmodified_date` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `FK_acc_gl_journal_entry_m_office` (`office_id`), + KEY `FK_acc_gl_journal_entry_m_appuser` (`createdby_id`), + KEY `FK_acc_gl_journal_entry_m_appuser_2` (`lastmodifiedby_id`), + KEY `FK_acc_gl_journal_entry_acc_gl_journal_entry` (`reversal_id`), + KEY `FK_acc_gl_journal_entry_acc_gl_account` (`account_id`), + CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_account` FOREIGN KEY (`account_id`) REFERENCES `acc_gl_account` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_journal_entry` FOREIGN KEY (`reversal_id`) REFERENCES `acc_gl_journal_entry` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -148,10 +252,12 @@ CREATE TABLE `acc_gl_journal_entry` ( -- Dumping data for table `acc_gl_journal_entry` -- -LOCK TABLES `acc_gl_journal_entry` WRITE; +LOCK +TABLES `acc_gl_journal_entry` WRITE; /*!40000 ALTER TABLE `acc_gl_journal_entry` DISABLE KEYS */; /*!40000 ALTER TABLE `acc_gl_journal_entry` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `acc_product_mapping` @@ -160,13 +266,14 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `acc_product_mapping`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_product_mapping` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `gl_account_id` BIGINT DEFAULT NULL, - `product_id` BIGINT DEFAULT NULL, - `product_type` SMALLINT DEFAULT NULL, - `financial_account_type` SMALLINT DEFAULT NULL, - PRIMARY KEY (`id`) +CREATE TABLE `acc_product_mapping` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `gl_account_id` BIGINT DEFAULT NULL, + `product_id` BIGINT DEFAULT NULL, + `product_type` SMALLINT DEFAULT NULL, + `financial_account_type` SMALLINT DEFAULT NULL, + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -174,10 +281,12 @@ CREATE TABLE `acc_product_mapping` ( -- Dumping data for table `acc_product_mapping` -- -LOCK TABLES `acc_product_mapping` WRITE; +LOCK +TABLES `acc_product_mapping` WRITE; /*!40000 ALTER TABLE `acc_product_mapping` DISABLE KEYS */; /*!40000 ALTER TABLE `acc_product_mapping` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `c_configuration` @@ -186,11 +295,12 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `c_configuration`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `c_configuration` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(50) DEFAULT NULL, - `enabled` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) +CREATE TABLE `c_configuration` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(50) DEFAULT NULL, + `enabled` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -198,11 +308,14 @@ CREATE TABLE `c_configuration` ( -- Dumping data for table `c_configuration` -- -LOCK TABLES `c_configuration` WRITE; +LOCK +TABLES `c_configuration` WRITE; /*!40000 ALTER TABLE `c_configuration` DISABLE KEYS */; -INSERT INTO `c_configuration` VALUES (1,'maker-checker',0); +INSERT INTO `c_configuration` +VALUES (1, 'maker-checker', 0); /*!40000 ALTER TABLE `c_configuration` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `client additional data` @@ -211,47 +324,48 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `client additional data`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `client additional data` ( - `client_id` BIGINT NOT NULL, - `Gender_cd` INT NOT NULL, - `Date of Birth` date NOT NULL, - `Home address` text NOT NULL, - `Telephone number` varchar(20) NOT NULL, - `Telephone number (2nd)` varchar(20) NOT NULL, - `Email address` varchar(50) NOT NULL, - `EducationLevel_cd` INT NOT NULL, - `MaritalStatus_cd` INT NOT NULL, - `Number of children` INT NOT NULL, - `Citizenship` varchar(50) NOT NULL, - `PovertyStatus_cd` INT NOT NULL, - `YesNo_cd_Employed` INT NOT NULL, - `FieldOfEmployment_cd_Field of employment` INT DEFAULT NULL, - `Employer name` varchar(50) DEFAULT NULL, - `Number of years` INT DEFAULT NULL, - `Monthly salary` decimal(19,6) DEFAULT NULL, - `YesNo_cd_Self employed` INT NOT NULL, - `FieldOfEmployment_cd_Field of self-employment` INT DEFAULT NULL, - `Business address` text, - `Number of employees` INT DEFAULT NULL, - `Monthly salaries paid` decimal(19,6) DEFAULT NULL, - `Monthly net income of business activity` decimal(19,6) DEFAULT NULL, - `Monthly rent` decimal(19,6) DEFAULT NULL, - `Other income generating activities` varchar(100) DEFAULT NULL, - `YesNo_cd_Bookkeeping` INT DEFAULT NULL, - `YesNo_cd_Loans with other institutions` INT NOT NULL, - `From whom` varchar(100) DEFAULT NULL, - `Amount` decimal(19,6) DEFAULT NULL, - `Interest rate pa` decimal(19,6) DEFAULT NULL, - `Number of people depending on overal income` INT NOT NULL, - `YesNo_cd_Bank account` INT NOT NULL, - `YesNo_cd_Business plan provided` INT NOT NULL, - `YesNo_cd_Access to internet` INT DEFAULT NULL, - `Introduced by` varchar(100) DEFAULT NULL, - `Known to introducer since` varchar(100) NOT NULL, - `Last visited by` varchar(100) DEFAULT NULL, - `Last visited on` date NOT NULL, - PRIMARY KEY (`client_id`), - CONSTRAINT `FK_client_additional_data` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `client additional data` +( + `client_id` BIGINT NOT NULL, + `Gender_cd` INT NOT NULL, + `Date of Birth` date NOT NULL, + `Home address` text NOT NULL, + `Telephone number` varchar(20) NOT NULL, + `Telephone number (2nd)` varchar(20) NOT NULL, + `Email address` varchar(50) NOT NULL, + `EducationLevel_cd` INT NOT NULL, + `MaritalStatus_cd` INT NOT NULL, + `Number of children` INT NOT NULL, + `Citizenship` varchar(50) NOT NULL, + `PovertyStatus_cd` INT NOT NULL, + `YesNo_cd_Employed` INT NOT NULL, + `FieldOfEmployment_cd_Field of employment` INT DEFAULT NULL, + `Employer name` varchar(50) DEFAULT NULL, + `Number of years` INT DEFAULT NULL, + `Monthly salary` decimal(19, 6) DEFAULT NULL, + `YesNo_cd_Self employed` INT NOT NULL, + `FieldOfEmployment_cd_Field of self-employment` INT DEFAULT NULL, + `Business address` text, + `Number of employees` INT DEFAULT NULL, + `Monthly salaries paid` decimal(19, 6) DEFAULT NULL, + `Monthly net income of business activity` decimal(19, 6) DEFAULT NULL, + `Monthly rent` decimal(19, 6) DEFAULT NULL, + `Other income generating activities` varchar(100) DEFAULT NULL, + `YesNo_cd_Bookkeeping` INT DEFAULT NULL, + `YesNo_cd_Loans with other institutions` INT NOT NULL, + `From whom` varchar(100) DEFAULT NULL, + `Amount` decimal(19, 6) DEFAULT NULL, + `Interest rate pa` decimal(19, 6) DEFAULT NULL, + `Number of people depending on overal income` INT NOT NULL, + `YesNo_cd_Bank account` INT NOT NULL, + `YesNo_cd_Business plan provided` INT NOT NULL, + `YesNo_cd_Access to internet` INT DEFAULT NULL, + `Introduced by` varchar(100) DEFAULT NULL, + `Known to introducer since` varchar(100) NOT NULL, + `Last visited by` varchar(100) DEFAULT NULL, + `Last visited on` date NOT NULL, + PRIMARY KEY (`client_id`), + CONSTRAINT `FK_client_additional_data` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -259,10 +373,12 @@ CREATE TABLE `client additional data` ( -- Dumping data for table `client additional data` -- -LOCK TABLES `client additional data` WRITE; +LOCK +TABLES `client additional data` WRITE; /*!40000 ALTER TABLE `client additional data` DISABLE KEYS */; /*!40000 ALTER TABLE `client additional data` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `extra_client_details` @@ -271,17 +387,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `extra_client_details`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `extra_client_details` ( - `client_id` BIGINT NOT NULL, - `Business Description` varchar(100) DEFAULT NULL, - `Years in Business` INT DEFAULT NULL, - `Gender_cd` INT DEFAULT NULL, - `Education_cv` varchar(60) DEFAULT NULL, - `Next Visit` date DEFAULT NULL, - `Highest Rate Paid` decimal(19,6) DEFAULT NULL, - `Comment` text, - PRIMARY KEY (`client_id`), - CONSTRAINT `FK_extra_client_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `extra_client_details` +( + `client_id` BIGINT NOT NULL, + `Business Description` varchar(100) DEFAULT NULL, + `Years in Business` INT DEFAULT NULL, + `Gender_cd` INT DEFAULT NULL, + `Education_cv` varchar(60) DEFAULT NULL, + `Next Visit` date DEFAULT NULL, + `Highest Rate Paid` decimal(19, 6) DEFAULT NULL, + `Comment` text, + PRIMARY KEY (`client_id`), + CONSTRAINT `FK_extra_client_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -289,10 +406,12 @@ CREATE TABLE `extra_client_details` ( -- Dumping data for table `extra_client_details` -- -LOCK TABLES `extra_client_details` WRITE; +LOCK +TABLES `extra_client_details` WRITE; /*!40000 ALTER TABLE `extra_client_details` DISABLE KEYS */; /*!40000 ALTER TABLE `extra_client_details` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `extra_family_details` @@ -301,17 +420,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `extra_family_details`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `extra_family_details` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `Name` varchar(40) DEFAULT NULL, - `Date of Birth` date DEFAULT NULL, - `Points Score` INT DEFAULT NULL, - `Education_cd_Highest` INT DEFAULT NULL, - `Other Notes` text, - PRIMARY KEY (`id`), - KEY `FK_Extra Family Details Data_1` (`client_id`), - CONSTRAINT `FK_family_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `extra_family_details` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `client_id` BIGINT NOT NULL, + `Name` varchar(40) DEFAULT NULL, + `Date of Birth` date DEFAULT NULL, + `Points Score` INT DEFAULT NULL, + `Education_cd_Highest` INT DEFAULT NULL, + `Other Notes` text, + PRIMARY KEY (`id`), + KEY `FK_Extra Family Details Data_1` (`client_id`), + CONSTRAINT `FK_family_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -319,10 +439,12 @@ CREATE TABLE `extra_family_details` ( -- Dumping data for table `extra_family_details` -- -LOCK TABLES `extra_family_details` WRITE; +LOCK +TABLES `extra_family_details` WRITE; /*!40000 ALTER TABLE `extra_family_details` DISABLE KEYS */; /*!40000 ALTER TABLE `extra_family_details` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `extra_loan_details` @@ -331,17 +453,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `extra_loan_details`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `extra_loan_details` ( - `loan_id` BIGINT NOT NULL, - `Business Description` varchar(100) DEFAULT NULL, - `Years in Business` INT DEFAULT NULL, - `Gender_cd` INT DEFAULT NULL, - `Education_cv` varchar(60) DEFAULT NULL, - `Next Visit` date DEFAULT NULL, - `Highest Rate Paid` decimal(19,6) DEFAULT NULL, - `Comment` text, - PRIMARY KEY (`loan_id`), - CONSTRAINT `FK_extra_loan_details` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +CREATE TABLE `extra_loan_details` +( + `loan_id` BIGINT NOT NULL, + `Business Description` varchar(100) DEFAULT NULL, + `Years in Business` INT DEFAULT NULL, + `Gender_cd` INT DEFAULT NULL, + `Education_cv` varchar(60) DEFAULT NULL, + `Next Visit` date DEFAULT NULL, + `Highest Rate Paid` decimal(19, 6) DEFAULT NULL, + `Comment` text, + PRIMARY KEY (`loan_id`), + CONSTRAINT `FK_extra_loan_details` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -349,10 +472,12 @@ CREATE TABLE `extra_loan_details` ( -- Dumping data for table `extra_loan_details` -- -LOCK TABLES `extra_loan_details` WRITE; +LOCK +TABLES `extra_loan_details` WRITE; /*!40000 ALTER TABLE `extra_loan_details` DISABLE KEYS */; /*!40000 ALTER TABLE `extra_loan_details` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `impact measurement` @@ -361,17 +486,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `impact measurement`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `impact measurement` ( - `loan_id` BIGINT NOT NULL, - `YesNo_cd_RepaidOnSchedule` INT NOT NULL, - `ReasonNotRepaidOnSchedule` text, - `How was Loan Amount Invested` text NOT NULL, - `Additional Income Generated` decimal(19,6) NOT NULL, - `Additional Income Used For` text NOT NULL, - `YesNo_cd_NewJobsCreated` INT NOT NULL, - `Number of Jobs Created` BIGINT DEFAULT NULL, - PRIMARY KEY (`loan_id`), - CONSTRAINT `FK_impact measurement` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +CREATE TABLE `impact measurement` +( + `loan_id` BIGINT NOT NULL, + `YesNo_cd_RepaidOnSchedule` INT NOT NULL, + `ReasonNotRepaidOnSchedule` text, + `How was Loan Amount Invested` text NOT NULL, + `Additional Income Generated` decimal(19, 6) NOT NULL, + `Additional Income Used For` text NOT NULL, + `YesNo_cd_NewJobsCreated` INT NOT NULL, + `Number of Jobs Created` BIGINT DEFAULT NULL, + PRIMARY KEY (`loan_id`), + CONSTRAINT `FK_impact measurement` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -379,10 +505,12 @@ CREATE TABLE `impact measurement` ( -- Dumping data for table `impact measurement` -- -LOCK TABLES `impact measurement` WRITE; +LOCK +TABLES `impact measurement` WRITE; /*!40000 ALTER TABLE `impact measurement` DISABLE KEYS */; /*!40000 ALTER TABLE `impact measurement` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `loan additional data` @@ -391,18 +519,19 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `loan additional data`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `loan additional data` ( - `loan_id` BIGINT NOT NULL, - `PurposeOfLoan_cd` INT NOT NULL, - `CollateralType_cd` INT NOT NULL, - `Collateral notes` text NOT NULL, - `YesNo_cd_Guarantor` INT NOT NULL, - `Guarantor name` varchar(100) DEFAULT NULL, - `Guarantor relation` varchar(100) DEFAULT NULL, - `Guarantor address` varchar(100) DEFAULT NULL, - `Guarantor telephone number` varchar(20) DEFAULT NULL, - PRIMARY KEY (`loan_id`), - CONSTRAINT `FK_loan_additional_data` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +CREATE TABLE `loan additional data` +( + `loan_id` BIGINT NOT NULL, + `PurposeOfLoan_cd` INT NOT NULL, + `CollateralType_cd` INT NOT NULL, + `Collateral notes` text NOT NULL, + `YesNo_cd_Guarantor` INT NOT NULL, + `Guarantor name` varchar(100) DEFAULT NULL, + `Guarantor relation` varchar(100) DEFAULT NULL, + `Guarantor address` varchar(100) DEFAULT NULL, + `Guarantor telephone number` varchar(20) DEFAULT NULL, + PRIMARY KEY (`loan_id`), + CONSTRAINT `FK_loan_additional_data` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -410,10 +539,12 @@ CREATE TABLE `loan additional data` ( -- Dumping data for table `loan additional data` -- -LOCK TABLES `loan additional data` WRITE; +LOCK +TABLES `loan additional data` WRITE; /*!40000 ALTER TABLE `loan additional data` DISABLE KEYS */; /*!40000 ALTER TABLE `loan additional data` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_appuser` @@ -422,24 +553,25 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_appuser`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_appuser` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `is_deleted` tinyint NOT NULL DEFAULT '0', - `office_id` BIGINT DEFAULT NULL, - `username` varchar(100) NOT NULL, - `firstname` varchar(100) NOT NULL, - `lastname` varchar(100) NOT NULL, - `password` varchar(255) NOT NULL, - `email` varchar(100) NOT NULL, - `firsttime_login_remaining` bit(1) NOT NULL, - `nonexpired` bit(1) NOT NULL, - `nonlocked` bit(1) NOT NULL, - `nonexpired_credentials` bit(1) NOT NULL, - `enabled` bit(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `username_org` (`username`), - KEY `FKB3D587CE0DD567A` (`office_id`), - CONSTRAINT `FKB3D587CE0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `m_appuser` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `is_deleted` tinyint NOT NULL DEFAULT '0', + `office_id` BIGINT DEFAULT NULL, + `username` varchar(100) NOT NULL, + `firstname` varchar(100) NOT NULL, + `lastname` varchar(100) NOT NULL, + `password` varchar(255) NOT NULL, + `email` varchar(100) NOT NULL, + `firsttime_login_remaining` bit(1) NOT NULL, + `nonexpired` bit(1) NOT NULL, + `nonlocked` bit(1) NOT NULL, + `nonexpired_credentials` bit(1) NOT NULL, + `enabled` bit(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `username_org` (`username`), + KEY `FKB3D587CE0DD567A` (`office_id`), + CONSTRAINT `FKB3D587CE0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -447,11 +579,15 @@ CREATE TABLE `m_appuser` ( -- Dumping data for table `m_appuser` -- -LOCK TABLES `m_appuser` WRITE; +LOCK +TABLES `m_appuser` WRITE; /*!40000 ALTER TABLE `m_appuser` DISABLE KEYS */; -INSERT INTO `m_appuser` VALUES (1,0,1,'mifos','App','Administrator','5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a','demomfi@mifos.org','\0','','','',''); +INSERT INTO `m_appuser` +VALUES (1, 0, 1, 'mifos', 'App', 'Administrator', '5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a', + 'demomfi@mifos.org', '\0', '', '', '', ''); /*!40000 ALTER TABLE `m_appuser` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_appuser_role` @@ -460,14 +596,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_appuser_role`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_appuser_role` ( - `appuser_id` BIGINT NOT NULL, - `role_id` BIGINT NOT NULL, - PRIMARY KEY (`appuser_id`,`role_id`), - KEY `FK7662CE59B4100309` (`appuser_id`), - KEY `FK7662CE5915CEC7AB` (`role_id`), - CONSTRAINT `FK7662CE5915CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`), - CONSTRAINT `FK7662CE59B4100309` FOREIGN KEY (`appuser_id`) REFERENCES `m_appuser` (`id`) +CREATE TABLE `m_appuser_role` +( + `appuser_id` BIGINT NOT NULL, + `role_id` BIGINT NOT NULL, + PRIMARY KEY (`appuser_id`, `role_id`), + KEY `FK7662CE59B4100309` (`appuser_id`), + KEY `FK7662CE5915CEC7AB` (`role_id`), + CONSTRAINT `FK7662CE5915CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`), + CONSTRAINT `FK7662CE59B4100309` FOREIGN KEY (`appuser_id`) REFERENCES `m_appuser` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -475,11 +612,14 @@ CREATE TABLE `m_appuser_role` ( -- Dumping data for table `m_appuser_role` -- -LOCK TABLES `m_appuser_role` WRITE; +LOCK +TABLES `m_appuser_role` WRITE; /*!40000 ALTER TABLE `m_appuser_role` DISABLE KEYS */; -INSERT INTO `m_appuser_role` VALUES (1,1); +INSERT INTO `m_appuser_role` +VALUES (1, 1); /*!40000 ALTER TABLE `m_appuser_role` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_calendar` @@ -488,25 +628,26 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_calendar`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_calendar` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `title` varchar(50) NOT NULL, - `description` varchar(100) DEFAULT NULL, - `location` varchar(50) DEFAULT NULL, - `start_date` date NOT NULL, - `end_date` date DEFAULT NULL, - `duration` SMALLINT DEFAULT NULL, - `calendar_type_enum` SMALLINT NOT NULL, - `repeating` tinyint NOT NULL DEFAULT '0', - `recurrence` varchar(100) DEFAULT NULL, - `remind_by_enum` SMALLINT DEFAULT NULL, - `first_reminder` smallint DEFAULT NULL, - `second_reminder` smallint DEFAULT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - PRIMARY KEY (`id`) +CREATE TABLE `m_calendar` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `title` varchar(50) NOT NULL, + `description` varchar(100) DEFAULT NULL, + `location` varchar(50) DEFAULT NULL, + `start_date` date NOT NULL, + `end_date` date DEFAULT NULL, + `duration` SMALLINT DEFAULT NULL, + `calendar_type_enum` SMALLINT NOT NULL, + `repeating` tinyint NOT NULL DEFAULT '0', + `recurrence` varchar(100) DEFAULT NULL, + `remind_by_enum` SMALLINT DEFAULT NULL, + `first_reminder` smallint DEFAULT NULL, + `second_reminder` smallint DEFAULT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -514,10 +655,12 @@ CREATE TABLE `m_calendar` ( -- Dumping data for table `m_calendar` -- -LOCK TABLES `m_calendar` WRITE; +LOCK +TABLES `m_calendar` WRITE; /*!40000 ALTER TABLE `m_calendar` DISABLE KEYS */; /*!40000 ALTER TABLE `m_calendar` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_calendar_instance` @@ -526,14 +669,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_calendar_instance`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_calendar_instance` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `calendar_id` BIGINT NOT NULL, - `entity_id` BIGINT NOT NULL, - `entity_type_enum` SMALLINT NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_calendar_m_calendar_instance` (`calendar_id`), - CONSTRAINT `FK_m_calendar_m_calendar_instance` FOREIGN KEY (`calendar_id`) REFERENCES `m_calendar` (`id`) +CREATE TABLE `m_calendar_instance` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `calendar_id` BIGINT NOT NULL, + `entity_id` BIGINT NOT NULL, + `entity_type_enum` SMALLINT NOT NULL, + PRIMARY KEY (`id`), + KEY `FK_m_calendar_m_calendar_instance` (`calendar_id`), + CONSTRAINT `FK_m_calendar_m_calendar_instance` FOREIGN KEY (`calendar_id`) REFERENCES `m_calendar` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -541,10 +685,12 @@ CREATE TABLE `m_calendar_instance` ( -- Dumping data for table `m_calendar_instance` -- -LOCK TABLES `m_calendar_instance` WRITE; +LOCK +TABLES `m_calendar_instance` WRITE; /*!40000 ALTER TABLE `m_calendar_instance` DISABLE KEYS */; /*!40000 ALTER TABLE `m_calendar_instance` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_charge` @@ -553,19 +699,20 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_charge`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_charge` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL, - `currency_code` varchar(3) NOT NULL, - `charge_applies_to_enum` SMALLINT NOT NULL, - `charge_time_enum` SMALLINT NOT NULL, - `charge_calculation_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `is_penalty` tinyint NOT NULL DEFAULT '0', - `is_active` tinyint NOT NULL, - `is_deleted` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`) +CREATE TABLE `m_charge` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(100) DEFAULT NULL, + `currency_code` varchar(3) NOT NULL, + `charge_applies_to_enum` SMALLINT NOT NULL, + `charge_time_enum` SMALLINT NOT NULL, + `charge_calculation_enum` SMALLINT NOT NULL, + `amount` decimal(19, 6) NOT NULL, + `is_penalty` tinyint NOT NULL DEFAULT '0', + `is_active` tinyint NOT NULL, + `is_deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -573,10 +720,12 @@ CREATE TABLE `m_charge` ( -- Dumping data for table `m_charge` -- -LOCK TABLES `m_charge` WRITE; +LOCK +TABLES `m_charge` WRITE; /*!40000 ALTER TABLE `m_charge` DISABLE KEYS */; /*!40000 ALTER TABLE `m_charge` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_client` @@ -585,24 +734,25 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_client`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_client` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_no` varchar(20) NOT NULL, - `office_id` BIGINT NOT NULL, - `external_id` varchar(100) DEFAULT NULL, - `firstname` varchar(50) DEFAULT NULL, - `middlename` varchar(50) DEFAULT NULL, - `lastname` varchar(50) DEFAULT NULL, - `fullname` varchar(100) DEFAULT NULL, - `display_name` varchar(100) NOT NULL, - `image_key` varchar(500) DEFAULT NULL, - `joined_date` date DEFAULT NULL, - `is_deleted` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `account_no_UNIQUE` (`account_no`), - UNIQUE KEY `external_id` (`external_id`), - KEY `FKCE00CAB3E0DD567A` (`office_id`), - CONSTRAINT `FKCE00CAB3E0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `m_client` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `account_no` varchar(20) NOT NULL, + `office_id` BIGINT NOT NULL, + `external_id` varchar(100) DEFAULT NULL, + `firstname` varchar(50) DEFAULT NULL, + `middlename` varchar(50) DEFAULT NULL, + `lastname` varchar(50) DEFAULT NULL, + `fullname` varchar(100) DEFAULT NULL, + `display_name` varchar(100) NOT NULL, + `image_key` varchar(500) DEFAULT NULL, + `joined_date` date DEFAULT NULL, + `is_deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `account_no_UNIQUE` (`account_no`), + UNIQUE KEY `external_id` (`external_id`), + KEY `FKCE00CAB3E0DD567A` (`office_id`), + CONSTRAINT `FKCE00CAB3E0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -610,10 +760,12 @@ CREATE TABLE `m_client` ( -- Dumping data for table `m_client` -- -LOCK TABLES `m_client` WRITE; +LOCK +TABLES `m_client` WRITE; /*!40000 ALTER TABLE `m_client` DISABLE KEYS */; /*!40000 ALTER TABLE `m_client` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_client_identifier` @@ -622,23 +774,24 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_client_identifier`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_client_identifier` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `document_type_id` INT NOT NULL, - `document_key` varchar(50) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `unique_identifier_key` (`document_type_id`,`document_key`), - UNIQUE KEY `unique_client_identifier` (`client_id`,`document_type_id`), - KEY `FK_m_client_document_m_client` (`client_id`), - KEY `FK_m_client_document_m_code_value` (`document_type_id`), - CONSTRAINT `FK_m_client_document_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FK_m_client_document_m_code_value` FOREIGN KEY (`document_type_id`) REFERENCES `m_code_value` (`id`) +CREATE TABLE `m_client_identifier` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `client_id` BIGINT NOT NULL, + `document_type_id` INT NOT NULL, + `document_key` varchar(50) NOT NULL, + `description` varchar(500) DEFAULT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_identifier_key` (`document_type_id`,`document_key`), + UNIQUE KEY `unique_client_identifier` (`client_id`,`document_type_id`), + KEY `FK_m_client_document_m_client` (`client_id`), + KEY `FK_m_client_document_m_code_value` (`document_type_id`), + CONSTRAINT `FK_m_client_document_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), + CONSTRAINT `FK_m_client_document_m_code_value` FOREIGN KEY (`document_type_id`) REFERENCES `m_code_value` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -646,10 +799,12 @@ CREATE TABLE `m_client_identifier` ( -- Dumping data for table `m_client_identifier` -- -LOCK TABLES `m_client_identifier` WRITE; +LOCK +TABLES `m_client_identifier` WRITE; /*!40000 ALTER TABLE `m_client_identifier` DISABLE KEYS */; /*!40000 ALTER TABLE `m_client_identifier` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_code` @@ -658,12 +813,13 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_code`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_code` ( - `id` INT NOT NULL AUTO_INCREMENT, - `code_name` varchar(100) DEFAULT NULL, - `is_system_defined` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `code_name` (`code_name`) +CREATE TABLE `m_code` +( + `id` INT NOT NULL AUTO_INCREMENT, + `code_name` varchar(100) DEFAULT NULL, + `is_system_defined` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `code_name` (`code_name`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -671,11 +827,19 @@ CREATE TABLE `m_code` ( -- Dumping data for table `m_code` -- -LOCK TABLES `m_code` WRITE; +LOCK +TABLES `m_code` WRITE; /*!40000 ALTER TABLE `m_code` DISABLE KEYS */; -INSERT INTO `m_code` VALUES (1,'Customer Identifier',1),(2,'LoanCollateral',1),(3,'LoanPurpose',1),(4,'Gender',1),(5,'YesNo',1),(6,'Education',1); +INSERT INTO `m_code` +VALUES (1, 'Customer Identifier', 1), + (2, 'LoanCollateral', 1), + (3, 'LoanPurpose', 1), + (4, 'Gender', 1), + (5, 'YesNo', 1), + (6, 'Education', 1); /*!40000 ALTER TABLE `m_code` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_code_value` @@ -684,15 +848,16 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_code_value`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_code_value` ( - `id` INT NOT NULL AUTO_INCREMENT, - `code_id` INT NOT NULL, - `code_value` varchar(100) DEFAULT NULL, - `order_position` INT NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `code_value` (`code_id`,`code_value`), - KEY `FKCFCEA42640BE071Z` (`code_id`), - CONSTRAINT `FKCFCEA42640BE071Z` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`) +CREATE TABLE `m_code_value` +( + `id` INT NOT NULL AUTO_INCREMENT, + `code_id` INT NOT NULL, + `code_value` varchar(100) DEFAULT NULL, + `order_position` INT NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `code_value` (`code_id`,`code_value`), + KEY `FKCFCEA42640BE071Z` (`code_id`), + CONSTRAINT `FKCFCEA42640BE071Z` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -700,11 +865,24 @@ CREATE TABLE `m_code_value` ( -- Dumping data for table `m_code_value` -- -LOCK TABLES `m_code_value` WRITE; +LOCK +TABLES `m_code_value` WRITE; /*!40000 ALTER TABLE `m_code_value` DISABLE KEYS */; -INSERT INTO `m_code_value` VALUES (1,1,'Passport',1),(2,1,'Id',1),(3,1,'Drivers License',2),(4,1,'Any Other Id Type',3),(5,4,'option.Male',1),(6,4,'option.Female',5),(7,5,'option.Yes',1),(8,5,'option.No',7),(9,6,'Primary',1),(10,6,'Secondary',9),(11,6,'University',10); +INSERT INTO `m_code_value` +VALUES (1, 1, 'Passport', 1), + (2, 1, 'Id', 1), + (3, 1, 'Drivers License', 2), + (4, 1, 'Any Other Id Type', 3), + (5, 4, 'option.Male', 1), + (6, 4, 'option.Female', 5), + (7, 5, 'option.Yes', 1), + (8, 5, 'option.No', 7), + (9, 6, 'Primary', 1), + (10, 6, 'Secondary', 9), + (11, 6, 'University', 10); /*!40000 ALTER TABLE `m_code_value` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_currency` @@ -713,15 +891,16 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_currency`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_currency` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `code` varchar(3) NOT NULL, - `decimal_places` SMALLINT NOT NULL, - `display_symbol` varchar(10) DEFAULT NULL, - `name` varchar(50) NOT NULL, - `internationalized_name_code` varchar(50) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `code` (`code`) +CREATE TABLE `m_currency` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `code` varchar(3) NOT NULL, + `decimal_places` SMALLINT NOT NULL, + `display_symbol` varchar(10) DEFAULT NULL, + `name` varchar(50) NOT NULL, + `internationalized_name_code` varchar(50) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=164 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -729,9 +908,151 @@ CREATE TABLE `m_currency` ( -- Dumping data for table `m_currency` -- -LOCK TABLES `m_currency` WRITE; +LOCK +TABLES `m_currency` WRITE; /*!40000 ALTER TABLE `m_currency` DISABLE KEYS */; -INSERT INTO `m_currency` VALUES (1,'AED',2,NULL,'UAE Dirham','currency.AED'),(2,'AFN',2,NULL,'Afghanistan Afghani','currency.AFN'),(3,'ALL',2,NULL,'Albanian Lek','currency.ALL'),(4,'AMD',2,NULL,'Armenian Dram','currency.AMD'),(5,'ANG',2,NULL,'Netherlands Antillian Guilder','currency.ANG'),(6,'AOA',2,NULL,'Angolan Kwanza','currency.AOA'),(7,'ARS',2,'$','Argentine Peso','currency.ARS'),(8,'AUD',2,'A$','Australian Dollar','currency.AUD'),(9,'AWG',2,NULL,'Aruban Guilder','currency.AWG'),(10,'AZM',2,NULL,'Azerbaijanian Manat','currency.AZM'),(11,'BAM',2,NULL,'Bosnia and Herzegovina Convertible Marks','currency.BAM'),(12,'BBD',2,NULL,'Barbados Dollar','currency.BBD'),(13,'BDT',2,NULL,'Bangladesh Taka','currency.BDT'),(14,'BGN',2,NULL,'Bulgarian Lev','currency.BGN'),(15,'BHD',3,NULL,'Bahraini Dinar','currency.BHD'),(16,'BIF',0,NULL,'Burundi Franc','currency.BIF'),(17,'BMD',2,NULL,'Bermudian Dollar','currency.BMD'),(18,'BND',2,'B$','Brunei Dollar','currency.BND'),(19,'BOB',2,'Bs.','Bolivian Boliviano','currency.BOB'),(20,'BRL',2,'R$','Brazilian Real','currency.BRL'),(21,'BSD',2,NULL,'Bahamian Dollar','currency.BSD'),(22,'BTN',2,NULL,'Bhutan Ngultrum','currency.BTN'),(23,'BWP',2,NULL,'Botswana Pula','currency.BWP'),(24,'BYR',0,NULL,'Belarussian Ruble','currency.BYR'),(25,'BZD',2,'BZ$','Belize Dollar','currency.BZD'),(26,'CAD',2,NULL,'Canadian Dollar','currency.CAD'),(27,'CDF',2,NULL,'Franc Congolais','currency.CDF'),(28,'CHF',2,NULL,'Swiss Franc','currency.CHF'),(29,'CLP',0,'$','Chilean Peso','currency.CLP'),(30,'CNY',2,NULL,'Chinese Yuan Renminbi','currency.CNY'),(31,'COP',2,'$','Colombian Peso','currency.COP'),(32,'CRC',2,'₡','Costa Rican Colon','currency.CRC'),(33,'CSD',2,NULL,'Serbian Dinar','currency.CSD'),(34,'CUP',2,'$MN','Cuban Peso','currency.CUP'),(35,'CVE',2,NULL,'Cape Verde Escudo','currency.CVE'),(36,'CYP',2,NULL,'Cyprus Pound','currency.CYP'),(37,'CZK',2,NULL,'Czech Koruna','currency.CZK'),(38,'DJF',0,NULL,'Djibouti Franc','currency.DJF'),(39,'DKK',2,NULL,'Danish Krone','currency.DKK'),(40,'DOP',2,'RD$','Dominican Peso','currency.DOP'),(41,'DZD',2,NULL,'Algerian Dinar','currency.DZD'),(42,'EEK',2,NULL,'Estonian Kroon','currency.EEK'),(43,'EGP',2,NULL,'Egyptian Pound','currency.EGP'),(44,'ERN',2,NULL,'Eritrea Nafka','currency.ERN'),(45,'ETB',2,NULL,'Ethiopian Birr','currency.ETB'),(46,'EUR',2,'€','Euro','currency.EUR'),(47,'FJD',2,NULL,'Fiji Dollar','currency.FJD'),(48,'FKP',2,NULL,'Falkland Islands Pound','currency.FKP'),(49,'GBP',2,NULL,'Pound Sterling','currency.GBP'),(50,'GEL',2,NULL,'Georgian Lari','currency.GEL'),(51,'GHC',2,'GHc','Ghana Cedi','currency.GHC'),(52,'GIP',2,NULL,'Gibraltar Pound','currency.GIP'),(53,'GMD',2,NULL,'Gambian Dalasi','currency.GMD'),(54,'GNF',0,NULL,'Guinea Franc','currency.GNF'),(55,'GTQ',2,'Q','Guatemala Quetzal','currency.GTQ'),(56,'GYD',2,NULL,'Guyana Dollar','currency.GYD'),(57,'HKD',2,NULL,'Hong Kong Dollar','currency.HKD'),(58,'HNL',2,'L','Honduras Lempira','currency.HNL'),(59,'HRK',2,NULL,'Croatian Kuna','currency.HRK'),(60,'HTG',2,'G','Haiti Gourde','currency.HTG'),(61,'HUF',2,NULL,'Hungarian Forint','currency.HUF'),(62,'IDR',2,NULL,'Indonesian Rupiah','currency.IDR'),(63,'ILS',2,NULL,'New Israeli Shekel','currency.ILS'),(64,'INR',2,'₹','Indian Rupee','currency.INR'),(65,'IQD',3,NULL,'Iraqi Dinar','currency.IQD'),(66,'IRR',2,NULL,'Iranian Rial','currency.IRR'),(67,'ISK',0,NULL,'Iceland Krona','currency.ISK'),(68,'JMD',2,NULL,'Jamaican Dollar','currency.JMD'),(69,'JOD',3,NULL,'Jordanian Dinar','currency.JOD'),(70,'JPY',0,NULL,'Japanese Yen','currency.JPY'),(71,'KES',2,'KSh','Kenyan Shilling','currency.KES'),(72,'KGS',2,NULL,'Kyrgyzstan Som','currency.KGS'),(73,'KHR',2,NULL,'Cambodia Riel','currency.KHR'),(74,'KMF',0,NULL,'Comoro Franc','currency.KMF'),(75,'KPW',2,NULL,'North Korean Won','currency.KPW'),(76,'KRW',0,NULL,'Korean Won','currency.KRW'),(77,'KWD',3,NULL,'Kuwaiti Dinar','currency.KWD'),(78,'KYD',2,NULL,'Cayman Islands Dollar','currency.KYD'),(79,'KZT',2,NULL,'Kazakhstan Tenge','currency.KZT'),(80,'LAK',2,NULL,'Lao Kip','currency.LAK'),(81,'LBP',2,'L£','Lebanese Pound','currency.LBP'),(82,'LKR',2,NULL,'Sri Lanka Rupee','currency.LKR'),(83,'LRD',2,NULL,'Liberian Dollar','currency.LRD'),(84,'LSL',2,NULL,'Lesotho Loti','currency.LSL'),(85,'LTL',2,NULL,'Lithuanian Litas','currency.LTL'),(86,'LVL',2,NULL,'Latvian Lats','currency.LVL'),(87,'LYD',3,NULL,'Libyan Dinar','currency.LYD'),(88,'MAD',2,NULL,'Moroccan Dirham','currency.MAD'),(89,'MDL',2,NULL,'Moldovan Leu','currency.MDL'),(90,'MGA',2,NULL,'Malagasy Ariary','currency.MGA'),(91,'MKD',2,NULL,'Macedonian Denar','currency.MKD'),(92,'MMK',2,'K','Myanmar Kyat','currency.MMK'),(93,'MNT',2,NULL,'Mongolian Tugrik','currency.MNT'),(94,'MOP',2,NULL,'Macau Pataca','currency.MOP'),(95,'MRO',2,NULL,'Mauritania Ouguiya','currency.MRO'),(96,'MTL',2,NULL,'Maltese Lira','currency.MTL'),(97,'MUR',2,NULL,'Mauritius Rupee','currency.MUR'),(98,'MVR',2,NULL,'Maldives Rufiyaa','currency.MVR'),(99,'MWK',2,NULL,'Malawi Kwacha','currency.MWK'),(100,'MXN',2,'$','Mexican Peso','currency.MXN'),(101,'MYR',2,NULL,'Malaysian Ringgit','currency.MYR'),(102,'MZM',2,NULL,'Mozambique Metical','currency.MZM'),(103,'NAD',2,NULL,'Namibia Dollar','currency.NAD'),(104,'NGN',2,NULL,'Nigerian Naira','currency.NGN'),(105,'NIO',2,'C$','Nicaragua Cordoba Oro','currency.NIO'),(106,'NOK',2,NULL,'Norwegian Krone','currency.NOK'),(107,'NPR',2,NULL,'Nepalese Rupee','currency.NPR'),(108,'NZD',2,NULL,'New Zealand Dollar','currency.NZD'),(109,'OMR',3,NULL,'Rial Omani','currency.OMR'),(110,'PAB',2,'B/.','Panama Balboa','currency.PAB'),(111,'PEN',2,'S/.','Peruvian Nuevo Sol','currency.PEN'),(112,'PGK',2,NULL,'Papua New Guinea Kina','currency.PGK'),(113,'PHP',2,NULL,'Philippine Peso','currency.PHP'),(114,'PKR',2,NULL,'Pakistan Rupee','currency.PKR'),(115,'PLN',2,NULL,'Polish Zloty','currency.PLN'),(116,'PYG',0,'₲','Paraguayan Guarani','currency.PYG'),(117,'QAR',2,NULL,'Qatari Rial','currency.QAR'),(118,'RON',2,NULL,'Romanian Leu','currency.RON'),(119,'RUB',2,NULL,'Russian Ruble','currency.RUB'),(120,'RWF',0,NULL,'Rwanda Franc','currency.RWF'),(121,'SAR',2,NULL,'Saudi Riyal','currency.SAR'),(122,'SBD',2,NULL,'Solomon Islands Dollar','currency.SBD'),(123,'SCR',2,NULL,'Seychelles Rupee','currency.SCR'),(124,'SDD',2,NULL,'Sudanese Dinar','currency.SDD'),(125,'SEK',2,NULL,'Swedish Krona','currency.SEK'),(126,'SGD',2,NULL,'Singapore Dollar','currency.SGD'),(127,'SHP',2,NULL,'St Helena Pound','currency.SHP'),(128,'SIT',2,NULL,'Slovenian Tolar','currency.SIT'),(129,'SKK',2,NULL,'Slovak Koruna','currency.SKK'),(130,'SLL',2,NULL,'Sierra Leone Leone','currency.SLL'),(131,'SOS',2,NULL,'Somali Shilling','currency.SOS'),(132,'SRD',2,NULL,'Surinam Dollar','currency.SRD'),(133,'STD',2,NULL,'Sao Tome and Principe Dobra','currency.STD'),(134,'SVC',2,NULL,'El Salvador Colon','currency.SVC'),(135,'SYP',2,NULL,'Syrian Pound','currency.SYP'),(136,'SZL',2,NULL,'Swaziland Lilangeni','currency.SZL'),(137,'THB',2,NULL,'Thai Baht','currency.THB'),(138,'TJS',2,NULL,'Tajik Somoni','currency.TJS'),(139,'TMM',2,NULL,'Turkmenistan Manat','currency.TMM'),(140,'TND',3,'DT','Tunisian Dinar','currency.TND'),(141,'TOP',2,NULL,'Tonga Pa\'anga','currency.TOP'),(142,'TRY',2,NULL,'Turkish Lira','currency.TRY'),(143,'TTD',2,NULL,'Trinidad and Tobago Dollar','currency.TTD'),(144,'TWD',2,NULL,'New Taiwan Dollar','currency.TWD'),(145,'TZS',2,NULL,'Tanzanian Shilling','currency.TZS'),(146,'UAH',2,NULL,'Ukraine Hryvnia','currency.UAH'),(147,'UGX',2,'USh','Uganda Shilling','currency.UGX'),(148,'USD',2,'$','US Dollar','currency.USD'),(149,'UYU',2,'$U','Peso Uruguayo','currency.UYU'),(150,'UZS',2,NULL,'Uzbekistan Sum','currency.UZS'),(151,'VEB',2,'Bs.F.','Venezuelan Bolivar','currency.VEB'),(152,'VND',2,NULL,'Vietnamese Dong','currency.VND'),(153,'VUV',0,NULL,'Vanuatu Vatu','currency.VUV'),(154,'WST',2,NULL,'Samoa Tala','currency.WST'),(155,'XAF',0,NULL,'CFA Franc BEAC','currency.XAF'),(156,'XCD',2,NULL,'East Caribbean Dollar','currency.XCD'),(157,'XDR',5,NULL,'SDR (Special Drawing Rights)','currency.XDR'),(158,'XOF',0,'CFA','CFA Franc BCEAO','currency.XOF'),(159,'XPF',0,NULL,'CFP Franc','currency.XPF'),(160,'YER',2,NULL,'Yemeni Rial','currency.YER'),(161,'ZAR',2,'R','South African Rand','currency.ZAR'),(162,'ZMK',2,NULL,'Zambian Kwacha','currency.ZMK'),(163,'ZWD',2,NULL,'Zimbabwe Dollar','currency.ZWD'); +INSERT INTO `m_currency` +VALUES (1, 'AED', 2, NULL, 'UAE Dirham', 'currency.AED'), + (2, 'AFN', 2, NULL, 'Afghanistan Afghani', 'currency.AFN'), + (3, 'ALL', 2, NULL, 'Albanian Lek', 'currency.ALL'), + (4, 'AMD', 2, NULL, 'Armenian Dram', 'currency.AMD'), + (5, 'ANG', 2, NULL, 'Netherlands Antillian Guilder', 'currency.ANG'), + (6, 'AOA', 2, NULL, 'Angolan Kwanza', 'currency.AOA'), + (7, 'ARS', 2, '$', 'Argentine Peso', 'currency.ARS'), + (8, 'AUD', 2, 'A$', 'Australian Dollar', 'currency.AUD'), + (9, 'AWG', 2, NULL, 'Aruban Guilder', 'currency.AWG'), + (10, 'AZM', 2, NULL, 'Azerbaijanian Manat', 'currency.AZM'), + (11, 'BAM', 2, NULL, 'Bosnia and Herzegovina Convertible Marks', 'currency.BAM'), + (12, 'BBD', 2, NULL, 'Barbados Dollar', 'currency.BBD'), + (13, 'BDT', 2, NULL, 'Bangladesh Taka', 'currency.BDT'), + (14, 'BGN', 2, NULL, 'Bulgarian Lev', 'currency.BGN'), + (15, 'BHD', 3, NULL, 'Bahraini Dinar', 'currency.BHD'), + (16, 'BIF', 0, NULL, 'Burundi Franc', 'currency.BIF'), + (17, 'BMD', 2, NULL, 'Bermudian Dollar', 'currency.BMD'), + (18, 'BND', 2, 'B$', 'Brunei Dollar', 'currency.BND'), + (19, 'BOB', 2, 'Bs.', 'Bolivian Boliviano', 'currency.BOB'), + (20, 'BRL', 2, 'R$', 'Brazilian Real', 'currency.BRL'), + (21, 'BSD', 2, NULL, 'Bahamian Dollar', 'currency.BSD'), + (22, 'BTN', 2, NULL, 'Bhutan Ngultrum', 'currency.BTN'), + (23, 'BWP', 2, NULL, 'Botswana Pula', 'currency.BWP'), + (24, 'BYR', 0, NULL, 'Belarussian Ruble', 'currency.BYR'), + (25, 'BZD', 2, 'BZ$', 'Belize Dollar', 'currency.BZD'), + (26, 'CAD', 2, NULL, 'Canadian Dollar', 'currency.CAD'), + (27, 'CDF', 2, NULL, 'Franc Congolais', 'currency.CDF'), + (28, 'CHF', 2, NULL, 'Swiss Franc', 'currency.CHF'), + (29, 'CLP', 0, '$', 'Chilean Peso', 'currency.CLP'), + (30, 'CNY', 2, NULL, 'Chinese Yuan Renminbi', 'currency.CNY'), + (31, 'COP', 2, '$', 'Colombian Peso', 'currency.COP'), + (32, 'CRC', 2, '₡', 'Costa Rican Colon', 'currency.CRC'), + (33, 'CSD', 2, NULL, 'Serbian Dinar', 'currency.CSD'), + (34, 'CUP', 2, '$MN', 'Cuban Peso', 'currency.CUP'), + (35, 'CVE', 2, NULL, 'Cape Verde Escudo', 'currency.CVE'), + (36, 'CYP', 2, NULL, 'Cyprus Pound', 'currency.CYP'), + (37, 'CZK', 2, NULL, 'Czech Koruna', 'currency.CZK'), + (38, 'DJF', 0, NULL, 'Djibouti Franc', 'currency.DJF'), + (39, 'DKK', 2, NULL, 'Danish Krone', 'currency.DKK'), + (40, 'DOP', 2, 'RD$', 'Dominican Peso', 'currency.DOP'), + (41, 'DZD', 2, NULL, 'Algerian Dinar', 'currency.DZD'), + (42, 'EEK', 2, NULL, 'Estonian Kroon', 'currency.EEK'), + (43, 'EGP', 2, NULL, 'Egyptian Pound', 'currency.EGP'), + (44, 'ERN', 2, NULL, 'Eritrea Nafka', 'currency.ERN'), + (45, 'ETB', 2, NULL, 'Ethiopian Birr', 'currency.ETB'), + (46, 'EUR', 2, '€', 'Euro', 'currency.EUR'), + (47, 'FJD', 2, NULL, 'Fiji Dollar', 'currency.FJD'), + (48, 'FKP', 2, NULL, 'Falkland Islands Pound', 'currency.FKP'), + (49, 'GBP', 2, NULL, 'Pound Sterling', 'currency.GBP'), + (50, 'GEL', 2, NULL, 'Georgian Lari', 'currency.GEL'), + (51, 'GHC', 2, 'GHc', 'Ghana Cedi', 'currency.GHC'), + (52, 'GIP', 2, NULL, 'Gibraltar Pound', 'currency.GIP'), + (53, 'GMD', 2, NULL, 'Gambian Dalasi', 'currency.GMD'), + (54, 'GNF', 0, NULL, 'Guinea Franc', 'currency.GNF'), + (55, 'GTQ', 2, 'Q', 'Guatemala Quetzal', 'currency.GTQ'), + (56, 'GYD', 2, NULL, 'Guyana Dollar', 'currency.GYD'), + (57, 'HKD', 2, NULL, 'Hong Kong Dollar', 'currency.HKD'), + (58, 'HNL', 2, 'L', 'Honduras Lempira', 'currency.HNL'), + (59, 'HRK', 2, NULL, 'Croatian Kuna', 'currency.HRK'), + (60, 'HTG', 2, 'G', 'Haiti Gourde', 'currency.HTG'), + (61, 'HUF', 2, NULL, 'Hungarian Forint', 'currency.HUF'), + (62, 'IDR', 2, NULL, 'Indonesian Rupiah', 'currency.IDR'), + (63, 'ILS', 2, NULL, 'New Israeli Shekel', 'currency.ILS'), + (64, 'INR', 2, '₹', 'Indian Rupee', 'currency.INR'), + (65, 'IQD', 3, NULL, 'Iraqi Dinar', 'currency.IQD'), + (66, 'IRR', 2, NULL, 'Iranian Rial', 'currency.IRR'), + (67, 'ISK', 0, NULL, 'Iceland Krona', 'currency.ISK'), + (68, 'JMD', 2, NULL, 'Jamaican Dollar', 'currency.JMD'), + (69, 'JOD', 3, NULL, 'Jordanian Dinar', 'currency.JOD'), + (70, 'JPY', 0, NULL, 'Japanese Yen', 'currency.JPY'), + (71, 'KES', 2, 'KSh', 'Kenyan Shilling', 'currency.KES'), + (72, 'KGS', 2, NULL, 'Kyrgyzstan Som', 'currency.KGS'), + (73, 'KHR', 2, NULL, 'Cambodia Riel', 'currency.KHR'), + (74, 'KMF', 0, NULL, 'Comoro Franc', 'currency.KMF'), + (75, 'KPW', 2, NULL, 'North Korean Won', 'currency.KPW'), + (76, 'KRW', 0, NULL, 'Korean Won', 'currency.KRW'), + (77, 'KWD', 3, NULL, 'Kuwaiti Dinar', 'currency.KWD'), + (78, 'KYD', 2, NULL, 'Cayman Islands Dollar', 'currency.KYD'), + (79, 'KZT', 2, NULL, 'Kazakhstan Tenge', 'currency.KZT'), + (80, 'LAK', 2, NULL, 'Lao Kip', 'currency.LAK'), + (81, 'LBP', 2, 'L£', 'Lebanese Pound', 'currency.LBP'), + (82, 'LKR', 2, NULL, 'Sri Lanka Rupee', 'currency.LKR'), + (83, 'LRD', 2, NULL, 'Liberian Dollar', 'currency.LRD'), + (84, 'LSL', 2, NULL, 'Lesotho Loti', 'currency.LSL'), + (85, 'LTL', 2, NULL, 'Lithuanian Litas', 'currency.LTL'), + (86, 'LVL', 2, NULL, 'Latvian Lats', 'currency.LVL'), + (87, 'LYD', 3, NULL, 'Libyan Dinar', 'currency.LYD'), + (88, 'MAD', 2, NULL, 'Moroccan Dirham', 'currency.MAD'), + (89, 'MDL', 2, NULL, 'Moldovan Leu', 'currency.MDL'), + (90, 'MGA', 2, NULL, 'Malagasy Ariary', 'currency.MGA'), + (91, 'MKD', 2, NULL, 'Macedonian Denar', 'currency.MKD'), + (92, 'MMK', 2, 'K', 'Myanmar Kyat', 'currency.MMK'), + (93, 'MNT', 2, NULL, 'Mongolian Tugrik', 'currency.MNT'), + (94, 'MOP', 2, NULL, 'Macau Pataca', 'currency.MOP'), + (95, 'MRO', 2, NULL, 'Mauritania Ouguiya', 'currency.MRO'), + (96, 'MTL', 2, NULL, 'Maltese Lira', 'currency.MTL'), + (97, 'MUR', 2, NULL, 'Mauritius Rupee', 'currency.MUR'), + (98, 'MVR', 2, NULL, 'Maldives Rufiyaa', 'currency.MVR'), + (99, 'MWK', 2, NULL, 'Malawi Kwacha', 'currency.MWK'), + (100, 'MXN', 2, '$', 'Mexican Peso', 'currency.MXN'), + (101, 'MYR', 2, NULL, 'Malaysian Ringgit', 'currency.MYR'), + (102, 'MZM', 2, NULL, 'Mozambique Metical', 'currency.MZM'), + (103, 'NAD', 2, NULL, 'Namibia Dollar', 'currency.NAD'), + (104, 'NGN', 2, NULL, 'Nigerian Naira', 'currency.NGN'), + (105, 'NIO', 2, 'C$', 'Nicaragua Cordoba Oro', 'currency.NIO'), + (106, 'NOK', 2, NULL, 'Norwegian Krone', 'currency.NOK'), + (107, 'NPR', 2, NULL, 'Nepalese Rupee', 'currency.NPR'), + (108, 'NZD', 2, NULL, 'New Zealand Dollar', 'currency.NZD'), + (109, 'OMR', 3, NULL, 'Rial Omani', 'currency.OMR'), + (110, 'PAB', 2, 'B/.', 'Panama Balboa', 'currency.PAB'), + (111, 'PEN', 2, 'S/.', 'Peruvian Nuevo Sol', 'currency.PEN'), + (112, 'PGK', 2, NULL, 'Papua New Guinea Kina', 'currency.PGK'), + (113, 'PHP', 2, NULL, 'Philippine Peso', 'currency.PHP'), + (114, 'PKR', 2, NULL, 'Pakistan Rupee', 'currency.PKR'), + (115, 'PLN', 2, NULL, 'Polish Zloty', 'currency.PLN'), + (116, 'PYG', 0, '₲', 'Paraguayan Guarani', 'currency.PYG'), + (117, 'QAR', 2, NULL, 'Qatari Rial', 'currency.QAR'), + (118, 'RON', 2, NULL, 'Romanian Leu', 'currency.RON'), + (119, 'RUB', 2, NULL, 'Russian Ruble', 'currency.RUB'), + (120, 'RWF', 0, NULL, 'Rwanda Franc', 'currency.RWF'), + (121, 'SAR', 2, NULL, 'Saudi Riyal', 'currency.SAR'), + (122, 'SBD', 2, NULL, 'Solomon Islands Dollar', 'currency.SBD'), + (123, 'SCR', 2, NULL, 'Seychelles Rupee', 'currency.SCR'), + (124, 'SDD', 2, NULL, 'Sudanese Dinar', 'currency.SDD'), + (125, 'SEK', 2, NULL, 'Swedish Krona', 'currency.SEK'), + (126, 'SGD', 2, NULL, 'Singapore Dollar', 'currency.SGD'), + (127, 'SHP', 2, NULL, 'St Helena Pound', 'currency.SHP'), + (128, 'SIT', 2, NULL, 'Slovenian Tolar', 'currency.SIT'), + (129, 'SKK', 2, NULL, 'Slovak Koruna', 'currency.SKK'), + (130, 'SLL', 2, NULL, 'Sierra Leone Leone', 'currency.SLL'), + (131, 'SOS', 2, NULL, 'Somali Shilling', 'currency.SOS'), + (132, 'SRD', 2, NULL, 'Surinam Dollar', 'currency.SRD'), + (133, 'STD', 2, NULL, 'Sao Tome and Principe Dobra', 'currency.STD'), + (134, 'SVC', 2, NULL, 'El Salvador Colon', 'currency.SVC'), + (135, 'SYP', 2, NULL, 'Syrian Pound', 'currency.SYP'), + (136, 'SZL', 2, NULL, 'Swaziland Lilangeni', 'currency.SZL'), + (137, 'THB', 2, NULL, 'Thai Baht', 'currency.THB'), + (138, 'TJS', 2, NULL, 'Tajik Somoni', 'currency.TJS'), + (139, 'TMM', 2, NULL, 'Turkmenistan Manat', 'currency.TMM'), + (140, 'TND', 3, 'DT', 'Tunisian Dinar', 'currency.TND'), + (141, 'TOP', 2, NULL, 'Tonga Pa\'anga','currency.TOP'),(142,'TRY',2,NULL,'Turkish Lira','currency.TRY'),(143,'TTD',2,NULL,'Trinidad and Tobago Dollar','currency.TTD'),(144,'TWD',2,NULL,'New Taiwan Dollar','currency.TWD'),(145,'TZS',2,NULL,'Tanzanian Shilling','currency.TZS'),(146,'UAH',2,NULL,'Ukraine Hryvnia','currency.UAH'),(147,'UGX',2,'USh','Uganda Shilling','currency.UGX'),(148,'USD',2,'$','US Dollar','currency.USD'),(149,'UYU',2,'$U','Peso Uruguayo','currency.UYU'),(150,'UZS',2,NULL,'Uzbekistan Sum','currency.UZS'),(151,'VEB',2,'Bs.F.','Venezuelan Bolivar','currency.VEB'),(152,'VND',2,NULL,'Vietnamese Dong','currency.VND'),(153,'VUV',0,NULL,'Vanuatu Vatu','currency.VUV'),(154,'WST',2,NULL,'Samoa Tala','currency.WST'),(155,'XAF',0,NULL,'CFA Franc BEAC','currency.XAF'),(156,'XCD',2,NULL,'East Caribbean Dollar','currency.XCD'),(157,'XDR',5,NULL,'SDR (Special Drawing Rights)','currency.XDR'),(158,'XOF',0,'CFA','CFA Franc BCEAO','currency.XOF'),(159,'XPF',0,NULL,'CFP Franc','currency.XPF'),(160,'YER',2,NULL,'Yemeni Rial','currency.YER'),(161,'ZAR',2,'R','South African Rand','currency.ZAR'),(162,'ZMK',2,NULL,'Zambian Kwacha','currency.ZMK'),(163,'ZWD',2,NULL,'Zimbabwe Dollar','currency.ZWD'); /*!40000 ALTER TABLE `m_currency` ENABLE KEYS */; UNLOCK TABLES; @@ -1822,9 +2143,30 @@ CREATE TABLE `stretchy_parameter` ( LOCK TABLES `stretchy_parameter` WRITE; /*!40000 ALTER TABLE `stretchy_parameter` DISABLE KEYS */; -INSERT INTO `stretchy_parameter` VALUES (1,'startDateSelect','startDate','startDate','date','date','today',NULL,NULL,NULL,NULL,NULL),(2,'endDateSelect','endDate','endDate','date','date','today',NULL,NULL,NULL,NULL,NULL),(3,'obligDateTypeSelect','obligDateType','obligDateType','select','number','0',NULL,NULL,NULL,'select * from\r\n(select 1 as id, \"Closed\" as `name` union all\r\nselect 2, \"Disbursal\" ) x\r\norder by x.`id`',NULL),(5,'OfficeIdSelectOne','officeId','Office','select','number','0',NULL,'Y',NULL,'select id, \r\nconcat(substring(\"........................................\", 1, \r\n \n\n((LENGTH(`hierarchy`) - LENGTH(REPLACE(`hierarchy`, \'.\', \'\')) - 1) * 4)), \r\n `name`) as tc\r\nfrom m_office\r\nwhere hierarchy like concat\n\n(\'${currentUserHierarchy}\', \'%\')\r\norder by hierarchy',NULL),(6,'loanOfficerIdSelectAll','loanOfficerId','Loan Officer','select','number','0',NULL,NULL,'Y','(select lo.id, lo.display_name as `Name` \r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\njoin m_staff lo on lo.office_id = ounder.id\r\nwhere lo.is_loan_officer = true\r\nand o.id = ${officeId})\r\nunion all\r\n(select -10, \'-\')\r\norder by 2',5),(10,'currencyIdSelectAll','currencyId','Currency','select','number','0',NULL,NULL,'Y','select `code`, `name`\r\nfrom m_organisation_currency\r\norder by `code`',NULL),(20,'fundIdSelectAll','fundId','Fund','select','number','0',NULL,NULL,'Y','(select id, `name`\r\nfrom m_fund)\r\nunion all\r\n(select -10, \'-\')\r\norder by 2',NULL),(25,'loanProductIdSelectAll','loanProductId','Product','select','number','0',NULL,NULL,'Y','select p.id, p.`name`\r\nfrom m_product_loan p\r\nwhere p.currency_code = \'$\{currencyId}\'\r\norder by 2',10),(26,'loanPurposeIdSelectAll','loanPurposeId','Loan Purpose','select','number','0',NULL,NULL,'Y','select -10 as id, \'-\' as code_value\r\nunion all\r\nselect * from (select v.id, v.code_value\r\nfrom m_code c\r\njoin m_code_value v on v.code_id = c.id\r\nwhere c.code_name = \"loanPurpose\"\r\norder by v.order_position) x',NULL),(100,'parTypeSelect','parType','parType','select','number','0',NULL,NULL,NULL,'select * from\r\n(select 1 as id, \"Principal Only\" as `name` union all\r\nselect 2, \"Principal + Interest\" union all\r\nselect 3, \"Principal + Interest + Fees\" union all\r\nselect 4, \"Principal + Interest + Fees + Penalties\") x\r\norder by x.`id`',NULL),(1001,'FullReportList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select r.report_id, r.report_name, r.report_type, r.report_subtype, r.report_category,\r\n \n\nrp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on rp.report_id = r.report_id\r\n \n\nleft join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \n\n\r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on rp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where \n\nur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by \n\nr.report_category, r.report_name, rp.parameter_id',NULL),(1002,'FullParameterList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select sp.parameter_name, sp.parameter_variable, sp.parameter_label, sp.parameter_displayType, \r\nsp.parameter_FormatType, sp.parameter_default, sp.selectOne, sp.selectAll, spp.parameter_name as parentParameterName\r\nfrom stretchy_parameter sp\r\nleft join stretchy_parameter spp on spp.parameter_id = sp.parent_parameter_id\r\nwhere sp.special is null\r\nand exists \r\n (select \'f\' \r\n from stretchy_report sr\r\n join stretchy_report_parameter srp on srp.report_id = sr.report_id\r\n where sr.report_name in(${reportListing})\r\n and srp.parameter_id = sp.parameter_id\r\n )\r\norder by sp.parameter_id',NULL),(1003,'reportCategoryList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select r.report_id, r.report_name, r.report_type, r.report_subtype, \n\nr.report_category,\r\n rp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on \n\nrp.report_id = r.report_id\r\n left join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.report_category = \'${reportCategory}\'\r\n and \n\nr.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on \n\nrp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where ur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \n\n\'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by r.report_category, r.report_name, rp.parameter_id',NULL); +INSERT INTO `stretchy_parameter` VALUES (1,'startDateSelect','startDate','startDate','date','date','today',NULL,NULL,NULL,NULL,NULL),(2,'endDateSelect','endDate','endDate','date','date','today',NULL,NULL,NULL,NULL,NULL),(3,'obligDateTypeSelect','obligDateType','obligDateType','select','number','0',NULL,NULL,NULL,'select * from\r\n(select 1 as id, \"Closed\" as `name` union all\r\nselect 2, \"Disbursal\" ) x\r\norder by x.`id`',NULL),(5,'OfficeIdSelectOne','officeId','Office','select','number','0',NULL,'Y',NULL,'select id, \r\nconcat(substring(\"........................................\", 1, \r\n \n\n((LENGTH(`hierarchy`) - LENGTH(REPLACE(`hierarchy`, \'.\', \'\')) - 1) * 4)), \r\n `name`) as tc\r\nfrom m_office\r\nwhere hierarchy like concat\n\n(\'${currentUserHierarchy}\', \'%\')\r\norder by hierarchy',NULL), + (6, 'loanOfficerIdSelectAll', 'loanOfficerId', 'Loan Officer', 'select', 'number', '0', NULL, NULL, 'Y', + '(select lo.id, lo.display_name as `Name` \r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\njoin m_staff lo on lo.office_id = ounder.id\r\nwhere lo.is_loan_officer = true\r\nand o.id = ${officeId})\r\nunion all\r\n(select -10, \'-\')\r\norder by 2', + 5), (10, 'currencyIdSelectAll', 'currencyId', 'Currency', 'select', 'number', '0', NULL, NULL, 'Y', + 'select `code`, `name`\r\nfrom m_organisation_currency\r\norder by `code`', NULL), + (20, 'fundIdSelectAll', 'fundId', 'Fund', 'select', 'number', '0', NULL, NULL, 'Y', + '(select id, `name`\r\nfrom m_fund)\r\nunion all\r\n(select -10, \' -\')\r\norder by 2', NULL), + (25, 'loanProductIdSelectAll', 'loanProductId', 'Product', 'select', 'number', '0', NULL, NULL, 'Y', + 'select p.id, p.`name`\r\nfrom m_product_loan p\r\nwhere p.currency_code = \'$\{currencyId}\'\r\norder by 2', + 10), (26, 'loanPurposeIdSelectAll', 'loanPurposeId', 'Loan Purpose', 'select', 'number', '0', NULL, NULL, 'Y', + 'select -10 as id, \' -\' as code_value\r\nunion all\r\nselect * from (select v.id, v.code_value\r\nfrom m_code c\r\njoin m_code_value v on v.code_id = c.id\r\nwhere c.code_name = \"loanPurpose\"\r\norder by v.order_position) x', + NULL), (100, 'parTypeSelect', 'parType', 'parType', 'select', 'number', '0', NULL, NULL, NULL, + 'select * from\r\n(select 1 as id, \"Principal Only\" as `name` union all\r\nselect 2, \"Principal + Interest\" union all\r\nselect 3, \"Principal + Interest + Fees\" union all\r\nselect 4, \"Principal + Interest + Fees + Penalties\") x\r\norder by x.`id`', + NULL), (1001, 'FullReportList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, + 'select r.report_id, r.report_name, r.report_type, r.report_subtype, r.report_category,\r\n \n\nrp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on rp.report_id = r.report_id\r\n \n\nleft join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \n\n\r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on rp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where \n\nur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by \n\nr.report_category, r.report_name, rp.parameter_id', + NULL), (1002, 'FullParameterList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, + 'select sp.parameter_name, sp.parameter_variable, sp.parameter_label, sp.parameter_displayType, \r\nsp.parameter_FormatType, sp.parameter_default, sp.selectOne, sp.selectAll, spp.parameter_name as parentParameterName\r\nfrom stretchy_parameter sp\r\nleft join stretchy_parameter spp on spp.parameter_id = sp.parent_parameter_id\r\nwhere sp.special is null\r\nand exists \r\n (select \'f\' \r\n from stretchy_report sr\r\n join stretchy_report_parameter srp on srp.report_id = sr.report_id\r\n where sr.report_name in(${reportListing})\r\n and srp.parameter_id = sp.parameter_id\r\n )\r\norder by sp.parameter_id', + NULL), + (1003, 'reportCategoryList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, + 'select r.report_id, r.report_name, r.report_type, r.report_subtype, \n\nr.report_category,\r\n rp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on \n\nrp.report_id = r.report_id\r\n left join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.report_category = \'${reportCategory}\'\r\n and \n\nr.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on \n\nrp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where ur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \n\n\'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by r.report_category, r.report_name, rp.parameter_id', + NULL); /*!40000 ALTER TABLE `stretchy_parameter` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `stretchy_report` @@ -1833,18 +2175,19 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `stretchy_report`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `stretchy_report` ( - `report_id` INT NOT NULL AUTO_INCREMENT, - `report_name` varchar(100) NOT NULL, - `report_type` varchar(20) NOT NULL, - `report_subtype` varchar(20) DEFAULT NULL, - `report_category` varchar(45) DEFAULT NULL, - `report_sql` text, - `description` text, - `core_report` tinyint DEFAULT '0', - `use_report` tinyint DEFAULT '0', - PRIMARY KEY (`report_id`), - UNIQUE KEY `report_name_UNIQUE` (`report_name`) +CREATE TABLE `stretchy_report` +( + `report_id` INT NOT NULL AUTO_INCREMENT, + `report_name` varchar(100) NOT NULL, + `report_type` varchar(20) NOT NULL, + `report_subtype` varchar(20) DEFAULT NULL, + `report_category` varchar(45) DEFAULT NULL, + `report_sql` text, + `description` text, + `core_report` tinyint DEFAULT '0', + `use_report` tinyint DEFAULT '0', + PRIMARY KEY (`report_id`), + UNIQUE KEY `report_name_UNIQUE` (`report_name`) ) ENGINE=InnoDB AUTO_INCREMENT=95 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1852,11 +2195,87 @@ CREATE TABLE `stretchy_report` ( -- Dumping data for table `stretchy_report` -- -LOCK TABLES `stretchy_report` WRITE; +LOCK +TABLES `stretchy_report` WRITE; /*!40000 ALTER TABLE `stretchy_report` DISABLE KEYS */; -INSERT INTO `stretchy_report` VALUES (1,'Client Listing','Table',NULL,'Client','select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n c.account_no as \"Client Account No.\", \r\nc.display_name as \"Name\", \n\nc.joined_date as \"Joined\", c.external_id as \"External Id\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand \n\nounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\nwhere o.id = ${officeId}\r\nand c.is_deleted=0\r\n\n\norder by ounder.hierarchy, c.account_no','Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \'one to one\' additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t \n\nhave that client browser/memory impact).',1,1),(2,'Client Loans Listing','Table',NULL,'Client','select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client \n\nAccount No.\", \r\nc.display_name as \"Name\", \r\nlo.display_name as \"Loan Officer\", l.account_no as \"Loan Account No.\", l.external_id as \"External Id\", \r\n\n\np.name as Loan, st.enum_message_property as \"Status\", \r\nf.`name` as Fund, purp.code_value as \"Loan Purpose\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount,\n\n\r\nl.arrearstolerance_amount as \"Arrears Tolerance Amount\",\r\nl.number_of_repayments as \"Expected No. Repayments\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\nl.nominal_interest_rate_per_period as \"Nominal Interest Rate Per Period\",\r\n\r\nipf.enum_message_property as \"Interest Rate Frequency\n\n\",\r\nim.enum_message_property as \"Interest Method\",\r\nicp.enum_message_property as \"Interest Calculated in Period\",\r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.repay_every as \"Repayment Frequency\",\r\nrf.enum_message_property as \"Repayment Frequency Period\",\n\n\r\nam.enum_message_property as \"Amortization\",\r\n\r\nl.total_charges_due_at_disbursement_derived as \"Total Charges Due At Disbursement\",\r\n\r\ndate( \n\nl.submittedon_date) as Submitted, date(l.approvedon_date) Approved, l.expected_disbursedon_date As \"Expected Disbursal\",\r\ndate(l.expected_firstrepaymenton_date) as \n\n\"Expected First Repayment\", date(l.interest_calculated_from_date) as \"Interest Calculated From\" ,\r\ndate(l.disbursedon_date) as Disbursed, date\n\n(l.expected_maturedon_date) \"Expected Maturity\",\r\ndate(l.maturedon_date) as \"Matured On\", date(l.closedon_date) as Closed,\r\ndate(l.rejectedon_date) as \n\nRejected, date(l.rescheduledon_date) as Rescheduled, \r\ndate(l.withdrawnon_date) as Withdrawn, date(l.writtenoffon_date) \"Written Off\"\r\nfrom m_office o \r\njoin \n\nm_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on \n\nc.office_id = ounder.id\r\nleft join m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_product_loan p on p.id = \n\nl.product_id\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join r_enum_value st on st.enum_name = \"loan_status_id\" and st.enum_id = l.loan_status_id\r\nleft join \n\nr_enum_value ipf on ipf.enum_name = \"interest_period_frequency_enum\" and ipf.enum_id = l.interest_period_frequency_enum\r\nleft join r_enum_value im on im.enum_name \n\n= \"interest_method_enum\" and im.enum_id = l.interest_method_enum\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = \n\nl.term_period_frequency_enum\r\nleft join r_enum_value icp on icp.enum_name = \"interest_calculated_in_period_enum\" and icp.enum_id = \n\nl.interest_calculated_in_period_enum\r\nleft join r_enum_value rf on rf.enum_name = \"repayment_period_frequency_enum\" and rf.enum_id = \n\nl.repayment_period_frequency_enum\r\nleft join r_enum_value am on am.enum_name = \"amortization_method_enum\" and am.enum_id = l.amortization_method_enum\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\n\r\nleft \n\njoin m_currency cur on cur.code = l.currency_code\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand \n\n(l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \n\n\"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\norder by ounder.hierarchy, 2 , l.id','Individual Client Report\r\n\r\nPretty \n\nwide report that lists the basic details of client loans. \r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t have that client browser/memory impact).',1,1),(5,'Loans Awaiting Disbursal','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No\", c.display_name as \"Name\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount as Principal, \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\",\r\ndate(l.approvedon_date) \"Approved\",\r\ndatediff(l.expected_disbursedon_date, curdate()) as \"Days to Disbursal\",\r\ndate(l.expected_disbursedon_date) \"Expected Disbursal\",\r\npurp.code_value as \"Loan Purpose\",\r\n lo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\norder by ounder.hierarchy, datediff(l.expected_disbursedon_date, curdate()), c.account_no','Individual Client Report',1,1),(6,'Loans Awaiting Disbursal Summary','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, f.`name` as Fund,\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`','Individual Client Report',1,1),(7,'Loans Awaiting Disbursal Summary by Month','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nyear(l.expected_disbursedon_date) as \"Year\", \r\nmonthname(l.expected_disbursedon_date) as \"Month\",\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)','Individual Client Report',1,1),(8,'Loans Pending Approval','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client Name\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, pl.`name` as \"Product\", \r\nl.account_no as \"Loan Account No.\", \r\nl.principal_amount as \"Loan Amount\", \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\ndatediff(curdate(), l.submittedon_date) \"Days Pending Approval\", \r\npurp.code_value as \"Loan Purpose\",\r\nlo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 100 /*Submitted and awaiting approval */\r\norder by ounder.hierarchy, l.submittedon_date, l.account_no','Individual Client Report',1,1),(11,'Active Loans - Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. loans_in_arrears_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(if(laa.loan_id is not null, l.id, null) )) as loans_in_arrears_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(laa.principal_overdue_derived) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(laa.interest_overdue_derived) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(laa.fee_charges_overdue_derived) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(laa.penalty_charges_overdue_derived) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency',NULL,1,1),(12,'Active Loans - Details','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\npenalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(13,'Obligation Met Loans Details','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client\",\r\nl.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.total_repayment_derived as \"Total Repaid\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", \r\ndate(l.closedon_date) as \"Closed\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(14,'Obligation Met Loans Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\ncount(distinct(c.id)) as \"No. of Clients\",\r\ncount(distinct(l.id)) as \"No. of Loans\",\r\nsum(l.principal_amount) as \"Total Loan Amount\", \r\nsum(l.principal_repaid_derived) as \"Total Principal Repaid\",\r\nsum(l.interest_repaid_derived) as \"Total Interest Repaid\",\r\nsum(l.fee_charges_repaid_derived) as \"Total Fees Repaid\",\r\nsum(l.penalty_charges_repaid_derived) as \"Total Penalties Repaid\",\r\nsum(l.interest_waived_derived) as \"Total Interest Waived\",\r\nsum(l.fee_charges_waived_derived) as \"Total Fees Waived\",\r\nsum(l.penalty_charges_waived_derived) as \"Total Penalties Waived\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by ounder.hierarchy, l.currency_code\r\norder by ounder.hierarchy, l.currency_code','Individual Client \n\nReport',1,1),(15,'Portfolio at Risk','Table',NULL,'Loan','select x.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from \r\n(select ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.currency_code\r\norder by l.currency_code) x','Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)',1,1),(16,'Portfolio at Risk by Branch','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\",\r\nx.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as \"branch\", ifnull(cur.display_symbol, l.currency_code) as Currency, \r\n\r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency','Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)',1,1),(20,'Funds Disbursed Between Dates Summary','Table',NULL,'Fund','select ifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nround(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office ounder \r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\ngroup by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)\r\norder by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)',NULL,1,1),(21,'Funds Disbursed Between Dates Summary by Office','Table',NULL,'Fund','select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n \n\nifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office o\r\n\n\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c \n\non c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\n\n\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand o.id = ${officeId}\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand \n\n(l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\ngroup by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, \n\nl.currency_code)\r\norder by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)',NULL,1,1),(48,'Balance Sheet','Pentaho',NULL,'Accounting',NULL,'Balance Sheet',1,1),(49,'Income Statement','Pentaho',NULL,'Accounting',NULL,'Profit and Loss Statement',1,1),(50,'Trial Balance','Pentaho',NULL,'Accounting',NULL,'Trial Balance Report',1,1),(51,'Written-Off Loans','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Written-Off Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Written-Off Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Written-Off Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Written-Off Penalties\',\r\nn.note AS \'Reason For Write-Off\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 6 /*write-off */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=601\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\") \r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no','Individual Lending Report. Written Off Loans',1,1),(52,'Aging Detail','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nmc.account_no as \"Client Account No.\",\r\n mc.display_name AS \"Client Name\",\r\n ml.account_no AS \"Account Number\",\r\n ml.principal_amount AS \"Loan Amount\",\r\n ml.principal_disbursed_derived AS \"Original Principal\",\r\n ml.interest_charged_derived AS \"Original Interest\",\r\n ml.principal_repaid_derived AS \"Principal Paid\",\r\n ml.interest_repaid_derived AS \"Interest Paid\",\r\n laa.principal_overdue_derived AS \"Principal Overdue\",\r\n laa.interest_overdue_derived AS \"Interest Overdue\",\r\nDATEDIFF(CURDATE(), laa.overdue_since_date_derived) as \"Days in Arrears\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<7, \'<1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<8, \' 1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<22, \' 3\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<29, \' 4\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<36, \' 5\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<43, \' 6\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<50, \' 7\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<57, \' 8\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<64, \' 9\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<85, \'12\', \'12+\')))))))))))) )AS \"Weeks In Arrears Band\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<361, \'180 - 360\', \r\n \'> 360\'))))) AS \"Days in Arrears Band\"\r\n\r\n FROM m_office mo \r\n JOIN m_office ounder ON ounder.hierarchy like concat(mo.hierarchy, \'%\')\r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n INNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id\r\n INNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\n left join m_currency cur on cur.code = ml.currency_code\r\n WHERE ml.loan_status_id=300\r\n AND mo.id=${officeId}\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no','Loan arrears aging (Weeks)',1,1),(53,'Aging Summary (Arrears in Weeks)','Table',NULL,'Loan','SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Weeks In Arrears (Up To)\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'1\',2 UNION\r\n SELECT \'2\',3 UNION\r\n SELECT \'3\',4 UNION\r\n SELECT \'4\',5 UNION\r\n SELECT \'5\',6 UNION\r\n SELECT \'6\',7 UNION\r\n SELECT \'7\',8 UNION\r\n SELECT \'8\',9 UNION\r\n SELECT \'9\',10 UNION\r\n SELECT \'10\',11 UNION\r\n SELECT \'11\',12 UNION\r\n SELECT \'12\',13 UNION\r\n SELECT \'12+\',14) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<8, \'1\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<22, \'3\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<29, \'4\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<36, \'5\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<43, \'6\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<50, \'7\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<57, \'8\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<64, \'9\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<85, \'12\',\r\n \'12+\'))))))))))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid','Loan amount in arrears by branch',1,1),(54,'Rescheduled Loans','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Rescheduled Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Rescheduled Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Rescheduled Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Rescheduled Penalties\',\r\nn.note AS \'Reason For Rescheduling\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 7 /*marked for rescheduling */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=602\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no','Individual Lending Report. Rescheduled Loans. The ability to reschedule (or mark that you have rescheduled the loan elsewhere) is a legacy of the older Mifos product. Needed for migration.',1,1),(55,'Active Loans Passed Final Maturity','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(56,'Active Loans Passed Final Maturity Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency',NULL,1,1),(57,'Active Loans in last installment','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(lastInstallment.`hierarchy`) - LENGTH(REPLACE(lastInstallment.`hierarchy`, \'.\', \'\')) - 1))), lastInstallment.branch) as \"Office/Branch\",\r\nlastInstallment.Currency,\r\nlastInstallment.`Loan Officer`, \r\nlastInstallment.`Client Account No`, lastInstallment.`Client`, \r\nlastInstallment.`Loan Account No`, lastInstallment.`Product`, \r\nlastInstallment.`Fund`, lastInstallment.`Loan Amount`, \r\nlastInstallment.`Annual Nominal Interest Rate`, \r\nlastInstallment.`Disbursed`, lastInstallment.`Expected Matured On` ,\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\norder by lastInstallment.hierarchy, lastInstallment.Currency, lastInstallment.`Client Account No`, lastInstallment.`Loan Account No`','Individual Client \n\nReport',1,1),(58,'Active Loans in last installment Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select lastInstallment.branchId as branchId,\r\nlastInstallment.Currency,\r\ncount(distinct(lastInstallment.clientId)) as client_count, \r\ncount(distinct(lastInstallment.loanId)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id as branchId, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.id as clientId, c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\ngroup by lastInstallment.branchId) x on x.branchId = mo.id\r\norder by mo.hierarchy, x.Currency','Individual Client \n\nReport',1,1),(59,'Active Loans by Disbursal Period','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No\", c.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Principal Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\n\r\nl.total_expected_repayment_derived as \"Total Loan (P+I+F+Pen)\",\r\nl.total_repayment_derived as \"Total Repaid (P+I+F+Pen)\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(61,'Aging Summary (Arrears in Months)','Table',NULL,'Loan','SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Days In Arrears\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'0 - 30\',2 UNION\r\n SELECT \'30 - 60\',3 UNION\r\n SELECT \'60 - 90\',4 UNION\r\n SELECT \'90 - 180\',5 UNION\r\n SELECT \'180 - 360\',6 UNION\r\n SELECT \'> 360\',7 ) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<361, \'180 - 360\', \r\n \'> 360\')))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid','Loan amount in arrears by branch',1,1),(91,'Loan Account Schedule','Pentaho',NULL,'Loan',NULL,NULL,1,0),(92,'Branch Expected Cash Flow','Pentaho',NULL,'Loan',NULL,NULL,1,1),(93,'Expected Payments By Date - Basic','Table',NULL,'Loan','SELECT \r\n ounder.name \'Office\', \r\n IFNULL(ms.display_name,\'-\') \'Loan Officer\',\r\n mc.account_no \'Client Account Number\',\r\n mc.display_name \'Name\',\r\n mp.name \'Product\',\r\n ml.account_no \'Loan Account Number\',\r\n mr.duedate \'Due Date\',\r\n mr.installment \'Installment\',\r\n cu.display_symbol \'Currency\',\r\n mr.principal_amount- IFNULL(mr.principal_completed_derived,0) \'Principal Due\',\r\n mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0) \'Interest Due\', \r\n IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0) \'Fees Due\', \r\n IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0) \'Penalty Due\',\r\n (mr.principal_amount- IFNULL(mr.principal_completed_derived,0)) +\r\n (mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0)) + \r\n (IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0)) + \r\n (IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0)) \'Total Due\', \r\n mlaa.total_overdue_derived \'Total Overdue\'\r\n \r\n FROM m_office mo\r\n JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\n \r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n \r\n LEFT JOIN m_client mc ON mc.office_id=ounder.id\r\n LEFT JOIN m_loan ml ON ml.client_id=mc.id AND ml.loan_status_id=300\r\n LEFT JOIN m_loan_arrears_aging mlaa ON mlaa.loan_id=ml.id\r\n LEFT JOIN m_loan_repayment_schedule mr ON mr.loan_id=ml.id AND mr.completed_derived=0\r\n LEFT JOIN m_product_loan mp ON mp.id=ml.product_id\r\n LEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\n LEFT JOIN m_currency cu ON cu.code=ml.currency_code\r\n WHERE mo.id=${officeId}\r\n AND (IFNULL(ml.loan_officer_id, -10) = \"${loanOfficerId}\" OR \"-1\" = \"${loanOfficerId}\")\r\n AND mr.duedate BETWEEN \'${startDate}\' AND \'${endDate}\'\r\n ORDER BY ounder.id,mr.duedate,ml.account_no','Test',1,1),(94,'Expected Payments By Date - Formatted','Pentaho',NULL,'Loan',NULL,NULL,1,1); +INSERT INTO `stretchy_report` +VALUES (1, 'Client Listing', 'Table', NULL, 'Client', + 'select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n c.account_no as \"Client Account No.\", \r\nc.display_name as \"Name\", \n\nc.joined_date as \"Joined\", c.external_id as \"External Id\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand \n\nounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\nwhere o.id = ${officeId}\r\nand c.is_deleted=0\r\n\n\norder by ounder.hierarchy, c.account_no', + 'Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \'one to one\' additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, + there is probably is + a limit of about 20/50k clients returned for html display (export to excel doesn\'t \n\nhave that client browser/memory impact).',1,1), + (2, 'Client Loans Listing', 'Table', NULL, 'Client', + 'select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client \n\nAccount No.\", \r\nc.display_name as \"Name\", \r\nlo.display_name as \"Loan Officer\", l.account_no as \"Loan Account No.\", l.external_id as \"External Id\", \r\n\n\np.name as Loan, st.enum_message_property as \"Status\", \r\nf.`name` as Fund, purp.code_value as \"Loan Purpose\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount,\n\n\r\nl.arrearstolerance_amount as \"Arrears Tolerance Amount\",\r\nl.number_of_repayments as \"Expected No. Repayments\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\nl.nominal_interest_rate_per_period as \"Nominal Interest Rate Per Period\",\r\n\r\nipf.enum_message_property as \"Interest Rate Frequency\n\n\",\r\nim.enum_message_property as \"Interest Method\",\r\nicp.enum_message_property as \"Interest Calculated in Period\",\r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.repay_every as \"Repayment Frequency\",\r\nrf.enum_message_property as \"Repayment Frequency Period\",\n\n\r\nam.enum_message_property as \"Amortization\",\r\n\r\nl.total_charges_due_at_disbursement_derived as \"Total Charges Due At Disbursement\",\r\n\r\ndate( \n\nl.submittedon_date) as Submitted, date(l.approvedon_date) Approved, l.expected_disbursedon_date As \"Expected Disbursal\",\r\ndate(l.expected_firstrepaymenton_date) as \n\n\"Expected First Repayment\", date(l.interest_calculated_from_date) as \"Interest Calculated From\" ,\r\ndate(l.disbursedon_date) as Disbursed, date\n\n(l.expected_maturedon_date) \"Expected Maturity\",\r\ndate(l.maturedon_date) as \"Matured On\", date(l.closedon_date) as Closed,\r\ndate(l.rejectedon_date) as \n\nRejected, date(l.rescheduledon_date) as Rescheduled, \r\ndate(l.withdrawnon_date) as Withdrawn, date(l.writtenoffon_date) \"Written Off\"\r\nfrom m_office o \r\njoin \n\nm_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on \n\nc.office_id = ounder.id\r\nleft join m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_product_loan p on p.id = \n\nl.product_id\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join r_enum_value st on st.enum_name = \"loan_status_id\" and st.enum_id = l.loan_status_id\r\nleft join \n\nr_enum_value ipf on ipf.enum_name = \"interest_period_frequency_enum\" and ipf.enum_id = l.interest_period_frequency_enum\r\nleft join r_enum_value im on im.enum_name \n\n= \"interest_method_enum\" and im.enum_id = l.interest_method_enum\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = \n\nl.term_period_frequency_enum\r\nleft join r_enum_value icp on icp.enum_name = \"interest_calculated_in_period_enum\" and icp.enum_id = \n\nl.interest_calculated_in_period_enum\r\nleft join r_enum_value rf on rf.enum_name = \"repayment_period_frequency_enum\" and rf.enum_id = \n\nl.repayment_period_frequency_enum\r\nleft join r_enum_value am on am.enum_name = \"amortization_method_enum\" and am.enum_id = l.amortization_method_enum\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\n\r\nleft \n\njoin m_currency cur on cur.code = l.currency_code\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand \n\n(l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \n\n\"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\norder by ounder.hierarchy, 2 , l.id', + 'Individual Client Report\r\n\r\nPretty \n\nwide report that lists the basic details of client loans. \r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t have that client browser/memory impact).',1,1), + (5, 'Loans Awaiting Disbursal', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No\", c.display_name as \"Name\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount as Principal, \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\",\r\ndate(l.approvedon_date) \"Approved\",\r\ndatediff(l.expected_disbursedon_date, curdate()) as \"Days to Disbursal\",\r\ndate(l.expected_disbursedon_date) \"Expected Disbursal\",\r\npurp.code_value as \"Loan Purpose\",\r\n lo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\norder by ounder.hierarchy, datediff(l.expected_disbursedon_date, curdate()), c.account_no', + 'Individual Client Report', 1, 1), (6, 'Loans Awaiting Disbursal Summary', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, f.`name` as Fund,\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`', + 'Individual Client Report', 1, 1), + (7, 'Loans Awaiting Disbursal Summary by Month', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nyear(l.expected_disbursedon_date) as \"Year\", \r\nmonthname(l.expected_disbursedon_date) as \"Month\",\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)', + 'Individual Client Report', 1, 1), (8, 'Loans Pending Approval', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client Name\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, pl.`name` as \"Product\", \r\nl.account_no as \"Loan Account No.\", \r\nl.principal_amount as \"Loan Amount\", \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\ndatediff(curdate(), l.submittedon_date) \"Days Pending Approval\", \r\npurp.code_value as \"Loan Purpose\",\r\nlo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 100 /*Submitted and awaiting approval */\r\norder by ounder.hierarchy, l.submittedon_date, l.account_no', + 'Individual Client Report', 1, 1), + (11, 'Active Loans - Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. loans_in_arrears_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(if(laa.loan_id is not null, l.id, null) )) as loans_in_arrears_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(laa.principal_overdue_derived) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(laa.interest_overdue_derived) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(laa.fee_charges_overdue_derived) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(laa.penalty_charges_overdue_derived) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', + NULL, 1, 1), (12, 'Active Loans - Details', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\npenalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), + (13, 'Obligation Met Loans Details', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client\",\r\nl.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.total_repayment_derived as \"Total Repaid\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", \r\ndate(l.closedon_date) as \"Closed\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), (14, 'Obligation Met Loans Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\ncount(distinct(c.id)) as \"No. of Clients\",\r\ncount(distinct(l.id)) as \"No. of Loans\",\r\nsum(l.principal_amount) as \"Total Loan Amount\", \r\nsum(l.principal_repaid_derived) as \"Total Principal Repaid\",\r\nsum(l.interest_repaid_derived) as \"Total Interest Repaid\",\r\nsum(l.fee_charges_repaid_derived) as \"Total Fees Repaid\",\r\nsum(l.penalty_charges_repaid_derived) as \"Total Penalties Repaid\",\r\nsum(l.interest_waived_derived) as \"Total Interest Waived\",\r\nsum(l.fee_charges_waived_derived) as \"Total Fees Waived\",\r\nsum(l.penalty_charges_waived_derived) as \"Total Penalties Waived\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by ounder.hierarchy, l.currency_code\r\norder by ounder.hierarchy, l.currency_code', + 'Individual Client \n\nReport', 1, 1), + (15, 'Portfolio at Risk', 'Table', NULL, 'Loan', + 'select x.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from \r\n(select ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.currency_code\r\norder by l.currency_code) x', + 'Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', + 1, 1), (16, 'Portfolio at Risk by Branch', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\",\r\nx.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as \"branch\", ifnull(cur.display_symbol, l.currency_code) as Currency, \r\n\r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', + 'Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', + 1, 1), (20, 'Funds Disbursed Between Dates Summary', 'Table', NULL, 'Fund', + 'select ifnull(f.`name`, \' -\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nround(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office ounder \r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere disbursedon_date between \' ${startDate}\' and \'${endDate}\'\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\ngroup by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)\r\norder by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)', + NULL, 1, 1), (21, 'Funds Disbursed Between Dates Summary by Office', 'Table', NULL, 'Fund', + 'select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n \n\nifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office o\r\n\n\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c \n\non c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\n\n\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand o.id = ${officeId}\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand \n\n(l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\ngroup by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, \n\nl.currency_code)\r\norder by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)', + NULL, 1, 1), + (48, 'Balance Sheet', 'Pentaho', NULL, 'Accounting', NULL, 'Balance Sheet', 1, 1), + (49, 'Income Statement', 'Pentaho', NULL, 'Accounting', NULL, 'Profit and Loss Statement', 1, 1), + (50, 'Trial Balance', 'Pentaho', NULL, 'Accounting', NULL, 'Trial Balance Report', 1, 1), + (51, 'Written-Off Loans', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Written-Off Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Written-Off Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Written-Off Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Written-Off Penalties\',\r\nn.note AS \'Reason For Write-Off\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 6 /*write-off */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=601\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\") \r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', + 'Individual Lending Report. Written Off Loans', 1, 1), (52, 'Aging Detail', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nmc.account_no as \"Client Account No.\",\r\n mc.display_name AS \"Client Name\",\r\n ml.account_no AS \"Account Number\",\r\n ml.principal_amount AS \"Loan Amount\",\r\n ml.principal_disbursed_derived AS \"Original Principal\",\r\n ml.interest_charged_derived AS \"Original Interest\",\r\n ml.principal_repaid_derived AS \"Principal Paid\",\r\n ml.interest_repaid_derived AS \"Interest Paid\",\r\n laa.principal_overdue_derived AS \"Principal Overdue\",\r\n laa.interest_overdue_derived AS \"Interest Overdue\",\r\nDATEDIFF(CURDATE(), laa.overdue_since_date_derived) as \"Days in Arrears\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<7, \'<1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<8, \' 1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<22, \' 3\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<29, \' 4\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<36, \' 5\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<43, \' 6\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<50, \' 7\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<57, \' 8\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<64, \' 9\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<85, \'12\', \'12+\')))))))))))) )AS \"Weeks In Arrears Band\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<361, \'180 - 360\', \r\n \'> 360\'))))) AS \"Days in Arrears Band\"\r\n\r\n FROM m_office mo \r\n JOIN m_office ounder ON ounder.hierarchy like concat(mo.hierarchy, \'%\')\r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n INNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id\r\n INNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\n left join m_currency cur on cur.code = ml.currency_code\r\n WHERE ml.loan_status_id=300\r\n AND mo.id=${officeId}\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', + 'Loan arrears aging (Weeks)', 1, 1), + (53, 'Aging Summary (Arrears in Weeks)', 'Table', NULL, 'Loan', + 'SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Weeks In Arrears (Up To)\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'1\',2 UNION\r\n SELECT \'2\',3 UNION\r\n SELECT \'3\',4 UNION\r\n SELECT \'4\',5 UNION\r\n SELECT \'5\',6 UNION\r\n SELECT \'6\',7 UNION\r\n SELECT \'7\',8 UNION\r\n SELECT \'8\',9 UNION\r\n SELECT \'9\',10 UNION\r\n SELECT \'10\',11 UNION\r\n SELECT \'11\',12 UNION\r\n SELECT \'12\',13 UNION\r\n SELECT \'12+\',14) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<8, \'1\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<22, \'3\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<29, \'4\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<36, \'5\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<43, \'6\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<50, \'7\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<57, \'8\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<64, \'9\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<85, \'12\',\r\n \'12+\'))))))))))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid', + 'Loan amount in arrears by branch', 1, 1), (54, 'Rescheduled Loans', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Rescheduled Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Rescheduled Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Rescheduled Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Rescheduled Penalties\',\r\nn.note AS \'Reason For Rescheduling\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 7 /*marked for rescheduling */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=602\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', + 'Individual Lending Report. Rescheduled Loans. The ability to reschedule (or mark that you have rescheduled the loan elsewhere) is a legacy of the older Mifos product. Needed for migration.', + 1, 1), + (55, 'Active Loans Passed Final Maturity', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), + (56, 'Active Loans Passed Final Maturity Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', + NULL, 1, 1), (57, 'Active Loans in last installment', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(lastInstallment.`hierarchy`) - LENGTH(REPLACE(lastInstallment.`hierarchy`, \'.\', \'\')) - 1))), lastInstallment.branch) as \"Office/Branch\",\r\nlastInstallment.Currency,\r\nlastInstallment.`Loan Officer`, \r\nlastInstallment.`Client Account No`, lastInstallment.`Client`, \r\nlastInstallment.`Loan Account No`, lastInstallment.`Product`, \r\nlastInstallment.`Fund`, lastInstallment.`Loan Amount`, \r\nlastInstallment.`Annual Nominal Interest Rate`, \r\nlastInstallment.`Disbursed`, lastInstallment.`Expected Matured On` ,\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\norder by lastInstallment.hierarchy, lastInstallment.Currency, lastInstallment.`Client Account No`, lastInstallment.`Loan Account No`', + 'Individual Client \n\nReport', 1, 1), + (58, 'Active Loans in last installment Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select lastInstallment.branchId as branchId,\r\nlastInstallment.Currency,\r\ncount(distinct(lastInstallment.clientId)) as client_count, \r\ncount(distinct(lastInstallment.loanId)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id as branchId, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.id as clientId, c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\ngroup by lastInstallment.branchId) x on x.branchId = mo.id\r\norder by mo.hierarchy, x.Currency', + 'Individual Client \n\nReport', 1, 1), (59, 'Active Loans by Disbursal Period', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No\", c.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Principal Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\n\r\nl.total_expected_repayment_derived as \"Total Loan (P+I+F+Pen)\",\r\nl.total_repayment_derived as \"Total Repaid (P+I+F+Pen)\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), + (61, 'Aging Summary (Arrears in Months)', 'Table', NULL, 'Loan', + 'SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Days In Arrears\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'0 - 30\',2 UNION\r\n SELECT \'30 - 60\',3 UNION\r\n SELECT \'60 - 90\',4 UNION\r\n SELECT \'90 - 180\',5 UNION\r\n SELECT \'180 - 360\',6 UNION\r\n SELECT \'> 360\',7 ) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<361, \'180 - 360\', \r\n \'> 360\')))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid', + 'Loan amount in arrears by branch', 1, 1), + (91, 'Loan Account Schedule', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 0), + (92, 'Branch Expected Cash Flow', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 1), + (93, 'Expected Payments By Date - Basic', 'Table', NULL, 'Loan', + 'SELECT \r\n ounder.name \'Office\', \r\n IFNULL(ms.display_name,\'-\') \'Loan Officer\',\r\n mc.account_no \'Client Account Number\',\r\n mc.display_name \'Name\',\r\n mp.name \'Product\',\r\n ml.account_no \'Loan Account Number\',\r\n mr.duedate \'Due Date\',\r\n mr.installment \'Installment\',\r\n cu.display_symbol \'Currency\',\r\n mr.principal_amount- IFNULL(mr.principal_completed_derived,0) \'Principal Due\',\r\n mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0) \'Interest Due\', \r\n IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0) \'Fees Due\', \r\n IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0) \'Penalty Due\',\r\n (mr.principal_amount- IFNULL(mr.principal_completed_derived,0)) +\r\n (mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0)) + \r\n (IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0)) + \r\n (IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0)) \'Total Due\', \r\n mlaa.total_overdue_derived \'Total Overdue\'\r\n \r\n FROM m_office mo\r\n JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\n \r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n \r\n LEFT JOIN m_client mc ON mc.office_id=ounder.id\r\n LEFT JOIN m_loan ml ON ml.client_id=mc.id AND ml.loan_status_id=300\r\n LEFT JOIN m_loan_arrears_aging mlaa ON mlaa.loan_id=ml.id\r\n LEFT JOIN m_loan_repayment_schedule mr ON mr.loan_id=ml.id AND mr.completed_derived=0\r\n LEFT JOIN m_product_loan mp ON mp.id=ml.product_id\r\n LEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\n LEFT JOIN m_currency cu ON cu.code=ml.currency_code\r\n WHERE mo.id=${officeId}\r\n AND (IFNULL(ml.loan_officer_id, -10) = \"${loanOfficerId}\" OR \"-1\" = \"${loanOfficerId}\")\r\n AND mr.duedate BETWEEN \'${startDate}\' AND \'${endDate}\'\r\n ORDER BY ounder.id,mr.duedate,ml.account_no', + 'Test', 1, 1), (94, 'Expected Payments By Date - Formatted', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 1); /*!40000 ALTER TABLE `stretchy_report` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `stretchy_report_parameter` @@ -1865,12 +2284,13 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `stretchy_report_parameter`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `stretchy_report_parameter` ( - `report_id` INT NOT NULL, - `parameter_id` INT NOT NULL, - `report_parameter_name` varchar(45) DEFAULT NULL, - PRIMARY KEY (`report_id`,`parameter_id`), - UNIQUE KEY `report_id_name_UNIQUE` (`report_id`,`report_parameter_name`) +CREATE TABLE `stretchy_report_parameter` +( + `report_id` INT NOT NULL, + `parameter_id` INT NOT NULL, + `report_parameter_name` varchar(45) DEFAULT NULL, + PRIMARY KEY (`report_id`, `parameter_id`), + UNIQUE KEY `report_id_name_UNIQUE` (`report_id`,`report_parameter_name`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1878,11 +2298,165 @@ CREATE TABLE `stretchy_report_parameter` ( -- Dumping data for table `stretchy_report_parameter` -- -LOCK TABLES `stretchy_report_parameter` WRITE; +LOCK +TABLES `stretchy_report_parameter` WRITE; /*!40000 ALTER TABLE `stretchy_report_parameter` DISABLE KEYS */; -INSERT INTO `stretchy_report_parameter` VALUES (1,5,NULL),(2,5,NULL),(2,6,NULL),(2,10,NULL),(2,20,NULL),(2,25,NULL),(2,26,NULL),(5,5,NULL),(5,6,NULL),(5,10,NULL),(5,20,NULL),(5,25,NULL),(5,26,NULL),(6,5,NULL),(6,6,NULL),(6,10,NULL),(6,20,NULL),(6,25,NULL),(6,26,NULL),(7,5,NULL),(7,6,NULL),(7,10,NULL),(7,20,NULL),(7,25,NULL),(7,26,NULL),(8,5,NULL),(8,6,NULL),(8,10,NULL),(8,25,NULL),(8,26,NULL),(11,5,NULL),(11,6,NULL),(11,10,NULL),(11,20,NULL),(11,25,NULL),(11,26,NULL),(11,100,NULL),(12,5,NULL),(12,6,NULL),(12,10,NULL),(12,20,NULL),(12,25,NULL),(12,26,NULL),(13,1,NULL),(13,2,NULL),(13,3,NULL),(13,5,NULL),(13,6,NULL),(13,10,NULL),(13,20,NULL),(13,25,NULL),(13,26,NULL),(14,1,NULL),(14,2,NULL),(14,3,NULL),(14,5,NULL),(14,6,NULL),(14,10,NULL),(14,20,NULL),(14,25,NULL),(14,26,NULL),(15,5,NULL),(15,6,NULL),(15,10,NULL),(15,20,NULL),(15,25,NULL),(15,26,NULL),(15,100,NULL),(16,5,NULL),(16,6,NULL),(16,10,NULL),(16,20,NULL),(16,25,NULL),(16,26,NULL),(16,100,NULL),(20,1,NULL),(20,2,NULL),(20,10,NULL),(20,20,NULL),(21,1,NULL),(21,2,NULL),(21,5,NULL),(21,10,NULL),(21,20,NULL),(48,5,'branch'),(48,2,'date'),(49,5,'branch'),(49,1,'fromDate'),(49,2,'toDate'),(50,5,'branch'),(50,1,'fromDate'),(50,2,'toDate'),(51,1,NULL),(51,2,NULL),(51,5,NULL),(51,10,NULL),(51,25,NULL),(52,5,NULL),(53,5,NULL),(53,10,NULL),(54,1,NULL),(54,2,NULL),(54,5,NULL),(54,10,NULL),(54,25,NULL),(55,5,NULL),(55,6,NULL),(55,10,NULL),(55,20,NULL),(55,25,NULL),(55,26,NULL),(56,5,NULL),(56,6,NULL),(56,10,NULL),(56,20,NULL),(56,25,NULL),(56,26,NULL),(56,100,NULL),(57,5,NULL),(57,6,NULL),(57,10,NULL),(57,20,NULL),(57,25,NULL),(57,26,NULL),(58,5,NULL),(58,6,NULL),(58,10,NULL),(58,20,NULL),(58,25,NULL),(58,26,NULL),(58,100,NULL),(59,1,NULL),(59,2,NULL),(59,5,NULL),(59,6,NULL),(59,10,NULL),(59,20,NULL),(59,25,NULL),(59,26,NULL),(61,5,NULL),(61,10,NULL),(92,1,'fromDate'),(92,5,'selectOffice'),(92,2,'toDate'),(93,1,NULL),(93,2,NULL),(93,5,NULL),(93,6,NULL),(94,2,'endDate'),(94,6,'loanOfficerId'),(94,5,'officeId'),(94,1,'startDate'); +INSERT INTO `stretchy_report_parameter` +VALUES (1, 5, NULL), + (2, 5, NULL), + (2, 6, NULL), + (2, 10, NULL), + (2, 20, NULL), + (2, 25, NULL), + (2, 26, NULL), + (5, 5, NULL), + (5, 6, NULL), + (5, 10, NULL), + (5, 20, NULL), + (5, 25, NULL), + (5, 26, NULL), + (6, 5, NULL), + (6, 6, NULL), + (6, 10, NULL), + (6, 20, NULL), + (6, 25, NULL), + (6, 26, NULL), + (7, 5, NULL), + (7, 6, NULL), + (7, 10, NULL), + (7, 20, NULL), + (7, 25, NULL), + (7, 26, NULL), + (8, 5, NULL), + (8, 6, NULL), + (8, 10, NULL), + (8, 25, NULL), + (8, 26, NULL), + (11, 5, NULL), + (11, 6, NULL), + (11, 10, NULL), + (11, 20, NULL), + (11, 25, NULL), + (11, 26, NULL), + (11, 100, NULL), + (12, 5, NULL), + (12, 6, NULL), + (12, 10, NULL), + (12, 20, NULL), + (12, 25, NULL), + (12, 26, NULL), + (13, 1, NULL), + (13, 2, NULL), + (13, 3, NULL), + (13, 5, NULL), + (13, 6, NULL), + (13, 10, NULL), + (13, 20, NULL), + (13, 25, NULL), + (13, 26, NULL), + (14, 1, NULL), + (14, 2, NULL), + (14, 3, NULL), + (14, 5, NULL), + (14, 6, NULL), + (14, 10, NULL), + (14, 20, NULL), + (14, 25, NULL), + (14, 26, NULL), + (15, 5, NULL), + (15, 6, NULL), + (15, 10, NULL), + (15, 20, NULL), + (15, 25, NULL), + (15, 26, NULL), + (15, 100, NULL), + (16, 5, NULL), + (16, 6, NULL), + (16, 10, NULL), + (16, 20, NULL), + (16, 25, NULL), + (16, 26, NULL), + (16, 100, NULL), + (20, 1, NULL), + (20, 2, NULL), + (20, 10, NULL), + (20, 20, NULL), + (21, 1, NULL), + (21, 2, NULL), + (21, 5, NULL), + (21, 10, NULL), + (21, 20, NULL), + (48, 5, 'branch'), + (48, 2, 'date'), + (49, 5, 'branch'), + (49, 1, 'fromDate'), + (49, 2, 'toDate'), + (50, 5, 'branch'), + (50, 1, 'fromDate'), + (50, 2, 'toDate'), + (51, 1, NULL), + (51, 2, NULL), + (51, 5, NULL), + (51, 10, NULL), + (51, 25, NULL), + (52, 5, NULL), + (53, 5, NULL), + (53, 10, NULL), + (54, 1, NULL), + (54, 2, NULL), + (54, 5, NULL), + (54, 10, NULL), + (54, 25, NULL), + (55, 5, NULL), + (55, 6, NULL), + (55, 10, NULL), + (55, 20, NULL), + (55, 25, NULL), + (55, 26, NULL), + (56, 5, NULL), + (56, 6, NULL), + (56, 10, NULL), + (56, 20, NULL), + (56, 25, NULL), + (56, 26, NULL), + (56, 100, NULL), + (57, 5, NULL), + (57, 6, NULL), + (57, 10, NULL), + (57, 20, NULL), + (57, 25, NULL), + (57, 26, NULL), + (58, 5, NULL), + (58, 6, NULL), + (58, 10, NULL), + (58, 20, NULL), + (58, 25, NULL), + (58, 26, NULL), + (58, 100, NULL), + (59, 1, NULL), + (59, 2, NULL), + (59, 5, NULL), + (59, 6, NULL), + (59, 10, NULL), + (59, 20, NULL), + (59, 25, NULL), + (59, 26, NULL), + (61, 5, NULL), + (61, 10, NULL), + (92, 1, 'fromDate'), + (92, 5, 'selectOffice'), + (92, 2, 'toDate'), + (93, 1, NULL), + (93, 2, NULL), + (93, 5, NULL), + (93, 6, NULL), + (94, 2, 'endDate'), + (94, 6, 'loanOfficerId'), + (94, 5, 'officeId'), + (94, 1, 'startDate'); /*!40000 ALTER TABLE `stretchy_report_parameter` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `x_registered_table` @@ -1891,10 +2465,11 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `x_registered_table`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `x_registered_table` ( - `registered_table_name` varchar(50) NOT NULL, - `application_table_name` varchar(50) NOT NULL, - PRIMARY KEY (`registered_table_name`) +CREATE TABLE `x_registered_table` +( + `registered_table_name` varchar(50) NOT NULL, + `application_table_name` varchar(50) NOT NULL, + PRIMARY KEY (`registered_table_name`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1902,11 +2477,16 @@ CREATE TABLE `x_registered_table` ( -- Dumping data for table `x_registered_table` -- -LOCK TABLES `x_registered_table` WRITE; +LOCK +TABLES `x_registered_table` WRITE; /*!40000 ALTER TABLE `x_registered_table` DISABLE KEYS */; -INSERT INTO `x_registered_table` VALUES ('extra_client_details','m_client'),('extra_family_details','m_client'),('extra_loan_details','m_loan'); +INSERT INTO `x_registered_table` +VALUES ('extra_client_details', 'm_client'), + ('extra_family_details', 'm_client'), + ('extra_loan_details', 'm_loan'); /*!40000 ALTER TABLE `x_registered_table` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; diff --git a/fineract-db/multi-tenant-demo-backups/ceda/bk_ceda_trial.sql b/fineract-db/multi-tenant-demo-backups/ceda/bk_ceda_trial.sql index a4924c96aa5..c82f7d61363 100644 --- a/fineract-db/multi-tenant-demo-backups/ceda/bk_ceda_trial.sql +++ b/fineract-db/multi-tenant-demo-backups/ceda/bk_ceda_trial.sql @@ -41,20 +41,21 @@ DROP TABLE IF EXISTS `acc_gl_account`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_gl_account` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(45) NOT NULL, - `parent_id` BIGINT DEFAULT NULL, - `gl_code` varchar(45) NOT NULL, - `disabled` tinyint NOT NULL DEFAULT '0', - `manual_journal_entries_allowed` tinyint NOT NULL DEFAULT '1', - `account_usage` tinyint NOT NULL DEFAULT '2', - `classification_enum` SMALLINT NOT NULL, - `description` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `acc_gl_code` (`gl_code`), - KEY `FK_ACC_0000000001` (`parent_id`), - CONSTRAINT `FK_ACC_0000000001` FOREIGN KEY (`parent_id`) REFERENCES `acc_gl_account` (`id`) +CREATE TABLE `acc_gl_account` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(45) NOT NULL, + `parent_id` BIGINT DEFAULT NULL, + `gl_code` varchar(45) NOT NULL, + `disabled` tinyint NOT NULL DEFAULT '0', + `manual_journal_entries_allowed` tinyint NOT NULL DEFAULT '1', + `account_usage` tinyint NOT NULL DEFAULT '2', + `classification_enum` SMALLINT NOT NULL, + `description` varchar(500) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `acc_gl_code` (`gl_code`), + KEY `FK_ACC_0000000001` (`parent_id`), + CONSTRAINT `FK_ACC_0000000001` FOREIGN KEY (`parent_id`) REFERENCES `acc_gl_account` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=98 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -62,11 +63,110 @@ CREATE TABLE `acc_gl_account` ( -- Dumping data for table `acc_gl_account` -- -LOCK TABLES `acc_gl_account` WRITE; +LOCK +TABLES `acc_gl_account` WRITE; /*!40000 ALTER TABLE `acc_gl_account` DISABLE KEYS */; -INSERT INTO `acc_gl_account` VALUES (1,'Petty Cash Balances',NULL,'11100',0,1,2,1,NULL),(2,'Cash in Valut 1',NULL,'11101',0,1,1,1,NULL),(3,'Bank Balances',NULL,'11200',0,1,2,1,NULL),(4,'Centenary Opening Account',NULL,'11201',0,1,1,1,NULL),(5,'Centenary Expense Account',NULL,'11202',0,1,1,1,NULL),(6,'Centenary USD Account',NULL,'11203',0,1,1,1,NULL),(7,'Loans and Advances',NULL,'13100',0,1,2,1,NULL),(8,'Loans to Clients',NULL,'13101',0,1,1,1,NULL),(9,'Outstanding Interest',NULL,'13102',0,1,1,1,NULL),(10,'Outstanding Late Payment Interest',NULL,'13103',0,1,1,1,NULL),(11,'Outstanding Bank Fees to be collected',NULL,'13104',0,1,1,1,NULL),(12,'WriteOff Accounts',NULL,'13200',0,1,2,1,NULL),(13,'Write-offs (use for funds coming in)',NULL,'13201',0,1,1,1,NULL),(14,'Write-offs outstanding principal',NULL,'13202',0,1,1,1,NULL),(15,'Write-offs outstanding interest',NULL,'13203',0,1,1,1,NULL),(16,'Write-offs collected bank fees',NULL,'13204',0,1,1,1,NULL),(17,'Write-offs hardware/furniture',NULL,'13205',0,1,1,1,NULL),(18,'Fixed Assets',NULL,'14100',0,1,2,1,NULL),(19,'Office Equipment',NULL,'14101',0,1,1,1,NULL),(20,'Suspense Items (unidentified deposits)',NULL,'15000',0,1,2,1,NULL),(21,'Assets',NULL,'10000',0,1,2,1,NULL),(22,'Liabilities',NULL,'20000',0,1,2,2,NULL),(23,'Shares Account',NULL,'26100',0,1,2,2,NULL),(24,'Shares Captial',NULL,'26101',0,1,1,2,NULL),(25,'Donated Equity',NULL,'26300',0,1,2,2,NULL),(26,'Donated Equity Ameropa Foundation',NULL,'26301',0,1,1,2,NULL),(27,'Donated Equity e.h',NULL,'26302',0,1,1,2,NULL),(28,'Overpaid Amounts',NULL,'27000',0,1,2,2,NULL),(29,'Loss Provision',NULL,'28000',0,1,2,2,NULL),(30,'Provision Outstanding Principal',NULL,'28001',0,1,1,2,NULL),(31,'Provision Oustanding Interest',NULL,'28002',0,1,1,2,NULL),(32,'Income',NULL,'30000',0,1,2,4,NULL),(33,'Interest Income from Loans',NULL,'31100',0,1,2,4,NULL),(34,'Interest on Loans',NULL,'31101',0,1,1,4,NULL),(35,'Late Payment Interest',NULL,'31102',0,1,1,4,NULL),(36,'Income from Micro credit & Lending Activities',NULL,'31300',0,1,2,4,NULL),(37,'Collected Bank Fees Receivable',NULL,'6201',0,1,1,4,NULL),(38,'Deposits from Loans Write Off',NULL,'31400',0,1,2,4,NULL),(39,'Expenditure',NULL,'40000',0,1,2,5,NULL),(40,'Office Expenditure Account',NULL,'42100',0,1,2,5,NULL),(41,'Water Charges',NULL,'42102',0,1,1,5,NULL),(42,'Electricity Charges',NULL,'42103',0,1,1,5,NULL),(43,'Printing and Stationary',NULL,'42105',0,1,1,5,NULL),(44,'Office Rent',NULL,'42107',0,1,1,5,NULL),(45,'Marketing Expense',NULL,'42109',0,1,1,5,NULL),(46,'Office utilities',NULL,'42112',0,1,1,5,'(supplies, toiletries, kitchen)'),(47,'Furniture',NULL,'42113',0,1,1,5,NULL),(48,'CEDA Meeting Expense',NULL,'42114',0,1,1,5,NULL),(49,'Employee Personal Expsense Account',NULL,'42200',0,1,2,5,NULL),(50,'Salary Alice',NULL,'42201',0,1,1,5,NULL),(51,'Salary Irene',NULL,'42202',0,1,1,5,NULL),(52,'Salary Richard',NULL,'42203',0,1,1,5,NULL),(53,'Salary Loan Officer TBA',NULL,'42204',0,1,1,5,NULL),(54,'Medical Insurance Alice & Family',NULL,'42205',0,1,1,5,NULL),(55,'Medical Insurance Irene',NULL,'42206',0,1,1,5,NULL),(56,'Medical Insurance Richard',NULL,'42207',0,1,1,5,NULL),(57,'Medical Insurance Loan Officer TBA',NULL,'42208',0,1,1,5,NULL),(58,'PAYE all employees',NULL,'42209',0,1,1,5,NULL),(59,'NSSF all employees',NULL,'42210',0,1,1,5,NULL),(60,'Lunch Allowances all employees',NULL,'42211',0,1,1,5,NULL),(61,'IT software and maintenance',NULL,'42300',0,1,2,5,NULL),(62,'Mifos maintenance contract 12 months',NULL,'42301',0,1,1,5,NULL),(63,'VPS Contract 12 months',NULL,'42302',0,1,1,5,NULL),(64,'Bulk SMS Service',NULL,'42303',0,1,1,5,NULL),(65,'Support Accounting Software',NULL,'42304',0,1,1,5,NULL),(66,'Mifos Instance Setup',NULL,'42305',0,1,1,5,NULL),(67,'Misc support expense',NULL,'42306',0,1,1,5,NULL),(68,'Warid Mobile Line',NULL,'42307',0,1,1,5,NULL),(69,'Landline',NULL,'42308',0,1,1,5,NULL),(70,'Modem Alice',NULL,'42309',0,1,1,5,NULL),(71,'Modem Irene',NULL,'42310',0,1,1,5,NULL),(72,'Modem Richard',NULL,'42311',0,1,1,5,NULL),(73,'Repairs',NULL,'42312',0,1,1,5,NULL),(74,'Airtime Expenses',NULL,'42400',0,1,2,5,NULL),(75,'Airtime Alice',NULL,'42401',0,1,1,5,NULL),(76,'Airtime Richard',NULL,'42402',0,1,1,5,NULL),(77,'Airtime Loan Office TBA',NULL,'42403',0,1,1,5,NULL),(78,'Special Airtime Alice',NULL,'42404',0,1,1,5,NULL),(79,'Transportation',NULL,'42500',0,1,2,5,NULL),(80,'Flat monthly transportation cost',NULL,'42501',0,1,1,5,NULL),(81,'Faciliation cost for Richard',NULL,'42502',0,1,1,5,NULL),(82,'Faciliation cost for Loan Officer TBA',NULL,'42503',0,1,1,5,NULL),(83,'Consultancy Expenses',NULL,'42600',0,1,2,5,NULL),(84,'Audit Fees',NULL,'42601',0,1,1,5,NULL),(85,'Legal Fees',NULL,'42602',0,1,1,5,NULL),(86,'Miscellaneous Expenses Account',NULL,'42700',0,1,2,5,NULL),(87,'MFI License',NULL,'42703',0,1,1,5,NULL),(88,'Sundy Expenses',NULL,'42704',0,1,1,5,NULL),(89,'Bank Fees',NULL,'42800',0,1,2,5,NULL),(90,'Bank Charges Operating Account',NULL,'42801',0,1,1,5,NULL),(91,'Bank Charges Expense Account',NULL,'42802',0,1,1,5,NULL),(92,'E.H Account',NULL,'42900',0,1,2,5,NULL),(93,'Airtime',NULL,'42901',0,1,1,5,NULL),(94,'Modem',NULL,'42902',0,1,1,5,NULL),(95,'Meals',NULL,'42903',0,1,1,5,NULL),(96,'Transportation',NULL,'42904',0,1,1,5,NULL),(97,'Miscellaneous',NULL,'42905',0,1,1,5,NULL); +INSERT INTO `acc_gl_account` +VALUES (1, 'Petty Cash Balances', NULL, '11100', 0, 1, 2, 1, NULL), + (2, 'Cash in Valut 1', NULL, '11101', 0, 1, 1, 1, NULL), + (3, 'Bank Balances', NULL, '11200', 0, 1, 2, 1, NULL), + (4, 'Centenary Opening Account', NULL, '11201', 0, 1, 1, 1, NULL), + (5, 'Centenary Expense Account', NULL, '11202', 0, 1, 1, 1, NULL), + (6, 'Centenary USD Account', NULL, '11203', 0, 1, 1, 1, NULL), + (7, 'Loans and Advances', NULL, '13100', 0, 1, 2, 1, NULL), + (8, 'Loans to Clients', NULL, '13101', 0, 1, 1, 1, NULL), + (9, 'Outstanding Interest', NULL, '13102', 0, 1, 1, 1, NULL), + (10, 'Outstanding Late Payment Interest', NULL, '13103', 0, 1, 1, 1, NULL), + (11, 'Outstanding Bank Fees to be collected', NULL, '13104', 0, 1, 1, 1, NULL), + (12, 'WriteOff Accounts', NULL, '13200', 0, 1, 2, 1, NULL), + (13, 'Write-offs (use for funds coming in)', NULL, '13201', 0, 1, 1, 1, NULL), + (14, 'Write-offs outstanding principal', NULL, '13202', 0, 1, 1, 1, NULL), + (15, 'Write-offs outstanding interest', NULL, '13203', 0, 1, 1, 1, NULL), + (16, 'Write-offs collected bank fees', NULL, '13204', 0, 1, 1, 1, NULL), + (17, 'Write-offs hardware/furniture', NULL, '13205', 0, 1, 1, 1, NULL), + (18, 'Fixed Assets', NULL, '14100', 0, 1, 2, 1, NULL), + (19, 'Office Equipment', NULL, '14101', 0, 1, 1, 1, NULL), + (20, 'Suspense Items (unidentified deposits)', NULL, '15000', 0, 1, 2, 1, NULL), + (21, 'Assets', NULL, '10000', 0, 1, 2, 1, NULL), + (22, 'Liabilities', NULL, '20000', 0, 1, 2, 2, NULL), + (23, 'Shares Account', NULL, '26100', 0, 1, 2, 2, NULL), + (24, 'Shares Captial', NULL, '26101', 0, 1, 1, 2, NULL), + (25, 'Donated Equity', NULL, '26300', 0, 1, 2, 2, NULL), + (26, 'Donated Equity Ameropa Foundation', NULL, '26301', 0, 1, 1, 2, NULL), + (27, 'Donated Equity e.h', NULL, '26302', 0, 1, 1, 2, NULL), + (28, 'Overpaid Amounts', NULL, '27000', 0, 1, 2, 2, NULL), + (29, 'Loss Provision', NULL, '28000', 0, 1, 2, 2, NULL), + (30, 'Provision Outstanding Principal', NULL, '28001', 0, 1, 1, 2, NULL), + (31, 'Provision Oustanding Interest', NULL, '28002', 0, 1, 1, 2, NULL), + (32, 'Income', NULL, '30000', 0, 1, 2, 4, NULL), + (33, 'Interest Income from Loans', NULL, '31100', 0, 1, 2, 4, NULL), + (34, 'Interest on Loans', NULL, '31101', 0, 1, 1, 4, NULL), + (35, 'Late Payment Interest', NULL, '31102', 0, 1, 1, 4, NULL), + (36, 'Income from Micro credit & Lending Activities', NULL, '31300', 0, 1, 2, 4, NULL), + (37, 'Collected Bank Fees Receivable', NULL, '6201', 0, 1, 1, 4, NULL), + (38, 'Deposits from Loans Write Off', NULL, '31400', 0, 1, 2, 4, NULL), + (39, 'Expenditure', NULL, '40000', 0, 1, 2, 5, NULL), + (40, 'Office Expenditure Account', NULL, '42100', 0, 1, 2, 5, NULL), + (41, 'Water Charges', NULL, '42102', 0, 1, 1, 5, NULL), + (42, 'Electricity Charges', NULL, '42103', 0, 1, 1, 5, NULL), + (43, 'Printing and Stationary', NULL, '42105', 0, 1, 1, 5, NULL), + (44, 'Office Rent', NULL, '42107', 0, 1, 1, 5, NULL), + (45, 'Marketing Expense', NULL, '42109', 0, 1, 1, 5, NULL), + (46, 'Office utilities', NULL, '42112', 0, 1, 1, 5, '(supplies, toiletries, kitchen)'), + (47, 'Furniture', NULL, '42113', 0, 1, 1, 5, NULL), + (48, 'CEDA Meeting Expense', NULL, '42114', 0, 1, 1, 5, NULL), + (49, 'Employee Personal Expsense Account', NULL, '42200', 0, 1, 2, 5, NULL), + (50, 'Salary Alice', NULL, '42201', 0, 1, 1, 5, NULL), + (51, 'Salary Irene', NULL, '42202', 0, 1, 1, 5, NULL), + (52, 'Salary Richard', NULL, '42203', 0, 1, 1, 5, NULL), + (53, 'Salary Loan Officer TBA', NULL, '42204', 0, 1, 1, 5, NULL), + (54, 'Medical Insurance Alice & Family', NULL, '42205', 0, 1, 1, 5, NULL), + (55, 'Medical Insurance Irene', NULL, '42206', 0, 1, 1, 5, NULL), + (56, 'Medical Insurance Richard', NULL, '42207', 0, 1, 1, 5, NULL), + (57, 'Medical Insurance Loan Officer TBA', NULL, '42208', 0, 1, 1, 5, NULL), + (58, 'PAYE all employees', NULL, '42209', 0, 1, 1, 5, NULL), + (59, 'NSSF all employees', NULL, '42210', 0, 1, 1, 5, NULL), + (60, 'Lunch Allowances all employees', NULL, '42211', 0, 1, 1, 5, NULL), + (61, 'IT software and maintenance', NULL, '42300', 0, 1, 2, 5, NULL), + (62, 'Mifos maintenance contract 12 months', NULL, '42301', 0, 1, 1, 5, NULL), + (63, 'VPS Contract 12 months', NULL, '42302', 0, 1, 1, 5, NULL), + (64, 'Bulk SMS Service', NULL, '42303', 0, 1, 1, 5, NULL), + (65, 'Support Accounting Software', NULL, '42304', 0, 1, 1, 5, NULL), + (66, 'Mifos Instance Setup', NULL, '42305', 0, 1, 1, 5, NULL), + (67, 'Misc support expense', NULL, '42306', 0, 1, 1, 5, NULL), + (68, 'Warid Mobile Line', NULL, '42307', 0, 1, 1, 5, NULL), + (69, 'Landline', NULL, '42308', 0, 1, 1, 5, NULL), + (70, 'Modem Alice', NULL, '42309', 0, 1, 1, 5, NULL), + (71, 'Modem Irene', NULL, '42310', 0, 1, 1, 5, NULL), + (72, 'Modem Richard', NULL, '42311', 0, 1, 1, 5, NULL), + (73, 'Repairs', NULL, '42312', 0, 1, 1, 5, NULL), + (74, 'Airtime Expenses', NULL, '42400', 0, 1, 2, 5, NULL), + (75, 'Airtime Alice', NULL, '42401', 0, 1, 1, 5, NULL), + (76, 'Airtime Richard', NULL, '42402', 0, 1, 1, 5, NULL), + (77, 'Airtime Loan Office TBA', NULL, '42403', 0, 1, 1, 5, NULL), + (78, 'Special Airtime Alice', NULL, '42404', 0, 1, 1, 5, NULL), + (79, 'Transportation', NULL, '42500', 0, 1, 2, 5, NULL), + (80, 'Flat monthly transportation cost', NULL, '42501', 0, 1, 1, 5, NULL), + (81, 'Faciliation cost for Richard', NULL, '42502', 0, 1, 1, 5, NULL), + (82, 'Faciliation cost for Loan Officer TBA', NULL, '42503', 0, 1, 1, 5, NULL), + (83, 'Consultancy Expenses', NULL, '42600', 0, 1, 2, 5, NULL), + (84, 'Audit Fees', NULL, '42601', 0, 1, 1, 5, NULL), + (85, 'Legal Fees', NULL, '42602', 0, 1, 1, 5, NULL), + (86, 'Miscellaneous Expenses Account', NULL, '42700', 0, 1, 2, 5, NULL), + (87, 'MFI License', NULL, '42703', 0, 1, 1, 5, NULL), + (88, 'Sundy Expenses', NULL, '42704', 0, 1, 1, 5, NULL), + (89, 'Bank Fees', NULL, '42800', 0, 1, 2, 5, NULL), + (90, 'Bank Charges Operating Account', NULL, '42801', 0, 1, 1, 5, NULL), + (91, 'Bank Charges Expense Account', NULL, '42802', 0, 1, 1, 5, NULL), + (92, 'E.H Account', NULL, '42900', 0, 1, 2, 5, NULL), + (93, 'Airtime', NULL, '42901', 0, 1, 1, 5, NULL), + (94, 'Modem', NULL, '42902', 0, 1, 1, 5, NULL), + (95, 'Meals', NULL, '42903', 0, 1, 1, 5, NULL), + (96, 'Transportation', NULL, '42904', 0, 1, 1, 5, NULL), + (97, 'Miscellaneous', NULL, '42905', 0, 1, 1, 5, NULL); /*!40000 ALTER TABLE `acc_gl_account` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `acc_gl_closure` @@ -75,24 +175,25 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `acc_gl_closure`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_gl_closure` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `office_id` BIGINT NOT NULL, - `closing_date` date NOT NULL, - `is_deleted` INT NOT NULL DEFAULT '0', - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - `comments` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `office_id_closing_date` (`office_id`,`closing_date`), - KEY `FK_acc_gl_closure_m_office` (`office_id`), - KEY `FK_acc_gl_closure_m_appuser` (`createdby_id`), - KEY `FK_acc_gl_closure_m_appuser_2` (`lastmodifiedby_id`), - CONSTRAINT `FK_acc_gl_closure_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_closure_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_closure_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `acc_gl_closure` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `office_id` BIGINT NOT NULL, + `closing_date` date NOT NULL, + `is_deleted` INT NOT NULL DEFAULT '0', + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + `comments` varchar(500) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `office_id_closing_date` (`office_id`,`closing_date`), + KEY `FK_acc_gl_closure_m_office` (`office_id`), + KEY `FK_acc_gl_closure_m_appuser` (`createdby_id`), + KEY `FK_acc_gl_closure_m_appuser_2` (`lastmodifiedby_id`), + CONSTRAINT `FK_acc_gl_closure_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_closure_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_closure_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -100,10 +201,12 @@ CREATE TABLE `acc_gl_closure` ( -- Dumping data for table `acc_gl_closure` -- -LOCK TABLES `acc_gl_closure` WRITE; +LOCK +TABLES `acc_gl_closure` WRITE; /*!40000 ALTER TABLE `acc_gl_closure` DISABLE KEYS */; /*!40000 ALTER TABLE `acc_gl_closure` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `acc_gl_journal_entry` @@ -112,35 +215,36 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `acc_gl_journal_entry`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_gl_journal_entry` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_id` BIGINT NOT NULL, - `office_id` BIGINT NOT NULL, - `reversal_id` BIGINT DEFAULT NULL, - `transaction_id` varchar(50) NOT NULL, - `reversed` tinyint NOT NULL DEFAULT '0', - `manual_entry` tinyint NOT NULL DEFAULT '0', - `entry_date` date NOT NULL, - `type_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `entity_type_enum` SMALLINT DEFAULT NULL, - `entity_id` BIGINT DEFAULT NULL, - `createdby_id` BIGINT NOT NULL, - `lastmodifiedby_id` BIGINT NOT NULL, - `created_date` datetime NOT NULL, - `lastmodified_date` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_acc_gl_journal_entry_m_office` (`office_id`), - KEY `FK_acc_gl_journal_entry_m_appuser` (`createdby_id`), - KEY `FK_acc_gl_journal_entry_m_appuser_2` (`lastmodifiedby_id`), - KEY `FK_acc_gl_journal_entry_acc_gl_journal_entry` (`reversal_id`), - KEY `FK_acc_gl_journal_entry_acc_gl_account` (`account_id`), - CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_account` FOREIGN KEY (`account_id`) REFERENCES `acc_gl_account` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_journal_entry` FOREIGN KEY (`reversal_id`) REFERENCES `acc_gl_journal_entry` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `acc_gl_journal_entry` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `account_id` BIGINT NOT NULL, + `office_id` BIGINT NOT NULL, + `reversal_id` BIGINT DEFAULT NULL, + `transaction_id` varchar(50) NOT NULL, + `reversed` tinyint NOT NULL DEFAULT '0', + `manual_entry` tinyint NOT NULL DEFAULT '0', + `entry_date` date NOT NULL, + `type_enum` SMALLINT NOT NULL, + `amount` decimal(19, 6) NOT NULL, + `description` varchar(500) DEFAULT NULL, + `entity_type_enum` SMALLINT DEFAULT NULL, + `entity_id` BIGINT DEFAULT NULL, + `createdby_id` BIGINT NOT NULL, + `lastmodifiedby_id` BIGINT NOT NULL, + `created_date` datetime NOT NULL, + `lastmodified_date` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `FK_acc_gl_journal_entry_m_office` (`office_id`), + KEY `FK_acc_gl_journal_entry_m_appuser` (`createdby_id`), + KEY `FK_acc_gl_journal_entry_m_appuser_2` (`lastmodifiedby_id`), + KEY `FK_acc_gl_journal_entry_acc_gl_journal_entry` (`reversal_id`), + KEY `FK_acc_gl_journal_entry_acc_gl_account` (`account_id`), + CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_account` FOREIGN KEY (`account_id`) REFERENCES `acc_gl_account` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_journal_entry` FOREIGN KEY (`reversal_id`) REFERENCES `acc_gl_journal_entry` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -148,10 +252,12 @@ CREATE TABLE `acc_gl_journal_entry` ( -- Dumping data for table `acc_gl_journal_entry` -- -LOCK TABLES `acc_gl_journal_entry` WRITE; +LOCK +TABLES `acc_gl_journal_entry` WRITE; /*!40000 ALTER TABLE `acc_gl_journal_entry` DISABLE KEYS */; /*!40000 ALTER TABLE `acc_gl_journal_entry` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `acc_product_mapping` @@ -160,13 +266,14 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `acc_product_mapping`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_product_mapping` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `gl_account_id` BIGINT DEFAULT NULL, - `product_id` BIGINT DEFAULT NULL, - `product_type` SMALLINT DEFAULT NULL, - `financial_account_type` SMALLINT DEFAULT NULL, - PRIMARY KEY (`id`) +CREATE TABLE `acc_product_mapping` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `gl_account_id` BIGINT DEFAULT NULL, + `product_id` BIGINT DEFAULT NULL, + `product_type` SMALLINT DEFAULT NULL, + `financial_account_type` SMALLINT DEFAULT NULL, + PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -174,11 +281,19 @@ CREATE TABLE `acc_product_mapping` ( -- Dumping data for table `acc_product_mapping` -- -LOCK TABLES `acc_product_mapping` WRITE; +LOCK +TABLES `acc_product_mapping` WRITE; /*!40000 ALTER TABLE `acc_product_mapping` DISABLE KEYS */; -INSERT INTO `acc_product_mapping` VALUES (1,4,1,1,1),(2,8,1,1,2),(3,34,1,1,3),(4,37,1,1,4),(5,35,1,1,5),(6,97,1,1,6); +INSERT INTO `acc_product_mapping` +VALUES (1, 4, 1, 1, 1), + (2, 8, 1, 1, 2), + (3, 34, 1, 1, 3), + (4, 37, 1, 1, 4), + (5, 35, 1, 1, 5), + (6, 97, 1, 1, 6); /*!40000 ALTER TABLE `acc_product_mapping` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `c_configuration` @@ -187,11 +302,12 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `c_configuration`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `c_configuration` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(50) DEFAULT NULL, - `enabled` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) +CREATE TABLE `c_configuration` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(50) DEFAULT NULL, + `enabled` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -199,11 +315,14 @@ CREATE TABLE `c_configuration` ( -- Dumping data for table `c_configuration` -- -LOCK TABLES `c_configuration` WRITE; +LOCK +TABLES `c_configuration` WRITE; /*!40000 ALTER TABLE `c_configuration` DISABLE KEYS */; -INSERT INTO `c_configuration` VALUES (1,'maker-checker',0); +INSERT INTO `c_configuration` +VALUES (1, 'maker-checker', 0); /*!40000 ALTER TABLE `c_configuration` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `client additional data` @@ -212,47 +331,48 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `client additional data`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `client additional data` ( - `client_id` BIGINT NOT NULL, - `Gender_cd` INT NOT NULL, - `Date of Birth` date NOT NULL, - `Home address` text NOT NULL, - `Telephone number` varchar(20) NOT NULL, - `Telephone number (2nd)` varchar(20) NOT NULL, - `Email address` varchar(50) NOT NULL, - `EducationLevel_cd` INT NOT NULL, - `MaritalStatus_cd` INT NOT NULL, - `Number of children` INT NOT NULL, - `Citizenship` varchar(50) NOT NULL, - `PovertyStatus_cd` INT NOT NULL, - `YesNo_cd_Employed` INT NOT NULL, - `FieldOfEmployment_cd_Field of employment` INT DEFAULT NULL, - `Employer name` varchar(50) DEFAULT NULL, - `Number of years` INT DEFAULT NULL, - `Monthly salary` decimal(19,6) DEFAULT NULL, - `YesNo_cd_Self employed` INT NOT NULL, - `FieldOfEmployment_cd_Field of self-employment` INT DEFAULT NULL, - `Business address` text, - `Number of employees` INT DEFAULT NULL, - `Monthly salaries paid` decimal(19,6) DEFAULT NULL, - `Monthly net income of business activity` decimal(19,6) DEFAULT NULL, - `Monthly rent` decimal(19,6) DEFAULT NULL, - `Other income generating activities` varchar(100) DEFAULT NULL, - `YesNo_cd_Bookkeeping` INT DEFAULT NULL, - `YesNo_cd_Loans with other institutions` INT NOT NULL, - `From whom` varchar(100) DEFAULT NULL, - `Amount` decimal(19,6) DEFAULT NULL, - `Interest rate pa` decimal(19,6) DEFAULT NULL, - `Number of people depending on overal income` INT NOT NULL, - `YesNo_cd_Bank account` INT NOT NULL, - `YesNo_cd_Business plan provided` INT NOT NULL, - `YesNo_cd_Access to internet` INT DEFAULT NULL, - `Introduced by` varchar(100) DEFAULT NULL, - `Known to introducer since` varchar(100) NOT NULL, - `Last visited by` varchar(100) DEFAULT NULL, - `Last visited on` date NOT NULL, - PRIMARY KEY (`client_id`), - CONSTRAINT `FK_client_additional_data` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `client additional data` +( + `client_id` BIGINT NOT NULL, + `Gender_cd` INT NOT NULL, + `Date of Birth` date NOT NULL, + `Home address` text NOT NULL, + `Telephone number` varchar(20) NOT NULL, + `Telephone number (2nd)` varchar(20) NOT NULL, + `Email address` varchar(50) NOT NULL, + `EducationLevel_cd` INT NOT NULL, + `MaritalStatus_cd` INT NOT NULL, + `Number of children` INT NOT NULL, + `Citizenship` varchar(50) NOT NULL, + `PovertyStatus_cd` INT NOT NULL, + `YesNo_cd_Employed` INT NOT NULL, + `FieldOfEmployment_cd_Field of employment` INT DEFAULT NULL, + `Employer name` varchar(50) DEFAULT NULL, + `Number of years` INT DEFAULT NULL, + `Monthly salary` decimal(19, 6) DEFAULT NULL, + `YesNo_cd_Self employed` INT NOT NULL, + `FieldOfEmployment_cd_Field of self-employment` INT DEFAULT NULL, + `Business address` text, + `Number of employees` INT DEFAULT NULL, + `Monthly salaries paid` decimal(19, 6) DEFAULT NULL, + `Monthly net income of business activity` decimal(19, 6) DEFAULT NULL, + `Monthly rent` decimal(19, 6) DEFAULT NULL, + `Other income generating activities` varchar(100) DEFAULT NULL, + `YesNo_cd_Bookkeeping` INT DEFAULT NULL, + `YesNo_cd_Loans with other institutions` INT NOT NULL, + `From whom` varchar(100) DEFAULT NULL, + `Amount` decimal(19, 6) DEFAULT NULL, + `Interest rate pa` decimal(19, 6) DEFAULT NULL, + `Number of people depending on overal income` INT NOT NULL, + `YesNo_cd_Bank account` INT NOT NULL, + `YesNo_cd_Business plan provided` INT NOT NULL, + `YesNo_cd_Access to internet` INT DEFAULT NULL, + `Introduced by` varchar(100) DEFAULT NULL, + `Known to introducer since` varchar(100) NOT NULL, + `Last visited by` varchar(100) DEFAULT NULL, + `Last visited on` date NOT NULL, + PRIMARY KEY (`client_id`), + CONSTRAINT `FK_client_additional_data` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -260,10 +380,12 @@ CREATE TABLE `client additional data` ( -- Dumping data for table `client additional data` -- -LOCK TABLES `client additional data` WRITE; +LOCK +TABLES `client additional data` WRITE; /*!40000 ALTER TABLE `client additional data` DISABLE KEYS */; /*!40000 ALTER TABLE `client additional data` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `impact measurement` @@ -272,17 +394,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `impact measurement`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `impact measurement` ( - `loan_id` BIGINT NOT NULL, - `YesNo_cd_RepaidOnSchedule` INT NOT NULL, - `ReasonNotRepaidOnSchedule` text, - `How was Loan Amount Invested` text NOT NULL, - `Additional Income Generated` decimal(19,6) NOT NULL, - `Additional Income Used For` text NOT NULL, - `YesNo_cd_NewJobsCreated` INT NOT NULL, - `Number of Jobs Created` BIGINT DEFAULT NULL, - PRIMARY KEY (`loan_id`), - CONSTRAINT `FK_impact measurement` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +CREATE TABLE `impact measurement` +( + `loan_id` BIGINT NOT NULL, + `YesNo_cd_RepaidOnSchedule` INT NOT NULL, + `ReasonNotRepaidOnSchedule` text, + `How was Loan Amount Invested` text NOT NULL, + `Additional Income Generated` decimal(19, 6) NOT NULL, + `Additional Income Used For` text NOT NULL, + `YesNo_cd_NewJobsCreated` INT NOT NULL, + `Number of Jobs Created` BIGINT DEFAULT NULL, + PRIMARY KEY (`loan_id`), + CONSTRAINT `FK_impact measurement` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -290,10 +413,12 @@ CREATE TABLE `impact measurement` ( -- Dumping data for table `impact measurement` -- -LOCK TABLES `impact measurement` WRITE; +LOCK +TABLES `impact measurement` WRITE; /*!40000 ALTER TABLE `impact measurement` DISABLE KEYS */; /*!40000 ALTER TABLE `impact measurement` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `loan additional data` @@ -302,18 +427,19 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `loan additional data`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `loan additional data` ( - `loan_id` BIGINT NOT NULL, - `PurposeOfLoan_cd` INT NOT NULL, - `CollateralType_cd` INT NOT NULL, - `Collateral notes` text NOT NULL, - `YesNo_cd_Guarantor` INT NOT NULL, - `Guarantor name` varchar(100) DEFAULT NULL, - `Guarantor relation` varchar(100) DEFAULT NULL, - `Guarantor address` varchar(100) DEFAULT NULL, - `Guarantor telephone number` varchar(20) DEFAULT NULL, - PRIMARY KEY (`loan_id`), - CONSTRAINT `FK_loan_additional_data` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +CREATE TABLE `loan additional data` +( + `loan_id` BIGINT NOT NULL, + `PurposeOfLoan_cd` INT NOT NULL, + `CollateralType_cd` INT NOT NULL, + `Collateral notes` text NOT NULL, + `YesNo_cd_Guarantor` INT NOT NULL, + `Guarantor name` varchar(100) DEFAULT NULL, + `Guarantor relation` varchar(100) DEFAULT NULL, + `Guarantor address` varchar(100) DEFAULT NULL, + `Guarantor telephone number` varchar(20) DEFAULT NULL, + PRIMARY KEY (`loan_id`), + CONSTRAINT `FK_loan_additional_data` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -321,10 +447,12 @@ CREATE TABLE `loan additional data` ( -- Dumping data for table `loan additional data` -- -LOCK TABLES `loan additional data` WRITE; +LOCK +TABLES `loan additional data` WRITE; /*!40000 ALTER TABLE `loan additional data` DISABLE KEYS */; /*!40000 ALTER TABLE `loan additional data` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_appuser` @@ -333,24 +461,25 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_appuser`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_appuser` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `is_deleted` tinyint NOT NULL DEFAULT '0', - `office_id` BIGINT DEFAULT NULL, - `username` varchar(100) NOT NULL, - `firstname` varchar(100) NOT NULL, - `lastname` varchar(100) NOT NULL, - `password` varchar(255) NOT NULL, - `email` varchar(100) NOT NULL, - `firsttime_login_remaining` bit(1) NOT NULL, - `nonexpired` bit(1) NOT NULL, - `nonlocked` bit(1) NOT NULL, - `nonexpired_credentials` bit(1) NOT NULL, - `enabled` bit(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `username_org` (`username`), - KEY `FKB3D587CE0DD567A` (`office_id`), - CONSTRAINT `FKB3D587CE0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `m_appuser` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `is_deleted` tinyint NOT NULL DEFAULT '0', + `office_id` BIGINT DEFAULT NULL, + `username` varchar(100) NOT NULL, + `firstname` varchar(100) NOT NULL, + `lastname` varchar(100) NOT NULL, + `password` varchar(255) NOT NULL, + `email` varchar(100) NOT NULL, + `firsttime_login_remaining` bit(1) NOT NULL, + `nonexpired` bit(1) NOT NULL, + `nonlocked` bit(1) NOT NULL, + `nonexpired_credentials` bit(1) NOT NULL, + `enabled` bit(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `username_org` (`username`), + KEY `FKB3D587CE0DD567A` (`office_id`), + CONSTRAINT `FKB3D587CE0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -358,11 +487,18 @@ CREATE TABLE `m_appuser` ( -- Dumping data for table `m_appuser` -- -LOCK TABLES `m_appuser` WRITE; +LOCK +TABLES `m_appuser` WRITE; /*!40000 ALTER TABLE `m_appuser` DISABLE KEYS */; -INSERT INTO `m_appuser` VALUES (1,0,1,'admin','App','Administrator','5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a','demomfi@mifos.org','\0','','','',''),(2,0,1,'keithwoodlock','Keith','Woodlock','4f607e9b6cffbe7d3db92d4bfa3391c7aa751727b4ea29d08fddf9dd72e6e7e3','keithwoodlock@gmail.com','\0','','','',''); +INSERT INTO `m_appuser` +VALUES (1, 0, 1, 'admin', 'App', 'Administrator', '5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a', + 'demomfi@mifos.org', '\0', '', '', '', ''), + (2, 0, 1, 'keithwoodlock', 'Keith', 'Woodlock', + '4f607e9b6cffbe7d3db92d4bfa3391c7aa751727b4ea29d08fddf9dd72e6e7e3', 'keithwoodlock@gmail.com', '\0', '', '', + '', ''); /*!40000 ALTER TABLE `m_appuser` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_appuser_role` @@ -371,14 +507,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_appuser_role`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_appuser_role` ( - `appuser_id` BIGINT NOT NULL, - `role_id` BIGINT NOT NULL, - PRIMARY KEY (`appuser_id`,`role_id`), - KEY `FK7662CE59B4100309` (`appuser_id`), - KEY `FK7662CE5915CEC7AB` (`role_id`), - CONSTRAINT `FK7662CE5915CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`), - CONSTRAINT `FK7662CE59B4100309` FOREIGN KEY (`appuser_id`) REFERENCES `m_appuser` (`id`) +CREATE TABLE `m_appuser_role` +( + `appuser_id` BIGINT NOT NULL, + `role_id` BIGINT NOT NULL, + PRIMARY KEY (`appuser_id`, `role_id`), + KEY `FK7662CE59B4100309` (`appuser_id`), + KEY `FK7662CE5915CEC7AB` (`role_id`), + CONSTRAINT `FK7662CE5915CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`), + CONSTRAINT `FK7662CE59B4100309` FOREIGN KEY (`appuser_id`) REFERENCES `m_appuser` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -386,11 +523,15 @@ CREATE TABLE `m_appuser_role` ( -- Dumping data for table `m_appuser_role` -- -LOCK TABLES `m_appuser_role` WRITE; +LOCK +TABLES `m_appuser_role` WRITE; /*!40000 ALTER TABLE `m_appuser_role` DISABLE KEYS */; -INSERT INTO `m_appuser_role` VALUES (1,1),(2,1); +INSERT INTO `m_appuser_role` +VALUES (1, 1), + (2, 1); /*!40000 ALTER TABLE `m_appuser_role` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_calendar` @@ -399,25 +540,26 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_calendar`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_calendar` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `title` varchar(50) NOT NULL, - `description` varchar(100) DEFAULT NULL, - `location` varchar(50) DEFAULT NULL, - `start_date` date NOT NULL, - `end_date` date DEFAULT NULL, - `duration` SMALLINT DEFAULT NULL, - `calendar_type_enum` SMALLINT NOT NULL, - `repeating` tinyint NOT NULL DEFAULT '0', - `recurrence` varchar(100) DEFAULT NULL, - `remind_by_enum` SMALLINT DEFAULT NULL, - `first_reminder` smallint DEFAULT NULL, - `second_reminder` smallint DEFAULT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - PRIMARY KEY (`id`) +CREATE TABLE `m_calendar` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `title` varchar(50) NOT NULL, + `description` varchar(100) DEFAULT NULL, + `location` varchar(50) DEFAULT NULL, + `start_date` date NOT NULL, + `end_date` date DEFAULT NULL, + `duration` SMALLINT DEFAULT NULL, + `calendar_type_enum` SMALLINT NOT NULL, + `repeating` tinyint NOT NULL DEFAULT '0', + `recurrence` varchar(100) DEFAULT NULL, + `remind_by_enum` SMALLINT DEFAULT NULL, + `first_reminder` smallint DEFAULT NULL, + `second_reminder` smallint DEFAULT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -425,10 +567,12 @@ CREATE TABLE `m_calendar` ( -- Dumping data for table `m_calendar` -- -LOCK TABLES `m_calendar` WRITE; +LOCK +TABLES `m_calendar` WRITE; /*!40000 ALTER TABLE `m_calendar` DISABLE KEYS */; /*!40000 ALTER TABLE `m_calendar` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_calendar_instance` @@ -437,14 +581,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_calendar_instance`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_calendar_instance` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `calendar_id` BIGINT NOT NULL, - `entity_id` BIGINT NOT NULL, - `entity_type_enum` SMALLINT NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_calendar_m_calendar_instance` (`calendar_id`), - CONSTRAINT `FK_m_calendar_m_calendar_instance` FOREIGN KEY (`calendar_id`) REFERENCES `m_calendar` (`id`) +CREATE TABLE `m_calendar_instance` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `calendar_id` BIGINT NOT NULL, + `entity_id` BIGINT NOT NULL, + `entity_type_enum` SMALLINT NOT NULL, + PRIMARY KEY (`id`), + KEY `FK_m_calendar_m_calendar_instance` (`calendar_id`), + CONSTRAINT `FK_m_calendar_m_calendar_instance` FOREIGN KEY (`calendar_id`) REFERENCES `m_calendar` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -452,10 +597,12 @@ CREATE TABLE `m_calendar_instance` ( -- Dumping data for table `m_calendar_instance` -- -LOCK TABLES `m_calendar_instance` WRITE; +LOCK +TABLES `m_calendar_instance` WRITE; /*!40000 ALTER TABLE `m_calendar_instance` DISABLE KEYS */; /*!40000 ALTER TABLE `m_calendar_instance` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_charge` @@ -464,19 +611,20 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_charge`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_charge` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL, - `currency_code` varchar(3) NOT NULL, - `charge_applies_to_enum` SMALLINT NOT NULL, - `charge_time_enum` SMALLINT NOT NULL, - `charge_calculation_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `is_penalty` tinyint NOT NULL DEFAULT '0', - `is_active` tinyint NOT NULL, - `is_deleted` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`) +CREATE TABLE `m_charge` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(100) DEFAULT NULL, + `currency_code` varchar(3) NOT NULL, + `charge_applies_to_enum` SMALLINT NOT NULL, + `charge_time_enum` SMALLINT NOT NULL, + `charge_calculation_enum` SMALLINT NOT NULL, + `amount` decimal(19, 6) NOT NULL, + `is_penalty` tinyint NOT NULL DEFAULT '0', + `is_active` tinyint NOT NULL, + `is_deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -484,11 +632,14 @@ CREATE TABLE `m_charge` ( -- Dumping data for table `m_charge` -- -LOCK TABLES `m_charge` WRITE; +LOCK +TABLES `m_charge` WRITE; /*!40000 ALTER TABLE `m_charge` DISABLE KEYS */; -INSERT INTO `m_charge` VALUES (1,'Bank Fee (per installment)','UGX',1,2,1,'1500.000000',0,1,0); +INSERT INTO `m_charge` +VALUES (1, 'Bank Fee (per installment)', 'UGX', 1, 2, 1, '1500.000000', 0, 1, 0); /*!40000 ALTER TABLE `m_charge` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_client` @@ -497,24 +648,25 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_client`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_client` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_no` varchar(20) NOT NULL, - `office_id` BIGINT NOT NULL, - `external_id` varchar(100) DEFAULT NULL, - `firstname` varchar(50) DEFAULT NULL, - `middlename` varchar(50) DEFAULT NULL, - `lastname` varchar(50) DEFAULT NULL, - `fullname` varchar(100) DEFAULT NULL, - `display_name` varchar(100) NOT NULL, - `image_key` varchar(500) DEFAULT NULL, - `joined_date` date DEFAULT NULL, - `is_deleted` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `account_no_UNIQUE` (`account_no`), - UNIQUE KEY `external_id` (`external_id`), - KEY `FKCE00CAB3E0DD567A` (`office_id`), - CONSTRAINT `FKCE00CAB3E0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `m_client` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `account_no` varchar(20) NOT NULL, + `office_id` BIGINT NOT NULL, + `external_id` varchar(100) DEFAULT NULL, + `firstname` varchar(50) DEFAULT NULL, + `middlename` varchar(50) DEFAULT NULL, + `lastname` varchar(50) DEFAULT NULL, + `fullname` varchar(100) DEFAULT NULL, + `display_name` varchar(100) NOT NULL, + `image_key` varchar(500) DEFAULT NULL, + `joined_date` date DEFAULT NULL, + `is_deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `account_no_UNIQUE` (`account_no`), + UNIQUE KEY `external_id` (`external_id`), + KEY `FKCE00CAB3E0DD567A` (`office_id`), + CONSTRAINT `FKCE00CAB3E0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -522,11 +674,14 @@ CREATE TABLE `m_client` ( -- Dumping data for table `m_client` -- -LOCK TABLES `m_client` WRITE; +LOCK +TABLES `m_client` WRITE; /*!40000 ALTER TABLE `m_client` DISABLE KEYS */; -INSERT INTO `m_client` VALUES (1,'000000001',2,NULL,'Test',NULL,'One',NULL,'Test One',NULL,'2011-02-01',0); +INSERT INTO `m_client` +VALUES (1, '000000001', 2, NULL, 'Test', NULL, 'One', NULL, 'Test One', NULL, '2011-02-01', 0); /*!40000 ALTER TABLE `m_client` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_client_identifier` @@ -535,23 +690,24 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_client_identifier`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_client_identifier` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `document_type_id` INT NOT NULL, - `document_key` varchar(50) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `unique_identifier_key` (`document_type_id`,`document_key`), - UNIQUE KEY `unique_client_identifier` (`client_id`,`document_type_id`), - KEY `FK_m_client_document_m_client` (`client_id`), - KEY `FK_m_client_document_m_code_value` (`document_type_id`), - CONSTRAINT `FK_m_client_document_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FK_m_client_document_m_code_value` FOREIGN KEY (`document_type_id`) REFERENCES `m_code_value` (`id`) +CREATE TABLE `m_client_identifier` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `client_id` BIGINT NOT NULL, + `document_type_id` INT NOT NULL, + `document_key` varchar(50) NOT NULL, + `description` varchar(500) DEFAULT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_identifier_key` (`document_type_id`,`document_key`), + UNIQUE KEY `unique_client_identifier` (`client_id`,`document_type_id`), + KEY `FK_m_client_document_m_client` (`client_id`), + KEY `FK_m_client_document_m_code_value` (`document_type_id`), + CONSTRAINT `FK_m_client_document_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), + CONSTRAINT `FK_m_client_document_m_code_value` FOREIGN KEY (`document_type_id`) REFERENCES `m_code_value` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -559,10 +715,12 @@ CREATE TABLE `m_client_identifier` ( -- Dumping data for table `m_client_identifier` -- -LOCK TABLES `m_client_identifier` WRITE; +LOCK +TABLES `m_client_identifier` WRITE; /*!40000 ALTER TABLE `m_client_identifier` DISABLE KEYS */; /*!40000 ALTER TABLE `m_client_identifier` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_code` @@ -571,12 +729,13 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_code`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_code` ( - `id` INT NOT NULL AUTO_INCREMENT, - `code_name` varchar(100) DEFAULT NULL, - `is_system_defined` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `code_name` (`code_name`) +CREATE TABLE `m_code` +( + `id` INT NOT NULL AUTO_INCREMENT, + `code_name` varchar(100) DEFAULT NULL, + `is_system_defined` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `code_name` (`code_name`) ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -584,11 +743,23 @@ CREATE TABLE `m_code` ( -- Dumping data for table `m_code` -- -LOCK TABLES `m_code` WRITE; +LOCK +TABLES `m_code` WRITE; /*!40000 ALTER TABLE `m_code` DISABLE KEYS */; -INSERT INTO `m_code` VALUES (1,'Customer Identifier',1),(2,'LoanCollateral',1),(3,'LoanPurpose',1),(4,'Gender',1),(5,'YesNo',1),(6,'GuarantorRelationship',1),(7,'FieldOfEmployment',0),(8,'EducationLevel',0),(9,'MaritalStatus',0),(10,'PovertyStatus',0); +INSERT INTO `m_code` +VALUES (1, 'Customer Identifier', 1), + (2, 'LoanCollateral', 1), + (3, 'LoanPurpose', 1), + (4, 'Gender', 1), + (5, 'YesNo', 1), + (6, 'GuarantorRelationship', 1), + (7, 'FieldOfEmployment', 0), + (8, 'EducationLevel', 0), + (9, 'MaritalStatus', 0), + (10, 'PovertyStatus', 0); /*!40000 ALTER TABLE `m_code` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_code_value` @@ -597,15 +768,16 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_code_value`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_code_value` ( - `id` INT NOT NULL AUTO_INCREMENT, - `code_id` INT NOT NULL, - `code_value` varchar(100) DEFAULT NULL, - `order_position` INT NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `code_value` (`code_id`,`code_value`), - KEY `FKCFCEA42640BE071Z` (`code_id`), - CONSTRAINT `FKCFCEA42640BE071Z` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`) +CREATE TABLE `m_code_value` +( + `id` INT NOT NULL AUTO_INCREMENT, + `code_id` INT NOT NULL, + `code_value` varchar(100) DEFAULT NULL, + `order_position` INT NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `code_value` (`code_id`,`code_value`), + KEY `FKCFCEA42640BE071Z` (`code_id`), + CONSTRAINT `FKCFCEA42640BE071Z` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -613,11 +785,44 @@ CREATE TABLE `m_code_value` ( -- Dumping data for table `m_code_value` -- -LOCK TABLES `m_code_value` WRITE; +LOCK +TABLES `m_code_value` WRITE; /*!40000 ALTER TABLE `m_code_value` DISABLE KEYS */; -INSERT INTO `m_code_value` VALUES (1,1,'Passport',1),(2,1,'Id',2),(3,1,'Drivers License',3),(4,1,'Any Other Id Type',4),(5,6,'Spouse',0),(6,6,'Parent',0),(7,6,'Sibling',0),(8,6,'Business Associate',0),(9,6,'Other',0),(10,7,'option.Banker',1),(11,7,'option.SoftwareDeveloper',10),(12,8,'option.University',1),(13,8,'option.Secondary',12),(14,8,'option.Primary',13),(15,9,'option.Married',1),(16,9,'option.Single',15),(17,9,'option.Divorced',16),(18,9,'option.Widow',17),(19,10,'option.PovertyStatus.Band1',1),(20,10,'option.PovertyStatus.Band2',19),(21,10,'option.PovertyStatus.Band3',20),(22,2,'option.House',1),(23,2,'option.Television',22),(24,2,'option.Gold',23),(25,3,'option.Agriculture',1),(26,3,'option.Manufacturing',25),(27,3,'option.HousingImprovement',26),(28,4,'option.Male',1),(29,4,'option.Female',28),(30,5,'option.Yes',1),(31,5,'option.No',30); +INSERT INTO `m_code_value` +VALUES (1, 1, 'Passport', 1), + (2, 1, 'Id', 2), + (3, 1, 'Drivers License', 3), + (4, 1, 'Any Other Id Type', 4), + (5, 6, 'Spouse', 0), + (6, 6, 'Parent', 0), + (7, 6, 'Sibling', 0), + (8, 6, 'Business Associate', 0), + (9, 6, 'Other', 0), + (10, 7, 'option.Banker', 1), + (11, 7, 'option.SoftwareDeveloper', 10), + (12, 8, 'option.University', 1), + (13, 8, 'option.Secondary', 12), + (14, 8, 'option.Primary', 13), + (15, 9, 'option.Married', 1), + (16, 9, 'option.Single', 15), + (17, 9, 'option.Divorced', 16), + (18, 9, 'option.Widow', 17), + (19, 10, 'option.PovertyStatus.Band1', 1), + (20, 10, 'option.PovertyStatus.Band2', 19), + (21, 10, 'option.PovertyStatus.Band3', 20), + (22, 2, 'option.House', 1), + (23, 2, 'option.Television', 22), + (24, 2, 'option.Gold', 23), + (25, 3, 'option.Agriculture', 1), + (26, 3, 'option.Manufacturing', 25), + (27, 3, 'option.HousingImprovement', 26), + (28, 4, 'option.Male', 1), + (29, 4, 'option.Female', 28), + (30, 5, 'option.Yes', 1), + (31, 5, 'option.No', 30); /*!40000 ALTER TABLE `m_code_value` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_currency` @@ -626,15 +831,16 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_currency`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_currency` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `code` varchar(3) NOT NULL, - `decimal_places` SMALLINT NOT NULL, - `display_symbol` varchar(10) DEFAULT NULL, - `name` varchar(50) NOT NULL, - `internationalized_name_code` varchar(50) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `code` (`code`) +CREATE TABLE `m_currency` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `code` varchar(3) NOT NULL, + `decimal_places` SMALLINT NOT NULL, + `display_symbol` varchar(10) DEFAULT NULL, + `name` varchar(50) NOT NULL, + `internationalized_name_code` varchar(50) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=164 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -642,9 +848,151 @@ CREATE TABLE `m_currency` ( -- Dumping data for table `m_currency` -- -LOCK TABLES `m_currency` WRITE; +LOCK +TABLES `m_currency` WRITE; /*!40000 ALTER TABLE `m_currency` DISABLE KEYS */; -INSERT INTO `m_currency` VALUES (1,'AED',2,NULL,'UAE Dirham','currency.AED'),(2,'AFN',2,NULL,'Afghanistan Afghani','currency.AFN'),(3,'ALL',2,NULL,'Albanian Lek','currency.ALL'),(4,'AMD',2,NULL,'Armenian Dram','currency.AMD'),(5,'ANG',2,NULL,'Netherlands Antillian Guilder','currency.ANG'),(6,'AOA',2,NULL,'Angolan Kwanza','currency.AOA'),(7,'ARS',2,'$','Argentine Peso','currency.ARS'),(8,'AUD',2,'A$','Australian Dollar','currency.AUD'),(9,'AWG',2,NULL,'Aruban Guilder','currency.AWG'),(10,'AZM',2,NULL,'Azerbaijanian Manat','currency.AZM'),(11,'BAM',2,NULL,'Bosnia and Herzegovina Convertible Marks','currency.BAM'),(12,'BBD',2,NULL,'Barbados Dollar','currency.BBD'),(13,'BDT',2,NULL,'Bangladesh Taka','currency.BDT'),(14,'BGN',2,NULL,'Bulgarian Lev','currency.BGN'),(15,'BHD',3,NULL,'Bahraini Dinar','currency.BHD'),(16,'BIF',0,NULL,'Burundi Franc','currency.BIF'),(17,'BMD',2,NULL,'Bermudian Dollar','currency.BMD'),(18,'BND',2,'B$','Brunei Dollar','currency.BND'),(19,'BOB',2,'Bs.','Bolivian Boliviano','currency.BOB'),(20,'BRL',2,'R$','Brazilian Real','currency.BRL'),(21,'BSD',2,NULL,'Bahamian Dollar','currency.BSD'),(22,'BTN',2,NULL,'Bhutan Ngultrum','currency.BTN'),(23,'BWP',2,NULL,'Botswana Pula','currency.BWP'),(24,'BYR',0,NULL,'Belarussian Ruble','currency.BYR'),(25,'BZD',2,'BZ$','Belize Dollar','currency.BZD'),(26,'CAD',2,NULL,'Canadian Dollar','currency.CAD'),(27,'CDF',2,NULL,'Franc Congolais','currency.CDF'),(28,'CHF',2,NULL,'Swiss Franc','currency.CHF'),(29,'CLP',0,'$','Chilean Peso','currency.CLP'),(30,'CNY',2,NULL,'Chinese Yuan Renminbi','currency.CNY'),(31,'COP',2,'$','Colombian Peso','currency.COP'),(32,'CRC',2,'₡','Costa Rican Colon','currency.CRC'),(33,'CSD',2,NULL,'Serbian Dinar','currency.CSD'),(34,'CUP',2,'$MN','Cuban Peso','currency.CUP'),(35,'CVE',2,NULL,'Cape Verde Escudo','currency.CVE'),(36,'CYP',2,NULL,'Cyprus Pound','currency.CYP'),(37,'CZK',2,NULL,'Czech Koruna','currency.CZK'),(38,'DJF',0,NULL,'Djibouti Franc','currency.DJF'),(39,'DKK',2,NULL,'Danish Krone','currency.DKK'),(40,'DOP',2,'RD$','Dominican Peso','currency.DOP'),(41,'DZD',2,NULL,'Algerian Dinar','currency.DZD'),(42,'EEK',2,NULL,'Estonian Kroon','currency.EEK'),(43,'EGP',2,NULL,'Egyptian Pound','currency.EGP'),(44,'ERN',2,NULL,'Eritrea Nafka','currency.ERN'),(45,'ETB',2,NULL,'Ethiopian Birr','currency.ETB'),(46,'EUR',2,'€','Euro','currency.EUR'),(47,'FJD',2,NULL,'Fiji Dollar','currency.FJD'),(48,'FKP',2,NULL,'Falkland Islands Pound','currency.FKP'),(49,'GBP',2,NULL,'Pound Sterling','currency.GBP'),(50,'GEL',2,NULL,'Georgian Lari','currency.GEL'),(51,'GHC',2,'GHc','Ghana Cedi','currency.GHC'),(52,'GIP',2,NULL,'Gibraltar Pound','currency.GIP'),(53,'GMD',2,NULL,'Gambian Dalasi','currency.GMD'),(54,'GNF',0,NULL,'Guinea Franc','currency.GNF'),(55,'GTQ',2,'Q','Guatemala Quetzal','currency.GTQ'),(56,'GYD',2,NULL,'Guyana Dollar','currency.GYD'),(57,'HKD',2,NULL,'Hong Kong Dollar','currency.HKD'),(58,'HNL',2,'L','Honduras Lempira','currency.HNL'),(59,'HRK',2,NULL,'Croatian Kuna','currency.HRK'),(60,'HTG',2,'G','Haiti Gourde','currency.HTG'),(61,'HUF',2,NULL,'Hungarian Forint','currency.HUF'),(62,'IDR',2,NULL,'Indonesian Rupiah','currency.IDR'),(63,'ILS',2,NULL,'New Israeli Shekel','currency.ILS'),(64,'INR',2,'₹','Indian Rupee','currency.INR'),(65,'IQD',3,NULL,'Iraqi Dinar','currency.IQD'),(66,'IRR',2,NULL,'Iranian Rial','currency.IRR'),(67,'ISK',0,NULL,'Iceland Krona','currency.ISK'),(68,'JMD',2,NULL,'Jamaican Dollar','currency.JMD'),(69,'JOD',3,NULL,'Jordanian Dinar','currency.JOD'),(70,'JPY',0,NULL,'Japanese Yen','currency.JPY'),(71,'KES',2,'KSh','Kenyan Shilling','currency.KES'),(72,'KGS',2,NULL,'Kyrgyzstan Som','currency.KGS'),(73,'KHR',2,NULL,'Cambodia Riel','currency.KHR'),(74,'KMF',0,NULL,'Comoro Franc','currency.KMF'),(75,'KPW',2,NULL,'North Korean Won','currency.KPW'),(76,'KRW',0,NULL,'Korean Won','currency.KRW'),(77,'KWD',3,NULL,'Kuwaiti Dinar','currency.KWD'),(78,'KYD',2,NULL,'Cayman Islands Dollar','currency.KYD'),(79,'KZT',2,NULL,'Kazakhstan Tenge','currency.KZT'),(80,'LAK',2,NULL,'Lao Kip','currency.LAK'),(81,'LBP',2,'L£','Lebanese Pound','currency.LBP'),(82,'LKR',2,NULL,'Sri Lanka Rupee','currency.LKR'),(83,'LRD',2,NULL,'Liberian Dollar','currency.LRD'),(84,'LSL',2,NULL,'Lesotho Loti','currency.LSL'),(85,'LTL',2,NULL,'Lithuanian Litas','currency.LTL'),(86,'LVL',2,NULL,'Latvian Lats','currency.LVL'),(87,'LYD',3,NULL,'Libyan Dinar','currency.LYD'),(88,'MAD',2,NULL,'Moroccan Dirham','currency.MAD'),(89,'MDL',2,NULL,'Moldovan Leu','currency.MDL'),(90,'MGA',2,NULL,'Malagasy Ariary','currency.MGA'),(91,'MKD',2,NULL,'Macedonian Denar','currency.MKD'),(92,'MMK',2,'K','Myanmar Kyat','currency.MMK'),(93,'MNT',2,NULL,'Mongolian Tugrik','currency.MNT'),(94,'MOP',2,NULL,'Macau Pataca','currency.MOP'),(95,'MRO',2,NULL,'Mauritania Ouguiya','currency.MRO'),(96,'MTL',2,NULL,'Maltese Lira','currency.MTL'),(97,'MUR',2,NULL,'Mauritius Rupee','currency.MUR'),(98,'MVR',2,NULL,'Maldives Rufiyaa','currency.MVR'),(99,'MWK',2,NULL,'Malawi Kwacha','currency.MWK'),(100,'MXN',2,'$','Mexican Peso','currency.MXN'),(101,'MYR',2,NULL,'Malaysian Ringgit','currency.MYR'),(102,'MZM',2,NULL,'Mozambique Metical','currency.MZM'),(103,'NAD',2,NULL,'Namibia Dollar','currency.NAD'),(104,'NGN',2,NULL,'Nigerian Naira','currency.NGN'),(105,'NIO',2,'C$','Nicaragua Cordoba Oro','currency.NIO'),(106,'NOK',2,NULL,'Norwegian Krone','currency.NOK'),(107,'NPR',2,NULL,'Nepalese Rupee','currency.NPR'),(108,'NZD',2,NULL,'New Zealand Dollar','currency.NZD'),(109,'OMR',3,NULL,'Rial Omani','currency.OMR'),(110,'PAB',2,'B/.','Panama Balboa','currency.PAB'),(111,'PEN',2,'S/.','Peruvian Nuevo Sol','currency.PEN'),(112,'PGK',2,NULL,'Papua New Guinea Kina','currency.PGK'),(113,'PHP',2,NULL,'Philippine Peso','currency.PHP'),(114,'PKR',2,NULL,'Pakistan Rupee','currency.PKR'),(115,'PLN',2,NULL,'Polish Zloty','currency.PLN'),(116,'PYG',0,'₲','Paraguayan Guarani','currency.PYG'),(117,'QAR',2,NULL,'Qatari Rial','currency.QAR'),(118,'RON',2,NULL,'Romanian Leu','currency.RON'),(119,'RUB',2,NULL,'Russian Ruble','currency.RUB'),(120,'RWF',0,NULL,'Rwanda Franc','currency.RWF'),(121,'SAR',2,NULL,'Saudi Riyal','currency.SAR'),(122,'SBD',2,NULL,'Solomon Islands Dollar','currency.SBD'),(123,'SCR',2,NULL,'Seychelles Rupee','currency.SCR'),(124,'SDD',2,NULL,'Sudanese Dinar','currency.SDD'),(125,'SEK',2,NULL,'Swedish Krona','currency.SEK'),(126,'SGD',2,NULL,'Singapore Dollar','currency.SGD'),(127,'SHP',2,NULL,'St Helena Pound','currency.SHP'),(128,'SIT',2,NULL,'Slovenian Tolar','currency.SIT'),(129,'SKK',2,NULL,'Slovak Koruna','currency.SKK'),(130,'SLL',2,NULL,'Sierra Leone Leone','currency.SLL'),(131,'SOS',2,NULL,'Somali Shilling','currency.SOS'),(132,'SRD',2,NULL,'Surinam Dollar','currency.SRD'),(133,'STD',2,NULL,'Sao Tome and Principe Dobra','currency.STD'),(134,'SVC',2,NULL,'El Salvador Colon','currency.SVC'),(135,'SYP',2,NULL,'Syrian Pound','currency.SYP'),(136,'SZL',2,NULL,'Swaziland Lilangeni','currency.SZL'),(137,'THB',2,NULL,'Thai Baht','currency.THB'),(138,'TJS',2,NULL,'Tajik Somoni','currency.TJS'),(139,'TMM',2,NULL,'Turkmenistan Manat','currency.TMM'),(140,'TND',3,'DT','Tunisian Dinar','currency.TND'),(141,'TOP',2,NULL,'Tonga Pa\'anga','currency.TOP'),(142,'TRY',2,NULL,'Turkish Lira','currency.TRY'),(143,'TTD',2,NULL,'Trinidad and Tobago Dollar','currency.TTD'),(144,'TWD',2,NULL,'New Taiwan Dollar','currency.TWD'),(145,'TZS',2,NULL,'Tanzanian Shilling','currency.TZS'),(146,'UAH',2,NULL,'Ukraine Hryvnia','currency.UAH'),(147,'UGX',2,'USh','Uganda Shilling','currency.UGX'),(148,'USD',2,'$','US Dollar','currency.USD'),(149,'UYU',2,'$U','Peso Uruguayo','currency.UYU'),(150,'UZS',2,NULL,'Uzbekistan Sum','currency.UZS'),(151,'VEB',2,'Bs.F.','Venezuelan Bolivar','currency.VEB'),(152,'VND',2,NULL,'Vietnamese Dong','currency.VND'),(153,'VUV',0,NULL,'Vanuatu Vatu','currency.VUV'),(154,'WST',2,NULL,'Samoa Tala','currency.WST'),(155,'XAF',0,NULL,'CFA Franc BEAC','currency.XAF'),(156,'XCD',2,NULL,'East Caribbean Dollar','currency.XCD'),(157,'XDR',5,NULL,'SDR (Special Drawing Rights)','currency.XDR'),(158,'XOF',0,'CFA','CFA Franc BCEAO','currency.XOF'),(159,'XPF',0,NULL,'CFP Franc','currency.XPF'),(160,'YER',2,NULL,'Yemeni Rial','currency.YER'),(161,'ZAR',2,'R','South African Rand','currency.ZAR'),(162,'ZMK',2,NULL,'Zambian Kwacha','currency.ZMK'),(163,'ZWD',2,NULL,'Zimbabwe Dollar','currency.ZWD'); +INSERT INTO `m_currency` +VALUES (1, 'AED', 2, NULL, 'UAE Dirham', 'currency.AED'), + (2, 'AFN', 2, NULL, 'Afghanistan Afghani', 'currency.AFN'), + (3, 'ALL', 2, NULL, 'Albanian Lek', 'currency.ALL'), + (4, 'AMD', 2, NULL, 'Armenian Dram', 'currency.AMD'), + (5, 'ANG', 2, NULL, 'Netherlands Antillian Guilder', 'currency.ANG'), + (6, 'AOA', 2, NULL, 'Angolan Kwanza', 'currency.AOA'), + (7, 'ARS', 2, '$', 'Argentine Peso', 'currency.ARS'), + (8, 'AUD', 2, 'A$', 'Australian Dollar', 'currency.AUD'), + (9, 'AWG', 2, NULL, 'Aruban Guilder', 'currency.AWG'), + (10, 'AZM', 2, NULL, 'Azerbaijanian Manat', 'currency.AZM'), + (11, 'BAM', 2, NULL, 'Bosnia and Herzegovina Convertible Marks', 'currency.BAM'), + (12, 'BBD', 2, NULL, 'Barbados Dollar', 'currency.BBD'), + (13, 'BDT', 2, NULL, 'Bangladesh Taka', 'currency.BDT'), + (14, 'BGN', 2, NULL, 'Bulgarian Lev', 'currency.BGN'), + (15, 'BHD', 3, NULL, 'Bahraini Dinar', 'currency.BHD'), + (16, 'BIF', 0, NULL, 'Burundi Franc', 'currency.BIF'), + (17, 'BMD', 2, NULL, 'Bermudian Dollar', 'currency.BMD'), + (18, 'BND', 2, 'B$', 'Brunei Dollar', 'currency.BND'), + (19, 'BOB', 2, 'Bs.', 'Bolivian Boliviano', 'currency.BOB'), + (20, 'BRL', 2, 'R$', 'Brazilian Real', 'currency.BRL'), + (21, 'BSD', 2, NULL, 'Bahamian Dollar', 'currency.BSD'), + (22, 'BTN', 2, NULL, 'Bhutan Ngultrum', 'currency.BTN'), + (23, 'BWP', 2, NULL, 'Botswana Pula', 'currency.BWP'), + (24, 'BYR', 0, NULL, 'Belarussian Ruble', 'currency.BYR'), + (25, 'BZD', 2, 'BZ$', 'Belize Dollar', 'currency.BZD'), + (26, 'CAD', 2, NULL, 'Canadian Dollar', 'currency.CAD'), + (27, 'CDF', 2, NULL, 'Franc Congolais', 'currency.CDF'), + (28, 'CHF', 2, NULL, 'Swiss Franc', 'currency.CHF'), + (29, 'CLP', 0, '$', 'Chilean Peso', 'currency.CLP'), + (30, 'CNY', 2, NULL, 'Chinese Yuan Renminbi', 'currency.CNY'), + (31, 'COP', 2, '$', 'Colombian Peso', 'currency.COP'), + (32, 'CRC', 2, '₡', 'Costa Rican Colon', 'currency.CRC'), + (33, 'CSD', 2, NULL, 'Serbian Dinar', 'currency.CSD'), + (34, 'CUP', 2, '$MN', 'Cuban Peso', 'currency.CUP'), + (35, 'CVE', 2, NULL, 'Cape Verde Escudo', 'currency.CVE'), + (36, 'CYP', 2, NULL, 'Cyprus Pound', 'currency.CYP'), + (37, 'CZK', 2, NULL, 'Czech Koruna', 'currency.CZK'), + (38, 'DJF', 0, NULL, 'Djibouti Franc', 'currency.DJF'), + (39, 'DKK', 2, NULL, 'Danish Krone', 'currency.DKK'), + (40, 'DOP', 2, 'RD$', 'Dominican Peso', 'currency.DOP'), + (41, 'DZD', 2, NULL, 'Algerian Dinar', 'currency.DZD'), + (42, 'EEK', 2, NULL, 'Estonian Kroon', 'currency.EEK'), + (43, 'EGP', 2, NULL, 'Egyptian Pound', 'currency.EGP'), + (44, 'ERN', 2, NULL, 'Eritrea Nafka', 'currency.ERN'), + (45, 'ETB', 2, NULL, 'Ethiopian Birr', 'currency.ETB'), + (46, 'EUR', 2, '€', 'Euro', 'currency.EUR'), + (47, 'FJD', 2, NULL, 'Fiji Dollar', 'currency.FJD'), + (48, 'FKP', 2, NULL, 'Falkland Islands Pound', 'currency.FKP'), + (49, 'GBP', 2, NULL, 'Pound Sterling', 'currency.GBP'), + (50, 'GEL', 2, NULL, 'Georgian Lari', 'currency.GEL'), + (51, 'GHC', 2, 'GHc', 'Ghana Cedi', 'currency.GHC'), + (52, 'GIP', 2, NULL, 'Gibraltar Pound', 'currency.GIP'), + (53, 'GMD', 2, NULL, 'Gambian Dalasi', 'currency.GMD'), + (54, 'GNF', 0, NULL, 'Guinea Franc', 'currency.GNF'), + (55, 'GTQ', 2, 'Q', 'Guatemala Quetzal', 'currency.GTQ'), + (56, 'GYD', 2, NULL, 'Guyana Dollar', 'currency.GYD'), + (57, 'HKD', 2, NULL, 'Hong Kong Dollar', 'currency.HKD'), + (58, 'HNL', 2, 'L', 'Honduras Lempira', 'currency.HNL'), + (59, 'HRK', 2, NULL, 'Croatian Kuna', 'currency.HRK'), + (60, 'HTG', 2, 'G', 'Haiti Gourde', 'currency.HTG'), + (61, 'HUF', 2, NULL, 'Hungarian Forint', 'currency.HUF'), + (62, 'IDR', 2, NULL, 'Indonesian Rupiah', 'currency.IDR'), + (63, 'ILS', 2, NULL, 'New Israeli Shekel', 'currency.ILS'), + (64, 'INR', 2, '₹', 'Indian Rupee', 'currency.INR'), + (65, 'IQD', 3, NULL, 'Iraqi Dinar', 'currency.IQD'), + (66, 'IRR', 2, NULL, 'Iranian Rial', 'currency.IRR'), + (67, 'ISK', 0, NULL, 'Iceland Krona', 'currency.ISK'), + (68, 'JMD', 2, NULL, 'Jamaican Dollar', 'currency.JMD'), + (69, 'JOD', 3, NULL, 'Jordanian Dinar', 'currency.JOD'), + (70, 'JPY', 0, NULL, 'Japanese Yen', 'currency.JPY'), + (71, 'KES', 2, 'KSh', 'Kenyan Shilling', 'currency.KES'), + (72, 'KGS', 2, NULL, 'Kyrgyzstan Som', 'currency.KGS'), + (73, 'KHR', 2, NULL, 'Cambodia Riel', 'currency.KHR'), + (74, 'KMF', 0, NULL, 'Comoro Franc', 'currency.KMF'), + (75, 'KPW', 2, NULL, 'North Korean Won', 'currency.KPW'), + (76, 'KRW', 0, NULL, 'Korean Won', 'currency.KRW'), + (77, 'KWD', 3, NULL, 'Kuwaiti Dinar', 'currency.KWD'), + (78, 'KYD', 2, NULL, 'Cayman Islands Dollar', 'currency.KYD'), + (79, 'KZT', 2, NULL, 'Kazakhstan Tenge', 'currency.KZT'), + (80, 'LAK', 2, NULL, 'Lao Kip', 'currency.LAK'), + (81, 'LBP', 2, 'L£', 'Lebanese Pound', 'currency.LBP'), + (82, 'LKR', 2, NULL, 'Sri Lanka Rupee', 'currency.LKR'), + (83, 'LRD', 2, NULL, 'Liberian Dollar', 'currency.LRD'), + (84, 'LSL', 2, NULL, 'Lesotho Loti', 'currency.LSL'), + (85, 'LTL', 2, NULL, 'Lithuanian Litas', 'currency.LTL'), + (86, 'LVL', 2, NULL, 'Latvian Lats', 'currency.LVL'), + (87, 'LYD', 3, NULL, 'Libyan Dinar', 'currency.LYD'), + (88, 'MAD', 2, NULL, 'Moroccan Dirham', 'currency.MAD'), + (89, 'MDL', 2, NULL, 'Moldovan Leu', 'currency.MDL'), + (90, 'MGA', 2, NULL, 'Malagasy Ariary', 'currency.MGA'), + (91, 'MKD', 2, NULL, 'Macedonian Denar', 'currency.MKD'), + (92, 'MMK', 2, 'K', 'Myanmar Kyat', 'currency.MMK'), + (93, 'MNT', 2, NULL, 'Mongolian Tugrik', 'currency.MNT'), + (94, 'MOP', 2, NULL, 'Macau Pataca', 'currency.MOP'), + (95, 'MRO', 2, NULL, 'Mauritania Ouguiya', 'currency.MRO'), + (96, 'MTL', 2, NULL, 'Maltese Lira', 'currency.MTL'), + (97, 'MUR', 2, NULL, 'Mauritius Rupee', 'currency.MUR'), + (98, 'MVR', 2, NULL, 'Maldives Rufiyaa', 'currency.MVR'), + (99, 'MWK', 2, NULL, 'Malawi Kwacha', 'currency.MWK'), + (100, 'MXN', 2, '$', 'Mexican Peso', 'currency.MXN'), + (101, 'MYR', 2, NULL, 'Malaysian Ringgit', 'currency.MYR'), + (102, 'MZM', 2, NULL, 'Mozambique Metical', 'currency.MZM'), + (103, 'NAD', 2, NULL, 'Namibia Dollar', 'currency.NAD'), + (104, 'NGN', 2, NULL, 'Nigerian Naira', 'currency.NGN'), + (105, 'NIO', 2, 'C$', 'Nicaragua Cordoba Oro', 'currency.NIO'), + (106, 'NOK', 2, NULL, 'Norwegian Krone', 'currency.NOK'), + (107, 'NPR', 2, NULL, 'Nepalese Rupee', 'currency.NPR'), + (108, 'NZD', 2, NULL, 'New Zealand Dollar', 'currency.NZD'), + (109, 'OMR', 3, NULL, 'Rial Omani', 'currency.OMR'), + (110, 'PAB', 2, 'B/.', 'Panama Balboa', 'currency.PAB'), + (111, 'PEN', 2, 'S/.', 'Peruvian Nuevo Sol', 'currency.PEN'), + (112, 'PGK', 2, NULL, 'Papua New Guinea Kina', 'currency.PGK'), + (113, 'PHP', 2, NULL, 'Philippine Peso', 'currency.PHP'), + (114, 'PKR', 2, NULL, 'Pakistan Rupee', 'currency.PKR'), + (115, 'PLN', 2, NULL, 'Polish Zloty', 'currency.PLN'), + (116, 'PYG', 0, '₲', 'Paraguayan Guarani', 'currency.PYG'), + (117, 'QAR', 2, NULL, 'Qatari Rial', 'currency.QAR'), + (118, 'RON', 2, NULL, 'Romanian Leu', 'currency.RON'), + (119, 'RUB', 2, NULL, 'Russian Ruble', 'currency.RUB'), + (120, 'RWF', 0, NULL, 'Rwanda Franc', 'currency.RWF'), + (121, 'SAR', 2, NULL, 'Saudi Riyal', 'currency.SAR'), + (122, 'SBD', 2, NULL, 'Solomon Islands Dollar', 'currency.SBD'), + (123, 'SCR', 2, NULL, 'Seychelles Rupee', 'currency.SCR'), + (124, 'SDD', 2, NULL, 'Sudanese Dinar', 'currency.SDD'), + (125, 'SEK', 2, NULL, 'Swedish Krona', 'currency.SEK'), + (126, 'SGD', 2, NULL, 'Singapore Dollar', 'currency.SGD'), + (127, 'SHP', 2, NULL, 'St Helena Pound', 'currency.SHP'), + (128, 'SIT', 2, NULL, 'Slovenian Tolar', 'currency.SIT'), + (129, 'SKK', 2, NULL, 'Slovak Koruna', 'currency.SKK'), + (130, 'SLL', 2, NULL, 'Sierra Leone Leone', 'currency.SLL'), + (131, 'SOS', 2, NULL, 'Somali Shilling', 'currency.SOS'), + (132, 'SRD', 2, NULL, 'Surinam Dollar', 'currency.SRD'), + (133, 'STD', 2, NULL, 'Sao Tome and Principe Dobra', 'currency.STD'), + (134, 'SVC', 2, NULL, 'El Salvador Colon', 'currency.SVC'), + (135, 'SYP', 2, NULL, 'Syrian Pound', 'currency.SYP'), + (136, 'SZL', 2, NULL, 'Swaziland Lilangeni', 'currency.SZL'), + (137, 'THB', 2, NULL, 'Thai Baht', 'currency.THB'), + (138, 'TJS', 2, NULL, 'Tajik Somoni', 'currency.TJS'), + (139, 'TMM', 2, NULL, 'Turkmenistan Manat', 'currency.TMM'), + (140, 'TND', 3, 'DT', 'Tunisian Dinar', 'currency.TND'), + (141, 'TOP', 2, NULL, 'Tonga Pa\'anga','currency.TOP'),(142,'TRY',2,NULL,'Turkish Lira','currency.TRY'),(143,'TTD',2,NULL,'Trinidad and Tobago Dollar','currency.TTD'),(144,'TWD',2,NULL,'New Taiwan Dollar','currency.TWD'),(145,'TZS',2,NULL,'Tanzanian Shilling','currency.TZS'),(146,'UAH',2,NULL,'Ukraine Hryvnia','currency.UAH'),(147,'UGX',2,'USh','Uganda Shilling','currency.UGX'),(148,'USD',2,'$','US Dollar','currency.USD'),(149,'UYU',2,'$U','Peso Uruguayo','currency.UYU'),(150,'UZS',2,NULL,'Uzbekistan Sum','currency.UZS'),(151,'VEB',2,'Bs.F.','Venezuelan Bolivar','currency.VEB'),(152,'VND',2,NULL,'Vietnamese Dong','currency.VND'),(153,'VUV',0,NULL,'Vanuatu Vatu','currency.VUV'),(154,'WST',2,NULL,'Samoa Tala','currency.WST'),(155,'XAF',0,NULL,'CFA Franc BEAC','currency.XAF'),(156,'XCD',2,NULL,'East Caribbean Dollar','currency.XCD'),(157,'XDR',5,NULL,'SDR (Special Drawing Rights)','currency.XDR'),(158,'XOF',0,'CFA','CFA Franc BCEAO','currency.XOF'),(159,'XPF',0,NULL,'CFP Franc','currency.XPF'),(160,'YER',2,NULL,'Yemeni Rial','currency.YER'),(161,'ZAR',2,'R','South African Rand','currency.ZAR'),(162,'ZMK',2,NULL,'Zambian Kwacha','currency.ZMK'),(163,'ZWD',2,NULL,'Zimbabwe Dollar','currency.ZWD'); /*!40000 ALTER TABLE `m_currency` ENABLE KEYS */; UNLOCK TABLES; @@ -1399,7 +1747,8 @@ LOCK TABLES `m_portfolio_command_source` WRITE; /*!40000 ALTER TABLE `m_portfolio_command_source` DISABLE KEYS */; INSERT INTO `m_portfolio_command_source` VALUES (1,'CREATE','CLIENT',2,NULL,1,NULL,NULL,'/clients/template',1,NULL,'{\"officeId\":\"2\",\"firstname\":\"Test\",\"middlename\":\"\",\"lastname\":\"One\",\"fullname\":\"\",\"externalId\":\"\",\"dateFormat\":\"yyyy-MM-dd\",\"locale\":\"en\",\"joinedDate\":\"2011-02-01\"}',1,'2013-04-05 12:38:05',NULL,NULL,1),(2,'CREATE','LOAN',2,NULL,1,1,NULL,'/loans',1,NULL,'{\"clientId\":\"1\",\"dateFormat\":\"yyyy-MM-dd\",\"locale\":\"en\",\"productId\":\"1\",\"loanOfficerId\":\"2\",\"submittedOnDate\":\"2011-04-01\",\"loanPurposeId\":\"25\",\"principal\":\"1,000,000.00\",\"loanTermFrequency\":\"12\",\"loanTermFrequencyType\":\"2\",\"numberOfRepayments\":\"12\",\"repaymentEvery\":\"1\",\"repaymentFrequencyType\":\"2\",\"interestRatePerPeriod\":\"24\",\"interestRateFrequencyType\":\"3\",\"expectedDisbursementDate\":\"2011-04-01\",\"amortizationType\":\"1\",\"interestType\":\"1\",\"interestCalculationPeriodType\":\"1\",\"inArrearsTolerance\":\"\",\"transactionProcessingStrategy\":\"heavensfamily-strategy\",\"repaymentsStartingFromDate\":\"\",\"interestChargedFromDate\":\"\",\"charges\":[{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2011-05-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2011-06-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2011-07-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2011-08-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2011-09-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2011-10-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2011-11-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2011-12-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2012-01-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2012-02-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2012-03-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2012-04-01\"}],\"collateral\":[{\"id\":\"\",\"type\":\"23\",\"description\":\" small description.\",\"value\":\"\"}]}',1,'2013-04-05 12:41:57',NULL,NULL,1),(3,'APPROVE','LOAN',2,NULL,1,1,NULL,'/loans/1',1,NULL,'{\"status\":{\"id\":200,\"code\":\"loanStatusType.approved\",\"value\":\"Approved\",\"pendingApproval\":false,\"waitingForDisbursal\":true,\"active\":false,\"closedObligationsMet\":false,\"closedWrittenOff\":false,\"closedRescheduled\":false,\"closed\":false,\"overpaid\":false},\"locale\":\"en\",\"dateFormat\":\"yyyy-MM-dd\",\"approvedOnDate\":\"2011-04-01\"}',1,'2013-04-05 12:42:09',NULL,NULL,1); /*!40000 ALTER TABLE `m_portfolio_command_source` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_product_loan` @@ -1408,32 +1757,33 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_product_loan`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_product_loan` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `currency_code` varchar(3) NOT NULL, - `currency_digits` SMALLINT NOT NULL, - `principal_amount` decimal(19,6) NOT NULL, - `min_principal_amount` decimal(19,6) NOT NULL, - `max_principal_amount` decimal(19,6) NOT NULL, - `arrearstolerance_amount` decimal(19,6) DEFAULT NULL, - `name` varchar(100) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `fund_id` BIGINT DEFAULT NULL, - `nominal_interest_rate_per_period` decimal(19,6) NOT NULL, - `interest_period_frequency_enum` SMALLINT NOT NULL, - `annual_nominal_interest_rate` decimal(19,6) NOT NULL, - `interest_method_enum` SMALLINT NOT NULL, - `interest_calculated_in_period_enum` SMALLINT NOT NULL DEFAULT '1', - `repay_every` SMALLINT NOT NULL, - `repayment_period_frequency_enum` SMALLINT NOT NULL, - `number_of_repayments` SMALLINT NOT NULL, - `amortization_method_enum` SMALLINT NOT NULL, - `accounting_type` SMALLINT NOT NULL, - `loan_transaction_strategy_id` BIGINT DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `unq_name` (`name`), - KEY `FKA6A8A7D77240145` (`fund_id`), - CONSTRAINT `FKA6A8A7D77240145` FOREIGN KEY (`fund_id`) REFERENCES `m_fund` (`id`) +CREATE TABLE `m_product_loan` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `currency_code` varchar(3) NOT NULL, + `currency_digits` SMALLINT NOT NULL, + `principal_amount` decimal(19, 6) NOT NULL, + `min_principal_amount` decimal(19, 6) NOT NULL, + `max_principal_amount` decimal(19, 6) NOT NULL, + `arrearstolerance_amount` decimal(19, 6) DEFAULT NULL, + `name` varchar(100) NOT NULL, + `description` varchar(500) DEFAULT NULL, + `fund_id` BIGINT DEFAULT NULL, + `nominal_interest_rate_per_period` decimal(19, 6) NOT NULL, + `interest_period_frequency_enum` SMALLINT NOT NULL, + `annual_nominal_interest_rate` decimal(19, 6) NOT NULL, + `interest_method_enum` SMALLINT NOT NULL, + `interest_calculated_in_period_enum` SMALLINT NOT NULL DEFAULT '1', + `repay_every` SMALLINT NOT NULL, + `repayment_period_frequency_enum` SMALLINT NOT NULL, + `number_of_repayments` SMALLINT NOT NULL, + `amortization_method_enum` SMALLINT NOT NULL, + `accounting_type` SMALLINT NOT NULL, + `loan_transaction_strategy_id` BIGINT DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unq_name` (`name`), + KEY `FKA6A8A7D77240145` (`fund_id`), + CONSTRAINT `FKA6A8A7D77240145` FOREIGN KEY (`fund_id`) REFERENCES `m_fund` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1441,11 +1791,17 @@ CREATE TABLE `m_product_loan` ( -- Dumping data for table `m_product_loan` -- -LOCK TABLES `m_product_loan` WRITE; +LOCK +TABLES `m_product_loan` WRITE; /*!40000 ALTER TABLE `m_product_loan` DISABLE KEYS */; -INSERT INTO `m_product_loan` VALUES (1,'UGX',2,'1000000.000000','0.000000','1000000000000.000000',NULL,'Kampala Product (with cash accounting)','Typical Kampala loan product with cash accounting enabled for testing.',NULL,'24.000000',3,'24.000000',1,1,1,2,12,1,2,2); +INSERT INTO `m_product_loan` +VALUES (1, 'UGX', 2, '1000000.000000', '0.000000', '1000000000000.000000', NULL, + 'Kampala Product (with cash accounting)', + 'Typical Kampala loan product with cash accounting enabled for testing.', NULL, '24.000000', 3, '24.000000', 1, + 1, 1, 2, 12, 1, 2, 2); /*!40000 ALTER TABLE `m_product_loan` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_product_loan_charge` @@ -1454,13 +1810,14 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_product_loan_charge`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_product_loan_charge` ( - `product_loan_id` BIGINT NOT NULL, - `charge_id` BIGINT NOT NULL, - PRIMARY KEY (`product_loan_id`,`charge_id`), - KEY `charge_id` (`charge_id`), - CONSTRAINT `m_product_loan_charge_ibfk_1` FOREIGN KEY (`charge_id`) REFERENCES `m_charge` (`id`), - CONSTRAINT `m_product_loan_charge_ibfk_2` FOREIGN KEY (`product_loan_id`) REFERENCES `m_product_loan` (`id`) +CREATE TABLE `m_product_loan_charge` +( + `product_loan_id` BIGINT NOT NULL, + `charge_id` BIGINT NOT NULL, + PRIMARY KEY (`product_loan_id`, `charge_id`), + KEY `charge_id` (`charge_id`), + CONSTRAINT `m_product_loan_charge_ibfk_1` FOREIGN KEY (`charge_id`) REFERENCES `m_charge` (`id`), + CONSTRAINT `m_product_loan_charge_ibfk_2` FOREIGN KEY (`product_loan_id`) REFERENCES `m_product_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1468,10 +1825,12 @@ CREATE TABLE `m_product_loan_charge` ( -- Dumping data for table `m_product_loan_charge` -- -LOCK TABLES `m_product_loan_charge` WRITE; +LOCK +TABLES `m_product_loan_charge` WRITE; /*!40000 ALTER TABLE `m_product_loan_charge` DISABLE KEYS */; /*!40000 ALTER TABLE `m_product_loan_charge` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_role` @@ -1480,12 +1839,13 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_role`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_role` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) NOT NULL, - `description` varchar(500) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `unq_name` (`name`) +CREATE TABLE `m_role` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `description` varchar(500) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unq_name` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1493,11 +1853,14 @@ CREATE TABLE `m_role` ( -- Dumping data for table `m_role` -- -LOCK TABLES `m_role` WRITE; +LOCK +TABLES `m_role` WRITE; /*!40000 ALTER TABLE `m_role` DISABLE KEYS */; -INSERT INTO `m_role` VALUES (1,'Super user','This role provides all application permissions.'); +INSERT INTO `m_role` +VALUES (1, 'Super user', 'This role provides all application permissions.'); /*!40000 ALTER TABLE `m_role` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_role_permission` @@ -1506,14 +1869,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_role_permission`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_role_permission` ( - `role_id` BIGINT NOT NULL, - `permission_id` BIGINT NOT NULL, - PRIMARY KEY (`role_id`,`permission_id`), - KEY `FK8DEDB04815CEC7AB` (`role_id`), - KEY `FK8DEDB048103B544B` (`permission_id`), - CONSTRAINT `FK8DEDB048103B544B` FOREIGN KEY (`permission_id`) REFERENCES `m_permission` (`id`), - CONSTRAINT `FK8DEDB04815CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`) +CREATE TABLE `m_role_permission` +( + `role_id` BIGINT NOT NULL, + `permission_id` BIGINT NOT NULL, + PRIMARY KEY (`role_id`, `permission_id`), + KEY `FK8DEDB04815CEC7AB` (`role_id`), + KEY `FK8DEDB048103B544B` (`permission_id`), + CONSTRAINT `FK8DEDB048103B544B` FOREIGN KEY (`permission_id`) REFERENCES `m_permission` (`id`), + CONSTRAINT `FK8DEDB04815CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1521,11 +1885,14 @@ CREATE TABLE `m_role_permission` ( -- Dumping data for table `m_role_permission` -- -LOCK TABLES `m_role_permission` WRITE; +LOCK +TABLES `m_role_permission` WRITE; /*!40000 ALTER TABLE `m_role_permission` DISABLE KEYS */; -INSERT INTO `m_role_permission` VALUES (1,1); +INSERT INTO `m_role_permission` +VALUES (1, 1); /*!40000 ALTER TABLE `m_role_permission` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_savings_account` @@ -1534,39 +1901,40 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_savings_account`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_savings_account` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_no` varchar(20) NOT NULL, - `external_id` varchar(100) DEFAULT NULL, - `client_id` BIGINT DEFAULT NULL, - `group_id` BIGINT DEFAULT NULL, - `product_id` BIGINT DEFAULT NULL, - `status_enum` SMALLINT NOT NULL DEFAULT '300', - `activation_date` date DEFAULT NULL, - `currency_code` varchar(3) NOT NULL, - `currency_digits` SMALLINT NOT NULL, - `nominal_annual_interest_rate` decimal(19,6) NOT NULL, - `interest_compounding_period_enum` SMALLINT NOT NULL, - `interest_calculation_type_enum` SMALLINT NOT NULL, - `interest_calculation_days_in_year_type_enum` SMALLINT NOT NULL, - `min_required_opening_balance` decimal(19,6) DEFAULT NULL, - `lockin_period_frequency` decimal(19,6) DEFAULT NULL, - `lockin_period_frequency_enum` SMALLINT DEFAULT NULL, - `lockedin_until_date_derived` date DEFAULT NULL, - `total_deposits_derived` decimal(19,6) DEFAULT NULL, - `total_withdrawals_derived` decimal(19,6) DEFAULT NULL, - `total_interest_earned_derived` decimal(19,6) DEFAULT NULL, - `total_interest_posted_derived` decimal(19,6) DEFAULT NULL, - `account_balance_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - PRIMARY KEY (`id`), - UNIQUE KEY `sa_account_no_UNIQUE` (`account_no`), - UNIQUE KEY `sa_externalid_UNIQUE` (`external_id`), - KEY `FKSA00000000000001` (`client_id`), - KEY `FKSA00000000000002` (`group_id`), - KEY `FKSA00000000000003` (`product_id`), - CONSTRAINT `FKSA00000000000001` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FKSA00000000000002` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`), - CONSTRAINT `FKSA00000000000003` FOREIGN KEY (`product_id`) REFERENCES `m_savings_product` (`id`) +CREATE TABLE `m_savings_account` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `account_no` varchar(20) NOT NULL, + `external_id` varchar(100) DEFAULT NULL, + `client_id` BIGINT DEFAULT NULL, + `group_id` BIGINT DEFAULT NULL, + `product_id` BIGINT DEFAULT NULL, + `status_enum` SMALLINT NOT NULL DEFAULT '300', + `activation_date` date DEFAULT NULL, + `currency_code` varchar(3) NOT NULL, + `currency_digits` SMALLINT NOT NULL, + `nominal_annual_interest_rate` decimal(19, 6) NOT NULL, + `interest_compounding_period_enum` SMALLINT NOT NULL, + `interest_calculation_type_enum` SMALLINT NOT NULL, + `interest_calculation_days_in_year_type_enum` SMALLINT NOT NULL, + `min_required_opening_balance` decimal(19, 6) DEFAULT NULL, + `lockin_period_frequency` decimal(19, 6) DEFAULT NULL, + `lockin_period_frequency_enum` SMALLINT DEFAULT NULL, + `lockedin_until_date_derived` date DEFAULT NULL, + `total_deposits_derived` decimal(19, 6) DEFAULT NULL, + `total_withdrawals_derived` decimal(19, 6) DEFAULT NULL, + `total_interest_earned_derived` decimal(19, 6) DEFAULT NULL, + `total_interest_posted_derived` decimal(19, 6) DEFAULT NULL, + `account_balance_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + PRIMARY KEY (`id`), + UNIQUE KEY `sa_account_no_UNIQUE` (`account_no`), + UNIQUE KEY `sa_externalid_UNIQUE` (`external_id`), + KEY `FKSA00000000000001` (`client_id`), + KEY `FKSA00000000000002` (`group_id`), + KEY `FKSA00000000000003` (`product_id`), + CONSTRAINT `FKSA00000000000001` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), + CONSTRAINT `FKSA00000000000002` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`), + CONSTRAINT `FKSA00000000000003` FOREIGN KEY (`product_id`) REFERENCES `m_savings_product` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1574,10 +1942,12 @@ CREATE TABLE `m_savings_account` ( -- Dumping data for table `m_savings_account` -- -LOCK TABLES `m_savings_account` WRITE; +LOCK +TABLES `m_savings_account` WRITE; /*!40000 ALTER TABLE `m_savings_account` DISABLE KEYS */; /*!40000 ALTER TABLE `m_savings_account` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_savings_account_transaction` @@ -1586,20 +1956,21 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_savings_account_transaction`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_savings_account_transaction` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `savings_account_id` BIGINT NOT NULL, - `transaction_type_enum` SMALLINT NOT NULL, - `transaction_date` date NOT NULL, - `amount` decimal(19,6) NOT NULL, - `is_reversed` tinyint NOT NULL, - `running_balance_derived` decimal(19,6) DEFAULT NULL, - `balance_number_of_days_derived` INT DEFAULT NULL, - `balance_end_date_derived` date DEFAULT NULL, - `cumulative_balance_derived` decimal(19,6) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FKSAT0000000001` (`savings_account_id`), - CONSTRAINT `FKSAT0000000001` FOREIGN KEY (`savings_account_id`) REFERENCES `m_savings_account` (`id`) +CREATE TABLE `m_savings_account_transaction` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `savings_account_id` BIGINT NOT NULL, + `transaction_type_enum` SMALLINT NOT NULL, + `transaction_date` date NOT NULL, + `amount` decimal(19, 6) NOT NULL, + `is_reversed` tinyint NOT NULL, + `running_balance_derived` decimal(19, 6) DEFAULT NULL, + `balance_number_of_days_derived` INT DEFAULT NULL, + `balance_end_date_derived` date DEFAULT NULL, + `cumulative_balance_derived` decimal(19, 6) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FKSAT0000000001` (`savings_account_id`), + CONSTRAINT `FKSAT0000000001` FOREIGN KEY (`savings_account_id`) REFERENCES `m_savings_account` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1607,10 +1978,12 @@ CREATE TABLE `m_savings_account_transaction` ( -- Dumping data for table `m_savings_account_transaction` -- -LOCK TABLES `m_savings_account_transaction` WRITE; +LOCK +TABLES `m_savings_account_transaction` WRITE; /*!40000 ALTER TABLE `m_savings_account_transaction` DISABLE KEYS */; /*!40000 ALTER TABLE `m_savings_account_transaction` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_savings_product` @@ -1619,21 +1992,22 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_savings_product`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_savings_product` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) NOT NULL, - `description` varchar(500) NOT NULL, - `currency_code` varchar(3) NOT NULL, - `currency_digits` SMALLINT NOT NULL, - `nominal_annual_interest_rate` decimal(19,6) NOT NULL, - `interest_compounding_period_enum` SMALLINT NOT NULL, - `interest_calculation_type_enum` SMALLINT NOT NULL, - `interest_calculation_days_in_year_type_enum` SMALLINT NOT NULL, - `min_required_opening_balance` decimal(19,6) DEFAULT NULL, - `lockin_period_frequency` decimal(19,6) DEFAULT NULL, - `lockin_period_frequency_enum` SMALLINT DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `sp_unq_name` (`name`) +CREATE TABLE `m_savings_product` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `description` varchar(500) NOT NULL, + `currency_code` varchar(3) NOT NULL, + `currency_digits` SMALLINT NOT NULL, + `nominal_annual_interest_rate` decimal(19, 6) NOT NULL, + `interest_compounding_period_enum` SMALLINT NOT NULL, + `interest_calculation_type_enum` SMALLINT NOT NULL, + `interest_calculation_days_in_year_type_enum` SMALLINT NOT NULL, + `min_required_opening_balance` decimal(19, 6) DEFAULT NULL, + `lockin_period_frequency` decimal(19, 6) DEFAULT NULL, + `lockin_period_frequency_enum` SMALLINT DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `sp_unq_name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1641,10 +2015,12 @@ CREATE TABLE `m_savings_product` ( -- Dumping data for table `m_savings_product` -- -LOCK TABLES `m_savings_product` WRITE; +LOCK +TABLES `m_savings_product` WRITE; /*!40000 ALTER TABLE `m_savings_product` DISABLE KEYS */; /*!40000 ALTER TABLE `m_savings_product` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_staff` @@ -1653,17 +2029,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_staff`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_staff` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `is_loan_officer` tinyint NOT NULL DEFAULT '0', - `office_id` BIGINT DEFAULT NULL, - `firstname` varchar(50) DEFAULT NULL, - `lastname` varchar(50) DEFAULT NULL, - `display_name` varchar(100) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `display_name` (`display_name`), - KEY `FK_m_staff_m_office` (`office_id`), - CONSTRAINT `FK_m_staff_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `m_staff` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `is_loan_officer` tinyint NOT NULL DEFAULT '0', + `office_id` BIGINT DEFAULT NULL, + `firstname` varchar(50) DEFAULT NULL, + `lastname` varchar(50) DEFAULT NULL, + `display_name` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `display_name` (`display_name`), + KEY `FK_m_staff_m_office` (`office_id`), + CONSTRAINT `FK_m_staff_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1671,11 +2048,15 @@ CREATE TABLE `m_staff` ( -- Dumping data for table `m_staff` -- -LOCK TABLES `m_staff` WRITE; +LOCK +TABLES `m_staff` WRITE; /*!40000 ALTER TABLE `m_staff` DISABLE KEYS */; -INSERT INTO `m_staff` VALUES (1,1,1,'CEDA HO','LoanOfficer','LoanOfficer, CEDA HO'),(2,1,2,'Kampala','LoanOfficer','LoanOfficer, Kampala'); +INSERT INTO `m_staff` +VALUES (1, 1, 1, 'CEDA HO', 'LoanOfficer', 'LoanOfficer, CEDA HO'), + (2, 1, 2, 'Kampala', 'LoanOfficer', 'LoanOfficer, Kampala'); /*!40000 ALTER TABLE `m_staff` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `r_enum_value` @@ -1684,14 +2065,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `r_enum_value`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `r_enum_value` ( - `enum_name` varchar(100) NOT NULL, - `enum_id` INT NOT NULL, - `enum_message_property` varchar(100) NOT NULL, - `enum_value` varchar(100) NOT NULL, - PRIMARY KEY (`enum_name`,`enum_id`), - UNIQUE KEY `enum_message_property` (`enum_name`,`enum_message_property`), - UNIQUE KEY `enum_value` (`enum_name`,`enum_value`) +CREATE TABLE `r_enum_value` +( + `enum_name` varchar(100) NOT NULL, + `enum_id` INT NOT NULL, + `enum_message_property` varchar(100) NOT NULL, + `enum_value` varchar(100) NOT NULL, + PRIMARY KEY (`enum_name`, `enum_id`), + UNIQUE KEY `enum_message_property` (`enum_name`,`enum_message_property`), + UNIQUE KEY `enum_value` (`enum_name`,`enum_value`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1699,11 +2081,56 @@ CREATE TABLE `r_enum_value` ( -- Dumping data for table `r_enum_value` -- -LOCK TABLES `r_enum_value` WRITE; +LOCK +TABLES `r_enum_value` WRITE; /*!40000 ALTER TABLE `r_enum_value` DISABLE KEYS */; -INSERT INTO `r_enum_value` VALUES ('amortization_method_enum',0,'Equal principle payments','Equal principle payments'),('amortization_method_enum',1,'Equal installments','Equal installments'),('interest_calculated_in_period_enum',0,'Daily','Daily'),('interest_calculated_in_period_enum',1,'Same as repayment period','Same as repayment period'),('interest_method_enum',0,'Declining Balance','Declining Balance'),('interest_method_enum',1,'Flat','Flat'),('interest_period_frequency_enum',2,'Per month','Per month'),('interest_period_frequency_enum',3,'Per year','Per year'),('loan_status_id',100,'Submitted and awaiting approval','Submitted and awaiting approval'),('loan_status_id',200,'Approved','Approved'),('loan_status_id',300,'Active','Active'),('loan_status_id',400,'Withdrawn by client','Withdrawn by client'),('loan_status_id',500,'Rejected','Rejected'),('loan_status_id',600,'Closed','Closed'),('loan_status_id',601,'Written-Off','Written-Off'),('loan_status_id',602,'Rescheduled','Rescheduled'),('loan_status_id',700,'Overpaid','Overpaid'),('loan_transaction_strategy_id',1,'mifos-standard-strategy','Mifos style'),('loan_transaction_strategy_id',2,'heavensfamily-strategy','Heavensfamily'),('loan_transaction_strategy_id',3,'creocore-strategy','Creocore'),('loan_transaction_strategy_id',4,'rbi-india-strategy','RBI (India)'),('status',0,'invalid','Invalid'),('status',1,'processed','Processed'),('status',2,'awaiting.approval','Awaiting Approval'),('status',3,'rejected','Rejected'),('repayment_period_frequency_enum',0,'Days','Days'),('repayment_period_frequency_enum',1,'Weeks','Weeks'),('repayment_period_frequency_enum',2,'Months','Months'),('term_period_frequency_enum',0,'Days','Days'),('term_period_frequency_enum',1,'Weeks','Weeks'),('term_period_frequency_enum',2,'Months','Months'),('term_period_frequency_enum',3,'Years','Years'),('transaction_type_enum',1,'Disbursement','Disbursement'),('transaction_type_enum',2,'Repayment','Repayment'),('transaction_type_enum',3,'Contra','Contra'),('transaction_type_enum',4,'Waive Interest','Waive Interest'),('transaction_type_enum',5,'Repayment At Disbursement','Repayment At Disbursement'),('transaction_type_enum',6,'Write-Off','Write-Off'),('transaction_type_enum',7,'Marked for Rescheduling','Marked for Rescheduling'),('transaction_type_enum',8,'Recovery Repayment','Recovery Repayment'),('transaction_type_enum',9,'Waive Charges','Waive Charges'),('transaction_type_enum',10,'Apply Charges','Apply Charges'),('transaction_type_enum',11,'Apply Interest','Apply Interest'); +INSERT INTO `r_enum_value` +VALUES ('amortization_method_enum', 0, 'Equal principle payments', 'Equal principle payments'), + ('amortization_method_enum', 1, 'Equal installments', 'Equal installments'), + ('interest_calculated_in_period_enum', 0, 'Daily', 'Daily'), + ('interest_calculated_in_period_enum', 1, 'Same as repayment period', 'Same as repayment period'), + ('interest_method_enum', 0, 'Declining Balance', 'Declining Balance'), + ('interest_method_enum', 1, 'Flat', 'Flat'), + ('interest_period_frequency_enum', 2, 'Per month', 'Per month'), + ('interest_period_frequency_enum', 3, 'Per year', 'Per year'), + ('loan_status_id', 100, 'Submitted and awaiting approval', 'Submitted and awaiting approval'), + ('loan_status_id', 200, 'Approved', 'Approved'), + ('loan_status_id', 300, 'Active', 'Active'), + ('loan_status_id', 400, 'Withdrawn by client', 'Withdrawn by client'), + ('loan_status_id', 500, 'Rejected', 'Rejected'), + ('loan_status_id', 600, 'Closed', 'Closed'), + ('loan_status_id', 601, 'Written-Off', 'Written-Off'), + ('loan_status_id', 602, 'Rescheduled', 'Rescheduled'), + ('loan_status_id', 700, 'Overpaid', 'Overpaid'), + ('loan_transaction_strategy_id', 1, 'mifos-standard-strategy', 'Mifos style'), + ('loan_transaction_strategy_id', 2, 'heavensfamily-strategy', 'Heavensfamily'), + ('loan_transaction_strategy_id', 3, 'creocore-strategy', 'Creocore'), + ('loan_transaction_strategy_id', 4, 'rbi-india-strategy', 'RBI (India)'), + ('status', 0, 'invalid', 'Invalid'), + ('status', 1, 'processed', 'Processed'), + ('status', 2, 'awaiting.approval', 'Awaiting Approval'), + ('status', 3, 'rejected', 'Rejected'), + ('repayment_period_frequency_enum', 0, 'Days', 'Days'), + ('repayment_period_frequency_enum', 1, 'Weeks', 'Weeks'), + ('repayment_period_frequency_enum', 2, 'Months', 'Months'), + ('term_period_frequency_enum', 0, 'Days', 'Days'), + ('term_period_frequency_enum', 1, 'Weeks', 'Weeks'), + ('term_period_frequency_enum', 2, 'Months', 'Months'), + ('term_period_frequency_enum', 3, 'Years', 'Years'), + ('transaction_type_enum', 1, 'Disbursement', 'Disbursement'), + ('transaction_type_enum', 2, 'Repayment', 'Repayment'), + ('transaction_type_enum', 3, 'Contra', 'Contra'), + ('transaction_type_enum', 4, 'Waive Interest', 'Waive Interest'), + ('transaction_type_enum', 5, 'Repayment At Disbursement', 'Repayment At Disbursement'), + ('transaction_type_enum', 6, 'Write-Off', 'Write-Off'), + ('transaction_type_enum', 7, 'Marked for Rescheduling', 'Marked for Rescheduling'), + ('transaction_type_enum', 8, 'Recovery Repayment', 'Recovery Repayment'), + ('transaction_type_enum', 9, 'Waive Charges', 'Waive Charges'), + ('transaction_type_enum', 10, 'Apply Charges', 'Apply Charges'), + ('transaction_type_enum', 11, 'Apply Interest', 'Apply Interest'); /*!40000 ALTER TABLE `r_enum_value` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `rpt_sequence` @@ -1712,9 +2139,10 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `rpt_sequence`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `rpt_sequence` ( - `id` INT NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`id`) +CREATE TABLE `rpt_sequence` +( + `id` INT NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1722,10 +2150,12 @@ CREATE TABLE `rpt_sequence` ( -- Dumping data for table `rpt_sequence` -- -LOCK TABLES `rpt_sequence` WRITE; +LOCK +TABLES `rpt_sequence` WRITE; /*!40000 ALTER TABLE `rpt_sequence` DISABLE KEYS */; /*!40000 ALTER TABLE `rpt_sequence` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `schema_version` @@ -1734,22 +2164,23 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `schema_version`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `schema_version` ( - `version_rank` INT NOT NULL, - `installed_rank` INT NOT NULL, - `version` varchar(50) NOT NULL, - `description` varchar(200) NOT NULL, - `type` varchar(20) NOT NULL, - `script` varchar(1000) NOT NULL, - `checksum` INT DEFAULT NULL, - `installed_by` varchar(100) NOT NULL, - `installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `execution_time` INT NOT NULL, - `success` tinyint NOT NULL, - PRIMARY KEY (`version`), - KEY `schema_version_vr_idx` (`version_rank`), - KEY `schema_version_ir_idx` (`installed_rank`), - KEY `schema_version_s_idx` (`success`) +CREATE TABLE `schema_version` +( + `version_rank` INT NOT NULL, + `installed_rank` INT NOT NULL, + `version` varchar(50) NOT NULL, + `description` varchar(200) NOT NULL, + `type` varchar(20) NOT NULL, + `script` varchar(1000) NOT NULL, + `checksum` INT DEFAULT NULL, + `installed_by` varchar(100) NOT NULL, + `installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `execution_time` INT NOT NULL, + `success` tinyint NOT NULL, + PRIMARY KEY (`version`), + KEY `schema_version_vr_idx` (`version_rank`), + KEY `schema_version_ir_idx` (`installed_rank`), + KEY `schema_version_s_idx` (`success`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1757,11 +2188,29 @@ CREATE TABLE `schema_version` ( -- Dumping data for table `schema_version` -- -LOCK TABLES `schema_version` WRITE; +LOCK +TABLES `schema_version` WRITE; /*!40000 ALTER TABLE `schema_version` DISABLE KEYS */; -INSERT INTO `schema_version` VALUES (1,1,'1','mifosplatform-core-ddl-latest','SQL','V1__mifosplatform-core-ddl-latest.sql',-1957145051,'root','2013-04-05 11:23:24',365,1),(2,2,'2','mifosx-base-reference-data-utf8','SQL','V2__mifosx-base-reference-data-utf8.sql',1316484475,'root','2013-04-05 11:23:24',26,1),(3,3,'3','mifosx-permissions-and-authorisation-utf8','SQL','V3__mifosx-permissions-and-authorisation-utf8.sql',1922951887,'root','2013-04-05 11:23:24',26,1),(4,4,'4','mifosx-core-reports-utf8','SQL','V4__mifosx-core-reports-utf8.sql',-934709187,'root','2013-04-05 11:23:24',52,1),(5,5,'5','update-savings-product-and-account-tables','SQL','V5__update-savings-product-and-account-tables.sql',1171300485,'root','2013-04-05 11:23:24',22,1),(6,6,'6','add min max principal column to loan','SQL','V6__add_min_max_principal_column_to_loan.sql',21414779,'root','2013-04-05 11:23:24',25,1),(7,7,'7','remove read makerchecker permission','SQL','V7__remove_read_makerchecker_permission.sql',-335430825,'root','2013-04-05 11:23:24',3,1),(8,8,'8','deposit-transaction-permissions-if-they-exist','SQL','V8__deposit-transaction-permissions-if-they-exist.sql',-1507997551,'root','2013-04-05 11:23:24',2,1); +INSERT INTO `schema_version` +VALUES (1, 1, '1', 'mifosplatform-core-ddl-latest', 'SQL', 'V1__mifosplatform-core-ddl-latest.sql', -1957145051, 'root', + '2013-04-05 11:23:24', 365, 1), + (2, 2, '2', 'mifosx-base-reference-data-utf8', 'SQL', 'V2__mifosx-base-reference-data-utf8.sql', 1316484475, + 'root', '2013-04-05 11:23:24', 26, 1), + (3, 3, '3', 'mifosx-permissions-and-authorisation-utf8', 'SQL', + 'V3__mifosx-permissions-and-authorisation-utf8.sql', 1922951887, 'root', '2013-04-05 11:23:24', 26, 1), + (4, 4, '4', 'mifosx-core-reports-utf8', 'SQL', 'V4__mifosx-core-reports-utf8.sql', -934709187, 'root', + '2013-04-05 11:23:24', 52, 1), + (5, 5, '5', 'update-savings-product-and-account-tables', 'SQL', + 'V5__update-savings-product-and-account-tables.sql', 1171300485, 'root', '2013-04-05 11:23:24', 22, 1), + (6, 6, '6', 'add min max principal column to loan', 'SQL', 'V6__add_min_max_principal_column_to_loan.sql', + 21414779, 'root', '2013-04-05 11:23:24', 25, 1), + (7, 7, '7', 'remove read makerchecker permission', 'SQL', 'V7__remove_read_makerchecker_permission.sql', + -335430825, 'root', '2013-04-05 11:23:24', 3, 1), + (8, 8, '8', 'deposit-transaction-permissions-if-they-exist', 'SQL', + 'V8__deposit-transaction-permissions-if-they-exist.sql', -1507997551, 'root', '2013-04-05 11:23:24', 2, 1); /*!40000 ALTER TABLE `schema_version` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `stretchy_parameter` @@ -1770,23 +2219,24 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `stretchy_parameter`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `stretchy_parameter` ( - `parameter_id` INT NOT NULL AUTO_INCREMENT, - `parameter_name` varchar(45) NOT NULL, - `parameter_variable` varchar(45) DEFAULT NULL, - `parameter_label` varchar(45) NOT NULL, - `parameter_displayType` varchar(45) NOT NULL, - `parameter_FormatType` varchar(10) NOT NULL, - `parameter_default` varchar(45) NOT NULL, - `special` varchar(1) DEFAULT NULL, - `selectOne` varchar(1) DEFAULT NULL, - `selectAll` varchar(1) DEFAULT NULL, - `parameter_sql` text, - `parent_parameter_id` INT DEFAULT NULL, - PRIMARY KEY (`parameter_id`), - UNIQUE KEY `name_UNIQUE` (`parameter_name`), - KEY `fk_stretchy_parameter_0001_idx` (`parent_parameter_id`), - CONSTRAINT `fk_stretchy_parameter_0001` FOREIGN KEY (`parent_parameter_id`) REFERENCES `stretchy_parameter` (`parameter_id`) +CREATE TABLE `stretchy_parameter` +( + `parameter_id` INT NOT NULL AUTO_INCREMENT, + `parameter_name` varchar(45) NOT NULL, + `parameter_variable` varchar(45) DEFAULT NULL, + `parameter_label` varchar(45) NOT NULL, + `parameter_displayType` varchar(45) NOT NULL, + `parameter_FormatType` varchar(10) NOT NULL, + `parameter_default` varchar(45) NOT NULL, + `special` varchar(1) DEFAULT NULL, + `selectOne` varchar(1) DEFAULT NULL, + `selectAll` varchar(1) DEFAULT NULL, + `parameter_sql` text, + `parent_parameter_id` INT DEFAULT NULL, + PRIMARY KEY (`parameter_id`), + UNIQUE KEY `name_UNIQUE` (`parameter_name`), + KEY `fk_stretchy_parameter_0001_idx` (`parent_parameter_id`), + CONSTRAINT `fk_stretchy_parameter_0001` FOREIGN KEY (`parent_parameter_id`) REFERENCES `stretchy_parameter` (`parameter_id`) ) ENGINE=InnoDB AUTO_INCREMENT=1004 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1794,11 +2244,46 @@ CREATE TABLE `stretchy_parameter` ( -- Dumping data for table `stretchy_parameter` -- -LOCK TABLES `stretchy_parameter` WRITE; +LOCK +TABLES `stretchy_parameter` WRITE; /*!40000 ALTER TABLE `stretchy_parameter` DISABLE KEYS */; -INSERT INTO `stretchy_parameter` VALUES (1,'startDateSelect','startDate','startDate','date','date','today',NULL,NULL,NULL,NULL,NULL),(2,'endDateSelect','endDate','endDate','date','date','today',NULL,NULL,NULL,NULL,NULL),(3,'obligDateTypeSelect','obligDateType','obligDateType','select','number','0',NULL,NULL,NULL,'select * from\r\n(select 1 as id, \"Closed\" as `name` union all\r\nselect 2, \"Disbursal\" ) x\r\norder by x.`id`',NULL),(5,'OfficeIdSelectOne','officeId','Office','select','number','0',NULL,'Y',NULL,'select id, \r\nconcat(substring(\"........................................\", 1, \r\n \n\n((LENGTH(`hierarchy`) - LENGTH(REPLACE(`hierarchy`, \'.\', \'\')) - 1) * 4)), \r\n `name`) as tc\r\nfrom m_office\r\nwhere hierarchy like concat\n\n(\'${currentUserHierarchy}\', \'%\')\r\norder by hierarchy',NULL),(6,'loanOfficerIdSelectAll','loanOfficerId','Loan Officer','select','number','0',NULL,NULL,'Y','(select lo.id, lo.display_name as `Name` \r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\njoin m_staff lo on lo.office_id = ounder.id\r\nwhere lo.is_loan_officer = true\r\nand o.id = ${officeId})\r\nunion all\r\n(select -10, \'-\')\r\norder by 2',5),(10,'currencyIdSelectAll','currencyId','Currency','select','number','0',NULL,NULL,'Y','select `code`, `name`\r\nfrom m_organisation_currency\r\norder by `code`',NULL),(20,'fundIdSelectAll','fundId','Fund','select','number','0',NULL,NULL,'Y','(select id, `name`\r\nfrom m_fund)\r\nunion all\r\n(select -10, \'-\')\r\norder by 2',NULL),(25,'loanProductIdSelectAll','loanProductId','Product','select','number','0',NULL,NULL,'Y','select p.id, p.`name`\r\nfrom m_product_loan p\r\nwhere p.currency_code = \'$\{currencyId}\'\r\norder by 2',10),(26,'loanPurposeIdSelectAll','loanPurposeId','Loan Purpose','select','number','0',NULL,NULL,'Y','select -10 as id, \'-\' as code_value\r\nunion all\r\nselect * from (select v.id, v.code_value\r\nfrom m_code c\r\njoin m_code_value v on v.code_id = c.id\r\nwhere c.code_name = \"loanPurpose\"\r\norder by v.order_position) x',NULL),(100,'parTypeSelect','parType','parType','select','number','0',NULL,NULL,NULL,'select * from\r\n(select 1 as id, \"Principal Only\" as `name` union all\r\nselect 2, \"Principal + Interest\" union all\r\nselect 3, \"Principal + Interest + Fees\" union all\r\nselect 4, \"Principal + Interest + Fees + Penalties\") x\r\norder by x.`id`',NULL),(1001,'FullReportList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select r.report_id, r.report_name, r.report_type, r.report_subtype, r.report_category,\r\n \n\nrp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on rp.report_id = r.report_id\r\n \n\nleft join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \n\n\r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on rp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where \n\nur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by \n\nr.report_category, r.report_name, rp.parameter_id',NULL),(1002,'FullParameterList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select sp.parameter_name, sp.parameter_variable, sp.parameter_label, sp.parameter_displayType, \r\nsp.parameter_FormatType, sp.parameter_default, sp.selectOne, sp.selectAll, spp.parameter_name as parentParameterName\r\nfrom stretchy_parameter sp\r\nleft join stretchy_parameter spp on spp.parameter_id = sp.parent_parameter_id\r\nwhere sp.special is null\r\nand exists \r\n (select \'f\' \r\n from stretchy_report sr\r\n join stretchy_report_parameter srp on srp.report_id = sr.report_id\r\n where sr.report_name in(${reportListing})\r\n and srp.parameter_id = sp.parameter_id\r\n )\r\norder by sp.parameter_id',NULL),(1003,'reportCategoryList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select r.report_id, r.report_name, r.report_type, r.report_subtype, \n\nr.report_category,\r\n rp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on \n\nrp.report_id = r.report_id\r\n left join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.report_category = \'${reportCategory}\'\r\n and \n\nr.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on \n\nrp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where ur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \n\n\'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by r.report_category, r.report_name, rp.parameter_id',NULL); +INSERT INTO `stretchy_parameter` +VALUES (1, 'startDateSelect', 'startDate', 'startDate', 'date', 'date', 'today', NULL, NULL, NULL, NULL, NULL), + (2, 'endDateSelect', 'endDate', 'endDate', 'date', 'date', 'today', NULL, NULL, NULL, NULL, NULL), + (3, 'obligDateTypeSelect', 'obligDateType', 'obligDateType', 'select', 'number', '0', NULL, NULL, NULL, + 'select * from\r\n(select 1 as id, \"Closed\" as `name` union all\r\nselect 2, \"Disbursal\" ) x\r\norder by x.`id`', + NULL), + (5, 'OfficeIdSelectOne', 'officeId', 'Office', 'select', 'number', '0', NULL, 'Y', NULL, + 'select id, \r\nconcat(substring(\"........................................\", 1, \r\n \n\n((LENGTH(`hierarchy`) - LENGTH(REPLACE(`hierarchy`, \'.\', \'\')) - 1) * 4)), \r\n `name`) as tc\r\nfrom m_office\r\nwhere hierarchy like concat\n\n(\'${currentUserHierarchy}\', \'%\')\r\norder by hierarchy', + NULL), + (6, 'loanOfficerIdSelectAll', 'loanOfficerId', 'Loan Officer', 'select', 'number', '0', NULL, NULL, 'Y', + '(select lo.id, lo.display_name as `Name` \r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\njoin m_staff lo on lo.office_id = ounder.id\r\nwhere lo.is_loan_officer = true\r\nand o.id = ${officeId})\r\nunion all\r\n(select -10, \'-\')\r\norder by 2', + 5), + (10, 'currencyIdSelectAll', 'currencyId', 'Currency', 'select', 'number', '0', NULL, NULL, 'Y', + 'select `code`, `name`\r\nfrom m_organisation_currency\r\norder by `code`', NULL), + (20, 'fundIdSelectAll', 'fundId', 'Fund', 'select', 'number', '0', NULL, NULL, 'Y', + '(select id, `name`\r\nfrom m_fund)\r\nunion all\r\n(select -10, \' -\')\r\norder by 2', NULL), + (25, 'loanProductIdSelectAll', 'loanProductId', 'Product', 'select', 'number', '0', NULL, NULL, 'Y', + 'select p.id, p.`name`\r\nfrom m_product_loan p\r\nwhere p.currency_code = \'$\{currencyId}\'\r\norder by 2', + 10), + (26, 'loanPurposeIdSelectAll', 'loanPurposeId', 'Loan Purpose', 'select', 'number', '0', NULL, NULL, 'Y', + 'select -10 as id, \' -\' as code_value\r\nunion all\r\nselect * from (select v.id, v.code_value\r\nfrom m_code c\r\njoin m_code_value v on v.code_id = c.id\r\nwhere c.code_name = \"loanPurpose\"\r\norder by v.order_position) x', + NULL), + (100, 'parTypeSelect', 'parType', 'parType', 'select', 'number', '0', NULL, NULL, NULL, + 'select * from\r\n(select 1 as id, \"Principal Only\" as `name` union all\r\nselect 2, \"Principal + Interest\" union all\r\nselect 3, \"Principal + Interest + Fees\" union all\r\nselect 4, \"Principal + Interest + Fees + Penalties\") x\r\norder by x.`id`', + NULL), + (1001, 'FullReportList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, + 'select r.report_id, r.report_name, r.report_type, r.report_subtype, r.report_category,\r\n \n\nrp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on rp.report_id = r.report_id\r\n \n\nleft join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \n\n\r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on rp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where \n\nur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by \n\nr.report_category, r.report_name, rp.parameter_id', + NULL), + (1002, 'FullParameterList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, + 'select sp.parameter_name, sp.parameter_variable, sp.parameter_label, sp.parameter_displayType, \r\nsp.parameter_FormatType, sp.parameter_default, sp.selectOne, sp.selectAll, spp.parameter_name as parentParameterName\r\nfrom stretchy_parameter sp\r\nleft join stretchy_parameter spp on spp.parameter_id = sp.parent_parameter_id\r\nwhere sp.special is null\r\nand exists \r\n (select \'f\' \r\n from stretchy_report sr\r\n join stretchy_report_parameter srp on srp.report_id = sr.report_id\r\n where sr.report_name in(${reportListing})\r\n and srp.parameter_id = sp.parameter_id\r\n )\r\norder by sp.parameter_id', + NULL), + (1003, 'reportCategoryList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, + 'select r.report_id, r.report_name, r.report_type, r.report_subtype, \n\nr.report_category,\r\n rp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on \n\nrp.report_id = r.report_id\r\n left join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.report_category = \'${reportCategory}\'\r\n and \n\nr.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on \n\nrp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where ur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \n\n\'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by r.report_category, r.report_name, rp.parameter_id', + NULL); /*!40000 ALTER TABLE `stretchy_parameter` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `stretchy_report` @@ -1807,18 +2292,19 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `stretchy_report`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `stretchy_report` ( - `report_id` INT NOT NULL AUTO_INCREMENT, - `report_name` varchar(100) NOT NULL, - `report_type` varchar(20) NOT NULL, - `report_subtype` varchar(20) DEFAULT NULL, - `report_category` varchar(45) DEFAULT NULL, - `report_sql` text, - `description` text, - `core_report` tinyint DEFAULT '0', - `use_report` tinyint DEFAULT '0', - PRIMARY KEY (`report_id`), - UNIQUE KEY `report_name_UNIQUE` (`report_name`) +CREATE TABLE `stretchy_report` +( + `report_id` INT NOT NULL AUTO_INCREMENT, + `report_name` varchar(100) NOT NULL, + `report_type` varchar(20) NOT NULL, + `report_subtype` varchar(20) DEFAULT NULL, + `report_category` varchar(45) DEFAULT NULL, + `report_sql` text, + `description` text, + `core_report` tinyint DEFAULT '0', + `use_report` tinyint DEFAULT '0', + PRIMARY KEY (`report_id`), + UNIQUE KEY `report_name_UNIQUE` (`report_name`) ) ENGINE=InnoDB AUTO_INCREMENT=95 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1826,11 +2312,87 @@ CREATE TABLE `stretchy_report` ( -- Dumping data for table `stretchy_report` -- -LOCK TABLES `stretchy_report` WRITE; +LOCK +TABLES `stretchy_report` WRITE; /*!40000 ALTER TABLE `stretchy_report` DISABLE KEYS */; -INSERT INTO `stretchy_report` VALUES (1,'Client Listing','Table',NULL,'Client','select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n c.account_no as \"Client Account No.\", \r\nc.display_name as \"Name\", \n\nc.joined_date as \"Joined\", c.external_id as \"External Id\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand \n\nounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\nwhere o.id = ${officeId}\r\nand c.is_deleted=0\r\n\n\norder by ounder.hierarchy, c.account_no','Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \'one to one\' additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t \n\nhave that client browser/memory impact).',1,1),(2,'Client Loans Listing','Table',NULL,'Client','select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client \n\nAccount No.\", \r\nc.display_name as \"Name\", \r\nlo.display_name as \"Loan Officer\", l.account_no as \"Loan Account No.\", l.external_id as \"External Id\", \r\n\n\np.name as Loan, st.enum_message_property as \"Status\", \r\nf.`name` as Fund, purp.code_value as \"Loan Purpose\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount,\n\n\r\nl.arrearstolerance_amount as \"Arrears Tolerance Amount\",\r\nl.number_of_repayments as \"Expected No. Repayments\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\nl.nominal_interest_rate_per_period as \"Nominal Interest Rate Per Period\",\r\n\r\nipf.enum_message_property as \"Interest Rate Frequency\n\n\",\r\nim.enum_message_property as \"Interest Method\",\r\nicp.enum_message_property as \"Interest Calculated in Period\",\r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.repay_every as \"Repayment Frequency\",\r\nrf.enum_message_property as \"Repayment Frequency Period\",\n\n\r\nam.enum_message_property as \"Amortization\",\r\n\r\nl.total_charges_due_at_disbursement_derived as \"Total Charges Due At Disbursement\",\r\n\r\ndate( \n\nl.submittedon_date) as Submitted, date(l.approvedon_date) Approved, l.expected_disbursedon_date As \"Expected Disbursal\",\r\ndate(l.expected_firstrepaymenton_date) as \n\n\"Expected First Repayment\", date(l.interest_calculated_from_date) as \"Interest Calculated From\" ,\r\ndate(l.disbursedon_date) as Disbursed, date\n\n(l.expected_maturedon_date) \"Expected Maturity\",\r\ndate(l.maturedon_date) as \"Matured On\", date(l.closedon_date) as Closed,\r\ndate(l.rejectedon_date) as \n\nRejected, date(l.rescheduledon_date) as Rescheduled, \r\ndate(l.withdrawnon_date) as Withdrawn, date(l.writtenoffon_date) \"Written Off\"\r\nfrom m_office o \r\njoin \n\nm_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on \n\nc.office_id = ounder.id\r\nleft join m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_product_loan p on p.id = \n\nl.product_id\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join r_enum_value st on st.enum_name = \"loan_status_id\" and st.enum_id = l.loan_status_id\r\nleft join \n\nr_enum_value ipf on ipf.enum_name = \"interest_period_frequency_enum\" and ipf.enum_id = l.interest_period_frequency_enum\r\nleft join r_enum_value im on im.enum_name \n\n= \"interest_method_enum\" and im.enum_id = l.interest_method_enum\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = \n\nl.term_period_frequency_enum\r\nleft join r_enum_value icp on icp.enum_name = \"interest_calculated_in_period_enum\" and icp.enum_id = \n\nl.interest_calculated_in_period_enum\r\nleft join r_enum_value rf on rf.enum_name = \"repayment_period_frequency_enum\" and rf.enum_id = \n\nl.repayment_period_frequency_enum\r\nleft join r_enum_value am on am.enum_name = \"amortization_method_enum\" and am.enum_id = l.amortization_method_enum\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\n\r\nleft \n\njoin m_currency cur on cur.code = l.currency_code\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand \n\n(l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \n\n\"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\norder by ounder.hierarchy, 2 , l.id','Individual Client Report\r\n\r\nPretty \n\nwide report that lists the basic details of client loans. \r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t have that client browser/memory impact).',1,1),(5,'Loans Awaiting Disbursal','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No\", c.display_name as \"Name\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount as Principal, \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\",\r\ndate(l.approvedon_date) \"Approved\",\r\ndatediff(l.expected_disbursedon_date, curdate()) as \"Days to Disbursal\",\r\ndate(l.expected_disbursedon_date) \"Expected Disbursal\",\r\npurp.code_value as \"Loan Purpose\",\r\n lo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\norder by ounder.hierarchy, datediff(l.expected_disbursedon_date, curdate()), c.account_no','Individual Client Report',1,1),(6,'Loans Awaiting Disbursal Summary','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, f.`name` as Fund,\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`','Individual Client Report',1,1),(7,'Loans Awaiting Disbursal Summary by Month','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nyear(l.expected_disbursedon_date) as \"Year\", \r\nmonthname(l.expected_disbursedon_date) as \"Month\",\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)','Individual Client Report',1,1),(8,'Loans Pending Approval','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client Name\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, pl.`name` as \"Product\", \r\nl.account_no as \"Loan Account No.\", \r\nl.principal_amount as \"Loan Amount\", \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\ndatediff(curdate(), l.submittedon_date) \"Days Pending Approval\", \r\npurp.code_value as \"Loan Purpose\",\r\nlo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 100 /*Submitted and awaiting approval */\r\norder by ounder.hierarchy, l.submittedon_date, l.account_no','Individual Client Report',1,1),(11,'Active Loans - Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. loans_in_arrears_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(if(laa.loan_id is not null, l.id, null) )) as loans_in_arrears_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(laa.principal_overdue_derived) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(laa.interest_overdue_derived) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(laa.fee_charges_overdue_derived) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(laa.penalty_charges_overdue_derived) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency',NULL,1,1),(12,'Active Loans - Details','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\npenalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(13,'Obligation Met Loans Details','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client\",\r\nl.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.total_repayment_derived as \"Total Repaid\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", \r\ndate(l.closedon_date) as \"Closed\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(14,'Obligation Met Loans Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\ncount(distinct(c.id)) as \"No. of Clients\",\r\ncount(distinct(l.id)) as \"No. of Loans\",\r\nsum(l.principal_amount) as \"Total Loan Amount\", \r\nsum(l.principal_repaid_derived) as \"Total Principal Repaid\",\r\nsum(l.interest_repaid_derived) as \"Total Interest Repaid\",\r\nsum(l.fee_charges_repaid_derived) as \"Total Fees Repaid\",\r\nsum(l.penalty_charges_repaid_derived) as \"Total Penalties Repaid\",\r\nsum(l.interest_waived_derived) as \"Total Interest Waived\",\r\nsum(l.fee_charges_waived_derived) as \"Total Fees Waived\",\r\nsum(l.penalty_charges_waived_derived) as \"Total Penalties Waived\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by ounder.hierarchy, l.currency_code\r\norder by ounder.hierarchy, l.currency_code','Individual Client \n\nReport',1,1),(15,'Portfolio at Risk','Table',NULL,'Loan','select x.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from \r\n(select ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.currency_code\r\norder by l.currency_code) x','Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)',1,1),(16,'Portfolio at Risk by Branch','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\",\r\nx.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as \"branch\", ifnull(cur.display_symbol, l.currency_code) as Currency, \r\n\r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency','Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)',1,1),(20,'Funds Disbursed Between Dates Summary','Table',NULL,'Fund','select ifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nround(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office ounder \r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\ngroup by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)\r\norder by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)',NULL,1,1),(21,'Funds Disbursed Between Dates Summary by Office','Table',NULL,'Fund','select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n \n\nifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office o\r\n\n\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c \n\non c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\n\n\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand o.id = ${officeId}\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand \n\n(l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\ngroup by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, \n\nl.currency_code)\r\norder by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)',NULL,1,1),(48,'Balance Sheet','Pentaho',NULL,'Accounting',NULL,'Balance Sheet',1,1),(49,'Income Statement','Pentaho',NULL,'Accounting',NULL,'Profit and Loss Statement',1,1),(50,'Trial Balance','Pentaho',NULL,'Accounting',NULL,'Trial Balance Report',1,1),(51,'Written-Off Loans','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Written-Off Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Written-Off Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Written-Off Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Written-Off Penalties\',\r\nn.note AS \'Reason For Write-Off\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 6 /*write-off */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=601\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\") \r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no','Individual Lending Report. Written Off Loans',1,1),(52,'Aging Detail','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nmc.account_no as \"Client Account No.\",\r\n mc.display_name AS \"Client Name\",\r\n ml.account_no AS \"Account Number\",\r\n ml.principal_amount AS \"Loan Amount\",\r\n ml.principal_disbursed_derived AS \"Original Principal\",\r\n ml.interest_charged_derived AS \"Original Interest\",\r\n ml.principal_repaid_derived AS \"Principal Paid\",\r\n ml.interest_repaid_derived AS \"Interest Paid\",\r\n laa.principal_overdue_derived AS \"Principal Overdue\",\r\n laa.interest_overdue_derived AS \"Interest Overdue\",\r\nDATEDIFF(CURDATE(), laa.overdue_since_date_derived) as \"Days in Arrears\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<7, \'<1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<8, \' 1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<22, \' 3\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<29, \' 4\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<36, \' 5\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<43, \' 6\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<50, \' 7\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<57, \' 8\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<64, \' 9\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<85, \'12\', \'12+\')))))))))))) )AS \"Weeks In Arrears Band\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<361, \'180 - 360\', \r\n \'> 360\'))))) AS \"Days in Arrears Band\"\r\n\r\n FROM m_office mo \r\n JOIN m_office ounder ON ounder.hierarchy like concat(mo.hierarchy, \'%\')\r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n INNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id\r\n INNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\n left join m_currency cur on cur.code = ml.currency_code\r\n WHERE ml.loan_status_id=300\r\n AND mo.id=${officeId}\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no','Loan arrears aging (Weeks)',1,1),(53,'Aging Summary (Arrears in Weeks)','Table',NULL,'Loan','SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Weeks In Arrears (Up To)\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'1\',2 UNION\r\n SELECT \'2\',3 UNION\r\n SELECT \'3\',4 UNION\r\n SELECT \'4\',5 UNION\r\n SELECT \'5\',6 UNION\r\n SELECT \'6\',7 UNION\r\n SELECT \'7\',8 UNION\r\n SELECT \'8\',9 UNION\r\n SELECT \'9\',10 UNION\r\n SELECT \'10\',11 UNION\r\n SELECT \'11\',12 UNION\r\n SELECT \'12\',13 UNION\r\n SELECT \'12+\',14) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<8, \'1\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<22, \'3\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<29, \'4\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<36, \'5\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<43, \'6\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<50, \'7\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<57, \'8\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<64, \'9\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<85, \'12\',\r\n \'12+\'))))))))))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid','Loan amount in arrears by branch',1,1),(54,'Rescheduled Loans','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Rescheduled Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Rescheduled Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Rescheduled Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Rescheduled Penalties\',\r\nn.note AS \'Reason For Rescheduling\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 7 /*marked for rescheduling */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=602\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no','Individual Lending Report. Rescheduled Loans. The ability to reschedule (or mark that you have rescheduled the loan elsewhere) is a legacy of the older Mifos product. Needed for migration.',1,1),(55,'Active Loans Passed Final Maturity','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(56,'Active Loans Passed Final Maturity Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency',NULL,1,1),(57,'Active Loans in last installment','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(lastInstallment.`hierarchy`) - LENGTH(REPLACE(lastInstallment.`hierarchy`, \'.\', \'\')) - 1))), lastInstallment.branch) as \"Office/Branch\",\r\nlastInstallment.Currency,\r\nlastInstallment.`Loan Officer`, \r\nlastInstallment.`Client Account No`, lastInstallment.`Client`, \r\nlastInstallment.`Loan Account No`, lastInstallment.`Product`, \r\nlastInstallment.`Fund`, lastInstallment.`Loan Amount`, \r\nlastInstallment.`Annual Nominal Interest Rate`, \r\nlastInstallment.`Disbursed`, lastInstallment.`Expected Matured On` ,\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\norder by lastInstallment.hierarchy, lastInstallment.Currency, lastInstallment.`Client Account No`, lastInstallment.`Loan Account No`','Individual Client \n\nReport',1,1),(58,'Active Loans in last installment Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select lastInstallment.branchId as branchId,\r\nlastInstallment.Currency,\r\ncount(distinct(lastInstallment.clientId)) as client_count, \r\ncount(distinct(lastInstallment.loanId)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id as branchId, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.id as clientId, c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\ngroup by lastInstallment.branchId) x on x.branchId = mo.id\r\norder by mo.hierarchy, x.Currency','Individual Client \n\nReport',1,1),(59,'Active Loans by Disbursal Period','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No\", c.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Principal Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\n\r\nl.total_expected_repayment_derived as \"Total Loan (P+I+F+Pen)\",\r\nl.total_repayment_derived as \"Total Repaid (P+I+F+Pen)\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(61,'Aging Summary (Arrears in Months)','Table',NULL,'Loan','SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Days In Arrears\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'0 - 30\',2 UNION\r\n SELECT \'30 - 60\',3 UNION\r\n SELECT \'60 - 90\',4 UNION\r\n SELECT \'90 - 180\',5 UNION\r\n SELECT \'180 - 360\',6 UNION\r\n SELECT \'> 360\',7 ) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<361, \'180 - 360\', \r\n \'> 360\')))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid','Loan amount in arrears by branch',1,1),(91,'Loan Account Schedule','Pentaho',NULL,'Loan',NULL,NULL,1,0),(92,'Branch Expected Cash Flow','Pentaho',NULL,'Loan',NULL,NULL,1,1),(93,'Expected Payments By Date - Basic','Table',NULL,'Loan','SELECT \r\n ounder.name \'Office\', \r\n IFNULL(ms.display_name,\'-\') \'Loan Officer\',\r\n mc.account_no \'Client Account Number\',\r\n mc.display_name \'Name\',\r\n mp.name \'Product\',\r\n ml.account_no \'Loan Account Number\',\r\n mr.duedate \'Due Date\',\r\n mr.installment \'Installment\',\r\n cu.display_symbol \'Currency\',\r\n mr.principal_amount- IFNULL(mr.principal_completed_derived,0) \'Principal Due\',\r\n mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0) \'Interest Due\', \r\n IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0) \'Fees Due\', \r\n IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0) \'Penalty Due\',\r\n (mr.principal_amount- IFNULL(mr.principal_completed_derived,0)) +\r\n (mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0)) + \r\n (IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0)) + \r\n (IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0)) \'Total Due\', \r\n mlaa.total_overdue_derived \'Total Overdue\'\r\n \r\n FROM m_office mo\r\n JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\n \r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n \r\n LEFT JOIN m_client mc ON mc.office_id=ounder.id\r\n LEFT JOIN m_loan ml ON ml.client_id=mc.id AND ml.loan_status_id=300\r\n LEFT JOIN m_loan_arrears_aging mlaa ON mlaa.loan_id=ml.id\r\n LEFT JOIN m_loan_repayment_schedule mr ON mr.loan_id=ml.id AND mr.completed_derived=0\r\n LEFT JOIN m_product_loan mp ON mp.id=ml.product_id\r\n LEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\n LEFT JOIN m_currency cu ON cu.code=ml.currency_code\r\n WHERE mo.id=${officeId}\r\n AND (IFNULL(ml.loan_officer_id, -10) = \"${loanOfficerId}\" OR \"-1\" = \"${loanOfficerId}\")\r\n AND mr.duedate BETWEEN \'${startDate}\' AND \'${endDate}\'\r\n ORDER BY ounder.id,mr.duedate,ml.account_no','Test',1,1),(94,'Expected Payments By Date - Formatted','Pentaho',NULL,'Loan',NULL,NULL,1,1); +INSERT INTO `stretchy_report` +VALUES (1, 'Client Listing', 'Table', NULL, 'Client', + 'select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n c.account_no as \"Client Account No.\", \r\nc.display_name as \"Name\", \n\nc.joined_date as \"Joined\", c.external_id as \"External Id\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand \n\nounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\nwhere o.id = ${officeId}\r\nand c.is_deleted=0\r\n\n\norder by ounder.hierarchy, c.account_no', + 'Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \'one to one\' additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, + there is probably is + a limit of about 20/50k clients returned for html display (export to excel doesn\'t \n\nhave that client browser/memory impact).',1,1), + (2, 'Client Loans Listing', 'Table', NULL, 'Client', + 'select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client \n\nAccount No.\", \r\nc.display_name as \"Name\", \r\nlo.display_name as \"Loan Officer\", l.account_no as \"Loan Account No.\", l.external_id as \"External Id\", \r\n\n\np.name as Loan, st.enum_message_property as \"Status\", \r\nf.`name` as Fund, purp.code_value as \"Loan Purpose\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount,\n\n\r\nl.arrearstolerance_amount as \"Arrears Tolerance Amount\",\r\nl.number_of_repayments as \"Expected No. Repayments\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\nl.nominal_interest_rate_per_period as \"Nominal Interest Rate Per Period\",\r\n\r\nipf.enum_message_property as \"Interest Rate Frequency\n\n\",\r\nim.enum_message_property as \"Interest Method\",\r\nicp.enum_message_property as \"Interest Calculated in Period\",\r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.repay_every as \"Repayment Frequency\",\r\nrf.enum_message_property as \"Repayment Frequency Period\",\n\n\r\nam.enum_message_property as \"Amortization\",\r\n\r\nl.total_charges_due_at_disbursement_derived as \"Total Charges Due At Disbursement\",\r\n\r\ndate( \n\nl.submittedon_date) as Submitted, date(l.approvedon_date) Approved, l.expected_disbursedon_date As \"Expected Disbursal\",\r\ndate(l.expected_firstrepaymenton_date) as \n\n\"Expected First Repayment\", date(l.interest_calculated_from_date) as \"Interest Calculated From\" ,\r\ndate(l.disbursedon_date) as Disbursed, date\n\n(l.expected_maturedon_date) \"Expected Maturity\",\r\ndate(l.maturedon_date) as \"Matured On\", date(l.closedon_date) as Closed,\r\ndate(l.rejectedon_date) as \n\nRejected, date(l.rescheduledon_date) as Rescheduled, \r\ndate(l.withdrawnon_date) as Withdrawn, date(l.writtenoffon_date) \"Written Off\"\r\nfrom m_office o \r\njoin \n\nm_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on \n\nc.office_id = ounder.id\r\nleft join m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_product_loan p on p.id = \n\nl.product_id\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join r_enum_value st on st.enum_name = \"loan_status_id\" and st.enum_id = l.loan_status_id\r\nleft join \n\nr_enum_value ipf on ipf.enum_name = \"interest_period_frequency_enum\" and ipf.enum_id = l.interest_period_frequency_enum\r\nleft join r_enum_value im on im.enum_name \n\n= \"interest_method_enum\" and im.enum_id = l.interest_method_enum\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = \n\nl.term_period_frequency_enum\r\nleft join r_enum_value icp on icp.enum_name = \"interest_calculated_in_period_enum\" and icp.enum_id = \n\nl.interest_calculated_in_period_enum\r\nleft join r_enum_value rf on rf.enum_name = \"repayment_period_frequency_enum\" and rf.enum_id = \n\nl.repayment_period_frequency_enum\r\nleft join r_enum_value am on am.enum_name = \"amortization_method_enum\" and am.enum_id = l.amortization_method_enum\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\n\r\nleft \n\njoin m_currency cur on cur.code = l.currency_code\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand \n\n(l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \n\n\"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\norder by ounder.hierarchy, 2 , l.id', + 'Individual Client Report\r\n\r\nPretty \n\nwide report that lists the basic details of client loans. \r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t have that client browser/memory impact).',1,1), + (5, 'Loans Awaiting Disbursal', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No\", c.display_name as \"Name\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount as Principal, \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\",\r\ndate(l.approvedon_date) \"Approved\",\r\ndatediff(l.expected_disbursedon_date, curdate()) as \"Days to Disbursal\",\r\ndate(l.expected_disbursedon_date) \"Expected Disbursal\",\r\npurp.code_value as \"Loan Purpose\",\r\n lo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\norder by ounder.hierarchy, datediff(l.expected_disbursedon_date, curdate()), c.account_no', + 'Individual Client Report', 1, 1), (6, 'Loans Awaiting Disbursal Summary', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, f.`name` as Fund,\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`', + 'Individual Client Report', 1, 1), + (7, 'Loans Awaiting Disbursal Summary by Month', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nyear(l.expected_disbursedon_date) as \"Year\", \r\nmonthname(l.expected_disbursedon_date) as \"Month\",\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)', + 'Individual Client Report', 1, 1), (8, 'Loans Pending Approval', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client Name\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, pl.`name` as \"Product\", \r\nl.account_no as \"Loan Account No.\", \r\nl.principal_amount as \"Loan Amount\", \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\ndatediff(curdate(), l.submittedon_date) \"Days Pending Approval\", \r\npurp.code_value as \"Loan Purpose\",\r\nlo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 100 /*Submitted and awaiting approval */\r\norder by ounder.hierarchy, l.submittedon_date, l.account_no', + 'Individual Client Report', 1, 1), + (11, 'Active Loans - Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. loans_in_arrears_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(if(laa.loan_id is not null, l.id, null) )) as loans_in_arrears_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(laa.principal_overdue_derived) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(laa.interest_overdue_derived) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(laa.fee_charges_overdue_derived) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(laa.penalty_charges_overdue_derived) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', + NULL, 1, 1), (12, 'Active Loans - Details', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\npenalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), + (13, 'Obligation Met Loans Details', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client\",\r\nl.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.total_repayment_derived as \"Total Repaid\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", \r\ndate(l.closedon_date) as \"Closed\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), (14, 'Obligation Met Loans Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\ncount(distinct(c.id)) as \"No. of Clients\",\r\ncount(distinct(l.id)) as \"No. of Loans\",\r\nsum(l.principal_amount) as \"Total Loan Amount\", \r\nsum(l.principal_repaid_derived) as \"Total Principal Repaid\",\r\nsum(l.interest_repaid_derived) as \"Total Interest Repaid\",\r\nsum(l.fee_charges_repaid_derived) as \"Total Fees Repaid\",\r\nsum(l.penalty_charges_repaid_derived) as \"Total Penalties Repaid\",\r\nsum(l.interest_waived_derived) as \"Total Interest Waived\",\r\nsum(l.fee_charges_waived_derived) as \"Total Fees Waived\",\r\nsum(l.penalty_charges_waived_derived) as \"Total Penalties Waived\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by ounder.hierarchy, l.currency_code\r\norder by ounder.hierarchy, l.currency_code', + 'Individual Client \n\nReport', 1, 1), + (15, 'Portfolio at Risk', 'Table', NULL, 'Loan', + 'select x.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from \r\n(select ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.currency_code\r\norder by l.currency_code) x', + 'Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', + 1, 1), (16, 'Portfolio at Risk by Branch', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\",\r\nx.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as \"branch\", ifnull(cur.display_symbol, l.currency_code) as Currency, \r\n\r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', + 'Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', + 1, 1), (20, 'Funds Disbursed Between Dates Summary', 'Table', NULL, 'Fund', + 'select ifnull(f.`name`, \' -\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nround(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office ounder \r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere disbursedon_date between \' ${startDate}\' and \'${endDate}\'\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\ngroup by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)\r\norder by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)', + NULL, 1, 1), (21, 'Funds Disbursed Between Dates Summary by Office', 'Table', NULL, 'Fund', + 'select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n \n\nifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office o\r\n\n\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c \n\non c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\n\n\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand o.id = ${officeId}\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand \n\n(l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\ngroup by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, \n\nl.currency_code)\r\norder by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)', + NULL, 1, 1), + (48, 'Balance Sheet', 'Pentaho', NULL, 'Accounting', NULL, 'Balance Sheet', 1, 1), + (49, 'Income Statement', 'Pentaho', NULL, 'Accounting', NULL, 'Profit and Loss Statement', 1, 1), + (50, 'Trial Balance', 'Pentaho', NULL, 'Accounting', NULL, 'Trial Balance Report', 1, 1), + (51, 'Written-Off Loans', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Written-Off Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Written-Off Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Written-Off Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Written-Off Penalties\',\r\nn.note AS \'Reason For Write-Off\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 6 /*write-off */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=601\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\") \r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', + 'Individual Lending Report. Written Off Loans', 1, 1), (52, 'Aging Detail', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nmc.account_no as \"Client Account No.\",\r\n mc.display_name AS \"Client Name\",\r\n ml.account_no AS \"Account Number\",\r\n ml.principal_amount AS \"Loan Amount\",\r\n ml.principal_disbursed_derived AS \"Original Principal\",\r\n ml.interest_charged_derived AS \"Original Interest\",\r\n ml.principal_repaid_derived AS \"Principal Paid\",\r\n ml.interest_repaid_derived AS \"Interest Paid\",\r\n laa.principal_overdue_derived AS \"Principal Overdue\",\r\n laa.interest_overdue_derived AS \"Interest Overdue\",\r\nDATEDIFF(CURDATE(), laa.overdue_since_date_derived) as \"Days in Arrears\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<7, \'<1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<8, \' 1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<22, \' 3\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<29, \' 4\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<36, \' 5\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<43, \' 6\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<50, \' 7\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<57, \' 8\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<64, \' 9\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<85, \'12\', \'12+\')))))))))))) )AS \"Weeks In Arrears Band\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<361, \'180 - 360\', \r\n \'> 360\'))))) AS \"Days in Arrears Band\"\r\n\r\n FROM m_office mo \r\n JOIN m_office ounder ON ounder.hierarchy like concat(mo.hierarchy, \'%\')\r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n INNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id\r\n INNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\n left join m_currency cur on cur.code = ml.currency_code\r\n WHERE ml.loan_status_id=300\r\n AND mo.id=${officeId}\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', + 'Loan arrears aging (Weeks)', 1, 1), + (53, 'Aging Summary (Arrears in Weeks)', 'Table', NULL, 'Loan', + 'SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Weeks In Arrears (Up To)\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'1\',2 UNION\r\n SELECT \'2\',3 UNION\r\n SELECT \'3\',4 UNION\r\n SELECT \'4\',5 UNION\r\n SELECT \'5\',6 UNION\r\n SELECT \'6\',7 UNION\r\n SELECT \'7\',8 UNION\r\n SELECT \'8\',9 UNION\r\n SELECT \'9\',10 UNION\r\n SELECT \'10\',11 UNION\r\n SELECT \'11\',12 UNION\r\n SELECT \'12\',13 UNION\r\n SELECT \'12+\',14) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<8, \'1\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<22, \'3\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<29, \'4\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<36, \'5\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<43, \'6\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<50, \'7\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<57, \'8\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<64, \'9\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<85, \'12\',\r\n \'12+\'))))))))))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid', + 'Loan amount in arrears by branch', 1, 1), (54, 'Rescheduled Loans', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Rescheduled Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Rescheduled Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Rescheduled Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Rescheduled Penalties\',\r\nn.note AS \'Reason For Rescheduling\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 7 /*marked for rescheduling */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=602\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', + 'Individual Lending Report. Rescheduled Loans. The ability to reschedule (or mark that you have rescheduled the loan elsewhere) is a legacy of the older Mifos product. Needed for migration.', + 1, 1), + (55, 'Active Loans Passed Final Maturity', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), + (56, 'Active Loans Passed Final Maturity Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', + NULL, 1, 1), (57, 'Active Loans in last installment', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(lastInstallment.`hierarchy`) - LENGTH(REPLACE(lastInstallment.`hierarchy`, \'.\', \'\')) - 1))), lastInstallment.branch) as \"Office/Branch\",\r\nlastInstallment.Currency,\r\nlastInstallment.`Loan Officer`, \r\nlastInstallment.`Client Account No`, lastInstallment.`Client`, \r\nlastInstallment.`Loan Account No`, lastInstallment.`Product`, \r\nlastInstallment.`Fund`, lastInstallment.`Loan Amount`, \r\nlastInstallment.`Annual Nominal Interest Rate`, \r\nlastInstallment.`Disbursed`, lastInstallment.`Expected Matured On` ,\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\norder by lastInstallment.hierarchy, lastInstallment.Currency, lastInstallment.`Client Account No`, lastInstallment.`Loan Account No`', + 'Individual Client \n\nReport', 1, 1), + (58, 'Active Loans in last installment Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select lastInstallment.branchId as branchId,\r\nlastInstallment.Currency,\r\ncount(distinct(lastInstallment.clientId)) as client_count, \r\ncount(distinct(lastInstallment.loanId)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id as branchId, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.id as clientId, c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\ngroup by lastInstallment.branchId) x on x.branchId = mo.id\r\norder by mo.hierarchy, x.Currency', + 'Individual Client \n\nReport', 1, 1), (59, 'Active Loans by Disbursal Period', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No\", c.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Principal Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\n\r\nl.total_expected_repayment_derived as \"Total Loan (P+I+F+Pen)\",\r\nl.total_repayment_derived as \"Total Repaid (P+I+F+Pen)\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), + (61, 'Aging Summary (Arrears in Months)', 'Table', NULL, 'Loan', + 'SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Days In Arrears\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'0 - 30\',2 UNION\r\n SELECT \'30 - 60\',3 UNION\r\n SELECT \'60 - 90\',4 UNION\r\n SELECT \'90 - 180\',5 UNION\r\n SELECT \'180 - 360\',6 UNION\r\n SELECT \'> 360\',7 ) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<361, \'180 - 360\', \r\n \'> 360\')))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid', + 'Loan amount in arrears by branch', 1, 1), + (91, 'Loan Account Schedule', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 0), + (92, 'Branch Expected Cash Flow', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 1), + (93, 'Expected Payments By Date - Basic', 'Table', NULL, 'Loan', + 'SELECT \r\n ounder.name \'Office\', \r\n IFNULL(ms.display_name,\'-\') \'Loan Officer\',\r\n mc.account_no \'Client Account Number\',\r\n mc.display_name \'Name\',\r\n mp.name \'Product\',\r\n ml.account_no \'Loan Account Number\',\r\n mr.duedate \'Due Date\',\r\n mr.installment \'Installment\',\r\n cu.display_symbol \'Currency\',\r\n mr.principal_amount- IFNULL(mr.principal_completed_derived,0) \'Principal Due\',\r\n mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0) \'Interest Due\', \r\n IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0) \'Fees Due\', \r\n IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0) \'Penalty Due\',\r\n (mr.principal_amount- IFNULL(mr.principal_completed_derived,0)) +\r\n (mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0)) + \r\n (IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0)) + \r\n (IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0)) \'Total Due\', \r\n mlaa.total_overdue_derived \'Total Overdue\'\r\n \r\n FROM m_office mo\r\n JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\n \r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n \r\n LEFT JOIN m_client mc ON mc.office_id=ounder.id\r\n LEFT JOIN m_loan ml ON ml.client_id=mc.id AND ml.loan_status_id=300\r\n LEFT JOIN m_loan_arrears_aging mlaa ON mlaa.loan_id=ml.id\r\n LEFT JOIN m_loan_repayment_schedule mr ON mr.loan_id=ml.id AND mr.completed_derived=0\r\n LEFT JOIN m_product_loan mp ON mp.id=ml.product_id\r\n LEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\n LEFT JOIN m_currency cu ON cu.code=ml.currency_code\r\n WHERE mo.id=${officeId}\r\n AND (IFNULL(ml.loan_officer_id, -10) = \"${loanOfficerId}\" OR \"-1\" = \"${loanOfficerId}\")\r\n AND mr.duedate BETWEEN \'${startDate}\' AND \'${endDate}\'\r\n ORDER BY ounder.id,mr.duedate,ml.account_no', + 'Test', 1, 1), (94, 'Expected Payments By Date - Formatted', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 1); /*!40000 ALTER TABLE `stretchy_report` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `stretchy_report_parameter` @@ -1839,12 +2401,13 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `stretchy_report_parameter`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `stretchy_report_parameter` ( - `report_id` INT NOT NULL, - `parameter_id` INT NOT NULL, - `report_parameter_name` varchar(45) DEFAULT NULL, - PRIMARY KEY (`report_id`,`parameter_id`), - UNIQUE KEY `report_id_name_UNIQUE` (`report_id`,`report_parameter_name`) +CREATE TABLE `stretchy_report_parameter` +( + `report_id` INT NOT NULL, + `parameter_id` INT NOT NULL, + `report_parameter_name` varchar(45) DEFAULT NULL, + PRIMARY KEY (`report_id`, `parameter_id`), + UNIQUE KEY `report_id_name_UNIQUE` (`report_id`,`report_parameter_name`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1852,11 +2415,165 @@ CREATE TABLE `stretchy_report_parameter` ( -- Dumping data for table `stretchy_report_parameter` -- -LOCK TABLES `stretchy_report_parameter` WRITE; +LOCK +TABLES `stretchy_report_parameter` WRITE; /*!40000 ALTER TABLE `stretchy_report_parameter` DISABLE KEYS */; -INSERT INTO `stretchy_report_parameter` VALUES (1,5,NULL),(2,5,NULL),(2,6,NULL),(2,10,NULL),(2,20,NULL),(2,25,NULL),(2,26,NULL),(5,5,NULL),(5,6,NULL),(5,10,NULL),(5,20,NULL),(5,25,NULL),(5,26,NULL),(6,5,NULL),(6,6,NULL),(6,10,NULL),(6,20,NULL),(6,25,NULL),(6,26,NULL),(7,5,NULL),(7,6,NULL),(7,10,NULL),(7,20,NULL),(7,25,NULL),(7,26,NULL),(8,5,NULL),(8,6,NULL),(8,10,NULL),(8,25,NULL),(8,26,NULL),(11,5,NULL),(11,6,NULL),(11,10,NULL),(11,20,NULL),(11,25,NULL),(11,26,NULL),(11,100,NULL),(12,5,NULL),(12,6,NULL),(12,10,NULL),(12,20,NULL),(12,25,NULL),(12,26,NULL),(13,1,NULL),(13,2,NULL),(13,3,NULL),(13,5,NULL),(13,6,NULL),(13,10,NULL),(13,20,NULL),(13,25,NULL),(13,26,NULL),(14,1,NULL),(14,2,NULL),(14,3,NULL),(14,5,NULL),(14,6,NULL),(14,10,NULL),(14,20,NULL),(14,25,NULL),(14,26,NULL),(15,5,NULL),(15,6,NULL),(15,10,NULL),(15,20,NULL),(15,25,NULL),(15,26,NULL),(15,100,NULL),(16,5,NULL),(16,6,NULL),(16,10,NULL),(16,20,NULL),(16,25,NULL),(16,26,NULL),(16,100,NULL),(20,1,NULL),(20,2,NULL),(20,10,NULL),(20,20,NULL),(21,1,NULL),(21,2,NULL),(21,5,NULL),(21,10,NULL),(21,20,NULL),(48,5,'branch'),(48,2,'date'),(49,5,'branch'),(49,1,'fromDate'),(49,2,'toDate'),(50,5,'branch'),(50,1,'fromDate'),(50,2,'toDate'),(51,1,NULL),(51,2,NULL),(51,5,NULL),(51,10,NULL),(51,25,NULL),(52,5,NULL),(53,5,NULL),(53,10,NULL),(54,1,NULL),(54,2,NULL),(54,5,NULL),(54,10,NULL),(54,25,NULL),(55,5,NULL),(55,6,NULL),(55,10,NULL),(55,20,NULL),(55,25,NULL),(55,26,NULL),(56,5,NULL),(56,6,NULL),(56,10,NULL),(56,20,NULL),(56,25,NULL),(56,26,NULL),(56,100,NULL),(57,5,NULL),(57,6,NULL),(57,10,NULL),(57,20,NULL),(57,25,NULL),(57,26,NULL),(58,5,NULL),(58,6,NULL),(58,10,NULL),(58,20,NULL),(58,25,NULL),(58,26,NULL),(58,100,NULL),(59,1,NULL),(59,2,NULL),(59,5,NULL),(59,6,NULL),(59,10,NULL),(59,20,NULL),(59,25,NULL),(59,26,NULL),(61,5,NULL),(61,10,NULL),(92,1,'fromDate'),(92,5,'selectOffice'),(92,2,'toDate'),(93,1,NULL),(93,2,NULL),(93,5,NULL),(93,6,NULL),(94,2,'endDate'),(94,6,'loanOfficerId'),(94,5,'officeId'),(94,1,'startDate'); +INSERT INTO `stretchy_report_parameter` +VALUES (1, 5, NULL), + (2, 5, NULL), + (2, 6, NULL), + (2, 10, NULL), + (2, 20, NULL), + (2, 25, NULL), + (2, 26, NULL), + (5, 5, NULL), + (5, 6, NULL), + (5, 10, NULL), + (5, 20, NULL), + (5, 25, NULL), + (5, 26, NULL), + (6, 5, NULL), + (6, 6, NULL), + (6, 10, NULL), + (6, 20, NULL), + (6, 25, NULL), + (6, 26, NULL), + (7, 5, NULL), + (7, 6, NULL), + (7, 10, NULL), + (7, 20, NULL), + (7, 25, NULL), + (7, 26, NULL), + (8, 5, NULL), + (8, 6, NULL), + (8, 10, NULL), + (8, 25, NULL), + (8, 26, NULL), + (11, 5, NULL), + (11, 6, NULL), + (11, 10, NULL), + (11, 20, NULL), + (11, 25, NULL), + (11, 26, NULL), + (11, 100, NULL), + (12, 5, NULL), + (12, 6, NULL), + (12, 10, NULL), + (12, 20, NULL), + (12, 25, NULL), + (12, 26, NULL), + (13, 1, NULL), + (13, 2, NULL), + (13, 3, NULL), + (13, 5, NULL), + (13, 6, NULL), + (13, 10, NULL), + (13, 20, NULL), + (13, 25, NULL), + (13, 26, NULL), + (14, 1, NULL), + (14, 2, NULL), + (14, 3, NULL), + (14, 5, NULL), + (14, 6, NULL), + (14, 10, NULL), + (14, 20, NULL), + (14, 25, NULL), + (14, 26, NULL), + (15, 5, NULL), + (15, 6, NULL), + (15, 10, NULL), + (15, 20, NULL), + (15, 25, NULL), + (15, 26, NULL), + (15, 100, NULL), + (16, 5, NULL), + (16, 6, NULL), + (16, 10, NULL), + (16, 20, NULL), + (16, 25, NULL), + (16, 26, NULL), + (16, 100, NULL), + (20, 1, NULL), + (20, 2, NULL), + (20, 10, NULL), + (20, 20, NULL), + (21, 1, NULL), + (21, 2, NULL), + (21, 5, NULL), + (21, 10, NULL), + (21, 20, NULL), + (48, 5, 'branch'), + (48, 2, 'date'), + (49, 5, 'branch'), + (49, 1, 'fromDate'), + (49, 2, 'toDate'), + (50, 5, 'branch'), + (50, 1, 'fromDate'), + (50, 2, 'toDate'), + (51, 1, NULL), + (51, 2, NULL), + (51, 5, NULL), + (51, 10, NULL), + (51, 25, NULL), + (52, 5, NULL), + (53, 5, NULL), + (53, 10, NULL), + (54, 1, NULL), + (54, 2, NULL), + (54, 5, NULL), + (54, 10, NULL), + (54, 25, NULL), + (55, 5, NULL), + (55, 6, NULL), + (55, 10, NULL), + (55, 20, NULL), + (55, 25, NULL), + (55, 26, NULL), + (56, 5, NULL), + (56, 6, NULL), + (56, 10, NULL), + (56, 20, NULL), + (56, 25, NULL), + (56, 26, NULL), + (56, 100, NULL), + (57, 5, NULL), + (57, 6, NULL), + (57, 10, NULL), + (57, 20, NULL), + (57, 25, NULL), + (57, 26, NULL), + (58, 5, NULL), + (58, 6, NULL), + (58, 10, NULL), + (58, 20, NULL), + (58, 25, NULL), + (58, 26, NULL), + (58, 100, NULL), + (59, 1, NULL), + (59, 2, NULL), + (59, 5, NULL), + (59, 6, NULL), + (59, 10, NULL), + (59, 20, NULL), + (59, 25, NULL), + (59, 26, NULL), + (61, 5, NULL), + (61, 10, NULL), + (92, 1, 'fromDate'), + (92, 5, 'selectOffice'), + (92, 2, 'toDate'), + (93, 1, NULL), + (93, 2, NULL), + (93, 5, NULL), + (93, 6, NULL), + (94, 2, 'endDate'), + (94, 6, 'loanOfficerId'), + (94, 5, 'officeId'), + (94, 1, 'startDate'); /*!40000 ALTER TABLE `stretchy_report_parameter` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `x_registered_table` @@ -1865,10 +2582,11 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `x_registered_table`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `x_registered_table` ( - `registered_table_name` varchar(50) NOT NULL, - `application_table_name` varchar(50) NOT NULL, - PRIMARY KEY (`registered_table_name`) +CREATE TABLE `x_registered_table` +( + `registered_table_name` varchar(50) NOT NULL, + `application_table_name` varchar(50) NOT NULL, + PRIMARY KEY (`registered_table_name`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1876,11 +2594,16 @@ CREATE TABLE `x_registered_table` ( -- Dumping data for table `x_registered_table` -- -LOCK TABLES `x_registered_table` WRITE; +LOCK +TABLES `x_registered_table` WRITE; /*!40000 ALTER TABLE `x_registered_table` DISABLE KEYS */; -INSERT INTO `x_registered_table` VALUES ('client additional data','m_client'),('impact measurement','m_loan'),('loan additional data','m_loan'); +INSERT INTO `x_registered_table` +VALUES ('client additional data', 'm_client'), + ('impact measurement', 'm_loan'), + ('loan additional data', 'm_loan'); /*!40000 ALTER TABLE `x_registered_table` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; diff --git a/fineract-db/multi-tenant-demo-backups/ceda/bk_core_with_custom_and_coa.sql b/fineract-db/multi-tenant-demo-backups/ceda/bk_core_with_custom_and_coa.sql index 58d2caf3d8c..d688fcf56d2 100644 --- a/fineract-db/multi-tenant-demo-backups/ceda/bk_core_with_custom_and_coa.sql +++ b/fineract-db/multi-tenant-demo-backups/ceda/bk_core_with_custom_and_coa.sql @@ -41,20 +41,21 @@ DROP TABLE IF EXISTS `acc_gl_account`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_gl_account` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(45) NOT NULL, - `parent_id` BIGINT DEFAULT NULL, - `gl_code` varchar(45) NOT NULL, - `disabled` tinyint NOT NULL DEFAULT '0', - `manual_journal_entries_allowed` tinyint NOT NULL DEFAULT '1', - `account_usage` tinyint NOT NULL DEFAULT '2', - `classification_enum` SMALLINT NOT NULL, - `description` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `acc_gl_code` (`gl_code`), - KEY `FK_ACC_0000000001` (`parent_id`), - CONSTRAINT `FK_ACC_0000000001` FOREIGN KEY (`parent_id`) REFERENCES `acc_gl_account` (`id`) +CREATE TABLE `acc_gl_account` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(45) NOT NULL, + `parent_id` BIGINT DEFAULT NULL, + `gl_code` varchar(45) NOT NULL, + `disabled` tinyint NOT NULL DEFAULT '0', + `manual_journal_entries_allowed` tinyint NOT NULL DEFAULT '1', + `account_usage` tinyint NOT NULL DEFAULT '2', + `classification_enum` SMALLINT NOT NULL, + `description` varchar(500) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `acc_gl_code` (`gl_code`), + KEY `FK_ACC_0000000001` (`parent_id`), + CONSTRAINT `FK_ACC_0000000001` FOREIGN KEY (`parent_id`) REFERENCES `acc_gl_account` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=98 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -62,11 +63,110 @@ CREATE TABLE `acc_gl_account` ( -- Dumping data for table `acc_gl_account` -- -LOCK TABLES `acc_gl_account` WRITE; +LOCK +TABLES `acc_gl_account` WRITE; /*!40000 ALTER TABLE `acc_gl_account` DISABLE KEYS */; -INSERT INTO `acc_gl_account` VALUES (1,'Petty Cash Balances',NULL,'11100',0,1,2,1,NULL),(2,'Cash in Valut 1',NULL,'11101',0,1,1,1,NULL),(3,'Bank Balances',NULL,'11200',0,1,2,1,NULL),(4,'Centenary Opening Account',NULL,'11201',0,1,1,1,NULL),(5,'Centenary Expense Account',NULL,'11202',0,1,1,1,NULL),(6,'Centenary USD Account',NULL,'11203',0,1,1,1,NULL),(7,'Loans and Advances',NULL,'13100',0,1,2,1,NULL),(8,'Loans to Clients',NULL,'13101',0,1,1,1,NULL),(9,'Outstanding Interest',NULL,'13102',0,1,1,1,NULL),(10,'Outstanding Late Payment Interest',NULL,'13103',0,1,1,1,NULL),(11,'Outstanding Bank Fees to be collected',NULL,'13104',0,1,1,1,NULL),(12,'WriteOff Accounts',NULL,'13200',0,1,2,1,NULL),(13,'Write-offs (use for funds coming in)',NULL,'13201',0,1,1,1,NULL),(14,'Write-offs outstanding principal',NULL,'13202',0,1,1,1,NULL),(15,'Write-offs outstanding interest',NULL,'13203',0,1,1,1,NULL),(16,'Write-offs collected bank fees',NULL,'13204',0,1,1,1,NULL),(17,'Write-offs hardware/furniture',NULL,'13205',0,1,1,1,NULL),(18,'Fixed Assets',NULL,'14100',0,1,2,1,NULL),(19,'Office Equipment',NULL,'14101',0,1,1,1,NULL),(20,'Suspense Items (unidentified deposits)',NULL,'15000',0,1,2,1,NULL),(21,'Assets',NULL,'10000',0,1,2,1,NULL),(22,'Liabilities',NULL,'20000',0,1,2,2,NULL),(23,'Shares Account',NULL,'26100',0,1,2,2,NULL),(24,'Shares Captial',NULL,'26101',0,1,1,2,NULL),(25,'Donated Equity',NULL,'26300',0,1,2,2,NULL),(26,'Donated Equity Ameropa Foundation',NULL,'26301',0,1,1,2,NULL),(27,'Donated Equity e.h',NULL,'26302',0,1,1,2,NULL),(28,'Overpaid Amounts',NULL,'27000',0,1,2,2,NULL),(29,'Loss Provision',NULL,'28000',0,1,2,2,NULL),(30,'Provision Outstanding Principal',NULL,'28001',0,1,1,2,NULL),(31,'Provision Oustanding Interest',NULL,'28002',0,1,1,2,NULL),(32,'Income',NULL,'30000',0,1,2,4,NULL),(33,'Interest Income from Loans',NULL,'31100',0,1,2,4,NULL),(34,'Interest on Loans',NULL,'31101',0,1,1,4,NULL),(35,'Late Payment Interest',NULL,'31102',0,1,1,4,NULL),(36,'Income from Micro credit & Lending Activities',NULL,'31300',0,1,2,4,NULL),(37,'Collected Bank Fees Receivable',NULL,'6201',0,1,1,4,NULL),(38,'Deposits from Loans Write Off',NULL,'31400',0,1,2,4,NULL),(39,'Expenditure',NULL,'40000',0,1,2,5,NULL),(40,'Office Expenditure Account',NULL,'42100',0,1,2,5,NULL),(41,'Water Charges',NULL,'42102',0,1,1,5,NULL),(42,'Electricity Charges',NULL,'42103',0,1,1,5,NULL),(43,'Printing and Stationary',NULL,'42105',0,1,1,5,NULL),(44,'Office Rent',NULL,'42107',0,1,1,5,NULL),(45,'Marketing Expense',NULL,'42109',0,1,1,5,NULL),(46,'Office utilities',NULL,'42112',0,1,1,5,'(supplies, toiletries, kitchen)'),(47,'Furniture',NULL,'42113',0,1,1,5,NULL),(48,'CEDA Meeting Expense',NULL,'42114',0,1,1,5,NULL),(49,'Employee Personal Expsense Account',NULL,'42200',0,1,2,5,NULL),(50,'Salary Alice',NULL,'42201',0,1,1,5,NULL),(51,'Salary Irene',NULL,'42202',0,1,1,5,NULL),(52,'Salary Richard',NULL,'42203',0,1,1,5,NULL),(53,'Salary Loan Officer TBA',NULL,'42204',0,1,1,5,NULL),(54,'Medical Insurance Alice & Family',NULL,'42205',0,1,1,5,NULL),(55,'Medical Insurance Irene',NULL,'42206',0,1,1,5,NULL),(56,'Medical Insurance Richard',NULL,'42207',0,1,1,5,NULL),(57,'Medical Insurance Loan Officer TBA',NULL,'42208',0,1,1,5,NULL),(58,'PAYE all employees',NULL,'42209',0,1,1,5,NULL),(59,'NSSF all employees',NULL,'42210',0,1,1,5,NULL),(60,'Lunch Allowances all employees',NULL,'42211',0,1,1,5,NULL),(61,'IT software and maintenance',NULL,'42300',0,1,2,5,NULL),(62,'Mifos maintenance contract 12 months',NULL,'42301',0,1,1,5,NULL),(63,'VPS Contract 12 months',NULL,'42302',0,1,1,5,NULL),(64,'Bulk SMS Service',NULL,'42303',0,1,1,5,NULL),(65,'Support Accounting Software',NULL,'42304',0,1,1,5,NULL),(66,'Mifos Instance Setup',NULL,'42305',0,1,1,5,NULL),(67,'Misc support expense',NULL,'42306',0,1,1,5,NULL),(68,'Warid Mobile Line',NULL,'42307',0,1,1,5,NULL),(69,'Landline',NULL,'42308',0,1,1,5,NULL),(70,'Modem Alice',NULL,'42309',0,1,1,5,NULL),(71,'Modem Irene',NULL,'42310',0,1,1,5,NULL),(72,'Modem Richard',NULL,'42311',0,1,1,5,NULL),(73,'Repairs',NULL,'42312',0,1,1,5,NULL),(74,'Airtime Expenses',NULL,'42400',0,1,2,5,NULL),(75,'Airtime Alice',NULL,'42401',0,1,1,5,NULL),(76,'Airtime Richard',NULL,'42402',0,1,1,5,NULL),(77,'Airtime Loan Office TBA',NULL,'42403',0,1,1,5,NULL),(78,'Special Airtime Alice',NULL,'42404',0,1,1,5,NULL),(79,'Transportation',NULL,'42500',0,1,2,5,NULL),(80,'Flat monthly transportation cost',NULL,'42501',0,1,1,5,NULL),(81,'Faciliation cost for Richard',NULL,'42502',0,1,1,5,NULL),(82,'Faciliation cost for Loan Officer TBA',NULL,'42503',0,1,1,5,NULL),(83,'Consultancy Expenses',NULL,'42600',0,1,2,5,NULL),(84,'Audit Fees',NULL,'42601',0,1,1,5,NULL),(85,'Legal Fees',NULL,'42602',0,1,1,5,NULL),(86,'Miscellaneous Expenses Account',NULL,'42700',0,1,2,5,NULL),(87,'MFI License',NULL,'42703',0,1,1,5,NULL),(88,'Sundy Expenses',NULL,'42704',0,1,1,5,NULL),(89,'Bank Fees',NULL,'42800',0,1,2,5,NULL),(90,'Bank Charges Operating Account',NULL,'42801',0,1,1,5,NULL),(91,'Bank Charges Expense Account',NULL,'42802',0,1,1,5,NULL),(92,'E.H Account',NULL,'42900',0,1,2,5,NULL),(93,'Airtime',NULL,'42901',0,1,1,5,NULL),(94,'Modem',NULL,'42902',0,1,1,5,NULL),(95,'Meals',NULL,'42903',0,1,1,5,NULL),(96,'Transportation',NULL,'42904',0,1,1,5,NULL),(97,'Miscellaneous',NULL,'42905',0,1,1,5,NULL); +INSERT INTO `acc_gl_account` +VALUES (1, 'Petty Cash Balances', NULL, '11100', 0, 1, 2, 1, NULL), + (2, 'Cash in Valut 1', NULL, '11101', 0, 1, 1, 1, NULL), + (3, 'Bank Balances', NULL, '11200', 0, 1, 2, 1, NULL), + (4, 'Centenary Opening Account', NULL, '11201', 0, 1, 1, 1, NULL), + (5, 'Centenary Expense Account', NULL, '11202', 0, 1, 1, 1, NULL), + (6, 'Centenary USD Account', NULL, '11203', 0, 1, 1, 1, NULL), + (7, 'Loans and Advances', NULL, '13100', 0, 1, 2, 1, NULL), + (8, 'Loans to Clients', NULL, '13101', 0, 1, 1, 1, NULL), + (9, 'Outstanding Interest', NULL, '13102', 0, 1, 1, 1, NULL), + (10, 'Outstanding Late Payment Interest', NULL, '13103', 0, 1, 1, 1, NULL), + (11, 'Outstanding Bank Fees to be collected', NULL, '13104', 0, 1, 1, 1, NULL), + (12, 'WriteOff Accounts', NULL, '13200', 0, 1, 2, 1, NULL), + (13, 'Write-offs (use for funds coming in)', NULL, '13201', 0, 1, 1, 1, NULL), + (14, 'Write-offs outstanding principal', NULL, '13202', 0, 1, 1, 1, NULL), + (15, 'Write-offs outstanding interest', NULL, '13203', 0, 1, 1, 1, NULL), + (16, 'Write-offs collected bank fees', NULL, '13204', 0, 1, 1, 1, NULL), + (17, 'Write-offs hardware/furniture', NULL, '13205', 0, 1, 1, 1, NULL), + (18, 'Fixed Assets', NULL, '14100', 0, 1, 2, 1, NULL), + (19, 'Office Equipment', NULL, '14101', 0, 1, 1, 1, NULL), + (20, 'Suspense Items (unidentified deposits)', NULL, '15000', 0, 1, 2, 1, NULL), + (21, 'Assets', NULL, '10000', 0, 1, 2, 1, NULL), + (22, 'Liabilities', NULL, '20000', 0, 1, 2, 2, NULL), + (23, 'Shares Account', NULL, '26100', 0, 1, 2, 2, NULL), + (24, 'Shares Captial', NULL, '26101', 0, 1, 1, 2, NULL), + (25, 'Donated Equity', NULL, '26300', 0, 1, 2, 2, NULL), + (26, 'Donated Equity Ameropa Foundation', NULL, '26301', 0, 1, 1, 2, NULL), + (27, 'Donated Equity e.h', NULL, '26302', 0, 1, 1, 2, NULL), + (28, 'Overpaid Amounts', NULL, '27000', 0, 1, 2, 2, NULL), + (29, 'Loss Provision', NULL, '28000', 0, 1, 2, 2, NULL), + (30, 'Provision Outstanding Principal', NULL, '28001', 0, 1, 1, 2, NULL), + (31, 'Provision Oustanding Interest', NULL, '28002', 0, 1, 1, 2, NULL), + (32, 'Income', NULL, '30000', 0, 1, 2, 4, NULL), + (33, 'Interest Income from Loans', NULL, '31100', 0, 1, 2, 4, NULL), + (34, 'Interest on Loans', NULL, '31101', 0, 1, 1, 4, NULL), + (35, 'Late Payment Interest', NULL, '31102', 0, 1, 1, 4, NULL), + (36, 'Income from Micro credit & Lending Activities', NULL, '31300', 0, 1, 2, 4, NULL), + (37, 'Collected Bank Fees Receivable', NULL, '6201', 0, 1, 1, 4, NULL), + (38, 'Deposits from Loans Write Off', NULL, '31400', 0, 1, 2, 4, NULL), + (39, 'Expenditure', NULL, '40000', 0, 1, 2, 5, NULL), + (40, 'Office Expenditure Account', NULL, '42100', 0, 1, 2, 5, NULL), + (41, 'Water Charges', NULL, '42102', 0, 1, 1, 5, NULL), + (42, 'Electricity Charges', NULL, '42103', 0, 1, 1, 5, NULL), + (43, 'Printing and Stationary', NULL, '42105', 0, 1, 1, 5, NULL), + (44, 'Office Rent', NULL, '42107', 0, 1, 1, 5, NULL), + (45, 'Marketing Expense', NULL, '42109', 0, 1, 1, 5, NULL), + (46, 'Office utilities', NULL, '42112', 0, 1, 1, 5, '(supplies, toiletries, kitchen)'), + (47, 'Furniture', NULL, '42113', 0, 1, 1, 5, NULL), + (48, 'CEDA Meeting Expense', NULL, '42114', 0, 1, 1, 5, NULL), + (49, 'Employee Personal Expsense Account', NULL, '42200', 0, 1, 2, 5, NULL), + (50, 'Salary Alice', NULL, '42201', 0, 1, 1, 5, NULL), + (51, 'Salary Irene', NULL, '42202', 0, 1, 1, 5, NULL), + (52, 'Salary Richard', NULL, '42203', 0, 1, 1, 5, NULL), + (53, 'Salary Loan Officer TBA', NULL, '42204', 0, 1, 1, 5, NULL), + (54, 'Medical Insurance Alice & Family', NULL, '42205', 0, 1, 1, 5, NULL), + (55, 'Medical Insurance Irene', NULL, '42206', 0, 1, 1, 5, NULL), + (56, 'Medical Insurance Richard', NULL, '42207', 0, 1, 1, 5, NULL), + (57, 'Medical Insurance Loan Officer TBA', NULL, '42208', 0, 1, 1, 5, NULL), + (58, 'PAYE all employees', NULL, '42209', 0, 1, 1, 5, NULL), + (59, 'NSSF all employees', NULL, '42210', 0, 1, 1, 5, NULL), + (60, 'Lunch Allowances all employees', NULL, '42211', 0, 1, 1, 5, NULL), + (61, 'IT software and maintenance', NULL, '42300', 0, 1, 2, 5, NULL), + (62, 'Mifos maintenance contract 12 months', NULL, '42301', 0, 1, 1, 5, NULL), + (63, 'VPS Contract 12 months', NULL, '42302', 0, 1, 1, 5, NULL), + (64, 'Bulk SMS Service', NULL, '42303', 0, 1, 1, 5, NULL), + (65, 'Support Accounting Software', NULL, '42304', 0, 1, 1, 5, NULL), + (66, 'Mifos Instance Setup', NULL, '42305', 0, 1, 1, 5, NULL), + (67, 'Misc support expense', NULL, '42306', 0, 1, 1, 5, NULL), + (68, 'Warid Mobile Line', NULL, '42307', 0, 1, 1, 5, NULL), + (69, 'Landline', NULL, '42308', 0, 1, 1, 5, NULL), + (70, 'Modem Alice', NULL, '42309', 0, 1, 1, 5, NULL), + (71, 'Modem Irene', NULL, '42310', 0, 1, 1, 5, NULL), + (72, 'Modem Richard', NULL, '42311', 0, 1, 1, 5, NULL), + (73, 'Repairs', NULL, '42312', 0, 1, 1, 5, NULL), + (74, 'Airtime Expenses', NULL, '42400', 0, 1, 2, 5, NULL), + (75, 'Airtime Alice', NULL, '42401', 0, 1, 1, 5, NULL), + (76, 'Airtime Richard', NULL, '42402', 0, 1, 1, 5, NULL), + (77, 'Airtime Loan Office TBA', NULL, '42403', 0, 1, 1, 5, NULL), + (78, 'Special Airtime Alice', NULL, '42404', 0, 1, 1, 5, NULL), + (79, 'Transportation', NULL, '42500', 0, 1, 2, 5, NULL), + (80, 'Flat monthly transportation cost', NULL, '42501', 0, 1, 1, 5, NULL), + (81, 'Faciliation cost for Richard', NULL, '42502', 0, 1, 1, 5, NULL), + (82, 'Faciliation cost for Loan Officer TBA', NULL, '42503', 0, 1, 1, 5, NULL), + (83, 'Consultancy Expenses', NULL, '42600', 0, 1, 2, 5, NULL), + (84, 'Audit Fees', NULL, '42601', 0, 1, 1, 5, NULL), + (85, 'Legal Fees', NULL, '42602', 0, 1, 1, 5, NULL), + (86, 'Miscellaneous Expenses Account', NULL, '42700', 0, 1, 2, 5, NULL), + (87, 'MFI License', NULL, '42703', 0, 1, 1, 5, NULL), + (88, 'Sundy Expenses', NULL, '42704', 0, 1, 1, 5, NULL), + (89, 'Bank Fees', NULL, '42800', 0, 1, 2, 5, NULL), + (90, 'Bank Charges Operating Account', NULL, '42801', 0, 1, 1, 5, NULL), + (91, 'Bank Charges Expense Account', NULL, '42802', 0, 1, 1, 5, NULL), + (92, 'E.H Account', NULL, '42900', 0, 1, 2, 5, NULL), + (93, 'Airtime', NULL, '42901', 0, 1, 1, 5, NULL), + (94, 'Modem', NULL, '42902', 0, 1, 1, 5, NULL), + (95, 'Meals', NULL, '42903', 0, 1, 1, 5, NULL), + (96, 'Transportation', NULL, '42904', 0, 1, 1, 5, NULL), + (97, 'Miscellaneous', NULL, '42905', 0, 1, 1, 5, NULL); /*!40000 ALTER TABLE `acc_gl_account` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `acc_gl_closure` @@ -75,24 +175,25 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `acc_gl_closure`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_gl_closure` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `office_id` BIGINT NOT NULL, - `closing_date` date NOT NULL, - `is_deleted` INT NOT NULL DEFAULT '0', - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - `comments` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `office_id_closing_date` (`office_id`,`closing_date`), - KEY `FK_acc_gl_closure_m_office` (`office_id`), - KEY `FK_acc_gl_closure_m_appuser` (`createdby_id`), - KEY `FK_acc_gl_closure_m_appuser_2` (`lastmodifiedby_id`), - CONSTRAINT `FK_acc_gl_closure_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_closure_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_closure_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `acc_gl_closure` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `office_id` BIGINT NOT NULL, + `closing_date` date NOT NULL, + `is_deleted` INT NOT NULL DEFAULT '0', + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + `comments` varchar(500) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `office_id_closing_date` (`office_id`,`closing_date`), + KEY `FK_acc_gl_closure_m_office` (`office_id`), + KEY `FK_acc_gl_closure_m_appuser` (`createdby_id`), + KEY `FK_acc_gl_closure_m_appuser_2` (`lastmodifiedby_id`), + CONSTRAINT `FK_acc_gl_closure_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_closure_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_closure_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -100,10 +201,12 @@ CREATE TABLE `acc_gl_closure` ( -- Dumping data for table `acc_gl_closure` -- -LOCK TABLES `acc_gl_closure` WRITE; +LOCK +TABLES `acc_gl_closure` WRITE; /*!40000 ALTER TABLE `acc_gl_closure` DISABLE KEYS */; /*!40000 ALTER TABLE `acc_gl_closure` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `acc_gl_journal_entry` @@ -112,35 +215,36 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `acc_gl_journal_entry`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_gl_journal_entry` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_id` BIGINT NOT NULL, - `office_id` BIGINT NOT NULL, - `reversal_id` BIGINT DEFAULT NULL, - `transaction_id` varchar(50) NOT NULL, - `reversed` tinyint NOT NULL DEFAULT '0', - `manual_entry` tinyint NOT NULL DEFAULT '0', - `entry_date` date NOT NULL, - `type_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `entity_type_enum` SMALLINT DEFAULT NULL, - `entity_id` BIGINT DEFAULT NULL, - `createdby_id` BIGINT NOT NULL, - `lastmodifiedby_id` BIGINT NOT NULL, - `created_date` datetime NOT NULL, - `lastmodified_date` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_acc_gl_journal_entry_m_office` (`office_id`), - KEY `FK_acc_gl_journal_entry_m_appuser` (`createdby_id`), - KEY `FK_acc_gl_journal_entry_m_appuser_2` (`lastmodifiedby_id`), - KEY `FK_acc_gl_journal_entry_acc_gl_journal_entry` (`reversal_id`), - KEY `FK_acc_gl_journal_entry_acc_gl_account` (`account_id`), - CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_account` FOREIGN KEY (`account_id`) REFERENCES `acc_gl_account` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_journal_entry` FOREIGN KEY (`reversal_id`) REFERENCES `acc_gl_journal_entry` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `acc_gl_journal_entry` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `account_id` BIGINT NOT NULL, + `office_id` BIGINT NOT NULL, + `reversal_id` BIGINT DEFAULT NULL, + `transaction_id` varchar(50) NOT NULL, + `reversed` tinyint NOT NULL DEFAULT '0', + `manual_entry` tinyint NOT NULL DEFAULT '0', + `entry_date` date NOT NULL, + `type_enum` SMALLINT NOT NULL, + `amount` decimal(19, 6) NOT NULL, + `description` varchar(500) DEFAULT NULL, + `entity_type_enum` SMALLINT DEFAULT NULL, + `entity_id` BIGINT DEFAULT NULL, + `createdby_id` BIGINT NOT NULL, + `lastmodifiedby_id` BIGINT NOT NULL, + `created_date` datetime NOT NULL, + `lastmodified_date` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `FK_acc_gl_journal_entry_m_office` (`office_id`), + KEY `FK_acc_gl_journal_entry_m_appuser` (`createdby_id`), + KEY `FK_acc_gl_journal_entry_m_appuser_2` (`lastmodifiedby_id`), + KEY `FK_acc_gl_journal_entry_acc_gl_journal_entry` (`reversal_id`), + KEY `FK_acc_gl_journal_entry_acc_gl_account` (`account_id`), + CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_account` FOREIGN KEY (`account_id`) REFERENCES `acc_gl_account` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_journal_entry` FOREIGN KEY (`reversal_id`) REFERENCES `acc_gl_journal_entry` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -148,10 +252,12 @@ CREATE TABLE `acc_gl_journal_entry` ( -- Dumping data for table `acc_gl_journal_entry` -- -LOCK TABLES `acc_gl_journal_entry` WRITE; +LOCK +TABLES `acc_gl_journal_entry` WRITE; /*!40000 ALTER TABLE `acc_gl_journal_entry` DISABLE KEYS */; /*!40000 ALTER TABLE `acc_gl_journal_entry` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `acc_product_mapping` @@ -160,13 +266,14 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `acc_product_mapping`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_product_mapping` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `gl_account_id` BIGINT DEFAULT NULL, - `product_id` BIGINT DEFAULT NULL, - `product_type` SMALLINT DEFAULT NULL, - `financial_account_type` SMALLINT DEFAULT NULL, - PRIMARY KEY (`id`) +CREATE TABLE `acc_product_mapping` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `gl_account_id` BIGINT DEFAULT NULL, + `product_id` BIGINT DEFAULT NULL, + `product_type` SMALLINT DEFAULT NULL, + `financial_account_type` SMALLINT DEFAULT NULL, + PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -174,11 +281,19 @@ CREATE TABLE `acc_product_mapping` ( -- Dumping data for table `acc_product_mapping` -- -LOCK TABLES `acc_product_mapping` WRITE; +LOCK +TABLES `acc_product_mapping` WRITE; /*!40000 ALTER TABLE `acc_product_mapping` DISABLE KEYS */; -INSERT INTO `acc_product_mapping` VALUES (1,4,1,1,1),(2,8,1,1,2),(3,34,1,1,3),(4,37,1,1,4),(5,35,1,1,5),(6,97,1,1,6); +INSERT INTO `acc_product_mapping` +VALUES (1, 4, 1, 1, 1), + (2, 8, 1, 1, 2), + (3, 34, 1, 1, 3), + (4, 37, 1, 1, 4), + (5, 35, 1, 1, 5), + (6, 97, 1, 1, 6); /*!40000 ALTER TABLE `acc_product_mapping` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `c_configuration` @@ -187,11 +302,12 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `c_configuration`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `c_configuration` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(50) DEFAULT NULL, - `enabled` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) +CREATE TABLE `c_configuration` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(50) DEFAULT NULL, + `enabled` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -199,11 +315,14 @@ CREATE TABLE `c_configuration` ( -- Dumping data for table `c_configuration` -- -LOCK TABLES `c_configuration` WRITE; +LOCK +TABLES `c_configuration` WRITE; /*!40000 ALTER TABLE `c_configuration` DISABLE KEYS */; -INSERT INTO `c_configuration` VALUES (1,'maker-checker',0); +INSERT INTO `c_configuration` +VALUES (1, 'maker-checker', 0); /*!40000 ALTER TABLE `c_configuration` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `client additional data` @@ -212,47 +331,48 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `client additional data`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `client additional data` ( - `client_id` BIGINT NOT NULL, - `Gender_cd` INT NOT NULL, - `Date of Birth` date NOT NULL, - `Home address` text NOT NULL, - `Telephone number` varchar(20) NOT NULL, - `Telephone number (2nd)` varchar(20) NOT NULL, - `Email address` varchar(50) NOT NULL, - `EducationLevel_cd` INT NOT NULL, - `MaritalStatus_cd` INT NOT NULL, - `Number of children` INT NOT NULL, - `Citizenship` varchar(50) NOT NULL, - `PovertyStatus_cd` INT NOT NULL, - `YesNo_cd_Employed` INT NOT NULL, - `FieldOfEmployment_cd_Field of employment` INT DEFAULT NULL, - `Employer name` varchar(50) DEFAULT NULL, - `Number of years` INT DEFAULT NULL, - `Monthly salary` decimal(19,6) DEFAULT NULL, - `YesNo_cd_Self employed` INT NOT NULL, - `FieldOfEmployment_cd_Field of self-employment` INT DEFAULT NULL, - `Business address` text, - `Number of employees` INT DEFAULT NULL, - `Monthly salaries paid` decimal(19,6) DEFAULT NULL, - `Monthly net income of business activity` decimal(19,6) DEFAULT NULL, - `Monthly rent` decimal(19,6) DEFAULT NULL, - `Other income generating activities` varchar(100) DEFAULT NULL, - `YesNo_cd_Bookkeeping` INT DEFAULT NULL, - `YesNo_cd_Loans with other institutions` INT NOT NULL, - `From whom` varchar(100) DEFAULT NULL, - `Amount` decimal(19,6) DEFAULT NULL, - `Interest rate pa` decimal(19,6) DEFAULT NULL, - `Number of people depending on overal income` INT NOT NULL, - `YesNo_cd_Bank account` INT NOT NULL, - `YesNo_cd_Business plan provided` INT NOT NULL, - `YesNo_cd_Access to internet` INT DEFAULT NULL, - `Introduced by` varchar(100) DEFAULT NULL, - `Known to introducer since` varchar(100) NOT NULL, - `Last visited by` varchar(100) DEFAULT NULL, - `Last visited on` date NOT NULL, - PRIMARY KEY (`client_id`), - CONSTRAINT `FK_client_additional_data` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `client additional data` +( + `client_id` BIGINT NOT NULL, + `Gender_cd` INT NOT NULL, + `Date of Birth` date NOT NULL, + `Home address` text NOT NULL, + `Telephone number` varchar(20) NOT NULL, + `Telephone number (2nd)` varchar(20) NOT NULL, + `Email address` varchar(50) NOT NULL, + `EducationLevel_cd` INT NOT NULL, + `MaritalStatus_cd` INT NOT NULL, + `Number of children` INT NOT NULL, + `Citizenship` varchar(50) NOT NULL, + `PovertyStatus_cd` INT NOT NULL, + `YesNo_cd_Employed` INT NOT NULL, + `FieldOfEmployment_cd_Field of employment` INT DEFAULT NULL, + `Employer name` varchar(50) DEFAULT NULL, + `Number of years` INT DEFAULT NULL, + `Monthly salary` decimal(19, 6) DEFAULT NULL, + `YesNo_cd_Self employed` INT NOT NULL, + `FieldOfEmployment_cd_Field of self-employment` INT DEFAULT NULL, + `Business address` text, + `Number of employees` INT DEFAULT NULL, + `Monthly salaries paid` decimal(19, 6) DEFAULT NULL, + `Monthly net income of business activity` decimal(19, 6) DEFAULT NULL, + `Monthly rent` decimal(19, 6) DEFAULT NULL, + `Other income generating activities` varchar(100) DEFAULT NULL, + `YesNo_cd_Bookkeeping` INT DEFAULT NULL, + `YesNo_cd_Loans with other institutions` INT NOT NULL, + `From whom` varchar(100) DEFAULT NULL, + `Amount` decimal(19, 6) DEFAULT NULL, + `Interest rate pa` decimal(19, 6) DEFAULT NULL, + `Number of people depending on overal income` INT NOT NULL, + `YesNo_cd_Bank account` INT NOT NULL, + `YesNo_cd_Business plan provided` INT NOT NULL, + `YesNo_cd_Access to internet` INT DEFAULT NULL, + `Introduced by` varchar(100) DEFAULT NULL, + `Known to introducer since` varchar(100) NOT NULL, + `Last visited by` varchar(100) DEFAULT NULL, + `Last visited on` date NOT NULL, + PRIMARY KEY (`client_id`), + CONSTRAINT `FK_client_additional_data` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -260,10 +380,12 @@ CREATE TABLE `client additional data` ( -- Dumping data for table `client additional data` -- -LOCK TABLES `client additional data` WRITE; +LOCK +TABLES `client additional data` WRITE; /*!40000 ALTER TABLE `client additional data` DISABLE KEYS */; /*!40000 ALTER TABLE `client additional data` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `impact measurement` @@ -272,17 +394,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `impact measurement`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `impact measurement` ( - `loan_id` BIGINT NOT NULL, - `YesNo_cd_RepaidOnSchedule` INT NOT NULL, - `ReasonNotRepaidOnSchedule` text, - `How was Loan Amount Invested` text NOT NULL, - `Additional Income Generated` decimal(19,6) NOT NULL, - `Additional Income Used For` text NOT NULL, - `YesNo_cd_NewJobsCreated` INT NOT NULL, - `Number of Jobs Created` BIGINT DEFAULT NULL, - PRIMARY KEY (`loan_id`), - CONSTRAINT `FK_impact measurement` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +CREATE TABLE `impact measurement` +( + `loan_id` BIGINT NOT NULL, + `YesNo_cd_RepaidOnSchedule` INT NOT NULL, + `ReasonNotRepaidOnSchedule` text, + `How was Loan Amount Invested` text NOT NULL, + `Additional Income Generated` decimal(19, 6) NOT NULL, + `Additional Income Used For` text NOT NULL, + `YesNo_cd_NewJobsCreated` INT NOT NULL, + `Number of Jobs Created` BIGINT DEFAULT NULL, + PRIMARY KEY (`loan_id`), + CONSTRAINT `FK_impact measurement` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -290,10 +413,12 @@ CREATE TABLE `impact measurement` ( -- Dumping data for table `impact measurement` -- -LOCK TABLES `impact measurement` WRITE; +LOCK +TABLES `impact measurement` WRITE; /*!40000 ALTER TABLE `impact measurement` DISABLE KEYS */; /*!40000 ALTER TABLE `impact measurement` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `loan additional data` @@ -302,18 +427,19 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `loan additional data`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `loan additional data` ( - `loan_id` BIGINT NOT NULL, - `PurposeOfLoan_cd` INT NOT NULL, - `CollateralType_cd` INT NOT NULL, - `Collateral notes` text NOT NULL, - `YesNo_cd_Guarantor` INT NOT NULL, - `Guarantor name` varchar(100) DEFAULT NULL, - `Guarantor relation` varchar(100) DEFAULT NULL, - `Guarantor address` varchar(100) DEFAULT NULL, - `Guarantor telephone number` varchar(20) DEFAULT NULL, - PRIMARY KEY (`loan_id`), - CONSTRAINT `FK_loan_additional_data` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +CREATE TABLE `loan additional data` +( + `loan_id` BIGINT NOT NULL, + `PurposeOfLoan_cd` INT NOT NULL, + `CollateralType_cd` INT NOT NULL, + `Collateral notes` text NOT NULL, + `YesNo_cd_Guarantor` INT NOT NULL, + `Guarantor name` varchar(100) DEFAULT NULL, + `Guarantor relation` varchar(100) DEFAULT NULL, + `Guarantor address` varchar(100) DEFAULT NULL, + `Guarantor telephone number` varchar(20) DEFAULT NULL, + PRIMARY KEY (`loan_id`), + CONSTRAINT `FK_loan_additional_data` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -321,10 +447,12 @@ CREATE TABLE `loan additional data` ( -- Dumping data for table `loan additional data` -- -LOCK TABLES `loan additional data` WRITE; +LOCK +TABLES `loan additional data` WRITE; /*!40000 ALTER TABLE `loan additional data` DISABLE KEYS */; /*!40000 ALTER TABLE `loan additional data` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_appuser` @@ -333,24 +461,25 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_appuser`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_appuser` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `is_deleted` tinyint NOT NULL DEFAULT '0', - `office_id` BIGINT DEFAULT NULL, - `username` varchar(100) NOT NULL, - `firstname` varchar(100) NOT NULL, - `lastname` varchar(100) NOT NULL, - `password` varchar(255) NOT NULL, - `email` varchar(100) NOT NULL, - `firsttime_login_remaining` bit(1) NOT NULL, - `nonexpired` bit(1) NOT NULL, - `nonlocked` bit(1) NOT NULL, - `nonexpired_credentials` bit(1) NOT NULL, - `enabled` bit(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `username_org` (`username`), - KEY `FKB3D587CE0DD567A` (`office_id`), - CONSTRAINT `FKB3D587CE0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `m_appuser` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `is_deleted` tinyint NOT NULL DEFAULT '0', + `office_id` BIGINT DEFAULT NULL, + `username` varchar(100) NOT NULL, + `firstname` varchar(100) NOT NULL, + `lastname` varchar(100) NOT NULL, + `password` varchar(255) NOT NULL, + `email` varchar(100) NOT NULL, + `firsttime_login_remaining` bit(1) NOT NULL, + `nonexpired` bit(1) NOT NULL, + `nonlocked` bit(1) NOT NULL, + `nonexpired_credentials` bit(1) NOT NULL, + `enabled` bit(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `username_org` (`username`), + KEY `FKB3D587CE0DD567A` (`office_id`), + CONSTRAINT `FKB3D587CE0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -358,11 +487,18 @@ CREATE TABLE `m_appuser` ( -- Dumping data for table `m_appuser` -- -LOCK TABLES `m_appuser` WRITE; +LOCK +TABLES `m_appuser` WRITE; /*!40000 ALTER TABLE `m_appuser` DISABLE KEYS */; -INSERT INTO `m_appuser` VALUES (1,0,1,'admin','App','Administrator','5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a','demomfi@mifos.org','\0','','','',''),(2,0,1,'keithwoodlock','Keith','Woodlock','4f607e9b6cffbe7d3db92d4bfa3391c7aa751727b4ea29d08fddf9dd72e6e7e3','keithwoodlock@gmail.com','\0','','','',''); +INSERT INTO `m_appuser` +VALUES (1, 0, 1, 'admin', 'App', 'Administrator', '5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a', + 'demomfi@mifos.org', '\0', '', '', '', ''), + (2, 0, 1, 'keithwoodlock', 'Keith', 'Woodlock', + '4f607e9b6cffbe7d3db92d4bfa3391c7aa751727b4ea29d08fddf9dd72e6e7e3', 'keithwoodlock@gmail.com', '\0', '', '', + '', ''); /*!40000 ALTER TABLE `m_appuser` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_appuser_role` @@ -371,14 +507,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_appuser_role`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_appuser_role` ( - `appuser_id` BIGINT NOT NULL, - `role_id` BIGINT NOT NULL, - PRIMARY KEY (`appuser_id`,`role_id`), - KEY `FK7662CE59B4100309` (`appuser_id`), - KEY `FK7662CE5915CEC7AB` (`role_id`), - CONSTRAINT `FK7662CE5915CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`), - CONSTRAINT `FK7662CE59B4100309` FOREIGN KEY (`appuser_id`) REFERENCES `m_appuser` (`id`) +CREATE TABLE `m_appuser_role` +( + `appuser_id` BIGINT NOT NULL, + `role_id` BIGINT NOT NULL, + PRIMARY KEY (`appuser_id`, `role_id`), + KEY `FK7662CE59B4100309` (`appuser_id`), + KEY `FK7662CE5915CEC7AB` (`role_id`), + CONSTRAINT `FK7662CE5915CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`), + CONSTRAINT `FK7662CE59B4100309` FOREIGN KEY (`appuser_id`) REFERENCES `m_appuser` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -386,11 +523,15 @@ CREATE TABLE `m_appuser_role` ( -- Dumping data for table `m_appuser_role` -- -LOCK TABLES `m_appuser_role` WRITE; +LOCK +TABLES `m_appuser_role` WRITE; /*!40000 ALTER TABLE `m_appuser_role` DISABLE KEYS */; -INSERT INTO `m_appuser_role` VALUES (1,1),(2,1); +INSERT INTO `m_appuser_role` +VALUES (1, 1), + (2, 1); /*!40000 ALTER TABLE `m_appuser_role` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_calendar` @@ -399,25 +540,26 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_calendar`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_calendar` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `title` varchar(50) NOT NULL, - `description` varchar(100) DEFAULT NULL, - `location` varchar(50) DEFAULT NULL, - `start_date` date NOT NULL, - `end_date` date DEFAULT NULL, - `duration` SMALLINT DEFAULT NULL, - `calendar_type_enum` SMALLINT NOT NULL, - `repeating` tinyint NOT NULL DEFAULT '0', - `recurrence` varchar(100) DEFAULT NULL, - `remind_by_enum` SMALLINT DEFAULT NULL, - `first_reminder` smallint DEFAULT NULL, - `second_reminder` smallint DEFAULT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - PRIMARY KEY (`id`) +CREATE TABLE `m_calendar` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `title` varchar(50) NOT NULL, + `description` varchar(100) DEFAULT NULL, + `location` varchar(50) DEFAULT NULL, + `start_date` date NOT NULL, + `end_date` date DEFAULT NULL, + `duration` SMALLINT DEFAULT NULL, + `calendar_type_enum` SMALLINT NOT NULL, + `repeating` tinyint NOT NULL DEFAULT '0', + `recurrence` varchar(100) DEFAULT NULL, + `remind_by_enum` SMALLINT DEFAULT NULL, + `first_reminder` smallint DEFAULT NULL, + `second_reminder` smallint DEFAULT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -425,10 +567,12 @@ CREATE TABLE `m_calendar` ( -- Dumping data for table `m_calendar` -- -LOCK TABLES `m_calendar` WRITE; +LOCK +TABLES `m_calendar` WRITE; /*!40000 ALTER TABLE `m_calendar` DISABLE KEYS */; /*!40000 ALTER TABLE `m_calendar` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_calendar_instance` @@ -437,14 +581,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_calendar_instance`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_calendar_instance` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `calendar_id` BIGINT NOT NULL, - `entity_id` BIGINT NOT NULL, - `entity_type_enum` SMALLINT NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_calendar_m_calendar_instance` (`calendar_id`), - CONSTRAINT `FK_m_calendar_m_calendar_instance` FOREIGN KEY (`calendar_id`) REFERENCES `m_calendar` (`id`) +CREATE TABLE `m_calendar_instance` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `calendar_id` BIGINT NOT NULL, + `entity_id` BIGINT NOT NULL, + `entity_type_enum` SMALLINT NOT NULL, + PRIMARY KEY (`id`), + KEY `FK_m_calendar_m_calendar_instance` (`calendar_id`), + CONSTRAINT `FK_m_calendar_m_calendar_instance` FOREIGN KEY (`calendar_id`) REFERENCES `m_calendar` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -452,10 +597,12 @@ CREATE TABLE `m_calendar_instance` ( -- Dumping data for table `m_calendar_instance` -- -LOCK TABLES `m_calendar_instance` WRITE; +LOCK +TABLES `m_calendar_instance` WRITE; /*!40000 ALTER TABLE `m_calendar_instance` DISABLE KEYS */; /*!40000 ALTER TABLE `m_calendar_instance` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_charge` @@ -464,19 +611,20 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_charge`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_charge` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL, - `currency_code` varchar(3) NOT NULL, - `charge_applies_to_enum` SMALLINT NOT NULL, - `charge_time_enum` SMALLINT NOT NULL, - `charge_calculation_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `is_penalty` tinyint NOT NULL DEFAULT '0', - `is_active` tinyint NOT NULL, - `is_deleted` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`) +CREATE TABLE `m_charge` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(100) DEFAULT NULL, + `currency_code` varchar(3) NOT NULL, + `charge_applies_to_enum` SMALLINT NOT NULL, + `charge_time_enum` SMALLINT NOT NULL, + `charge_calculation_enum` SMALLINT NOT NULL, + `amount` decimal(19, 6) NOT NULL, + `is_penalty` tinyint NOT NULL DEFAULT '0', + `is_active` tinyint NOT NULL, + `is_deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -484,11 +632,14 @@ CREATE TABLE `m_charge` ( -- Dumping data for table `m_charge` -- -LOCK TABLES `m_charge` WRITE; +LOCK +TABLES `m_charge` WRITE; /*!40000 ALTER TABLE `m_charge` DISABLE KEYS */; -INSERT INTO `m_charge` VALUES (1,'Bank Fee (per installment)','UGX',1,2,1,'1500.000000',0,1,0); +INSERT INTO `m_charge` +VALUES (1, 'Bank Fee (per installment)', 'UGX', 1, 2, 1, '1500.000000', 0, 1, 0); /*!40000 ALTER TABLE `m_charge` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_client` @@ -497,24 +648,25 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_client`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_client` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_no` varchar(20) NOT NULL, - `office_id` BIGINT NOT NULL, - `external_id` varchar(100) DEFAULT NULL, - `firstname` varchar(50) DEFAULT NULL, - `middlename` varchar(50) DEFAULT NULL, - `lastname` varchar(50) DEFAULT NULL, - `fullname` varchar(100) DEFAULT NULL, - `display_name` varchar(100) NOT NULL, - `image_key` varchar(500) DEFAULT NULL, - `joined_date` date DEFAULT NULL, - `is_deleted` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `account_no_UNIQUE` (`account_no`), - UNIQUE KEY `external_id` (`external_id`), - KEY `FKCE00CAB3E0DD567A` (`office_id`), - CONSTRAINT `FKCE00CAB3E0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `m_client` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `account_no` varchar(20) NOT NULL, + `office_id` BIGINT NOT NULL, + `external_id` varchar(100) DEFAULT NULL, + `firstname` varchar(50) DEFAULT NULL, + `middlename` varchar(50) DEFAULT NULL, + `lastname` varchar(50) DEFAULT NULL, + `fullname` varchar(100) DEFAULT NULL, + `display_name` varchar(100) NOT NULL, + `image_key` varchar(500) DEFAULT NULL, + `joined_date` date DEFAULT NULL, + `is_deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `account_no_UNIQUE` (`account_no`), + UNIQUE KEY `external_id` (`external_id`), + KEY `FKCE00CAB3E0DD567A` (`office_id`), + CONSTRAINT `FKCE00CAB3E0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -522,11 +674,14 @@ CREATE TABLE `m_client` ( -- Dumping data for table `m_client` -- -LOCK TABLES `m_client` WRITE; +LOCK +TABLES `m_client` WRITE; /*!40000 ALTER TABLE `m_client` DISABLE KEYS */; -INSERT INTO `m_client` VALUES (1,'000000001',2,NULL,'Test',NULL,'One',NULL,'Test One',NULL,'2011-02-01',0); +INSERT INTO `m_client` +VALUES (1, '000000001', 2, NULL, 'Test', NULL, 'One', NULL, 'Test One', NULL, '2011-02-01', 0); /*!40000 ALTER TABLE `m_client` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_client_identifier` @@ -535,23 +690,24 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_client_identifier`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_client_identifier` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `document_type_id` INT NOT NULL, - `document_key` varchar(50) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `unique_identifier_key` (`document_type_id`,`document_key`), - UNIQUE KEY `unique_client_identifier` (`client_id`,`document_type_id`), - KEY `FK_m_client_document_m_client` (`client_id`), - KEY `FK_m_client_document_m_code_value` (`document_type_id`), - CONSTRAINT `FK_m_client_document_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FK_m_client_document_m_code_value` FOREIGN KEY (`document_type_id`) REFERENCES `m_code_value` (`id`) +CREATE TABLE `m_client_identifier` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `client_id` BIGINT NOT NULL, + `document_type_id` INT NOT NULL, + `document_key` varchar(50) NOT NULL, + `description` varchar(500) DEFAULT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_identifier_key` (`document_type_id`,`document_key`), + UNIQUE KEY `unique_client_identifier` (`client_id`,`document_type_id`), + KEY `FK_m_client_document_m_client` (`client_id`), + KEY `FK_m_client_document_m_code_value` (`document_type_id`), + CONSTRAINT `FK_m_client_document_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), + CONSTRAINT `FK_m_client_document_m_code_value` FOREIGN KEY (`document_type_id`) REFERENCES `m_code_value` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -559,10 +715,12 @@ CREATE TABLE `m_client_identifier` ( -- Dumping data for table `m_client_identifier` -- -LOCK TABLES `m_client_identifier` WRITE; +LOCK +TABLES `m_client_identifier` WRITE; /*!40000 ALTER TABLE `m_client_identifier` DISABLE KEYS */; /*!40000 ALTER TABLE `m_client_identifier` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_code` @@ -571,12 +729,13 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_code`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_code` ( - `id` INT NOT NULL AUTO_INCREMENT, - `code_name` varchar(100) DEFAULT NULL, - `is_system_defined` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `code_name` (`code_name`) +CREATE TABLE `m_code` +( + `id` INT NOT NULL AUTO_INCREMENT, + `code_name` varchar(100) DEFAULT NULL, + `is_system_defined` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `code_name` (`code_name`) ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -584,11 +743,23 @@ CREATE TABLE `m_code` ( -- Dumping data for table `m_code` -- -LOCK TABLES `m_code` WRITE; +LOCK +TABLES `m_code` WRITE; /*!40000 ALTER TABLE `m_code` DISABLE KEYS */; -INSERT INTO `m_code` VALUES (1,'Customer Identifier',1),(2,'LoanCollateral',1),(3,'LoanPurpose',1),(4,'Gender',1),(5,'YesNo',1),(6,'GuarantorRelationship',1),(7,'FieldOfEmployment',0),(8,'EducationLevel',0),(9,'MaritalStatus',0),(10,'PovertyStatus',0); +INSERT INTO `m_code` +VALUES (1, 'Customer Identifier', 1), + (2, 'LoanCollateral', 1), + (3, 'LoanPurpose', 1), + (4, 'Gender', 1), + (5, 'YesNo', 1), + (6, 'GuarantorRelationship', 1), + (7, 'FieldOfEmployment', 0), + (8, 'EducationLevel', 0), + (9, 'MaritalStatus', 0), + (10, 'PovertyStatus', 0); /*!40000 ALTER TABLE `m_code` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_code_value` @@ -597,15 +768,16 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_code_value`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_code_value` ( - `id` INT NOT NULL AUTO_INCREMENT, - `code_id` INT NOT NULL, - `code_value` varchar(100) DEFAULT NULL, - `order_position` INT NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `code_value` (`code_id`,`code_value`), - KEY `FKCFCEA42640BE071Z` (`code_id`), - CONSTRAINT `FKCFCEA42640BE071Z` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`) +CREATE TABLE `m_code_value` +( + `id` INT NOT NULL AUTO_INCREMENT, + `code_id` INT NOT NULL, + `code_value` varchar(100) DEFAULT NULL, + `order_position` INT NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `code_value` (`code_id`,`code_value`), + KEY `FKCFCEA42640BE071Z` (`code_id`), + CONSTRAINT `FKCFCEA42640BE071Z` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -613,11 +785,44 @@ CREATE TABLE `m_code_value` ( -- Dumping data for table `m_code_value` -- -LOCK TABLES `m_code_value` WRITE; +LOCK +TABLES `m_code_value` WRITE; /*!40000 ALTER TABLE `m_code_value` DISABLE KEYS */; -INSERT INTO `m_code_value` VALUES (1,1,'Passport',1),(2,1,'Id',2),(3,1,'Drivers License',3),(4,1,'Any Other Id Type',4),(5,6,'Spouse',0),(6,6,'Parent',0),(7,6,'Sibling',0),(8,6,'Business Associate',0),(9,6,'Other',0),(10,7,'option.Banker',1),(11,7,'option.SoftwareDeveloper',10),(12,8,'option.University',1),(13,8,'option.Secondary',12),(14,8,'option.Primary',13),(15,9,'option.Married',1),(16,9,'option.Single',15),(17,9,'option.Divorced',16),(18,9,'option.Widow',17),(19,10,'option.PovertyStatus.Band1',1),(20,10,'option.PovertyStatus.Band2',19),(21,10,'option.PovertyStatus.Band3',20),(22,2,'option.House',1),(23,2,'option.Television',22),(24,2,'option.Gold',23),(25,3,'option.Agriculture',1),(26,3,'option.Manufacturing',25),(27,3,'option.HousingImprovement',26),(28,4,'option.Male',1),(29,4,'option.Female',28),(30,5,'option.Yes',1),(31,5,'option.No',30); +INSERT INTO `m_code_value` +VALUES (1, 1, 'Passport', 1), + (2, 1, 'Id', 2), + (3, 1, 'Drivers License', 3), + (4, 1, 'Any Other Id Type', 4), + (5, 6, 'Spouse', 0), + (6, 6, 'Parent', 0), + (7, 6, 'Sibling', 0), + (8, 6, 'Business Associate', 0), + (9, 6, 'Other', 0), + (10, 7, 'option.Banker', 1), + (11, 7, 'option.SoftwareDeveloper', 10), + (12, 8, 'option.University', 1), + (13, 8, 'option.Secondary', 12), + (14, 8, 'option.Primary', 13), + (15, 9, 'option.Married', 1), + (16, 9, 'option.Single', 15), + (17, 9, 'option.Divorced', 16), + (18, 9, 'option.Widow', 17), + (19, 10, 'option.PovertyStatus.Band1', 1), + (20, 10, 'option.PovertyStatus.Band2', 19), + (21, 10, 'option.PovertyStatus.Band3', 20), + (22, 2, 'option.House', 1), + (23, 2, 'option.Television', 22), + (24, 2, 'option.Gold', 23), + (25, 3, 'option.Agriculture', 1), + (26, 3, 'option.Manufacturing', 25), + (27, 3, 'option.HousingImprovement', 26), + (28, 4, 'option.Male', 1), + (29, 4, 'option.Female', 28), + (30, 5, 'option.Yes', 1), + (31, 5, 'option.No', 30); /*!40000 ALTER TABLE `m_code_value` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_currency` @@ -626,15 +831,16 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_currency`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_currency` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `code` varchar(3) NOT NULL, - `decimal_places` SMALLINT NOT NULL, - `display_symbol` varchar(10) DEFAULT NULL, - `name` varchar(50) NOT NULL, - `internationalized_name_code` varchar(50) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `code` (`code`) +CREATE TABLE `m_currency` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `code` varchar(3) NOT NULL, + `decimal_places` SMALLINT NOT NULL, + `display_symbol` varchar(10) DEFAULT NULL, + `name` varchar(50) NOT NULL, + `internationalized_name_code` varchar(50) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=164 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -642,9 +848,151 @@ CREATE TABLE `m_currency` ( -- Dumping data for table `m_currency` -- -LOCK TABLES `m_currency` WRITE; +LOCK +TABLES `m_currency` WRITE; /*!40000 ALTER TABLE `m_currency` DISABLE KEYS */; -INSERT INTO `m_currency` VALUES (1,'AED',2,NULL,'UAE Dirham','currency.AED'),(2,'AFN',2,NULL,'Afghanistan Afghani','currency.AFN'),(3,'ALL',2,NULL,'Albanian Lek','currency.ALL'),(4,'AMD',2,NULL,'Armenian Dram','currency.AMD'),(5,'ANG',2,NULL,'Netherlands Antillian Guilder','currency.ANG'),(6,'AOA',2,NULL,'Angolan Kwanza','currency.AOA'),(7,'ARS',2,'$','Argentine Peso','currency.ARS'),(8,'AUD',2,'A$','Australian Dollar','currency.AUD'),(9,'AWG',2,NULL,'Aruban Guilder','currency.AWG'),(10,'AZM',2,NULL,'Azerbaijanian Manat','currency.AZM'),(11,'BAM',2,NULL,'Bosnia and Herzegovina Convertible Marks','currency.BAM'),(12,'BBD',2,NULL,'Barbados Dollar','currency.BBD'),(13,'BDT',2,NULL,'Bangladesh Taka','currency.BDT'),(14,'BGN',2,NULL,'Bulgarian Lev','currency.BGN'),(15,'BHD',3,NULL,'Bahraini Dinar','currency.BHD'),(16,'BIF',0,NULL,'Burundi Franc','currency.BIF'),(17,'BMD',2,NULL,'Bermudian Dollar','currency.BMD'),(18,'BND',2,'B$','Brunei Dollar','currency.BND'),(19,'BOB',2,'Bs.','Bolivian Boliviano','currency.BOB'),(20,'BRL',2,'R$','Brazilian Real','currency.BRL'),(21,'BSD',2,NULL,'Bahamian Dollar','currency.BSD'),(22,'BTN',2,NULL,'Bhutan Ngultrum','currency.BTN'),(23,'BWP',2,NULL,'Botswana Pula','currency.BWP'),(24,'BYR',0,NULL,'Belarussian Ruble','currency.BYR'),(25,'BZD',2,'BZ$','Belize Dollar','currency.BZD'),(26,'CAD',2,NULL,'Canadian Dollar','currency.CAD'),(27,'CDF',2,NULL,'Franc Congolais','currency.CDF'),(28,'CHF',2,NULL,'Swiss Franc','currency.CHF'),(29,'CLP',0,'$','Chilean Peso','currency.CLP'),(30,'CNY',2,NULL,'Chinese Yuan Renminbi','currency.CNY'),(31,'COP',2,'$','Colombian Peso','currency.COP'),(32,'CRC',2,'₡','Costa Rican Colon','currency.CRC'),(33,'CSD',2,NULL,'Serbian Dinar','currency.CSD'),(34,'CUP',2,'$MN','Cuban Peso','currency.CUP'),(35,'CVE',2,NULL,'Cape Verde Escudo','currency.CVE'),(36,'CYP',2,NULL,'Cyprus Pound','currency.CYP'),(37,'CZK',2,NULL,'Czech Koruna','currency.CZK'),(38,'DJF',0,NULL,'Djibouti Franc','currency.DJF'),(39,'DKK',2,NULL,'Danish Krone','currency.DKK'),(40,'DOP',2,'RD$','Dominican Peso','currency.DOP'),(41,'DZD',2,NULL,'Algerian Dinar','currency.DZD'),(42,'EEK',2,NULL,'Estonian Kroon','currency.EEK'),(43,'EGP',2,NULL,'Egyptian Pound','currency.EGP'),(44,'ERN',2,NULL,'Eritrea Nafka','currency.ERN'),(45,'ETB',2,NULL,'Ethiopian Birr','currency.ETB'),(46,'EUR',2,'€','Euro','currency.EUR'),(47,'FJD',2,NULL,'Fiji Dollar','currency.FJD'),(48,'FKP',2,NULL,'Falkland Islands Pound','currency.FKP'),(49,'GBP',2,NULL,'Pound Sterling','currency.GBP'),(50,'GEL',2,NULL,'Georgian Lari','currency.GEL'),(51,'GHC',2,'GHc','Ghana Cedi','currency.GHC'),(52,'GIP',2,NULL,'Gibraltar Pound','currency.GIP'),(53,'GMD',2,NULL,'Gambian Dalasi','currency.GMD'),(54,'GNF',0,NULL,'Guinea Franc','currency.GNF'),(55,'GTQ',2,'Q','Guatemala Quetzal','currency.GTQ'),(56,'GYD',2,NULL,'Guyana Dollar','currency.GYD'),(57,'HKD',2,NULL,'Hong Kong Dollar','currency.HKD'),(58,'HNL',2,'L','Honduras Lempira','currency.HNL'),(59,'HRK',2,NULL,'Croatian Kuna','currency.HRK'),(60,'HTG',2,'G','Haiti Gourde','currency.HTG'),(61,'HUF',2,NULL,'Hungarian Forint','currency.HUF'),(62,'IDR',2,NULL,'Indonesian Rupiah','currency.IDR'),(63,'ILS',2,NULL,'New Israeli Shekel','currency.ILS'),(64,'INR',2,'₹','Indian Rupee','currency.INR'),(65,'IQD',3,NULL,'Iraqi Dinar','currency.IQD'),(66,'IRR',2,NULL,'Iranian Rial','currency.IRR'),(67,'ISK',0,NULL,'Iceland Krona','currency.ISK'),(68,'JMD',2,NULL,'Jamaican Dollar','currency.JMD'),(69,'JOD',3,NULL,'Jordanian Dinar','currency.JOD'),(70,'JPY',0,NULL,'Japanese Yen','currency.JPY'),(71,'KES',2,'KSh','Kenyan Shilling','currency.KES'),(72,'KGS',2,NULL,'Kyrgyzstan Som','currency.KGS'),(73,'KHR',2,NULL,'Cambodia Riel','currency.KHR'),(74,'KMF',0,NULL,'Comoro Franc','currency.KMF'),(75,'KPW',2,NULL,'North Korean Won','currency.KPW'),(76,'KRW',0,NULL,'Korean Won','currency.KRW'),(77,'KWD',3,NULL,'Kuwaiti Dinar','currency.KWD'),(78,'KYD',2,NULL,'Cayman Islands Dollar','currency.KYD'),(79,'KZT',2,NULL,'Kazakhstan Tenge','currency.KZT'),(80,'LAK',2,NULL,'Lao Kip','currency.LAK'),(81,'LBP',2,'L£','Lebanese Pound','currency.LBP'),(82,'LKR',2,NULL,'Sri Lanka Rupee','currency.LKR'),(83,'LRD',2,NULL,'Liberian Dollar','currency.LRD'),(84,'LSL',2,NULL,'Lesotho Loti','currency.LSL'),(85,'LTL',2,NULL,'Lithuanian Litas','currency.LTL'),(86,'LVL',2,NULL,'Latvian Lats','currency.LVL'),(87,'LYD',3,NULL,'Libyan Dinar','currency.LYD'),(88,'MAD',2,NULL,'Moroccan Dirham','currency.MAD'),(89,'MDL',2,NULL,'Moldovan Leu','currency.MDL'),(90,'MGA',2,NULL,'Malagasy Ariary','currency.MGA'),(91,'MKD',2,NULL,'Macedonian Denar','currency.MKD'),(92,'MMK',2,'K','Myanmar Kyat','currency.MMK'),(93,'MNT',2,NULL,'Mongolian Tugrik','currency.MNT'),(94,'MOP',2,NULL,'Macau Pataca','currency.MOP'),(95,'MRO',2,NULL,'Mauritania Ouguiya','currency.MRO'),(96,'MTL',2,NULL,'Maltese Lira','currency.MTL'),(97,'MUR',2,NULL,'Mauritius Rupee','currency.MUR'),(98,'MVR',2,NULL,'Maldives Rufiyaa','currency.MVR'),(99,'MWK',2,NULL,'Malawi Kwacha','currency.MWK'),(100,'MXN',2,'$','Mexican Peso','currency.MXN'),(101,'MYR',2,NULL,'Malaysian Ringgit','currency.MYR'),(102,'MZM',2,NULL,'Mozambique Metical','currency.MZM'),(103,'NAD',2,NULL,'Namibia Dollar','currency.NAD'),(104,'NGN',2,NULL,'Nigerian Naira','currency.NGN'),(105,'NIO',2,'C$','Nicaragua Cordoba Oro','currency.NIO'),(106,'NOK',2,NULL,'Norwegian Krone','currency.NOK'),(107,'NPR',2,NULL,'Nepalese Rupee','currency.NPR'),(108,'NZD',2,NULL,'New Zealand Dollar','currency.NZD'),(109,'OMR',3,NULL,'Rial Omani','currency.OMR'),(110,'PAB',2,'B/.','Panama Balboa','currency.PAB'),(111,'PEN',2,'S/.','Peruvian Nuevo Sol','currency.PEN'),(112,'PGK',2,NULL,'Papua New Guinea Kina','currency.PGK'),(113,'PHP',2,NULL,'Philippine Peso','currency.PHP'),(114,'PKR',2,NULL,'Pakistan Rupee','currency.PKR'),(115,'PLN',2,NULL,'Polish Zloty','currency.PLN'),(116,'PYG',0,'₲','Paraguayan Guarani','currency.PYG'),(117,'QAR',2,NULL,'Qatari Rial','currency.QAR'),(118,'RON',2,NULL,'Romanian Leu','currency.RON'),(119,'RUB',2,NULL,'Russian Ruble','currency.RUB'),(120,'RWF',0,NULL,'Rwanda Franc','currency.RWF'),(121,'SAR',2,NULL,'Saudi Riyal','currency.SAR'),(122,'SBD',2,NULL,'Solomon Islands Dollar','currency.SBD'),(123,'SCR',2,NULL,'Seychelles Rupee','currency.SCR'),(124,'SDD',2,NULL,'Sudanese Dinar','currency.SDD'),(125,'SEK',2,NULL,'Swedish Krona','currency.SEK'),(126,'SGD',2,NULL,'Singapore Dollar','currency.SGD'),(127,'SHP',2,NULL,'St Helena Pound','currency.SHP'),(128,'SIT',2,NULL,'Slovenian Tolar','currency.SIT'),(129,'SKK',2,NULL,'Slovak Koruna','currency.SKK'),(130,'SLL',2,NULL,'Sierra Leone Leone','currency.SLL'),(131,'SOS',2,NULL,'Somali Shilling','currency.SOS'),(132,'SRD',2,NULL,'Surinam Dollar','currency.SRD'),(133,'STD',2,NULL,'Sao Tome and Principe Dobra','currency.STD'),(134,'SVC',2,NULL,'El Salvador Colon','currency.SVC'),(135,'SYP',2,NULL,'Syrian Pound','currency.SYP'),(136,'SZL',2,NULL,'Swaziland Lilangeni','currency.SZL'),(137,'THB',2,NULL,'Thai Baht','currency.THB'),(138,'TJS',2,NULL,'Tajik Somoni','currency.TJS'),(139,'TMM',2,NULL,'Turkmenistan Manat','currency.TMM'),(140,'TND',3,'DT','Tunisian Dinar','currency.TND'),(141,'TOP',2,NULL,'Tonga Pa\'anga','currency.TOP'),(142,'TRY',2,NULL,'Turkish Lira','currency.TRY'),(143,'TTD',2,NULL,'Trinidad and Tobago Dollar','currency.TTD'),(144,'TWD',2,NULL,'New Taiwan Dollar','currency.TWD'),(145,'TZS',2,NULL,'Tanzanian Shilling','currency.TZS'),(146,'UAH',2,NULL,'Ukraine Hryvnia','currency.UAH'),(147,'UGX',2,'USh','Uganda Shilling','currency.UGX'),(148,'USD',2,'$','US Dollar','currency.USD'),(149,'UYU',2,'$U','Peso Uruguayo','currency.UYU'),(150,'UZS',2,NULL,'Uzbekistan Sum','currency.UZS'),(151,'VEB',2,'Bs.F.','Venezuelan Bolivar','currency.VEB'),(152,'VND',2,NULL,'Vietnamese Dong','currency.VND'),(153,'VUV',0,NULL,'Vanuatu Vatu','currency.VUV'),(154,'WST',2,NULL,'Samoa Tala','currency.WST'),(155,'XAF',0,NULL,'CFA Franc BEAC','currency.XAF'),(156,'XCD',2,NULL,'East Caribbean Dollar','currency.XCD'),(157,'XDR',5,NULL,'SDR (Special Drawing Rights)','currency.XDR'),(158,'XOF',0,'CFA','CFA Franc BCEAO','currency.XOF'),(159,'XPF',0,NULL,'CFP Franc','currency.XPF'),(160,'YER',2,NULL,'Yemeni Rial','currency.YER'),(161,'ZAR',2,'R','South African Rand','currency.ZAR'),(162,'ZMK',2,NULL,'Zambian Kwacha','currency.ZMK'),(163,'ZWD',2,NULL,'Zimbabwe Dollar','currency.ZWD'); +INSERT INTO `m_currency` +VALUES (1, 'AED', 2, NULL, 'UAE Dirham', 'currency.AED'), + (2, 'AFN', 2, NULL, 'Afghanistan Afghani', 'currency.AFN'), + (3, 'ALL', 2, NULL, 'Albanian Lek', 'currency.ALL'), + (4, 'AMD', 2, NULL, 'Armenian Dram', 'currency.AMD'), + (5, 'ANG', 2, NULL, 'Netherlands Antillian Guilder', 'currency.ANG'), + (6, 'AOA', 2, NULL, 'Angolan Kwanza', 'currency.AOA'), + (7, 'ARS', 2, '$', 'Argentine Peso', 'currency.ARS'), + (8, 'AUD', 2, 'A$', 'Australian Dollar', 'currency.AUD'), + (9, 'AWG', 2, NULL, 'Aruban Guilder', 'currency.AWG'), + (10, 'AZM', 2, NULL, 'Azerbaijanian Manat', 'currency.AZM'), + (11, 'BAM', 2, NULL, 'Bosnia and Herzegovina Convertible Marks', 'currency.BAM'), + (12, 'BBD', 2, NULL, 'Barbados Dollar', 'currency.BBD'), + (13, 'BDT', 2, NULL, 'Bangladesh Taka', 'currency.BDT'), + (14, 'BGN', 2, NULL, 'Bulgarian Lev', 'currency.BGN'), + (15, 'BHD', 3, NULL, 'Bahraini Dinar', 'currency.BHD'), + (16, 'BIF', 0, NULL, 'Burundi Franc', 'currency.BIF'), + (17, 'BMD', 2, NULL, 'Bermudian Dollar', 'currency.BMD'), + (18, 'BND', 2, 'B$', 'Brunei Dollar', 'currency.BND'), + (19, 'BOB', 2, 'Bs.', 'Bolivian Boliviano', 'currency.BOB'), + (20, 'BRL', 2, 'R$', 'Brazilian Real', 'currency.BRL'), + (21, 'BSD', 2, NULL, 'Bahamian Dollar', 'currency.BSD'), + (22, 'BTN', 2, NULL, 'Bhutan Ngultrum', 'currency.BTN'), + (23, 'BWP', 2, NULL, 'Botswana Pula', 'currency.BWP'), + (24, 'BYR', 0, NULL, 'Belarussian Ruble', 'currency.BYR'), + (25, 'BZD', 2, 'BZ$', 'Belize Dollar', 'currency.BZD'), + (26, 'CAD', 2, NULL, 'Canadian Dollar', 'currency.CAD'), + (27, 'CDF', 2, NULL, 'Franc Congolais', 'currency.CDF'), + (28, 'CHF', 2, NULL, 'Swiss Franc', 'currency.CHF'), + (29, 'CLP', 0, '$', 'Chilean Peso', 'currency.CLP'), + (30, 'CNY', 2, NULL, 'Chinese Yuan Renminbi', 'currency.CNY'), + (31, 'COP', 2, '$', 'Colombian Peso', 'currency.COP'), + (32, 'CRC', 2, '₡', 'Costa Rican Colon', 'currency.CRC'), + (33, 'CSD', 2, NULL, 'Serbian Dinar', 'currency.CSD'), + (34, 'CUP', 2, '$MN', 'Cuban Peso', 'currency.CUP'), + (35, 'CVE', 2, NULL, 'Cape Verde Escudo', 'currency.CVE'), + (36, 'CYP', 2, NULL, 'Cyprus Pound', 'currency.CYP'), + (37, 'CZK', 2, NULL, 'Czech Koruna', 'currency.CZK'), + (38, 'DJF', 0, NULL, 'Djibouti Franc', 'currency.DJF'), + (39, 'DKK', 2, NULL, 'Danish Krone', 'currency.DKK'), + (40, 'DOP', 2, 'RD$', 'Dominican Peso', 'currency.DOP'), + (41, 'DZD', 2, NULL, 'Algerian Dinar', 'currency.DZD'), + (42, 'EEK', 2, NULL, 'Estonian Kroon', 'currency.EEK'), + (43, 'EGP', 2, NULL, 'Egyptian Pound', 'currency.EGP'), + (44, 'ERN', 2, NULL, 'Eritrea Nafka', 'currency.ERN'), + (45, 'ETB', 2, NULL, 'Ethiopian Birr', 'currency.ETB'), + (46, 'EUR', 2, '€', 'Euro', 'currency.EUR'), + (47, 'FJD', 2, NULL, 'Fiji Dollar', 'currency.FJD'), + (48, 'FKP', 2, NULL, 'Falkland Islands Pound', 'currency.FKP'), + (49, 'GBP', 2, NULL, 'Pound Sterling', 'currency.GBP'), + (50, 'GEL', 2, NULL, 'Georgian Lari', 'currency.GEL'), + (51, 'GHC', 2, 'GHc', 'Ghana Cedi', 'currency.GHC'), + (52, 'GIP', 2, NULL, 'Gibraltar Pound', 'currency.GIP'), + (53, 'GMD', 2, NULL, 'Gambian Dalasi', 'currency.GMD'), + (54, 'GNF', 0, NULL, 'Guinea Franc', 'currency.GNF'), + (55, 'GTQ', 2, 'Q', 'Guatemala Quetzal', 'currency.GTQ'), + (56, 'GYD', 2, NULL, 'Guyana Dollar', 'currency.GYD'), + (57, 'HKD', 2, NULL, 'Hong Kong Dollar', 'currency.HKD'), + (58, 'HNL', 2, 'L', 'Honduras Lempira', 'currency.HNL'), + (59, 'HRK', 2, NULL, 'Croatian Kuna', 'currency.HRK'), + (60, 'HTG', 2, 'G', 'Haiti Gourde', 'currency.HTG'), + (61, 'HUF', 2, NULL, 'Hungarian Forint', 'currency.HUF'), + (62, 'IDR', 2, NULL, 'Indonesian Rupiah', 'currency.IDR'), + (63, 'ILS', 2, NULL, 'New Israeli Shekel', 'currency.ILS'), + (64, 'INR', 2, '₹', 'Indian Rupee', 'currency.INR'), + (65, 'IQD', 3, NULL, 'Iraqi Dinar', 'currency.IQD'), + (66, 'IRR', 2, NULL, 'Iranian Rial', 'currency.IRR'), + (67, 'ISK', 0, NULL, 'Iceland Krona', 'currency.ISK'), + (68, 'JMD', 2, NULL, 'Jamaican Dollar', 'currency.JMD'), + (69, 'JOD', 3, NULL, 'Jordanian Dinar', 'currency.JOD'), + (70, 'JPY', 0, NULL, 'Japanese Yen', 'currency.JPY'), + (71, 'KES', 2, 'KSh', 'Kenyan Shilling', 'currency.KES'), + (72, 'KGS', 2, NULL, 'Kyrgyzstan Som', 'currency.KGS'), + (73, 'KHR', 2, NULL, 'Cambodia Riel', 'currency.KHR'), + (74, 'KMF', 0, NULL, 'Comoro Franc', 'currency.KMF'), + (75, 'KPW', 2, NULL, 'North Korean Won', 'currency.KPW'), + (76, 'KRW', 0, NULL, 'Korean Won', 'currency.KRW'), + (77, 'KWD', 3, NULL, 'Kuwaiti Dinar', 'currency.KWD'), + (78, 'KYD', 2, NULL, 'Cayman Islands Dollar', 'currency.KYD'), + (79, 'KZT', 2, NULL, 'Kazakhstan Tenge', 'currency.KZT'), + (80, 'LAK', 2, NULL, 'Lao Kip', 'currency.LAK'), + (81, 'LBP', 2, 'L£', 'Lebanese Pound', 'currency.LBP'), + (82, 'LKR', 2, NULL, 'Sri Lanka Rupee', 'currency.LKR'), + (83, 'LRD', 2, NULL, 'Liberian Dollar', 'currency.LRD'), + (84, 'LSL', 2, NULL, 'Lesotho Loti', 'currency.LSL'), + (85, 'LTL', 2, NULL, 'Lithuanian Litas', 'currency.LTL'), + (86, 'LVL', 2, NULL, 'Latvian Lats', 'currency.LVL'), + (87, 'LYD', 3, NULL, 'Libyan Dinar', 'currency.LYD'), + (88, 'MAD', 2, NULL, 'Moroccan Dirham', 'currency.MAD'), + (89, 'MDL', 2, NULL, 'Moldovan Leu', 'currency.MDL'), + (90, 'MGA', 2, NULL, 'Malagasy Ariary', 'currency.MGA'), + (91, 'MKD', 2, NULL, 'Macedonian Denar', 'currency.MKD'), + (92, 'MMK', 2, 'K', 'Myanmar Kyat', 'currency.MMK'), + (93, 'MNT', 2, NULL, 'Mongolian Tugrik', 'currency.MNT'), + (94, 'MOP', 2, NULL, 'Macau Pataca', 'currency.MOP'), + (95, 'MRO', 2, NULL, 'Mauritania Ouguiya', 'currency.MRO'), + (96, 'MTL', 2, NULL, 'Maltese Lira', 'currency.MTL'), + (97, 'MUR', 2, NULL, 'Mauritius Rupee', 'currency.MUR'), + (98, 'MVR', 2, NULL, 'Maldives Rufiyaa', 'currency.MVR'), + (99, 'MWK', 2, NULL, 'Malawi Kwacha', 'currency.MWK'), + (100, 'MXN', 2, '$', 'Mexican Peso', 'currency.MXN'), + (101, 'MYR', 2, NULL, 'Malaysian Ringgit', 'currency.MYR'), + (102, 'MZM', 2, NULL, 'Mozambique Metical', 'currency.MZM'), + (103, 'NAD', 2, NULL, 'Namibia Dollar', 'currency.NAD'), + (104, 'NGN', 2, NULL, 'Nigerian Naira', 'currency.NGN'), + (105, 'NIO', 2, 'C$', 'Nicaragua Cordoba Oro', 'currency.NIO'), + (106, 'NOK', 2, NULL, 'Norwegian Krone', 'currency.NOK'), + (107, 'NPR', 2, NULL, 'Nepalese Rupee', 'currency.NPR'), + (108, 'NZD', 2, NULL, 'New Zealand Dollar', 'currency.NZD'), + (109, 'OMR', 3, NULL, 'Rial Omani', 'currency.OMR'), + (110, 'PAB', 2, 'B/.', 'Panama Balboa', 'currency.PAB'), + (111, 'PEN', 2, 'S/.', 'Peruvian Nuevo Sol', 'currency.PEN'), + (112, 'PGK', 2, NULL, 'Papua New Guinea Kina', 'currency.PGK'), + (113, 'PHP', 2, NULL, 'Philippine Peso', 'currency.PHP'), + (114, 'PKR', 2, NULL, 'Pakistan Rupee', 'currency.PKR'), + (115, 'PLN', 2, NULL, 'Polish Zloty', 'currency.PLN'), + (116, 'PYG', 0, '₲', 'Paraguayan Guarani', 'currency.PYG'), + (117, 'QAR', 2, NULL, 'Qatari Rial', 'currency.QAR'), + (118, 'RON', 2, NULL, 'Romanian Leu', 'currency.RON'), + (119, 'RUB', 2, NULL, 'Russian Ruble', 'currency.RUB'), + (120, 'RWF', 0, NULL, 'Rwanda Franc', 'currency.RWF'), + (121, 'SAR', 2, NULL, 'Saudi Riyal', 'currency.SAR'), + (122, 'SBD', 2, NULL, 'Solomon Islands Dollar', 'currency.SBD'), + (123, 'SCR', 2, NULL, 'Seychelles Rupee', 'currency.SCR'), + (124, 'SDD', 2, NULL, 'Sudanese Dinar', 'currency.SDD'), + (125, 'SEK', 2, NULL, 'Swedish Krona', 'currency.SEK'), + (126, 'SGD', 2, NULL, 'Singapore Dollar', 'currency.SGD'), + (127, 'SHP', 2, NULL, 'St Helena Pound', 'currency.SHP'), + (128, 'SIT', 2, NULL, 'Slovenian Tolar', 'currency.SIT'), + (129, 'SKK', 2, NULL, 'Slovak Koruna', 'currency.SKK'), + (130, 'SLL', 2, NULL, 'Sierra Leone Leone', 'currency.SLL'), + (131, 'SOS', 2, NULL, 'Somali Shilling', 'currency.SOS'), + (132, 'SRD', 2, NULL, 'Surinam Dollar', 'currency.SRD'), + (133, 'STD', 2, NULL, 'Sao Tome and Principe Dobra', 'currency.STD'), + (134, 'SVC', 2, NULL, 'El Salvador Colon', 'currency.SVC'), + (135, 'SYP', 2, NULL, 'Syrian Pound', 'currency.SYP'), + (136, 'SZL', 2, NULL, 'Swaziland Lilangeni', 'currency.SZL'), + (137, 'THB', 2, NULL, 'Thai Baht', 'currency.THB'), + (138, 'TJS', 2, NULL, 'Tajik Somoni', 'currency.TJS'), + (139, 'TMM', 2, NULL, 'Turkmenistan Manat', 'currency.TMM'), + (140, 'TND', 3, 'DT', 'Tunisian Dinar', 'currency.TND'), + (141, 'TOP', 2, NULL, 'Tonga Pa\'anga','currency.TOP'),(142,'TRY',2,NULL,'Turkish Lira','currency.TRY'),(143,'TTD',2,NULL,'Trinidad and Tobago Dollar','currency.TTD'),(144,'TWD',2,NULL,'New Taiwan Dollar','currency.TWD'),(145,'TZS',2,NULL,'Tanzanian Shilling','currency.TZS'),(146,'UAH',2,NULL,'Ukraine Hryvnia','currency.UAH'),(147,'UGX',2,'USh','Uganda Shilling','currency.UGX'),(148,'USD',2,'$','US Dollar','currency.USD'),(149,'UYU',2,'$U','Peso Uruguayo','currency.UYU'),(150,'UZS',2,NULL,'Uzbekistan Sum','currency.UZS'),(151,'VEB',2,'Bs.F.','Venezuelan Bolivar','currency.VEB'),(152,'VND',2,NULL,'Vietnamese Dong','currency.VND'),(153,'VUV',0,NULL,'Vanuatu Vatu','currency.VUV'),(154,'WST',2,NULL,'Samoa Tala','currency.WST'),(155,'XAF',0,NULL,'CFA Franc BEAC','currency.XAF'),(156,'XCD',2,NULL,'East Caribbean Dollar','currency.XCD'),(157,'XDR',5,NULL,'SDR (Special Drawing Rights)','currency.XDR'),(158,'XOF',0,'CFA','CFA Franc BCEAO','currency.XOF'),(159,'XPF',0,NULL,'CFP Franc','currency.XPF'),(160,'YER',2,NULL,'Yemeni Rial','currency.YER'),(161,'ZAR',2,'R','South African Rand','currency.ZAR'),(162,'ZMK',2,NULL,'Zambian Kwacha','currency.ZMK'),(163,'ZWD',2,NULL,'Zimbabwe Dollar','currency.ZWD'); /*!40000 ALTER TABLE `m_currency` ENABLE KEYS */; UNLOCK TABLES; @@ -1399,7 +1747,8 @@ LOCK TABLES `m_portfolio_command_source` WRITE; /*!40000 ALTER TABLE `m_portfolio_command_source` DISABLE KEYS */; INSERT INTO `m_portfolio_command_source` VALUES (1,'CREATE','CLIENT',2,NULL,1,NULL,NULL,'/clients/template',1,NULL,'{\"officeId\":\"2\",\"firstname\":\"Test\",\"middlename\":\"\",\"lastname\":\"One\",\"fullname\":\"\",\"externalId\":\"\",\"dateFormat\":\"yyyy-MM-dd\",\"locale\":\"en\",\"joinedDate\":\"2011-02-01\"}',1,'2013-04-05 12:38:05',NULL,NULL,1),(2,'CREATE','LOAN',2,NULL,1,1,NULL,'/loans',1,NULL,'{\"clientId\":\"1\",\"dateFormat\":\"yyyy-MM-dd\",\"locale\":\"en\",\"productId\":\"1\",\"loanOfficerId\":\"2\",\"submittedOnDate\":\"2011-04-01\",\"loanPurposeId\":\"25\",\"principal\":\"1,000,000.00\",\"loanTermFrequency\":\"12\",\"loanTermFrequencyType\":\"2\",\"numberOfRepayments\":\"12\",\"repaymentEvery\":\"1\",\"repaymentFrequencyType\":\"2\",\"interestRatePerPeriod\":\"24\",\"interestRateFrequencyType\":\"3\",\"expectedDisbursementDate\":\"2011-04-01\",\"amortizationType\":\"1\",\"interestType\":\"1\",\"interestCalculationPeriodType\":\"1\",\"inArrearsTolerance\":\"\",\"transactionProcessingStrategy\":\"heavensfamily-strategy\",\"repaymentsStartingFromDate\":\"\",\"interestChargedFromDate\":\"\",\"charges\":[{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2011-05-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2011-06-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2011-07-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2011-08-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2011-09-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2011-10-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2011-11-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2011-12-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2012-01-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2012-02-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2012-03-01\"},{\"chargeId\":\"1\",\"amount\":\"1,500\",\"dueDate\":\"2012-04-01\"}],\"collateral\":[{\"id\":\"\",\"type\":\"23\",\"description\":\" small description.\",\"value\":\"\"}]}',1,'2013-04-05 12:41:57',NULL,NULL,1),(3,'APPROVE','LOAN',2,NULL,1,1,NULL,'/loans/1',1,NULL,'{\"status\":{\"id\":200,\"code\":\"loanStatusType.approved\",\"value\":\"Approved\",\"pendingApproval\":false,\"waitingForDisbursal\":true,\"active\":false,\"closedObligationsMet\":false,\"closedWrittenOff\":false,\"closedRescheduled\":false,\"closed\":false,\"overpaid\":false},\"locale\":\"en\",\"dateFormat\":\"yyyy-MM-dd\",\"approvedOnDate\":\"2011-04-01\"}',1,'2013-04-05 12:42:09',NULL,NULL,1); /*!40000 ALTER TABLE `m_portfolio_command_source` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_product_loan` @@ -1408,32 +1757,33 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_product_loan`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_product_loan` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `currency_code` varchar(3) NOT NULL, - `currency_digits` SMALLINT NOT NULL, - `principal_amount` decimal(19,6) NOT NULL, - `min_principal_amount` decimal(19,6) NOT NULL, - `max_principal_amount` decimal(19,6) NOT NULL, - `arrearstolerance_amount` decimal(19,6) DEFAULT NULL, - `name` varchar(100) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `fund_id` BIGINT DEFAULT NULL, - `nominal_interest_rate_per_period` decimal(19,6) NOT NULL, - `interest_period_frequency_enum` SMALLINT NOT NULL, - `annual_nominal_interest_rate` decimal(19,6) NOT NULL, - `interest_method_enum` SMALLINT NOT NULL, - `interest_calculated_in_period_enum` SMALLINT NOT NULL DEFAULT '1', - `repay_every` SMALLINT NOT NULL, - `repayment_period_frequency_enum` SMALLINT NOT NULL, - `number_of_repayments` SMALLINT NOT NULL, - `amortization_method_enum` SMALLINT NOT NULL, - `accounting_type` SMALLINT NOT NULL, - `loan_transaction_strategy_id` BIGINT DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `unq_name` (`name`), - KEY `FKA6A8A7D77240145` (`fund_id`), - CONSTRAINT `FKA6A8A7D77240145` FOREIGN KEY (`fund_id`) REFERENCES `m_fund` (`id`) +CREATE TABLE `m_product_loan` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `currency_code` varchar(3) NOT NULL, + `currency_digits` SMALLINT NOT NULL, + `principal_amount` decimal(19, 6) NOT NULL, + `min_principal_amount` decimal(19, 6) NOT NULL, + `max_principal_amount` decimal(19, 6) NOT NULL, + `arrearstolerance_amount` decimal(19, 6) DEFAULT NULL, + `name` varchar(100) NOT NULL, + `description` varchar(500) DEFAULT NULL, + `fund_id` BIGINT DEFAULT NULL, + `nominal_interest_rate_per_period` decimal(19, 6) NOT NULL, + `interest_period_frequency_enum` SMALLINT NOT NULL, + `annual_nominal_interest_rate` decimal(19, 6) NOT NULL, + `interest_method_enum` SMALLINT NOT NULL, + `interest_calculated_in_period_enum` SMALLINT NOT NULL DEFAULT '1', + `repay_every` SMALLINT NOT NULL, + `repayment_period_frequency_enum` SMALLINT NOT NULL, + `number_of_repayments` SMALLINT NOT NULL, + `amortization_method_enum` SMALLINT NOT NULL, + `accounting_type` SMALLINT NOT NULL, + `loan_transaction_strategy_id` BIGINT DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unq_name` (`name`), + KEY `FKA6A8A7D77240145` (`fund_id`), + CONSTRAINT `FKA6A8A7D77240145` FOREIGN KEY (`fund_id`) REFERENCES `m_fund` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1441,11 +1791,17 @@ CREATE TABLE `m_product_loan` ( -- Dumping data for table `m_product_loan` -- -LOCK TABLES `m_product_loan` WRITE; +LOCK +TABLES `m_product_loan` WRITE; /*!40000 ALTER TABLE `m_product_loan` DISABLE KEYS */; -INSERT INTO `m_product_loan` VALUES (1,'UGX',2,'1000000.000000','0.000000','1000000000000.000000',NULL,'Kampala Product (with cash accounting)','Typical Kampala loan product with cash accounting enabled for testing.',NULL,'24.000000',3,'24.000000',1,1,1,2,12,1,2,2); +INSERT INTO `m_product_loan` +VALUES (1, 'UGX', 2, '1000000.000000', '0.000000', '1000000000000.000000', NULL, + 'Kampala Product (with cash accounting)', + 'Typical Kampala loan product with cash accounting enabled for testing.', NULL, '24.000000', 3, '24.000000', 1, + 1, 1, 2, 12, 1, 2, 2); /*!40000 ALTER TABLE `m_product_loan` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_product_loan_charge` @@ -1454,13 +1810,14 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_product_loan_charge`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_product_loan_charge` ( - `product_loan_id` BIGINT NOT NULL, - `charge_id` BIGINT NOT NULL, - PRIMARY KEY (`product_loan_id`,`charge_id`), - KEY `charge_id` (`charge_id`), - CONSTRAINT `m_product_loan_charge_ibfk_1` FOREIGN KEY (`charge_id`) REFERENCES `m_charge` (`id`), - CONSTRAINT `m_product_loan_charge_ibfk_2` FOREIGN KEY (`product_loan_id`) REFERENCES `m_product_loan` (`id`) +CREATE TABLE `m_product_loan_charge` +( + `product_loan_id` BIGINT NOT NULL, + `charge_id` BIGINT NOT NULL, + PRIMARY KEY (`product_loan_id`, `charge_id`), + KEY `charge_id` (`charge_id`), + CONSTRAINT `m_product_loan_charge_ibfk_1` FOREIGN KEY (`charge_id`) REFERENCES `m_charge` (`id`), + CONSTRAINT `m_product_loan_charge_ibfk_2` FOREIGN KEY (`product_loan_id`) REFERENCES `m_product_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1468,10 +1825,12 @@ CREATE TABLE `m_product_loan_charge` ( -- Dumping data for table `m_product_loan_charge` -- -LOCK TABLES `m_product_loan_charge` WRITE; +LOCK +TABLES `m_product_loan_charge` WRITE; /*!40000 ALTER TABLE `m_product_loan_charge` DISABLE KEYS */; /*!40000 ALTER TABLE `m_product_loan_charge` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_role` @@ -1480,12 +1839,13 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_role`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_role` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) NOT NULL, - `description` varchar(500) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `unq_name` (`name`) +CREATE TABLE `m_role` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `description` varchar(500) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unq_name` (`name`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1493,11 +1853,14 @@ CREATE TABLE `m_role` ( -- Dumping data for table `m_role` -- -LOCK TABLES `m_role` WRITE; +LOCK +TABLES `m_role` WRITE; /*!40000 ALTER TABLE `m_role` DISABLE KEYS */; -INSERT INTO `m_role` VALUES (1,'Super user','This role provides all application permissions.'); +INSERT INTO `m_role` +VALUES (1, 'Super user', 'This role provides all application permissions.'); /*!40000 ALTER TABLE `m_role` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_role_permission` @@ -1506,14 +1869,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_role_permission`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_role_permission` ( - `role_id` BIGINT NOT NULL, - `permission_id` BIGINT NOT NULL, - PRIMARY KEY (`role_id`,`permission_id`), - KEY `FK8DEDB04815CEC7AB` (`role_id`), - KEY `FK8DEDB048103B544B` (`permission_id`), - CONSTRAINT `FK8DEDB048103B544B` FOREIGN KEY (`permission_id`) REFERENCES `m_permission` (`id`), - CONSTRAINT `FK8DEDB04815CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`) +CREATE TABLE `m_role_permission` +( + `role_id` BIGINT NOT NULL, + `permission_id` BIGINT NOT NULL, + PRIMARY KEY (`role_id`, `permission_id`), + KEY `FK8DEDB04815CEC7AB` (`role_id`), + KEY `FK8DEDB048103B544B` (`permission_id`), + CONSTRAINT `FK8DEDB048103B544B` FOREIGN KEY (`permission_id`) REFERENCES `m_permission` (`id`), + CONSTRAINT `FK8DEDB04815CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1521,11 +1885,14 @@ CREATE TABLE `m_role_permission` ( -- Dumping data for table `m_role_permission` -- -LOCK TABLES `m_role_permission` WRITE; +LOCK +TABLES `m_role_permission` WRITE; /*!40000 ALTER TABLE `m_role_permission` DISABLE KEYS */; -INSERT INTO `m_role_permission` VALUES (1,1); +INSERT INTO `m_role_permission` +VALUES (1, 1); /*!40000 ALTER TABLE `m_role_permission` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_savings_account` @@ -1534,39 +1901,40 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_savings_account`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_savings_account` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_no` varchar(20) NOT NULL, - `external_id` varchar(100) DEFAULT NULL, - `client_id` BIGINT DEFAULT NULL, - `group_id` BIGINT DEFAULT NULL, - `product_id` BIGINT DEFAULT NULL, - `status_enum` SMALLINT NOT NULL DEFAULT '300', - `activation_date` date DEFAULT NULL, - `currency_code` varchar(3) NOT NULL, - `currency_digits` SMALLINT NOT NULL, - `nominal_annual_interest_rate` decimal(19,6) NOT NULL, - `interest_compounding_period_enum` SMALLINT NOT NULL, - `interest_calculation_type_enum` SMALLINT NOT NULL, - `interest_calculation_days_in_year_type_enum` SMALLINT NOT NULL, - `min_required_opening_balance` decimal(19,6) DEFAULT NULL, - `lockin_period_frequency` decimal(19,6) DEFAULT NULL, - `lockin_period_frequency_enum` SMALLINT DEFAULT NULL, - `lockedin_until_date_derived` date DEFAULT NULL, - `total_deposits_derived` decimal(19,6) DEFAULT NULL, - `total_withdrawals_derived` decimal(19,6) DEFAULT NULL, - `total_interest_earned_derived` decimal(19,6) DEFAULT NULL, - `total_interest_posted_derived` decimal(19,6) DEFAULT NULL, - `account_balance_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - PRIMARY KEY (`id`), - UNIQUE KEY `sa_account_no_UNIQUE` (`account_no`), - UNIQUE KEY `sa_externalid_UNIQUE` (`external_id`), - KEY `FKSA00000000000001` (`client_id`), - KEY `FKSA00000000000002` (`group_id`), - KEY `FKSA00000000000003` (`product_id`), - CONSTRAINT `FKSA00000000000001` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FKSA00000000000002` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`), - CONSTRAINT `FKSA00000000000003` FOREIGN KEY (`product_id`) REFERENCES `m_savings_product` (`id`) +CREATE TABLE `m_savings_account` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `account_no` varchar(20) NOT NULL, + `external_id` varchar(100) DEFAULT NULL, + `client_id` BIGINT DEFAULT NULL, + `group_id` BIGINT DEFAULT NULL, + `product_id` BIGINT DEFAULT NULL, + `status_enum` SMALLINT NOT NULL DEFAULT '300', + `activation_date` date DEFAULT NULL, + `currency_code` varchar(3) NOT NULL, + `currency_digits` SMALLINT NOT NULL, + `nominal_annual_interest_rate` decimal(19, 6) NOT NULL, + `interest_compounding_period_enum` SMALLINT NOT NULL, + `interest_calculation_type_enum` SMALLINT NOT NULL, + `interest_calculation_days_in_year_type_enum` SMALLINT NOT NULL, + `min_required_opening_balance` decimal(19, 6) DEFAULT NULL, + `lockin_period_frequency` decimal(19, 6) DEFAULT NULL, + `lockin_period_frequency_enum` SMALLINT DEFAULT NULL, + `lockedin_until_date_derived` date DEFAULT NULL, + `total_deposits_derived` decimal(19, 6) DEFAULT NULL, + `total_withdrawals_derived` decimal(19, 6) DEFAULT NULL, + `total_interest_earned_derived` decimal(19, 6) DEFAULT NULL, + `total_interest_posted_derived` decimal(19, 6) DEFAULT NULL, + `account_balance_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + PRIMARY KEY (`id`), + UNIQUE KEY `sa_account_no_UNIQUE` (`account_no`), + UNIQUE KEY `sa_externalid_UNIQUE` (`external_id`), + KEY `FKSA00000000000001` (`client_id`), + KEY `FKSA00000000000002` (`group_id`), + KEY `FKSA00000000000003` (`product_id`), + CONSTRAINT `FKSA00000000000001` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), + CONSTRAINT `FKSA00000000000002` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`), + CONSTRAINT `FKSA00000000000003` FOREIGN KEY (`product_id`) REFERENCES `m_savings_product` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1574,10 +1942,12 @@ CREATE TABLE `m_savings_account` ( -- Dumping data for table `m_savings_account` -- -LOCK TABLES `m_savings_account` WRITE; +LOCK +TABLES `m_savings_account` WRITE; /*!40000 ALTER TABLE `m_savings_account` DISABLE KEYS */; /*!40000 ALTER TABLE `m_savings_account` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_savings_account_transaction` @@ -1586,20 +1956,21 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_savings_account_transaction`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_savings_account_transaction` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `savings_account_id` BIGINT NOT NULL, - `transaction_type_enum` SMALLINT NOT NULL, - `transaction_date` date NOT NULL, - `amount` decimal(19,6) NOT NULL, - `is_reversed` tinyint NOT NULL, - `running_balance_derived` decimal(19,6) DEFAULT NULL, - `balance_number_of_days_derived` INT DEFAULT NULL, - `balance_end_date_derived` date DEFAULT NULL, - `cumulative_balance_derived` decimal(19,6) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FKSAT0000000001` (`savings_account_id`), - CONSTRAINT `FKSAT0000000001` FOREIGN KEY (`savings_account_id`) REFERENCES `m_savings_account` (`id`) +CREATE TABLE `m_savings_account_transaction` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `savings_account_id` BIGINT NOT NULL, + `transaction_type_enum` SMALLINT NOT NULL, + `transaction_date` date NOT NULL, + `amount` decimal(19, 6) NOT NULL, + `is_reversed` tinyint NOT NULL, + `running_balance_derived` decimal(19, 6) DEFAULT NULL, + `balance_number_of_days_derived` INT DEFAULT NULL, + `balance_end_date_derived` date DEFAULT NULL, + `cumulative_balance_derived` decimal(19, 6) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FKSAT0000000001` (`savings_account_id`), + CONSTRAINT `FKSAT0000000001` FOREIGN KEY (`savings_account_id`) REFERENCES `m_savings_account` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1607,10 +1978,12 @@ CREATE TABLE `m_savings_account_transaction` ( -- Dumping data for table `m_savings_account_transaction` -- -LOCK TABLES `m_savings_account_transaction` WRITE; +LOCK +TABLES `m_savings_account_transaction` WRITE; /*!40000 ALTER TABLE `m_savings_account_transaction` DISABLE KEYS */; /*!40000 ALTER TABLE `m_savings_account_transaction` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_savings_product` @@ -1619,21 +1992,22 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_savings_product`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_savings_product` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) NOT NULL, - `description` varchar(500) NOT NULL, - `currency_code` varchar(3) NOT NULL, - `currency_digits` SMALLINT NOT NULL, - `nominal_annual_interest_rate` decimal(19,6) NOT NULL, - `interest_compounding_period_enum` SMALLINT NOT NULL, - `interest_calculation_type_enum` SMALLINT NOT NULL, - `interest_calculation_days_in_year_type_enum` SMALLINT NOT NULL, - `min_required_opening_balance` decimal(19,6) DEFAULT NULL, - `lockin_period_frequency` decimal(19,6) DEFAULT NULL, - `lockin_period_frequency_enum` SMALLINT DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `sp_unq_name` (`name`) +CREATE TABLE `m_savings_product` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `description` varchar(500) NOT NULL, + `currency_code` varchar(3) NOT NULL, + `currency_digits` SMALLINT NOT NULL, + `nominal_annual_interest_rate` decimal(19, 6) NOT NULL, + `interest_compounding_period_enum` SMALLINT NOT NULL, + `interest_calculation_type_enum` SMALLINT NOT NULL, + `interest_calculation_days_in_year_type_enum` SMALLINT NOT NULL, + `min_required_opening_balance` decimal(19, 6) DEFAULT NULL, + `lockin_period_frequency` decimal(19, 6) DEFAULT NULL, + `lockin_period_frequency_enum` SMALLINT DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `sp_unq_name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1641,10 +2015,12 @@ CREATE TABLE `m_savings_product` ( -- Dumping data for table `m_savings_product` -- -LOCK TABLES `m_savings_product` WRITE; +LOCK +TABLES `m_savings_product` WRITE; /*!40000 ALTER TABLE `m_savings_product` DISABLE KEYS */; /*!40000 ALTER TABLE `m_savings_product` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_staff` @@ -1653,17 +2029,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_staff`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_staff` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `is_loan_officer` tinyint NOT NULL DEFAULT '0', - `office_id` BIGINT DEFAULT NULL, - `firstname` varchar(50) DEFAULT NULL, - `lastname` varchar(50) DEFAULT NULL, - `display_name` varchar(100) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `display_name` (`display_name`), - KEY `FK_m_staff_m_office` (`office_id`), - CONSTRAINT `FK_m_staff_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `m_staff` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `is_loan_officer` tinyint NOT NULL DEFAULT '0', + `office_id` BIGINT DEFAULT NULL, + `firstname` varchar(50) DEFAULT NULL, + `lastname` varchar(50) DEFAULT NULL, + `display_name` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `display_name` (`display_name`), + KEY `FK_m_staff_m_office` (`office_id`), + CONSTRAINT `FK_m_staff_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1671,11 +2048,15 @@ CREATE TABLE `m_staff` ( -- Dumping data for table `m_staff` -- -LOCK TABLES `m_staff` WRITE; +LOCK +TABLES `m_staff` WRITE; /*!40000 ALTER TABLE `m_staff` DISABLE KEYS */; -INSERT INTO `m_staff` VALUES (1,1,1,'CEDA HO','LoanOfficer','LoanOfficer, CEDA HO'),(2,1,2,'Kampala','LoanOfficer','LoanOfficer, Kampala'); +INSERT INTO `m_staff` +VALUES (1, 1, 1, 'CEDA HO', 'LoanOfficer', 'LoanOfficer, CEDA HO'), + (2, 1, 2, 'Kampala', 'LoanOfficer', 'LoanOfficer, Kampala'); /*!40000 ALTER TABLE `m_staff` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `r_enum_value` @@ -1684,14 +2065,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `r_enum_value`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `r_enum_value` ( - `enum_name` varchar(100) NOT NULL, - `enum_id` INT NOT NULL, - `enum_message_property` varchar(100) NOT NULL, - `enum_value` varchar(100) NOT NULL, - PRIMARY KEY (`enum_name`,`enum_id`), - UNIQUE KEY `enum_message_property` (`enum_name`,`enum_message_property`), - UNIQUE KEY `enum_value` (`enum_name`,`enum_value`) +CREATE TABLE `r_enum_value` +( + `enum_name` varchar(100) NOT NULL, + `enum_id` INT NOT NULL, + `enum_message_property` varchar(100) NOT NULL, + `enum_value` varchar(100) NOT NULL, + PRIMARY KEY (`enum_name`, `enum_id`), + UNIQUE KEY `enum_message_property` (`enum_name`,`enum_message_property`), + UNIQUE KEY `enum_value` (`enum_name`,`enum_value`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1699,11 +2081,56 @@ CREATE TABLE `r_enum_value` ( -- Dumping data for table `r_enum_value` -- -LOCK TABLES `r_enum_value` WRITE; +LOCK +TABLES `r_enum_value` WRITE; /*!40000 ALTER TABLE `r_enum_value` DISABLE KEYS */; -INSERT INTO `r_enum_value` VALUES ('amortization_method_enum',0,'Equal principle payments','Equal principle payments'),('amortization_method_enum',1,'Equal installments','Equal installments'),('interest_calculated_in_period_enum',0,'Daily','Daily'),('interest_calculated_in_period_enum',1,'Same as repayment period','Same as repayment period'),('interest_method_enum',0,'Declining Balance','Declining Balance'),('interest_method_enum',1,'Flat','Flat'),('interest_period_frequency_enum',2,'Per month','Per month'),('interest_period_frequency_enum',3,'Per year','Per year'),('loan_status_id',100,'Submitted and awaiting approval','Submitted and awaiting approval'),('loan_status_id',200,'Approved','Approved'),('loan_status_id',300,'Active','Active'),('loan_status_id',400,'Withdrawn by client','Withdrawn by client'),('loan_status_id',500,'Rejected','Rejected'),('loan_status_id',600,'Closed','Closed'),('loan_status_id',601,'Written-Off','Written-Off'),('loan_status_id',602,'Rescheduled','Rescheduled'),('loan_status_id',700,'Overpaid','Overpaid'),('loan_transaction_strategy_id',1,'mifos-standard-strategy','Mifos style'),('loan_transaction_strategy_id',2,'heavensfamily-strategy','Heavensfamily'),('loan_transaction_strategy_id',3,'creocore-strategy','Creocore'),('loan_transaction_strategy_id',4,'rbi-india-strategy','RBI (India)'),('status',0,'invalid','Invalid'),('status',1,'processed','Processed'),('status',2,'awaiting.approval','Awaiting Approval'),('status',3,'rejected','Rejected'),('repayment_period_frequency_enum',0,'Days','Days'),('repayment_period_frequency_enum',1,'Weeks','Weeks'),('repayment_period_frequency_enum',2,'Months','Months'),('term_period_frequency_enum',0,'Days','Days'),('term_period_frequency_enum',1,'Weeks','Weeks'),('term_period_frequency_enum',2,'Months','Months'),('term_period_frequency_enum',3,'Years','Years'),('transaction_type_enum',1,'Disbursement','Disbursement'),('transaction_type_enum',2,'Repayment','Repayment'),('transaction_type_enum',3,'Contra','Contra'),('transaction_type_enum',4,'Waive Interest','Waive Interest'),('transaction_type_enum',5,'Repayment At Disbursement','Repayment At Disbursement'),('transaction_type_enum',6,'Write-Off','Write-Off'),('transaction_type_enum',7,'Marked for Rescheduling','Marked for Rescheduling'),('transaction_type_enum',8,'Recovery Repayment','Recovery Repayment'),('transaction_type_enum',9,'Waive Charges','Waive Charges'),('transaction_type_enum',10,'Apply Charges','Apply Charges'),('transaction_type_enum',11,'Apply Interest','Apply Interest'); +INSERT INTO `r_enum_value` +VALUES ('amortization_method_enum', 0, 'Equal principle payments', 'Equal principle payments'), + ('amortization_method_enum', 1, 'Equal installments', 'Equal installments'), + ('interest_calculated_in_period_enum', 0, 'Daily', 'Daily'), + ('interest_calculated_in_period_enum', 1, 'Same as repayment period', 'Same as repayment period'), + ('interest_method_enum', 0, 'Declining Balance', 'Declining Balance'), + ('interest_method_enum', 1, 'Flat', 'Flat'), + ('interest_period_frequency_enum', 2, 'Per month', 'Per month'), + ('interest_period_frequency_enum', 3, 'Per year', 'Per year'), + ('loan_status_id', 100, 'Submitted and awaiting approval', 'Submitted and awaiting approval'), + ('loan_status_id', 200, 'Approved', 'Approved'), + ('loan_status_id', 300, 'Active', 'Active'), + ('loan_status_id', 400, 'Withdrawn by client', 'Withdrawn by client'), + ('loan_status_id', 500, 'Rejected', 'Rejected'), + ('loan_status_id', 600, 'Closed', 'Closed'), + ('loan_status_id', 601, 'Written-Off', 'Written-Off'), + ('loan_status_id', 602, 'Rescheduled', 'Rescheduled'), + ('loan_status_id', 700, 'Overpaid', 'Overpaid'), + ('loan_transaction_strategy_id', 1, 'mifos-standard-strategy', 'Mifos style'), + ('loan_transaction_strategy_id', 2, 'heavensfamily-strategy', 'Heavensfamily'), + ('loan_transaction_strategy_id', 3, 'creocore-strategy', 'Creocore'), + ('loan_transaction_strategy_id', 4, 'rbi-india-strategy', 'RBI (India)'), + ('status', 0, 'invalid', 'Invalid'), + ('status', 1, 'processed', 'Processed'), + ('status', 2, 'awaiting.approval', 'Awaiting Approval'), + ('status', 3, 'rejected', 'Rejected'), + ('repayment_period_frequency_enum', 0, 'Days', 'Days'), + ('repayment_period_frequency_enum', 1, 'Weeks', 'Weeks'), + ('repayment_period_frequency_enum', 2, 'Months', 'Months'), + ('term_period_frequency_enum', 0, 'Days', 'Days'), + ('term_period_frequency_enum', 1, 'Weeks', 'Weeks'), + ('term_period_frequency_enum', 2, 'Months', 'Months'), + ('term_period_frequency_enum', 3, 'Years', 'Years'), + ('transaction_type_enum', 1, 'Disbursement', 'Disbursement'), + ('transaction_type_enum', 2, 'Repayment', 'Repayment'), + ('transaction_type_enum', 3, 'Contra', 'Contra'), + ('transaction_type_enum', 4, 'Waive Interest', 'Waive Interest'), + ('transaction_type_enum', 5, 'Repayment At Disbursement', 'Repayment At Disbursement'), + ('transaction_type_enum', 6, 'Write-Off', 'Write-Off'), + ('transaction_type_enum', 7, 'Marked for Rescheduling', 'Marked for Rescheduling'), + ('transaction_type_enum', 8, 'Recovery Repayment', 'Recovery Repayment'), + ('transaction_type_enum', 9, 'Waive Charges', 'Waive Charges'), + ('transaction_type_enum', 10, 'Apply Charges', 'Apply Charges'), + ('transaction_type_enum', 11, 'Apply Interest', 'Apply Interest'); /*!40000 ALTER TABLE `r_enum_value` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `rpt_sequence` @@ -1712,9 +2139,10 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `rpt_sequence`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `rpt_sequence` ( - `id` INT NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`id`) +CREATE TABLE `rpt_sequence` +( + `id` INT NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1722,10 +2150,12 @@ CREATE TABLE `rpt_sequence` ( -- Dumping data for table `rpt_sequence` -- -LOCK TABLES `rpt_sequence` WRITE; +LOCK +TABLES `rpt_sequence` WRITE; /*!40000 ALTER TABLE `rpt_sequence` DISABLE KEYS */; /*!40000 ALTER TABLE `rpt_sequence` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `schema_version` @@ -1734,22 +2164,23 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `schema_version`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `schema_version` ( - `version_rank` INT NOT NULL, - `installed_rank` INT NOT NULL, - `version` varchar(50) NOT NULL, - `description` varchar(200) NOT NULL, - `type` varchar(20) NOT NULL, - `script` varchar(1000) NOT NULL, - `checksum` INT DEFAULT NULL, - `installed_by` varchar(100) NOT NULL, - `installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, - `execution_time` INT NOT NULL, - `success` tinyint NOT NULL, - PRIMARY KEY (`version`), - KEY `schema_version_vr_idx` (`version_rank`), - KEY `schema_version_ir_idx` (`installed_rank`), - KEY `schema_version_s_idx` (`success`) +CREATE TABLE `schema_version` +( + `version_rank` INT NOT NULL, + `installed_rank` INT NOT NULL, + `version` varchar(50) NOT NULL, + `description` varchar(200) NOT NULL, + `type` varchar(20) NOT NULL, + `script` varchar(1000) NOT NULL, + `checksum` INT DEFAULT NULL, + `installed_by` varchar(100) NOT NULL, + `installed_on` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `execution_time` INT NOT NULL, + `success` tinyint NOT NULL, + PRIMARY KEY (`version`), + KEY `schema_version_vr_idx` (`version_rank`), + KEY `schema_version_ir_idx` (`installed_rank`), + KEY `schema_version_s_idx` (`success`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1757,11 +2188,29 @@ CREATE TABLE `schema_version` ( -- Dumping data for table `schema_version` -- -LOCK TABLES `schema_version` WRITE; +LOCK +TABLES `schema_version` WRITE; /*!40000 ALTER TABLE `schema_version` DISABLE KEYS */; -INSERT INTO `schema_version` VALUES (1,1,'1','mifosplatform-core-ddl-latest','SQL','V1__mifosplatform-core-ddl-latest.sql',-1957145051,'root','2013-04-05 11:23:24',365,1),(2,2,'2','mifosx-base-reference-data-utf8','SQL','V2__mifosx-base-reference-data-utf8.sql',1316484475,'root','2013-04-05 11:23:24',26,1),(3,3,'3','mifosx-permissions-and-authorisation-utf8','SQL','V3__mifosx-permissions-and-authorisation-utf8.sql',1922951887,'root','2013-04-05 11:23:24',26,1),(4,4,'4','mifosx-core-reports-utf8','SQL','V4__mifosx-core-reports-utf8.sql',-934709187,'root','2013-04-05 11:23:24',52,1),(5,5,'5','update-savings-product-and-account-tables','SQL','V5__update-savings-product-and-account-tables.sql',1171300485,'root','2013-04-05 11:23:24',22,1),(6,6,'6','add min max principal column to loan','SQL','V6__add_min_max_principal_column_to_loan.sql',21414779,'root','2013-04-05 11:23:24',25,1),(7,7,'7','remove read makerchecker permission','SQL','V7__remove_read_makerchecker_permission.sql',-335430825,'root','2013-04-05 11:23:24',3,1),(8,8,'8','deposit-transaction-permissions-if-they-exist','SQL','V8__deposit-transaction-permissions-if-they-exist.sql',-1507997551,'root','2013-04-05 11:23:24',2,1); +INSERT INTO `schema_version` +VALUES (1, 1, '1', 'mifosplatform-core-ddl-latest', 'SQL', 'V1__mifosplatform-core-ddl-latest.sql', -1957145051, 'root', + '2013-04-05 11:23:24', 365, 1), + (2, 2, '2', 'mifosx-base-reference-data-utf8', 'SQL', 'V2__mifosx-base-reference-data-utf8.sql', 1316484475, + 'root', '2013-04-05 11:23:24', 26, 1), + (3, 3, '3', 'mifosx-permissions-and-authorisation-utf8', 'SQL', + 'V3__mifosx-permissions-and-authorisation-utf8.sql', 1922951887, 'root', '2013-04-05 11:23:24', 26, 1), + (4, 4, '4', 'mifosx-core-reports-utf8', 'SQL', 'V4__mifosx-core-reports-utf8.sql', -934709187, 'root', + '2013-04-05 11:23:24', 52, 1), + (5, 5, '5', 'update-savings-product-and-account-tables', 'SQL', + 'V5__update-savings-product-and-account-tables.sql', 1171300485, 'root', '2013-04-05 11:23:24', 22, 1), + (6, 6, '6', 'add min max principal column to loan', 'SQL', 'V6__add_min_max_principal_column_to_loan.sql', + 21414779, 'root', '2013-04-05 11:23:24', 25, 1), + (7, 7, '7', 'remove read makerchecker permission', 'SQL', 'V7__remove_read_makerchecker_permission.sql', + -335430825, 'root', '2013-04-05 11:23:24', 3, 1), + (8, 8, '8', 'deposit-transaction-permissions-if-they-exist', 'SQL', + 'V8__deposit-transaction-permissions-if-they-exist.sql', -1507997551, 'root', '2013-04-05 11:23:24', 2, 1); /*!40000 ALTER TABLE `schema_version` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `stretchy_parameter` @@ -1770,23 +2219,24 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `stretchy_parameter`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `stretchy_parameter` ( - `parameter_id` INT NOT NULL AUTO_INCREMENT, - `parameter_name` varchar(45) NOT NULL, - `parameter_variable` varchar(45) DEFAULT NULL, - `parameter_label` varchar(45) NOT NULL, - `parameter_displayType` varchar(45) NOT NULL, - `parameter_FormatType` varchar(10) NOT NULL, - `parameter_default` varchar(45) NOT NULL, - `special` varchar(1) DEFAULT NULL, - `selectOne` varchar(1) DEFAULT NULL, - `selectAll` varchar(1) DEFAULT NULL, - `parameter_sql` text, - `parent_parameter_id` INT DEFAULT NULL, - PRIMARY KEY (`parameter_id`), - UNIQUE KEY `name_UNIQUE` (`parameter_name`), - KEY `fk_stretchy_parameter_0001_idx` (`parent_parameter_id`), - CONSTRAINT `fk_stretchy_parameter_0001` FOREIGN KEY (`parent_parameter_id`) REFERENCES `stretchy_parameter` (`parameter_id`) +CREATE TABLE `stretchy_parameter` +( + `parameter_id` INT NOT NULL AUTO_INCREMENT, + `parameter_name` varchar(45) NOT NULL, + `parameter_variable` varchar(45) DEFAULT NULL, + `parameter_label` varchar(45) NOT NULL, + `parameter_displayType` varchar(45) NOT NULL, + `parameter_FormatType` varchar(10) NOT NULL, + `parameter_default` varchar(45) NOT NULL, + `special` varchar(1) DEFAULT NULL, + `selectOne` varchar(1) DEFAULT NULL, + `selectAll` varchar(1) DEFAULT NULL, + `parameter_sql` text, + `parent_parameter_id` INT DEFAULT NULL, + PRIMARY KEY (`parameter_id`), + UNIQUE KEY `name_UNIQUE` (`parameter_name`), + KEY `fk_stretchy_parameter_0001_idx` (`parent_parameter_id`), + CONSTRAINT `fk_stretchy_parameter_0001` FOREIGN KEY (`parent_parameter_id`) REFERENCES `stretchy_parameter` (`parameter_id`) ) ENGINE=InnoDB AUTO_INCREMENT=1004 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1794,11 +2244,46 @@ CREATE TABLE `stretchy_parameter` ( -- Dumping data for table `stretchy_parameter` -- -LOCK TABLES `stretchy_parameter` WRITE; +LOCK +TABLES `stretchy_parameter` WRITE; /*!40000 ALTER TABLE `stretchy_parameter` DISABLE KEYS */; -INSERT INTO `stretchy_parameter` VALUES (1,'startDateSelect','startDate','startDate','date','date','today',NULL,NULL,NULL,NULL,NULL),(2,'endDateSelect','endDate','endDate','date','date','today',NULL,NULL,NULL,NULL,NULL),(3,'obligDateTypeSelect','obligDateType','obligDateType','select','number','0',NULL,NULL,NULL,'select * from\r\n(select 1 as id, \"Closed\" as `name` union all\r\nselect 2, \"Disbursal\" ) x\r\norder by x.`id`',NULL),(5,'OfficeIdSelectOne','officeId','Office','select','number','0',NULL,'Y',NULL,'select id, \r\nconcat(substring(\"........................................\", 1, \r\n \n\n((LENGTH(`hierarchy`) - LENGTH(REPLACE(`hierarchy`, \'.\', \'\')) - 1) * 4)), \r\n `name`) as tc\r\nfrom m_office\r\nwhere hierarchy like concat\n\n(\'${currentUserHierarchy}\', \'%\')\r\norder by hierarchy',NULL),(6,'loanOfficerIdSelectAll','loanOfficerId','Loan Officer','select','number','0',NULL,NULL,'Y','(select lo.id, lo.display_name as `Name` \r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\njoin m_staff lo on lo.office_id = ounder.id\r\nwhere lo.is_loan_officer = true\r\nand o.id = ${officeId})\r\nunion all\r\n(select -10, \'-\')\r\norder by 2',5),(10,'currencyIdSelectAll','currencyId','Currency','select','number','0',NULL,NULL,'Y','select `code`, `name`\r\nfrom m_organisation_currency\r\norder by `code`',NULL),(20,'fundIdSelectAll','fundId','Fund','select','number','0',NULL,NULL,'Y','(select id, `name`\r\nfrom m_fund)\r\nunion all\r\n(select -10, \'-\')\r\norder by 2',NULL),(25,'loanProductIdSelectAll','loanProductId','Product','select','number','0',NULL,NULL,'Y','select p.id, p.`name`\r\nfrom m_product_loan p\r\nwhere p.currency_code = \'$\{currencyId}\'\r\norder by 2',10),(26,'loanPurposeIdSelectAll','loanPurposeId','Loan Purpose','select','number','0',NULL,NULL,'Y','select -10 as id, \'-\' as code_value\r\nunion all\r\nselect * from (select v.id, v.code_value\r\nfrom m_code c\r\njoin m_code_value v on v.code_id = c.id\r\nwhere c.code_name = \"loanPurpose\"\r\norder by v.order_position) x',NULL),(100,'parTypeSelect','parType','parType','select','number','0',NULL,NULL,NULL,'select * from\r\n(select 1 as id, \"Principal Only\" as `name` union all\r\nselect 2, \"Principal + Interest\" union all\r\nselect 3, \"Principal + Interest + Fees\" union all\r\nselect 4, \"Principal + Interest + Fees + Penalties\") x\r\norder by x.`id`',NULL),(1001,'FullReportList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select r.report_id, r.report_name, r.report_type, r.report_subtype, r.report_category,\r\n \n\nrp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on rp.report_id = r.report_id\r\n \n\nleft join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \n\n\r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on rp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where \n\nur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by \n\nr.report_category, r.report_name, rp.parameter_id',NULL),(1002,'FullParameterList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select sp.parameter_name, sp.parameter_variable, sp.parameter_label, sp.parameter_displayType, \r\nsp.parameter_FormatType, sp.parameter_default, sp.selectOne, sp.selectAll, spp.parameter_name as parentParameterName\r\nfrom stretchy_parameter sp\r\nleft join stretchy_parameter spp on spp.parameter_id = sp.parent_parameter_id\r\nwhere sp.special is null\r\nand exists \r\n (select \'f\' \r\n from stretchy_report sr\r\n join stretchy_report_parameter srp on srp.report_id = sr.report_id\r\n where sr.report_name in(${reportListing})\r\n and srp.parameter_id = sp.parameter_id\r\n )\r\norder by sp.parameter_id',NULL),(1003,'reportCategoryList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select r.report_id, r.report_name, r.report_type, r.report_subtype, \n\nr.report_category,\r\n rp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on \n\nrp.report_id = r.report_id\r\n left join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.report_category = \'${reportCategory}\'\r\n and \n\nr.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on \n\nrp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where ur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \n\n\'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by r.report_category, r.report_name, rp.parameter_id',NULL); +INSERT INTO `stretchy_parameter` +VALUES (1, 'startDateSelect', 'startDate', 'startDate', 'date', 'date', 'today', NULL, NULL, NULL, NULL, NULL), + (2, 'endDateSelect', 'endDate', 'endDate', 'date', 'date', 'today', NULL, NULL, NULL, NULL, NULL), + (3, 'obligDateTypeSelect', 'obligDateType', 'obligDateType', 'select', 'number', '0', NULL, NULL, NULL, + 'select * from\r\n(select 1 as id, \"Closed\" as `name` union all\r\nselect 2, \"Disbursal\" ) x\r\norder by x.`id`', + NULL), + (5, 'OfficeIdSelectOne', 'officeId', 'Office', 'select', 'number', '0', NULL, 'Y', NULL, + 'select id, \r\nconcat(substring(\"........................................\", 1, \r\n \n\n((LENGTH(`hierarchy`) - LENGTH(REPLACE(`hierarchy`, \'.\', \'\')) - 1) * 4)), \r\n `name`) as tc\r\nfrom m_office\r\nwhere hierarchy like concat\n\n(\'${currentUserHierarchy}\', \'%\')\r\norder by hierarchy', + NULL), + (6, 'loanOfficerIdSelectAll', 'loanOfficerId', 'Loan Officer', 'select', 'number', '0', NULL, NULL, 'Y', + '(select lo.id, lo.display_name as `Name` \r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\njoin m_staff lo on lo.office_id = ounder.id\r\nwhere lo.is_loan_officer = true\r\nand o.id = ${officeId})\r\nunion all\r\n(select -10, \'-\')\r\norder by 2', + 5), + (10, 'currencyIdSelectAll', 'currencyId', 'Currency', 'select', 'number', '0', NULL, NULL, 'Y', + 'select `code`, `name`\r\nfrom m_organisation_currency\r\norder by `code`', NULL), + (20, 'fundIdSelectAll', 'fundId', 'Fund', 'select', 'number', '0', NULL, NULL, 'Y', + '(select id, `name`\r\nfrom m_fund)\r\nunion all\r\n(select -10, \' -\')\r\norder by 2', NULL), + (25, 'loanProductIdSelectAll', 'loanProductId', 'Product', 'select', 'number', '0', NULL, NULL, 'Y', + 'select p.id, p.`name`\r\nfrom m_product_loan p\r\nwhere p.currency_code = \'$\{currencyId}\'\r\norder by 2', + 10), + (26, 'loanPurposeIdSelectAll', 'loanPurposeId', 'Loan Purpose', 'select', 'number', '0', NULL, NULL, 'Y', + 'select -10 as id, \' -\' as code_value\r\nunion all\r\nselect * from (select v.id, v.code_value\r\nfrom m_code c\r\njoin m_code_value v on v.code_id = c.id\r\nwhere c.code_name = \"loanPurpose\"\r\norder by v.order_position) x', + NULL), + (100, 'parTypeSelect', 'parType', 'parType', 'select', 'number', '0', NULL, NULL, NULL, + 'select * from\r\n(select 1 as id, \"Principal Only\" as `name` union all\r\nselect 2, \"Principal + Interest\" union all\r\nselect 3, \"Principal + Interest + Fees\" union all\r\nselect 4, \"Principal + Interest + Fees + Penalties\") x\r\norder by x.`id`', + NULL), + (1001, 'FullReportList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, + 'select r.report_id, r.report_name, r.report_type, r.report_subtype, r.report_category,\r\n \n\nrp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on rp.report_id = r.report_id\r\n \n\nleft join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \n\n\r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on rp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where \n\nur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by \n\nr.report_category, r.report_name, rp.parameter_id', + NULL), + (1002, 'FullParameterList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, + 'select sp.parameter_name, sp.parameter_variable, sp.parameter_label, sp.parameter_displayType, \r\nsp.parameter_FormatType, sp.parameter_default, sp.selectOne, sp.selectAll, spp.parameter_name as parentParameterName\r\nfrom stretchy_parameter sp\r\nleft join stretchy_parameter spp on spp.parameter_id = sp.parent_parameter_id\r\nwhere sp.special is null\r\nand exists \r\n (select \'f\' \r\n from stretchy_report sr\r\n join stretchy_report_parameter srp on srp.report_id = sr.report_id\r\n where sr.report_name in(${reportListing})\r\n and srp.parameter_id = sp.parameter_id\r\n )\r\norder by sp.parameter_id', + NULL), + (1003, 'reportCategoryList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, + 'select r.report_id, r.report_name, r.report_type, r.report_subtype, \n\nr.report_category,\r\n rp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on \n\nrp.report_id = r.report_id\r\n left join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.report_category = \'${reportCategory}\'\r\n and \n\nr.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on \n\nrp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where ur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \n\n\'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by r.report_category, r.report_name, rp.parameter_id', + NULL); /*!40000 ALTER TABLE `stretchy_parameter` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `stretchy_report` @@ -1807,18 +2292,19 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `stretchy_report`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `stretchy_report` ( - `report_id` INT NOT NULL AUTO_INCREMENT, - `report_name` varchar(100) NOT NULL, - `report_type` varchar(20) NOT NULL, - `report_subtype` varchar(20) DEFAULT NULL, - `report_category` varchar(45) DEFAULT NULL, - `report_sql` text, - `description` text, - `core_report` tinyint DEFAULT '0', - `use_report` tinyint DEFAULT '0', - PRIMARY KEY (`report_id`), - UNIQUE KEY `report_name_UNIQUE` (`report_name`) +CREATE TABLE `stretchy_report` +( + `report_id` INT NOT NULL AUTO_INCREMENT, + `report_name` varchar(100) NOT NULL, + `report_type` varchar(20) NOT NULL, + `report_subtype` varchar(20) DEFAULT NULL, + `report_category` varchar(45) DEFAULT NULL, + `report_sql` text, + `description` text, + `core_report` tinyint DEFAULT '0', + `use_report` tinyint DEFAULT '0', + PRIMARY KEY (`report_id`), + UNIQUE KEY `report_name_UNIQUE` (`report_name`) ) ENGINE=InnoDB AUTO_INCREMENT=95 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1826,11 +2312,87 @@ CREATE TABLE `stretchy_report` ( -- Dumping data for table `stretchy_report` -- -LOCK TABLES `stretchy_report` WRITE; +LOCK +TABLES `stretchy_report` WRITE; /*!40000 ALTER TABLE `stretchy_report` DISABLE KEYS */; -INSERT INTO `stretchy_report` VALUES (1,'Client Listing','Table',NULL,'Client','select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n c.account_no as \"Client Account No.\", \r\nc.display_name as \"Name\", \n\nc.joined_date as \"Joined\", c.external_id as \"External Id\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand \n\nounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\nwhere o.id = ${officeId}\r\nand c.is_deleted=0\r\n\n\norder by ounder.hierarchy, c.account_no','Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \'one to one\' additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t \n\nhave that client browser/memory impact).',1,1),(2,'Client Loans Listing','Table',NULL,'Client','select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client \n\nAccount No.\", \r\nc.display_name as \"Name\", \r\nlo.display_name as \"Loan Officer\", l.account_no as \"Loan Account No.\", l.external_id as \"External Id\", \r\n\n\np.name as Loan, st.enum_message_property as \"Status\", \r\nf.`name` as Fund, purp.code_value as \"Loan Purpose\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount,\n\n\r\nl.arrearstolerance_amount as \"Arrears Tolerance Amount\",\r\nl.number_of_repayments as \"Expected No. Repayments\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\nl.nominal_interest_rate_per_period as \"Nominal Interest Rate Per Period\",\r\n\r\nipf.enum_message_property as \"Interest Rate Frequency\n\n\",\r\nim.enum_message_property as \"Interest Method\",\r\nicp.enum_message_property as \"Interest Calculated in Period\",\r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.repay_every as \"Repayment Frequency\",\r\nrf.enum_message_property as \"Repayment Frequency Period\",\n\n\r\nam.enum_message_property as \"Amortization\",\r\n\r\nl.total_charges_due_at_disbursement_derived as \"Total Charges Due At Disbursement\",\r\n\r\ndate( \n\nl.submittedon_date) as Submitted, date(l.approvedon_date) Approved, l.expected_disbursedon_date As \"Expected Disbursal\",\r\ndate(l.expected_firstrepaymenton_date) as \n\n\"Expected First Repayment\", date(l.interest_calculated_from_date) as \"Interest Calculated From\" ,\r\ndate(l.disbursedon_date) as Disbursed, date\n\n(l.expected_maturedon_date) \"Expected Maturity\",\r\ndate(l.maturedon_date) as \"Matured On\", date(l.closedon_date) as Closed,\r\ndate(l.rejectedon_date) as \n\nRejected, date(l.rescheduledon_date) as Rescheduled, \r\ndate(l.withdrawnon_date) as Withdrawn, date(l.writtenoffon_date) \"Written Off\"\r\nfrom m_office o \r\njoin \n\nm_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on \n\nc.office_id = ounder.id\r\nleft join m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_product_loan p on p.id = \n\nl.product_id\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join r_enum_value st on st.enum_name = \"loan_status_id\" and st.enum_id = l.loan_status_id\r\nleft join \n\nr_enum_value ipf on ipf.enum_name = \"interest_period_frequency_enum\" and ipf.enum_id = l.interest_period_frequency_enum\r\nleft join r_enum_value im on im.enum_name \n\n= \"interest_method_enum\" and im.enum_id = l.interest_method_enum\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = \n\nl.term_period_frequency_enum\r\nleft join r_enum_value icp on icp.enum_name = \"interest_calculated_in_period_enum\" and icp.enum_id = \n\nl.interest_calculated_in_period_enum\r\nleft join r_enum_value rf on rf.enum_name = \"repayment_period_frequency_enum\" and rf.enum_id = \n\nl.repayment_period_frequency_enum\r\nleft join r_enum_value am on am.enum_name = \"amortization_method_enum\" and am.enum_id = l.amortization_method_enum\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\n\r\nleft \n\njoin m_currency cur on cur.code = l.currency_code\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand \n\n(l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \n\n\"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\norder by ounder.hierarchy, 2 , l.id','Individual Client Report\r\n\r\nPretty \n\nwide report that lists the basic details of client loans. \r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t have that client browser/memory impact).',1,1),(5,'Loans Awaiting Disbursal','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No\", c.display_name as \"Name\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount as Principal, \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\",\r\ndate(l.approvedon_date) \"Approved\",\r\ndatediff(l.expected_disbursedon_date, curdate()) as \"Days to Disbursal\",\r\ndate(l.expected_disbursedon_date) \"Expected Disbursal\",\r\npurp.code_value as \"Loan Purpose\",\r\n lo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\norder by ounder.hierarchy, datediff(l.expected_disbursedon_date, curdate()), c.account_no','Individual Client Report',1,1),(6,'Loans Awaiting Disbursal Summary','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, f.`name` as Fund,\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`','Individual Client Report',1,1),(7,'Loans Awaiting Disbursal Summary by Month','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nyear(l.expected_disbursedon_date) as \"Year\", \r\nmonthname(l.expected_disbursedon_date) as \"Month\",\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)','Individual Client Report',1,1),(8,'Loans Pending Approval','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client Name\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, pl.`name` as \"Product\", \r\nl.account_no as \"Loan Account No.\", \r\nl.principal_amount as \"Loan Amount\", \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\ndatediff(curdate(), l.submittedon_date) \"Days Pending Approval\", \r\npurp.code_value as \"Loan Purpose\",\r\nlo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 100 /*Submitted and awaiting approval */\r\norder by ounder.hierarchy, l.submittedon_date, l.account_no','Individual Client Report',1,1),(11,'Active Loans - Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. loans_in_arrears_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(if(laa.loan_id is not null, l.id, null) )) as loans_in_arrears_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(laa.principal_overdue_derived) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(laa.interest_overdue_derived) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(laa.fee_charges_overdue_derived) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(laa.penalty_charges_overdue_derived) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency',NULL,1,1),(12,'Active Loans - Details','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\npenalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(13,'Obligation Met Loans Details','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client\",\r\nl.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.total_repayment_derived as \"Total Repaid\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", \r\ndate(l.closedon_date) as \"Closed\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(14,'Obligation Met Loans Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\ncount(distinct(c.id)) as \"No. of Clients\",\r\ncount(distinct(l.id)) as \"No. of Loans\",\r\nsum(l.principal_amount) as \"Total Loan Amount\", \r\nsum(l.principal_repaid_derived) as \"Total Principal Repaid\",\r\nsum(l.interest_repaid_derived) as \"Total Interest Repaid\",\r\nsum(l.fee_charges_repaid_derived) as \"Total Fees Repaid\",\r\nsum(l.penalty_charges_repaid_derived) as \"Total Penalties Repaid\",\r\nsum(l.interest_waived_derived) as \"Total Interest Waived\",\r\nsum(l.fee_charges_waived_derived) as \"Total Fees Waived\",\r\nsum(l.penalty_charges_waived_derived) as \"Total Penalties Waived\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by ounder.hierarchy, l.currency_code\r\norder by ounder.hierarchy, l.currency_code','Individual Client \n\nReport',1,1),(15,'Portfolio at Risk','Table',NULL,'Loan','select x.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from \r\n(select ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.currency_code\r\norder by l.currency_code) x','Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)',1,1),(16,'Portfolio at Risk by Branch','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\",\r\nx.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as \"branch\", ifnull(cur.display_symbol, l.currency_code) as Currency, \r\n\r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency','Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)',1,1),(20,'Funds Disbursed Between Dates Summary','Table',NULL,'Fund','select ifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nround(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office ounder \r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\ngroup by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)\r\norder by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)',NULL,1,1),(21,'Funds Disbursed Between Dates Summary by Office','Table',NULL,'Fund','select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n \n\nifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office o\r\n\n\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c \n\non c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\n\n\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand o.id = ${officeId}\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand \n\n(l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\ngroup by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, \n\nl.currency_code)\r\norder by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)',NULL,1,1),(48,'Balance Sheet','Pentaho',NULL,'Accounting',NULL,'Balance Sheet',1,1),(49,'Income Statement','Pentaho',NULL,'Accounting',NULL,'Profit and Loss Statement',1,1),(50,'Trial Balance','Pentaho',NULL,'Accounting',NULL,'Trial Balance Report',1,1),(51,'Written-Off Loans','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Written-Off Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Written-Off Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Written-Off Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Written-Off Penalties\',\r\nn.note AS \'Reason For Write-Off\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 6 /*write-off */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=601\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\") \r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no','Individual Lending Report. Written Off Loans',1,1),(52,'Aging Detail','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nmc.account_no as \"Client Account No.\",\r\n mc.display_name AS \"Client Name\",\r\n ml.account_no AS \"Account Number\",\r\n ml.principal_amount AS \"Loan Amount\",\r\n ml.principal_disbursed_derived AS \"Original Principal\",\r\n ml.interest_charged_derived AS \"Original Interest\",\r\n ml.principal_repaid_derived AS \"Principal Paid\",\r\n ml.interest_repaid_derived AS \"Interest Paid\",\r\n laa.principal_overdue_derived AS \"Principal Overdue\",\r\n laa.interest_overdue_derived AS \"Interest Overdue\",\r\nDATEDIFF(CURDATE(), laa.overdue_since_date_derived) as \"Days in Arrears\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<7, \'<1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<8, \' 1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<22, \' 3\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<29, \' 4\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<36, \' 5\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<43, \' 6\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<50, \' 7\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<57, \' 8\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<64, \' 9\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<85, \'12\', \'12+\')))))))))))) )AS \"Weeks In Arrears Band\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<361, \'180 - 360\', \r\n \'> 360\'))))) AS \"Days in Arrears Band\"\r\n\r\n FROM m_office mo \r\n JOIN m_office ounder ON ounder.hierarchy like concat(mo.hierarchy, \'%\')\r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n INNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id\r\n INNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\n left join m_currency cur on cur.code = ml.currency_code\r\n WHERE ml.loan_status_id=300\r\n AND mo.id=${officeId}\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no','Loan arrears aging (Weeks)',1,1),(53,'Aging Summary (Arrears in Weeks)','Table',NULL,'Loan','SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Weeks In Arrears (Up To)\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'1\',2 UNION\r\n SELECT \'2\',3 UNION\r\n SELECT \'3\',4 UNION\r\n SELECT \'4\',5 UNION\r\n SELECT \'5\',6 UNION\r\n SELECT \'6\',7 UNION\r\n SELECT \'7\',8 UNION\r\n SELECT \'8\',9 UNION\r\n SELECT \'9\',10 UNION\r\n SELECT \'10\',11 UNION\r\n SELECT \'11\',12 UNION\r\n SELECT \'12\',13 UNION\r\n SELECT \'12+\',14) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<8, \'1\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<22, \'3\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<29, \'4\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<36, \'5\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<43, \'6\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<50, \'7\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<57, \'8\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<64, \'9\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<85, \'12\',\r\n \'12+\'))))))))))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid','Loan amount in arrears by branch',1,1),(54,'Rescheduled Loans','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Rescheduled Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Rescheduled Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Rescheduled Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Rescheduled Penalties\',\r\nn.note AS \'Reason For Rescheduling\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 7 /*marked for rescheduling */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=602\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no','Individual Lending Report. Rescheduled Loans. The ability to reschedule (or mark that you have rescheduled the loan elsewhere) is a legacy of the older Mifos product. Needed for migration.',1,1),(55,'Active Loans Passed Final Maturity','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(56,'Active Loans Passed Final Maturity Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency',NULL,1,1),(57,'Active Loans in last installment','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(lastInstallment.`hierarchy`) - LENGTH(REPLACE(lastInstallment.`hierarchy`, \'.\', \'\')) - 1))), lastInstallment.branch) as \"Office/Branch\",\r\nlastInstallment.Currency,\r\nlastInstallment.`Loan Officer`, \r\nlastInstallment.`Client Account No`, lastInstallment.`Client`, \r\nlastInstallment.`Loan Account No`, lastInstallment.`Product`, \r\nlastInstallment.`Fund`, lastInstallment.`Loan Amount`, \r\nlastInstallment.`Annual Nominal Interest Rate`, \r\nlastInstallment.`Disbursed`, lastInstallment.`Expected Matured On` ,\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\norder by lastInstallment.hierarchy, lastInstallment.Currency, lastInstallment.`Client Account No`, lastInstallment.`Loan Account No`','Individual Client \n\nReport',1,1),(58,'Active Loans in last installment Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select lastInstallment.branchId as branchId,\r\nlastInstallment.Currency,\r\ncount(distinct(lastInstallment.clientId)) as client_count, \r\ncount(distinct(lastInstallment.loanId)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id as branchId, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.id as clientId, c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\ngroup by lastInstallment.branchId) x on x.branchId = mo.id\r\norder by mo.hierarchy, x.Currency','Individual Client \n\nReport',1,1),(59,'Active Loans by Disbursal Period','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No\", c.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Principal Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\n\r\nl.total_expected_repayment_derived as \"Total Loan (P+I+F+Pen)\",\r\nl.total_repayment_derived as \"Total Repaid (P+I+F+Pen)\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(61,'Aging Summary (Arrears in Months)','Table',NULL,'Loan','SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Days In Arrears\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'0 - 30\',2 UNION\r\n SELECT \'30 - 60\',3 UNION\r\n SELECT \'60 - 90\',4 UNION\r\n SELECT \'90 - 180\',5 UNION\r\n SELECT \'180 - 360\',6 UNION\r\n SELECT \'> 360\',7 ) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<361, \'180 - 360\', \r\n \'> 360\')))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid','Loan amount in arrears by branch',1,1),(91,'Loan Account Schedule','Pentaho',NULL,'Loan',NULL,NULL,1,0),(92,'Branch Expected Cash Flow','Pentaho',NULL,'Loan',NULL,NULL,1,1),(93,'Expected Payments By Date - Basic','Table',NULL,'Loan','SELECT \r\n ounder.name \'Office\', \r\n IFNULL(ms.display_name,\'-\') \'Loan Officer\',\r\n mc.account_no \'Client Account Number\',\r\n mc.display_name \'Name\',\r\n mp.name \'Product\',\r\n ml.account_no \'Loan Account Number\',\r\n mr.duedate \'Due Date\',\r\n mr.installment \'Installment\',\r\n cu.display_symbol \'Currency\',\r\n mr.principal_amount- IFNULL(mr.principal_completed_derived,0) \'Principal Due\',\r\n mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0) \'Interest Due\', \r\n IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0) \'Fees Due\', \r\n IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0) \'Penalty Due\',\r\n (mr.principal_amount- IFNULL(mr.principal_completed_derived,0)) +\r\n (mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0)) + \r\n (IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0)) + \r\n (IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0)) \'Total Due\', \r\n mlaa.total_overdue_derived \'Total Overdue\'\r\n \r\n FROM m_office mo\r\n JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\n \r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n \r\n LEFT JOIN m_client mc ON mc.office_id=ounder.id\r\n LEFT JOIN m_loan ml ON ml.client_id=mc.id AND ml.loan_status_id=300\r\n LEFT JOIN m_loan_arrears_aging mlaa ON mlaa.loan_id=ml.id\r\n LEFT JOIN m_loan_repayment_schedule mr ON mr.loan_id=ml.id AND mr.completed_derived=0\r\n LEFT JOIN m_product_loan mp ON mp.id=ml.product_id\r\n LEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\n LEFT JOIN m_currency cu ON cu.code=ml.currency_code\r\n WHERE mo.id=${officeId}\r\n AND (IFNULL(ml.loan_officer_id, -10) = \"${loanOfficerId}\" OR \"-1\" = \"${loanOfficerId}\")\r\n AND mr.duedate BETWEEN \'${startDate}\' AND \'${endDate}\'\r\n ORDER BY ounder.id,mr.duedate,ml.account_no','Test',1,1),(94,'Expected Payments By Date - Formatted','Pentaho',NULL,'Loan',NULL,NULL,1,1); +INSERT INTO `stretchy_report` +VALUES (1, 'Client Listing', 'Table', NULL, 'Client', + 'select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n c.account_no as \"Client Account No.\", \r\nc.display_name as \"Name\", \n\nc.joined_date as \"Joined\", c.external_id as \"External Id\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand \n\nounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\nwhere o.id = ${officeId}\r\nand c.is_deleted=0\r\n\n\norder by ounder.hierarchy, c.account_no', + 'Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \'one to one\' additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, + there is probably is + a limit of about 20/50k clients returned for html display (export to excel doesn\'t \n\nhave that client browser/memory impact).',1,1), + (2, 'Client Loans Listing', 'Table', NULL, 'Client', + 'select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client \n\nAccount No.\", \r\nc.display_name as \"Name\", \r\nlo.display_name as \"Loan Officer\", l.account_no as \"Loan Account No.\", l.external_id as \"External Id\", \r\n\n\np.name as Loan, st.enum_message_property as \"Status\", \r\nf.`name` as Fund, purp.code_value as \"Loan Purpose\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount,\n\n\r\nl.arrearstolerance_amount as \"Arrears Tolerance Amount\",\r\nl.number_of_repayments as \"Expected No. Repayments\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\nl.nominal_interest_rate_per_period as \"Nominal Interest Rate Per Period\",\r\n\r\nipf.enum_message_property as \"Interest Rate Frequency\n\n\",\r\nim.enum_message_property as \"Interest Method\",\r\nicp.enum_message_property as \"Interest Calculated in Period\",\r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.repay_every as \"Repayment Frequency\",\r\nrf.enum_message_property as \"Repayment Frequency Period\",\n\n\r\nam.enum_message_property as \"Amortization\",\r\n\r\nl.total_charges_due_at_disbursement_derived as \"Total Charges Due At Disbursement\",\r\n\r\ndate( \n\nl.submittedon_date) as Submitted, date(l.approvedon_date) Approved, l.expected_disbursedon_date As \"Expected Disbursal\",\r\ndate(l.expected_firstrepaymenton_date) as \n\n\"Expected First Repayment\", date(l.interest_calculated_from_date) as \"Interest Calculated From\" ,\r\ndate(l.disbursedon_date) as Disbursed, date\n\n(l.expected_maturedon_date) \"Expected Maturity\",\r\ndate(l.maturedon_date) as \"Matured On\", date(l.closedon_date) as Closed,\r\ndate(l.rejectedon_date) as \n\nRejected, date(l.rescheduledon_date) as Rescheduled, \r\ndate(l.withdrawnon_date) as Withdrawn, date(l.writtenoffon_date) \"Written Off\"\r\nfrom m_office o \r\njoin \n\nm_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on \n\nc.office_id = ounder.id\r\nleft join m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_product_loan p on p.id = \n\nl.product_id\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join r_enum_value st on st.enum_name = \"loan_status_id\" and st.enum_id = l.loan_status_id\r\nleft join \n\nr_enum_value ipf on ipf.enum_name = \"interest_period_frequency_enum\" and ipf.enum_id = l.interest_period_frequency_enum\r\nleft join r_enum_value im on im.enum_name \n\n= \"interest_method_enum\" and im.enum_id = l.interest_method_enum\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = \n\nl.term_period_frequency_enum\r\nleft join r_enum_value icp on icp.enum_name = \"interest_calculated_in_period_enum\" and icp.enum_id = \n\nl.interest_calculated_in_period_enum\r\nleft join r_enum_value rf on rf.enum_name = \"repayment_period_frequency_enum\" and rf.enum_id = \n\nl.repayment_period_frequency_enum\r\nleft join r_enum_value am on am.enum_name = \"amortization_method_enum\" and am.enum_id = l.amortization_method_enum\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\n\r\nleft \n\njoin m_currency cur on cur.code = l.currency_code\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand \n\n(l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \n\n\"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\norder by ounder.hierarchy, 2 , l.id', + 'Individual Client Report\r\n\r\nPretty \n\nwide report that lists the basic details of client loans. \r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t have that client browser/memory impact).',1,1), + (5, 'Loans Awaiting Disbursal', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No\", c.display_name as \"Name\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount as Principal, \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\",\r\ndate(l.approvedon_date) \"Approved\",\r\ndatediff(l.expected_disbursedon_date, curdate()) as \"Days to Disbursal\",\r\ndate(l.expected_disbursedon_date) \"Expected Disbursal\",\r\npurp.code_value as \"Loan Purpose\",\r\n lo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\norder by ounder.hierarchy, datediff(l.expected_disbursedon_date, curdate()), c.account_no', + 'Individual Client Report', 1, 1), (6, 'Loans Awaiting Disbursal Summary', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, f.`name` as Fund,\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`', + 'Individual Client Report', 1, 1), + (7, 'Loans Awaiting Disbursal Summary by Month', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nyear(l.expected_disbursedon_date) as \"Year\", \r\nmonthname(l.expected_disbursedon_date) as \"Month\",\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)', + 'Individual Client Report', 1, 1), (8, 'Loans Pending Approval', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client Name\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, pl.`name` as \"Product\", \r\nl.account_no as \"Loan Account No.\", \r\nl.principal_amount as \"Loan Amount\", \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\ndatediff(curdate(), l.submittedon_date) \"Days Pending Approval\", \r\npurp.code_value as \"Loan Purpose\",\r\nlo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 100 /*Submitted and awaiting approval */\r\norder by ounder.hierarchy, l.submittedon_date, l.account_no', + 'Individual Client Report', 1, 1), + (11, 'Active Loans - Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. loans_in_arrears_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(if(laa.loan_id is not null, l.id, null) )) as loans_in_arrears_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(laa.principal_overdue_derived) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(laa.interest_overdue_derived) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(laa.fee_charges_overdue_derived) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(laa.penalty_charges_overdue_derived) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', + NULL, 1, 1), (12, 'Active Loans - Details', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\npenalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), + (13, 'Obligation Met Loans Details', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client\",\r\nl.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.total_repayment_derived as \"Total Repaid\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", \r\ndate(l.closedon_date) as \"Closed\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), (14, 'Obligation Met Loans Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\ncount(distinct(c.id)) as \"No. of Clients\",\r\ncount(distinct(l.id)) as \"No. of Loans\",\r\nsum(l.principal_amount) as \"Total Loan Amount\", \r\nsum(l.principal_repaid_derived) as \"Total Principal Repaid\",\r\nsum(l.interest_repaid_derived) as \"Total Interest Repaid\",\r\nsum(l.fee_charges_repaid_derived) as \"Total Fees Repaid\",\r\nsum(l.penalty_charges_repaid_derived) as \"Total Penalties Repaid\",\r\nsum(l.interest_waived_derived) as \"Total Interest Waived\",\r\nsum(l.fee_charges_waived_derived) as \"Total Fees Waived\",\r\nsum(l.penalty_charges_waived_derived) as \"Total Penalties Waived\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by ounder.hierarchy, l.currency_code\r\norder by ounder.hierarchy, l.currency_code', + 'Individual Client \n\nReport', 1, 1), + (15, 'Portfolio at Risk', 'Table', NULL, 'Loan', + 'select x.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from \r\n(select ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.currency_code\r\norder by l.currency_code) x', + 'Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', + 1, 1), (16, 'Portfolio at Risk by Branch', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\",\r\nx.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as \"branch\", ifnull(cur.display_symbol, l.currency_code) as Currency, \r\n\r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', + 'Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', + 1, 1), (20, 'Funds Disbursed Between Dates Summary', 'Table', NULL, 'Fund', + 'select ifnull(f.`name`, \' -\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nround(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office ounder \r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere disbursedon_date between \' ${startDate}\' and \'${endDate}\'\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\ngroup by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)\r\norder by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)', + NULL, 1, 1), (21, 'Funds Disbursed Between Dates Summary by Office', 'Table', NULL, 'Fund', + 'select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n \n\nifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office o\r\n\n\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c \n\non c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\n\n\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand o.id = ${officeId}\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand \n\n(l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\ngroup by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, \n\nl.currency_code)\r\norder by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)', + NULL, 1, 1), + (48, 'Balance Sheet', 'Pentaho', NULL, 'Accounting', NULL, 'Balance Sheet', 1, 1), + (49, 'Income Statement', 'Pentaho', NULL, 'Accounting', NULL, 'Profit and Loss Statement', 1, 1), + (50, 'Trial Balance', 'Pentaho', NULL, 'Accounting', NULL, 'Trial Balance Report', 1, 1), + (51, 'Written-Off Loans', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Written-Off Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Written-Off Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Written-Off Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Written-Off Penalties\',\r\nn.note AS \'Reason For Write-Off\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 6 /*write-off */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=601\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\") \r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', + 'Individual Lending Report. Written Off Loans', 1, 1), (52, 'Aging Detail', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nmc.account_no as \"Client Account No.\",\r\n mc.display_name AS \"Client Name\",\r\n ml.account_no AS \"Account Number\",\r\n ml.principal_amount AS \"Loan Amount\",\r\n ml.principal_disbursed_derived AS \"Original Principal\",\r\n ml.interest_charged_derived AS \"Original Interest\",\r\n ml.principal_repaid_derived AS \"Principal Paid\",\r\n ml.interest_repaid_derived AS \"Interest Paid\",\r\n laa.principal_overdue_derived AS \"Principal Overdue\",\r\n laa.interest_overdue_derived AS \"Interest Overdue\",\r\nDATEDIFF(CURDATE(), laa.overdue_since_date_derived) as \"Days in Arrears\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<7, \'<1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<8, \' 1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<22, \' 3\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<29, \' 4\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<36, \' 5\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<43, \' 6\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<50, \' 7\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<57, \' 8\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<64, \' 9\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<85, \'12\', \'12+\')))))))))))) )AS \"Weeks In Arrears Band\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<361, \'180 - 360\', \r\n \'> 360\'))))) AS \"Days in Arrears Band\"\r\n\r\n FROM m_office mo \r\n JOIN m_office ounder ON ounder.hierarchy like concat(mo.hierarchy, \'%\')\r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n INNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id\r\n INNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\n left join m_currency cur on cur.code = ml.currency_code\r\n WHERE ml.loan_status_id=300\r\n AND mo.id=${officeId}\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', + 'Loan arrears aging (Weeks)', 1, 1), + (53, 'Aging Summary (Arrears in Weeks)', 'Table', NULL, 'Loan', + 'SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Weeks In Arrears (Up To)\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'1\',2 UNION\r\n SELECT \'2\',3 UNION\r\n SELECT \'3\',4 UNION\r\n SELECT \'4\',5 UNION\r\n SELECT \'5\',6 UNION\r\n SELECT \'6\',7 UNION\r\n SELECT \'7\',8 UNION\r\n SELECT \'8\',9 UNION\r\n SELECT \'9\',10 UNION\r\n SELECT \'10\',11 UNION\r\n SELECT \'11\',12 UNION\r\n SELECT \'12\',13 UNION\r\n SELECT \'12+\',14) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<8, \'1\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<22, \'3\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<29, \'4\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<36, \'5\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<43, \'6\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<50, \'7\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<57, \'8\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<64, \'9\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<85, \'12\',\r\n \'12+\'))))))))))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid', + 'Loan amount in arrears by branch', 1, 1), (54, 'Rescheduled Loans', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Rescheduled Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Rescheduled Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Rescheduled Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Rescheduled Penalties\',\r\nn.note AS \'Reason For Rescheduling\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 7 /*marked for rescheduling */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=602\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', + 'Individual Lending Report. Rescheduled Loans. The ability to reschedule (or mark that you have rescheduled the loan elsewhere) is a legacy of the older Mifos product. Needed for migration.', + 1, 1), + (55, 'Active Loans Passed Final Maturity', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), + (56, 'Active Loans Passed Final Maturity Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', + NULL, 1, 1), (57, 'Active Loans in last installment', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(lastInstallment.`hierarchy`) - LENGTH(REPLACE(lastInstallment.`hierarchy`, \'.\', \'\')) - 1))), lastInstallment.branch) as \"Office/Branch\",\r\nlastInstallment.Currency,\r\nlastInstallment.`Loan Officer`, \r\nlastInstallment.`Client Account No`, lastInstallment.`Client`, \r\nlastInstallment.`Loan Account No`, lastInstallment.`Product`, \r\nlastInstallment.`Fund`, lastInstallment.`Loan Amount`, \r\nlastInstallment.`Annual Nominal Interest Rate`, \r\nlastInstallment.`Disbursed`, lastInstallment.`Expected Matured On` ,\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\norder by lastInstallment.hierarchy, lastInstallment.Currency, lastInstallment.`Client Account No`, lastInstallment.`Loan Account No`', + 'Individual Client \n\nReport', 1, 1), + (58, 'Active Loans in last installment Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select lastInstallment.branchId as branchId,\r\nlastInstallment.Currency,\r\ncount(distinct(lastInstallment.clientId)) as client_count, \r\ncount(distinct(lastInstallment.loanId)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id as branchId, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.id as clientId, c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\ngroup by lastInstallment.branchId) x on x.branchId = mo.id\r\norder by mo.hierarchy, x.Currency', + 'Individual Client \n\nReport', 1, 1), (59, 'Active Loans by Disbursal Period', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No\", c.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Principal Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\n\r\nl.total_expected_repayment_derived as \"Total Loan (P+I+F+Pen)\",\r\nl.total_repayment_derived as \"Total Repaid (P+I+F+Pen)\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), + (61, 'Aging Summary (Arrears in Months)', 'Table', NULL, 'Loan', + 'SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Days In Arrears\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'0 - 30\',2 UNION\r\n SELECT \'30 - 60\',3 UNION\r\n SELECT \'60 - 90\',4 UNION\r\n SELECT \'90 - 180\',5 UNION\r\n SELECT \'180 - 360\',6 UNION\r\n SELECT \'> 360\',7 ) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<361, \'180 - 360\', \r\n \'> 360\')))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid', + 'Loan amount in arrears by branch', 1, 1), + (91, 'Loan Account Schedule', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 0), + (92, 'Branch Expected Cash Flow', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 1), + (93, 'Expected Payments By Date - Basic', 'Table', NULL, 'Loan', + 'SELECT \r\n ounder.name \'Office\', \r\n IFNULL(ms.display_name,\'-\') \'Loan Officer\',\r\n mc.account_no \'Client Account Number\',\r\n mc.display_name \'Name\',\r\n mp.name \'Product\',\r\n ml.account_no \'Loan Account Number\',\r\n mr.duedate \'Due Date\',\r\n mr.installment \'Installment\',\r\n cu.display_symbol \'Currency\',\r\n mr.principal_amount- IFNULL(mr.principal_completed_derived,0) \'Principal Due\',\r\n mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0) \'Interest Due\', \r\n IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0) \'Fees Due\', \r\n IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0) \'Penalty Due\',\r\n (mr.principal_amount- IFNULL(mr.principal_completed_derived,0)) +\r\n (mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0)) + \r\n (IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0)) + \r\n (IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0)) \'Total Due\', \r\n mlaa.total_overdue_derived \'Total Overdue\'\r\n \r\n FROM m_office mo\r\n JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\n \r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n \r\n LEFT JOIN m_client mc ON mc.office_id=ounder.id\r\n LEFT JOIN m_loan ml ON ml.client_id=mc.id AND ml.loan_status_id=300\r\n LEFT JOIN m_loan_arrears_aging mlaa ON mlaa.loan_id=ml.id\r\n LEFT JOIN m_loan_repayment_schedule mr ON mr.loan_id=ml.id AND mr.completed_derived=0\r\n LEFT JOIN m_product_loan mp ON mp.id=ml.product_id\r\n LEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\n LEFT JOIN m_currency cu ON cu.code=ml.currency_code\r\n WHERE mo.id=${officeId}\r\n AND (IFNULL(ml.loan_officer_id, -10) = \"${loanOfficerId}\" OR \"-1\" = \"${loanOfficerId}\")\r\n AND mr.duedate BETWEEN \'${startDate}\' AND \'${endDate}\'\r\n ORDER BY ounder.id,mr.duedate,ml.account_no', + 'Test', 1, 1), (94, 'Expected Payments By Date - Formatted', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 1); /*!40000 ALTER TABLE `stretchy_report` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `stretchy_report_parameter` @@ -1839,12 +2401,13 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `stretchy_report_parameter`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `stretchy_report_parameter` ( - `report_id` INT NOT NULL, - `parameter_id` INT NOT NULL, - `report_parameter_name` varchar(45) DEFAULT NULL, - PRIMARY KEY (`report_id`,`parameter_id`), - UNIQUE KEY `report_id_name_UNIQUE` (`report_id`,`report_parameter_name`) +CREATE TABLE `stretchy_report_parameter` +( + `report_id` INT NOT NULL, + `parameter_id` INT NOT NULL, + `report_parameter_name` varchar(45) DEFAULT NULL, + PRIMARY KEY (`report_id`, `parameter_id`), + UNIQUE KEY `report_id_name_UNIQUE` (`report_id`,`report_parameter_name`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1852,11 +2415,165 @@ CREATE TABLE `stretchy_report_parameter` ( -- Dumping data for table `stretchy_report_parameter` -- -LOCK TABLES `stretchy_report_parameter` WRITE; +LOCK +TABLES `stretchy_report_parameter` WRITE; /*!40000 ALTER TABLE `stretchy_report_parameter` DISABLE KEYS */; -INSERT INTO `stretchy_report_parameter` VALUES (1,5,NULL),(2,5,NULL),(2,6,NULL),(2,10,NULL),(2,20,NULL),(2,25,NULL),(2,26,NULL),(5,5,NULL),(5,6,NULL),(5,10,NULL),(5,20,NULL),(5,25,NULL),(5,26,NULL),(6,5,NULL),(6,6,NULL),(6,10,NULL),(6,20,NULL),(6,25,NULL),(6,26,NULL),(7,5,NULL),(7,6,NULL),(7,10,NULL),(7,20,NULL),(7,25,NULL),(7,26,NULL),(8,5,NULL),(8,6,NULL),(8,10,NULL),(8,25,NULL),(8,26,NULL),(11,5,NULL),(11,6,NULL),(11,10,NULL),(11,20,NULL),(11,25,NULL),(11,26,NULL),(11,100,NULL),(12,5,NULL),(12,6,NULL),(12,10,NULL),(12,20,NULL),(12,25,NULL),(12,26,NULL),(13,1,NULL),(13,2,NULL),(13,3,NULL),(13,5,NULL),(13,6,NULL),(13,10,NULL),(13,20,NULL),(13,25,NULL),(13,26,NULL),(14,1,NULL),(14,2,NULL),(14,3,NULL),(14,5,NULL),(14,6,NULL),(14,10,NULL),(14,20,NULL),(14,25,NULL),(14,26,NULL),(15,5,NULL),(15,6,NULL),(15,10,NULL),(15,20,NULL),(15,25,NULL),(15,26,NULL),(15,100,NULL),(16,5,NULL),(16,6,NULL),(16,10,NULL),(16,20,NULL),(16,25,NULL),(16,26,NULL),(16,100,NULL),(20,1,NULL),(20,2,NULL),(20,10,NULL),(20,20,NULL),(21,1,NULL),(21,2,NULL),(21,5,NULL),(21,10,NULL),(21,20,NULL),(48,5,'branch'),(48,2,'date'),(49,5,'branch'),(49,1,'fromDate'),(49,2,'toDate'),(50,5,'branch'),(50,1,'fromDate'),(50,2,'toDate'),(51,1,NULL),(51,2,NULL),(51,5,NULL),(51,10,NULL),(51,25,NULL),(52,5,NULL),(53,5,NULL),(53,10,NULL),(54,1,NULL),(54,2,NULL),(54,5,NULL),(54,10,NULL),(54,25,NULL),(55,5,NULL),(55,6,NULL),(55,10,NULL),(55,20,NULL),(55,25,NULL),(55,26,NULL),(56,5,NULL),(56,6,NULL),(56,10,NULL),(56,20,NULL),(56,25,NULL),(56,26,NULL),(56,100,NULL),(57,5,NULL),(57,6,NULL),(57,10,NULL),(57,20,NULL),(57,25,NULL),(57,26,NULL),(58,5,NULL),(58,6,NULL),(58,10,NULL),(58,20,NULL),(58,25,NULL),(58,26,NULL),(58,100,NULL),(59,1,NULL),(59,2,NULL),(59,5,NULL),(59,6,NULL),(59,10,NULL),(59,20,NULL),(59,25,NULL),(59,26,NULL),(61,5,NULL),(61,10,NULL),(92,1,'fromDate'),(92,5,'selectOffice'),(92,2,'toDate'),(93,1,NULL),(93,2,NULL),(93,5,NULL),(93,6,NULL),(94,2,'endDate'),(94,6,'loanOfficerId'),(94,5,'officeId'),(94,1,'startDate'); +INSERT INTO `stretchy_report_parameter` +VALUES (1, 5, NULL), + (2, 5, NULL), + (2, 6, NULL), + (2, 10, NULL), + (2, 20, NULL), + (2, 25, NULL), + (2, 26, NULL), + (5, 5, NULL), + (5, 6, NULL), + (5, 10, NULL), + (5, 20, NULL), + (5, 25, NULL), + (5, 26, NULL), + (6, 5, NULL), + (6, 6, NULL), + (6, 10, NULL), + (6, 20, NULL), + (6, 25, NULL), + (6, 26, NULL), + (7, 5, NULL), + (7, 6, NULL), + (7, 10, NULL), + (7, 20, NULL), + (7, 25, NULL), + (7, 26, NULL), + (8, 5, NULL), + (8, 6, NULL), + (8, 10, NULL), + (8, 25, NULL), + (8, 26, NULL), + (11, 5, NULL), + (11, 6, NULL), + (11, 10, NULL), + (11, 20, NULL), + (11, 25, NULL), + (11, 26, NULL), + (11, 100, NULL), + (12, 5, NULL), + (12, 6, NULL), + (12, 10, NULL), + (12, 20, NULL), + (12, 25, NULL), + (12, 26, NULL), + (13, 1, NULL), + (13, 2, NULL), + (13, 3, NULL), + (13, 5, NULL), + (13, 6, NULL), + (13, 10, NULL), + (13, 20, NULL), + (13, 25, NULL), + (13, 26, NULL), + (14, 1, NULL), + (14, 2, NULL), + (14, 3, NULL), + (14, 5, NULL), + (14, 6, NULL), + (14, 10, NULL), + (14, 20, NULL), + (14, 25, NULL), + (14, 26, NULL), + (15, 5, NULL), + (15, 6, NULL), + (15, 10, NULL), + (15, 20, NULL), + (15, 25, NULL), + (15, 26, NULL), + (15, 100, NULL), + (16, 5, NULL), + (16, 6, NULL), + (16, 10, NULL), + (16, 20, NULL), + (16, 25, NULL), + (16, 26, NULL), + (16, 100, NULL), + (20, 1, NULL), + (20, 2, NULL), + (20, 10, NULL), + (20, 20, NULL), + (21, 1, NULL), + (21, 2, NULL), + (21, 5, NULL), + (21, 10, NULL), + (21, 20, NULL), + (48, 5, 'branch'), + (48, 2, 'date'), + (49, 5, 'branch'), + (49, 1, 'fromDate'), + (49, 2, 'toDate'), + (50, 5, 'branch'), + (50, 1, 'fromDate'), + (50, 2, 'toDate'), + (51, 1, NULL), + (51, 2, NULL), + (51, 5, NULL), + (51, 10, NULL), + (51, 25, NULL), + (52, 5, NULL), + (53, 5, NULL), + (53, 10, NULL), + (54, 1, NULL), + (54, 2, NULL), + (54, 5, NULL), + (54, 10, NULL), + (54, 25, NULL), + (55, 5, NULL), + (55, 6, NULL), + (55, 10, NULL), + (55, 20, NULL), + (55, 25, NULL), + (55, 26, NULL), + (56, 5, NULL), + (56, 6, NULL), + (56, 10, NULL), + (56, 20, NULL), + (56, 25, NULL), + (56, 26, NULL), + (56, 100, NULL), + (57, 5, NULL), + (57, 6, NULL), + (57, 10, NULL), + (57, 20, NULL), + (57, 25, NULL), + (57, 26, NULL), + (58, 5, NULL), + (58, 6, NULL), + (58, 10, NULL), + (58, 20, NULL), + (58, 25, NULL), + (58, 26, NULL), + (58, 100, NULL), + (59, 1, NULL), + (59, 2, NULL), + (59, 5, NULL), + (59, 6, NULL), + (59, 10, NULL), + (59, 20, NULL), + (59, 25, NULL), + (59, 26, NULL), + (61, 5, NULL), + (61, 10, NULL), + (92, 1, 'fromDate'), + (92, 5, 'selectOffice'), + (92, 2, 'toDate'), + (93, 1, NULL), + (93, 2, NULL), + (93, 5, NULL), + (93, 6, NULL), + (94, 2, 'endDate'), + (94, 6, 'loanOfficerId'), + (94, 5, 'officeId'), + (94, 1, 'startDate'); /*!40000 ALTER TABLE `stretchy_report_parameter` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `x_registered_table` @@ -1865,10 +2582,11 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `x_registered_table`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `x_registered_table` ( - `registered_table_name` varchar(50) NOT NULL, - `application_table_name` varchar(50) NOT NULL, - PRIMARY KEY (`registered_table_name`) +CREATE TABLE `x_registered_table` +( + `registered_table_name` varchar(50) NOT NULL, + `application_table_name` varchar(50) NOT NULL, + PRIMARY KEY (`registered_table_name`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1876,11 +2594,16 @@ CREATE TABLE `x_registered_table` ( -- Dumping data for table `x_registered_table` -- -LOCK TABLES `x_registered_table` WRITE; +LOCK +TABLES `x_registered_table` WRITE; /*!40000 ALTER TABLE `x_registered_table` DISABLE KEYS */; -INSERT INTO `x_registered_table` VALUES ('client additional data','m_client'),('impact measurement','m_loan'),('loan additional data','m_loan'); +INSERT INTO `x_registered_table` +VALUES ('client additional data', 'm_client'), + ('impact measurement', 'm_loan'), + ('loan additional data', 'm_loan'); /*!40000 ALTER TABLE `x_registered_table` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; diff --git a/fineract-db/multi-tenant-demo-backups/ceda/ceda-schema-customisations.sql b/fineract-db/multi-tenant-demo-backups/ceda/ceda-schema-customisations.sql index 324897f2189..5089e0b60bd 100644 --- a/fineract-db/multi-tenant-demo-backups/ceda/ceda-schema-customisations.sql +++ b/fineract-db/multi-tenant-demo-backups/ceda/ceda-schema-customisations.sql @@ -18,228 +18,229 @@ -- INSERT INTO `m_code` (`code_name`, `is_system_defined`) -VALUES -('FieldOfEmployment', '0'), -('EducationLevel', '0'), -('MaritalStatus', '0'), -('PovertyStatus', '0'); +VALUES ('FieldOfEmployment', '0'), + ('EducationLevel', '0'), + ('MaritalStatus', '0'), + ('PovertyStatus', '0'); -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.Banker', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "FieldOfEmployment"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.SoftwareDeveloper', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "FieldOfEmployment"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.University', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "EducationLevel"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.Secondary', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "EducationLevel"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.Primary', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "EducationLevel"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.Married', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "MaritalStatus"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.Single', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "MaritalStatus"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.Divorced', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "MaritalStatus"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.Widow', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "MaritalStatus"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.PovertyStatus.Band1', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "PovertyStatus"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.PovertyStatus.Band2', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "PovertyStatus"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.PovertyStatus.Band3', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "PovertyStatus"; -- ======= ADD in loan purspose and collateral values to enable this functionality -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.House', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "LoanCollateral"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.Television', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "LoanCollateral"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.Gold', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "LoanCollateral"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.Agriculture', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "LoanPurpose"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.Manufacturing', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "LoanPurpose"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.HousingImprovement', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "LoanPurpose"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.Male', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "Gender"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.Female', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "Gender"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.Yes', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "YesNo"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.No', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "YesNo"; DROP TABLE IF EXISTS `client additional data`; -CREATE TABLE `client additional data` ( - `client_id` BIGINT NOT NULL, - `Gender_cd` INT NOT NULL, - `Date of Birth` date NOT NULL, - `Home address` text NOT NULL, - `Telephone number` varchar(20) NOT NULL, - `Telephone number (2nd)` varchar(20) NOT NULL, - `Email address` varchar(50) NOT NULL, - `EducationLevel_cd` INT NOT NULL, - `MaritalStatus_cd` INT NOT NULL, - `Number of children` INT NOT NULL, - `Citizenship` varchar(50) NOT NULL, - `PovertyStatus_cd` INT NOT NULL, - `YesNo_cd_Employed` INT NOT NULL, - `FieldOfEmployment_cd_Field of employment` INT DEFAULT NULL, - `Employer name` varchar(50) DEFAULT NULL, - `Number of years` INT DEFAULT NULL, - `Monthly salary` decimal(19,6) DEFAULT NULL, - `YesNo_cd_Self employed` INT NOT NULL, - `FieldOfEmployment_cd_Field of self-employment` INT DEFAULT NULL, - `Business address` text, - `Number of employees` INT DEFAULT NULL, - `Monthly salaries paid` decimal(19,6) DEFAULT NULL, - `Monthly net income of business activity` decimal(19,6) DEFAULT NULL, - `Monthly rent` decimal(19,6) DEFAULT NULL, - `Other income generating activities` varchar(100) DEFAULT NULL, - `YesNo_cd_Bookkeeping` INT DEFAULT NULL, - `YesNo_cd_Loans with other institutions` INT NOT NULL, - `From whom` varchar(100) DEFAULT NULL, - `Amount` decimal(19,6) DEFAULT NULL, - `Interest rate pa` decimal(19,6) DEFAULT NULL, - `Number of people depending on overal income` INT NOT NULL, - `YesNo_cd_Bank account` INT NOT NULL, - `YesNo_cd_Business plan provided` INT NOT NULL, - `YesNo_cd_Access to internet` INT DEFAULT NULL, - `Introduced by` varchar(100) DEFAULT NULL, - `Known to introducer since` varchar(100) NOT NULL, - `Last visited by` varchar(100) DEFAULT NULL, - `Last visited on` date NOT NULL, - PRIMARY KEY (`client_id`), - CONSTRAINT `FK_client_additional_data` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `client additional data` +( + `client_id` BIGINT NOT NULL, + `Gender_cd` INT NOT NULL, + `Date of Birth` date NOT NULL, + `Home address` text NOT NULL, + `Telephone number` varchar(20) NOT NULL, + `Telephone number (2nd)` varchar(20) NOT NULL, + `Email address` varchar(50) NOT NULL, + `EducationLevel_cd` INT NOT NULL, + `MaritalStatus_cd` INT NOT NULL, + `Number of children` INT NOT NULL, + `Citizenship` varchar(50) NOT NULL, + `PovertyStatus_cd` INT NOT NULL, + `YesNo_cd_Employed` INT NOT NULL, + `FieldOfEmployment_cd_Field of employment` INT DEFAULT NULL, + `Employer name` varchar(50) DEFAULT NULL, + `Number of years` INT DEFAULT NULL, + `Monthly salary` decimal(19, 6) DEFAULT NULL, + `YesNo_cd_Self employed` INT NOT NULL, + `FieldOfEmployment_cd_Field of self-employment` INT DEFAULT NULL, + `Business address` text, + `Number of employees` INT DEFAULT NULL, + `Monthly salaries paid` decimal(19, 6) DEFAULT NULL, + `Monthly net income of business activity` decimal(19, 6) DEFAULT NULL, + `Monthly rent` decimal(19, 6) DEFAULT NULL, + `Other income generating activities` varchar(100) DEFAULT NULL, + `YesNo_cd_Bookkeeping` INT DEFAULT NULL, + `YesNo_cd_Loans with other institutions` INT NOT NULL, + `From whom` varchar(100) DEFAULT NULL, + `Amount` decimal(19, 6) DEFAULT NULL, + `Interest rate pa` decimal(19, 6) DEFAULT NULL, + `Number of people depending on overal income` INT NOT NULL, + `YesNo_cd_Bank account` INT NOT NULL, + `YesNo_cd_Business plan provided` INT NOT NULL, + `YesNo_cd_Access to internet` INT DEFAULT NULL, + `Introduced by` varchar(100) DEFAULT NULL, + `Known to introducer since` varchar(100) NOT NULL, + `Last visited by` varchar(100) DEFAULT NULL, + `Last visited on` date NOT NULL, + PRIMARY KEY (`client_id`), + CONSTRAINT `FK_client_additional_data` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; DROP TABLE IF EXISTS `impact measurement`; -CREATE TABLE `impact measurement` ( - `loan_id` BIGINT NOT NULL, - `YesNo_cd_RepaidOnSchedule` INT NOT NULL, - `ReasonNotRepaidOnSchedule` text DEFAULT NULL, - `How was Loan Amount Invested` text NOT NULL, - `Additional Income Generated` decimal(19,6) NOT NULL, - `Additional Income Used For` text NOT NULL, - `YesNo_cd_NewJobsCreated` INT NOT NULL, - `Number of Jobs Created` BIGINT DEFAULT NULL, - PRIMARY KEY (`loan_id`), - CONSTRAINT `FK_impact measurement` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +CREATE TABLE `impact measurement` +( + `loan_id` BIGINT NOT NULL, + `YesNo_cd_RepaidOnSchedule` INT NOT NULL, + `ReasonNotRepaidOnSchedule` text DEFAULT NULL, + `How was Loan Amount Invested` text NOT NULL, + `Additional Income Generated` decimal(19, 6) NOT NULL, + `Additional Income Used For` text NOT NULL, + `YesNo_cd_NewJobsCreated` INT NOT NULL, + `Number of Jobs Created` BIGINT DEFAULT NULL, + PRIMARY KEY (`loan_id`), + CONSTRAINT `FK_impact measurement` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; DROP TABLE IF EXISTS `loan additional data`; -CREATE TABLE `loan additional data` ( - `loan_id` BIGINT NOT NULL, - `PurposeOfLoan_cd` INT NOT NULL, - `CollateralType_cd` INT NOT NULL, - `Collateral notes` text NOT NULL, - `YesNo_cd_Guarantor` INT NOT NULL, - `Guarantor name` varchar(100) DEFAULT NULL, - `Guarantor relation` varchar(100) DEFAULT NULL, - `Guarantor address` varchar(100) DEFAULT NULL, - `Guarantor telephone number` varchar(20) DEFAULT NULL, - PRIMARY KEY (`loan_id`), - CONSTRAINT `FK_loan_additional_data` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +CREATE TABLE `loan additional data` +( + `loan_id` BIGINT NOT NULL, + `PurposeOfLoan_cd` INT NOT NULL, + `CollateralType_cd` INT NOT NULL, + `Collateral notes` text NOT NULL, + `YesNo_cd_Guarantor` INT NOT NULL, + `Guarantor name` varchar(100) DEFAULT NULL, + `Guarantor relation` varchar(100) DEFAULT NULL, + `Guarantor address` varchar(100) DEFAULT NULL, + `Guarantor telephone number` varchar(20) DEFAULT NULL, + PRIMARY KEY (`loan_id`), + CONSTRAINT `FK_loan_additional_data` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- datatables mapping INSERT INTO `x_registered_table` (`registered_table_name`, -`application_table_name`) -VALUES -('client additional data', 'm_client'), -('impact measurement', 'm_loan'), -('loan additional data', 'm_loan'); + `application_table_name`) +VALUES ('client additional data', 'm_client'), + ('impact measurement', 'm_loan'), + ('loan additional data', 'm_loan'); -- make sure permissions created for registered datatables /* add a create, read, update and delete permission for each registered datatable */ @@ -262,100 +263,101 @@ from x_registered_table r; -- ==== Chart of Accounts ===== truncate `acc_gl_account`; -INSERT INTO `acc_gl_account` VALUES -(1,'Petty Cash Balances',NULL,'11100',0,1,2,1,NULL), -(2,'Cash in Valut 1',NULL,'11101',0,1,1,1,NULL), -(3,'Bank Balances',NULL,'11200',0,1,2,1,NULL), -(4,'Centenary Opening Account',NULL,'11201',0,1,1,1,NULL), -(5,'Centenary Expense Account',NULL,'11202',0,1,1,1,NULL), -(6,'Centenary USD Account',NULL,'11203',0,1,1,1,NULL), -(7,'Loans and Advances',NULL,'13100',0,1,2,1,NULL), -(8,'Loans to Clients',NULL,'13101',0,1,1,1,NULL), -(9,'Outstanding Interest',NULL,'13102',0,1,1,1,NULL), -(10,'Outstanding Late Payment Interest',NULL,'13103',0,1,1,1,NULL), -(11,'Outstanding Bank Fees to be collected',NULL,'13104',0,1,1,1,NULL), -(12,'WriteOff Accounts',NULL,'13200',0,1,2,1,NULL), -(13,'Write-offs (use for funds coming in)',NULL,'13201',0,1,1,1,NULL), -(14,'Write-offs outstanding principal',NULL,'13202',0,1,1,1,NULL), -(15,'Write-offs outstanding interest',NULL,'13203',0,1,1,1,NULL), -(16,'Write-offs collected bank fees',NULL,'13204',0,1,1,1,NULL), -(17,'Write-offs hardware/furniture',NULL,'13205',0,1,1,1,NULL), -(18,'Fixed Assets',NULL,'14100',0,1,2,1,NULL), -(19,'Office Equipment',NULL,'14101',0,1,1,1,NULL), -(20,'Suspense Items (unidentified deposits)',NULL,'15000',0,1,2,1,NULL), -(21,'Assets',NULL,'10000',0,1,2,1,NULL), -(22,'Liabilities',NULL,'20000',0,1,2,2,NULL), -(23,'Shares Account',NULL,'26100',0,1,2,2,NULL), -(24,'Shares Captial',NULL,'26101',0,1,1,2,NULL), -(25,'Donated Equity',NULL,'26300',0,1,2,2,NULL), -(26,'Donated Equity Ameropa Foundation',NULL,'26301',0,1,1,2,NULL), -(27,'Donated Equity e.h',NULL,'26302',0,1,1,2,NULL), -(28,'Overpaid Amounts',NULL,'27000',0,1,2,2,NULL), -(29,'Loss Provision',NULL,'28000',0,1,2,2,NULL), -(30,'Provision Outstanding Principal',NULL,'28001',0,1,1,2,NULL), -(31,'Provision Oustanding Interest',NULL,'28002',0,1,1,2,NULL),(32,'Income',NULL,'30000',0,1,2,4,NULL), -(33,'Interest Income from Loans',NULL,'31100',0,1,2,4,NULL), -(34,'Interest on Loans',NULL,'31101',0,1,1,4,NULL), -(35,'Late Payment Interest',NULL,'31102',0,1,1,4,NULL), -(36,'Income from Micro credit & Lending Activities',NULL,'31300',0,1,2,4,NULL), -(37,'Collected Bank Fees Receivable',NULL,'6201',0,1,1,4,NULL), -(38,'Deposits from Loans Write Off',NULL,'31400',0,1,2,4,NULL), -(39,'Expenditure',NULL,'40000',0,1,2,5,NULL), -(40,'Office Expenditure Account',NULL,'42100',0,1,2,5,NULL), -(41,'Water Charges',NULL,'42102',0,1,1,5,NULL), -(42,'Electricity Charges',NULL,'42103',0,1,1,5,NULL), -(43,'Printing and Stationary',NULL,'42105',0,1,1,5,NULL), -(44,'Office Rent',NULL,'42107',0,1,1,5,NULL), -(45,'Marketing Expense',NULL,'42109',0,1,1,5,NULL), -(46,'Office utilities',NULL,'42112',0,1,1,5,'(supplies, toiletries, kitchen)'), -(47,'Furniture',NULL,'42113',0,1,1,5,NULL), -(48,'CEDA Meeting Expense',NULL,'42114',0,1,1,5,NULL), -(49,'Employee Personal Expsense Account',NULL,'42200',0,1,2,5,NULL), -(50,'Salary Alice',NULL,'42201',0,1,1,5,NULL), -(51,'Salary Irene',NULL,'42202',0,1,1,5,NULL), -(52,'Salary Richard',NULL,'42203',0,1,1,5,NULL), -(53,'Salary Loan Officer TBA',NULL,'42204',0,1,1,5,NULL), -(54,'Medical Insurance Alice & Family',NULL,'42205',0,1,1,5,NULL), -(55,'Medical Insurance Irene',NULL,'42206',0,1,1,5,NULL), -(56,'Medical Insurance Richard',NULL,'42207',0,1,1,5,NULL), -(57,'Medical Insurance Loan Officer TBA',NULL,'42208',0,1,1,5,NULL), -(58,'PAYE all employees',NULL,'42209',0,1,1,5,NULL), -(59,'NSSF all employees',NULL,'42210',0,1,1,5,NULL), -(60,'Lunch Allowances all employees',NULL,'42211',0,1,1,5,NULL), -(61,'IT software and maintenance',NULL,'42300',0,1,2,5,NULL), -(62,'Mifos maintenance contract 12 months',NULL,'42301',0,1,1,5,NULL), -(63,'VPS Contract 12 months',NULL,'42302',0,1,1,5,NULL), -(64,'Bulk SMS Service',NULL,'42303',0,1,1,5,NULL), -(65,'Support Accounting Software',NULL,'42304',0,1,1,5,NULL), -(66,'Mifos Instance Setup',NULL,'42305',0,1,1,5,NULL), -(67,'Misc support expense',NULL,'42306',0,1,1,5,NULL), -(68,'Warid Mobile Line',NULL,'42307',0,1,1,5,NULL), -(69,'Landline',NULL,'42308',0,1,1,5,NULL), -(70,'Modem Alice',NULL,'42309',0,1,1,5,NULL), -(71,'Modem Irene',NULL,'42310',0,1,1,5,NULL), -(72,'Modem Richard',NULL,'42311',0,1,1,5,NULL), -(73,'Repairs',NULL,'42312',0,1,1,5,NULL), -(74,'Airtime Expenses',NULL,'42400',0,1,2,5,NULL), -(75,'Airtime Alice',NULL,'42401',0,1,1,5,NULL), -(76,'Airtime Richard',NULL,'42402',0,1,1,5,NULL), -(77,'Airtime Loan Office TBA',NULL,'42403',0,1,1,5,NULL), -(78,'Special Airtime Alice',NULL,'42404',0,1,1,5,NULL), -(79,'Transportation',NULL,'42500',0,1,2,5,NULL), -(80,'Flat monthly transportation cost',NULL,'42501',0,1,1,5,NULL), -(81,'Faciliation cost for Richard',NULL,'42502',0,1,1,5,NULL), -(82,'Faciliation cost for Loan Officer TBA',NULL,'42503',0,1,1,5,NULL), -(83,'Consultancy Expenses',NULL,'42600',0,1,2,5,NULL), -(84,'Audit Fees',NULL,'42601',0,1,1,5,NULL), -(85,'Legal Fees',NULL,'42602',0,1,1,5,NULL), -(86,'Miscellaneous Expenses Account',NULL,'42700',0,1,2,5,NULL), -(87,'MFI License',NULL,'42703',0,1,1,5,NULL), -(88,'Sundy Expenses',NULL,'42704',0,1,1,5,NULL), -(89,'Bank Fees',NULL,'42800',0,1,2,5,NULL), -(90,'Bank Charges Operating Account',NULL,'42801',0,1,1,5,NULL), -(91,'Bank Charges Expense Account',NULL,'42802',0,1,1,5,NULL), -(92,'E.H Account',NULL,'42900',0,1,2,5,NULL), -(93,'Airtime',NULL,'42901',0,1,1,5,NULL), -(94,'Modem',NULL,'42902',0,1,1,5,NULL), -(95,'Meals',NULL,'42903',0,1,1,5,NULL), -(96,'Transportation',NULL,'42904',0,1,1,5,NULL), -(97,'Miscellaneous',NULL,'42905',0,1,1,5,NULL); +INSERT INTO `acc_gl_account` +VALUES (1, 'Petty Cash Balances', NULL, '11100', 0, 1, 2, 1, NULL), + (2, 'Cash in Valut 1', NULL, '11101', 0, 1, 1, 1, NULL), + (3, 'Bank Balances', NULL, '11200', 0, 1, 2, 1, NULL), + (4, 'Centenary Opening Account', NULL, '11201', 0, 1, 1, 1, NULL), + (5, 'Centenary Expense Account', NULL, '11202', 0, 1, 1, 1, NULL), + (6, 'Centenary USD Account', NULL, '11203', 0, 1, 1, 1, NULL), + (7, 'Loans and Advances', NULL, '13100', 0, 1, 2, 1, NULL), + (8, 'Loans to Clients', NULL, '13101', 0, 1, 1, 1, NULL), + (9, 'Outstanding Interest', NULL, '13102', 0, 1, 1, 1, NULL), + (10, 'Outstanding Late Payment Interest', NULL, '13103', 0, 1, 1, 1, NULL), + (11, 'Outstanding Bank Fees to be collected', NULL, '13104', 0, 1, 1, 1, NULL), + (12, 'WriteOff Accounts', NULL, '13200', 0, 1, 2, 1, NULL), + (13, 'Write-offs (use for funds coming in)', NULL, '13201', 0, 1, 1, 1, NULL), + (14, 'Write-offs outstanding principal', NULL, '13202', 0, 1, 1, 1, NULL), + (15, 'Write-offs outstanding interest', NULL, '13203', 0, 1, 1, 1, NULL), + (16, 'Write-offs collected bank fees', NULL, '13204', 0, 1, 1, 1, NULL), + (17, 'Write-offs hardware/furniture', NULL, '13205', 0, 1, 1, 1, NULL), + (18, 'Fixed Assets', NULL, '14100', 0, 1, 2, 1, NULL), + (19, 'Office Equipment', NULL, '14101', 0, 1, 1, 1, NULL), + (20, 'Suspense Items (unidentified deposits)', NULL, '15000', 0, 1, 2, 1, NULL), + (21, 'Assets', NULL, '10000', 0, 1, 2, 1, NULL), + (22, 'Liabilities', NULL, '20000', 0, 1, 2, 2, NULL), + (23, 'Shares Account', NULL, '26100', 0, 1, 2, 2, NULL), + (24, 'Shares Captial', NULL, '26101', 0, 1, 1, 2, NULL), + (25, 'Donated Equity', NULL, '26300', 0, 1, 2, 2, NULL), + (26, 'Donated Equity Ameropa Foundation', NULL, '26301', 0, 1, 1, 2, NULL), + (27, 'Donated Equity e.h', NULL, '26302', 0, 1, 1, 2, NULL), + (28, 'Overpaid Amounts', NULL, '27000', 0, 1, 2, 2, NULL), + (29, 'Loss Provision', NULL, '28000', 0, 1, 2, 2, NULL), + (30, 'Provision Outstanding Principal', NULL, '28001', 0, 1, 1, 2, NULL), + (31, 'Provision Oustanding Interest', NULL, '28002', 0, 1, 1, 2, NULL), + (32, 'Income', NULL, '30000', 0, 1, 2, 4, NULL), + (33, 'Interest Income from Loans', NULL, '31100', 0, 1, 2, 4, NULL), + (34, 'Interest on Loans', NULL, '31101', 0, 1, 1, 4, NULL), + (35, 'Late Payment Interest', NULL, '31102', 0, 1, 1, 4, NULL), + (36, 'Income from Micro credit & Lending Activities', NULL, '31300', 0, 1, 2, 4, NULL), + (37, 'Collected Bank Fees Receivable', NULL, '6201', 0, 1, 1, 4, NULL), + (38, 'Deposits from Loans Write Off', NULL, '31400', 0, 1, 2, 4, NULL), + (39, 'Expenditure', NULL, '40000', 0, 1, 2, 5, NULL), + (40, 'Office Expenditure Account', NULL, '42100', 0, 1, 2, 5, NULL), + (41, 'Water Charges', NULL, '42102', 0, 1, 1, 5, NULL), + (42, 'Electricity Charges', NULL, '42103', 0, 1, 1, 5, NULL), + (43, 'Printing and Stationary', NULL, '42105', 0, 1, 1, 5, NULL), + (44, 'Office Rent', NULL, '42107', 0, 1, 1, 5, NULL), + (45, 'Marketing Expense', NULL, '42109', 0, 1, 1, 5, NULL), + (46, 'Office utilities', NULL, '42112', 0, 1, 1, 5, '(supplies, toiletries, kitchen)'), + (47, 'Furniture', NULL, '42113', 0, 1, 1, 5, NULL), + (48, 'CEDA Meeting Expense', NULL, '42114', 0, 1, 1, 5, NULL), + (49, 'Employee Personal Expsense Account', NULL, '42200', 0, 1, 2, 5, NULL), + (50, 'Salary Alice', NULL, '42201', 0, 1, 1, 5, NULL), + (51, 'Salary Irene', NULL, '42202', 0, 1, 1, 5, NULL), + (52, 'Salary Richard', NULL, '42203', 0, 1, 1, 5, NULL), + (53, 'Salary Loan Officer TBA', NULL, '42204', 0, 1, 1, 5, NULL), + (54, 'Medical Insurance Alice & Family', NULL, '42205', 0, 1, 1, 5, NULL), + (55, 'Medical Insurance Irene', NULL, '42206', 0, 1, 1, 5, NULL), + (56, 'Medical Insurance Richard', NULL, '42207', 0, 1, 1, 5, NULL), + (57, 'Medical Insurance Loan Officer TBA', NULL, '42208', 0, 1, 1, 5, NULL), + (58, 'PAYE all employees', NULL, '42209', 0, 1, 1, 5, NULL), + (59, 'NSSF all employees', NULL, '42210', 0, 1, 1, 5, NULL), + (60, 'Lunch Allowances all employees', NULL, '42211', 0, 1, 1, 5, NULL), + (61, 'IT software and maintenance', NULL, '42300', 0, 1, 2, 5, NULL), + (62, 'Mifos maintenance contract 12 months', NULL, '42301', 0, 1, 1, 5, NULL), + (63, 'VPS Contract 12 months', NULL, '42302', 0, 1, 1, 5, NULL), + (64, 'Bulk SMS Service', NULL, '42303', 0, 1, 1, 5, NULL), + (65, 'Support Accounting Software', NULL, '42304', 0, 1, 1, 5, NULL), + (66, 'Mifos Instance Setup', NULL, '42305', 0, 1, 1, 5, NULL), + (67, 'Misc support expense', NULL, '42306', 0, 1, 1, 5, NULL), + (68, 'Warid Mobile Line', NULL, '42307', 0, 1, 1, 5, NULL), + (69, 'Landline', NULL, '42308', 0, 1, 1, 5, NULL), + (70, 'Modem Alice', NULL, '42309', 0, 1, 1, 5, NULL), + (71, 'Modem Irene', NULL, '42310', 0, 1, 1, 5, NULL), + (72, 'Modem Richard', NULL, '42311', 0, 1, 1, 5, NULL), + (73, 'Repairs', NULL, '42312', 0, 1, 1, 5, NULL), + (74, 'Airtime Expenses', NULL, '42400', 0, 1, 2, 5, NULL), + (75, 'Airtime Alice', NULL, '42401', 0, 1, 1, 5, NULL), + (76, 'Airtime Richard', NULL, '42402', 0, 1, 1, 5, NULL), + (77, 'Airtime Loan Office TBA', NULL, '42403', 0, 1, 1, 5, NULL), + (78, 'Special Airtime Alice', NULL, '42404', 0, 1, 1, 5, NULL), + (79, 'Transportation', NULL, '42500', 0, 1, 2, 5, NULL), + (80, 'Flat monthly transportation cost', NULL, '42501', 0, 1, 1, 5, NULL), + (81, 'Faciliation cost for Richard', NULL, '42502', 0, 1, 1, 5, NULL), + (82, 'Faciliation cost for Loan Officer TBA', NULL, '42503', 0, 1, 1, 5, NULL), + (83, 'Consultancy Expenses', NULL, '42600', 0, 1, 2, 5, NULL), + (84, 'Audit Fees', NULL, '42601', 0, 1, 1, 5, NULL), + (85, 'Legal Fees', NULL, '42602', 0, 1, 1, 5, NULL), + (86, 'Miscellaneous Expenses Account', NULL, '42700', 0, 1, 2, 5, NULL), + (87, 'MFI License', NULL, '42703', 0, 1, 1, 5, NULL), + (88, 'Sundy Expenses', NULL, '42704', 0, 1, 1, 5, NULL), + (89, 'Bank Fees', NULL, '42800', 0, 1, 2, 5, NULL), + (90, 'Bank Charges Operating Account', NULL, '42801', 0, 1, 1, 5, NULL), + (91, 'Bank Charges Expense Account', NULL, '42802', 0, 1, 1, 5, NULL), + (92, 'E.H Account', NULL, '42900', 0, 1, 2, 5, NULL), + (93, 'Airtime', NULL, '42901', 0, 1, 1, 5, NULL), + (94, 'Modem', NULL, '42902', 0, 1, 1, 5, NULL), + (95, 'Meals', NULL, '42903', 0, 1, 1, 5, NULL), + (96, 'Transportation', NULL, '42904', 0, 1, 1, 5, NULL), + (97, 'Miscellaneous', NULL, '42905', 0, 1, 1, 5, NULL); diff --git a/fineract-db/multi-tenant-demo-backups/ceda/ceda-user-office-product-setup.sql b/fineract-db/multi-tenant-demo-backups/ceda/ceda-user-office-product-setup.sql index d8cf4a817dc..732f512d66c 100644 --- a/fineract-db/multi-tenant-demo-backups/ceda/ceda-user-office-product-setup.sql +++ b/fineract-db/multi-tenant-demo-backups/ceda/ceda-user-office-product-setup.sql @@ -17,107 +17,110 @@ -- under the License. -- -DELETE FROM `m_organisation_currency` WHERE id>0; + +DELETE +FROM `m_organisation_currency` +WHERE id > 0; INSERT INTO `m_organisation_currency` -( -`code`, -`decimal_places`, -`name`, -`display_symbol`, -`internationalized_name_code`) -VALUES -('UGX', 2, 'Uganda Shilling', 'USh', 'currency.UGX'); +(`code`, + `decimal_places`, + `name`, + `display_symbol`, + `internationalized_name_code`) +VALUES ('UGX', 2, 'Uganda Shilling', 'USh', 'currency.UGX'); -UPDATE `m_appuser` SET `username` = 'admin' WHERE id=1; +UPDATE `m_appuser` +SET `username` = 'admin' +WHERE id = 1; INSERT INTO `m_appuser` (`is_deleted`, -`office_id`, -`username`, -`firstname`, -`lastname`, -`password`, -`email`, -`firsttime_login_remaining`, -`nonexpired`, -`nonlocked`, -`nonexpired_credentials`, -`enabled`) -VALUES -(0, 1, 'keithwoodlock', 'Keith', 'Woodlock', -'4f607e9b6cffbe7d3db92d4bfa3391c7aa751727b4ea29d08fddf9dd72e6e7e3', 'keithwoodlock@gmail.com', 0, 1, 1, 1, 1); + `office_id`, + `username`, + `firstname`, + `lastname`, + `password`, + `email`, + `firsttime_login_remaining`, + `nonexpired`, + `nonlocked`, + `nonexpired_credentials`, + `enabled`) +VALUES (0, 1, 'keithwoodlock', 'Keith', 'Woodlock', + '4f607e9b6cffbe7d3db92d4bfa3391c7aa751727b4ea29d08fddf9dd72e6e7e3', 'keithwoodlock@gmail.com', 0, 1, 1, 1, 1); INSERT INTO `m_appuser_role` -(`appuser_id`,`role_id`) VALUES (2,1); + (`appuser_id`, `role_id`) +VALUES (2, 1); -UPDATE `m_office` SET `name` = 'CEDA Microfinance Ltd.' WHERE id=1; +UPDATE `m_office` +SET `name` = 'CEDA Microfinance Ltd.' +WHERE id = 1; INSERT INTO `m_office` -( -`parent_id`, -`hierarchy`, -`external_id`, -`name`, -`opening_date`) -VALUES -(1, '.2.', 2, 'Uganda (Kampala)', '2009-01-01'); +(`parent_id`, + `hierarchy`, + `external_id`, + `name`, + `opening_date`) +VALUES (1, '.2.', 2, 'Uganda (Kampala)', '2009-01-01'); INSERT INTO `m_staff` -( -`is_loan_officer`, -`office_id`, -`firstname`, -`lastname`, -`display_name`) -VALUES -(1, 1, 'CEDA HO', 'LoanOfficer', 'LoanOfficer, CEDA HO'), -(1, 2, 'Kampala', 'LoanOfficer', 'LoanOfficer, Kampala'); +(`is_loan_officer`, + `office_id`, + `firstname`, + `lastname`, + `display_name`) +VALUES (1, 1, 'CEDA HO', 'LoanOfficer', 'LoanOfficer, CEDA HO'), + (1, 2, 'Kampala', 'LoanOfficer', 'LoanOfficer, Kampala'); INSERT INTO `m_charge` -( -`name`, -`currency_code`, -`charge_applies_to_enum`, -`charge_time_enum`, -`charge_calculation_enum`, -`amount`, -`is_penalty`, -`is_active`, -`is_deleted`) +(`name`, + `currency_code`, + `charge_applies_to_enum`, + `charge_time_enum`, + `charge_calculation_enum`, + `amount`, + `is_penalty`, + `is_active`, + `is_deleted`) VALUES ('Bank Fee (per installment)', 'UGX', 1, 2, 1, 1500.000000, 0, 1, 0); INSERT INTO `m_product_loan` -( -`currency_code`, -`currency_digits`, -`principal_amount`, -`min_principal_amount`, -`max_principal_amount`, -`arrearstolerance_amount`, -`name`, -`description`, -`fund_id`, -`nominal_interest_rate_per_period`, -`interest_period_frequency_enum`, -`annual_nominal_interest_rate`, -`interest_method_enum`, -`interest_calculated_in_period_enum`, -`repay_every`, -`repayment_period_frequency_enum`, -`number_of_repayments`, -`amortization_method_enum`, -`accounting_type`, -`loan_transaction_strategy_id`) -VALUES -('UGX', 2, 1000000.000000, 0, 1000000000000.000000, null , 'Kampala Product (with cash accounting)', -'Typical Kampala loan product with cash accounting enabled for testing.', null , -24.000000, 3, 24.000000, 1, 1, 1, 2, 12, 1, 2, 2); +(`currency_code`, + `currency_digits`, + `principal_amount`, + `min_principal_amount`, + `max_principal_amount`, + `arrearstolerance_amount`, + `name`, + `description`, + `fund_id`, + `nominal_interest_rate_per_period`, + `interest_period_frequency_enum`, + `annual_nominal_interest_rate`, + `interest_method_enum`, + `interest_calculated_in_period_enum`, + `repay_every`, + `repayment_period_frequency_enum`, + `number_of_repayments`, + `amortization_method_enum`, + `accounting_type`, + `loan_transaction_strategy_id`) +VALUES ('UGX', 2, 1000000.000000, 0, 1000000000000.000000, null, 'Kampala Product (with cash accounting)', + 'Typical Kampala loan product with cash accounting enabled for testing.', null, + 24.000000, 3, 24.000000, 1, 1, 1, 2, 12, 1, 2, 2); -- mapping of that loan product to GL Accounts INSERT INTO `acc_product_mapping` -VALUES (1,4,1,1,1),(2,8,1,1,2),(3,34,1,1,3),(4,37,1,1,4),(5,35,1,1,5),(6,97,1,1,6); +VALUES (1, 4, 1, 1, 1), + (2, 8, 1, 1, 2), + (3, 34, 1, 1, 3), + (4, 37, 1, 1, 4), + (5, 35, 1, 1, 5), + (6, 97, 1, 1, 6); diff --git a/fineract-db/multi-tenant-demo-backups/default-demo/README.md b/fineract-db/multi-tenant-demo-backups/default-demo/README.md index 39b7f14a9f2..a508fa20334 100644 --- a/fineract-db/multi-tenant-demo-backups/default-demo/README.md +++ b/fineract-db/multi-tenant-demo-backups/default-demo/README.md @@ -6,10 +6,15 @@ This demo database contains: - DDL of latest schema - Minimum reference data required for deployment of platform which is: - - Its mandatory to have one selected currency so we default to several of latin-america currencies - - Its mandatory to have one root or head office, so we have one created by default called a 'Latam HO' - - Permissions supported/needed by latest release of software are setup - - Its mandatory to have at least one role when creating new users so we have one role created by default called 'Super user' which has the special permission 'Full Authorisation'. Any user with this role can do anything in the system. - - Its required to have at least one application user setup so remaining setup can be done through ui so we have on application user created by default with username 'quipo' with a password of 'quipo'. Application users must be associated with an office and a role so this user is associated with 'Latam HO' and 'Super user' role allowing this user to do any operation in any office(branch). + - Its mandatory to have one selected currency so we default to several of latin-america currencies + - Its mandatory to have one root or head office, so we have one created by default called a 'Latam HO' + - Permissions supported/needed by latest release of software are setup + - Its mandatory to have at least one role when creating new users so we have one role created by default called ' + Super user' which has the special permission 'Full Authorisation'. Any user with this role can do anything in the + system. + - Its required to have at least one application user setup so remaining setup can be done through ui so we have on + application user created by default with username 'quipo' with a password of 'quipo'. Application users must be + associated with an office and a role so this user is associated with 'Latam HO' and 'Super user' role allowing + this user to do any operation in any office(branch). Minimum amount of data to support legacy-docs interaction. diff --git a/fineract-db/multi-tenant-demo-backups/default-demo/bk_mifostenant-default.sql b/fineract-db/multi-tenant-demo-backups/default-demo/bk_mifostenant-default.sql index 63308294c87..a9187fdeefc 100644 --- a/fineract-db/multi-tenant-demo-backups/default-demo/bk_mifostenant-default.sql +++ b/fineract-db/multi-tenant-demo-backups/default-demo/bk_mifostenant-default.sql @@ -41,20 +41,21 @@ DROP TABLE IF EXISTS `acc_gl_account`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_gl_account` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(45) NOT NULL, - `parent_id` BIGINT DEFAULT NULL, - `gl_code` varchar(45) NOT NULL, - `disabled` tinyint NOT NULL DEFAULT '0', - `manual_journal_entries_allowed` tinyint NOT NULL DEFAULT '1', - `account_usage` tinyint NOT NULL DEFAULT '2', - `classification_enum` SMALLINT NOT NULL, - `description` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `acc_gl_code` (`gl_code`), - KEY `FK_ACC_0000000001` (`parent_id`), - CONSTRAINT `FK_ACC_0000000001` FOREIGN KEY (`parent_id`) REFERENCES `acc_gl_account` (`id`) +CREATE TABLE `acc_gl_account` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(45) NOT NULL, + `parent_id` BIGINT DEFAULT NULL, + `gl_code` varchar(45) NOT NULL, + `disabled` tinyint NOT NULL DEFAULT '0', + `manual_journal_entries_allowed` tinyint NOT NULL DEFAULT '1', + `account_usage` tinyint NOT NULL DEFAULT '2', + `classification_enum` SMALLINT NOT NULL, + `description` varchar(500) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `acc_gl_code` (`gl_code`), + KEY `FK_ACC_0000000001` (`parent_id`), + CONSTRAINT `FK_ACC_0000000001` FOREIGN KEY (`parent_id`) REFERENCES `acc_gl_account` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=98 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -62,11 +63,110 @@ CREATE TABLE `acc_gl_account` ( -- Dumping data for table `acc_gl_account` -- -LOCK TABLES `acc_gl_account` WRITE; +LOCK +TABLES `acc_gl_account` WRITE; /*!40000 ALTER TABLE `acc_gl_account` DISABLE KEYS */; -INSERT INTO `acc_gl_account` VALUES (1,'Petty Cash Balances',NULL,'11100',0,1,2,1,NULL),(2,'Cash in Valut 1',NULL,'11101',0,1,1,1,NULL),(3,'Bank Balances',NULL,'11200',0,1,2,1,NULL),(4,'Centenary Opening Account',NULL,'11201',0,1,1,1,NULL),(5,'Centenary Expense Account',NULL,'11202',0,1,1,1,NULL),(6,'Centenary USD Account',NULL,'11203',0,1,1,1,NULL),(7,'Loans and Advances',NULL,'13100',0,1,2,1,NULL),(8,'Loans to Clients',NULL,'13101',0,1,1,1,NULL),(9,'Outstanding Interest',NULL,'13102',0,1,1,1,NULL),(10,'Outstanding Late Payment Interest',NULL,'13103',0,1,1,1,NULL),(11,'Outstanding Bank Fees to be collected',NULL,'13104',0,1,1,1,NULL),(12,'WriteOff Accounts',NULL,'13200',0,1,2,1,NULL),(13,'Write-offs (use for funds coming in)',NULL,'13201',0,1,1,1,NULL),(14,'Write-offs outstanding principal',NULL,'13202',0,1,1,1,NULL),(15,'Write-offs outstanding interest',NULL,'13203',0,1,1,1,NULL),(16,'Write-offs collected bank fees',NULL,'13204',0,1,1,1,NULL),(17,'Write-offs hardware/furniture',NULL,'13205',0,1,1,1,NULL),(18,'Fixed Assets',NULL,'14100',0,1,2,1,NULL),(19,'Office Equipment',NULL,'14101',0,1,1,1,NULL),(20,'Suspense Items (unidentified deposits)',NULL,'15000',0,1,2,1,NULL),(21,'Assets',NULL,'10000',0,1,2,1,NULL),(22,'Liabilities',NULL,'20000',0,1,2,2,NULL),(23,'Shares Account',NULL,'26100',0,1,2,2,NULL),(24,'Shares Captial',NULL,'26101',0,1,1,2,NULL),(25,'Donated Equity',NULL,'26300',0,1,2,2,NULL),(26,'Donated Equity Ameropa Foundation',NULL,'26301',0,1,1,2,NULL),(27,'Donated Equity e.h',NULL,'26302',0,1,1,2,NULL),(28,'Overpaid Amounts',NULL,'27000',0,1,2,2,NULL),(29,'Loss Provision',NULL,'28000',0,1,2,2,NULL),(30,'Provision Outstanding Principal',NULL,'28001',0,1,1,2,NULL),(31,'Provision Oustanding Interest',NULL,'28002',0,1,1,2,NULL),(32,'Income',NULL,'30000',0,1,2,4,NULL),(33,'Interest Income from Loans',NULL,'31100',0,1,2,4,NULL),(34,'Interest on Loans',NULL,'31101',0,1,1,4,NULL),(35,'Late Payment Interest',NULL,'31102',0,1,1,4,NULL),(36,'Income from Micro credit & Lending Activities',NULL,'31300',0,1,2,4,NULL),(37,'Collected Bank Fees Receivable',NULL,'6201',0,1,1,4,NULL),(38,'Deposits from Loans Write Off',NULL,'31400',0,1,2,4,NULL),(39,'Expenditure',NULL,'40000',0,1,2,5,NULL),(40,'Office Expenditure Account',NULL,'42100',0,1,2,5,NULL),(41,'Water Charges',NULL,'42102',0,1,1,5,NULL),(42,'Electricity Charges',NULL,'42103',0,1,1,5,NULL),(43,'Printing and Stationary',NULL,'42105',0,1,1,5,NULL),(44,'Office Rent',NULL,'42107',0,1,1,5,NULL),(45,'Marketing Expense',NULL,'42109',0,1,1,5,NULL),(46,'Office utilities',NULL,'42112',0,1,1,5,'(supplies, toiletries, kitchen)'),(47,'Furniture',NULL,'42113',0,1,1,5,NULL),(48,'CEDA Meeting Expense',NULL,'42114',0,1,1,5,NULL),(49,'Employee Personal Expsense Account',NULL,'42200',0,1,2,5,NULL),(50,'Salary Alice',NULL,'42201',0,1,1,5,NULL),(51,'Salary Irene',NULL,'42202',0,1,1,5,NULL),(52,'Salary Richard',NULL,'42203',0,1,1,5,NULL),(53,'Salary Loan Officer TBA',NULL,'42204',0,1,1,5,NULL),(54,'Medical Insurance Alice & Family',NULL,'42205',0,1,1,5,NULL),(55,'Medical Insurance Irene',NULL,'42206',0,1,1,5,NULL),(56,'Medical Insurance Richard',NULL,'42207',0,1,1,5,NULL),(57,'Medical Insurance Loan Officer TBA',NULL,'42208',0,1,1,5,NULL),(58,'PAYE all employees',NULL,'42209',0,1,1,5,NULL),(59,'NSSF all employees',NULL,'42210',0,1,1,5,NULL),(60,'Lunch Allowances all employees',NULL,'42211',0,1,1,5,NULL),(61,'IT software and maintenance',NULL,'42300',0,1,2,5,NULL),(62,'Mifos maintenance contract 12 months',NULL,'42301',0,1,1,5,NULL),(63,'VPS Contract 12 months',NULL,'42302',0,1,1,5,NULL),(64,'Bulk SMS Service',NULL,'42303',0,1,1,5,NULL),(65,'Support Accounting Software',NULL,'42304',0,1,1,5,NULL),(66,'Mifos Instance Setup',NULL,'42305',0,1,1,5,NULL),(67,'Misc support expense',NULL,'42306',0,1,1,5,NULL),(68,'Warid Mobile Line',NULL,'42307',0,1,1,5,NULL),(69,'Landline',NULL,'42308',0,1,1,5,NULL),(70,'Modem Alice',NULL,'42309',0,1,1,5,NULL),(71,'Modem Irene',NULL,'42310',0,1,1,5,NULL),(72,'Modem Richard',NULL,'42311',0,1,1,5,NULL),(73,'Repairs',NULL,'42312',0,1,1,5,NULL),(74,'Airtime Expenses',NULL,'42400',0,1,2,5,NULL),(75,'Airtime Alice',NULL,'42401',0,1,1,5,NULL),(76,'Airtime Richard',NULL,'42402',0,1,1,5,NULL),(77,'Airtime Loan Office TBA',NULL,'42403',0,1,1,5,NULL),(78,'Special Airtime Alice',NULL,'42404',0,1,1,5,NULL),(79,'Transportation',NULL,'42500',0,1,2,5,NULL),(80,'Flat monthly transportation cost',NULL,'42501',0,1,1,5,NULL),(81,'Faciliation cost for Richard',NULL,'42502',0,1,1,5,NULL),(82,'Faciliation cost for Loan Officer TBA',NULL,'42503',0,1,1,5,NULL),(83,'Consultancy Expenses',NULL,'42600',0,1,2,5,NULL),(84,'Audit Fees',NULL,'42601',0,1,1,5,NULL),(85,'Legal Fees',NULL,'42602',0,1,1,5,NULL),(86,'Miscellaneous Expenses Account',NULL,'42700',0,1,2,5,NULL),(87,'MFI License',NULL,'42703',0,1,1,5,NULL),(88,'Sundy Expenses',NULL,'42704',0,1,1,5,NULL),(89,'Bank Fees',NULL,'42800',0,1,2,5,NULL),(90,'Bank Charges Operating Account',NULL,'42801',0,1,1,5,NULL),(91,'Bank Charges Expense Account',NULL,'42802',0,1,1,5,NULL),(92,'E.H Account',NULL,'42900',0,1,2,5,NULL),(93,'Airtime',NULL,'42901',0,1,1,5,NULL),(94,'Modem',NULL,'42902',0,1,1,5,NULL),(95,'Meals',NULL,'42903',0,1,1,5,NULL),(96,'Transportation',NULL,'42904',0,1,1,5,NULL),(97,'Miscellaneous',NULL,'42905',0,1,1,5,NULL); +INSERT INTO `acc_gl_account` +VALUES (1, 'Petty Cash Balances', NULL, '11100', 0, 1, 2, 1, NULL), + (2, 'Cash in Valut 1', NULL, '11101', 0, 1, 1, 1, NULL), + (3, 'Bank Balances', NULL, '11200', 0, 1, 2, 1, NULL), + (4, 'Centenary Opening Account', NULL, '11201', 0, 1, 1, 1, NULL), + (5, 'Centenary Expense Account', NULL, '11202', 0, 1, 1, 1, NULL), + (6, 'Centenary USD Account', NULL, '11203', 0, 1, 1, 1, NULL), + (7, 'Loans and Advances', NULL, '13100', 0, 1, 2, 1, NULL), + (8, 'Loans to Clients', NULL, '13101', 0, 1, 1, 1, NULL), + (9, 'Outstanding Interest', NULL, '13102', 0, 1, 1, 1, NULL), + (10, 'Outstanding Late Payment Interest', NULL, '13103', 0, 1, 1, 1, NULL), + (11, 'Outstanding Bank Fees to be collected', NULL, '13104', 0, 1, 1, 1, NULL), + (12, 'WriteOff Accounts', NULL, '13200', 0, 1, 2, 1, NULL), + (13, 'Write-offs (use for funds coming in)', NULL, '13201', 0, 1, 1, 1, NULL), + (14, 'Write-offs outstanding principal', NULL, '13202', 0, 1, 1, 1, NULL), + (15, 'Write-offs outstanding interest', NULL, '13203', 0, 1, 1, 1, NULL), + (16, 'Write-offs collected bank fees', NULL, '13204', 0, 1, 1, 1, NULL), + (17, 'Write-offs hardware/furniture', NULL, '13205', 0, 1, 1, 1, NULL), + (18, 'Fixed Assets', NULL, '14100', 0, 1, 2, 1, NULL), + (19, 'Office Equipment', NULL, '14101', 0, 1, 1, 1, NULL), + (20, 'Suspense Items (unidentified deposits)', NULL, '15000', 0, 1, 2, 1, NULL), + (21, 'Assets', NULL, '10000', 0, 1, 2, 1, NULL), + (22, 'Liabilities', NULL, '20000', 0, 1, 2, 2, NULL), + (23, 'Shares Account', NULL, '26100', 0, 1, 2, 2, NULL), + (24, 'Shares Captial', NULL, '26101', 0, 1, 1, 2, NULL), + (25, 'Donated Equity', NULL, '26300', 0, 1, 2, 2, NULL), + (26, 'Donated Equity Ameropa Foundation', NULL, '26301', 0, 1, 1, 2, NULL), + (27, 'Donated Equity e.h', NULL, '26302', 0, 1, 1, 2, NULL), + (28, 'Overpaid Amounts', NULL, '27000', 0, 1, 2, 2, NULL), + (29, 'Loss Provision', NULL, '28000', 0, 1, 2, 2, NULL), + (30, 'Provision Outstanding Principal', NULL, '28001', 0, 1, 1, 2, NULL), + (31, 'Provision Oustanding Interest', NULL, '28002', 0, 1, 1, 2, NULL), + (32, 'Income', NULL, '30000', 0, 1, 2, 4, NULL), + (33, 'Interest Income from Loans', NULL, '31100', 0, 1, 2, 4, NULL), + (34, 'Interest on Loans', NULL, '31101', 0, 1, 1, 4, NULL), + (35, 'Late Payment Interest', NULL, '31102', 0, 1, 1, 4, NULL), + (36, 'Income from Micro credit & Lending Activities', NULL, '31300', 0, 1, 2, 4, NULL), + (37, 'Collected Bank Fees Receivable', NULL, '6201', 0, 1, 1, 4, NULL), + (38, 'Deposits from Loans Write Off', NULL, '31400', 0, 1, 2, 4, NULL), + (39, 'Expenditure', NULL, '40000', 0, 1, 2, 5, NULL), + (40, 'Office Expenditure Account', NULL, '42100', 0, 1, 2, 5, NULL), + (41, 'Water Charges', NULL, '42102', 0, 1, 1, 5, NULL), + (42, 'Electricity Charges', NULL, '42103', 0, 1, 1, 5, NULL), + (43, 'Printing and Stationary', NULL, '42105', 0, 1, 1, 5, NULL), + (44, 'Office Rent', NULL, '42107', 0, 1, 1, 5, NULL), + (45, 'Marketing Expense', NULL, '42109', 0, 1, 1, 5, NULL), + (46, 'Office utilities', NULL, '42112', 0, 1, 1, 5, '(supplies, toiletries, kitchen)'), + (47, 'Furniture', NULL, '42113', 0, 1, 1, 5, NULL), + (48, 'CEDA Meeting Expense', NULL, '42114', 0, 1, 1, 5, NULL), + (49, 'Employee Personal Expsense Account', NULL, '42200', 0, 1, 2, 5, NULL), + (50, 'Salary Alice', NULL, '42201', 0, 1, 1, 5, NULL), + (51, 'Salary Irene', NULL, '42202', 0, 1, 1, 5, NULL), + (52, 'Salary Richard', NULL, '42203', 0, 1, 1, 5, NULL), + (53, 'Salary Loan Officer TBA', NULL, '42204', 0, 1, 1, 5, NULL), + (54, 'Medical Insurance Alice & Family', NULL, '42205', 0, 1, 1, 5, NULL), + (55, 'Medical Insurance Irene', NULL, '42206', 0, 1, 1, 5, NULL), + (56, 'Medical Insurance Richard', NULL, '42207', 0, 1, 1, 5, NULL), + (57, 'Medical Insurance Loan Officer TBA', NULL, '42208', 0, 1, 1, 5, NULL), + (58, 'PAYE all employees', NULL, '42209', 0, 1, 1, 5, NULL), + (59, 'NSSF all employees', NULL, '42210', 0, 1, 1, 5, NULL), + (60, 'Lunch Allowances all employees', NULL, '42211', 0, 1, 1, 5, NULL), + (61, 'IT software and maintenance', NULL, '42300', 0, 1, 2, 5, NULL), + (62, 'Mifos maintenance contract 12 months', NULL, '42301', 0, 1, 1, 5, NULL), + (63, 'VPS Contract 12 months', NULL, '42302', 0, 1, 1, 5, NULL), + (64, 'Bulk SMS Service', NULL, '42303', 0, 1, 1, 5, NULL), + (65, 'Support Accounting Software', NULL, '42304', 0, 1, 1, 5, NULL), + (66, 'Mifos Instance Setup', NULL, '42305', 0, 1, 1, 5, NULL), + (67, 'Misc support expense', NULL, '42306', 0, 1, 1, 5, NULL), + (68, 'Warid Mobile Line', NULL, '42307', 0, 1, 1, 5, NULL), + (69, 'Landline', NULL, '42308', 0, 1, 1, 5, NULL), + (70, 'Modem Alice', NULL, '42309', 0, 1, 1, 5, NULL), + (71, 'Modem Irene', NULL, '42310', 0, 1, 1, 5, NULL), + (72, 'Modem Richard', NULL, '42311', 0, 1, 1, 5, NULL), + (73, 'Repairs', NULL, '42312', 0, 1, 1, 5, NULL), + (74, 'Airtime Expenses', NULL, '42400', 0, 1, 2, 5, NULL), + (75, 'Airtime Alice', NULL, '42401', 0, 1, 1, 5, NULL), + (76, 'Airtime Richard', NULL, '42402', 0, 1, 1, 5, NULL), + (77, 'Airtime Loan Office TBA', NULL, '42403', 0, 1, 1, 5, NULL), + (78, 'Special Airtime Alice', NULL, '42404', 0, 1, 1, 5, NULL), + (79, 'Transportation', NULL, '42500', 0, 1, 2, 5, NULL), + (80, 'Flat monthly transportation cost', NULL, '42501', 0, 1, 1, 5, NULL), + (81, 'Faciliation cost for Richard', NULL, '42502', 0, 1, 1, 5, NULL), + (82, 'Faciliation cost for Loan Officer TBA', NULL, '42503', 0, 1, 1, 5, NULL), + (83, 'Consultancy Expenses', NULL, '42600', 0, 1, 2, 5, NULL), + (84, 'Audit Fees', NULL, '42601', 0, 1, 1, 5, NULL), + (85, 'Legal Fees', NULL, '42602', 0, 1, 1, 5, NULL), + (86, 'Miscellaneous Expenses Account', NULL, '42700', 0, 1, 2, 5, NULL), + (87, 'MFI License', NULL, '42703', 0, 1, 1, 5, NULL), + (88, 'Sundy Expenses', NULL, '42704', 0, 1, 1, 5, NULL), + (89, 'Bank Fees', NULL, '42800', 0, 1, 2, 5, NULL), + (90, 'Bank Charges Operating Account', NULL, '42801', 0, 1, 1, 5, NULL), + (91, 'Bank Charges Expense Account', NULL, '42802', 0, 1, 1, 5, NULL), + (92, 'E.H Account', NULL, '42900', 0, 1, 2, 5, NULL), + (93, 'Airtime', NULL, '42901', 0, 1, 1, 5, NULL), + (94, 'Modem', NULL, '42902', 0, 1, 1, 5, NULL), + (95, 'Meals', NULL, '42903', 0, 1, 1, 5, NULL), + (96, 'Transportation', NULL, '42904', 0, 1, 1, 5, NULL), + (97, 'Miscellaneous', NULL, '42905', 0, 1, 1, 5, NULL); /*!40000 ALTER TABLE `acc_gl_account` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `acc_gl_closure` @@ -75,24 +175,25 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `acc_gl_closure`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_gl_closure` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `office_id` BIGINT NOT NULL, - `closing_date` date NOT NULL, - `is_deleted` INT NOT NULL DEFAULT '0', - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - `comments` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `office_id_closing_date` (`office_id`,`closing_date`), - KEY `FK_acc_gl_closure_m_office` (`office_id`), - KEY `FK_acc_gl_closure_m_appuser` (`createdby_id`), - KEY `FK_acc_gl_closure_m_appuser_2` (`lastmodifiedby_id`), - CONSTRAINT `FK_acc_gl_closure_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_closure_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_closure_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `acc_gl_closure` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `office_id` BIGINT NOT NULL, + `closing_date` date NOT NULL, + `is_deleted` INT NOT NULL DEFAULT '0', + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + `comments` varchar(500) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `office_id_closing_date` (`office_id`,`closing_date`), + KEY `FK_acc_gl_closure_m_office` (`office_id`), + KEY `FK_acc_gl_closure_m_appuser` (`createdby_id`), + KEY `FK_acc_gl_closure_m_appuser_2` (`lastmodifiedby_id`), + CONSTRAINT `FK_acc_gl_closure_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_closure_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_closure_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -100,10 +201,12 @@ CREATE TABLE `acc_gl_closure` ( -- Dumping data for table `acc_gl_closure` -- -LOCK TABLES `acc_gl_closure` WRITE; +LOCK +TABLES `acc_gl_closure` WRITE; /*!40000 ALTER TABLE `acc_gl_closure` DISABLE KEYS */; /*!40000 ALTER TABLE `acc_gl_closure` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `acc_gl_journal_entry` @@ -112,35 +215,36 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `acc_gl_journal_entry`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_gl_journal_entry` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_id` BIGINT NOT NULL, - `office_id` BIGINT NOT NULL, - `reversal_id` BIGINT DEFAULT NULL, - `transaction_id` varchar(50) NOT NULL, - `reversed` tinyint NOT NULL DEFAULT '0', - `manual_entry` tinyint NOT NULL DEFAULT '0', - `entry_date` date NOT NULL, - `type_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `entity_type_enum` SMALLINT DEFAULT NULL, - `entity_id` BIGINT DEFAULT NULL, - `createdby_id` BIGINT NOT NULL, - `lastmodifiedby_id` BIGINT NOT NULL, - `created_date` datetime NOT NULL, - `lastmodified_date` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_acc_gl_journal_entry_m_office` (`office_id`), - KEY `FK_acc_gl_journal_entry_m_appuser` (`createdby_id`), - KEY `FK_acc_gl_journal_entry_m_appuser_2` (`lastmodifiedby_id`), - KEY `FK_acc_gl_journal_entry_acc_gl_journal_entry` (`reversal_id`), - KEY `FK_acc_gl_journal_entry_acc_gl_account` (`account_id`), - CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_account` FOREIGN KEY (`account_id`) REFERENCES `acc_gl_account` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_journal_entry` FOREIGN KEY (`reversal_id`) REFERENCES `acc_gl_journal_entry` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `acc_gl_journal_entry` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `account_id` BIGINT NOT NULL, + `office_id` BIGINT NOT NULL, + `reversal_id` BIGINT DEFAULT NULL, + `transaction_id` varchar(50) NOT NULL, + `reversed` tinyint NOT NULL DEFAULT '0', + `manual_entry` tinyint NOT NULL DEFAULT '0', + `entry_date` date NOT NULL, + `type_enum` SMALLINT NOT NULL, + `amount` decimal(19, 6) NOT NULL, + `description` varchar(500) DEFAULT NULL, + `entity_type_enum` SMALLINT DEFAULT NULL, + `entity_id` BIGINT DEFAULT NULL, + `createdby_id` BIGINT NOT NULL, + `lastmodifiedby_id` BIGINT NOT NULL, + `created_date` datetime NOT NULL, + `lastmodified_date` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `FK_acc_gl_journal_entry_m_office` (`office_id`), + KEY `FK_acc_gl_journal_entry_m_appuser` (`createdby_id`), + KEY `FK_acc_gl_journal_entry_m_appuser_2` (`lastmodifiedby_id`), + KEY `FK_acc_gl_journal_entry_acc_gl_journal_entry` (`reversal_id`), + KEY `FK_acc_gl_journal_entry_acc_gl_account` (`account_id`), + CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_account` FOREIGN KEY (`account_id`) REFERENCES `acc_gl_account` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_journal_entry` FOREIGN KEY (`reversal_id`) REFERENCES `acc_gl_journal_entry` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -148,10 +252,12 @@ CREATE TABLE `acc_gl_journal_entry` ( -- Dumping data for table `acc_gl_journal_entry` -- -LOCK TABLES `acc_gl_journal_entry` WRITE; +LOCK +TABLES `acc_gl_journal_entry` WRITE; /*!40000 ALTER TABLE `acc_gl_journal_entry` DISABLE KEYS */; /*!40000 ALTER TABLE `acc_gl_journal_entry` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `acc_product_mapping` @@ -160,13 +266,14 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `acc_product_mapping`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_product_mapping` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `gl_account_id` BIGINT DEFAULT NULL, - `product_id` BIGINT DEFAULT NULL, - `product_type` SMALLINT DEFAULT NULL, - `financial_account_type` SMALLINT DEFAULT NULL, - PRIMARY KEY (`id`) +CREATE TABLE `acc_product_mapping` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `gl_account_id` BIGINT DEFAULT NULL, + `product_id` BIGINT DEFAULT NULL, + `product_type` SMALLINT DEFAULT NULL, + `financial_account_type` SMALLINT DEFAULT NULL, + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -174,10 +281,12 @@ CREATE TABLE `acc_product_mapping` ( -- Dumping data for table `acc_product_mapping` -- -LOCK TABLES `acc_product_mapping` WRITE; +LOCK +TABLES `acc_product_mapping` WRITE; /*!40000 ALTER TABLE `acc_product_mapping` DISABLE KEYS */; /*!40000 ALTER TABLE `acc_product_mapping` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `c_configuration` @@ -186,11 +295,12 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `c_configuration`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `c_configuration` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(50) DEFAULT NULL, - `enabled` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) +CREATE TABLE `c_configuration` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(50) DEFAULT NULL, + `enabled` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -198,11 +308,14 @@ CREATE TABLE `c_configuration` ( -- Dumping data for table `c_configuration` -- -LOCK TABLES `c_configuration` WRITE; +LOCK +TABLES `c_configuration` WRITE; /*!40000 ALTER TABLE `c_configuration` DISABLE KEYS */; -INSERT INTO `c_configuration` VALUES (1,'maker-checker',0); +INSERT INTO `c_configuration` +VALUES (1, 'maker-checker', 0); /*!40000 ALTER TABLE `c_configuration` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `client additional data` @@ -211,47 +324,48 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `client additional data`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `client additional data` ( - `client_id` BIGINT NOT NULL, - `Gender_cd` INT NOT NULL, - `Date of Birth` date NOT NULL, - `Home address` text NOT NULL, - `Telephone number` varchar(20) NOT NULL, - `Telephone number (2nd)` varchar(20) NOT NULL, - `Email address` varchar(50) NOT NULL, - `EducationLevel_cd` INT NOT NULL, - `MaritalStatus_cd` INT NOT NULL, - `Number of children` INT NOT NULL, - `Citizenship` varchar(50) NOT NULL, - `PovertyStatus_cd` INT NOT NULL, - `YesNo_cd_Employed` INT NOT NULL, - `FieldOfEmployment_cd_Field of employment` INT DEFAULT NULL, - `Employer name` varchar(50) DEFAULT NULL, - `Number of years` INT DEFAULT NULL, - `Monthly salary` decimal(19,6) DEFAULT NULL, - `YesNo_cd_Self employed` INT NOT NULL, - `FieldOfEmployment_cd_Field of self-employment` INT DEFAULT NULL, - `Business address` text, - `Number of employees` INT DEFAULT NULL, - `Monthly salaries paid` decimal(19,6) DEFAULT NULL, - `Monthly net income of business activity` decimal(19,6) DEFAULT NULL, - `Monthly rent` decimal(19,6) DEFAULT NULL, - `Other income generating activities` varchar(100) DEFAULT NULL, - `YesNo_cd_Bookkeeping` INT DEFAULT NULL, - `YesNo_cd_Loans with other institutions` INT NOT NULL, - `From whom` varchar(100) DEFAULT NULL, - `Amount` decimal(19,6) DEFAULT NULL, - `Interest rate pa` decimal(19,6) DEFAULT NULL, - `Number of people depending on overal income` INT NOT NULL, - `YesNo_cd_Bank account` INT NOT NULL, - `YesNo_cd_Business plan provided` INT NOT NULL, - `YesNo_cd_Access to internet` INT DEFAULT NULL, - `Introduced by` varchar(100) DEFAULT NULL, - `Known to introducer since` varchar(100) NOT NULL, - `Last visited by` varchar(100) DEFAULT NULL, - `Last visited on` date NOT NULL, - PRIMARY KEY (`client_id`), - CONSTRAINT `FK_client_additional_data` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `client additional data` +( + `client_id` BIGINT NOT NULL, + `Gender_cd` INT NOT NULL, + `Date of Birth` date NOT NULL, + `Home address` text NOT NULL, + `Telephone number` varchar(20) NOT NULL, + `Telephone number (2nd)` varchar(20) NOT NULL, + `Email address` varchar(50) NOT NULL, + `EducationLevel_cd` INT NOT NULL, + `MaritalStatus_cd` INT NOT NULL, + `Number of children` INT NOT NULL, + `Citizenship` varchar(50) NOT NULL, + `PovertyStatus_cd` INT NOT NULL, + `YesNo_cd_Employed` INT NOT NULL, + `FieldOfEmployment_cd_Field of employment` INT DEFAULT NULL, + `Employer name` varchar(50) DEFAULT NULL, + `Number of years` INT DEFAULT NULL, + `Monthly salary` decimal(19, 6) DEFAULT NULL, + `YesNo_cd_Self employed` INT NOT NULL, + `FieldOfEmployment_cd_Field of self-employment` INT DEFAULT NULL, + `Business address` text, + `Number of employees` INT DEFAULT NULL, + `Monthly salaries paid` decimal(19, 6) DEFAULT NULL, + `Monthly net income of business activity` decimal(19, 6) DEFAULT NULL, + `Monthly rent` decimal(19, 6) DEFAULT NULL, + `Other income generating activities` varchar(100) DEFAULT NULL, + `YesNo_cd_Bookkeeping` INT DEFAULT NULL, + `YesNo_cd_Loans with other institutions` INT NOT NULL, + `From whom` varchar(100) DEFAULT NULL, + `Amount` decimal(19, 6) DEFAULT NULL, + `Interest rate pa` decimal(19, 6) DEFAULT NULL, + `Number of people depending on overal income` INT NOT NULL, + `YesNo_cd_Bank account` INT NOT NULL, + `YesNo_cd_Business plan provided` INT NOT NULL, + `YesNo_cd_Access to internet` INT DEFAULT NULL, + `Introduced by` varchar(100) DEFAULT NULL, + `Known to introducer since` varchar(100) NOT NULL, + `Last visited by` varchar(100) DEFAULT NULL, + `Last visited on` date NOT NULL, + PRIMARY KEY (`client_id`), + CONSTRAINT `FK_client_additional_data` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -259,10 +373,12 @@ CREATE TABLE `client additional data` ( -- Dumping data for table `client additional data` -- -LOCK TABLES `client additional data` WRITE; +LOCK +TABLES `client additional data` WRITE; /*!40000 ALTER TABLE `client additional data` DISABLE KEYS */; /*!40000 ALTER TABLE `client additional data` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `extra_client_details` @@ -271,17 +387,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `extra_client_details`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `extra_client_details` ( - `client_id` BIGINT NOT NULL, - `Business Description` varchar(100) DEFAULT NULL, - `Years in Business` INT DEFAULT NULL, - `Gender_cd` INT DEFAULT NULL, - `Education_cv` varchar(60) DEFAULT NULL, - `Next Visit` date DEFAULT NULL, - `Highest Rate Paid` decimal(19,6) DEFAULT NULL, - `Comment` text, - PRIMARY KEY (`client_id`), - CONSTRAINT `FK_extra_client_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `extra_client_details` +( + `client_id` BIGINT NOT NULL, + `Business Description` varchar(100) DEFAULT NULL, + `Years in Business` INT DEFAULT NULL, + `Gender_cd` INT DEFAULT NULL, + `Education_cv` varchar(60) DEFAULT NULL, + `Next Visit` date DEFAULT NULL, + `Highest Rate Paid` decimal(19, 6) DEFAULT NULL, + `Comment` text, + PRIMARY KEY (`client_id`), + CONSTRAINT `FK_extra_client_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -289,10 +406,12 @@ CREATE TABLE `extra_client_details` ( -- Dumping data for table `extra_client_details` -- -LOCK TABLES `extra_client_details` WRITE; +LOCK +TABLES `extra_client_details` WRITE; /*!40000 ALTER TABLE `extra_client_details` DISABLE KEYS */; /*!40000 ALTER TABLE `extra_client_details` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `extra_family_details` @@ -301,17 +420,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `extra_family_details`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `extra_family_details` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `Name` varchar(40) DEFAULT NULL, - `Date of Birth` date DEFAULT NULL, - `Points Score` INT DEFAULT NULL, - `Education_cd_Highest` INT DEFAULT NULL, - `Other Notes` text, - PRIMARY KEY (`id`), - KEY `FK_Extra Family Details Data_1` (`client_id`), - CONSTRAINT `FK_family_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `extra_family_details` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `client_id` BIGINT NOT NULL, + `Name` varchar(40) DEFAULT NULL, + `Date of Birth` date DEFAULT NULL, + `Points Score` INT DEFAULT NULL, + `Education_cd_Highest` INT DEFAULT NULL, + `Other Notes` text, + PRIMARY KEY (`id`), + KEY `FK_Extra Family Details Data_1` (`client_id`), + CONSTRAINT `FK_family_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -319,10 +439,12 @@ CREATE TABLE `extra_family_details` ( -- Dumping data for table `extra_family_details` -- -LOCK TABLES `extra_family_details` WRITE; +LOCK +TABLES `extra_family_details` WRITE; /*!40000 ALTER TABLE `extra_family_details` DISABLE KEYS */; /*!40000 ALTER TABLE `extra_family_details` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `extra_loan_details` @@ -331,17 +453,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `extra_loan_details`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `extra_loan_details` ( - `loan_id` BIGINT NOT NULL, - `Business Description` varchar(100) DEFAULT NULL, - `Years in Business` INT DEFAULT NULL, - `Gender_cd` INT DEFAULT NULL, - `Education_cv` varchar(60) DEFAULT NULL, - `Next Visit` date DEFAULT NULL, - `Highest Rate Paid` decimal(19,6) DEFAULT NULL, - `Comment` text, - PRIMARY KEY (`loan_id`), - CONSTRAINT `FK_extra_loan_details` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +CREATE TABLE `extra_loan_details` +( + `loan_id` BIGINT NOT NULL, + `Business Description` varchar(100) DEFAULT NULL, + `Years in Business` INT DEFAULT NULL, + `Gender_cd` INT DEFAULT NULL, + `Education_cv` varchar(60) DEFAULT NULL, + `Next Visit` date DEFAULT NULL, + `Highest Rate Paid` decimal(19, 6) DEFAULT NULL, + `Comment` text, + PRIMARY KEY (`loan_id`), + CONSTRAINT `FK_extra_loan_details` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -349,10 +472,12 @@ CREATE TABLE `extra_loan_details` ( -- Dumping data for table `extra_loan_details` -- -LOCK TABLES `extra_loan_details` WRITE; +LOCK +TABLES `extra_loan_details` WRITE; /*!40000 ALTER TABLE `extra_loan_details` DISABLE KEYS */; /*!40000 ALTER TABLE `extra_loan_details` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `impact measurement` @@ -361,17 +486,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `impact measurement`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `impact measurement` ( - `loan_id` BIGINT NOT NULL, - `YesNo_cd_RepaidOnSchedule` INT NOT NULL, - `ReasonNotRepaidOnSchedule` text, - `How was Loan Amount Invested` text NOT NULL, - `Additional Income Generated` decimal(19,6) NOT NULL, - `Additional Income Used For` text NOT NULL, - `YesNo_cd_NewJobsCreated` INT NOT NULL, - `Number of Jobs Created` BIGINT DEFAULT NULL, - PRIMARY KEY (`loan_id`), - CONSTRAINT `FK_impact measurement` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +CREATE TABLE `impact measurement` +( + `loan_id` BIGINT NOT NULL, + `YesNo_cd_RepaidOnSchedule` INT NOT NULL, + `ReasonNotRepaidOnSchedule` text, + `How was Loan Amount Invested` text NOT NULL, + `Additional Income Generated` decimal(19, 6) NOT NULL, + `Additional Income Used For` text NOT NULL, + `YesNo_cd_NewJobsCreated` INT NOT NULL, + `Number of Jobs Created` BIGINT DEFAULT NULL, + PRIMARY KEY (`loan_id`), + CONSTRAINT `FK_impact measurement` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -379,10 +505,12 @@ CREATE TABLE `impact measurement` ( -- Dumping data for table `impact measurement` -- -LOCK TABLES `impact measurement` WRITE; +LOCK +TABLES `impact measurement` WRITE; /*!40000 ALTER TABLE `impact measurement` DISABLE KEYS */; /*!40000 ALTER TABLE `impact measurement` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `loan additional data` @@ -391,18 +519,19 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `loan additional data`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `loan additional data` ( - `loan_id` BIGINT NOT NULL, - `PurposeOfLoan_cd` INT NOT NULL, - `CollateralType_cd` INT NOT NULL, - `Collateral notes` text NOT NULL, - `YesNo_cd_Guarantor` INT NOT NULL, - `Guarantor name` varchar(100) DEFAULT NULL, - `Guarantor relation` varchar(100) DEFAULT NULL, - `Guarantor address` varchar(100) DEFAULT NULL, - `Guarantor telephone number` varchar(20) DEFAULT NULL, - PRIMARY KEY (`loan_id`), - CONSTRAINT `FK_loan_additional_data` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +CREATE TABLE `loan additional data` +( + `loan_id` BIGINT NOT NULL, + `PurposeOfLoan_cd` INT NOT NULL, + `CollateralType_cd` INT NOT NULL, + `Collateral notes` text NOT NULL, + `YesNo_cd_Guarantor` INT NOT NULL, + `Guarantor name` varchar(100) DEFAULT NULL, + `Guarantor relation` varchar(100) DEFAULT NULL, + `Guarantor address` varchar(100) DEFAULT NULL, + `Guarantor telephone number` varchar(20) DEFAULT NULL, + PRIMARY KEY (`loan_id`), + CONSTRAINT `FK_loan_additional_data` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -410,10 +539,12 @@ CREATE TABLE `loan additional data` ( -- Dumping data for table `loan additional data` -- -LOCK TABLES `loan additional data` WRITE; +LOCK +TABLES `loan additional data` WRITE; /*!40000 ALTER TABLE `loan additional data` DISABLE KEYS */; /*!40000 ALTER TABLE `loan additional data` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_appuser` @@ -422,24 +553,25 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_appuser`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_appuser` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `is_deleted` tinyint NOT NULL DEFAULT '0', - `office_id` BIGINT DEFAULT NULL, - `username` varchar(100) NOT NULL, - `firstname` varchar(100) NOT NULL, - `lastname` varchar(100) NOT NULL, - `password` varchar(255) NOT NULL, - `email` varchar(100) NOT NULL, - `firsttime_login_remaining` bit(1) NOT NULL, - `nonexpired` bit(1) NOT NULL, - `nonlocked` bit(1) NOT NULL, - `nonexpired_credentials` bit(1) NOT NULL, - `enabled` bit(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `username_org` (`username`), - KEY `FKB3D587CE0DD567A` (`office_id`), - CONSTRAINT `FKB3D587CE0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `m_appuser` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `is_deleted` tinyint NOT NULL DEFAULT '0', + `office_id` BIGINT DEFAULT NULL, + `username` varchar(100) NOT NULL, + `firstname` varchar(100) NOT NULL, + `lastname` varchar(100) NOT NULL, + `password` varchar(255) NOT NULL, + `email` varchar(100) NOT NULL, + `firsttime_login_remaining` bit(1) NOT NULL, + `nonexpired` bit(1) NOT NULL, + `nonlocked` bit(1) NOT NULL, + `nonexpired_credentials` bit(1) NOT NULL, + `enabled` bit(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `username_org` (`username`), + KEY `FKB3D587CE0DD567A` (`office_id`), + CONSTRAINT `FKB3D587CE0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -447,11 +579,15 @@ CREATE TABLE `m_appuser` ( -- Dumping data for table `m_appuser` -- -LOCK TABLES `m_appuser` WRITE; +LOCK +TABLES `m_appuser` WRITE; /*!40000 ALTER TABLE `m_appuser` DISABLE KEYS */; -INSERT INTO `m_appuser` VALUES (1,0,1,'mifos','App','Administrator','5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a','demomfi@mifos.org','\0','','','',''); +INSERT INTO `m_appuser` +VALUES (1, 0, 1, 'mifos', 'App', 'Administrator', '5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a', + 'demomfi@mifos.org', '\0', '', '', '', ''); /*!40000 ALTER TABLE `m_appuser` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_appuser_role` @@ -460,14 +596,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_appuser_role`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_appuser_role` ( - `appuser_id` BIGINT NOT NULL, - `role_id` BIGINT NOT NULL, - PRIMARY KEY (`appuser_id`,`role_id`), - KEY `FK7662CE59B4100309` (`appuser_id`), - KEY `FK7662CE5915CEC7AB` (`role_id`), - CONSTRAINT `FK7662CE5915CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`), - CONSTRAINT `FK7662CE59B4100309` FOREIGN KEY (`appuser_id`) REFERENCES `m_appuser` (`id`) +CREATE TABLE `m_appuser_role` +( + `appuser_id` BIGINT NOT NULL, + `role_id` BIGINT NOT NULL, + PRIMARY KEY (`appuser_id`, `role_id`), + KEY `FK7662CE59B4100309` (`appuser_id`), + KEY `FK7662CE5915CEC7AB` (`role_id`), + CONSTRAINT `FK7662CE5915CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`), + CONSTRAINT `FK7662CE59B4100309` FOREIGN KEY (`appuser_id`) REFERENCES `m_appuser` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -475,11 +612,14 @@ CREATE TABLE `m_appuser_role` ( -- Dumping data for table `m_appuser_role` -- -LOCK TABLES `m_appuser_role` WRITE; +LOCK +TABLES `m_appuser_role` WRITE; /*!40000 ALTER TABLE `m_appuser_role` DISABLE KEYS */; -INSERT INTO `m_appuser_role` VALUES (1,1); +INSERT INTO `m_appuser_role` +VALUES (1, 1); /*!40000 ALTER TABLE `m_appuser_role` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_calendar` @@ -488,25 +628,26 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_calendar`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_calendar` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `title` varchar(50) NOT NULL, - `description` varchar(100) DEFAULT NULL, - `location` varchar(50) DEFAULT NULL, - `start_date` date NOT NULL, - `end_date` date DEFAULT NULL, - `duration` SMALLINT DEFAULT NULL, - `calendar_type_enum` SMALLINT NOT NULL, - `repeating` tinyint NOT NULL DEFAULT '0', - `recurrence` varchar(100) DEFAULT NULL, - `remind_by_enum` SMALLINT DEFAULT NULL, - `first_reminder` smallint DEFAULT NULL, - `second_reminder` smallint DEFAULT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - PRIMARY KEY (`id`) +CREATE TABLE `m_calendar` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `title` varchar(50) NOT NULL, + `description` varchar(100) DEFAULT NULL, + `location` varchar(50) DEFAULT NULL, + `start_date` date NOT NULL, + `end_date` date DEFAULT NULL, + `duration` SMALLINT DEFAULT NULL, + `calendar_type_enum` SMALLINT NOT NULL, + `repeating` tinyint NOT NULL DEFAULT '0', + `recurrence` varchar(100) DEFAULT NULL, + `remind_by_enum` SMALLINT DEFAULT NULL, + `first_reminder` smallint DEFAULT NULL, + `second_reminder` smallint DEFAULT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -514,10 +655,12 @@ CREATE TABLE `m_calendar` ( -- Dumping data for table `m_calendar` -- -LOCK TABLES `m_calendar` WRITE; +LOCK +TABLES `m_calendar` WRITE; /*!40000 ALTER TABLE `m_calendar` DISABLE KEYS */; /*!40000 ALTER TABLE `m_calendar` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_calendar_instance` @@ -526,14 +669,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_calendar_instance`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_calendar_instance` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `calendar_id` BIGINT NOT NULL, - `entity_id` BIGINT NOT NULL, - `entity_type_enum` SMALLINT NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_calendar_m_calendar_instance` (`calendar_id`), - CONSTRAINT `FK_m_calendar_m_calendar_instance` FOREIGN KEY (`calendar_id`) REFERENCES `m_calendar` (`id`) +CREATE TABLE `m_calendar_instance` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `calendar_id` BIGINT NOT NULL, + `entity_id` BIGINT NOT NULL, + `entity_type_enum` SMALLINT NOT NULL, + PRIMARY KEY (`id`), + KEY `FK_m_calendar_m_calendar_instance` (`calendar_id`), + CONSTRAINT `FK_m_calendar_m_calendar_instance` FOREIGN KEY (`calendar_id`) REFERENCES `m_calendar` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -541,10 +685,12 @@ CREATE TABLE `m_calendar_instance` ( -- Dumping data for table `m_calendar_instance` -- -LOCK TABLES `m_calendar_instance` WRITE; +LOCK +TABLES `m_calendar_instance` WRITE; /*!40000 ALTER TABLE `m_calendar_instance` DISABLE KEYS */; /*!40000 ALTER TABLE `m_calendar_instance` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_charge` @@ -553,19 +699,20 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_charge`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_charge` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL, - `currency_code` varchar(3) NOT NULL, - `charge_applies_to_enum` SMALLINT NOT NULL, - `charge_time_enum` SMALLINT NOT NULL, - `charge_calculation_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `is_penalty` tinyint NOT NULL DEFAULT '0', - `is_active` tinyint NOT NULL, - `is_deleted` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`) +CREATE TABLE `m_charge` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(100) DEFAULT NULL, + `currency_code` varchar(3) NOT NULL, + `charge_applies_to_enum` SMALLINT NOT NULL, + `charge_time_enum` SMALLINT NOT NULL, + `charge_calculation_enum` SMALLINT NOT NULL, + `amount` decimal(19, 6) NOT NULL, + `is_penalty` tinyint NOT NULL DEFAULT '0', + `is_active` tinyint NOT NULL, + `is_deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -573,10 +720,12 @@ CREATE TABLE `m_charge` ( -- Dumping data for table `m_charge` -- -LOCK TABLES `m_charge` WRITE; +LOCK +TABLES `m_charge` WRITE; /*!40000 ALTER TABLE `m_charge` DISABLE KEYS */; /*!40000 ALTER TABLE `m_charge` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_client` @@ -585,24 +734,25 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_client`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_client` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_no` varchar(20) NOT NULL, - `office_id` BIGINT NOT NULL, - `external_id` varchar(100) DEFAULT NULL, - `firstname` varchar(50) DEFAULT NULL, - `middlename` varchar(50) DEFAULT NULL, - `lastname` varchar(50) DEFAULT NULL, - `fullname` varchar(100) DEFAULT NULL, - `display_name` varchar(100) NOT NULL, - `image_key` varchar(500) DEFAULT NULL, - `joined_date` date DEFAULT NULL, - `is_deleted` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `account_no_UNIQUE` (`account_no`), - UNIQUE KEY `external_id` (`external_id`), - KEY `FKCE00CAB3E0DD567A` (`office_id`), - CONSTRAINT `FKCE00CAB3E0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `m_client` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `account_no` varchar(20) NOT NULL, + `office_id` BIGINT NOT NULL, + `external_id` varchar(100) DEFAULT NULL, + `firstname` varchar(50) DEFAULT NULL, + `middlename` varchar(50) DEFAULT NULL, + `lastname` varchar(50) DEFAULT NULL, + `fullname` varchar(100) DEFAULT NULL, + `display_name` varchar(100) NOT NULL, + `image_key` varchar(500) DEFAULT NULL, + `joined_date` date DEFAULT NULL, + `is_deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `account_no_UNIQUE` (`account_no`), + UNIQUE KEY `external_id` (`external_id`), + KEY `FKCE00CAB3E0DD567A` (`office_id`), + CONSTRAINT `FKCE00CAB3E0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -610,10 +760,12 @@ CREATE TABLE `m_client` ( -- Dumping data for table `m_client` -- -LOCK TABLES `m_client` WRITE; +LOCK +TABLES `m_client` WRITE; /*!40000 ALTER TABLE `m_client` DISABLE KEYS */; /*!40000 ALTER TABLE `m_client` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_client_identifier` @@ -622,23 +774,24 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_client_identifier`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_client_identifier` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `document_type_id` INT NOT NULL, - `document_key` varchar(50) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `unique_identifier_key` (`document_type_id`,`document_key`), - UNIQUE KEY `unique_client_identifier` (`client_id`,`document_type_id`), - KEY `FK_m_client_document_m_client` (`client_id`), - KEY `FK_m_client_document_m_code_value` (`document_type_id`), - CONSTRAINT `FK_m_client_document_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FK_m_client_document_m_code_value` FOREIGN KEY (`document_type_id`) REFERENCES `m_code_value` (`id`) +CREATE TABLE `m_client_identifier` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `client_id` BIGINT NOT NULL, + `document_type_id` INT NOT NULL, + `document_key` varchar(50) NOT NULL, + `description` varchar(500) DEFAULT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_identifier_key` (`document_type_id`,`document_key`), + UNIQUE KEY `unique_client_identifier` (`client_id`,`document_type_id`), + KEY `FK_m_client_document_m_client` (`client_id`), + KEY `FK_m_client_document_m_code_value` (`document_type_id`), + CONSTRAINT `FK_m_client_document_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), + CONSTRAINT `FK_m_client_document_m_code_value` FOREIGN KEY (`document_type_id`) REFERENCES `m_code_value` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -646,10 +799,12 @@ CREATE TABLE `m_client_identifier` ( -- Dumping data for table `m_client_identifier` -- -LOCK TABLES `m_client_identifier` WRITE; +LOCK +TABLES `m_client_identifier` WRITE; /*!40000 ALTER TABLE `m_client_identifier` DISABLE KEYS */; /*!40000 ALTER TABLE `m_client_identifier` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_code` @@ -658,12 +813,13 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_code`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_code` ( - `id` INT NOT NULL AUTO_INCREMENT, - `code_name` varchar(100) DEFAULT NULL, - `is_system_defined` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `code_name` (`code_name`) +CREATE TABLE `m_code` +( + `id` INT NOT NULL AUTO_INCREMENT, + `code_name` varchar(100) DEFAULT NULL, + `is_system_defined` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `code_name` (`code_name`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -671,11 +827,19 @@ CREATE TABLE `m_code` ( -- Dumping data for table `m_code` -- -LOCK TABLES `m_code` WRITE; +LOCK +TABLES `m_code` WRITE; /*!40000 ALTER TABLE `m_code` DISABLE KEYS */; -INSERT INTO `m_code` VALUES (1,'Customer Identifier',1),(2,'LoanCollateral',1),(3,'LoanPurpose',1),(4,'Gender',1),(5,'YesNo',1),(6,'Education',1); +INSERT INTO `m_code` +VALUES (1, 'Customer Identifier', 1), + (2, 'LoanCollateral', 1), + (3, 'LoanPurpose', 1), + (4, 'Gender', 1), + (5, 'YesNo', 1), + (6, 'Education', 1); /*!40000 ALTER TABLE `m_code` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_code_value` @@ -684,15 +848,16 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_code_value`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_code_value` ( - `id` INT NOT NULL AUTO_INCREMENT, - `code_id` INT NOT NULL, - `code_value` varchar(100) DEFAULT NULL, - `order_position` INT NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `code_value` (`code_id`,`code_value`), - KEY `FKCFCEA42640BE071Z` (`code_id`), - CONSTRAINT `FKCFCEA42640BE071Z` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`) +CREATE TABLE `m_code_value` +( + `id` INT NOT NULL AUTO_INCREMENT, + `code_id` INT NOT NULL, + `code_value` varchar(100) DEFAULT NULL, + `order_position` INT NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `code_value` (`code_id`,`code_value`), + KEY `FKCFCEA42640BE071Z` (`code_id`), + CONSTRAINT `FKCFCEA42640BE071Z` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -700,11 +865,24 @@ CREATE TABLE `m_code_value` ( -- Dumping data for table `m_code_value` -- -LOCK TABLES `m_code_value` WRITE; +LOCK +TABLES `m_code_value` WRITE; /*!40000 ALTER TABLE `m_code_value` DISABLE KEYS */; -INSERT INTO `m_code_value` VALUES (1,1,'Passport',1),(2,1,'Id',1),(3,1,'Drivers License',2),(4,1,'Any Other Id Type',3),(5,4,'option.Male',1),(6,4,'option.Female',5),(7,5,'option.Yes',1),(8,5,'option.No',7),(9,6,'Primary',1),(10,6,'Secondary',9),(11,6,'University',10); +INSERT INTO `m_code_value` +VALUES (1, 1, 'Passport', 1), + (2, 1, 'Id', 1), + (3, 1, 'Drivers License', 2), + (4, 1, 'Any Other Id Type', 3), + (5, 4, 'option.Male', 1), + (6, 4, 'option.Female', 5), + (7, 5, 'option.Yes', 1), + (8, 5, 'option.No', 7), + (9, 6, 'Primary', 1), + (10, 6, 'Secondary', 9), + (11, 6, 'University', 10); /*!40000 ALTER TABLE `m_code_value` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_currency` @@ -713,15 +891,16 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_currency`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_currency` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `code` varchar(3) NOT NULL, - `decimal_places` SMALLINT NOT NULL, - `display_symbol` varchar(10) DEFAULT NULL, - `name` varchar(50) NOT NULL, - `internationalized_name_code` varchar(50) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `code` (`code`) +CREATE TABLE `m_currency` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `code` varchar(3) NOT NULL, + `decimal_places` SMALLINT NOT NULL, + `display_symbol` varchar(10) DEFAULT NULL, + `name` varchar(50) NOT NULL, + `internationalized_name_code` varchar(50) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=164 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -729,9 +908,151 @@ CREATE TABLE `m_currency` ( -- Dumping data for table `m_currency` -- -LOCK TABLES `m_currency` WRITE; +LOCK +TABLES `m_currency` WRITE; /*!40000 ALTER TABLE `m_currency` DISABLE KEYS */; -INSERT INTO `m_currency` VALUES (1,'AED',2,NULL,'UAE Dirham','currency.AED'),(2,'AFN',2,NULL,'Afghanistan Afghani','currency.AFN'),(3,'ALL',2,NULL,'Albanian Lek','currency.ALL'),(4,'AMD',2,NULL,'Armenian Dram','currency.AMD'),(5,'ANG',2,NULL,'Netherlands Antillian Guilder','currency.ANG'),(6,'AOA',2,NULL,'Angolan Kwanza','currency.AOA'),(7,'ARS',2,'$','Argentine Peso','currency.ARS'),(8,'AUD',2,'A$','Australian Dollar','currency.AUD'),(9,'AWG',2,NULL,'Aruban Guilder','currency.AWG'),(10,'AZM',2,NULL,'Azerbaijanian Manat','currency.AZM'),(11,'BAM',2,NULL,'Bosnia and Herzegovina Convertible Marks','currency.BAM'),(12,'BBD',2,NULL,'Barbados Dollar','currency.BBD'),(13,'BDT',2,NULL,'Bangladesh Taka','currency.BDT'),(14,'BGN',2,NULL,'Bulgarian Lev','currency.BGN'),(15,'BHD',3,NULL,'Bahraini Dinar','currency.BHD'),(16,'BIF',0,NULL,'Burundi Franc','currency.BIF'),(17,'BMD',2,NULL,'Bermudian Dollar','currency.BMD'),(18,'BND',2,'B$','Brunei Dollar','currency.BND'),(19,'BOB',2,'Bs.','Bolivian Boliviano','currency.BOB'),(20,'BRL',2,'R$','Brazilian Real','currency.BRL'),(21,'BSD',2,NULL,'Bahamian Dollar','currency.BSD'),(22,'BTN',2,NULL,'Bhutan Ngultrum','currency.BTN'),(23,'BWP',2,NULL,'Botswana Pula','currency.BWP'),(24,'BYR',0,NULL,'Belarussian Ruble','currency.BYR'),(25,'BZD',2,'BZ$','Belize Dollar','currency.BZD'),(26,'CAD',2,NULL,'Canadian Dollar','currency.CAD'),(27,'CDF',2,NULL,'Franc Congolais','currency.CDF'),(28,'CHF',2,NULL,'Swiss Franc','currency.CHF'),(29,'CLP',0,'$','Chilean Peso','currency.CLP'),(30,'CNY',2,NULL,'Chinese Yuan Renminbi','currency.CNY'),(31,'COP',2,'$','Colombian Peso','currency.COP'),(32,'CRC',2,'₡','Costa Rican Colon','currency.CRC'),(33,'CSD',2,NULL,'Serbian Dinar','currency.CSD'),(34,'CUP',2,'$MN','Cuban Peso','currency.CUP'),(35,'CVE',2,NULL,'Cape Verde Escudo','currency.CVE'),(36,'CYP',2,NULL,'Cyprus Pound','currency.CYP'),(37,'CZK',2,NULL,'Czech Koruna','currency.CZK'),(38,'DJF',0,NULL,'Djibouti Franc','currency.DJF'),(39,'DKK',2,NULL,'Danish Krone','currency.DKK'),(40,'DOP',2,'RD$','Dominican Peso','currency.DOP'),(41,'DZD',2,NULL,'Algerian Dinar','currency.DZD'),(42,'EEK',2,NULL,'Estonian Kroon','currency.EEK'),(43,'EGP',2,NULL,'Egyptian Pound','currency.EGP'),(44,'ERN',2,NULL,'Eritrea Nafka','currency.ERN'),(45,'ETB',2,NULL,'Ethiopian Birr','currency.ETB'),(46,'EUR',2,'€','Euro','currency.EUR'),(47,'FJD',2,NULL,'Fiji Dollar','currency.FJD'),(48,'FKP',2,NULL,'Falkland Islands Pound','currency.FKP'),(49,'GBP',2,NULL,'Pound Sterling','currency.GBP'),(50,'GEL',2,NULL,'Georgian Lari','currency.GEL'),(51,'GHC',2,'GHc','Ghana Cedi','currency.GHC'),(52,'GIP',2,NULL,'Gibraltar Pound','currency.GIP'),(53,'GMD',2,NULL,'Gambian Dalasi','currency.GMD'),(54,'GNF',0,NULL,'Guinea Franc','currency.GNF'),(55,'GTQ',2,'Q','Guatemala Quetzal','currency.GTQ'),(56,'GYD',2,NULL,'Guyana Dollar','currency.GYD'),(57,'HKD',2,NULL,'Hong Kong Dollar','currency.HKD'),(58,'HNL',2,'L','Honduras Lempira','currency.HNL'),(59,'HRK',2,NULL,'Croatian Kuna','currency.HRK'),(60,'HTG',2,'G','Haiti Gourde','currency.HTG'),(61,'HUF',2,NULL,'Hungarian Forint','currency.HUF'),(62,'IDR',2,NULL,'Indonesian Rupiah','currency.IDR'),(63,'ILS',2,NULL,'New Israeli Shekel','currency.ILS'),(64,'INR',2,'₹','Indian Rupee','currency.INR'),(65,'IQD',3,NULL,'Iraqi Dinar','currency.IQD'),(66,'IRR',2,NULL,'Iranian Rial','currency.IRR'),(67,'ISK',0,NULL,'Iceland Krona','currency.ISK'),(68,'JMD',2,NULL,'Jamaican Dollar','currency.JMD'),(69,'JOD',3,NULL,'Jordanian Dinar','currency.JOD'),(70,'JPY',0,NULL,'Japanese Yen','currency.JPY'),(71,'KES',2,'KSh','Kenyan Shilling','currency.KES'),(72,'KGS',2,NULL,'Kyrgyzstan Som','currency.KGS'),(73,'KHR',2,NULL,'Cambodia Riel','currency.KHR'),(74,'KMF',0,NULL,'Comoro Franc','currency.KMF'),(75,'KPW',2,NULL,'North Korean Won','currency.KPW'),(76,'KRW',0,NULL,'Korean Won','currency.KRW'),(77,'KWD',3,NULL,'Kuwaiti Dinar','currency.KWD'),(78,'KYD',2,NULL,'Cayman Islands Dollar','currency.KYD'),(79,'KZT',2,NULL,'Kazakhstan Tenge','currency.KZT'),(80,'LAK',2,NULL,'Lao Kip','currency.LAK'),(81,'LBP',2,'L£','Lebanese Pound','currency.LBP'),(82,'LKR',2,NULL,'Sri Lanka Rupee','currency.LKR'),(83,'LRD',2,NULL,'Liberian Dollar','currency.LRD'),(84,'LSL',2,NULL,'Lesotho Loti','currency.LSL'),(85,'LTL',2,NULL,'Lithuanian Litas','currency.LTL'),(86,'LVL',2,NULL,'Latvian Lats','currency.LVL'),(87,'LYD',3,NULL,'Libyan Dinar','currency.LYD'),(88,'MAD',2,NULL,'Moroccan Dirham','currency.MAD'),(89,'MDL',2,NULL,'Moldovan Leu','currency.MDL'),(90,'MGA',2,NULL,'Malagasy Ariary','currency.MGA'),(91,'MKD',2,NULL,'Macedonian Denar','currency.MKD'),(92,'MMK',2,'K','Myanmar Kyat','currency.MMK'),(93,'MNT',2,NULL,'Mongolian Tugrik','currency.MNT'),(94,'MOP',2,NULL,'Macau Pataca','currency.MOP'),(95,'MRO',2,NULL,'Mauritania Ouguiya','currency.MRO'),(96,'MTL',2,NULL,'Maltese Lira','currency.MTL'),(97,'MUR',2,NULL,'Mauritius Rupee','currency.MUR'),(98,'MVR',2,NULL,'Maldives Rufiyaa','currency.MVR'),(99,'MWK',2,NULL,'Malawi Kwacha','currency.MWK'),(100,'MXN',2,'$','Mexican Peso','currency.MXN'),(101,'MYR',2,NULL,'Malaysian Ringgit','currency.MYR'),(102,'MZM',2,NULL,'Mozambique Metical','currency.MZM'),(103,'NAD',2,NULL,'Namibia Dollar','currency.NAD'),(104,'NGN',2,NULL,'Nigerian Naira','currency.NGN'),(105,'NIO',2,'C$','Nicaragua Cordoba Oro','currency.NIO'),(106,'NOK',2,NULL,'Norwegian Krone','currency.NOK'),(107,'NPR',2,NULL,'Nepalese Rupee','currency.NPR'),(108,'NZD',2,NULL,'New Zealand Dollar','currency.NZD'),(109,'OMR',3,NULL,'Rial Omani','currency.OMR'),(110,'PAB',2,'B/.','Panama Balboa','currency.PAB'),(111,'PEN',2,'S/.','Peruvian Nuevo Sol','currency.PEN'),(112,'PGK',2,NULL,'Papua New Guinea Kina','currency.PGK'),(113,'PHP',2,NULL,'Philippine Peso','currency.PHP'),(114,'PKR',2,NULL,'Pakistan Rupee','currency.PKR'),(115,'PLN',2,NULL,'Polish Zloty','currency.PLN'),(116,'PYG',0,'₲','Paraguayan Guarani','currency.PYG'),(117,'QAR',2,NULL,'Qatari Rial','currency.QAR'),(118,'RON',2,NULL,'Romanian Leu','currency.RON'),(119,'RUB',2,NULL,'Russian Ruble','currency.RUB'),(120,'RWF',0,NULL,'Rwanda Franc','currency.RWF'),(121,'SAR',2,NULL,'Saudi Riyal','currency.SAR'),(122,'SBD',2,NULL,'Solomon Islands Dollar','currency.SBD'),(123,'SCR',2,NULL,'Seychelles Rupee','currency.SCR'),(124,'SDD',2,NULL,'Sudanese Dinar','currency.SDD'),(125,'SEK',2,NULL,'Swedish Krona','currency.SEK'),(126,'SGD',2,NULL,'Singapore Dollar','currency.SGD'),(127,'SHP',2,NULL,'St Helena Pound','currency.SHP'),(128,'SIT',2,NULL,'Slovenian Tolar','currency.SIT'),(129,'SKK',2,NULL,'Slovak Koruna','currency.SKK'),(130,'SLL',2,NULL,'Sierra Leone Leone','currency.SLL'),(131,'SOS',2,NULL,'Somali Shilling','currency.SOS'),(132,'SRD',2,NULL,'Surinam Dollar','currency.SRD'),(133,'STD',2,NULL,'Sao Tome and Principe Dobra','currency.STD'),(134,'SVC',2,NULL,'El Salvador Colon','currency.SVC'),(135,'SYP',2,NULL,'Syrian Pound','currency.SYP'),(136,'SZL',2,NULL,'Swaziland Lilangeni','currency.SZL'),(137,'THB',2,NULL,'Thai Baht','currency.THB'),(138,'TJS',2,NULL,'Tajik Somoni','currency.TJS'),(139,'TMM',2,NULL,'Turkmenistan Manat','currency.TMM'),(140,'TND',3,'DT','Tunisian Dinar','currency.TND'),(141,'TOP',2,NULL,'Tonga Pa\'anga','currency.TOP'),(142,'TRY',2,NULL,'Turkish Lira','currency.TRY'),(143,'TTD',2,NULL,'Trinidad and Tobago Dollar','currency.TTD'),(144,'TWD',2,NULL,'New Taiwan Dollar','currency.TWD'),(145,'TZS',2,NULL,'Tanzanian Shilling','currency.TZS'),(146,'UAH',2,NULL,'Ukraine Hryvnia','currency.UAH'),(147,'UGX',2,'USh','Uganda Shilling','currency.UGX'),(148,'USD',2,'$','US Dollar','currency.USD'),(149,'UYU',2,'$U','Peso Uruguayo','currency.UYU'),(150,'UZS',2,NULL,'Uzbekistan Sum','currency.UZS'),(151,'VEB',2,'Bs.F.','Venezuelan Bolivar','currency.VEB'),(152,'VND',2,NULL,'Vietnamese Dong','currency.VND'),(153,'VUV',0,NULL,'Vanuatu Vatu','currency.VUV'),(154,'WST',2,NULL,'Samoa Tala','currency.WST'),(155,'XAF',0,NULL,'CFA Franc BEAC','currency.XAF'),(156,'XCD',2,NULL,'East Caribbean Dollar','currency.XCD'),(157,'XDR',5,NULL,'SDR (Special Drawing Rights)','currency.XDR'),(158,'XOF',0,'CFA','CFA Franc BCEAO','currency.XOF'),(159,'XPF',0,NULL,'CFP Franc','currency.XPF'),(160,'YER',2,NULL,'Yemeni Rial','currency.YER'),(161,'ZAR',2,'R','South African Rand','currency.ZAR'),(162,'ZMK',2,NULL,'Zambian Kwacha','currency.ZMK'),(163,'ZWD',2,NULL,'Zimbabwe Dollar','currency.ZWD'); +INSERT INTO `m_currency` +VALUES (1, 'AED', 2, NULL, 'UAE Dirham', 'currency.AED'), + (2, 'AFN', 2, NULL, 'Afghanistan Afghani', 'currency.AFN'), + (3, 'ALL', 2, NULL, 'Albanian Lek', 'currency.ALL'), + (4, 'AMD', 2, NULL, 'Armenian Dram', 'currency.AMD'), + (5, 'ANG', 2, NULL, 'Netherlands Antillian Guilder', 'currency.ANG'), + (6, 'AOA', 2, NULL, 'Angolan Kwanza', 'currency.AOA'), + (7, 'ARS', 2, '$', 'Argentine Peso', 'currency.ARS'), + (8, 'AUD', 2, 'A$', 'Australian Dollar', 'currency.AUD'), + (9, 'AWG', 2, NULL, 'Aruban Guilder', 'currency.AWG'), + (10, 'AZM', 2, NULL, 'Azerbaijanian Manat', 'currency.AZM'), + (11, 'BAM', 2, NULL, 'Bosnia and Herzegovina Convertible Marks', 'currency.BAM'), + (12, 'BBD', 2, NULL, 'Barbados Dollar', 'currency.BBD'), + (13, 'BDT', 2, NULL, 'Bangladesh Taka', 'currency.BDT'), + (14, 'BGN', 2, NULL, 'Bulgarian Lev', 'currency.BGN'), + (15, 'BHD', 3, NULL, 'Bahraini Dinar', 'currency.BHD'), + (16, 'BIF', 0, NULL, 'Burundi Franc', 'currency.BIF'), + (17, 'BMD', 2, NULL, 'Bermudian Dollar', 'currency.BMD'), + (18, 'BND', 2, 'B$', 'Brunei Dollar', 'currency.BND'), + (19, 'BOB', 2, 'Bs.', 'Bolivian Boliviano', 'currency.BOB'), + (20, 'BRL', 2, 'R$', 'Brazilian Real', 'currency.BRL'), + (21, 'BSD', 2, NULL, 'Bahamian Dollar', 'currency.BSD'), + (22, 'BTN', 2, NULL, 'Bhutan Ngultrum', 'currency.BTN'), + (23, 'BWP', 2, NULL, 'Botswana Pula', 'currency.BWP'), + (24, 'BYR', 0, NULL, 'Belarussian Ruble', 'currency.BYR'), + (25, 'BZD', 2, 'BZ$', 'Belize Dollar', 'currency.BZD'), + (26, 'CAD', 2, NULL, 'Canadian Dollar', 'currency.CAD'), + (27, 'CDF', 2, NULL, 'Franc Congolais', 'currency.CDF'), + (28, 'CHF', 2, NULL, 'Swiss Franc', 'currency.CHF'), + (29, 'CLP', 0, '$', 'Chilean Peso', 'currency.CLP'), + (30, 'CNY', 2, NULL, 'Chinese Yuan Renminbi', 'currency.CNY'), + (31, 'COP', 2, '$', 'Colombian Peso', 'currency.COP'), + (32, 'CRC', 2, '₡', 'Costa Rican Colon', 'currency.CRC'), + (33, 'CSD', 2, NULL, 'Serbian Dinar', 'currency.CSD'), + (34, 'CUP', 2, '$MN', 'Cuban Peso', 'currency.CUP'), + (35, 'CVE', 2, NULL, 'Cape Verde Escudo', 'currency.CVE'), + (36, 'CYP', 2, NULL, 'Cyprus Pound', 'currency.CYP'), + (37, 'CZK', 2, NULL, 'Czech Koruna', 'currency.CZK'), + (38, 'DJF', 0, NULL, 'Djibouti Franc', 'currency.DJF'), + (39, 'DKK', 2, NULL, 'Danish Krone', 'currency.DKK'), + (40, 'DOP', 2, 'RD$', 'Dominican Peso', 'currency.DOP'), + (41, 'DZD', 2, NULL, 'Algerian Dinar', 'currency.DZD'), + (42, 'EEK', 2, NULL, 'Estonian Kroon', 'currency.EEK'), + (43, 'EGP', 2, NULL, 'Egyptian Pound', 'currency.EGP'), + (44, 'ERN', 2, NULL, 'Eritrea Nafka', 'currency.ERN'), + (45, 'ETB', 2, NULL, 'Ethiopian Birr', 'currency.ETB'), + (46, 'EUR', 2, '€', 'Euro', 'currency.EUR'), + (47, 'FJD', 2, NULL, 'Fiji Dollar', 'currency.FJD'), + (48, 'FKP', 2, NULL, 'Falkland Islands Pound', 'currency.FKP'), + (49, 'GBP', 2, NULL, 'Pound Sterling', 'currency.GBP'), + (50, 'GEL', 2, NULL, 'Georgian Lari', 'currency.GEL'), + (51, 'GHC', 2, 'GHc', 'Ghana Cedi', 'currency.GHC'), + (52, 'GIP', 2, NULL, 'Gibraltar Pound', 'currency.GIP'), + (53, 'GMD', 2, NULL, 'Gambian Dalasi', 'currency.GMD'), + (54, 'GNF', 0, NULL, 'Guinea Franc', 'currency.GNF'), + (55, 'GTQ', 2, 'Q', 'Guatemala Quetzal', 'currency.GTQ'), + (56, 'GYD', 2, NULL, 'Guyana Dollar', 'currency.GYD'), + (57, 'HKD', 2, NULL, 'Hong Kong Dollar', 'currency.HKD'), + (58, 'HNL', 2, 'L', 'Honduras Lempira', 'currency.HNL'), + (59, 'HRK', 2, NULL, 'Croatian Kuna', 'currency.HRK'), + (60, 'HTG', 2, 'G', 'Haiti Gourde', 'currency.HTG'), + (61, 'HUF', 2, NULL, 'Hungarian Forint', 'currency.HUF'), + (62, 'IDR', 2, NULL, 'Indonesian Rupiah', 'currency.IDR'), + (63, 'ILS', 2, NULL, 'New Israeli Shekel', 'currency.ILS'), + (64, 'INR', 2, '₹', 'Indian Rupee', 'currency.INR'), + (65, 'IQD', 3, NULL, 'Iraqi Dinar', 'currency.IQD'), + (66, 'IRR', 2, NULL, 'Iranian Rial', 'currency.IRR'), + (67, 'ISK', 0, NULL, 'Iceland Krona', 'currency.ISK'), + (68, 'JMD', 2, NULL, 'Jamaican Dollar', 'currency.JMD'), + (69, 'JOD', 3, NULL, 'Jordanian Dinar', 'currency.JOD'), + (70, 'JPY', 0, NULL, 'Japanese Yen', 'currency.JPY'), + (71, 'KES', 2, 'KSh', 'Kenyan Shilling', 'currency.KES'), + (72, 'KGS', 2, NULL, 'Kyrgyzstan Som', 'currency.KGS'), + (73, 'KHR', 2, NULL, 'Cambodia Riel', 'currency.KHR'), + (74, 'KMF', 0, NULL, 'Comoro Franc', 'currency.KMF'), + (75, 'KPW', 2, NULL, 'North Korean Won', 'currency.KPW'), + (76, 'KRW', 0, NULL, 'Korean Won', 'currency.KRW'), + (77, 'KWD', 3, NULL, 'Kuwaiti Dinar', 'currency.KWD'), + (78, 'KYD', 2, NULL, 'Cayman Islands Dollar', 'currency.KYD'), + (79, 'KZT', 2, NULL, 'Kazakhstan Tenge', 'currency.KZT'), + (80, 'LAK', 2, NULL, 'Lao Kip', 'currency.LAK'), + (81, 'LBP', 2, 'L£', 'Lebanese Pound', 'currency.LBP'), + (82, 'LKR', 2, NULL, 'Sri Lanka Rupee', 'currency.LKR'), + (83, 'LRD', 2, NULL, 'Liberian Dollar', 'currency.LRD'), + (84, 'LSL', 2, NULL, 'Lesotho Loti', 'currency.LSL'), + (85, 'LTL', 2, NULL, 'Lithuanian Litas', 'currency.LTL'), + (86, 'LVL', 2, NULL, 'Latvian Lats', 'currency.LVL'), + (87, 'LYD', 3, NULL, 'Libyan Dinar', 'currency.LYD'), + (88, 'MAD', 2, NULL, 'Moroccan Dirham', 'currency.MAD'), + (89, 'MDL', 2, NULL, 'Moldovan Leu', 'currency.MDL'), + (90, 'MGA', 2, NULL, 'Malagasy Ariary', 'currency.MGA'), + (91, 'MKD', 2, NULL, 'Macedonian Denar', 'currency.MKD'), + (92, 'MMK', 2, 'K', 'Myanmar Kyat', 'currency.MMK'), + (93, 'MNT', 2, NULL, 'Mongolian Tugrik', 'currency.MNT'), + (94, 'MOP', 2, NULL, 'Macau Pataca', 'currency.MOP'), + (95, 'MRO', 2, NULL, 'Mauritania Ouguiya', 'currency.MRO'), + (96, 'MTL', 2, NULL, 'Maltese Lira', 'currency.MTL'), + (97, 'MUR', 2, NULL, 'Mauritius Rupee', 'currency.MUR'), + (98, 'MVR', 2, NULL, 'Maldives Rufiyaa', 'currency.MVR'), + (99, 'MWK', 2, NULL, 'Malawi Kwacha', 'currency.MWK'), + (100, 'MXN', 2, '$', 'Mexican Peso', 'currency.MXN'), + (101, 'MYR', 2, NULL, 'Malaysian Ringgit', 'currency.MYR'), + (102, 'MZM', 2, NULL, 'Mozambique Metical', 'currency.MZM'), + (103, 'NAD', 2, NULL, 'Namibia Dollar', 'currency.NAD'), + (104, 'NGN', 2, NULL, 'Nigerian Naira', 'currency.NGN'), + (105, 'NIO', 2, 'C$', 'Nicaragua Cordoba Oro', 'currency.NIO'), + (106, 'NOK', 2, NULL, 'Norwegian Krone', 'currency.NOK'), + (107, 'NPR', 2, NULL, 'Nepalese Rupee', 'currency.NPR'), + (108, 'NZD', 2, NULL, 'New Zealand Dollar', 'currency.NZD'), + (109, 'OMR', 3, NULL, 'Rial Omani', 'currency.OMR'), + (110, 'PAB', 2, 'B/.', 'Panama Balboa', 'currency.PAB'), + (111, 'PEN', 2, 'S/.', 'Peruvian Nuevo Sol', 'currency.PEN'), + (112, 'PGK', 2, NULL, 'Papua New Guinea Kina', 'currency.PGK'), + (113, 'PHP', 2, NULL, 'Philippine Peso', 'currency.PHP'), + (114, 'PKR', 2, NULL, 'Pakistan Rupee', 'currency.PKR'), + (115, 'PLN', 2, NULL, 'Polish Zloty', 'currency.PLN'), + (116, 'PYG', 0, '₲', 'Paraguayan Guarani', 'currency.PYG'), + (117, 'QAR', 2, NULL, 'Qatari Rial', 'currency.QAR'), + (118, 'RON', 2, NULL, 'Romanian Leu', 'currency.RON'), + (119, 'RUB', 2, NULL, 'Russian Ruble', 'currency.RUB'), + (120, 'RWF', 0, NULL, 'Rwanda Franc', 'currency.RWF'), + (121, 'SAR', 2, NULL, 'Saudi Riyal', 'currency.SAR'), + (122, 'SBD', 2, NULL, 'Solomon Islands Dollar', 'currency.SBD'), + (123, 'SCR', 2, NULL, 'Seychelles Rupee', 'currency.SCR'), + (124, 'SDD', 2, NULL, 'Sudanese Dinar', 'currency.SDD'), + (125, 'SEK', 2, NULL, 'Swedish Krona', 'currency.SEK'), + (126, 'SGD', 2, NULL, 'Singapore Dollar', 'currency.SGD'), + (127, 'SHP', 2, NULL, 'St Helena Pound', 'currency.SHP'), + (128, 'SIT', 2, NULL, 'Slovenian Tolar', 'currency.SIT'), + (129, 'SKK', 2, NULL, 'Slovak Koruna', 'currency.SKK'), + (130, 'SLL', 2, NULL, 'Sierra Leone Leone', 'currency.SLL'), + (131, 'SOS', 2, NULL, 'Somali Shilling', 'currency.SOS'), + (132, 'SRD', 2, NULL, 'Surinam Dollar', 'currency.SRD'), + (133, 'STD', 2, NULL, 'Sao Tome and Principe Dobra', 'currency.STD'), + (134, 'SVC', 2, NULL, 'El Salvador Colon', 'currency.SVC'), + (135, 'SYP', 2, NULL, 'Syrian Pound', 'currency.SYP'), + (136, 'SZL', 2, NULL, 'Swaziland Lilangeni', 'currency.SZL'), + (137, 'THB', 2, NULL, 'Thai Baht', 'currency.THB'), + (138, 'TJS', 2, NULL, 'Tajik Somoni', 'currency.TJS'), + (139, 'TMM', 2, NULL, 'Turkmenistan Manat', 'currency.TMM'), + (140, 'TND', 3, 'DT', 'Tunisian Dinar', 'currency.TND'), + (141, 'TOP', 2, NULL, 'Tonga Pa\'anga','currency.TOP'),(142,'TRY',2,NULL,'Turkish Lira','currency.TRY'),(143,'TTD',2,NULL,'Trinidad and Tobago Dollar','currency.TTD'),(144,'TWD',2,NULL,'New Taiwan Dollar','currency.TWD'),(145,'TZS',2,NULL,'Tanzanian Shilling','currency.TZS'),(146,'UAH',2,NULL,'Ukraine Hryvnia','currency.UAH'),(147,'UGX',2,'USh','Uganda Shilling','currency.UGX'),(148,'USD',2,'$','US Dollar','currency.USD'),(149,'UYU',2,'$U','Peso Uruguayo','currency.UYU'),(150,'UZS',2,NULL,'Uzbekistan Sum','currency.UZS'),(151,'VEB',2,'Bs.F.','Venezuelan Bolivar','currency.VEB'),(152,'VND',2,NULL,'Vietnamese Dong','currency.VND'),(153,'VUV',0,NULL,'Vanuatu Vatu','currency.VUV'),(154,'WST',2,NULL,'Samoa Tala','currency.WST'),(155,'XAF',0,NULL,'CFA Franc BEAC','currency.XAF'),(156,'XCD',2,NULL,'East Caribbean Dollar','currency.XCD'),(157,'XDR',5,NULL,'SDR (Special Drawing Rights)','currency.XDR'),(158,'XOF',0,'CFA','CFA Franc BCEAO','currency.XOF'),(159,'XPF',0,NULL,'CFP Franc','currency.XPF'),(160,'YER',2,NULL,'Yemeni Rial','currency.YER'),(161,'ZAR',2,'R','South African Rand','currency.ZAR'),(162,'ZMK',2,NULL,'Zambian Kwacha','currency.ZMK'),(163,'ZWD',2,NULL,'Zimbabwe Dollar','currency.ZWD'); /*!40000 ALTER TABLE `m_currency` ENABLE KEYS */; UNLOCK TABLES; @@ -1822,9 +2143,30 @@ CREATE TABLE `stretchy_parameter` ( LOCK TABLES `stretchy_parameter` WRITE; /*!40000 ALTER TABLE `stretchy_parameter` DISABLE KEYS */; -INSERT INTO `stretchy_parameter` VALUES (1,'startDateSelect','startDate','startDate','date','date','today',NULL,NULL,NULL,NULL,NULL),(2,'endDateSelect','endDate','endDate','date','date','today',NULL,NULL,NULL,NULL,NULL),(3,'obligDateTypeSelect','obligDateType','obligDateType','select','number','0',NULL,NULL,NULL,'select * from\r\n(select 1 as id, \"Closed\" as `name` union all\r\nselect 2, \"Disbursal\" ) x\r\norder by x.`id`',NULL),(5,'OfficeIdSelectOne','officeId','Office','select','number','0',NULL,'Y',NULL,'select id, \r\nconcat(substring(\"........................................\", 1, \r\n \n\n((LENGTH(`hierarchy`) - LENGTH(REPLACE(`hierarchy`, \'.\', \'\')) - 1) * 4)), \r\n `name`) as tc\r\nfrom m_office\r\nwhere hierarchy like concat\n\n(\'${currentUserHierarchy}\', \'%\')\r\norder by hierarchy',NULL),(6,'loanOfficerIdSelectAll','loanOfficerId','Loan Officer','select','number','0',NULL,NULL,'Y','(select lo.id, lo.display_name as `Name` \r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\njoin m_staff lo on lo.office_id = ounder.id\r\nwhere lo.is_loan_officer = true\r\nand o.id = ${officeId})\r\nunion all\r\n(select -10, \'-\')\r\norder by 2',5),(10,'currencyIdSelectAll','currencyId','Currency','select','number','0',NULL,NULL,'Y','select `code`, `name`\r\nfrom m_organisation_currency\r\norder by `code`',NULL),(20,'fundIdSelectAll','fundId','Fund','select','number','0',NULL,NULL,'Y','(select id, `name`\r\nfrom m_fund)\r\nunion all\r\n(select -10, \'-\')\r\norder by 2',NULL),(25,'loanProductIdSelectAll','loanProductId','Product','select','number','0',NULL,NULL,'Y','select p.id, p.`name`\r\nfrom m_product_loan p\r\nwhere p.currency_code = \'$\{currencyId}\'\r\norder by 2',10),(26,'loanPurposeIdSelectAll','loanPurposeId','Loan Purpose','select','number','0',NULL,NULL,'Y','select -10 as id, \'-\' as code_value\r\nunion all\r\nselect * from (select v.id, v.code_value\r\nfrom m_code c\r\njoin m_code_value v on v.code_id = c.id\r\nwhere c.code_name = \"loanPurpose\"\r\norder by v.order_position) x',NULL),(100,'parTypeSelect','parType','parType','select','number','0',NULL,NULL,NULL,'select * from\r\n(select 1 as id, \"Principal Only\" as `name` union all\r\nselect 2, \"Principal + Interest\" union all\r\nselect 3, \"Principal + Interest + Fees\" union all\r\nselect 4, \"Principal + Interest + Fees + Penalties\") x\r\norder by x.`id`',NULL),(1001,'FullReportList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select r.report_id, r.report_name, r.report_type, r.report_subtype, r.report_category,\r\n \n\nrp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on rp.report_id = r.report_id\r\n \n\nleft join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \n\n\r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on rp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where \n\nur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by \n\nr.report_category, r.report_name, rp.parameter_id',NULL),(1002,'FullParameterList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select sp.parameter_name, sp.parameter_variable, sp.parameter_label, sp.parameter_displayType, \r\nsp.parameter_FormatType, sp.parameter_default, sp.selectOne, sp.selectAll, spp.parameter_name as parentParameterName\r\nfrom stretchy_parameter sp\r\nleft join stretchy_parameter spp on spp.parameter_id = sp.parent_parameter_id\r\nwhere sp.special is null\r\nand exists \r\n (select \'f\' \r\n from stretchy_report sr\r\n join stretchy_report_parameter srp on srp.report_id = sr.report_id\r\n where sr.report_name in(${reportListing})\r\n and srp.parameter_id = sp.parameter_id\r\n )\r\norder by sp.parameter_id',NULL),(1003,'reportCategoryList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select r.report_id, r.report_name, r.report_type, r.report_subtype, \n\nr.report_category,\r\n rp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on \n\nrp.report_id = r.report_id\r\n left join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.report_category = \'${reportCategory}\'\r\n and \n\nr.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on \n\nrp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where ur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \n\n\'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by r.report_category, r.report_name, rp.parameter_id',NULL); +INSERT INTO `stretchy_parameter` VALUES (1,'startDateSelect','startDate','startDate','date','date','today',NULL,NULL,NULL,NULL,NULL),(2,'endDateSelect','endDate','endDate','date','date','today',NULL,NULL,NULL,NULL,NULL),(3,'obligDateTypeSelect','obligDateType','obligDateType','select','number','0',NULL,NULL,NULL,'select * from\r\n(select 1 as id, \"Closed\" as `name` union all\r\nselect 2, \"Disbursal\" ) x\r\norder by x.`id`',NULL),(5,'OfficeIdSelectOne','officeId','Office','select','number','0',NULL,'Y',NULL,'select id, \r\nconcat(substring(\"........................................\", 1, \r\n \n\n((LENGTH(`hierarchy`) - LENGTH(REPLACE(`hierarchy`, \'.\', \'\')) - 1) * 4)), \r\n `name`) as tc\r\nfrom m_office\r\nwhere hierarchy like concat\n\n(\'${currentUserHierarchy}\', \'%\')\r\norder by hierarchy',NULL), + (6, 'loanOfficerIdSelectAll', 'loanOfficerId', 'Loan Officer', 'select', 'number', '0', NULL, NULL, 'Y', + '(select lo.id, lo.display_name as `Name` \r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\njoin m_staff lo on lo.office_id = ounder.id\r\nwhere lo.is_loan_officer = true\r\nand o.id = ${officeId})\r\nunion all\r\n(select -10, \'-\')\r\norder by 2', + 5), (10, 'currencyIdSelectAll', 'currencyId', 'Currency', 'select', 'number', '0', NULL, NULL, 'Y', + 'select `code`, `name`\r\nfrom m_organisation_currency\r\norder by `code`', NULL), + (20, 'fundIdSelectAll', 'fundId', 'Fund', 'select', 'number', '0', NULL, NULL, 'Y', + '(select id, `name`\r\nfrom m_fund)\r\nunion all\r\n(select -10, \' -\')\r\norder by 2', NULL), + (25, 'loanProductIdSelectAll', 'loanProductId', 'Product', 'select', 'number', '0', NULL, NULL, 'Y', + 'select p.id, p.`name`\r\nfrom m_product_loan p\r\nwhere p.currency_code = \'$\{currencyId}\'\r\norder by 2', + 10), (26, 'loanPurposeIdSelectAll', 'loanPurposeId', 'Loan Purpose', 'select', 'number', '0', NULL, NULL, 'Y', + 'select -10 as id, \' -\' as code_value\r\nunion all\r\nselect * from (select v.id, v.code_value\r\nfrom m_code c\r\njoin m_code_value v on v.code_id = c.id\r\nwhere c.code_name = \"loanPurpose\"\r\norder by v.order_position) x', + NULL), (100, 'parTypeSelect', 'parType', 'parType', 'select', 'number', '0', NULL, NULL, NULL, + 'select * from\r\n(select 1 as id, \"Principal Only\" as `name` union all\r\nselect 2, \"Principal + Interest\" union all\r\nselect 3, \"Principal + Interest + Fees\" union all\r\nselect 4, \"Principal + Interest + Fees + Penalties\") x\r\norder by x.`id`', + NULL), (1001, 'FullReportList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, + 'select r.report_id, r.report_name, r.report_type, r.report_subtype, r.report_category,\r\n \n\nrp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on rp.report_id = r.report_id\r\n \n\nleft join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \n\n\r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on rp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where \n\nur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by \n\nr.report_category, r.report_name, rp.parameter_id', + NULL), (1002, 'FullParameterList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, + 'select sp.parameter_name, sp.parameter_variable, sp.parameter_label, sp.parameter_displayType, \r\nsp.parameter_FormatType, sp.parameter_default, sp.selectOne, sp.selectAll, spp.parameter_name as parentParameterName\r\nfrom stretchy_parameter sp\r\nleft join stretchy_parameter spp on spp.parameter_id = sp.parent_parameter_id\r\nwhere sp.special is null\r\nand exists \r\n (select \'f\' \r\n from stretchy_report sr\r\n join stretchy_report_parameter srp on srp.report_id = sr.report_id\r\n where sr.report_name in(${reportListing})\r\n and srp.parameter_id = sp.parameter_id\r\n )\r\norder by sp.parameter_id', + NULL), + (1003, 'reportCategoryList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, + 'select r.report_id, r.report_name, r.report_type, r.report_subtype, \n\nr.report_category,\r\n rp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on \n\nrp.report_id = r.report_id\r\n left join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.report_category = \'${reportCategory}\'\r\n and \n\nr.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on \n\nrp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where ur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \n\n\'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by r.report_category, r.report_name, rp.parameter_id', + NULL); /*!40000 ALTER TABLE `stretchy_parameter` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `stretchy_report` @@ -1833,18 +2175,19 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `stretchy_report`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `stretchy_report` ( - `report_id` INT NOT NULL AUTO_INCREMENT, - `report_name` varchar(100) NOT NULL, - `report_type` varchar(20) NOT NULL, - `report_subtype` varchar(20) DEFAULT NULL, - `report_category` varchar(45) DEFAULT NULL, - `report_sql` text, - `description` text, - `core_report` tinyint DEFAULT '0', - `use_report` tinyint DEFAULT '0', - PRIMARY KEY (`report_id`), - UNIQUE KEY `report_name_UNIQUE` (`report_name`) +CREATE TABLE `stretchy_report` +( + `report_id` INT NOT NULL AUTO_INCREMENT, + `report_name` varchar(100) NOT NULL, + `report_type` varchar(20) NOT NULL, + `report_subtype` varchar(20) DEFAULT NULL, + `report_category` varchar(45) DEFAULT NULL, + `report_sql` text, + `description` text, + `core_report` tinyint DEFAULT '0', + `use_report` tinyint DEFAULT '0', + PRIMARY KEY (`report_id`), + UNIQUE KEY `report_name_UNIQUE` (`report_name`) ) ENGINE=InnoDB AUTO_INCREMENT=95 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1852,11 +2195,87 @@ CREATE TABLE `stretchy_report` ( -- Dumping data for table `stretchy_report` -- -LOCK TABLES `stretchy_report` WRITE; +LOCK +TABLES `stretchy_report` WRITE; /*!40000 ALTER TABLE `stretchy_report` DISABLE KEYS */; -INSERT INTO `stretchy_report` VALUES (1,'Client Listing','Table',NULL,'Client','select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n c.account_no as \"Client Account No.\", \r\nc.display_name as \"Name\", \n\nc.joined_date as \"Joined\", c.external_id as \"External Id\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand \n\nounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\nwhere o.id = ${officeId}\r\nand c.is_deleted=0\r\n\n\norder by ounder.hierarchy, c.account_no','Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \'one to one\' additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t \n\nhave that client browser/memory impact).',1,1),(2,'Client Loans Listing','Table',NULL,'Client','select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client \n\nAccount No.\", \r\nc.display_name as \"Name\", \r\nlo.display_name as \"Loan Officer\", l.account_no as \"Loan Account No.\", l.external_id as \"External Id\", \r\n\n\np.name as Loan, st.enum_message_property as \"Status\", \r\nf.`name` as Fund, purp.code_value as \"Loan Purpose\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount,\n\n\r\nl.arrearstolerance_amount as \"Arrears Tolerance Amount\",\r\nl.number_of_repayments as \"Expected No. Repayments\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\nl.nominal_interest_rate_per_period as \"Nominal Interest Rate Per Period\",\r\n\r\nipf.enum_message_property as \"Interest Rate Frequency\n\n\",\r\nim.enum_message_property as \"Interest Method\",\r\nicp.enum_message_property as \"Interest Calculated in Period\",\r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.repay_every as \"Repayment Frequency\",\r\nrf.enum_message_property as \"Repayment Frequency Period\",\n\n\r\nam.enum_message_property as \"Amortization\",\r\n\r\nl.total_charges_due_at_disbursement_derived as \"Total Charges Due At Disbursement\",\r\n\r\ndate( \n\nl.submittedon_date) as Submitted, date(l.approvedon_date) Approved, l.expected_disbursedon_date As \"Expected Disbursal\",\r\ndate(l.expected_firstrepaymenton_date) as \n\n\"Expected First Repayment\", date(l.interest_calculated_from_date) as \"Interest Calculated From\" ,\r\ndate(l.disbursedon_date) as Disbursed, date\n\n(l.expected_maturedon_date) \"Expected Maturity\",\r\ndate(l.maturedon_date) as \"Matured On\", date(l.closedon_date) as Closed,\r\ndate(l.rejectedon_date) as \n\nRejected, date(l.rescheduledon_date) as Rescheduled, \r\ndate(l.withdrawnon_date) as Withdrawn, date(l.writtenoffon_date) \"Written Off\"\r\nfrom m_office o \r\njoin \n\nm_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on \n\nc.office_id = ounder.id\r\nleft join m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_product_loan p on p.id = \n\nl.product_id\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join r_enum_value st on st.enum_name = \"loan_status_id\" and st.enum_id = l.loan_status_id\r\nleft join \n\nr_enum_value ipf on ipf.enum_name = \"interest_period_frequency_enum\" and ipf.enum_id = l.interest_period_frequency_enum\r\nleft join r_enum_value im on im.enum_name \n\n= \"interest_method_enum\" and im.enum_id = l.interest_method_enum\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = \n\nl.term_period_frequency_enum\r\nleft join r_enum_value icp on icp.enum_name = \"interest_calculated_in_period_enum\" and icp.enum_id = \n\nl.interest_calculated_in_period_enum\r\nleft join r_enum_value rf on rf.enum_name = \"repayment_period_frequency_enum\" and rf.enum_id = \n\nl.repayment_period_frequency_enum\r\nleft join r_enum_value am on am.enum_name = \"amortization_method_enum\" and am.enum_id = l.amortization_method_enum\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\n\r\nleft \n\njoin m_currency cur on cur.code = l.currency_code\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand \n\n(l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \n\n\"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\norder by ounder.hierarchy, 2 , l.id','Individual Client Report\r\n\r\nPretty \n\nwide report that lists the basic details of client loans. \r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t have that client browser/memory impact).',1,1),(5,'Loans Awaiting Disbursal','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No\", c.display_name as \"Name\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount as Principal, \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\",\r\ndate(l.approvedon_date) \"Approved\",\r\ndatediff(l.expected_disbursedon_date, curdate()) as \"Days to Disbursal\",\r\ndate(l.expected_disbursedon_date) \"Expected Disbursal\",\r\npurp.code_value as \"Loan Purpose\",\r\n lo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\norder by ounder.hierarchy, datediff(l.expected_disbursedon_date, curdate()), c.account_no','Individual Client Report',1,1),(6,'Loans Awaiting Disbursal Summary','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, f.`name` as Fund,\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`','Individual Client Report',1,1),(7,'Loans Awaiting Disbursal Summary by Month','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nyear(l.expected_disbursedon_date) as \"Year\", \r\nmonthname(l.expected_disbursedon_date) as \"Month\",\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)','Individual Client Report',1,1),(8,'Loans Pending Approval','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client Name\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, pl.`name` as \"Product\", \r\nl.account_no as \"Loan Account No.\", \r\nl.principal_amount as \"Loan Amount\", \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\ndatediff(curdate(), l.submittedon_date) \"Days Pending Approval\", \r\npurp.code_value as \"Loan Purpose\",\r\nlo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 100 /*Submitted and awaiting approval */\r\norder by ounder.hierarchy, l.submittedon_date, l.account_no','Individual Client Report',1,1),(11,'Active Loans - Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. loans_in_arrears_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(if(laa.loan_id is not null, l.id, null) )) as loans_in_arrears_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(laa.principal_overdue_derived) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(laa.interest_overdue_derived) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(laa.fee_charges_overdue_derived) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(laa.penalty_charges_overdue_derived) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency',NULL,1,1),(12,'Active Loans - Details','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\npenalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(13,'Obligation Met Loans Details','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client\",\r\nl.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.total_repayment_derived as \"Total Repaid\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", \r\ndate(l.closedon_date) as \"Closed\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(14,'Obligation Met Loans Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\ncount(distinct(c.id)) as \"No. of Clients\",\r\ncount(distinct(l.id)) as \"No. of Loans\",\r\nsum(l.principal_amount) as \"Total Loan Amount\", \r\nsum(l.principal_repaid_derived) as \"Total Principal Repaid\",\r\nsum(l.interest_repaid_derived) as \"Total Interest Repaid\",\r\nsum(l.fee_charges_repaid_derived) as \"Total Fees Repaid\",\r\nsum(l.penalty_charges_repaid_derived) as \"Total Penalties Repaid\",\r\nsum(l.interest_waived_derived) as \"Total Interest Waived\",\r\nsum(l.fee_charges_waived_derived) as \"Total Fees Waived\",\r\nsum(l.penalty_charges_waived_derived) as \"Total Penalties Waived\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by ounder.hierarchy, l.currency_code\r\norder by ounder.hierarchy, l.currency_code','Individual Client \n\nReport',1,1),(15,'Portfolio at Risk','Table',NULL,'Loan','select x.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from \r\n(select ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.currency_code\r\norder by l.currency_code) x','Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)',1,1),(16,'Portfolio at Risk by Branch','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\",\r\nx.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as \"branch\", ifnull(cur.display_symbol, l.currency_code) as Currency, \r\n\r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency','Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)',1,1),(20,'Funds Disbursed Between Dates Summary','Table',NULL,'Fund','select ifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nround(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office ounder \r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\ngroup by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)\r\norder by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)',NULL,1,1),(21,'Funds Disbursed Between Dates Summary by Office','Table',NULL,'Fund','select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n \n\nifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office o\r\n\n\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c \n\non c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\n\n\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand o.id = ${officeId}\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand \n\n(l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\ngroup by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, \n\nl.currency_code)\r\norder by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)',NULL,1,1),(48,'Balance Sheet','Pentaho',NULL,'Accounting',NULL,'Balance Sheet',1,1),(49,'Income Statement','Pentaho',NULL,'Accounting',NULL,'Profit and Loss Statement',1,1),(50,'Trial Balance','Pentaho',NULL,'Accounting',NULL,'Trial Balance Report',1,1),(51,'Written-Off Loans','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Written-Off Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Written-Off Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Written-Off Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Written-Off Penalties\',\r\nn.note AS \'Reason For Write-Off\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 6 /*write-off */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=601\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\") \r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no','Individual Lending Report. Written Off Loans',1,1),(52,'Aging Detail','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nmc.account_no as \"Client Account No.\",\r\n mc.display_name AS \"Client Name\",\r\n ml.account_no AS \"Account Number\",\r\n ml.principal_amount AS \"Loan Amount\",\r\n ml.principal_disbursed_derived AS \"Original Principal\",\r\n ml.interest_charged_derived AS \"Original Interest\",\r\n ml.principal_repaid_derived AS \"Principal Paid\",\r\n ml.interest_repaid_derived AS \"Interest Paid\",\r\n laa.principal_overdue_derived AS \"Principal Overdue\",\r\n laa.interest_overdue_derived AS \"Interest Overdue\",\r\nDATEDIFF(CURDATE(), laa.overdue_since_date_derived) as \"Days in Arrears\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<7, \'<1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<8, \' 1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<22, \' 3\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<29, \' 4\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<36, \' 5\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<43, \' 6\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<50, \' 7\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<57, \' 8\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<64, \' 9\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<85, \'12\', \'12+\')))))))))))) )AS \"Weeks In Arrears Band\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<361, \'180 - 360\', \r\n \'> 360\'))))) AS \"Days in Arrears Band\"\r\n\r\n FROM m_office mo \r\n JOIN m_office ounder ON ounder.hierarchy like concat(mo.hierarchy, \'%\')\r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n INNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id\r\n INNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\n left join m_currency cur on cur.code = ml.currency_code\r\n WHERE ml.loan_status_id=300\r\n AND mo.id=${officeId}\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no','Loan arrears aging (Weeks)',1,1),(53,'Aging Summary (Arrears in Weeks)','Table',NULL,'Loan','SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Weeks In Arrears (Up To)\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'1\',2 UNION\r\n SELECT \'2\',3 UNION\r\n SELECT \'3\',4 UNION\r\n SELECT \'4\',5 UNION\r\n SELECT \'5\',6 UNION\r\n SELECT \'6\',7 UNION\r\n SELECT \'7\',8 UNION\r\n SELECT \'8\',9 UNION\r\n SELECT \'9\',10 UNION\r\n SELECT \'10\',11 UNION\r\n SELECT \'11\',12 UNION\r\n SELECT \'12\',13 UNION\r\n SELECT \'12+\',14) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<8, \'1\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<22, \'3\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<29, \'4\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<36, \'5\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<43, \'6\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<50, \'7\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<57, \'8\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<64, \'9\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<85, \'12\',\r\n \'12+\'))))))))))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid','Loan amount in arrears by branch',1,1),(54,'Rescheduled Loans','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Rescheduled Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Rescheduled Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Rescheduled Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Rescheduled Penalties\',\r\nn.note AS \'Reason For Rescheduling\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 7 /*marked for rescheduling */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=602\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no','Individual Lending Report. Rescheduled Loans. The ability to reschedule (or mark that you have rescheduled the loan elsewhere) is a legacy of the older Mifos product. Needed for migration.',1,1),(55,'Active Loans Passed Final Maturity','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(56,'Active Loans Passed Final Maturity Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency',NULL,1,1),(57,'Active Loans in last installment','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(lastInstallment.`hierarchy`) - LENGTH(REPLACE(lastInstallment.`hierarchy`, \'.\', \'\')) - 1))), lastInstallment.branch) as \"Office/Branch\",\r\nlastInstallment.Currency,\r\nlastInstallment.`Loan Officer`, \r\nlastInstallment.`Client Account No`, lastInstallment.`Client`, \r\nlastInstallment.`Loan Account No`, lastInstallment.`Product`, \r\nlastInstallment.`Fund`, lastInstallment.`Loan Amount`, \r\nlastInstallment.`Annual Nominal Interest Rate`, \r\nlastInstallment.`Disbursed`, lastInstallment.`Expected Matured On` ,\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\norder by lastInstallment.hierarchy, lastInstallment.Currency, lastInstallment.`Client Account No`, lastInstallment.`Loan Account No`','Individual Client \n\nReport',1,1),(58,'Active Loans in last installment Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select lastInstallment.branchId as branchId,\r\nlastInstallment.Currency,\r\ncount(distinct(lastInstallment.clientId)) as client_count, \r\ncount(distinct(lastInstallment.loanId)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id as branchId, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.id as clientId, c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\ngroup by lastInstallment.branchId) x on x.branchId = mo.id\r\norder by mo.hierarchy, x.Currency','Individual Client \n\nReport',1,1),(59,'Active Loans by Disbursal Period','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No\", c.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Principal Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\n\r\nl.total_expected_repayment_derived as \"Total Loan (P+I+F+Pen)\",\r\nl.total_repayment_derived as \"Total Repaid (P+I+F+Pen)\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(61,'Aging Summary (Arrears in Months)','Table',NULL,'Loan','SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Days In Arrears\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'0 - 30\',2 UNION\r\n SELECT \'30 - 60\',3 UNION\r\n SELECT \'60 - 90\',4 UNION\r\n SELECT \'90 - 180\',5 UNION\r\n SELECT \'180 - 360\',6 UNION\r\n SELECT \'> 360\',7 ) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<361, \'180 - 360\', \r\n \'> 360\')))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid','Loan amount in arrears by branch',1,1),(91,'Loan Account Schedule','Pentaho',NULL,'Loan',NULL,NULL,1,0),(92,'Branch Expected Cash Flow','Pentaho',NULL,'Loan',NULL,NULL,1,1),(93,'Expected Payments By Date - Basic','Table',NULL,'Loan','SELECT \r\n ounder.name \'Office\', \r\n IFNULL(ms.display_name,\'-\') \'Loan Officer\',\r\n mc.account_no \'Client Account Number\',\r\n mc.display_name \'Name\',\r\n mp.name \'Product\',\r\n ml.account_no \'Loan Account Number\',\r\n mr.duedate \'Due Date\',\r\n mr.installment \'Installment\',\r\n cu.display_symbol \'Currency\',\r\n mr.principal_amount- IFNULL(mr.principal_completed_derived,0) \'Principal Due\',\r\n mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0) \'Interest Due\', \r\n IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0) \'Fees Due\', \r\n IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0) \'Penalty Due\',\r\n (mr.principal_amount- IFNULL(mr.principal_completed_derived,0)) +\r\n (mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0)) + \r\n (IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0)) + \r\n (IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0)) \'Total Due\', \r\n mlaa.total_overdue_derived \'Total Overdue\'\r\n \r\n FROM m_office mo\r\n JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\n \r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n \r\n LEFT JOIN m_client mc ON mc.office_id=ounder.id\r\n LEFT JOIN m_loan ml ON ml.client_id=mc.id AND ml.loan_status_id=300\r\n LEFT JOIN m_loan_arrears_aging mlaa ON mlaa.loan_id=ml.id\r\n LEFT JOIN m_loan_repayment_schedule mr ON mr.loan_id=ml.id AND mr.completed_derived=0\r\n LEFT JOIN m_product_loan mp ON mp.id=ml.product_id\r\n LEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\n LEFT JOIN m_currency cu ON cu.code=ml.currency_code\r\n WHERE mo.id=${officeId}\r\n AND (IFNULL(ml.loan_officer_id, -10) = \"${loanOfficerId}\" OR \"-1\" = \"${loanOfficerId}\")\r\n AND mr.duedate BETWEEN \'${startDate}\' AND \'${endDate}\'\r\n ORDER BY ounder.id,mr.duedate,ml.account_no','Test',1,1),(94,'Expected Payments By Date - Formatted','Pentaho',NULL,'Loan',NULL,NULL,1,1); +INSERT INTO `stretchy_report` +VALUES (1, 'Client Listing', 'Table', NULL, 'Client', + 'select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n c.account_no as \"Client Account No.\", \r\nc.display_name as \"Name\", \n\nc.joined_date as \"Joined\", c.external_id as \"External Id\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand \n\nounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\nwhere o.id = ${officeId}\r\nand c.is_deleted=0\r\n\n\norder by ounder.hierarchy, c.account_no', + 'Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \'one to one\' additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, + there is probably is + a limit of about 20/50k clients returned for html display (export to excel doesn\'t \n\nhave that client browser/memory impact).',1,1), + (2, 'Client Loans Listing', 'Table', NULL, 'Client', + 'select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client \n\nAccount No.\", \r\nc.display_name as \"Name\", \r\nlo.display_name as \"Loan Officer\", l.account_no as \"Loan Account No.\", l.external_id as \"External Id\", \r\n\n\np.name as Loan, st.enum_message_property as \"Status\", \r\nf.`name` as Fund, purp.code_value as \"Loan Purpose\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount,\n\n\r\nl.arrearstolerance_amount as \"Arrears Tolerance Amount\",\r\nl.number_of_repayments as \"Expected No. Repayments\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\nl.nominal_interest_rate_per_period as \"Nominal Interest Rate Per Period\",\r\n\r\nipf.enum_message_property as \"Interest Rate Frequency\n\n\",\r\nim.enum_message_property as \"Interest Method\",\r\nicp.enum_message_property as \"Interest Calculated in Period\",\r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.repay_every as \"Repayment Frequency\",\r\nrf.enum_message_property as \"Repayment Frequency Period\",\n\n\r\nam.enum_message_property as \"Amortization\",\r\n\r\nl.total_charges_due_at_disbursement_derived as \"Total Charges Due At Disbursement\",\r\n\r\ndate( \n\nl.submittedon_date) as Submitted, date(l.approvedon_date) Approved, l.expected_disbursedon_date As \"Expected Disbursal\",\r\ndate(l.expected_firstrepaymenton_date) as \n\n\"Expected First Repayment\", date(l.interest_calculated_from_date) as \"Interest Calculated From\" ,\r\ndate(l.disbursedon_date) as Disbursed, date\n\n(l.expected_maturedon_date) \"Expected Maturity\",\r\ndate(l.maturedon_date) as \"Matured On\", date(l.closedon_date) as Closed,\r\ndate(l.rejectedon_date) as \n\nRejected, date(l.rescheduledon_date) as Rescheduled, \r\ndate(l.withdrawnon_date) as Withdrawn, date(l.writtenoffon_date) \"Written Off\"\r\nfrom m_office o \r\njoin \n\nm_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on \n\nc.office_id = ounder.id\r\nleft join m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_product_loan p on p.id = \n\nl.product_id\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join r_enum_value st on st.enum_name = \"loan_status_id\" and st.enum_id = l.loan_status_id\r\nleft join \n\nr_enum_value ipf on ipf.enum_name = \"interest_period_frequency_enum\" and ipf.enum_id = l.interest_period_frequency_enum\r\nleft join r_enum_value im on im.enum_name \n\n= \"interest_method_enum\" and im.enum_id = l.interest_method_enum\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = \n\nl.term_period_frequency_enum\r\nleft join r_enum_value icp on icp.enum_name = \"interest_calculated_in_period_enum\" and icp.enum_id = \n\nl.interest_calculated_in_period_enum\r\nleft join r_enum_value rf on rf.enum_name = \"repayment_period_frequency_enum\" and rf.enum_id = \n\nl.repayment_period_frequency_enum\r\nleft join r_enum_value am on am.enum_name = \"amortization_method_enum\" and am.enum_id = l.amortization_method_enum\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\n\r\nleft \n\njoin m_currency cur on cur.code = l.currency_code\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand \n\n(l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \n\n\"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\norder by ounder.hierarchy, 2 , l.id', + 'Individual Client Report\r\n\r\nPretty \n\nwide report that lists the basic details of client loans. \r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t have that client browser/memory impact).',1,1), + (5, 'Loans Awaiting Disbursal', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No\", c.display_name as \"Name\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount as Principal, \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\",\r\ndate(l.approvedon_date) \"Approved\",\r\ndatediff(l.expected_disbursedon_date, curdate()) as \"Days to Disbursal\",\r\ndate(l.expected_disbursedon_date) \"Expected Disbursal\",\r\npurp.code_value as \"Loan Purpose\",\r\n lo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\norder by ounder.hierarchy, datediff(l.expected_disbursedon_date, curdate()), c.account_no', + 'Individual Client Report', 1, 1), (6, 'Loans Awaiting Disbursal Summary', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, f.`name` as Fund,\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`', + 'Individual Client Report', 1, 1), + (7, 'Loans Awaiting Disbursal Summary by Month', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nyear(l.expected_disbursedon_date) as \"Year\", \r\nmonthname(l.expected_disbursedon_date) as \"Month\",\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)', + 'Individual Client Report', 1, 1), (8, 'Loans Pending Approval', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client Name\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, pl.`name` as \"Product\", \r\nl.account_no as \"Loan Account No.\", \r\nl.principal_amount as \"Loan Amount\", \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\ndatediff(curdate(), l.submittedon_date) \"Days Pending Approval\", \r\npurp.code_value as \"Loan Purpose\",\r\nlo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 100 /*Submitted and awaiting approval */\r\norder by ounder.hierarchy, l.submittedon_date, l.account_no', + 'Individual Client Report', 1, 1), + (11, 'Active Loans - Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. loans_in_arrears_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(if(laa.loan_id is not null, l.id, null) )) as loans_in_arrears_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(laa.principal_overdue_derived) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(laa.interest_overdue_derived) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(laa.fee_charges_overdue_derived) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(laa.penalty_charges_overdue_derived) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', + NULL, 1, 1), (12, 'Active Loans - Details', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\npenalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), + (13, 'Obligation Met Loans Details', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client\",\r\nl.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.total_repayment_derived as \"Total Repaid\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", \r\ndate(l.closedon_date) as \"Closed\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), (14, 'Obligation Met Loans Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\ncount(distinct(c.id)) as \"No. of Clients\",\r\ncount(distinct(l.id)) as \"No. of Loans\",\r\nsum(l.principal_amount) as \"Total Loan Amount\", \r\nsum(l.principal_repaid_derived) as \"Total Principal Repaid\",\r\nsum(l.interest_repaid_derived) as \"Total Interest Repaid\",\r\nsum(l.fee_charges_repaid_derived) as \"Total Fees Repaid\",\r\nsum(l.penalty_charges_repaid_derived) as \"Total Penalties Repaid\",\r\nsum(l.interest_waived_derived) as \"Total Interest Waived\",\r\nsum(l.fee_charges_waived_derived) as \"Total Fees Waived\",\r\nsum(l.penalty_charges_waived_derived) as \"Total Penalties Waived\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by ounder.hierarchy, l.currency_code\r\norder by ounder.hierarchy, l.currency_code', + 'Individual Client \n\nReport', 1, 1), + (15, 'Portfolio at Risk', 'Table', NULL, 'Loan', + 'select x.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from \r\n(select ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.currency_code\r\norder by l.currency_code) x', + 'Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', + 1, 1), (16, 'Portfolio at Risk by Branch', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\",\r\nx.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as \"branch\", ifnull(cur.display_symbol, l.currency_code) as Currency, \r\n\r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', + 'Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', + 1, 1), (20, 'Funds Disbursed Between Dates Summary', 'Table', NULL, 'Fund', + 'select ifnull(f.`name`, \' -\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nround(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office ounder \r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere disbursedon_date between \' ${startDate}\' and \'${endDate}\'\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\ngroup by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)\r\norder by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)', + NULL, 1, 1), (21, 'Funds Disbursed Between Dates Summary by Office', 'Table', NULL, 'Fund', + 'select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n \n\nifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office o\r\n\n\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c \n\non c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\n\n\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand o.id = ${officeId}\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand \n\n(l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\ngroup by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, \n\nl.currency_code)\r\norder by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)', + NULL, 1, 1), + (48, 'Balance Sheet', 'Pentaho', NULL, 'Accounting', NULL, 'Balance Sheet', 1, 1), + (49, 'Income Statement', 'Pentaho', NULL, 'Accounting', NULL, 'Profit and Loss Statement', 1, 1), + (50, 'Trial Balance', 'Pentaho', NULL, 'Accounting', NULL, 'Trial Balance Report', 1, 1), + (51, 'Written-Off Loans', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Written-Off Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Written-Off Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Written-Off Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Written-Off Penalties\',\r\nn.note AS \'Reason For Write-Off\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 6 /*write-off */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=601\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\") \r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', + 'Individual Lending Report. Written Off Loans', 1, 1), (52, 'Aging Detail', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nmc.account_no as \"Client Account No.\",\r\n mc.display_name AS \"Client Name\",\r\n ml.account_no AS \"Account Number\",\r\n ml.principal_amount AS \"Loan Amount\",\r\n ml.principal_disbursed_derived AS \"Original Principal\",\r\n ml.interest_charged_derived AS \"Original Interest\",\r\n ml.principal_repaid_derived AS \"Principal Paid\",\r\n ml.interest_repaid_derived AS \"Interest Paid\",\r\n laa.principal_overdue_derived AS \"Principal Overdue\",\r\n laa.interest_overdue_derived AS \"Interest Overdue\",\r\nDATEDIFF(CURDATE(), laa.overdue_since_date_derived) as \"Days in Arrears\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<7, \'<1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<8, \' 1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<22, \' 3\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<29, \' 4\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<36, \' 5\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<43, \' 6\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<50, \' 7\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<57, \' 8\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<64, \' 9\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<85, \'12\', \'12+\')))))))))))) )AS \"Weeks In Arrears Band\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<361, \'180 - 360\', \r\n \'> 360\'))))) AS \"Days in Arrears Band\"\r\n\r\n FROM m_office mo \r\n JOIN m_office ounder ON ounder.hierarchy like concat(mo.hierarchy, \'%\')\r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n INNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id\r\n INNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\n left join m_currency cur on cur.code = ml.currency_code\r\n WHERE ml.loan_status_id=300\r\n AND mo.id=${officeId}\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', + 'Loan arrears aging (Weeks)', 1, 1), + (53, 'Aging Summary (Arrears in Weeks)', 'Table', NULL, 'Loan', + 'SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Weeks In Arrears (Up To)\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'1\',2 UNION\r\n SELECT \'2\',3 UNION\r\n SELECT \'3\',4 UNION\r\n SELECT \'4\',5 UNION\r\n SELECT \'5\',6 UNION\r\n SELECT \'6\',7 UNION\r\n SELECT \'7\',8 UNION\r\n SELECT \'8\',9 UNION\r\n SELECT \'9\',10 UNION\r\n SELECT \'10\',11 UNION\r\n SELECT \'11\',12 UNION\r\n SELECT \'12\',13 UNION\r\n SELECT \'12+\',14) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<8, \'1\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<22, \'3\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<29, \'4\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<36, \'5\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<43, \'6\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<50, \'7\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<57, \'8\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<64, \'9\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<85, \'12\',\r\n \'12+\'))))))))))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid', + 'Loan amount in arrears by branch', 1, 1), (54, 'Rescheduled Loans', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Rescheduled Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Rescheduled Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Rescheduled Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Rescheduled Penalties\',\r\nn.note AS \'Reason For Rescheduling\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 7 /*marked for rescheduling */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=602\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', + 'Individual Lending Report. Rescheduled Loans. The ability to reschedule (or mark that you have rescheduled the loan elsewhere) is a legacy of the older Mifos product. Needed for migration.', + 1, 1), + (55, 'Active Loans Passed Final Maturity', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), + (56, 'Active Loans Passed Final Maturity Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', + NULL, 1, 1), (57, 'Active Loans in last installment', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(lastInstallment.`hierarchy`) - LENGTH(REPLACE(lastInstallment.`hierarchy`, \'.\', \'\')) - 1))), lastInstallment.branch) as \"Office/Branch\",\r\nlastInstallment.Currency,\r\nlastInstallment.`Loan Officer`, \r\nlastInstallment.`Client Account No`, lastInstallment.`Client`, \r\nlastInstallment.`Loan Account No`, lastInstallment.`Product`, \r\nlastInstallment.`Fund`, lastInstallment.`Loan Amount`, \r\nlastInstallment.`Annual Nominal Interest Rate`, \r\nlastInstallment.`Disbursed`, lastInstallment.`Expected Matured On` ,\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\norder by lastInstallment.hierarchy, lastInstallment.Currency, lastInstallment.`Client Account No`, lastInstallment.`Loan Account No`', + 'Individual Client \n\nReport', 1, 1), + (58, 'Active Loans in last installment Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select lastInstallment.branchId as branchId,\r\nlastInstallment.Currency,\r\ncount(distinct(lastInstallment.clientId)) as client_count, \r\ncount(distinct(lastInstallment.loanId)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id as branchId, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.id as clientId, c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\ngroup by lastInstallment.branchId) x on x.branchId = mo.id\r\norder by mo.hierarchy, x.Currency', + 'Individual Client \n\nReport', 1, 1), (59, 'Active Loans by Disbursal Period', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No\", c.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Principal Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\n\r\nl.total_expected_repayment_derived as \"Total Loan (P+I+F+Pen)\",\r\nl.total_repayment_derived as \"Total Repaid (P+I+F+Pen)\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), + (61, 'Aging Summary (Arrears in Months)', 'Table', NULL, 'Loan', + 'SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Days In Arrears\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'0 - 30\',2 UNION\r\n SELECT \'30 - 60\',3 UNION\r\n SELECT \'60 - 90\',4 UNION\r\n SELECT \'90 - 180\',5 UNION\r\n SELECT \'180 - 360\',6 UNION\r\n SELECT \'> 360\',7 ) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<361, \'180 - 360\', \r\n \'> 360\')))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid', + 'Loan amount in arrears by branch', 1, 1), + (91, 'Loan Account Schedule', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 0), + (92, 'Branch Expected Cash Flow', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 1), + (93, 'Expected Payments By Date - Basic', 'Table', NULL, 'Loan', + 'SELECT \r\n ounder.name \'Office\', \r\n IFNULL(ms.display_name,\'-\') \'Loan Officer\',\r\n mc.account_no \'Client Account Number\',\r\n mc.display_name \'Name\',\r\n mp.name \'Product\',\r\n ml.account_no \'Loan Account Number\',\r\n mr.duedate \'Due Date\',\r\n mr.installment \'Installment\',\r\n cu.display_symbol \'Currency\',\r\n mr.principal_amount- IFNULL(mr.principal_completed_derived,0) \'Principal Due\',\r\n mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0) \'Interest Due\', \r\n IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0) \'Fees Due\', \r\n IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0) \'Penalty Due\',\r\n (mr.principal_amount- IFNULL(mr.principal_completed_derived,0)) +\r\n (mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0)) + \r\n (IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0)) + \r\n (IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0)) \'Total Due\', \r\n mlaa.total_overdue_derived \'Total Overdue\'\r\n \r\n FROM m_office mo\r\n JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\n \r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n \r\n LEFT JOIN m_client mc ON mc.office_id=ounder.id\r\n LEFT JOIN m_loan ml ON ml.client_id=mc.id AND ml.loan_status_id=300\r\n LEFT JOIN m_loan_arrears_aging mlaa ON mlaa.loan_id=ml.id\r\n LEFT JOIN m_loan_repayment_schedule mr ON mr.loan_id=ml.id AND mr.completed_derived=0\r\n LEFT JOIN m_product_loan mp ON mp.id=ml.product_id\r\n LEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\n LEFT JOIN m_currency cu ON cu.code=ml.currency_code\r\n WHERE mo.id=${officeId}\r\n AND (IFNULL(ml.loan_officer_id, -10) = \"${loanOfficerId}\" OR \"-1\" = \"${loanOfficerId}\")\r\n AND mr.duedate BETWEEN \'${startDate}\' AND \'${endDate}\'\r\n ORDER BY ounder.id,mr.duedate,ml.account_no', + 'Test', 1, 1), (94, 'Expected Payments By Date - Formatted', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 1); /*!40000 ALTER TABLE `stretchy_report` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `stretchy_report_parameter` @@ -1865,12 +2284,13 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `stretchy_report_parameter`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `stretchy_report_parameter` ( - `report_id` INT NOT NULL, - `parameter_id` INT NOT NULL, - `report_parameter_name` varchar(45) DEFAULT NULL, - PRIMARY KEY (`report_id`,`parameter_id`), - UNIQUE KEY `report_id_name_UNIQUE` (`report_id`,`report_parameter_name`) +CREATE TABLE `stretchy_report_parameter` +( + `report_id` INT NOT NULL, + `parameter_id` INT NOT NULL, + `report_parameter_name` varchar(45) DEFAULT NULL, + PRIMARY KEY (`report_id`, `parameter_id`), + UNIQUE KEY `report_id_name_UNIQUE` (`report_id`,`report_parameter_name`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1878,11 +2298,165 @@ CREATE TABLE `stretchy_report_parameter` ( -- Dumping data for table `stretchy_report_parameter` -- -LOCK TABLES `stretchy_report_parameter` WRITE; +LOCK +TABLES `stretchy_report_parameter` WRITE; /*!40000 ALTER TABLE `stretchy_report_parameter` DISABLE KEYS */; -INSERT INTO `stretchy_report_parameter` VALUES (1,5,NULL),(2,5,NULL),(2,6,NULL),(2,10,NULL),(2,20,NULL),(2,25,NULL),(2,26,NULL),(5,5,NULL),(5,6,NULL),(5,10,NULL),(5,20,NULL),(5,25,NULL),(5,26,NULL),(6,5,NULL),(6,6,NULL),(6,10,NULL),(6,20,NULL),(6,25,NULL),(6,26,NULL),(7,5,NULL),(7,6,NULL),(7,10,NULL),(7,20,NULL),(7,25,NULL),(7,26,NULL),(8,5,NULL),(8,6,NULL),(8,10,NULL),(8,25,NULL),(8,26,NULL),(11,5,NULL),(11,6,NULL),(11,10,NULL),(11,20,NULL),(11,25,NULL),(11,26,NULL),(11,100,NULL),(12,5,NULL),(12,6,NULL),(12,10,NULL),(12,20,NULL),(12,25,NULL),(12,26,NULL),(13,1,NULL),(13,2,NULL),(13,3,NULL),(13,5,NULL),(13,6,NULL),(13,10,NULL),(13,20,NULL),(13,25,NULL),(13,26,NULL),(14,1,NULL),(14,2,NULL),(14,3,NULL),(14,5,NULL),(14,6,NULL),(14,10,NULL),(14,20,NULL),(14,25,NULL),(14,26,NULL),(15,5,NULL),(15,6,NULL),(15,10,NULL),(15,20,NULL),(15,25,NULL),(15,26,NULL),(15,100,NULL),(16,5,NULL),(16,6,NULL),(16,10,NULL),(16,20,NULL),(16,25,NULL),(16,26,NULL),(16,100,NULL),(20,1,NULL),(20,2,NULL),(20,10,NULL),(20,20,NULL),(21,1,NULL),(21,2,NULL),(21,5,NULL),(21,10,NULL),(21,20,NULL),(48,5,'branch'),(48,2,'date'),(49,5,'branch'),(49,1,'fromDate'),(49,2,'toDate'),(50,5,'branch'),(50,1,'fromDate'),(50,2,'toDate'),(51,1,NULL),(51,2,NULL),(51,5,NULL),(51,10,NULL),(51,25,NULL),(52,5,NULL),(53,5,NULL),(53,10,NULL),(54,1,NULL),(54,2,NULL),(54,5,NULL),(54,10,NULL),(54,25,NULL),(55,5,NULL),(55,6,NULL),(55,10,NULL),(55,20,NULL),(55,25,NULL),(55,26,NULL),(56,5,NULL),(56,6,NULL),(56,10,NULL),(56,20,NULL),(56,25,NULL),(56,26,NULL),(56,100,NULL),(57,5,NULL),(57,6,NULL),(57,10,NULL),(57,20,NULL),(57,25,NULL),(57,26,NULL),(58,5,NULL),(58,6,NULL),(58,10,NULL),(58,20,NULL),(58,25,NULL),(58,26,NULL),(58,100,NULL),(59,1,NULL),(59,2,NULL),(59,5,NULL),(59,6,NULL),(59,10,NULL),(59,20,NULL),(59,25,NULL),(59,26,NULL),(61,5,NULL),(61,10,NULL),(92,1,'fromDate'),(92,5,'selectOffice'),(92,2,'toDate'),(93,1,NULL),(93,2,NULL),(93,5,NULL),(93,6,NULL),(94,2,'endDate'),(94,6,'loanOfficerId'),(94,5,'officeId'),(94,1,'startDate'); +INSERT INTO `stretchy_report_parameter` +VALUES (1, 5, NULL), + (2, 5, NULL), + (2, 6, NULL), + (2, 10, NULL), + (2, 20, NULL), + (2, 25, NULL), + (2, 26, NULL), + (5, 5, NULL), + (5, 6, NULL), + (5, 10, NULL), + (5, 20, NULL), + (5, 25, NULL), + (5, 26, NULL), + (6, 5, NULL), + (6, 6, NULL), + (6, 10, NULL), + (6, 20, NULL), + (6, 25, NULL), + (6, 26, NULL), + (7, 5, NULL), + (7, 6, NULL), + (7, 10, NULL), + (7, 20, NULL), + (7, 25, NULL), + (7, 26, NULL), + (8, 5, NULL), + (8, 6, NULL), + (8, 10, NULL), + (8, 25, NULL), + (8, 26, NULL), + (11, 5, NULL), + (11, 6, NULL), + (11, 10, NULL), + (11, 20, NULL), + (11, 25, NULL), + (11, 26, NULL), + (11, 100, NULL), + (12, 5, NULL), + (12, 6, NULL), + (12, 10, NULL), + (12, 20, NULL), + (12, 25, NULL), + (12, 26, NULL), + (13, 1, NULL), + (13, 2, NULL), + (13, 3, NULL), + (13, 5, NULL), + (13, 6, NULL), + (13, 10, NULL), + (13, 20, NULL), + (13, 25, NULL), + (13, 26, NULL), + (14, 1, NULL), + (14, 2, NULL), + (14, 3, NULL), + (14, 5, NULL), + (14, 6, NULL), + (14, 10, NULL), + (14, 20, NULL), + (14, 25, NULL), + (14, 26, NULL), + (15, 5, NULL), + (15, 6, NULL), + (15, 10, NULL), + (15, 20, NULL), + (15, 25, NULL), + (15, 26, NULL), + (15, 100, NULL), + (16, 5, NULL), + (16, 6, NULL), + (16, 10, NULL), + (16, 20, NULL), + (16, 25, NULL), + (16, 26, NULL), + (16, 100, NULL), + (20, 1, NULL), + (20, 2, NULL), + (20, 10, NULL), + (20, 20, NULL), + (21, 1, NULL), + (21, 2, NULL), + (21, 5, NULL), + (21, 10, NULL), + (21, 20, NULL), + (48, 5, 'branch'), + (48, 2, 'date'), + (49, 5, 'branch'), + (49, 1, 'fromDate'), + (49, 2, 'toDate'), + (50, 5, 'branch'), + (50, 1, 'fromDate'), + (50, 2, 'toDate'), + (51, 1, NULL), + (51, 2, NULL), + (51, 5, NULL), + (51, 10, NULL), + (51, 25, NULL), + (52, 5, NULL), + (53, 5, NULL), + (53, 10, NULL), + (54, 1, NULL), + (54, 2, NULL), + (54, 5, NULL), + (54, 10, NULL), + (54, 25, NULL), + (55, 5, NULL), + (55, 6, NULL), + (55, 10, NULL), + (55, 20, NULL), + (55, 25, NULL), + (55, 26, NULL), + (56, 5, NULL), + (56, 6, NULL), + (56, 10, NULL), + (56, 20, NULL), + (56, 25, NULL), + (56, 26, NULL), + (56, 100, NULL), + (57, 5, NULL), + (57, 6, NULL), + (57, 10, NULL), + (57, 20, NULL), + (57, 25, NULL), + (57, 26, NULL), + (58, 5, NULL), + (58, 6, NULL), + (58, 10, NULL), + (58, 20, NULL), + (58, 25, NULL), + (58, 26, NULL), + (58, 100, NULL), + (59, 1, NULL), + (59, 2, NULL), + (59, 5, NULL), + (59, 6, NULL), + (59, 10, NULL), + (59, 20, NULL), + (59, 25, NULL), + (59, 26, NULL), + (61, 5, NULL), + (61, 10, NULL), + (92, 1, 'fromDate'), + (92, 5, 'selectOffice'), + (92, 2, 'toDate'), + (93, 1, NULL), + (93, 2, NULL), + (93, 5, NULL), + (93, 6, NULL), + (94, 2, 'endDate'), + (94, 6, 'loanOfficerId'), + (94, 5, 'officeId'), + (94, 1, 'startDate'); /*!40000 ALTER TABLE `stretchy_report_parameter` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `x_registered_table` @@ -1891,10 +2465,11 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `x_registered_table`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `x_registered_table` ( - `registered_table_name` varchar(50) NOT NULL, - `application_table_name` varchar(50) NOT NULL, - PRIMARY KEY (`registered_table_name`) +CREATE TABLE `x_registered_table` +( + `registered_table_name` varchar(50) NOT NULL, + `application_table_name` varchar(50) NOT NULL, + PRIMARY KEY (`registered_table_name`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1902,11 +2477,16 @@ CREATE TABLE `x_registered_table` ( -- Dumping data for table `x_registered_table` -- -LOCK TABLES `x_registered_table` WRITE; +LOCK +TABLES `x_registered_table` WRITE; /*!40000 ALTER TABLE `x_registered_table` DISABLE KEYS */; -INSERT INTO `x_registered_table` VALUES ('extra_client_details','m_client'),('extra_family_details','m_client'),('extra_loan_details','m_loan'); +INSERT INTO `x_registered_table` +VALUES ('extra_client_details', 'm_client'), + ('extra_family_details', 'm_client'), + ('extra_loan_details', 'm_loan'); /*!40000 ALTER TABLE `x_registered_table` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; diff --git a/fineract-db/multi-tenant-demo-backups/default-demo/extra-datatables-and-code-values.sql b/fineract-db/multi-tenant-demo-backups/default-demo/extra-datatables-and-code-values.sql index c8f6059b78e..7309d92409a 100644 --- a/fineract-db/multi-tenant-demo-backups/default-demo/extra-datatables-and-code-values.sql +++ b/fineract-db/multi-tenant-demo-backups/default-demo/extra-datatables-and-code-values.sql @@ -19,104 +19,105 @@ -- add code and code values for datatables dropdowns -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.Male', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "Gender"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.Female', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "Gender"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.Yes', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "YesNo"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'option.No', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "YesNo"; INSERT INTO `m_code` -(`code_name`, `is_system_defined`) -VALUES -('Education',1); + (`code_name`, `is_system_defined`) +VALUES ('Education', 1); -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'Primary', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "Education"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'Secondary', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "Education"; -INSERT INTO `m_code_value`(`code_id`,`code_value`,`order_position`) +INSERT INTO `m_code_value`(`code_id`, `code_value`, `order_position`) select mc.id, 'University', ifnull(max(mv.id), 1) from m_code mc -join m_code_value mv on mv.code_id = mc.id + join m_code_value mv on mv.code_id = mc.id where mc.`code_name` = "Education"; -- ========= datatables======= DROP TABLE IF EXISTS `extra_client_details`; -CREATE TABLE `extra_client_details` ( - `client_id` BIGINT NOT NULL, - `Business Description` varchar(100) DEFAULT NULL, - `Years in Business` INT DEFAULT NULL, - `Gender_cd` INT DEFAULT NULL, - `Education_cv` varchar(60) DEFAULT NULL, - `Next Visit` date DEFAULT NULL, - `Highest Rate Paid` decimal(19,6) DEFAULT NULL, - `Comment` text, - PRIMARY KEY (`client_id`), - CONSTRAINT `FK_extra_client_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `extra_client_details` +( + `client_id` BIGINT NOT NULL, + `Business Description` varchar(100) DEFAULT NULL, + `Years in Business` INT DEFAULT NULL, + `Gender_cd` INT DEFAULT NULL, + `Education_cv` varchar(60) DEFAULT NULL, + `Next Visit` date DEFAULT NULL, + `Highest Rate Paid` decimal(19, 6) DEFAULT NULL, + `Comment` text, + PRIMARY KEY (`client_id`), + CONSTRAINT `FK_extra_client_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; DROP TABLE IF EXISTS `extra_family_details`; -CREATE TABLE `extra_family_details` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `Name` varchar(40) DEFAULT NULL, - `Date of Birth` date DEFAULT NULL, - `Points Score` INT DEFAULT NULL, - `Education_cd_Highest` INT DEFAULT NULL, - `Other Notes` text, - PRIMARY KEY (`id`), - KEY `FK_Extra Family Details Data_1` (`client_id`), - CONSTRAINT `FK_family_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `extra_family_details` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `client_id` BIGINT NOT NULL, + `Name` varchar(40) DEFAULT NULL, + `Date of Birth` date DEFAULT NULL, + `Points Score` INT DEFAULT NULL, + `Education_cd_Highest` INT DEFAULT NULL, + `Other Notes` text, + PRIMARY KEY (`id`), + KEY `FK_Extra Family Details Data_1` (`client_id`), + CONSTRAINT `FK_family_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; DROP TABLE IF EXISTS `extra_loan_details`; -CREATE TABLE `extra_loan_details` ( - `loan_id` BIGINT NOT NULL, - `Business Description` varchar(100) DEFAULT NULL, - `Years in Business` INT DEFAULT NULL, - `Gender_cd` INT DEFAULT NULL, - `Education_cv` varchar(60) DEFAULT NULL, - `Next Visit` date DEFAULT NULL, - `Highest Rate Paid` decimal(19,6) DEFAULT NULL, - `Comment` text, - PRIMARY KEY (`loan_id`), - CONSTRAINT `FK_extra_loan_details` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +CREATE TABLE `extra_loan_details` +( + `loan_id` BIGINT NOT NULL, + `Business Description` varchar(100) DEFAULT NULL, + `Years in Business` INT DEFAULT NULL, + `Gender_cd` INT DEFAULT NULL, + `Education_cv` varchar(60) DEFAULT NULL, + `Next Visit` date DEFAULT NULL, + `Highest Rate Paid` decimal(19, 6) DEFAULT NULL, + `Comment` text, + PRIMARY KEY (`loan_id`), + CONSTRAINT `FK_extra_loan_details` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- datatables mapping INSERT INTO `x_registered_table` -(`registered_table_name`,`application_table_name`) -VALUES -('extra_client_details', 'm_client'), -('extra_family_details', 'm_client'), -('extra_loan_details', 'm_loan'); + (`registered_table_name`, `application_table_name`) +VALUES ('extra_client_details', 'm_client'), + ('extra_family_details', 'm_client'), + ('extra_loan_details', 'm_loan'); -- make sure permissions created for registered datatables @@ -138,103 +139,103 @@ select 'datatable', concat('DELETE_', r.registered_table_name), r.registered_tab from x_registered_table r; - -- ==== Chart of Accounts ===== truncate `acc_gl_account`; -INSERT INTO `acc_gl_account` VALUES -(1,'Petty Cash Balances',NULL,'11100',0,1,2,1,NULL), -(2,'Cash in Valut 1',NULL,'11101',0,1,1,1,NULL), -(3,'Bank Balances',NULL,'11200',0,1,2,1,NULL), -(4,'Centenary Opening Account',NULL,'11201',0,1,1,1,NULL), -(5,'Centenary Expense Account',NULL,'11202',0,1,1,1,NULL), -(6,'Centenary USD Account',NULL,'11203',0,1,1,1,NULL), -(7,'Loans and Advances',NULL,'13100',0,1,2,1,NULL), -(8,'Loans to Clients',NULL,'13101',0,1,1,1,NULL), -(9,'Outstanding Interest',NULL,'13102',0,1,1,1,NULL), -(10,'Outstanding Late Payment Interest',NULL,'13103',0,1,1,1,NULL), -(11,'Outstanding Bank Fees to be collected',NULL,'13104',0,1,1,1,NULL), -(12,'WriteOff Accounts',NULL,'13200',0,1,2,1,NULL), -(13,'Write-offs (use for funds coming in)',NULL,'13201',0,1,1,1,NULL), -(14,'Write-offs outstanding principal',NULL,'13202',0,1,1,1,NULL), -(15,'Write-offs outstanding interest',NULL,'13203',0,1,1,1,NULL), -(16,'Write-offs collected bank fees',NULL,'13204',0,1,1,1,NULL), -(17,'Write-offs hardware/furniture',NULL,'13205',0,1,1,1,NULL), -(18,'Fixed Assets',NULL,'14100',0,1,2,1,NULL), -(19,'Office Equipment',NULL,'14101',0,1,1,1,NULL), -(20,'Suspense Items (unidentified deposits)',NULL,'15000',0,1,2,1,NULL), -(21,'Assets',NULL,'10000',0,1,2,1,NULL), -(22,'Liabilities',NULL,'20000',0,1,2,2,NULL), -(23,'Shares Account',NULL,'26100',0,1,2,2,NULL), -(24,'Shares Captial',NULL,'26101',0,1,1,2,NULL), -(25,'Donated Equity',NULL,'26300',0,1,2,2,NULL), -(26,'Donated Equity Ameropa Foundation',NULL,'26301',0,1,1,2,NULL), -(27,'Donated Equity e.h',NULL,'26302',0,1,1,2,NULL), -(28,'Overpaid Amounts',NULL,'27000',0,1,2,2,NULL), -(29,'Loss Provision',NULL,'28000',0,1,2,2,NULL), -(30,'Provision Outstanding Principal',NULL,'28001',0,1,1,2,NULL), -(31,'Provision Oustanding Interest',NULL,'28002',0,1,1,2,NULL),(32,'Income',NULL,'30000',0,1,2,4,NULL), -(33,'Interest Income from Loans',NULL,'31100',0,1,2,4,NULL), -(34,'Interest on Loans',NULL,'31101',0,1,1,4,NULL), -(35,'Late Payment Interest',NULL,'31102',0,1,1,4,NULL), -(36,'Income from Micro credit & Lending Activities',NULL,'31300',0,1,2,4,NULL), -(37,'Collected Bank Fees Receivable',NULL,'6201',0,1,1,4,NULL), -(38,'Deposits from Loans Write Off',NULL,'31400',0,1,2,4,NULL), -(39,'Expenditure',NULL,'40000',0,1,2,5,NULL), -(40,'Office Expenditure Account',NULL,'42100',0,1,2,5,NULL), -(41,'Water Charges',NULL,'42102',0,1,1,5,NULL), -(42,'Electricity Charges',NULL,'42103',0,1,1,5,NULL), -(43,'Printing and Stationary',NULL,'42105',0,1,1,5,NULL), -(44,'Office Rent',NULL,'42107',0,1,1,5,NULL), -(45,'Marketing Expense',NULL,'42109',0,1,1,5,NULL), -(46,'Office utilities',NULL,'42112',0,1,1,5,'(supplies, toiletries, kitchen)'), -(47,'Furniture',NULL,'42113',0,1,1,5,NULL), -(48,'CEDA Meeting Expense',NULL,'42114',0,1,1,5,NULL), -(49,'Employee Personal Expsense Account',NULL,'42200',0,1,2,5,NULL), -(50,'Salary Alice',NULL,'42201',0,1,1,5,NULL), -(51,'Salary Irene',NULL,'42202',0,1,1,5,NULL), -(52,'Salary Richard',NULL,'42203',0,1,1,5,NULL), -(53,'Salary Loan Officer TBA',NULL,'42204',0,1,1,5,NULL), -(54,'Medical Insurance Alice & Family',NULL,'42205',0,1,1,5,NULL), -(55,'Medical Insurance Irene',NULL,'42206',0,1,1,5,NULL), -(56,'Medical Insurance Richard',NULL,'42207',0,1,1,5,NULL), -(57,'Medical Insurance Loan Officer TBA',NULL,'42208',0,1,1,5,NULL), -(58,'PAYE all employees',NULL,'42209',0,1,1,5,NULL), -(59,'NSSF all employees',NULL,'42210',0,1,1,5,NULL), -(60,'Lunch Allowances all employees',NULL,'42211',0,1,1,5,NULL), -(61,'IT software and maintenance',NULL,'42300',0,1,2,5,NULL), -(62,'Mifos maintenance contract 12 months',NULL,'42301',0,1,1,5,NULL), -(63,'VPS Contract 12 months',NULL,'42302',0,1,1,5,NULL), -(64,'Bulk SMS Service',NULL,'42303',0,1,1,5,NULL), -(65,'Support Accounting Software',NULL,'42304',0,1,1,5,NULL), -(66,'Mifos Instance Setup',NULL,'42305',0,1,1,5,NULL), -(67,'Misc support expense',NULL,'42306',0,1,1,5,NULL), -(68,'Warid Mobile Line',NULL,'42307',0,1,1,5,NULL), -(69,'Landline',NULL,'42308',0,1,1,5,NULL), -(70,'Modem Alice',NULL,'42309',0,1,1,5,NULL), -(71,'Modem Irene',NULL,'42310',0,1,1,5,NULL), -(72,'Modem Richard',NULL,'42311',0,1,1,5,NULL), -(73,'Repairs',NULL,'42312',0,1,1,5,NULL), -(74,'Airtime Expenses',NULL,'42400',0,1,2,5,NULL), -(75,'Airtime Alice',NULL,'42401',0,1,1,5,NULL), -(76,'Airtime Richard',NULL,'42402',0,1,1,5,NULL), -(77,'Airtime Loan Office TBA',NULL,'42403',0,1,1,5,NULL), -(78,'Special Airtime Alice',NULL,'42404',0,1,1,5,NULL), -(79,'Transportation',NULL,'42500',0,1,2,5,NULL), -(80,'Flat monthly transportation cost',NULL,'42501',0,1,1,5,NULL), -(81,'Faciliation cost for Richard',NULL,'42502',0,1,1,5,NULL), -(82,'Faciliation cost for Loan Officer TBA',NULL,'42503',0,1,1,5,NULL), -(83,'Consultancy Expenses',NULL,'42600',0,1,2,5,NULL), -(84,'Audit Fees',NULL,'42601',0,1,1,5,NULL), -(85,'Legal Fees',NULL,'42602',0,1,1,5,NULL), -(86,'Miscellaneous Expenses Account',NULL,'42700',0,1,2,5,NULL), -(87,'MFI License',NULL,'42703',0,1,1,5,NULL), -(88,'Sundy Expenses',NULL,'42704',0,1,1,5,NULL), -(89,'Bank Fees',NULL,'42800',0,1,2,5,NULL), -(90,'Bank Charges Operating Account',NULL,'42801',0,1,1,5,NULL), -(91,'Bank Charges Expense Account',NULL,'42802',0,1,1,5,NULL), -(92,'E.H Account',NULL,'42900',0,1,2,5,NULL), -(93,'Airtime',NULL,'42901',0,1,1,5,NULL), -(94,'Modem',NULL,'42902',0,1,1,5,NULL), -(95,'Meals',NULL,'42903',0,1,1,5,NULL), -(96,'Transportation',NULL,'42904',0,1,1,5,NULL), -(97,'Miscellaneous',NULL,'42905',0,1,1,5,NULL); +INSERT INTO `acc_gl_account` +VALUES (1, 'Petty Cash Balances', NULL, '11100', 0, 1, 2, 1, NULL), + (2, 'Cash in Valut 1', NULL, '11101', 0, 1, 1, 1, NULL), + (3, 'Bank Balances', NULL, '11200', 0, 1, 2, 1, NULL), + (4, 'Centenary Opening Account', NULL, '11201', 0, 1, 1, 1, NULL), + (5, 'Centenary Expense Account', NULL, '11202', 0, 1, 1, 1, NULL), + (6, 'Centenary USD Account', NULL, '11203', 0, 1, 1, 1, NULL), + (7, 'Loans and Advances', NULL, '13100', 0, 1, 2, 1, NULL), + (8, 'Loans to Clients', NULL, '13101', 0, 1, 1, 1, NULL), + (9, 'Outstanding Interest', NULL, '13102', 0, 1, 1, 1, NULL), + (10, 'Outstanding Late Payment Interest', NULL, '13103', 0, 1, 1, 1, NULL), + (11, 'Outstanding Bank Fees to be collected', NULL, '13104', 0, 1, 1, 1, NULL), + (12, 'WriteOff Accounts', NULL, '13200', 0, 1, 2, 1, NULL), + (13, 'Write-offs (use for funds coming in)', NULL, '13201', 0, 1, 1, 1, NULL), + (14, 'Write-offs outstanding principal', NULL, '13202', 0, 1, 1, 1, NULL), + (15, 'Write-offs outstanding interest', NULL, '13203', 0, 1, 1, 1, NULL), + (16, 'Write-offs collected bank fees', NULL, '13204', 0, 1, 1, 1, NULL), + (17, 'Write-offs hardware/furniture', NULL, '13205', 0, 1, 1, 1, NULL), + (18, 'Fixed Assets', NULL, '14100', 0, 1, 2, 1, NULL), + (19, 'Office Equipment', NULL, '14101', 0, 1, 1, 1, NULL), + (20, 'Suspense Items (unidentified deposits)', NULL, '15000', 0, 1, 2, 1, NULL), + (21, 'Assets', NULL, '10000', 0, 1, 2, 1, NULL), + (22, 'Liabilities', NULL, '20000', 0, 1, 2, 2, NULL), + (23, 'Shares Account', NULL, '26100', 0, 1, 2, 2, NULL), + (24, 'Shares Captial', NULL, '26101', 0, 1, 1, 2, NULL), + (25, 'Donated Equity', NULL, '26300', 0, 1, 2, 2, NULL), + (26, 'Donated Equity Ameropa Foundation', NULL, '26301', 0, 1, 1, 2, NULL), + (27, 'Donated Equity e.h', NULL, '26302', 0, 1, 1, 2, NULL), + (28, 'Overpaid Amounts', NULL, '27000', 0, 1, 2, 2, NULL), + (29, 'Loss Provision', NULL, '28000', 0, 1, 2, 2, NULL), + (30, 'Provision Outstanding Principal', NULL, '28001', 0, 1, 1, 2, NULL), + (31, 'Provision Oustanding Interest', NULL, '28002', 0, 1, 1, 2, NULL), + (32, 'Income', NULL, '30000', 0, 1, 2, 4, NULL), + (33, 'Interest Income from Loans', NULL, '31100', 0, 1, 2, 4, NULL), + (34, 'Interest on Loans', NULL, '31101', 0, 1, 1, 4, NULL), + (35, 'Late Payment Interest', NULL, '31102', 0, 1, 1, 4, NULL), + (36, 'Income from Micro credit & Lending Activities', NULL, '31300', 0, 1, 2, 4, NULL), + (37, 'Collected Bank Fees Receivable', NULL, '6201', 0, 1, 1, 4, NULL), + (38, 'Deposits from Loans Write Off', NULL, '31400', 0, 1, 2, 4, NULL), + (39, 'Expenditure', NULL, '40000', 0, 1, 2, 5, NULL), + (40, 'Office Expenditure Account', NULL, '42100', 0, 1, 2, 5, NULL), + (41, 'Water Charges', NULL, '42102', 0, 1, 1, 5, NULL), + (42, 'Electricity Charges', NULL, '42103', 0, 1, 1, 5, NULL), + (43, 'Printing and Stationary', NULL, '42105', 0, 1, 1, 5, NULL), + (44, 'Office Rent', NULL, '42107', 0, 1, 1, 5, NULL), + (45, 'Marketing Expense', NULL, '42109', 0, 1, 1, 5, NULL), + (46, 'Office utilities', NULL, '42112', 0, 1, 1, 5, '(supplies, toiletries, kitchen)'), + (47, 'Furniture', NULL, '42113', 0, 1, 1, 5, NULL), + (48, 'CEDA Meeting Expense', NULL, '42114', 0, 1, 1, 5, NULL), + (49, 'Employee Personal Expsense Account', NULL, '42200', 0, 1, 2, 5, NULL), + (50, 'Salary Alice', NULL, '42201', 0, 1, 1, 5, NULL), + (51, 'Salary Irene', NULL, '42202', 0, 1, 1, 5, NULL), + (52, 'Salary Richard', NULL, '42203', 0, 1, 1, 5, NULL), + (53, 'Salary Loan Officer TBA', NULL, '42204', 0, 1, 1, 5, NULL), + (54, 'Medical Insurance Alice & Family', NULL, '42205', 0, 1, 1, 5, NULL), + (55, 'Medical Insurance Irene', NULL, '42206', 0, 1, 1, 5, NULL), + (56, 'Medical Insurance Richard', NULL, '42207', 0, 1, 1, 5, NULL), + (57, 'Medical Insurance Loan Officer TBA', NULL, '42208', 0, 1, 1, 5, NULL), + (58, 'PAYE all employees', NULL, '42209', 0, 1, 1, 5, NULL), + (59, 'NSSF all employees', NULL, '42210', 0, 1, 1, 5, NULL), + (60, 'Lunch Allowances all employees', NULL, '42211', 0, 1, 1, 5, NULL), + (61, 'IT software and maintenance', NULL, '42300', 0, 1, 2, 5, NULL), + (62, 'Mifos maintenance contract 12 months', NULL, '42301', 0, 1, 1, 5, NULL), + (63, 'VPS Contract 12 months', NULL, '42302', 0, 1, 1, 5, NULL), + (64, 'Bulk SMS Service', NULL, '42303', 0, 1, 1, 5, NULL), + (65, 'Support Accounting Software', NULL, '42304', 0, 1, 1, 5, NULL), + (66, 'Mifos Instance Setup', NULL, '42305', 0, 1, 1, 5, NULL), + (67, 'Misc support expense', NULL, '42306', 0, 1, 1, 5, NULL), + (68, 'Warid Mobile Line', NULL, '42307', 0, 1, 1, 5, NULL), + (69, 'Landline', NULL, '42308', 0, 1, 1, 5, NULL), + (70, 'Modem Alice', NULL, '42309', 0, 1, 1, 5, NULL), + (71, 'Modem Irene', NULL, '42310', 0, 1, 1, 5, NULL), + (72, 'Modem Richard', NULL, '42311', 0, 1, 1, 5, NULL), + (73, 'Repairs', NULL, '42312', 0, 1, 1, 5, NULL), + (74, 'Airtime Expenses', NULL, '42400', 0, 1, 2, 5, NULL), + (75, 'Airtime Alice', NULL, '42401', 0, 1, 1, 5, NULL), + (76, 'Airtime Richard', NULL, '42402', 0, 1, 1, 5, NULL), + (77, 'Airtime Loan Office TBA', NULL, '42403', 0, 1, 1, 5, NULL), + (78, 'Special Airtime Alice', NULL, '42404', 0, 1, 1, 5, NULL), + (79, 'Transportation', NULL, '42500', 0, 1, 2, 5, NULL), + (80, 'Flat monthly transportation cost', NULL, '42501', 0, 1, 1, 5, NULL), + (81, 'Faciliation cost for Richard', NULL, '42502', 0, 1, 1, 5, NULL), + (82, 'Faciliation cost for Loan Officer TBA', NULL, '42503', 0, 1, 1, 5, NULL), + (83, 'Consultancy Expenses', NULL, '42600', 0, 1, 2, 5, NULL), + (84, 'Audit Fees', NULL, '42601', 0, 1, 1, 5, NULL), + (85, 'Legal Fees', NULL, '42602', 0, 1, 1, 5, NULL), + (86, 'Miscellaneous Expenses Account', NULL, '42700', 0, 1, 2, 5, NULL), + (87, 'MFI License', NULL, '42703', 0, 1, 1, 5, NULL), + (88, 'Sundy Expenses', NULL, '42704', 0, 1, 1, 5, NULL), + (89, 'Bank Fees', NULL, '42800', 0, 1, 2, 5, NULL), + (90, 'Bank Charges Operating Account', NULL, '42801', 0, 1, 1, 5, NULL), + (91, 'Bank Charges Expense Account', NULL, '42802', 0, 1, 1, 5, NULL), + (92, 'E.H Account', NULL, '42900', 0, 1, 2, 5, NULL), + (93, 'Airtime', NULL, '42901', 0, 1, 1, 5, NULL), + (94, 'Modem', NULL, '42902', 0, 1, 1, 5, NULL), + (95, 'Meals', NULL, '42903', 0, 1, 1, 5, NULL), + (96, 'Transportation', NULL, '42904', 0, 1, 1, 5, NULL), + (97, 'Miscellaneous', NULL, '42905', 0, 1, 1, 5, NULL); diff --git a/fineract-db/multi-tenant-demo-backups/gk-maarg/0001b-gk-datatables.sql b/fineract-db/multi-tenant-demo-backups/gk-maarg/0001b-gk-datatables.sql index 62e74bdbb4d..4142474a951 100644 --- a/fineract-db/multi-tenant-demo-backups/gk-maarg/0001b-gk-datatables.sql +++ b/fineract-db/multi-tenant-demo-backups/gk-maarg/0001b-gk-datatables.sql @@ -18,41 +18,42 @@ -- DROP TABLE IF EXISTS `risk_analysis`; -CREATE TABLE `risk_analysis` ( - `client_id` BIGINT NOT NULL, - `proposed_loan_amount` decimal(19,6) DEFAULT NULL, - `assets_cash` decimal(19,6) DEFAULT NULL, - `assets_bank_accounts` decimal(19,6) DEFAULT NULL, - `assets_accounts_receivable` decimal(19,6) DEFAULT NULL, - `assets_inventory` decimal(19,6) DEFAULT NULL, - `assets_total_fixed_business` decimal(19,6) DEFAULT NULL, - `assets_total_business` decimal(19,6) DEFAULT NULL, - `assets_total_household` decimal(19,6) DEFAULT NULL, - `liabilities_accounts_payable` decimal(19,6) DEFAULT NULL, - `liabilities_business_debts` decimal(19,6) DEFAULT NULL, - `liabilities_total_business` decimal(19,6) DEFAULT NULL, - `liabilities_equity_working_capital` decimal(19,6) DEFAULT NULL, - `liabilities_total_household` decimal(19,6) DEFAULT NULL, - `liabilities_household_equity` decimal(19,6) DEFAULT NULL, - `cashflow_cash_sales` decimal(19,6) DEFAULT NULL, - `cashflow_cash_sales2` decimal(19,6) DEFAULT NULL, - `cashflow_cost_goods_sold` decimal(19,6) DEFAULT NULL, - `cashflow_cost_goods_sold2` decimal(19,6) DEFAULT NULL, - `cashflow_gross_profit` decimal(19,6) DEFAULT NULL, - `cashflow_other_income1` decimal(19,6) DEFAULT NULL, - `cashflow_total_income2` decimal(19,6) DEFAULT NULL, - `cashflow_household_expense` decimal(19,6) DEFAULT NULL, - `cashflow_payments_to_savings` decimal(19,6) DEFAULT NULL, - `cashflow_operational_expenses` decimal(19,6) DEFAULT NULL, - `cashflow_disposable_income` decimal(19,6) DEFAULT NULL, - `cashflow_amount_loan_installment` decimal(19,6) DEFAULT NULL, - `cashflow_available_surplus` decimal(19,6) DEFAULT NULL, - `fi_inventory_turnover` decimal(19,6) DEFAULT NULL, - `fi_gross_margin` decimal(19,6) DEFAULT NULL, - `fi_indebtedness` decimal(19,6) DEFAULT NULL, - `fi_loan_recommendation` decimal(19,6) DEFAULT NULL, - `fi_roe` decimal(19,6) DEFAULT NULL, - `fi_repayment_capacity` decimal(19,6) DEFAULT NULL, - PRIMARY KEY (`client_id`), - CONSTRAINT `FK_risk_analysis_1` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `risk_analysis` +( + `client_id` BIGINT NOT NULL, + `proposed_loan_amount` decimal(19, 6) DEFAULT NULL, + `assets_cash` decimal(19, 6) DEFAULT NULL, + `assets_bank_accounts` decimal(19, 6) DEFAULT NULL, + `assets_accounts_receivable` decimal(19, 6) DEFAULT NULL, + `assets_inventory` decimal(19, 6) DEFAULT NULL, + `assets_total_fixed_business` decimal(19, 6) DEFAULT NULL, + `assets_total_business` decimal(19, 6) DEFAULT NULL, + `assets_total_household` decimal(19, 6) DEFAULT NULL, + `liabilities_accounts_payable` decimal(19, 6) DEFAULT NULL, + `liabilities_business_debts` decimal(19, 6) DEFAULT NULL, + `liabilities_total_business` decimal(19, 6) DEFAULT NULL, + `liabilities_equity_working_capital` decimal(19, 6) DEFAULT NULL, + `liabilities_total_household` decimal(19, 6) DEFAULT NULL, + `liabilities_household_equity` decimal(19, 6) DEFAULT NULL, + `cashflow_cash_sales` decimal(19, 6) DEFAULT NULL, + `cashflow_cash_sales2` decimal(19, 6) DEFAULT NULL, + `cashflow_cost_goods_sold` decimal(19, 6) DEFAULT NULL, + `cashflow_cost_goods_sold2` decimal(19, 6) DEFAULT NULL, + `cashflow_gross_profit` decimal(19, 6) DEFAULT NULL, + `cashflow_other_income1` decimal(19, 6) DEFAULT NULL, + `cashflow_total_income2` decimal(19, 6) DEFAULT NULL, + `cashflow_household_expense` decimal(19, 6) DEFAULT NULL, + `cashflow_payments_to_savings` decimal(19, 6) DEFAULT NULL, + `cashflow_operational_expenses` decimal(19, 6) DEFAULT NULL, + `cashflow_disposable_income` decimal(19, 6) DEFAULT NULL, + `cashflow_amount_loan_installment` decimal(19, 6) DEFAULT NULL, + `cashflow_available_surplus` decimal(19, 6) DEFAULT NULL, + `fi_inventory_turnover` decimal(19, 6) DEFAULT NULL, + `fi_gross_margin` decimal(19, 6) DEFAULT NULL, + `fi_indebtedness` decimal(19, 6) DEFAULT NULL, + `fi_loan_recommendation` decimal(19, 6) DEFAULT NULL, + `fi_roe` decimal(19, 6) DEFAULT NULL, + `fi_repayment_capacity` decimal(19, 6) DEFAULT NULL, + PRIMARY KEY (`client_id`), + CONSTRAINT `FK_risk_analysis_1` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; diff --git a/fineract-db/multi-tenant-demo-backups/latam-demo/README.md b/fineract-db/multi-tenant-demo-backups/latam-demo/README.md index df8fe91a7ec..979aaff0c99 100644 --- a/fineract-db/multi-tenant-demo-backups/latam-demo/README.md +++ b/fineract-db/multi-tenant-demo-backups/latam-demo/README.md @@ -5,12 +5,19 @@ This demo database contains: - DDL of latest schema - Minimum reference data required for deployment of platform which is: - - Its mandatory to have one selected currency so we default to several of latin-america currencies - - Its mandatory to have one root or head office, so we have one created by default called a 'Latam HO' - - Permissions supported/needed by latest release of software are setup - - Its mandatory to have at least one role when creating new users so we have one role created by default called 'Super user' which has the special permission 'Full Authorisation'. Any user with this role can do anything in the system. - - Its required to have at least one application user setup so remaining setup can be done through ui so we have on application user created by default with username 'quipo' with a password of 'quipo'. Application users must be associated with an office and a role so this user is associated with 'Latam HO' and 'Super user' role allowing this user to do any operation in any office(branch). + - Its mandatory to have one selected currency so we default to several of latin-america currencies + - Its mandatory to have one root or head office, so we have one created by default called a 'Latam HO' + - Permissions supported/needed by latest release of software are setup + - Its mandatory to have at least one role when creating new users so we have one role created by default called ' + Super user' which has the special permission 'Full Authorisation'. Any user with this role can do anything in the + system. + - Its required to have at least one application user setup so remaining setup can be done through ui so we have on + application user created by default with username 'quipo' with a password of 'quipo'. Application users must be + associated with an office and a role so this user is associated with 'Latam HO' and 'Super user' role allowing + this user to do any operation in any office(branch). - Configuration - - No 'additional data' through the 'datatables' approach is setup - - One 'code' is setup called 'Client Identifier' with default values of {'Passport number'} - (required for Client Identity Document functionalty) - - Enable/Disable configuration has one entry named 'maker-checker' to allow people to enable disable this feature at global level. It is off or disabled by default. + - No 'additional data' through the 'datatables' approach is setup + - One 'code' is setup called 'Client Identifier' with default values of {'Passport number'} - (required for Client + Identity Document functionalty) + - Enable/Disable configuration has one entry named 'maker-checker' to allow people to enable disable this feature at + global level. It is off or disabled by default. diff --git a/fineract-db/multi-tenant-demo-backups/latam-demo/bk_latam.sql b/fineract-db/multi-tenant-demo-backups/latam-demo/bk_latam.sql index f45087d7c10..110a0a61a68 100644 --- a/fineract-db/multi-tenant-demo-backups/latam-demo/bk_latam.sql +++ b/fineract-db/multi-tenant-demo-backups/latam-demo/bk_latam.sql @@ -41,20 +41,21 @@ DROP TABLE IF EXISTS `acc_gl_account`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_gl_account` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(45) NOT NULL, - `parent_id` BIGINT DEFAULT NULL, - `gl_code` varchar(45) NOT NULL, - `disabled` tinyint NOT NULL DEFAULT '0', - `manual_journal_entries_allowed` tinyint NOT NULL DEFAULT '1', - `account_usage` tinyint NOT NULL DEFAULT '2', - `classification_enum` SMALLINT NOT NULL, - `description` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `acc_gl_code` (`gl_code`), - KEY `FK_ACC_0000000001` (`parent_id`), - CONSTRAINT `FK_ACC_0000000001` FOREIGN KEY (`parent_id`) REFERENCES `acc_gl_account` (`id`) +CREATE TABLE `acc_gl_account` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(45) NOT NULL, + `parent_id` BIGINT DEFAULT NULL, + `gl_code` varchar(45) NOT NULL, + `disabled` tinyint NOT NULL DEFAULT '0', + `manual_journal_entries_allowed` tinyint NOT NULL DEFAULT '1', + `account_usage` tinyint NOT NULL DEFAULT '2', + `classification_enum` SMALLINT NOT NULL, + `description` varchar(500) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `acc_gl_code` (`gl_code`), + KEY `FK_ACC_0000000001` (`parent_id`), + CONSTRAINT `FK_ACC_0000000001` FOREIGN KEY (`parent_id`) REFERENCES `acc_gl_account` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -62,10 +63,12 @@ CREATE TABLE `acc_gl_account` ( -- Dumping data for table `acc_gl_account` -- -LOCK TABLES `acc_gl_account` WRITE; +LOCK +TABLES `acc_gl_account` WRITE; /*!40000 ALTER TABLE `acc_gl_account` DISABLE KEYS */; /*!40000 ALTER TABLE `acc_gl_account` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `acc_gl_closure` @@ -74,24 +77,25 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `acc_gl_closure`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_gl_closure` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `office_id` BIGINT NOT NULL, - `closing_date` date NOT NULL, - `is_deleted` INT NOT NULL DEFAULT '0', - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - `comments` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `office_id_closing_date` (`office_id`,`closing_date`), - KEY `FK_acc_gl_closure_m_office` (`office_id`), - KEY `FK_acc_gl_closure_m_appuser` (`createdby_id`), - KEY `FK_acc_gl_closure_m_appuser_2` (`lastmodifiedby_id`), - CONSTRAINT `FK_acc_gl_closure_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_closure_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_closure_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `acc_gl_closure` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `office_id` BIGINT NOT NULL, + `closing_date` date NOT NULL, + `is_deleted` INT NOT NULL DEFAULT '0', + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + `comments` varchar(500) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `office_id_closing_date` (`office_id`,`closing_date`), + KEY `FK_acc_gl_closure_m_office` (`office_id`), + KEY `FK_acc_gl_closure_m_appuser` (`createdby_id`), + KEY `FK_acc_gl_closure_m_appuser_2` (`lastmodifiedby_id`), + CONSTRAINT `FK_acc_gl_closure_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_closure_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_closure_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -99,10 +103,12 @@ CREATE TABLE `acc_gl_closure` ( -- Dumping data for table `acc_gl_closure` -- -LOCK TABLES `acc_gl_closure` WRITE; +LOCK +TABLES `acc_gl_closure` WRITE; /*!40000 ALTER TABLE `acc_gl_closure` DISABLE KEYS */; /*!40000 ALTER TABLE `acc_gl_closure` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `acc_gl_journal_entry` @@ -111,35 +117,36 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `acc_gl_journal_entry`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_gl_journal_entry` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_id` BIGINT NOT NULL, - `office_id` BIGINT NOT NULL, - `reversal_id` BIGINT DEFAULT NULL, - `transaction_id` varchar(50) NOT NULL, - `reversed` tinyint NOT NULL DEFAULT '0', - `portfolio_generated` tinyint NOT NULL DEFAULT '0', - `entry_date` date NOT NULL, - `type_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `entity_type` varchar(50) DEFAULT NULL, - `entity_id` BIGINT DEFAULT NULL, - `createdby_id` BIGINT NOT NULL, - `lastmodifiedby_id` BIGINT NOT NULL, - `created_date` datetime NOT NULL, - `lastmodified_date` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_acc_gl_journal_entry_m_office` (`office_id`), - KEY `FK_acc_gl_journal_entry_m_appuser` (`createdby_id`), - KEY `FK_acc_gl_journal_entry_m_appuser_2` (`lastmodifiedby_id`), - KEY `FK_acc_gl_journal_entry_acc_gl_journal_entry` (`reversal_id`), - KEY `FK_acc_gl_journal_entry_acc_gl_account` (`account_id`), - CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_account` FOREIGN KEY (`account_id`) REFERENCES `acc_gl_account` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_journal_entry` FOREIGN KEY (`reversal_id`) REFERENCES `acc_gl_journal_entry` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `acc_gl_journal_entry` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `account_id` BIGINT NOT NULL, + `office_id` BIGINT NOT NULL, + `reversal_id` BIGINT DEFAULT NULL, + `transaction_id` varchar(50) NOT NULL, + `reversed` tinyint NOT NULL DEFAULT '0', + `portfolio_generated` tinyint NOT NULL DEFAULT '0', + `entry_date` date NOT NULL, + `type_enum` SMALLINT NOT NULL, + `amount` decimal(19, 6) NOT NULL, + `description` varchar(500) DEFAULT NULL, + `entity_type` varchar(50) DEFAULT NULL, + `entity_id` BIGINT DEFAULT NULL, + `createdby_id` BIGINT NOT NULL, + `lastmodifiedby_id` BIGINT NOT NULL, + `created_date` datetime NOT NULL, + `lastmodified_date` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `FK_acc_gl_journal_entry_m_office` (`office_id`), + KEY `FK_acc_gl_journal_entry_m_appuser` (`createdby_id`), + KEY `FK_acc_gl_journal_entry_m_appuser_2` (`lastmodifiedby_id`), + KEY `FK_acc_gl_journal_entry_acc_gl_journal_entry` (`reversal_id`), + KEY `FK_acc_gl_journal_entry_acc_gl_account` (`account_id`), + CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_account` FOREIGN KEY (`account_id`) REFERENCES `acc_gl_account` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_journal_entry` FOREIGN KEY (`reversal_id`) REFERENCES `acc_gl_journal_entry` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -147,10 +154,12 @@ CREATE TABLE `acc_gl_journal_entry` ( -- Dumping data for table `acc_gl_journal_entry` -- -LOCK TABLES `acc_gl_journal_entry` WRITE; +LOCK +TABLES `acc_gl_journal_entry` WRITE; /*!40000 ALTER TABLE `acc_gl_journal_entry` DISABLE KEYS */; /*!40000 ALTER TABLE `acc_gl_journal_entry` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `acc_product_mapping` @@ -159,13 +168,14 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `acc_product_mapping`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `acc_product_mapping` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `gl_account_id` BIGINT DEFAULT NULL, - `product_id` BIGINT DEFAULT NULL, - `product_type` SMALLINT DEFAULT NULL, - `financial_account_type` SMALLINT DEFAULT NULL, - PRIMARY KEY (`id`) +CREATE TABLE `acc_product_mapping` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `gl_account_id` BIGINT DEFAULT NULL, + `product_id` BIGINT DEFAULT NULL, + `product_type` SMALLINT DEFAULT NULL, + `financial_account_type` SMALLINT DEFAULT NULL, + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -173,10 +183,12 @@ CREATE TABLE `acc_product_mapping` ( -- Dumping data for table `acc_product_mapping` -- -LOCK TABLES `acc_product_mapping` WRITE; +LOCK +TABLES `acc_product_mapping` WRITE; /*!40000 ALTER TABLE `acc_product_mapping` DISABLE KEYS */; /*!40000 ALTER TABLE `acc_product_mapping` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `c_configuration` @@ -185,11 +197,12 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `c_configuration`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `c_configuration` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(50) DEFAULT NULL, - `enabled` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) +CREATE TABLE `c_configuration` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(50) DEFAULT NULL, + `enabled` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -197,11 +210,14 @@ CREATE TABLE `c_configuration` ( -- Dumping data for table `c_configuration` -- -LOCK TABLES `c_configuration` WRITE; +LOCK +TABLES `c_configuration` WRITE; /*!40000 ALTER TABLE `c_configuration` DISABLE KEYS */; -INSERT INTO `c_configuration` VALUES (1,'maker-checker',0); +INSERT INTO `c_configuration` +VALUES (1, 'maker-checker', 0); /*!40000 ALTER TABLE `c_configuration` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `extra_client_details` @@ -210,17 +226,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `extra_client_details`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `extra_client_details` ( - `client_id` BIGINT NOT NULL, - `Business Description` varchar(100) DEFAULT NULL, - `Years in Business` INT DEFAULT NULL, - `Gender_cd` INT DEFAULT NULL, - `Education_cv` varchar(60) DEFAULT NULL, - `Next Visit` date DEFAULT NULL, - `Highest Rate Paid` decimal(19,6) DEFAULT NULL, - `Comment` text, - PRIMARY KEY (`client_id`), - CONSTRAINT `FK_latam_extra_client_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `extra_client_details` +( + `client_id` BIGINT NOT NULL, + `Business Description` varchar(100) DEFAULT NULL, + `Years in Business` INT DEFAULT NULL, + `Gender_cd` INT DEFAULT NULL, + `Education_cv` varchar(60) DEFAULT NULL, + `Next Visit` date DEFAULT NULL, + `Highest Rate Paid` decimal(19, 6) DEFAULT NULL, + `Comment` text, + PRIMARY KEY (`client_id`), + CONSTRAINT `FK_latam_extra_client_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -228,10 +245,12 @@ CREATE TABLE `extra_client_details` ( -- Dumping data for table `extra_client_details` -- -LOCK TABLES `extra_client_details` WRITE; +LOCK +TABLES `extra_client_details` WRITE; /*!40000 ALTER TABLE `extra_client_details` DISABLE KEYS */; /*!40000 ALTER TABLE `extra_client_details` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `extra_family_details` @@ -240,17 +259,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `extra_family_details`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `extra_family_details` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `Name` varchar(40) DEFAULT NULL, - `Date of Birth` date DEFAULT NULL, - `Points Score` INT DEFAULT NULL, - `Education_cd_Highest` INT DEFAULT NULL, - `Other Notes` text, - PRIMARY KEY (`id`), - KEY `FK_Extra Family Details Data_1` (`client_id`), - CONSTRAINT `FK_latam_family_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `extra_family_details` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `client_id` BIGINT NOT NULL, + `Name` varchar(40) DEFAULT NULL, + `Date of Birth` date DEFAULT NULL, + `Points Score` INT DEFAULT NULL, + `Education_cd_Highest` INT DEFAULT NULL, + `Other Notes` text, + PRIMARY KEY (`id`), + KEY `FK_Extra Family Details Data_1` (`client_id`), + CONSTRAINT `FK_latam_family_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -258,10 +278,12 @@ CREATE TABLE `extra_family_details` ( -- Dumping data for table `extra_family_details` -- -LOCK TABLES `extra_family_details` WRITE; +LOCK +TABLES `extra_family_details` WRITE; /*!40000 ALTER TABLE `extra_family_details` DISABLE KEYS */; /*!40000 ALTER TABLE `extra_family_details` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `extra_loan_details` @@ -270,17 +292,18 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `extra_loan_details`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `extra_loan_details` ( - `loan_id` BIGINT NOT NULL, - `Business Description` varchar(100) DEFAULT NULL, - `Years in Business` INT DEFAULT NULL, - `Gender_cd` INT DEFAULT NULL, - `Education_cv` varchar(60) DEFAULT NULL, - `Next Visit` date DEFAULT NULL, - `Highest Rate Paid` decimal(19,6) DEFAULT NULL, - `Comment` text, - PRIMARY KEY (`loan_id`), - CONSTRAINT `FK_latam_extra_loan_details` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +CREATE TABLE `extra_loan_details` +( + `loan_id` BIGINT NOT NULL, + `Business Description` varchar(100) DEFAULT NULL, + `Years in Business` INT DEFAULT NULL, + `Gender_cd` INT DEFAULT NULL, + `Education_cv` varchar(60) DEFAULT NULL, + `Next Visit` date DEFAULT NULL, + `Highest Rate Paid` decimal(19, 6) DEFAULT NULL, + `Comment` text, + PRIMARY KEY (`loan_id`), + CONSTRAINT `FK_latam_extra_loan_details` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -288,10 +311,12 @@ CREATE TABLE `extra_loan_details` ( -- Dumping data for table `extra_loan_details` -- -LOCK TABLES `extra_loan_details` WRITE; +LOCK +TABLES `extra_loan_details` WRITE; /*!40000 ALTER TABLE `extra_loan_details` DISABLE KEYS */; /*!40000 ALTER TABLE `extra_loan_details` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_appuser` @@ -300,24 +325,25 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_appuser`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_appuser` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `is_deleted` tinyint NOT NULL DEFAULT '0', - `office_id` BIGINT DEFAULT NULL, - `username` varchar(100) NOT NULL, - `firstname` varchar(100) NOT NULL, - `lastname` varchar(100) NOT NULL, - `password` varchar(255) NOT NULL, - `email` varchar(100) NOT NULL, - `firsttime_login_remaining` bit(1) NOT NULL, - `nonexpired` bit(1) NOT NULL, - `nonlocked` bit(1) NOT NULL, - `nonexpired_credentials` bit(1) NOT NULL, - `enabled` bit(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `username_org` (`username`), - KEY `FKB3D587CE0DD567A` (`office_id`), - CONSTRAINT `FKB3D587CE0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `m_appuser` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `is_deleted` tinyint NOT NULL DEFAULT '0', + `office_id` BIGINT DEFAULT NULL, + `username` varchar(100) NOT NULL, + `firstname` varchar(100) NOT NULL, + `lastname` varchar(100) NOT NULL, + `password` varchar(255) NOT NULL, + `email` varchar(100) NOT NULL, + `firsttime_login_remaining` bit(1) NOT NULL, + `nonexpired` bit(1) NOT NULL, + `nonlocked` bit(1) NOT NULL, + `nonexpired_credentials` bit(1) NOT NULL, + `enabled` bit(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `username_org` (`username`), + KEY `FKB3D587CE0DD567A` (`office_id`), + CONSTRAINT `FKB3D587CE0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -325,11 +351,15 @@ CREATE TABLE `m_appuser` ( -- Dumping data for table `m_appuser` -- -LOCK TABLES `m_appuser` WRITE; +LOCK +TABLES `m_appuser` WRITE; /*!40000 ALTER TABLE `m_appuser` DISABLE KEYS */; -INSERT INTO `m_appuser` VALUES (1,0,1,'mifos','App','Administrator','5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a','demomfi@mifos.org','\0','','','',''); +INSERT INTO `m_appuser` +VALUES (1, 0, 1, 'mifos', 'App', 'Administrator', '5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a', + 'demomfi@mifos.org', '\0', '', '', '', ''); /*!40000 ALTER TABLE `m_appuser` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_appuser_role` @@ -338,14 +368,15 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_appuser_role`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_appuser_role` ( - `appuser_id` BIGINT NOT NULL, - `role_id` BIGINT NOT NULL, - PRIMARY KEY (`appuser_id`,`role_id`), - KEY `FK7662CE59B4100309` (`appuser_id`), - KEY `FK7662CE5915CEC7AB` (`role_id`), - CONSTRAINT `FK7662CE5915CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`), - CONSTRAINT `FK7662CE59B4100309` FOREIGN KEY (`appuser_id`) REFERENCES `m_appuser` (`id`) +CREATE TABLE `m_appuser_role` +( + `appuser_id` BIGINT NOT NULL, + `role_id` BIGINT NOT NULL, + PRIMARY KEY (`appuser_id`, `role_id`), + KEY `FK7662CE59B4100309` (`appuser_id`), + KEY `FK7662CE5915CEC7AB` (`role_id`), + CONSTRAINT `FK7662CE5915CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`), + CONSTRAINT `FK7662CE59B4100309` FOREIGN KEY (`appuser_id`) REFERENCES `m_appuser` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -353,11 +384,14 @@ CREATE TABLE `m_appuser_role` ( -- Dumping data for table `m_appuser_role` -- -LOCK TABLES `m_appuser_role` WRITE; +LOCK +TABLES `m_appuser_role` WRITE; /*!40000 ALTER TABLE `m_appuser_role` DISABLE KEYS */; -INSERT INTO `m_appuser_role` VALUES (1,1); +INSERT INTO `m_appuser_role` +VALUES (1, 1); /*!40000 ALTER TABLE `m_appuser_role` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_charge` @@ -366,19 +400,20 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_charge`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_charge` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL, - `currency_code` varchar(3) NOT NULL, - `charge_applies_to_enum` SMALLINT NOT NULL, - `charge_time_enum` SMALLINT NOT NULL, - `charge_calculation_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `is_penalty` tinyint NOT NULL DEFAULT '0', - `is_active` tinyint NOT NULL, - `is_deleted` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`) +CREATE TABLE `m_charge` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(100) DEFAULT NULL, + `currency_code` varchar(3) NOT NULL, + `charge_applies_to_enum` SMALLINT NOT NULL, + `charge_time_enum` SMALLINT NOT NULL, + `charge_calculation_enum` SMALLINT NOT NULL, + `amount` decimal(19, 6) NOT NULL, + `is_penalty` tinyint NOT NULL DEFAULT '0', + `is_active` tinyint NOT NULL, + `is_deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -386,10 +421,12 @@ CREATE TABLE `m_charge` ( -- Dumping data for table `m_charge` -- -LOCK TABLES `m_charge` WRITE; +LOCK +TABLES `m_charge` WRITE; /*!40000 ALTER TABLE `m_charge` DISABLE KEYS */; /*!40000 ALTER TABLE `m_charge` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_client` @@ -398,24 +435,25 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_client`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_client` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_no` varchar(20) NOT NULL, - `office_id` BIGINT NOT NULL, - `external_id` varchar(100) DEFAULT NULL, - `firstname` varchar(50) DEFAULT NULL, - `middlename` varchar(50) DEFAULT NULL, - `lastname` varchar(50) DEFAULT NULL, - `fullname` varchar(100) DEFAULT NULL, - `display_name` varchar(100) NOT NULL, - `image_key` varchar(500) DEFAULT NULL, - `joined_date` date DEFAULT NULL, - `is_deleted` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `account_no_UNIQUE` (`account_no`), - UNIQUE KEY `external_id` (`external_id`), - KEY `FKCE00CAB3E0DD567A` (`office_id`), - CONSTRAINT `FKCE00CAB3E0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `m_client` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `account_no` varchar(20) NOT NULL, + `office_id` BIGINT NOT NULL, + `external_id` varchar(100) DEFAULT NULL, + `firstname` varchar(50) DEFAULT NULL, + `middlename` varchar(50) DEFAULT NULL, + `lastname` varchar(50) DEFAULT NULL, + `fullname` varchar(100) DEFAULT NULL, + `display_name` varchar(100) NOT NULL, + `image_key` varchar(500) DEFAULT NULL, + `joined_date` date DEFAULT NULL, + `is_deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `account_no_UNIQUE` (`account_no`), + UNIQUE KEY `external_id` (`external_id`), + KEY `FKCE00CAB3E0DD567A` (`office_id`), + CONSTRAINT `FKCE00CAB3E0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -423,10 +461,12 @@ CREATE TABLE `m_client` ( -- Dumping data for table `m_client` -- -LOCK TABLES `m_client` WRITE; +LOCK +TABLES `m_client` WRITE; /*!40000 ALTER TABLE `m_client` DISABLE KEYS */; /*!40000 ALTER TABLE `m_client` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_client_identifier` @@ -435,23 +475,24 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_client_identifier`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_client_identifier` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `document_type_id` INT NOT NULL, - `document_key` varchar(50) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `unique_identifier_key` (`document_type_id`,`document_key`), - UNIQUE KEY `unique_client_identifier` (`client_id`,`document_type_id`), - KEY `FK_m_client_document_m_client` (`client_id`), - KEY `FK_m_client_document_m_code_value` (`document_type_id`), - CONSTRAINT `FK_m_client_document_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FK_m_client_document_m_code_value` FOREIGN KEY (`document_type_id`) REFERENCES `m_code_value` (`id`) +CREATE TABLE `m_client_identifier` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `client_id` BIGINT NOT NULL, + `document_type_id` INT NOT NULL, + `document_key` varchar(50) NOT NULL, + `description` varchar(500) DEFAULT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_identifier_key` (`document_type_id`,`document_key`), + UNIQUE KEY `unique_client_identifier` (`client_id`,`document_type_id`), + KEY `FK_m_client_document_m_client` (`client_id`), + KEY `FK_m_client_document_m_code_value` (`document_type_id`), + CONSTRAINT `FK_m_client_document_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), + CONSTRAINT `FK_m_client_document_m_code_value` FOREIGN KEY (`document_type_id`) REFERENCES `m_code_value` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -459,10 +500,12 @@ CREATE TABLE `m_client_identifier` ( -- Dumping data for table `m_client_identifier` -- -LOCK TABLES `m_client_identifier` WRITE; +LOCK +TABLES `m_client_identifier` WRITE; /*!40000 ALTER TABLE `m_client_identifier` DISABLE KEYS */; /*!40000 ALTER TABLE `m_client_identifier` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_code` @@ -471,12 +514,13 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_code`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_code` ( - `id` INT NOT NULL AUTO_INCREMENT, - `code_name` varchar(100) DEFAULT NULL, - `is_system_defined` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `code_name` (`code_name`) +CREATE TABLE `m_code` +( + `id` INT NOT NULL AUTO_INCREMENT, + `code_name` varchar(100) DEFAULT NULL, + `is_system_defined` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `code_name` (`code_name`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -484,11 +528,16 @@ CREATE TABLE `m_code` ( -- Dumping data for table `m_code` -- -LOCK TABLES `m_code` WRITE; +LOCK +TABLES `m_code` WRITE; /*!40000 ALTER TABLE `m_code` DISABLE KEYS */; -INSERT INTO `m_code` VALUES (1,'Customer Identifier',1),(2,'Gender',1),(3,'Education',1); +INSERT INTO `m_code` +VALUES (1, 'Customer Identifier', 1), + (2, 'Gender', 1), + (3, 'Education', 1); /*!40000 ALTER TABLE `m_code` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_code_value` @@ -497,15 +546,16 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_code_value`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_code_value` ( - `id` INT NOT NULL AUTO_INCREMENT, - `code_id` INT NOT NULL, - `code_value` varchar(100) DEFAULT NULL, - `order_position` INT NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `code_value` (`code_id`,`code_value`), - KEY `FKCFCEA42640BE071Z` (`code_id`), - CONSTRAINT `FKCFCEA42640BE071Z` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`) +CREATE TABLE `m_code_value` +( + `id` INT NOT NULL AUTO_INCREMENT, + `code_id` INT NOT NULL, + `code_value` varchar(100) DEFAULT NULL, + `order_position` INT NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `code_value` (`code_id`,`code_value`), + KEY `FKCFCEA42640BE071Z` (`code_id`), + CONSTRAINT `FKCFCEA42640BE071Z` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -513,11 +563,19 @@ CREATE TABLE `m_code_value` ( -- Dumping data for table `m_code_value` -- -LOCK TABLES `m_code_value` WRITE; +LOCK +TABLES `m_code_value` WRITE; /*!40000 ALTER TABLE `m_code_value` DISABLE KEYS */; -INSERT INTO `m_code_value` VALUES (1,1,'Passport number',0),(2,2,'Male',1),(3,2,'Female',2),(4,3,'Primary',1),(5,3,'Secondary',2),(6,3,'University',3); +INSERT INTO `m_code_value` +VALUES (1, 1, 'Passport number', 0), + (2, 2, 'Male', 1), + (3, 2, 'Female', 2), + (4, 3, 'Primary', 1), + (5, 3, 'Secondary', 2), + (6, 3, 'University', 3); /*!40000 ALTER TABLE `m_code_value` ENABLE KEYS */; -UNLOCK TABLES; +UNLOCK +TABLES; -- -- Table structure for table `m_currency` @@ -526,15 +584,16 @@ UNLOCK TABLES; DROP TABLE IF EXISTS `m_currency`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `m_currency` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `code` varchar(3) NOT NULL, - `decimal_places` SMALLINT NOT NULL, - `display_symbol` varchar(10) DEFAULT NULL, - `name` varchar(50) NOT NULL, - `internationalized_name_code` varchar(50) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `code` (`code`) +CREATE TABLE `m_currency` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `code` varchar(3) NOT NULL, + `decimal_places` SMALLINT NOT NULL, + `display_symbol` varchar(10) DEFAULT NULL, + `name` varchar(50) NOT NULL, + `internationalized_name_code` varchar(50) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) ) ENGINE=InnoDB AUTO_INCREMENT=164 DEFAULT CHARSET=UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; @@ -542,9 +601,151 @@ CREATE TABLE `m_currency` ( -- Dumping data for table `m_currency` -- -LOCK TABLES `m_currency` WRITE; +LOCK +TABLES `m_currency` WRITE; /*!40000 ALTER TABLE `m_currency` DISABLE KEYS */; -INSERT INTO `m_currency` VALUES (1,'AED',2,NULL,'UAE Dirham','currency.AED'),(2,'AFN',2,NULL,'Afghanistan Afghani','currency.AFN'),(3,'ALL',2,NULL,'Albanian Lek','currency.ALL'),(4,'AMD',2,NULL,'Armenian Dram','currency.AMD'),(5,'ANG',2,NULL,'Netherlands Antillian Guilder','currency.ANG'),(6,'AOA',2,NULL,'Angolan Kwanza','currency.AOA'),(7,'ARS',2,'$','Argentine Peso','currency.ARS'),(8,'AUD',2,'A$','Australian Dollar','currency.AUD'),(9,'AWG',2,NULL,'Aruban Guilder','currency.AWG'),(10,'AZM',2,NULL,'Azerbaijanian Manat','currency.AZM'),(11,'BAM',2,NULL,'Bosnia and Herzegovina Convertible Marks','currency.BAM'),(12,'BBD',2,NULL,'Barbados Dollar','currency.BBD'),(13,'BDT',2,NULL,'Bangladesh Taka','currency.BDT'),(14,'BGN',2,NULL,'Bulgarian Lev','currency.BGN'),(15,'BHD',3,NULL,'Bahraini Dinar','currency.BHD'),(16,'BIF',0,NULL,'Burundi Franc','currency.BIF'),(17,'BMD',2,NULL,'Bermudian Dollar','currency.BMD'),(18,'BND',2,'B$','Brunei Dollar','currency.BND'),(19,'BOB',2,'Bs.','Bolivian Boliviano','currency.BOB'),(20,'BRL',2,'R$','Brazilian Real','currency.BRL'),(21,'BSD',2,NULL,'Bahamian Dollar','currency.BSD'),(22,'BTN',2,NULL,'Bhutan Ngultrum','currency.BTN'),(23,'BWP',2,NULL,'Botswana Pula','currency.BWP'),(24,'BYR',0,NULL,'Belarussian Ruble','currency.BYR'),(25,'BZD',2,'BZ$','Belize Dollar','currency.BZD'),(26,'CAD',2,NULL,'Canadian Dollar','currency.CAD'),(27,'CDF',2,NULL,'Franc Congolais','currency.CDF'),(28,'CHF',2,NULL,'Swiss Franc','currency.CHF'),(29,'CLP',0,'$','Chilean Peso','currency.CLP'),(30,'CNY',2,NULL,'Chinese Yuan Renminbi','currency.CNY'),(31,'COP',2,'$','Colombian Peso','currency.COP'),(32,'CRC',2,'₡','Costa Rican Colon','currency.CRC'),(33,'CSD',2,NULL,'Serbian Dinar','currency.CSD'),(34,'CUP',2,'$MN','Cuban Peso','currency.CUP'),(35,'CVE',2,NULL,'Cape Verde Escudo','currency.CVE'),(36,'CYP',2,NULL,'Cyprus Pound','currency.CYP'),(37,'CZK',2,NULL,'Czech Koruna','currency.CZK'),(38,'DJF',0,NULL,'Djibouti Franc','currency.DJF'),(39,'DKK',2,NULL,'Danish Krone','currency.DKK'),(40,'DOP',2,'RD$','Dominican Peso','currency.DOP'),(41,'DZD',2,NULL,'Algerian Dinar','currency.DZD'),(42,'EEK',2,NULL,'Estonian Kroon','currency.EEK'),(43,'EGP',2,NULL,'Egyptian Pound','currency.EGP'),(44,'ERN',2,NULL,'Eritrea Nafka','currency.ERN'),(45,'ETB',2,NULL,'Ethiopian Birr','currency.ETB'),(46,'EUR',2,'€','Euro','currency.EUR'),(47,'FJD',2,NULL,'Fiji Dollar','currency.FJD'),(48,'FKP',2,NULL,'Falkland Islands Pound','currency.FKP'),(49,'GBP',2,NULL,'Pound Sterling','currency.GBP'),(50,'GEL',2,NULL,'Georgian Lari','currency.GEL'),(51,'GHC',2,'GHc','Ghana Cedi','currency.GHC'),(52,'GIP',2,NULL,'Gibraltar Pound','currency.GIP'),(53,'GMD',2,NULL,'Gambian Dalasi','currency.GMD'),(54,'GNF',0,NULL,'Guinea Franc','currency.GNF'),(55,'GTQ',2,'Q','Guatemala Quetzal','currency.GTQ'),(56,'GYD',2,NULL,'Guyana Dollar','currency.GYD'),(57,'HKD',2,NULL,'Hong Kong Dollar','currency.HKD'),(58,'HNL',2,'L','Honduras Lempira','currency.HNL'),(59,'HRK',2,NULL,'Croatian Kuna','currency.HRK'),(60,'HTG',2,'G','Haiti Gourde','currency.HTG'),(61,'HUF',2,NULL,'Hungarian Forint','currency.HUF'),(62,'IDR',2,NULL,'Indonesian Rupiah','currency.IDR'),(63,'ILS',2,NULL,'New Israeli Shekel','currency.ILS'),(64,'INR',2,'₹','Indian Rupee','currency.INR'),(65,'IQD',3,NULL,'Iraqi Dinar','currency.IQD'),(66,'IRR',2,NULL,'Iranian Rial','currency.IRR'),(67,'ISK',0,NULL,'Iceland Krona','currency.ISK'),(68,'JMD',2,NULL,'Jamaican Dollar','currency.JMD'),(69,'JOD',3,NULL,'Jordanian Dinar','currency.JOD'),(70,'JPY',0,NULL,'Japanese Yen','currency.JPY'),(71,'KES',2,'KSh','Kenyan Shilling','currency.KES'),(72,'KGS',2,NULL,'Kyrgyzstan Som','currency.KGS'),(73,'KHR',2,NULL,'Cambodia Riel','currency.KHR'),(74,'KMF',0,NULL,'Comoro Franc','currency.KMF'),(75,'KPW',2,NULL,'North Korean Won','currency.KPW'),(76,'KRW',0,NULL,'Korean Won','currency.KRW'),(77,'KWD',3,NULL,'Kuwaiti Dinar','currency.KWD'),(78,'KYD',2,NULL,'Cayman Islands Dollar','currency.KYD'),(79,'KZT',2,NULL,'Kazakhstan Tenge','currency.KZT'),(80,'LAK',2,NULL,'Lao Kip','currency.LAK'),(81,'LBP',2,'L£','Lebanese Pound','currency.LBP'),(82,'LKR',2,NULL,'Sri Lanka Rupee','currency.LKR'),(83,'LRD',2,NULL,'Liberian Dollar','currency.LRD'),(84,'LSL',2,NULL,'Lesotho Loti','currency.LSL'),(85,'LTL',2,NULL,'Lithuanian Litas','currency.LTL'),(86,'LVL',2,NULL,'Latvian Lats','currency.LVL'),(87,'LYD',3,NULL,'Libyan Dinar','currency.LYD'),(88,'MAD',2,NULL,'Moroccan Dirham','currency.MAD'),(89,'MDL',2,NULL,'Moldovan Leu','currency.MDL'),(90,'MGA',2,NULL,'Malagasy Ariary','currency.MGA'),(91,'MKD',2,NULL,'Macedonian Denar','currency.MKD'),(92,'MMK',2,'K','Myanmar Kyat','currency.MMK'),(93,'MNT',2,NULL,'Mongolian Tugrik','currency.MNT'),(94,'MOP',2,NULL,'Macau Pataca','currency.MOP'),(95,'MRO',2,NULL,'Mauritania Ouguiya','currency.MRO'),(96,'MTL',2,NULL,'Maltese Lira','currency.MTL'),(97,'MUR',2,NULL,'Mauritius Rupee','currency.MUR'),(98,'MVR',2,NULL,'Maldives Rufiyaa','currency.MVR'),(99,'MWK',2,NULL,'Malawi Kwacha','currency.MWK'),(100,'MXN',2,'$','Mexican Peso','currency.MXN'),(101,'MYR',2,NULL,'Malaysian Ringgit','currency.MYR'),(102,'MZM',2,NULL,'Mozambique Metical','currency.MZM'),(103,'NAD',2,NULL,'Namibia Dollar','currency.NAD'),(104,'NGN',2,NULL,'Nigerian Naira','currency.NGN'),(105,'NIO',2,'C$','Nicaragua Cordoba Oro','currency.NIO'),(106,'NOK',2,NULL,'Norwegian Krone','currency.NOK'),(107,'NPR',2,NULL,'Nepalese Rupee','currency.NPR'),(108,'NZD',2,NULL,'New Zealand Dollar','currency.NZD'),(109,'OMR',3,NULL,'Rial Omani','currency.OMR'),(110,'PAB',2,'B/.','Panama Balboa','currency.PAB'),(111,'PEN',2,'S/.','Peruvian Nuevo Sol','currency.PEN'),(112,'PGK',2,NULL,'Papua New Guinea Kina','currency.PGK'),(113,'PHP',2,NULL,'Philippine Peso','currency.PHP'),(114,'PKR',2,NULL,'Pakistan Rupee','currency.PKR'),(115,'PLN',2,NULL,'Polish Zloty','currency.PLN'),(116,'PYG',0,'₲','Paraguayan Guarani','currency.PYG'),(117,'QAR',2,NULL,'Qatari Rial','currency.QAR'),(118,'RON',2,NULL,'Romanian Leu','currency.RON'),(119,'RUB',2,NULL,'Russian Ruble','currency.RUB'),(120,'RWF',0,NULL,'Rwanda Franc','currency.RWF'),(121,'SAR',2,NULL,'Saudi Riyal','currency.SAR'),(122,'SBD',2,NULL,'Solomon Islands Dollar','currency.SBD'),(123,'SCR',2,NULL,'Seychelles Rupee','currency.SCR'),(124,'SDD',2,NULL,'Sudanese Dinar','currency.SDD'),(125,'SEK',2,NULL,'Swedish Krona','currency.SEK'),(126,'SGD',2,NULL,'Singapore Dollar','currency.SGD'),(127,'SHP',2,NULL,'St Helena Pound','currency.SHP'),(128,'SIT',2,NULL,'Slovenian Tolar','currency.SIT'),(129,'SKK',2,NULL,'Slovak Koruna','currency.SKK'),(130,'SLL',2,NULL,'Sierra Leone Leone','currency.SLL'),(131,'SOS',2,NULL,'Somali Shilling','currency.SOS'),(132,'SRD',2,NULL,'Surinam Dollar','currency.SRD'),(133,'STD',2,NULL,'Sao Tome and Principe Dobra','currency.STD'),(134,'SVC',2,NULL,'El Salvador Colon','currency.SVC'),(135,'SYP',2,NULL,'Syrian Pound','currency.SYP'),(136,'SZL',2,NULL,'Swaziland Lilangeni','currency.SZL'),(137,'THB',2,NULL,'Thai Baht','currency.THB'),(138,'TJS',2,NULL,'Tajik Somoni','currency.TJS'),(139,'TMM',2,NULL,'Turkmenistan Manat','currency.TMM'),(140,'TND',3,'DT','Tunisian Dinar','currency.TND'),(141,'TOP',2,NULL,'Tonga Pa\'anga','currency.TOP'),(142,'TRY',2,NULL,'Turkish Lira','currency.TRY'),(143,'TTD',2,NULL,'Trinidad and Tobago Dollar','currency.TTD'),(144,'TWD',2,NULL,'New Taiwan Dollar','currency.TWD'),(145,'TZS',2,NULL,'Tanzanian Shilling','currency.TZS'),(146,'UAH',2,NULL,'Ukraine Hryvnia','currency.UAH'),(147,'UGX',2,'USh','Uganda Shilling','currency.UGX'),(148,'USD',2,'$','US Dollar','currency.USD'),(149,'UYU',2,'$U','Peso Uruguayo','currency.UYU'),(150,'UZS',2,NULL,'Uzbekistan Sum','currency.UZS'),(151,'VEB',2,'Bs.F.','Venezuelan Bolivar','currency.VEB'),(152,'VND',2,NULL,'Vietnamese Dong','currency.VND'),(153,'VUV',0,NULL,'Vanuatu Vatu','currency.VUV'),(154,'WST',2,NULL,'Samoa Tala','currency.WST'),(155,'XAF',0,NULL,'CFA Franc BEAC','currency.XAF'),(156,'XCD',2,NULL,'East Caribbean Dollar','currency.XCD'),(157,'XDR',5,NULL,'SDR (Special Drawing Rights)','currency.XDR'),(158,'XOF',0,'CFA','CFA Franc BCEAO','currency.XOF'),(159,'XPF',0,NULL,'CFP Franc','currency.XPF'),(160,'YER',2,NULL,'Yemeni Rial','currency.YER'),(161,'ZAR',2,'R','South African Rand','currency.ZAR'),(162,'ZMK',2,NULL,'Zambian Kwacha','currency.ZMK'),(163,'ZWD',2,NULL,'Zimbabwe Dollar','currency.ZWD'); +INSERT INTO `m_currency` +VALUES (1, 'AED', 2, NULL, 'UAE Dirham', 'currency.AED'), + (2, 'AFN', 2, NULL, 'Afghanistan Afghani', 'currency.AFN'), + (3, 'ALL', 2, NULL, 'Albanian Lek', 'currency.ALL'), + (4, 'AMD', 2, NULL, 'Armenian Dram', 'currency.AMD'), + (5, 'ANG', 2, NULL, 'Netherlands Antillian Guilder', 'currency.ANG'), + (6, 'AOA', 2, NULL, 'Angolan Kwanza', 'currency.AOA'), + (7, 'ARS', 2, '$', 'Argentine Peso', 'currency.ARS'), + (8, 'AUD', 2, 'A$', 'Australian Dollar', 'currency.AUD'), + (9, 'AWG', 2, NULL, 'Aruban Guilder', 'currency.AWG'), + (10, 'AZM', 2, NULL, 'Azerbaijanian Manat', 'currency.AZM'), + (11, 'BAM', 2, NULL, 'Bosnia and Herzegovina Convertible Marks', 'currency.BAM'), + (12, 'BBD', 2, NULL, 'Barbados Dollar', 'currency.BBD'), + (13, 'BDT', 2, NULL, 'Bangladesh Taka', 'currency.BDT'), + (14, 'BGN', 2, NULL, 'Bulgarian Lev', 'currency.BGN'), + (15, 'BHD', 3, NULL, 'Bahraini Dinar', 'currency.BHD'), + (16, 'BIF', 0, NULL, 'Burundi Franc', 'currency.BIF'), + (17, 'BMD', 2, NULL, 'Bermudian Dollar', 'currency.BMD'), + (18, 'BND', 2, 'B$', 'Brunei Dollar', 'currency.BND'), + (19, 'BOB', 2, 'Bs.', 'Bolivian Boliviano', 'currency.BOB'), + (20, 'BRL', 2, 'R$', 'Brazilian Real', 'currency.BRL'), + (21, 'BSD', 2, NULL, 'Bahamian Dollar', 'currency.BSD'), + (22, 'BTN', 2, NULL, 'Bhutan Ngultrum', 'currency.BTN'), + (23, 'BWP', 2, NULL, 'Botswana Pula', 'currency.BWP'), + (24, 'BYR', 0, NULL, 'Belarussian Ruble', 'currency.BYR'), + (25, 'BZD', 2, 'BZ$', 'Belize Dollar', 'currency.BZD'), + (26, 'CAD', 2, NULL, 'Canadian Dollar', 'currency.CAD'), + (27, 'CDF', 2, NULL, 'Franc Congolais', 'currency.CDF'), + (28, 'CHF', 2, NULL, 'Swiss Franc', 'currency.CHF'), + (29, 'CLP', 0, '$', 'Chilean Peso', 'currency.CLP'), + (30, 'CNY', 2, NULL, 'Chinese Yuan Renminbi', 'currency.CNY'), + (31, 'COP', 2, '$', 'Colombian Peso', 'currency.COP'), + (32, 'CRC', 2, '₡', 'Costa Rican Colon', 'currency.CRC'), + (33, 'CSD', 2, NULL, 'Serbian Dinar', 'currency.CSD'), + (34, 'CUP', 2, '$MN', 'Cuban Peso', 'currency.CUP'), + (35, 'CVE', 2, NULL, 'Cape Verde Escudo', 'currency.CVE'), + (36, 'CYP', 2, NULL, 'Cyprus Pound', 'currency.CYP'), + (37, 'CZK', 2, NULL, 'Czech Koruna', 'currency.CZK'), + (38, 'DJF', 0, NULL, 'Djibouti Franc', 'currency.DJF'), + (39, 'DKK', 2, NULL, 'Danish Krone', 'currency.DKK'), + (40, 'DOP', 2, 'RD$', 'Dominican Peso', 'currency.DOP'), + (41, 'DZD', 2, NULL, 'Algerian Dinar', 'currency.DZD'), + (42, 'EEK', 2, NULL, 'Estonian Kroon', 'currency.EEK'), + (43, 'EGP', 2, NULL, 'Egyptian Pound', 'currency.EGP'), + (44, 'ERN', 2, NULL, 'Eritrea Nafka', 'currency.ERN'), + (45, 'ETB', 2, NULL, 'Ethiopian Birr', 'currency.ETB'), + (46, 'EUR', 2, '€', 'Euro', 'currency.EUR'), + (47, 'FJD', 2, NULL, 'Fiji Dollar', 'currency.FJD'), + (48, 'FKP', 2, NULL, 'Falkland Islands Pound', 'currency.FKP'), + (49, 'GBP', 2, NULL, 'Pound Sterling', 'currency.GBP'), + (50, 'GEL', 2, NULL, 'Georgian Lari', 'currency.GEL'), + (51, 'GHC', 2, 'GHc', 'Ghana Cedi', 'currency.GHC'), + (52, 'GIP', 2, NULL, 'Gibraltar Pound', 'currency.GIP'), + (53, 'GMD', 2, NULL, 'Gambian Dalasi', 'currency.GMD'), + (54, 'GNF', 0, NULL, 'Guinea Franc', 'currency.GNF'), + (55, 'GTQ', 2, 'Q', 'Guatemala Quetzal', 'currency.GTQ'), + (56, 'GYD', 2, NULL, 'Guyana Dollar', 'currency.GYD'), + (57, 'HKD', 2, NULL, 'Hong Kong Dollar', 'currency.HKD'), + (58, 'HNL', 2, 'L', 'Honduras Lempira', 'currency.HNL'), + (59, 'HRK', 2, NULL, 'Croatian Kuna', 'currency.HRK'), + (60, 'HTG', 2, 'G', 'Haiti Gourde', 'currency.HTG'), + (61, 'HUF', 2, NULL, 'Hungarian Forint', 'currency.HUF'), + (62, 'IDR', 2, NULL, 'Indonesian Rupiah', 'currency.IDR'), + (63, 'ILS', 2, NULL, 'New Israeli Shekel', 'currency.ILS'), + (64, 'INR', 2, '₹', 'Indian Rupee', 'currency.INR'), + (65, 'IQD', 3, NULL, 'Iraqi Dinar', 'currency.IQD'), + (66, 'IRR', 2, NULL, 'Iranian Rial', 'currency.IRR'), + (67, 'ISK', 0, NULL, 'Iceland Krona', 'currency.ISK'), + (68, 'JMD', 2, NULL, 'Jamaican Dollar', 'currency.JMD'), + (69, 'JOD', 3, NULL, 'Jordanian Dinar', 'currency.JOD'), + (70, 'JPY', 0, NULL, 'Japanese Yen', 'currency.JPY'), + (71, 'KES', 2, 'KSh', 'Kenyan Shilling', 'currency.KES'), + (72, 'KGS', 2, NULL, 'Kyrgyzstan Som', 'currency.KGS'), + (73, 'KHR', 2, NULL, 'Cambodia Riel', 'currency.KHR'), + (74, 'KMF', 0, NULL, 'Comoro Franc', 'currency.KMF'), + (75, 'KPW', 2, NULL, 'North Korean Won', 'currency.KPW'), + (76, 'KRW', 0, NULL, 'Korean Won', 'currency.KRW'), + (77, 'KWD', 3, NULL, 'Kuwaiti Dinar', 'currency.KWD'), + (78, 'KYD', 2, NULL, 'Cayman Islands Dollar', 'currency.KYD'), + (79, 'KZT', 2, NULL, 'Kazakhstan Tenge', 'currency.KZT'), + (80, 'LAK', 2, NULL, 'Lao Kip', 'currency.LAK'), + (81, 'LBP', 2, 'L£', 'Lebanese Pound', 'currency.LBP'), + (82, 'LKR', 2, NULL, 'Sri Lanka Rupee', 'currency.LKR'), + (83, 'LRD', 2, NULL, 'Liberian Dollar', 'currency.LRD'), + (84, 'LSL', 2, NULL, 'Lesotho Loti', 'currency.LSL'), + (85, 'LTL', 2, NULL, 'Lithuanian Litas', 'currency.LTL'), + (86, 'LVL', 2, NULL, 'Latvian Lats', 'currency.LVL'), + (87, 'LYD', 3, NULL, 'Libyan Dinar', 'currency.LYD'), + (88, 'MAD', 2, NULL, 'Moroccan Dirham', 'currency.MAD'), + (89, 'MDL', 2, NULL, 'Moldovan Leu', 'currency.MDL'), + (90, 'MGA', 2, NULL, 'Malagasy Ariary', 'currency.MGA'), + (91, 'MKD', 2, NULL, 'Macedonian Denar', 'currency.MKD'), + (92, 'MMK', 2, 'K', 'Myanmar Kyat', 'currency.MMK'), + (93, 'MNT', 2, NULL, 'Mongolian Tugrik', 'currency.MNT'), + (94, 'MOP', 2, NULL, 'Macau Pataca', 'currency.MOP'), + (95, 'MRO', 2, NULL, 'Mauritania Ouguiya', 'currency.MRO'), + (96, 'MTL', 2, NULL, 'Maltese Lira', 'currency.MTL'), + (97, 'MUR', 2, NULL, 'Mauritius Rupee', 'currency.MUR'), + (98, 'MVR', 2, NULL, 'Maldives Rufiyaa', 'currency.MVR'), + (99, 'MWK', 2, NULL, 'Malawi Kwacha', 'currency.MWK'), + (100, 'MXN', 2, '$', 'Mexican Peso', 'currency.MXN'), + (101, 'MYR', 2, NULL, 'Malaysian Ringgit', 'currency.MYR'), + (102, 'MZM', 2, NULL, 'Mozambique Metical', 'currency.MZM'), + (103, 'NAD', 2, NULL, 'Namibia Dollar', 'currency.NAD'), + (104, 'NGN', 2, NULL, 'Nigerian Naira', 'currency.NGN'), + (105, 'NIO', 2, 'C$', 'Nicaragua Cordoba Oro', 'currency.NIO'), + (106, 'NOK', 2, NULL, 'Norwegian Krone', 'currency.NOK'), + (107, 'NPR', 2, NULL, 'Nepalese Rupee', 'currency.NPR'), + (108, 'NZD', 2, NULL, 'New Zealand Dollar', 'currency.NZD'), + (109, 'OMR', 3, NULL, 'Rial Omani', 'currency.OMR'), + (110, 'PAB', 2, 'B/.', 'Panama Balboa', 'currency.PAB'), + (111, 'PEN', 2, 'S/.', 'Peruvian Nuevo Sol', 'currency.PEN'), + (112, 'PGK', 2, NULL, 'Papua New Guinea Kina', 'currency.PGK'), + (113, 'PHP', 2, NULL, 'Philippine Peso', 'currency.PHP'), + (114, 'PKR', 2, NULL, 'Pakistan Rupee', 'currency.PKR'), + (115, 'PLN', 2, NULL, 'Polish Zloty', 'currency.PLN'), + (116, 'PYG', 0, '₲', 'Paraguayan Guarani', 'currency.PYG'), + (117, 'QAR', 2, NULL, 'Qatari Rial', 'currency.QAR'), + (118, 'RON', 2, NULL, 'Romanian Leu', 'currency.RON'), + (119, 'RUB', 2, NULL, 'Russian Ruble', 'currency.RUB'), + (120, 'RWF', 0, NULL, 'Rwanda Franc', 'currency.RWF'), + (121, 'SAR', 2, NULL, 'Saudi Riyal', 'currency.SAR'), + (122, 'SBD', 2, NULL, 'Solomon Islands Dollar', 'currency.SBD'), + (123, 'SCR', 2, NULL, 'Seychelles Rupee', 'currency.SCR'), + (124, 'SDD', 2, NULL, 'Sudanese Dinar', 'currency.SDD'), + (125, 'SEK', 2, NULL, 'Swedish Krona', 'currency.SEK'), + (126, 'SGD', 2, NULL, 'Singapore Dollar', 'currency.SGD'), + (127, 'SHP', 2, NULL, 'St Helena Pound', 'currency.SHP'), + (128, 'SIT', 2, NULL, 'Slovenian Tolar', 'currency.SIT'), + (129, 'SKK', 2, NULL, 'Slovak Koruna', 'currency.SKK'), + (130, 'SLL', 2, NULL, 'Sierra Leone Leone', 'currency.SLL'), + (131, 'SOS', 2, NULL, 'Somali Shilling', 'currency.SOS'), + (132, 'SRD', 2, NULL, 'Surinam Dollar', 'currency.SRD'), + (133, 'STD', 2, NULL, 'Sao Tome and Principe Dobra', 'currency.STD'), + (134, 'SVC', 2, NULL, 'El Salvador Colon', 'currency.SVC'), + (135, 'SYP', 2, NULL, 'Syrian Pound', 'currency.SYP'), + (136, 'SZL', 2, NULL, 'Swaziland Lilangeni', 'currency.SZL'), + (137, 'THB', 2, NULL, 'Thai Baht', 'currency.THB'), + (138, 'TJS', 2, NULL, 'Tajik Somoni', 'currency.TJS'), + (139, 'TMM', 2, NULL, 'Turkmenistan Manat', 'currency.TMM'), + (140, 'TND', 3, 'DT', 'Tunisian Dinar', 'currency.TND'), + (141, 'TOP', 2, NULL, 'Tonga Pa\'anga','currency.TOP'),(142,'TRY',2,NULL,'Turkish Lira','currency.TRY'),(143,'TTD',2,NULL,'Trinidad and Tobago Dollar','currency.TTD'),(144,'TWD',2,NULL,'New Taiwan Dollar','currency.TWD'),(145,'TZS',2,NULL,'Tanzanian Shilling','currency.TZS'),(146,'UAH',2,NULL,'Ukraine Hryvnia','currency.UAH'),(147,'UGX',2,'USh','Uganda Shilling','currency.UGX'),(148,'USD',2,'$','US Dollar','currency.USD'),(149,'UYU',2,'$U','Peso Uruguayo','currency.UYU'),(150,'UZS',2,NULL,'Uzbekistan Sum','currency.UZS'),(151,'VEB',2,'Bs.F.','Venezuelan Bolivar','currency.VEB'),(152,'VND',2,NULL,'Vietnamese Dong','currency.VND'),(153,'VUV',0,NULL,'Vanuatu Vatu','currency.VUV'),(154,'WST',2,NULL,'Samoa Tala','currency.WST'),(155,'XAF',0,NULL,'CFA Franc BEAC','currency.XAF'),(156,'XCD',2,NULL,'East Caribbean Dollar','currency.XCD'),(157,'XDR',5,NULL,'SDR (Special Drawing Rights)','currency.XDR'),(158,'XOF',0,'CFA','CFA Franc BCEAO','currency.XOF'),(159,'XPF',0,NULL,'CFP Franc','currency.XPF'),(160,'YER',2,NULL,'Yemeni Rial','currency.YER'),(161,'ZAR',2,'R','South African Rand','currency.ZAR'),(162,'ZMK',2,NULL,'Zambian Kwacha','currency.ZMK'),(163,'ZWD',2,NULL,'Zimbabwe Dollar','currency.ZWD'); /*!40000 ALTER TABLE `m_currency` ENABLE KEYS */; UNLOCK TABLES; @@ -1735,90 +1936,167 @@ CREATE TABLE `stretchy_parameter` ( LOCK TABLES `stretchy_parameter` WRITE; /*!40000 ALTER TABLE `stretchy_parameter` DISABLE KEYS */; -INSERT INTO `stretchy_parameter` VALUES (1,'FullReportList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select r.report_id, r.report_name, r.report_type, r.report_subtype, r.report_category,\r\n rp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on rp.report_id = r.report_id\r\n left join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on rp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where ur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by r.report_category, r.report_name, rp.parameter_id'),(2,'FullParameterList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select parameter_name, parameter_variable, parameter_label, parameter_displayType, \r\nparameter_FormatType, parameter_default, selectOne, selectAll\r\nfrom stretchy_parameter p\r\nwhere special is null\r\norder by parameter_id'),(3,'reportCategoryList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select r.report_id, r.report_name, r.report_type, r.report_subtype, r.report_category,\r\n rp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on rp.report_id = r.report_id\r\n left join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.report_category = \'${reportCategory}\'\r\n and r.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on rp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where ur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by r.report_category, r.report_name, rp.parameter_id'),(5,'OfficeIdSelectOne','officeId','Office','select','number','0',NULL,'Y',NULL,'select id, \r\nconcat(substring(\"........................................\", 1, \r\n ((LENGTH(`hierarchy`) - LENGTH(REPLACE(`hierarchy`, \'.\', \'\')) - 1) * 4)), \r\n `name`) as tc\r\nfrom m_office\r\nwhere hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\norder by hierarchy'),(6,'loanOfficerIdSelectAll','loanOfficerId','Loan Officer','select','number','0',NULL,'Y','Y','(select id, display_name as `Name` from m_staff\nwhere is_loan_officer = true)\r\nunion all\r\n(select -10, \'-\')\r\norder by 2'),(10,'currencyIdSelectAll','currencyId','Currency','select','number','0',NULL,'Y','Y','select `code`, `name`\r\nfrom m_organisation_currency\r\norder by `code`'),(11,'currencyIdSelectOne','currencyId','Currency','select','number','0',NULL,'Y',NULL,'select `code`, `name`\r\nfrom m_organisation_currency\r\norder by `code`'),(20,'fundIdSelectAll','fundId','Fund','select','number','0',NULL,'Y','Y','(select id, `name`\r\nfrom m_fund)\r\nunion all\r\n(select -10, \'-\')\r\norder by 2'),(25,'loanProductIdSelectAll','loanProductId','Product','select','number','0',NULL,'Y','Y','select id, `name`\r\nfrom m_product_loan\r\norder by 2'),(40,'startDateSelect','startDate','startDate','date','date','today',NULL,NULL,NULL,NULL),(41,'endDateSelect','endDate','endDate','date','date','today',NULL,NULL,NULL,NULL); +INSERT INTO `stretchy_parameter` VALUES (1,'FullReportList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select r.report_id, + r.report_name, r.report_type, r.report_subtype, r.report_category, \r\n rp.parameter_id, + rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp + on rp.report_id = r.report_id\r\n left join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r + .use_report is true \r\n and exists \r\n (\r\n select \'f\'\r\n from m_appuser_role ur \r\n join m_role r on r. + id = ur.role_id\r\n join m_role_permission rp on rp.role_id = r.id\r\n join m_permission p on p.id = rp. + permission_id\r\n where ur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \'ALL_FUNCTIONS\') + or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by r.report_category, r.report_name, rp.parameter_id'),(2,'FullParameterList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select parameter_name, parameter_variable, parameter_label, parameter_displayType, \r\nparameter_FormatType, parameter_default, selectOne, selectAll\r\nfrom stretchy_parameter p\r\nwhere special is null\r\norder by parameter_id'),(3,'reportCategoryList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select r.report_id, r.report_name, r.report_type, r.report_subtype, r.report_category,\r\n rp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on rp.report_id = r.report_id\r\n left join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.report_category = \' + ${reportCategory}\'\r\n and r.use_report is true\r\n and exists\r\n (\r\n select \' f\'\r\n from m_appuser_role ur \r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on rp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where ur.appuser_id = ${currentUserId}\r\n and (p.code in (\' + ALL_FUNCTIONS_READ\', \' ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by r.report_category, r.report_name, rp.parameter_id'), ( + 5, 'OfficeIdSelectOne', 'officeId', 'Office', 'select', 'number', '0', NULL, 'Y', NULL, + 'select id, \r\nconcat(substring(\"........................................\", 1, \r\n ((LENGTH(`hierarchy`) - LENGTH(REPLACE(`hierarchy`, \' + .\', \'\')) - 1) * 4)), \r\n `name`) as tc\r\nfrom m_office\r\nwhere hierarchy like concat(\' + ${currentUserHierarchy}\', \' %\')\r\norder by hierarchy'), (6, 'loanOfficerIdSelectAll', 'loanOfficerId', + 'Loan Officer', 'select', 'number', '0', NULL, 'Y', 'Y', + '(select id, display_name as `Name` from m_staff\nwhere is_loan_officer = true)\r\nunion all\r\n(select -10, \' + -\')\r\norder by 2'), (10, 'currencyIdSelectAll', 'currencyId', 'Currency', 'select', 'number', '0', NULL, 'Y', + 'Y', 'select `code`, `name`\r\nfrom m_organisation_currency\r\norder by `code`'), (11, 'currencyIdSelectOne', + 'currencyId', 'Currency', 'select', 'number', '0', NULL, 'Y', NULL, + 'select `code`, `name`\r\nfrom m_organisation_currency\r\norder by `code`'), (20, 'fundIdSelectAll', 'fundId', + 'Fund', 'select', 'number', '0', NULL, 'Y', 'Y', + '(select id, `name`\r\nfrom m_fund)\r\nunion all\r\n(select -10, \' -\')\r\norder by 2'), (25, + 'loanProductIdSelectAll', 'loanProductId', 'Product', 'select', 'number', '0', NULL, 'Y', 'Y', + 'select id, `name`\r\nfrom m_product_loan\r\norder by 2'), (40, 'startDateSelect', 'startDate', 'startDate', + 'date', 'date', 'today', NULL, NULL, NULL, NULL), (41, 'endDateSelect', 'endDate', 'endDate', 'date', 'date', + 'today', NULL, NULL, NULL, NULL); /*!40000 ALTER TABLE `stretchy_parameter` ENABLE KEYS */; -UNLOCK TABLES; + UNLOCK TABLES; -- -- Table structure for table `stretchy_report` -- -DROP TABLE IF EXISTS `stretchy_report`; + DROP TABLE IF EXISTS `stretchy_report`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `stretchy_report` ( - `report_id` INT NOT NULL AUTO_INCREMENT, - `report_name` varchar(100) NOT NULL, - `report_type` varchar(20) NOT NULL, - `report_subtype` varchar(20) DEFAULT NULL, - `report_category` varchar(45) DEFAULT NULL, - `report_sql` text, - `description` text, - `core_report` tinyint DEFAULT '0', - `use_report` tinyint DEFAULT '0', - PRIMARY KEY (`report_id`), - UNIQUE KEY `report_name_UNIQUE` (`report_name`) -) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=UTF8MB4; + CREATE TABLE `stretchy_report` (`report_id` INT NOT NULL AUTO_INCREMENT, + `report_name` varchar (100) NOT NULL, + `report_type` varchar (20) NOT NULL, + `report_subtype` varchar (20) DEFAULT NULL, + `report_category` varchar (45) DEFAULT NULL, + `report_sql` text, + `description` text, + `core_report` tinyint DEFAULT '0', + `use_report` tinyint DEFAULT '0', + PRIMARY KEY (`report_id`), + UNIQUE KEY `report_name_UNIQUE` (`report_name`)) ENGINE= InnoDB AUTO_INCREMENT= 51 DEFAULT CHARSET= UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `stretchy_report` -- -LOCK TABLES `stretchy_report` WRITE; + LOCK TABLES `stretchy_report` WRITE; /*!40000 ALTER TABLE `stretchy_report` DISABLE KEYS */; -INSERT INTO `stretchy_report` VALUES (1,'Client Listing','Table',NULL,'Client','select ounder.`name` as \"Office/Branch\", c.account_no as \"Client Account No.\", \r\nc.display_name as \"Name\", c.joined_date as \"Joined\", c.external_id as \"External Id\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\nwhere o.id = ${officeId}\r\nand c.is_deleted=0\r\norder by ounder.hierarchy, c.account_no','Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this report and add any \'one to one\' additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for larger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t have that client browser/memory impact).',1,1),(2,'Client Loans Listing','Table',NULL,'Client','select ounder.`name` as \"Office/Branch\", c.account_no as \"Client Account No.\", \r\nc.display_name as \"Name\", \r\nlo.display_name as \"Loan Officer\", l.account_no as \"Loan Account No.\", l.external_id as \"External Id\", \r\np.name as Loan, st.enum_message_property as \"Status\", \r\nf.`name` as Fund,\r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount,\r\nl.arrearstolerance_amount as \"Arrears Tolerance Amount\",\r\nl.number_of_repayments as \"Expected No. Repayments\",\r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\nl.nominal_interest_rate_per_period as \"Nominal Interest Rate Per Period\",\r\n\r\nipf.enum_message_property as \"Interest Rate Frequency\",\r\nim.enum_message_property as \"Interest Method\",\r\nicp.enum_message_property as \"Interest Calculated in Period\",\r\nl.term_frequency as \"Term Frequency\",\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.repay_every as \"Repayment Frequency\",\r\nrf.enum_message_property as \"Repayment Frequency Period\",\r\nam.enum_message_property as \"Amortization\",\r\n\r\nl.total_charges_due_at_disbursement_derived as \"Total Charges Due At Disbursement\",\r\n\r\ndate( l.submittedon_date) as Submitted, date(l.approvedon_date) Approved, l.expected_disbursedon_date As \"Expected Disbursal\",\r\ndate(l.expected_firstrepaymenton_date) as \"Expected First Repayment\", date(l.interest_calculated_from_date) as \"Interest Calculated From\" ,\r\ndate(l.disbursedon_date) as Disbursed, date(l.expected_maturedon_date) \"Expected Maturity\",\r\ndate(l.maturedon_date) as \"Matured On\", date(l.closedon_date) as Closed,\r\ndate(l.rejectedon_date) as Rejected, date(l.rescheduledon_date) as Rescheduled, \r\ndate(l.withdrawnon_date) as Withdrawn, date(l.writtenoffon_date) \"Written Off\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\nleft join m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join r_enum_value st on st.enum_name = \"loan_status_id\" and st.enum_id = l.loan_status_id\r\nleft join r_enum_value ipf on ipf.enum_name = \"interest_period_frequency_enum\" and ipf.enum_id = l.interest_period_frequency_enum\r\nleft join r_enum_value im on im.enum_name = \"interest_method_enum\" and im.enum_id = l.interest_method_enum\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nleft join r_enum_value icp on icp.enum_name = \"interest_calculated_in_period_enum\" and icp.enum_id = l.interest_calculated_in_period_enum\r\nleft join r_enum_value rf on rf.enum_name = \"repayment_period_frequency_enum\" and rf.enum_id = l.repayment_period_frequency_enum\r\nleft join r_enum_value am on am.enum_name = \"amortization_method_enum\" and am.enum_id = l.amortization_method_enum\r\n\r\nleft join m_currency cur on cur.code = l.currency_code\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\norder by ounder.hierarchy, 2 , l.id','Individual Client Report\r\n\r\nPretty wide report that lists the basic details of client loans. \r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for larger ones. There is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t have that client browser/memory impact).',1,1),(5,'Loans Awaiting Disbursal','Table',NULL,'Loan Portfolio','SELECT ounder.`name` as \"Office/Branch\", lo.display_name as \"Loan Officer\", c.display_name as \"Name\", \r\nl.account_no as \"Loan Account No.\", pl.`name` as \"Product\", f.`name` as Fund,\r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount as Principal, \r\ndate(l.approvedon_date) \"Approved\", l.expected_disbursedon_date \"Expected Disbursal\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand l.loan_status_id = 200\r\norder by ounder.hierarchy, l.expected_disbursedon_date, c.display_name','Individual Client Report',1,1),(6,'Loans Awaiting Disbursal Summary','Table',NULL,'Loan Portfolio','SELECT ounder.`name` as \"Office/Branch\", pl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, f.`name` as Fund,\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`','Individual Client Report',1,1),(7,'Loans Awaiting Disbursal Summary by Month','Table',NULL,'Loan Portfolio','SELECT ounder.`name` as \"Office/Branch\", pl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nyear(l.expected_disbursedon_date) as \"Year\", monthname(l.expected_disbursedon_date) as \"Month\",\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)','Individual Client Report',1,1),(10,'Active Loans Portfolio Status','Table',NULL,'Loan','select ounder.`name` as \"Office/Branch\", lo.display_name as \"Loan Officer\", c.display_name as \"Name\", \r\np.`name` as Loan, f.`name` as Fund, l.account_no as \"Loan Account No\",\r\nl.disbursedon_date as Disbursed, ifnull(cur.display_symbol, l.currency_code) as Currency,\r\nsum(r.principal_amount - ifnull(r.principal_completed_derived, 0)) as \"Principal Outstanding\",\r\nsum(r.interest_amount - ifnull(r.interest_completed_derived, 0)) as \"Interest Outstanding\",\r\n\r\nif(datediff(curdate(), min(r.duedate)) < 0, 0, datediff(curdate(), min(r.duedate))) as \"Days Overdue\", \r\nmin(r.installment) as \"First Overdue Installment\",\r\nmin(r.duedate) as \"First Overdue Installment Date\",\r\nsum(if(r.duedate <= curdate(), \r\n (r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 0)) as \"Principal Overdue\",\r\nsum(if(r.duedate <= curdate(), \r\n (ifnull(r.interest_amount, 0) - ifnull(r.interest_completed_derived, 0))\r\n , 0)) as \"Interest Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\n and r.completed_derived is false\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, p.`name`, l.currency_code, c.display_name, l.account_no','Individual Client Report',1,1),(11,'Active Loans Summary per Branch','Table',NULL,'Loan Portfolio','select ounder.`name` as \"Office/Branch\", ifnull(cur.display_symbol, l.currency_code) as Currency,\r\ncount(distinct(c.id)) as \"No. of Clients\", count(distinct(l.id)) as \"No. of Active Loans\",\r\ncount(distinct(\r\n if(r.duedate <= curdate(), \r\n if(r.principal_amount - ifnull(r.principal_completed_derived, 0) > 0, l.id, null), null)\r\n )) as \"No. of Loans in Arrears\",\r\n\r\nsum(l.principal_amount) as \"Total Loans Disbursed\",\r\nsum(ifnull(r.principal_completed_derived, 0)) as \"Total Principal Repaid\",\r\nsum(ifnull(r.interest_completed_derived, 0)) as \"Total Interest Repaid\",\r\nsum(r.principal_amount - ifnull(r.principal_completed_derived, 0)) as \"Total Principal Outstanding\",\r\nsum(ifnull(r.interest_amount, 0) - ifnull(r.interest_completed_derived, 0)) as \"Total Interest Outstanding\",\r\nsum(if(r.duedate <= curdate(), \r\n (r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 0)) as \"Total Principal in Arrears\",\r\ncast(round(\r\n (sum(if(r.duedate <= curdate(), \r\n (r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 0)) * 100) / \r\n sum(r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 2) as char)\r\n as \"Portfolio at Risk %\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand l.loan_status_id = 300\r\ngroup by ounder.hierarchy, l.currency_code\r\norder by ounder.hierarchy, l.currency_code',NULL,1,1),(15,'Portfolio at Risk','Table',NULL,'Loan Portfolio','select ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nsum(r.principal_amount - ifnull(r.principal_completed_derived, 0)) as \"Principal Outstanding\",\r\nsum(if(r.duedate <= curdate(), \r\n (r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 0)) as \"Principal Overdue\",\r\n \r\n cast(round(\r\n (sum(if(r.duedate <= curdate(), \r\n (r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 0)) * 100) / \r\n sum(r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 2) as char)\r\n as \"Portfolio at Risk %\"\r\n \r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\n and r.completed_derived is false\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand l.loan_status_id = 300\r\ngroup by l.currency_code\r\norder by l.currency_code',NULL,1,1),(16,'Portfolio at Risk by Branch','Table',NULL,'Loan Portfolio','select concat(substring(\"........................................\", 1, \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1) * 4)), \r\n ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nsum(r.principal_amount - ifnull(r.principal_completed_derived, 0)) as \"Principal Outstanding\",\r\nsum(if(r.duedate <= curdate(), \r\n (r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 0)) as \"Principal Overdue\",\r\n \r\n cast(round(\r\n (sum(if(r.duedate <= curdate(), \r\n (r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 0)) * 100) / \r\n sum(r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 2) as char)\r\n as \"Portfolio at Risk %\"\r\n \r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\n and r.completed_derived is false\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.hierarchy, l.currency_code\r\norder by ounder.hierarchy, l.currency_code',NULL,1,1),(20,'Funds Disbursed Between Dates Summary','Table',NULL,'Fund','select ifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office ounder \r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\ngroup by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)\r\norder by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)',NULL,1,1),(21,'Funds Disbursed Between Dates Summary by Office','Table',NULL,'Fund','select ounder.`name` as \"Office/Branch\", ifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office o\r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand o.id = ${officeId}\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\ngroup by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)\r\norder by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)',NULL,1,1),(48,'Balance Sheet','Pentaho',NULL,'Accounting',NULL,'Balance Sheet',1,0),(49,'Income Statement','Pentaho',NULL,'Accounting',NULL,'Profit and Loss Statement',1,0),(50,'Trial Balance','Pentaho',NULL,'Accounting',NULL,'Trial Balance Report',1,0); + INSERT INTO `stretchy_report` VALUES (1, 'Client Listing', 'Table', NULL, 'Client', + 'select ounder.`name` as \"Office/Branch\", c.account_no as \"Client Account No.\", \r\nc.display_name as \"Name\", c.joined_date as \"Joined\", c.external_id as \"External Id\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \' + %\')\r\nand ounder.hierarchy like concat(\' ${currentUserHierarchy}\', \' %\')\r\njoin m_client c on c.office_id = ounder.id\r\nwhere o.id = ${officeId}\r\nand c.is_deleted=0\r\norder by ounder.hierarchy, c.account_no', + 'Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this report and add any \' + one to one\' additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\' d expect it + only to be run within a branch for larger ones.Depending on how many columns are displayed, there is probably is + a limit of about 20 / 50k clients returned for html display (export to excel doesn\'t have that client browser/memory impact).', + 1, 1), (2, 'Client Loans Listing', 'Table', NULL, 'Client', + 'select ounder.`name` as \"Office/Branch\", c.account_no as \"Client Account No.\", \r\nc.display_name as \"Name\", \r\nlo.display_name as \"Loan Officer\", l.account_no as \"Loan Account No.\", l.external_id as \"External Id\", \r\np.name as Loan, st.enum_message_property as \"Status\", \r\nf.`name` as Fund,\r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount,\r\nl.arrearstolerance_amount as \"Arrears Tolerance Amount\",\r\nl.number_of_repayments as \"Expected No. Repayments\",\r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\nl.nominal_interest_rate_per_period as \"Nominal Interest Rate Per Period\",\r\n\r\nipf.enum_message_property as \"Interest Rate Frequency\",\r\nim.enum_message_property as \"Interest Method\",\r\nicp.enum_message_property as \"Interest Calculated in Period\",\r\nl.term_frequency as \"Term Frequency\",\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.repay_every as \"Repayment Frequency\",\r\nrf.enum_message_property as \"Repayment Frequency Period\",\r\nam.enum_message_property as \"Amortization\",\r\n\r\nl.total_charges_due_at_disbursement_derived as \"Total Charges Due At Disbursement\",\r\n\r\ndate( l.submittedon_date) as Submitted, date(l.approvedon_date) Approved, l.expected_disbursedon_date As \"Expected Disbursal\",\r\ndate(l.expected_firstrepaymenton_date) as \"Expected First Repayment\", date(l.interest_calculated_from_date) as \"Interest Calculated From\" ,\r\ndate(l.disbursedon_date) as Disbursed, date(l.expected_maturedon_date) \"Expected Maturity\",\r\ndate(l.maturedon_date) as \"Matured On\", date(l.closedon_date) as Closed,\r\ndate(l.rejectedon_date) as Rejected, date(l.rescheduledon_date) as Rescheduled, \r\ndate(l.withdrawnon_date) as Withdrawn, date(l.writtenoffon_date) \"Written Off\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \' + %\')\r\nand ounder.hierarchy like concat(\' ${currentUserHierarchy}\', \' %\')\r\njoin m_client c on c.office_id = ounder.id\r\nleft join m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join r_enum_value st on st.enum_name = \"loan_status_id\" and st.enum_id = l.loan_status_id\r\nleft join r_enum_value ipf on ipf.enum_name = \"interest_period_frequency_enum\" and ipf.enum_id = l.interest_period_frequency_enum\r\nleft join r_enum_value im on im.enum_name = \"interest_method_enum\" and im.enum_id = l.interest_method_enum\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nleft join r_enum_value icp on icp.enum_name = \"interest_calculated_in_period_enum\" and icp.enum_id = l.interest_calculated_in_period_enum\r\nleft join r_enum_value rf on rf.enum_name = \"repayment_period_frequency_enum\" and rf.enum_id = l.repayment_period_frequency_enum\r\nleft join r_enum_value am on am.enum_name = \"amortization_method_enum\" and am.enum_id = l.amortization_method_enum\r\n\r\nleft join m_currency cur on cur.code = l.currency_code\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\norder by ounder.hierarchy, 2 , l.id', + 'Individual Client Report\r\n\r\nPretty wide report that lists the basic details of client loans. \r\n\r\nCan be run for any size MFI but you\' + d expect it only to be run within a branch for larger ones.There is probably is a limit of about 20 / 50k + clients returned for html display (export to excel doesn\'t have that client browser/memory impact).', 1, 1), ( + 5, 'Loans Awaiting Disbursal', 'Table', NULL, 'Loan Portfolio', + 'SELECT ounder.`name` as \"Office/Branch\", lo.display_name as \"Loan Officer\", c.display_name as \"Name\", \r\nl.account_no as \"Loan Account No.\", pl.`name` as \"Product\", f.`name` as Fund,\r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount as Principal, \r\ndate(l.approvedon_date) \"Approved\", l.expected_disbursedon_date \"Expected Disbursal\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \' + %\')\r\nand ounder.hierarchy like concat(\' ${currentUserHierarchy}\', \' %\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand l.loan_status_id = 200\r\norder by ounder.hierarchy, l.expected_disbursedon_date, c.display_name', + 'Individual Client Report', 1, 1), (6, 'Loans Awaiting Disbursal Summary', 'Table', NULL, 'Loan Portfolio', + 'SELECT ounder.`name` as \"Office/Branch\", pl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, f.`name` as Fund,\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \' + %\')\r\nand ounder.hierarchy like concat(\' ${currentUserHierarchy}\', \' %\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`', + 'Individual Client Report', 1, 1), (7, 'Loans Awaiting Disbursal Summary by Month', 'Table', NULL, + 'Loan Portfolio', + 'SELECT ounder.`name` as \"Office/Branch\", pl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nyear(l.expected_disbursedon_date) as \"Year\", monthname(l.expected_disbursedon_date) as \"Month\",\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \' + %\')\r\nand ounder.hierarchy like concat(\' ${currentUserHierarchy}\', \' %\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)', + 'Individual Client Report', 1, 1), (10, 'Active Loans Portfolio Status', 'Table', NULL, 'Loan', + 'select ounder.`name` as \"Office/Branch\", lo.display_name as \"Loan Officer\", c.display_name as \"Name\", \r\np.`name` as Loan, f.`name` as Fund, l.account_no as \"Loan Account No\",\r\nl.disbursedon_date as Disbursed, ifnull(cur.display_symbol, l.currency_code) as Currency,\r\nsum(r.principal_amount - ifnull(r.principal_completed_derived, 0)) as \"Principal Outstanding\",\r\nsum(r.interest_amount - ifnull(r.interest_completed_derived, 0)) as \"Interest Outstanding\",\r\n\r\nif(datediff(curdate(), min(r.duedate)) < 0, 0, datediff(curdate(), min(r.duedate))) as \"Days Overdue\", \r\nmin(r.installment) as \"First Overdue Installment\",\r\nmin(r.duedate) as \"First Overdue Installment Date\",\r\nsum(if(r.duedate <= curdate(), \r\n (r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 0)) as \"Principal Overdue\",\r\nsum(if(r.duedate <= curdate(), \r\n (ifnull(r.interest_amount, 0) - ifnull(r.interest_completed_derived, 0))\r\n , 0)) as \"Interest Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \' + %\')\r\nand ounder.hierarchy like concat(\' ${currentUserHierarchy}\', \' %\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\n and r.completed_derived is false\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, p.`name`, l.currency_code, c.display_name, l.account_no', + 'Individual Client Report', 1, 1), (11, 'Active Loans Summary per Branch', 'Table', NULL, 'Loan Portfolio', + 'select ounder.`name` as \"Office/Branch\", ifnull(cur.display_symbol, l.currency_code) as Currency,\r\ncount(distinct(c.id)) as \"No. of Clients\", count(distinct(l.id)) as \"No. of Active Loans\",\r\ncount(distinct(\r\n if(r.duedate <= curdate(), \r\n if(r.principal_amount - ifnull(r.principal_completed_derived, 0) > 0, l.id, null), null)\r\n )) as \"No. of Loans in Arrears\",\r\n\r\nsum(l.principal_amount) as \"Total Loans Disbursed\",\r\nsum(ifnull(r.principal_completed_derived, 0)) as \"Total Principal Repaid\",\r\nsum(ifnull(r.interest_completed_derived, 0)) as \"Total Interest Repaid\",\r\nsum(r.principal_amount - ifnull(r.principal_completed_derived, 0)) as \"Total Principal Outstanding\",\r\nsum(ifnull(r.interest_amount, 0) - ifnull(r.interest_completed_derived, 0)) as \"Total Interest Outstanding\",\r\nsum(if(r.duedate <= curdate(), \r\n (r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 0)) as \"Total Principal in Arrears\",\r\ncast(round(\r\n (sum(if(r.duedate <= curdate(), \r\n (r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 0)) * 100) / \r\n sum(r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 2) as char)\r\n as \"Portfolio at Risk %\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \' + %\')\r\nand ounder.hierarchy like concat(\' ${currentUserHierarchy}\', \' %\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand l.loan_status_id = 300\r\ngroup by ounder.hierarchy, l.currency_code\r\norder by ounder.hierarchy, l.currency_code', + NULL, 1, 1), (15, 'Portfolio at Risk', 'Table', NULL, 'Loan Portfolio', + 'select ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nsum(r.principal_amount - ifnull(r.principal_completed_derived, 0)) as \"Principal Outstanding\",\r\nsum(if(r.duedate <= curdate(), \r\n (r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 0)) as \"Principal Overdue\",\r\n \r\n cast(round(\r\n (sum(if(r.duedate <= curdate(), \r\n (r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 0)) * 100) / \r\n sum(r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 2) as char)\r\n as \"Portfolio at Risk %\"\r\n \r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \' + %\')\r\nand ounder.hierarchy like concat(\' ${currentUserHierarchy}\', \' %\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\n and r.completed_derived is false\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand l.loan_status_id = 300\r\ngroup by l.currency_code\r\norder by l.currency_code', + NULL, 1, 1), (16, 'Portfolio at Risk by Branch', 'Table', NULL, 'Loan Portfolio', + 'select concat(substring(\"........................................\", 1, \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \' + .\', \'\')) - 1) * 4)), \r\n ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nsum(r.principal_amount - ifnull(r.principal_completed_derived, 0)) as \"Principal Outstanding\",\r\nsum(if(r.duedate <= curdate(), \r\n (r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 0)) as \"Principal Overdue\",\r\n \r\n cast(round(\r\n (sum(if(r.duedate <= curdate(), \r\n (r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 0)) * 100) / \r\n sum(r.principal_amount - ifnull(r.principal_completed_derived, 0))\r\n , 2) as char)\r\n as \"Portfolio at Risk %\"\r\n \r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \' + %\')\r\nand ounder.hierarchy like concat(\' ${currentUserHierarchy}\', \' %\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\n and r.completed_derived is false\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.hierarchy, l.currency_code\r\norder by ounder.hierarchy, l.currency_code', + NULL, 1, 1), (20, 'Funds Disbursed Between Dates Summary', 'Table', NULL, 'Fund', 'select ifnull(f.`name`, \' -\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office ounder \r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere disbursedon_date between \' + ${startDate}\' and \' ${endDate}\'\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (l.currency_code = \' + $\{currencyId}\' or \' - 1\' = \' $\{currencyId}\')\r\nand ounder.hierarchy like concat(\' + ${currentUserHierarchy}\', \' %\')\r\ngroup by ifnull(f.`name`, \' -\') , ifnull(cur.display_symbol, l.currency_code)\r\norder by ifnull(f.`name`, \' + -\') , ifnull(cur.display_symbol, l.currency_code)', NULL, 1, 1), (21, + 'Funds Disbursed Between Dates Summary by Office', 'Table', NULL, 'Fund', + 'select ounder.`name` as \"Office/Branch\", ifnull(f.`name`, \' -\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office o\r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \' + %\')\r\nand ounder.hierarchy like concat(\' ${currentUserHierarchy}\', \' %\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere disbursedon_date between \' + ${startDate}\' and \' ${endDate}\'\r\nand o.id = ${officeId}\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (l.currency_code = \' + $\{currencyId}\' or \' - 1\' = \' $\{currencyId}\')\r\ngroup by ounder.`name`, ifnull(f.`name`, \' -\') , ifnull(cur.display_symbol, l.currency_code)\r\norder by ounder.`name`, ifnull(f.`name`, \' + -\') , ifnull(cur.display_symbol, l.currency_code)', NULL, 1, 1), (48, 'Balance Sheet', 'Pentaho', NULL, + 'Accounting', NULL, 'Balance Sheet', 1, 0), (49, 'Income Statement', 'Pentaho', NULL, 'Accounting', NULL, + 'Profit and Loss Statement', 1, 0), (50, 'Trial Balance', 'Pentaho', NULL, 'Accounting', NULL, + 'Trial Balance Report', 1, 0); /*!40000 ALTER TABLE `stretchy_report` ENABLE KEYS */; -UNLOCK TABLES; + UNLOCK TABLES; -- -- Table structure for table `stretchy_report_parameter` -- -DROP TABLE IF EXISTS `stretchy_report_parameter`; + DROP TABLE IF EXISTS `stretchy_report_parameter`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `stretchy_report_parameter` ( - `report_id` INT NOT NULL, - `parameter_id` INT NOT NULL, - `report_parameter_name` varchar(45) DEFAULT NULL, - PRIMARY KEY (`report_id`,`parameter_id`), - UNIQUE KEY `report_id_name_UNIQUE` (`report_id`,`report_parameter_name`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + CREATE TABLE `stretchy_report_parameter` (`report_id` INT NOT NULL, + `parameter_id` INT NOT NULL, + `report_parameter_name` varchar (45) DEFAULT NULL, + PRIMARY KEY (`report_id`, `parameter_id`), + UNIQUE KEY `report_id_name_UNIQUE` (`report_id`, `report_parameter_name`)) ENGINE= InnoDB DEFAULT CHARSET= + UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `stretchy_report_parameter` -- -LOCK TABLES `stretchy_report_parameter` WRITE; + LOCK TABLES `stretchy_report_parameter` WRITE; /*!40000 ALTER TABLE `stretchy_report_parameter` DISABLE KEYS */; -INSERT INTO `stretchy_report_parameter` VALUES (1,5,NULL),(2,5,NULL),(2,6,NULL),(2,10,NULL),(2,20,NULL),(2,25,NULL),(5,5,NULL),(5,6,NULL),(5,10,NULL),(5,20,NULL),(5,25,NULL),(6,5,NULL),(6,6,NULL),(6,10,NULL),(6,20,NULL),(6,25,NULL),(7,5,NULL),(7,6,NULL),(7,10,NULL),(7,20,NULL),(7,25,NULL),(10,5,NULL),(10,6,NULL),(10,10,NULL),(10,20,NULL),(10,25,NULL),(11,5,NULL),(11,10,NULL),(15,5,NULL),(15,6,NULL),(15,10,NULL),(15,20,NULL),(15,25,NULL),(16,5,NULL),(16,6,NULL),(16,10,NULL),(16,20,NULL),(16,25,NULL),(20,10,NULL),(20,20,NULL),(20,40,NULL),(20,41,NULL),(21,5,NULL),(21,10,NULL),(21,20,NULL),(21,40,NULL),(21,41,NULL),(48,5,'branch'),(48,41,'date'),(49,5,'branch'),(49,40,'fromDate'),(49,41,'toDate'),(50,5,'branch'),(50,40,'fromDate'),(50,41,'toDate'); + INSERT INTO `stretchy_report_parameter` VALUES (1, 5, NULL), (2, 5, NULL), (2, 6, NULL), (2, 10, NULL), (2, 20, + NULL), (2, 25, NULL), (5, 5, NULL), (5, 6, NULL), (5, 10, NULL), (5, 20, NULL), (5, 25, NULL), (6, 5, NULL), (6, + 6, NULL), (6, 10, NULL), (6, 20, NULL), (6, 25, NULL), (7, 5, NULL), (7, 6, NULL), (7, 10, NULL), (7, 20, + NULL), (7, 25, NULL), (10, 5, NULL), (10, 6, NULL), (10, 10, NULL), (10, 20, NULL), (10, 25, NULL), (11, 5, + NULL), (11, 10, NULL), (15, 5, NULL), (15, 6, NULL), (15, 10, NULL), (15, 20, NULL), (15, 25, NULL), (16, 5, + NULL), (16, 6, NULL), (16, 10, NULL), (16, 20, NULL), (16, 25, NULL), (20, 10, NULL), (20, 20, NULL), (20, 40, + NULL), (20, 41, NULL), (21, 5, NULL), (21, 10, NULL), (21, 20, NULL), (21, 40, NULL), (21, 41, NULL), (48, 5, + 'branch'), (48, 41, 'date'), (49, 5, 'branch'), (49, 40, 'fromDate'), (49, 41, 'toDate'), (50, 5, 'branch'), ( + 50, 40, 'fromDate'), (50, 41, 'toDate'); /*!40000 ALTER TABLE `stretchy_report_parameter` ENABLE KEYS */; -UNLOCK TABLES; + UNLOCK TABLES; -- -- Table structure for table `x_registered_table` -- -DROP TABLE IF EXISTS `x_registered_table`; + DROP TABLE IF EXISTS `x_registered_table`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = UTF8MB4 */; -CREATE TABLE `x_registered_table` ( - `registered_table_name` varchar(50) NOT NULL, - `application_table_name` varchar(50) NOT NULL, - PRIMARY KEY (`registered_table_name`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + CREATE TABLE `x_registered_table` (`registered_table_name` varchar (50) NOT NULL, + `application_table_name` varchar (50) NOT NULL, + PRIMARY KEY (`registered_table_name`)) ENGINE= InnoDB DEFAULT CHARSET= UTF8MB4; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `x_registered_table` -- -LOCK TABLES `x_registered_table` WRITE; + LOCK TABLES `x_registered_table` WRITE; /*!40000 ALTER TABLE `x_registered_table` DISABLE KEYS */; /*!40000 ALTER TABLE `x_registered_table` ENABLE KEYS */; -UNLOCK TABLES; + UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; diff --git a/fineract-db/multi-tenant-demo-backups/latam-demo/datatables-on-latam-demo.sql b/fineract-db/multi-tenant-demo-backups/latam-demo/datatables-on-latam-demo.sql index 553abd425d5..0db3a75038d 100644 --- a/fineract-db/multi-tenant-demo-backups/latam-demo/datatables-on-latam-demo.sql +++ b/fineract-db/multi-tenant-demo-backups/latam-demo/datatables-on-latam-demo.sql @@ -18,51 +18,64 @@ -- DROP TABLE IF EXISTS `latam_extra_client_details`; -CREATE TABLE `latam_extra_client_details` ( - `client_id` BIGINT NOT NULL, - `Business Description` varchar(100) DEFAULT NULL, - `Years in Business` INT DEFAULT NULL, - `Gender_cd` INT DEFAULT NULL, - `Education_cv` varchar(60) DEFAULT NULL, - `Next Visit` date DEFAULT NULL, - `Highest Rate Paid` decimal(19,6) DEFAULT NULL, - `Comment` text, - PRIMARY KEY (`client_id`), - CONSTRAINT `FK_latam_extra_client_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `latam_extra_client_details` +( + `client_id` BIGINT NOT NULL, + `Business Description` varchar(100) DEFAULT NULL, + `Years in Business` INT DEFAULT NULL, + `Gender_cd` INT DEFAULT NULL, + `Education_cv` varchar(60) DEFAULT NULL, + `Next Visit` date DEFAULT NULL, + `Highest Rate Paid` decimal(19, 6) DEFAULT NULL, + `Comment` text, + PRIMARY KEY (`client_id`), + CONSTRAINT `FK_latam_extra_client_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; DROP TABLE IF EXISTS `latam_family_details`; -CREATE TABLE `latam_family_details` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `Name` varchar(40) DEFAULT NULL, - `Date of Birth` date DEFAULT NULL, - `Points Score` INT DEFAULT NULL, - `Education_cd_Highest` INT DEFAULT NULL, - `Other Notes` text, - PRIMARY KEY (`id`), - KEY `FK_Extra Family Details Data_1` (`client_id`), - CONSTRAINT `FK_latam_family_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `latam_family_details` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `client_id` BIGINT NOT NULL, + `Name` varchar(40) DEFAULT NULL, + `Date of Birth` date DEFAULT NULL, + `Points Score` INT DEFAULT NULL, + `Education_cd_Highest` INT DEFAULT NULL, + `Other Notes` text, + PRIMARY KEY (`id`), + KEY `FK_Extra Family Details Data_1` (`client_id`), + CONSTRAINT `FK_latam_family_details` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; DROP TABLE IF EXISTS `latam_extra_loan_details`; -CREATE TABLE `latam_extra_loan_details` ( - `loan_id` BIGINT NOT NULL, - `Business Description` varchar(100) DEFAULT NULL, - `Years in Business` INT DEFAULT NULL, - `Gender_cd` INT DEFAULT NULL, - `Education_cv` varchar(60) DEFAULT NULL, - `Next Visit` date DEFAULT NULL, - `Highest Rate Paid` decimal(19,6) DEFAULT NULL, - `Comment` text, - PRIMARY KEY (`loan_id`), - CONSTRAINT `FK_latam_extra_loan_details` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +CREATE TABLE `latam_extra_loan_details` +( + `loan_id` BIGINT NOT NULL, + `Business Description` varchar(100) DEFAULT NULL, + `Years in Business` INT DEFAULT NULL, + `Gender_cd` INT DEFAULT NULL, + `Education_cv` varchar(60) DEFAULT NULL, + `Next Visit` date DEFAULT NULL, + `Highest Rate Paid` decimal(19, 6) DEFAULT NULL, + `Comment` text, + PRIMARY KEY (`loan_id`), + CONSTRAINT `FK_latam_extra_loan_details` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -INSERT INTO `mifostenant-latam`.`m_code` (`code_name`, `is_system_defined`) VALUES ('Gender', 1); -INSERT INTO `mifostenant-latam`.`m_code_value` (`code_id`, `code_value`, `order_position`) VALUES (2, 'Male', 1); INSERT INTO `mifostenant-latam`.`m_code_value` (`code_id`, `code_value`, `order_position`) VALUES (2, 'Female', 2); +INSERT INTO `mifostenant-latam`.`m_code` (`code_name`, `is_system_defined`) +VALUES ('Gender', 1); +INSERT INTO `mifostenant-latam`.`m_code_value` (`code_id`, `code_value`, `order_position`) +VALUES (2, 'Male', 1); +INSERT INTO `mifostenant-latam`.`m_code_value` (`code_id`, `code_value`, `order_position`) +VALUES (2, 'Female', 2); -INSERT INTO `mifostenant-latam`.`m_code` (`code_name`, `is_system_defined`) VALUES ('Education', 1); -INSERT INTO `mifostenant-latam`.`m_code_value` (`code_id`, `code_value`, `order_position`) VALUES (3, 'Primary', 1); INSERT INTO `mifostenant-latam`.`m_code_value` (`code_id`, `code_value`, `order_position`) VALUES (3, 'Secondary', 2); INSERT INTO `mifostenant-latam`.`m_code_value` (`code_id`, `code_value`, `order_position`) VALUES (3, 'University', 3); +INSERT INTO `mifostenant-latam`.`m_code` (`code_name`, `is_system_defined`) +VALUES ('Education', 1); +INSERT INTO `mifostenant-latam`.`m_code_value` (`code_id`, `code_value`, `order_position`) +VALUES (3, 'Primary', 1); +INSERT INTO `mifostenant-latam`.`m_code_value` (`code_id`, `code_value`, `order_position`) +VALUES (3, 'Secondary', 2); +INSERT INTO `mifostenant-latam`.`m_code_value` (`code_id`, `code_value`, `order_position`) +VALUES (3, 'University', 3); diff --git a/fineract-db/old-schema-files/0001a-mifosplatform-core-ddl-latest.sql b/fineract-db/old-schema-files/0001a-mifosplatform-core-ddl-latest.sql index ca9c7e8a945..924a12972f7 100644 --- a/fineract-db/old-schema-files/0001a-mifosplatform-core-ddl-latest.sql +++ b/fineract-db/old-schema-files/0001a-mifosplatform-core-ddl-latest.sql @@ -18,7 +18,8 @@ -- -- drop tables in base-schema -SET foreign_key_checks = 0; +SET +foreign_key_checks = 0; -- drop accounting subsystem DROP TABLE IF EXISTS `acc_gl_account`; @@ -77,873 +78,968 @@ DROP TABLE IF EXISTS `stretchy_parameter`; DROP TABLE IF EXISTS `stretchy_report`; DROP TABLE IF EXISTS `stretchy_report_parameter`; -SET foreign_key_checks = 1; +SET +foreign_key_checks = 1; -- DDL for reference/lookup tables -CREATE TABLE `m_currency` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `code` varchar(3) NOT NULL, - `decimal_places` SMALLINT NOT NULL, - `display_symbol` varchar(10) DEFAULT NULL, - `name` varchar(50) NOT NULL, - `internationalized_name_code` varchar(50) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `code` (`code`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_organisation_currency` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `code` varchar(3) NOT NULL, - `decimal_places` SMALLINT NOT NULL, - `name` varchar(50) NOT NULL, - `display_symbol` varchar(10) DEFAULT NULL, - `internationalized_name_code` varchar(50) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `c_configuration` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(50) DEFAULT NULL, - `enabled` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_code` ( - `id` INT NOT NULL AUTO_INCREMENT, - `code_name` varchar(100) DEFAULT NULL, - `is_system_defined` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `code_name` (`code_name`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_code_value` ( - `id` INT NOT NULL AUTO_INCREMENT, - `code_id` INT NOT NULL, - `code_value` varchar(100) DEFAULT NULL, - `order_position` INT NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `code_value` (`code_id`,`code_value`), - KEY `FKCFCEA42640BE071Z` (`code_id`), - CONSTRAINT `FKCFCEA42640BE071Z` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_document` ( - `id` INT NOT NULL AUTO_INCREMENT, - `parent_entity_type` varchar(50) NOT NULL, - `parent_entity_id` INT NOT NULL DEFAULT '0', - `name` varchar(250) NOT NULL, - `file_name` varchar(250) NOT NULL, - `size` INT DEFAULT '0', - `type` varchar(50) DEFAULT NULL, - `description` varchar(1000) DEFAULT NULL, - `location` varchar(500) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) +CREATE TABLE `m_currency` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `code` varchar(3) NOT NULL, + `decimal_places` SMALLINT NOT NULL, + `display_symbol` varchar(10) DEFAULT NULL, + `name` varchar(50) NOT NULL, + `internationalized_name_code` varchar(50) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_organisation_currency` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `code` varchar(3) NOT NULL, + `decimal_places` SMALLINT NOT NULL, + `name` varchar(50) NOT NULL, + `display_symbol` varchar(10) DEFAULT NULL, + `internationalized_name_code` varchar(50) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `c_configuration` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(50) DEFAULT NULL, + `enabled` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_code` +( + `id` INT NOT NULL AUTO_INCREMENT, + `code_name` varchar(100) DEFAULT NULL, + `is_system_defined` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `code_name` (`code_name`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_code_value` +( + `id` INT NOT NULL AUTO_INCREMENT, + `code_id` INT NOT NULL, + `code_value` varchar(100) DEFAULT NULL, + `order_position` INT NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `code_value` (`code_id`,`code_value`), + KEY `FKCFCEA42640BE071Z` (`code_id`), + CONSTRAINT `FKCFCEA42640BE071Z` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_document` +( + `id` INT NOT NULL AUTO_INCREMENT, + `parent_entity_type` varchar(50) NOT NULL, + `parent_entity_id` INT NOT NULL DEFAULT '0', + `name` varchar(250) NOT NULL, + `file_name` varchar(250) NOT NULL, + `size` INT DEFAULT '0', + `type` varchar(50) DEFAULT NULL, + `description` varchar(1000) DEFAULT NULL, + `location` varchar(500) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /*not a major table - just intended for database reporting use for enums and values that would be hidden in java*/ -CREATE TABLE `r_enum_value` ( - `enum_name` varchar(100) NOT NULL, - `enum_id` INT NOT NULL, - `enum_message_property` varchar(100) NOT NULL, - `enum_value` varchar(100) NOT NULL, - PRIMARY KEY (`enum_name`,`enum_id`), - UNIQUE KEY `enum_message_property` (`enum_name`,`enum_message_property`), - UNIQUE KEY `enum_value` (`enum_name`,`enum_value`) +CREATE TABLE `r_enum_value` +( + `enum_name` varchar(100) NOT NULL, + `enum_id` INT NOT NULL, + `enum_message_property` varchar(100) NOT NULL, + `enum_value` varchar(100) NOT NULL, + PRIMARY KEY (`enum_name`, `enum_id`), + UNIQUE KEY `enum_message_property` (`enum_name`,`enum_message_property`), + UNIQUE KEY `enum_value` (`enum_name`,`enum_value`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; /* used to link MySql tables to Mifos X application tables for additional data needs */ -CREATE TABLE `x_registered_table` ( - `registered_table_name` varchar(50) NOT NULL, - `application_table_name` varchar(50) NOT NULL, - PRIMARY KEY (`registered_table_name`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE IF NOT EXISTS `m_calendar` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `title` varchar(50) NOT NULL, - `description` varchar(100) DEFAULT NULL, - `location` varchar(50) DEFAULT NULL, - `start_date` date NOT NULL, - `end_date` date DEFAULT NULL, - `duration` SMALLINT DEFAULT NULL, - `calendar_type_enum` SMALLINT NOT NULL, - `repeating` tinyint NOT NULL DEFAULT '0', - `recurrence` varchar(100) DEFAULT NULL, - `remind_by_enum` SMALLINT DEFAULT NULL, - `first_reminder` smallint DEFAULT NULL, - `second_reminder` smallint DEFAULT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE IF NOT EXISTS `m_calendar_instance` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `calendar_id` BIGINT NOT NULL, - `entity_id` BIGINT NOT NULL, - `entity_type_enum` SMALLINT NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_calendar_m_calendar_instance` (`calendar_id`), - CONSTRAINT `FK_m_calendar_m_calendar_instance` FOREIGN KEY (`calendar_id`) REFERENCES `m_calendar` (`id`) +CREATE TABLE `x_registered_table` +( + `registered_table_name` varchar(50) NOT NULL, + `application_table_name` varchar(50) NOT NULL, + PRIMARY KEY (`registered_table_name`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_calendar` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `title` + varchar +( + 50 +) NOT NULL, + `description` varchar +( + 100 +) DEFAULT NULL, + `location` varchar +( + 50 +) DEFAULT NULL, + `start_date` date NOT NULL, + `end_date` date DEFAULT NULL, + `duration` SMALLINT DEFAULT NULL, + `calendar_type_enum` SMALLINT NOT NULL, + `repeating` tinyint NOT NULL DEFAULT '0', + `recurrence` varchar +( + 100 +) DEFAULT NULL, + `remind_by_enum` SMALLINT DEFAULT NULL, + `first_reminder` smallint DEFAULT NULL, + `second_reminder` smallint DEFAULT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + PRIMARY KEY +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE IF NOT EXISTS `m_calendar_instance` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `calendar_id` + BIGINT + NOT + NULL, + `entity_id` + BIGINT + NOT + NULL, + `entity_type_enum` + SMALLINT + NOT + NULL, + PRIMARY + KEY +( + `id` +), + KEY `FK_m_calendar_m_calendar_instance` +( + `calendar_id` +), + CONSTRAINT `FK_m_calendar_m_calendar_instance` FOREIGN KEY +( + `calendar_id` +) REFERENCES `m_calendar` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + -- ================= end of reference/lookup tables ============= -- DDL for office related tables -CREATE TABLE `m_office` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `parent_id` BIGINT DEFAULT NULL, - `hierarchy` varchar(100) DEFAULT NULL, - `external_id` varchar(100) DEFAULT NULL, - `name` varchar(50) NOT NULL, - `opening_date` date NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `name_org` (`name`), - UNIQUE KEY `externalid_org` (`external_id`), - KEY `FK2291C477E2551DCC` (`parent_id`), - CONSTRAINT `FK2291C477E2551DCC` FOREIGN KEY (`parent_id`) REFERENCES `m_office` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_office_transaction` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `from_office_id` BIGINT DEFAULT NULL, - `to_office_id` BIGINT DEFAULT NULL, - `currency_code` varchar(3) NOT NULL, - `currency_digits` INT NOT NULL, - `transaction_amount` decimal(19,6) NOT NULL, - `transaction_date` date NOT NULL, - `description` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK1E37728B93C6C1B6` (`to_office_id`), - KEY `FK1E37728B783C5C25` (`from_office_id`), - CONSTRAINT `FK1E37728B783C5C25` FOREIGN KEY (`from_office_id`) REFERENCES `m_office` (`id`), - CONSTRAINT `FK1E37728B93C6C1B6` FOREIGN KEY (`to_office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `m_office` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `parent_id` BIGINT DEFAULT NULL, + `hierarchy` varchar(100) DEFAULT NULL, + `external_id` varchar(100) DEFAULT NULL, + `name` varchar(50) NOT NULL, + `opening_date` date NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `name_org` (`name`), + UNIQUE KEY `externalid_org` (`external_id`), + KEY `FK2291C477E2551DCC` (`parent_id`), + CONSTRAINT `FK2291C477E2551DCC` FOREIGN KEY (`parent_id`) REFERENCES `m_office` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_office_transaction` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `from_office_id` BIGINT DEFAULT NULL, + `to_office_id` BIGINT DEFAULT NULL, + `currency_code` varchar(3) NOT NULL, + `currency_digits` INT NOT NULL, + `transaction_amount` decimal(19, 6) NOT NULL, + `transaction_date` date NOT NULL, + `description` varchar(100) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FK1E37728B93C6C1B6` (`to_office_id`), + KEY `FK1E37728B783C5C25` (`from_office_id`), + CONSTRAINT `FK1E37728B783C5C25` FOREIGN KEY (`from_office_id`) REFERENCES `m_office` (`id`), + CONSTRAINT `FK1E37728B93C6C1B6` FOREIGN KEY (`to_office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- ============ end of office related tables ========== -- DDL for admin tables -CREATE TABLE `m_permission` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `grouping` varchar(45) DEFAULT NULL, - `code` varchar(100) NOT NULL, - `entity_name` varchar(100) DEFAULT NULL, - `action_name` varchar(100) DEFAULT NULL, - `can_maker_checker` tinyint NOT NULL DEFAULT '1', - PRIMARY KEY (`id`), - UNIQUE KEY `code` (`code`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_role` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) NOT NULL, - `description` varchar(500) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `unq_name` (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_role_permission` ( - `role_id` BIGINT NOT NULL, - `permission_id` BIGINT NOT NULL, - PRIMARY KEY (`role_id`,`permission_id`), - KEY `FK8DEDB04815CEC7AB` (`role_id`), - KEY `FK8DEDB048103B544B` (`permission_id`), - CONSTRAINT `FK8DEDB048103B544B` FOREIGN KEY (`permission_id`) REFERENCES `m_permission` (`id`), - CONSTRAINT `FK8DEDB04815CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_appuser` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `is_deleted` tinyint NOT NULL DEFAULT '0', - `office_id` BIGINT DEFAULT NULL, - `username` varchar(100) NOT NULL, - `firstname` varchar(100) NOT NULL, - `lastname` varchar(100) NOT NULL, - `password` varchar(255) NOT NULL, - `email` varchar(100) NOT NULL, - `firsttime_login_remaining` bit(1) NOT NULL, - `nonexpired` bit(1) NOT NULL, - `nonlocked` bit(1) NOT NULL, - `nonexpired_credentials` bit(1) NOT NULL, - `enabled` bit(1) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `username_org` (`username`), - KEY `FKB3D587CE0DD567A` (`office_id`), - CONSTRAINT `FKB3D587CE0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_appuser_role` ( - `appuser_id` BIGINT NOT NULL, - `role_id` BIGINT NOT NULL, - PRIMARY KEY (`appuser_id`,`role_id`), - KEY `FK7662CE59B4100309` (`appuser_id`), - KEY `FK7662CE5915CEC7AB` (`role_id`), - CONSTRAINT `FK7662CE5915CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`), - CONSTRAINT `FK7662CE59B4100309` FOREIGN KEY (`appuser_id`) REFERENCES `m_appuser` (`id`) +CREATE TABLE `m_permission` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `grouping` varchar(45) DEFAULT NULL, + `code` varchar(100) NOT NULL, + `entity_name` varchar(100) DEFAULT NULL, + `action_name` varchar(100) DEFAULT NULL, + `can_maker_checker` tinyint NOT NULL DEFAULT '1', + PRIMARY KEY (`id`), + UNIQUE KEY `code` (`code`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_role` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `description` varchar(500) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unq_name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_role_permission` +( + `role_id` BIGINT NOT NULL, + `permission_id` BIGINT NOT NULL, + PRIMARY KEY (`role_id`, `permission_id`), + KEY `FK8DEDB04815CEC7AB` (`role_id`), + KEY `FK8DEDB048103B544B` (`permission_id`), + CONSTRAINT `FK8DEDB048103B544B` FOREIGN KEY (`permission_id`) REFERENCES `m_permission` (`id`), + CONSTRAINT `FK8DEDB04815CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_appuser` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `is_deleted` tinyint NOT NULL DEFAULT '0', + `office_id` BIGINT DEFAULT NULL, + `username` varchar(100) NOT NULL, + `firstname` varchar(100) NOT NULL, + `lastname` varchar(100) NOT NULL, + `password` varchar(255) NOT NULL, + `email` varchar(100) NOT NULL, + `firsttime_login_remaining` bit(1) NOT NULL, + `nonexpired` bit(1) NOT NULL, + `nonlocked` bit(1) NOT NULL, + `nonexpired_credentials` bit(1) NOT NULL, + `enabled` bit(1) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `username_org` (`username`), + KEY `FKB3D587CE0DD567A` (`office_id`), + CONSTRAINT `FKB3D587CE0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_appuser_role` +( + `appuser_id` BIGINT NOT NULL, + `role_id` BIGINT NOT NULL, + PRIMARY KEY (`appuser_id`, `role_id`), + KEY `FK7662CE59B4100309` (`appuser_id`), + KEY `FK7662CE5915CEC7AB` (`role_id`), + CONSTRAINT `FK7662CE5915CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`), + CONSTRAINT `FK7662CE59B4100309` FOREIGN KEY (`appuser_id`) REFERENCES `m_appuser` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- ================ end of user admin tables =============== -- DDL for organisation wide related concepts -CREATE TABLE `m_portfolio_command_source` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `action_name` varchar(50) NOT NULL, - `entity_name` varchar(50) NOT NULL, - `office_id` BIGINT DEFAULT NULL, - `group_id` BIGINT DEFAULT NULL, - `client_id` BIGINT DEFAULT NULL, - `loan_id` BIGINT DEFAULT NULL, - `savings_account_id` BIGINT DEFAULT NULL, - `api_get_url` varchar(100) NOT NULL, - `resource_id` BIGINT DEFAULT NULL, - `subresource_id` BIGINT DEFAULT NULL, - `command_as_json` text NOT NULL, - `maker_id` BIGINT NOT NULL, - `made_on_date` datetime NOT NULL, - `checker_id` BIGINT DEFAULT NULL, - `checked_on_date` datetime DEFAULT NULL, - `status` SMALLINT NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_maker_m_appuser` (`maker_id`), - KEY `FK_m_checker_m_appuser` (`checker_id`), - KEY `action_name` (`action_name`), - KEY `entity_name` (`entity_name`,`resource_id`), - KEY `made_on_date` (`made_on_date`), - KEY `checked_on_date` (`checked_on_date`), - KEY `status` (`status`), - KEY `office_id` (`office_id`), - KEY `group_id` (`office_id`), - KEY `client_id` (`office_id`), - KEY `loan_id` (`office_id`), - CONSTRAINT `FK_m_checker_m_appuser` FOREIGN KEY (`checker_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_m_maker_m_appuser` FOREIGN KEY (`maker_id`) REFERENCES `m_appuser` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_charge` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL, - `currency_code` varchar(3) NOT NULL, - `charge_applies_to_enum` SMALLINT NOT NULL, - `charge_time_enum` SMALLINT NOT NULL, - `charge_calculation_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `is_penalty` tinyint NOT NULL DEFAULT '0', - `is_active` tinyint NOT NULL, - `is_deleted` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_fund` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(255) DEFAULT NULL, - `external_id` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `fund_name_org` (`name`), - UNIQUE KEY `fund_externalid_org` (`external_id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_staff` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `is_loan_officer` tinyint NOT NULL DEFAULT '0', - `office_id` BIGINT DEFAULT NULL, - `firstname` varchar(50) DEFAULT NULL, - `lastname` varchar(50) DEFAULT NULL, - `display_name` varchar(100) NOT NULL, - `joining_date` date, - PRIMARY KEY (`id`), - UNIQUE KEY `display_name` (`display_name`), - KEY `FK_m_staff_m_office` (`office_id`), - CONSTRAINT `FK_m_staff_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +CREATE TABLE `m_portfolio_command_source` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `action_name` varchar(50) NOT NULL, + `entity_name` varchar(50) NOT NULL, + `office_id` BIGINT DEFAULT NULL, + `group_id` BIGINT DEFAULT NULL, + `client_id` BIGINT DEFAULT NULL, + `loan_id` BIGINT DEFAULT NULL, + `savings_account_id` BIGINT DEFAULT NULL, + `api_get_url` varchar(100) NOT NULL, + `resource_id` BIGINT DEFAULT NULL, + `subresource_id` BIGINT DEFAULT NULL, + `command_as_json` text NOT NULL, + `maker_id` BIGINT NOT NULL, + `made_on_date` datetime NOT NULL, + `checker_id` BIGINT DEFAULT NULL, + `checked_on_date` datetime DEFAULT NULL, + `status` SMALLINT NOT NULL, + PRIMARY KEY (`id`), + KEY `FK_m_maker_m_appuser` (`maker_id`), + KEY `FK_m_checker_m_appuser` (`checker_id`), + KEY `action_name` (`action_name`), + KEY `entity_name` (`entity_name`,`resource_id`), + KEY `made_on_date` (`made_on_date`), + KEY `checked_on_date` (`checked_on_date`), + KEY `status` (`status`), + KEY `office_id` (`office_id`), + KEY `group_id` (`office_id`), + KEY `client_id` (`office_id`), + KEY `loan_id` (`office_id`), + CONSTRAINT `FK_m_checker_m_appuser` FOREIGN KEY (`checker_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_m_maker_m_appuser` FOREIGN KEY (`maker_id`) REFERENCES `m_appuser` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_charge` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(100) DEFAULT NULL, + `currency_code` varchar(3) NOT NULL, + `charge_applies_to_enum` SMALLINT NOT NULL, + `charge_time_enum` SMALLINT NOT NULL, + `charge_calculation_enum` SMALLINT NOT NULL, + `amount` decimal(19, 6) NOT NULL, + `is_penalty` tinyint NOT NULL DEFAULT '0', + `is_active` tinyint NOT NULL, + `is_deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_fund` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(255) DEFAULT NULL, + `external_id` varchar(100) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `fund_name_org` (`name`), + UNIQUE KEY `fund_externalid_org` (`external_id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_staff` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `is_loan_officer` tinyint NOT NULL DEFAULT '0', + `office_id` BIGINT DEFAULT NULL, + `firstname` varchar(50) DEFAULT NULL, + `lastname` varchar(50) DEFAULT NULL, + `display_name` varchar(100) NOT NULL, + `joining_date` date, + PRIMARY KEY (`id`), + UNIQUE KEY `display_name` (`display_name`), + KEY `FK_m_staff_m_office` (`office_id`), + CONSTRAINT `FK_m_staff_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- ============ end of organisation wide related tables =========== -- DDL client/group related tables -CREATE TABLE `m_group_level` ( -`id` INT NOT NULL AUTO_INCREMENT, -`parent_id` INT NULL DEFAULT NULL, -`super_parent` tinyint NOT NULL, -`level_name` VARCHAR(100) NOT NULL, -`recursable` tinyint NOT NULL, -`can_have_clients` tinyint NOT NULL, -PRIMARY KEY (`id`), -INDEX `Parent_levelId_reference` (`parent_id`), -CONSTRAINT `Parent_levelId_reference` FOREIGN KEY (`parent_id`) REFERENCES `m_group_level` (`id`) +CREATE TABLE `m_group_level` +( + `id` INT NOT NULL AUTO_INCREMENT, + `parent_id` INT NULL DEFAULT NULL, + `super_parent` tinyint NOT NULL, + `level_name` VARCHAR(100) NOT NULL, + `recursable` tinyint NOT NULL, + `can_have_clients` tinyint NOT NULL, + PRIMARY KEY (`id`), + INDEX `Parent_levelId_reference` (`parent_id`), + CONSTRAINT `Parent_levelId_reference` FOREIGN KEY (`parent_id`) REFERENCES `m_group_level` (`id`) )ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -CREATE TABLE `m_group` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `office_id` BIGINT NOT NULL, - `staff_id` BIGINT DEFAULT NULL, - `parent_id` BIGINT NULL DEFAULT NULL, - `level_Id` INT NOT NULL, - `hierarchy` VARCHAR(100) NULL DEFAULT NULL, - `name` varchar(100) NOT NULL, - `external_id` varchar(100) DEFAULT NULL, - `is_deleted` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`, `level_id`), - UNIQUE KEY `external_id` (`external_id`, `level_Id`), - KEY `office_id` (`office_id`), - KEY `staff_id` (`staff_id`), - CONSTRAINT `m_group_ibfk_1` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`), - CONSTRAINT `Parent_Id_reference` FOREIGN KEY (`parent_id`) REFERENCES `m_group` (`id`), - CONSTRAINT `FK_m_group_level` FOREIGN KEY (`level_Id`) REFERENCES `m_group_level` (`id`), - CONSTRAINT `FK_m_group_m_staff` FOREIGN KEY (`staff_id`) REFERENCES `m_staff` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_client` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_no` varchar(20) NOT NULL, - `office_id` BIGINT NOT NULL, - `external_id` varchar(100) DEFAULT NULL, - `firstname` varchar(50) DEFAULT NULL, - `middlename` varchar(50) DEFAULT NULL, - `lastname` varchar(50) DEFAULT NULL, - `fullname` varchar(100) DEFAULT NULL, - `display_name` varchar(100) NOT NULL, - `image_key` varchar(500) DEFAULT NULL, - `joined_date` date DEFAULT NULL, - `is_deleted` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `account_no_UNIQUE` (`account_no`), - UNIQUE KEY `external_id` (`external_id`), - KEY `FKCE00CAB3E0DD567A` (`office_id`), - CONSTRAINT `FKCE00CAB3E0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_client_identifier` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `document_type_id` INT NOT NULL, - `document_key` varchar(50) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `unique_identifier_key` (`document_type_id`,`document_key`), - UNIQUE KEY `unique_client_identifier` (`client_id`,`document_type_id`), - KEY `FK_m_client_document_m_client` (`client_id`), - KEY `FK_m_client_document_m_code_value` (`document_type_id`), - CONSTRAINT `FK_m_client_document_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FK_m_client_document_m_code_value` FOREIGN KEY (`document_type_id`) REFERENCES `m_code_value` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_group_client` ( - `group_id` BIGINT NOT NULL, - `client_id` BIGINT NOT NULL, - PRIMARY KEY (`group_id`,`client_id`), - KEY `client_id` (`client_id`), - CONSTRAINT `m_group_client_ibfk_1` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`), - CONSTRAINT `m_group_client_ibfk_2` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) +CREATE TABLE `m_group` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `office_id` BIGINT NOT NULL, + `staff_id` BIGINT DEFAULT NULL, + `parent_id` BIGINT NULL DEFAULT NULL, + `level_Id` INT NOT NULL, + `hierarchy` VARCHAR(100) NULL DEFAULT NULL, + `name` varchar(100) NOT NULL, + `external_id` varchar(100) DEFAULT NULL, + `is_deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `name` (`name`, `level_id`), + UNIQUE KEY `external_id` (`external_id`, `level_Id`), + KEY `office_id` (`office_id`), + KEY `staff_id` (`staff_id`), + CONSTRAINT `m_group_ibfk_1` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`), + CONSTRAINT `Parent_Id_reference` FOREIGN KEY (`parent_id`) REFERENCES `m_group` (`id`), + CONSTRAINT `FK_m_group_level` FOREIGN KEY (`level_Id`) REFERENCES `m_group_level` (`id`), + CONSTRAINT `FK_m_group_m_staff` FOREIGN KEY (`staff_id`) REFERENCES `m_staff` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_client` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `account_no` varchar(20) NOT NULL, + `office_id` BIGINT NOT NULL, + `external_id` varchar(100) DEFAULT NULL, + `firstname` varchar(50) DEFAULT NULL, + `middlename` varchar(50) DEFAULT NULL, + `lastname` varchar(50) DEFAULT NULL, + `fullname` varchar(100) DEFAULT NULL, + `display_name` varchar(100) NOT NULL, + `image_key` varchar(500) DEFAULT NULL, + `joined_date` date DEFAULT NULL, + `is_deleted` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + UNIQUE KEY `account_no_UNIQUE` (`account_no`), + UNIQUE KEY `external_id` (`external_id`), + KEY `FKCE00CAB3E0DD567A` (`office_id`), + CONSTRAINT `FKCE00CAB3E0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_client_identifier` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `client_id` BIGINT NOT NULL, + `document_type_id` INT NOT NULL, + `document_key` varchar(50) NOT NULL, + `description` varchar(500) DEFAULT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unique_identifier_key` (`document_type_id`,`document_key`), + UNIQUE KEY `unique_client_identifier` (`client_id`,`document_type_id`), + KEY `FK_m_client_document_m_client` (`client_id`), + KEY `FK_m_client_document_m_code_value` (`document_type_id`), + CONSTRAINT `FK_m_client_document_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), + CONSTRAINT `FK_m_client_document_m_code_value` FOREIGN KEY (`document_type_id`) REFERENCES `m_code_value` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_group_client` +( + `group_id` BIGINT NOT NULL, + `client_id` BIGINT NOT NULL, + PRIMARY KEY (`group_id`, `client_id`), + KEY `client_id` (`client_id`), + CONSTRAINT `m_group_client_ibfk_1` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`), + CONSTRAINT `m_group_client_ibfk_2` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- ==== end of client/group related tables ========== -- DDL for loan and loan related tables -CREATE TABLE `m_product_loan` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `currency_code` varchar(3) NOT NULL, - `currency_digits` SMALLINT NOT NULL, - `principal_amount` decimal(19,6) NOT NULL, - `arrearstolerance_amount` decimal(19,6) DEFAULT NULL, - `name` varchar(100) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `fund_id` BIGINT DEFAULT NULL, - `nominal_interest_rate_per_period` decimal(19,6) NOT NULL, - `interest_period_frequency_enum` SMALLINT NOT NULL, - `annual_nominal_interest_rate` decimal(19,6) NOT NULL, - `interest_method_enum` SMALLINT NOT NULL, - `interest_calculated_in_period_enum` SMALLINT NOT NULL DEFAULT '1', - `repay_every` SMALLINT NOT NULL, - `repayment_period_frequency_enum` SMALLINT NOT NULL, - `number_of_repayments` SMALLINT NOT NULL, - `amortization_method_enum` SMALLINT NOT NULL, - `accounting_type` SMALLINT NOT NULL, - `loan_transaction_strategy_id` BIGINT DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `unq_name` (`name`), - KEY `FKA6A8A7D77240145` (`fund_id`), - CONSTRAINT `FKA6A8A7D77240145` FOREIGN KEY (`fund_id`) REFERENCES `m_fund` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_product_loan_charge` ( - `product_loan_id` BIGINT NOT NULL, - `charge_id` BIGINT NOT NULL, - PRIMARY KEY (`product_loan_id`,`charge_id`), - KEY `charge_id` (`charge_id`), - CONSTRAINT `m_product_loan_charge_ibfk_1` FOREIGN KEY (`charge_id`) REFERENCES `m_charge` (`id`), - CONSTRAINT `m_product_loan_charge_ibfk_2` FOREIGN KEY (`product_loan_id`) REFERENCES `m_product_loan` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_loan` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_no` varchar(20) NOT NULL, - `external_id` varchar(100) DEFAULT NULL, - `client_id` BIGINT DEFAULT NULL, - `group_id` BIGINT DEFAULT NULL, - `product_id` BIGINT DEFAULT NULL, - `fund_id` BIGINT DEFAULT NULL, - `loan_officer_id` BIGINT DEFAULT NULL, - `loanpurpose_cv_id` INT DEFAULT NULL, - `loan_status_id` SMALLINT NOT NULL, - `currency_code` varchar(3) NOT NULL, - `currency_digits` SMALLINT NOT NULL, - `principal_amount` decimal(19,6) NOT NULL, - `arrearstolerance_amount` decimal(19,6) DEFAULT NULL, - `nominal_interest_rate_per_period` decimal(19,6) NOT NULL, - `interest_period_frequency_enum` SMALLINT NOT NULL, - `annual_nominal_interest_rate` decimal(19,6) NOT NULL, - `interest_method_enum` SMALLINT NOT NULL, - `interest_calculated_in_period_enum` SMALLINT NOT NULL DEFAULT '1', - `term_frequency` SMALLINT NOT NULL DEFAULT '0', - `term_period_frequency_enum` SMALLINT NOT NULL DEFAULT '2', - `repay_every` SMALLINT NOT NULL, - `repayment_period_frequency_enum` SMALLINT NOT NULL, - `number_of_repayments` SMALLINT NOT NULL, - `amortization_method_enum` SMALLINT NOT NULL, - `submittedon_date` date DEFAULT NULL, - `submittedon_userid` BIGINT DEFAULT NULL, - `approvedon_date` date DEFAULT NULL, - `approvedon_userid` BIGINT DEFAULT NULL, - `expected_disbursedon_date` date DEFAULT NULL, - `expected_firstrepaymenton_date` date DEFAULT NULL, - `interest_calculated_from_date` date DEFAULT NULL, - `disbursedon_date` date DEFAULT NULL, - `disbursedon_userid` BIGINT DEFAULT NULL, - `expected_maturedon_date` date DEFAULT NULL, - `maturedon_date` date DEFAULT NULL, - `closedon_date` date DEFAULT NULL, - `closedon_userid` BIGINT DEFAULT NULL, - `total_charges_due_at_disbursement_derived` decimal(19,6) DEFAULT NULL, - `principal_disbursed_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `principal_repaid_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `principal_writtenoff_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `principal_outstanding_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `interest_charged_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `interest_repaid_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `interest_waived_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `interest_writtenoff_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `interest_outstanding_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `fee_charges_charged_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `fee_charges_repaid_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `fee_charges_waived_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `fee_charges_writtenoff_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `fee_charges_outstanding_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `penalty_charges_charged_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `penalty_charges_repaid_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `penalty_charges_waived_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `penalty_charges_writtenoff_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `penalty_charges_outstanding_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `total_expected_repayment_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `total_repayment_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `total_expected_costofloan_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `total_costofloan_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `total_waived_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `total_writtenoff_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `total_outstanding_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `rejectedon_date` date DEFAULT NULL, - `rejectedon_userid` BIGINT DEFAULT NULL, - `rescheduledon_date` date DEFAULT NULL, - `withdrawnon_date` date DEFAULT NULL, - `withdrawnon_userid` BIGINT DEFAULT NULL, - `writtenoffon_date` date DEFAULT NULL, - `loan_transaction_strategy_id` BIGINT DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `loan_account_no_UNIQUE` (`account_no`), - UNIQUE KEY `loan_externalid_UNIQUE` (`external_id`), - KEY `FKB6F935D87179A0CB` (`client_id`), - KEY `FKB6F935D8C8D4B434` (`product_id`), - KEY `FK7C885877240145` (`fund_id`), - KEY `FK_m_loan_m_staff` (`loan_officer_id`), - KEY `group_id` (`group_id`), - KEY `FK_m_loanpurpose_codevalue` (`loanpurpose_cv_id`), - KEY `FK_submittedon_userid` (`submittedon_userid`), - KEY `FK_approvedon_userid` (`approvedon_userid`), - KEY `FK_rejectedon_userid` (`rejectedon_userid`), - KEY `FK_withdrawnon_userid` (`withdrawnon_userid`), - KEY `FK_disbursedon_userid` (`disbursedon_userid`), - KEY `FK_closedon_userid` (`closedon_userid`), - CONSTRAINT `FK7C885877240145` FOREIGN KEY (`fund_id`) REFERENCES `m_fund` (`id`), - CONSTRAINT `FKB6F935D87179A0CB` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FKB6F935D8C8D4B434` FOREIGN KEY (`product_id`) REFERENCES `m_product_loan` (`id`), - CONSTRAINT `FK_approvedon_userid` FOREIGN KEY (`approvedon_userid`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_closedon_userid` FOREIGN KEY (`closedon_userid`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_disbursedon_userid` FOREIGN KEY (`disbursedon_userid`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_m_loanpurpose_codevalue` FOREIGN KEY (`loanpurpose_cv_id`) REFERENCES `m_code_value` (`id`), - CONSTRAINT `FK_m_loan_m_staff` FOREIGN KEY (`loan_officer_id`) REFERENCES `m_staff` (`id`), - CONSTRAINT `FK_rejectedon_userid` FOREIGN KEY (`rejectedon_userid`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_submittedon_userid` FOREIGN KEY (`submittedon_userid`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_withdrawnon_userid` FOREIGN KEY (`withdrawnon_userid`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `m_loan_ibfk_1` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_loan_arrears_aging` ( - `loan_id` BIGINT NOT NULL AUTO_INCREMENT, - `principal_overdue_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `interest_overdue_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `fee_charges_overdue_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `penalty_charges_overdue_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `total_overdue_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `overdue_since_date_derived` date DEFAULT NULL, - PRIMARY KEY (`loan_id`), - CONSTRAINT `m_loan_arrears_aging_ibfk_1` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_guarantor` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `loan_id` BIGINT NOT NULL, - `client_reln_cv_id` INT DEFAULT NULL, - `type_enum` SMALLINT NOT NULL, - `entity_id` BIGINT NULL DEFAULT NULL, - `firstname` VARCHAR(50) NULL DEFAULT NULL, - `lastname` VARCHAR(50) NULL DEFAULT NULL, - `dob` DATE NULL DEFAULT NULL, - `address_line_1` VARCHAR(500) NULL DEFAULT NULL, - `address_line_2` VARCHAR(500) NULL DEFAULT NULL, - `city` VARCHAR(50) NULL DEFAULT NULL, - `state` VARCHAR(50) NULL DEFAULT NULL, - `country` VARCHAR(50) NULL DEFAULT NULL, - `zip` VARCHAR(20) NULL DEFAULT NULL, +CREATE TABLE `m_product_loan` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `currency_code` varchar(3) NOT NULL, + `currency_digits` SMALLINT NOT NULL, + `principal_amount` decimal(19, 6) NOT NULL, + `arrearstolerance_amount` decimal(19, 6) DEFAULT NULL, + `name` varchar(100) NOT NULL, + `description` varchar(500) DEFAULT NULL, + `fund_id` BIGINT DEFAULT NULL, + `nominal_interest_rate_per_period` decimal(19, 6) NOT NULL, + `interest_period_frequency_enum` SMALLINT NOT NULL, + `annual_nominal_interest_rate` decimal(19, 6) NOT NULL, + `interest_method_enum` SMALLINT NOT NULL, + `interest_calculated_in_period_enum` SMALLINT NOT NULL DEFAULT '1', + `repay_every` SMALLINT NOT NULL, + `repayment_period_frequency_enum` SMALLINT NOT NULL, + `number_of_repayments` SMALLINT NOT NULL, + `amortization_method_enum` SMALLINT NOT NULL, + `accounting_type` SMALLINT NOT NULL, + `loan_transaction_strategy_id` BIGINT DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `unq_name` (`name`), + KEY `FKA6A8A7D77240145` (`fund_id`), + CONSTRAINT `FKA6A8A7D77240145` FOREIGN KEY (`fund_id`) REFERENCES `m_fund` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_product_loan_charge` +( + `product_loan_id` BIGINT NOT NULL, + `charge_id` BIGINT NOT NULL, + PRIMARY KEY (`product_loan_id`, `charge_id`), + KEY `charge_id` (`charge_id`), + CONSTRAINT `m_product_loan_charge_ibfk_1` FOREIGN KEY (`charge_id`) REFERENCES `m_charge` (`id`), + CONSTRAINT `m_product_loan_charge_ibfk_2` FOREIGN KEY (`product_loan_id`) REFERENCES `m_product_loan` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_loan` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `account_no` varchar(20) NOT NULL, + `external_id` varchar(100) DEFAULT NULL, + `client_id` BIGINT DEFAULT NULL, + `group_id` BIGINT DEFAULT NULL, + `product_id` BIGINT DEFAULT NULL, + `fund_id` BIGINT DEFAULT NULL, + `loan_officer_id` BIGINT DEFAULT NULL, + `loanpurpose_cv_id` INT DEFAULT NULL, + `loan_status_id` SMALLINT NOT NULL, + `currency_code` varchar(3) NOT NULL, + `currency_digits` SMALLINT NOT NULL, + `principal_amount` decimal(19, 6) NOT NULL, + `arrearstolerance_amount` decimal(19, 6) DEFAULT NULL, + `nominal_interest_rate_per_period` decimal(19, 6) NOT NULL, + `interest_period_frequency_enum` SMALLINT NOT NULL, + `annual_nominal_interest_rate` decimal(19, 6) NOT NULL, + `interest_method_enum` SMALLINT NOT NULL, + `interest_calculated_in_period_enum` SMALLINT NOT NULL DEFAULT '1', + `term_frequency` SMALLINT NOT NULL DEFAULT '0', + `term_period_frequency_enum` SMALLINT NOT NULL DEFAULT '2', + `repay_every` SMALLINT NOT NULL, + `repayment_period_frequency_enum` SMALLINT NOT NULL, + `number_of_repayments` SMALLINT NOT NULL, + `amortization_method_enum` SMALLINT NOT NULL, + `submittedon_date` date DEFAULT NULL, + `submittedon_userid` BIGINT DEFAULT NULL, + `approvedon_date` date DEFAULT NULL, + `approvedon_userid` BIGINT DEFAULT NULL, + `expected_disbursedon_date` date DEFAULT NULL, + `expected_firstrepaymenton_date` date DEFAULT NULL, + `interest_calculated_from_date` date DEFAULT NULL, + `disbursedon_date` date DEFAULT NULL, + `disbursedon_userid` BIGINT DEFAULT NULL, + `expected_maturedon_date` date DEFAULT NULL, + `maturedon_date` date DEFAULT NULL, + `closedon_date` date DEFAULT NULL, + `closedon_userid` BIGINT DEFAULT NULL, + `total_charges_due_at_disbursement_derived` decimal(19, 6) DEFAULT NULL, + `principal_disbursed_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `principal_repaid_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `principal_writtenoff_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `principal_outstanding_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `interest_charged_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `interest_repaid_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `interest_waived_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `interest_writtenoff_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `interest_outstanding_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `fee_charges_charged_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `fee_charges_repaid_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `fee_charges_waived_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `fee_charges_writtenoff_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `fee_charges_outstanding_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `penalty_charges_charged_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `penalty_charges_repaid_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `penalty_charges_waived_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `penalty_charges_writtenoff_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `penalty_charges_outstanding_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `total_expected_repayment_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `total_repayment_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `total_expected_costofloan_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `total_costofloan_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `total_waived_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `total_writtenoff_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `total_outstanding_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `rejectedon_date` date DEFAULT NULL, + `rejectedon_userid` BIGINT DEFAULT NULL, + `rescheduledon_date` date DEFAULT NULL, + `withdrawnon_date` date DEFAULT NULL, + `withdrawnon_userid` BIGINT DEFAULT NULL, + `writtenoffon_date` date DEFAULT NULL, + `loan_transaction_strategy_id` BIGINT DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `loan_account_no_UNIQUE` (`account_no`), + UNIQUE KEY `loan_externalid_UNIQUE` (`external_id`), + KEY `FKB6F935D87179A0CB` (`client_id`), + KEY `FKB6F935D8C8D4B434` (`product_id`), + KEY `FK7C885877240145` (`fund_id`), + KEY `FK_m_loan_m_staff` (`loan_officer_id`), + KEY `group_id` (`group_id`), + KEY `FK_m_loanpurpose_codevalue` (`loanpurpose_cv_id`), + KEY `FK_submittedon_userid` (`submittedon_userid`), + KEY `FK_approvedon_userid` (`approvedon_userid`), + KEY `FK_rejectedon_userid` (`rejectedon_userid`), + KEY `FK_withdrawnon_userid` (`withdrawnon_userid`), + KEY `FK_disbursedon_userid` (`disbursedon_userid`), + KEY `FK_closedon_userid` (`closedon_userid`), + CONSTRAINT `FK7C885877240145` FOREIGN KEY (`fund_id`) REFERENCES `m_fund` (`id`), + CONSTRAINT `FKB6F935D87179A0CB` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), + CONSTRAINT `FKB6F935D8C8D4B434` FOREIGN KEY (`product_id`) REFERENCES `m_product_loan` (`id`), + CONSTRAINT `FK_approvedon_userid` FOREIGN KEY (`approvedon_userid`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_closedon_userid` FOREIGN KEY (`closedon_userid`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_disbursedon_userid` FOREIGN KEY (`disbursedon_userid`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_m_loanpurpose_codevalue` FOREIGN KEY (`loanpurpose_cv_id`) REFERENCES `m_code_value` (`id`), + CONSTRAINT `FK_m_loan_m_staff` FOREIGN KEY (`loan_officer_id`) REFERENCES `m_staff` (`id`), + CONSTRAINT `FK_rejectedon_userid` FOREIGN KEY (`rejectedon_userid`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_submittedon_userid` FOREIGN KEY (`submittedon_userid`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_withdrawnon_userid` FOREIGN KEY (`withdrawnon_userid`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `m_loan_ibfk_1` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_loan_arrears_aging` +( + `loan_id` BIGINT NOT NULL AUTO_INCREMENT, + `principal_overdue_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `interest_overdue_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `fee_charges_overdue_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `penalty_charges_overdue_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `total_overdue_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `overdue_since_date_derived` date DEFAULT NULL, + PRIMARY KEY (`loan_id`), + CONSTRAINT `m_loan_arrears_aging_ibfk_1` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_guarantor` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `loan_id` BIGINT NOT NULL, + `client_reln_cv_id` INT DEFAULT NULL, + `type_enum` SMALLINT NOT NULL, + `entity_id` BIGINT NULL DEFAULT NULL, + `firstname` VARCHAR(50) NULL DEFAULT NULL, + `lastname` VARCHAR(50) NULL DEFAULT NULL, + `dob` DATE NULL DEFAULT NULL, + `address_line_1` VARCHAR(500) NULL DEFAULT NULL, + `address_line_2` VARCHAR(500) NULL DEFAULT NULL, + `city` VARCHAR(50) NULL DEFAULT NULL, + `state` VARCHAR(50) NULL DEFAULT NULL, + `country` VARCHAR(50) NULL DEFAULT NULL, + `zip` VARCHAR(20) NULL DEFAULT NULL, `house_phone_number` VARCHAR(20) NULL DEFAULT NULL, - `mobile_number` VARCHAR(20) NULL DEFAULT NULL, - `comment` VARCHAR(500) NULL DEFAULT NULL, + `mobile_number` VARCHAR(20) NULL DEFAULT NULL, + `comment` VARCHAR(500) NULL DEFAULT NULL, PRIMARY KEY (`id`), - INDEX `FK_m_guarantor_m_loan` (`loan_id`), - CONSTRAINT `FK_m_guarantor_m_code_value` FOREIGN KEY (`client_reln_cv_id`) REFERENCES `m_code_value` (`id`) - CONSTRAINT `FK_m_guarantor_m_loan` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_loan_charge` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `loan_id` BIGINT NOT NULL, - `charge_id` BIGINT NOT NULL, - `is_penalty` tinyint NOT NULL DEFAULT '0', - `charge_time_enum` SMALLINT NOT NULL, - `due_for_collection_as_of_date` date DEFAULT NULL, - `charge_calculation_enum` SMALLINT NOT NULL, - `calculation_percentage` decimal(19,6) DEFAULT NULL, - `calculation_on_amount` decimal(19,6) DEFAULT NULL, - `amount` decimal(19,6) NOT NULL, - `amount_paid_derived` decimal(19,6) DEFAULT NULL, - `amount_waived_derived` decimal(19,6) DEFAULT NULL, - `amount_writtenoff_derived` decimal(19,6) DEFAULT NULL, - `amount_outstanding_derived` decimal(19,6) NOT NULL DEFAULT '0.000000', - `is_paid_derived` tinyint NOT NULL DEFAULT '0', - `waived` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `charge_id` (`charge_id`), - KEY `m_loan_charge_ibfk_2` (`loan_id`), - CONSTRAINT `m_loan_charge_ibfk_1` FOREIGN KEY (`charge_id`) REFERENCES `m_charge` (`id`), - CONSTRAINT `m_loan_charge_ibfk_2` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_loan_collateral` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `loan_id` BIGINT NOT NULL, - `type_cv_id` INT NOT NULL, - `value` DECIMAL(19,6) DEFAULT NULL, - `description` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_collateral_m_loan` (`loan_id`), - KEY `FK_collateral_code_value` (`type_cv_id`), - CONSTRAINT `FK_collateral_m_loan` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`), - CONSTRAINT `FK_collateral_code_value` FOREIGN KEY (`type_cv_id`) REFERENCES `m_code_value` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_loan_officer_assignment_history` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `loan_id` BIGINT NOT NULL, - `loan_officer_id` BIGINT DEFAULT NULL, - `start_date` date NOT NULL, - `end_date` date DEFAULT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `fk_m_loan_officer_assignment_history_0001` (`loan_id`), - KEY `fk_m_loan_officer_assignment_history_0002` (`loan_officer_id`), - CONSTRAINT `fk_m_loan_officer_assignment_history_0001` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`), - CONSTRAINT `fk_m_loan_officer_assignment_history_0002` FOREIGN KEY (`loan_officer_id`) REFERENCES `m_staff` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_loan_repayment_schedule` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `loan_id` BIGINT NOT NULL, - `fromdate` date DEFAULT NULL, - `duedate` date NOT NULL, - `installment` SMALLINT NOT NULL, - `principal_amount` decimal(19,6) DEFAULT NULL, - `principal_completed_derived` decimal(19,6) DEFAULT NULL, - `principal_writtenoff_derived` decimal(19,6) DEFAULT NULL, - `interest_amount` decimal(19,6) DEFAULT NULL, - `interest_completed_derived` decimal(19,6) DEFAULT NULL, - `interest_writtenoff_derived` decimal(19,6) DEFAULT NULL, - `fee_charges_amount` decimal(19,6) DEFAULT NULL, - `fee_charges_completed_derived` decimal(19,6) DEFAULT NULL, - `fee_charges_writtenoff_derived` decimal(19,6) DEFAULT NULL, - `fee_charges_waived_derived` decimal(19,6) DEFAULT NULL, - `penalty_charges_amount` decimal(19,6) DEFAULT NULL, - `penalty_charges_completed_derived` decimal(19,6) DEFAULT NULL, - `penalty_charges_writtenoff_derived` decimal(19,6) DEFAULT NULL, - `penalty_charges_waived_derived` decimal(19,6) DEFAULT NULL, - `completed_derived` bit(1) NOT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `interest_waived_derived` decimal(19,6) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK488B92AA40BE0710` (`loan_id`), - CONSTRAINT `FK488B92AA40BE0710` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_loan_transaction` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `loan_id` BIGINT NOT NULL, - `is_reversed` tinyint NOT NULL, - `transaction_type_enum` SMALLINT NOT NULL, - `transaction_date` date NOT NULL, - `amount` decimal(19,6) NOT NULL, - `principal_portion_derived` decimal(19,6) DEFAULT NULL, - `interest_portion_derived` decimal(19,6) DEFAULT NULL, - `fee_charges_portion_derived` decimal(19,6) DEFAULT NULL, - `penalty_charges_portion_derived` decimal(19,6) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FKCFCEA42640BE0710` (`loan_id`), - CONSTRAINT `FKCFCEA42640BE0710` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) + INDEX `FK_m_guarantor_m_loan` (`loan_id`), + CONSTRAINT `FK_m_guarantor_m_code_value` FOREIGN KEY (`client_reln_cv_id`) REFERENCES `m_code_value` (`id`) + CONSTRAINT `FK_m_guarantor_m_loan` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_loan_charge` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `loan_id` BIGINT NOT NULL, + `charge_id` BIGINT NOT NULL, + `is_penalty` tinyint NOT NULL DEFAULT '0', + `charge_time_enum` SMALLINT NOT NULL, + `due_for_collection_as_of_date` date DEFAULT NULL, + `charge_calculation_enum` SMALLINT NOT NULL, + `calculation_percentage` decimal(19, 6) DEFAULT NULL, + `calculation_on_amount` decimal(19, 6) DEFAULT NULL, + `amount` decimal(19, 6) NOT NULL, + `amount_paid_derived` decimal(19, 6) DEFAULT NULL, + `amount_waived_derived` decimal(19, 6) DEFAULT NULL, + `amount_writtenoff_derived` decimal(19, 6) DEFAULT NULL, + `amount_outstanding_derived` decimal(19, 6) NOT NULL DEFAULT '0.000000', + `is_paid_derived` tinyint NOT NULL DEFAULT '0', + `waived` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `charge_id` (`charge_id`), + KEY `m_loan_charge_ibfk_2` (`loan_id`), + CONSTRAINT `m_loan_charge_ibfk_1` FOREIGN KEY (`charge_id`) REFERENCES `m_charge` (`id`), + CONSTRAINT `m_loan_charge_ibfk_2` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_loan_collateral` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `loan_id` BIGINT NOT NULL, + `type_cv_id` INT NOT NULL, + `value` DECIMAL(19, 6) DEFAULT NULL, + `description` varchar(500) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FK_collateral_m_loan` (`loan_id`), + KEY `FK_collateral_code_value` (`type_cv_id`), + CONSTRAINT `FK_collateral_m_loan` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`), + CONSTRAINT `FK_collateral_code_value` FOREIGN KEY (`type_cv_id`) REFERENCES `m_code_value` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_loan_officer_assignment_history` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `loan_id` BIGINT NOT NULL, + `loan_officer_id` BIGINT DEFAULT NULL, + `start_date` date NOT NULL, + `end_date` date DEFAULT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `fk_m_loan_officer_assignment_history_0001` (`loan_id`), + KEY `fk_m_loan_officer_assignment_history_0002` (`loan_officer_id`), + CONSTRAINT `fk_m_loan_officer_assignment_history_0001` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`), + CONSTRAINT `fk_m_loan_officer_assignment_history_0002` FOREIGN KEY (`loan_officer_id`) REFERENCES `m_staff` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_loan_repayment_schedule` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `loan_id` BIGINT NOT NULL, + `fromdate` date DEFAULT NULL, + `duedate` date NOT NULL, + `installment` SMALLINT NOT NULL, + `principal_amount` decimal(19, 6) DEFAULT NULL, + `principal_completed_derived` decimal(19, 6) DEFAULT NULL, + `principal_writtenoff_derived` decimal(19, 6) DEFAULT NULL, + `interest_amount` decimal(19, 6) DEFAULT NULL, + `interest_completed_derived` decimal(19, 6) DEFAULT NULL, + `interest_writtenoff_derived` decimal(19, 6) DEFAULT NULL, + `fee_charges_amount` decimal(19, 6) DEFAULT NULL, + `fee_charges_completed_derived` decimal(19, 6) DEFAULT NULL, + `fee_charges_writtenoff_derived` decimal(19, 6) DEFAULT NULL, + `fee_charges_waived_derived` decimal(19, 6) DEFAULT NULL, + `penalty_charges_amount` decimal(19, 6) DEFAULT NULL, + `penalty_charges_completed_derived` decimal(19, 6) DEFAULT NULL, + `penalty_charges_writtenoff_derived` decimal(19, 6) DEFAULT NULL, + `penalty_charges_waived_derived` decimal(19, 6) DEFAULT NULL, + `completed_derived` bit(1) NOT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `interest_waived_derived` decimal(19, 6) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FK488B92AA40BE0710` (`loan_id`), + CONSTRAINT `FK488B92AA40BE0710` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_loan_transaction` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `loan_id` BIGINT NOT NULL, + `is_reversed` tinyint NOT NULL, + `transaction_type_enum` SMALLINT NOT NULL, + `transaction_date` date NOT NULL, + `amount` decimal(19, 6) NOT NULL, + `principal_portion_derived` decimal(19, 6) DEFAULT NULL, + `interest_portion_derived` decimal(19, 6) DEFAULT NULL, + `fee_charges_portion_derived` decimal(19, 6) DEFAULT NULL, + `penalty_charges_portion_derived` decimal(19, 6) DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FKCFCEA42640BE0710` (`loan_id`), + CONSTRAINT `FKCFCEA42640BE0710` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- ======== end of loan related tables ========== -CREATE TABLE `m_savings_product` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) NOT NULL, - `description` varchar(500) NOT NULL, - `currency_code` varchar(3) NOT NULL, - `currency_digits` SMALLINT NOT NULL, - `nominal_interest_rate_per_period` decimal(19,6) NOT NULL, - `nominal_interest_rate_period_frequency_enum` SMALLINT NOT NULL, - `interest_period_enum` SMALLINT NOT NULL, - `interest_calculation_type_enum` SMALLINT NOT NULL, - `interest_calculation_days_in_year_type_enum` SMALLINT NOT NULL, - `min_required_opening_balance` decimal(19,6) DEFAULT NULL, - `lockin_period_frequency` decimal(19,6) DEFAULT NULL, - `lockin_period_frequency_enum` SMALLINT DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `sp_unq_name` (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_savings_account` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_no` varchar(20) NOT NULL, - `external_id` varchar(100) DEFAULT NULL, - `client_id` BIGINT DEFAULT NULL, - `group_id` BIGINT DEFAULT NULL, - `product_id` BIGINT DEFAULT NULL, - `status_enum` SMALLINT NOT NULL DEFAULT 300, - `activation_date` DATE DEFAULT NULL, - `currency_code` varchar(3) NOT NULL, - `currency_digits` SMALLINT NOT NULL, - `nominal_interest_rate_per_period` decimal(19,6) NOT NULL, - `nominal_interest_rate_period_frequency_enum` SMALLINT NOT NULL, - `annual_nominal_interest_rate` decimal(19,6) NOT NULL, - `interest_period_enum` SMALLINT NOT NULL, - `interest_calculation_type_enum` SMALLINT NOT NULL, - `interest_calculation_days_in_year_type_enum` SMALLINT NOT NULL, - `min_required_opening_balance` decimal(19,6) DEFAULT NULL, - `lockin_period_frequency` decimal(19,6) DEFAULT NULL, - `lockin_period_frequency_enum` SMALLINT DEFAULT NULL, - `lockedin_until_date_derived` DATE DEFAULT NULL, - `total_deposits_derived` decimal(19,6) DEFAULT NULL, - `total_withdrawals_derived` decimal(19,6) DEFAULT NULL, - `total_interest_earned_derived` decimal(19,6) DEFAULT NULL, - `total_interest_posted_derived` decimal(19,6) DEFAULT NULL, - `account_balance_derived` decimal(19,6) NOT NULL DEFAULT 0, - PRIMARY KEY (`id`), - UNIQUE KEY `sa_account_no_UNIQUE` (`account_no`), - UNIQUE KEY `sa_externalid_UNIQUE` (`external_id`), - KEY `FKSA00000000000001` (`client_id`), - KEY `FKSA00000000000002` (`group_id`), - KEY `FKSA00000000000003` (`product_id`), - CONSTRAINT `FKSA00000000000001` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FKSA00000000000002` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`), - CONSTRAINT `FKSA00000000000003` FOREIGN KEY (`product_id`) REFERENCES `m_savings_product` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `m_savings_account_transaction` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `savings_account_id` BIGINT NOT NULL, - `transaction_type_enum` SMALLINT NOT NULL, - `transaction_date` date NOT NULL, - `amount` decimal(19,6) NOT NULL, - `is_reversed` tinyint NOT NULL, - `running_balance_derived` DECIMAL(19,6) NULL, - `balance_number_of_days_derived` INT NULL, - `balance_end_date_derived` DATE NULL, - `cumulative_balance_derived` DECIMAL(19,6) NULL, - PRIMARY KEY (`id`), - KEY `FKSAT0000000001` (`savings_account_id`), - CONSTRAINT `FKSAT0000000001` FOREIGN KEY (`savings_account_id`) REFERENCES `m_savings_account` (`id`) +CREATE TABLE `m_savings_product` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(100) NOT NULL, + `description` varchar(500) NOT NULL, + `currency_code` varchar(3) NOT NULL, + `currency_digits` SMALLINT NOT NULL, + `nominal_interest_rate_per_period` decimal(19, 6) NOT NULL, + `nominal_interest_rate_period_frequency_enum` SMALLINT NOT NULL, + `interest_period_enum` SMALLINT NOT NULL, + `interest_calculation_type_enum` SMALLINT NOT NULL, + `interest_calculation_days_in_year_type_enum` SMALLINT NOT NULL, + `min_required_opening_balance` decimal(19, 6) DEFAULT NULL, + `lockin_period_frequency` decimal(19, 6) DEFAULT NULL, + `lockin_period_frequency_enum` SMALLINT DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `sp_unq_name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_savings_account` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `account_no` varchar(20) NOT NULL, + `external_id` varchar(100) DEFAULT NULL, + `client_id` BIGINT DEFAULT NULL, + `group_id` BIGINT DEFAULT NULL, + `product_id` BIGINT DEFAULT NULL, + `status_enum` SMALLINT NOT NULL DEFAULT 300, + `activation_date` DATE DEFAULT NULL, + `currency_code` varchar(3) NOT NULL, + `currency_digits` SMALLINT NOT NULL, + `nominal_interest_rate_per_period` decimal(19, 6) NOT NULL, + `nominal_interest_rate_period_frequency_enum` SMALLINT NOT NULL, + `annual_nominal_interest_rate` decimal(19, 6) NOT NULL, + `interest_period_enum` SMALLINT NOT NULL, + `interest_calculation_type_enum` SMALLINT NOT NULL, + `interest_calculation_days_in_year_type_enum` SMALLINT NOT NULL, + `min_required_opening_balance` decimal(19, 6) DEFAULT NULL, + `lockin_period_frequency` decimal(19, 6) DEFAULT NULL, + `lockin_period_frequency_enum` SMALLINT DEFAULT NULL, + `lockedin_until_date_derived` DATE DEFAULT NULL, + `total_deposits_derived` decimal(19, 6) DEFAULT NULL, + `total_withdrawals_derived` decimal(19, 6) DEFAULT NULL, + `total_interest_earned_derived` decimal(19, 6) DEFAULT NULL, + `total_interest_posted_derived` decimal(19, 6) DEFAULT NULL, + `account_balance_derived` decimal(19, 6) NOT NULL DEFAULT 0, + PRIMARY KEY (`id`), + UNIQUE KEY `sa_account_no_UNIQUE` (`account_no`), + UNIQUE KEY `sa_externalid_UNIQUE` (`external_id`), + KEY `FKSA00000000000001` (`client_id`), + KEY `FKSA00000000000002` (`group_id`), + KEY `FKSA00000000000003` (`product_id`), + CONSTRAINT `FKSA00000000000001` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), + CONSTRAINT `FKSA00000000000002` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`), + CONSTRAINT `FKSA00000000000003` FOREIGN KEY (`product_id`) REFERENCES `m_savings_product` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `m_savings_account_transaction` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `savings_account_id` BIGINT NOT NULL, + `transaction_type_enum` SMALLINT NOT NULL, + `transaction_date` date NOT NULL, + `amount` decimal(19, 6) NOT NULL, + `is_reversed` tinyint NOT NULL, + `running_balance_derived` DECIMAL(19, 6) NULL, + `balance_number_of_days_derived` INT NULL, + `balance_end_date_derived` DATE NULL, + `cumulative_balance_derived` DECIMAL(19, 6) NULL, + PRIMARY KEY (`id`), + KEY `FKSAT0000000001` (`savings_account_id`), + CONSTRAINT `FKSAT0000000001` FOREIGN KEY (`savings_account_id`) REFERENCES `m_savings_account` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- end of savings account related tables -- DDL for notes associated with all client/group and financial accounts -CREATE TABLE `m_note` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT DEFAULT NULL, - `group_id` BIGINT DEFAULT NULL, - `loan_id` BIGINT DEFAULT NULL, - `loan_transaction_id` BIGINT DEFAULT NULL, - `note_type_enum` SMALLINT NOT NULL, - `note` varchar(1000) DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK7C9708924D26803` (`loan_transaction_id`), - KEY `FK7C97089541F0A56` (`createdby_id`), - KEY `FK7C970897179A0CB` (`client_id`), - KEY `FK_m_note_m_group` (`group_id`), - KEY `FK7C970898F889C3F` (`lastmodifiedby_id`), - KEY `FK7C9708940BE0710` (`loan_id`), - CONSTRAINT `FK7C9708924D26803` FOREIGN KEY (`loan_transaction_id`) REFERENCES `m_loan_transaction` (`id`), - CONSTRAINT `FK7C9708940BE0710` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`), - CONSTRAINT `FK7C97089541F0A56` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK7C970897179A0CB` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FK_m_note_m_group` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`), - CONSTRAINT `FK7C970898F889C3F` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`) +CREATE TABLE `m_note` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `client_id` BIGINT DEFAULT NULL, + `group_id` BIGINT DEFAULT NULL, + `loan_id` BIGINT DEFAULT NULL, + `loan_transaction_id` BIGINT DEFAULT NULL, + `note_type_enum` SMALLINT NOT NULL, + `note` varchar(1000) DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + PRIMARY KEY (`id`), + KEY `FK7C9708924D26803` (`loan_transaction_id`), + KEY `FK7C97089541F0A56` (`createdby_id`), + KEY `FK7C970897179A0CB` (`client_id`), + KEY `FK_m_note_m_group` (`group_id`), + KEY `FK7C970898F889C3F` (`lastmodifiedby_id`), + KEY `FK7C9708940BE0710` (`loan_id`), + CONSTRAINT `FK7C9708924D26803` FOREIGN KEY (`loan_transaction_id`) REFERENCES `m_loan_transaction` (`id`), + CONSTRAINT `FK7C9708940BE0710` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`), + CONSTRAINT `FK7C97089541F0A56` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK7C970897179A0CB` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), + CONSTRAINT `FK_m_note_m_group` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`), + CONSTRAINT `FK7C970898F889C3F` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- DDL for accounting sub system related tables -CREATE TABLE `acc_gl_account` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(45) NOT NULL, - `parent_id` BIGINT DEFAULT NULL, - `gl_code` varchar(45) NOT NULL, - `disabled` tinyint NOT NULL DEFAULT '0', - `manual_journal_entries_allowed` tinyint NOT NULL DEFAULT '1', - `account_usage` tinyint NOT NULL DEFAULT '2', - `classification_enum` SMALLINT NOT NULL, - `description` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `acc_gl_code` (`gl_code`), - KEY `FK_ACC_0000000001` (`parent_id`), - CONSTRAINT `FK_ACC_0000000001` FOREIGN KEY (`parent_id`) REFERENCES `acc_gl_account` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `acc_gl_closure` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `office_id` BIGINT NOT NULL, - `closing_date` date NOT NULL, - `is_deleted` INT NOT NULL DEFAULT '0', - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - `comments` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `office_id_closing_date` (`office_id`,`closing_date`), - KEY `FK_acc_gl_closure_m_office` (`office_id`), - KEY `FK_acc_gl_closure_m_appuser` (`createdby_id`), - KEY `FK_acc_gl_closure_m_appuser_2` (`lastmodifiedby_id`), - CONSTRAINT `FK_acc_gl_closure_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_closure_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_closure_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `acc_gl_journal_entry` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_id` BIGINT NOT NULL, - `office_id` BIGINT NOT NULL, - `reversal_id` BIGINT DEFAULT NULL, - `transaction_id` varchar(50) NOT NULL, - `reversed` tinyint NOT NULL DEFAULT '0', - `manual_entry` tinyint NOT NULL DEFAULT '0', - `entry_date` date NOT NULL, - `type_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `entity_type_enum` SMALLINT DEFAULT NULL, - `entity_id` BIGINT DEFAULT NULL, - `createdby_id` BIGINT NOT NULL, - `lastmodifiedby_id` BIGINT NOT NULL, - `created_date` datetime NOT NULL, - `lastmodified_date` datetime NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_acc_gl_journal_entry_m_office` (`office_id`), - KEY `FK_acc_gl_journal_entry_m_appuser` (`createdby_id`), - KEY `FK_acc_gl_journal_entry_m_appuser_2` (`lastmodifiedby_id`), - KEY `FK_acc_gl_journal_entry_acc_gl_journal_entry` (`reversal_id`), - KEY `FK_acc_gl_journal_entry_acc_gl_account` (`account_id`), - CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_account` FOREIGN KEY (`account_id`) REFERENCES `acc_gl_account` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_journal_entry` FOREIGN KEY (`reversal_id`) REFERENCES `acc_gl_journal_entry` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `acc_product_mapping` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `gl_account_id` BIGINT DEFAULT NULL, - `product_id` BIGINT DEFAULT NULL, - `product_type` SMALLINT DEFAULT NULL, - `financial_account_type` SMALLINT DEFAULT NULL, - PRIMARY KEY (`id`) +CREATE TABLE `acc_gl_account` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `name` varchar(45) NOT NULL, + `parent_id` BIGINT DEFAULT NULL, + `gl_code` varchar(45) NOT NULL, + `disabled` tinyint NOT NULL DEFAULT '0', + `manual_journal_entries_allowed` tinyint NOT NULL DEFAULT '1', + `account_usage` tinyint NOT NULL DEFAULT '2', + `classification_enum` SMALLINT NOT NULL, + `description` varchar(500) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `acc_gl_code` (`gl_code`), + KEY `FK_ACC_0000000001` (`parent_id`), + CONSTRAINT `FK_ACC_0000000001` FOREIGN KEY (`parent_id`) REFERENCES `acc_gl_account` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `acc_gl_closure` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `office_id` BIGINT NOT NULL, + `closing_date` date NOT NULL, + `is_deleted` INT NOT NULL DEFAULT '0', + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + `comments` varchar(500) DEFAULT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `office_id_closing_date` (`office_id`,`closing_date`), + KEY `FK_acc_gl_closure_m_office` (`office_id`), + KEY `FK_acc_gl_closure_m_appuser` (`createdby_id`), + KEY `FK_acc_gl_closure_m_appuser_2` (`lastmodifiedby_id`), + CONSTRAINT `FK_acc_gl_closure_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_closure_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_closure_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `acc_gl_journal_entry` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `account_id` BIGINT NOT NULL, + `office_id` BIGINT NOT NULL, + `reversal_id` BIGINT DEFAULT NULL, + `transaction_id` varchar(50) NOT NULL, + `reversed` tinyint NOT NULL DEFAULT '0', + `manual_entry` tinyint NOT NULL DEFAULT '0', + `entry_date` date NOT NULL, + `type_enum` SMALLINT NOT NULL, + `amount` decimal(19, 6) NOT NULL, + `description` varchar(500) DEFAULT NULL, + `entity_type_enum` SMALLINT DEFAULT NULL, + `entity_id` BIGINT DEFAULT NULL, + `createdby_id` BIGINT NOT NULL, + `lastmodifiedby_id` BIGINT NOT NULL, + `created_date` datetime NOT NULL, + `lastmodified_date` datetime NOT NULL, + PRIMARY KEY (`id`), + KEY `FK_acc_gl_journal_entry_m_office` (`office_id`), + KEY `FK_acc_gl_journal_entry_m_appuser` (`createdby_id`), + KEY `FK_acc_gl_journal_entry_m_appuser_2` (`lastmodifiedby_id`), + KEY `FK_acc_gl_journal_entry_acc_gl_journal_entry` (`reversal_id`), + KEY `FK_acc_gl_journal_entry_acc_gl_account` (`account_id`), + CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_account` FOREIGN KEY (`account_id`) REFERENCES `acc_gl_account` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_journal_entry` FOREIGN KEY (`reversal_id`) REFERENCES `acc_gl_journal_entry` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), + CONSTRAINT `FK_acc_gl_journal_entry_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `acc_product_mapping` +( + `id` BIGINT NOT NULL AUTO_INCREMENT, + `gl_account_id` BIGINT DEFAULT NULL, + `product_id` BIGINT DEFAULT NULL, + `product_type` SMALLINT DEFAULT NULL, + `financial_account_type` SMALLINT DEFAULT NULL, + PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- =========== end of accounting related tables ========== -- DDL for reporting related tables -CREATE TABLE `rpt_sequence` ( - `id` INT NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `stretchy_parameter` ( - `parameter_id` INT NOT NULL AUTO_INCREMENT, - `parameter_name` varchar(45) NOT NULL, - `parameter_variable` varchar(45) DEFAULT NULL, - `parameter_label` varchar(45) NOT NULL, - `parameter_displayType` varchar(45) NOT NULL, - `parameter_FormatType` varchar(10) NOT NULL, - `parameter_default` varchar(45) NOT NULL, - `special` varchar(1) DEFAULT NULL, - `selectOne` varchar(1) DEFAULT NULL, - `selectAll` varchar(1) DEFAULT NULL, - `parameter_sql` text, - `parent_parameter_id` INT NULL DEFAULT NULL, - PRIMARY KEY (`parameter_id`), - UNIQUE KEY `name_UNIQUE` (`parameter_name`), - INDEX `fk_stretchy_parameter_0001_idx` (`parent_parameter_id`), - CONSTRAINT `fk_stretchy_parameter_0001` FOREIGN KEY (`parent_parameter_id`) REFERENCES `stretchy_parameter` (`parameter_id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `stretchy_report` ( - `report_id` INT NOT NULL AUTO_INCREMENT, - `report_name` varchar(100) NOT NULL, - `report_type` varchar(20) NOT NULL, - `report_subtype` varchar(20) DEFAULT NULL, - `report_category` varchar(45) DEFAULT NULL, - `report_sql` text, - `description` text, - `core_report` tinyint DEFAULT '0', - `use_report` tinyint DEFAULT '0', - PRIMARY KEY (`report_id`), - UNIQUE KEY `report_name_UNIQUE` (`report_name`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; - -CREATE TABLE `stretchy_report_parameter` ( - `report_id` INT NOT NULL, - `parameter_id` INT NOT NULL, - `report_parameter_name` varchar(45) DEFAULT NULL, - PRIMARY KEY (`report_id`,`parameter_id`), - UNIQUE KEY `report_id_name_UNIQUE` (`report_id`,`report_parameter_name`) +CREATE TABLE `rpt_sequence` +( + `id` INT NOT NULL AUTO_INCREMENT, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `stretchy_parameter` +( + `parameter_id` INT NOT NULL AUTO_INCREMENT, + `parameter_name` varchar(45) NOT NULL, + `parameter_variable` varchar(45) DEFAULT NULL, + `parameter_label` varchar(45) NOT NULL, + `parameter_displayType` varchar(45) NOT NULL, + `parameter_FormatType` varchar(10) NOT NULL, + `parameter_default` varchar(45) NOT NULL, + `special` varchar(1) DEFAULT NULL, + `selectOne` varchar(1) DEFAULT NULL, + `selectAll` varchar(1) DEFAULT NULL, + `parameter_sql` text, + `parent_parameter_id` INT NULL DEFAULT NULL, + PRIMARY KEY (`parameter_id`), + UNIQUE KEY `name_UNIQUE` (`parameter_name`), + INDEX `fk_stretchy_parameter_0001_idx` (`parent_parameter_id`), + CONSTRAINT `fk_stretchy_parameter_0001` FOREIGN KEY (`parent_parameter_id`) REFERENCES `stretchy_parameter` (`parameter_id`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `stretchy_report` +( + `report_id` INT NOT NULL AUTO_INCREMENT, + `report_name` varchar(100) NOT NULL, + `report_type` varchar(20) NOT NULL, + `report_subtype` varchar(20) DEFAULT NULL, + `report_category` varchar(45) DEFAULT NULL, + `report_sql` text, + `description` text, + `core_report` tinyint DEFAULT '0', + `use_report` tinyint DEFAULT '0', + PRIMARY KEY (`report_id`), + UNIQUE KEY `report_name_UNIQUE` (`report_name`) +) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; + +CREATE TABLE `stretchy_report_parameter` +( + `report_id` INT NOT NULL, + `parameter_id` INT NOT NULL, + `report_parameter_name` varchar(45) DEFAULT NULL, + PRIMARY KEY (`report_id`, `parameter_id`), + UNIQUE KEY `report_id_name_UNIQUE` (`report_id`,`report_parameter_name`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- =========== end of reporting related tables ============ diff --git a/fineract-db/old-schema-files/0002-mifosx-base-reference-data-utf8.sql b/fineract-db/old-schema-files/0002-mifosx-base-reference-data-utf8.sql index e74d3cc012d..f061531875c 100644 --- a/fineract-db/old-schema-files/0002-mifosx-base-reference-data-utf8.sql +++ b/fineract-db/old-schema-files/0002-mifosx-base-reference-data-utf8.sql @@ -20,46 +20,44 @@ -- currency symbols may not apply through command line on windows so use a different client like mysql workbench INSERT INTO `c_configuration` -(`name`, `enabled`) -VALUES -('maker-checker', 0); + (`name`, `enabled`) +VALUES ('maker-checker', 0); INSERT INTO `r_enum_value` -VALUES -('amortization_method_enum',0,'Equal principle payments','Equal principle payments'), -('amortization_method_enum',1,'Equal installments','Equal installments'), -('interest_calculated_in_period_enum',0,'Daily','Daily'), -('interest_calculated_in_period_enum',1,'Same as repayment period','Same as repayment period'), -('interest_method_enum',0,'Declining Balance','Declining Balance'), -('interest_method_enum',1,'Flat','Flat'), -('interest_period_frequency_enum',2,'Per month','Per month'), -('interest_period_frequency_enum',3,'Per year','Per year'), -('loan_status_id',100,'Submitted and awaiting approval','Submitted and awaiting approval'), -('loan_status_id',200,'Approved','Approved'), -('loan_status_id',300,'Active','Active'), -('loan_status_id',400,'Withdrawn by client','Withdrawn by client'), -('loan_status_id',500,'Rejected','Rejected'), -('loan_status_id',600,'Closed','Closed'), -('loan_status_id',601,'Written-Off','Written-Off'), -('loan_status_id',602,'Rescheduled','Rescheduled'), -('loan_status_id',700,'Overpaid','Overpaid'), -('loan_transaction_strategy_id',1,'mifos-standard-strategy','Mifos style'), -('loan_transaction_strategy_id',2,'heavensfamily-strategy','Heavensfamily'), -('loan_transaction_strategy_id',3,'creocore-strategy','Creocore'), -('loan_transaction_strategy_id',4,'rbi-india-strategy','RBI (India)'), -('status',0,'invalid','Invalid'), -('status',1,'processed','Processed'), -('status',2,'awaiting.approval','Awaiting Approval'), -('status',3,'rejected','Rejected'), -('status',4,'underProcessing','Under Processing'), -('status',5,'error','Error'), -('repayment_period_frequency_enum',0,'Days','Days'), -('repayment_period_frequency_enum',1,'Weeks','Weeks'), -('repayment_period_frequency_enum',2,'Months','Months'), -('term_period_frequency_enum',0,'Days','Days'), -('term_period_frequency_enum',1,'Weeks','Weeks'), -('term_period_frequency_enum',2,'Months','Months'), -('term_period_frequency_enum',3,'Years','Years'); +VALUES ('amortization_method_enum', 0, 'Equal principle payments', 'Equal principle payments'), + ('amortization_method_enum', 1, 'Equal installments', 'Equal installments'), + ('interest_calculated_in_period_enum', 0, 'Daily', 'Daily'), + ('interest_calculated_in_period_enum', 1, 'Same as repayment period', 'Same as repayment period'), + ('interest_method_enum', 0, 'Declining Balance', 'Declining Balance'), + ('interest_method_enum', 1, 'Flat', 'Flat'), + ('interest_period_frequency_enum', 2, 'Per month', 'Per month'), + ('interest_period_frequency_enum', 3, 'Per year', 'Per year'), + ('loan_status_id', 100, 'Submitted and awaiting approval', 'Submitted and awaiting approval'), + ('loan_status_id', 200, 'Approved', 'Approved'), + ('loan_status_id', 300, 'Active', 'Active'), + ('loan_status_id', 400, 'Withdrawn by client', 'Withdrawn by client'), + ('loan_status_id', 500, 'Rejected', 'Rejected'), + ('loan_status_id', 600, 'Closed', 'Closed'), + ('loan_status_id', 601, 'Written-Off', 'Written-Off'), + ('loan_status_id', 602, 'Rescheduled', 'Rescheduled'), + ('loan_status_id', 700, 'Overpaid', 'Overpaid'), + ('loan_transaction_strategy_id', 1, 'mifos-standard-strategy', 'Mifos style'), + ('loan_transaction_strategy_id', 2, 'heavensfamily-strategy', 'Heavensfamily'), + ('loan_transaction_strategy_id', 3, 'creocore-strategy', 'Creocore'), + ('loan_transaction_strategy_id', 4, 'rbi-india-strategy', 'RBI (India)'), + ('status', 0, 'invalid', 'Invalid'), + ('status', 1, 'processed', 'Processed'), + ('status', 2, 'awaiting.approval', 'Awaiting Approval'), + ('status', 3, 'rejected', 'Rejected'), + ('status', 4, 'underProcessing', 'Under Processing'), + ('status', 5, 'error', 'Error'), + ('repayment_period_frequency_enum', 0, 'Days', 'Days'), + ('repayment_period_frequency_enum', 1, 'Weeks', 'Weeks'), + ('repayment_period_frequency_enum', 2, 'Months', 'Months'), + ('term_period_frequency_enum', 0, 'Days', 'Days'), + ('term_period_frequency_enum', 1, 'Weeks', 'Weeks'), + ('term_period_frequency_enum', 2, 'Months', 'Months'), + ('term_period_frequency_enum', 3, 'Years', 'Years'); INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `enum_value`) VALUES ('transaction_type_enum', '1', 'Disbursement', 'Disbursement'); @@ -95,149 +93,148 @@ INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `en VALUES ('transaction_type_enum', '11', 'Apply Interest', 'Apply Interest'); INSERT INTO `m_currency` -(`id`,`code`,`decimal_places`,`display_symbol`,`name`, `internationalized_name_code`) -VALUES -(1,'AED',2,NULL,'UAE Dirham','currency.AED'), -(2,'AFN',2,NULL,'Afghanistan Afghani','currency.AFN'), -(3,'ALL',2,NULL,'Albanian Lek','currency.ALL'), -(4,'AMD',2,NULL,'Armenian Dram','currency.AMD'), -(5,'ANG',2,NULL,'Netherlands Antillian Guilder','currency.ANG'), -(6,'AOA',2,NULL,'Angolan Kwanza','currency.AOA'), -(7,'ARS',2,'$','Argentine Peso','currency.ARS'), -(8,'AUD',2,'A$','Australian Dollar','currency.AUD'), -(9,'AWG',2,NULL,'Aruban Guilder','currency.AWG'), -(10,'AZM',2,NULL,'Azerbaijanian Manat','currency.AZM'), -(11,'BAM',2,NULL,'Bosnia and Herzegovina Convertible Marks','currency.BAM'), -(12,'BBD',2,NULL,'Barbados Dollar','currency.BBD'), -(13,'BDT',2,NULL,'Bangladesh Taka','currency.BDT'), -(14,'BGN',2,NULL,'Bulgarian Lev','currency.BGN'), -(15,'BHD',3,NULL,'Bahraini Dinar','currency.BHD'), -(16,'BIF',0,NULL,'Burundi Franc','currency.BIF'), -(17,'BMD',2,NULL,'Bermudian Dollar','currency.BMD'), -(18,'BND',2,'B$','Brunei Dollar','currency.BND'), -(19,'BOB',2,'Bs.','Bolivian Boliviano','currency.BOB'), -(20,'BRL',2,'R$','Brazilian Real','currency.BRL'), -(21,'BSD',2,NULL,'Bahamian Dollar','currency.BSD'), -(22,'BTN',2,NULL,'Bhutan Ngultrum','currency.BTN'), -(23,'BWP',2,NULL,'Botswana Pula','currency.BWP'), -(24,'BYR',0,NULL,'Belarussian Ruble','currency.BYR'), -(25,'BZD',2,'BZ$','Belize Dollar','currency.BZD'), -(26,'CAD',2,NULL,'Canadian Dollar','currency.CAD'), -(27,'CDF',2,NULL,'Franc Congolais','currency.CDF'), -(28,'CHF',2,NULL,'Swiss Franc','currency.CHF'), -(29,'CLP',0,'$','Chilean Peso','currency.CLP'), -(30,'CNY',2,NULL,'Chinese Yuan Renminbi','currency.CNY'), -(31,'COP',2,'$','Colombian Peso','currency.COP'), -(32,'CRC',2,'₡','Costa Rican Colon','currency.CRC'), -(33,'CSD',2,NULL,'Serbian Dinar','currency.CSD'), -(34,'CUP',2,'$MN','Cuban Peso','currency.CUP'), -(35,'CVE',2,NULL,'Cape Verde Escudo','currency.CVE'), -(36,'CYP',2,NULL,'Cyprus Pound','currency.CYP'), -(37,'CZK',2,NULL,'Czech Koruna','currency.CZK'), -(38,'DJF',0,NULL,'Djibouti Franc','currency.DJF'), -(39,'DKK',2,NULL,'Danish Krone','currency.DKK'), -(40,'DOP',2,'RD$','Dominican Peso','currency.DOP'), -(41,'DZD',2,NULL,'Algerian Dinar','currency.DZD'), -(42,'EEK',2,NULL,'Estonian Kroon','currency.EEK'), -(43,'EGP',2,NULL,'Egyptian Pound','currency.EGP'), -(44,'ERN',2,NULL,'Eritrea Nafka','currency.ERN'), -(45,'ETB',2,NULL,'Ethiopian Birr','currency.ETB'), -(46,'EUR',2,'€','Euro','currency.EUR'), -(47,'FJD',2,NULL,'Fiji Dollar','currency.FJD'), -(48,'FKP',2,NULL,'Falkland Islands Pound','currency.FKP'), -(49,'GBP',2,NULL,'Pound Sterling','currency.GBP'), -(50,'GEL',2,NULL,'Georgian Lari','currency.GEL'), -(51,'GHC',2,'GHc','Ghana Cedi','currency.GHC'), -(52,'GIP',2,NULL,'Gibraltar Pound','currency.GIP'), -(53,'GMD',2,NULL,'Gambian Dalasi','currency.GMD'), -(54,'GNF',0,NULL,'Guinea Franc','currency.GNF'), -(55,'GTQ',2,'Q','Guatemala Quetzal','currency.GTQ'), -(56,'GYD',2,NULL,'Guyana Dollar','currency.GYD'), -(57,'HKD',2,NULL,'Hong Kong Dollar','currency.HKD'), -(58,'HNL',2,'L','Honduras Lempira','currency.HNL'), -(59,'HRK',2,NULL,'Croatian Kuna','currency.HRK'), -(60,'HTG',2,'G','Haiti Gourde','currency.HTG'), -(61,'HUF',2,NULL,'Hungarian Forint','currency.HUF'), -(62,'IDR',2,NULL,'Indonesian Rupiah','currency.IDR'), -(63,'ILS',2,NULL,'New Israeli Shekel','currency.ILS'), -(64,'INR',2,'₹','Indian Rupee','currency.INR'), -(65,'IQD',3,NULL,'Iraqi Dinar','currency.IQD'), -(66,'IRR',2,NULL,'Iranian Rial','currency.IRR'), -(67,'ISK',0,NULL,'Iceland Krona','currency.ISK'), -(68,'JMD',2,NULL,'Jamaican Dollar','currency.JMD'), -(69,'JOD',3,NULL,'Jordanian Dinar','currency.JOD'), -(70,'JPY',0,NULL,'Japanese Yen','currency.JPY'), -(71,'KES',2,'KSh','Kenyan Shilling','currency.KES'), -(72,'KGS',2,NULL,'Kyrgyzstan Som','currency.KGS'), -(73,'KHR',2,NULL,'Cambodia Riel','currency.KHR'), -(74,'KMF',0,NULL,'Comoro Franc','currency.KMF'), -(75,'KPW',2,NULL,'North Korean Won','currency.KPW'), -(76,'KRW',0,NULL,'Korean Won','currency.KRW'), -(77,'KWD',3,NULL,'Kuwaiti Dinar','currency.KWD'), -(78,'KYD',2,NULL,'Cayman Islands Dollar','currency.KYD'), -(79,'KZT',2,NULL,'Kazakhstan Tenge','currency.KZT'), -(80,'LAK',2,NULL,'Lao Kip','currency.LAK'), -(81,'LBP',2,'L£','Lebanese Pound','currency.LBP'), -(82,'LKR',2,NULL,'Sri Lanka Rupee','currency.LKR'), -(83,'LRD',2,NULL,'Liberian Dollar','currency.LRD'), -(84,'LSL',2,NULL,'Lesotho Loti','currency.LSL'), -(85,'LTL',2,NULL,'Lithuanian Litas','currency.LTL'), -(86,'LVL',2,NULL,'Latvian Lats','currency.LVL'), -(87,'LYD',3,NULL,'Libyan Dinar','currency.LYD'), -(88,'MAD',2,NULL,'Moroccan Dirham','currency.MAD'), -(89,'MDL',2,NULL,'Moldovan Leu','currency.MDL'), -(90,'MGA',2,NULL,'Malagasy Ariary','currency.MGA'), -(91,'MKD',2,NULL,'Macedonian Denar','currency.MKD'), -(92,'MMK',2,'K','Myanmar Kyat','currency.MMK'), -(93,'MNT',2,NULL,'Mongolian Tugrik','currency.MNT'), -(94,'MOP',2,NULL,'Macau Pataca','currency.MOP'), -(95,'MRO',2,NULL,'Mauritania Ouguiya','currency.MRO'), -(96,'MTL',2,NULL,'Maltese Lira','currency.MTL'), -(97,'MUR',2,NULL,'Mauritius Rupee','currency.MUR'), -(98,'MVR',2,NULL,'Maldives Rufiyaa','currency.MVR'), -(99,'MWK',2,NULL,'Malawi Kwacha','currency.MWK'), -(100,'MXN',2,'$','Mexican Peso','currency.MXN'), -(101,'MYR',2,NULL,'Malaysian Ringgit','currency.MYR'), -(102,'MZM',2,NULL,'Mozambique Metical','currency.MZM'), -(103,'NAD',2,NULL,'Namibia Dollar','currency.NAD'), -(104,'NGN',2,NULL,'Nigerian Naira','currency.NGN'), -(105,'NIO',2,'C$','Nicaragua Cordoba Oro','currency.NIO'), -(106,'NOK',2,NULL,'Norwegian Krone','currency.NOK'), -(107,'NPR',2,NULL,'Nepalese Rupee','currency.NPR'), -(108,'NZD',2,NULL,'New Zealand Dollar','currency.NZD'), -(109,'OMR',3,NULL,'Rial Omani','currency.OMR'), -(110,'PAB',2,'B/.','Panama Balboa','currency.PAB'), -(111,'PEN',2,'S/.','Peruvian Nuevo Sol','currency.PEN'), -(112,'PGK',2,NULL,'Papua New Guinea Kina','currency.PGK'), -(113,'PHP',2,NULL,'Philippine Peso','currency.PHP'), -(114,'PKR',2,NULL,'Pakistan Rupee','currency.PKR'), -(115,'PLN',2,NULL,'Polish Zloty','currency.PLN'), -(116,'PYG',0,'₲','Paraguayan Guarani','currency.PYG'), -(117,'QAR',2,NULL,'Qatari Rial','currency.QAR'), -(118,'RON',2,NULL,'Romanian Leu','currency.RON'), -(119,'RUB',2,NULL,'Russian Ruble','currency.RUB'), -(120,'RWF',0,NULL,'Rwanda Franc','currency.RWF'), -(121,'SAR',2,NULL,'Saudi Riyal','currency.SAR'), -(122,'SBD',2,NULL,'Solomon Islands Dollar','currency.SBD'), -(123,'SCR',2,NULL,'Seychelles Rupee','currency.SCR'), -(124,'SDD',2,NULL,'Sudanese Dinar','currency.SDD'), -(125,'SEK',2,NULL,'Swedish Krona','currency.SEK'), -(126,'SGD',2,NULL,'Singapore Dollar','currency.SGD'), -(127,'SHP',2,NULL,'St Helena Pound','currency.SHP'), -(128,'SIT',2,NULL,'Slovenian Tolar','currency.SIT'), -(129,'SKK',2,NULL,'Slovak Koruna','currency.SKK'), -(130,'SLL',2,NULL,'Sierra Leone Leone','currency.SLL'), -(131,'SOS',2,NULL,'Somali Shilling','currency.SOS'), -(132,'SRD',2,NULL,'Surinam Dollar','currency.SRD'), -(133,'STD',2,NULL,'Sao Tome and Principe Dobra','currency.STD'), -(134,'SVC',2,NULL,'El Salvador Colon','currency.SVC'), -(135,'SYP',2,NULL,'Syrian Pound','currency.SYP'), -(136,'SZL',2,NULL,'Swaziland Lilangeni','currency.SZL'), -(137,'THB',2,NULL,'Thai Baht','currency.THB'), -(138,'TJS',2,NULL,'Tajik Somoni','currency.TJS'), -(139,'TMM',2,NULL,'Turkmenistan Manat','currency.TMM'), -(140,'TND',3,'DT','Tunisian Dinar','currency.TND'), -(141,'TOP',2,NULL,'Tonga Pa\'anga','currency.TOP'), +(`id`, `code`, `decimal_places`, `display_symbol`, `name`, `internationalized_name_code`) +VALUES (1, 'AED', 2, NULL, 'UAE Dirham', 'currency.AED'), + (2, 'AFN', 2, NULL, 'Afghanistan Afghani', 'currency.AFN'), + (3, 'ALL', 2, NULL, 'Albanian Lek', 'currency.ALL'), + (4, 'AMD', 2, NULL, 'Armenian Dram', 'currency.AMD'), + (5, 'ANG', 2, NULL, 'Netherlands Antillian Guilder', 'currency.ANG'), + (6, 'AOA', 2, NULL, 'Angolan Kwanza', 'currency.AOA'), + (7, 'ARS', 2, '$', 'Argentine Peso', 'currency.ARS'), + (8, 'AUD', 2, 'A$', 'Australian Dollar', 'currency.AUD'), + (9, 'AWG', 2, NULL, 'Aruban Guilder', 'currency.AWG'), + (10, 'AZM', 2, NULL, 'Azerbaijanian Manat', 'currency.AZM'), + (11, 'BAM', 2, NULL, 'Bosnia and Herzegovina Convertible Marks', 'currency.BAM'), + (12, 'BBD', 2, NULL, 'Barbados Dollar', 'currency.BBD'), + (13, 'BDT', 2, NULL, 'Bangladesh Taka', 'currency.BDT'), + (14, 'BGN', 2, NULL, 'Bulgarian Lev', 'currency.BGN'), + (15, 'BHD', 3, NULL, 'Bahraini Dinar', 'currency.BHD'), + (16, 'BIF', 0, NULL, 'Burundi Franc', 'currency.BIF'), + (17, 'BMD', 2, NULL, 'Bermudian Dollar', 'currency.BMD'), + (18, 'BND', 2, 'B$', 'Brunei Dollar', 'currency.BND'), + (19, 'BOB', 2, 'Bs.', 'Bolivian Boliviano', 'currency.BOB'), + (20, 'BRL', 2, 'R$', 'Brazilian Real', 'currency.BRL'), + (21, 'BSD', 2, NULL, 'Bahamian Dollar', 'currency.BSD'), + (22, 'BTN', 2, NULL, 'Bhutan Ngultrum', 'currency.BTN'), + (23, 'BWP', 2, NULL, 'Botswana Pula', 'currency.BWP'), + (24, 'BYR', 0, NULL, 'Belarussian Ruble', 'currency.BYR'), + (25, 'BZD', 2, 'BZ$', 'Belize Dollar', 'currency.BZD'), + (26, 'CAD', 2, NULL, 'Canadian Dollar', 'currency.CAD'), + (27, 'CDF', 2, NULL, 'Franc Congolais', 'currency.CDF'), + (28, 'CHF', 2, NULL, 'Swiss Franc', 'currency.CHF'), + (29, 'CLP', 0, '$', 'Chilean Peso', 'currency.CLP'), + (30, 'CNY', 2, NULL, 'Chinese Yuan Renminbi', 'currency.CNY'), + (31, 'COP', 2, '$', 'Colombian Peso', 'currency.COP'), + (32, 'CRC', 2, '₡', 'Costa Rican Colon', 'currency.CRC'), + (33, 'CSD', 2, NULL, 'Serbian Dinar', 'currency.CSD'), + (34, 'CUP', 2, '$MN', 'Cuban Peso', 'currency.CUP'), + (35, 'CVE', 2, NULL, 'Cape Verde Escudo', 'currency.CVE'), + (36, 'CYP', 2, NULL, 'Cyprus Pound', 'currency.CYP'), + (37, 'CZK', 2, NULL, 'Czech Koruna', 'currency.CZK'), + (38, 'DJF', 0, NULL, 'Djibouti Franc', 'currency.DJF'), + (39, 'DKK', 2, NULL, 'Danish Krone', 'currency.DKK'), + (40, 'DOP', 2, 'RD$', 'Dominican Peso', 'currency.DOP'), + (41, 'DZD', 2, NULL, 'Algerian Dinar', 'currency.DZD'), + (42, 'EEK', 2, NULL, 'Estonian Kroon', 'currency.EEK'), + (43, 'EGP', 2, NULL, 'Egyptian Pound', 'currency.EGP'), + (44, 'ERN', 2, NULL, 'Eritrea Nafka', 'currency.ERN'), + (45, 'ETB', 2, NULL, 'Ethiopian Birr', 'currency.ETB'), + (46, 'EUR', 2, '€', 'Euro', 'currency.EUR'), + (47, 'FJD', 2, NULL, 'Fiji Dollar', 'currency.FJD'), + (48, 'FKP', 2, NULL, 'Falkland Islands Pound', 'currency.FKP'), + (49, 'GBP', 2, NULL, 'Pound Sterling', 'currency.GBP'), + (50, 'GEL', 2, NULL, 'Georgian Lari', 'currency.GEL'), + (51, 'GHC', 2, 'GHc', 'Ghana Cedi', 'currency.GHC'), + (52, 'GIP', 2, NULL, 'Gibraltar Pound', 'currency.GIP'), + (53, 'GMD', 2, NULL, 'Gambian Dalasi', 'currency.GMD'), + (54, 'GNF', 0, NULL, 'Guinea Franc', 'currency.GNF'), + (55, 'GTQ', 2, 'Q', 'Guatemala Quetzal', 'currency.GTQ'), + (56, 'GYD', 2, NULL, 'Guyana Dollar', 'currency.GYD'), + (57, 'HKD', 2, NULL, 'Hong Kong Dollar', 'currency.HKD'), + (58, 'HNL', 2, 'L', 'Honduras Lempira', 'currency.HNL'), + (59, 'HRK', 2, NULL, 'Croatian Kuna', 'currency.HRK'), + (60, 'HTG', 2, 'G', 'Haiti Gourde', 'currency.HTG'), + (61, 'HUF', 2, NULL, 'Hungarian Forint', 'currency.HUF'), + (62, 'IDR', 2, NULL, 'Indonesian Rupiah', 'currency.IDR'), + (63, 'ILS', 2, NULL, 'New Israeli Shekel', 'currency.ILS'), + (64, 'INR', 2, '₹', 'Indian Rupee', 'currency.INR'), + (65, 'IQD', 3, NULL, 'Iraqi Dinar', 'currency.IQD'), + (66, 'IRR', 2, NULL, 'Iranian Rial', 'currency.IRR'), + (67, 'ISK', 0, NULL, 'Iceland Krona', 'currency.ISK'), + (68, 'JMD', 2, NULL, 'Jamaican Dollar', 'currency.JMD'), + (69, 'JOD', 3, NULL, 'Jordanian Dinar', 'currency.JOD'), + (70, 'JPY', 0, NULL, 'Japanese Yen', 'currency.JPY'), + (71, 'KES', 2, 'KSh', 'Kenyan Shilling', 'currency.KES'), + (72, 'KGS', 2, NULL, 'Kyrgyzstan Som', 'currency.KGS'), + (73, 'KHR', 2, NULL, 'Cambodia Riel', 'currency.KHR'), + (74, 'KMF', 0, NULL, 'Comoro Franc', 'currency.KMF'), + (75, 'KPW', 2, NULL, 'North Korean Won', 'currency.KPW'), + (76, 'KRW', 0, NULL, 'Korean Won', 'currency.KRW'), + (77, 'KWD', 3, NULL, 'Kuwaiti Dinar', 'currency.KWD'), + (78, 'KYD', 2, NULL, 'Cayman Islands Dollar', 'currency.KYD'), + (79, 'KZT', 2, NULL, 'Kazakhstan Tenge', 'currency.KZT'), + (80, 'LAK', 2, NULL, 'Lao Kip', 'currency.LAK'), + (81, 'LBP', 2, 'L£', 'Lebanese Pound', 'currency.LBP'), + (82, 'LKR', 2, NULL, 'Sri Lanka Rupee', 'currency.LKR'), + (83, 'LRD', 2, NULL, 'Liberian Dollar', 'currency.LRD'), + (84, 'LSL', 2, NULL, 'Lesotho Loti', 'currency.LSL'), + (85, 'LTL', 2, NULL, 'Lithuanian Litas', 'currency.LTL'), + (86, 'LVL', 2, NULL, 'Latvian Lats', 'currency.LVL'), + (87, 'LYD', 3, NULL, 'Libyan Dinar', 'currency.LYD'), + (88, 'MAD', 2, NULL, 'Moroccan Dirham', 'currency.MAD'), + (89, 'MDL', 2, NULL, 'Moldovan Leu', 'currency.MDL'), + (90, 'MGA', 2, NULL, 'Malagasy Ariary', 'currency.MGA'), + (91, 'MKD', 2, NULL, 'Macedonian Denar', 'currency.MKD'), + (92, 'MMK', 2, 'K', 'Myanmar Kyat', 'currency.MMK'), + (93, 'MNT', 2, NULL, 'Mongolian Tugrik', 'currency.MNT'), + (94, 'MOP', 2, NULL, 'Macau Pataca', 'currency.MOP'), + (95, 'MRO', 2, NULL, 'Mauritania Ouguiya', 'currency.MRO'), + (96, 'MTL', 2, NULL, 'Maltese Lira', 'currency.MTL'), + (97, 'MUR', 2, NULL, 'Mauritius Rupee', 'currency.MUR'), + (98, 'MVR', 2, NULL, 'Maldives Rufiyaa', 'currency.MVR'), + (99, 'MWK', 2, NULL, 'Malawi Kwacha', 'currency.MWK'), + (100, 'MXN', 2, '$', 'Mexican Peso', 'currency.MXN'), + (101, 'MYR', 2, NULL, 'Malaysian Ringgit', 'currency.MYR'), + (102, 'MZM', 2, NULL, 'Mozambique Metical', 'currency.MZM'), + (103, 'NAD', 2, NULL, 'Namibia Dollar', 'currency.NAD'), + (104, 'NGN', 2, NULL, 'Nigerian Naira', 'currency.NGN'), + (105, 'NIO', 2, 'C$', 'Nicaragua Cordoba Oro', 'currency.NIO'), + (106, 'NOK', 2, NULL, 'Norwegian Krone', 'currency.NOK'), + (107, 'NPR', 2, NULL, 'Nepalese Rupee', 'currency.NPR'), + (108, 'NZD', 2, NULL, 'New Zealand Dollar', 'currency.NZD'), + (109, 'OMR', 3, NULL, 'Rial Omani', 'currency.OMR'), + (110, 'PAB', 2, 'B/.', 'Panama Balboa', 'currency.PAB'), + (111, 'PEN', 2, 'S/.', 'Peruvian Nuevo Sol', 'currency.PEN'), + (112, 'PGK', 2, NULL, 'Papua New Guinea Kina', 'currency.PGK'), + (113, 'PHP', 2, NULL, 'Philippine Peso', 'currency.PHP'), + (114, 'PKR', 2, NULL, 'Pakistan Rupee', 'currency.PKR'), + (115, 'PLN', 2, NULL, 'Polish Zloty', 'currency.PLN'), + (116, 'PYG', 0, '₲', 'Paraguayan Guarani', 'currency.PYG'), + (117, 'QAR', 2, NULL, 'Qatari Rial', 'currency.QAR'), + (118, 'RON', 2, NULL, 'Romanian Leu', 'currency.RON'), + (119, 'RUB', 2, NULL, 'Russian Ruble', 'currency.RUB'), + (120, 'RWF', 0, NULL, 'Rwanda Franc', 'currency.RWF'), + (121, 'SAR', 2, NULL, 'Saudi Riyal', 'currency.SAR'), + (122, 'SBD', 2, NULL, 'Solomon Islands Dollar', 'currency.SBD'), + (123, 'SCR', 2, NULL, 'Seychelles Rupee', 'currency.SCR'), + (124, 'SDD', 2, NULL, 'Sudanese Dinar', 'currency.SDD'), + (125, 'SEK', 2, NULL, 'Swedish Krona', 'currency.SEK'), + (126, 'SGD', 2, NULL, 'Singapore Dollar', 'currency.SGD'), + (127, 'SHP', 2, NULL, 'St Helena Pound', 'currency.SHP'), + (128, 'SIT', 2, NULL, 'Slovenian Tolar', 'currency.SIT'), + (129, 'SKK', 2, NULL, 'Slovak Koruna', 'currency.SKK'), + (130, 'SLL', 2, NULL, 'Sierra Leone Leone', 'currency.SLL'), + (131, 'SOS', 2, NULL, 'Somali Shilling', 'currency.SOS'), + (132, 'SRD', 2, NULL, 'Surinam Dollar', 'currency.SRD'), + (133, 'STD', 2, NULL, 'Sao Tome and Principe Dobra', 'currency.STD'), + (134, 'SVC', 2, NULL, 'El Salvador Colon', 'currency.SVC'), + (135, 'SYP', 2, NULL, 'Syrian Pound', 'currency.SYP'), + (136, 'SZL', 2, NULL, 'Swaziland Lilangeni', 'currency.SZL'), + (137, 'THB', 2, NULL, 'Thai Baht', 'currency.THB'), + (138, 'TJS', 2, NULL, 'Tajik Somoni', 'currency.TJS'), + (139, 'TMM', 2, NULL, 'Turkmenistan Manat', 'currency.TMM'), + (140, 'TND', 3, 'DT', 'Tunisian Dinar', 'currency.TND'), + (141, 'TOP', 2, NULL, 'Tonga Pa\'anga','currency.TOP'), (142,'TRY',2,NULL,'Turkish Lira','currency.TRY'), (143,'TTD',2,NULL,'Trinidad and Tobago Dollar','currency.TTD'), (144,'TWD',2,NULL,'New Taiwan Dollar','currency.TWD'), diff --git a/fineract-db/old-schema-files/0003-mifosx-permissions-and-authorisation-utf8.sql b/fineract-db/old-schema-files/0003-mifosx-permissions-and-authorisation-utf8.sql index 33b82e5722f..d4d6cf92ae8 100644 --- a/fineract-db/old-schema-files/0003-mifosx-permissions-and-authorisation-utf8.sql +++ b/fineract-db/old-schema-files/0003-mifosx-permissions-and-authorisation-utf8.sql @@ -33,283 +33,282 @@ If you had other roles set up with specific permissions you will have to set up -- truncate `x_registered_table`; INSERT INTO `m_permission` -(`grouping`,`code`,`entity_name`,`action_name`,`can_maker_checker`) VALUES -('special','ALL_FUNCTIONS',NULL,NULL,0), -('special','ALL_FUNCTIONS_READ',NULL,NULL,0), -('special', 'CHECKER_SUPER_USER', NULL, NULL, '0'), -('special','REPORTING_SUPER_USER',NULL,NULL,0), -('authorisation','READ_PERMISSION','PERMISSION','READ',0), -('authorisation','PERMISSIONS_ROLE','ROLE','PERMISSIONS',1), -('authorisation','CREATE_ROLE','ROLE','CREATE',1), -('authorisation','CREATE_ROLE_CHECKER','ROLE','CREATE',0), -('authorisation','READ_ROLE','ROLE','READ',0), -('authorisation','UPDATE_ROLE','ROLE','UPDATE',1), -('authorisation','UPDATE_ROLE_CHECKER','ROLE','UPDATE',0), -('authorisation','DELETE_ROLE','ROLE','DELETE',1), -('authorisation','DELETE_ROLE_CHECKER','ROLE','DELETE',0), -('authorisation','CREATE_USER','USER','CREATE',1), -('authorisation','CREATE_USER_CHECKER','USER','CREATE',0), -('authorisation','READ_USER','USER','READ',0), -('authorisation','UPDATE_USER','USER','UPDATE',1), -('authorisation','UPDATE_USER_CHECKER','USER','UPDATE',0), -('authorisation','DELETE_USER','USER','DELETE',1), -('authorisation','DELETE_USER_CHECKER','USER','DELETE',0), -('configuration','READ_CONFIGURATION','CONFIGURATION','READ',1), -('configuration','UPDATE_CONFIGURATION','CONFIGURATION','UPDATE',1), -('configuration','UPDATE_CONFIGURATION_CHECKER','CONFIGURATION','UPDATE',0), -('configuration','READ_CODE','CODE','READ',0), -('configuration','CREATE_CODE','CODE','CREATE',1), -('configuration','CREATE_CODE_CHECKER','CODE','CREATE',0), -('configuration','UPDATE_CODE','CODE','UPDATE',1), -('configuration','UPDATE_CODE_CHECKER','CODE','UPDATE',0), -('configuration','DELETE_CODE','CODE','DELETE',1), -('configuration','DELETE_CODE_CHECKER','CODE','DELETE',0), -('configuration', 'READ_CODEVALUE', 'CODEVALUE', 'READ', '0'), -('configuration', 'CREATE_CODEVALUE', 'CODEVALUE', 'CREATE', '1'), -('configuration', 'CREATE_CODEVALUE_CHECKER', 'CODEVALUE', 'CREATE', '0'), -('configuration', 'UPDATE_CODEVALUE', 'CODEVALUE', 'UPDATE', '1'), -('configuration', 'UPDATE_CODEVALUE_CHECKER', 'CODEVALUE', 'UPDATE', '0'), -('configuration', 'DELETE_CODEVALUE', 'CODEVALUE', 'DELETE', '1'), -('configuration', 'DELETE_CODEVALUE_CHECKER', 'CODEVALUE', 'DELETE', '0'), -('configuration','READ_CURRENCY','CURRENCY','READ',0), -('configuration','UPDATE_CURRENCY','CURRENCY','UPDATE',1), -('configuration','UPDATE_CURRENCY_CHECKER','CURRENCY','UPDATE',0), -('configuration', 'UPDATE_PERMISSION', 'PERMISSION', 'UPDATE', '1'), -('configuration', 'UPDATE_PERMISSION_CHECKER', 'PERMISSION', 'UPDATE', '0'), -('configuration', 'READ_DATATABLE', 'DATATABLE', 'READ', '0'), -('configuration', 'REGISTER_DATATABLE', 'DATATABLE', 'REGISTER', '1'), -('configuration', 'REGISTER_DATATABLE_CHECKER', 'DATATABLE', 'REGISTER', '0'), -('configuration', 'DEREGISTER_DATATABLE', 'DATATABLE', 'DEREGISTER', '1'), -('configuration', 'DEREGISTER_DATATABLE_CHECKER', 'DATATABLE', 'DEREGISTER', '0'), -('configuration', 'READ_AUDIT', 'AUDIT', 'READ', '0'), -('configuration', 'CREATE_CALENDAR', 'CALENDAR', 'CREATE', '0'), -('configuration', 'READ_CALENDAR', 'CALENDAR', 'READ', '0'), -('configuration', 'UPDATE_CALENDAR', 'CALENDAR', 'UPDATE', '0'), -('configuration', 'DELETE_CALENDAR', 'CALENDAR', 'DELETE', '0'), -('configuration', 'CREATE_CALENDAR_CHECKER', 'CALENDAR', 'CREATE', '0'), -('configuration', 'UPDATE_CALENDAR_CHECKER', 'CALENDAR', 'UPDATE', '0'), -('configuration', 'DELETE_CALENDAR_CHECKER', 'CALENDAR', 'DELETE', '0'), -('organisation', 'READ_MAKERCHECKER', 'MAKERCHECKER', 'READ', '0'), -('organisation', 'READ_CHARGE', 'CHARGE', 'READ', '0'), -('organisation', 'CREATE_CHARGE', 'CHARGE', 'CREATE', '1'), -('organisation', 'CREATE_CHARGE_CHECKER', 'CHARGE', 'CREATE', '0'), -('organisation', 'UPDATE_CHARGE', 'CHARGE', 'UPDATE', '1'), -('organisation', 'UPDATE_CHARGE_CHECKER', 'CHARGE', 'UPDATE', '0'), -('organisation', 'DELETE_CHARGE', 'CHARGE', 'DELETE', '1'), -('organisation', 'DELETE_CHARGE_CHECKER', 'CHARGE', 'DELETE', '0'), -('organisation', 'READ_FUND', 'FUND', 'READ', '0'), -('organisation', 'CREATE_FUND', 'FUND', 'CREATE', '1'), -('organisation', 'CREATE_FUND_CHECKER', 'FUND', 'CREATE', '0'), -('organisation', 'UPDATE_FUND', 'FUND', 'UPDATE', '1'), -('organisation', 'UPDATE_FUND_CHECKER', 'FUND', 'UPDATE', '0'), -('organisation', 'DELETE_FUND', 'FUND', 'DELETE', '1'), -('organisation', 'DELETE_FUND_CHECKER', 'FUND', 'DELETE', '0'), -('organisation', 'READ_LOANPRODUCT', 'LOANPRODUCT', 'READ', '0'), -('organisation', 'CREATE_LOANPRODUCT', 'LOANPRODUCT', 'CREATE', '1'), -('organisation', 'CREATE_LOANPRODUCT_CHECKER', 'LOANPRODUCT', 'CREATE', '0'), -('organisation', 'UPDATE_LOANPRODUCT', 'LOANPRODUCT', 'UPDATE', '1'), -('organisation', 'UPDATE_LOANPRODUCT_CHECKER', 'LOANPRODUCT', 'UPDATE', '0'), -('organisation', 'DELETE_LOANPRODUCT', 'LOANPRODUCT', 'DELETE', '1'), -('organisation', 'DELETE_LOANPRODUCT_CHECKER', 'LOANPRODUCT', 'DELETE', '0'), -('organisation', 'READ_OFFICE', 'OFFICE', 'READ', '0'), -('organisation', 'CREATE_OFFICE', 'OFFICE', 'CREATE', '1'), -('organisation', 'CREATE_OFFICE_CHECKER', 'OFFICE', 'CREATE', '0'), -('organisation', 'UPDATE_OFFICE', 'OFFICE', 'UPDATE', '1'), -('organisation', 'UPDATE_OFFICE_CHECKER', 'OFFICE', 'UPDATE', '0'), -('organisation', 'READ_OFFICETRANSACTION', 'OFFICETRANSACTION', 'READ', '0'), -('organisation', 'DELETE_OFFICE_CHECKER', 'OFFICE', 'DELETE', '0'), -('organisation', 'CREATE_OFFICETRANSACTION', 'OFFICETRANSACTION', 'CREATE', '1'), -('organisation', 'CREATE_OFFICETRANSACTION_CHECKER', 'OFFICETRANSACTION', 'CREATE', '0'), -('organisation', 'DELETE_OFFICETRANSACTION', 'OFFICETRANSACTION', 'DELETE', 1), -('organisation', 'DELETE_OFFICETRANSACTION_CHECKER', 'OFFICETRANSACTION', 'DELETE', 0), -('organisation', 'READ_STAFF', 'STAFF', 'READ', '0'), -('organisation', 'CREATE_STAFF', 'STAFF', 'CREATE', '1'), -('organisation', 'CREATE_STAFF_CHECKER', 'STAFF', 'CREATE', '0'), -('organisation', 'UPDATE_STAFF', 'STAFF', 'UPDATE', '1'), -('organisation', 'UPDATE_STAFF_CHECKER', 'STAFF', 'UPDATE', '0'), -('organisation', 'DELETE_STAFF', 'STAFF', 'DELETE', '1'), -('organisation', 'DELETE_STAFF_CHECKER', 'STAFF', 'DELETE', '0'), -('organisation', 'READ_SAVINGSPRODUCT', 'SAVINGSPRODUCT', 'READ', '0'), -('organisation', 'CREATE_SAVINGSPRODUCT', 'SAVINGSPRODUCT', 'CREATE', '1'), -('organisation', 'CREATE_SAVINGSPRODUCT_CHECKER', 'SAVINGSPRODUCT', 'CREATE', '0'), -('organisation', 'UPDATE_SAVINGSPRODUCT', 'SAVINGSPRODUCT', 'UPDATE', '1'), -('organisation', 'UPDATE_SAVINGSPRODUCT_CHECKER', 'SAVINGSPRODUCT', 'UPDATE', '0'), -('organisation', 'DELETE_SAVINGSPRODUCT', 'SAVINGSPRODUCT', 'DELETE', '1'), -('organisation', 'DELETE_SAVINGSPRODUCT_CHECKER', 'SAVINGSPRODUCT', 'DELETE', '0'), -('portfolio', 'READ_LOAN', 'LOAN', 'READ', '0'), -('portfolio', 'CREATE_LOAN', 'LOAN', 'CREATE', '1'), -('portfolio', 'CREATE_LOAN_CHECKER', 'LOAN', 'CREATE', '0'), -('portfolio', 'UPDATE_LOAN', 'LOAN', 'UPDATE', '1'), -('portfolio', 'UPDATE_LOAN_CHECKER', 'LOAN', 'UPDATE', '0'), -('portfolio', 'DELETE_LOAN', 'LOAN', 'DELETE', '1'), -('portfolio', 'DELETE_LOAN_CHECKER', 'LOAN', 'DELETE', '0'), + (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) +VALUES ('special', 'ALL_FUNCTIONS', NULL, NULL, 0), + ('special', 'ALL_FUNCTIONS_READ', NULL, NULL, 0), + ('special', 'CHECKER_SUPER_USER', NULL, NULL, '0'), + ('special', 'REPORTING_SUPER_USER', NULL, NULL, 0), + ('authorisation', 'READ_PERMISSION', 'PERMISSION', 'READ', 0), + ('authorisation', 'PERMISSIONS_ROLE', 'ROLE', 'PERMISSIONS', 1), + ('authorisation', 'CREATE_ROLE', 'ROLE', 'CREATE', 1), + ('authorisation', 'CREATE_ROLE_CHECKER', 'ROLE', 'CREATE', 0), + ('authorisation', 'READ_ROLE', 'ROLE', 'READ', 0), + ('authorisation', 'UPDATE_ROLE', 'ROLE', 'UPDATE', 1), + ('authorisation', 'UPDATE_ROLE_CHECKER', 'ROLE', 'UPDATE', 0), + ('authorisation', 'DELETE_ROLE', 'ROLE', 'DELETE', 1), + ('authorisation', 'DELETE_ROLE_CHECKER', 'ROLE', 'DELETE', 0), + ('authorisation', 'CREATE_USER', 'USER', 'CREATE', 1), + ('authorisation', 'CREATE_USER_CHECKER', 'USER', 'CREATE', 0), + ('authorisation', 'READ_USER', 'USER', 'READ', 0), + ('authorisation', 'UPDATE_USER', 'USER', 'UPDATE', 1), + ('authorisation', 'UPDATE_USER_CHECKER', 'USER', 'UPDATE', 0), + ('authorisation', 'DELETE_USER', 'USER', 'DELETE', 1), + ('authorisation', 'DELETE_USER_CHECKER', 'USER', 'DELETE', 0), + ('configuration', 'READ_CONFIGURATION', 'CONFIGURATION', 'READ', 1), + ('configuration', 'UPDATE_CONFIGURATION', 'CONFIGURATION', 'UPDATE', 1), + ('configuration', 'UPDATE_CONFIGURATION_CHECKER', 'CONFIGURATION', 'UPDATE', 0), + ('configuration', 'READ_CODE', 'CODE', 'READ', 0), + ('configuration', 'CREATE_CODE', 'CODE', 'CREATE', 1), + ('configuration', 'CREATE_CODE_CHECKER', 'CODE', 'CREATE', 0), + ('configuration', 'UPDATE_CODE', 'CODE', 'UPDATE', 1), + ('configuration', 'UPDATE_CODE_CHECKER', 'CODE', 'UPDATE', 0), + ('configuration', 'DELETE_CODE', 'CODE', 'DELETE', 1), + ('configuration', 'DELETE_CODE_CHECKER', 'CODE', 'DELETE', 0), + ('configuration', 'READ_CODEVALUE', 'CODEVALUE', 'READ', '0'), + ('configuration', 'CREATE_CODEVALUE', 'CODEVALUE', 'CREATE', '1'), + ('configuration', 'CREATE_CODEVALUE_CHECKER', 'CODEVALUE', 'CREATE', '0'), + ('configuration', 'UPDATE_CODEVALUE', 'CODEVALUE', 'UPDATE', '1'), + ('configuration', 'UPDATE_CODEVALUE_CHECKER', 'CODEVALUE', 'UPDATE', '0'), + ('configuration', 'DELETE_CODEVALUE', 'CODEVALUE', 'DELETE', '1'), + ('configuration', 'DELETE_CODEVALUE_CHECKER', 'CODEVALUE', 'DELETE', '0'), + ('configuration', 'READ_CURRENCY', 'CURRENCY', 'READ', 0), + ('configuration', 'UPDATE_CURRENCY', 'CURRENCY', 'UPDATE', 1), + ('configuration', 'UPDATE_CURRENCY_CHECKER', 'CURRENCY', 'UPDATE', 0), + ('configuration', 'UPDATE_PERMISSION', 'PERMISSION', 'UPDATE', '1'), + ('configuration', 'UPDATE_PERMISSION_CHECKER', 'PERMISSION', 'UPDATE', '0'), + ('configuration', 'READ_DATATABLE', 'DATATABLE', 'READ', '0'), + ('configuration', 'REGISTER_DATATABLE', 'DATATABLE', 'REGISTER', '1'), + ('configuration', 'REGISTER_DATATABLE_CHECKER', 'DATATABLE', 'REGISTER', '0'), + ('configuration', 'DEREGISTER_DATATABLE', 'DATATABLE', 'DEREGISTER', '1'), + ('configuration', 'DEREGISTER_DATATABLE_CHECKER', 'DATATABLE', 'DEREGISTER', '0'), + ('configuration', 'READ_AUDIT', 'AUDIT', 'READ', '0'), + ('configuration', 'CREATE_CALENDAR', 'CALENDAR', 'CREATE', '0'), + ('configuration', 'READ_CALENDAR', 'CALENDAR', 'READ', '0'), + ('configuration', 'UPDATE_CALENDAR', 'CALENDAR', 'UPDATE', '0'), + ('configuration', 'DELETE_CALENDAR', 'CALENDAR', 'DELETE', '0'), + ('configuration', 'CREATE_CALENDAR_CHECKER', 'CALENDAR', 'CREATE', '0'), + ('configuration', 'UPDATE_CALENDAR_CHECKER', 'CALENDAR', 'UPDATE', '0'), + ('configuration', 'DELETE_CALENDAR_CHECKER', 'CALENDAR', 'DELETE', '0'), + ('organisation', 'READ_MAKERCHECKER', 'MAKERCHECKER', 'READ', '0'), + ('organisation', 'READ_CHARGE', 'CHARGE', 'READ', '0'), + ('organisation', 'CREATE_CHARGE', 'CHARGE', 'CREATE', '1'), + ('organisation', 'CREATE_CHARGE_CHECKER', 'CHARGE', 'CREATE', '0'), + ('organisation', 'UPDATE_CHARGE', 'CHARGE', 'UPDATE', '1'), + ('organisation', 'UPDATE_CHARGE_CHECKER', 'CHARGE', 'UPDATE', '0'), + ('organisation', 'DELETE_CHARGE', 'CHARGE', 'DELETE', '1'), + ('organisation', 'DELETE_CHARGE_CHECKER', 'CHARGE', 'DELETE', '0'), + ('organisation', 'READ_FUND', 'FUND', 'READ', '0'), + ('organisation', 'CREATE_FUND', 'FUND', 'CREATE', '1'), + ('organisation', 'CREATE_FUND_CHECKER', 'FUND', 'CREATE', '0'), + ('organisation', 'UPDATE_FUND', 'FUND', 'UPDATE', '1'), + ('organisation', 'UPDATE_FUND_CHECKER', 'FUND', 'UPDATE', '0'), + ('organisation', 'DELETE_FUND', 'FUND', 'DELETE', '1'), + ('organisation', 'DELETE_FUND_CHECKER', 'FUND', 'DELETE', '0'), + ('organisation', 'READ_LOANPRODUCT', 'LOANPRODUCT', 'READ', '0'), + ('organisation', 'CREATE_LOANPRODUCT', 'LOANPRODUCT', 'CREATE', '1'), + ('organisation', 'CREATE_LOANPRODUCT_CHECKER', 'LOANPRODUCT', 'CREATE', '0'), + ('organisation', 'UPDATE_LOANPRODUCT', 'LOANPRODUCT', 'UPDATE', '1'), + ('organisation', 'UPDATE_LOANPRODUCT_CHECKER', 'LOANPRODUCT', 'UPDATE', '0'), + ('organisation', 'DELETE_LOANPRODUCT', 'LOANPRODUCT', 'DELETE', '1'), + ('organisation', 'DELETE_LOANPRODUCT_CHECKER', 'LOANPRODUCT', 'DELETE', '0'), + ('organisation', 'READ_OFFICE', 'OFFICE', 'READ', '0'), + ('organisation', 'CREATE_OFFICE', 'OFFICE', 'CREATE', '1'), + ('organisation', 'CREATE_OFFICE_CHECKER', 'OFFICE', 'CREATE', '0'), + ('organisation', 'UPDATE_OFFICE', 'OFFICE', 'UPDATE', '1'), + ('organisation', 'UPDATE_OFFICE_CHECKER', 'OFFICE', 'UPDATE', '0'), + ('organisation', 'READ_OFFICETRANSACTION', 'OFFICETRANSACTION', 'READ', '0'), + ('organisation', 'DELETE_OFFICE_CHECKER', 'OFFICE', 'DELETE', '0'), + ('organisation', 'CREATE_OFFICETRANSACTION', 'OFFICETRANSACTION', 'CREATE', '1'), + ('organisation', 'CREATE_OFFICETRANSACTION_CHECKER', 'OFFICETRANSACTION', 'CREATE', '0'), + ('organisation', 'DELETE_OFFICETRANSACTION', 'OFFICETRANSACTION', 'DELETE', 1), + ('organisation', 'DELETE_OFFICETRANSACTION_CHECKER', 'OFFICETRANSACTION', 'DELETE', 0), + ('organisation', 'READ_STAFF', 'STAFF', 'READ', '0'), + ('organisation', 'CREATE_STAFF', 'STAFF', 'CREATE', '1'), + ('organisation', 'CREATE_STAFF_CHECKER', 'STAFF', 'CREATE', '0'), + ('organisation', 'UPDATE_STAFF', 'STAFF', 'UPDATE', '1'), + ('organisation', 'UPDATE_STAFF_CHECKER', 'STAFF', 'UPDATE', '0'), + ('organisation', 'DELETE_STAFF', 'STAFF', 'DELETE', '1'), + ('organisation', 'DELETE_STAFF_CHECKER', 'STAFF', 'DELETE', '0'), + ('organisation', 'READ_SAVINGSPRODUCT', 'SAVINGSPRODUCT', 'READ', '0'), + ('organisation', 'CREATE_SAVINGSPRODUCT', 'SAVINGSPRODUCT', 'CREATE', '1'), + ('organisation', 'CREATE_SAVINGSPRODUCT_CHECKER', 'SAVINGSPRODUCT', 'CREATE', '0'), + ('organisation', 'UPDATE_SAVINGSPRODUCT', 'SAVINGSPRODUCT', 'UPDATE', '1'), + ('organisation', 'UPDATE_SAVINGSPRODUCT_CHECKER', 'SAVINGSPRODUCT', 'UPDATE', '0'), + ('organisation', 'DELETE_SAVINGSPRODUCT', 'SAVINGSPRODUCT', 'DELETE', '1'), + ('organisation', 'DELETE_SAVINGSPRODUCT_CHECKER', 'SAVINGSPRODUCT', 'DELETE', '0'), + ('portfolio', 'READ_LOAN', 'LOAN', 'READ', '0'), + ('portfolio', 'CREATE_LOAN', 'LOAN', 'CREATE', '1'), + ('portfolio', 'CREATE_LOAN_CHECKER', 'LOAN', 'CREATE', '0'), + ('portfolio', 'UPDATE_LOAN', 'LOAN', 'UPDATE', '1'), + ('portfolio', 'UPDATE_LOAN_CHECKER', 'LOAN', 'UPDATE', '0'), + ('portfolio', 'DELETE_LOAN', 'LOAN', 'DELETE', '1'), + ('portfolio', 'DELETE_LOAN_CHECKER', 'LOAN', 'DELETE', '0'), -- ('portfolio', 'CREATEHISTORIC_LOAN', 'LOAN', 'CREATEHISTORIC', '1'), -- ('portfolio', 'CREATEHISTORIC_LOAN_CHECKER', 'LOAN', 'CREATEHISTORIC', '0'), -- ('portfolio', 'UPDATEHISTORIC_LOAN', 'LOAN', 'UPDATEHISTORIC', '1'), -- ('portfolio', 'UPDATEHISTORIC_LOAN_CHECKER', 'LOAN', 'UPDATEHISTORIC', '0'), -('portfolio', 'READ_CLIENT', 'CLIENT', 'READ', '0'), -('portfolio', 'CREATE_CLIENT', 'CLIENT', 'CREATE', '1'), -('portfolio', 'CREATE_CLIENT_CHECKER', 'CLIENT', 'CREATE', '0'), -('portfolio', 'UPDATE_CLIENT', 'CLIENT', 'UPDATE', '1'), -('portfolio', 'UPDATE_CLIENT_CHECKER', 'CLIENT', 'UPDATE', '0'), -('portfolio', 'DELETE_CLIENT', 'CLIENT', 'DELETE', '1'), -('portfolio', 'DELETE_CLIENT_CHECKER', 'CLIENT', 'DELETE', '0'), -('portfolio', 'READ_CLIENTIMAGE', 'CLIENTIMAGE', 'READ', '0'), -('portfolio', 'CREATE_CLIENTIMAGE', 'CLIENTIMAGE', 'CREATE', '1'), -('portfolio', 'CREATE_CLIENTIMAGE_CHECKER', 'CLIENTIMAGE', 'CREATE', '0'), -('portfolio', 'DELETE_CLIENTIMAGE', 'CLIENTIMAGE', 'DELETE', '1'), -('portfolio', 'DELETE_CLIENTIMAGE_CHECKER', 'CLIENTIMAGE', 'DELETE', '0'), -('portfolio', 'READ_CLIENTNOTE', 'CLIENTNOTE', 'READ', '0'), -('portfolio', 'CREATE_CLIENTNOTE', 'CLIENTNOTE', 'CREATE', '1'), -('portfolio', 'CREATE_CLIENTNOTE_CHECKER', 'CLIENTNOTE', 'CREATE', '0'), -('portfolio', 'UPDATE_CLIENTNOTE', 'CLIENTNOTE', 'UPDATE', '1'), -('portfolio', 'UPDATE_CLIENTNOTE_CHECKER', 'CLIENTNOTE', 'UPDATE', '0'), -('portfolio', 'DELETE_CLIENTNOTE', 'CLIENTNOTE', 'DELETE', '1'), -('portfolio', 'DELETE_CLIENTNOTE_CHECKER', 'CLIENTNOTE', 'DELETE', '0'), -('portfolio', 'READ_GROUPNOTE', 'GROUPNOTE', 'READ', '0'), -('portfolio', 'CREATE_GROUPNOTE', 'GROUPNOTE', 'CREATE', '1'), -('portfolio', 'UPDATE_GROUPNOTE', 'GROUPNOTE', 'UPDATE', '1'), -('portfolio', 'DELETE_GROUPNOTE', 'GROUPNOTE', 'DELETE', '1'), -('portfolio', 'CREATE_GROUPNOTE_CHECKER', 'GROUPNOTE', 'CREATE', '0'), -('portfolio', 'UPDATE_GROUPNOTE_CHECKER', 'GROUPNOTE', 'UPDATE', '0'), -('portfolio', 'DELETE_GROUPNOTE_CHECKER', 'GROUPNOTE', 'DELETE', '0'), -('portfolio', 'READ_LOANNOTE', 'LOANNOTE', 'READ', '0'), -('portfolio', 'CREATE_LOANNOTE', 'LOANNOTE', 'CREATE', '1'), -('portfolio', 'UPDATE_LOANNOTE', 'LOANNOTE', 'UPDATE', '1'), -('portfolio', 'DELETE_LOANNOTE', 'LOANNOTE', 'DELETE', '1'), -('portfolio', 'CREATE_LOANNOTE_CHECKER', 'LOANNOTE', 'CREATE', '0'), -('portfolio', 'UPDATE_LOANNOTE_CHECKER', 'LOANNOTE', 'UPDATE', '0'), -('portfolio', 'DELETE_LOANNOTE_CHECKER', 'LOANNOTE', 'DELETE', '0'), -('portfolio', 'READ_LOANTRANSACTIONNOTE', 'LOANTRANSACTIONNOTE', 'READ', '0'), -('portfolio', 'CREATE_LOANTRANSACTIONNOTE', 'LOANTRANSACTIONNOTE', 'CREATE', '1'), -('portfolio', 'UPDATE_LOANTRANSACTIONNOTE', 'LOANTRANSACTIONNOTE', 'UPDATE', '1'), -('portfolio', 'DELETE_LOANTRANSACTIONNOTE', 'LOANTRANSACTIONNOTE', 'DELETE', '1'), -('portfolio', 'CREATE_LOANTRANSACTIONNOTE_CHECKER', 'LOANTRANSACTIONNOTE', 'CREATE', '0'), -('portfolio', 'UPDATE_LOANTRANSACTIONNOTE_CHECKER', 'LOANTRANSACTIONNOTE', 'UPDATE', '0'), -('portfolio', 'DELETE_LOANTRANSACTIONNOTE_CHECKER', 'LOANTRANSACTIONNOTE', 'DELETE', '0'), -('portfolio', 'READ_SAVINGNOTE', 'SAVINGNOTE', 'READ', '0'), -('portfolio', 'CREATE_SAVINGNOTE', 'SAVINGNOTE', 'CREATE', '1'), -('portfolio', 'UPDATE_SAVINGNOTE', 'SAVINGNOTE', 'UPDATE', '1'), -('portfolio', 'DELETE_SAVINGNOTE', 'SAVINGNOTE', 'DELETE', '1'), -('portfolio', 'CREATE_SAVINGNOTE_CHECKER', 'SAVINGNOTE', 'CREATE', '0'), -('portfolio', 'UPDATE_SAVINGNOTE_CHECKER', 'SAVINGNOTE', 'UPDATE', '0'), -('portfolio', 'DELETE_SAVINGNOTE_CHECKER', 'SAVINGNOTE', 'DELETE', '0'), -('portfolio', 'READ_CLIENTIDENTIFIER', 'CLIENTIDENTIFIER', 'READ', '0'), -('portfolio', 'CREATE_CLIENTIDENTIFIER', 'CLIENTIDENTIFIER', 'CREATE', '1'), -('portfolio', 'CREATE_CLIENTIDENTIFIER_CHECKER', 'CLIENTIDENTIFIER', 'CREATE', '0'), -('portfolio', 'UPDATE_CLIENTIDENTIFIER', 'CLIENTIDENTIFIER', 'UPDATE', '1'), -('portfolio', 'UPDATE_CLIENTIDENTIFIER_CHECKER', 'CLIENTIDENTIFIER', 'UPDATE', '0'), -('portfolio', 'DELETE_CLIENTIDENTIFIER', 'CLIENTIDENTIFIER', 'DELETE', '1'), -('portfolio', 'DELETE_CLIENTIDENTIFIER_CHECKER', 'CLIENTIDENTIFIER', 'DELETE', '0'), -('portfolio', 'READ_DOCUMENT', 'DOCUMENT', 'READ', '0'), -('portfolio', 'CREATE_DOCUMENT', 'DOCUMENT', 'CREATE', '1'), -('portfolio', 'CREATE_DOCUMENT_CHECKER', 'DOCUMENT', 'CREATE', '0'), -('portfolio', 'UPDATE_DOCUMENT', 'DOCUMENT', 'UPDATE', '1'), -('portfolio', 'UPDATE_DOCUMENT_CHECKER', 'DOCUMENT', 'UPDATE', '0'), -('portfolio', 'DELETE_DOCUMENT', 'DOCUMENT', 'DELETE', '1'), -('portfolio', 'DELETE_DOCUMENT_CHECKER', 'DOCUMENT', 'DELETE', '0'), -('portfolio', 'READ_GROUP', 'GROUP', 'READ', '0'), -('portfolio', 'CREATE_GROUP', 'GROUP', 'CREATE', '1'), -('portfolio', 'CREATE_GROUP_CHECKER', 'GROUP', 'CREATE', '0'), -('portfolio', 'UPDATE_GROUP', 'GROUP', 'UPDATE', '1'), -('portfolio', 'UPDATE_GROUP_CHECKER', 'GROUP', 'UPDATE', '0'), -('portfolio', 'DELETE_GROUP', 'GROUP', 'DELETE', '1'), -('portfolio', 'DELETE_GROUP_CHECKER', 'GROUP', 'DELETE', '0'), -('portfolio', 'UNASSIGNSTAFF_GROUP', 'GROUP', 'UNASSIGNSTAFF', 1), -('portfolio', 'UNASSIGNSTAFF_GROUP_CHECKER', 'GROUP', 'UNASSIGNSTAFF', 0), -('portfolio', 'CREATE_LOANCHARGE', 'LOANCHARGE', 'CREATE', '1'), -('portfolio', 'CREATE_LOANCHARGE_CHECKER', 'LOANCHARGE', 'CREATE', '0'), -('portfolio', 'UPDATE_LOANCHARGE', 'LOANCHARGE', 'UPDATE', '1'), -('portfolio', 'UPDATE_LOANCHARGE_CHECKER', 'LOANCHARGE', 'UPDATE', '0'), -('portfolio', 'DELETE_LOANCHARGE', 'LOANCHARGE', 'DELETE', '1'), -('portfolio', 'DELETE_LOANCHARGE_CHECKER', 'LOANCHARGE', 'DELETE', '0'), -('portfolio', 'WAIVE_LOANCHARGE', 'LOANCHARGE', 'WAIVE', '1'), -('portfolio', 'WAIVE_LOANCHARGE_CHECKER', 'LOANCHARGE', 'WAIVE', '0'), -('portfolio', 'READ_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'READ', '0'), -('portfolio', 'CREATE_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'CREATE', '1'), -('portfolio', 'CREATE_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'CREATE', '0'), -('portfolio', 'UPDATE_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'UPDATE', '1'), -('portfolio', 'UPDATE_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'UPDATE', '0'), -('portfolio', 'DELETE_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'DELETE', '1'), -('portfolio', 'DELETE_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'DELETE', '0'), -('portfolio', 'READ_GUARANTOR', 'GUARANTOR', 'READ', 0), -('portfolio', 'CREATE_GUARANTOR', 'GUARANTOR', 'CREATE', 1), -('portfolio', 'CREATE_GUARANTOR_CHECKER', 'GUARANTOR', 'CREATE', 0), -('portfolio', 'UPDATE_GUARANTOR', 'GUARANTOR', 'UPDATE', 1), -('portfolio', 'UPDATE_GUARANTOR_CHECKER', 'GUARANTOR', 'UPDATE', 0), -('portfolio', 'DELETE_GUARANTOR', 'GUARANTOR', 'DELETE', 1), -('portfolio', 'DELETE_GUARANTOR_CHECKER', 'GUARANTOR', 'DELETE', 0), -('portfolio', 'READ_COLLATERAL', 'COLLATERAL', 'READ', '0'), -('portfolio', 'CREATE_COLLATERAL', 'COLLATERAL', 'CREATE', '1'), -('portfolio', 'UPDATE_COLLATERAL', 'COLLATERAL', 'UPDATE', '1'), -('portfolio', 'DELETE_COLLATERAL', 'COLLATERAL', 'DELETE', '1'), -('portfolio', 'CREATE_COLLATERAL_CHECKER', 'COLLATERAL', 'CREATE', '0'), -('portfolio', 'UPDATE_COLLATERAL_CHECKER', 'COLLATERAL', 'UPDATE', '0'), -('portfolio', 'DELETE_COLLATERAL_CHECKER', 'COLLATERAL', 'DELETE', '0'), -('transaction_loan', 'APPROVE_LOAN', 'LOAN', 'APPROVE', '1'), -('transaction_loan', 'APPROVEINPAST_LOAN', 'LOAN', 'APPROVEINPAST', '1'), -('transaction_loan', 'REJECT_LOAN', 'LOAN', 'REJECT', '1'), -('transaction_loan', 'REJECTINPAST_LOAN', 'LOAN', 'REJECTINPAST', '1'), -('transaction_loan', 'WITHDRAW_LOAN', 'LOAN', 'WITHDRAW', '1'), -('transaction_loan', 'WITHDRAWINPAST_LOAN', 'LOAN', 'WITHDRAWINPAST', '1'), -('transaction_loan', 'APPROVALUNDO_LOAN', 'LOAN', 'APPROVALUNDO', '1'), -('transaction_loan', 'DISBURSE_LOAN', 'LOAN', 'DISBURSE', '1'), -('transaction_loan', 'DISBURSEINPAST_LOAN', 'LOAN', 'DISBURSEINPAST', '1'), -('transaction_loan', 'DISBURSALUNDO_LOAN', 'LOAN', 'DISBURSALUNDO', '1'), -('transaction_loan', 'REPAYMENT_LOAN', 'LOAN', 'REPAYMENT', '1'), -('transaction_loan', 'REPAYMENTINPAST_LOAN', 'LOAN', 'REPAYMENTINPAST', '1'), -('transaction_loan', 'ADJUST_LOAN', 'LOAN', 'ADJUST', '1'), -('transaction_loan', 'WAIVEINTERESTPORTION_LOAN', 'LOAN', 'WAIVEINTERESTPORTION', '1'), -('transaction_loan', 'WRITEOFF_LOAN', 'LOAN', 'WRITEOFF', '1'), -('transaction_loan', 'CLOSE_LOAN', 'LOAN', 'CLOSE', '1'), -('transaction_loan', 'CLOSEASRESCHEDULED_LOAN', 'LOAN', 'CLOSEASRESCHEDULED', '1'), -('transaction_loan', 'UPDATELOANOFFICER_LOAN', 'LOAN', 'UPDATELOANOFFICER', 1), -('transaction_loan', 'UPDATELOANOFFICER_LOAN_CHECKER', 'LOAN', 'UPDATELOANOFFICER', 0), -('transaction_loan', 'REMOVELOANOFFICER_LOAN', 'LOAN', 'REMOVELOANOFFICER', 1), -('transaction_loan', 'REMOVELOANOFFICER_LOAN_CHECKER', 'LOAN', 'REMOVELOANOFFICER', 0), -('transaction_loan', 'BULKREASSIGN_LOAN', 'LOAN', 'BULKREASSIGN', '1'), -('transaction_loan', 'BULKREASSIGN_LOAN_CHECKER', 'LOAN', 'BULKREASSIGN', '0'), -('transaction_loan', 'APPROVE_LOAN_CHECKER', 'LOAN', 'APPROVE', '0'), -('transaction_loan', 'APPROVEINPAST_LOAN_CHECKER', 'LOAN', 'APPROVEINPAST', '0'), -('transaction_loan', 'REJECT_LOAN_CHECKER', 'LOAN', 'REJECT', '0'), -('transaction_loan', 'REJECTINPAST_LOAN_CHECKER', 'LOAN', 'REJECTINPAST', '0'), -('transaction_loan', 'WITHDRAW_LOAN_CHECKER', 'LOAN', 'WITHDRAW', '0'), -('transaction_loan', 'WITHDRAWINPAST_LOAN_CHECKER', 'LOAN', 'WITHDRAWINPAST', '0'), -('transaction_loan', 'APPROVALUNDO_LOAN_CHECKER', 'LOAN', 'APPROVALUNDO', '0'), -('transaction_loan', 'DISBURSE_LOAN_CHECKER', 'LOAN', 'DISBURSE', '0'), -('transaction_loan', 'DISBURSEINPAST_LOAN_CHECKER', 'LOAN', 'DISBURSEINPAST', '0'), -('transaction_loan', 'DISBURSALUNDO_LOAN_CHECKER', 'LOAN', 'DISBURSALUNDO', '0'), -('transaction_loan', 'REPAYMENT_LOAN_CHECKER', 'LOAN', 'REPAYMENT', '0'), -('transaction_loan', 'REPAYMENTINPAST_LOAN_CHECKER', 'LOAN', 'REPAYMENTINPAST', '0'), -('transaction_loan', 'ADJUST_LOAN_CHECKER', 'LOAN', 'ADJUST', '0'), -('transaction_loan', 'WAIVEINTERESTPORTION_LOAN_CHECKER', 'LOAN', 'WAIVEINTERESTPORTION', '0'), -('transaction_loan', 'WRITEOFF_LOAN_CHECKER', 'LOAN', 'WRITEOFF', '0'), -('transaction_loan', 'CLOSE_LOAN_CHECKER', 'LOAN', 'CLOSE', '0'), -('transaction_loan', 'CLOSEASRESCHEDULED_LOAN_CHECKER', 'LOAN', 'CLOSEASRESCHEDULED', '0'), -('transaction_savings', 'DEPOSIT_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'DEPOSIT', '1'), -('transaction_savings', 'DEPOSIT_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'DEPOSIT', '0'), -('transaction_savings', 'WITHDRAWAL_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'WITHDRAWAL', '1'), -('transaction_savings', 'WITHDRAWAL_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'WITHDRAWAL', '0'), -('transaction_savings', 'ACTIVATE_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'ACTIVATE', '1'), -('transaction_savings', 'ACTIVATE_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'ACTIVATE', '0'), -('transaction_savings', 'CALCULATEINTEREST_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'CALCULATEINTEREST', '1'), -('transaction_savings', 'CALCULATEINTEREST_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'CALCULATEINTEREST', '0'); + ('portfolio', 'READ_CLIENT', 'CLIENT', 'READ', '0'), + ('portfolio', 'CREATE_CLIENT', 'CLIENT', 'CREATE', '1'), + ('portfolio', 'CREATE_CLIENT_CHECKER', 'CLIENT', 'CREATE', '0'), + ('portfolio', 'UPDATE_CLIENT', 'CLIENT', 'UPDATE', '1'), + ('portfolio', 'UPDATE_CLIENT_CHECKER', 'CLIENT', 'UPDATE', '0'), + ('portfolio', 'DELETE_CLIENT', 'CLIENT', 'DELETE', '1'), + ('portfolio', 'DELETE_CLIENT_CHECKER', 'CLIENT', 'DELETE', '0'), + ('portfolio', 'READ_CLIENTIMAGE', 'CLIENTIMAGE', 'READ', '0'), + ('portfolio', 'CREATE_CLIENTIMAGE', 'CLIENTIMAGE', 'CREATE', '1'), + ('portfolio', 'CREATE_CLIENTIMAGE_CHECKER', 'CLIENTIMAGE', 'CREATE', '0'), + ('portfolio', 'DELETE_CLIENTIMAGE', 'CLIENTIMAGE', 'DELETE', '1'), + ('portfolio', 'DELETE_CLIENTIMAGE_CHECKER', 'CLIENTIMAGE', 'DELETE', '0'), + ('portfolio', 'READ_CLIENTNOTE', 'CLIENTNOTE', 'READ', '0'), + ('portfolio', 'CREATE_CLIENTNOTE', 'CLIENTNOTE', 'CREATE', '1'), + ('portfolio', 'CREATE_CLIENTNOTE_CHECKER', 'CLIENTNOTE', 'CREATE', '0'), + ('portfolio', 'UPDATE_CLIENTNOTE', 'CLIENTNOTE', 'UPDATE', '1'), + ('portfolio', 'UPDATE_CLIENTNOTE_CHECKER', 'CLIENTNOTE', 'UPDATE', '0'), + ('portfolio', 'DELETE_CLIENTNOTE', 'CLIENTNOTE', 'DELETE', '1'), + ('portfolio', 'DELETE_CLIENTNOTE_CHECKER', 'CLIENTNOTE', 'DELETE', '0'), + ('portfolio', 'READ_GROUPNOTE', 'GROUPNOTE', 'READ', '0'), + ('portfolio', 'CREATE_GROUPNOTE', 'GROUPNOTE', 'CREATE', '1'), + ('portfolio', 'UPDATE_GROUPNOTE', 'GROUPNOTE', 'UPDATE', '1'), + ('portfolio', 'DELETE_GROUPNOTE', 'GROUPNOTE', 'DELETE', '1'), + ('portfolio', 'CREATE_GROUPNOTE_CHECKER', 'GROUPNOTE', 'CREATE', '0'), + ('portfolio', 'UPDATE_GROUPNOTE_CHECKER', 'GROUPNOTE', 'UPDATE', '0'), + ('portfolio', 'DELETE_GROUPNOTE_CHECKER', 'GROUPNOTE', 'DELETE', '0'), + ('portfolio', 'READ_LOANNOTE', 'LOANNOTE', 'READ', '0'), + ('portfolio', 'CREATE_LOANNOTE', 'LOANNOTE', 'CREATE', '1'), + ('portfolio', 'UPDATE_LOANNOTE', 'LOANNOTE', 'UPDATE', '1'), + ('portfolio', 'DELETE_LOANNOTE', 'LOANNOTE', 'DELETE', '1'), + ('portfolio', 'CREATE_LOANNOTE_CHECKER', 'LOANNOTE', 'CREATE', '0'), + ('portfolio', 'UPDATE_LOANNOTE_CHECKER', 'LOANNOTE', 'UPDATE', '0'), + ('portfolio', 'DELETE_LOANNOTE_CHECKER', 'LOANNOTE', 'DELETE', '0'), + ('portfolio', 'READ_LOANTRANSACTIONNOTE', 'LOANTRANSACTIONNOTE', 'READ', '0'), + ('portfolio', 'CREATE_LOANTRANSACTIONNOTE', 'LOANTRANSACTIONNOTE', 'CREATE', '1'), + ('portfolio', 'UPDATE_LOANTRANSACTIONNOTE', 'LOANTRANSACTIONNOTE', 'UPDATE', '1'), + ('portfolio', 'DELETE_LOANTRANSACTIONNOTE', 'LOANTRANSACTIONNOTE', 'DELETE', '1'), + ('portfolio', 'CREATE_LOANTRANSACTIONNOTE_CHECKER', 'LOANTRANSACTIONNOTE', 'CREATE', '0'), + ('portfolio', 'UPDATE_LOANTRANSACTIONNOTE_CHECKER', 'LOANTRANSACTIONNOTE', 'UPDATE', '0'), + ('portfolio', 'DELETE_LOANTRANSACTIONNOTE_CHECKER', 'LOANTRANSACTIONNOTE', 'DELETE', '0'), + ('portfolio', 'READ_SAVINGNOTE', 'SAVINGNOTE', 'READ', '0'), + ('portfolio', 'CREATE_SAVINGNOTE', 'SAVINGNOTE', 'CREATE', '1'), + ('portfolio', 'UPDATE_SAVINGNOTE', 'SAVINGNOTE', 'UPDATE', '1'), + ('portfolio', 'DELETE_SAVINGNOTE', 'SAVINGNOTE', 'DELETE', '1'), + ('portfolio', 'CREATE_SAVINGNOTE_CHECKER', 'SAVINGNOTE', 'CREATE', '0'), + ('portfolio', 'UPDATE_SAVINGNOTE_CHECKER', 'SAVINGNOTE', 'UPDATE', '0'), + ('portfolio', 'DELETE_SAVINGNOTE_CHECKER', 'SAVINGNOTE', 'DELETE', '0'), + ('portfolio', 'READ_CLIENTIDENTIFIER', 'CLIENTIDENTIFIER', 'READ', '0'), + ('portfolio', 'CREATE_CLIENTIDENTIFIER', 'CLIENTIDENTIFIER', 'CREATE', '1'), + ('portfolio', 'CREATE_CLIENTIDENTIFIER_CHECKER', 'CLIENTIDENTIFIER', 'CREATE', '0'), + ('portfolio', 'UPDATE_CLIENTIDENTIFIER', 'CLIENTIDENTIFIER', 'UPDATE', '1'), + ('portfolio', 'UPDATE_CLIENTIDENTIFIER_CHECKER', 'CLIENTIDENTIFIER', 'UPDATE', '0'), + ('portfolio', 'DELETE_CLIENTIDENTIFIER', 'CLIENTIDENTIFIER', 'DELETE', '1'), + ('portfolio', 'DELETE_CLIENTIDENTIFIER_CHECKER', 'CLIENTIDENTIFIER', 'DELETE', '0'), + ('portfolio', 'READ_DOCUMENT', 'DOCUMENT', 'READ', '0'), + ('portfolio', 'CREATE_DOCUMENT', 'DOCUMENT', 'CREATE', '1'), + ('portfolio', 'CREATE_DOCUMENT_CHECKER', 'DOCUMENT', 'CREATE', '0'), + ('portfolio', 'UPDATE_DOCUMENT', 'DOCUMENT', 'UPDATE', '1'), + ('portfolio', 'UPDATE_DOCUMENT_CHECKER', 'DOCUMENT', 'UPDATE', '0'), + ('portfolio', 'DELETE_DOCUMENT', 'DOCUMENT', 'DELETE', '1'), + ('portfolio', 'DELETE_DOCUMENT_CHECKER', 'DOCUMENT', 'DELETE', '0'), + ('portfolio', 'READ_GROUP', 'GROUP', 'READ', '0'), + ('portfolio', 'CREATE_GROUP', 'GROUP', 'CREATE', '1'), + ('portfolio', 'CREATE_GROUP_CHECKER', 'GROUP', 'CREATE', '0'), + ('portfolio', 'UPDATE_GROUP', 'GROUP', 'UPDATE', '1'), + ('portfolio', 'UPDATE_GROUP_CHECKER', 'GROUP', 'UPDATE', '0'), + ('portfolio', 'DELETE_GROUP', 'GROUP', 'DELETE', '1'), + ('portfolio', 'DELETE_GROUP_CHECKER', 'GROUP', 'DELETE', '0'), + ('portfolio', 'UNASSIGNSTAFF_GROUP', 'GROUP', 'UNASSIGNSTAFF', 1), + ('portfolio', 'UNASSIGNSTAFF_GROUP_CHECKER', 'GROUP', 'UNASSIGNSTAFF', 0), + ('portfolio', 'CREATE_LOANCHARGE', 'LOANCHARGE', 'CREATE', '1'), + ('portfolio', 'CREATE_LOANCHARGE_CHECKER', 'LOANCHARGE', 'CREATE', '0'), + ('portfolio', 'UPDATE_LOANCHARGE', 'LOANCHARGE', 'UPDATE', '1'), + ('portfolio', 'UPDATE_LOANCHARGE_CHECKER', 'LOANCHARGE', 'UPDATE', '0'), + ('portfolio', 'DELETE_LOANCHARGE', 'LOANCHARGE', 'DELETE', '1'), + ('portfolio', 'DELETE_LOANCHARGE_CHECKER', 'LOANCHARGE', 'DELETE', '0'), + ('portfolio', 'WAIVE_LOANCHARGE', 'LOANCHARGE', 'WAIVE', '1'), + ('portfolio', 'WAIVE_LOANCHARGE_CHECKER', 'LOANCHARGE', 'WAIVE', '0'), + ('portfolio', 'READ_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'READ', '0'), + ('portfolio', 'CREATE_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'CREATE', '1'), + ('portfolio', 'CREATE_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'CREATE', '0'), + ('portfolio', 'UPDATE_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'UPDATE', '1'), + ('portfolio', 'UPDATE_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'UPDATE', '0'), + ('portfolio', 'DELETE_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'DELETE', '1'), + ('portfolio', 'DELETE_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'DELETE', '0'), + ('portfolio', 'READ_GUARANTOR', 'GUARANTOR', 'READ', 0), + ('portfolio', 'CREATE_GUARANTOR', 'GUARANTOR', 'CREATE', 1), + ('portfolio', 'CREATE_GUARANTOR_CHECKER', 'GUARANTOR', 'CREATE', 0), + ('portfolio', 'UPDATE_GUARANTOR', 'GUARANTOR', 'UPDATE', 1), + ('portfolio', 'UPDATE_GUARANTOR_CHECKER', 'GUARANTOR', 'UPDATE', 0), + ('portfolio', 'DELETE_GUARANTOR', 'GUARANTOR', 'DELETE', 1), + ('portfolio', 'DELETE_GUARANTOR_CHECKER', 'GUARANTOR', 'DELETE', 0), + ('portfolio', 'READ_COLLATERAL', 'COLLATERAL', 'READ', '0'), + ('portfolio', 'CREATE_COLLATERAL', 'COLLATERAL', 'CREATE', '1'), + ('portfolio', 'UPDATE_COLLATERAL', 'COLLATERAL', 'UPDATE', '1'), + ('portfolio', 'DELETE_COLLATERAL', 'COLLATERAL', 'DELETE', '1'), + ('portfolio', 'CREATE_COLLATERAL_CHECKER', 'COLLATERAL', 'CREATE', '0'), + ('portfolio', 'UPDATE_COLLATERAL_CHECKER', 'COLLATERAL', 'UPDATE', '0'), + ('portfolio', 'DELETE_COLLATERAL_CHECKER', 'COLLATERAL', 'DELETE', '0'), + ('transaction_loan', 'APPROVE_LOAN', 'LOAN', 'APPROVE', '1'), + ('transaction_loan', 'APPROVEINPAST_LOAN', 'LOAN', 'APPROVEINPAST', '1'), + ('transaction_loan', 'REJECT_LOAN', 'LOAN', 'REJECT', '1'), + ('transaction_loan', 'REJECTINPAST_LOAN', 'LOAN', 'REJECTINPAST', '1'), + ('transaction_loan', 'WITHDRAW_LOAN', 'LOAN', 'WITHDRAW', '1'), + ('transaction_loan', 'WITHDRAWINPAST_LOAN', 'LOAN', 'WITHDRAWINPAST', '1'), + ('transaction_loan', 'APPROVALUNDO_LOAN', 'LOAN', 'APPROVALUNDO', '1'), + ('transaction_loan', 'DISBURSE_LOAN', 'LOAN', 'DISBURSE', '1'), + ('transaction_loan', 'DISBURSEINPAST_LOAN', 'LOAN', 'DISBURSEINPAST', '1'), + ('transaction_loan', 'DISBURSALUNDO_LOAN', 'LOAN', 'DISBURSALUNDO', '1'), + ('transaction_loan', 'REPAYMENT_LOAN', 'LOAN', 'REPAYMENT', '1'), + ('transaction_loan', 'REPAYMENTINPAST_LOAN', 'LOAN', 'REPAYMENTINPAST', '1'), + ('transaction_loan', 'ADJUST_LOAN', 'LOAN', 'ADJUST', '1'), + ('transaction_loan', 'WAIVEINTERESTPORTION_LOAN', 'LOAN', 'WAIVEINTERESTPORTION', '1'), + ('transaction_loan', 'WRITEOFF_LOAN', 'LOAN', 'WRITEOFF', '1'), + ('transaction_loan', 'CLOSE_LOAN', 'LOAN', 'CLOSE', '1'), + ('transaction_loan', 'CLOSEASRESCHEDULED_LOAN', 'LOAN', 'CLOSEASRESCHEDULED', '1'), + ('transaction_loan', 'UPDATELOANOFFICER_LOAN', 'LOAN', 'UPDATELOANOFFICER', 1), + ('transaction_loan', 'UPDATELOANOFFICER_LOAN_CHECKER', 'LOAN', 'UPDATELOANOFFICER', 0), + ('transaction_loan', 'REMOVELOANOFFICER_LOAN', 'LOAN', 'REMOVELOANOFFICER', 1), + ('transaction_loan', 'REMOVELOANOFFICER_LOAN_CHECKER', 'LOAN', 'REMOVELOANOFFICER', 0), + ('transaction_loan', 'BULKREASSIGN_LOAN', 'LOAN', 'BULKREASSIGN', '1'), + ('transaction_loan', 'BULKREASSIGN_LOAN_CHECKER', 'LOAN', 'BULKREASSIGN', '0'), + ('transaction_loan', 'APPROVE_LOAN_CHECKER', 'LOAN', 'APPROVE', '0'), + ('transaction_loan', 'APPROVEINPAST_LOAN_CHECKER', 'LOAN', 'APPROVEINPAST', '0'), + ('transaction_loan', 'REJECT_LOAN_CHECKER', 'LOAN', 'REJECT', '0'), + ('transaction_loan', 'REJECTINPAST_LOAN_CHECKER', 'LOAN', 'REJECTINPAST', '0'), + ('transaction_loan', 'WITHDRAW_LOAN_CHECKER', 'LOAN', 'WITHDRAW', '0'), + ('transaction_loan', 'WITHDRAWINPAST_LOAN_CHECKER', 'LOAN', 'WITHDRAWINPAST', '0'), + ('transaction_loan', 'APPROVALUNDO_LOAN_CHECKER', 'LOAN', 'APPROVALUNDO', '0'), + ('transaction_loan', 'DISBURSE_LOAN_CHECKER', 'LOAN', 'DISBURSE', '0'), + ('transaction_loan', 'DISBURSEINPAST_LOAN_CHECKER', 'LOAN', 'DISBURSEINPAST', '0'), + ('transaction_loan', 'DISBURSALUNDO_LOAN_CHECKER', 'LOAN', 'DISBURSALUNDO', '0'), + ('transaction_loan', 'REPAYMENT_LOAN_CHECKER', 'LOAN', 'REPAYMENT', '0'), + ('transaction_loan', 'REPAYMENTINPAST_LOAN_CHECKER', 'LOAN', 'REPAYMENTINPAST', '0'), + ('transaction_loan', 'ADJUST_LOAN_CHECKER', 'LOAN', 'ADJUST', '0'), + ('transaction_loan', 'WAIVEINTERESTPORTION_LOAN_CHECKER', 'LOAN', 'WAIVEINTERESTPORTION', '0'), + ('transaction_loan', 'WRITEOFF_LOAN_CHECKER', 'LOAN', 'WRITEOFF', '0'), + ('transaction_loan', 'CLOSE_LOAN_CHECKER', 'LOAN', 'CLOSE', '0'), + ('transaction_loan', 'CLOSEASRESCHEDULED_LOAN_CHECKER', 'LOAN', 'CLOSEASRESCHEDULED', '0'), + ('transaction_savings', 'DEPOSIT_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'DEPOSIT', '1'), + ('transaction_savings', 'DEPOSIT_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'DEPOSIT', '0'), + ('transaction_savings', 'WITHDRAWAL_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'WITHDRAWAL', '1'), + ('transaction_savings', 'WITHDRAWAL_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'WITHDRAWAL', '0'), + ('transaction_savings', 'ACTIVATE_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'ACTIVATE', '1'), + ('transaction_savings', 'ACTIVATE_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'ACTIVATE', '0'), + ('transaction_savings', 'CALCULATEINTEREST_SAVINGSACCOUNT', 'SAVINGSACCOUNT', 'CALCULATEINTEREST', '1'), + ('transaction_savings', 'CALCULATEINTEREST_SAVINGSACCOUNT_CHECKER', 'SAVINGSACCOUNT', 'CALCULATEINTEREST', '0'); -- == accounting related permissions -INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES -('accounting', 'CREATE_GLACCOUNT', 'GLACCOUNT', 'CREATE', 1), -('accounting', 'UPDATE_GLACCOUNT', 'GLACCOUNT', 'UPDATE', 1), -('accounting', 'DELETE_GLACCOUNT', 'GLACCOUNT', 'DELETE', 1), -('accounting', 'CREATE_GLCLOSURE', 'GLCLOSURE', 'CREATE', 1), -('accounting', 'UPDATE_GLCLOSURE', 'GLCLOSURE', 'UPDATE', 1), -('accounting', 'DELETE_GLCLOSURE', 'GLCLOSURE', 'DELETE', 1), -('accounting', 'CREATE_JOURNALENTRY', 'JOURNALENTRY', 'CREATE', 1), -('accounting', 'REVERSE_JOURNALENTRY', 'JOURNALENTRY', 'REVERSE', 1); +INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) +VALUES ('accounting', 'CREATE_GLACCOUNT', 'GLACCOUNT', 'CREATE', 1), + ('accounting', 'UPDATE_GLACCOUNT', 'GLACCOUNT', 'UPDATE', 1), + ('accounting', 'DELETE_GLACCOUNT', 'GLACCOUNT', 'DELETE', 1), + ('accounting', 'CREATE_GLCLOSURE', 'GLCLOSURE', 'CREATE', 1), + ('accounting', 'UPDATE_GLCLOSURE', 'GLCLOSURE', 'UPDATE', 1), + ('accounting', 'DELETE_GLCLOSURE', 'GLCLOSURE', 'DELETE', 1), + ('accounting', 'CREATE_JOURNALENTRY', 'JOURNALENTRY', 'CREATE', 1), + ('accounting', 'REVERSE_JOURNALENTRY', 'JOURNALENTRY', 'REVERSE', 1); INSERT INTO `m_role` (`id`, `name`, `description`) -VALUES -(1,'Super user','This role provides all application permissions.'); +VALUES (1, 'Super user', 'This role provides all application permissions.'); /* role 1 is super user, give it ALL_FUNCTIONS */ INSERT INTO m_role_permission(role_id, permission_id) @@ -318,12 +317,13 @@ from m_permission where code = 'ALL_FUNCTIONS'; INSERT INTO `m_appuser` (`id`, `office_id`, `username`, `firstname`, `lastname`, `password`, `email`, -`firsttime_login_remaining`, `nonexpired`, `nonlocked`, `nonexpired_credentials`, `enabled`) -VALUES -(1,1,'mifos','App','Administrator','5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a','demomfi@mifos.org','\0','','','',''); + `firsttime_login_remaining`, `nonexpired`, `nonlocked`, `nonexpired_credentials`, `enabled`) +VALUES (1, 1, 'mifos', 'App', 'Administrator', '5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a', + 'demomfi@mifos.org', '\0', '', '', '', ''); -INSERT INTO `m_appuser_role` (`appuser_id`, `role_id`) VALUES (1,1); +INSERT INTO `m_appuser_role` (`appuser_id`, `role_id`) +VALUES (1, 1); -- Add in permissions for any special datatables added in base reference data @@ -350,4 +350,5 @@ from x_registered_table r; /* regardless of inserted permission settings above, no permissions (transactions) are preselected as being part of the maker-checker process so, just set the flag to false... the end-user can decide which permissions should be maker-checkerable */ -update m_permission set can_maker_checker = false; +update m_permission +set can_maker_checker = false; diff --git a/fineract-db/old-schema-files/0004-mifosx-core-reports-utf8.sql b/fineract-db/old-schema-files/0004-mifosx-core-reports-utf8.sql index df41999a53b..eb9414d0aa2 100644 --- a/fineract-db/old-schema-files/0004-mifosx-core-reports-utf8.sql +++ b/fineract-db/old-schema-files/0004-mifosx-core-reports-utf8.sql @@ -17,13 +17,273 @@ -- under the License. -- -truncate table stretchy_report; + +truncate table stretchy_report; truncate table stretchy_parameter; truncate table stretchy_report_parameter; -INSERT INTO `stretchy_report` VALUES (1,'Client Listing','Table',NULL,'Client','select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n c.account_no as \"Client Account No.\", \r\nc.display_name as \"Name\", \n\nc.joined_date as \"Joined\", c.external_id as \"External Id\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand \n\nounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\nwhere o.id = ${officeId}\r\nand c.is_deleted=0\r\n\n\norder by ounder.hierarchy, c.account_no','Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \'one to one\' additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t \n\nhave that client browser/memory impact).',1,1),(2,'Client Loans Listing','Table',NULL,'Client','select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client \n\nAccount No.\", \r\nc.display_name as \"Name\", \r\nlo.display_name as \"Loan Officer\", l.account_no as \"Loan Account No.\", l.external_id as \"External Id\", \r\n\n\np.name as Loan, st.enum_message_property as \"Status\", \r\nf.`name` as Fund, purp.code_value as \"Loan Purpose\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount,\n\n\r\nl.arrearstolerance_amount as \"Arrears Tolerance Amount\",\r\nl.number_of_repayments as \"Expected No. Repayments\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\nl.nominal_interest_rate_per_period as \"Nominal Interest Rate Per Period\",\r\n\r\nipf.enum_message_property as \"Interest Rate Frequency\n\n\",\r\nim.enum_message_property as \"Interest Method\",\r\nicp.enum_message_property as \"Interest Calculated in Period\",\r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.repay_every as \"Repayment Frequency\",\r\nrf.enum_message_property as \"Repayment Frequency Period\",\n\n\r\nam.enum_message_property as \"Amortization\",\r\n\r\nl.total_charges_due_at_disbursement_derived as \"Total Charges Due At Disbursement\",\r\n\r\ndate( \n\nl.submittedon_date) as Submitted, date(l.approvedon_date) Approved, l.expected_disbursedon_date As \"Expected Disbursal\",\r\ndate(l.expected_firstrepaymenton_date) as \n\n\"Expected First Repayment\", date(l.interest_calculated_from_date) as \"Interest Calculated From\" ,\r\ndate(l.disbursedon_date) as Disbursed, date\n\n(l.expected_maturedon_date) \"Expected Maturity\",\r\ndate(l.maturedon_date) as \"Matured On\", date(l.closedon_date) as Closed,\r\ndate(l.rejectedon_date) as \n\nRejected, date(l.rescheduledon_date) as Rescheduled, \r\ndate(l.withdrawnon_date) as Withdrawn, date(l.writtenoffon_date) \"Written Off\"\r\nfrom m_office o \r\njoin \n\nm_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on \n\nc.office_id = ounder.id\r\nleft join m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_product_loan p on p.id = \n\nl.product_id\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join r_enum_value st on st.enum_name = \"loan_status_id\" and st.enum_id = l.loan_status_id\r\nleft join \n\nr_enum_value ipf on ipf.enum_name = \"interest_period_frequency_enum\" and ipf.enum_id = l.interest_period_frequency_enum\r\nleft join r_enum_value im on im.enum_name \n\n= \"interest_method_enum\" and im.enum_id = l.interest_method_enum\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = \n\nl.term_period_frequency_enum\r\nleft join r_enum_value icp on icp.enum_name = \"interest_calculated_in_period_enum\" and icp.enum_id = \n\nl.interest_calculated_in_period_enum\r\nleft join r_enum_value rf on rf.enum_name = \"repayment_period_frequency_enum\" and rf.enum_id = \n\nl.repayment_period_frequency_enum\r\nleft join r_enum_value am on am.enum_name = \"amortization_method_enum\" and am.enum_id = l.amortization_method_enum\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\n\r\nleft \n\njoin m_currency cur on cur.code = l.currency_code\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand \n\n(l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \n\n\"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\norder by ounder.hierarchy, 2 , l.id','Individual Client Report\r\n\r\nPretty \n\nwide report that lists the basic details of client loans. \r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t have that client browser/memory impact).',1,1),(5,'Loans Awaiting Disbursal','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No\", c.display_name as \"Name\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount as Principal, \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\",\r\ndate(l.approvedon_date) \"Approved\",\r\ndatediff(l.expected_disbursedon_date, curdate()) as \"Days to Disbursal\",\r\ndate(l.expected_disbursedon_date) \"Expected Disbursal\",\r\npurp.code_value as \"Loan Purpose\",\r\n lo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\norder by ounder.hierarchy, datediff(l.expected_disbursedon_date, curdate()), c.account_no','Individual Client Report',1,1),(6,'Loans Awaiting Disbursal Summary','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, f.`name` as Fund,\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`','Individual Client Report',1,1),(7,'Loans Awaiting Disbursal Summary by Month','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nyear(l.expected_disbursedon_date) as \"Year\", \r\nmonthname(l.expected_disbursedon_date) as \"Month\",\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)','Individual Client Report',1,1),(8,'Loans Pending Approval','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client Name\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, pl.`name` as \"Product\", \r\nl.account_no as \"Loan Account No.\", \r\nl.principal_amount as \"Loan Amount\", \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\ndatediff(curdate(), l.submittedon_date) \"Days Pending Approval\", \r\npurp.code_value as \"Loan Purpose\",\r\nlo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 100 /*Submitted and awaiting approval */\r\norder by ounder.hierarchy, l.submittedon_date, l.account_no','Individual Client Report',1,1),(11,'Active Loans - Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. loans_in_arrears_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(if(laa.loan_id is not null, l.id, null) )) as loans_in_arrears_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(laa.principal_overdue_derived) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(laa.interest_overdue_derived) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(laa.fee_charges_overdue_derived) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(laa.penalty_charges_overdue_derived) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency',NULL,1,1),(12,'Active Loans - Details','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\npenalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(13,'Obligation Met Loans Details','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client\",\r\nl.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.total_repayment_derived as \"Total Repaid\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", \r\ndate(l.closedon_date) as \"Closed\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(14,'Obligation Met Loans Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\ncount(distinct(c.id)) as \"No. of Clients\",\r\ncount(distinct(l.id)) as \"No. of Loans\",\r\nsum(l.principal_amount) as \"Total Loan Amount\", \r\nsum(l.principal_repaid_derived) as \"Total Principal Repaid\",\r\nsum(l.interest_repaid_derived) as \"Total Interest Repaid\",\r\nsum(l.fee_charges_repaid_derived) as \"Total Fees Repaid\",\r\nsum(l.penalty_charges_repaid_derived) as \"Total Penalties Repaid\",\r\nsum(l.interest_waived_derived) as \"Total Interest Waived\",\r\nsum(l.fee_charges_waived_derived) as \"Total Fees Waived\",\r\nsum(l.penalty_charges_waived_derived) as \"Total Penalties Waived\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by ounder.hierarchy, l.currency_code\r\norder by ounder.hierarchy, l.currency_code','Individual Client \n\nReport',1,1),(15,'Portfolio at Risk','Table',NULL,'Loan','select x.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from \r\n(select ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.currency_code\r\norder by l.currency_code) x','Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)',1,1),(16,'Portfolio at Risk by Branch','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\",\r\nx.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as \"branch\", ifnull(cur.display_symbol, l.currency_code) as Currency, \r\n\r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency','Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)',1,1),(20,'Funds Disbursed Between Dates Summary','Table',NULL,'Fund','select ifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nround(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office ounder \r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\ngroup by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)\r\norder by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)',NULL,1,1),(21,'Funds Disbursed Between Dates Summary by Office','Table',NULL,'Fund','select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n \n\nifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office o\r\n\n\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c \n\non c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\n\n\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand o.id = ${officeId}\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand \n\n(l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\ngroup by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, \n\nl.currency_code)\r\norder by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)',NULL,1,1),(48,'Balance Sheet','Pentaho',NULL,'Accounting',NULL,'Balance Sheet',1,1),(49,'Income Statement','Pentaho',NULL,'Accounting',NULL,'Profit and Loss Statement',1,1),(50,'Trial Balance','Pentaho',NULL,'Accounting',NULL,'Trial Balance Report',1,1),(51,'Written-Off Loans','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Written-Off Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Written-Off Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Written-Off Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Written-Off Penalties\',\r\nn.note AS \'Reason For Write-Off\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 6 /*write-off */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=601\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\") \r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no','Individual Lending Report. Written Off Loans',1,1),(52,'Aging Detail','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nmc.account_no as \"Client Account No.\",\r\n mc.display_name AS \"Client Name\",\r\n ml.account_no AS \"Account Number\",\r\n ml.principal_amount AS \"Loan Amount\",\r\n ml.principal_disbursed_derived AS \"Original Principal\",\r\n ml.interest_charged_derived AS \"Original Interest\",\r\n ml.principal_repaid_derived AS \"Principal Paid\",\r\n ml.interest_repaid_derived AS \"Interest Paid\",\r\n laa.principal_overdue_derived AS \"Principal Overdue\",\r\n laa.interest_overdue_derived AS \"Interest Overdue\",\r\nDATEDIFF(CURDATE(), laa.overdue_since_date_derived) as \"Days in Arrears\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<7, \'<1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<8, \' 1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<22, \' 3\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<29, \' 4\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<36, \' 5\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<43, \' 6\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<50, \' 7\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<57, \' 8\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<64, \' 9\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<85, \'12\', \'12+\')))))))))))) )AS \"Weeks In Arrears Band\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<361, \'180 - 360\', \r\n \'> 360\'))))) AS \"Days in Arrears Band\"\r\n\r\n FROM m_office mo \r\n JOIN m_office ounder ON ounder.hierarchy like concat(mo.hierarchy, \'%\')\r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n INNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id\r\n INNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\n left join m_currency cur on cur.code = ml.currency_code\r\n WHERE ml.loan_status_id=300\r\n AND mo.id=${officeId}\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no','Loan arrears aging (Weeks)',1,1),(53,'Aging Summary (Arrears in Weeks)','Table',NULL,'Loan','SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Weeks In Arrears (Up To)\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'1\',2 UNION\r\n SELECT \'2\',3 UNION\r\n SELECT \'3\',4 UNION\r\n SELECT \'4\',5 UNION\r\n SELECT \'5\',6 UNION\r\n SELECT \'6\',7 UNION\r\n SELECT \'7\',8 UNION\r\n SELECT \'8\',9 UNION\r\n SELECT \'9\',10 UNION\r\n SELECT \'10\',11 UNION\r\n SELECT \'11\',12 UNION\r\n SELECT \'12\',13 UNION\r\n SELECT \'12+\',14) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<8, \'1\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<22, \'3\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<29, \'4\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<36, \'5\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<43, \'6\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<50, \'7\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<57, \'8\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<64, \'9\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<85, \'12\',\r\n \'12+\'))))))))))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid','Loan amount in arrears by branch',1,1),(54,'Rescheduled Loans','Table',NULL,'Loan','SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Rescheduled Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Rescheduled Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Rescheduled Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Rescheduled Penalties\',\r\nn.note AS \'Reason For Rescheduling\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 7 /*marked for rescheduling */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=602\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no','Individual Lending Report. Rescheduled Loans. The ability to reschedule (or mark that you have rescheduled the loan elsewhere) is a legacy of the older Mifos product. Needed for migration.',1,1),(55,'Active Loans Passed Final Maturity','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(56,'Active Loans Passed Final Maturity Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency',NULL,1,1),(57,'Active Loans in last installment','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(lastInstallment.`hierarchy`) - LENGTH(REPLACE(lastInstallment.`hierarchy`, \'.\', \'\')) - 1))), lastInstallment.branch) as \"Office/Branch\",\r\nlastInstallment.Currency,\r\nlastInstallment.`Loan Officer`, \r\nlastInstallment.`Client Account No`, lastInstallment.`Client`, \r\nlastInstallment.`Loan Account No`, lastInstallment.`Product`, \r\nlastInstallment.`Fund`, lastInstallment.`Loan Amount`, \r\nlastInstallment.`Annual Nominal Interest Rate`, \r\nlastInstallment.`Disbursed`, lastInstallment.`Expected Matured On` ,\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\norder by lastInstallment.hierarchy, lastInstallment.Currency, lastInstallment.`Client Account No`, lastInstallment.`Loan Account No`','Individual Client \n\nReport',1,1),(58,'Active Loans in last installment Summary','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select lastInstallment.branchId as branchId,\r\nlastInstallment.Currency,\r\ncount(distinct(lastInstallment.clientId)) as client_count, \r\ncount(distinct(lastInstallment.loanId)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id as branchId, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.id as clientId, c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\ngroup by lastInstallment.branchId) x on x.branchId = mo.id\r\norder by mo.hierarchy, x.Currency','Individual Client \n\nReport',1,1),(59,'Active Loans by Disbursal Period','Table',NULL,'Loan','select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No\", c.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Principal Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\n\r\nl.total_expected_repayment_derived as \"Total Loan (P+I+F+Pen)\",\r\nl.total_repayment_derived as \"Total Repaid (P+I+F+Pen)\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no','Individual Client \n\nReport',1,1),(61,'Aging Summary (Arrears in Months)','Table',NULL,'Loan','SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Days In Arrears\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'0 - 30\',2 UNION\r\n SELECT \'30 - 60\',3 UNION\r\n SELECT \'60 - 90\',4 UNION\r\n SELECT \'90 - 180\',5 UNION\r\n SELECT \'180 - 360\',6 UNION\r\n SELECT \'> 360\',7 ) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<361, \'180 - 360\', \r\n \'> 360\')))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid','Loan amount in arrears by branch',1,1),(91,'Loan Account Schedule','Pentaho',NULL,'Loan',NULL,NULL,1,0),(92,'Branch Expected Cash Flow','Pentaho',NULL,'Loan',NULL,NULL,1,1),(93,'Expected Payments By Date - Basic','Table',NULL,'Loan','SELECT \r\n ounder.name \'Office\', \r\n IFNULL(ms.display_name,\'-\') \'Loan Officer\',\r\n mc.account_no \'Client Account Number\',\r\n mc.display_name \'Name\',\r\n mp.name \'Product\',\r\n ml.account_no \'Loan Account Number\',\r\n mr.duedate \'Due Date\',\r\n mr.installment \'Installment\',\r\n cu.display_symbol \'Currency\',\r\n mr.principal_amount- IFNULL(mr.principal_completed_derived,0) \'Principal Due\',\r\n mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0) \'Interest Due\', \r\n IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0) \'Fees Due\', \r\n IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0) \'Penalty Due\',\r\n (mr.principal_amount- IFNULL(mr.principal_completed_derived,0)) +\r\n (mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0)) + \r\n (IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0)) + \r\n (IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0)) \'Total Due\', \r\n mlaa.total_overdue_derived \'Total Overdue\'\r\n \r\n FROM m_office mo\r\n JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\n \r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n \r\n LEFT JOIN m_client mc ON mc.office_id=ounder.id\r\n LEFT JOIN m_loan ml ON ml.client_id=mc.id AND ml.loan_status_id=300\r\n LEFT JOIN m_loan_arrears_aging mlaa ON mlaa.loan_id=ml.id\r\n LEFT JOIN m_loan_repayment_schedule mr ON mr.loan_id=ml.id AND mr.completed_derived=0\r\n LEFT JOIN m_product_loan mp ON mp.id=ml.product_id\r\n LEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\n LEFT JOIN m_currency cu ON cu.code=ml.currency_code\r\n WHERE mo.id=${officeId}\r\n AND (IFNULL(ml.loan_officer_id, -10) = \"${loanOfficerId}\" OR \"-1\" = \"${loanOfficerId}\")\r\n AND mr.duedate BETWEEN \'${startDate}\' AND \'${endDate}\'\r\n ORDER BY ounder.id,mr.duedate,ml.account_no','Test',1,1),(94,'Expected Payments By Date - Formatted','Pentaho',NULL,'Loan',NULL,NULL,1,1); -INSERT INTO `stretchy_parameter` VALUES (1,'startDateSelect','startDate','startDate','date','date','today',NULL,NULL,NULL,NULL,NULL),(2,'endDateSelect','endDate','endDate','date','date','today',NULL,NULL,NULL,NULL,NULL),(3,'obligDateTypeSelect','obligDateType','obligDateType','select','number','0',NULL,NULL,NULL,'select * from\r\n(select 1 as id, \"Closed\" as `name` union all\r\nselect 2, \"Disbursal\" ) x\r\norder by x.`id`',NULL),(5,'OfficeIdSelectOne','officeId','Office','select','number','0',NULL,'Y',NULL,'select id, \r\nconcat(substring(\"........................................\", 1, \r\n \n\n((LENGTH(`hierarchy`) - LENGTH(REPLACE(`hierarchy`, \'.\', \'\')) - 1) * 4)), \r\n `name`) as tc\r\nfrom m_office\r\nwhere hierarchy like concat\n\n(\'${currentUserHierarchy}\', \'%\')\r\norder by hierarchy',NULL),(6,'loanOfficerIdSelectAll','loanOfficerId','Loan Officer','select','number','0',NULL,NULL,'Y','(select lo.id, lo.display_name as `Name` \r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\njoin m_staff lo on lo.office_id = ounder.id\r\nwhere lo.is_loan_officer = true\r\nand o.id = ${officeId})\r\nunion all\r\n(select -10, \'-\')\r\norder by 2',5),(10,'currencyIdSelectAll','currencyId','Currency','select','number','0',NULL,NULL,'Y','select `code`, `name`\r\nfrom m_organisation_currency\r\norder by `code`',NULL),(20,'fundIdSelectAll','fundId','Fund','select','number','0',NULL,NULL,'Y','(select id, `name`\r\nfrom m_fund)\r\nunion all\r\n(select -10, \'-\')\r\norder by 2',NULL),(25,'loanProductIdSelectAll','loanProductId','Product','select','number','0',NULL,NULL,'Y','select p.id, p.`name`\r\nfrom m_product_loan p\r\nwhere p.currency_code = \'$\{currencyId}\'\r\norder by 2',10),(26,'loanPurposeIdSelectAll','loanPurposeId','Loan Purpose','select','number','0',NULL,NULL,'Y','select -10 as id, \'-\' as code_value\r\nunion all\r\nselect * from (select v.id, v.code_value\r\nfrom m_code c\r\njoin m_code_value v on v.code_id = c.id\r\nwhere c.code_name = \"loanPurpose\"\r\norder by v.order_position) x',NULL),(100,'parTypeSelect','parType','parType','select','number','0',NULL,NULL,NULL,'select * from\r\n(select 1 as id, \"Principal Only\" as `name` union all\r\nselect 2, \"Principal + Interest\" union all\r\nselect 3, \"Principal + Interest + Fees\" union all\r\nselect 4, \"Principal + Interest + Fees + Penalties\") x\r\norder by x.`id`',NULL),(1001,'FullReportList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select r.report_id, r.report_name, r.report_type, r.report_subtype, r.report_category,\r\n \n\nrp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on rp.report_id = r.report_id\r\n \n\nleft join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \n\n\r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on rp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where \n\nur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by \n\nr.report_category, r.report_name, rp.parameter_id',NULL),(1002,'FullParameterList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select sp.parameter_name, sp.parameter_variable, sp.parameter_label, sp.parameter_displayType, \r\nsp.parameter_FormatType, sp.parameter_default, sp.selectOne, sp.selectAll, spp.parameter_name as parentParameterName\r\nfrom stretchy_parameter sp\r\nleft join stretchy_parameter spp on spp.parameter_id = sp.parent_parameter_id\r\nwhere sp.special is null\r\nand exists \r\n (select \'f\' \r\n from stretchy_report sr\r\n join stretchy_report_parameter srp on srp.report_id = sr.report_id\r\n where sr.report_name in(${reportListing})\r\n and srp.parameter_id = sp.parameter_id\r\n )\r\norder by sp.parameter_id',NULL),(1003,'reportCategoryList',NULL,'n/a','n/a','n/a','n/a','Y',NULL,NULL,'select r.report_id, r.report_name, r.report_type, r.report_subtype, \n\nr.report_category,\r\n rp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on \n\nrp.report_id = r.report_id\r\n left join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.report_category = \'${reportCategory}\'\r\n and \n\nr.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on \n\nrp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where ur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \n\n\'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by r.report_category, r.report_name, rp.parameter_id',NULL); -INSERT INTO `stretchy_report_parameter` VALUES (1,5,NULL),(2,5,NULL),(2,6,NULL),(2,10,NULL),(2,20,NULL),(2,25,NULL),(2,26,NULL),(5,5,NULL),(5,6,NULL),(5,10,NULL),(5,20,NULL),(5,25,NULL),(5,26,NULL),(6,5,NULL),(6,6,NULL),(6,10,NULL),(6,20,NULL),(6,25,NULL),(6,26,NULL),(7,5,NULL),(7,6,NULL),(7,10,NULL),(7,20,NULL),(7,25,NULL),(7,26,NULL),(8,5,NULL),(8,6,NULL),(8,10,NULL),(8,25,NULL),(8,26,NULL),(11,5,NULL),(11,6,NULL),(11,10,NULL),(11,20,NULL),(11,25,NULL),(11,26,NULL),(11,100,NULL),(12,5,NULL),(12,6,NULL),(12,10,NULL),(12,20,NULL),(12,25,NULL),(12,26,NULL),(13,1,NULL),(13,2,NULL),(13,3,NULL),(13,5,NULL),(13,6,NULL),(13,10,NULL),(13,20,NULL),(13,25,NULL),(13,26,NULL),(14,1,NULL),(14,2,NULL),(14,3,NULL),(14,5,NULL),(14,6,NULL),(14,10,NULL),(14,20,NULL),(14,25,NULL),(14,26,NULL),(15,5,NULL),(15,6,NULL),(15,10,NULL),(15,20,NULL),(15,25,NULL),(15,26,NULL),(15,100,NULL),(16,5,NULL),(16,6,NULL),(16,10,NULL),(16,20,NULL),(16,25,NULL),(16,26,NULL),(16,100,NULL),(20,1,NULL),(20,2,NULL),(20,10,NULL),(20,20,NULL),(21,1,NULL),(21,2,NULL),(21,5,NULL),(21,10,NULL),(21,20,NULL),(48,5,'branch'),(48,2,'date'),(49,5,'branch'),(49,1,'fromDate'),(49,2,'toDate'),(50,5,'branch'),(50,1,'fromDate'),(50,2,'toDate'),(51,1,NULL),(51,2,NULL),(51,5,NULL),(51,10,NULL),(51,25,NULL),(52,5,NULL),(53,5,NULL),(53,10,NULL),(54,1,NULL),(54,2,NULL),(54,5,NULL),(54,10,NULL),(54,25,NULL),(55,5,NULL),(55,6,NULL),(55,10,NULL),(55,20,NULL),(55,25,NULL),(55,26,NULL),(56,5,NULL),(56,6,NULL),(56,10,NULL),(56,20,NULL),(56,25,NULL),(56,26,NULL),(56,100,NULL),(57,5,NULL),(57,6,NULL),(57,10,NULL),(57,20,NULL),(57,25,NULL),(57,26,NULL),(58,5,NULL),(58,6,NULL),(58,10,NULL),(58,20,NULL),(58,25,NULL),(58,26,NULL),(58,100,NULL),(59,1,NULL),(59,2,NULL),(59,5,NULL),(59,6,NULL),(59,10,NULL),(59,20,NULL),(59,25,NULL),(59,26,NULL),(61,5,NULL),(61,10,NULL),(92,1,'fromDate'),(92,5,'selectOffice'),(92,2,'toDate'),(93,1,NULL),(93,2,NULL),(93,5,NULL),(93,6,NULL),(94,2,'endDate'),(94,6,'loanOfficerId'),(94,5,'officeId'),(94,1,'startDate'); +INSERT INTO `stretchy_report` +VALUES (1, 'Client Listing', 'Table', NULL, 'Client', + 'select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n c.account_no as \"Client Account No.\", \r\nc.display_name as \"Name\", \n\nc.joined_date as \"Joined\", c.external_id as \"External Id\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand \n\nounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\nwhere o.id = ${officeId}\r\nand c.is_deleted=0\r\n\n\norder by ounder.hierarchy, c.account_no', + 'Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \'one to one\' additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, + there is probably is + a limit of about 20/50k clients returned for html display (export to excel doesn\'t \n\nhave that client browser/memory impact).',1,1), + (2, 'Client Loans Listing', 'Table', NULL, 'Client', + 'select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client \n\nAccount No.\", \r\nc.display_name as \"Name\", \r\nlo.display_name as \"Loan Officer\", l.account_no as \"Loan Account No.\", l.external_id as \"External Id\", \r\n\n\np.name as Loan, st.enum_message_property as \"Status\", \r\nf.`name` as Fund, purp.code_value as \"Loan Purpose\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount,\n\n\r\nl.arrearstolerance_amount as \"Arrears Tolerance Amount\",\r\nl.number_of_repayments as \"Expected No. Repayments\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\nl.nominal_interest_rate_per_period as \"Nominal Interest Rate Per Period\",\r\n\r\nipf.enum_message_property as \"Interest Rate Frequency\n\n\",\r\nim.enum_message_property as \"Interest Method\",\r\nicp.enum_message_property as \"Interest Calculated in Period\",\r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.repay_every as \"Repayment Frequency\",\r\nrf.enum_message_property as \"Repayment Frequency Period\",\n\n\r\nam.enum_message_property as \"Amortization\",\r\n\r\nl.total_charges_due_at_disbursement_derived as \"Total Charges Due At Disbursement\",\r\n\r\ndate( \n\nl.submittedon_date) as Submitted, date(l.approvedon_date) Approved, l.expected_disbursedon_date As \"Expected Disbursal\",\r\ndate(l.expected_firstrepaymenton_date) as \n\n\"Expected First Repayment\", date(l.interest_calculated_from_date) as \"Interest Calculated From\" ,\r\ndate(l.disbursedon_date) as Disbursed, date\n\n(l.expected_maturedon_date) \"Expected Maturity\",\r\ndate(l.maturedon_date) as \"Matured On\", date(l.closedon_date) as Closed,\r\ndate(l.rejectedon_date) as \n\nRejected, date(l.rescheduledon_date) as Rescheduled, \r\ndate(l.withdrawnon_date) as Withdrawn, date(l.writtenoffon_date) \"Written Off\"\r\nfrom m_office o \r\njoin \n\nm_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on \n\nc.office_id = ounder.id\r\nleft join m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_product_loan p on p.id = \n\nl.product_id\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join r_enum_value st on st.enum_name = \"loan_status_id\" and st.enum_id = l.loan_status_id\r\nleft join \n\nr_enum_value ipf on ipf.enum_name = \"interest_period_frequency_enum\" and ipf.enum_id = l.interest_period_frequency_enum\r\nleft join r_enum_value im on im.enum_name \n\n= \"interest_method_enum\" and im.enum_id = l.interest_method_enum\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = \n\nl.term_period_frequency_enum\r\nleft join r_enum_value icp on icp.enum_name = \"interest_calculated_in_period_enum\" and icp.enum_id = \n\nl.interest_calculated_in_period_enum\r\nleft join r_enum_value rf on rf.enum_name = \"repayment_period_frequency_enum\" and rf.enum_id = \n\nl.repayment_period_frequency_enum\r\nleft join r_enum_value am on am.enum_name = \"amortization_method_enum\" and am.enum_id = l.amortization_method_enum\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\n\r\nleft \n\njoin m_currency cur on cur.code = l.currency_code\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand \n\n(l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \n\n\"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\norder by ounder.hierarchy, 2 , l.id', + 'Individual Client Report\r\n\r\nPretty \n\nwide report that lists the basic details of client loans. \r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t have that client browser/memory impact).',1,1), + (5, 'Loans Awaiting Disbursal', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No\", c.display_name as \"Name\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount as Principal, \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\",\r\ndate(l.approvedon_date) \"Approved\",\r\ndatediff(l.expected_disbursedon_date, curdate()) as \"Days to Disbursal\",\r\ndate(l.expected_disbursedon_date) \"Expected Disbursal\",\r\npurp.code_value as \"Loan Purpose\",\r\n lo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\norder by ounder.hierarchy, datediff(l.expected_disbursedon_date, curdate()), c.account_no', + 'Individual Client Report', 1, 1), (6, 'Loans Awaiting Disbursal Summary', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, f.`name` as Fund,\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`', + 'Individual Client Report', 1, 1), + (7, 'Loans Awaiting Disbursal Summary by Month', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\npl.`name` as \"Product\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nyear(l.expected_disbursedon_date) as \"Year\", \r\nmonthname(l.expected_disbursedon_date) as \"Month\",\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)', + 'Individual Client Report', 1, 1), (8, 'Loans Pending Approval', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client Name\", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, pl.`name` as \"Product\", \r\nl.account_no as \"Loan Account No.\", \r\nl.principal_amount as \"Loan Amount\", \r\nl.term_frequency as \"Term Frequency\",\n\n\r\ntf.enum_message_property as \"Term Frequency Period\",\r\nl.annual_nominal_interest_rate as \" Annual \n\nNominal Interest Rate\", \r\ndatediff(curdate(), l.submittedon_date) \"Days Pending Approval\", \r\npurp.code_value as \"Loan Purpose\",\r\nlo.display_name as \"Loan Officer\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = \"term_period_frequency_enum\" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 100 /*Submitted and awaiting approval */\r\norder by ounder.hierarchy, l.submittedon_date, l.account_no', + 'Individual Client Report', 1, 1), + (11, 'Active Loans - Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. loans_in_arrears_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(if(laa.loan_id is not null, l.id, null) )) as loans_in_arrears_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(laa.principal_overdue_derived) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(laa.interest_overdue_derived) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(laa.fee_charges_overdue_derived) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(laa.penalty_charges_overdue_derived) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', + NULL, 1, 1), (12, 'Active Loans - Details', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\npenalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), + (13, 'Obligation Met Loans Details', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No.\", c.display_name as \"Client\",\r\nl.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.total_repayment_derived as \"Total Repaid\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", \r\ndate(l.closedon_date) as \"Closed\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), (14, 'Obligation Met Loans Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\ncount(distinct(c.id)) as \"No. of Clients\",\r\ncount(distinct(l.id)) as \"No. of Loans\",\r\nsum(l.principal_amount) as \"Total Loan Amount\", \r\nsum(l.principal_repaid_derived) as \"Total Principal Repaid\",\r\nsum(l.interest_repaid_derived) as \"Total Interest Repaid\",\r\nsum(l.fee_charges_repaid_derived) as \"Total Fees Repaid\",\r\nsum(l.penalty_charges_repaid_derived) as \"Total Penalties Repaid\",\r\nsum(l.interest_waived_derived) as \"Total Interest Waived\",\r\nsum(l.fee_charges_waived_derived) as \"Total Fees Waived\",\r\nsum(l.penalty_charges_waived_derived) as \"Total Penalties Waived\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by ounder.hierarchy, l.currency_code\r\norder by ounder.hierarchy, l.currency_code', + 'Individual Client \n\nReport', 1, 1), + (15, 'Portfolio at Risk', 'Table', NULL, 'Loan', + 'select x.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from \r\n(select ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.currency_code\r\norder by l.currency_code) x', + 'Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', + 1, 1), (16, 'Portfolio at Risk by Branch', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\",\r\nx.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as \"branch\", ifnull(cur.display_symbol, l.currency_code) as Currency, \r\n\r\nsum(l.principal_outstanding_derived) as \"Principal Outstanding\",\r\nsum(laa.principal_overdue_derived) as \"Principal Overdue\",\r\n\r\nsum(l.interest_outstanding_derived) as \"Interest Outstanding\",\r\nsum(laa.interest_overdue_derived) as \"Interest Overdue\",\r\n\r\nsum(l.fee_charges_outstanding_derived) as \"Fees Outstanding\",\r\nsum(laa.fee_charges_overdue_derived) as \"Fees Overdue\",\r\n\r\nsum(penalty_charges_outstanding_derived) as \"Penalties Outstanding\",\r\nsum(laa.penalty_charges_overdue_derived) as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', + 'Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', + 1, 1), (20, 'Funds Disbursed Between Dates Summary', 'Table', NULL, 'Fund', + 'select ifnull(f.`name`, \' -\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nround(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office ounder \r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere disbursedon_date between \' ${startDate}\' and \'${endDate}\'\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\ngroup by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)\r\norder by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)', + NULL, 1, 1), (21, 'Funds Disbursed Between Dates Summary by Office', 'Table', NULL, 'Fund', + 'select \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\n \n\nifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office o\r\n\n\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c \n\non c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\n\n\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand o.id = ${officeId}\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand \n\n(l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\ngroup by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, \n\nl.currency_code)\r\norder by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)', + NULL, 1, 1), + (48, 'Balance Sheet', 'Pentaho', NULL, 'Accounting', NULL, 'Balance Sheet', 1, 1), + (49, 'Income Statement', 'Pentaho', NULL, 'Accounting', NULL, 'Profit and Loss Statement', 1, 1), + (50, 'Trial Balance', 'Pentaho', NULL, 'Accounting', NULL, 'Trial Balance Report', 1, 1), + (51, 'Written-Off Loans', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Written-Off Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Written-Off Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Written-Off Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Written-Off Penalties\',\r\nn.note AS \'Reason For Write-Off\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 6 /*write-off */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=601\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\") \r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', + 'Individual Lending Report. Written Off Loans', 1, 1), (52, 'Aging Detail', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nmc.account_no as \"Client Account No.\",\r\n mc.display_name AS \"Client Name\",\r\n ml.account_no AS \"Account Number\",\r\n ml.principal_amount AS \"Loan Amount\",\r\n ml.principal_disbursed_derived AS \"Original Principal\",\r\n ml.interest_charged_derived AS \"Original Interest\",\r\n ml.principal_repaid_derived AS \"Principal Paid\",\r\n ml.interest_repaid_derived AS \"Interest Paid\",\r\n laa.principal_overdue_derived AS \"Principal Overdue\",\r\n laa.interest_overdue_derived AS \"Interest Overdue\",\r\nDATEDIFF(CURDATE(), laa.overdue_since_date_derived) as \"Days in Arrears\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<7, \'<1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<8, \' 1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<22, \' 3\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<29, \' 4\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<36, \' 5\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<43, \' 6\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<50, \' 7\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<57, \' 8\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<64, \' 9\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<85, \'12\', \'12+\')))))))))))) )AS \"Weeks In Arrears Band\",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<361, \'180 - 360\', \r\n \'> 360\'))))) AS \"Days in Arrears Band\"\r\n\r\n FROM m_office mo \r\n JOIN m_office ounder ON ounder.hierarchy like concat(mo.hierarchy, \'%\')\r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n INNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id\r\n INNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\n left join m_currency cur on cur.code = ml.currency_code\r\n WHERE ml.loan_status_id=300\r\n AND mo.id=${officeId}\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', + 'Loan arrears aging (Weeks)', 1, 1), + (53, 'Aging Summary (Arrears in Weeks)', 'Table', NULL, 'Loan', + 'SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Weeks In Arrears (Up To)\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'1\',2 UNION\r\n SELECT \'2\',3 UNION\r\n SELECT \'3\',4 UNION\r\n SELECT \'4\',5 UNION\r\n SELECT \'5\',6 UNION\r\n SELECT \'6\',7 UNION\r\n SELECT \'7\',8 UNION\r\n SELECT \'8\',9 UNION\r\n SELECT \'9\',10 UNION\r\n SELECT \'10\',11 UNION\r\n SELECT \'11\',12 UNION\r\n SELECT \'12\',13 UNION\r\n SELECT \'12+\',14) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<8, \'1\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<22, \'3\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<29, \'4\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<36, \'5\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<43, \'6\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<50, \'7\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<57, \'8\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<64, \'9\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<85, \'12\',\r\n \'12+\'))))))))))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid', + 'Loan amount in arrears by branch', 1, 1), (54, 'Rescheduled Loans', 'Table', NULL, 'Loan', + 'SELECT \r\nconcat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as \"Client Account No.\",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as \"Loan Amount\",\r\nifnull(lt.principal_portion_derived, 0) AS \'Rescheduled Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Rescheduled Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Rescheduled Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Rescheduled Penalties\',\r\nn.note AS \'Reason For Rescheduling\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 7 /*marked for rescheduling */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=602\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', + 'Individual Lending Report. Rescheduled Loans. The ability to reschedule (or mark that you have rescheduled the loan elsewhere) is a legacy of the older Mifos product. Needed for migration.', + 1, 1), + (55, 'Active Loans Passed Final Maturity', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", \r\nc.display_name as \"Client\", l.account_no as \"Loan Account No.\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\ndate(l.expected_maturedon_date) as \"Expected Matured On\",\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), + (56, 'Active Loans Passed Final Maturity Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', + NULL, 1, 1), (57, 'Active Loans in last installment', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(lastInstallment.`hierarchy`) - LENGTH(REPLACE(lastInstallment.`hierarchy`, \'.\', \'\')) - 1))), lastInstallment.branch) as \"Office/Branch\",\r\nlastInstallment.Currency,\r\nlastInstallment.`Loan Officer`, \r\nlastInstallment.`Client Account No`, lastInstallment.`Client`, \r\nlastInstallment.`Loan Account No`, lastInstallment.`Product`, \r\nlastInstallment.`Fund`, lastInstallment.`Loan Amount`, \r\nlastInstallment.`Annual Nominal Interest Rate`, \r\nlastInstallment.`Disbursed`, lastInstallment.`Expected Matured On` ,\r\n\r\nl.principal_repaid_derived as \"Principal Repaid\",\r\nl.principal_outstanding_derived as \"Principal Outstanding\",\r\nlaa.principal_overdue_derived as \"Principal Overdue\",\r\n\r\nl.interest_repaid_derived as \"Interest Repaid\",\r\nl.interest_outstanding_derived as \"Interest Outstanding\",\r\nlaa.interest_overdue_derived as \"Interest Overdue\",\r\n\r\nl.fee_charges_repaid_derived as \"Fees Repaid\",\r\nl.fee_charges_outstanding_derived as \"Fees Outstanding\",\r\nlaa.fee_charges_overdue_derived as \"Fees Overdue\",\r\n\r\nl.penalty_charges_repaid_derived as \"Penalties Repaid\",\r\nl.penalty_charges_outstanding_derived as \"Penalties Outstanding\",\r\nlaa.penalty_charges_overdue_derived as \"Penalties Overdue\"\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\norder by lastInstallment.hierarchy, lastInstallment.Currency, lastInstallment.`Client Account No`, lastInstallment.`Loan Account No`', + 'Individual Client \n\nReport', 1, 1), + (58, 'Active Loans in last installment Summary', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as \"Office/Branch\", x.currency as Currency,\r\n x.client_count as \"No. of Clients\", x.active_loan_count as \"No. Active Loans\", x. arrears_loan_count as \"No. of Loans in Arrears\",\r\nx.principal as \"Total Loans Disbursed\", x.principal_repaid as \"Principal Repaid\", x.principal_outstanding as \"Principal Outstanding\", x.principal_overdue as \"Principal Overdue\",\r\nx.interest as \"Total Interest\", x.interest_repaid as \"Interest Repaid\", x.interest_outstanding as \"Interest Outstanding\", x.interest_overdue as \"Interest Overdue\",\r\nx.fees as \"Total Fees\", x.fees_repaid as \"Fees Repaid\", x.fees_outstanding as \"Fees Outstanding\", x.fees_overdue as \"Fees Overdue\",\r\nx.penalties as \"Total Penalties\", x.penalties_repaid as \"Penalties Repaid\", x.penalties_outstanding as \"Penalties Outstanding\", x.penalties_overdue as \"Penalties Overdue\",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else \"invalid PAR Type\"\r\n end) as \"Portfolio at Risk %\"\r\n from m_office mo\r\njoin \r\n(select lastInstallment.branchId as branchId,\r\nlastInstallment.Currency,\r\ncount(distinct(lastInstallment.clientId)) as client_count, \r\ncount(distinct(lastInstallment.loanId)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id as branchId, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as \"Loan Officer\", c.id as clientId, c.account_no as \"Client Account No\",\r\nc.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, l.principal_amount as \"Loan Amount\", \r\nl.annual_nominal_interest_rate as \"Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed\", date(l.expected_maturedon_date) as \"Expected Matured On\"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\ngroup by lastInstallment.branchId) x on x.branchId = mo.id\r\norder by mo.hierarchy, x.Currency', + 'Individual Client \n\nReport', 1, 1), (59, 'Active Loans by Disbursal Period', 'Table', NULL, 'Loan', + 'select concat(repeat(\"..\", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as \"Office/Branch\",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as \"Client Account No\", c.display_name as \"Client\", l.account_no as \"Loan Account No\", pl.`name` as \"Product\", \r\nf.`name` as Fund, \r\nl.principal_amount as \"Loan Principal Amount\", \r\nl.annual_nominal_interest_rate as \" Annual Nominal Interest Rate\", \r\ndate(l.disbursedon_date) as \"Disbursed Date\", \r\n\r\nl.total_expected_repayment_derived as \"Total Loan (P+I+F+Pen)\",\r\nl.total_repayment_derived as \"Total Repaid (P+I+F+Pen)\",\r\nlo.display_name as \"Loan Officer\"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\nand (l.product_id = \"${loanProductId}\" or \"-1\" = \"${loanProductId}\")\r\nand (ifnull(l.loan_officer_id, -10) = \"${loanOfficerId}\" or \"-1\" = \"${loanOfficerId}\")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', + 'Individual Client \n\nReport', 1, 1), + (61, 'Aging Summary (Arrears in Months)', 'Table', NULL, 'Loan', + 'SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Days In Arrears\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'0 - 30\',2 UNION\r\n SELECT \'30 - 60\',3 UNION\r\n SELECT \'60 - 90\',4 UNION\r\n SELECT \'90 - 180\',5 UNION\r\n SELECT \'180 - 360\',6 UNION\r\n SELECT \'> 360\',7 ) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<361, \'180 - 360\', \r\n \'> 360\')))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = \"$\{currencyId}\" or \"-1\" = \"$\{currencyId}\")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid', + 'Loan amount in arrears by branch', 1, 1), + (91, 'Loan Account Schedule', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 0), + (92, 'Branch Expected Cash Flow', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 1), + (93, 'Expected Payments By Date - Basic', 'Table', NULL, 'Loan', + 'SELECT \r\n ounder.name \'Office\', \r\n IFNULL(ms.display_name,\'-\') \'Loan Officer\',\r\n mc.account_no \'Client Account Number\',\r\n mc.display_name \'Name\',\r\n mp.name \'Product\',\r\n ml.account_no \'Loan Account Number\',\r\n mr.duedate \'Due Date\',\r\n mr.installment \'Installment\',\r\n cu.display_symbol \'Currency\',\r\n mr.principal_amount- IFNULL(mr.principal_completed_derived,0) \'Principal Due\',\r\n mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0) \'Interest Due\', \r\n IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0) \'Fees Due\', \r\n IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0) \'Penalty Due\',\r\n (mr.principal_amount- IFNULL(mr.principal_completed_derived,0)) +\r\n (mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0)) + \r\n (IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0)) + \r\n (IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0)) \'Total Due\', \r\n mlaa.total_overdue_derived \'Total Overdue\'\r\n \r\n FROM m_office mo\r\n JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\n \r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n \r\n LEFT JOIN m_client mc ON mc.office_id=ounder.id\r\n LEFT JOIN m_loan ml ON ml.client_id=mc.id AND ml.loan_status_id=300\r\n LEFT JOIN m_loan_arrears_aging mlaa ON mlaa.loan_id=ml.id\r\n LEFT JOIN m_loan_repayment_schedule mr ON mr.loan_id=ml.id AND mr.completed_derived=0\r\n LEFT JOIN m_product_loan mp ON mp.id=ml.product_id\r\n LEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\n LEFT JOIN m_currency cu ON cu.code=ml.currency_code\r\n WHERE mo.id=${officeId}\r\n AND (IFNULL(ml.loan_officer_id, -10) = \"${loanOfficerId}\" OR \"-1\" = \"${loanOfficerId}\")\r\n AND mr.duedate BETWEEN \'${startDate}\' AND \'${endDate}\'\r\n ORDER BY ounder.id,mr.duedate,ml.account_no', + 'Test', 1, 1), (94, 'Expected Payments By Date - Formatted', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 1); +INSERT INTO `stretchy_parameter` +VALUES (1, 'startDateSelect', 'startDate', 'startDate', 'date', 'date', 'today', NULL, NULL, NULL, NULL, NULL), + (2, 'endDateSelect', 'endDate', 'endDate', 'date', 'date', 'today', NULL, NULL, NULL, NULL, NULL), + (3, 'obligDateTypeSelect', 'obligDateType', 'obligDateType', 'select', 'number', '0', NULL, NULL, NULL, + 'select * from\r\n(select 1 as id, \"Closed\" as `name` union all\r\nselect 2, \"Disbursal\" ) x\r\norder by x.`id`', + NULL), + (5, 'OfficeIdSelectOne', 'officeId', 'Office', 'select', 'number', '0', NULL, 'Y', NULL, + 'select id, \r\nconcat(substring(\"........................................\", 1, \r\n \n\n((LENGTH(`hierarchy`) - LENGTH(REPLACE(`hierarchy`, \'.\', \'\')) - 1) * 4)), \r\n `name`) as tc\r\nfrom m_office\r\nwhere hierarchy like concat\n\n(\'${currentUserHierarchy}\', \'%\')\r\norder by hierarchy', + NULL), + (6, 'loanOfficerIdSelectAll', 'loanOfficerId', 'Loan Officer', 'select', 'number', '0', NULL, NULL, 'Y', + '(select lo.id, lo.display_name as `Name` \r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\njoin m_staff lo on lo.office_id = ounder.id\r\nwhere lo.is_loan_officer = true\r\nand o.id = ${officeId})\r\nunion all\r\n(select -10, \'-\')\r\norder by 2', + 5), + (10, 'currencyIdSelectAll', 'currencyId', 'Currency', 'select', 'number', '0', NULL, NULL, 'Y', + 'select `code`, `name`\r\nfrom m_organisation_currency\r\norder by `code`', NULL), + (20, 'fundIdSelectAll', 'fundId', 'Fund', 'select', 'number', '0', NULL, NULL, 'Y', + '(select id, `name`\r\nfrom m_fund)\r\nunion all\r\n(select -10, \' -\')\r\norder by 2', NULL), + (25, 'loanProductIdSelectAll', 'loanProductId', 'Product', 'select', 'number', '0', NULL, NULL, 'Y', + 'select p.id, p.`name`\r\nfrom m_product_loan p\r\nwhere p.currency_code = \'$\{currencyId}\'\r\norder by 2', + 10), + (26, 'loanPurposeIdSelectAll', 'loanPurposeId', 'Loan Purpose', 'select', 'number', '0', NULL, NULL, 'Y', + 'select -10 as id, \' -\' as code_value\r\nunion all\r\nselect * from (select v.id, v.code_value\r\nfrom m_code c\r\njoin m_code_value v on v.code_id = c.id\r\nwhere c.code_name = \"loanPurpose\"\r\norder by v.order_position) x', + NULL), + (100, 'parTypeSelect', 'parType', 'parType', 'select', 'number', '0', NULL, NULL, NULL, + 'select * from\r\n(select 1 as id, \"Principal Only\" as `name` union all\r\nselect 2, \"Principal + Interest\" union all\r\nselect 3, \"Principal + Interest + Fees\" union all\r\nselect 4, \"Principal + Interest + Fees + Penalties\") x\r\norder by x.`id`', + NULL), + (1001, 'FullReportList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, + 'select r.report_id, r.report_name, r.report_type, r.report_subtype, r.report_category,\r\n \n\nrp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on rp.report_id = r.report_id\r\n \n\nleft join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \n\n\r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on rp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where \n\nur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by \n\nr.report_category, r.report_name, rp.parameter_id', + NULL), + (1002, 'FullParameterList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, + 'select sp.parameter_name, sp.parameter_variable, sp.parameter_label, sp.parameter_displayType, \r\nsp.parameter_FormatType, sp.parameter_default, sp.selectOne, sp.selectAll, spp.parameter_name as parentParameterName\r\nfrom stretchy_parameter sp\r\nleft join stretchy_parameter spp on spp.parameter_id = sp.parent_parameter_id\r\nwhere sp.special is null\r\nand exists \r\n (select \'f\' \r\n from stretchy_report sr\r\n join stretchy_report_parameter srp on srp.report_id = sr.report_id\r\n where sr.report_name in(${reportListing})\r\n and srp.parameter_id = sp.parameter_id\r\n )\r\norder by sp.parameter_id', + NULL), + (1003, 'reportCategoryList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, + 'select r.report_id, r.report_name, r.report_type, r.report_subtype, \n\nr.report_category,\r\n rp.parameter_id, rp.report_parameter_name, p.parameter_name\r\n from stretchy_report r\r\n left join stretchy_report_parameter rp on \n\nrp.report_id = r.report_id\r\n left join stretchy_parameter p on p.parameter_id = rp.parameter_id\r\n where r.report_category = \'${reportCategory}\'\r\n and \n\nr.use_report is true\r\n and exists\r\n (\r\n select \'f\'\r\n from m_appuser_role ur \r\n join m_role r on r.id = ur.role_id\r\n join m_role_permission rp on \n\nrp.role_id = r.id\r\n join m_permission p on p.id = rp.permission_id\r\n where ur.appuser_id = ${currentUserId}\r\n and (p.code in (\'ALL_FUNCTIONS_READ\', \n\n\'ALL_FUNCTIONS\') or p.code = concat(\"READ_\", r.report_name))\r\n )\r\n order by r.report_category, r.report_name, rp.parameter_id', + NULL); +INSERT INTO `stretchy_report_parameter` +VALUES (1, 5, NULL), + (2, 5, NULL), + (2, 6, NULL), + (2, 10, NULL), + (2, 20, NULL), + (2, 25, NULL), + (2, 26, NULL), + (5, 5, NULL), + (5, 6, NULL), + (5, 10, NULL), + (5, 20, NULL), + (5, 25, NULL), + (5, 26, NULL), + (6, 5, NULL), + (6, 6, NULL), + (6, 10, NULL), + (6, 20, NULL), + (6, 25, NULL), + (6, 26, NULL), + (7, 5, NULL), + (7, 6, NULL), + (7, 10, NULL), + (7, 20, NULL), + (7, 25, NULL), + (7, 26, NULL), + (8, 5, NULL), + (8, 6, NULL), + (8, 10, NULL), + (8, 25, NULL), + (8, 26, NULL), + (11, 5, NULL), + (11, 6, NULL), + (11, 10, NULL), + (11, 20, NULL), + (11, 25, NULL), + (11, 26, NULL), + (11, 100, NULL), + (12, 5, NULL), + (12, 6, NULL), + (12, 10, NULL), + (12, 20, NULL), + (12, 25, NULL), + (12, 26, NULL), + (13, 1, NULL), + (13, 2, NULL), + (13, 3, NULL), + (13, 5, NULL), + (13, 6, NULL), + (13, 10, NULL), + (13, 20, NULL), + (13, 25, NULL), + (13, 26, NULL), + (14, 1, NULL), + (14, 2, NULL), + (14, 3, NULL), + (14, 5, NULL), + (14, 6, NULL), + (14, 10, NULL), + (14, 20, NULL), + (14, 25, NULL), + (14, 26, NULL), + (15, 5, NULL), + (15, 6, NULL), + (15, 10, NULL), + (15, 20, NULL), + (15, 25, NULL), + (15, 26, NULL), + (15, 100, NULL), + (16, 5, NULL), + (16, 6, NULL), + (16, 10, NULL), + (16, 20, NULL), + (16, 25, NULL), + (16, 26, NULL), + (16, 100, NULL), + (20, 1, NULL), + (20, 2, NULL), + (20, 10, NULL), + (20, 20, NULL), + (21, 1, NULL), + (21, 2, NULL), + (21, 5, NULL), + (21, 10, NULL), + (21, 20, NULL), + (48, 5, 'branch'), + (48, 2, 'date'), + (49, 5, 'branch'), + (49, 1, 'fromDate'), + (49, 2, 'toDate'), + (50, 5, 'branch'), + (50, 1, 'fromDate'), + (50, 2, 'toDate'), + (51, 1, NULL), + (51, 2, NULL), + (51, 5, NULL), + (51, 10, NULL), + (51, 25, NULL), + (52, 5, NULL), + (53, 5, NULL), + (53, 10, NULL), + (54, 1, NULL), + (54, 2, NULL), + (54, 5, NULL), + (54, 10, NULL), + (54, 25, NULL), + (55, 5, NULL), + (55, 6, NULL), + (55, 10, NULL), + (55, 20, NULL), + (55, 25, NULL), + (55, 26, NULL), + (56, 5, NULL), + (56, 6, NULL), + (56, 10, NULL), + (56, 20, NULL), + (56, 25, NULL), + (56, 26, NULL), + (56, 100, NULL), + (57, 5, NULL), + (57, 6, NULL), + (57, 10, NULL), + (57, 20, NULL), + (57, 25, NULL), + (57, 26, NULL), + (58, 5, NULL), + (58, 6, NULL), + (58, 10, NULL), + (58, 20, NULL), + (58, 25, NULL), + (58, 26, NULL), + (58, 100, NULL), + (59, 1, NULL), + (59, 2, NULL), + (59, 5, NULL), + (59, 6, NULL), + (59, 10, NULL), + (59, 20, NULL), + (59, 25, NULL), + (59, 26, NULL), + (61, 5, NULL), + (61, 10, NULL), + (92, 1, 'fromDate'), + (92, 5, 'selectOffice'), + (92, 2, 'toDate'), + (93, 1, NULL), + (93, 2, NULL), + (93, 5, NULL), + (93, 6, NULL), + (94, 2, 'endDate'), + (94, 6, 'loanOfficerId'), + (94, 5, 'officeId'), + (94, 1, 'startDate'); insert into m_permission(grouping, `code`, entity_name, action_name, can_maker_checker) select 'report', concat('READ_', r.report_name), r.report_name, 'READ', false diff --git a/fineract-doc/antora.yml b/fineract-doc/antora.yml index 62ad0c85c1a..2384a7933c9 100644 --- a/fineract-doc/antora.yml +++ b/fineract-doc/antora.yml @@ -20,7 +20,7 @@ title: Fineract Docs version: '~' #display_version: '' nav: -- modules/ROOT/nav.adoc -- modules/contributor/nav.adoc -- modules/committer/nav.adoc -- modules/community/nav.adoc + - modules/ROOT/nav.adoc + - modules/contributor/nav.adoc + - modules/committer/nav.adoc + - modules/community/nav.adoc diff --git a/fineract-doc/src/resources/interoperation/specification/json/bulkTransactions_post_sync_response.json b/fineract-doc/src/resources/interoperation/specification/json/bulkTransactions_post_sync_response.json index 1bb95ab40bb..345bc0bf645 100644 --- a/fineract-doc/src/resources/interoperation/specification/json/bulkTransactions_post_sync_response.json +++ b/fineract-doc/src/resources/interoperation/specification/json/bulkTransactions_post_sync_response.json @@ -3,5 +3,6 @@ //Response Body: { - "bulkTransactionId": "11436b17-c690-4a30-8505-42a2c4eafb9d" // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + "bulkTransactionId": "11436b17-c690-4a30-8505-42a2c4eafb9d" + // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ } diff --git a/fineract-doc/src/resources/interoperation/specification/json/bulkTransactions_put_async_response.json b/fineract-doc/src/resources/interoperation/specification/json/bulkTransactions_put_async_response.json index c6899d75e3f..7100390333b 100644 --- a/fineract-doc/src/resources/interoperation/specification/json/bulkTransactions_put_async_response.json +++ b/fineract-doc/src/resources/interoperation/specification/json/bulkTransactions_put_async_response.json @@ -10,19 +10,29 @@ //Response Body: { - "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", // String(1..36) - "completedTimestamp": "2017-11-16T04:15:35.513+01:00", // optional, ISO 8601 - "bulkTransferState": "COMPLETED", // mandatory, Enum of String(1..32): RECEIVED, PENDING, ACCEPTED, PROCESSING, COMPLETED, REJECTED - "individualTransferResults": [ // mandatory, (1..1000) + "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", + // String(1..36) + "completedTimestamp": "2017-11-16T04:15:35.513+01:00", + // optional, ISO 8601 + "bulkTransferState": "COMPLETED", + // mandatory, Enum of String(1..32): RECEIVED, PENDING, ACCEPTED, PROCESSING, COMPLETED, REJECTED + "individualTransferResults": [ + // mandatory, (1..1000) { - "transferId": "11436b17-c690-4a30-8505-42a2c4eafb9d", // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ - "completedTimestamp": "2017-11-16T04:15:35.513+01:00", // optional, ISO 8601 - "transferState": "COMMITTED"// mandatory, Enum of String(1..32): RECEIVED, RESERVED, COMMITTED, ABORTED + "transferId": "11436b17-c690-4a30-8505-42a2c4eafb9d", + // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + "completedTimestamp": "2017-11-16T04:15:35.513+01:00", + // optional, ISO 8601 + "transferState": "COMMITTED" + // mandatory, Enum of String(1..32): RECEIVED, RESERVED, COMMITTED, ABORTED }, { - "transferId": "11436b17-c690-4a30-8505-42a2c4eafb9d", // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ - "completedTimestamp": "2017-11-16T04:15:35.513+01:00", // optional, ISO 8601 - "transferState": "COMMITTED"// mandatory, Enum of String(1..32): RECEIVED, RESERVED, COMMITTED, ABORTED + "transferId": "11436b17-c690-4a30-8505-42a2c4eafb9d", + // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + "completedTimestamp": "2017-11-16T04:15:35.513+01:00", + // optional, ISO 8601 + "transferState": "COMMITTED" + // mandatory, Enum of String(1..32): RECEIVED, RESERVED, COMMITTED, ABORTED } ] } diff --git a/fineract-doc/src/resources/interoperation/specification/json/bulk_payer_post_request.json b/fineract-doc/src/resources/interoperation/specification/json/bulk_payer_post_request.json index 4c958c28bf3..a3ccd134a91 100644 --- a/fineract-doc/src/resources/interoperation/specification/json/bulk_payer_post_request.json +++ b/fineract-doc/src/resources/interoperation/specification/json/bulk_payer_post_request.json @@ -12,48 +12,78 @@ //Request Body: { - "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", // String(1..36) - "payer": { // mandatory - "partyIdInfo": { // mandatory - "partyIdType": "IBAN", // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS - "partyIdentifier": "IN93116000060000000012345676", // mandatory, String(1..128) - "partySubIdOrType": "something" // optional, String(1..128) + "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", + // String(1..36) + "payer": { + // mandatory + "partyIdInfo": { + // mandatory + "partyIdType": "IBAN", + // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS + "partyIdentifier": "IN93116000060000000012345676", + // mandatory, String(1..128) + "partySubIdOrType": "something" + // optional, String(1..128) } }, - "amountType": "RECEIVE", // mandatory, constant, type: Enum of String(1..32): SEND, RECEIVE - "individualTransfers": [ // mandatory, (1..1000) + "amountType": "RECEIVE", + // mandatory, constant, type: Enum of String(1..32): SEND, RECEIVE + "individualTransfers": [ + // mandatory, (1..1000) { - "payee": { // mandatory - "partyIdInfo": { // mandatory - "partyIdType": "IBAN", // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS - "partyIdentifier": "IN93116000060000000012345671", // mandatory, String(1..128) - "partySubIdOrType": "nothing" // optional, String(1..128) + "payee": { + // mandatory + "partyIdInfo": { + // mandatory + "partyIdType": "IBAN", + // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS + "partyIdentifier": "IN93116000060000000012345671", + // mandatory, String(1..128) + "partySubIdOrType": "nothing" + // optional, String(1..128) } }, - "amount": { // mandatory - "amount": "100", // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ - "currency": "IDR" // mandatory, ISO 4217 (Rupee) + "amount": { + // mandatory + "amount": "100", + // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + "currency": "IDR" + // mandatory, ISO 4217 (Rupee) } }, { - "payee": { // mandatory - "partyIdInfo": { // mandatory - "partyIdType": "IBAN", // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS - "partyIdentifier": "IN93116000060000000012345672", // mandatory, String(1..128) - "partySubIdOrType": "nothing" // optional, String(1..128) + "payee": { + // mandatory + "partyIdInfo": { + // mandatory + "partyIdType": "IBAN", + // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS + "partyIdentifier": "IN93116000060000000012345672", + // mandatory, String(1..128) + "partySubIdOrType": "nothing" + // optional, String(1..128) } }, - "amount": { // mandatory - "amount": "100", // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ - "currency": "IDR" // mandatory, ISO 4217 (Rupee) + "amount": { + // mandatory + "amount": "100", + // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + "currency": "IDR" + // mandatory, ISO 4217 (Rupee) } } ], - "transactionType": { // mandatory - "scenario": "TRANSFER", // mandatory, constant, type: Enum of String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND - "initiator": "PAYER", // mandatory, constant, type: Enum of String(1..32): PAYER, PAYEE - "initiatorType": "CONSUMER" // mandatory, constant, type: Enum of String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE + "transactionType": { + // mandatory + "scenario": "TRANSFER", + // mandatory, constant, type: Enum of String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND + "initiator": "PAYER", + // mandatory, constant, type: Enum of String(1..32): PAYER, PAYEE + "initiatorType": "CONSUMER" + // mandatory, constant, type: Enum of String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE }, - "note": "From Mats", // optional, String(1..128) - "expiration": "2017-11-15T22:17:28.985-01:00" // optional, ISO 8601 + "note": "From Mats", + // optional, String(1..128) + "expiration": "2017-11-15T22:17:28.985-01:00" + // optional, ISO 8601 } diff --git a/fineract-doc/src/resources/interoperation/specification/json/merchant_payer_post_request.json b/fineract-doc/src/resources/interoperation/specification/json/merchant_payer_post_request.json index ce5c20bc9da..f9def487568 100644 --- a/fineract-doc/src/resources/interoperation/specification/json/merchant_payer_post_request.json +++ b/fineract-doc/src/resources/interoperation/specification/json/merchant_payer_post_request.json @@ -14,33 +14,56 @@ //Request Body: { - "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", // String(1..36) - "payee": { // mandatory - "partyIdInfo": { // mandatory - "partyIdType": "IBAN", // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS - "partyIdentifier": "IN93116000060000000012345676", // mandatory, String(1..128) - "partySubIdOrType": "something" // optional, String(1..128) + "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", + // String(1..36) + "payee": { + // mandatory + "partyIdInfo": { + // mandatory + "partyIdType": "IBAN", + // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS + "partyIdentifier": "IN93116000060000000012345676", + // mandatory, String(1..128) + "partySubIdOrType": "something" + // optional, String(1..128) }, - "merchantClassificationCode": "" // optional, String(1..4 digits) + "merchantClassificationCode": "" + // optional, String(1..4 digits) }, - "payer": { // mandatory - "partyIdInfo": { // mandatory - "partyIdType": "IBAN", // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS - "partyIdentifier": "IN4550000000058398257466", // mandatory, String(1..128) - "partySubIdOrType": "nothing", // optional, String(1..128) - "fspId": "BankNrOne" // optional, String(1..32) + "payer": { + // mandatory + "partyIdInfo": { + // mandatory + "partyIdType": "IBAN", + // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS + "partyIdentifier": "IN4550000000058398257466", + // mandatory, String(1..128) + "partySubIdOrType": "nothing", + // optional, String(1..128) + "fspId": "BankNrOne" + // optional, String(1..32) } }, - "amountType": "RECEIVE", // mandatory, constant, type: Enum of String(1..32): SEND, RECEIVE - "amount": { // mandatory - "amount": "100", // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ - "currency": "IDR" // mandatory, ISO 4217 (Rupee) + "amountType": "RECEIVE", + // mandatory, constant, type: Enum of String(1..32): SEND, RECEIVE + "amount": { + // mandatory + "amount": "100", + // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + "currency": "IDR" + // mandatory, ISO 4217 (Rupee) }, - "transactionType": { // mandatory - "scenario": "PAYMENT", // mandatory, constant, type: Enum of String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND - "initiator": "PAYER", // mandatory, constant, type: Enum of String(1..32): PAYER, PAYEE - "initiatorType": "CONSUMER" // mandatory, constant, type: Enum of String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE + "transactionType": { + // mandatory + "scenario": "PAYMENT", + // mandatory, constant, type: Enum of String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND + "initiator": "PAYER", + // mandatory, constant, type: Enum of String(1..32): PAYER, PAYEE + "initiatorType": "CONSUMER" + // mandatory, constant, type: Enum of String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE }, - "note": "From Mats", // optional, String(1..128) - "expiration": "2017-11-15T22:17:28.985-01:00" // optional, ISO 8601 + "note": "From Mats", + // optional, String(1..128) + "expiration": "2017-11-15T22:17:28.985-01:00" + // optional, ISO 8601 } diff --git a/fineract-doc/src/resources/interoperation/specification/json/p2p_payee_post_request.json b/fineract-doc/src/resources/interoperation/specification/json/p2p_payee_post_request.json index 6723b0eafa7..c7ea1ec1cc1 100644 --- a/fineract-doc/src/resources/interoperation/specification/json/p2p_payee_post_request.json +++ b/fineract-doc/src/resources/interoperation/specification/json/p2p_payee_post_request.json @@ -12,31 +12,52 @@ //Request Body: { - "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", // String(1..36) - "payee": { // mandatory - "partyIdInfo": { // mandatory - "partyIdType": "IBAN", // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS - "partyIdentifier": "IN93116000060000000012345676", // mandatory, String(1..128) - "partySubIdOrType": "something" // optional, String(1..128) + "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", + // String(1..36) + "payee": { + // mandatory + "partyIdInfo": { + // mandatory + "partyIdType": "IBAN", + // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS + "partyIdentifier": "IN93116000060000000012345676", + // mandatory, String(1..128) + "partySubIdOrType": "something" + // optional, String(1..128) } }, - "payer": { // mandatory - "partyIdInfo": { // mandatory - "partyIdType": "MSISDN", // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS - "partyIdentifier": "+12345678901", // mandatory, String(1..128) - "partySubIdOrType": "nothing" // optional, String(1..128) + "payer": { + // mandatory + "partyIdInfo": { + // mandatory + "partyIdType": "MSISDN", + // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS + "partyIdentifier": "+12345678901", + // mandatory, String(1..128) + "partySubIdOrType": "nothing" + // optional, String(1..128) } }, - "amountType": "SEND", // mandatory, constant, type: Enum of String(1..32): SEND, RECEIVE - "amount": { // mandatory - "amount": "100", // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ - "currency": "IDR" // mandatory, ISO 4217 (Rupee) + "amountType": "SEND", + // mandatory, constant, type: Enum of String(1..32): SEND, RECEIVE + "amount": { + // mandatory + "amount": "100", + // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + "currency": "IDR" + // mandatory, ISO 4217 (Rupee) }, - "transactionType": { // mandatory - "scenario": "TRANSFER", // mandatory, constant, type: Enum of String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND - "initiator": "PAYEE", // mandatory, constant, type: Enum of String(1..32): PAYER, PAYEE - "initiatorType": "CONSUMER" // mandatory, constant, type: Enum of String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE + "transactionType": { + // mandatory + "scenario": "TRANSFER", + // mandatory, constant, type: Enum of String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND + "initiator": "PAYEE", + // mandatory, constant, type: Enum of String(1..32): PAYER, PAYEE + "initiatorType": "CONSUMER" + // mandatory, constant, type: Enum of String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE }, - "note": "From Mats", // optional, String(1..128) - "expiration": "2017-11-15T22:17:28.985-01:00" // optional, ISO 8601 + "note": "From Mats", + // optional, String(1..128) + "expiration": "2017-11-15T22:17:28.985-01:00" + // optional, ISO 8601 } diff --git a/fineract-doc/src/resources/interoperation/specification/json/p2p_payer_post_request.json b/fineract-doc/src/resources/interoperation/specification/json/p2p_payer_post_request.json index f5198e64eda..7bfb743dbc8 100644 --- a/fineract-doc/src/resources/interoperation/specification/json/p2p_payer_post_request.json +++ b/fineract-doc/src/resources/interoperation/specification/json/p2p_payer_post_request.json @@ -12,31 +12,52 @@ //Request Body: { - "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", // String(1..36) - "payee": { // mandatory - "partyIdInfo": { // mandatory - "partyIdType": "MSISDN", // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS - "partyIdentifier": "+12345678901", // mandatory, String(1..128) - "partySubIdOrType": "nothing" // optional, String(1..128) + "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", + // String(1..36) + "payee": { + // mandatory + "partyIdInfo": { + // mandatory + "partyIdType": "MSISDN", + // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS + "partyIdentifier": "+12345678901", + // mandatory, String(1..128) + "partySubIdOrType": "nothing" + // optional, String(1..128) } }, - "payer": { // mandatory - "partyIdInfo": { // mandatory - "partyIdType": "IBAN", // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS - "partyIdentifier": "IN93116000060000000012345676", // mandatory, String(1..128) - "partySubIdOrType": "something" // optional, String(1..128) + "payer": { + // mandatory + "partyIdInfo": { + // mandatory + "partyIdType": "IBAN", + // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS + "partyIdentifier": "IN93116000060000000012345676", + // mandatory, String(1..128) + "partySubIdOrType": "something" + // optional, String(1..128) } }, - "amountType": "SEND", // mandatory, constant, type: Enum of String(1..32): SEND, RECEIVE - "amount": { // mandatory - "amount": "100", // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ - "currency": "IDR" // mandatory, ISO 4217 (Rupee) + "amountType": "SEND", + // mandatory, constant, type: Enum of String(1..32): SEND, RECEIVE + "amount": { + // mandatory + "amount": "100", + // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + "currency": "IDR" + // mandatory, ISO 4217 (Rupee) }, - "transactionType": { // mandatory - "scenario": "TRANSFER", // mandatory, constant, type: Enum of String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND - "initiator": "PAYER", // mandatory, constant, type: Enum of String(1..32): PAYER, PAYEE - "initiatorType": "CONSUMER" // mandatory, constant, type: Enum of String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE + "transactionType": { + // mandatory + "scenario": "TRANSFER", + // mandatory, constant, type: Enum of String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND + "initiator": "PAYER", + // mandatory, constant, type: Enum of String(1..32): PAYER, PAYEE + "initiatorType": "CONSUMER" + // mandatory, constant, type: Enum of String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE }, - "note": "From Mats", // optional, String(1..128) - "expiration": "2017-11-15T22:17:28.985-01:00" // optional, ISO 8601 + "note": "From Mats", + // optional, String(1..128) + "expiration": "2017-11-15T22:17:28.985-01:00" + // optional, ISO 8601 } diff --git a/fineract-doc/src/resources/interoperation/specification/json/payee_quote_notification_post_request.json b/fineract-doc/src/resources/interoperation/specification/json/payee_quote_notification_post_request.json index 142166a5b5f..672a307c075 100644 --- a/fineract-doc/src/resources/interoperation/specification/json/payee_quote_notification_post_request.json +++ b/fineract-doc/src/resources/interoperation/specification/json/payee_quote_notification_post_request.json @@ -5,27 +5,44 @@ //Request Body: { - "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", // String(1..36) - "transactionId": "11436b17-c690-4a30-8505-42a2c4eafb9d", // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ - "requestId": "18e43330-187e-11e9-ab14-d663bd873d93", // optional, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ - "quoteId": "61058cea-187e-11e9-ab14-d663bd873d93", // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ - "payee": { // mandatory - "partyIdInfo": { // mandatory - "partyIdType": "MSISDN", // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS - "partyIdentifier": "12345678901", // mandatory, String(1..128) - "partySubIdOrType": "nothing", // optional, String(1..128) - "fspId": "BankNrOne" // optional, String(1..32) + "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", + // String(1..36) + "transactionId": "11436b17-c690-4a30-8505-42a2c4eafb9d", + // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + "requestId": "18e43330-187e-11e9-ab14-d663bd873d93", + // optional, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + "quoteId": "61058cea-187e-11e9-ab14-d663bd873d93", + // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + "payee": { + // mandatory + "partyIdInfo": { + // mandatory + "partyIdType": "MSISDN", + // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS + "partyIdentifier": "12345678901", + // mandatory, String(1..128) + "partySubIdOrType": "nothing", + // optional, String(1..128) + "fspId": "BankNrOne" + // optional, String(1..32) } }, - "payer": { // mandatory - "partyIdInfo": { // mandatory - "partyIdType": "IBAN", // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS - "partyIdentifier": "IN93116000060000000012345676", // mandatory, String(1..128) - "partySubIdOrType": "something" // optional, String(1..128) + "payer": { + // mandatory + "partyIdInfo": { + // mandatory + "partyIdType": "IBAN", + // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS + "partyIdentifier": "IN93116000060000000012345676", + // mandatory, String(1..128) + "partySubIdOrType": "something" + // optional, String(1..128) }, - "name": "" // optional, String(1..128) ^(?!\s*$)[\w .,'-]{1,128}$ + "name": "" + // optional, String(1..128) ^(?!\s*$)[\w .,'-]{1,128}$ }, - "amountType": "SEND", // mandatory, constant, type: Enum of String(1..32): SEND, RECEIVE + "amountType": "SEND", + // mandatory, constant, type: Enum of String(1..32): SEND, RECEIVE "amount": { "amount": "100", "currency": "USD" @@ -34,20 +51,32 @@ "amount": "99", "currency": "USD" }, - "fspFee": { // optional - "amount": "1", // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ - "currency": "IDR" // mandatory, ISO 4217 (Rupee) + "fspFee": { + // optional + "amount": "1", + // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + "currency": "IDR" + // mandatory, ISO 4217 (Rupee) }, - "fspCommission": { // optional - "amount": "0", // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ - "currency": "IDR" // mandatory, ISO 4217 (Rupee) + "fspCommission": { + // optional + "amount": "0", + // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + "currency": "IDR" + // mandatory, ISO 4217 (Rupee) }, "transactionRole": "PAYEE", - "transactionType": { // mandatory - "scenario": "TRANSFER", // mandatory, constant, type: Enum of String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND - "initiator": "PAYER", // mandatory, constant, type: Enum of String(1..32): PAYER, PAYEE - "initiatorType": "CONSUMER" // mandatory, constant, type: Enum of String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE + "transactionType": { + // mandatory + "scenario": "TRANSFER", + // mandatory, constant, type: Enum of String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND + "initiator": "PAYER", + // mandatory, constant, type: Enum of String(1..32): PAYER, PAYEE + "initiatorType": "CONSUMER" + // mandatory, constant, type: Enum of String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE }, - "note": "From Mats", // optional, String(1..128) - "expiration": "2017-11-15T22:17:28.985-01:00" // optional, ISO 8601 + "note": "From Mats", + // optional, String(1..128) + "expiration": "2017-11-15T22:17:28.985-01:00" + // optional, ISO 8601 } diff --git a/fineract-doc/src/resources/interoperation/specification/json/payer_quote_notification_post_request.json b/fineract-doc/src/resources/interoperation/specification/json/payer_quote_notification_post_request.json index 6b0209488a0..d70afdfb10b 100644 --- a/fineract-doc/src/resources/interoperation/specification/json/payer_quote_notification_post_request.json +++ b/fineract-doc/src/resources/interoperation/specification/json/payer_quote_notification_post_request.json @@ -5,30 +5,50 @@ //Request Body: { - "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", // String(1..36) - "transactionId": "11436b17-c690-4a30-8505-42a2c4eafb9d", // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ - "requestId": "18e43330-187e-11e9-ab14-d663bd873d93", // optional, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ - "quoteId": "61058cea-187e-11e9-ab14-d663bd873d93", // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ - "payee": { // mandatory - "partyIdInfo": { // mandatory - "partyIdType": "MSISDN", // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS - "partyIdentifier": "+12345678901", // mandatory, String(1..128) - "partySubIdOrType": "nothing", // optional, String(1..128) - "fspId": "BankNrOne" // optional, String(1..32) + "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", + // String(1..36) + "transactionId": "11436b17-c690-4a30-8505-42a2c4eafb9d", + // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + "requestId": "18e43330-187e-11e9-ab14-d663bd873d93", + // optional, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + "quoteId": "61058cea-187e-11e9-ab14-d663bd873d93", + // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + "payee": { + // mandatory + "partyIdInfo": { + // mandatory + "partyIdType": "MSISDN", + // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS + "partyIdentifier": "+12345678901", + // mandatory, String(1..128) + "partySubIdOrType": "nothing", + // optional, String(1..128) + "fspId": "BankNrOne" + // optional, String(1..32) }, - "name": "" // optional, String(1..128) ^(?!\s*$)[\w .,'-]{1,128}$ + "name": "" + // optional, String(1..128) ^(?!\s*$)[\w .,'-]{1,128}$ }, - "payer": { // mandatory - "partyIdInfo": { // mandatory - "partyIdType": "IBAN", // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS - "partyIdentifier": "IN93116000060000000012345676", // mandatory, String(1..128) - "partySubIdOrType": "something" // optional, String(1..128) + "payer": { + // mandatory + "partyIdInfo": { + // mandatory + "partyIdType": "IBAN", + // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS + "partyIdentifier": "IN93116000060000000012345676", + // mandatory, String(1..128) + "partySubIdOrType": "something" + // optional, String(1..128) } }, - "amountType": "SEND", // mandatory, constant, type: Enum of String(1..32): SEND, RECEIVE - "amount": { // mandatory - "amount": "100", // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ - "currency": "IDR" // mandatory, ISO 4217 (Rupee) + "amountType": "SEND", + // mandatory, constant, type: Enum of String(1..32): SEND, RECEIVE + "amount": { + // mandatory + "amount": "100", + // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + "currency": "IDR" + // mandatory, ISO 4217 (Rupee) }, "transferAmount": { "amount": "99", @@ -38,20 +58,32 @@ "amount": "100", "currency": "USD" }, - "fspFee": { // optional - "amount": "1", // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ - "currency": "IDR" // mandatory, ISO 4217 (Rupee) + "fspFee": { + // optional + "amount": "1", + // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + "currency": "IDR" + // mandatory, ISO 4217 (Rupee) }, - "fspCommission": { // optional - "amount": "0", // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ - "currency": "IDR" // mandatory, ISO 4217 (Rupee) + "fspCommission": { + // optional + "amount": "0", + // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + "currency": "IDR" + // mandatory, ISO 4217 (Rupee) }, "transactionRole": "PAYER", - "transactionType": { // mandatory - "scenario": "TRANSFER", // mandatory, constant, type: Enum of String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND - "initiator": "PAYEE", // mandatory, constant, type: Enum of String(1..32): PAYER, PAYEE - "initiatorType": "CONSUMER" // mandatory, constant, type: Enum of String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE + "transactionType": { + // mandatory + "scenario": "TRANSFER", + // mandatory, constant, type: Enum of String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND + "initiator": "PAYEE", + // mandatory, constant, type: Enum of String(1..32): PAYER, PAYEE + "initiatorType": "CONSUMER" + // mandatory, constant, type: Enum of String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE }, - "note": "From Mats", // optional, String(1..128) - "expiration": "2017-11-15T22:17:28.985-01:00" // optional, ISO 8601 + "note": "From Mats", + // optional, String(1..128) + "expiration": "2017-11-15T22:17:28.985-01:00" + // optional, ISO 8601 } diff --git a/fineract-doc/src/resources/interoperation/specification/json/payer_request_notification_post_request.json b/fineract-doc/src/resources/interoperation/specification/json/payer_request_notification_post_request.json index 3a8d2ad3e0b..b61dd3f14a3 100644 --- a/fineract-doc/src/resources/interoperation/specification/json/payer_request_notification_post_request.json +++ b/fineract-doc/src/resources/interoperation/specification/json/payer_request_notification_post_request.json @@ -5,35 +5,60 @@ //Request Body: { - "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", // String(1..36) - "transactionId": "11436b17-c690-4a30-8505-42a2c4eafb9d", // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ - "requestId": "18e43330-187e-11e9-ab14-d663bd873d93", // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ - "payee": { // mandatory - "partyIdInfo": { // mandatory - "partyIdType": "MSISDN", // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS - "partyIdentifier": "+12345678901", // mandatory, String(1..128) - "partySubIdOrType": "nothing", // optional, String(1..128) - "fspId": "BankNrOne" // optional, String(1..32) + "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", + // String(1..36) + "transactionId": "11436b17-c690-4a30-8505-42a2c4eafb9d", + // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + "requestId": "18e43330-187e-11e9-ab14-d663bd873d93", + // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + "payee": { + // mandatory + "partyIdInfo": { + // mandatory + "partyIdType": "MSISDN", + // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS + "partyIdentifier": "+12345678901", + // mandatory, String(1..128) + "partySubIdOrType": "nothing", + // optional, String(1..128) + "fspId": "BankNrOne" + // optional, String(1..32) }, - "name": "" // optional, String(1..128) ^(?!\s*$)[\w .,'-]{1,128}$ + "name": "" + // optional, String(1..128) ^(?!\s*$)[\w .,'-]{1,128}$ }, - "payer": { // mandatory - "partyIdInfo": { // mandatory - "partyIdType": "IBAN", // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS - "partyIdentifier": "IN93116000060000000012345676", // mandatory, String(1..128) - "partySubIdOrType": "something" // optional, String(1..128) + "payer": { + // mandatory + "partyIdInfo": { + // mandatory + "partyIdType": "IBAN", + // mandatory, constant, type: Enum of String(1..32): MSISDN, EMAIL, PERSONAL_ID, BUSINESS, DEVICE, ACCOUNT_ID, IBAN, ALIAS + "partyIdentifier": "IN93116000060000000012345676", + // mandatory, String(1..128) + "partySubIdOrType": "something" + // optional, String(1..128) } }, - "amountType": "SEND", // mandatory, constant, type: Enum of String(1..32): SEND, RECEIVE - "amount": { // mandatory - "amount": "100", // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ - "currency": "IDR" // mandatory, ISO 4217 (Rupee) + "amountType": "SEND", + // mandatory, constant, type: Enum of String(1..32): SEND, RECEIVE + "amount": { + // mandatory + "amount": "100", + // mandatory, Number(22, 4) ^([0]|([1-9][0-9]{0,17}))([.][0-9]{0,3}[1-9])?$ + "currency": "IDR" + // mandatory, ISO 4217 (Rupee) }, - "transactionType": { // mandatory - "scenario": "TRANSFER", // mandatory, constant, type: Enum of String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND - "initiator": "PAYEE", // mandatory, constant, type: Enum of String(1..32): PAYER, PAYEE - "initiatorType": "CONSUMER" // mandatory, constant, type: Enum of String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE + "transactionType": { + // mandatory + "scenario": "TRANSFER", + // mandatory, constant, type: Enum of String(1..32): DEPOSIT, WITHDRAWAL, TRANSFER, PAYMENT, REFUND + "initiator": "PAYEE", + // mandatory, constant, type: Enum of String(1..32): PAYER, PAYEE + "initiatorType": "CONSUMER" + // mandatory, constant, type: Enum of String(1..32): CONSUMER, AGENT, BUSINESS, DEVICE }, - "note": "From Mats", // optional, String(1..128) - "expiration": "2017-11-15T22:17:28.985-01:00" // optional, ISO 8601 + "note": "From Mats", + // optional, String(1..128) + "expiration": "2017-11-15T22:17:28.985-01:00" + // optional, ISO 8601 } diff --git a/fineract-doc/src/resources/interoperation/specification/json/transactions_post_sync_response.json b/fineract-doc/src/resources/interoperation/specification/json/transactions_post_sync_response.json index c9a89f9a57d..437a15148fb 100644 --- a/fineract-doc/src/resources/interoperation/specification/json/transactions_post_sync_response.json +++ b/fineract-doc/src/resources/interoperation/specification/json/transactions_post_sync_response.json @@ -3,5 +3,6 @@ //Response Body: { - "transactionId": "11436b17-c690-4a30-8505-42a2c4eafb9d" // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ + "transactionId": "11436b17-c690-4a30-8505-42a2c4eafb9d" + // mandatory, UUID String(36) ^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$ } diff --git a/fineract-doc/src/resources/interoperation/specification/json/transactions_put_async_response.json b/fineract-doc/src/resources/interoperation/specification/json/transactions_put_async_response.json index 3ddc178d9aa..488d933a105 100644 --- a/fineract-doc/src/resources/interoperation/specification/json/transactions_put_async_response.json +++ b/fineract-doc/src/resources/interoperation/specification/json/transactions_put_async_response.json @@ -10,7 +10,10 @@ //Response Body: { - "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", // String(1..36) - "completedTimestamp": "2017-11-16T04:15:35.513+01:00", // optional, ISO 8601 - "transferState": "COMMITTED" // mandatory, Enum of String(1..32): RECEIVED, RESERVED, COMMITTED, ABORTED + "clientRefId": "0f4f8eb4-1d83-11e9-ab14-d663bd873d93", + // String(1..36) + "completedTimestamp": "2017-11-16T04:15:35.513+01:00", + // optional, ISO 8601 + "transferState": "COMMITTED" + // mandatory, Enum of String(1..32): RECEIVED, RESERVED, COMMITTED, ABORTED } diff --git a/fineract-document/build.gradle b/fineract-document/build.gradle index 37ddda8ab53..83778423e5d 100644 --- a/fineract-document/build.gradle +++ b/fineract-document/build.gradle @@ -52,9 +52,9 @@ apply from: 'dependencies.gradle' // https://github.com/andygoossens/gradle-modernizer-plugin modernizer { ignoreClassNamePatterns = [ - '.*AbstractPersistableCustom', - '.*EntityTables', - '.*domain.*' + '.*AbstractPersistableCustom', + '.*EntityTables', + '.*domain.*' ] } diff --git a/fineract-document/dependencies.gradle b/fineract-document/dependencies.gradle index e1cc0e429e4..22470db8351 100644 --- a/fineract-document/dependencies.gradle +++ b/fineract-document/dependencies.gradle @@ -27,7 +27,7 @@ dependencies { implementation( project(path: ':fineract-core'), project(path: ':fineract-command'), - ) + ) implementation( 'org.springframework.boot:spring-boot-starter-web', @@ -52,26 +52,26 @@ dependencies { 'org.apache.tika:tika-parser-microsoft-module', 'org.apache.tika:tika-parser-miscoffice-module', 'org.apache.tika:tika-parser-image-module', - ) + ) compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' annotationProcessor 'org.mapstruct:mapstruct-processor' - implementation('org.apache.commons:commons-csv'){} - implementation ('software.amazon.awssdk:s3') { + implementation('org.apache.commons:commons-csv') {} + implementation('software.amazon.awssdk:s3') { } - implementation ('software.amazon.awssdk:auth') { + implementation('software.amazon.awssdk:auth') { } // testCompile dependencies are ONLY used in src/test, not src/main. // Do NOT repeat dependencies which are ALREADY in implementation or runtimeOnly! // - testImplementation( 'io.github.classgraph:classgraph' ) - testImplementation ('org.springframework.boot:spring-boot-starter-test') { + testImplementation('io.github.classgraph:classgraph') + testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'com.jayway.jsonpath', module: 'json-path' exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' exclude group: 'jakarta.activation' exclude group: 'javax.activation' exclude group: 'org.skyscreamer' } - testImplementation ('org.mockito:mockito-inline') + testImplementation('org.mockito:mockito-inline') testImplementation 'com.github.romankh3:image-comparison' } diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/config/ContentStoreConfig.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/config/ContentStoreConfig.java index 2af614d8529..25fde2c8b4a 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/config/ContentStoreConfig.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/config/ContentStoreConfig.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; + import lombok.RequiredArgsConstructor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/data/ContentStoreType.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/data/ContentStoreType.java index 306952d60b8..e81313dd8e0 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/data/ContentStoreType.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/data/ContentStoreType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/ContentDetector.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/ContentDetector.java index 323b3c79893..c59242a7c59 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/ContentDetector.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/ContentDetector.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/ContentDetectorContext.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/ContentDetectorContext.java index fffbe0b4cda..2f9e5a09f9e 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/ContentDetectorContext.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/ContentDetectorContext.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.contentstore.detector; import java.io.InputStream; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/ContentDetectorManager.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/ContentDetectorManager.java index c7d5c03988c..75310fe31ca 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/ContentDetectorManager.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/ContentDetectorManager.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/DefaultContentDetectorManager.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/DefaultContentDetectorManager.java index d89bcb938ab..4acbe5f183b 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/DefaultContentDetectorManager.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/DefaultContentDetectorManager.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/FileContentDetector.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/FileContentDetector.java index 048bc1a321e..36975f52394 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/FileContentDetector.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/FileContentDetector.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.nio.file.Files; import java.nio.file.Paths; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.FilenameUtils; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/TikaContentDetector.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/TikaContentDetector.java index bdfbf7eef1b..c2256e4d2ed 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/TikaContentDetector.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/detector/TikaContentDetector.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.contentstore.detector; import java.util.Optional; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentDetectorException.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentDetectorException.java index d2fba0c5344..a6ae445aa18 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentDetectorException.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentDetectorException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentPathSanitizerException.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentPathSanitizerException.java index 56f14934905..b0a07b482f2 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentPathSanitizerException.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentPathSanitizerException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentPolicyException.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentPolicyException.java index 3ba139b11d0..314bbb34b9e 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentPolicyException.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentPolicyException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentProcessorException.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentProcessorException.java index 1fe80600b82..01c5d4324be 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentProcessorException.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentProcessorException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentStoreException.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentStoreException.java index 9dc81396b1f..dc1018bfdc0 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentStoreException.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/exception/ContentStoreException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/ContentPolicy.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/ContentPolicy.java index db6c7666a62..7f1c5e29b86 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/ContentPolicy.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/ContentPolicy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/ContentPolicyContext.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/ContentPolicyContext.java index 9b27922ac75..265edcd5a81 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/ContentPolicyContext.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/ContentPolicyContext.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.contentstore.policy; import java.io.InputStream; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/DefaultDeleteContentPolicy.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/DefaultDeleteContentPolicy.java index 9fb4101188a..efec85ea132 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/DefaultDeleteContentPolicy.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/DefaultDeleteContentPolicy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/DefaultDownloadContentPolicy.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/DefaultDownloadContentPolicy.java index 2a024991102..49c735a107f 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/DefaultDownloadContentPolicy.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/DefaultDownloadContentPolicy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/DefaultPostUploadContentPolicy.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/DefaultPostUploadContentPolicy.java index c071545ed66..9049478edf5 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/DefaultPostUploadContentPolicy.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/DefaultPostUploadContentPolicy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/DefaultPreUploadContentPolicy.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/DefaultPreUploadContentPolicy.java index 26f8beaf086..43031affc65 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/DefaultPreUploadContentPolicy.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/DefaultPreUploadContentPolicy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/MimeContentPolicy.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/MimeContentPolicy.java index e1218d564a0..153d63036cf 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/MimeContentPolicy.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/MimeContentPolicy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/TraversalContentPolicy.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/TraversalContentPolicy.java index 7ca247d95b7..a43c4807c65 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/TraversalContentPolicy.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/TraversalContentPolicy.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.contentstore.policy; import java.util.regex.Pattern; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.contentstore.exception.ContentPolicyException; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/WhitelistContentPolicy.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/WhitelistContentPolicy.java index f12e37c09c2..b279c641bfe 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/WhitelistContentPolicy.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/policy/WhitelistContentPolicy.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.regex.Pattern; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.FilenameUtils; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/Base64DecoderContentProcessor.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/Base64DecoderContentProcessor.java index 8a9245868c4..77b78a8704f 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/Base64DecoderContentProcessor.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/Base64DecoderContentProcessor.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/Base64EncoderContentProcessor.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/Base64EncoderContentProcessor.java index b870a94cb03..e341e7c3008 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/Base64EncoderContentProcessor.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/Base64EncoderContentProcessor.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/ContentProcessor.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/ContentProcessor.java index 6a882f4153a..9faa92c7c14 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/ContentProcessor.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/ContentProcessor.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/ContentProcessorContext.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/ContentProcessorContext.java index 71cdc82a786..4472c32d46e 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/ContentProcessorContext.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/ContentProcessorContext.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.InputStream; import java.util.HashMap; import java.util.Map; + import lombok.Getter; import lombok.extern.slf4j.Slf4j; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/DataUrlDecoderContentProcessor.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/DataUrlDecoderContentProcessor.java index 608efe4d8f5..313ccf30670 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/DataUrlDecoderContentProcessor.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/DataUrlDecoderContentProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/DataUrlEncoderContentProcessor.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/DataUrlEncoderContentProcessor.java index 6163cea173d..fb9a172fbd6 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/DataUrlEncoderContentProcessor.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/DataUrlEncoderContentProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.io.FilterInputStream; import java.io.IOException; import java.io.InputStream; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.contentstore.util.ContentPipe; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/GzipDecoderContentProcessor.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/GzipDecoderContentProcessor.java index aa0e7eecfd0..1a3b1531249 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/GzipDecoderContentProcessor.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/GzipDecoderContentProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static java.util.Objects.requireNonNullElse; import java.util.zip.GZIPInputStream; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.contentstore.util.ContentPipe; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/GzipEncoderContentProcessor.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/GzipEncoderContentProcessor.java index a3a0d7bb224..dc670f497ab 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/GzipEncoderContentProcessor.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/GzipEncoderContentProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static java.util.Objects.requireNonNullElse; import java.util.zip.GZIPOutputStream; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.contentstore.util.ContentPipe; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/ImageResizeContentProcessor.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/ImageResizeContentProcessor.java index 13caf17fa1b..27688ed15ef 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/ImageResizeContentProcessor.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/ImageResizeContentProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.io.InputStream; import java.util.regex.Pattern; import javax.imageio.ImageIO; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.contentstore.exception.ContentProcessorException; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/SizeContentProcessor.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/SizeContentProcessor.java index 3c7b9575fb2..403763acf9c 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/SizeContentProcessor.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/processor/SizeContentProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.FilterInputStream; import java.io.IOException; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/service/ContentStoreService.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/service/ContentStoreService.java index 2da1fce3556..c160c34c5f9 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/service/ContentStoreService.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/service/ContentStoreService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.contentstore.service; import java.io.InputStream; + import org.apache.fineract.infrastructure.contentstore.data.ContentStoreType; public interface ContentStoreService { diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/service/FileContentStoreService.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/service/FileContentStoreService.java index 1f293764b95..897fc31badb 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/service/FileContentStoreService.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/service/FileContentStoreService.java @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import java.nio.file.Path; import java.util.Optional; import java.util.stream.Stream; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/service/S3ContentStoreService.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/service/S3ContentStoreService.java index 8800f35fcd6..d07a426ddc6 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/service/S3ContentStoreService.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/service/S3ContentStoreService.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static java.util.Objects.requireNonNull; import java.io.InputStream; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.contentstore.data.ContentStoreType; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/ContentPathRandomizer.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/ContentPathRandomizer.java index 6ac73bd703d..033784db2ce 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/ContentPathRandomizer.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/ContentPathRandomizer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/ContentPathSanitizer.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/ContentPathSanitizer.java index ef07ee76992..c976a9f1fd8 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/ContentPathSanitizer.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/ContentPathSanitizer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/ContentPipe.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/ContentPipe.java index 131c50e4044..fa8f6358d3e 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/ContentPipe.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/ContentPipe.java @@ -6,9 +6,9 @@ * 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 @@ -29,6 +29,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Future; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.contentstore.exception.ContentProcessorException; import org.apache.fineract.infrastructure.contentstore.processor.ContentProcessor; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/DefaultContentPathRandomizer.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/DefaultContentPathRandomizer.java index 741d3f9e836..f43023ec3c8 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/DefaultContentPathRandomizer.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/DefaultContentPathRandomizer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/DefaultContentPathSanitizer.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/DefaultContentPathSanitizer.java index 2827480d60b..ba4ab6c153d 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/DefaultContentPathSanitizer.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/contentstore/util/DefaultContentPathSanitizer.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.contentstore.util; import java.nio.file.Path; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.FilenameUtils; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentApiConstants.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentApiConstants.java index 59fe93273e2..78dbde1cf7c 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentApiConstants.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/DocumentApiConstants.java @@ -6,9 +6,9 @@ * 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 @@ -20,7 +20,8 @@ public final class DocumentApiConstants { - private DocumentApiConstants() {} + private DocumentApiConstants() { + } public static final String DOCUMENT_API_PARAM_ENTITY_TYPE = "entityType"; public static final String DOCUMENT_API_PARAM_ENTITY_ID = "entityId"; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/FileUploadValidator.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/FileUploadValidator.java index 430a34e6f03..436949bfeba 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/FileUploadValidator.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/FileUploadValidator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.documentmanagement.api; import java.io.InputStream; + import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.glassfish.jersey.media.multipart.FormDataBodyPart; import org.glassfish.jersey.media.multipart.FormDataContentDisposition; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImageApiConstants.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImageApiConstants.java index 54c8d473e3a..c1ee8d554fd 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImageApiConstants.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImageApiConstants.java @@ -6,9 +6,9 @@ * 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 @@ -20,7 +20,8 @@ public final class ImageApiConstants { - private ImageApiConstants() {} + private ImageApiConstants() { + } public static final String IMAGE_API_PARAM_MAX_WIDTH = "maxWidth"; public static final String IMAGE_API_PARAM_MAX_HEIGHT = "maxHeight"; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResource.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResource.java index 7ca3769d77a..4181fb0912b 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResource.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/api/ImagesApiResource.java @@ -6,9 +6,9 @@ * 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 @@ -54,10 +54,12 @@ import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; + import java.io.InputStream; import java.util.Map; import java.util.Optional; import java.util.function.Supplier; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -102,9 +104,9 @@ public class ImagesApiResource { // FINERACT-1265: Do NOT specify @Produces(TEXT_PLAIN) here - it may actually not (if it calls the next methods it's // octet-stream) public Response retrieveImage(@PathParam(DOCUMENT_API_PARAM_ENTITY_TYPE) final String entityName, - @PathParam(DOCUMENT_API_PARAM_ENTITY_ID) final Long entityId, @QueryParam(IMAGE_API_PARAM_MAX_WIDTH) final Integer maxWidth, - @QueryParam(IMAGE_API_PARAM_MAX_HEIGHT) final Integer maxHeight, @QueryParam(IMAGE_API_PARAM_OUTPUT) String output, - @HeaderParam(ACCEPT) String acceptHeader) { + @PathParam(DOCUMENT_API_PARAM_ENTITY_ID) final Long entityId, @QueryParam(IMAGE_API_PARAM_MAX_WIDTH) final Integer maxWidth, + @QueryParam(IMAGE_API_PARAM_MAX_HEIGHT) final Integer maxHeight, @QueryParam(IMAGE_API_PARAM_OUTPUT) String output, + @HeaderParam(ACCEPT) String acceptHeader) { // TODO: pass resize information here and do all the processing in the service final var content = imageReadPlatformService.retrieveImage(entityName, entityId); @@ -154,14 +156,14 @@ public Response retrieveImage(@PathParam(DOCUMENT_API_PARAM_ENTITY_TYPE) final S } @POST - @Consumes({ MediaType.MULTIPART_FORM_DATA }) - @Produces({ MediaType.APPLICATION_JSON }) + @Consumes({MediaType.MULTIPART_FORM_DATA}) + @Produces({MediaType.APPLICATION_JSON}) @ApiResponse(responseCode = "200", description = "Not Shown (multi-part form data)") public ImageCreateResponse createImage(@PathParam(DOCUMENT_API_PARAM_ENTITY_TYPE) final String entityType, - @PathParam(DOCUMENT_API_PARAM_ENTITY_ID) final Long entityId, @HeaderParam(CONTENT_LENGTH) final Long fileSize, - @FormDataParam(DOCUMENT_API_PARAM_FILE) final InputStream is, - @FormDataParam(DOCUMENT_API_PARAM_FILE) final FormDataContentDisposition fileDetails, - @FormDataParam(DOCUMENT_API_PARAM_FILE) final FormDataBodyPart filePart) { + @PathParam(DOCUMENT_API_PARAM_ENTITY_ID) final Long entityId, @HeaderParam(CONTENT_LENGTH) final Long fileSize, + @FormDataParam(DOCUMENT_API_PARAM_FILE) final InputStream is, + @FormDataParam(DOCUMENT_API_PARAM_FILE) final FormDataContentDisposition fileDetails, + @FormDataParam(DOCUMENT_API_PARAM_FILE) final FormDataBodyPart filePart) { fileUploadValidator.validate(fileSize, is, fileDetails, filePart); @@ -177,9 +179,9 @@ public ImageCreateResponse createImage(@PathParam(DOCUMENT_API_PARAM_ENTITY_TYPE } @POST - @Consumes({ MediaType.TEXT_PLAIN, MediaType.TEXT_HTML, MediaType.APPLICATION_JSON }) + @Consumes({MediaType.TEXT_PLAIN, MediaType.TEXT_HTML, MediaType.APPLICATION_JSON}) public ImageCreateResponse createImage(@PathParam(DOCUMENT_API_PARAM_ENTITY_TYPE) final String entityType, - @PathParam(DOCUMENT_API_PARAM_ENTITY_ID) final Long entityId, final InputStream body) { + @PathParam(DOCUMENT_API_PARAM_ENTITY_ID) final Long entityId, final InputStream body) { requireNonNull(body, "Missing input stream"); @@ -197,25 +199,25 @@ public ImageCreateResponse createImage(@PathParam(DOCUMENT_API_PARAM_ENTITY_TYPE @PUT @Consumes(MediaType.MULTIPART_FORM_DATA) @RequestBody(description = "Update image", content = { - @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @io.swagger.v3.oas.annotations.media.Schema(type = "object")) }) + @Content(mediaType = MediaType.MULTIPART_FORM_DATA, schema = @io.swagger.v3.oas.annotations.media.Schema(type = "object"))}) public ImageCreateResponse updateImage(@PathParam(DOCUMENT_API_PARAM_ENTITY_TYPE) final String entityName, - @PathParam(DOCUMENT_API_PARAM_ENTITY_ID) final Long entityId, @HeaderParam(CONTENT_LENGTH) final Long fileSize, - @FormDataParam(DOCUMENT_API_PARAM_FILE) final InputStream inputStream, - @FormDataParam(DOCUMENT_API_PARAM_FILE) final FormDataContentDisposition fileDetails, - @FormDataParam(DOCUMENT_API_PARAM_FILE) final FormDataBodyPart bodyPart) { + @PathParam(DOCUMENT_API_PARAM_ENTITY_ID) final Long entityId, @HeaderParam(CONTENT_LENGTH) final Long fileSize, + @FormDataParam(DOCUMENT_API_PARAM_FILE) final InputStream inputStream, + @FormDataParam(DOCUMENT_API_PARAM_FILE) final FormDataContentDisposition fileDetails, + @FormDataParam(DOCUMENT_API_PARAM_FILE) final FormDataBodyPart bodyPart) { return createImage(entityName, entityId, fileSize, inputStream, fileDetails, bodyPart); } @PUT - @Consumes({ MediaType.TEXT_PLAIN, MediaType.TEXT_HTML, MediaType.APPLICATION_JSON }) + @Consumes({MediaType.TEXT_PLAIN, MediaType.TEXT_HTML, MediaType.APPLICATION_JSON}) public ImageCreateResponse updateImage(@PathParam(DOCUMENT_API_PARAM_ENTITY_TYPE) final String entityName, - @PathParam(DOCUMENT_API_PARAM_ENTITY_ID) final Long entityId, final InputStream body) { + @PathParam(DOCUMENT_API_PARAM_ENTITY_ID) final Long entityId, final InputStream body) { return createImage(entityName, entityId, body); } @DELETE public ImageDeleteResponse deleteImage(@PathParam(DOCUMENT_API_PARAM_ENTITY_TYPE) final String entityType, - @PathParam(DOCUMENT_API_PARAM_ENTITY_ID) final Long entityId) { + @PathParam(DOCUMENT_API_PARAM_ENTITY_ID) final Long entityId) { final var command = new ImageDeleteCommand(); diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/DocumentCreateCommand.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/DocumentCreateCommand.java index a8b0d1e65a3..286fbc0bfe5 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/DocumentCreateCommand.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/DocumentCreateCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class DocumentCreateCommand extends Command {} +public class DocumentCreateCommand extends Command { +} diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/DocumentDeleteCommand.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/DocumentDeleteCommand.java index 1f0b5dc90a5..4d559289384 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/DocumentDeleteCommand.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/DocumentDeleteCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class DocumentDeleteCommand extends Command {} +public class DocumentDeleteCommand extends Command { +} diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/DocumentUpdateCommand.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/DocumentUpdateCommand.java index 609b76bab71..0d09618bd81 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/DocumentUpdateCommand.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/DocumentUpdateCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class DocumentUpdateCommand extends Command {} +public class DocumentUpdateCommand extends Command { +} diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/ImageCreateCommand.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/ImageCreateCommand.java index 2018da75e22..b7479b96d1b 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/ImageCreateCommand.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/ImageCreateCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class ImageCreateCommand extends Command {} +public class ImageCreateCommand extends Command { +} diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/ImageDeleteCommand.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/ImageDeleteCommand.java index e510df6607c..e5017c4948a 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/ImageDeleteCommand.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/command/ImageDeleteCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class ImageDeleteCommand extends Command {} +public class ImageDeleteCommand extends Command { +} diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentContent.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentContent.java index f56a57120ad..79f30db7484 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentContent.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentContent.java @@ -6,9 +6,9 @@ * 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 @@ -20,9 +20,11 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import io.swagger.v3.oas.annotations.Hidden; + import java.io.InputStream; import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentCreateRequest.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentCreateRequest.java index 8334c6eb3cb..dd35c7ead2c 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentCreateRequest.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentCreateRequest.java @@ -6,9 +6,9 @@ * 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 @@ -23,9 +23,11 @@ import jakarta.validation.constraints.Min; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; + import java.io.InputStream; import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentCreateResponse.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentCreateResponse.java index d2a3d197c3f..4b618053d0e 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentCreateResponse.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentCreateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentData.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentData.java index 3621cd35cc2..11e2c5192ae 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentData.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentDeleteRequest.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentDeleteRequest.java index 5557cbe36e0..d093ef00954 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentDeleteRequest.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentDeleteRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,8 +20,10 @@ import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentDeleteResponse.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentDeleteResponse.java index 59f3858a1b9..8fad3b37e07 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentDeleteResponse.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentDeleteResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentUpdateRequest.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentUpdateRequest.java index 260480a1bbd..21f15f2d838 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentUpdateRequest.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentUpdateRequest.java @@ -6,9 +6,9 @@ * 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 @@ -23,9 +23,11 @@ import jakarta.validation.constraints.Min; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; + import java.io.InputStream; import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentUpdateResponse.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentUpdateResponse.java index 16a34efe9d0..b9af60a45f6 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentUpdateResponse.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/DocumentUpdateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/ImageCreateRequest.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/ImageCreateRequest.java index a9f517d0cd9..dd50c8595d0 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/ImageCreateRequest.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/ImageCreateRequest.java @@ -6,9 +6,9 @@ * 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 @@ -26,9 +26,11 @@ import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Pattern; import jakarta.validation.constraints.Size; + import java.io.InputStream; import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/ImageCreateResponse.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/ImageCreateResponse.java index fea6695cee6..b917c4cfd9e 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/ImageCreateResponse.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/ImageCreateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/ImageDeleteRequest.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/ImageDeleteRequest.java index 7ef53439c1b..7b66e8111dc 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/ImageDeleteRequest.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/ImageDeleteRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,8 +20,10 @@ import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/ImageDeleteResponse.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/ImageDeleteResponse.java index af2430a34b7..3f759714cb7 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/ImageDeleteResponse.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/data/ImageDeleteResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/domain/Document.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/domain/Document.java index 6d0a25bd069..4ddcf702f93 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/domain/Document.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/domain/Document.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/domain/DocumentRepository.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/domain/DocumentRepository.java index 327777663a1..db8d25bae47 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/domain/DocumentRepository.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/domain/DocumentRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Optional; + import org.springframework.data.repository.ListCrudRepository; import org.springframework.data.repository.query.QueryByExampleExecutor; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/domain/Image.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/domain/Image.java index 90bef819a3d..a949aa74eb5 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/domain/Image.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/domain/Image.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/domain/ImageRepository.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/domain/ImageRepository.java index 023216807d9..f3d1152bd41 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/domain/ImageRepository.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/domain/ImageRepository.java @@ -6,9 +6,9 @@ * 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 @@ -21,4 +21,5 @@ import org.springframework.data.repository.ListCrudRepository; import org.springframework.data.repository.query.QueryByExampleExecutor; -public interface ImageRepository extends ListCrudRepository, QueryByExampleExecutor {} +public interface ImageRepository extends ListCrudRepository, QueryByExampleExecutor { +} diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/exception/DocumentInvalidRequestException.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/exception/DocumentInvalidRequestException.java index 702e6c157fd..d168c120827 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/exception/DocumentInvalidRequestException.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/exception/DocumentInvalidRequestException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/exception/DocumentNotFoundException.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/exception/DocumentNotFoundException.java index c05c7d5ef52..17906c9d05b 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/exception/DocumentNotFoundException.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/exception/DocumentNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/DocumentCreateCommandHandler.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/DocumentCreateCommandHandler.java index 3250e214d86..04a94f36e89 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/DocumentCreateCommandHandler.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/DocumentCreateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/DocumentDeleteCommandHandler.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/DocumentDeleteCommandHandler.java index 58d8122753c..ad6d2385f13 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/DocumentDeleteCommandHandler.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/DocumentDeleteCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/DocumentUpdateCommandHandler.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/DocumentUpdateCommandHandler.java index a55cb5d7e11..7955fca70af 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/DocumentUpdateCommandHandler.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/DocumentUpdateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/ImageCreateCommandHandler.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/ImageCreateCommandHandler.java index 16eb696c03d..b6e7d25298e 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/ImageCreateCommandHandler.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/ImageCreateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/ImageDeleteCommandHandler.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/ImageDeleteCommandHandler.java index b302b433d9a..8df547e4f20 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/ImageDeleteCommandHandler.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/handler/ImageDeleteCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/mapping/DocumentMapper.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/mapping/DocumentMapper.java index 635480d97cc..63a314d8f13 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/mapping/DocumentMapper.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/mapping/DocumentMapper.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import static org.mapstruct.MappingConstants.ComponentModel.SPRING; import java.io.InputStream; + import org.apache.fineract.infrastructure.documentmanagement.data.DocumentContent; import org.apache.fineract.infrastructure.documentmanagement.data.DocumentData; import org.apache.fineract.infrastructure.documentmanagement.domain.Document; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentReadPlatformService.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentReadPlatformService.java index 1dab3be03c5..3b0cdd0dc15 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentReadPlatformService.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.documentmanagement.service; import java.util.List; + import org.apache.fineract.infrastructure.documentmanagement.data.DocumentContent; import org.apache.fineract.infrastructure.documentmanagement.data.DocumentData; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentReadPlatformServiceImpl.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentReadPlatformServiceImpl.java index 2437d810f5e..f22b490ecc1 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentReadPlatformServiceImpl.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.documentmanagement.service; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.contentstore.service.ContentStoreService; import org.apache.fineract.infrastructure.documentmanagement.data.DocumentContent; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentWritePlatformService.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentWritePlatformService.java index d583fe872d2..210b7778386 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentWritePlatformService.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentWritePlatformServiceImpl.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentWritePlatformServiceImpl.java index 225f0cbb7d4..1ef220f9479 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentWritePlatformServiceImpl.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/DocumentWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,8 +21,10 @@ import static java.util.Objects.requireNonNull; import jakarta.validation.Valid; + import java.util.Objects; import java.util.Optional; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.FilenameUtils; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageReadPlatformService.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageReadPlatformService.java index 9684e77e832..a6ae35b27b7 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageReadPlatformService.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageReadPlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageReadPlatformServiceImpl.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageReadPlatformServiceImpl.java index 7c64d18a9dc..4a7cbd32b5e 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageReadPlatformServiceImpl.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.documentmanagement.service; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.FilenameUtils; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageWritePlatformService.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageWritePlatformService.java index f976338ffd2..7a3dc5f55a9 100755 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageWritePlatformService.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageWritePlatformServiceImpl.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageWritePlatformServiceImpl.java index 6d25a80bda6..afe956224f4 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageWritePlatformServiceImpl.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.List; import java.util.Optional; import java.util.UUID; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/event/business/domain/document/DocumentBusinessEvent.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/event/business/domain/document/DocumentBusinessEvent.java index 0993476dcc3..6c5b94f0058 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/event/business/domain/document/DocumentBusinessEvent.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/event/business/domain/document/DocumentBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/event/business/domain/document/DocumentCreatedBusinessEvent.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/event/business/domain/document/DocumentCreatedBusinessEvent.java index 1c9c5bb9bcd..af95e371593 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/event/business/domain/document/DocumentCreatedBusinessEvent.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/event/business/domain/document/DocumentCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/main/java/org/apache/fineract/infrastructure/event/business/domain/document/DocumentDeletedBusinessEvent.java b/fineract-document/src/main/java/org/apache/fineract/infrastructure/event/business/domain/document/DocumentDeletedBusinessEvent.java index fb2d4c47e32..4096d2fb850 100644 --- a/fineract-document/src/main/java/org/apache/fineract/infrastructure/event/business/domain/document/DocumentDeletedBusinessEvent.java +++ b/fineract-document/src/main/java/org/apache/fineract/infrastructure/event/business/domain/document/DocumentDeletedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/test/java/org/apache/fineract/infrastructure/TestConfiguration.java b/fineract-document/src/test/java/org/apache/fineract/infrastructure/TestConfiguration.java index 32cafe97789..2a020b362b2 100644 --- a/fineract-document/src/test/java/org/apache/fineract/infrastructure/TestConfiguration.java +++ b/fineract-document/src/test/java/org/apache/fineract/infrastructure/TestConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; + import org.apache.fineract.infrastructure.core.config.FineractProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; @@ -30,11 +31,11 @@ import org.springframework.context.annotation.PropertySource; @Configuration -@EnableConfigurationProperties({ FineractProperties.class }) +@EnableConfigurationProperties({FineractProperties.class}) @PropertySource("classpath:application-test.properties") -@ComponentScan({ "org.apache.fineract.infrastructure.contentstore.util", "org.apache.fineract.infrastructure.contentstore.detector", +@ComponentScan({"org.apache.fineract.infrastructure.contentstore.util", "org.apache.fineract.infrastructure.contentstore.detector", "org.apache.fineract.infrastructure.contentstore.processor", "org.apache.fineract.infrastructure.contentstore.policy", - "org.apache.fineract.infrastructure.contentstore.service" }) + "org.apache.fineract.infrastructure.contentstore.service"}) public class TestConfiguration { @Bean(BEAN_NAME_EXECUTOR) diff --git a/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/detector/FileContentDetectorTest.java b/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/detector/FileContentDetectorTest.java index 1c683082831..09092b35d90 100644 --- a/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/detector/FileContentDetectorTest.java +++ b/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/detector/FileContentDetectorTest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/detector/TikaContentDetectorTest.java b/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/detector/TikaContentDetectorTest.java index d283c6806b7..09ac32b6be6 100644 --- a/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/detector/TikaContentDetectorTest.java +++ b/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/detector/TikaContentDetectorTest.java @@ -6,9 +6,9 @@ * 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 @@ -25,10 +25,12 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import com.github.romankh3.image.comparison.ImageComparison; + import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import javax.imageio.ImageIO; + import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; import org.apache.fineract.infrastructure.TestConfiguration; @@ -100,7 +102,7 @@ void reuseStream() throws IOException { IOUtils.copy(ctx.getInputStream(), new FileOutputStream("build/test.png")); try (var expectedIs = TikaContentDetectorTest.class.getClassLoader().getResourceAsStream("test.png"); - var actualIs = new FileInputStream("build/test.png")) { + var actualIs = new FileInputStream("build/test.png")) { requireNonNull(expectedIs); var expectedImage = ImageIO.read(expectedIs); diff --git a/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/policy/MimeContentPolicyTest.java b/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/policy/MimeContentPolicyTest.java index ff68039b1b4..de1eb586995 100644 --- a/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/policy/MimeContentPolicyTest.java +++ b/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/policy/MimeContentPolicyTest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/policy/TraversalContentPolicyTest.java b/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/policy/TraversalContentPolicyTest.java index d7064c482c9..d03e9ba30c5 100644 --- a/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/policy/TraversalContentPolicyTest.java +++ b/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/policy/TraversalContentPolicyTest.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import java.util.List; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.TestConfiguration; import org.apache.fineract.infrastructure.contentstore.exception.ContentPolicyException; diff --git a/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/processor/ContentProcessorTest.java b/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/processor/ContentProcessorTest.java index 353bfc0c1c3..a2bc36cfb27 100644 --- a/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/processor/ContentProcessorTest.java +++ b/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/processor/ContentProcessorTest.java @@ -6,9 +6,9 @@ * 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 @@ -30,6 +30,7 @@ import java.io.ByteArrayInputStream; import java.io.FileOutputStream; import java.util.Map; + import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; import org.apache.fineract.infrastructure.TestConfiguration; diff --git a/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/service/FileContentStoreServiceTest.java b/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/service/FileContentStoreServiceTest.java index 2c543d08b13..ffb5e76fdd3 100644 --- a/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/service/FileContentStoreServiceTest.java +++ b/fineract-document/src/test/java/org/apache/fineract/infrastructure/contentstore/service/FileContentStoreServiceTest.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.nio.file.Files; import java.nio.file.Path; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.TestConfiguration; import org.apache.fineract.infrastructure.core.config.FineractProperties; diff --git a/fineract-document/src/test/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageReadPlatformServiceImplTest.java b/fineract-document/src/test/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageReadPlatformServiceImplTest.java index dc214f6b497..8969ea361d1 100644 --- a/fineract-document/src/test/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageReadPlatformServiceImplTest.java +++ b/fineract-document/src/test/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageReadPlatformServiceImplTest.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.Collections; import java.util.List; import java.util.Optional; + import org.apache.fineract.infrastructure.contentstore.detector.ContentDetectorManager; import org.apache.fineract.infrastructure.contentstore.service.ContentStoreService; import org.apache.fineract.infrastructure.documentmanagement.adapter.EntityImageIdAdapter; diff --git a/fineract-document/src/test/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageWritePlatformServiceImplTest.java b/fineract-document/src/test/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageWritePlatformServiceImplTest.java index a3c71c2c8a9..3164ed9a522 100644 --- a/fineract-document/src/test/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageWritePlatformServiceImplTest.java +++ b/fineract-document/src/test/java/org/apache/fineract/infrastructure/documentmanagement/service/ImageWritePlatformServiceImplTest.java @@ -6,9 +6,9 @@ * 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 @@ -30,6 +30,7 @@ import java.io.InputStream; import java.util.List; import java.util.Optional; + import org.apache.fineract.infrastructure.contentstore.data.ContentStoreType; import org.apache.fineract.infrastructure.contentstore.detector.ContentDetectorManager; import org.apache.fineract.infrastructure.contentstore.service.ContentStoreService; @@ -85,7 +86,7 @@ void createImageShouldStoreStaffImageUnderStaffDirectory() { when(clientImageIdAdapter.accept(anyString())).thenReturn(false); ImageCreateRequest request = ImageCreateRequest.builder().entityType("STAFF").entityId(entityId).fileName("profile.png") - .type("image/png").stream(new ByteArrayInputStream(new byte[] { 1, 2, 3 })).build(); + .type("image/png").stream(new ByteArrayInputStream(new byte[]{1, 2, 3})).build(); var response = underTest.createImage(request); @@ -103,7 +104,7 @@ void createImageShouldStoreClientImageUnderClientsDirectory() { when(clientImageIdAdapter.set(eq(entityId), anyLong())).thenReturn(Optional.empty()); ImageCreateRequest request = ImageCreateRequest.builder().entityType("CLIENTS").entityId(entityId).fileName("profile.png") - .type("image/png").stream(new ByteArrayInputStream(new byte[] { 1, 2, 3 })).build(); + .type("image/png").stream(new ByteArrayInputStream(new byte[]{1, 2, 3})).build(); var response = underTest.createImage(request); diff --git a/fineract-document/src/test/resources/application-test.properties b/fineract-document/src/test/resources/application-test.properties index 075fd5a536e..ab6f6897493 100644 --- a/fineract-document/src/test/resources/application-test.properties +++ b/fineract-document/src/test/resources/application-test.properties @@ -16,17 +16,13 @@ # specific language governing permissions and limitations # under the License. # - debug=false - fineract.content.regex-whitelist-enabled=true fineract.content.regex-whitelist=.*\\.pdf$,.*\\.doc,.*\\.docx,.*\\.xls,.*\\.xlsx,.*\\.jpg,.*\\.jpeg,.*\\.png fineract.content.mime-whitelist-enabled=true fineract.content.mime-whitelist=application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,image/jpeg,image/png - fineract.content.filesystem.enabled=true fineract.content.filesystem.rootFolder=build/.fineract - fineract.content.s3.enabled=false fineract.content.s3.bucketName= fineract.content.s3.accessKey= diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/api/ApiProperties.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/api/ApiProperties.java index 099288cc6ed..64b0ee1f8e4 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/api/ApiProperties.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/api/ApiProperties.java @@ -6,9 +6,9 @@ * 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 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..f60fd695660 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 @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.api; import java.util.concurrent.TimeUnit; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/config/CacheConfiguration.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/config/CacheConfiguration.java index 6d1fe56bce6..472cb181ca8 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/config/CacheConfiguration.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/config/CacheConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.config; import java.util.List; + import org.springframework.cache.CacheManager; import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.concurrent.ConcurrentMapCache; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/config/TestApplicationConfiguration.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/config/TestApplicationConfiguration.java index d75564c84b2..d7e5d0995bf 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/config/TestApplicationConfiguration.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/config/TestApplicationConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -26,4 +26,5 @@ @Configuration @ComponentScan(value = "org.apache.fineract.test", excludeFilters = @ComponentScan.Filter(type = FilterType.REGEX, pattern = "org\\.apache\\.fineract\\.test\\.initializer.*")) @PropertySource("classpath:fineract-test-application.properties") -public class TestApplicationConfiguration {} +public class TestApplicationConfiguration { +} diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/config/TestDatabaseConfiguration.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/config/TestDatabaseConfiguration.java index 909501b7f76..b82cdc96776 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/config/TestDatabaseConfiguration.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/config/TestDatabaseConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.config; import javax.sql.DataSource; + import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountTypeAssetOptions.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountTypeAssetOptions.java index 45bcf7e5705..ba652513685 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountTypeAssetOptions.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountTypeAssetOptions.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountTypeExpenseOptions.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountTypeExpenseOptions.java index c83adfe10fd..00028e94a6d 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountTypeExpenseOptions.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountTypeExpenseOptions.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountTypeIncomeOptions.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountTypeIncomeOptions.java index 826bcaf4230..5859a49a8ec 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountTypeIncomeOptions.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountTypeIncomeOptions.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountTypeLiabilityOptions.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountTypeLiabilityOptions.java index 9a759bfb53d..4a7976558c1 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountTypeLiabilityOptions.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountTypeLiabilityOptions.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountingRule.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountingRule.java index 8cc7f35e514..8d65bf9e277 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountingRule.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AccountingRule.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AdvancePaymentsAdjustmentType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AdvancePaymentsAdjustmentType.java index 1c73e94d671..a310e316466 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AdvancePaymentsAdjustmentType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AdvancePaymentsAdjustmentType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AmortizationType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AmortizationType.java index fde408ca21f..d2a9c090051 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AmortizationType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AmortizationType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AssetExternalizationErrorMessage.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AssetExternalizationErrorMessage.java index 6baacc0371e..50b68c9cce7 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AssetExternalizationErrorMessage.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AssetExternalizationErrorMessage.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AssetExternalizationTransferStatus.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AssetExternalizationTransferStatus.java index 17a1a99dc56..4c76d02a019 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AssetExternalizationTransferStatus.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AssetExternalizationTransferStatus.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AssetExternalizationTransferStatusReason.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AssetExternalizationTransferStatusReason.java index c67dafa65f5..cf3b15ce6be 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AssetExternalizationTransferStatusReason.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/AssetExternalizationTransferStatusReason.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeCalculationType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeCalculationType.java index cc8236acfb2..9e6707e8dc2 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeCalculationType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeCalculationType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeOffBehaviour.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeOffBehaviour.java index 2caca4ba6d3..acccd1b583c 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeOffBehaviour.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeOffBehaviour.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargePaymentMode.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargePaymentMode.java index cee4856a4c2..48027fbe940 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargePaymentMode.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargePaymentMode.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeProductAppliesTo.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeProductAppliesTo.java index ccfb78823ef..bf4ddfa7c47 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeProductAppliesTo.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeProductAppliesTo.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeProductType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeProductType.java index 11e570e9f7e..7a409909c26 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeProductType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeProductType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeTimeType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeTimeType.java index 5a451c9f4a5..eeabbce2fd1 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeTimeType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ChargeTimeType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/CobBusinessStep.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/CobBusinessStep.java index 37f52c4b7d1..2d8ccf09799 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/CobBusinessStep.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/CobBusinessStep.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/CurrencyOptions.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/CurrencyOptions.java index b75f4cdbbea..59daa23d3a9 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/CurrencyOptions.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/CurrencyOptions.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/DaysInMonthType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/DaysInMonthType.java index d970a9cbb67..25a78a71b32 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/DaysInMonthType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/DaysInMonthType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/DaysInYearType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/DaysInYearType.java index d7d1688327e..57dd3c90365 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/DaysInYearType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/DaysInYearType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/DelinquencyBucket.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/DelinquencyBucket.java index a089092558d..584266c3adb 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/DelinquencyBucket.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/DelinquencyBucket.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/DelinquencyRange.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/DelinquencyRange.java index 7cf1bc2744a..aa48c8eb8da 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/DelinquencyRange.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/DelinquencyRange.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ErrorMessageType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ErrorMessageType.java index bca2508f1a7..e2aa8bf94bf 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ErrorMessageType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/ErrorMessageType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/FundId.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/FundId.java index 405e017a409..3fa15fdb42f 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/FundId.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/FundId.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/GLAType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/GLAType.java index 509fd1efcaf..ef8da7d77c2 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/GLAType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/GLAType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/GLAUsage.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/GLAUsage.java index 99c4981dace..9ea6990d90b 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/GLAUsage.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/GLAUsage.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/InterestCalculationPeriodTime.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/InterestCalculationPeriodTime.java index 6a2bcb9eea6..98b10b297b4 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/InterestCalculationPeriodTime.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/InterestCalculationPeriodTime.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/InterestRateFrequencyType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/InterestRateFrequencyType.java index e8c9992b685..7ce7cbbc138 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/InterestRateFrequencyType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/InterestRateFrequencyType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/InterestRecalculationCompoundingMethod.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/InterestRecalculationCompoundingMethod.java index 94322aa2a8a..807c5472c13 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/InterestRecalculationCompoundingMethod.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/InterestRecalculationCompoundingMethod.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/InterestType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/InterestType.java index 74aea6085d4..f75f2fee00e 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/InterestType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/InterestType.java @@ -6,9 +6,9 @@ * 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 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..d5776fdf3d4 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 @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/LoanStatus.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/LoanStatus.java index c3d2e8c9308..052a8076740 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/LoanStatus.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/LoanStatus.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/LoanTermFrequencyType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/LoanTermFrequencyType.java index 3315d6bf0ba..b2ea91961b8 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/LoanTermFrequencyType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/LoanTermFrequencyType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/OverAppliedCalculationType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/OverAppliedCalculationType.java index faacb302b6f..c84fa434393 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/OverAppliedCalculationType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/OverAppliedCalculationType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/PreClosureInterestCalculationRule.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/PreClosureInterestCalculationRule.java index 8f363ab5e05..d449add2966 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/PreClosureInterestCalculationRule.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/PreClosureInterestCalculationRule.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/RecalculationCompoundingFrequencyType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/RecalculationCompoundingFrequencyType.java index bd1baa6be76..95351b149ac 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/RecalculationCompoundingFrequencyType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/RecalculationCompoundingFrequencyType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/RecalculationRestFrequencyType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/RecalculationRestFrequencyType.java index 9b8846b80a4..cffaa2df3af 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/RecalculationRestFrequencyType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/RecalculationRestFrequencyType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/RepaymentFrequencyType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/RepaymentFrequencyType.java index 1bcf109e417..14105373016 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/RepaymentFrequencyType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/RepaymentFrequencyType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/TransactionProcessingStrategy.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/TransactionProcessingStrategy.java index 566208b1da8..1aeefde6c85 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/TransactionProcessingStrategy.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/TransactionProcessingStrategy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/TransactionProcessingStrategyCode.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/TransactionProcessingStrategyCode.java index 021d82d78c3..3f677a37cec 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/TransactionProcessingStrategyCode.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/TransactionProcessingStrategyCode.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/TransactionType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/TransactionType.java index d2ba126997a..85e5e86bb15 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/TransactionType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/TransactionType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/accounttype/AccountType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/accounttype/AccountType.java index ca77c868b9e..994ed320d8b 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/accounttype/AccountType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/accounttype/AccountType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/accounttype/AccountTypeResolver.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/accounttype/AccountTypeResolver.java index 26dc6cfbb60..f78d9c64645 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/accounttype/AccountTypeResolver.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/accounttype/AccountTypeResolver.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/accounttype/DefaultAccountType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/accounttype/DefaultAccountType.java index 21531ad9737..806fbe19c93 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/accounttype/DefaultAccountType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/accounttype/DefaultAccountType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/codevalue/CodeNames.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/codevalue/CodeNames.java index e10df2afac8..9533e3b47f7 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/codevalue/CodeNames.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/codevalue/CodeNames.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/codevalue/CodeValue.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/codevalue/CodeValue.java index a2b52f25448..78767ce8b49 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/codevalue/CodeValue.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/codevalue/CodeValue.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/codevalue/CodeValueResolver.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/codevalue/CodeValueResolver.java index fdb90f93a05..0793a213e38 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/codevalue/CodeValueResolver.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/codevalue/CodeValueResolver.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/codevalue/DefaultCodeValue.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/codevalue/DefaultCodeValue.java index 29cfe91fae3..8bc1c683526 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/codevalue/DefaultCodeValue.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/codevalue/DefaultCodeValue.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/datatable/DatatableColumnType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/datatable/DatatableColumnType.java index 901d11941be..3d0b2a2a843 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/datatable/DatatableColumnType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/datatable/DatatableColumnType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/datatable/DatatableEntityType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/datatable/DatatableEntityType.java index bf7d6167c3c..614cf588bb0 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/datatable/DatatableEntityType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/datatable/DatatableEntityType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/datatable/DatatableNameGenerator.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/datatable/DatatableNameGenerator.java index 4b565871920..de6bbae3aa6 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/datatable/DatatableNameGenerator.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/datatable/DatatableNameGenerator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.data.datatable; import java.util.Locale; + import org.apache.fineract.test.helper.Utils; import org.springframework.stereotype.Component; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/delinquency/DelinquencyBucketType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/delinquency/DelinquencyBucketType.java index 3495b6ae2c8..e7edde814cf 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/delinquency/DelinquencyBucketType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/delinquency/DelinquencyBucketType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/delinquency/DelinquencyFrequencyType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/delinquency/DelinquencyFrequencyType.java index 5400f60b6df..65687dc27ea 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/delinquency/DelinquencyFrequencyType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/delinquency/DelinquencyFrequencyType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/delinquency/DelinquencyMinimumPayment.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/delinquency/DelinquencyMinimumPayment.java index f7d3331a96f..c7702ccc1d5 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/delinquency/DelinquencyMinimumPayment.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/delinquency/DelinquencyMinimumPayment.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/job/DefaultJob.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/job/DefaultJob.java index 347f3fca3a0..065e0479e74 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/job/DefaultJob.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/job/DefaultJob.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/job/Job.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/job/Job.java index 54cc1fd4e75..68b3708228a 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/job/Job.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/job/Job.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/job/JobResolver.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/job/JobResolver.java index c8095b2da40..22c61448e41 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/job/JobResolver.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/job/JobResolver.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static org.apache.fineract.client.feign.util.FeignCalls.ok; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; 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 6bbe66d4fba..e0f2753b55b 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 @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/LoanProduct.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/LoanProduct.java index 4ffc3541af7..290cf3ed41a 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/LoanProduct.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/LoanProduct.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/LoanProductResolver.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/LoanProductResolver.java index 8c98b2b0b4d..57051ca7c29 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/LoanProductResolver.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/loanproduct/LoanProductResolver.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/paymenttype/DefaultPaymentType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/paymenttype/DefaultPaymentType.java index 17b0c8f3be6..f11d6a1aa48 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/paymenttype/DefaultPaymentType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/paymenttype/DefaultPaymentType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/paymenttype/PaymentType.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/paymenttype/PaymentType.java index 3e24e56d0b4..64d28f86531 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/paymenttype/PaymentType.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/paymenttype/PaymentType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/paymenttype/PaymentTypeResolver.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/paymenttype/PaymentTypeResolver.java index 0b75e696c40..935ce88f09f 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/paymenttype/PaymentTypeResolver.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/paymenttype/PaymentTypeResolver.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/workingcapitalproduct/DefaultWorkingCapitalLoanProduct.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/workingcapitalproduct/DefaultWorkingCapitalLoanProduct.java index 89fbebfb829..d81aabd55bb 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/workingcapitalproduct/DefaultWorkingCapitalLoanProduct.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/workingcapitalproduct/DefaultWorkingCapitalLoanProduct.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/workingcapitalproduct/WorkingCapitalLoanProduct.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/workingcapitalproduct/WorkingCapitalLoanProduct.java index 048139d0edf..aee38d61e73 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/workingcapitalproduct/WorkingCapitalLoanProduct.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/workingcapitalproduct/WorkingCapitalLoanProduct.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/workingcapitalproduct/WorkingCapitalLoanProductResolver.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/workingcapitalproduct/WorkingCapitalLoanProductResolver.java index ac321a8db52..6dc185bf02a 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/workingcapitalproduct/WorkingCapitalLoanProductResolver.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/data/workingcapitalproduct/WorkingCapitalLoanProductResolver.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/ClientRequestFactory.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/ClientRequestFactory.java index d6d85cbfe10..28109cb7f9b 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/ClientRequestFactory.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/ClientRequestFactory.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/GLAccountRequestFactory.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/GLAccountRequestFactory.java index 30016b07eff..1073d2cd41a 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/GLAccountRequestFactory.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/GLAccountRequestFactory.java @@ -6,9 +6,9 @@ * 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 @@ -22,10 +22,11 @@ public final class GLAccountRequestFactory { - private GLAccountRequestFactory() {} + private GLAccountRequestFactory() { + } public static PostGLAccountsRequest defaultGLAccountRequest(String name, String glCode, Integer type, Integer usage, - Boolean manualEntriesAllowed) { + Boolean manualEntriesAllowed) { return new PostGLAccountsRequest().name(name).glCode(glCode).type(type).usage(usage).manualEntriesAllowed(manualEntriesAllowed); } } diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanChargeRequestFactory.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanChargeRequestFactory.java index 975b77db4fa..4f19cf615a3 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanChargeRequestFactory.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanChargeRequestFactory.java @@ -6,9 +6,9 @@ * 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 @@ -28,7 +28,8 @@ public final class LoanChargeRequestFactory { public static final Long DEFAULT_CHARGE_ID = 1L; public static final double DEFAULT_CHARGE_AMOUNT = 1; - private LoanChargeRequestFactory() {} + private LoanChargeRequestFactory() { + } public static PostLoansLoanIdChargesRequest defaultLoanChargeRequest() { return new PostLoansLoanIdChargesRequest().chargeId(DEFAULT_CHARGE_ID).amount(DEFAULT_CHARGE_AMOUNT).locale(DEFAULT_LOCALE) 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 ba11f3a75b0..ad62dce57aa 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 @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.client.models.AllowAttributeOverrides; import org.apache.fineract.client.models.GetLoanPaymentChannelToFundSourceMappings; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanRequestFactory.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanRequestFactory.java index f3c2d4385e8..515edcf78fd 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanRequestFactory.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanRequestFactory.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.client.models.DisbursementDetail; import org.apache.fineract.client.models.InterestPauseRequestDto; @@ -120,7 +121,7 @@ public PostLoansRequest defaultLoansRequest(Long clientId) { .transactionProcessingStrategyCode(DEFAULT_TRANSACTION_PROCESSING_STRATEGY_CODE)// .dateFormat(DATE_FORMAT)// .graceOnArrearsAgeing(3)// - ; + ; } public PostLoansRequest defaultProgressiveLoansRequest(final Long clientId) { diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/SavingsAccountRequestFactory.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/SavingsAccountRequestFactory.java index a858401fcc4..b720292c2fe 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/SavingsAccountRequestFactory.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/SavingsAccountRequestFactory.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.factory; import java.math.BigDecimal; + import org.apache.fineract.client.models.PostSavingsAccountTransactionsRequest; import org.apache.fineract.client.models.PostSavingsAccountsAccountIdRequest; import org.apache.fineract.client.models.PostSavingsAccountsRequest; @@ -37,7 +38,8 @@ public final class SavingsAccountRequestFactory { public static final Long EUR_SAVING_PRODUCT_ID = 1L; public static final Long USD_SAVING_PRODUCT_ID = 2L; - private SavingsAccountRequestFactory() {} + private SavingsAccountRequestFactory() { + } public static PostSavingsAccountsRequest defaultEURSavingsAccountRequest() { return new PostSavingsAccountsRequest()// diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/WorkingCapitalLoanRequestFactory.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/WorkingCapitalLoanRequestFactory.java index d24582de4fc..17bc3dcf3b8 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/WorkingCapitalLoanRequestFactory.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/WorkingCapitalLoanRequestFactory.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.format.DateTimeFormatter; + import lombok.RequiredArgsConstructor; import org.apache.fineract.client.models.PostWorkingCapitalLoansDelinquencyActionRequest; import org.apache.fineract.client.models.PostWorkingCapitalLoansLoanIdRequest; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/BusinessDateHelper.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/BusinessDateHelper.java index e81dacd9062..9c3051785e0 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/BusinessDateHelper.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/BusinessDateHelper.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.format.DateTimeFormatter; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/CodeHelper.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/CodeHelper.java index 4b0dcdac460..b5f39850997 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/CodeHelper.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/CodeHelper.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static org.apache.fineract.client.feign.util.FeignCalls.ok; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.models.GetCodesResponse; 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 fcdec85eefe..b8e2488d32f 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 @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.List; import java.util.Set; import java.util.stream.Collectors; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.client.models.BatchResponse; import org.apache.fineract.client.models.Header; @@ -35,7 +36,8 @@ public final class ErrorMessageHelper { public static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("dd MMMM yyyy"); - private ErrorMessageHelper() {} + private ErrorMessageHelper() { + } public static String requestFailed(Response response) throws IOException { return String.format("Request failed. Error:%n%s", response.errorBody() != null ? response.errorBody().string() : null); @@ -467,18 +469,18 @@ public static String wrongNumberOfLinesInRepaymentSchedule(String resourceId, in } public static String wrongValueInLineInRepaymentSchedule(String resourceId, int line, List> actualList, - List expected) { + List expected) { String actual = actualList.stream().map(Object::toString).collect(Collectors.joining(System.lineSeparator())); return String.format("%nWrong value in Repayment schedule of resource %s tab line %s." // - + "%nActual values in line (with the same due date) are: %n%s - %nBut expected values in line: %n%s", resourceId, line, + + "%nActual values in line (with the same due date) are: %n%s - %nBut expected values in line: %n%s", resourceId, line, actual, expected); } public static String wrongValueInLineInTransactionsTab(String resourceId, int line, List> actualList, - List expected) { + List expected) { String actual = actualList.stream().map(Object::toString).collect(Collectors.joining(System.lineSeparator())); return String.format("%nWrong value in Transactions tab of resource %s line %s." // - + "%nActual values in line (with the same date) are: %n%s %nExpected values in line: %n%s", resourceId, line, actual, + + "%nActual values in line (with the same date) are: %n%s %nExpected values in line: %n%s", resourceId, line, actual, expected); } @@ -488,7 +490,7 @@ public static String nrOfLinesWrongInTransactionsTab(String resourceId, int actu } public static String wrongValueInLineInRescheduleTab(String resourceId, int line, List> actualList, - List expected) { + List expected) { String actual = actualList.stream().map(Object::toString).collect(Collectors.joining(System.lineSeparator())); return String.format("%nWrong value in Reschedule tab of resource %s line %s." // + "%nActual values in line are: %n%s %nExpected values in line: %n%s", resourceId, line, actual, expected); @@ -502,7 +504,7 @@ public static String nrOfLinesWrongInRescheduleTab(String resourceId, int actual public static String wrongValueInLineInChargesTab(String resourceId, int line, List> actualList, List expected) { String actual = actualList.stream().map(Object::toString).collect(Collectors.joining(System.lineSeparator())); return String.format("%nWrong value in Charges tab of resource %s line %s." // - + "%nActual values in line (with the same date) are: %n%s %nExpected values in line: %n%s", resourceId, line, actual, + + "%nActual values in line (with the same date) are: %n%s %nExpected values in line: %n%s", resourceId, line, actual, expected); } @@ -511,17 +513,17 @@ public static String wrongValueInLineInJournalEntries(int line, List>> actualList, - List expected) { + List expected) { String actual = actualList.stream().map(Object::toString).collect(Collectors.joining(System.lineSeparator())); return String.format("%nWrong value in Journal entries of resource %s line %s." // - + "%nActual values for the possible transactions in line (with the same date) are: %n%s %nExpected values in line: %n%s", + + "%nActual values for the possible transactions in line (with the same date) are: %n%s %nExpected values in line: %n%s", resourceId, line, actual, expected); } public static String wrongValueInLineInJournalEntry(String resourceId, int line, List> actualList, List expected) { String actual = actualList.stream().map(Object::toString).collect(Collectors.joining(System.lineSeparator())); return String.format("%nWrong value in Journal entries of resource %s line %s." // - + "%nActual values for the possible transactions in line (with the same date) are: %n%s %nExpected values in line: %n%s", + + "%nActual values for the possible transactions in line (with the same date) are: %n%s %nExpected values in line: %n%s", resourceId, line, actual, expected); } @@ -879,7 +881,7 @@ public static String downpaymentDisabledOnProductErrorCodeMsg() { } public static String wrongValueInLineInChargeOffReasonOptions(final int line, final List> actual, - final List expected) { + final List expected) { final String actualValues = actual.stream().map(List::toString).collect(Collectors.joining(System.lineSeparator())); return String.format( @@ -902,16 +904,16 @@ public static String wrongValueInTotalPages(Integer actual, Integer expected) { } public static String wrongValueInLineInDisbursementDetailsTab(String resourceId, int line, Set> actualList, - List expected) { + List expected) { String actual = actualList.stream().map(Object::toString).collect(Collectors.joining(System.lineSeparator())); return String.format("%nWrong value in Loan Tranche Details tab of resource %s line %s." // - + "%nActual values in line (with the same date) are: %n%s %nExpected values in line: %n%s", resourceId, line, actual, + + "%nActual values in line (with the same date) are: %n%s %nExpected values in line: %n%s", resourceId, line, actual, expected); } public static String nrOfLinesWrongInLoanTrancheDetailsTab(String resourceId, int actual, int expected) { return String.format("%nNumber of lines does not match in Loan Tranche Details tab and expected datatable of resource %s." // - + "%nNumber of disbursement details tab lines: %s %nNumber of expected datatable lines: %s%n", resourceId, actual, + + "%nNumber of disbursement details tab lines: %s %nNumber of expected datatable lines: %s%n", resourceId, actual, expected); } @@ -956,10 +958,10 @@ public static String updateAvailableDisbursementLoanCannotBeZeroAsNothingWasDisb } public static String wrongValueInLineInBuyDownFeeTab(String resourceId, int line, List> actualList, - List expected) { + List expected) { String actual = actualList.stream().map(Object::toString).collect(Collectors.joining(System.lineSeparator())); return String.format("%nWrong value in Buy Down Fee tab of resource %s line %s." // - + "%nActual values in line (with the same date) are: %n%s %nExpected values in line: %n%s", resourceId, line, actual, + + "%nActual values in line (with the same date) are: %n%s %nExpected values in line: %n%s", resourceId, line, actual, expected); } @@ -969,10 +971,10 @@ public static String nrOfLinesWrongInBuyDownFeeTab(String resourceId, int actual } public static String wrongValueInLineInDeferredIncomeTab(String resourceId, int line, List> actualList, - List expected) { + List expected) { String actual = actualList.stream().map(Object::toString).collect(Collectors.joining(System.lineSeparator())); return String.format("%nWrong value in Deferred Income tab of resource %s line %s." // - + "%nActual values in line (with the same date) are: %n%s %nExpected values in line: %n%s", resourceId, line, actual, + + "%nActual values in line (with the same date) are: %n%s %nExpected values in line: %n%s", resourceId, line, actual, expected); } diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/ErrorResponse.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/ErrorResponse.java index cbac529b4c3..18045ef75cd 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/ErrorResponse.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/ErrorResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,8 +20,10 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; + import java.io.IOException; import java.util.List; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/GlobalConfigurationHelper.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/GlobalConfigurationHelper.java index 2ca73cfc3c5..a3cad71d612 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/GlobalConfigurationHelper.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/GlobalConfigurationHelper.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import static org.assertj.core.api.Assertions.assertThat; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.BooleanUtils; import org.apache.fineract.client.feign.FineractFeignClient; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/Utils.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/Utils.java index 5da2b2e0732..6fb7eba2aec 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/Utils.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/Utils.java @@ -6,9 +6,9 @@ * 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 @@ -44,7 +44,8 @@ public final class Utils { "Sanchez", "Scott", "Smith", "Stewart", "Taylor", "Thomas", "Thompson", "Torres", "Turner", "Walker", "Ward", "Watson", "White", "Williams", "Wilson", "Wood", "Wright", "Young", "Zhang"); - private Utils() {} + private Utils() { + } public static String randomStringGenerator(final String prefix, final int len, final String sourceSetString) { final int lengthOfSource = sourceSetString.length(); diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/WorkFlowJobHelper.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/WorkFlowJobHelper.java index 94c27c39fc2..5fb55c0db4b 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/WorkFlowJobHelper.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/WorkFlowJobHelper.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/WorkingCapitalLoanTestHelper.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/WorkingCapitalLoanTestHelper.java index 9d09b050850..af89988b7e4 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/WorkingCapitalLoanTestHelper.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/helper/WorkingCapitalLoanTestHelper.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.time.ZoneOffset; import java.util.Objects; import java.util.UUID; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.test.data.LoanStatus; import org.springframework.jdbc.core.JdbcTemplate; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/FineractInitializerConfiguration.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/FineractInitializerConfiguration.java index 71e3d247d73..90dacd44318 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/FineractInitializerConfiguration.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/FineractInitializerConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,8 @@ import org.springframework.context.annotation.Configuration; @Configuration -@ComponentScan({ "org.apache.fineract.test.initializer.global", "org.apache.fineract.test.initializer.scenario", - "org.apache.fineract.test.initializer.suite", "org.apache.fineract.test.factory", "org.apache.fineract.test.data" }) +@ComponentScan({"org.apache.fineract.test.initializer.global", "org.apache.fineract.test.initializer.scenario", + "org.apache.fineract.test.initializer.suite", "org.apache.fineract.test.factory", "org.apache.fineract.test.data"}) public class FineractInitializerConfiguration { } diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/FineractInitializerFactory.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/FineractInitializerFactory.java index d07cb8cce49..d41fca4338f 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/FineractInitializerFactory.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/FineractInitializerFactory.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.initializer; import java.util.Set; + import org.apache.fineract.test.initializer.base.FineractInitializer; import org.apache.fineract.test.support.loader.FineractConfigLoader; import org.springframework.context.ApplicationContext; @@ -26,11 +27,13 @@ public final class FineractInitializerFactory { - private FineractInitializerFactory() {} + private FineractInitializerFactory() { + } private static final class Holder { - private Holder() {} + private Holder() { + } static final FineractInitializer INSTANCE; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/InitializerProperties.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/InitializerProperties.java index 1eca9a1b2d8..3c1dd0aa7b4 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/InitializerProperties.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/InitializerProperties.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/base/BaseFineractInitializerConfiguration.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/base/BaseFineractInitializerConfiguration.java index e97fd26afc5..80bd9529a3a 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/base/BaseFineractInitializerConfiguration.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/base/BaseFineractInitializerConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.initializer.base; import java.util.List; + import org.apache.fineract.test.config.CacheConfiguration; import org.apache.fineract.test.config.TestDatabaseConfiguration; import org.apache.fineract.test.initializer.global.FineractGlobalInitializerStep; @@ -31,14 +32,14 @@ import org.springframework.context.annotation.PropertySource; @Configuration -@ComponentScan({ "org.apache.fineract.test.api", "org.apache.fineract.test.helper" }) +@ComponentScan({"org.apache.fineract.test.api", "org.apache.fineract.test.helper"}) @PropertySource("classpath:fineract-test-application.properties") -@Import({ CacheConfiguration.class, TestDatabaseConfiguration.class }) +@Import({CacheConfiguration.class, TestDatabaseConfiguration.class}) public class BaseFineractInitializerConfiguration { @Bean public FineractInitializer fineractInitializer(List globalInitializerSteps, - List suiteInitializerSteps, List scenarioInitializerSteps) { + List suiteInitializerSteps, List scenarioInitializerSteps) { return new FineractInitializer(globalInitializerSteps, suiteInitializerSteps, scenarioInitializerSteps); } } diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/base/FineractInitializer.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/base/FineractInitializer.java index 13d16d9127c..5274fd2d9bb 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/base/FineractInitializer.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/base/FineractInitializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.test.initializer.global.FineractGlobalInitializerStep; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/FineractGlobalInitializerStep.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/FineractGlobalInitializerStep.java index ef3d26d4d67..8218243c0f9 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/FineractGlobalInitializerStep.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/FineractGlobalInitializerStep.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/scenario/FineractScenarioInitializerStep.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/scenario/FineractScenarioInitializerStep.java index c033b2a032e..2969246f7e3 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/scenario/FineractScenarioInitializerStep.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/scenario/FineractScenarioInitializerStep.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/suite/FineractSuiteInitializerStep.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/suite/FineractSuiteInitializerStep.java index 9b982cb4c94..40ea42b03dc 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/suite/FineractSuiteInitializerStep.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/suite/FineractSuiteInitializerStep.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/EmptyEventMessage.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/EmptyEventMessage.java index 22601e78f74..dbf59792abe 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/EmptyEventMessage.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/EmptyEventMessage.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/EventAssertion.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/EventAssertion.java index 595abb2da53..9a8afa26c28 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/EventAssertion.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/EventAssertion.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.time.LocalDate; import java.util.function.Function; import java.util.function.Predicate; + import lombok.AccessLevel; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/EventMessage.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/EventMessage.java index 85939f1a9e6..4d68935c6fc 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/EventMessage.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/EventMessage.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.messaging; import java.time.LocalDate; + import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/EventProperties.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/EventProperties.java index dcb5e0ef934..da0f7e7063d 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/EventProperties.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/EventProperties.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/EventVerificationEnabledCondition.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/EventVerificationEnabledCondition.java index 8b14ed2e8d7..a73e65a39db 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/EventVerificationEnabledCondition.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/EventVerificationEnabledCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/JobPollingProperties.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/JobPollingProperties.java index 7f4cc9396c0..649b40205bb 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/JobPollingProperties.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/JobPollingProperties.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/MessagingConfiguration.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/MessagingConfiguration.java index f6dacc95f09..be3837b9b3f 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/MessagingConfiguration.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/config/MessagingConfiguration.java @@ -6,9 +6,9 @@ * 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 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..bcd7a42c54d 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 @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/Event.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/Event.java index a7216543e1e..506c757dc8f 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/Event.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/Event.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/EventCheckHelper.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/EventCheckHelper.java index ba88693077f..7bcc8d827a4 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/EventCheckHelper.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/EventCheckHelper.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import java.time.format.DateTimeFormatter; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.avro.client.v1.ClientDataV1; @@ -232,7 +233,7 @@ private void loanAccountDataV1Check(Class eventClaz } public GetLoansLoanIdTransactions getNthTransactionType(String nthItemStr, String transactionType, String transactionDate, - List transactions) { + List transactions) { DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATE_FORMAT); int nthItem = Integer.parseInt(nthItemStr) - 1; GetLoansLoanIdTransactions targetTransaction = transactions// @@ -386,7 +387,8 @@ public EventAssertion.EventAssertionBuilder transactionEv case REFUND_BY_CASH -> LoanRefundPostBusinessEvent.class; case INTEREST_PAYMENT_WAIVER -> LoanTransactionInterestPaymentWaiverPostEvent.class; case INTEREST_REFUND -> LoanTransactionInterestRefundPostEvent.class; - default -> throw new IllegalStateException(String.format("transaction type %s cannot be found", transactionType.getValue())); + default -> + throw new IllegalStateException(String.format("transaction type %s cannot be found", transactionType.getValue())); }; EventAssertion.EventAssertionBuilder eventBuilder = eventAssertion.assertEvent(eventClass, transactionId); @@ -429,7 +431,7 @@ public void loanOwnershipTransferBusinessEventCheck(Long loanId, Long transferId } public void loanOwnershipTransferBusinessEventWithStatusCheck(Long loanId, Long transferId, String transferStatus, - String transferStatusReason) { + String transferStatusReason) { PageExternalTransferData response = ok(() -> fineractClient.externalAssetOwners().getTransfers(Map.of("loanId", loanId))); List content = response.getContent(); @@ -475,7 +477,7 @@ public void loanOwnershipTransferBusinessEventWithStatusCheck(Long loanId, Long } public void loanOwnershipTransferBusinessEventWithTypeCheck(Long loanId, ExternalTransferData transferData, String transferType, - String previousAssetOwner) { + String previousAssetOwner) { PageExternalTransferData response = ok(() -> fineractClient.externalAssetOwners().getTransfers(Map.of("loanId", loanId))); List content = response.getContent(); Long transferId = transferData.getTransferId(); diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/EventFactory.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/EventFactory.java index 7f0d9763cd8..db8ccf04335 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/EventFactory.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/EventFactory.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.messaging.event; import java.lang.reflect.Constructor; + import org.springframework.stereotype.Component; import org.springframework.util.ReflectionUtils; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/assetexternalization/AbstractLoanOwnershipTransferEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/assetexternalization/AbstractLoanOwnershipTransferEvent.java index f165222c03b..f284db5a130 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/assetexternalization/AbstractLoanOwnershipTransferEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/assetexternalization/AbstractLoanOwnershipTransferEvent.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.messaging.event.assetexternalization; import java.util.function.Function; + import org.apache.fineract.avro.loan.v1.LoanOwnershipTransferDataV1; import org.apache.fineract.test.messaging.event.Event; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/assetexternalization/LoanAccountCustomSnapshotEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/assetexternalization/LoanAccountCustomSnapshotEvent.java index d4fe08f4a45..83c8263384f 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/assetexternalization/LoanAccountCustomSnapshotEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/assetexternalization/LoanAccountCustomSnapshotEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/assetexternalization/LoanAccountSnapshotEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/assetexternalization/LoanAccountSnapshotEvent.java index 379e147c8fd..0c7ece491e8 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/assetexternalization/LoanAccountSnapshotEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/assetexternalization/LoanAccountSnapshotEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/assetexternalization/LoanOwnershipTransferEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/assetexternalization/LoanOwnershipTransferEvent.java index 475fd0d7dbc..836144c4951 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/assetexternalization/LoanOwnershipTransferEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/assetexternalization/LoanOwnershipTransferEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/client/AbstractClientEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/client/AbstractClientEvent.java index e7e7b1b597c..f25b2e5dcce 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/client/AbstractClientEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/client/AbstractClientEvent.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.messaging.event.client; import java.util.function.Function; + import org.apache.fineract.avro.client.v1.ClientDataV1; import org.apache.fineract.test.messaging.event.Event; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/client/ClientActivatedEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/client/ClientActivatedEvent.java index ca6918343dd..c8401b24519 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/client/ClientActivatedEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/client/ClientActivatedEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/client/ClientCreatedEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/client/ClientCreatedEvent.java index 563722d12a2..52dd6c8b345 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/client/ClientCreatedEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/client/ClientCreatedEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/AbstractLoanEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/AbstractLoanEvent.java index e691d5345ca..c35c824e9c6 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/AbstractLoanEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/AbstractLoanEvent.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.messaging.event.loan; import java.util.function.Function; + import org.apache.fineract.avro.loan.v1.LoanAccountDataV1; import org.apache.fineract.test.messaging.event.Event; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanApprovedEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanApprovedEvent.java index a1252f3382a..6c21a60bc8b 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanApprovedEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanApprovedEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanBalanceChangedEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanBalanceChangedEvent.java index 6465cb7b798..48f945090dd 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanBalanceChangedEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanBalanceChangedEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanCreatedEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanCreatedEvent.java index 025bf2861a8..edb75ab5409 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanCreatedEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanCreatedEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanDisbursalEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanDisbursalEvent.java index e63ad1a5b0c..9d404eb55eb 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanDisbursalEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanDisbursalEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanReAgeEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanReAgeEvent.java index 452a1cece0a..44942268b04 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanReAgeEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanReAgeEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanReAmortizeEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanReAmortizeEvent.java index ea8d217b6c4..9a55506ba39 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanReAmortizeEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanReAmortizeEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanRejectedEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanRejectedEvent.java index 1c66b54d9ee..513f713a622 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanRejectedEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanRejectedEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanRescheduledDueAdjustScheduleEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanRescheduledDueAdjustScheduleEvent.java index e4876647f74..31645cbe41f 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanRescheduledDueAdjustScheduleEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanRescheduledDueAdjustScheduleEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanScheduleVariationsAddedEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanScheduleVariationsAddedEvent.java index dc62072f413..a7092f6916a 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanScheduleVariationsAddedEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanScheduleVariationsAddedEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanScheduleVariationsDeletedEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanScheduleVariationsDeletedEvent.java index 923ab17d265..f6fc71f75f9 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanScheduleVariationsDeletedEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanScheduleVariationsDeletedEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanStatusChangedEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanStatusChangedEvent.java index 9685e1195ec..73330298352 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanStatusChangedEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanStatusChangedEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanUndoApprovalEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanUndoApprovalEvent.java index fbbf04c7043..73e401938ff 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanUndoApprovalEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/LoanUndoApprovalEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/charge/AbstractLoanChargeEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/charge/AbstractLoanChargeEvent.java index 3b334acda6a..b72838402ad 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/charge/AbstractLoanChargeEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/charge/AbstractLoanChargeEvent.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.messaging.event.loan.charge; import java.util.function.Function; + import org.apache.fineract.avro.loan.v1.LoanChargeDataV1; import org.apache.fineract.test.messaging.event.Event; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/charge/LoanAddChargeEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/charge/LoanAddChargeEvent.java index 96e81e3cb14..a07b6cf1552 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/charge/LoanAddChargeEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/charge/LoanAddChargeEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/delinquency/AbstractLoanDelinquencyRangeChangeEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/delinquency/AbstractLoanDelinquencyRangeChangeEvent.java index cff5b97b485..640d1dbed17 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/delinquency/AbstractLoanDelinquencyRangeChangeEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/delinquency/AbstractLoanDelinquencyRangeChangeEvent.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.messaging.event.loan.delinquency; import java.util.function.Function; + import org.apache.fineract.avro.loan.v1.LoanAccountDelinquencyRangeDataV1; import org.apache.fineract.test.messaging.event.Event; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/delinquency/LoanDelinquencyPauseChangedEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/delinquency/LoanDelinquencyPauseChangedEvent.java index ed25cba148f..8f504872e0a 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/delinquency/LoanDelinquencyPauseChangedEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/delinquency/LoanDelinquencyPauseChangedEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/delinquency/LoanDelinquencyRangeChangeEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/delinquency/LoanDelinquencyRangeChangeEvent.java index 1ea205accbf..8ebed16f5b2 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/delinquency/LoanDelinquencyRangeChangeEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/delinquency/LoanDelinquencyRangeChangeEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/repayment/AbstractLoanRepaymentDueEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/repayment/AbstractLoanRepaymentDueEvent.java index 81df01d4d3f..73f1bb489aa 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/repayment/AbstractLoanRepaymentDueEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/repayment/AbstractLoanRepaymentDueEvent.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.messaging.event.loan.repayment; import java.util.function.Function; + import org.apache.fineract.avro.loan.v1.LoanRepaymentDueDataV1; import org.apache.fineract.test.messaging.event.Event; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/repayment/LoanRepaymentDueEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/repayment/LoanRepaymentDueEvent.java index 085ae8dbc8c..bfa6655b3e8 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/repayment/LoanRepaymentDueEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/repayment/LoanRepaymentDueEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/repayment/LoanRepaymentOverdueEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/repayment/LoanRepaymentOverdueEvent.java index 5c5199b08ca..d90feae4503 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/repayment/LoanRepaymentOverdueEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/repayment/LoanRepaymentOverdueEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/AbstractLoanTransactionEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/AbstractLoanTransactionEvent.java index 3fe0ee9f232..424eea1162a 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/AbstractLoanTransactionEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/AbstractLoanTransactionEvent.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.messaging.event.loan.transaction; import java.util.function.Function; + import org.apache.fineract.avro.loan.v1.LoanTransactionDataV1; import org.apache.fineract.test.messaging.event.Event; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/BulkBusinessEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/BulkBusinessEvent.java index fa01be293ac..4a60a955f63 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/BulkBusinessEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/BulkBusinessEvent.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ package org.apache.fineract.test.messaging.event.loan.transaction; import java.util.function.Function; + import org.apache.fineract.avro.BulkMessagePayloadV1; import org.apache.fineract.test.messaging.event.Event; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanAccrualAdjustmentTransactionBusinessEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanAccrualAdjustmentTransactionBusinessEvent.java index 1aecbcbf942..b9e811ffa34 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanAccrualAdjustmentTransactionBusinessEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanAccrualAdjustmentTransactionBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanAccrualTransactionCreatedBusinessEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanAccrualTransactionCreatedBusinessEvent.java index 96370c16b30..bb2cf1dcf38 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanAccrualTransactionCreatedBusinessEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanAccrualTransactionCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanAdjustTransactionBusinessEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanAdjustTransactionBusinessEvent.java index 70841581cff..3de7f94d946 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanAdjustTransactionBusinessEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanAdjustTransactionBusinessEvent.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.messaging.event.loan.transaction; import java.util.function.Function; + import org.apache.fineract.avro.loan.v1.LoanTransactionAdjustmentDataV1; import org.apache.fineract.test.messaging.event.Event; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanBuyDownFeeAdjustmentTransactionCreatedBusinessEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanBuyDownFeeAdjustmentTransactionCreatedBusinessEvent.java index 92bae44f24e..3856cc7604b 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanBuyDownFeeAdjustmentTransactionCreatedBusinessEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanBuyDownFeeAdjustmentTransactionCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanBuyDownFeeAmortizationAdjustmentTransactionCreatedBusinessEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanBuyDownFeeAmortizationAdjustmentTransactionCreatedBusinessEvent.java index dfed30912cf..b38a2891bfc 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanBuyDownFeeAmortizationAdjustmentTransactionCreatedBusinessEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanBuyDownFeeAmortizationAdjustmentTransactionCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanBuyDownFeeAmortizationTransactionCreatedBusinessEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanBuyDownFeeAmortizationTransactionCreatedBusinessEvent.java index 0f589000236..c073845ce5b 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanBuyDownFeeAmortizationTransactionCreatedBusinessEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanBuyDownFeeAmortizationTransactionCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanBuyDownFeeTransactionCreatedBusinessEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanBuyDownFeeTransactionCreatedBusinessEvent.java index 37dd54388e9..4cdda304182 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanBuyDownFeeTransactionCreatedBusinessEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanBuyDownFeeTransactionCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeAdjustmentTransactionCreatedBusinessEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeAdjustmentTransactionCreatedBusinessEvent.java index 6bbc797e0e6..3fe0f0e9382 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeAdjustmentTransactionCreatedBusinessEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeAdjustmentTransactionCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeAmortizationAdjustmentTransactionCreatedBusinessEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeAmortizationAdjustmentTransactionCreatedBusinessEvent.java index 3d0cb4669fd..c04c3a99f62 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeAmortizationAdjustmentTransactionCreatedBusinessEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeAmortizationAdjustmentTransactionCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent.java index ad0c08b1382..f736476b14d 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeAmortizationTransactionCreatedEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeAmortizationTransactionCreatedEvent.java index a31de14a4ec..b5760b3db30 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeAmortizationTransactionCreatedEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeAmortizationTransactionCreatedEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeTransactionCreatedBusinessEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeTransactionCreatedBusinessEvent.java index 7aaf0fd9c7e..e93a8c96425 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeTransactionCreatedBusinessEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanCapitalizedIncomeTransactionCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanChargeAdjustmentPostBusinessEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanChargeAdjustmentPostBusinessEvent.java index 57df12c0003..efc650f782b 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanChargeAdjustmentPostBusinessEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanChargeAdjustmentPostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanChargeOffEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanChargeOffEvent.java index 0c840ffaf8b..a90b2adc5b6 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanChargeOffEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanChargeOffEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanChargeOffUndoEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanChargeOffUndoEvent.java index e2534a8917c..1fc0efbb67b 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanChargeOffUndoEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanChargeOffUndoEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanChargebackTransactionEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanChargebackTransactionEvent.java index 4e19f1ea754..26e3b1bcf4a 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanChargebackTransactionEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanChargebackTransactionEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanDisbursalTransactionEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanDisbursalTransactionEvent.java index bdc392b920b..14a318a0443 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanDisbursalTransactionEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanDisbursalTransactionEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanReAgeTransactionEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanReAgeTransactionEvent.java index 0dfa67a61f4..be907ee319c 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanReAgeTransactionEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanReAgeTransactionEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanRefundPostBusinessEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanRefundPostBusinessEvent.java index 76bb6d65a8f..40d29f75e4c 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanRefundPostBusinessEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanRefundPostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionAccrualActivityPostEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionAccrualActivityPostEvent.java index 71aaa2c857d..323bd737302 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionAccrualActivityPostEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionAccrualActivityPostEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionContractTerminationPostBusinessEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionContractTerminationPostBusinessEvent.java index e9bc50d133e..3c750df27ec 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionContractTerminationPostBusinessEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionContractTerminationPostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionGoodwillCreditPostEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionGoodwillCreditPostEvent.java index e8dd8aeb2c5..12c94aa938f 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionGoodwillCreditPostEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionGoodwillCreditPostEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionInterestPaymentWaiverPostEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionInterestPaymentWaiverPostEvent.java index 38145b5f2f3..3f6050a51e1 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionInterestPaymentWaiverPostEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionInterestPaymentWaiverPostEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionInterestRefundPostEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionInterestRefundPostEvent.java index 8be3a75e6d8..3e2ae87febb 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionInterestRefundPostEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionInterestRefundPostEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionMakeRepaymentPostEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionMakeRepaymentPostEvent.java index f53cd435ade..fae4212c7a4 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionMakeRepaymentPostEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionMakeRepaymentPostEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionMerchantIssuedRefundPostEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionMerchantIssuedRefundPostEvent.java index 632b206edcf..8f233c7d4e8 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionMerchantIssuedRefundPostEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionMerchantIssuedRefundPostEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionPayoutRefundPostEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionPayoutRefundPostEvent.java index 1c9b1cd89eb..8662fe3fb78 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionPayoutRefundPostEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanTransactionPayoutRefundPostEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanUndoContractTerminationBusinessEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanUndoContractTerminationBusinessEvent.java index bf358244267..ba63ee513c7 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanUndoContractTerminationBusinessEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/event/loan/transaction/LoanUndoContractTerminationBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/store/EventStore.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/store/EventStore.java index 5462d03f0ce..28c8b05442e 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/store/EventStore.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/store/EventStore.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import java.util.Optional; import java.util.concurrent.CopyOnWriteArrayList; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.avro.BulkMessageItemV1; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/store/LoggedEvent.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/store/LoggedEvent.java index dc32560cd02..15807b1599f 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/store/LoggedEvent.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/store/LoggedEvent.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.messaging.store; import java.time.format.DateTimeFormatter; + import org.apache.fineract.test.messaging.EventMessage; public class LoggedEvent { diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/store/MessageConsumer.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/store/MessageConsumer.java index 8f67d43db59..6898b4e29f3 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/store/MessageConsumer.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/messaging/store/MessageConsumer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/service/JobService.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/service/JobService.java index 33a68d3eb87..7453d57ea77 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/service/JobService.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/service/JobService.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.time.Duration; import java.util.HashMap; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.BooleanUtils; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/AbstractStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/AbstractStepDef.java index 61a52a9b4e6..691f1cfedce 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/AbstractStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/AbstractStepDef.java @@ -6,9 +6,9 @@ * 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 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 ce72cb67c0b..470892971b9 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 @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import io.cucumber.datatable.DataTable; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.io.IOException; import java.math.RoundingMode; import java.time.format.DateTimeFormatter; @@ -32,6 +33,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.feign.services.ExternalAssetOwnerLoanProductAttributesApi; @@ -326,13 +328,13 @@ public void checkGeneratedTransferExternalId() throws IOException { content.forEach(e -> { assertThat(e.getTransferExternalId()).as(ErrorMessageHelper - .wrongDataInAssetExternalizationTransferExternalId(e.getTransferExternalId(), transferExternalIdExpected)) + .wrongDataInAssetExternalizationTransferExternalId(e.getTransferExternalId(), transferExternalIdExpected)) .isEqualTo(transferExternalIdExpected); }); } private void checkExternalAssetDetails(Long loanId, String loanExternalId, PageExternalTransferData response, int numberOfElements, - DataTable table) { + DataTable table) { Integer numberOfElementsActual = response.getNumberOfElements(); List content = response.getContent(); @@ -364,7 +366,7 @@ private void checkExternalAssetDetails(Long loanId, String loanExternalId, PageE } else { // in case transfer has previous intermediarySale or owner-to-owner transfer if (transactionType.equalsIgnoreCase(TRANSACTION_TYPE_SALE) && (status.equals(ExternalTransferData.StatusEnum.ACTIVE.getValue()) - || status.equals(ExternalTransferData.StatusEnum.PENDING.getValue()))) { + || status.equals(ExternalTransferData.StatusEnum.PENDING.getValue()))) { ownerExternalId = ownerExternalIdStored; previousAssetOwner = intermediarySaleAssetOwner; transferExternalId = testContext().get(TestContextKey.ASSET_EXTERNALIZATION_SALES_TRANSFER_EXTERNAL_ID_FROM_RESPONSE); @@ -377,7 +379,7 @@ private void checkExternalAssetDetails(Long loanId, String loanExternalId, PageE transferExternalId = testContext().get(TestContextKey.ASSET_EXTERNALIZATION_SALES_TRANSFER_EXTERNAL_ID_FROM_RESPONSE); } else if (transactionType.equalsIgnoreCase(TRANSACTION_TYPE_BUYBACK) && (status.equals(ExternalTransferData.StatusEnum.BUYBACK.getValue()) - || status.equals(ExternalTransferData.StatusEnum.BUYBACK_INTERMEDIATE.getValue()))) { + || status.equals(ExternalTransferData.StatusEnum.BUYBACK_INTERMEDIATE.getValue()))) { ownerExternalId = ownerExternalIdStored; previousAssetOwner = ownerExternalIdStored; transferExternalId = testContext().get(TestContextKey.ASSET_EXTERNALIZATION_BUYBACK_TRANSFER_EXTERNAL_ID_FROM_RESPONSE); @@ -827,7 +829,7 @@ public void checkAssetExternalizationDetailsByLoanIdIgnoreTransactionExternalId( } private void checkExternalAssetDetailsIgnoreTransferExternalId(Long loanId, String loanExternalId, PageExternalTransferData response, - int numberOfElements, DataTable table) { + int numberOfElements, DataTable table) { Integer numberOfElementsActual = response.getNumberOfElements(); List content = response.getContent(); @@ -892,7 +894,7 @@ public void adminSendCommand(String command, String transactionType) throws IOEx @When("Admin set external asset owner loan product attribute {string} value {string} for loan product {string}") public void setAExternalAssetOwnerLoanProductAttribute(String externalAssetOwnerLoanProductAttributeKey, - String externalAssetOwnerLoanProductAttributeValue, String loanProductName) throws IOException { + String externalAssetOwnerLoanProductAttributeValue, String loanProductName) throws IOException { List loanProducts = loanProductsApi().retrieveAllLoanProducts(Map.of()); long loanProductId = loanProducts.stream().filter(loanProduct -> loanProduct.getName().equals(loanProductName)).findFirst() .orElseThrow(() -> new RuntimeException("No loan product is found!")).getId(); diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/BatchApiStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/BatchApiStepDef.java index 74e85cdaa6e..110ecc0fc43 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/BatchApiStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/BatchApiStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import io.cucumber.datatable.DataTable; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.io.IOException; import java.math.BigDecimal; import java.nio.charset.StandardCharsets; @@ -39,6 +40,7 @@ import java.util.Optional; import java.util.Set; import java.util.UUID; + import lombok.extern.slf4j.Slf4j; import org.apache.commons.codec.binary.Base64; import org.apache.fineract.avro.loan.v1.LoanSchedulePeriodDataV1; @@ -450,7 +452,7 @@ public void runBatchApiClientLoanApproveLoanDetailsApproveDoubled(String enclosi @When("Batch API call with steps: rescheduleLoan from {string} to {string} submitted on date: {string}, approveReschedule on date: {string} runs with enclosingTransaction: {string}") public void runBatchApiCreateAndApproveLoanReschedule(String fromDateStr, String toDateStr, String submittedOnDate, - String approvedOnDate, String enclosingTransaction) throws IOException { + String approvedOnDate, String enclosingTransaction) throws IOException { DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATE_FORMAT); String idempotencyKey = UUID.randomUUID().toString(); PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); @@ -481,7 +483,7 @@ public void runBatchApiCreateAndApproveLoanReschedule(String fromDateStr, String @When("Batch API call with created user and with steps: rescheduleLoan from {string} to {string} submitted on date: {string}, approveReschedule on date: {string} runs with enclosingTransaction: {string}") public void runBatchApiCreateAndApproveLoanRescheduleWithGivenUser(String fromDateStr, String toDateStr, String submittedOnDate, - String approvedOnDate, String enclosingTransaction) throws IOException { + String approvedOnDate, String enclosingTransaction) throws IOException { DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATE_FORMAT); String idempotencyKey = UUID.randomUUID().toString(); PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); @@ -525,7 +527,7 @@ public void runBatchApiCreateAndApproveLoanRescheduleWithGivenUser(String fromDa @When("Batch API call with created user and the following data results a {int} error and a {string} error message:") public void runBatchApiCreateAndApproveLoanRescheduleWithGivenUserLockedByCobError(int errorCodeExpected, String errorMessageType, - DataTable table) throws IOException { + DataTable table) throws IOException { String idempotencyKey = UUID.randomUUID().toString(); PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); Long loanId = loanResponse.getLoanId(); @@ -623,7 +625,7 @@ public void runBatchApiQueryDatatableUpdateDatatable() throws IOException { } private BatchRequest createLoanReschedule(Long requestId, Long loanId, String fromDateStr, String toDateStr, String submittedOnDate, - String idempotencyKey, Long referenceId) { + String idempotencyKey, Long referenceId) { PostCreateRescheduleLoansRequest rescheduleLoansRequest = LoanRequestFactory.defaultLoanRescheduleCreateRequest(loanId, fromDateStr, toDateStr); rescheduleLoansRequest.setSubmittedOnDate(submittedOnDate); @@ -1303,7 +1305,7 @@ private BatchRequest applyInterestPause(Long requestId, Long referenceId, String } private BatchRequest applyInterestPauseByExternalId(Long requestId, Long referenceId, String idempotencyKey, String startDate, - String endDate) { + String endDate) { BatchRequest batchRequest = new BatchRequest(); batchRequest.requestId(requestId); batchRequest.relativeUrl("loans/external-id/$.resourceExternalId/interest-pauses"); diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/BusinessDateStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/BusinessDateStepDef.java index 2fcb775454a..bf2ca8e4244 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/BusinessDateStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/BusinessDateStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -24,10 +24,12 @@ import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.List; import java.util.Map; + import org.apache.fineract.client.feign.FeignException; import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.models.BusinessDateResponse; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/BusinessStepConfigurationStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/BusinessStepConfigurationStepDef.java index 365a55409b1..5b48260f162 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/BusinessStepConfigurationStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/BusinessStepConfigurationStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -23,9 +23,11 @@ import io.cucumber.datatable.DataTable; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.util.Comparator; import java.util.List; import java.util.Map; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.util.CallFailedRuntimeException; import org.apache.fineract.client.models.BusinessStep; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/ClientStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/ClientStepDef.java index 47d2fea2274..64827a4cc51 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/ClientStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/ClientStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.util.Collections; + import lombok.RequiredArgsConstructor; import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.models.ClientAddressRequest; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/CurrencyStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/CurrencyStepDef.java index ddba1291228..17cce87a937 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/CurrencyStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/CurrencyStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -25,10 +25,12 @@ import io.cucumber.java.en.And; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.models.CurrencyConfigurationData; @@ -80,13 +82,13 @@ public void currencyHasFollowingProperties(String currencyCode, DataTable table) .as(ErrorMessageHelper.wrongCurrencyField(currencyCode, "displaySymbol", currency.getDisplaySymbol(), expectedSymbol)) .isEqualTo(expectedSymbol); assertThat(currency.getDecimalPlaces()).as( - ErrorMessageHelper.wrongCurrencyField(currencyCode, "decimalPlaces", currency.getDecimalPlaces(), expectedDecimalPlaces)) + ErrorMessageHelper.wrongCurrencyField(currencyCode, "decimalPlaces", currency.getDecimalPlaces(), expectedDecimalPlaces)) .isEqualTo(expectedDecimalPlaces); assertThat(currency.getNameCode()) .as(ErrorMessageHelper.wrongCurrencyField(currencyCode, "nameCode", currency.getNameCode(), "currency." + currencyCode)) .isEqualTo("currency." + currencyCode); assertThat(currency.getDisplayLabel()).as(ErrorMessageHelper.wrongCurrencyField(currencyCode, "displayLabel", - currency.getDisplayLabel(), expectedName + " (" + expectedSymbol + ")")) + currency.getDisplayLabel(), expectedName + " (" + expectedSymbol + ")")) .isEqualTo(expectedName + " (" + expectedSymbol + ")"); } diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/EventStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/EventStepDef.java index 98d721c4756..35281896916 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/EventStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/EventStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -29,7 +29,7 @@ import org.apache.fineract.test.support.TestContextKey; import org.springframework.beans.factory.annotation.Autowired; -@SuppressWarnings({ "unchecked", "rawtypes" }) +@SuppressWarnings({"unchecked", "rawtypes"}) public class EventStepDef extends AbstractStepDef { @Autowired diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/GlobalConfigurationStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/GlobalConfigurationStepDef.java index 3f2b38a68a8..616b93ff0c7 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/GlobalConfigurationStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/GlobalConfigurationStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -23,9 +23,11 @@ import io.cucumber.java.en.Given; import io.cucumber.java.en.When; + import java.util.Collections; import java.util.List; import java.util.Map; + import org.apache.fineract.client.feign.FeignException; import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.models.CurrencyUpdateRequest; 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 a8d7ce07bc4..d9781f3a63b 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 @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import io.cucumber.datatable.DataTable; import io.cucumber.java.en.Then; + import java.io.IOException; import java.math.BigDecimal; import java.time.LocalDate; @@ -34,6 +35,7 @@ import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.feign.services.JournalEntriesApi; @@ -288,7 +290,7 @@ public void revertedJournalEntryDataCheck(String transactionType, String transac .collect(Collectors.toList()); List transactionIdList = transactionsMatch.stream().flatMap(t -> t.getTransactionRelations().stream() - .filter(e -> "REPLAYED".equals(e.getRelationType())).map(c -> "L" + c.getToLoanTransaction().toString())) + .filter(e -> "REPLAYED".equals(e.getRelationType())).map(c -> "L" + c.getToLoanTransaction().toString())) .collect(Collectors.toList()); List> journalLinesActualList = transactionIdList.stream().map(t -> { diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/OfficeStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/OfficeStepDef.java index 94215d5a4c2..710a7be403d 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/OfficeStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/OfficeStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import static org.apache.fineract.client.feign.util.FeignCalls.ok; import io.cucumber.java.en.When; + import java.time.LocalDate; + import lombok.RequiredArgsConstructor; import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.models.PostOfficesRequest; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/SchedulerStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/SchedulerStepDef.java index 5b19f9ac15c..fd5629a0372 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/SchedulerStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/SchedulerStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -24,7 +24,9 @@ import io.cucumber.java.en.And; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.util.Map; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.models.GetJobsResponse; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/UserStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/UserStepDef.java index 0a2ccacd9a9..be25685da56 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/UserStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/UserStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -21,9 +21,11 @@ import static org.apache.fineract.client.feign.util.FeignCalls.ok; import io.cucumber.java.en.When; + import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.models.PostRolesRequest; import org.apache.fineract.client.models.PostRolesResponse; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/WorkingCapitalLoanCobStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/WorkingCapitalLoanCobStepDef.java index 24a2317e080..fd5fa2ec324 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/WorkingCapitalLoanCobStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/common/WorkingCapitalLoanCobStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import io.cucumber.java.en.Given; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.io.IOException; import java.time.Duration; import java.time.LocalDate; @@ -35,6 +36,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.feign.util.CallFailedRuntimeException; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/hook/InitializingHook.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/hook/InitializingHook.java index 40f875920af..156016b3724 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/hook/InitializingHook.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/hook/InitializingHook.java @@ -6,9 +6,9 @@ * 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 @@ -30,7 +30,7 @@ import org.springframework.core.io.support.ResourcePropertySource; @Slf4j -@SuppressWarnings({ "HideUtilityClassConstructor" }) +@SuppressWarnings({"HideUtilityClassConstructor"}) public class InitializingHook { @BeforeAll diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/hook/MessagingHook.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/hook/MessagingHook.java index 7bd1c0aa05e..ca3cb2f7f94 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/hook/MessagingHook.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/hook/MessagingHook.java @@ -6,9 +6,9 @@ * 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 @@ -21,8 +21,10 @@ import static org.awaitility.Awaitility.await; import io.cucumber.java.Before; + import java.time.Duration; import java.util.concurrent.atomic.AtomicBoolean; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.test.messaging.config.EventProperties; import org.apache.fineract.test.messaging.store.EventStore; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/hook/TestContextLifecycleHook.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/hook/TestContextLifecycleHook.java index 5cc409725aa..60cf14add23 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/hook/TestContextLifecycleHook.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/hook/TestContextLifecycleHook.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/hook/TestRailLifecycleHook.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/hook/TestRailLifecycleHook.java index 50081d2a441..1acecabc12e 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/hook/TestRailLifecycleHook.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/hook/TestRailLifecycleHook.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/ChargeStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/ChargeStepDef.java index ef494a4b0e8..0c6fe03d836 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/ChargeStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/ChargeStepDef.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/InlineCOBStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/InlineCOBStepDef.java index 032dd96a4c5..cb9b5685620 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/InlineCOBStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/InlineCOBStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -23,9 +23,11 @@ import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.io.IOException; import java.time.LocalDate; import java.time.format.DateTimeFormatter; + import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.models.InlineJobRequest; import org.apache.fineract.client.models.PostLoansResponse; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanCOBStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanCOBStepDef.java index fb84780c93f..ceafe2d8707 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanCOBStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanCOBStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -24,10 +24,12 @@ import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.io.IOException; import java.time.LocalDate; import java.util.List; import java.util.Map; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.models.LoanAccountLock; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanCapitalizedIncomeStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanCapitalizedIncomeStepDef.java index 5be90919935..ba787d4f368 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanCapitalizedIncomeStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanCapitalizedIncomeStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -23,10 +23,12 @@ import io.cucumber.datatable.DataTable; import io.cucumber.java.en.Then; + import java.math.BigDecimal; import java.time.format.DateTimeFormatter; import java.util.List; import java.util.Map; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.models.CapitalizedIncomeDetails; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanChargeAdjustmentStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanChargeAdjustmentStepDef.java index dda5777b467..373c95d5987 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanChargeAdjustmentStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanChargeAdjustmentStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -23,12 +23,14 @@ import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.io.IOException; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FeignException; import org.apache.fineract.client.feign.FineractFeignClient; @@ -142,7 +144,7 @@ public void checkChargeAdjustmentResponse() { } private Long getTransactionIdForTransactionMetConditions(String transactionDate, double transactionAmount, - GetLoansLoanIdResponse loanDetailsResponse) { + GetLoansLoanIdResponse loanDetailsResponse) { List transactions = loanDetailsResponse.getTransactions(); GetLoansLoanIdTransactions transactionMetConditions = new GetLoansLoanIdTransactions(); for (int i = 0; i < transactions.size(); i++) { @@ -173,7 +175,7 @@ private void makeChargeAdjustmentCall(Long loanId, Long transactionId, String ex } private Long getTransactionIdForLastChargeMetConditions(String chargeTypeEnum, String date, - GetLoansLoanIdResponse loanDetailsResponse) { + GetLoansLoanIdResponse loanDetailsResponse) { List charges = loanDetailsResponse.getCharges(); ChargeProductType chargeType = ChargeProductType.valueOf(chargeTypeEnum); diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanChargeBackStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanChargeBackStepDef.java index a036d275c6a..c8ecce61155 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanChargeBackStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanChargeBackStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -21,12 +21,14 @@ import static org.apache.fineract.client.feign.util.FeignCalls.ok; import io.cucumber.java.en.When; + import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; + import org.apache.fineract.avro.loan.v1.LoanTransactionDataV1; import org.apache.fineract.avro.loan.v1.LoanTransactionEnumDataV1; import org.apache.fineract.client.feign.FineractFeignClient; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanChargeStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanChargeStepDef.java index 385b52ad0df..633ecf36633 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanChargeStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanChargeStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -25,11 +25,13 @@ import io.cucumber.java.en.And; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.io.IOException; import java.math.BigDecimal; import java.time.format.DateTimeFormatter; import java.util.List; import java.util.Map; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.avro.loan.v1.LoanChargeDataV1; import org.apache.fineract.client.feign.FeignException; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanDelinquencyStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanDelinquencyStepDef.java index e309ac0a6f1..073bd79b157 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanDelinquencyStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanDelinquencyStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import io.cucumber.datatable.DataTable; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.math.BigDecimal; import java.math.RoundingMode; import java.time.format.DateTimeFormatter; @@ -33,6 +34,7 @@ import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.avro.loan.v1.LoanAccountDelinquencyRangeDataV1; @@ -730,8 +732,9 @@ private List fetchValuesOfDelinquencyPausePeriods(List header, G switch (headerName) { case "active" -> actualValues.add(t.getActive() == null ? null : t.getActive().toString()); case "pausePeriodStart" -> - actualValues.add(t.getPausePeriodStart() == null ? null : FORMATTER.format(t.getPausePeriodStart())); - case "pausePeriodEnd" -> actualValues.add(t.getPausePeriodEnd() == null ? null : FORMATTER.format(t.getPausePeriodEnd())); + actualValues.add(t.getPausePeriodStart() == null ? null : FORMATTER.format(t.getPausePeriodStart())); + case "pausePeriodEnd" -> + actualValues.add(t.getPausePeriodEnd() == null ? null : FORMATTER.format(t.getPausePeriodEnd())); default -> throw new IllegalStateException(String.format("Header name %s cannot be found", headerName)); } } @@ -739,7 +742,7 @@ private List fetchValuesOfDelinquencyPausePeriods(List header, G } private void errorMessageAssertationFeign(long loanId, PostLoansDelinquencyActionRequest request, int errorCodeExpected, - String errorMessageExpected) { + String errorMessageExpected) { CallFailedRuntimeException exception = fail(() -> fineractClient.loans().createLoanDelinquencyAction(loanId, request)); assertThat(exception.getStatus()).as(ErrorMessageHelper.wrongErrorCode(exception.getStatus(), errorCodeExpected)) diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanInterestPauseStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanInterestPauseStepDef.java index 78858beb5fe..fce3601f2d8 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanInterestPauseStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanInterestPauseStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -24,9 +24,11 @@ import static org.assertj.core.api.Assertions.assertThat; import io.cucumber.java.en.Then; + import java.io.IOException; import java.time.LocalDate; import java.time.format.DateTimeFormatter; + import lombok.RequiredArgsConstructor; import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.feign.util.CallFailedRuntimeException; @@ -181,7 +183,7 @@ public void checkLoanScheduleVariationsDeletedBusinessEvent(final String start, @Then("LoanScheduleVariationsAddedBusinessEvent is created for interest pause update from {string} and {string} to {string} and {string}") public void checkLoanScheduleVariationsAddedBusinessEventForUpdate(final String oldStart, final String oldEnd, final String newStart, - final String newEnd) { + final String newEnd) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); Assertions.assertNotNull(loanResponse); final Long loanId = loanResponse.getLoanId(); @@ -226,7 +228,7 @@ public void checkLoanBalanceChangedBusinessEvent(final String date) { } private boolean isInterestPauseWithDates(final org.apache.fineract.avro.loan.v1.LoanTermVariationsDataV1 variation, - final LocalDate startDate, final LocalDate endDate) { + final LocalDate startDate, final LocalDate endDate) { if (variation.getTermType() == null) { return false; } diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanOriginationStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanOriginationStepDef.java index 2c6940d1db5..0f1551e55ff 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanOriginationStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanOriginationStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -26,12 +26,14 @@ import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.math.BigDecimal; import java.time.format.DateTimeFormatter; import java.util.List; import java.util.Map; import java.util.UUID; import java.util.concurrent.TimeUnit; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.avro.loan.v1.LoanTransactionAdjustmentDataV1; import org.apache.fineract.avro.loan.v1.LoanTransactionDataV1; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanOverrideFieldsStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanOverrideFieldsStepDef.java index 4750d474cca..23d31061ec8 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanOverrideFieldsStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanOverrideFieldsStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -25,9 +25,11 @@ import io.cucumber.datatable.DataTable; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.io.IOException; import java.math.BigDecimal; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.models.GetLoansLoanIdResponse; 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 3f46a3f5685..ae11157c5b4 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 @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import io.cucumber.datatable.DataTable; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.io.IOException; import java.math.BigDecimal; import java.math.RoundingMode; @@ -35,6 +36,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.avro.loan.v1.LoanTransactionFlagsDataV1; @@ -267,15 +269,17 @@ private List fetchValuesOfRepaymentSchedule(List header, LoanSch List actualValues = new ArrayList<>(); for (String headerName : header) { switch (headerName) { - case "Nr" -> actualValues.add(repaymentPeriod.getPeriod() == null ? null : String.valueOf(repaymentPeriod.getPeriod())); + case "Nr" -> + actualValues.add(repaymentPeriod.getPeriod() == null ? null : String.valueOf(repaymentPeriod.getPeriod())); case "Days" -> - actualValues.add(repaymentPeriod.getDaysInPeriod() == null ? null : String.valueOf(repaymentPeriod.getDaysInPeriod())); + actualValues.add(repaymentPeriod.getDaysInPeriod() == null ? null : String.valueOf(repaymentPeriod.getDaysInPeriod())); case "Date" -> - actualValues.add(repaymentPeriod.getDueDate() == null ? null : FORMATTER.format(repaymentPeriod.getDueDate())); + actualValues.add(repaymentPeriod.getDueDate() == null ? null : FORMATTER.format(repaymentPeriod.getDueDate())); case "Paid date" -> actualValues.add(repaymentPeriod.getObligationsMetOnDate() == null ? null : FORMATTER.format(repaymentPeriod.getObligationsMetOnDate())); - case "Balance of loan" -> actualValues.add(repaymentPeriod.getPrincipalLoanBalanceOutstanding() == null ? null - : new Utils.DoubleFormatter(repaymentPeriod.getPrincipalLoanBalanceOutstanding().doubleValue()).format()); + case "Balance of loan" -> + actualValues.add(repaymentPeriod.getPrincipalLoanBalanceOutstanding() == null ? null + : new Utils.DoubleFormatter(repaymentPeriod.getPrincipalLoanBalanceOutstanding().doubleValue()).format()); case "Principal due" -> actualValues.add(repaymentPeriod.getPrincipalDue() == null ? null : new Utils.DoubleFormatter(repaymentPeriod.getPrincipalDue().doubleValue()).format()); case "Interest" -> actualValues.add(repaymentPeriod.getInterestDue() == null ? null @@ -304,7 +308,7 @@ private List fetchValuesOfRepaymentSchedule(List header, LoanSch @SuppressFBWarnings("SF_SWITCH_NO_DEFAULT") private List validateRepaymentScheduleTotal(List header, LoanScheduleData repaymentSchedule, - List expectedAmounts) { + List expectedAmounts) { List actualValues = new ArrayList<>(); Double paidActual = 0.0; List periods = repaymentSchedule.getPeriods(); @@ -365,7 +369,7 @@ private List validateRepaymentScheduleTotal(List header, LoanSch } PostLoansLoanIdTransactionsRequest setReAgeingRequestProperties(PostLoansLoanIdTransactionsRequest request, List headers, - List values) { + List values) { for (int i = 0; i < headers.size(); i++) { String header = headers.get(i).toLowerCase(java.util.Locale.ROOT).trim().replaceAll(" ", ""); switch (header) { @@ -382,7 +386,7 @@ PostLoansLoanIdTransactionsRequest setReAgeingRequestProperties(PostLoansLoanIdT @When("Admin creates a Loan re-aging transaction by Loan external ID with the following data, but fails with {int} error code:") public void adminCreatesALoanReAgingTransactionByLoanExternalIDWithTheFollowingDataButFailsWithErrorCode(int errorCode, - DataTable table) { + DataTable table) { PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); String loanExternalId = loanResponse.getResourceExternalId(); 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 08540dbe392..723163d415d 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 @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import io.cucumber.datatable.DataTable; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.math.BigDecimal; import java.math.RoundingMode; import java.time.format.DateTimeFormatter; @@ -33,6 +34,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.feign.util.CallFailedRuntimeException; @@ -276,7 +278,7 @@ private LoanScheduleData reAmortizedPreviewByLoanExternalId(final DataTable tabl @SuppressFBWarnings("SF_SWITCH_NO_DEFAULT") private void validateRepaymentScheduleTotal(final List header, final LoanScheduleData repaymentSchedule, - final List expectedAmounts) { + final List expectedAmounts) { Double paidActual = 0.0; final List periods = repaymentSchedule.getPeriods(); for (LoanSchedulePeriodData period : periods) { @@ -338,15 +340,17 @@ private List fetchValuesOfRepaymentSchedule(final List header, f final List actualValues = new ArrayList<>(); for (String headerName : header) { switch (headerName) { - case "Nr" -> actualValues.add(repaymentPeriod.getPeriod() == null ? null : String.valueOf(repaymentPeriod.getPeriod())); + case "Nr" -> + actualValues.add(repaymentPeriod.getPeriod() == null ? null : String.valueOf(repaymentPeriod.getPeriod())); case "Days" -> - actualValues.add(repaymentPeriod.getDaysInPeriod() == null ? null : String.valueOf(repaymentPeriod.getDaysInPeriod())); + actualValues.add(repaymentPeriod.getDaysInPeriod() == null ? null : String.valueOf(repaymentPeriod.getDaysInPeriod())); case "Date" -> - actualValues.add(repaymentPeriod.getDueDate() == null ? null : FORMATTER.format(repaymentPeriod.getDueDate())); + actualValues.add(repaymentPeriod.getDueDate() == null ? null : FORMATTER.format(repaymentPeriod.getDueDate())); case "Paid date" -> actualValues.add(repaymentPeriod.getObligationsMetOnDate() == null ? null : FORMATTER.format(repaymentPeriod.getObligationsMetOnDate())); - case "Balance of loan" -> actualValues.add(repaymentPeriod.getPrincipalLoanBalanceOutstanding() == null ? null - : new Utils.DoubleFormatter(repaymentPeriod.getPrincipalLoanBalanceOutstanding().doubleValue()).format()); + case "Balance of loan" -> + actualValues.add(repaymentPeriod.getPrincipalLoanBalanceOutstanding() == null ? null + : new Utils.DoubleFormatter(repaymentPeriod.getPrincipalLoanBalanceOutstanding().doubleValue()).format()); case "Principal due" -> actualValues.add(repaymentPeriod.getPrincipalDue() == null ? null : new Utils.DoubleFormatter(repaymentPeriod.getPrincipalDue().doubleValue()).format()); case "Interest" -> actualValues.add(repaymentPeriod.getInterestDue() == null ? null diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanRepaymentStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanRepaymentStepDef.java index 3f966660f18..7ffc8834e54 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanRepaymentStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanRepaymentStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import io.cucumber.java.en.And; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.io.IOException; import java.math.BigDecimal; import java.math.RoundingMode; @@ -33,6 +34,7 @@ import java.util.List; import java.util.Map; import java.util.UUID; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.avro.loan.v1.LoanTransactionAdjustmentDataV1; import org.apache.fineract.avro.loan.v1.LoanTransactionDataV1; @@ -685,14 +687,14 @@ private void adjustNthRepaymentWithExternalOwnerCheck(String nthItemStr, String loanTransactionAdjustmentDataV1 -> loanTransactionAdjustmentDataV1.getNewTransactionDetail().getAmount()) .isEqualTo(BigDecimal.valueOf(amountValue)); eventAssertionBuilder.extractingData( - loanTransactionAdjustmentDataV1 -> loanTransactionAdjustmentDataV1.getNewTransactionDetail().getExternalOwnerId()) + loanTransactionAdjustmentDataV1 -> loanTransactionAdjustmentDataV1.getNewTransactionDetail().getExternalOwnerId()) .isEqualTo(externalOwnerId); } } @Then("Customer undo {string}th transaction made on {string} results a {int} error and {string} error message") public void undoTransactionResultsError(final String nthItemStr, final String transactionDate, final int errorCodeExpected, - final String errorMessageCode) { + final String errorMessageCode) { eventStore.reset(); final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATE_FORMAT); final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanReprocessStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanReprocessStepDef.java index 3dd170bae8f..dc177d45697 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanReprocessStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanReprocessStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import static org.apache.fineract.client.feign.util.FeignCalls.executeVoid; import io.cucumber.java.en.When; + import java.io.IOException; + import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.models.PostLoansResponse; import org.apache.fineract.test.stepdef.AbstractStepDef; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanRescheduleStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanRescheduleStepDef.java index 2f982a965e0..58ef09a80c8 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanRescheduleStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/LoanRescheduleStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import io.cucumber.datatable.DataTable; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.io.IOException; import java.math.BigDecimal; import java.time.LocalDate; @@ -32,6 +33,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.feign.util.CallFailedRuntimeException; @@ -187,14 +189,14 @@ public void loanRescheduleTabCheck(DataTable table) { } public void checkLoanRescheduleTab(List> data, List reschedules, List header, - String resourceId) { + String resourceId) { assertThat(reschedules.size()).as(ErrorMessageHelper.nrOfLinesWrongInRescheduleTab(resourceId, reschedules.size(), data.size() - 1)) .isEqualTo(data.size() - 1); checkLoanRescheduleTabRows(data, reschedules, header, resourceId); } public void checkLoanRescheduleTabRows(List> data, List reschedules, List header, - String resourceId) { + String resourceId) { for (int i = 1; i < data.size(); i++) { List expectedValues = data.get(i); GetLoanRescheduleRequestResponse reschedule = reschedules.get(i - 1); @@ -210,9 +212,9 @@ private List fetchValuesOfReschedule(List header, GetLoanResched for (String headerName : header) { switch (headerName) { case "From Date" -> - actualValues.add(r.getRescheduleFromDate() == null ? null : FORMATTER_EN.format(r.getRescheduleFromDate())); + actualValues.add(r.getRescheduleFromDate() == null ? null : FORMATTER_EN.format(r.getRescheduleFromDate())); case "Reason" -> - actualValues.add(r.getRescheduleReasonCodeValue() == null ? null : r.getRescheduleReasonCodeValue().getName()); + actualValues.add(r.getRescheduleReasonCodeValue() == null ? null : r.getRescheduleReasonCodeValue().getName()); case "Status" -> actualValues.add(r.getStatusEnum() == null ? null : r.getStatusEnum().getValue()); default -> throw new IllegalStateException(String.format("Header name %s cannot be found", headerName)); } 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 1bbd5e1acca..c2fd6f091b3 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 @@ -6,9 +6,9 @@ * 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 @@ -41,6 +41,7 @@ import io.cucumber.java.en.And; import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.io.IOException; import java.math.BigDecimal; import java.math.RoundingMode; @@ -61,6 +62,7 @@ import java.util.Set; import java.util.UUID; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.avro.loan.v1.LoanAccountDataV1; @@ -288,21 +290,21 @@ public void createLoanWithDateShortTerm(String date) { @When("Customer makes {string} transaction with {string} payment type on {string} with {double} EUR transaction amount and self-generated Idempotency key") public void createTransactionWithIdempotencyKey(String transactionTypeInput, String transactionPaymentType, String transactionDate, - double transactionAmount) throws IOException { + double transactionAmount) throws IOException { createTransactionWithIdempotencyKeyAndExternalOwnerCheck(transactionTypeInput, transactionPaymentType, transactionDate, transactionAmount, null); } @When("Customer makes {string} transaction with {string} payment type on {string} with {double} EUR transaction amount and self-generated Idempotency key and check external owner") public void createTransactionWithIdempotencyKeyAndWithExternalOwner(String transactionTypeInput, String transactionPaymentType, - String transactionDate, double transactionAmount) throws IOException { + String transactionDate, double transactionAmount) throws IOException { String transferExternalOwnerId = testContext().get(TestContextKey.ASSET_EXTERNALIZATION_OWNER_EXTERNAL_ID); createTransactionWithIdempotencyKeyAndExternalOwnerCheck(transactionTypeInput, transactionPaymentType, transactionDate, transactionAmount, transferExternalOwnerId); } private void createTransactionWithIdempotencyKeyAndExternalOwnerCheck(String transactionTypeInput, String transactionPaymentType, - String transactionDate, double transactionAmount, String externalOwnerId) throws IOException { + String transactionDate, double transactionAmount, String externalOwnerId) throws IOException { eventStore.reset(); PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); long loanId = loanResponse.getLoanId(); @@ -328,7 +330,7 @@ private void createTransactionWithIdempotencyKeyAndExternalOwnerCheck(String tra @When("Admin makes {string} transaction with {string} payment type on {string} with {double} EUR transaction amount") public void createTransactionForRefund(String transactionTypeInput, String transactionPaymentType, String transactionDate, - double transactionAmount) throws InterruptedException, IOException { + double transactionAmount) throws InterruptedException, IOException { eventStore.reset(); PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); long loanId = loanResponse.getLoanId(); @@ -350,7 +352,7 @@ public void createTransactionForRefund(String transactionTypeInput, String trans @When("Admin makes {string} transaction with {string} payment type on {string} with {double} EUR transaction amount and self-generated external-id") public void createTransactionWithExternalId(String transactionTypeInput, String transactionPaymentType, String transactionDate, - double transactionAmount) throws IOException, InterruptedException { + double transactionAmount) throws IOException, InterruptedException { eventStore.reset(); PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); long loanId = loanResponse.getLoanId(); @@ -376,14 +378,14 @@ public void createTransactionWithExternalId(String transactionTypeInput, String @When("Customer makes {string} transaction with {string} payment type on {string} with {double} EUR transaction amount and system-generated Idempotency key") public void createTransactionWithAutoIdempotencyKey(String transactionTypeInput, String transactionPaymentType, String transactionDate, - double transactionAmount) throws IOException { + double transactionAmount) throws IOException { createTransactionWithAutoIdempotencyKeyAndWithExternalOwner(transactionTypeInput, transactionPaymentType, transactionDate, transactionAmount, null); } @When("Customer makes {string} transaction with {string} payment type on {string} with {double} EUR transaction amount and system-generated Idempotency key and check external owner") public void createTransactionWithAutoIdempotencyKeyWithExternalOwner(String transactionTypeInput, String transactionPaymentType, - String transactionDate, double transactionAmount) throws IOException { + String transactionDate, double transactionAmount) throws IOException { String transferExternalOwnerId = testContext().get(TestContextKey.ASSET_EXTERNALIZATION_OWNER_EXTERNAL_ID); createTransactionWithAutoIdempotencyKeyAndWithExternalOwner(transactionTypeInput, transactionPaymentType, transactionDate, transactionAmount, transferExternalOwnerId); @@ -399,8 +401,8 @@ public void createTransactionWithAutoIdempotencyKeyWithPreviousExternalOwner(Str @When("Customer makes {string} transaction with {string} payment type on {string} with {double} EUR transaction amount and system-generated Idempotency key and interestRefundCalculation {booleanValue}") public void createTransactionWithAutoIdempotencyKeyAndWithInterestRefundCalculationFlagProvided(final String transactionTypeInput, - final String transactionPaymentType, final String transactionDate, final double transactionAmount, - final boolean interestRefundCalculation) throws IOException { + final String transactionPaymentType, final String transactionDate, final double transactionAmount, + final boolean interestRefundCalculation) throws IOException { eventStore.reset(); final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); assert loanResponse != null; @@ -438,7 +440,7 @@ public void addInterestRefundTransactionManually(final String transactionTypeInp final GetLoansLoanIdTransactions refundTransaction = transactions.stream() .filter(t -> t.getType() != null && (transactionType.equals(TransactionType.PAYOUT_REFUND) ? "Payout Refund" : "Merchant Issued Refund") - .equals(t.getType().getValue()) + .equals(t.getType().getValue()) && t.getDate() != null && transactionDate.equals(FORMATTER.format(t.getDate()))) .findFirst().orElseThrow(() -> new IllegalStateException("No refund transaction found for loan " + loanId)); @@ -450,7 +452,7 @@ public void addInterestRefundTransactionManually(final String transactionTypeInp @When("Admin manually adds Interest Refund for {string}th {string} transaction made on {string} with {double} EUR interest refund amount") public void addInterestRefundTransactionManuallyNth(final String nthTransaction, final String transactionTypeInput, - final String transactionDate, final double amount) throws IOException { + final String transactionDate, final double amount) throws IOException { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); final TransactionType transactionType = TransactionType.valueOf(transactionTypeInput); @@ -465,7 +467,7 @@ public void addInterestRefundTransactionManuallyNth(final String nthTransaction, final List matchingTransactions = transactions.stream() .filter(t -> t.getType() != null && (transactionType.equals(TransactionType.PAYOUT_REFUND) ? "Payout Refund" : "Merchant Issued Refund") - .equals(t.getType().getValue()) + .equals(t.getType().getValue()) && t.getDate() != null && transactionDate.equals(FORMATTER.format(t.getDate()))) .toList(); @@ -483,7 +485,7 @@ public void addInterestRefundTransactionManuallyNth(final String nthTransaction, @When("Admin manually adds Interest Refund for {string} transaction made on invalid date {string} with {double} EUR interest refund amount") public void addInterestRefundTransactionManuallyWithInvalidDate(final String transactionTypeInput, final String transactionDate, - final double amount) { + final double amount) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); final TransactionType transactionType = TransactionType.valueOf(transactionTypeInput); @@ -496,7 +498,7 @@ public void addInterestRefundTransactionManuallyWithInvalidDate(final String tra final GetLoansLoanIdTransactions refundTransaction = transactions.stream() .filter(t -> t.getType() != null && (transactionType.equals(TransactionType.PAYOUT_REFUND) ? "Payout Refund" : "Merchant Issued Refund") - .equals(t.getType().getValue())) + .equals(t.getType().getValue())) .findFirst().orElseThrow(() -> new IllegalStateException("No refund transaction found for loan " + loanId)); failAddInterestRefundTransaction(amount, refundTransaction.getId(), transactionDate); @@ -504,7 +506,7 @@ public void addInterestRefundTransactionManuallyWithInvalidDate(final String tra @When("Admin fails to add Interest Refund for {string} transaction made on {string} with {double} EUR interest refund amount") public void addInterestRefundTransactionManuallyFailsInNonPayout(final String transactionTypeInput, final String transactionDate, - final double amount) { + final double amount) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); final TransactionType transactionType = TransactionType.valueOf(transactionTypeInput); @@ -532,7 +534,7 @@ public void addInterestRefundTransactionManuallyFailsInNonPayout(final String tr @Then("Admin fails to add duplicate Interest Refund for {string} transaction made on {string} with {double} EUR interest refund amount") public void failToAddManualInterestRefundIfAlreadyExists(final String transactionTypeInput, final String transactionDate, - final double amount) { + final double amount) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); final TransactionType transactionType = TransactionType.valueOf(transactionTypeInput); @@ -545,7 +547,7 @@ public void failToAddManualInterestRefundIfAlreadyExists(final String transactio final GetLoansLoanIdTransactions refundTransaction = transactions.stream() .filter(t -> t.getType() != null && (transactionType.equals(TransactionType.PAYOUT_REFUND) ? "Payout Refund" : "Merchant Issued Refund") - .equals(t.getType().getValue()) + .equals(t.getType().getValue()) && t.getDate() != null && transactionDate.equals(FORMATTER.format(t.getDate()))) .findFirst().orElseThrow(() -> new IllegalStateException("No refund transaction found for loan " + loanId)); @@ -562,7 +564,7 @@ public void failToAddManualInterestRefundIfAlreadyExists(final String transactio @Then("Admin fails to add Interest Refund {string} transaction after reverse made on {string} with {double} EUR interest refund amount") public void failToAddManualInterestRefundIfReversed(final String transactionTypeInput, final String transactionDate, - final double amount) { + final double amount) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); final TransactionType transactionType = TransactionType.valueOf(transactionTypeInput); @@ -575,7 +577,7 @@ public void failToAddManualInterestRefundIfReversed(final String transactionType final GetLoansLoanIdTransactions refundTransaction = transactions.stream() .filter(t -> t.getType() != null && (transactionType.equals(TransactionType.PAYOUT_REFUND) ? "Payout Refund" : "Merchant Issued Refund") - .equals(t.getType().getValue()) + .equals(t.getType().getValue()) && t.getDate() != null && transactionDate.equals(FORMATTER.format(t.getDate()))) .findFirst().orElseThrow(() -> new IllegalStateException("No refund transaction found for loan " + loanId)); @@ -591,7 +593,7 @@ public void failToAddManualInterestRefundIfReversed(final String transactionType } private void createTransactionWithAutoIdempotencyKeyAndWithExternalOwner(String transactionTypeInput, String transactionPaymentType, - String transactionDate, double transactionAmount, String externalOwnerId) throws IOException { + String transactionDate, double transactionAmount, String externalOwnerId) throws IOException { eventStore.reset(); PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); long loanId = loanResponse.getLoanId(); @@ -630,7 +632,7 @@ public void createCBR(String transactionDate, double transactionAmount) throws I } public void checkCBRerror(PostLoansLoanIdTransactionsRequest paymentTransactionRequest, int errorCodeExpected, - String errorMessageExpected) { + String errorMessageExpected) { PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); long loanId = loanResponse.getLoanId(); @@ -1391,10 +1393,10 @@ public void checkLoanDetailsAndEventLoanChargePaidByListSection(DataTable table) .isEqualTo(nameExpected); assertThat(amountEventActual).as(ErrorMessageHelper - .wrongDataInLoanTransactionMakeRepaymentPostEventLoanChargePaidByListAmount(amountEventActual, amountExpected)) + .wrongDataInLoanTransactionMakeRepaymentPostEventLoanChargePaidByListAmount(amountEventActual, amountExpected)) .isEqualTo(amountExpected); assertThat(nameEventActual).as(ErrorMessageHelper - .wrongDataInLoanTransactionMakeRepaymentPostEventLoanChargePaidByListName(nameEventActual, nameExpected)) + .wrongDataInLoanTransactionMakeRepaymentPostEventLoanChargePaidByListName(nameEventActual, nameExpected)) .isEqualTo(nameExpected); } return null; @@ -1419,7 +1421,7 @@ public void createCustomizedLoan(String submitDate, String principal, Integer lo @And("Customer makes {string} transaction with {string} payment type on {string} with {double} EUR transaction amount with the same Idempotency key as previous transaction") public void createTransactionWithIdempotencyKeyOfPreviousTransaction(String transactionTypeInput, String transactionPaymentType, - String transactionDate, double transactionAmount) { + String transactionDate, double transactionAmount) { PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); long loanId = loanResponse.getLoanId(); @@ -1440,7 +1442,7 @@ public void createTransactionWithIdempotencyKeyOfPreviousTransaction(String tran @And("Customer makes {string} transaction on the second loan with {string} payment type on {string} with {double} EUR transaction amount with the same Idempotency key as previous transaction") public void createTransactionOnSecondLoanWithIdempotencyKeyOfPreviousTransaction(String transactionTypeInput, - String transactionPaymentType, String transactionDate, double transactionAmount) { + String transactionPaymentType, String transactionDate, double transactionAmount) { PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_SECOND_LOAN_RESPONSE); long loanId = loanResponse.getLoanId(); @@ -1763,7 +1765,7 @@ public void disburseLoanWithoutAutoDownpayment(String actualDisbursementDate, St @And("Admin successfully disburse the loan on {string} with {string} EUR transaction amount and {string} fixed emi amount") public void disburseLoanWithFixedEmiAmount(final String actualDisbursementDate, final String transactionAmount, - final String fixedEmiAmount) throws IOException { + final String fixedEmiAmount) throws IOException { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); assertNotNull(loanResponse); final long loanId = loanResponse.getLoanId(); @@ -1775,7 +1777,7 @@ public void disburseLoanWithFixedEmiAmount(final String actualDisbursementDate, @And("Admin successfully disburse the loan on {string} with {string} EUR transaction amount, {string} EUR fixed emi amount and adjust repayment date on {string}") public void disburseLoanWithFixedEmiAmountAndAdjustRepaymentDate(final String actualDisbursementDate, final String transactionAmount, - final String fixedEmiAmount, final String adjustRepaymentDate) throws IOException { + final String fixedEmiAmount, final String adjustRepaymentDate) throws IOException { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); assertNotNull(loanResponse); final long loanId = loanResponse.getLoanId(); @@ -1928,7 +1930,7 @@ public void disbursementForbiddenExceedApprovedAmount(String actualDisbursementD @Then("Admin fails to disburse the loan on {string} with {string} EUR trn amount with total disb amount {string} and max disb amount {string} due to exceed max applied amount") public void disbursementForbiddenExceedMaxAppliedAmount(String actualDisbursementDate, String transactionAmount, - String totalDisbursalAmount, String maxDisbursalAmount) { + String totalDisbursalAmount, String maxDisbursalAmount) { PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); long loanId = loanResponse.getLoanId(); PostLoansLoanIdRequest disburseRequest = LoanRequestFactory.defaultLoanDisburseRequest() @@ -2152,7 +2154,7 @@ public void loanTotalUnpaidPayableDueInterest(double totalUnpaidPayableDueIntere Double totalUnpaidPayableDueInterestActual = loanDetailsResponse.getSummary().getTotalUnpaidPayableDueInterest().doubleValue(); assertThat(totalUnpaidPayableDueInterestActual).as(ErrorMessageHelper - .wrongAmountInTotalUnpaidPayableDueInterest(totalUnpaidPayableDueInterestActual, totalUnpaidPayableDueInterestExpected)) + .wrongAmountInTotalUnpaidPayableDueInterest(totalUnpaidPayableDueInterestActual, totalUnpaidPayableDueInterestExpected)) .isEqualTo(totalUnpaidPayableDueInterestExpected); } @@ -2446,7 +2448,7 @@ private boolean isLoanTransactionBuyDownFeeAmortizationAdjustment(GetLoansLoanId } public void checkLoanTransactionTabRows(List> data, List transactions, List header, - String resourceId) { + String resourceId) { for (int i = 1; i < data.size(); i++) { List expectedValues = data.get(i); String transactionDateExpected = expectedValues.get(0); @@ -2462,7 +2464,7 @@ public void checkLoanTransactionTabRows(List> data, List> data, List transactions, List header, - String resourceId) { + String resourceId) { checkLoanTransactionTabRows(data, transactions, header, resourceId); assertThat(transactions.size()) .as(ErrorMessageHelper.nrOfLinesWrongInTransactionsTab(resourceId, transactions.size(), data.size() - 1)) @@ -2530,7 +2532,7 @@ public void loanTransactionsGivenTransactionNotReverted(String transactionType, @Then("In Loan Transactions the {string}th Transaction with type={string} and date {string} has non-null external-id") public void loanTransactionsNthTransactionHasNonNullExternalId(String nthTransactionStr, String transactionType, - String transactionDate) { + String transactionDate) { PostLoansResponse loanCreateResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); long loanId = loanCreateResponse.getLoanId(); @@ -2638,7 +2640,7 @@ public void loanChargesTabCheck(DataTable table) { } private List> getActualValuesList(List charges, String paymentDueAtExpected, - String dueAsOfExpected) { + String dueAsOfExpected) { List result; if (dueAsOfExpected != null) { result = charges.stream().filter(t -> { @@ -3343,7 +3345,7 @@ public void failedDeleteLoanWithExternalId() { @When("Admin set {string} loan product {string} transaction type to {string} future installment allocation rule") public void editFutureInstallmentAllocationTypeForLoanProduct(String loanProductName, String transactionTypeToChange, - String futureInstallmentAllocationRuleNew) { + String futureInstallmentAllocationRuleNew) { DefaultLoanProduct product = DefaultLoanProduct.valueOf(loanProductName); Long loanProductId = loanProductResolver.resolve(product); log.debug("loanProductId: {}", loanProductId); @@ -3480,7 +3482,7 @@ public void checkLoanDetailsAvailableDisbursementAmountWithOverAppliedField(fina final Double availableDisbursementAmountWithOverApplied = loanDetails.getDelinquent() .getAvailableDisbursementAmountWithOverApplied().doubleValue(); assertThat(availableDisbursementAmountWithOverApplied).as( - ErrorMessageHelper.wrongAvailableDisbursementAmountWithOverApplied(availableDisbursementAmountWithOverApplied, fieldValue)) + ErrorMessageHelper.wrongAvailableDisbursementAmountWithOverApplied(availableDisbursementAmountWithOverApplied, fieldValue)) .isEqualTo(fieldValue); } @@ -3584,7 +3586,7 @@ public void loanProductTemplateChargeOffReasonOptionsCheck(final int linesExpect final boolean containsExpectedValues = actualValuesList.stream() .anyMatch(actualValues -> actualValues.equals(expectedValues)); assertThat(containsExpectedValues).as(ErrorMessageHelper - .wrongValueInLineInChargeOffReasonOptions(data.indexOf(expectedValues), actualValuesList, expectedValues)) + .wrongValueInLineInChargeOffReasonOptions(data.indexOf(expectedValues), actualValuesList, expectedValues)) .isTrue(); assertThat(linesActual).as(ErrorMessageHelper.wrongNumberOfLinesInChargeOffReasonOptions(linesActual, linesExpected)) @@ -3594,7 +3596,7 @@ public void loanProductTemplateChargeOffReasonOptionsCheck(final int linesExpect @Then("Loan Product {string} Charge-Off reasons options from specific loan product have {int} options, with the following data:") public void specificLoanProductChargeOffReasonOptionsCheck(final String loanProductName, final int linesExpected, - final DataTable table) { + final DataTable table) { final DefaultLoanProduct product = DefaultLoanProduct.valueOf(loanProductName); final Long loanProductId = loanProductResolver.resolve(product); final GetLoanProductsProductIdResponse loanProductDetails = ok( @@ -3614,7 +3616,7 @@ public void specificLoanProductChargeOffReasonOptionsCheck(final String loanProd final boolean containsExpectedValues = actualValuesList.stream() .anyMatch(actualValues -> actualValues.equals(expectedValues)); assertThat(containsExpectedValues).as(ErrorMessageHelper - .wrongValueInLineInChargeOffReasonOptions(data.indexOf(expectedValues), actualValuesList, expectedValues)) + .wrongValueInLineInChargeOffReasonOptions(data.indexOf(expectedValues), actualValuesList, expectedValues)) .isTrue(); assertThat(linesActual).as(ErrorMessageHelper.wrongNumberOfLinesInChargeOffReasonOptions(linesActual, linesExpected)) @@ -4007,7 +4009,7 @@ public void createFullyCustomizedLoanWithChargesAndExpectedTrancheDisbursementsD } public void createFullyCustomizedLoanWithChargesExpectsTrancheDisbursementDetails(final List loanData, - List disbursementDetail) { + List disbursementDetail) { final String loanProduct = loanData.get(0); final String submitDate = loanData.get(1); final String principal = loanData.get(2); @@ -4135,7 +4137,7 @@ public void createFullyCustomizedLoanWithThreeExpectedTrancheDisbursementsDetail } public void createFullyCustomizedLoanExpectsTrancheDisbursementDetails(final List loanData, - List disbursementDetail) { + List disbursementDetail) { final String loanProduct = loanData.get(0); final String submitDate = loanData.get(1); final String principal = loanData.get(2); @@ -4221,7 +4223,7 @@ private void createLoanWithZeroChargeOffBehaviour(final String date, final boole final DefaultLoanProduct product = isInterestRecalculation ? DefaultLoanProduct - .valueOf(LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR.getName()) + .valueOf(LP2_ADV_PYMNT_INTEREST_DAILY_INTEREST_RECALCULATION_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR.getName()) : DefaultLoanProduct.valueOf(LP2_ADV_PYMNT_ZERO_INTEREST_CHARGE_OFF_BEHAVIOUR.getName()); final Long loanProductId = loanProductResolver.resolve(product); @@ -4386,9 +4388,10 @@ private List fetchValuesOfTransaction(List header, GetLoansLoanI for (String headerName : header) { switch (headerName) { case "Transaction date" -> actualValues.add(t.getDate() == null ? null : FORMATTER.format(t.getDate())); - case "Transaction Type" -> actualValues.add(t.getType().getValue() == null ? null : t.getType().getValue()); + case "Transaction Type" -> + actualValues.add(t.getType().getValue() == null ? null : t.getType().getValue()); case "Amount" -> - actualValues.add(t.getAmount() == null ? null : new Utils.DoubleFormatter(t.getAmount().doubleValue()).format()); + actualValues.add(t.getAmount() == null ? null : new Utils.DoubleFormatter(t.getAmount().doubleValue()).format()); case "Principal" -> actualValues.add( t.getPrincipalPortion() == null ? null : new Utils.DoubleFormatter(t.getPrincipalPortion().doubleValue()).format()); case "Interest" -> actualValues.add( @@ -4401,7 +4404,8 @@ private List fetchValuesOfTransaction(List header, GetLoansLoanI : new Utils.DoubleFormatter(t.getOutstandingLoanBalance().doubleValue()).format()); case "Overpayment" -> actualValues.add(t.getOverpaymentPortion() == null ? null : new Utils.DoubleFormatter(t.getOverpaymentPortion().doubleValue()).format()); - case "Reverted" -> actualValues.add(t.getManuallyReversed() == null ? null : String.valueOf(t.getManuallyReversed())); + case "Reverted" -> + actualValues.add(t.getManuallyReversed() == null ? null : String.valueOf(t.getManuallyReversed())); case "Replayed" -> { boolean hasReplayed = t.getTransactionRelations().stream().anyMatch(e -> "REPLAYED".equals(e.getRelationType())); actualValues.add(hasReplayed ? "true" : "false"); @@ -4416,7 +4420,8 @@ private List fetchValuesOfBuyDownFees(List header, BuyDownFeeAmo List actualValues = new ArrayList<>(); for (String headerName : header) { switch (headerName) { - case "Date" -> actualValues.add(t.getBuyDownFeeDate() == null ? null : FORMATTER.format(t.getBuyDownFeeDate())); + case "Date" -> + actualValues.add(t.getBuyDownFeeDate() == null ? null : FORMATTER.format(t.getBuyDownFeeDate())); case "Fee Amount" -> actualValues .add(t.getBuyDownFeeAmount() == null ? new Utils.DoubleFormatter(new BigDecimal("0.0").doubleValue()).format() : new Utils.DoubleFormatter(t.getBuyDownFeeAmount().doubleValue()).format()); @@ -4427,8 +4432,8 @@ private List fetchValuesOfBuyDownFees(List header, BuyDownFeeAmo .add(t.getNotYetAmortizedAmount() == null ? new Utils.DoubleFormatter(new BigDecimal("0.0").doubleValue()).format() : new Utils.DoubleFormatter(t.getNotYetAmortizedAmount().doubleValue()).format()); case "Adjusted Amount" -> - actualValues.add(t.getAdjustedAmount() == null ? new Utils.DoubleFormatter(new BigDecimal("0.0").doubleValue()).format() - : new Utils.DoubleFormatter(t.getAdjustedAmount().doubleValue()).format()); + actualValues.add(t.getAdjustedAmount() == null ? new Utils.DoubleFormatter(new BigDecimal("0.0").doubleValue()).format() + : new Utils.DoubleFormatter(t.getAdjustedAmount().doubleValue()).format()); case "Charged Off Amount" -> actualValues .add(t.getChargedOffAmount() == null ? new Utils.DoubleFormatter(new BigDecimal("0.0").doubleValue()).format() : new Utils.DoubleFormatter(t.getChargedOffAmount().doubleValue()).format()); @@ -4443,8 +4448,8 @@ private List fetchValuesOfCapitalizedIncome(List header, Capital for (String headerName : header) { switch (headerName) { case "Amount" -> - actualValues.add(t.getAmount() == null ? new Utils.DoubleFormatter(new BigDecimal("0.0").doubleValue()).format() - : new Utils.DoubleFormatter(t.getAmount().doubleValue()).format()); + actualValues.add(t.getAmount() == null ? new Utils.DoubleFormatter(new BigDecimal("0.0").doubleValue()).format() + : new Utils.DoubleFormatter(t.getAmount().doubleValue()).format()); case "Amortized Amount" -> actualValues .add(t.getAmortizedAmount() == null ? new Utils.DoubleFormatter(new BigDecimal("0.0").doubleValue()).format() : new Utils.DoubleFormatter(t.getAmortizedAmount().doubleValue()).format()); @@ -4468,11 +4473,11 @@ private List fetchValuesOfDisbursementDetails(List header, GetLo for (String headerName : header) { switch (headerName) { case "Expected Disbursement On" -> - actualValues.add(t.getExpectedDisbursementDate() == null ? null : FORMATTER.format(t.getExpectedDisbursementDate())); + actualValues.add(t.getExpectedDisbursementDate() == null ? null : FORMATTER.format(t.getExpectedDisbursementDate())); case "Disbursed On" -> - actualValues.add(t.getActualDisbursementDate() == null ? null : FORMATTER.format(t.getActualDisbursementDate())); + actualValues.add(t.getActualDisbursementDate() == null ? null : FORMATTER.format(t.getActualDisbursementDate())); case "Principal" -> - actualValues.add(t.getPrincipal() == null ? null : new Utils.DoubleFormatter(t.getPrincipal().doubleValue()).format()); + actualValues.add(t.getPrincipal() == null ? null : new Utils.DoubleFormatter(t.getPrincipal().doubleValue()).format()); case "Net Disbursal Amount" -> actualValues.add(t.getNetDisbursalAmount() == null ? null : new Utils.DoubleFormatter(t.getNetDisbursalAmount().doubleValue()).format()); default -> throw new IllegalStateException(String.format("Header name %s cannot be found", headerName)); @@ -4485,15 +4490,17 @@ private List fetchValuesOfRepaymentSchedule(List header, GetLoan List actualValues = new ArrayList<>(); for (String headerName : header) { switch (headerName) { - case "Nr" -> actualValues.add(repaymentPeriod.getPeriod() == null ? null : String.valueOf(repaymentPeriod.getPeriod())); + case "Nr" -> + actualValues.add(repaymentPeriod.getPeriod() == null ? null : String.valueOf(repaymentPeriod.getPeriod())); case "Days" -> - actualValues.add(repaymentPeriod.getDaysInPeriod() == null ? null : String.valueOf(repaymentPeriod.getDaysInPeriod())); + actualValues.add(repaymentPeriod.getDaysInPeriod() == null ? null : String.valueOf(repaymentPeriod.getDaysInPeriod())); case "Date" -> - actualValues.add(repaymentPeriod.getDueDate() == null ? null : FORMATTER.format(repaymentPeriod.getDueDate())); + actualValues.add(repaymentPeriod.getDueDate() == null ? null : FORMATTER.format(repaymentPeriod.getDueDate())); case "Paid date" -> actualValues.add(repaymentPeriod.getObligationsMetOnDate() == null ? null : FORMATTER.format(repaymentPeriod.getObligationsMetOnDate())); - case "Balance of loan" -> actualValues.add(repaymentPeriod.getPrincipalLoanBalanceOutstanding() == null ? null - : new Utils.DoubleFormatter(repaymentPeriod.getPrincipalLoanBalanceOutstanding().doubleValue()).format()); + case "Balance of loan" -> + actualValues.add(repaymentPeriod.getPrincipalLoanBalanceOutstanding() == null ? null + : new Utils.DoubleFormatter(repaymentPeriod.getPrincipalLoanBalanceOutstanding().doubleValue()).format()); case "Principal due" -> actualValues.add(repaymentPeriod.getPrincipalDue() == null ? null : new Utils.DoubleFormatter(repaymentPeriod.getPrincipalDue().doubleValue()).format()); case "Interest" -> actualValues.add(repaymentPeriod.getInterestDue() == null ? null @@ -4522,7 +4529,7 @@ private List fetchValuesOfRepaymentSchedule(List header, GetLoan @SuppressFBWarnings("SF_SWITCH_NO_DEFAULT") private List validateRepaymentScheduleTotal(List header, GetLoansLoanIdRepaymentSchedule repaymentSchedule, - List expectedAmounts) { + List expectedAmounts) { List actualValues = new ArrayList<>(); // total paid for all periods Double paidActual = 0.0; @@ -4592,18 +4599,19 @@ private List fetchValuesOfLoanTermVariations(final List header, case "Term Type Id" -> actualValues .add(emiVariation.getTermType().getId() == null ? null : String.valueOf(emiVariation.getTermType().getId())); case "Term Type Code" -> - actualValues.add(emiVariation.getTermType().getCode() == null ? null : emiVariation.getTermType().getCode()); + actualValues.add(emiVariation.getTermType().getCode() == null ? null : emiVariation.getTermType().getCode()); case "Term Type Value" -> - actualValues.add(emiVariation.getTermType().getValue() == null ? null : emiVariation.getTermType().getValue()); + actualValues.add(emiVariation.getTermType().getValue() == null ? null : emiVariation.getTermType().getValue()); case "Applicable From" -> actualValues.add(emiVariation.getTermVariationApplicableFrom() == null ? null : FORMATTER.format(emiVariation.getTermVariationApplicableFrom())); case "Decimal Value" -> actualValues.add(emiVariation.getDecimalValue() == null ? null : new Utils.DoubleFormatter(emiVariation.getDecimalValue().doubleValue()).format()); case "Date Value" -> - actualValues.add(emiVariation.getDateValue() == null ? null : FORMATTER.format(emiVariation.getDateValue())); - case "Is Specific To Installment" -> actualValues.add(String.valueOf(emiVariation.getIsSpecificToInstallment())); + actualValues.add(emiVariation.getDateValue() == null ? null : FORMATTER.format(emiVariation.getDateValue())); + case "Is Specific To Installment" -> + actualValues.add(String.valueOf(emiVariation.getIsSpecificToInstallment())); case "Is Processed" -> - actualValues.add(emiVariation.getIsProcessed() == null ? null : String.valueOf(emiVariation.getIsProcessed())); + actualValues.add(emiVariation.getIsProcessed() == null ? null : String.valueOf(emiVariation.getIsProcessed())); } } return actualValues; @@ -4611,12 +4619,12 @@ private List fetchValuesOfLoanTermVariations(final List header, @SuppressFBWarnings("SF_SWITCH_NO_DEFAULT") private List fetchValuesOfLoanChargeOffReasonOptions(final List header, - final GetLoanProductsChargeOffReasonOptions chargeOffReasonOption) { + final GetLoanProductsChargeOffReasonOptions chargeOffReasonOption) { final List actualValues = new ArrayList<>(); for (String headerName : header) { switch (headerName) { case "Charge-Off Reason Name" -> - actualValues.add(chargeOffReasonOption.getName() == null ? null : chargeOffReasonOption.getName()); + actualValues.add(chargeOffReasonOption.getName() == null ? null : chargeOffReasonOption.getName()); case "Description" -> { assertNotNull(chargeOffReasonOption.getDescription()); actualValues @@ -4626,7 +4634,7 @@ private List fetchValuesOfLoanChargeOffReasonOptions(final List case "Position" -> actualValues .add(chargeOffReasonOption.getPosition() == null ? null : String.valueOf(chargeOffReasonOption.getPosition())); case "Is Active" -> - actualValues.add(chargeOffReasonOption.getActive() == null ? null : String.valueOf(chargeOffReasonOption.getActive())); + actualValues.add(chargeOffReasonOption.getActive() == null ? null : String.valueOf(chargeOffReasonOption.getActive())); case "Is Mandatory" -> actualValues .add(chargeOffReasonOption.getMandatory() == null ? null : String.valueOf(chargeOffReasonOption.getMandatory())); } @@ -4761,17 +4769,21 @@ private List fetchValuesOfFilteredTransaction(List header, GetLo for (String headerName : header) { switch (headerName) { case "Transaction date" -> actualValues.add(t.getDate() == null ? null : FORMATTER.format(t.getDate())); - case "Transaction Type" -> actualValues.add(t.getType().getCode() == null ? null : t.getType().getCode().substring(20)); + case "Transaction Type" -> + actualValues.add(t.getType().getCode() == null ? null : t.getType().getCode().substring(20)); case "Amount" -> actualValues.add(t.getAmount() == null ? null : String.valueOf(t.getAmount())); - case "Principal" -> actualValues.add(t.getPrincipalPortion() == null ? null : String.valueOf(t.getPrincipalPortion())); - case "Interest" -> actualValues.add(t.getInterestPortion() == null ? null : String.valueOf(t.getInterestPortion())); - case "Fees" -> actualValues.add(t.getFeeChargesPortion() == null ? null : String.valueOf(t.getFeeChargesPortion())); + case "Principal" -> + actualValues.add(t.getPrincipalPortion() == null ? null : String.valueOf(t.getPrincipalPortion())); + case "Interest" -> + actualValues.add(t.getInterestPortion() == null ? null : String.valueOf(t.getInterestPortion())); + case "Fees" -> + actualValues.add(t.getFeeChargesPortion() == null ? null : String.valueOf(t.getFeeChargesPortion())); case "Penalties" -> - actualValues.add(t.getPenaltyChargesPortion() == null ? null : String.valueOf(t.getPenaltyChargesPortion())); + actualValues.add(t.getPenaltyChargesPortion() == null ? null : String.valueOf(t.getPenaltyChargesPortion())); case "Loan Balance" -> - actualValues.add(t.getOutstandingLoanBalance() == null ? null : String.valueOf(t.getOutstandingLoanBalance())); + actualValues.add(t.getOutstandingLoanBalance() == null ? null : String.valueOf(t.getOutstandingLoanBalance())); case "Overpayment" -> - actualValues.add(t.getOverpaymentPortion() == null ? null : String.valueOf(t.getOverpaymentPortion())); + actualValues.add(t.getOverpaymentPortion() == null ? null : String.valueOf(t.getOverpaymentPortion())); default -> throw new IllegalStateException(String.format("Header name %s cannot be found", headerName)); } } @@ -4966,7 +4978,7 @@ public Boolean booleanValue(String value) { } public PostLoansLoanIdTransactionsResponse addCapitalizedIncomeToTheLoanOnWithEURTransactionAmount(final String transactionPaymentType, - final String transactionDate, final String amount) { + final String transactionDate, final String amount) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); @@ -5001,7 +5013,7 @@ public PostLoansLoanIdTransactionsResponse addCapitalizedIncomeToTheLoanOnWithEU @And("Admin adds capitalized income with {string} payment type to the loan on {string} with {string} EUR transaction amount") public void adminAddsCapitalizedIncomeToTheLoanOnWithEURTransactionAmount(final String transactionPaymentType, - final String transactionDate, final String amount) { + final String transactionDate, final String amount) { final PostLoansLoanIdTransactionsResponse capitalizedIncomeResponse = addCapitalizedIncomeToTheLoanOnWithEURTransactionAmount( transactionPaymentType, transactionDate, amount); testContext().set(TestContextKey.LOAN_CAPITALIZED_INCOME_RESPONSE, capitalizedIncomeResponse); @@ -5009,14 +5021,14 @@ public void adminAddsCapitalizedIncomeToTheLoanOnWithEURTransactionAmount(final @And("Admin adds capitalized income with {string} payment type to the loan on {string} with {string} EUR transaction amount and {string} classification") public void adminAddsCapitalizedIncomeWithClassification(final String transactionPaymentType, final String transactionDate, - final String amount, final String classificationCodeName) { + final String amount, final String classificationCodeName) { final PostLoansLoanIdTransactionsResponse capitalizedIncomeResponse = addCapitalizedIncomeWithClassification(transactionPaymentType, transactionDate, amount, classificationCodeName); testContext().set(TestContextKey.LOAN_CAPITALIZED_INCOME_RESPONSE, capitalizedIncomeResponse); } public PostLoansLoanIdTransactionsResponse addCapitalizedIncomeWithClassification(final String transactionPaymentType, - final String transactionDate, final String amount, final String classificationCodeName) { + final String transactionDate, final String amount, final String classificationCodeName) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); @@ -5037,7 +5049,7 @@ public PostLoansLoanIdTransactionsResponse addCapitalizedIncomeWithClassificatio } public PostLoansLoanIdTransactionsResponse adjustCapitalizedIncome(final String transactionPaymentType, final String transactionDate, - final String amount, final Long transactionId) { + final String amount, final Long transactionId) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); @@ -5055,7 +5067,7 @@ public PostLoansLoanIdTransactionsResponse adjustCapitalizedIncome(final String @Then("Capitalized income with payment type {string} on {string} is forbidden with amount {string} while exceed approved amount") public void capitalizedIncomeForbiddenExceedApprovedAmount(final String transactionPaymentType, final String transactionDate, - final String amount) { + final String amount) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); final DefaultPaymentType paymentType = DefaultPaymentType.valueOf(transactionPaymentType); @@ -5073,7 +5085,7 @@ public void capitalizedIncomeForbiddenExceedApprovedAmount(final String transact @Then("Capitalized income with payment type {string} on {string} is forbidden with amount {string} due to future date") public void capitalizedIncomeForbiddenFutureDate(final String transactionPaymentType, final String transactionDate, - final String amount) { + final String amount) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); final DefaultPaymentType paymentType = DefaultPaymentType.valueOf(transactionPaymentType); @@ -5162,7 +5174,7 @@ public void checkLoanCapitalizedIncomeAdjustmentTransactionCreatedBusinessEvent( @And("Admin adds capitalized income adjustment with {string} payment type to the loan on {string} with {string} EUR transaction amount") public void adminAddsCapitalizedIncomeAdjustmentToTheLoan(final String transactionPaymentType, final String transactionDate, - final String amount) { + final String amount) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); @@ -5186,7 +5198,7 @@ public void adminAddsCapitalizedIncomeAdjustmentToTheLoan(final String transacti @And("Admin adds capitalized income adjustment of capitalized income transaction made on {string} with {string} payment type to the loan on {string} with {string} EUR transaction amount") public void adminAddsCapitalizedIncomeAdjustmentToTheLoan(final String originalTransactionDate, final String transactionPaymentType, - final String transactionDate, final String amount) { + final String transactionDate, final String amount) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); @@ -5233,7 +5245,7 @@ public void verifyAvailableDisbursementAmount(String expectedAmount) { @And("Admin adds capitalized income adjustment with {string} payment type to the loan on {string} with {string} EUR trn amount with {string} date for capitalized income") public void adminAddsCapitalizedIncomeAdjustmentToTheLoanWithCapitalizedIncomeDate(final String transactionPaymentType, - final String transactionDate, final String amount, final String capitalizedIncomeTrnsDate) { + final String transactionDate, final String amount, final String capitalizedIncomeTrnsDate) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); @@ -5254,7 +5266,7 @@ public void adminAddsCapitalizedIncomeAdjustmentToTheLoanWithCapitalizedIncomeDa @And("Admin adds invalid capitalized income adjustment with {string} payment type to the loan on {string} with {string} EUR transaction amount") public void adminAddsArbitraryCapitalizedIncomeAdjustmentToTheLoan(final String transactionPaymentType, final String transactionDate, - final String amount) { + final String amount) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); @@ -5285,7 +5297,7 @@ public void adminAddsArbitraryCapitalizedIncomeAdjustmentToTheLoan(final String } public void checkCapitalizedIncomeTransactionData(String resourceId, List capitalizedIncomeTrn, - DataTable table) { + DataTable table) { List> data = table.asLists(); for (int i = 1; i < data.size(); i++) { List expectedValues = data.get(i); @@ -5370,7 +5382,7 @@ public void undoLoanContractTermination() throws IOException { final Long loanId = loanResponse.getLoanId(); final List transactions = Objects.requireNonNull( - fineractClient.loans().retrieveLoan(loanId, Map.of("staffInSelectedOfficeOnly", "false", "associations", "transactions"))) + fineractClient.loans().retrieveLoan(loanId, Map.of("staffInSelectedOfficeOnly", "false", "associations", "transactions"))) .getTransactions(); assert transactions != null; @@ -5409,7 +5421,7 @@ public void checkLoanTransactionContractTerminationPostBusinessEvent(final Strin @Then("Capitalized income adjustment with payment type {string} on {string} is forbidden with amount {string} due to future date") public void capitalizedIncomeAdjustmentForbiddenFutureDate(final String transactionPaymentType, final String transactionDate, - final String amount) { + final String amount) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); final GetLoansLoanIdResponse loanDetailsResponse = ok(() -> fineractClient.loans().retrieveLoan(loanId, @@ -5434,7 +5446,7 @@ public void capitalizedIncomeAdjustmentForbiddenFutureDate(final String transact } public PostLoansLoanIdTransactionsResponse addBuyDownFeeToTheLoanOnWithEURTransactionAmount(final String transactionPaymentType, - final String transactionDate, final String amount) { + final String transactionDate, final String amount) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); @@ -5468,7 +5480,7 @@ public PostLoansLoanIdTransactionsResponse addBuyDownFeeToTheLoanOnWithEURTransa } public PostLoansLoanIdTransactionsResponse adjustBuyDownFee(final String transactionPaymentType, final String transactionDate, - final String amount, final Long transactionId) { + final String amount, final Long transactionId) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); @@ -5488,7 +5500,7 @@ public PostLoansLoanIdTransactionsResponse adjustBuyDownFee(final String transac @And("Admin adds buy down fee with {string} payment type to the loan on {string} with {string} EUR transaction amount") public void adminAddsBuyDownFeesToTheLoanOnWithEURTransactionAmount(final String transactionPaymentType, final String transactionDate, - final String amount) { + final String amount) { final PostLoansLoanIdTransactionsResponse buyDownFeesIncomeResponse = addBuyDownFeeToTheLoanOnWithEURTransactionAmount( transactionPaymentType, transactionDate, amount); testContext().set(TestContextKey.LOAN_BUY_DOWN_FEE_RESPONSE, buyDownFeesIncomeResponse); @@ -5496,14 +5508,14 @@ public void adminAddsBuyDownFeesToTheLoanOnWithEURTransactionAmount(final String @When("Admin adds buy down fee with {string} payment type to the loan on {string} with {string} EUR transaction amount and {string} classification") public void adminAddsBuyDownFeeWithClassification(final String transactionPaymentType, final String transactionDate, - final String amount, final String classificationCodeValueName) { + final String amount, final String classificationCodeValueName) { final PostLoansLoanIdTransactionsResponse buyDownFeesIncomeResponse = addBuyDownFeeWithClassification(transactionPaymentType, transactionDate, amount, classificationCodeValueName); testContext().set(TestContextKey.LOAN_BUY_DOWN_FEE_RESPONSE, buyDownFeesIncomeResponse); } public PostLoansLoanIdTransactionsResponse addBuyDownFeeWithClassification(final String transactionPaymentType, - final String transactionDate, final String amount, final String classificationCodeValueName) { + final String transactionDate, final String amount, final String classificationCodeValueName) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); @@ -5525,7 +5537,7 @@ public PostLoansLoanIdTransactionsResponse addBuyDownFeeWithClassification(final @And("Admin adds buy down fee adjustment with {string} payment type to the loan on {string} with {string} EUR transaction amount") public void adminAddsBuyDownFeesAdjustmentToTheLoan(final String transactionPaymentType, final String transactionDate, - final String amount) { + final String amount) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); @@ -5545,7 +5557,7 @@ public void adminAddsBuyDownFeesAdjustmentToTheLoan(final String transactionPaym @And("Admin adds buy down fee adjustment of buy down fee transaction made on {string} with {string} payment type to the loan on {string} with {string} EUR transaction amount") public void adminAddsBuyDownFeesAdjustmentToTheLoan(final String originalTransactionDate, final String transactionPaymentType, - final String transactionDate, final String amount) { + final String transactionDate, final String amount) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanResponse.getLoanId(); @@ -5743,7 +5755,7 @@ private PostLoansLoanIdTransactionsResponse addInterestRefundTransaction(final d } private CallFailedRuntimeException failAddInterestRefundTransaction(final double amount, final Long transactionId, - final String transactionDate) { + final String transactionDate) { final PostLoansResponse loanResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); assert loanResponse != null; final long loanId = loanResponse.getLoanId(); @@ -5823,7 +5835,7 @@ public void checkLoanBuyDownFeeAmortizationAdjustmentTransactionCreatedBusinessE Map.of("staffInSelectedOfficeOnly", "false", "associations", "transactions"))); List transactions = loanDetailsResponse.getTransactions(); GetLoansLoanIdTransactions buyDownFeeAmortizationAdjustmentTransaction = transactions.stream().filter( - t -> date.equals(FORMATTER.format(t.getDate())) && "Buy Down Fee Amortization Adjustment".equals(t.getType().getValue())) + t -> date.equals(FORMATTER.format(t.getDate())) && "Buy Down Fee Amortization Adjustment".equals(t.getType().getValue())) .findFirst().orElseThrow(() -> new IllegalStateException( String.format("No Buy Down Fee Amortization Adjustment transaction found on %s", date))); Long buyDownFeeAmortizationAdjustmentTransactionId = buyDownFeeAmortizationAdjustmentTransaction.getId(); @@ -5896,16 +5908,16 @@ public void checkLoanAmortizationAllocationMapping(final String transactionType, final LoanAmortizationAllocationResponse loanAmortizationAllocationResponse = transactionsMatch.getFirst().getType().getCode() .substring(20).equals(GetLoansLoanIdLoanTransactionEnumData.SERIALIZED_NAME_CAPITALIZED_INCOME) - ? ok(() -> fineractClient.loanCapitalizedIncome().retrieveCapitalizedIncomeAllocationData(loanId, - transactionsMatch.getFirst().getId())) - : ok(() -> fineractClient.loanBuyDownFees().retrieveBuyDownFeesAllocationData(loanId, - transactionsMatch.getFirst().getId())); + ? ok(() -> fineractClient.loanCapitalizedIncome().retrieveCapitalizedIncomeAllocationData(loanId, + transactionsMatch.getFirst().getId())) + : ok(() -> fineractClient.loanBuyDownFees().retrieveBuyDownFeesAllocationData(loanId, + transactionsMatch.getFirst().getId())); checkLoanAmortizationAllocationMappingData(resourceId, loanAmortizationAllocationResponse, table); } @And("Loan Amortization Allocation Mapping for the {string}th {string} transaction created on {string} contains the following data:") public void checkLoanAmortizationAllocationMapping(final String nthTransactionStr, final String transactionType, - final String transactionDate, DataTable table) { + final String transactionDate, DataTable table) { final DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DATE_FORMAT); final PostLoansResponse loanCreateResponse = testContext().get(TestContextKey.LOAN_CREATE_RESPONSE); final long loanId = loanCreateResponse.getLoanId(); @@ -5932,9 +5944,9 @@ public void checkLoanAmortizationAllocationMapping(final String nthTransactionSt final LoanAmortizationAllocationResponse loanAmortizationAllocationResponse = transactionMatch.getType().getCode().substring(20) .equals(GetLoansLoanIdLoanTransactionEnumData.SERIALIZED_NAME_CAPITALIZED_INCOME) - ? ok(() -> fineractClient.loanCapitalizedIncome().retrieveCapitalizedIncomeAllocationData(loanId, - transactionMatch.getId())) - : ok(() -> fineractClient.loanBuyDownFees().retrieveBuyDownFeesAllocationData(loanId, transactionMatch.getId())); + ? ok(() -> fineractClient.loanCapitalizedIncome().retrieveCapitalizedIncomeAllocationData(loanId, + transactionMatch.getId())) + : ok(() -> fineractClient.loanBuyDownFees().retrieveBuyDownFeesAllocationData(loanId, transactionMatch.getId())); checkLoanAmortizationAllocationMappingData(resourceId, loanAmortizationAllocationResponse, table); } @@ -5956,7 +5968,7 @@ public void loanTotalUnpaidPayableNotDueInterest(double totalUnpaidPayableNotDue } private void checkLoanAmortizationAllocationMappingData(final String resourceId, - final LoanAmortizationAllocationResponse amortizationAllocationResponse, final DataTable table) { + final LoanAmortizationAllocationResponse amortizationAllocationResponse, final DataTable table) { final List> data = table.asLists(); for (int i = 1; i < data.size(); i++) { final List expectedValues = data.get(i); @@ -5984,8 +5996,8 @@ private List fetchValuesOfAmortizationAllocationMapping(final List actualValues.add(t.getDate() == null ? null : FORMATTER.format(t.getDate())); case "Type" -> actualValues.add(t.getType() == null ? null : t.getType()); case "Amount" -> - actualValues.add(t.getAmount() == null ? new Utils.DoubleFormatter(new BigDecimal("0.0").doubleValue()).format() - : new Utils.DoubleFormatter(t.getAmount().doubleValue()).format()); + actualValues.add(t.getAmount() == null ? new Utils.DoubleFormatter(new BigDecimal("0.0").doubleValue()).format() + : new Utils.DoubleFormatter(t.getAmount().doubleValue()).format()); default -> throw new IllegalStateException(String.format("Header name %s cannot be found", headerName)); } } @@ -5994,7 +6006,7 @@ private List fetchValuesOfAmortizationAllocationMapping(final List paymentAllocationOrder) { + List paymentAllocationOrder) { AdvancedPaymentData advancedPaymentData = new AdvancedPaymentData(); advancedPaymentData.setTransactionType(transactionType); advancedPaymentData.setFutureInstallmentAllocationRule(futureInstallmentAllocationRule); diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/WorkingCapitalDelinquencyConfigStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/WorkingCapitalDelinquencyConfigStepDef.java index 66c7d0c4719..a67f7e44c59 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/WorkingCapitalDelinquencyConfigStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/loan/WorkingCapitalDelinquencyConfigStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -24,10 +24,12 @@ import io.cucumber.java.en.Then; import io.cucumber.java.en.When; + import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; @@ -241,7 +243,7 @@ public void checkRetrieveWCDelinquencyBucketNotFoundFailure(Long id) { } public void checkCreateWCDelinquencyBucketWithInvalidDataFailure(DelinquencyBucketRequest defaultWCDelinquencyBucketCreateRequest, - String errorMessage, int errorCode) { + String errorMessage, int errorCode) { CallFailedRuntimeException exception = fail( () -> fineractFeignClient.delinquencyRangeAndBucketsManagement().createBucket(defaultWCDelinquencyBucketCreateRequest)); assertThat(exception.getStatus()).as(ErrorMessageHelper.incorrectExpectedValueInResponse()).isEqualTo(errorCode); @@ -249,7 +251,7 @@ public void checkCreateWCDelinquencyBucketWithInvalidDataFailure(DelinquencyBuck } public DelinquencyBucketRequest setWCDelinquencyBucketCreateFieldValue(DelinquencyBucketRequest delinquencyBucketRequest, - String fieldName, String fieldValue) { + String fieldName, String fieldValue) { if (fieldValue.equals("null")) { fieldValue = null; } @@ -272,36 +274,36 @@ public DelinquencyBucketRequest setWCDelinquencyBucketCreateFieldValue(Delinquen switch (fieldName) { case "name": delinquencyBucketRequest.setName(fieldValue); - break; + break; case "ranges": delinquencyBucketRequest.setRanges(valueArrayList); - break; + break; case "bucketType": delinquencyBucketRequest.setBucketType(fieldValue); - break; + break; case "minimumPaymentPeriodAndRule": delinquencyBucketRequest.setMinimumPaymentPeriodAndRule(fieldValue == null ? null : minimumPaymentPeriodAndRuleRequest); - break; + break; case "frequency": minimumPaymentPeriodAndRuleRequest.setFrequency(valueInt); - break; + break; case "frequencyType": minimumPaymentPeriodAndRuleRequest.setFrequencyType(fieldValue); - break; + break; case "minimumPayment": minimumPaymentPeriodAndRuleRequest.setMinimumPayment(valueBigDecimal); - break; + break; case "minimumPaymentType": minimumPaymentPeriodAndRuleRequest.setMinimumPaymentType(fieldValue); - break; + break; default: - break; + break; } return delinquencyBucketRequest; } public void checkDelinquencyBucketData(DelinquencyBucketRequest delinquencyBucketRequest, - DelinquencyBucketResponse delinquencyBucketData) { + DelinquencyBucketResponse delinquencyBucketData) { SoftAssertions assertions = new SoftAssertions(); assertions.assertThat(delinquencyBucketRequest.getName()).isEqualTo(delinquencyBucketData.getName()); assert delinquencyBucketRequest.getBucketType() != null; @@ -314,7 +316,7 @@ public void checkDelinquencyBucketData(DelinquencyBucketRequest delinquencyBucke assert minimumPaymentPeriodAndRuleRequest != null; assert minimumPaymentPeriodAndRuleResponse != null; assertions.assertThat( - minimumPaymentPeriodAndRuleRequest.getMinimumPayment().compareTo(minimumPaymentPeriodAndRuleResponse.getMinimumPayment())) + minimumPaymentPeriodAndRuleRequest.getMinimumPayment().compareTo(minimumPaymentPeriodAndRuleResponse.getMinimumPayment())) .isEqualTo(0); assert minimumPaymentPeriodAndRuleResponse.getMinimumPaymentType() != null; assertions.assertThat(minimumPaymentPeriodAndRuleRequest.getMinimumPaymentType()) @@ -334,7 +336,7 @@ public void checkDelinquencyBucketData(DelinquencyBucketRequest delinquencyBucke } public void checkUpdateWCDelinquencyBucketWithInvalidDataFailure(Long id, DelinquencyBucketRequest defaultWCDelinquencyBucketRequest, - String errorMessage, int errorCode) { + String errorMessage, int errorCode) { CallFailedRuntimeException exception = fail( () -> fineractFeignClient.delinquencyRangeAndBucketsManagement().updateBucket(id, defaultWCDelinquencyBucketRequest)); assertThat(exception.getStatus()).as(ErrorMessageHelper.incorrectExpectedValueInResponse()).isEqualTo(errorCode); diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/reporting/ReportingStepDef.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/reporting/ReportingStepDef.java index c86c94ff9d1..72d29248bb0 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/reporting/ReportingStepDef.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/stepdef/reporting/ReportingStepDef.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import io.cucumber.datatable.DataTable; import io.cucumber.java.en.Then; + import java.math.BigDecimal; import java.time.LocalDate; import java.time.format.DateTimeFormatter; @@ -31,6 +32,7 @@ import java.util.Map; import java.util.Objects; import java.util.stream.IntStream; + import lombok.RequiredArgsConstructor; import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.models.PostOfficesResponse; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/EnumResolver.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/EnumResolver.java index af26bbc0583..dc3b4238cad 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/EnumResolver.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/EnumResolver.java @@ -6,9 +6,9 @@ * 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 @@ -24,7 +24,8 @@ public final class EnumResolver { - private EnumResolver() {} + private EnumResolver() { + } public static > T from(Class clazz, String str, Function fn) { return Arrays.stream(clazz.getEnumConstants()).filter(c -> fn.apply(c).equals(str)).findAny() diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/PropertiesCondition.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/PropertiesCondition.java index 722d433146d..7e1f9103717 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/PropertiesCondition.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/PropertiesCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/PropertiesFactory.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/PropertiesFactory.java index 001366d9773..d7180c76e69 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/PropertiesFactory.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/PropertiesFactory.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.support; import java.lang.reflect.Constructor; + import org.springframework.beans.factory.annotation.Value; import org.springframework.core.convert.ConversionService; import org.springframework.core.convert.support.DefaultConversionService; @@ -29,7 +30,8 @@ public final class PropertiesFactory { private static final ConversionService CONVERSION_SERVICE = new DefaultConversionService(); - private PropertiesFactory() {} + private PropertiesFactory() { + } public static T get(Environment environment, Class clazz) { try { diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContext.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContext.java index 91ec17a93c0..91a97f59639 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContext.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/TestContext.java @@ -6,9 +6,9 @@ * 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 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 86cf9482c99..937c522ab34 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 @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/loader/FineractConfigLoader.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/loader/FineractConfigLoader.java index 01b0aedba16..4c91ef42b0e 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/loader/FineractConfigLoader.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/loader/FineractConfigLoader.java @@ -6,9 +6,9 @@ * 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 @@ -21,19 +21,21 @@ import static org.apache.commons.collections4.CollectionUtils.isEmpty; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; -@SuppressFBWarnings({ "VA_FORMAT_STRING_USES_NEWLINE" }) +@SuppressFBWarnings({"VA_FORMAT_STRING_USES_NEWLINE"}) public final class FineractConfigLoader { public static final String FINERACT_TEST_CONFIG_LOCATION = "META-INF/fineract-test.config"; public static final String INITIALIZER_CONFIG_KEY = "org.apache.fineract.test.initializer.Configuration"; - private FineractConfigLoader() {} + private FineractConfigLoader() { + } public static Set> getInitializerConfigurationClasses() { ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/loader/PropertiesResourceLoader.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/loader/PropertiesResourceLoader.java index d0d160d3dd1..11464fe9fd5 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/loader/PropertiesResourceLoader.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/support/loader/PropertiesResourceLoader.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.test.support.loader; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.io.IOException; import java.net.URL; import java.util.ArrayList; @@ -29,14 +30,16 @@ import java.util.Map; import java.util.Properties; import java.util.stream.Collectors; + import org.springframework.core.io.UrlResource; import org.springframework.core.io.support.PropertiesLoaderUtils; import org.springframework.util.StringUtils; -@SuppressFBWarnings({ "VA_FORMAT_STRING_USES_NEWLINE" }) +@SuppressFBWarnings({"VA_FORMAT_STRING_USES_NEWLINE"}) public final class PropertiesResourceLoader { - private PropertiesResourceLoader() {} + private PropertiesResourceLoader() { + } public static Map> load(String resourceLocation, ClassLoader classLoader) { diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/AddResultForCaseRequest.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/AddResultForCaseRequest.java index 67b4453e4a0..7b825a4c1e4 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/AddResultForCaseRequest.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/AddResultForCaseRequest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailApiClient.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailApiClient.java index 29e943a181d..30a6003e265 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailApiClient.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailApiClient.java @@ -6,9 +6,9 @@ * 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 @@ -26,7 +26,7 @@ interface TestRailApiClient { - @Headers({ "Content-Type:application/json" }) + @Headers({"Content-Type:application/json"}) @POST("/api/v2/add_result_for_case/{runId}/{caseId}") Call addResultForCase(@Path("runId") int runId, @Path("caseId") int caseId, @Body AddResultForCaseRequest request); } diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailClient.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailClient.java index 1e1a12ab595..97070168a29 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailClient.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailClient.java @@ -6,9 +6,9 @@ * 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 @@ -19,11 +19,13 @@ package org.apache.fineract.test.testrail; import io.cucumber.java.Scenario; + import java.io.IOException; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.regex.Matcher; import java.util.regex.Pattern; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import okhttp3.ResponseBody; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailConfiguration.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailConfiguration.java index 838e463be5c..07782ed36bc 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailConfiguration.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static org.apache.commons.lang3.StringUtils.isBlank; import java.io.IOException; + import okhttp3.Interceptor; import okhttp3.OkHttpClient; import okhttp3.Request; diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailEnabledCondition.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailEnabledCondition.java index 161e47e5dde..48d41173e02 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailEnabledCondition.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailEnabledCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailProperties.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailProperties.java index 472182fbfe5..5be05c09ced 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailProperties.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailProperties.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailStatus.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailStatus.java index 2dc659179b9..b214336d634 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailStatus.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/testrail/TestRailStatus.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-core/src/test/resources/fineract-test-application.properties b/fineract-e2e-tests-core/src/test/resources/fineract-test-application.properties index eb5ef6e178d..13b9b45b766 100644 --- a/fineract-e2e-tests-core/src/test/resources/fineract-test-application.properties +++ b/fineract-e2e-tests-core/src/test/resources/fineract-test-application.properties @@ -16,37 +16,29 @@ # specific language governing permissions and limitations # under the License. # - fineract-test.api.base-url=${BASE_URL:https://localhost:8443} fineract-test.api.username=${TEST_USERNAME:mifos} fineract-test.api.password=${TEST_PASSWORD:password} fineract-test.api.strong-password=${TEST_STRONG_PASSWORD:A1b2c3d4e5f$} fineract-test.api.tenant-id=${TEST_TENANT_ID:default} - fineract-test.initialization.enabled=${INITIALIZATION_ENABLED:false} - fineract-test.testrail.enabled=${TESTRAIL_ENABLED:false} fineract-test.testrail.base-url=${TESTRAIL_BASEURL:} fineract-test.testrail.username=${TESTRAIL_USERNAME:} fineract-test.testrail.password=${TESTRAIL_PASSWORD:} fineract-test.testrail.run-id=${TESTRAIL_RUN_ID:0} - fineract-test.messaging.jms.broker-url=${ACTIVEMQ_BROKER_URL:} fineract-test.messaging.jms.broker-username=${ACTIVEMQ_BROKER_USERNAME:} fineract-test.messaging.jms.broker-password=${ACTIVEMQ_BROKER_PASSWORD:} fineract-test.messaging.jms.topic-name=${ACTIVEMQ_TOPIC_NAME:} - fineract-test.event.verification-enabled=${EVENT_VERIFICATION_ENABLED:false} fineract-test.event.wait-timeout-in-ms=${POLLING_EVENT_WAIT_TIMEOUT_IN_MS:5000} fineract-test.event.delay-in-ms=${POLLING_EVENT_WAIT_TIMEOUT_IN_MS:100} fineract-test.event.interval-in-ms=${POLLING_EVENT_WAIT_TIMEOUT_IN_MS:100} - fineract-test.job.interval-in-ms=${POLLING_JOB_INTERVAL_IN_MS:100} fineract-test.job.delay-in-ms=${POLLING_JOB_DELAY_IN_MS:3000} fineract-test.job.wait-timeout-in-ms=${POLLING_JOB_WAIT_TIMEOUT_IN_MS:120000} - fineract-test.client-read-timeout=${CLIENT_READ_TIMEOUT:60} - fineract-test.db.protocol=${TESTDB_PROTOCOL:jdbc:postgresql} fineract-test.db.hostname=${TESTDB_HOSTNAME:localhost} fineract-test.db.port=${TESTDB_PORT:5432} diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/TestRunner.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/TestRunner.java index 28227316809..0fe5f5241b5 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/TestRunner.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/TestRunner.java @@ -6,9 +6,9 @@ * 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 @@ -35,4 +35,5 @@ @ExcludeTags("Skip") @ConfigurationParameter(key = PLUGIN_PROPERTY_NAME, value = "pretty") @ConfigurationParameter(key = GLUE_PROPERTY_NAME, value = "org.apache.fineract.test.stepdef, org.apache.fineract.test.stepdef.common, org.apache.fineract.test.stepdef.hook, org.apache.fineract.test.stepdef.loan, org.apache.fineract.test.stepdef.saving, org.apache.fineract.test.config") -public class TestRunner {} +public class TestRunner { +} diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/config/TestCucumberConfiguration.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/config/TestCucumberConfiguration.java index 9a85efb9d62..f480551bb80 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/config/TestCucumberConfiguration.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/config/TestCucumberConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -23,4 +23,5 @@ @CucumberContextConfiguration @ContextConfiguration(classes = TestApplicationConfiguration.class) -public class TestCucumberConfiguration {} +public class TestCucumberConfiguration { +} diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/BusinessDateInitializerStep.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/BusinessDateInitializerStep.java index d6536203060..964f632cde6 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/BusinessDateInitializerStep.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/BusinessDateInitializerStep.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/ChargeGlobalInitializerStep.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/ChargeGlobalInitializerStep.java index 6dfec136ab7..64483de54f8 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/ChargeGlobalInitializerStep.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/ChargeGlobalInitializerStep.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; @@ -195,7 +196,7 @@ public void initialize() throws Exception { } private PostChargesResponse createChargeIfNotExists(List existingCharges, Enum appliesTo, - String name, Integer chargeTimeType, Integer chargeCalculationType, Double amount, Boolean isActive, Boolean isPenalty) + String name, Integer chargeTimeType, Integer chargeCalculationType, Double amount, Boolean isActive, Boolean isPenalty) throws Exception { ChargeRequest request = defaultChargesRequest(appliesTo, name, chargeTimeType, chargeCalculationType, amount, isActive, isPenalty); @@ -216,7 +217,7 @@ private PostChargesResponse createChargeIfNotExists(List existingCha } public static ChargeRequest defaultChargesRequest(Enum appliesTo, String name, Integer chargeTimeType, - Integer chargeCalculationType, Double amount, Boolean isActive, Boolean isPenalty) throws Exception { + Integer chargeCalculationType, Double amount, Boolean isActive, Boolean isPenalty) throws Exception { ChargeRequest request = new ChargeRequest(); Integer chargeAppliesTo; diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/CobBusinessStepInitializerStep.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/CobBusinessStepInitializerStep.java index c4bee5fa872..8c7768171c7 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/CobBusinessStepInitializerStep.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/CobBusinessStepInitializerStep.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/CodeGlobalInitializerStep.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/CodeGlobalInitializerStep.java index 8581bbb2645..678010d58c7 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/CodeGlobalInitializerStep.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/CodeGlobalInitializerStep.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/CurrencyGlobalInitializerStep.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/CurrencyGlobalInitializerStep.java index 4b8f73a52b6..10dfa7488ce 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/CurrencyGlobalInitializerStep.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/CurrencyGlobalInitializerStep.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.Arrays; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.models.CurrencyUpdateRequest; diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/DatatablesGlobalInitializerStep.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/DatatablesGlobalInitializerStep.java index f76d5952a31..aa082ea3a4d 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/DatatablesGlobalInitializerStep.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/DatatablesGlobalInitializerStep.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/DelinquencyGlobalInitializerStep.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/DelinquencyGlobalInitializerStep.java index e3457e30d6e..faf2aa4c4e3 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/DelinquencyGlobalInitializerStep.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/DelinquencyGlobalInitializerStep.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.Arrays; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/FinancialActivityMappingGlobalInitializerStep.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/FinancialActivityMappingGlobalInitializerStep.java index 2f6ca5a493d..2ac031aee66 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/FinancialActivityMappingGlobalInitializerStep.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/FinancialActivityMappingGlobalInitializerStep.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static org.apache.fineract.client.feign.util.FeignCalls.executeVoid; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/FundGlobalInitializerStep.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/FundGlobalInitializerStep.java index d67a1b99007..7f7ada4d82d 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/FundGlobalInitializerStep.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/FundGlobalInitializerStep.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/GLGlobalInitializerStep.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/GLGlobalInitializerStep.java index 77399429f28..be0be539646 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/GLGlobalInitializerStep.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/GLGlobalInitializerStep.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/GlobalConfigurationGlobalInitializerStep.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/GlobalConfigurationGlobalInitializerStep.java index 3ee84d27f4d..df40dd49c2e 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/GlobalConfigurationGlobalInitializerStep.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/GlobalConfigurationGlobalInitializerStep.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java index b44a29d6a41..7b84fbce3e5 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java @@ -6,9 +6,9 @@ * 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 @@ -37,6 +37,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; @@ -4642,7 +4643,7 @@ public void initialize() throws Exception { } public static AdvancedPaymentData createPaymentAllocation(String transactionType, String futureInstallmentAllocationRule, - LoanProductPaymentAllocationRule.AllocationTypesEnum... rules) { + LoanProductPaymentAllocationRule.AllocationTypesEnum... rules) { AdvancedPaymentData advancedPaymentData = new AdvancedPaymentData(); advancedPaymentData.setTransactionType(transactionType); advancedPaymentData.setFutureInstallmentAllocationRule(futureInstallmentAllocationRule); @@ -4672,7 +4673,7 @@ public static AdvancedPaymentData createPaymentAllocation(String transactionType } public static AdvancedPaymentData createPaymentAllocationPenFeeIntPrincipal(String transactionType, - String futureInstallmentAllocationRule, LoanProductPaymentAllocationRule.AllocationTypesEnum... rules) { + String futureInstallmentAllocationRule, LoanProductPaymentAllocationRule.AllocationTypesEnum... rules) { AdvancedPaymentData advancedPaymentData = new AdvancedPaymentData(); advancedPaymentData.setTransactionType(transactionType); advancedPaymentData.setFutureInstallmentAllocationRule(futureInstallmentAllocationRule); diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/PaymentTypeGlobalInitializerStep.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/PaymentTypeGlobalInitializerStep.java index 3946d3834ae..0def8fb92ae 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/PaymentTypeGlobalInitializerStep.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/PaymentTypeGlobalInitializerStep.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/SavingsProductGlobalInitializer.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/SavingsProductGlobalInitializer.java index b76d9136bd3..376e0f3df44 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/SavingsProductGlobalInitializer.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/SavingsProductGlobalInitializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/SchedulerGlobalInitializerStep.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/SchedulerGlobalInitializerStep.java index b4c7404a3a2..6ca03886caa 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/SchedulerGlobalInitializerStep.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/SchedulerGlobalInitializerStep.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static org.apache.fineract.client.feign.util.FeignCalls.executeVoid; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.client.feign.FineractFeignClient; import org.springframework.core.Ordered; diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/WcpCobBusinessStepInitializerStep.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/WcpCobBusinessStepInitializerStep.java index 2293659b7dd..bc7684766cc 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/WcpCobBusinessStepInitializerStep.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/WcpCobBusinessStepInitializerStep.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/WorkingCapitalInitializerStep.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/WorkingCapitalInitializerStep.java index ff112960efa..0c9f747d4dc 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/WorkingCapitalInitializerStep.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/global/WorkingCapitalInitializerStep.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.math.BigDecimal; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/scenario/GlobalConfigurationScenarioInitializerStep.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/scenario/GlobalConfigurationScenarioInitializerStep.java index 3d6bad3875a..f545a4502b3 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/scenario/GlobalConfigurationScenarioInitializerStep.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/scenario/GlobalConfigurationScenarioInitializerStep.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/suite/ExternalEventSuiteInitializerStep.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/suite/ExternalEventSuiteInitializerStep.java index 8755a51769c..07c6e653121 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/suite/ExternalEventSuiteInitializerStep.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/suite/ExternalEventSuiteInitializerStep.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; diff --git a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/suite/JobSuiteInitializerStep.java b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/suite/JobSuiteInitializerStep.java index 7ffaea59239..06c93b38752 100644 --- a/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/suite/JobSuiteInitializerStep.java +++ b/fineract-e2e-tests-runner/src/test/java/org/apache/fineract/test/initializer/suite/JobSuiteInitializerStep.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import static org.apache.fineract.client.feign.util.FeignCalls.ok; import java.util.Map; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.client.feign.FineractFeignClient; import org.apache.fineract.client.models.ExecuteJobRequest; diff --git a/fineract-e2e-tests-runner/src/test/resources/allure.properties b/fineract-e2e-tests-runner/src/test/resources/allure.properties index 8cdc01b11c1..0fb829fe245 100644 --- a/fineract-e2e-tests-runner/src/test/resources/allure.properties +++ b/fineract-e2e-tests-runner/src/test/resources/allure.properties @@ -16,5 +16,4 @@ # specific language governing permissions and limitations # under the License. # - allure.results.directory=fineract-e2e-tests-runner/build/allure-results diff --git a/fineract-e2e-tests-runner/src/test/resources/cucumber.properties b/fineract-e2e-tests-runner/src/test/resources/cucumber.properties index d3b2786eb65..9642a544550 100644 --- a/fineract-e2e-tests-runner/src/test/resources/cucumber.properties +++ b/fineract-e2e-tests-runner/src/test/resources/cucumber.properties @@ -16,5 +16,4 @@ # specific language governing permissions and limitations # under the License. # - cucumber.publish.quiet=true diff --git a/fineract-e2e-tests-runner/src/test/resources/junit-platform.properties b/fineract-e2e-tests-runner/src/test/resources/junit-platform.properties index 24014121721..8f4bb9b1598 100644 --- a/fineract-e2e-tests-runner/src/test/resources/junit-platform.properties +++ b/fineract-e2e-tests-runner/src/test/resources/junit-platform.properties @@ -16,13 +16,12 @@ # specific language governing permissions and limitations # under the License. # - cucumber.execution.parallel.enabled=false cucumber.execution.parallel.config.strategy=fixed cucumber.execution.parallel.config.fixed.parallelism=3 cucumber.execution.parallel.config.fixed.max-pool-size=3 junit.jupiter.execution.parallel.config.fixed.parallelism=3 -junit.jupiter.execution.parallel.enabled = false +junit.jupiter.execution.parallel.enabled=false junit.jupiter.execution.parallel.config.strategy=fixed cucumber.plugin=pretty cucumber.filter.tags=not @Skip diff --git a/fineract-e2e-tests-runner/src/test/resources/logback.xml b/fineract-e2e-tests-runner/src/test/resources/logback.xml index 21fa4bcfaea..fa3d18c25d1 100644 --- a/fineract-e2e-tests-runner/src/test/resources/logback.xml +++ b/fineract-e2e-tests-runner/src/test/resources/logback.xml @@ -26,9 +26,9 @@ - + - + diff --git a/fineract-investor/build.gradle b/fineract-investor/build.gradle index 29c9846ff27..51906b1634d 100644 --- a/fineract-investor/build.gradle +++ b/fineract-investor/build.gradle @@ -52,9 +52,9 @@ apply from: 'dependencies.gradle' // https://github.com/andygoossens/gradle-modernizer-plugin modernizer { ignoreClassNamePatterns = [ - '.*AbstractPersistableCustom', - '.*EntityTables', - '.*domain.*' + '.*AbstractPersistableCustom', + '.*EntityTables', + '.*domain.*' ] } @@ -66,7 +66,7 @@ if (project.hasProperty('env') && project.getProperty('env') == 'eclipse') { eclipse { project { - buildCommand([ LaunchConfigHandle: "/.externalToolBuilders/OpenJPA Enhance Builder.launch" ], 'org.eclipse.ui.externaltools.ExternalToolBuilder') + buildCommand([LaunchConfigHandle: "/.externalToolBuilders/OpenJPA Enhance Builder.launch"], 'org.eclipse.ui.externaltools.ExternalToolBuilder') } } diff --git a/fineract-investor/dependencies.gradle b/fineract-investor/dependencies.gradle index e590c341c05..eaac9e0e024 100644 --- a/fineract-investor/dependencies.gradle +++ b/fineract-investor/dependencies.gradle @@ -32,7 +32,7 @@ dependencies { implementation('org.apache.avro:avro') implementation( project(path: ':fineract-avro-schemas') - ) + ) implementation( 'org.springframework.boot:spring-boot-starter-web', @@ -58,11 +58,11 @@ dependencies { 'io.github.resilience4j:resilience4j-spring-boot3', 'org.reflections:reflections:0.10.2', - ) + ) compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' annotationProcessor 'org.mapstruct:mapstruct-processor' - implementation ('org.springframework.boot:spring-boot-starter-data-jpa') { + implementation('org.springframework.boot:spring-boot-starter-data-jpa') { exclude group: 'org.hibernate' } implementation('org.eclipse.persistence:org.eclipse.persistence.jpa') { @@ -71,13 +71,13 @@ dependencies { // testCompile dependencies are ONLY used in src/test, not src/main. // Do NOT repeat dependencies which are ALREADY in implementation or runtimeOnly! // - testImplementation( 'io.github.classgraph:classgraph' ) - testImplementation ('org.springframework.boot:spring-boot-starter-test') { + testImplementation('io.github.classgraph:classgraph') + testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'com.jayway.jsonpath', module: 'json-path' exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' exclude group: 'jakarta.activation' exclude group: 'javax.activation' exclude group: 'org.skyscreamer' } - testImplementation ('org.mockito:mockito-inline') + testImplementation('org.mockito:mockito-inline') } diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/accounting/journalentry/service/InvestorAccountingHelper.java b/fineract-investor/src/main/java/org/apache/fineract/investor/accounting/journalentry/service/InvestorAccountingHelper.java index 605e46f5921..6fea31efaa2 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/accounting/journalentry/service/InvestorAccountingHelper.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/accounting/journalentry/service/InvestorAccountingHelper.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.closure.domain.GLClosure; import org.apache.fineract.accounting.closure.domain.GLClosureRepository; @@ -67,8 +68,8 @@ public void checkForBranchClosures(Long officeId, final LocalDate transactionDat } public JournalEntry createDebitJournalEntryOrReversalForInvestor(final Office office, final String currencyCode, - final int accountMappingTypeId, final Long loanProductId, final Long loanId, final Long transactionId, - final LocalDate transactionDate, final BigDecimal amount, final Boolean isReversalOrder) { + final int accountMappingTypeId, final Long loanProductId, final Long loanId, final Long transactionId, + final LocalDate transactionDate, final BigDecimal amount, final Boolean isReversalOrder) { final GLAccount account = getLinkedGLAccountForLoanProduct(loanProductId, accountMappingTypeId); if (isReversalOrder) { return createCreditJournalEntryForInvestor(office, currencyCode, account, loanId, transactionId, transactionDate, amount); @@ -78,8 +79,8 @@ public JournalEntry createDebitJournalEntryOrReversalForInvestor(final Office of } public JournalEntry createCreditJournalEntryOrReversalForInvestor(final Office office, final String currencyCode, final Long loanId, - final Long transactionId, final LocalDate transactionDate, final BigDecimal amount, final Boolean isReversalOrder, - final GLAccount account) { + final Long transactionId, final LocalDate transactionDate, final BigDecimal amount, final Boolean isReversalOrder, + final GLAccount account) { if (isReversalOrder) { return createDebitJournalEntryForInvestor(office, currencyCode, account, loanId, transactionId, transactionDate, amount); } else { @@ -88,12 +89,12 @@ public JournalEntry createCreditJournalEntryOrReversalForInvestor(final Office o } public ProductToGLAccountMapping getChargeOffMappingByCodeValue(final Long loanProductId, final PortfolioProductType productType, - final Long chargeOffReasonId) { + final Long chargeOffReasonId) { return accountMappingRepository.findChargeOffReasonMapping(loanProductId, productType.getValue(), chargeOffReasonId); } private JournalEntry createCreditJournalEntryForInvestor(final Office office, final String currencyCode, final GLAccount account, - final Long loanId, final Long transactionId, final LocalDate transactionDate, final BigDecimal amount) { + final Long loanId, final Long transactionId, final LocalDate transactionDate, final BigDecimal amount) { final boolean manualEntry = false; final String modifiedTransactionId = INVESTOR_TRANSFER_IDENTIFIER + transactionId; final JournalEntry journalEntry = JournalEntry.createNew(office, null, account, currencyCode, modifiedTransactionId, manualEntry, @@ -103,7 +104,7 @@ private JournalEntry createCreditJournalEntryForInvestor(final Office office, fi } private JournalEntry createDebitJournalEntryForInvestor(final Office office, final String currencyCode, final GLAccount account, - final Long loanId, final Long transactionId, final LocalDate transactionDate, final BigDecimal amount) { + final Long loanId, final Long transactionId, final LocalDate transactionDate, final BigDecimal amount) { final boolean manualEntry = false; String modifiedTransactionId = INVESTOR_TRANSFER_IDENTIFIER + transactionId; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnerLoanProductAttributesApiConstants.java b/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnerLoanProductAttributesApiConstants.java index 1a2c8837e5f..e5454ab2e9c 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnerLoanProductAttributesApiConstants.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnerLoanProductAttributesApiConstants.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.HashSet; import java.util.Set; + import org.apache.fineract.investor.domain.ExternalAssetOwnerLoanProductAttributes; public final class ExternalAssetOwnerLoanProductAttributesApiConstants { diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnerLoanProductAttributesApiResourceSwagger.java b/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnerLoanProductAttributesApiResourceSwagger.java index a0db5f0b7f2..d3b909e75cd 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnerLoanProductAttributesApiResourceSwagger.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnerLoanProductAttributesApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -20,15 +20,17 @@ import io.swagger.v3.oas.annotations.media.Schema; -@SuppressWarnings({ "MemberName" }) +@SuppressWarnings({"MemberName"}) final class ExternalAssetOwnerLoanProductAttributesApiResourceSwagger { - private ExternalAssetOwnerLoanProductAttributesApiResourceSwagger() {} + private ExternalAssetOwnerLoanProductAttributesApiResourceSwagger() { + } @Schema(description = "PostExternalAssetOwnerLoanProductAttributeRequest") public static final class PostExternalAssetOwnerLoanProductAttributeRequest { - private PostExternalAssetOwnerLoanProductAttributeRequest() {} + private PostExternalAssetOwnerLoanProductAttributeRequest() { + } @Schema(example = "SETTLEMENT_MODEL") public String attributeKey; @@ -40,7 +42,8 @@ private PostExternalAssetOwnerLoanProductAttributeRequest() {} @Schema(description = "PutExternalAssetOwnerLoanProductAttributeRequest") public static final class PutExternalAssetOwnerLoanProductAttributeRequest { - private PutExternalAssetOwnerLoanProductAttributeRequest() {} + private PutExternalAssetOwnerLoanProductAttributeRequest() { + } @Schema(example = "SETTLEMENT_MODEL") public String attributeKey; 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 9f0a91564a0..1739b938bdc 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 @@ -6,9 +6,9 @@ * 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 @@ -39,8 +39,10 @@ import jakarta.ws.rs.Produces; import jakarta.ws.rs.QueryParam; import jakarta.ws.rs.core.MediaType; + import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandHandlerRegistry; import org.apache.fineract.commands.domain.CommandWrapper; @@ -93,14 +95,14 @@ public class ExternalAssetOwnersApiResource { @POST @Path("/transfers/loans/{loanId}") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) + @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") public CommandProcessingResult transferRequestWithLoanId(@PathParam("loanId") final Long loanId, - @Parameter ExternalAssetOwnerRequest assetOwnerReq, - @QueryParam(COMMAND_PARAM) @Parameter(description = COMMAND_PARAM) final String commandParam) { + @Parameter ExternalAssetOwnerRequest assetOwnerReq, + @QueryParam(COMMAND_PARAM) @Parameter(description = COMMAND_PARAM) final String commandParam) { platformUserRightsContext.isAuthenticated(); final String serializedAssetRequest = postApiJsonSerializerService.serialize(assetOwnerReq); final CommandWrapper commandRequest = COMMAND_HANDLER_REGISTRY.execute(commandParam, loanId, serializedAssetRequest, @@ -110,14 +112,14 @@ public CommandProcessingResult transferRequestWithLoanId(@PathParam("loanId") fi @POST @Path("/transfers/loans/external-id/{loanExternalId}") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) + @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") public CommandProcessingResult transferRequestWithLoanExternalId(@PathParam("loanExternalId") final String externalLoanId, - @Parameter ExternalAssetOwnerRequest assetOwnerReq, - @QueryParam(COMMAND_PARAM) @Parameter(description = COMMAND_PARAM) final String commandParam) { + @Parameter ExternalAssetOwnerRequest assetOwnerReq, + @QueryParam(COMMAND_PARAM) @Parameter(description = COMMAND_PARAM) final String commandParam) { platformUserRightsContext.isAuthenticated(); final Long loanId = loanReadPlatformService.getLoanIdByLoanExternalId(externalLoanId); final String serializedAssetRequest = postApiJsonSerializerService.serialize(assetOwnerReq); @@ -129,13 +131,13 @@ public CommandProcessingResult transferRequestWithLoanExternalId(@PathParam("loa @POST @Path("/transfers/{id}") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) @Operation(summary = "Transfer external asset", operationId = "transferRequestWithId") @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) { + @QueryParam(COMMAND_PARAM) @Parameter(description = COMMAND_PARAM) final String commandParam) { platformUserRightsContext.isAuthenticated(); final CommandWrapper commandRequest = COMMAND_HANDLER_REGISTRY.execute(commandParam, id, null, new UnrecognizedQueryParamException(COMMAND_PARAM, commandParam)); @@ -144,13 +146,13 @@ public CommandProcessingResult transferRequestWithId(@PathParam("id") final Long @POST @Path("/transfers/external-id/{externalId}") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) @Operation(summary = "Transfer external asset by external ID", operationId = "transferRequestWithIdByExternalId") @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) { + @QueryParam(COMMAND_PARAM) @Parameter(description = COMMAND_PARAM) final String commandParam) { platformUserRightsContext.isAuthenticated(); final Long id = externalAssetOwnersReadService.retrieveLastTransferIdByExternalId(new ExternalId(externalId)); final CommandWrapper commandRequest = COMMAND_HANDLER_REGISTRY.execute(commandParam, id, null, @@ -160,9 +162,9 @@ public CommandProcessingResult transferRequestWithId(@PathParam("externalId") fi @GET @Path("/transfers") - @Produces({ MediaType.APPLICATION_JSON }) + @Produces({MediaType.APPLICATION_JSON}) @Operation(tags = { - "External Asset Owners" }, summary = "Retrieve External Asset Owner Transfers", description = "Retrieve External Asset Owner Transfer items by transferExternalId, loanId or loanExternalId") + "External Asset Owners"}, summary = "Retrieve External Asset Owner Transfers", description = "Retrieve External Asset Owner Transfer items by transferExternalId, loanId or loanExternalId") public Page getTransfers( @QueryParam("transferExternalId") @Parameter(description = "transferExternalId") final String transferExternalId, @QueryParam("loanId") @Parameter(description = "loanId") final Long loanId, @@ -175,9 +177,9 @@ public Page getTransfers( @GET @Path("/transfers/active-transfer") - @Produces({ MediaType.APPLICATION_JSON }) + @Produces({MediaType.APPLICATION_JSON}) @Operation(tags = { - "External Asset Owners" }, summary = "Retrieve Active Asset Owner Transfer", description = "Retrieve Active External Asset Owner Transfer by transferExternalId, loanId or loanExternalId") + "External Asset Owners"}, summary = "Retrieve Active Asset Owner Transfer", description = "Retrieve Active External Asset Owner Transfer by transferExternalId, loanId or loanExternalId") public ExternalTransferData getActiveTransfer( @QueryParam("transferExternalId") @Parameter(description = "transferExternalId") final String transferExternalId, @QueryParam("loanId") @Parameter(description = "loanId") final Long loanId, @@ -188,9 +190,9 @@ public ExternalTransferData getActiveTransfer( @GET @Path("/transfers/{transferId}/journal-entries") - @Produces({ MediaType.APPLICATION_JSON }) + @Produces({MediaType.APPLICATION_JSON}) @Operation(tags = { - "External Asset Owners" }, summary = "Retrieve Journal Entries of Transfer", description = "Retrieve Journal entries of transfer by transferId") + "External Asset Owners"}, summary = "Retrieve Journal Entries of Transfer", description = "Retrieve Journal entries of transfer by transferId") public ExternalOwnerTransferJournalEntryData getJournalEntriesOfTransfer( @PathParam("transferId") @Parameter(description = "transferId") final Long transferId, @QueryParam("offset") @Parameter(description = "offset") final Integer offset, @@ -201,9 +203,9 @@ public ExternalOwnerTransferJournalEntryData getJournalEntriesOfTransfer( @GET @Path("/owners/external-id/{ownerExternalId}/journal-entries") - @Produces({ MediaType.APPLICATION_JSON }) + @Produces({MediaType.APPLICATION_JSON}) @Operation(tags = { - "External Asset Owners" }, summary = "Retrieve Journal Entries of Owner", description = "Retrieve Journal entries of owner by owner externalId") + "External Asset Owners"}, summary = "Retrieve Journal Entries of Owner", description = "Retrieve Journal entries of owner by owner externalId") public ExternalOwnerJournalEntryData getJournalEntriesOfOwner( @PathParam("ownerExternalId") @Parameter(description = "ownerExternalId") final String ownerExternalId, @QueryParam("offset") @Parameter(description = "offset") final Integer offset, @@ -214,8 +216,8 @@ public ExternalOwnerJournalEntryData getJournalEntriesOfOwner( @POST @Path("/search") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) @Operation(summary = "Search External Asset Owner Transfers by text or date ranges to settlement or effective dates") public Page searchInvestorData(@Parameter PagedRequest request) { platformUserRightsContext.isAuthenticated(); @@ -223,8 +225,8 @@ public Page searchInvestorData(@Parameter PagedRequest retrieveExternalAssetOwners() { platformUserRightsContext.isAuthenticated(); diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnersApiResourceSwagger.java b/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnersApiResourceSwagger.java index ea5a3f18307..b5cf41d5b6c 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnersApiResourceSwagger.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/api/ExternalAssetOwnersApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,17 +19,20 @@ package org.apache.fineract.investor.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; -@SuppressWarnings({ "MemberName" }) +@SuppressWarnings({"MemberName"}) final class ExternalAssetOwnersApiResourceSwagger { - private ExternalAssetOwnersApiResourceSwagger() {} + private ExternalAssetOwnersApiResourceSwagger() { + } @Schema(description = "PostInitiateTransferResponse") public static final class PostInitiateTransferResponse { - private PostInitiateTransferResponse() {} + private PostInitiateTransferResponse() { + } @Schema(example = "1", description = "transfer ID") public Long resourceId; @@ -71,7 +74,8 @@ static final class ExternalAssetOwnerTransferChangesData { @Schema(description = "PostExternalAssetOwnerRequest") public static final class PostExternalAssetOwnerRequest { - private PostExternalAssetOwnerRequest() {} + private PostExternalAssetOwnerRequest() { + } @Schema(example = "36efeb06-d835-48a1-99eb-09bd1d348c1e", description = "External Asset Owner External Id") public String ownerExternalId; @@ -80,7 +84,8 @@ private PostExternalAssetOwnerRequest() {} @Schema(description = "PostExternalAssetOwnerResponse") public static final class PostExternalAssetOwnerResponse { - private PostExternalAssetOwnerResponse() {} + private PostExternalAssetOwnerResponse() { + } @Schema(example = "1", description = "External Asset Owner Id") public Long resourceId; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/api/search/ExternalAssetOwnersSearchApi.java b/fineract-investor/src/main/java/org/apache/fineract/investor/api/search/ExternalAssetOwnersSearchApi.java index dde0dc564f9..e82bc855c5f 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/api/search/ExternalAssetOwnersSearchApi.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/api/search/ExternalAssetOwnersSearchApi.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/api/search/ExternalAssetOwnersSearchApiDelegate.java b/fineract-investor/src/main/java/org/apache/fineract/investor/api/search/ExternalAssetOwnersSearchApiDelegate.java index 861404dc1a2..f625219bacd 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/api/search/ExternalAssetOwnersSearchApiDelegate.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/api/search/ExternalAssetOwnersSearchApiDelegate.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/config/InvestorModuleIsEnabledCondition.java b/fineract-investor/src/main/java/org/apache/fineract/investor/config/InvestorModuleIsEnabledCondition.java index afea92a5f78..727dae196e6 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/config/InvestorModuleIsEnabledCondition.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/config/InvestorModuleIsEnabledCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/config/LoanAccountOwnerTransferConfiguration.java b/fineract-investor/src/main/java/org/apache/fineract/investor/config/LoanAccountOwnerTransferConfiguration.java index 7d1844492cd..725fd02f862 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/config/LoanAccountOwnerTransferConfiguration.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/config/LoanAccountOwnerTransferConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalAssetOwnerLoanProductAttributeRequestParameters.java b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalAssetOwnerLoanProductAttributeRequestParameters.java index a127b0fcd12..65724f20416 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalAssetOwnerLoanProductAttributeRequestParameters.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalAssetOwnerLoanProductAttributeRequestParameters.java @@ -6,9 +6,9 @@ * 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 @@ -20,7 +20,8 @@ public final class ExternalAssetOwnerLoanProductAttributeRequestParameters { - private ExternalAssetOwnerLoanProductAttributeRequestParameters() {} + private ExternalAssetOwnerLoanProductAttributeRequestParameters() { + } public static final String ATTRIBUTE_KEY = "attributeKey"; public static final String ATTRIBUTE_VALUE = "attributeValue"; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalOwnerJournalEntryData.java b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalOwnerJournalEntryData.java index c2958bdd009..495b409d30b 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalOwnerJournalEntryData.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalOwnerJournalEntryData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalOwnerTransferJournalEntryData.java b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalOwnerTransferJournalEntryData.java index 047f41a8dcd..7e8b06e857c 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalOwnerTransferJournalEntryData.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalOwnerTransferJournalEntryData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferChangedData.java b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferChangedData.java index 7df77203bcc..ec91579a7cb 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferChangedData.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferChangedData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.investor.data; import java.time.LocalDate; + import lombok.Data; @Data diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferData.java b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferData.java index 9e514dee741..ad80acaf519 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferData.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.investor.data; import java.time.LocalDate; + import lombok.Data; @Data diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferDataDetails.java b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferDataDetails.java index 2e8d509dae6..3f11dc4144f 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferDataDetails.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferDataDetails.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.investor.data; import java.math.BigDecimal; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferLoanData.java b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferLoanData.java index 92f59991630..01400fdd714 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferLoanData.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferLoanData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferLoanProductAttributesData.java b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferLoanProductAttributesData.java index a1eaee87b2c..b96646928c8 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferLoanProductAttributesData.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferLoanProductAttributesData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.investor.data; import java.io.Serializable; + import lombok.Data; import lombok.Getter; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferOwnerData.java b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferOwnerData.java index c8e80a9d6fa..de1e7ce6b13 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferOwnerData.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferOwnerData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferRequestParameters.java b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferRequestParameters.java index 6a6e1ef0f04..03d4347f004 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferRequestParameters.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferRequestParameters.java @@ -6,9 +6,9 @@ * 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 @@ -20,7 +20,8 @@ public final class ExternalTransferRequestParameters { - private ExternalTransferRequestParameters() {} + private ExternalTransferRequestParameters() { + } public static final String SETTLEMENT_DATE = "settlementDate"; public static final String OWNER_EXTERNAL_ID = "ownerExternalId"; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferResponseData.java b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferResponseData.java index b6cc3bbd53b..25a1274ae4e 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferResponseData.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferResponseData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferStatus.java b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferStatus.java index c0244ac9398..903418a0019 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferStatus.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferStatus.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferSubStatus.java b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferSubStatus.java index 748703a5407..d4ddbea035c 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferSubStatus.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/data/ExternalTransferSubStatus.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/data/attribute/ExternalAssetOwnerLoanProductAttribute.java b/fineract-investor/src/main/java/org/apache/fineract/investor/data/attribute/ExternalAssetOwnerLoanProductAttribute.java index 99b8a2d2e9e..f6fc6d677e9 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/data/attribute/ExternalAssetOwnerLoanProductAttribute.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/data/attribute/ExternalAssetOwnerLoanProductAttribute.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/data/attribute/SettlementModelExternalAssetOwnerLoanProductAttribute.java b/fineract-investor/src/main/java/org/apache/fineract/investor/data/attribute/SettlementModelExternalAssetOwnerLoanProductAttribute.java index 76d63e32430..6577fbb496c 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/data/attribute/SettlementModelExternalAssetOwnerLoanProductAttribute.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/data/attribute/SettlementModelExternalAssetOwnerLoanProductAttribute.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/data/request/ExternalAssetOwnerRequest.java b/fineract-investor/src/main/java/org/apache/fineract/investor/data/request/ExternalAssetOwnerRequest.java index 7fda8deabf9..6675a6201c9 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/data/request/ExternalAssetOwnerRequest.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/data/request/ExternalAssetOwnerRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/AttributeKey.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/AttributeKey.java index f874eaf1f80..ad0072631be 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/AttributeKey.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/AttributeKey.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwner.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwner.java index d5d657dd418..403013ee307 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwner.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwner.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerJournalEntryMapping.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerJournalEntryMapping.java index 9cc47e225a5..1b70847a7f1 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerJournalEntryMapping.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerJournalEntryMapping.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerJournalEntryMappingRepository.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerJournalEntryMappingRepository.java index 4a30aedf18f..a0b337b8f6c 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerJournalEntryMappingRepository.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerJournalEntryMappingRepository.java @@ -6,9 +6,9 @@ * 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 @@ -31,5 +31,5 @@ public interface ExternalAssetOwnerJournalEntryMappingRepository extends JpaRepo @Query("SELECT mapping FROM ExternalAssetOwnerJournalEntryMapping mapping WHERE mapping.owner.externalId = :ownerExternalId") Page findByExternalOwnerId(@Param("ownerExternalId") ExternalId ownerExternalId, - Pageable pageRequest); + Pageable pageRequest); } diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerLoanProductAttribute.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerLoanProductAttribute.java index fb08c382094..1f466be8e83 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerLoanProductAttribute.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerLoanProductAttribute.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerLoanProductAttributes.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerLoanProductAttributes.java index 80e538182eb..00fc1efefa6 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerLoanProductAttributes.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerLoanProductAttributes.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerLoanProductAttributesRepository.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerLoanProductAttributesRepository.java index 8b088de92e8..d2d9d114231 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerLoanProductAttributesRepository.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerLoanProductAttributesRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerRepository.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerRepository.java index dacf5455fd4..49d97d5fd7f 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerRepository.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.investor.domain; import java.util.Optional; + import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransfer.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransfer.java index 72948bfa17e..f72679d9b01 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransfer.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransfer.java @@ -6,9 +6,9 @@ * 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 @@ -27,7 +27,9 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToOne; import jakarta.persistence.Table; + import java.time.LocalDate; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferDetails.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferDetails.java index 13ae8323fb9..abb48c22ab3 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferDetails.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferDetails.java @@ -6,9 +6,9 @@ * 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 @@ -24,8 +24,10 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.OneToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.util.Objects; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferJournalEntryMapping.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferJournalEntryMapping.java index 4be09f20b34..6252a8fa97c 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferJournalEntryMapping.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferJournalEntryMapping.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferJournalEntryMappingRepository.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferJournalEntryMappingRepository.java index ebff08ce76b..b8d53ae232b 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferJournalEntryMappingRepository.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferJournalEntryMappingRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferLoanMapping.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferLoanMapping.java index 0f6cb1f9b7f..941d99d73bd 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferLoanMapping.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferLoanMapping.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferLoanMappingRepository.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferLoanMappingRepository.java index f6b238bd6a5..f77602d14fa 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferLoanMappingRepository.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferLoanMappingRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.investor.domain; import java.util.Optional; + import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferRepository.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferRepository.java index ce1a71f5e2c..4092913ac99 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferRepository.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalAssetOwnerTransferRepository.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.List; import java.util.Optional; + import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; @@ -49,7 +50,7 @@ public interface ExternalAssetOwnerTransferRepository @Query("SELECT t FROM ExternalAssetOwnerTransfer t WHERE t.loanId = :loanId AND t.effectiveDateTo > :effectiveDate order by t.id desc") List findEffectiveTransfersOrderByIdDesc(@Param("loanId") Long loanId, - @Param("effectiveDate") LocalDate effectiveDate); + @Param("effectiveDate") LocalDate effectiveDate); Optional findFirstByExternalIdOrderByIdAsc(ExternalId externalTransferId); diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalIdConverter.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalIdConverter.java index cc7172980f2..099c83633d3 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalIdConverter.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/ExternalIdConverter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/InvestorBusinessEvent.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/InvestorBusinessEvent.java index 1d033a196a9..b3bf0e55b59 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/InvestorBusinessEvent.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/InvestorBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/LoanOwnershipTransferBusinessEvent.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/LoanOwnershipTransferBusinessEvent.java index b6aa670687e..e97f6883cfb 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/LoanOwnershipTransferBusinessEvent.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/LoanOwnershipTransferBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/search/SearchedExternalAssetOwner.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/search/SearchedExternalAssetOwner.java index 3269ae4b5ae..2694fb2d2d3 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/search/SearchedExternalAssetOwner.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/search/SearchedExternalAssetOwner.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.ExternalId; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/search/SearchingExternalAssetOwnerRepository.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/search/SearchingExternalAssetOwnerRepository.java index 44683acb68e..aa701e80001 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/search/SearchingExternalAssetOwnerRepository.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/search/SearchingExternalAssetOwnerRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/search/SearchingExternalAssetOwnerRepositoryImpl.java b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/search/SearchingExternalAssetOwnerRepositoryImpl.java index 7ebc5c7a2f4..8de4e353e40 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/domain/search/SearchingExternalAssetOwnerRepositoryImpl.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/domain/search/SearchingExternalAssetOwnerRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -28,8 +28,10 @@ import jakarta.persistence.criteria.Path; import jakarta.persistence.criteria.Predicate; import jakarta.persistence.criteria.Root; + import java.util.ArrayList; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.jpa.CriteriaQueryFactory; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/enricher/LoanAccountDataV1Enricher.java b/fineract-investor/src/main/java/org/apache/fineract/investor/enricher/LoanAccountDataV1Enricher.java index ff3e0bb5914..0f2b67e0388 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/enricher/LoanAccountDataV1Enricher.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/enricher/LoanAccountDataV1Enricher.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/enricher/LoanChargeDataV1Enricher.java b/fineract-investor/src/main/java/org/apache/fineract/investor/enricher/LoanChargeDataV1Enricher.java index 3413b0b4737..2b7ed1d04b3 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/enricher/LoanChargeDataV1Enricher.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/enricher/LoanChargeDataV1Enricher.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/enricher/LoanTransactionAdjustmentDataV1Enricher.java b/fineract-investor/src/main/java/org/apache/fineract/investor/enricher/LoanTransactionAdjustmentDataV1Enricher.java index 3ce77031ca1..d68f0194689 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/enricher/LoanTransactionAdjustmentDataV1Enricher.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/enricher/LoanTransactionAdjustmentDataV1Enricher.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/enricher/LoanTransactionDataV1Enricher.java b/fineract-investor/src/main/java/org/apache/fineract/investor/enricher/LoanTransactionDataV1Enricher.java index 8c8f4d4d145..b768d8ea75a 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/enricher/LoanTransactionDataV1Enricher.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/enricher/LoanTransactionDataV1Enricher.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerDuplicateException.java b/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerDuplicateException.java index 450a7f0f3fb..38b7363c576 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerDuplicateException.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerDuplicateException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerInitiateTransferException.java b/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerInitiateTransferException.java index 6fc4bcd8a21..7934b7b95ef 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerInitiateTransferException.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerInitiateTransferException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerLoanProductAttributeAlreadyExistsException.java b/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerLoanProductAttributeAlreadyExistsException.java index 0c8f42181a0..8b45223fac9 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerLoanProductAttributeAlreadyExistsException.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerLoanProductAttributeAlreadyExistsException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerLoanProductAttributeInvalidSettlementAttributeException.java b/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerLoanProductAttributeInvalidSettlementAttributeException.java index a9e90bcffad..3bf0b29da01 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerLoanProductAttributeInvalidSettlementAttributeException.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerLoanProductAttributeInvalidSettlementAttributeException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerLoanProductAttributeNotFoundException.java b/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerLoanProductAttributeNotFoundException.java index 342c82c3ced..2a6c00e68c3 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerLoanProductAttributeNotFoundException.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerLoanProductAttributeNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerLoanProductAttributesException.java b/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerLoanProductAttributesException.java index 4e47df7e167..cb58a4e7f77 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerLoanProductAttributesException.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerLoanProductAttributesException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerNotFoundException.java b/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerNotFoundException.java index 67f8094a688..bc5260fe398 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerNotFoundException.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerTransferNotFoundException.java b/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerTransferNotFoundException.java index 2446291f3e9..e11574110ab 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerTransferNotFoundException.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/exception/ExternalAssetOwnerTransferNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/exception/exceptionmapper/ExternalAssetOwnerInitiateTransferExceptionMapper.java b/fineract-investor/src/main/java/org/apache/fineract/investor/exception/exceptionmapper/ExternalAssetOwnerInitiateTransferExceptionMapper.java index 243ac83c032..29b39a3ae52 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/exception/exceptionmapper/ExternalAssetOwnerInitiateTransferExceptionMapper.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/exception/exceptionmapper/ExternalAssetOwnerInitiateTransferExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/internal/InternalAPIForTesting.java b/fineract-investor/src/main/java/org/apache/fineract/investor/internal/InternalAPIForTesting.java index fc10dbc2a26..bd6eee9b910 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/internal/InternalAPIForTesting.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/internal/InternalAPIForTesting.java @@ -6,9 +6,9 @@ * 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 @@ -18,4 +18,5 @@ */ package org.apache.fineract.investor.internal; -public class InternalAPIForTesting {} +public class InternalAPIForTesting { +} diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/serialization/ExternalAssetOwnerValidator.java b/fineract-investor/src/main/java/org/apache/fineract/investor/serialization/ExternalAssetOwnerValidator.java index 918d3352731..b2545b62cbd 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/serialization/ExternalAssetOwnerValidator.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/serialization/ExternalAssetOwnerValidator.java @@ -7,9 +7,9 @@ * 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 @@ -20,7 +20,9 @@ package org.apache.fineract.investor.serialization; import com.google.gson.JsonElement; + import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/AccountingService.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/AccountingService.java index e7a1e892a0a..5615aca79b5 100755 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/AccountingService.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/AccountingService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/AccountingServiceImpl.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/AccountingServiceImpl.java index 98dcc227356..d48d5495dfa 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/AccountingServiceImpl.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/AccountingServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.common.AccountingConstants; import org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount; @@ -59,7 +60,7 @@ public class AccountingServiceImpl implements AccountingService { @Override public void createJournalEntriesForSaleAssetTransfer(final Loan loan, final ExternalAssetOwnerTransfer transfer, - final ExternalAssetOwner previousOwner) { + final ExternalAssetOwner previousOwner) { final ExternalAssetOwner newOwner = transfer.getOwner(); List journalEntryList = createJournalEntries(loan, transfer, true); @@ -99,7 +100,7 @@ public void createJournalEntriesForBuybackAssetTransfer(final Loan loan, final E @NonNull private List createJournalEntries(final Loan loan, final ExternalAssetOwnerTransfer transfer, - final boolean isReversalOrder) { + final boolean isReversalOrder) { this.helper.checkForBranchClosures(loan.getOffice().getId(), transfer.getSettlementDate()); // transaction properties final Long transactionId = transfer.getId(); @@ -133,7 +134,7 @@ public void createMappingToOwner(final ExternalAssetOwner owner, final JournalEn } private ExternalAssetOwner determineOwnerForSale(final JournalEntry journalEntry, final Loan loan, - final ExternalAssetOwner previousOwner, final ExternalAssetOwner newOwner) { + final ExternalAssetOwner previousOwner, final ExternalAssetOwner newOwner) { final boolean isOverpaid = LoanStatus.OVERPAID.equals(loan.getStatus()); if (isOverpaid) { @@ -156,7 +157,7 @@ private ExternalAssetOwner determineOwnerForSale(final JournalEntry journalEntry } private ExternalAssetOwner determineOwnerForBuyback(final JournalEntry journalEntry, final Loan loan, - final ExternalAssetOwner previousOwner) { + final ExternalAssetOwner previousOwner) { final boolean isOverpaid = LoanStatus.OVERPAID.equals(loan.getStatus()); if (isOverpaid && journalEntry.isDebitEntry()) { return previousOwner; @@ -179,8 +180,8 @@ private void createMappingToTransfer(ExternalAssetOwnerTransfer transfer, List createJournalEntries(final Loan loan, final Long transactionId, final LocalDate transactionDate, - final BigDecimal principalAmount, final BigDecimal interestAmount, final BigDecimal feesAmount, - final BigDecimal penaltiesAmount, final BigDecimal overPaymentAmount, final boolean isReversalOrder) { + final BigDecimal principalAmount, final BigDecimal interestAmount, final BigDecimal feesAmount, + final BigDecimal penaltiesAmount, final BigDecimal overPaymentAmount, final boolean isReversalOrder) { final Long loanProductId = loan.productId(); final Long loanId = loan.getId(); final Office office = loan.getOffice(); diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/BuybackLoanFromExternalAssetOwnerHandler.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/BuybackLoanFromExternalAssetOwnerHandler.java index 00977500cf9..ed6f944dc1b 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/BuybackLoanFromExternalAssetOwnerHandler.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/BuybackLoanFromExternalAssetOwnerHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/CancelLoanFromExternalAssetOwnerHandler.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/CancelLoanFromExternalAssetOwnerHandler.java index 7e40e368295..e49c9903e1c 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/CancelLoanFromExternalAssetOwnerHandler.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/CancelLoanFromExternalAssetOwnerHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/CancelTransactionFromExternalAssetOwnerHandler.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/CancelTransactionFromExternalAssetOwnerHandler.java index 8200734b97e..eddc2870648 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/CancelTransactionFromExternalAssetOwnerHandler.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/CancelTransactionFromExternalAssetOwnerHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/CreateExternalAssetOwnerHandler.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/CreateExternalAssetOwnerHandler.java index e06ddfa580b..a633b63f171 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/CreateExternalAssetOwnerHandler.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/CreateExternalAssetOwnerHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/CreateExternalAssetOwnerLoanProductAttributeHandler.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/CreateExternalAssetOwnerLoanProductAttributeHandler.java index 2261a318a89..0a58c22927a 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/CreateExternalAssetOwnerLoanProductAttributeHandler.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/CreateExternalAssetOwnerLoanProductAttributeHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/DelayedSettlementAttributeService.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/DelayedSettlementAttributeService.java index 6d8f2a5b51d..21eeef8a92f 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/DelayedSettlementAttributeService.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/DelayedSettlementAttributeService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/DelayedSettlementAttributeServiceImpl.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/DelayedSettlementAttributeServiceImpl.java index c558f62010c..19f307178b6 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/DelayedSettlementAttributeServiceImpl.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/DelayedSettlementAttributeServiceImpl.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerHelper.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerHelper.java index 7558c67f126..19a15ced56d 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerHelper.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerHelper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerJournalEntryService.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerJournalEntryService.java index a2a06c877c3..c2cf7415e64 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerJournalEntryService.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerJournalEntryService.java @@ -6,9 +6,9 @@ * 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 @@ -18,4 +18,5 @@ */ package org.apache.fineract.investor.service; -public interface ExternalAssetOwnerJournalEntryService {} +public interface ExternalAssetOwnerJournalEntryService { +} diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerJournalEntryServiceImpl.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerJournalEntryServiceImpl.java index 186bb64c70c..387b1ee358f 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerJournalEntryServiceImpl.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerJournalEntryServiceImpl.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesMapper.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesMapper.java index 68017a99a08..5ec8bcc29b6 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesMapper.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesReadService.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesReadService.java index 4f76aeb3c3d..3c4e33d5cee 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesReadService.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesReadService.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,6 @@ public interface ExternalAssetOwnerLoanProductAttributesReadService { Page retrieveAllLoanProductAttributesByLoanProductId(Long loanProductId, - String attributeKey); + String attributeKey); } diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesReadServiceImpl.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesReadServiceImpl.java index 5206043af50..695e551b259 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesReadServiceImpl.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesReadServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.investor.service; import jakarta.persistence.criteria.Predicate; + import java.util.ArrayList; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.service.Page; @@ -48,7 +50,7 @@ public class ExternalAssetOwnerLoanProductAttributesReadServiceImpl implements E @Override @Cacheable(cacheNames = "externalAssetOwnerLoanProductAttributes", key = "T(org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil).getTenant().getTenantIdentifier().concat(#loanProductId.toString() + #attributeKey)", unless = "#attributeKey == null") public Page retrieveAllLoanProductAttributesByLoanProductId(final Long loanProductId, - final String attributeKey) { + final String attributeKey) { validateLoanProduct(loanProductId); PageRequest pageRequest = PageRequest.of(0, 100, Sort.by("id")); diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesWriteService.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesWriteService.java index 13aa8d746ed..fb5b69f2cbc 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesWriteService.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesWriteService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesWriteServiceImpl.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesWriteServiceImpl.java index 1e24c98d248..f5113630461 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesWriteServiceImpl.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesWriteServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; import jakarta.transaction.Transactional; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -31,6 +32,7 @@ import java.util.Map; import java.util.Optional; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -86,7 +88,7 @@ public CommandProcessingResult createExternalAssetOwnerLoanProductAttribute(Json @Override @CacheEvict(cacheNames = "externalAssetOwnerLoanProductAttributes", key = "T(org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil).getTenant().getTenantIdentifier().concat(#command.getProductId().toString() + #attributeKey)") public CommandProcessingResult updateExternalAssetOwnerLoanProductAttribute(JsonCommand command, String attributeKey, - String attributeValue) { + String attributeValue) { Long loanProductId = command.getProductId(); Long attributeId = command.entityId(); validateLoanProductAttributeRequest(command.json(), attributeKey, attributeValue); @@ -105,7 +107,8 @@ private void validateLoanProductAttributeRequest(String apiRequestBodyAsJson, St final Set requestParameters = new HashSet<>( Arrays.asList(ExternalAssetOwnerLoanProductAttributeRequestParameters.ATTRIBUTE_KEY, ExternalAssetOwnerLoanProductAttributeRequestParameters.ATTRIBUTE_VALUE)); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, apiRequestBodyAsJson, requestParameters); final List dataValidationErrors = new ArrayList<>(); @@ -174,7 +177,7 @@ private ExternalAssetOwnerLoanProductAttributes getLoanProductAttribute(Long att } private ExternalAssetOwnerLoanProductAttributes createExternalAssetOwnerLoanProductAttribute(Long loanProductId, String attributeKey, - String attributeValue) { + String attributeValue) { ExternalAssetOwnerLoanProductAttributes attribute = new ExternalAssetOwnerLoanProductAttributes(); attribute.setLoanProductId(loanProductId); attribute.setAttributeKey(attributeKey); diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanStatusChangePlatformService.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanStatusChangePlatformService.java index eb97c684498..d7f1271f72b 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanStatusChangePlatformService.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanStatusChangePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -18,4 +18,5 @@ */ package org.apache.fineract.investor.service; -public interface ExternalAssetOwnerLoanStatusChangePlatformService {} +public interface ExternalAssetOwnerLoanStatusChangePlatformService { +} diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanStatusChangePlatformServiceImpl.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanStatusChangePlatformServiceImpl.java index 7674a7777c4..46386541ee9 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanStatusChangePlatformServiceImpl.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanStatusChangePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerTransferOutstandingInterestCalculation.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerTransferOutstandingInterestCalculation.java index 5926ed6c826..167915cd2d3 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerTransferOutstandingInterestCalculation.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnerTransferOutstandingInterestCalculation.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.investor.service; import java.math.BigDecimal; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; import org.apache.fineract.infrastructure.core.service.DateUtils; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersReadService.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersReadService.java index d42338f9753..9403346c043 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersReadService.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersReadService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.investor.service; import java.util.List; + import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.apache.fineract.investor.data.ExternalOwnerJournalEntryData; import org.apache.fineract.investor.data.ExternalOwnerTransferJournalEntryData; @@ -29,7 +30,7 @@ public interface ExternalAssetOwnersReadService { Page retrieveTransferData(Long loanId, String externalLoanId, String externalTransferId, Integer offset, - Integer limit); + Integer limit); ExternalTransferData retrieveTransferData(Long transferId); diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersReadServiceImpl.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersReadServiceImpl.java index 8c336ab10ba..69dec62fa71 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersReadServiceImpl.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersReadServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Optional; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.journalentry.JournalEntryMapper; import org.apache.fineract.infrastructure.core.domain.ExternalId; @@ -59,7 +60,7 @@ public class ExternalAssetOwnersReadServiceImpl implements ExternalAssetOwnersRe @Override public Page retrieveTransferData(Long loanId, String externalLoanId, String externalTransferId, Integer offset, - Integer limit) { + Integer limit) { Page result; PageRequest pageRequest = getPageRequest(offset, limit); if (loanId != null) { diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersTransferMapper.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersTransferMapper.java index 3ca32ae3aa9..a1fd097bb67 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersTransferMapper.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersTransferMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.investor.service; import java.util.List; + import org.apache.fineract.accounting.journalentry.JournalEntryMapper; import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.investor.data.ExternalTransferData; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersWriteService.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersWriteService.java index 8b0dea4cc9d..82215cb5813 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersWriteService.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/ExternalAssetOwnersWriteService.java @@ -6,9 +6,9 @@ * 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 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 20c6c03a916..ffbe64eb6e0 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 @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.sql.SQLException; import java.time.LocalDate; @@ -36,6 +37,7 @@ import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.cob.data.LoanDataForExternalTransfer; @@ -307,7 +309,7 @@ private ExternalAssetOwnerTransfer fetchAndValidateEffectiveTransferForCancel(fi } private ExternalAssetOwnerTransfer createBuybackTransfer(ExternalAssetOwnerTransfer effectiveTransfer, LocalDate settlementDate, - ExternalId externalId) { + ExternalId externalId) { LocalDate effectiveDateFrom = DateUtils.getBusinessLocalDate(); ExternalAssetOwnerTransfer externalAssetOwnerTransfer = new ExternalAssetOwnerTransfer(); diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/IntermediarySaleToExternalAssetOwnerHandler.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/IntermediarySaleToExternalAssetOwnerHandler.java index 9c41b5bd3b5..1ed14a0da81 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/IntermediarySaleToExternalAssetOwnerHandler.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/IntermediarySaleToExternalAssetOwnerHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/LoanAccountOwnerTransferService.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/LoanAccountOwnerTransferService.java index d51fb819baa..4277e0c002b 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/LoanAccountOwnerTransferService.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/LoanAccountOwnerTransferService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/LoanAccountOwnerTransferServiceImpl.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/LoanAccountOwnerTransferServiceImpl.java index 5d397a003ad..68d0de8114e 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/LoanAccountOwnerTransferServiceImpl.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/LoanAccountOwnerTransferServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -35,6 +35,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.service.MathUtil; @@ -115,7 +116,7 @@ private void executePendingBuybackTransfer(final Loan loan, ExternalAssetOwnerTr } private ExternalAssetOwnerTransfer createCancelledTransfer(ExternalAssetOwnerTransfer pendingTransfer, - ExternalTransferSubStatus subStatus) { + ExternalTransferSubStatus subStatus) { ExternalAssetOwnerTransfer cancelledTransfer = new ExternalAssetOwnerTransfer(); cancelledTransfer.setOwner(pendingTransfer.getOwner()); cancelledTransfer.setExternalId(pendingTransfer.getExternalId()); @@ -164,7 +165,7 @@ private void updateActiveTransfer(ExternalAssetOwnerTransfer activeTransfer) { } private ExternalAssetOwnerTransferDetails createAssetOwnerTransferDetails(Loan loan, - ExternalAssetOwnerTransfer externalAssetOwnerTransfer) { + ExternalAssetOwnerTransfer externalAssetOwnerTransfer) { ExternalAssetOwnerTransferDetails details = new ExternalAssetOwnerTransferDetails(); details.setExternalAssetOwnerTransfer(externalAssetOwnerTransfer); details.setTotalPrincipalOutstanding(loan.getSummary().getTotalPrincipalOutstanding()); diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/LoanTransferabilityService.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/LoanTransferabilityService.java index 0863436ab9a..22adf60f2b0 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/LoanTransferabilityService.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/LoanTransferabilityService.java @@ -6,9 +6,9 @@ * 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 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..0ad9cf4b098 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 @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.investor.service; import java.math.BigDecimal; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.MathUtil; import org.apache.fineract.investor.data.ExternalTransferStatus; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/SaleLoanToExternalAssetOwnerHandler.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/SaleLoanToExternalAssetOwnerHandler.java index 39c56a1ef1e..7d73b76bae7 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/SaleLoanToExternalAssetOwnerHandler.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/SaleLoanToExternalAssetOwnerHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/UpdateExternalAssetOwnerLoanProductAttributeHandler.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/UpdateExternalAssetOwnerLoanProductAttributeHandler.java index 08cc47b459d..020a10ff62d 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/UpdateExternalAssetOwnerLoanProductAttributeHandler.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/UpdateExternalAssetOwnerLoanProductAttributeHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/search/ExternalAssetOwnerSearchService.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/search/ExternalAssetOwnerSearchService.java index 10f92e0659d..16a2a08f6b3 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/search/ExternalAssetOwnerSearchService.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/search/ExternalAssetOwnerSearchService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.investor.service.search; import java.util.Objects; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.PagedRequest; import org.apache.fineract.investor.data.ExternalTransferData; diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/search/domain/ExternalAssetOwnerSearchRequest.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/search/domain/ExternalAssetOwnerSearchRequest.java index 07acd793e34..40a2238067f 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/search/domain/ExternalAssetOwnerSearchRequest.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/search/domain/ExternalAssetOwnerSearchRequest.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.investor.service.search.domain; import java.time.LocalDate; + import lombok.Data; @Data diff --git a/fineract-investor/src/main/java/org/apache/fineract/investor/service/search/mapper/ExternalAssetOwnerSearchDataMapper.java b/fineract-investor/src/main/java/org/apache/fineract/investor/service/search/mapper/ExternalAssetOwnerSearchDataMapper.java index 2797cfbd51c..ec977cc0d61 100644 --- a/fineract-investor/src/main/java/org/apache/fineract/investor/service/search/mapper/ExternalAssetOwnerSearchDataMapper.java +++ b/fineract-investor/src/main/java/org/apache/fineract/investor/service/search/mapper/ExternalAssetOwnerSearchDataMapper.java @@ -6,9 +6,9 @@ * 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 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..40d7f1254dc 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 @@ -6,9 +6,9 @@ * 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 @@ -32,6 +32,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.avro.generic.GenericContainer; import org.apache.fineract.avro.generator.ByteBufferSerializable; diff --git a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/module-changelog-master.xml b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/module-changelog-master.xml index 10dc6bbf3f1..7c97095acdb 100644 --- a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/module-changelog-master.xml +++ b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/module-changelog-master.xml @@ -20,28 +20,32 @@ --> - - - - - - - - - - - - - - - - - - - - - - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> + + + + + + + + + + + + + + + + + + + + + + diff --git a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0002_asset_schemas.xml b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0002_asset_schemas.xml index 1cb1f6c3676..4b049c8282e 100644 --- a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0002_asset_schemas.xml +++ b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0002_asset_schemas.xml @@ -20,201 +20,204 @@ --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0003_asset_schemas.xml b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0003_asset_schemas.xml index 6730c2e0688..4932e3c2dc9 100644 --- a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0003_asset_schemas.xml +++ b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0003_asset_schemas.xml @@ -20,48 +20,48 @@ --> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> - - + + - - - - - - - - + + + + + + + + - + - + - + - - - - - - - - + + + + + + + + - + - + diff --git a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0006_asset_schemas.xml b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0006_asset_schemas.xml index b35a8cf3b73..e7803341741 100644 --- a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0006_asset_schemas.xml +++ b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0006_asset_schemas.xml @@ -34,16 +34,24 @@ - - - - - - - + + + + + + + - + diff --git a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0007_add_external_asset_owner_transfer_details.xml b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0007_add_external_asset_owner_transfer_details.xml index 516b3531501..acb34363c16 100644 --- a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0007_add_external_asset_owner_transfer_details.xml +++ b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0007_add_external_asset_owner_transfer_details.xml @@ -55,10 +55,10 @@ - - - - + + + + @@ -93,10 +93,10 @@ - - - - + + + + @@ -109,7 +109,8 @@ referencedTableName="m_appuser" validate="true"/> diff --git a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0008_add_mappings.xml b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0008_add_mappings.xml index dac832f3e3d..ad94a845b77 100644 --- a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0008_add_mappings.xml +++ b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0008_add_mappings.xml @@ -75,7 +75,8 @@ diff --git a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0010_external_transafer_status_external_transfer_id_constraints.xml b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0010_external_transafer_status_external_transfer_id_constraints.xml index 0bd4fc83900..4d27d56566a 100644 --- a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0010_external_transafer_status_external_transfer_id_constraints.xml +++ b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0010_external_transafer_status_external_transfer_id_constraints.xml @@ -23,6 +23,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd"> - + diff --git a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0011_set_datetime_precision.xml b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0011_set_datetime_precision.xml index 02b188e4e22..2e6f3907468 100644 --- a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0011_set_datetime_precision.xml +++ b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0011_set_datetime_precision.xml @@ -25,15 +25,25 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0013_add_additional_asset_owner_indices.xml b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0013_add_additional_asset_owner_indices.xml index a525afc797c..28579574f6e 100644 --- a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0013_add_additional_asset_owner_indices.xml +++ b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0013_add_additional_asset_owner_indices.xml @@ -31,29 +31,34 @@ - create index concurrently IDX_e_asset_o_transfer_loan_mapping_owner_transfer_id on m_external_asset_owner_transfer_loan_mapping(owner_transfer_id); + create index concurrently IDX_e_asset_o_transfer_loan_mapping_owner_transfer_id on + m_external_asset_owner_transfer_loan_mapping(owner_transfer_id); - + - create index concurrently IDX_e_asset_o_transfer_journal_entry_mapping_owner_transfer_id on m_external_asset_owner_transfer_journal_entry_mapping(owner_transfer_id); + create index concurrently IDX_e_asset_o_transfer_journal_entry_mapping_owner_transfer_id on + m_external_asset_owner_transfer_journal_entry_mapping(owner_transfer_id); - + - create index concurrently IDX_e_asset_o_transfer_journal_entry_mapping_journal_entry_id on m_external_asset_owner_transfer_journal_entry_mapping(journal_entry_id); + create index concurrently IDX_e_asset_o_transfer_journal_entry_mapping_journal_entry_id on + m_external_asset_owner_transfer_journal_entry_mapping(journal_entry_id); @@ -64,7 +69,8 @@ - create index concurrently IDX_e_asset_o_journal_entry_mapping_journal_entry_id on m_external_asset_owner_journal_entry_mapping(journal_entry_id); + create index concurrently IDX_e_asset_o_journal_entry_mapping_journal_entry_id on + m_external_asset_owner_journal_entry_mapping(journal_entry_id); diff --git a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0017_add_external_asset_owner_loan_product_attr_index.xml b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0017_add_external_asset_owner_loan_product_attr_index.xml index 852d62014f8..74659f3a74f 100644 --- a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0017_add_external_asset_owner_loan_product_attr_index.xml +++ b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0017_add_external_asset_owner_loan_product_attr_index.xml @@ -27,11 +27,13 @@ - + - create index concurrently IND_m_ext_asset_ow_lp_config_lp_id on m_external_asset_owner_loan_product_configurable_attributes(loan_product_id); + create index concurrently IND_m_ext_asset_ow_lp_config_lp_id on + m_external_asset_owner_loan_product_configurable_attributes(loan_product_id); diff --git a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0018_add_external_asset_owner_transfer_outstanding_interest_strategy.xml b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0018_add_external_asset_owner_transfer_outstanding_interest_strategy.xml index 7004b0636b8..19372a8c23e 100644 --- a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0018_add_external_asset_owner_transfer_outstanding_interest_strategy.xml +++ b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0018_add_external_asset_owner_transfer_outstanding_interest_strategy.xml @@ -37,7 +37,8 @@ - + diff --git a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0019_add_configurable_allowed_loan_statuses.xml b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0019_add_configurable_allowed_loan_statuses.xml index 552f6a421c1..12c147e6e07 100644 --- a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0019_add_configurable_allowed_loan_statuses.xml +++ b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0019_add_configurable_allowed_loan_statuses.xml @@ -32,16 +32,19 @@ - + - + - + diff --git a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0021_external_owner_reference_in_journal_entry_aggregation.xml b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0021_external_owner_reference_in_journal_entry_aggregation.xml index 00762d4c9e8..57f137f56a9 100644 --- a/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0021_external_owner_reference_in_journal_entry_aggregation.xml +++ b/fineract-investor/src/main/resources/db/changelog/tenant/module/investor/parts/0021_external_owner_reference_in_journal_entry_aggregation.xml @@ -27,6 +27,8 @@ - + diff --git a/fineract-investor/src/main/resources/jpa/static-weaving/module/fineract-investor/persistence.xml b/fineract-investor/src/main/resources/jpa/static-weaving/module/fineract-investor/persistence.xml index 5489bb2af7c..af35cb3a171 100644 --- a/fineract-investor/src/main/resources/jpa/static-weaving/module/fineract-investor/persistence.xml +++ b/fineract-investor/src/main/resources/jpa/static-weaving/module/fineract-investor/persistence.xml @@ -165,7 +165,7 @@ false - + diff --git a/fineract-investor/src/test/java/org/apache/fineract/investor/cob/loan/LoanAccountOwnerTransferBusinessStepTest.java b/fineract-investor/src/test/java/org/apache/fineract/investor/cob/loan/LoanAccountOwnerTransferBusinessStepTest.java index 6df17dcabf6..2e717b6e584 100644 --- a/fineract-investor/src/test/java/org/apache/fineract/investor/cob/loan/LoanAccountOwnerTransferBusinessStepTest.java +++ b/fineract-investor/src/test/java/org/apache/fineract/investor/cob/loan/LoanAccountOwnerTransferBusinessStepTest.java @@ -6,9 +6,9 @@ * 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 @@ -41,6 +41,7 @@ import java.util.Map; import java.util.Optional; import java.util.stream.Stream; + import org.apache.fineract.infrastructure.businessdate.domain.BusinessDateType; import org.apache.fineract.infrastructure.core.domain.ActionContext; import org.apache.fineract.infrastructure.core.domain.FineractPlatformTenant; @@ -332,7 +333,7 @@ private static Stream loanSaleTransferableDataProvider() { @ParameterizedTest @MethodSource("loanSaleTransferableDataProvider") public void givenLoanSaleTransferable(final boolean isDelayedSettlementEnabled, final ExternalTransferStatus pendingStatus, - final ExternalTransferStatus expectedActiveStatus) { + final ExternalTransferStatus expectedActiveStatus) { // given final LoanProduct loanProduct = Mockito.mock(LoanProduct.class); when(loanProduct.getId()).thenReturn(LOAN_PRODUCT_ID); @@ -405,7 +406,7 @@ private static Stream loanSaleNotTransferableDataProvider() { @ParameterizedTest @MethodSource("loanSaleNotTransferableDataProvider") public void givenLoanSaleNotTransferable(final ExternalTransferStatus pendingStatus, - final ExternalTransferSubStatus expectedSubStatus) { + final ExternalTransferSubStatus expectedSubStatus) { // given final Loan loanForProcessing = Mockito.mock(Loan.class); when(loanForProcessing.getId()).thenReturn(1L); @@ -585,7 +586,7 @@ private ArgumentCaptor> verifyBusinessEvents(int expectedBusine } private void verifyLoanTransferBusinessEvent(ArgumentCaptor> businessEventArgumentCaptor, int index, Loan expectedLoan, - ExternalAssetOwnerTransfer expectedAssetOwnerTransfer) { + ExternalAssetOwnerTransfer expectedAssetOwnerTransfer) { assertTrue(businessEventArgumentCaptor.getAllValues().get(index) instanceof LoanOwnershipTransferBusinessEvent); assertEquals(expectedLoan, ((LoanOwnershipTransferBusinessEvent) businessEventArgumentCaptor.getAllValues().get(index)).getLoan()); assertEquals(expectedAssetOwnerTransfer, @@ -593,13 +594,13 @@ private void verifyLoanTransferBusinessEvent(ArgumentCaptor> bu } private void verifyLoanAccountSnapshotBusinessEvent(ArgumentCaptor> businessEventArgumentCaptor, int index, - Loan expectedLoan) { + Loan expectedLoan) { assertTrue(businessEventArgumentCaptor.getAllValues().get(index) instanceof LoanAccountSnapshotBusinessEvent); assertEquals(expectedLoan, ((LoanAccountSnapshotBusinessEvent) businessEventArgumentCaptor.getAllValues().get(index)).get()); } private void assertCommonFieldsOfPendingAndActiveTransfers(final ExternalAssetOwnerTransfer pendingTransfer, - final ExternalAssetOwnerTransfer activeTransfer) { + final ExternalAssetOwnerTransfer activeTransfer) { assertEquals(pendingTransfer.getOwner(), activeTransfer.getOwner()); assertEquals(pendingTransfer.getExternalId(), activeTransfer.getExternalId()); assertEquals(pendingTransfer.getLoanId(), activeTransfer.getLoanId()); diff --git a/fineract-investor/src/test/java/org/apache/fineract/investor/service/AccountingServiceImplTest.java b/fineract-investor/src/test/java/org/apache/fineract/investor/service/AccountingServiceImplTest.java index ad2d1816a5c..9818b09cf49 100644 --- a/fineract-investor/src/test/java/org/apache/fineract/investor/service/AccountingServiceImplTest.java +++ b/fineract-investor/src/test/java/org/apache/fineract/investor/service/AccountingServiceImplTest.java @@ -6,9 +6,9 @@ * 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 @@ -39,6 +39,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.accounting.common.AccountingConstants; import org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccount; import org.apache.fineract.accounting.financialactivityaccount.domain.FinancialActivityAccountRepositoryWrapper; @@ -481,7 +482,7 @@ private ExternalAssetOwnerJournalEntryMapping ownerJournalEntryMapping(JournalEn } private void assertOwnerJournalEntryMappings(List expectedOwnerJournalEntryMappings, - List actualOwnerJournalEntryMappings) { + List actualOwnerJournalEntryMappings) { assertEquals(expectedOwnerJournalEntryMappings.size(), actualOwnerJournalEntryMappings.size()); for (int i = 0; i < expectedOwnerJournalEntryMappings.size(); i++) { assertOwnerJournalEntryMapping(expectedOwnerJournalEntryMappings.get(i), actualOwnerJournalEntryMappings.get(i)); @@ -489,14 +490,14 @@ private void assertOwnerJournalEntryMappings(List * 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 @@ -25,6 +25,7 @@ import java.util.List; import java.util.stream.Stream; + import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.investor.data.ExternalTransferLoanProductAttributesData; import org.junit.jupiter.params.ParameterizedTest; diff --git a/fineract-investor/src/test/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesReadServiceTest.java b/fineract-investor/src/test/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesReadServiceTest.java index 81a3ba7b40e..83d99cb387f 100644 --- a/fineract-investor/src/test/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesReadServiceTest.java +++ b/fineract-investor/src/test/java/org/apache/fineract/investor/service/ExternalAssetOwnerLoanProductAttributesReadServiceTest.java @@ -6,9 +6,9 @@ * 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 @@ -29,6 +29,7 @@ import java.util.List; import java.util.stream.Stream; + import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.investor.data.ExternalTransferLoanProductAttributesData; import org.apache.fineract.investor.domain.ExternalAssetOwnerLoanProductAttributes; 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..9dfcfd79e7d 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 @@ -6,9 +6,9 @@ * 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 @@ -27,9 +27,11 @@ 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.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; @@ -223,7 +225,7 @@ public void testCreateExternalAssetOwnerLoanProductAttributeUsingDefaultSettleme @ParameterizedTest @MethodSource("externalAssetOwnerLoanProductAttributeApiRequestDataValidationErrors") public void testExternalAssetOwnerLoanProductAttributeRequestWithApiDataValidationErrors(String testName, String attributeKey, - String attributeValue, String expectedErrorString) { + String attributeValue, String expectedErrorString) { TestContext testContext = new TestContext(); final JsonElement jsonCommandElement = testContext.fromJsonHelper.parse(testContext.jsonCommandString); final JsonCommand command = createJsonCommand(testContext.jsonCommandString, testContext.loanProductId, null); @@ -328,7 +330,7 @@ private static Stream externalAssetOwnerLoanProductAttributeApiReques } private void assertLoanProductAttributeValues(final TestContext testContext, - final ExternalAssetOwnerLoanProductAttributes loanProductAttribute) { + final ExternalAssetOwnerLoanProductAttributes loanProductAttribute) { Assertions.assertEquals(testContext.loanProductId, loanProductAttribute.getLoanProductId()); Assertions.assertEquals(testContext.attributeKey, loanProductAttribute.getAttributeKey()); Assertions.assertEquals(testContext.attributeValue, loanProductAttribute.getAttributeValue()); @@ -348,7 +350,7 @@ private JsonCommand createJsonCommand(final String jsonCommand, final Long loanP null, null, null, null); } - @SuppressFBWarnings({ "VA_FORMAT_STRING_USES_NEWLINE" }) + @SuppressFBWarnings({"VA_FORMAT_STRING_USES_NEWLINE"}) static class TestContext { @Mock diff --git a/fineract-investor/src/test/java/org/apache/fineract/investor/service/ExternalAssetOwnerTransferOutstandingInterestCalculationTest.java b/fineract-investor/src/test/java/org/apache/fineract/investor/service/ExternalAssetOwnerTransferOutstandingInterestCalculationTest.java index 799d16c5264..27c6d7fe1f4 100644 --- a/fineract-investor/src/test/java/org/apache/fineract/investor/service/ExternalAssetOwnerTransferOutstandingInterestCalculationTest.java +++ b/fineract-investor/src/test/java/org/apache/fineract/investor/service/ExternalAssetOwnerTransferOutstandingInterestCalculationTest.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import static org.mockito.Mockito.when; import java.math.BigDecimal; + import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; import org.apache.fineract.organisation.monetary.mapper.CurrencyMapper; import org.apache.fineract.portfolio.loanaccount.data.LoanAccountData; diff --git a/fineract-investor/src/test/java/org/apache/fineract/investor/service/ExternalAssetOwnersWriteServiceTest.java b/fineract-investor/src/test/java/org/apache/fineract/investor/service/ExternalAssetOwnersWriteServiceTest.java index 0646ad4e8c7..26963d08646 100644 --- a/fineract-investor/src/test/java/org/apache/fineract/investor/service/ExternalAssetOwnersWriteServiceTest.java +++ b/fineract-investor/src/test/java/org/apache/fineract/investor/service/ExternalAssetOwnersWriteServiceTest.java @@ -6,9 +6,9 @@ * 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 @@ -36,6 +36,7 @@ import com.google.gson.JsonElement; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.math.BigDecimal; import java.math.RoundingMode; import java.sql.SQLException; @@ -49,6 +50,7 @@ import java.util.Map; import java.util.Optional; import java.util.stream.Stream; + import org.apache.commons.lang3.RandomStringUtils; import org.apache.fineract.cob.data.LoanDataForExternalTransfer; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; @@ -150,7 +152,7 @@ public void testIntermediarySaleLoanByLoanIdDelayedSettlementIsNotEnabled() { @ParameterizedTest @MethodSource("effectiveTransferDataProviderIntermediarySaleTests") public void testValidateEffectiveTransferForIntermediarySale(final String testName, - final List externalAssetOwnerTransferList, final String expectedErrorString) { + final List externalAssetOwnerTransferList, final String expectedErrorString) { TestContext testContext = new TestContext(); // given @@ -346,7 +348,7 @@ public void validateSettlementDateInThePastTest() { .forClass(ExternalAssetOwnerTransfer.class); lenient().when( - testContext.fromApiJsonHelper.extractLocalDateNamed(ExternalTransferRequestParameters.SETTLEMENT_DATE, jsonCommandElement)) + testContext.fromApiJsonHelper.extractLocalDateNamed(ExternalTransferRequestParameters.SETTLEMENT_DATE, jsonCommandElement)) .thenReturn(LocalDate.EPOCH); lenient().when(testContext.fromApiJsonHelper.extractLocalDateNamed(ExternalTransferRequestParameters.SETTLEMENT_DATE, jsonCommandElement, TestContext.DATE_FORMAT, Locale.GERMANY)).thenReturn(LocalDate.EPOCH); @@ -570,7 +572,7 @@ public void verifyWhenLoanIsNotFoundThenExceptionIsThrown() { @ParameterizedTest @MethodSource("invalidFieldsDataProvider") public void verifyWhenFieldValueInvalidThenExceptionIsThrown(final String ownerExternalId, final String transferExternalId, - final String purchaseRatio, final LocalDate settlementDate) { + final String purchaseRatio, final LocalDate settlementDate) { final TestContext testContext = new TestContext(); // given @@ -708,7 +710,7 @@ public void verifyWhenNoEffectiveTransfersWithDelayedSettlementThenExceptionIsTh @ParameterizedTest @MethodSource("invalidTransferStatusDataProvider") public void verifyWhenInvalidTransferStatusThenExceptionIsThrown(final ExternalTransferStatus externalTransferStatus, - final boolean isDelayedSettlementEnabled, final String expectedExceptionMessage) { + final boolean isDelayedSettlementEnabled, final String expectedExceptionMessage) { final TestContext testContext = new TestContext(); // given @@ -759,7 +761,7 @@ private static Stream invalidTransferStatusDataProvider() { @ParameterizedTest @MethodSource("buybackValidationWithDelaySettlementSuccessfulDataProvider") void buybackLoanByLoanIdWhenDelaySettlementEnabledSuccess(final List transferStatuses, - final ExternalTransferStatus expectedStatus) { + final ExternalTransferStatus expectedStatus) { // given TestContext testContext = new TestContext(); @@ -811,7 +813,7 @@ private static Stream buybackValidationWithDelaySettlementSuccessfulD @ParameterizedTest @MethodSource("buybackValidationWithDelaySettlementFailureDataProvider") void buybackLoanByLoanIdWhenDelaySettlementEnabledFailure(final List transferStatuses, - final String expectedExceptionMessage) { + final String expectedExceptionMessage) { // given TestContext testContext = new TestContext(); @@ -888,7 +890,7 @@ private JsonCommand createJsonCommand(final String jsonCommand, final Long loanI * @return the {@link ExternalAssetOwnerTransfer} object. */ private ExternalAssetOwnerTransfer createExternalAssetOwnerTransfer(final TestContext testContext, - final ExternalTransferStatus status) { + final ExternalTransferStatus status) { ExternalAssetOwnerTransfer transfer = new ExternalAssetOwnerTransfer(); transfer.setExternalId(new ExternalId(RandomStringUtils.randomAlphanumeric(10))); transfer.setOwner(new ExternalAssetOwner()); @@ -912,7 +914,7 @@ private ExternalAssetOwnerTransfer createExternalAssetOwnerTransfer(final TestCo * the expected transfer status. */ private void assertAssertOwnerTransferValues(final TestContext testContext, final ExternalAssetOwnerTransfer externalAssetOwnerTransfer, - final ExternalTransferStatus expectedTransferStatus) { + final ExternalTransferStatus expectedTransferStatus) { assertEquals(testContext.loanId, externalAssetOwnerTransfer.getLoanId()); assertEquals(testContext.externalLoanId, externalAssetOwnerTransfer.getExternalLoanId().getValue()); assertEquals(testContext.ownerExternalId, externalAssetOwnerTransfer.getOwner().getExternalId().getValue()); @@ -925,7 +927,7 @@ private void assertAssertOwnerTransferValues(final TestContext testContext, fina assertEquals(FUTURE_DATE_9999_12_31, externalAssetOwnerTransfer.getEffectiveDateTo()); } - @SuppressFBWarnings({ "VA_FORMAT_STRING_USES_NEWLINE" }) + @SuppressFBWarnings({"VA_FORMAT_STRING_USES_NEWLINE"}) static class TestContext { @Mock @@ -997,7 +999,7 @@ static class TestContext { lenient().when(fromApiJsonHelper.extractStringNamed(ExternalTransferRequestParameters.TRANSFER_EXTERNAL_ID, jsonCommandElement)) .thenReturn(transferExternalId); lenient().when( - fromApiJsonHelper.extractStringNamed(ExternalTransferRequestParameters.TRANSFER_EXTERNAL_GROUP_ID, jsonCommandElement)) + fromApiJsonHelper.extractStringNamed(ExternalTransferRequestParameters.TRANSFER_EXTERNAL_GROUP_ID, jsonCommandElement)) .thenReturn(transferExternalGroupId); lenient().when(fromApiJsonHelper.extractStringNamed(ExternalTransferRequestParameters.PURCHASE_PRICE_RATIO, jsonCommandElement)) .thenReturn(PURCHASE_RATIO.toString()); diff --git a/fineract-investor/src/test/java/org/apache/fineract/investor/service/LoanAccountOwnerTransferServiceTest.java b/fineract-investor/src/test/java/org/apache/fineract/investor/service/LoanAccountOwnerTransferServiceTest.java index 66e0e945a50..638792518c9 100644 --- a/fineract-investor/src/test/java/org/apache/fineract/investor/service/LoanAccountOwnerTransferServiceTest.java +++ b/fineract-investor/src/test/java/org/apache/fineract/investor/service/LoanAccountOwnerTransferServiceTest.java @@ -6,9 +6,9 @@ * 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 @@ -38,6 +38,7 @@ import java.util.Map; import java.util.Optional; import java.util.stream.Stream; + import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil; import org.apache.fineract.infrastructure.event.business.domain.BusinessEvent; import org.apache.fineract.infrastructure.event.business.domain.loan.LoanAccountSnapshotBusinessEvent; @@ -249,7 +250,7 @@ private ArgumentCaptor> verifyBusinessEvents(int expectedBusine } private void verifyLoanTransferBusinessEvent(ArgumentCaptor> businessEventArgumentCaptor, int index, Loan expectedLoan, - ExternalAssetOwnerTransfer expectedAssetOwnerTransfer) { + ExternalAssetOwnerTransfer expectedAssetOwnerTransfer) { assertTrue(businessEventArgumentCaptor.getAllValues().get(index) instanceof LoanOwnershipTransferBusinessEvent); assertEquals(expectedLoan, ((LoanOwnershipTransferBusinessEvent) businessEventArgumentCaptor.getAllValues().get(index)).getLoan()); assertEquals(expectedAssetOwnerTransfer, @@ -257,7 +258,7 @@ private void verifyLoanTransferBusinessEvent(ArgumentCaptor> bu } private void verifyLoanAccountSnapshotBusinessEvent(ArgumentCaptor> businessEventArgumentCaptor, int index, - Loan expectedLoan) { + Loan expectedLoan) { assertTrue(businessEventArgumentCaptor.getAllValues().get(index) instanceof LoanAccountSnapshotBusinessEvent); assertEquals(expectedLoan, ((LoanAccountSnapshotBusinessEvent) businessEventArgumentCaptor.getAllValues().get(index)).get()); } diff --git a/fineract-investor/src/test/java/org/apache/fineract/investor/service/LoanTransferabilityServiceImplTest.java b/fineract-investor/src/test/java/org/apache/fineract/investor/service/LoanTransferabilityServiceImplTest.java index c34ca123bbf..3a9f1a964ef 100644 --- a/fineract-investor/src/test/java/org/apache/fineract/investor/service/LoanTransferabilityServiceImplTest.java +++ b/fineract-investor/src/test/java/org/apache/fineract/investor/service/LoanTransferabilityServiceImplTest.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.math.BigDecimal; import java.util.stream.Stream; + import org.apache.fineract.investor.data.ExternalTransferStatus; import org.apache.fineract.investor.data.ExternalTransferSubStatus; import org.apache.fineract.investor.domain.ExternalAssetOwnerTransfer; @@ -80,7 +81,7 @@ void isTransferableWhenDelayedSettlementDisabled(final BigDecimal loanOutstandin @ParameterizedTest @MethodSource("amountDataProvider") void isTransferableWhenDelayedSettlementEnabledAndSellingToIntermediate(final BigDecimal loanOutstandingAmount, - final boolean expectedResult) { + final boolean expectedResult) { // given TestContext testContext = new TestContext(); diff --git a/fineract-investor/src/test/java/org/apache/fineract/investor/service/serialization/serializer/investor/InvestorBusinessEventSerializerTest.java b/fineract-investor/src/test/java/org/apache/fineract/investor/service/serialization/serializer/investor/InvestorBusinessEventSerializerTest.java index 93485af0419..4a4b6a74791 100644 --- a/fineract-investor/src/test/java/org/apache/fineract/investor/service/serialization/serializer/investor/InvestorBusinessEventSerializerTest.java +++ b/fineract-investor/src/test/java/org/apache/fineract/investor/service/serialization/serializer/investor/InvestorBusinessEventSerializerTest.java @@ -6,9 +6,9 @@ * 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 @@ -46,6 +46,7 @@ import java.util.Set; import java.util.function.Function; import java.util.stream.Collectors; + import org.apache.fineract.avro.generator.ByteBufferSerializable; import org.apache.fineract.avro.loan.v1.LoanOwnershipTransferDataV1; import org.apache.fineract.avro.loan.v1.UnpaidChargeDataV1; @@ -128,7 +129,7 @@ public void testSerializationCancelledPendingIntermediateSameDayTransfer() { } private void doTest(ExternalTransferStatus status, ExternalTransferSubStatus subStatus, ExternalTransferStatus firstTransferStatus, - String expectedType, String expectedStatus, String expectedReason) { + String expectedType, String expectedStatus, String expectedReason) { // given ExternalAssetOwnersReadService mockReadService = Mockito.mock(ExternalAssetOwnersReadService.class); when(mockReadService.retrieveTransferData(123L)).thenReturn(createTransferData(status, subStatus)); @@ -212,7 +213,7 @@ private static void verifyUnpaidCharges(List unpaidChargeDat } private ExternalAssetOwnerTransfer createExternalAssetOwnerTransfer(ExternalTransferStatus status, - ExternalTransferSubStatus subStatus) { + ExternalTransferSubStatus subStatus) { ExternalAssetOwnerTransfer mock = Mockito.mock(ExternalAssetOwnerTransfer.class); when(mock.getStatus()).thenReturn(status); when(mock.getSubStatus()).thenReturn(subStatus); diff --git a/fineract-loan-origination/build.gradle b/fineract-loan-origination/build.gradle index 278bed82fee..4225d7955bc 100644 --- a/fineract-loan-origination/build.gradle +++ b/fineract-loan-origination/build.gradle @@ -52,9 +52,9 @@ apply from: 'dependencies.gradle' // https://github.com/andygoossens/gradle-modernizer-plugin modernizer { ignoreClassNamePatterns = [ - '.*AbstractPersistableCustom', - '.*EntityTables', - '.*domain.*' + '.*AbstractPersistableCustom', + '.*EntityTables', + '.*domain.*' ] } @@ -66,7 +66,7 @@ if (project.hasProperty('env') && project.getProperty('env') == 'eclipse') { eclipse { project { - buildCommand([ LaunchConfigHandle: "/.externalToolBuilders/OpenJPA Enhance Builder.launch" ], 'org.eclipse.ui.externaltools.ExternalToolBuilder') + buildCommand([LaunchConfigHandle: "/.externalToolBuilders/OpenJPA Enhance Builder.launch"], 'org.eclipse.ui.externaltools.ExternalToolBuilder') } } diff --git a/fineract-loan-origination/dependencies.gradle b/fineract-loan-origination/dependencies.gradle index 8a0d0643c97..b1e9ffb03fc 100644 --- a/fineract-loan-origination/dependencies.gradle +++ b/fineract-loan-origination/dependencies.gradle @@ -28,7 +28,7 @@ dependencies { implementation('org.apache.avro:avro') implementation( project(path: ':fineract-avro-schemas') - ) + ) implementation(project(path: ':fineract-loan')) implementation( @@ -54,11 +54,11 @@ dependencies { 'io.github.resilience4j:resilience4j-spring-boot3', 'org.apache.httpcomponents:httpcore', - ) + ) compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' annotationProcessor 'org.mapstruct:mapstruct-processor' - implementation ('org.springframework.boot:spring-boot-starter-data-jpa') { + implementation('org.springframework.boot:spring-boot-starter-data-jpa') { exclude group: 'org.hibernate' } implementation('org.eclipse.persistence:org.eclipse.persistence.jpa') { @@ -67,13 +67,13 @@ dependencies { // testCompile dependencies are ONLY used in src/test, not src/main. // Do NOT repeat dependencies which are ALREADY in implementation or runtimeOnly! // - testImplementation( 'io.github.classgraph:classgraph' ) - testImplementation ('org.springframework.boot:spring-boot-starter-test') { + testImplementation('io.github.classgraph:classgraph') + testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'com.jayway.jsonpath', module: 'json-path' exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' exclude group: 'jakarta.activation' exclude group: 'javax.activation' exclude group: 'org.skyscreamer' } - testImplementation ('org.mockito:mockito-inline') + testImplementation('org.mockito:mockito-inline') } diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/api/LoanOriginatorApiConstants.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/api/LoanOriginatorApiConstants.java index 52d81ffd56f..b2cc82b9fc8 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/api/LoanOriginatorApiConstants.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/api/LoanOriginatorApiConstants.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,8 @@ public final class LoanOriginatorApiConstants { - private LoanOriginatorApiConstants() {} + private LoanOriginatorApiConstants() { + } public static final String RESOURCE_NAME = "LOAN_ORIGINATOR"; public static final String RESOURCE_PATH = "/loan-originators"; diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/api/LoanOriginatorApiResourceSwagger.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/api/LoanOriginatorApiResourceSwagger.java index 6c650b8faf6..72ce3c6c18f 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/api/LoanOriginatorApiResourceSwagger.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/api/LoanOriginatorApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,18 +19,22 @@ package org.apache.fineract.portfolio.loanorigination.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.List; import java.util.Set; + import org.apache.fineract.infrastructure.codes.api.CodeValuesApiResourceSwagger.GetCodeValuesDataResponse; final class LoanOriginatorApiResourceSwagger { - private LoanOriginatorApiResourceSwagger() {} + private LoanOriginatorApiResourceSwagger() { + } @Schema(description = "GetLoanOriginatorsResponse") public static final class GetLoanOriginatorsResponse { - private GetLoanOriginatorsResponse() {} + private GetLoanOriginatorsResponse() { + } @Schema(example = "1") public Long id; @@ -49,7 +53,8 @@ private GetLoanOriginatorsResponse() {} @Schema(description = "GetLoanOriginatorTemplateResponse") public static final class GetLoanOriginatorTemplateResponse { - private GetLoanOriginatorTemplateResponse() {} + private GetLoanOriginatorTemplateResponse() { + } @Schema(example = "EXT-001") public String externalId; @@ -61,7 +66,8 @@ private GetLoanOriginatorTemplateResponse() {} @Schema(description = "PostLoanOriginatorsRequest") public static final class PostLoanOriginatorsRequest { - private PostLoanOriginatorsRequest() {} + private PostLoanOriginatorsRequest() { + } @Schema(example = "EXT-001") public String externalId; @@ -78,7 +84,8 @@ private PostLoanOriginatorsRequest() {} @Schema(description = "PostLoanOriginatorsResponse") public static final class PostLoanOriginatorsResponse { - private PostLoanOriginatorsResponse() {} + private PostLoanOriginatorsResponse() { + } @Schema(example = "1") public Long resourceId; @@ -87,7 +94,8 @@ private PostLoanOriginatorsResponse() {} @Schema(description = "PutLoanOriginatorsRequest") public static final class PutLoanOriginatorsRequest { - private PutLoanOriginatorsRequest() {} + private PutLoanOriginatorsRequest() { + } @Schema(example = "Updated Name") public String name; @@ -102,7 +110,8 @@ private PutLoanOriginatorsRequest() {} @Schema(description = "PutLoanOriginatorsResponse") public static final class PutLoanOriginatorsResponse { - private PutLoanOriginatorsResponse() {} + private PutLoanOriginatorsResponse() { + } @Schema(example = "1") public Long resourceId; @@ -111,7 +120,8 @@ private PutLoanOriginatorsResponse() {} @Schema(description = "DeleteLoanOriginatorsResponse") public static final class DeleteLoanOriginatorsResponse { - private DeleteLoanOriginatorsResponse() {} + private DeleteLoanOriginatorsResponse() { + } @Schema(example = "1") public Long resourceId; diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/config/LoanOriginationModuleIsEnabledCondition.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/config/LoanOriginationModuleIsEnabledCondition.java index cab4484565b..894f10b66fa 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/config/LoanOriginationModuleIsEnabledCondition.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/config/LoanOriginationModuleIsEnabledCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanApplicationOriginatorData.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanApplicationOriginatorData.java index 3770d51e413..1784f489667 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanApplicationOriginatorData.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanApplicationOriginatorData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorMappingResponse.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorMappingResponse.java index db5d2ffab1b..89e67ae58c9 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorMappingResponse.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorMappingResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorRequestData.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorRequestData.java index 9fd6cb6c7c8..8f593005515 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorRequestData.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorRequestData.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.portfolio.loanorigination.data; import io.swagger.v3.oas.annotations.media.Schema; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -42,7 +44,7 @@ public class LoanOriginatorRequestData implements Serializable { @Schema(description = "Originator name", example = "Acme Merchant") private String name; - @Schema(description = "Originator status", example = "ACTIVE", allowableValues = { "ACTIVE", "PENDING", "INACTIVE" }) + @Schema(description = "Originator status", example = "ACTIVE", allowableValues = {"ACTIVE", "PENDING", "INACTIVE"}) private String status; @Schema(description = "Code value ID for originator type (from LoanOriginatorType code)", example = "1") diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorTemplateData.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorTemplateData.java index 7872d805c36..191e4069ec1 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorTemplateData.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorTemplateData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Set; + import lombok.Data; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.data.CodeValueData; diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorsResponse.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorsResponse.java index 9f0f1b2812a..587f1da09fb 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorsResponse.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/data/LoanOriginatorsResponse.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginator.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginator.java index 1bcb31d8e29..d8d25eb3bd0 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginator.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginator.java @@ -6,9 +6,9 @@ * 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 @@ -59,7 +59,7 @@ public class LoanOriginator extends AbstractAuditableWithUTCDateTimeCustom private CodeValue channelType; public static LoanOriginator create(ExternalId externalId, String name, LoanOriginatorStatus status, CodeValue originatorType, - CodeValue channelType) { + CodeValue channelType) { LoanOriginator originator = new LoanOriginator(); originator.setExternalId(externalId); originator.setName(name); diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginatorMapping.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginatorMapping.java index 79f29bf19bf..9bb019ce326 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginatorMapping.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginatorMapping.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginatorMappingRepository.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginatorMappingRepository.java index c658d37f458..cec87dfb30b 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginatorMappingRepository.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginatorMappingRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Optional; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginatorRepository.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginatorRepository.java index 99bf4a5c1bc..2456ba4d4e5 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginatorRepository.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginatorRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Optional; + import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginatorStatus.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginatorStatus.java index ae693028cc1..31445f3cfe4 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginatorStatus.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/domain/LoanOriginatorStatus.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanAccountDataV1OriginatorEnricher.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanAccountDataV1OriginatorEnricher.java index d0fcada8d03..6d967a0903a 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanAccountDataV1OriginatorEnricher.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanAccountDataV1OriginatorEnricher.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanorigination.enricher; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.avro.loan.v1.LoanAccountDataV1; import org.apache.fineract.avro.loan.v1.OriginatorDetailsV1; diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanChargeDataV1OriginatorEnricher.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanChargeDataV1OriginatorEnricher.java index 6a922c0e0f7..9da9558bece 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanChargeDataV1OriginatorEnricher.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanChargeDataV1OriginatorEnricher.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanorigination.enricher; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.avro.loan.v1.LoanChargeDataV1; import org.apache.fineract.avro.loan.v1.OriginatorDetailsV1; diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanOriginatorAvroMapper.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanOriginatorAvroMapper.java index 0e04ae3ed70..4c49c0973dc 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanOriginatorAvroMapper.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanOriginatorAvroMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanTransactionDataV1OriginatorEnricher.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanTransactionDataV1OriginatorEnricher.java index dda7e3adf90..455ae9dfeba 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanTransactionDataV1OriginatorEnricher.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanTransactionDataV1OriginatorEnricher.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanorigination.enricher; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.avro.loan.v1.LoanTransactionDataV1; import org.apache.fineract.avro.loan.v1.OriginatorDetailsV1; diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanNotInSubmittedStatusException.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanNotInSubmittedStatusException.java index bf7501b221c..fdc430cc29d 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanNotInSubmittedStatusException.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanNotInSubmittedStatusException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorCannotBeDeletedException.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorCannotBeDeletedException.java index a5c6fe265e5..0a3ab0277f1 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorCannotBeDeletedException.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorCannotBeDeletedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorCreationNotAllowedException.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorCreationNotAllowedException.java index 7d4460931d3..d5f8c97a574 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorCreationNotAllowedException.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorCreationNotAllowedException.java @@ -6,9 +6,9 @@ * 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 @@ -24,7 +24,7 @@ public class LoanOriginatorCreationNotAllowedException extends AbstractPlatformD public LoanOriginatorCreationNotAllowedException(String externalId) { super("error.msg.loan.originator.creation.not.allowed", "Cannot create originator with externalId '" + externalId - + "' during loan application. Global configuration 'enable-originator-creation-during-loan-application' is disabled.", + + "' during loan application. Global configuration 'enable-originator-creation-during-loan-application' is disabled.", externalId); } } diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorDuplicateExternalIdException.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorDuplicateExternalIdException.java index 33612c182ba..beb54c805dd 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorDuplicateExternalIdException.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorDuplicateExternalIdException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorInvalidStatusException.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorInvalidStatusException.java index 3b8630dbf1b..c774ff94491 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorInvalidStatusException.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorInvalidStatusException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorMappingAlreadyExistsException.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorMappingAlreadyExistsException.java index 6195b34f887..14ce582e7df 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorMappingAlreadyExistsException.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorMappingAlreadyExistsException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorMappingNotFoundException.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorMappingNotFoundException.java index a6c9304613f..38f76d3d483 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorMappingNotFoundException.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorMappingNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorNotActiveException.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorNotActiveException.java index 261ec804995..bd29bc1ffaf 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorNotActiveException.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorNotActiveException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorNotFoundException.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorNotFoundException.java index eec740b2069..7fbe3294e77 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorNotFoundException.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/exception/LoanOriginatorNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/AttachLoanOriginatorCommandHandler.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/AttachLoanOriginatorCommandHandler.java index f21a2290f67..2c208eac26d 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/AttachLoanOriginatorCommandHandler.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/AttachLoanOriginatorCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/CreateLoanOriginatorCommandHandler.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/CreateLoanOriginatorCommandHandler.java index cd8fe7196d8..368eb0fcb7e 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/CreateLoanOriginatorCommandHandler.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/CreateLoanOriginatorCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/DeleteLoanOriginatorCommandHandler.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/DeleteLoanOriginatorCommandHandler.java index 383a1828643..da64a99540b 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/DeleteLoanOriginatorCommandHandler.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/DeleteLoanOriginatorCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/DetachLoanOriginatorCommandHandler.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/DetachLoanOriginatorCommandHandler.java index 2ec7157d673..7e40fef3b3c 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/DetachLoanOriginatorCommandHandler.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/DetachLoanOriginatorCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/UpdateLoanOriginatorCommandHandler.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/UpdateLoanOriginatorCommandHandler.java index 712e6f6743f..61d35ebbc1d 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/UpdateLoanOriginatorCommandHandler.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/handler/UpdateLoanOriginatorCommandHandler.java @@ -7,9 +7,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/mapper/LoanOriginatorMapper.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/mapper/LoanOriginatorMapper.java index e267b97e150..7026360f274 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/mapper/LoanOriginatorMapper.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/mapper/LoanOriginatorMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanorigination.mapper; import java.util.List; + import org.apache.fineract.infrastructure.codes.mapper.CodeValueMapper; import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.portfolio.loanorigination.data.LoanOriginatorData; @@ -27,7 +28,7 @@ import org.mapstruct.Mapping; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; -@Mapper(config = MapstructMapperConfig.class, uses = { CodeValueMapper.class }) +@Mapper(config = MapstructMapperConfig.class, uses = {CodeValueMapper.class}) @ConditionalOnProperty(value = "fineract.module.loan-origination.enabled", havingValue = "true") public interface LoanOriginatorMapper { diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/serialization/LoanApplicationOriginatorDataValidator.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/serialization/LoanApplicationOriginatorDataValidator.java index bd12da69fb8..287a4a9428c 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/serialization/LoanApplicationOriginatorDataValidator.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/serialization/LoanApplicationOriginatorDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -26,8 +26,10 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.util.ArrayList; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.domain.CodeValueRepositoryWrapper; import org.apache.fineract.infrastructure.codes.exception.CodeValueNotFoundException; diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/serialization/LoanOriginatorDataValidator.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/serialization/LoanOriginatorDataValidator.java index dba7eeb67aa..4e020798ce0 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/serialization/LoanOriginatorDataValidator.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/serialization/LoanOriginatorDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -27,10 +27,12 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -55,7 +57,8 @@ public void validateForCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, CREATE_REQUEST_PARAMS); final List dataValidationErrors = new ArrayList<>(); @@ -83,7 +86,8 @@ public void validateForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, UPDATE_REQUEST_PARAMS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorHelper.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorHelper.java index 161c2aadcf5..94a5910c48b 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorHelper.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorHelper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorLinkingServiceImpl.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorLinkingServiceImpl.java index edfc273f9c0..c2275eb4e9f 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorLinkingServiceImpl.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorLinkingServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,9 +21,11 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.sql.SQLException; import java.util.HashSet; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.portfolio.loanaccount.service.LoanOriginatorLinkingService; diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorReadPlatformService.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorReadPlatformService.java index 2002378a341..a5cab1f2b73 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorReadPlatformService.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanorigination.service; import java.util.List; + import org.apache.fineract.portfolio.loanorigination.data.LoanOriginatorData; import org.apache.fineract.portfolio.loanorigination.data.LoanOriginatorTemplateData; diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorReadPlatformServiceImpl.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorReadPlatformServiceImpl.java index d628d28fc36..abb9ed9d59f 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorReadPlatformServiceImpl.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collections; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.codes.domain.CodeValueRepository; diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorWritePlatformService.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorWritePlatformService.java index 4b417164729..ec2300c9238 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorWritePlatformService.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorWritePlatformServiceImpl.java b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorWritePlatformServiceImpl.java index 580adb1fc0d..50b6091fc59 100644 --- a/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorWritePlatformServiceImpl.java +++ b/fineract-loan-origination/src/main/java/org/apache/fineract/portfolio/loanorigination/service/LoanOriginatorWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import java.util.LinkedHashMap; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.domain.CodeValue; import org.apache.fineract.infrastructure.codes.domain.CodeValueRepositoryWrapper; diff --git a/fineract-loan-origination/src/main/resources/db/changelog/tenant/module/loanorigination/module-changelog-master.xml b/fineract-loan-origination/src/main/resources/db/changelog/tenant/module/loanorigination/module-changelog-master.xml index b2e74e50847..264f6049fc7 100644 --- a/fineract-loan-origination/src/main/resources/db/changelog/tenant/module/loanorigination/module-changelog-master.xml +++ b/fineract-loan-origination/src/main/resources/db/changelog/tenant/module/loanorigination/module-changelog-master.xml @@ -20,10 +20,10 @@ --> - - - - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> + + + + diff --git a/fineract-loan-origination/src/main/resources/db/changelog/tenant/module/loanorigination/parts/0001_initial_schema.xml b/fineract-loan-origination/src/main/resources/db/changelog/tenant/module/loanorigination/parts/0001_initial_schema.xml index 049de8506da..5127f02918d 100644 --- a/fineract-loan-origination/src/main/resources/db/changelog/tenant/module/loanorigination/parts/0001_initial_schema.xml +++ b/fineract-loan-origination/src/main/resources/db/changelog/tenant/module/loanorigination/parts/0001_initial_schema.xml @@ -128,7 +128,8 @@ - + @@ -145,7 +146,8 @@ - + @@ -162,7 +164,8 @@ - + @@ -179,7 +182,8 @@ - + @@ -287,7 +291,8 @@ + constraintName="FK_loan_originator_channel_cv" onDelete="RESTRICT" + onUpdate="RESTRICT"/> @@ -296,11 +301,13 @@ @@ -378,7 +385,8 @@ + constraintName="FK_loan_originator_mapping_loan" onDelete="RESTRICT" + onUpdate="RESTRICT"/> @@ -387,7 +395,8 @@ + constraintName="FK_loan_originator_mapping_originator" onDelete="RESTRICT" + onUpdate="RESTRICT"/> @@ -396,11 +405,13 @@ diff --git a/fineract-loan-origination/src/main/resources/db/changelog/tenant/module/loanorigination/parts/0002_permissions.xml b/fineract-loan-origination/src/main/resources/db/changelog/tenant/module/loanorigination/parts/0002_permissions.xml index 1d95b6c4370..f592b052153 100644 --- a/fineract-loan-origination/src/main/resources/db/changelog/tenant/module/loanorigination/parts/0002_permissions.xml +++ b/fineract-loan-origination/src/main/resources/db/changelog/tenant/module/loanorigination/parts/0002_permissions.xml @@ -25,7 +25,8 @@ - SELECT COUNT(1) FROM m_permission WHERE code = 'CREATE_LOAN_ORIGINATOR' + SELECT COUNT(1) FROM m_permission WHERE code = 'CREATE_LOAN_ORIGINATOR' + @@ -38,7 +39,8 @@ - SELECT COUNT(1) FROM m_permission WHERE code = 'READ_LOAN_ORIGINATOR' + SELECT COUNT(1) FROM m_permission WHERE code = 'READ_LOAN_ORIGINATOR' + @@ -51,7 +53,8 @@ - SELECT COUNT(1) FROM m_permission WHERE code = 'UPDATE_LOAN_ORIGINATOR' + SELECT COUNT(1) FROM m_permission WHERE code = 'UPDATE_LOAN_ORIGINATOR' + @@ -64,7 +67,8 @@ - SELECT COUNT(1) FROM m_permission WHERE code = 'DELETE_LOAN_ORIGINATOR' + SELECT COUNT(1) FROM m_permission WHERE code = 'DELETE_LOAN_ORIGINATOR' + diff --git a/fineract-loan-origination/src/main/resources/db/changelog/tenant/module/loanorigination/parts/0003_mapping_permissions.xml b/fineract-loan-origination/src/main/resources/db/changelog/tenant/module/loanorigination/parts/0003_mapping_permissions.xml index c302abadb78..2e021289789 100644 --- a/fineract-loan-origination/src/main/resources/db/changelog/tenant/module/loanorigination/parts/0003_mapping_permissions.xml +++ b/fineract-loan-origination/src/main/resources/db/changelog/tenant/module/loanorigination/parts/0003_mapping_permissions.xml @@ -25,7 +25,8 @@ - SELECT COUNT(1) FROM m_permission WHERE code = 'ATTACH_LOAN_ORIGINATOR' + SELECT COUNT(1) FROM m_permission WHERE code = 'ATTACH_LOAN_ORIGINATOR' + @@ -38,7 +39,8 @@ - SELECT COUNT(1) FROM m_permission WHERE code = 'DETACH_LOAN_ORIGINATOR' + SELECT COUNT(1) FROM m_permission WHERE code = 'DETACH_LOAN_ORIGINATOR' + diff --git a/fineract-loan-origination/src/main/resources/jpa/static-weaving/module/fineract-loan-origination/persistence.xml b/fineract-loan-origination/src/main/resources/jpa/static-weaving/module/fineract-loan-origination/persistence.xml index 6701aff8332..a0d4022c1da 100644 --- a/fineract-loan-origination/src/main/resources/jpa/static-weaving/module/fineract-loan-origination/persistence.xml +++ b/fineract-loan-origination/src/main/resources/jpa/static-weaving/module/fineract-loan-origination/persistence.xml @@ -159,7 +159,7 @@ false - + diff --git a/fineract-loan-origination/src/test/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanAccountDataV1OriginatorEnricherTest.java b/fineract-loan-origination/src/test/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanAccountDataV1OriginatorEnricherTest.java index ab74ed417a7..65bca7091b2 100644 --- a/fineract-loan-origination/src/test/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanAccountDataV1OriginatorEnricherTest.java +++ b/fineract-loan-origination/src/test/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanAccountDataV1OriginatorEnricherTest.java @@ -6,9 +6,9 @@ * 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 @@ -29,6 +29,7 @@ import java.util.Collections; import java.util.List; + import org.apache.fineract.avro.loan.v1.LoanAccountDataV1; import org.apache.fineract.avro.loan.v1.OriginatorDetailsV1; import org.apache.fineract.portfolio.loanorigination.helper.LoanOriginatorDetailsResolver; diff --git a/fineract-loan-origination/src/test/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanOriginatorAvroMapperTest.java b/fineract-loan-origination/src/test/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanOriginatorAvroMapperTest.java index 9ee9bab6144..2423d7cbd79 100644 --- a/fineract-loan-origination/src/test/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanOriginatorAvroMapperTest.java +++ b/fineract-loan-origination/src/test/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanOriginatorAvroMapperTest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan-origination/src/test/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanTransactionDataV1OriginatorEnricherTest.java b/fineract-loan-origination/src/test/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanTransactionDataV1OriginatorEnricherTest.java index 42044c9d315..f7413575a38 100644 --- a/fineract-loan-origination/src/test/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanTransactionDataV1OriginatorEnricherTest.java +++ b/fineract-loan-origination/src/test/java/org/apache/fineract/portfolio/loanorigination/enricher/LoanTransactionDataV1OriginatorEnricherTest.java @@ -6,9 +6,9 @@ * 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 @@ -29,6 +29,7 @@ import java.util.Collections; import java.util.List; + import org.apache.fineract.avro.loan.v1.LoanTransactionDataV1; import org.apache.fineract.avro.loan.v1.OriginatorDetailsV1; import org.apache.fineract.portfolio.loanorigination.helper.LoanOriginatorDetailsResolver; diff --git a/fineract-loan/build.gradle b/fineract-loan/build.gradle index 38821283d46..a2a519a7bc6 100644 --- a/fineract-loan/build.gradle +++ b/fineract-loan/build.gradle @@ -52,9 +52,9 @@ apply from: 'dependencies.gradle' // https://github.com/andygoossens/gradle-modernizer-plugin modernizer { ignoreClassNamePatterns = [ - '.*AbstractPersistableCustom', - '.*EntityTables', - '.*domain.*' + '.*AbstractPersistableCustom', + '.*EntityTables', + '.*domain.*' ] } @@ -66,7 +66,7 @@ if (project.hasProperty('env') && project.getProperty('env') == 'eclipse') { eclipse { project { - buildCommand([ LaunchConfigHandle: "/.externalToolBuilders/OpenJPA Enhance Builder.launch" ], 'org.eclipse.ui.externaltools.ExternalToolBuilder') + buildCommand([LaunchConfigHandle: "/.externalToolBuilders/OpenJPA Enhance Builder.launch"], 'org.eclipse.ui.externaltools.ExternalToolBuilder') } } diff --git a/fineract-loan/dependencies.gradle b/fineract-loan/dependencies.gradle index 6f364634aa1..68e629b5309 100644 --- a/fineract-loan/dependencies.gradle +++ b/fineract-loan/dependencies.gradle @@ -59,8 +59,8 @@ dependencies { 'org.apache.httpcomponents:httpcore', 'org.apache.commons:commons-collections4' - ) - implementation ('org.mnode.ical4j:ical4j') { + ) + implementation('org.mnode.ical4j:ical4j') { exclude group: 'commons-logging' exclude group: 'javax.activation' exclude group: 'com.sun.mail', module: 'javax.mail' @@ -68,7 +68,7 @@ dependencies { compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' annotationProcessor 'org.mapstruct:mapstruct-processor' - implementation ('org.springframework.boot:spring-boot-starter-data-jpa') { + implementation('org.springframework.boot:spring-boot-starter-data-jpa') { exclude group: 'org.hibernate' } implementation('org.eclipse.persistence:org.eclipse.persistence.jpa') { @@ -77,13 +77,13 @@ dependencies { // testCompile dependencies are ONLY used in src/test, not src/main. // Do NOT repeat dependencies which are ALREADY in implementation or runtimeOnly! // - testImplementation( 'io.github.classgraph:classgraph' ) - testImplementation ('org.springframework.boot:spring-boot-starter-test') { + testImplementation('io.github.classgraph:classgraph') + testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'com.jayway.jsonpath', module: 'json-path' exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' exclude group: 'jakarta.activation' exclude group: 'javax.activation' exclude group: 'org.skyscreamer' } - testImplementation ('org.mockito:mockito-inline') + testImplementation('org.mockito:mockito-inline') } diff --git a/fineract-loan/src/main/java/org/apache/fineract/accounting/productaccountmapping/service/LoanProductToGLAccountMappingHelper.java b/fineract-loan/src/main/java/org/apache/fineract/accounting/productaccountmapping/service/LoanProductToGLAccountMappingHelper.java index ecffdb7dba7..41abeedf31e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/accounting/productaccountmapping/service/LoanProductToGLAccountMappingHelper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/accounting/productaccountmapping/service/LoanProductToGLAccountMappingHelper.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.accounting.productaccountmapping.service; import com.google.gson.JsonElement; + import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.accounting.common.AccountingConstants.AccrualAccountsForLoan; import org.apache.fineract.accounting.common.AccountingConstants.CashAccountsForLoan; import org.apache.fineract.accounting.common.AccountingConstants.LoanProductAccountingParams; @@ -46,9 +48,9 @@ public class LoanProductToGLAccountMappingHelper extends ProductToGLAccountMappingHelper { public LoanProductToGLAccountMappingHelper(final GLAccountRepository glAccountRepository, - final ProductToGLAccountMappingRepository glAccountMappingRepository, final FromJsonHelper fromApiJsonHelper, - final ChargeRepositoryWrapper chargeRepositoryWrapper, final GLAccountRepositoryWrapper accountRepositoryWrapper, - final PaymentTypeRepositoryWrapper paymentTypeRepositoryWrapper, final CodeValueRepository codeValueRepository) { + final ProductToGLAccountMappingRepository glAccountMappingRepository, final FromJsonHelper fromApiJsonHelper, + final ChargeRepositoryWrapper chargeRepositoryWrapper, final GLAccountRepositoryWrapper accountRepositoryWrapper, + final PaymentTypeRepositoryWrapper paymentTypeRepositoryWrapper, final CodeValueRepository codeValueRepository) { super(glAccountRepository, glAccountMappingRepository, fromApiJsonHelper, chargeRepositoryWrapper, accountRepositoryWrapper, paymentTypeRepositoryWrapper, codeValueRepository); } @@ -58,12 +60,12 @@ public LoanProductToGLAccountMappingHelper(final GLAccountRepository glAccountRe ***/ public void saveLoanToAssetAccountMapping(final JsonElement element, final String paramName, final Long productId, - final int placeHolderTypeId) { + final int placeHolderTypeId) { saveProductToAccountMapping(element, paramName, productId, placeHolderTypeId, GLAccountType.ASSET, PortfolioProductType.LOAN); } public void saveLoanToAssetOrLiabilityAccountMapping(final JsonElement element, final String paramName, final Long productId, - final int placeHolderTypeId) { + final int placeHolderTypeId) { GLAccountType glAccountType = getGLAccountType(element, paramName, ASSET_LIABILITY_TYPES); if (glAccountType != null) { saveProductToAccountMapping(element, paramName, productId, placeHolderTypeId, glAccountType, PortfolioProductType.LOAN); @@ -71,17 +73,17 @@ public void saveLoanToAssetOrLiabilityAccountMapping(final JsonElement element, } public void saveLoanToIncomeAccountMapping(final JsonElement element, final String paramName, final Long productId, - final int placeHolderTypeId) { + final int placeHolderTypeId) { saveProductToAccountMapping(element, paramName, productId, placeHolderTypeId, GLAccountType.INCOME, PortfolioProductType.LOAN); } public void saveLoanToExpenseAccountMapping(final JsonElement element, final String paramName, final Long productId, - final int placeHolderTypeId) { + final int placeHolderTypeId) { saveProductToAccountMapping(element, paramName, productId, placeHolderTypeId, GLAccountType.EXPENSE, PortfolioProductType.LOAN); } public void saveLoanToLiabilityAccountMapping(final JsonElement element, final String paramName, final Long productId, - final int placeHolderTypeId) { + final int placeHolderTypeId) { saveProductToAccountMapping(element, paramName, productId, placeHolderTypeId, GLAccountType.LIABILITY, PortfolioProductType.LOAN); } @@ -89,13 +91,13 @@ public void saveLoanToLiabilityAccountMapping(final JsonElement element, final S * Set of abstractions for merging Savings Products to GL Account Mappings ***/ public void mergeLoanToAssetAccountMappingChanges(final JsonElement element, final String paramName, final Long productId, - final int accountTypeId, final String accountTypeName, final Map changes) { + final int accountTypeId, final String accountTypeName, final Map changes) { mergeProductToAccountMappingChanges(element, paramName, productId, accountTypeId, accountTypeName, changes, GLAccountType.ASSET, PortfolioProductType.LOAN); } public void mergeLoanToAssetOrLiabilityAccountMappingChanges(final JsonElement element, final String paramName, final Long productId, - final int accountTypeId, final String accountTypeName, final Map changes) { + final int accountTypeId, final String accountTypeName, final Map changes) { GLAccountType glAccountType = getGLAccountType(element, paramName, ASSET_LIABILITY_TYPES); if (glAccountType != null) { mergeProductToAccountMappingChanges(element, paramName, productId, accountTypeId, accountTypeName, changes, glAccountType, @@ -104,19 +106,19 @@ public void mergeLoanToAssetOrLiabilityAccountMappingChanges(final JsonElement e } public void mergeLoanToIncomeAccountMappingChanges(final JsonElement element, final String paramName, final Long productId, - final int accountTypeId, final String accountTypeName, final Map changes) { + final int accountTypeId, final String accountTypeName, final Map changes) { mergeProductToAccountMappingChanges(element, paramName, productId, accountTypeId, accountTypeName, changes, GLAccountType.INCOME, PortfolioProductType.LOAN); } public void mergeLoanToExpenseAccountMappingChanges(final JsonElement element, final String paramName, final Long productId, - final int accountTypeId, final String accountTypeName, final Map changes) { + final int accountTypeId, final String accountTypeName, final Map changes) { mergeProductToAccountMappingChanges(element, paramName, productId, accountTypeId, accountTypeName, changes, GLAccountType.EXPENSE, PortfolioProductType.LOAN); } public void mergeLoanToLiabilityAccountMappingChanges(final JsonElement element, final String paramName, final Long productId, - final int accountTypeId, final String accountTypeName, final Map changes) { + final int accountTypeId, final String accountTypeName, final Map changes) { mergeProductToAccountMappingChanges(element, paramName, productId, accountTypeId, accountTypeName, changes, GLAccountType.LIABILITY, PortfolioProductType.LOAN); } @@ -124,38 +126,38 @@ public void mergeLoanToLiabilityAccountMappingChanges(final JsonElement element, /*** Abstractions for payments channel related to loan products ***/ public void savePaymentChannelToFundSourceMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes) { + final Map changes) { savePaymentChannelToFundSourceMappings(command, element, productId, changes, PortfolioProductType.LOAN); } public void updatePaymentChannelToFundSourceMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes) { + final Map changes) { updatePaymentChannelToFundSourceMappings(command, element, productId, changes, PortfolioProductType.LOAN); } public void saveChargesToIncomeAccountMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes) { + final Map changes) { // save both fee and penalty charges saveChargesToGLAccountMappings(command, element, productId, changes, PortfolioProductType.LOAN, true); saveChargesToGLAccountMappings(command, element, productId, changes, PortfolioProductType.LOAN, false); } public void saveChargeOffReasonToExpenseAccountMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes) { + final Map changes) { saveReasonToGLAccountMappings(command, element, productId, changes, PortfolioProductType.LOAN, LoanProductAccountingParams.CHARGE_OFF_REASON_TO_EXPENSE_ACCOUNT_MAPPINGS, LoanProductAccountingParams.CHARGE_OFF_REASON_CODE_VALUE_ID, CashAccountsForLoan.CHARGE_OFF_EXPENSE); } public void saveWriteOffReasonToExpenseAccountMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes) { + final Map changes) { saveReasonToGLAccountMappings(command, element, productId, changes, PortfolioProductType.LOAN, LoanProductAccountingParams.WRITE_OFF_REASON_TO_EXPENSE_ACCOUNT_MAPPINGS, LoanProductAccountingParams.WRITE_OFF_REASON_CODE_VALUE_ID, CashAccountsForLoan.LOSSES_WRITTEN_OFF); } public void updateWriteOffReasonToExpenseAccountMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes) { + final Map changes) { final List existingWriteOffReasonToGLAccountMappings = this.accountMappingRepository .findAllWriteOffReasonsMappings(productId, PortfolioProductType.LOAN.getValue()); LoanProductAccountingParams reasonToExpenseAccountMappingsParam = LoanProductAccountingParams.WRITE_OFF_REASON_TO_EXPENSE_ACCOUNT_MAPPINGS; @@ -167,7 +169,7 @@ public void updateWriteOffReasonToExpenseAccountMappings(final JsonCommand comma } public void updateChargeOffReasonToExpenseAccountMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes) { + final Map changes) { final List chargeOffReasonsMappings = this.accountMappingRepository .findAllChargeOffReasonsMappings(productId, PortfolioProductType.LOAN.getValue()); LoanProductAccountingParams reasonToExpenseAccountMappingsParam = LoanProductAccountingParams.CHARGE_OFF_REASON_TO_EXPENSE_ACCOUNT_MAPPINGS; @@ -178,38 +180,38 @@ public void updateChargeOffReasonToExpenseAccountMappings(final JsonCommand comm } public void saveCapitalizedIncomeClassificationToIncomeAccountMappings(final JsonCommand command, final JsonElement element, - final Long productId, final Map changes) { + final Long productId, final Map changes) { saveClassificationToGLAccountMappings(command, element, productId, changes, PortfolioProductType.LOAN, LoanProductAccountingParams.CAPITALIZED_INCOME_CLASSIFICATION_TO_INCOME_ACCOUNT_MAPPINGS); } public void updateCapitalizedIncomeClassificationToIncomeAccountMappings(final JsonCommand command, final JsonElement element, - final Long productId, final Map changes) { + final Long productId, final Map changes) { updateClassificationToGLAccountMappings(command, element, productId, changes, PortfolioProductType.LOAN, LoanProductAccountingParams.CAPITALIZED_INCOME_CLASSIFICATION_TO_INCOME_ACCOUNT_MAPPINGS); } public void saveBuyDownFeeClassificationToIncomeAccountMappings(final JsonCommand command, final JsonElement element, - final Long productId, final Map changes) { + final Long productId, final Map changes) { saveClassificationToGLAccountMappings(command, element, productId, changes, PortfolioProductType.LOAN, LoanProductAccountingParams.BUYDOWN_FEE_CLASSIFICATION_TO_INCOME_ACCOUNT_MAPPINGS); } public void updateBuyDownFeeClassificationToIncomeAccountMappings(final JsonCommand command, final JsonElement element, - final Long productId, final Map changes) { + final Long productId, final Map changes) { updateClassificationToGLAccountMappings(command, element, productId, changes, PortfolioProductType.LOAN, LoanProductAccountingParams.BUYDOWN_FEE_CLASSIFICATION_TO_INCOME_ACCOUNT_MAPPINGS); } public void updateChargesToIncomeAccountMappings(final JsonCommand command, final JsonElement element, final Long productId, - final Map changes) { + final Map changes) { // update both fee and penalty charges updateChargeToIncomeAccountMappings(command, element, productId, changes, PortfolioProductType.LOAN, true); updateChargeToIncomeAccountMappings(command, element, productId, changes, PortfolioProductType.LOAN, false); } public Map populateChangesForNewLoanProductToGLAccountMappingCreation(final JsonElement element, - final AccountingRuleType accountingRuleType) { + final AccountingRuleType accountingRuleType) { final Map changes = new HashMap<>(); final Long fundAccountId = this.fromApiJsonHelper.extractLongNamed(LoanProductAccountingParams.FUND_SOURCE.getValue(), element); @@ -244,34 +246,34 @@ public Map populateChangesForNewLoanProductToGLAccountMappingCre switch (accountingRuleType) { case NONE: - break; + break; case CASH_BASED: populateChangesForCashBasedAccounting(changes, fundAccountId, loanPortfolioAccountId, incomeFromInterestId, incomeFromFeeId, incomeFromPenaltyId, writeOffAccountId, overPaymentAccountId, transfersInSuspenseAccountId, incomeFromRecoveryAccountId); - break; + break; case ACCRUAL_PERIODIC: populateChangesForAccrualBasedAccounting(changes, fundAccountId, loanPortfolioAccountId, incomeFromInterestId, incomeFromFeeId, incomeFromPenaltyId, writeOffAccountId, overPaymentAccountId, transfersInSuspenseAccountId, incomeFromRecoveryAccountId, incomeFromBuyDownFeesAccountId, receivableInterestAccountId, receivableFeeAccountId, receivablePenaltyAccountId); - break; + break; case ACCRUAL_UPFRONT: populateChangesForAccrualBasedAccounting(changes, fundAccountId, loanPortfolioAccountId, incomeFromInterestId, incomeFromFeeId, incomeFromPenaltyId, writeOffAccountId, overPaymentAccountId, transfersInSuspenseAccountId, incomeFromRecoveryAccountId, incomeFromBuyDownFeesAccountId, receivableInterestAccountId, receivableFeeAccountId, receivablePenaltyAccountId); - break; + break; } return changes; } private void populateChangesForAccrualBasedAccounting(final Map changes, final Long fundAccountId, - final Long loanPortfolioAccountId, final Long incomeFromInterestId, final Long incomeFromFeeId, final Long incomeFromPenaltyId, - final Long writeOffAccountId, final Long overPaymentAccountId, final Long transfersInSuspenseAccountId, - final Long incomeFromRecoveryAccountId, final Long incomeFromBuyDownFeesAccountId, final Long receivableInterestAccountId, - final Long receivableFeeAccountId, final Long receivablePenaltyAccountId) { + final Long loanPortfolioAccountId, final Long incomeFromInterestId, final Long incomeFromFeeId, final Long incomeFromPenaltyId, + final Long writeOffAccountId, final Long overPaymentAccountId, final Long transfersInSuspenseAccountId, + final Long incomeFromRecoveryAccountId, final Long incomeFromBuyDownFeesAccountId, final Long receivableInterestAccountId, + final Long receivableFeeAccountId, final Long receivablePenaltyAccountId) { changes.put(LoanProductAccountingParams.INTEREST_RECEIVABLE.getValue(), receivableInterestAccountId); changes.put(LoanProductAccountingParams.FEES_RECEIVABLE.getValue(), receivableFeeAccountId); @@ -283,9 +285,9 @@ private void populateChangesForAccrualBasedAccounting(final Map } private void populateChangesForCashBasedAccounting(final Map changes, final Long fundAccountId, - final Long loanPortfolioAccountId, final Long incomeFromInterestId, final Long incomeFromFeeId, final Long incomeFromPenaltyId, - final Long writeOffAccountId, final Long overPaymentAccountId, final Long transfersInSuspenseAccountId, - final Long incomeFromRecoveryAccountId) { + final Long loanPortfolioAccountId, final Long incomeFromInterestId, final Long incomeFromFeeId, final Long incomeFromPenaltyId, + final Long writeOffAccountId, final Long overPaymentAccountId, final Long transfersInSuspenseAccountId, + final Long incomeFromRecoveryAccountId) { changes.put(LoanProductAccountingParams.FUND_SOURCE.getValue(), fundAccountId); changes.put(LoanProductAccountingParams.LOAN_PORTFOLIO.getValue(), loanPortfolioAccountId); changes.put(LoanProductAccountingParams.INTEREST_ON_LOANS.getValue(), incomeFromInterestId); @@ -307,11 +309,11 @@ private void populateChangesForCashBasedAccounting(final Map cha * @param accountingRuleType */ public void handleChangesToLoanProductToGLAccountMappings(final Long loanProductId, final Map changes, - final JsonElement element, final AccountingRuleType accountingRuleType, final boolean enableIncomeCapitalization, - final boolean enableBuyDownFee, final boolean merchantBuyDownFee) { + final JsonElement element, final AccountingRuleType accountingRuleType, final boolean enableIncomeCapitalization, + final boolean enableBuyDownFee, final boolean merchantBuyDownFee) { switch (accountingRuleType) { case NONE: - break; + break; case CASH_BASED: // asset or liabilities mergeLoanToAssetOrLiabilityAccountMappingChanges(element, LoanProductAccountingParams.FUND_SOURCE.getValue(), loanProductId, @@ -366,7 +368,7 @@ public void handleChangesToLoanProductToGLAccountMappings(final Long loanProduct // liabilities mergeLoanToLiabilityAccountMappingChanges(element, LoanProductAccountingParams.OVERPAYMENT.getValue(), loanProductId, CashAccountsForLoan.OVERPAYMENT.getValue(), CashAccountsForLoan.OVERPAYMENT.toString(), changes); - break; + break; case ACCRUAL_UPFRONT: // fall through to periodic accrual case ACCRUAL_PERIODIC: @@ -469,7 +471,7 @@ public void handleChangesToLoanProductToGLAccountMappings(final Long loanProduct loanProductId, AccrualAccountsForLoan.DEFERRED_INCOME_LIABILITY.getValue(), AccrualAccountsForLoan.DEFERRED_INCOME_LIABILITY.toString(), changes); } - break; + break; } } diff --git a/fineract-loan/src/main/java/org/apache/fineract/cob/loan/ContextAwareTaskDecorator.java b/fineract-loan/src/main/java/org/apache/fineract/cob/loan/ContextAwareTaskDecorator.java index 8cde28bbf33..5bd3571b728 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/cob/loan/ContextAwareTaskDecorator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/cob/loan/ContextAwareTaskDecorator.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/cob/loan/LoanCOBBusinessStep.java b/fineract-loan/src/main/java/org/apache/fineract/cob/loan/LoanCOBBusinessStep.java index 9f2494045df..e7fa0bcac8c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/cob/loan/LoanCOBBusinessStep.java +++ b/fineract-loan/src/main/java/org/apache/fineract/cob/loan/LoanCOBBusinessStep.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/cob/service/RetrieveLoanIdService.java b/fineract-loan/src/main/java/org/apache/fineract/cob/service/RetrieveLoanIdService.java index 640368cbe11..cad2f146c9a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/cob/service/RetrieveLoanIdService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/cob/service/RetrieveLoanIdService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/core/exception/LinkedAccountRequiredExceptionMapper.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/core/exception/LinkedAccountRequiredExceptionMapper.java index 6af3fd29fad..364c9f9fb63 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/core/exception/LinkedAccountRequiredExceptionMapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/core/exception/LinkedAccountRequiredExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/core/exception/LoanIdsHardLockedExceptionMapper.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/core/exception/LoanIdsHardLockedExceptionMapper.java index 23188bce173..1b034ce673c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/core/exception/LoanIdsHardLockedExceptionMapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/core/exception/LoanIdsHardLockedExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/core/exception/MultiDisbursementDataRequiredExceptionMapper.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/core/exception/MultiDisbursementDataRequiredExceptionMapper.java index b598de247d5..f8f8bab98bb 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/core/exception/MultiDisbursementDataRequiredExceptionMapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/core/exception/MultiDisbursementDataRequiredExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/LoanAccountLockCannotBeOverruledExceptionMapper.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/LoanAccountLockCannotBeOverruledExceptionMapper.java index fa95f05a971..93b0714b1a8 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/LoanAccountLockCannotBeOverruledExceptionMapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/core/exceptionmapper/LoanAccountLockCannotBeOverruledExceptionMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/journalentry/LoanJournalEntryCreatedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/journalentry/LoanJournalEntryCreatedBusinessEvent.java index f21a70979fe..469eec5fe3f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/journalentry/LoanJournalEntryCreatedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/journalentry/LoanJournalEntryCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAcceptTransferBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAcceptTransferBusinessEvent.java index 986e26a598a..03d0c1ab846 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAcceptTransferBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAcceptTransferBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAccountCustomSnapshotBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAccountCustomSnapshotBusinessEvent.java index 628429671d3..7a1c080e542 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAccountCustomSnapshotBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAccountCustomSnapshotBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAccountDelinquencyPauseChangedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAccountDelinquencyPauseChangedBusinessEvent.java index 5b3419d53a8..9df550b368e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAccountDelinquencyPauseChangedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAccountDelinquencyPauseChangedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAccountSnapshotBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAccountSnapshotBusinessEvent.java index aa77dac826a..5b3908b1540 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAccountSnapshotBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAccountSnapshotBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAdjustTransactionBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAdjustTransactionBusinessEvent.java index c8629beb4d4..d36f1434830 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAdjustTransactionBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanAdjustTransactionBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanApplicationModifiedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanApplicationModifiedBusinessEvent.java index ceeffde7a7d..90e9f8d6736 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanApplicationModifiedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanApplicationModifiedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanApplyOverdueChargeBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanApplyOverdueChargeBusinessEvent.java index af11e9e2a65..c363655110c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanApplyOverdueChargeBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanApplyOverdueChargeBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanApprovedAmountChangedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanApprovedAmountChangedBusinessEvent.java index c05cf96f6de..b398e481665 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanApprovedAmountChangedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanApprovedAmountChangedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanApprovedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanApprovedBusinessEvent.java index 3ef58213b30..e666fa533b5 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanApprovedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanApprovedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanBalanceChangedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanBalanceChangedBusinessEvent.java index e40b301a646..010e5acd9d3 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanBalanceChangedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanBalanceChangedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanBusinessEvent.java index 62efeab5543..c90d4e5861c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanChargebackTransactionBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanChargebackTransactionBusinessEvent.java index 6cc63c795c6..d95022f97c8 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanChargebackTransactionBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanChargebackTransactionBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanCloseAsRescheduleBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanCloseAsRescheduleBusinessEvent.java index be384593648..15383e4c7a0 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanCloseAsRescheduleBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanCloseAsRescheduleBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanCloseBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanCloseBusinessEvent.java index 58cf81f3fde..35784c57693 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanCloseBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanCloseBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanCreatedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanCreatedBusinessEvent.java index 1256fdce0c4..4d20e9fdf2d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanCreatedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanDelinquencyRangeChangeBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanDelinquencyRangeChangeBusinessEvent.java index 4749568388e..788807ddc89 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanDelinquencyRangeChangeBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanDelinquencyRangeChangeBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanDisbursalBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanDisbursalBusinessEvent.java index 3219f7b6d6d..a7d40eaefe4 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanDisbursalBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanDisbursalBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanInitiateTransferBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanInitiateTransferBusinessEvent.java index 4e3be6d0670..b111ec6ae3b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanInitiateTransferBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanInitiateTransferBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanInterestRecalculationBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanInterestRecalculationBusinessEvent.java index 3e256ab4b7a..e1a16b82f3c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanInterestRecalculationBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanInterestRecalculationBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanReassignOfficerBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanReassignOfficerBusinessEvent.java index b0db66d3b6f..78173e6a193 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanReassignOfficerBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanReassignOfficerBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRejectTransferBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRejectTransferBusinessEvent.java index 3425ff843c8..592399a8102 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRejectTransferBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRejectTransferBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRejectedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRejectedBusinessEvent.java index 9daa349447d..4c5edf277a5 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRejectedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRejectedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRemoveOfficerBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRemoveOfficerBusinessEvent.java index dc0bbb9db23..572544174bf 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRemoveOfficerBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRemoveOfficerBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRescheduledDueAdjustScheduleBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRescheduledDueAdjustScheduleBusinessEvent.java index 90264dc4bd7..986bf9dc2e9 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRescheduledDueAdjustScheduleBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRescheduledDueAdjustScheduleBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRescheduledDueCalendarChangeBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRescheduledDueCalendarChangeBusinessEvent.java index 16f1d57b748..12b0fd64bbd 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRescheduledDueCalendarChangeBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRescheduledDueCalendarChangeBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRescheduledDueHolidayBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRescheduledDueHolidayBusinessEvent.java index 07ab6b5b12b..772e1ae011c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRescheduledDueHolidayBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanRescheduledDueHolidayBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanScheduleVariationsAddedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanScheduleVariationsAddedBusinessEvent.java index a6827de6651..12e50a370c2 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanScheduleVariationsAddedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanScheduleVariationsAddedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanScheduleVariationsDeletedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanScheduleVariationsDeletedBusinessEvent.java index 1920268fa38..d5f8bc749b2 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanScheduleVariationsDeletedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanScheduleVariationsDeletedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanStatusChangedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanStatusChangedBusinessEvent.java index 78c68a2ae9e..d9559240782 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanStatusChangedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanStatusChangedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanUndoApprovalBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanUndoApprovalBusinessEvent.java index e24afe2fa5e..f83aff5cce3 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanUndoApprovalBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanUndoApprovalBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanUndoDisbursalBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanUndoDisbursalBusinessEvent.java index 90d94aa671f..5edc0baeb29 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanUndoDisbursalBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanUndoDisbursalBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanUndoLastDisbursalBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanUndoLastDisbursalBusinessEvent.java index e8a2b5d676b..f95cf463e7b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanUndoLastDisbursalBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanUndoLastDisbursalBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanUpdateDisbursementDataBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanUpdateDisbursementDataBusinessEvent.java index f3a646a9925..710085d7a27 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanUpdateDisbursementDataBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanUpdateDisbursementDataBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanWithdrawTransferBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanWithdrawTransferBusinessEvent.java index ce648fc7ecf..338c0038141 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanWithdrawTransferBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanWithdrawTransferBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanWithdrawnByApplicantBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanWithdrawnByApplicantBusinessEvent.java index 0f71121e522..5611f3b3433 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanWithdrawnByApplicantBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/LoanWithdrawnByApplicantBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanAddChargeBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanAddChargeBusinessEvent.java index 40866452326..078fc591d3d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanAddChargeBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanAddChargeBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanChargeBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanChargeBusinessEvent.java index be42639be87..da3b09e27e9 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanChargeBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanChargeBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanDeleteChargeBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanDeleteChargeBusinessEvent.java index 9916ad7ad03..e53f8bb888f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanDeleteChargeBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanDeleteChargeBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanUpdateChargeBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanUpdateChargeBusinessEvent.java index 91a04e59e26..91a730eab1c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanUpdateChargeBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanUpdateChargeBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanWaiveChargeBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanWaiveChargeBusinessEvent.java index 4984362578e..8cb1ce265df 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanWaiveChargeBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanWaiveChargeBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanWaiveChargeUndoBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanWaiveChargeUndoBusinessEvent.java index 07b7185c989..d8272546e62 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanWaiveChargeUndoBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/charge/LoanWaiveChargeUndoBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/reaging/LoanReAgeBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/reaging/LoanReAgeBusinessEvent.java index 1dfea126dcc..e83e2f51e85 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/reaging/LoanReAgeBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/reaging/LoanReAgeBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/reaging/LoanUndoReAgeBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/reaging/LoanUndoReAgeBusinessEvent.java index 12830c2c5f0..61c21b0c612 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/reaging/LoanUndoReAgeBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/reaging/LoanUndoReAgeBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/reamortization/LoanReAmortizeBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/reamortization/LoanReAmortizeBusinessEvent.java index ba3dce4a081..603455acf60 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/reamortization/LoanReAmortizeBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/reamortization/LoanReAmortizeBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/reamortization/LoanUndoReAmortizeBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/reamortization/LoanUndoReAmortizeBusinessEvent.java index 58e4b8cf470..6176a6f1614 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/reamortization/LoanUndoReAmortizeBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/reamortization/LoanUndoReAmortizeBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/repayment/LoanRepaymentBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/repayment/LoanRepaymentBusinessEvent.java index a25909ff654..99f189c31ea 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/repayment/LoanRepaymentBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/repayment/LoanRepaymentBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/repayment/LoanRepaymentDueBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/repayment/LoanRepaymentDueBusinessEvent.java index f371e60fc8b..9ce3b1fd29b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/repayment/LoanRepaymentDueBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/repayment/LoanRepaymentDueBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/repayment/LoanRepaymentOverdueBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/repayment/LoanRepaymentOverdueBusinessEvent.java index f21425b93f9..9e1469dc059 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/repayment/LoanRepaymentOverdueBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/repayment/LoanRepaymentOverdueBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanAccrualAdjustmentTransactionBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanAccrualAdjustmentTransactionBusinessEvent.java index 73cb3619248..7df7c57642a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanAccrualAdjustmentTransactionBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanAccrualAdjustmentTransactionBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanAccrualTransactionCreatedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanAccrualTransactionCreatedBusinessEvent.java index b6763dd6c78..ee699cc0f90 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanAccrualTransactionCreatedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanAccrualTransactionCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanBuyDownFeeAdjustmentTransactionCreatedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanBuyDownFeeAdjustmentTransactionCreatedBusinessEvent.java index ee91f4b17bc..c604b760e42 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanBuyDownFeeAdjustmentTransactionCreatedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanBuyDownFeeAdjustmentTransactionCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanBuyDownFeeAmortizationAdjustmentTransactionCreatedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanBuyDownFeeAmortizationAdjustmentTransactionCreatedBusinessEvent.java index c8ef1b41212..a229c06f603 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanBuyDownFeeAmortizationAdjustmentTransactionCreatedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanBuyDownFeeAmortizationAdjustmentTransactionCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanBuyDownFeeAmortizationTransactionCreatedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanBuyDownFeeAmortizationTransactionCreatedBusinessEvent.java index 6abe1a53d84..f3bad2b8bbb 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanBuyDownFeeAmortizationTransactionCreatedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanBuyDownFeeAmortizationTransactionCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanBuyDownFeeTransactionCreatedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanBuyDownFeeTransactionCreatedBusinessEvent.java index ae9c7497df8..5f6f2f37011 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanBuyDownFeeTransactionCreatedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanBuyDownFeeTransactionCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCapitalizedIncomeAdjustmentTransactionCreatedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCapitalizedIncomeAdjustmentTransactionCreatedBusinessEvent.java index ad9ffd961ba..d8ac294d8b6 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCapitalizedIncomeAdjustmentTransactionCreatedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCapitalizedIncomeAdjustmentTransactionCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCapitalizedIncomeAmortizationAdjustmentTransactionCreatedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCapitalizedIncomeAmortizationAdjustmentTransactionCreatedBusinessEvent.java index c63da463521..19f9cacba11 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCapitalizedIncomeAmortizationAdjustmentTransactionCreatedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCapitalizedIncomeAmortizationAdjustmentTransactionCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent.java index d76d69733c1..bb1e65f0d7f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCapitalizedIncomeAmortizationTransactionCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCapitalizedIncomeTransactionCreatedBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCapitalizedIncomeTransactionCreatedBusinessEvent.java index 49a7e22d132..c334cfd75bf 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCapitalizedIncomeTransactionCreatedBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCapitalizedIncomeTransactionCreatedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeAdjustmentPostBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeAdjustmentPostBusinessEvent.java index b8b6e7f23d9..37eb3e1f9a5 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeAdjustmentPostBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeAdjustmentPostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeAdjustmentPreBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeAdjustmentPreBusinessEvent.java index 8840c78fdd3..9a201c02a05 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeAdjustmentPreBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeAdjustmentPreBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeOffPostBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeOffPostBusinessEvent.java index 93c343d56b9..3263a27649e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeOffPostBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeOffPostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeOffPreBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeOffPreBusinessEvent.java index cc246b3f803..87bd19bb6bd 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeOffPreBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeOffPreBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargePaymentPostBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargePaymentPostBusinessEvent.java index 4534222b99e..4d2ab389679 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargePaymentPostBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargePaymentPostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargePaymentPreBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargePaymentPreBusinessEvent.java index 74d3173df5e..152b7c240da 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargePaymentPreBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargePaymentPreBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeRefundBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeRefundBusinessEvent.java index 5f9cacec354..8debaf5373d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeRefundBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanChargeRefundBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCreditBalanceRefundPostBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCreditBalanceRefundPostBusinessEvent.java index bdb45a5eeb9..c54742fa3f1 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCreditBalanceRefundPostBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCreditBalanceRefundPostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCreditBalanceRefundPreBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCreditBalanceRefundPreBusinessEvent.java index 93871a413fe..2b4fa1fb612 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCreditBalanceRefundPreBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanCreditBalanceRefundPreBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanDisbursalTransactionBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanDisbursalTransactionBusinessEvent.java index f3b65ffed74..8d78e0889bf 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanDisbursalTransactionBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanDisbursalTransactionBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanForeClosurePostBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanForeClosurePostBusinessEvent.java index d43b769267e..61278e94f89 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanForeClosurePostBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanForeClosurePostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanForeClosurePreBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanForeClosurePreBusinessEvent.java index 71a0974b8ae..3c78bf13e36 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanForeClosurePreBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanForeClosurePreBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanRefundPostBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanRefundPostBusinessEvent.java index c0c28e915cd..ecd7429b7a8 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanRefundPostBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanRefundPostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanRefundPreBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanRefundPreBusinessEvent.java index be64fcd355f..44ff998884a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanRefundPreBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanRefundPreBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionAccrualActivityPostBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionAccrualActivityPostBusinessEvent.java index 732ce747745..69d01cd304f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionAccrualActivityPostBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionAccrualActivityPostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionAccrualActivityPreBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionAccrualActivityPreBusinessEvent.java index 3108396c5b6..fb7467dab02 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionAccrualActivityPreBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionAccrualActivityPreBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionBusinessEvent.java index cd9846dd5b6..929bea606a6 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionContractTerminationPostBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionContractTerminationPostBusinessEvent.java index 1289cbab0a1..6da8b8c618a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionContractTerminationPostBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionContractTerminationPostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionDownPaymentPostBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionDownPaymentPostBusinessEvent.java index 184d72d5c0d..0dd47f6f23a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionDownPaymentPostBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionDownPaymentPostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionDownPaymentPreBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionDownPaymentPreBusinessEvent.java index 0e9e37ca567..d5646bc5a7f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionDownPaymentPreBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionDownPaymentPreBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionFlagsData.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionFlagsData.java index a8288b8e23f..2b4c161662e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionFlagsData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionFlagsData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionGoodwillCreditPostBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionGoodwillCreditPostBusinessEvent.java index 2cc0f814beb..af9d9d2fa8f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionGoodwillCreditPostBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionGoodwillCreditPostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionGoodwillCreditPreBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionGoodwillCreditPreBusinessEvent.java index 0744eeab274..794f024582c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionGoodwillCreditPreBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionGoodwillCreditPreBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionInterestPaymentWaiverPostBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionInterestPaymentWaiverPostBusinessEvent.java index 23d5cc35a87..cb3c8aa3dfc 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionInterestPaymentWaiverPostBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionInterestPaymentWaiverPostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionInterestPaymentWaiverPreBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionInterestPaymentWaiverPreBusinessEvent.java index 361ac54aeb3..ea423fc4252 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionInterestPaymentWaiverPreBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionInterestPaymentWaiverPreBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionInterestRefundPostBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionInterestRefundPostBusinessEvent.java index cae0926e8ec..3ceb19c40d2 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionInterestRefundPostBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionInterestRefundPostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionInterestRefundPreBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionInterestRefundPreBusinessEvent.java index b0b15c53767..295ccb7b063 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionInterestRefundPreBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionInterestRefundPreBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionMakeRepaymentPostBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionMakeRepaymentPostBusinessEvent.java index 32f2175eef1..3cdc94a4136 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionMakeRepaymentPostBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionMakeRepaymentPostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionMakeRepaymentPreBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionMakeRepaymentPreBusinessEvent.java index e7a7798b57b..b12ea7161f1 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionMakeRepaymentPreBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionMakeRepaymentPreBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionMerchantIssuedRefundPostBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionMerchantIssuedRefundPostBusinessEvent.java index 424a4088141..573f7c5553e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionMerchantIssuedRefundPostBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionMerchantIssuedRefundPostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionMerchantIssuedRefundPreBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionMerchantIssuedRefundPreBusinessEvent.java index 3d860601945..5415e737556 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionMerchantIssuedRefundPreBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionMerchantIssuedRefundPreBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionPayoutRefundPostBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionPayoutRefundPostBusinessEvent.java index a0dcd0203be..e3f710db49e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionPayoutRefundPostBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionPayoutRefundPostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionPayoutRefundPreBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionPayoutRefundPreBusinessEvent.java index 93b834f4461..128b9ce18a1 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionPayoutRefundPreBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionPayoutRefundPreBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionRecoveryPaymentPostBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionRecoveryPaymentPostBusinessEvent.java index 0a668bfe078..1e4c39b6282 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionRecoveryPaymentPostBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionRecoveryPaymentPostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionRecoveryPaymentPreBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionRecoveryPaymentPreBusinessEvent.java index e6509749bde..5e6bf28c238 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionRecoveryPaymentPreBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanTransactionRecoveryPaymentPreBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanUndoChargeOffBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanUndoChargeOffBusinessEvent.java index bd65fef3143..84820ce7bc3 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanUndoChargeOffBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanUndoChargeOffBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanUndoContractTerminationBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanUndoContractTerminationBusinessEvent.java index 1fddf8cabe6..375098eb78f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanUndoContractTerminationBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanUndoContractTerminationBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanUndoWrittenOffBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanUndoWrittenOffBusinessEvent.java index 5863f2ccc32..f3e36d4a4c5 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanUndoWrittenOffBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanUndoWrittenOffBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanWaiveInterestBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanWaiveInterestBusinessEvent.java index cfc40573828..7693357dc6e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanWaiveInterestBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanWaiveInterestBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanWrittenOffPostBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanWrittenOffPostBusinessEvent.java index 83a77bb881e..54130cee30c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanWrittenOffPostBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanWrittenOffPostBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanWrittenOffPreBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanWrittenOffPreBusinessEvent.java index 44ec3e43f13..aec781c46d8 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanWrittenOffPreBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/LoanWrittenOffPreBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/reaging/LoanReAgeTransactionBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/reaging/LoanReAgeTransactionBusinessEvent.java index 9095d533ba9..c14be3c8700 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/reaging/LoanReAgeTransactionBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/reaging/LoanReAgeTransactionBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/reaging/LoanUndoReAgeTransactionBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/reaging/LoanUndoReAgeTransactionBusinessEvent.java index 540c2e06e81..8335d93fb92 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/reaging/LoanUndoReAgeTransactionBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/reaging/LoanUndoReAgeTransactionBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/reamortization/LoanReAmortizeTransactionBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/reamortization/LoanReAmortizeTransactionBusinessEvent.java index 4ad0a2d2920..b54c9c38b8f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/reamortization/LoanReAmortizeTransactionBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/reamortization/LoanReAmortizeTransactionBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/reamortization/LoanUndoReAmortizeTransactionBusinessEvent.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/reamortization/LoanUndoReAmortizeTransactionBusinessEvent.java index 30cf19e8f3f..871052197d0 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/reamortization/LoanUndoReAmortizeTransactionBusinessEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/transaction/reamortization/LoanUndoReAmortizeTransactionBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/jobs/exception/LoanIdsHardLockedException.java b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/jobs/exception/LoanIdsHardLockedException.java index 8a6d51b0e73..2bbc5c45fbc 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/infrastructure/jobs/exception/LoanIdsHardLockedException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/infrastructure/jobs/exception/LoanIdsHardLockedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/accountdetails/data/LoanAccountSummaryData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/accountdetails/data/LoanAccountSummaryData.java index aa52620728e..1d7e1f323d4 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/accountdetails/data/LoanAccountSummaryData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/accountdetails/data/LoanAccountSummaryData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.accountdetails.data; import java.math.BigDecimal; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; @@ -51,9 +52,9 @@ public class LoanAccountSummaryData { private final BigDecimal amountPaid; public LoanAccountSummaryData(final Long id, final String accountNo, final String externalId, final Long productId, - final String loanProductName, final String shortLoanProductName, final LoanStatusEnumData loanStatus, - final CurrencyData currency, final EnumOptionData loanType, final Integer loanCycle, final LoanApplicationTimelineData timeline, - final Boolean inArrears, final BigDecimal originalLoan, final BigDecimal loanBalance, final BigDecimal amountPaid) { + final String loanProductName, final String shortLoanProductName, final LoanStatusEnumData loanStatus, + final CurrencyData currency, final EnumOptionData loanType, final Integer loanCycle, final LoanApplicationTimelineData timeline, + final Boolean inArrears, final BigDecimal originalLoan, final BigDecimal loanBalance, final BigDecimal amountPaid) { this.id = id; this.accountNo = accountNo; this.parentAccountNumber = null; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/accountdetails/data/WorkingCapitalLoanAccountSummaryData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/accountdetails/data/WorkingCapitalLoanAccountSummaryData.java index 61449bc323c..b7b4e904fb3 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/accountdetails/data/WorkingCapitalLoanAccountSummaryData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/accountdetails/data/WorkingCapitalLoanAccountSummaryData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.accountdetails.data; import java.math.BigDecimal; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralApiConstants.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralApiConstants.java index c4cff0330dd..b5389a73ada 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralApiConstants.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateral/data/CollateralData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateral/data/CollateralData.java index 9426a0c84f1..b5a1a44b20d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateral/data/CollateralData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateral/data/CollateralData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.util.Collection; + import lombok.Getter; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.organisation.monetary.data.CurrencyData; @@ -39,7 +40,7 @@ public final class CollateralData { private final CurrencyData currency; public static CollateralData instance(final Long id, final CodeValueData type, final BigDecimal value, final String description, - final CurrencyData currencyData) { + final CurrencyData currencyData) { return new CollateralData(id, type, value, description, currencyData); } @@ -48,7 +49,7 @@ public static CollateralData template(final Collection codeValues } private CollateralData(final Long id, final CodeValueData type, final BigDecimal value, final String description, - final CurrencyData currencyData) { + final CurrencyData currencyData) { this.id = id; this.type = type; this.value = value; @@ -58,7 +59,7 @@ private CollateralData(final Long id, final CodeValueData type, final BigDecimal } private CollateralData(final Long id, final CodeValueData type, final BigDecimal value, final String description, - final CurrencyData currencyData, final Collection allowedCollateralTypes) { + final CurrencyData currencyData, final Collection allowedCollateralTypes) { this.id = id; this.type = type; this.value = value; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateral/domain/LoanCollateral.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateral/domain/LoanCollateral.java index 28ab6a871ed..eb9fbe24fee 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateral/domain/LoanCollateral.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateral/domain/LoanCollateral.java @@ -6,9 +6,9 @@ * 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 @@ -23,9 +23,11 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.util.LinkedHashMap; import java.util.Map; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.codes.domain.CodeValue; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/CollateralManagementJsonInputParams.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/CollateralManagementJsonInputParams.java index 55a46168c84..03350630740 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/CollateralManagementJsonInputParams.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/CollateralManagementJsonInputParams.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/ClientCollateralManagement.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/ClientCollateralManagement.java index 8a37529b6af..73805c2fb57 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/ClientCollateralManagement.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/ClientCollateralManagement.java @@ -6,9 +6,9 @@ * 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 @@ -26,11 +26,13 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToMany; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; + import lombok.Getter; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @@ -71,7 +73,7 @@ public ClientCollateralManagement(final BigDecimal quantity) { } private ClientCollateralManagement(final BigDecimal quantity, final Client client, - final CollateralManagementDomain collateralManagementData) { + final CollateralManagementDomain collateralManagementData) { this.quantity = quantity; this.client = client; this.collateral = collateralManagementData; @@ -83,7 +85,7 @@ public ClientCollateralManagement createNew(JsonCommand jsonCommand) { } public static ClientCollateralManagement createNew(final BigDecimal quantity, final Client client, - final CollateralManagementDomain collateral) { + final CollateralManagementDomain collateral) { return new ClientCollateralManagement(quantity, client, collateral); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/CollateralManagementDomain.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/CollateralManagementDomain.java index 30a958a1bfd..5da63253ff8 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/CollateralManagementDomain.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/CollateralManagementDomain.java @@ -6,9 +6,9 @@ * 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 @@ -26,11 +26,13 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToMany; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @@ -68,7 +70,7 @@ public CollateralManagementDomain() { } private CollateralManagementDomain(final String quality, final BigDecimal basePrice, final String unitType, final BigDecimal pctToBase, - final ApplicationCurrency currency, final String name) { + final ApplicationCurrency currency, final String name) { this.basePrice = basePrice; this.currency = currency; this.pctToBase = pctToBase; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyApiConstants.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyApiConstants.java index b6d9b34228d..daea5b10674 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyApiConstants.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyApiResourceSwagger.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyApiResourceSwagger.java index e4e9083a67b..05f76ef39ec 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyApiResourceSwagger.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,18 +19,22 @@ package org.apache.fineract.portfolio.delinquency.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; import java.time.OffsetDateTime; + import org.apache.fineract.portfolio.delinquency.data.DelinquencyRangeData; public final class DelinquencyApiResourceSwagger { - private DelinquencyApiResourceSwagger() {} + private DelinquencyApiResourceSwagger() { + } @Schema(description = "PostDelinquencyRangeResponse") public static final class PostDelinquencyRangeResponse { - private PostDelinquencyRangeResponse() {} + private PostDelinquencyRangeResponse() { + } @Schema(example = "1") public Long resourceId; @@ -39,7 +43,8 @@ private PostDelinquencyRangeResponse() {} @Schema(description = "PutDelinquencyRangeResponse") public static final class PutDelinquencyRangeResponse { - private PutDelinquencyRangeResponse() {} + private PutDelinquencyRangeResponse() { + } @Schema(example = "1") public Long resourceId; @@ -49,7 +54,8 @@ private PutDelinquencyRangeResponse() {} @Schema(description = "DeleteDelinquencyRangeResponse") public static final class DeleteDelinquencyRangeResponse { - private DeleteDelinquencyRangeResponse() {} + private DeleteDelinquencyRangeResponse() { + } @Schema(example = "1") public Long resourceId; @@ -58,7 +64,8 @@ private DeleteDelinquencyRangeResponse() {} @Schema(description = "PostDelinquencyBucketResponse") public static final class PostDelinquencyBucketResponse { - private PostDelinquencyBucketResponse() {} + private PostDelinquencyBucketResponse() { + } @Schema(example = "1") public Long resourceId; @@ -67,7 +74,8 @@ private PostDelinquencyBucketResponse() {} @Schema(description = "PutDelinquencyBucketResponse") public static final class PutDelinquencyBucketResponse { - private PutDelinquencyBucketResponse() {} + private PutDelinquencyBucketResponse() { + } @Schema(example = "1") public Long resourceId; @@ -76,7 +84,8 @@ private PutDelinquencyBucketResponse() {} @Schema(description = "DeleteDelinquencyBucketResponse") public static final class DeleteDelinquencyBucketResponse { - private DeleteDelinquencyBucketResponse() {} + private DeleteDelinquencyBucketResponse() { + } @Schema(example = "1") public Long resourceId; @@ -85,7 +94,8 @@ private DeleteDelinquencyBucketResponse() {} @Schema(description = "GetDelinquencyTagHistoryResponse") public static final class GetDelinquencyTagHistoryResponse { - private GetDelinquencyTagHistoryResponse() {} + private GetDelinquencyTagHistoryResponse() { + } @Schema(example = "1") public Long id; @@ -101,7 +111,8 @@ private GetDelinquencyTagHistoryResponse() {} @Schema(description = "GetDelinquencyActionsResponse") public static final class GetDelinquencyActionsResponse { - private GetDelinquencyActionsResponse() {} + private GetDelinquencyActionsResponse() { + } @Schema(example = "1") public Long id; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyBucketRequest.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyBucketRequest.java index 0d9b59ec281..97221648f92 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyBucketRequest.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyBucketRequest.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.io.Serializable; import java.math.BigDecimal; import java.util.List; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyRangeRequest.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyRangeRequest.java index c5426b9e63f..f3399cf74a7 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyRangeRequest.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/DelinquencyRangeRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/data/DelinquencyBucketResponse.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/data/DelinquencyBucketResponse.java index 28ef6ff47bb..eed1b6720b4 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/data/DelinquencyBucketResponse.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/data/DelinquencyBucketResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/data/DelinquencyBucketTemplateResponse.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/data/DelinquencyBucketTemplateResponse.java index 8076bf17957..822043f91f7 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/data/DelinquencyBucketTemplateResponse.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/data/DelinquencyBucketTemplateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.delinquency.api.data; import java.util.List; + import lombok.Data; import org.apache.fineract.infrastructure.core.data.StringEnumOptionData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/data/DelinquencyMinimumPaymentPeriodAndRuleResponse.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/data/DelinquencyMinimumPaymentPeriodAndRuleResponse.java index 9f64de7918f..59b273bfd2b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/data/DelinquencyMinimumPaymentPeriodAndRuleResponse.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/data/DelinquencyMinimumPaymentPeriodAndRuleResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ package org.apache.fineract.portfolio.delinquency.api.data; import java.math.BigDecimal; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/data/DelinquencyRangeResponse.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/data/DelinquencyRangeResponse.java index 0378ba3063b..985c7f84e06 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/data/DelinquencyRangeResponse.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/api/data/DelinquencyRangeResponse.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.delinquency.api.data; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/DelinquencyBucketData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/DelinquencyBucketData.java index f825d8460f6..53811337efc 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/DelinquencyBucketData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/DelinquencyBucketData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/DelinquencyMinimumPaymentPeriodAndRuleData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/DelinquencyMinimumPaymentPeriodAndRuleData.java index f00ae095b0d..ae7299fd399 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/DelinquencyMinimumPaymentPeriodAndRuleData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/DelinquencyMinimumPaymentPeriodAndRuleData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ package org.apache.fineract.portfolio.delinquency.data; import java.math.BigDecimal; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/DelinquencyRangeData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/DelinquencyRangeData.java index 52a11cdddb0..3dc62de0295 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/DelinquencyRangeData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/DelinquencyRangeData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.delinquency.data; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/LoanDelinquencyTagHistoryData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/LoanDelinquencyTagHistoryData.java index 191ded56b81..9098f847bf7 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/LoanDelinquencyTagHistoryData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/LoanDelinquencyTagHistoryData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/LoanInstallmentDelinquencyTagData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/LoanInstallmentDelinquencyTagData.java index 819db7384a9..c51976d66b6 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/LoanInstallmentDelinquencyTagData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/data/LoanInstallmentDelinquencyTagData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyAction.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyAction.java index b2192bf8410..6af99a89d69 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyAction.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyAction.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucketMappings.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucketMappings.java index 6fa952832d6..462d7ea0251 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucketMappings.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucketMappings.java @@ -6,9 +6,9 @@ * 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 @@ -34,7 +34,7 @@ @NoArgsConstructor @Entity @Table(name = "m_delinquency_bucket_mappings", uniqueConstraints = { - @UniqueConstraint(name = "uq_delinquency_bucket_mapping", columnNames = { "delinquencyBucket", "delinquencyRange" }) }) + @UniqueConstraint(name = "uq_delinquency_bucket_mapping", columnNames = {"delinquencyBucket", "delinquencyRange"})}) public class DelinquencyBucketMappings extends AbstractAuditableWithUTCDateTimeCustom { @ManyToOne diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucketMappingsRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucketMappingsRepository.java index e83adb0de36..73b98a14118 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucketMappingsRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucketMappingsRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.delinquency.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucketRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucketRepository.java index e7aadee33ed..a52fba18604 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucketRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyBucketRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.delinquency.domain; import java.util.Optional; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyMinimumPaymentPeriodAndRuleRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyMinimumPaymentPeriodAndRuleRepository.java index f84604c43a4..0ef5bb243cc 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyMinimumPaymentPeriodAndRuleRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyMinimumPaymentPeriodAndRuleRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyRangeRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyRangeRepository.java index da8085600dd..02e3640d7c8 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyRangeRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/DelinquencyRangeRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.delinquency.domain; import java.util.Optional; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanDelinquencyAction.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanDelinquencyAction.java index ac0b8808f8c..d2a785a63ce 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanDelinquencyAction.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanDelinquencyAction.java @@ -6,9 +6,9 @@ * 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 @@ -25,7 +25,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.time.LocalDate; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanDelinquencyActionRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanDelinquencyActionRepository.java index 8167de5903e..b08f691a660 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanDelinquencyActionRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanDelinquencyActionRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; @@ -36,7 +37,7 @@ public interface LoanDelinquencyActionRepository + " (da.action = org.apache.fineract.portfolio.delinquency.domain.DelinquencyAction.RESUME and da.endDate is null and :business_date >= da.startDate)) and" + " da.loan.id = :loan_id order by da.createdDate desc") Page getEffectiveDelinquencyActionForLoan(@Param("loan_id") Long loan_id, - @Param("business_date") LocalDate business_date, Pageable page); + @Param("business_date") LocalDate business_date, Pageable page); List findByLoanOrderById(Loan loan); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanDelinquencyTagHistory.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanDelinquencyTagHistory.java index da4bb7e0a54..848dd5d9240 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanDelinquencyTagHistory.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanDelinquencyTagHistory.java @@ -6,9 +6,9 @@ * 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 @@ -24,7 +24,9 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.Version; + import java.time.LocalDate; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanDelinquencyTagHistoryRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanDelinquencyTagHistoryRepository.java index 472641109d3..03ca70eec1a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanDelinquencyTagHistoryRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanDelinquencyTagHistoryRepository.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.List; import java.util.Optional; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanInstallmentDelinquencyTag.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanInstallmentDelinquencyTag.java index 52adee846cb..19dbf3ac825 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanInstallmentDelinquencyTag.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanInstallmentDelinquencyTag.java @@ -6,9 +6,9 @@ * 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 @@ -24,8 +24,10 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.Version; + import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -68,7 +70,7 @@ public class LoanInstallmentDelinquencyTag extends AbstractAuditableWithUTCDateT private Long version; public LoanInstallmentDelinquencyTag(DelinquencyRange delinquencyRange, Loan loan, LoanRepaymentScheduleInstallment installment, - LocalDate addedOnDate, LocalDate liftedOnDate, LocalDate firstOverdueDate, BigDecimal outstandingAmount) { + LocalDate addedOnDate, LocalDate liftedOnDate, LocalDate firstOverdueDate, BigDecimal outstandingAmount) { this.delinquencyRange = delinquencyRange; this.loan = loan; this.installment = installment; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanInstallmentDelinquencyTagRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanInstallmentDelinquencyTagRepository.java index 24dc1721b75..32236999781 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanInstallmentDelinquencyTagRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/domain/LoanInstallmentDelinquencyTagRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Optional; + import org.apache.fineract.portfolio.delinquency.data.LoanInstallmentDelinquencyTagData; import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/exception/DelinquencyBucketAgesOverlapedException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/exception/DelinquencyBucketAgesOverlapedException.java index 1757295ea3e..fd7d7229ca0 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/exception/DelinquencyBucketAgesOverlapedException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/exception/DelinquencyBucketAgesOverlapedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/exception/DelinquencyBucketNotFoundException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/exception/DelinquencyBucketNotFoundException.java index e7c324fbdc9..9c870e18791 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/exception/DelinquencyBucketNotFoundException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/exception/DelinquencyBucketNotFoundException.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,7 @@ public class DelinquencyBucketNotFoundException extends AbstractPlatformResourceNotFoundException { public DelinquencyBucketNotFoundException(String globalisationMessageCode, String defaultUserMessage, - Object... defaultUserMessageArgs) { + Object... defaultUserMessageArgs) { super(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/exception/DelinquencyRangeInvalidAgesException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/exception/DelinquencyRangeInvalidAgesException.java index ee469c6bdb0..f05c2b4cd37 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/exception/DelinquencyRangeInvalidAgesException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/exception/DelinquencyRangeInvalidAgesException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/exception/DelinquencyRangeNotFoundException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/exception/DelinquencyRangeNotFoundException.java index e0d3b5a622f..18ed246366e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/exception/DelinquencyRangeNotFoundException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/exception/DelinquencyRangeNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/CreateDelinquencyActionCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/CreateDelinquencyActionCommandHandler.java index 3d2160ae116..eed722ee48e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/CreateDelinquencyActionCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/CreateDelinquencyActionCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/CreateDelinquencyBucketCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/CreateDelinquencyBucketCommandHandler.java index 72eca2f4a07..250b4ae5e1e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/CreateDelinquencyBucketCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/CreateDelinquencyBucketCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/CreateDelinquencyRangeCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/CreateDelinquencyRangeCommandHandler.java index 39ee47504c8..9637bf17120 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/CreateDelinquencyRangeCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/CreateDelinquencyRangeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/DeleteDelinquencyBucketCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/DeleteDelinquencyBucketCommandHandler.java index b18a1c48255..fb9f5be9872 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/DeleteDelinquencyBucketCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/DeleteDelinquencyBucketCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/DeleteDelinquencyRangeCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/DeleteDelinquencyRangeCommandHandler.java index ae0f58b3fd5..35f56cf7bec 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/DeleteDelinquencyRangeCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/DeleteDelinquencyRangeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/UpdateDelinquencyBucketCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/UpdateDelinquencyBucketCommandHandler.java index 8b8891bf8b0..5eda2125424 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/UpdateDelinquencyBucketCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/UpdateDelinquencyBucketCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/UpdateDelinquencyRangeCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/UpdateDelinquencyRangeCommandHandler.java index 8f3f9d1295f..c3f28babcbb 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/UpdateDelinquencyRangeCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/UpdateDelinquencyRangeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/UpdateLoanDelinquencyBucketCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/UpdateLoanDelinquencyBucketCommandHandler.java index d36eddd2d47..76cfc0d1f70 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/UpdateLoanDelinquencyBucketCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/handler/UpdateLoanDelinquencyBucketCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/helper/DelinquencyEffectivePauseHelper.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/helper/DelinquencyEffectivePauseHelper.java index a5722ff75c9..d96f78de97d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/helper/DelinquencyEffectivePauseHelper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/helper/DelinquencyEffectivePauseHelper.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import org.apache.fineract.portfolio.delinquency.domain.LoanDelinquencyAction; import org.apache.fineract.portfolio.delinquency.validator.LoanDelinquencyActionData; @@ -30,5 +31,5 @@ public interface DelinquencyEffectivePauseHelper { Long getPausedDaysBeforeDate(List effectiveDelinquencyList, LocalDate date); Long getPausedDaysWithinRange(List effectiveDelinquencyList, LocalDate startInclusive, - LocalDate endExclusive); + LocalDate endExclusive); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/helper/DelinquencyEffectivePauseHelperImpl.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/helper/DelinquencyEffectivePauseHelperImpl.java index d47c4beae99..793fd53695c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/helper/DelinquencyEffectivePauseHelperImpl.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/helper/DelinquencyEffectivePauseHelperImpl.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.portfolio.delinquency.domain.DelinquencyAction; import org.apache.fineract.portfolio.delinquency.domain.LoanDelinquencyAction; @@ -68,7 +69,7 @@ public Long getPausedDaysBeforeDate(List effectiveDel @Override public Long getPausedDaysWithinRange(List effectiveDelinquencyList, LocalDate startInclusive, - LocalDate endExclusive) { + LocalDate endExclusive) { if (startInclusive == null || endExclusive == null || !startInclusive.isBefore(endExclusive)) { return 0L; } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/helper/InstallmentDelinquencyAggregator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/helper/InstallmentDelinquencyAggregator.java index 3ddcb36348f..59a63b5474a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/helper/InstallmentDelinquencyAggregator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/helper/InstallmentDelinquencyAggregator.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.Optional; import java.util.stream.Collector; import java.util.stream.Collectors; + import org.apache.fineract.infrastructure.core.service.MathUtil; import org.apache.fineract.portfolio.delinquency.data.LoanInstallmentDelinquencyTagData; import org.apache.fineract.portfolio.loanaccount.data.InstallmentLevelDelinquency; @@ -36,7 +37,8 @@ */ public final class InstallmentDelinquencyAggregator { - private InstallmentDelinquencyAggregator() {} + private InstallmentDelinquencyAggregator() { + } /** * Aggregates installment-level delinquency data by rangeId and sorts by minimumAgeDays. diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/DelinquencyBucketMapper.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/DelinquencyBucketMapper.java index 5457d26ea23..c02f4c22983 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/DelinquencyBucketMapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/DelinquencyBucketMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.delinquency.mapper; import java.util.List; + import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.portfolio.delinquency.data.DelinquencyBucketData; import org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/DelinquencyMinimumPaymentPeriodAndRuleMapper.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/DelinquencyMinimumPaymentPeriodAndRuleMapper.java index b0fc8886e96..a356ccf5327 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/DelinquencyMinimumPaymentPeriodAndRuleMapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/DelinquencyMinimumPaymentPeriodAndRuleMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/DelinquencyRangeMapper.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/DelinquencyRangeMapper.java index c7a772728e2..25ef6f627e3 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/DelinquencyRangeMapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/DelinquencyRangeMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.delinquency.mapper; import java.util.List; + import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.portfolio.delinquency.data.DelinquencyRangeData; import org.apache.fineract.portfolio.delinquency.domain.DelinquencyRange; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/DelinquencyResponseMapper.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/DelinquencyResponseMapper.java index a435767e61b..bb6d280662b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/DelinquencyResponseMapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/DelinquencyResponseMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.delinquency.mapper; import java.util.List; + import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.infrastructure.core.data.StringEnumOptionData; import org.apache.fineract.portfolio.delinquency.api.data.DelinquencyBucketResponse; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/LoanDelinquencyTagMapper.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/LoanDelinquencyTagMapper.java index c7c6b0f4735..e7bc61adb23 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/LoanDelinquencyTagMapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/mapper/LoanDelinquencyTagMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.delinquency.mapper; import java.util.List; + import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.portfolio.delinquency.data.LoanDelinquencyTagHistoryData; import org.apache.fineract.portfolio.delinquency.domain.LoanDelinquencyTagHistory; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/AbstractPossibleNextRepaymentCalculationService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/AbstractPossibleNextRepaymentCalculationService.java index d4db25a1e59..d31639e33f7 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/AbstractPossibleNextRepaymentCalculationService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/AbstractPossibleNextRepaymentCalculationService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.MathUtil; import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil; @@ -53,6 +54,6 @@ public BigDecimal possibleNextRepaymentAmount(Loan loan, LocalDate nextPaymentDu } public abstract BigDecimal calculateInterestRecalculationFutureOutstandingValue(Loan loan, LocalDate nextPaymentDueDate, - LoanRepaymentScheduleInstallment nextInstallment); + LoanRepaymentScheduleInstallment nextInstallment); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyReadPlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyReadPlatformService.java index bad79f2e7b3..69e8e405f46 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyReadPlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.util.Collection; import java.util.List; + import org.apache.fineract.portfolio.delinquency.data.DelinquencyBucketData; import org.apache.fineract.portfolio.delinquency.data.DelinquencyRangeData; import org.apache.fineract.portfolio.delinquency.data.LoanDelinquencyTagHistoryData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyReadPlatformServiceImpl.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyReadPlatformServiceImpl.java index a49b5dee7f5..97fcae17b90 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyReadPlatformServiceImpl.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import java.util.Comparator; import java.util.List; import java.util.Optional; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -279,7 +280,7 @@ private void addInstallmentLevelDelinquencyData(CollectionData collectionData, L } void enrichWithDelinquencyPausePeriodInfo(CollectionData collectionData, Collection effectiveDelinquencyList, - LocalDate businessDate) { + LocalDate businessDate) { List result = effectiveDelinquencyList.stream() // .sorted(Comparator.comparing(LoanDelinquencyActionData::getStartDate)) // .map(lda -> toDelinquencyPausePeriod(businessDate, lda)).toList(); // diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyWritePlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyWritePlatformService.java index c02222c14b6..299c0422d22 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyWritePlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.delinquency.service; import java.util.List; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.portfolio.delinquency.validator.LoanDelinquencyActionData; @@ -46,10 +47,10 @@ public interface DelinquencyWritePlatformService { void cleanLoanDelinquencyTags(Loan loan); LoanScheduleDelinquencyData calculateDelinquencyData(LoanScheduleDelinquencyData loanScheduleDelinquencyData, - List effectiveDelinquencyList); + List effectiveDelinquencyList); void applyDelinquencyTagToLoan(LoanScheduleDelinquencyData loanDelinquencyData, - List effectiveDelinquencyList); + List effectiveDelinquencyList); CommandProcessingResult createDelinquencyAction(Long loanId, JsonCommand command); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyWritePlatformServiceHelper.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyWritePlatformServiceHelper.java index c85459fef3a..530943f669d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyWritePlatformServiceHelper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyWritePlatformServiceHelper.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.List; import java.util.Map; import java.util.Optional; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -144,7 +145,7 @@ public List sortDelinquencyRangesByMinAge(List installmentsCollectionData) { + final Map installmentsCollectionData) { boolean isDelinquencyRangeChangedForAnyOfInstallment = false; for (LoanRepaymentScheduleInstallment installment : loan.getRepaymentScheduleInstallments()) { if (installmentsCollectionData.containsKey(installment.getId())) { @@ -176,7 +177,7 @@ private void removeDelinquencyTagsForNonExistingInstallments(Long loanId) { } private boolean setInstallmentDelinquencyDetails(final Loan loan, final LoanRepaymentScheduleInstallment installment, - final DelinquencyBucket delinquencyBucket, final CollectionData installmentDelinquencyData) { + final DelinquencyBucket delinquencyBucket, final CollectionData installmentDelinquencyData) { DelinquencyRange delinquencyRangeForInstallment = getInstallmentDelinquencyRange(delinquencyBucket, installmentDelinquencyData.getDelinquentDays()); return setDelinquencyDetailsForInstallment(loan, installment, installmentDelinquencyData, delinquencyRangeForInstallment); @@ -206,7 +207,7 @@ private DelinquencyRange getInstallmentDelinquencyRange(final DelinquencyBucket } private boolean setDelinquencyDetailsForInstallment(final Loan loan, final LoanRepaymentScheduleInstallment installment, - CollectionData installmentDelinquencyData, final DelinquencyRange delinquencyRangeForInstallment) { + CollectionData installmentDelinquencyData, final DelinquencyRange delinquencyRangeForInstallment) { List installmentDelinquencyTags = new ArrayList<>(); LocalDate delinquencyCalculationDate = DateUtils.getBusinessLocalDate(); boolean isDelinquencyRangeChanged = false; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyWritePlatformServiceImpl.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyWritePlatformServiceImpl.java index 8b6c727a63d..329978493d4 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyWritePlatformServiceImpl.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/DelinquencyWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -190,7 +191,7 @@ public CommandProcessingResult deleteDelinquencyBucket(Long delinquencyBucketId, @Override public LoanScheduleDelinquencyData calculateDelinquencyData(LoanScheduleDelinquencyData loanScheduleDelinquencyData, - List effectiveDelinquencyList) { + List effectiveDelinquencyList) { Loan loan = loanScheduleDelinquencyData.getLoan(); if (loan == null) { loan = this.loanRepository.findOneWithNotFoundDetection(loanScheduleDelinquencyData.getLoanId()); @@ -240,7 +241,7 @@ public CommandProcessingResult applyDelinquencyTagToLoan(Long loanId, JsonComman @Override public void applyDelinquencyTagToLoan(LoanScheduleDelinquencyData loanDelinquencyData, - List effectiveDelinquencyList) { + List effectiveDelinquencyList) { final Loan loan = loanDelinquencyData.getLoan(); if (loan.hasDelinquencyBucket()) { final DelinquencyBucket delinquencyBucket = loan.getLoanProduct().getDelinquencyBucket(); @@ -257,7 +258,7 @@ public void applyDelinquencyTagToLoan(LoanScheduleDelinquencyData loanDelinquenc } private Map applyDelinquencyToLoanAndInstallments(Loan loan, DelinquencyBucket delinquencyBucket, - CollectionData collectionData, Map installmentsCollectionData) { + CollectionData collectionData, Map installmentsCollectionData) { // Order is important: first calculate loan level delinquency, then the installment level // delinquency for loan Map result = delinquencyHelper.applyDelinquencyForLoan(loan, delinquencyBucket, collectionData.getDelinquentDays()); @@ -349,7 +350,7 @@ private DelinquencyRange createDelinquencyRange(DelinquencyRangeData data, Map changes) { + Map changes) { if (!data.getClassification().equalsIgnoreCase(delinquencyRange.getClassification())) { delinquencyRange.setClassification(data.getClassification()); changes.put(DelinquencyApiConstants.CLASSIFICATION_PARAM_NAME, data.getClassification()); @@ -394,7 +395,7 @@ private DelinquencyBucket createDelinquencyBucket(DelinquencyBucketData data, Ma } private DelinquencyBucket updateDelinquencyBucket(DelinquencyBucket delinquencyBucket, DelinquencyBucketData data, - Map changes) { + Map changes) { if (!data.getName().equalsIgnoreCase(delinquencyBucket.getName())) { Optional existingEntityByName = repositoryBucket.findByName(data.getName()); if (existingEntityByName.isPresent()) { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/LoanDelinquencyDomainService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/LoanDelinquencyDomainService.java index 065eca1a8ad..09fa590835a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/LoanDelinquencyDomainService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/LoanDelinquencyDomainService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.delinquency.service; import java.util.List; + import org.apache.fineract.portfolio.delinquency.validator.LoanDelinquencyActionData; import org.apache.fineract.portfolio.loanaccount.data.CollectionData; import org.apache.fineract.portfolio.loanaccount.data.LoanDelinquencyData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/LoanDelinquencyDomainServiceImpl.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/LoanDelinquencyDomainServiceImpl.java index 53d3f244d75..8209ccb0c17 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/LoanDelinquencyDomainServiceImpl.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/LoanDelinquencyDomainServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -217,7 +218,7 @@ public LoanDelinquencyData getLoanDelinquencyData(final Loan loan, List effectiveDelinquencyList, final List chargebackTransactions) { + final List effectiveDelinquencyList, final List chargebackTransactions) { final LocalDate businessDate = DateUtils.getBusinessLocalDate(); final CollectionData collectionData = CollectionData.template(); LocalDate overdueSinceDate; @@ -257,7 +258,7 @@ private CollectionData getInstallmentOverdueCollectionData(final Loan loan, fina } private CollectionData calculateDelinquencyDataForOverdueInstallment(final Loan loan, - final LoanRepaymentScheduleInstallment installment, final List chargebackTransactions) { + final LoanRepaymentScheduleInstallment installment, final List chargebackTransactions) { final MonetaryCurrency loanCurrency = loan.getCurrency(); final LoanRepaymentScheduleInstallment latestInstallment = loan.getLastLoanRepaymentScheduleInstallment(); final CollectionData collectionData = CollectionData.template(); @@ -284,7 +285,7 @@ private CollectionData calculateDelinquencyDataForOverdueInstallment(final Loan && DateUtils.isBefore(loanTransaction.getTransactionDate(), installment.getDueDate()); final boolean isLoanTransactionIsOnOrBeforeLastInstallmentDueDate = isLatestInstallment && (DateUtils.isEqual(loanTransaction.getTransactionDate(), installment.getDueDate()) - || DateUtils.isBefore(loanTransaction.getTransactionDate(), installment.getDueDate())); + || DateUtils.isBefore(loanTransaction.getTransactionDate(), installment.getDueDate())); if (isLoanTransactionIsOnOrAfterInstallmentFromDate && (isLoanTransactionIsBeforeNotLastInstallmentDueDate || isLoanTransactionIsOnOrBeforeLastInstallmentDueDate)) { amountAvailable = amountAvailable.subtract(loanTransaction.getAmount()); @@ -304,7 +305,7 @@ private CollectionData calculateDelinquencyDataForOverdueInstallment(final Loan } private CollectionData calculateDelinquencyDataForNonOverdueInstallment(final Loan loan, - final LoanRepaymentScheduleInstallment installment) { + final LoanRepaymentScheduleInstallment installment) { final LocalDate businessDate = DateUtils.getBusinessLocalDate(); final MonetaryCurrency loanCurrency = loan.getCurrency(); @@ -347,7 +348,7 @@ private CollectionData calculateDelinquencyDataForNonOverdueInstallment(final Lo } private void calculateAndSetDelinquentDays(CollectionData collectionData, long overdueDays, Integer graceDays, - List effectiveDelinquencyList, LocalDate businessDate, LocalDate overdueSinceDate) { + List effectiveDelinquencyList, LocalDate businessDate, LocalDate overdueSinceDate) { collectionData.setDelinquentDays(0L); if (overdueDays > 0) { Long pausedDays = delinquencyEffectivePauseHelper.getPausedDaysWithinRange(effectiveDelinquencyList, overdueSinceDate, diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/PossibleNextRepaymentCalculationService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/PossibleNextRepaymentCalculationService.java index 1bfc3cd22cd..762a5706e3c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/PossibleNextRepaymentCalculationService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/PossibleNextRepaymentCalculationService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; public interface PossibleNextRepaymentCalculationService { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/PossibleNextRepaymentCalculationServiceDiscovery.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/PossibleNextRepaymentCalculationServiceDiscovery.java index b4a80361019..6fdcedb916e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/PossibleNextRepaymentCalculationServiceDiscovery.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/PossibleNextRepaymentCalculationServiceDiscovery.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.delinquency.service; import java.util.List; + import lombok.AllArgsConstructor; import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.springframework.stereotype.Service; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/DelinquencyActionParameters.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/DelinquencyActionParameters.java index 95d484c5a68..1603d0a35e5 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/DelinquencyActionParameters.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/DelinquencyActionParameters.java @@ -6,9 +6,9 @@ * 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 @@ -20,7 +20,8 @@ public final class DelinquencyActionParameters { - private DelinquencyActionParameters() {} + private DelinquencyActionParameters() { + } public static final String ACTION = "action"; public static final String START_DATE = "startDate"; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/DelinquencyActionParseAndValidator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/DelinquencyActionParseAndValidator.java index f7e7ebaa0cf..d87902c516b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/DelinquencyActionParseAndValidator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/DelinquencyActionParseAndValidator.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import static org.apache.fineract.portfolio.delinquency.validator.DelinquencyActionParameters.START_DATE; import com.google.gson.JsonElement; + import java.time.LocalDate; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -49,7 +51,7 @@ public class DelinquencyActionParseAndValidator extends ParseAndValidator { private final DelinquencyEffectivePauseHelper delinquencyEffectivePauseHelper; public LoanDelinquencyAction validateAndParseUpdate(@NonNull final JsonCommand command, Loan loan, - List savedDelinquencyActions, LocalDate businessDate) { + List savedDelinquencyActions, LocalDate businessDate) { List effectiveDelinquencyList = delinquencyEffectivePauseHelper .calculateEffectiveDelinquencyList(savedDelinquencyActions); LoanDelinquencyAction parsedDelinquencyAction = parseCommand(command); @@ -79,7 +81,7 @@ private void validateBothStartAndEndDatesAreProvided(LoanDelinquencyAction parse } private void validateResumeShouldBeOnActivePause(LoanDelinquencyAction parsedDelinquencyAction, - List savedDelinquencyActions) { + List savedDelinquencyActions) { boolean match = savedDelinquencyActions.stream() .anyMatch(lda -> !DateUtils.isBefore(parsedDelinquencyAction.getStartDate(), lda.getStartDate()) && !DateUtils.isAfter(parsedDelinquencyAction.getStartDate(), lda.getEndDate())); @@ -90,7 +92,7 @@ private void validateResumeShouldBeOnActivePause(LoanDelinquencyAction parsedDel } private void validateResumeDoesNotExist(LoanDelinquencyAction parsedDelinquencyAction, - List savedDelinquencyActions) { + List savedDelinquencyActions) { boolean match = savedDelinquencyActions.stream() // .filter(action -> DelinquencyAction.RESUME.equals(action.getAction())) // .anyMatch(action -> parsedDelinquencyAction.getStartDate().isEqual(action.getStartDate())); @@ -126,7 +128,7 @@ private void validatePauseStartAndEndDate(LoanDelinquencyAction parsedDelinquenc } private void validatePauseStartDateNotBeforeDisbursementDate(LoanDelinquencyAction parsedDelinquencyAction, - LocalDate firstDisbursalDate) { + LocalDate firstDisbursalDate) { if (firstDisbursalDate.isAfter(parsedDelinquencyAction.getStartDate())) { raiseValidationError("loan-delinquency-action-invalid-start-date", "Start date of pause period must be after first disbursal date", START_DATE); @@ -140,7 +142,7 @@ private void validateLoanIsActive(Loan loan) { } private void validatePauseShallNotOverlap(LoanDelinquencyAction parsedDelinquencyAction, - List delinquencyActions) { + List delinquencyActions) { if (delinquencyActions.stream().filter(lda -> lda.getAction().equals(DelinquencyAction.PAUSE)) .anyMatch(lda -> isOverlapping(parsedDelinquencyAction, lda))) { raiseValidationError("loan-delinquency-action-overlapping", diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/DelinquencyBucketParseAndValidator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/DelinquencyBucketParseAndValidator.java index b37adeebc82..bca12d37728 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/DelinquencyBucketParseAndValidator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/DelinquencyBucketParseAndValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,10 +20,12 @@ import com.google.gson.JsonObject; import jakarta.validation.constraints.NotNull; + import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import java.util.Locale; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -55,7 +57,7 @@ public DelinquencyBucketData validateAndParseUpdate(@NotNull final JsonCommand c } private DelinquencyBucketData validateAndParseUpdate(final DataValidatorBuilder dataValidator, JsonObject element, - FromJsonHelper jsonHelper) { + FromJsonHelper jsonHelper) { if (element == null) { return null; } @@ -101,7 +103,7 @@ private DelinquencyBucketData validateAndParseUpdate(final DataValidatorBuilder } private DelinquencyMinimumPaymentPeriodAndRuleData validateAndParseUpdateMinimumPaymentPeriodAndRule(DataValidatorBuilder dataValidator, - JsonObject element, FromJsonHelper jsonHelper) { + JsonObject element, FromJsonHelper jsonHelper) { dataValidator.reset().parameter(DelinquencyApiConstants.MINIMUM_PAYMENT_PERIOD_AND_RULE_PARAM_NAME).value(element).notNull(); if (element != null) { Locale locale = jsonHelper.extractLocaleParameter(element); @@ -131,7 +133,7 @@ private DelinquencyMinimumPaymentPeriodAndRuleData validateAndParseUpdateMinimum return dataValidator.hasError() ? null : new DelinquencyMinimumPaymentPeriodAndRuleData(frequency, delinquencyFrequencyType, minimumPayment, - delinquencyMinimumPayment); + delinquencyMinimumPayment); } return null; } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/DelinquencyRangeParseAndValidator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/DelinquencyRangeParseAndValidator.java index e1030e46786..e4a8ef4e8af 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/DelinquencyRangeParseAndValidator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/DelinquencyRangeParseAndValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,9 +20,11 @@ import com.google.gson.JsonObject; import jakarta.validation.constraints.NotNull; + import java.util.ArrayList; import java.util.List; import java.util.Locale; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -49,7 +51,7 @@ public DelinquencyRangeData validateAndParseUpdate(@NotNull final JsonCommand co } private DelinquencyRangeData validateAndParseUpdate(final DataValidatorBuilder dataValidator, JsonObject element, - FromJsonHelper jsonHelper) { + FromJsonHelper jsonHelper) { if (element == null) { return null; } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/LoanDelinquencyActionData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/LoanDelinquencyActionData.java index 728beb1f3d0..276a7f117e7 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/LoanDelinquencyActionData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/delinquency/validator/LoanDelinquencyActionData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.time.OffsetDateTime; + import lombok.Data; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.portfolio.delinquency.domain.DelinquencyAction; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/data/InterestPauseRequestDto.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/data/InterestPauseRequestDto.java index 6763c2b8711..e78db4da320 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/data/InterestPauseRequestDto.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/data/InterestPauseRequestDto.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/data/InterestPauseResponseDto.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/data/InterestPauseResponseDto.java index 63578cf9dfd..1e013ef73cf 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/data/InterestPauseResponseDto.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/data/InterestPauseResponseDto.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.portfolio.interestpauses.data; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/handler/CreateInterestPauseCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/handler/CreateInterestPauseCommandHandler.java index 6246f278c8b..19e02ce150e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/handler/CreateInterestPauseCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/handler/CreateInterestPauseCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/handler/DeleteInterestPauseCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/handler/DeleteInterestPauseCommandHandler.java index f620952c2c5..a4283364967 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/handler/DeleteInterestPauseCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/handler/DeleteInterestPauseCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/handler/UpdateInterestPauseCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/handler/UpdateInterestPauseCommandHandler.java index f4bda33a61d..4abc4c0963b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/handler/UpdateInterestPauseCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/handler/UpdateInterestPauseCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseReadPlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseReadPlatformService.java index a55326b3edc..782a04b11c8 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseReadPlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.interestpauses.service; import java.util.List; + import org.apache.fineract.portfolio.interestpauses.data.InterestPauseResponseDto; public interface InterestPauseReadPlatformService { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseReadPlatformServiceImpl.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseReadPlatformServiceImpl.java index e8ae87d7537..27035277bda 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseReadPlatformServiceImpl.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Locale; + import lombok.AllArgsConstructor; import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.apache.fineract.infrastructure.core.service.DateUtils; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseWritePlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseWritePlatformService.java index fdf3122eede..df73d7253d1 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseWritePlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -39,7 +39,7 @@ public interface InterestPauseWritePlatformService { * @return the ID of the created loan term variation representing the interest pause */ CommandProcessingResult createInterestPause(ExternalId loanExternalId, String startDate, String endDate, String dateFormat, - String locale); + String locale); /** * Create a new interest pause period for a loan identified by its internal ID. @@ -98,7 +98,7 @@ CommandProcessingResult createInterestPause(ExternalId loanExternalId, String st * @return the updated loan term variation ID along with the updated fields */ CommandProcessingResult updateInterestPause(Long loanId, Long variationId, String startDateString, String endDateString, - String dateFormat, String locale); + String dateFormat, String locale); /** * Update an existing interest pause period for a loan identified by its internal ID. @@ -118,5 +118,5 @@ CommandProcessingResult updateInterestPause(Long loanId, Long variationId, Strin * @return the updated loan term variation ID along with the updated fields */ CommandProcessingResult updateInterestPause(ExternalId loanExternalId, Long variationId, String startDateString, String endDateString, - String dateFormat, String locale); + String dateFormat, String locale); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseWritePlatformServiceImpl.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseWritePlatformServiceImpl.java index 7d9db150f9f..1e8032e9c98 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseWritePlatformServiceImpl.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/InterestPauseWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -30,6 +30,7 @@ import java.util.Locale; import java.util.Map; import java.util.Objects; + import lombok.AllArgsConstructor; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.infrastructure.core.data.CommandProcessingResultBuilder; @@ -61,7 +62,7 @@ public class InterestPauseWritePlatformServiceImpl implements InterestPauseWrite @Override public CommandProcessingResult createInterestPause(final ExternalId loanExternalId, final String startDateString, - final String endDateString, final String dateFormat, final String locale) { + final String endDateString, final String dateFormat, final String locale) { final LocalDate startDate = parseDate(startDateString, dateFormat, locale); final LocalDate endDate = parseDate(endDateString, dateFormat, locale); final Loan loan = loanAssembler.assembleFrom(loanExternalId, false); @@ -71,7 +72,7 @@ public CommandProcessingResult createInterestPause(final ExternalId loanExternal @Override public CommandProcessingResult createInterestPause(final Long loanId, final String startDateString, final String endDateString, - final String dateFormat, final String locale) { + final String dateFormat, final String locale) { final LocalDate startDate = parseDate(startDateString, dateFormat, locale); final LocalDate endDate = parseDate(endDateString, dateFormat, locale); final Loan loan = loanAssembler.assembleFrom(loanId, false); @@ -91,14 +92,14 @@ public CommandProcessingResult deleteInterestPause(Long loanId, Long variationId @Override public CommandProcessingResult updateInterestPause(ExternalId loanExternalId, Long variationId, String startDateString, - String endDateString, String dateFormat, String locale) { + String endDateString, String dateFormat, String locale) { return processUpdateInterestPause(loanRepositoryWrapper.findOneWithNotFoundDetection(loanExternalId), variationId, startDateString, endDateString, dateFormat, locale); } @Override public CommandProcessingResult updateInterestPause(Long loanId, Long variationId, String startDateString, String endDateString, - String dateFormat, String locale) { + String dateFormat, String locale) { return processUpdateInterestPause(loanRepositoryWrapper.findOneWithNotFoundDetection(loanId), variationId, startDateString, endDateString, dateFormat, locale); } @@ -125,7 +126,7 @@ private CommandProcessingResult processDeleteInterestPause(Loan loan, Long varia } private CommandProcessingResult processUpdateInterestPause(Loan loan, Long variationId, String startDateString, String endDateString, - String dateFormat, String locale) { + String dateFormat, String locale) { LocalDate startDate = parseDate(startDateString, dateFormat, locale); LocalDate endDate = parseDate(endDateString, dateFormat, locale); @@ -155,7 +156,7 @@ private CommandProcessingResult processUpdateInterestPause(Loan loan, Long varia } private CommandProcessingResult processInterestPause(final Loan loan, final LocalDate startDate, final LocalDate endDate, - String dateFormat, String locale) { + String dateFormat, String locale) { validateActiveLoan(loan); validateInterestPauseDates(loan, startDate, endDate, dateFormat, locale, null); @@ -176,7 +177,7 @@ private CommandProcessingResult processInterestPause(final Loan loan, final Loca } private void validateInterestPauseDates(Loan loan, LocalDate startDate, LocalDate endDate, String dateFormat, String locale, - Long currentVariationId) { + Long currentVariationId) { Validator.validateOrThrow("InterestPause", baseDataValidator -> { baseDataValidator.reset().parameter("startDate").value(startDate).notBlank(); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/LoanAccountTransfersService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/LoanAccountTransfersService.java index 0ecfe288b90..e3ed7aa5960 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/LoanAccountTransfersService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/service/LoanAccountTransfersService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanAmortizationAllocationApiResourceSwagger.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanAmortizationAllocationApiResourceSwagger.java index e8081bdb065..44a1fcd9d86 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanAmortizationAllocationApiResourceSwagger.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanAmortizationAllocationApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; @@ -28,7 +29,8 @@ */ final class LoanAmortizationAllocationApiResourceSwagger { - private LoanAmortizationAllocationApiResourceSwagger() {} + private LoanAmortizationAllocationApiResourceSwagger() { + } /** * Common response class for all loan amortization allocation APIs Used for both Capitalized Income and Buydown Fee @@ -37,7 +39,8 @@ private LoanAmortizationAllocationApiResourceSwagger() {} @Schema(description = "LoanAmortizationAllocationResponse") public static final class LoanAmortizationAllocationResponse { - private LoanAmortizationAllocationResponse() {} + private LoanAmortizationAllocationResponse() { + } @Schema(example = "1") public Long loanId; @@ -62,7 +65,8 @@ private LoanAmortizationAllocationResponse() {} */ static final class AmortizationMappingData { - private AmortizationMappingData() {} + private AmortizationMappingData() { + } @Schema(example = "789") public Long amortizationLoanTransactionId; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanApiConstants.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanApiConstants.java index 367dd5b969f..83595011ca4 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanApiConstants.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanApiConstants.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.api; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionType; public interface LoanApiConstants { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanChargesApiResourceSwagger.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanChargesApiResourceSwagger.java index d222ff72de4..5007cc376fd 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanChargesApiResourceSwagger.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanChargesApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; import java.util.Set; @@ -27,16 +28,19 @@ */ final class LoanChargesApiResourceSwagger { - private LoanChargesApiResourceSwagger() {} + private LoanChargesApiResourceSwagger() { + } @Schema(description = "GetLoansLoanIdChargesChargeIdResponse") public static final class GetLoansLoanIdChargesChargeIdResponse { - private GetLoansLoanIdChargesChargeIdResponse() {} + private GetLoansLoanIdChargesChargeIdResponse() { + } static final class GetLoanChargeTimeType { - private GetLoanChargeTimeType() {} + private GetLoanChargeTimeType() { + } @Schema(example = "1") public Long id; @@ -48,7 +52,8 @@ private GetLoanChargeTimeType() {} static final class GetLoanChargeCalculationType { - private GetLoanChargeCalculationType() {} + private GetLoanChargeCalculationType() { + } @Schema(example = "1") public Long id; @@ -60,7 +65,8 @@ private GetLoanChargeCalculationType() {} static final class GetLoanChargeCurrency { - private GetLoanChargeCurrency() {} + private GetLoanChargeCurrency() { + } @Schema(example = "USD") public String code; @@ -114,15 +120,18 @@ private GetLoanChargeCurrency() {} @Schema(description = "GetLoansLoanIdChargesTemplateResponse") public static final class GetLoansLoanIdChargesTemplateResponse { - private GetLoansLoanIdChargesTemplateResponse() {} + private GetLoansLoanIdChargesTemplateResponse() { + } static final class GetLoanChargeTemplateChargeOptions { - private GetLoanChargeTemplateChargeOptions() {} + private GetLoanChargeTemplateChargeOptions() { + } static final class GetLoanChargeTemplateChargeTimeType { - private GetLoanChargeTemplateChargeTimeType() {} + private GetLoanChargeTemplateChargeTimeType() { + } @Schema(example = "2") public Long id; @@ -134,7 +143,8 @@ private GetLoanChargeTemplateChargeTimeType() {} static final class GetLoanChargeTemplateChargeAppliesTo { - private GetLoanChargeTemplateChargeAppliesTo() {} + private GetLoanChargeTemplateChargeAppliesTo() { + } @Schema(example = "1 ") public Long id; @@ -174,7 +184,8 @@ private GetLoanChargeTemplateChargeAppliesTo() {} @Schema(description = " PostLoansLoanIdChargesRequest") public static final class PostLoansLoanIdChargesRequest { - private PostLoansLoanIdChargesRequest() {} + private PostLoansLoanIdChargesRequest() { + } @Schema(example = "2") public Long chargeId; @@ -193,7 +204,8 @@ private PostLoansLoanIdChargesRequest() {} @Schema(description = " PostLoansLoanIdChargesResponse") public static final class PostLoansLoanIdChargesResponse { - private PostLoansLoanIdChargesResponse() {} + private PostLoansLoanIdChargesResponse() { + } @Schema(example = "1") public Long officeId; @@ -210,7 +222,8 @@ private PostLoansLoanIdChargesResponse() {} @Schema(description = " PutLoansLoanIdChargesChargeIdRequest") public static final class PutLoansLoanIdChargesChargeIdRequest { - private PutLoansLoanIdChargesChargeIdRequest() {} + private PutLoansLoanIdChargesChargeIdRequest() { + } @Schema(example = "dd MMMM yyyy") public String dateFormat; @@ -225,7 +238,8 @@ private PutLoansLoanIdChargesChargeIdRequest() {} @Schema(description = "PutLoansLoanIdChargesChargeIdResponse") public static final class PutLoansLoanIdChargesChargeIdResponse { - private PutLoansLoanIdChargesChargeIdResponse() {} + private PutLoansLoanIdChargesChargeIdResponse() { + } @Schema(example = "1") public Long officeId; @@ -243,7 +257,8 @@ private PutLoansLoanIdChargesChargeIdResponse() {} @Schema(description = "PostLoansLoanIdChargesChargeIdRequest") public static final class PostLoansLoanIdChargesChargeIdRequest { - private PostLoansLoanIdChargesChargeIdRequest() {} + private PostLoansLoanIdChargesChargeIdRequest() { + } @Schema(example = "dd MMMM yyyy") public String dateFormat; @@ -280,7 +295,8 @@ private PostLoansLoanIdChargesChargeIdRequest() {} @Schema(description = "PostLoansLoanIdChargesChargeIdResponse") public static final class PostLoansLoanIdChargesChargeIdResponse { - private PostLoansLoanIdChargesChargeIdResponse() {} + private PostLoansLoanIdChargesChargeIdResponse() { + } @Schema(example = "1") public Long officeId; @@ -337,7 +353,8 @@ static final class PostLoansLoanIdChargesChargeIdChanges { @Schema(description = "DeleteLoansLoanIdChargesChargeIdResponse") public static final class DeleteLoansLoanIdChargesChargeIdResponse { - private DeleteLoansLoanIdChargesChargeIdResponse() {} + private DeleteLoansLoanIdChargesChargeIdResponse() { + } @Schema(example = "1") public Long officeId; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanReAgingApiConstants.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanReAgingApiConstants.java index fff896a51c0..fe507bb84c0 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanReAgingApiConstants.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanReAgingApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanReAmortizationApiConstants.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanReAmortizationApiConstants.java index 25651326836..73d78d68c3c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanReAmortizationApiConstants.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanReAmortizationApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResource.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResource.java index c764b124b8a..927e9f76274 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResource.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResource.java @@ -6,9 +6,9 @@ * 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 @@ -34,7 +34,9 @@ import jakarta.ws.rs.core.Context; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.UriInfo; + import java.util.HashSet; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.commands.domain.CommandWrapper; @@ -63,8 +65,8 @@ public class LoanScheduleApiResource { private final ApiRequestParameterHelper apiRequestParameterHelper; @POST - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) @Operation(summary = "Calculate loan repayment schedule based on Loan term variations | Updates loan repayment schedule based on Loan term variations | Updates loan repayment schedule by removing Loan term variations", description = "Calculate loan repayment schedule based on Loan term variations:\n\n" + "Mandatory Fields: exceptions,locale,dateFormat\n\n" + "Updates loan repayment schedule based on Loan term variations:\n\n" + "Mandatory Fields: exceptions,locale,dateFormat\n\n" + "Updates loan repayment schedule by removing Loan term variations:\n\n" @@ -73,8 +75,8 @@ public class LoanScheduleApiResource { @RequestBody(required = true, content = @Content(schema = @Schema(implementation = LoanScheduleApiResourceSwagger.PostLoansLoanIdScheduleRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = LoanScheduleApiResourceSwagger.PostLoansLoanIdScheduleResponse.class))) public String calculateLoanScheduleOrSubmitVariableSchedule(@PathParam("loanId") @Parameter(description = "loanId") final Long loanId, - @QueryParam("command") @Parameter(description = "command") final String commandParam, @Context final UriInfo uriInfo, - @Parameter(hidden = true) final String apiRequestBodyAsJson) { + @QueryParam("command") @Parameter(description = "command") final String commandParam, @Context final UriInfo uriInfo, + @Parameter(hidden = true) final String apiRequestBodyAsJson) { CommandWrapper commandRequest = null; if (is(commandParam, "calculateLoanSchedule")) { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResourceSwagger.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResourceSwagger.java index 82a36f92c6e..6abe708e1ab 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResourceSwagger.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanScheduleApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.List; /** @@ -26,22 +27,26 @@ */ final class LoanScheduleApiResourceSwagger { - private LoanScheduleApiResourceSwagger() {} + private LoanScheduleApiResourceSwagger() { + } @Schema(description = "PostLoansLoanIdScheduleRequest") public static final class PostLoansLoanIdScheduleRequest { - private PostLoansLoanIdScheduleRequest() {} + private PostLoansLoanIdScheduleRequest() { + } } @Schema(description = "PostLoansLoanIdScheduleResponse") public static final class PostLoansLoanIdScheduleResponse { - private PostLoansLoanIdScheduleResponse() {} + private PostLoansLoanIdScheduleResponse() { + } static final class PostLoanChanges { - private PostLoanChanges() {} + private PostLoanChanges() { + } @Schema(example = "[21, 22]") public List removedEntityIds; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionApiConstants.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionApiConstants.java index 258635d957a..9cba5754ae9 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionApiConstants.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionsApiResourceSwagger.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionsApiResourceSwagger.java index 205d1b833a6..75a62e92304 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionsApiResourceSwagger.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanTransactionsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.portfolio.loanaccount.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; import java.util.List; import java.util.Set; + import org.apache.fineract.portfolio.loanproduct.api.LoanProductsApiResourceSwagger.GetLoanProductsChargeOffReasonOptions; import org.springframework.data.domain.Page; @@ -30,11 +32,13 @@ */ final class LoanTransactionsApiResourceSwagger { - private LoanTransactionsApiResourceSwagger() {} + private LoanTransactionsApiResourceSwagger() { + } static final class GetCodeValuesDataResponse { - private GetCodeValuesDataResponse() {} + private GetCodeValuesDataResponse() { + } @Schema(example = "1") public Long id; @@ -49,11 +53,13 @@ private GetCodeValuesDataResponse() {} @Schema(description = "GetLoansLoanIdTransactionsTemplateResponse") public static final class GetLoansLoanIdTransactionsTemplateResponse { - private GetLoansLoanIdTransactionsTemplateResponse() {} + private GetLoansLoanIdTransactionsTemplateResponse() { + } static final class GetLoansTransactionType { - private GetLoansTransactionType() {} + private GetLoansTransactionType() { + } @Schema(example = "2") public Long id; @@ -65,7 +71,8 @@ private GetLoansTransactionType() {} static final class GetLoansTotal { - private GetLoansTotal() {} + private GetLoansTotal() { + } @Schema(example = "XOF") public String currencyCode; @@ -91,7 +98,8 @@ private GetLoansTotal() {} static final class GetPaymentTypeOptions { - private GetPaymentTypeOptions() {} + private GetPaymentTypeOptions() { + } @Schema(example = "10") public Long id; @@ -130,7 +138,8 @@ private GetPaymentTypeOptions() {} public static final class GetLoanCurrency { - private GetLoanCurrency() {} + private GetLoanCurrency() { + } @Schema(example = "UGX") public String code; @@ -149,11 +158,13 @@ private GetLoanCurrency() {} @Schema(description = "GetLoansLoanIdTransactionsTransactionIdResponse") public static final class GetLoansLoanIdTransactionsTransactionIdResponse { - private GetLoansLoanIdTransactionsTransactionIdResponse() {} + private GetLoansLoanIdTransactionsTransactionIdResponse() { + } static final class GetLoansType { - private GetLoansType() {} + private GetLoansType() { + } @Schema(example = "2") public Long id; @@ -187,7 +198,8 @@ private GetLoansType() {} static final class GetLoansCurrency { - private GetLoansCurrency() {} + private GetLoansCurrency() { + } @Schema(example = "USD") public String code; @@ -205,7 +217,8 @@ private GetLoansCurrency() {} static final class GetLoanTransactionRelation { - private GetLoanTransactionRelation() {} + private GetLoanTransactionRelation() { + } @Schema(example = "1") public Long fromLoanTransaction; @@ -224,7 +237,8 @@ private GetLoanTransactionRelation() {} static final class GetLoansLoanIdLoanChargePaidByData { - private GetLoansLoanIdLoanChargePaidByData() {} + private GetLoansLoanIdLoanChargePaidByData() { + } @Schema(example = "11") public Long id; @@ -283,7 +297,8 @@ private GetLoansLoanIdLoanChargePaidByData() {} static final class PaymentDetailData { - private PaymentDetailData() {} + private PaymentDetailData() { + } @Schema(example = "62") public Long id; @@ -302,7 +317,8 @@ private PaymentDetailData() {} static final class PaymentType { - private PaymentType() {} + private PaymentType() { + } @Schema(example = "11") public Long id; @@ -316,13 +332,15 @@ private PaymentType() {} @Schema(description = "GetLoansLoanIdTransactionsResponse") public abstract static class GetLoansLoanIdTransactionsResponse implements Page { - private GetLoansLoanIdTransactionsResponse() {} + private GetLoansLoanIdTransactionsResponse() { + } } @Schema(description = "PostLoansLoanIdTransactionsRequest") public static final class PostLoansLoanIdTransactionsRequest { - private PostLoansLoanIdTransactionsRequest() {} + private PostLoansLoanIdTransactionsRequest() { + } @Schema(example = "en_GB") public String locale; @@ -385,7 +403,8 @@ private PostLoansLoanIdTransactionsRequest() {} @Schema(description = "PostLoansLoanIdTransactionsResponse") public static final class PostLoansLoanIdTransactionsResponse { - private PostLoansLoanIdTransactionsResponse() {} + private PostLoansLoanIdTransactionsResponse() { + } @Schema(example = "1") public Long officeId; @@ -427,7 +446,8 @@ static final class PostLoansLoanIdTransactionsResponseChanges { @Schema(description = "PostLoansLoanIdTransactionsTransactionIdRequest") public static final class PostLoansLoanIdTransactionsTransactionIdRequest { - private PostLoansLoanIdTransactionsTransactionIdRequest() {} + private PostLoansLoanIdTransactionsTransactionIdRequest() { + } @Schema(example = "en_GB") public String locale; @@ -450,7 +470,8 @@ private PostLoansLoanIdTransactionsTransactionIdRequest() {} @Schema(description = "PutChargeTransactionChangesResponse") public static final class PutChargeTransactionChangesResponse { - private PutChargeTransactionChangesResponse() {} + private PutChargeTransactionChangesResponse() { + } static final class PutChargeTransactionChangesResponseChanges { @@ -496,7 +517,8 @@ static final class PutChargeTransactionChangesResponseChanges { @Schema(description = "PutChargeTransactionChangesRequest") public static final class PutChargeTransactionChangesRequest { - private PutChargeTransactionChangesRequest() {} + private PutChargeTransactionChangesRequest() { + } @Schema(example = "1") public Long id; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/command/LoanChargeCommand.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/command/LoanChargeCommand.java index 08e46bc718f..080c4615ec1 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/command/LoanChargeCommand.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/command/LoanChargeCommand.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Data; import org.apache.fineract.portfolio.loanaccount.domain.LoanCharge; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/command/LoanUpdateCommand.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/command/LoanUpdateCommand.java index 2328fe6aba4..f982004bb12 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/command/LoanUpdateCommand.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/command/LoanUpdateCommand.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/command/UndoStateTransitionCommand.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/command/UndoStateTransitionCommand.java index 3362c6c394d..9f7404504a1 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/command/UndoStateTransitionCommand.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/command/UndoStateTransitionCommand.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/command/UpdateLoanOfficerCommand.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/command/UpdateLoanOfficerCommand.java index 21d3165fcbc..ae62426b8a8 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/command/UpdateLoanOfficerCommand.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/command/UpdateLoanOfficerCommand.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; @@ -44,7 +45,7 @@ public UpdateLoanOfficerCommand(final Long fromLoanOfficerId, final Long toLoanO } public UpdateLoanOfficerCommand(final Long fromLoanOfficerId, final Long toLoanOfficerId, final LocalDate assignmentDate, - final String[] loans) { + final String[] loans) { this.fromLoanOfficerId = fromLoanOfficerId; this.toLoanOfficerId = toLoanOfficerId; this.assignmentDate = assignmentDate; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccountingBridgeDataDTO.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccountingBridgeDataDTO.java index 789696a4292..77746c448e4 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccountingBridgeDataDTO.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccountingBridgeDataDTO.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccountingBridgeLoanTransactionDTO.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccountingBridgeLoanTransactionDTO.java index bc3d625619b..53fbc2aee01 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccountingBridgeLoanTransactionDTO.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccountingBridgeLoanTransactionDTO.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccrualChargeData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccrualChargeData.java index 447131c051d..08517b6fe53 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccrualChargeData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccrualChargeData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccrualPeriodData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccrualPeriodData.java index de7b1689c61..6249af98035 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccrualPeriodData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccrualPeriodData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import lombok.Data; import lombok.RequiredArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccrualPeriodsData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccrualPeriodsData.java index b4bdf67e2ca..edf1f88af3b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccrualPeriodsData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccrualPeriodsData.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.portfolio.loanaccount.data; import jakarta.validation.constraints.NotNull; + import java.util.ArrayList; import java.util.List; + import lombok.Data; import lombok.RequiredArgsConstructor; import lombok.experimental.Accessors; @@ -41,7 +43,7 @@ public AccrualPeriodsData addPeriod(AccrualPeriodData period) { } public static AccrualPeriodsData create(@NotNull List installments, Integer firstInstallmentNumber, - MonetaryCurrency currency) { + MonetaryCurrency currency) { AccrualPeriodsData accrualPeriods = new AccrualPeriodsData(currency); for (LoanRepaymentScheduleInstallment installment : installments) { Integer installmentNumber = installment.getInstallmentNumber(); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AmortizationAllocationBaseTransactionDTO.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AmortizationAllocationBaseTransactionDTO.java index ec9d2c25988..fbc016e1b07 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AmortizationAllocationBaseTransactionDTO.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AmortizationAllocationBaseTransactionDTO.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.Getter; import org.apache.fineract.infrastructure.core.domain.ExternalId; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AmortizationAllocationMappingDTO.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AmortizationAllocationMappingDTO.java index df7809f6ea3..6745a9218d3 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AmortizationAllocationMappingDTO.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AmortizationAllocationMappingDTO.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.Getter; import org.apache.fineract.infrastructure.core.domain.ExternalId; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/CollectionData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/CollectionData.java index 8317db7b088..df60a2b750e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/CollectionData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/CollectionData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.Collection; + import lombok.AllArgsConstructor; import lombok.Data; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/CumulativeIncomeFromIncomePosting.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/CumulativeIncomeFromIncomePosting.java index b55161a972c..c3260d68b68 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/CumulativeIncomeFromIncomePosting.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/CumulativeIncomeFromIncomePosting.java @@ -6,9 +6,9 @@ * 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 @@ -20,5 +20,6 @@ import java.math.BigDecimal; -public record CumulativeIncomeFromIncomePosting(BigDecimal interestAmount, BigDecimal feeAmount, BigDecimal penaltyAmount) { +public record CumulativeIncomeFromIncomePosting(BigDecimal interestAmount, BigDecimal feeAmount, + BigDecimal penaltyAmount) { } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/DelinquencyPausePeriod.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/DelinquencyPausePeriod.java index 0aef796b72e..30b5f963d3c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/DelinquencyPausePeriod.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/DelinquencyPausePeriod.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.Getter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/DisbursementData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/DisbursementData.java index 3e75012c199..095af0830a7 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/DisbursementData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/DisbursementData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Setter; @@ -55,7 +56,7 @@ public final class DisbursementData implements LoanPrincipalRelatedDataHolder, C private transient String linkAccountId; public static DisbursementData importInstance(LocalDate actualDisbursementDate, String linkAccountId, Integer rowIndex, String locale, - String dateFormat) { + String dateFormat) { return new DisbursementData(actualDisbursementDate, linkAccountId, rowIndex, locale, dateFormat); } @@ -103,12 +104,12 @@ public boolean isDueForDisbursement(LoanScheduleType loanScheduleType, final Loc } private boolean occursOnDayFromAndUpToAndIncluding(final LocalDate fromNotInclusive, final LocalDate upToAndInclusive, - final LocalDate target) { + final LocalDate target) { return DateUtils.isAfter(target, fromNotInclusive) && !DateUtils.isAfter(target, upToAndInclusive); } private boolean occursOnDayFromAndIncludingAndUpTo(final LocalDate fromInclusive, final LocalDate upToNotInclusive, - final LocalDate target) { + final LocalDate target) { return DateUtils.isDateInRangeFromInclusiveToExclusive(fromInclusive, upToNotInclusive, target); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/GLIMContainer.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/GLIMContainer.java index 9a9e31c4082..4af5d872983 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/GLIMContainer.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/GLIMContainer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.util.List; + import org.apache.fineract.portfolio.accountdetails.data.LoanAccountSummaryData; public class GLIMContainer { @@ -37,7 +38,7 @@ public class GLIMContainer { private final String loanStatus; public GLIMContainer(final BigDecimal glimId, final BigDecimal groupId, final String accountNumber, - final List childGLIMAccounts, final BigDecimal parentPrincipalAmount, final String loanStatus) { + final List childGLIMAccounts, final BigDecimal parentPrincipalAmount, final String loanStatus) { this.glimId = glimId; this.groupId = groupId; this.accountNumber = accountNumber; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/GlimRepaymentTemplate.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/GlimRepaymentTemplate.java index 7ff7cec23a4..df2d87c1488 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/GlimRepaymentTemplate.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/GlimRepaymentTemplate.java @@ -6,9 +6,9 @@ * 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 @@ -42,8 +42,8 @@ public final class GlimRepaymentTemplate { private final BigDecimal childPrincipalAmount; private GlimRepaymentTemplate(final BigDecimal glimId, final BigDecimal groupId, final BigDecimal clientId, final String clientName, - final BigDecimal childLoanId, final String parentAccountNo, final BigDecimal parentPrincipalAmount, - final String childLoanAccountNo, final BigDecimal childPrincipalAmount) { + final BigDecimal childLoanId, final String parentAccountNo, final BigDecimal parentPrincipalAmount, + final String childLoanAccountNo, final BigDecimal childPrincipalAmount) { this.glimId = glimId; this.groupId = groupId; this.clientId = clientId; @@ -56,8 +56,8 @@ private GlimRepaymentTemplate(final BigDecimal glimId, final BigDecimal groupId, } public static GlimRepaymentTemplate getInstance(final BigDecimal glimId, final BigDecimal groupId, final BigDecimal clientId, - final String clientName, final BigDecimal childLoanId, final String parentAccountNo, final BigDecimal parentPrincipalAmount, - final String childLoanAccountNo, final BigDecimal childPrincipalAmount) { + final String clientName, final BigDecimal childLoanId, final String parentAccountNo, final BigDecimal parentPrincipalAmount, + final String childLoanAccountNo, final BigDecimal childPrincipalAmount) { return new GlimRepaymentTemplate(glimId, groupId, clientId, clientName, childLoanId, parentAccountNo, parentPrincipalAmount, childLoanAccountNo, childPrincipalAmount); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/GroupLoanIndividualMonitoringAccountData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/GroupLoanIndividualMonitoringAccountData.java index 02310091504..d009b19aabc 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/GroupLoanIndividualMonitoringAccountData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/GroupLoanIndividualMonitoringAccountData.java @@ -6,9 +6,9 @@ * 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 @@ -40,8 +40,8 @@ public final class GroupLoanIndividualMonitoringAccountData { private final String loanStatus; private GroupLoanIndividualMonitoringAccountData(final BigDecimal glimId, final BigDecimal groupId, final String accountNumber, - final String childAccountNumber, final BigDecimal childPrincipalAmount, final BigDecimal parentPrincipalAmount, - final Long childAccountsCount, final String loanStatus) { + final String childAccountNumber, final BigDecimal childPrincipalAmount, final BigDecimal parentPrincipalAmount, + final Long childAccountsCount, final String loanStatus) { this.glimId = glimId; this.groupId = groupId; this.accountNumber = accountNumber; @@ -53,14 +53,14 @@ private GroupLoanIndividualMonitoringAccountData(final BigDecimal glimId, final } public static GroupLoanIndividualMonitoringAccountData getInstance(final BigDecimal glimId, final BigDecimal groupId, - final String accountNumber, final String childAccountNumber, final BigDecimal childPrincipalAmount, - final BigDecimal parentPrincipalAmount, final Long childAccountsCount, final String loanStatus) { + final String accountNumber, final String childAccountNumber, final BigDecimal childPrincipalAmount, + final BigDecimal parentPrincipalAmount, final Long childAccountsCount, final String loanStatus) { return new GroupLoanIndividualMonitoringAccountData(glimId, groupId, accountNumber, childAccountNumber, childPrincipalAmount, parentPrincipalAmount, childAccountsCount, loanStatus); } public static GroupLoanIndividualMonitoringAccountData getInstance1(final BigDecimal glimId, final BigDecimal groupId, - final String accountNumber, final BigDecimal parentPrincipalAmount, final String loanStatus) { + final String accountNumber, final BigDecimal parentPrincipalAmount, final String loanStatus) { return new GroupLoanIndividualMonitoringAccountData(glimId, groupId, accountNumber, null, null, parentPrincipalAmount, null, loanStatus); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/HolidayDetailDTO.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/HolidayDetailDTO.java index 44d94913fdd..3ddb9ff12ae 100755 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/HolidayDetailDTO.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/HolidayDetailDTO.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.util.List; + import org.apache.fineract.organisation.holiday.domain.Holiday; import org.apache.fineract.organisation.workingdays.domain.WorkingDays; @@ -39,7 +40,7 @@ public HolidayDetailDTO(final boolean isHolidayEnabled, final List holi } public HolidayDetailDTO(final boolean isHolidayEnabled, final List holidays, final WorkingDays workingDays, - final boolean allowTransactionsOnHoliday, final boolean allowTransactionsOnNonWorkingDay) { + final boolean allowTransactionsOnHoliday, final boolean allowTransactionsOnNonWorkingDay) { this.isHolidayEnabled = isHolidayEnabled; this.holidays = holidays; this.workingDays = workingDays; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/InstallmentLevelDelinquency.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/InstallmentLevelDelinquency.java index bbd6b806d6a..6e79a90d05d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/InstallmentLevelDelinquency.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/InstallmentLevelDelinquency.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.math.BigDecimal; + import lombok.Data; import org.apache.fineract.portfolio.delinquency.data.LoanInstallmentDelinquencyTagData; 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 f1f026c2a23..f7b05dd585b 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 @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import jakarta.persistence.Transient; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; @@ -28,6 +29,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; @@ -295,15 +297,15 @@ public class LoanAccountData { private Boolean merchantBuyDownFee; public static LoanAccountData importInstanceIndividual(EnumOptionData loanTypeEnumOption, Long clientId, Long productId, - Long loanOfficerId, LocalDate submittedOnDate, Long fundId, BigDecimal principal, Integer numberOfRepayments, - Integer repaymentEvery, EnumOptionData repaidEveryFrequencyEnums, Integer loanTermFrequency, - EnumOptionData loanTermFrequencyTypeEnum, BigDecimal nominalInterestRate, LocalDate expectedDisbursementDate, - EnumOptionData amortizationEnumOption, EnumOptionData interestMethodEnum, EnumOptionData interestCalculationPeriodTypeEnum, - BigDecimal inArrearsTolerance, String transactionProcessingStrategyCode, Integer graceOnPrincipalPayment, - Integer graceOnInterestPayment, Integer graceOnInterestCharged, LocalDate interestChargedFromDate, - LocalDate repaymentsStartingFromDate, Integer rowIndex, ExternalId externalId, Long groupId, Collection charges, - String linkAccountId, String locale, String dateFormat, List loanCollateralManagementData, - Integer fixedLength, StringEnumOptionData daysInYearCustomStrategy) { + Long loanOfficerId, LocalDate submittedOnDate, Long fundId, BigDecimal principal, Integer numberOfRepayments, + Integer repaymentEvery, EnumOptionData repaidEveryFrequencyEnums, Integer loanTermFrequency, + EnumOptionData loanTermFrequencyTypeEnum, BigDecimal nominalInterestRate, LocalDate expectedDisbursementDate, + EnumOptionData amortizationEnumOption, EnumOptionData interestMethodEnum, EnumOptionData interestCalculationPeriodTypeEnum, + BigDecimal inArrearsTolerance, String transactionProcessingStrategyCode, Integer graceOnPrincipalPayment, + Integer graceOnInterestPayment, Integer graceOnInterestCharged, LocalDate interestChargedFromDate, + LocalDate repaymentsStartingFromDate, Integer rowIndex, ExternalId externalId, Long groupId, Collection charges, + String linkAccountId, String locale, String dateFormat, List loanCollateralManagementData, + Integer fixedLength, StringEnumOptionData daysInYearCustomStrategy) { return new LoanAccountData().setLoanType(loanTypeEnumOption).setClientId(clientId).setProductId(productId) .setLoanOfficerId(loanOfficerId).setSubmittedOnDate(submittedOnDate).setFundId(fundId).setPrincipal(principal) @@ -322,14 +324,14 @@ public static LoanAccountData importInstanceIndividual(EnumOptionData loanTypeEn } public static LoanAccountData importInstanceGroup(EnumOptionData loanTypeEnumOption, Long groupIdforGroupLoan, Long productId, - Long loanOfficerId, LocalDate submittedOnDate, Long fundId, BigDecimal principal, Integer numberOfRepayments, - Integer repaidEvery, EnumOptionData repaidEveryFrequencyEnums, Integer loanTermFrequency, - EnumOptionData loanTermFrequencyTypeEnum, BigDecimal nominalInterestRate, LocalDate expectedDisbursementDate, - EnumOptionData amortizationEnumOption, EnumOptionData interestMethodEnum, EnumOptionData interestCalculationPeriodEnum, - BigDecimal arrearsTolerance, String transactionProcessingStrategyCode, Integer graceOnPrincipalPayment, - Integer graceOnInterestPayment, Integer graceOnInterestCharged, LocalDate interestChargedFromDate, - LocalDate repaymentsStartingFromDate, Integer rowIndex, ExternalId externalId, String linkAccountId, String locale, - String dateFormat, Integer fixedLength) { + Long loanOfficerId, LocalDate submittedOnDate, Long fundId, BigDecimal principal, Integer numberOfRepayments, + Integer repaidEvery, EnumOptionData repaidEveryFrequencyEnums, Integer loanTermFrequency, + EnumOptionData loanTermFrequencyTypeEnum, BigDecimal nominalInterestRate, LocalDate expectedDisbursementDate, + EnumOptionData amortizationEnumOption, EnumOptionData interestMethodEnum, EnumOptionData interestCalculationPeriodEnum, + BigDecimal arrearsTolerance, String transactionProcessingStrategyCode, Integer graceOnPrincipalPayment, + Integer graceOnInterestPayment, Integer graceOnInterestCharged, LocalDate interestChargedFromDate, + LocalDate repaymentsStartingFromDate, Integer rowIndex, ExternalId externalId, String linkAccountId, String locale, + String dateFormat, Integer fixedLength) { return new LoanAccountData().setLoanType(loanTypeEnumOption).setGroupId(groupIdforGroupLoan).setProductId(productId) .setLoanOfficerId(loanOfficerId).setSubmittedOnDate(submittedOnDate).setFundId(fundId).setPrincipal(principal) @@ -453,43 +455,43 @@ public LoanAccountData withProductData(final LoanProductData product, final Inte * Used to send back loan account data with the basic details coming from query. */ public static LoanAccountData basicLoanDetails(final Long id, final String accountNo, final LoanStatusEnumData status, - final ExternalId externalId, final Long clientId, final String clientAccountNo, final String clientName, - final Long clientOfficeId, final ExternalId clientExternalId, final GroupGeneralData group, final EnumOptionData loanType, - final Long loanProductId, final String loanProductName, final String loanProductDescription, - final boolean isLoanProductLinkedToFloatingRate, final Long fundId, final String fundName, final Long loanPurposeId, - final String loanPurposeName, final Long loanOfficerId, final String loanOfficerName, final CurrencyData currencyData, - final BigDecimal proposedPrincipal, final BigDecimal principal, final BigDecimal approvedPrincipal, - final BigDecimal netDisbursalAmount, final BigDecimal totalOverpaid, final BigDecimal inArrearsTolerance, - final Integer termFrequency, final EnumOptionData termPeriodFrequencyType, final Integer numberOfRepayments, - final Integer repaymentEvery, final EnumOptionData repaymentFrequencyType, EnumOptionData repaymentFrequencyNthDayType, - EnumOptionData repaymentFrequencyDayOfWeekType, final String transactionStrategy, final String transactionStrategyName, - 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, - 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 EnumOptionData daysInYearType, final boolean isInterestRecalculationEnabled, - final LoanInterestRecalculationData interestRecalculationData, final Boolean createStandingInstructionAtDisbursement, - final Boolean isVariableInstallmentsAllowed, Integer minimumGap, Integer maximumGap, final EnumOptionData subStatus, - final boolean canUseForTopup, final boolean isTopup, final Long closureLoanId, final String closureLoanAccountNo, - final BigDecimal topupAmount, final boolean isEqualAmortization, final BigDecimal fixedPrincipalPercentagePerInstallment, - final DelinquencyRangeData delinquencyRange, final boolean disallowExpectedDisbursements, final boolean fraud, - LocalDate lastClosedBusinessDate, LocalDate overpaidOnDate, final boolean chargedOff, final boolean enableDownPayment, - final BigDecimal disbursedAmountPercentageForDownPayment, final boolean enableAutoRepaymentForDownPayment, - final boolean enableInstallmentLevelDelinquency, final EnumOptionData loanScheduleType, - final EnumOptionData loanScheduleProcessingType, final Integer fixedLength, final StringEnumOptionData chargeOffBehaviour, - final boolean isInterestRecognitionOnDisbursementDate, final boolean allowFullTermForTranche, - final StringEnumOptionData daysInYearCustomStrategy, final boolean enableIncomeCapitalization, - final StringEnumOptionData capitalizedIncomeCalculationType, final StringEnumOptionData capitalizedIncomeStrategy, - StringEnumOptionData capitalizedIncomeType, final boolean enableBuyDownFee, - final StringEnumOptionData buyDownFeeCalculationType, final StringEnumOptionData buyDownFeeStrategy, - final StringEnumOptionData buyDownFeeIncomeType, final boolean merchantBuyDownFee) { + final ExternalId externalId, final Long clientId, final String clientAccountNo, final String clientName, + final Long clientOfficeId, final ExternalId clientExternalId, final GroupGeneralData group, final EnumOptionData loanType, + final Long loanProductId, final String loanProductName, final String loanProductDescription, + final boolean isLoanProductLinkedToFloatingRate, final Long fundId, final String fundName, final Long loanPurposeId, + final String loanPurposeName, final Long loanOfficerId, final String loanOfficerName, final CurrencyData currencyData, + final BigDecimal proposedPrincipal, final BigDecimal principal, final BigDecimal approvedPrincipal, + final BigDecimal netDisbursalAmount, final BigDecimal totalOverpaid, final BigDecimal inArrearsTolerance, + final Integer termFrequency, final EnumOptionData termPeriodFrequencyType, final Integer numberOfRepayments, + final Integer repaymentEvery, final EnumOptionData repaymentFrequencyType, EnumOptionData repaymentFrequencyNthDayType, + EnumOptionData repaymentFrequencyDayOfWeekType, final String transactionStrategy, final String transactionStrategyName, + 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, + 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 EnumOptionData daysInYearType, final boolean isInterestRecalculationEnabled, + final LoanInterestRecalculationData interestRecalculationData, final Boolean createStandingInstructionAtDisbursement, + final Boolean isVariableInstallmentsAllowed, Integer minimumGap, Integer maximumGap, final EnumOptionData subStatus, + final boolean canUseForTopup, final boolean isTopup, final Long closureLoanId, final String closureLoanAccountNo, + final BigDecimal topupAmount, final boolean isEqualAmortization, final BigDecimal fixedPrincipalPercentagePerInstallment, + final DelinquencyRangeData delinquencyRange, final boolean disallowExpectedDisbursements, final boolean fraud, + LocalDate lastClosedBusinessDate, LocalDate overpaidOnDate, final boolean chargedOff, final boolean enableDownPayment, + final BigDecimal disbursedAmountPercentageForDownPayment, final boolean enableAutoRepaymentForDownPayment, + final boolean enableInstallmentLevelDelinquency, final EnumOptionData loanScheduleType, + final EnumOptionData loanScheduleProcessingType, final Integer fixedLength, final StringEnumOptionData chargeOffBehaviour, + final boolean isInterestRecognitionOnDisbursementDate, final boolean allowFullTermForTranche, + final StringEnumOptionData daysInYearCustomStrategy, final boolean enableIncomeCapitalization, + final StringEnumOptionData capitalizedIncomeCalculationType, final StringEnumOptionData capitalizedIncomeStrategy, + StringEnumOptionData capitalizedIncomeType, final boolean enableBuyDownFee, + final StringEnumOptionData buyDownFeeCalculationType, final StringEnumOptionData buyDownFeeStrategy, + final StringEnumOptionData buyDownFeeIncomeType, final boolean merchantBuyDownFee) { final CollectionData delinquent = CollectionData.template(); @@ -548,31 +550,31 @@ public static LoanAccountData basicLoanDetails(final Long id, final String accou * Used to combine the associations and template data on top of exist loan account data */ public LoanAccountData associationsAndTemplate(final LoanScheduleData repaymentSchedule, - final Collection transactions, final Collection charges, - final Collection collateral, final Collection guarantors, - final CalendarData calendarData, final Collection productOptions, - final Collection termFrequencyTypeOptions, final Collection repaymentFrequencyTypeOptions, - final Collection repaymentFrequencyNthDayTypeOptions, - final Collection repaymentFrequencyDayOfWeekTypeOptions, - final Collection transactionProcessingStrategyOptions, - final Collection interestRateFrequencyTypeOptions, final Collection amortizationTypeOptions, - final Collection interestTypeOptions, final Collection interestCalculationPeriodTypeOptions, - final Collection fundOptions, final Collection chargeOptions, final ChargeData chargeTemplate, - final Collection loanOfficerOptions, final Collection loanPurposeOptions, - final Collection loanCollateralOptions, final Collection calendarOptions, - final Collection notes, final Collection accountLinkingOptions, - final PortfolioAccountData linkedAccount, final Collection disbursementDetails, - final Collection emiAmountVariations, final Collection overdueCharges, - final PaidInAdvanceData paidInAdvance, Collection interestRatesPeriods, - final Collection clientActiveLoanOptions, final List rates, final Boolean isRatesEnabled, - final CollectionData delinquent, final List loanScheduleTypeOptions, - final List loanScheduleProcessingTypeOptions, final List loanTermVariations, - final List daysInYearCustomStrategyOptions, - final List capitalizedIncomeCalculationTypeOptions, - final List capitalizedIncomeStrategyOptions, - final List capitalizedIncomeTypeOptions, - final List buyDownFeeCalculationTypeOptions, final List buyDownFeeStrategyOptions, - final List buyDownFeeIncomeTypeOptions) { + final Collection transactions, final Collection charges, + final Collection collateral, final Collection guarantors, + final CalendarData calendarData, final Collection productOptions, + final Collection termFrequencyTypeOptions, final Collection repaymentFrequencyTypeOptions, + final Collection repaymentFrequencyNthDayTypeOptions, + final Collection repaymentFrequencyDayOfWeekTypeOptions, + final Collection transactionProcessingStrategyOptions, + final Collection interestRateFrequencyTypeOptions, final Collection amortizationTypeOptions, + final Collection interestTypeOptions, final Collection interestCalculationPeriodTypeOptions, + final Collection fundOptions, final Collection chargeOptions, final ChargeData chargeTemplate, + final Collection loanOfficerOptions, final Collection loanPurposeOptions, + final Collection loanCollateralOptions, final Collection calendarOptions, + final Collection notes, final Collection accountLinkingOptions, + final PortfolioAccountData linkedAccount, final Collection disbursementDetails, + final Collection emiAmountVariations, final Collection overdueCharges, + final PaidInAdvanceData paidInAdvance, Collection interestRatesPeriods, + final Collection clientActiveLoanOptions, final List rates, final Boolean isRatesEnabled, + final CollectionData delinquent, final List loanScheduleTypeOptions, + final List loanScheduleProcessingTypeOptions, final List loanTermVariations, + final List daysInYearCustomStrategyOptions, + final List capitalizedIncomeCalculationTypeOptions, + final List capitalizedIncomeStrategyOptions, + final List capitalizedIncomeTypeOptions, + final List buyDownFeeCalculationTypeOptions, final List buyDownFeeStrategyOptions, + final List buyDownFeeIncomeTypeOptions) { // TODO: why are these variables 'calendarData', 'chargeTemplate' never used (see original private constructor) @@ -602,8 +604,8 @@ public LoanAccountData associationsAndTemplate(final LoanScheduleData repaymentS } public LoanAccountData associationsAndTemplate(final Collection productOptions, - final Collection allowedLoanOfficers, final Collection calendarOptions, - final Collection accountLinkingOptions, final Boolean isRatesEnabled) { + final Collection allowedLoanOfficers, final Collection calendarOptions, + final Collection accountLinkingOptions, final Boolean isRatesEnabled) { return this.setProductOptions(productOptions) // .setLoanOfficerOptions(allowedLoanOfficers) // .setCalendarOptions(calendarOptions) // @@ -651,7 +653,7 @@ public LoanAccountData associateMemberVariations(final Map member } public LoanAccountData withInterestRecalculationCalendarData(final CalendarData calendarData, - final CalendarData compoundingCalendarData) { + final CalendarData compoundingCalendarData) { if (interestRecalculationData == null) { interestRecalculationData = new LoanInterestRecalculationData(); } @@ -667,7 +669,7 @@ public LoanAccountData withInterestRecalculationCalendarData(final CalendarData }; private static BigDecimal fetchLoanCycleDefaultValue(Collection borrowerCycleVariationData, - Integer loanCycleNumber) { + Integer loanCycleNumber) { BigDecimal defaultValue = null; Integer cycleNumberSelected = 0; for (LoanProductBorrowerCycleVariationData data : borrowerCycleVariationData) { @@ -682,7 +684,7 @@ private static BigDecimal fetchLoanCycleDefaultValue(Collection * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanApplicationTimelineData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanApplicationTimelineData.java index 1530e6c3cda..a9695ce809e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanApplicationTimelineData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanApplicationTimelineData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanApprovalData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanApprovalData.java index 3e84f3998f6..c2eb5977303 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanApprovalData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanApprovalData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import org.apache.fineract.organisation.monetary.data.CurrencyData; @@ -61,8 +62,8 @@ private LoanApprovalData(LocalDate approvedOnDate, Integer rowIndex, String loca } public LoanApprovalData(final BigDecimal approvalAmount, final LocalDate approvalDate, final BigDecimal netDisbursalAmount, - final CurrencyData currency, final BigDecimal availableDisbursementAmountWithOverApplied, - final LocalDate expectedDisbursementDate) { + final CurrencyData currency, final BigDecimal availableDisbursementAmountWithOverApplied, + final LocalDate expectedDisbursementDate) { this.approvalDate = approvalDate; this.approvalAmount = approvalAmount; this.netDisbursalAmount = netDisbursalAmount; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanApprovedAmountHistoryData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanApprovedAmountHistoryData.java index 8598d6ea8dc..e23ca3d2d08 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanApprovedAmountHistoryData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanApprovedAmountHistoryData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serializable; import java.math.BigDecimal; import java.time.OffsetDateTime; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanBorrowerCycleData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanBorrowerCycleData.java index 508a463da01..2660bc38ca4 100755 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanBorrowerCycleData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanBorrowerCycleData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.math.BigDecimal; + import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargeData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargeData.java index 4c9a4c5bdb7..ed0da08e4a2 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargeData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargeData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; @@ -103,20 +104,20 @@ public static LoanChargeData template(final List chargeOptions) { * used when populating with details from charge definition (for crud on charges) */ public static LoanChargeData newLoanChargeDetails(final Long chargeId, final String name, final CurrencyData currency, - final BigDecimal amount, final BigDecimal percentage, final EnumOptionData chargeTimeType, - final EnumOptionData chargeCalculationType, final boolean penalty, final EnumOptionData chargePaymentMode, - final BigDecimal minCap, final BigDecimal maxCap, final ExternalId externalId) { + final BigDecimal amount, final BigDecimal percentage, final EnumOptionData chargeTimeType, + final EnumOptionData chargeCalculationType, final boolean penalty, final EnumOptionData chargePaymentMode, + final BigDecimal minCap, final BigDecimal maxCap, final ExternalId externalId) { return new LoanChargeData(null, chargeId, name, currency, amount, percentage, chargeTimeType, chargeCalculationType, null, penalty, chargePaymentMode, false, false, null, ExternalId.empty(), minCap, maxCap, null, null, externalId); } public LoanChargeData(final Long id, final Long chargeId, final String name, final CurrencyData currency, final BigDecimal amount, - final BigDecimal amountPaid, final BigDecimal amountWaived, final BigDecimal amountWrittenOff, - final BigDecimal amountOutstanding, final EnumOptionData chargeTimeType, final LocalDate submittedOnDate, - final LocalDate dueDate, final EnumOptionData chargeCalculationType, final BigDecimal percentage, - final BigDecimal amountPercentageAppliedTo, final boolean penalty, final EnumOptionData chargePaymentMode, final boolean paid, - final boolean waived, final Long loanId, final ExternalId externalLoanId, final BigDecimal minCap, final BigDecimal maxCap, - final BigDecimal amountOrPercentage, List installmentChargeData, final ExternalId externalId) { + final BigDecimal amountPaid, final BigDecimal amountWaived, final BigDecimal amountWrittenOff, + final BigDecimal amountOutstanding, final EnumOptionData chargeTimeType, final LocalDate submittedOnDate, + final LocalDate dueDate, final EnumOptionData chargeCalculationType, final BigDecimal percentage, + final BigDecimal amountPercentageAppliedTo, final boolean penalty, final EnumOptionData chargePaymentMode, final boolean paid, + final boolean waived, final Long loanId, final ExternalId externalLoanId, final BigDecimal minCap, final BigDecimal maxCap, + final BigDecimal amountOrPercentage, List installmentChargeData, final ExternalId externalId) { this.id = id; this.chargeId = chargeId; this.name = name; @@ -159,10 +160,10 @@ public LoanChargeData(final Long id, final Long chargeId, final String name, fin } private LoanChargeData(final Long id, final Long chargeId, final String name, final CurrencyData currency, final BigDecimal amount, - final BigDecimal percentage, final EnumOptionData chargeTimeType, final EnumOptionData chargeCalculationType, - final List chargeOptions, final boolean penalty, final EnumOptionData chargePaymentMode, final boolean paid, - final boolean waived, final Long loanId, final ExternalId externalLoanId, final BigDecimal minCap, final BigDecimal maxCap, - final BigDecimal amountOrPercentage, List installmentChargeData, final ExternalId externalId) { + final BigDecimal percentage, final EnumOptionData chargeTimeType, final EnumOptionData chargeCalculationType, + final List chargeOptions, final boolean penalty, final EnumOptionData chargePaymentMode, final boolean paid, + final boolean waived, final Long loanId, final ExternalId externalLoanId, final BigDecimal minCap, final BigDecimal maxCap, + final BigDecimal amountOrPercentage, List installmentChargeData, final ExternalId externalId) { this.id = id; this.chargeId = chargeId; this.name = name; @@ -206,8 +207,8 @@ private LoanChargeData(final Long id, final Long chargeId, final String name, fi } public LoanChargeData(final Long id, final LocalDate dueAsOfDate, final LocalDate submittedOnDate, final BigDecimal amountOutstanding, - EnumOptionData chargeTimeType, final Long loanId, final ExternalId externalLoanId, - List installmentChargeData, final ExternalId externalId) { + EnumOptionData chargeTimeType, final Long loanId, final ExternalId externalLoanId, + List installmentChargeData, final ExternalId externalId) { this.id = id; this.chargeId = null; this.name = null; @@ -241,8 +242,8 @@ public LoanChargeData(final Long id, final LocalDate dueAsOfDate, final LocalDat } public LoanChargeData(final Long id, final Long chargeId, final LocalDate dueAsOfDate, final LocalDate submittedOnDate, - EnumOptionData chargeTimeType, final BigDecimal amount, final BigDecimal amountAccrued, final BigDecimal amountWaived, - final boolean penalty, final ExternalId externalId) { + EnumOptionData chargeTimeType, final BigDecimal amount, final BigDecimal amountAccrued, final BigDecimal amountWaived, + final boolean penalty, final ExternalId externalId) { this.id = id; this.chargeId = chargeId; this.name = null; @@ -342,7 +343,7 @@ public LoanChargeData(LoanChargeData chargeData, List } public LoanChargeData(final Long id, final LocalDate dueAsOfDate, final BigDecimal amount, final EnumOptionData chargeCalculationType, - final EnumOptionData chargeTimeType) { + final EnumOptionData chargeTimeType) { this.id = null; this.chargeId = id; this.name = null; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargePaidByDTO.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargePaidByDTO.java index bd281ca6aa9..d3afc31d7a0 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargePaidByDTO.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargePaidByDTO.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.math.BigDecimal; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargePaidByData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargePaidByData.java index 20b06f28b90..f6457bacf50 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargePaidByData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargePaidByData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.math.BigDecimal; + import lombok.Data; import lombok.Getter; import org.springframework.integration.annotation.Default; @@ -50,7 +51,7 @@ public LoanChargePaidByData(Long id, BigDecimal amount, Integer installmentNumbe } public LoanChargePaidByData(final Long id, final BigDecimal amount, final Integer installmentNumber, final Long chargeId, - final Long transactionId) { + final Long transactionId) { this.id = id; this.amount = amount; this.installmentNumber = installmentNumber; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargePaidDetail.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargePaidDetail.java index 5b75fa9f127..7f4b03a8513 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargePaidDetail.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanChargePaidDetail.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanCollateralManagementData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanCollateralManagementData.java index bed68442325..ecc622cd262 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanCollateralManagementData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanCollateralManagementData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.math.BigDecimal; + import lombok.AllArgsConstructor; import lombok.Data; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanConvenienceData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanConvenienceData.java index ac2408c3ce1..14f6fa754a8 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanConvenienceData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanConvenienceData.java @@ -6,9 +6,9 @@ * 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 @@ -29,8 +29,8 @@ public class LoanConvenienceData { private final int actualLoanTermInMonths; public LoanConvenienceData(final int maxSubmittedOnOffsetFromToday, final int maxApprovedOnOffsetFromToday, - final int maxDisbursedOnOffsetFromToday, final int expectedLoanTermInDays, final int actualLoanTermInDays, - final int expectedLoanTermInMonths, final int actualLoanTermInMonths) { + final int maxDisbursedOnOffsetFromToday, final int expectedLoanTermInDays, final int actualLoanTermInDays, + final int expectedLoanTermInMonths, final int actualLoanTermInMonths) { this.maxSubmittedOnOffsetFromToday = maxSubmittedOnOffsetFromToday; this.maxApprovedOnOffsetFromToday = maxApprovedOnOffsetFromToday; this.maxDisbursedOnOffsetFromToday = maxDisbursedOnOffsetFromToday; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanDelinquencyData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanDelinquencyData.java index 3efaea390c1..c2a08c9cb53 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanDelinquencyData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanDelinquencyData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.util.Map; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanInstallmentChargeData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanInstallmentChargeData.java index d0c6c2fe900..adec3c041e4 100755 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanInstallmentChargeData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanInstallmentChargeData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Builder; import lombok.Getter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanInterestRecalculationData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanInterestRecalculationData.java index 60b08374cf2..bb76b3dc02c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanInterestRecalculationData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanInterestRecalculationData.java @@ -6,9 +6,9 @@ * 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 @@ -50,14 +50,14 @@ public class LoanInterestRecalculationData { private Boolean disallowInterestCalculationOnPastDue; public LoanInterestRecalculationData(final Long id, final Long loanId, final EnumOptionData interestRecalculationCompoundingType, - final EnumOptionData rescheduleStrategyType, final CalendarData calendarData, - final EnumOptionData recalculationRestFrequencyType, final Integer recalculationRestFrequencyInterval, - final EnumOptionData recalculationRestFrequencyNthDay, final EnumOptionData recalculationRestFrequencyWeekday, - final Integer recalculationRestFrequencyOnDay, final CalendarData compoundingCalendarData, - final EnumOptionData recalculationCompoundingFrequencyType, final Integer recalculationCompoundingFrequencyInterval, - final EnumOptionData recalculationCompoundingFrequencyNthDay, final EnumOptionData recalculationCompoundingFrequencyWeekday, - final Integer recalculationCompoundingFrequencyOnDay, final Boolean isCompoundingToBePostedAsTransaction, - final Boolean allowCompoundingOnEod, final Boolean disallowInterestCalculationOnPastDue) { + final EnumOptionData rescheduleStrategyType, final CalendarData calendarData, + final EnumOptionData recalculationRestFrequencyType, final Integer recalculationRestFrequencyInterval, + final EnumOptionData recalculationRestFrequencyNthDay, final EnumOptionData recalculationRestFrequencyWeekday, + final Integer recalculationRestFrequencyOnDay, final CalendarData compoundingCalendarData, + final EnumOptionData recalculationCompoundingFrequencyType, final Integer recalculationCompoundingFrequencyInterval, + final EnumOptionData recalculationCompoundingFrequencyNthDay, final EnumOptionData recalculationCompoundingFrequencyWeekday, + final Integer recalculationCompoundingFrequencyOnDay, final Boolean isCompoundingToBePostedAsTransaction, + final Boolean allowCompoundingOnEod, final Boolean disallowInterestCalculationOnPastDue) { this.id = id; this.loanId = loanId; this.interestRecalculationCompoundingType = interestRecalculationCompoundingType; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanPrincipalRelatedDataHolder.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanPrincipalRelatedDataHolder.java index 073c192cef3..f5020deaf7d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanPrincipalRelatedDataHolder.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanPrincipalRelatedDataHolder.java @@ -6,9 +6,9 @@ * 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 @@ -18,4 +18,5 @@ */ package org.apache.fineract.portfolio.loanaccount.data; -public interface LoanPrincipalRelatedDataHolder {} +public interface LoanPrincipalRelatedDataHolder { +} diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanRefundRequestData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanRefundRequestData.java index 22daadc5ce8..b5e5b6d18e1 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanRefundRequestData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanRefundRequestData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.math.BigDecimal; + import lombok.AllArgsConstructor; import lombok.Data; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanRepaymentPastDueData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanRepaymentPastDueData.java index 68d07db2303..005ce944120 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanRepaymentPastDueData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanRepaymentPastDueData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.math.BigDecimal; + import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanRepaymentScheduleInstallmentData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanRepaymentScheduleInstallmentData.java index ad06d82e85a..54777b1c1d1 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanRepaymentScheduleInstallmentData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanRepaymentScheduleInstallmentData.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.Getter; @@ -41,7 +42,7 @@ public final class LoanRepaymentScheduleInstallmentData implements Serializable private BigDecimal amount; public static LoanRepaymentScheduleInstallmentData instanceOf(final Long id, final Integer installmentId, final LocalDate date, - final BigDecimal amount) { + final BigDecimal amount) { return new LoanRepaymentScheduleInstallmentData(id, installmentId, date, amount); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanScheduleDelinquencyData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanScheduleDelinquencyData.java index 7d3fad62abf..2cf3f7dc7a2 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanScheduleDelinquencyData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanScheduleDelinquencyData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanStatusEnumData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanStatusEnumData.java index c47742f9ee9..d598d8ac0d0 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanStatusEnumData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanStatusEnumData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanSummaryData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanSummaryData.java index 61ba8701df1..71b6f072da9 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanSummaryData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanSummaryData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Builder; import lombok.Data; import lombok.experimental.Accessors; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTermVariationsData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTermVariationsData.java index 55ee574bf3e..99fa3d0c523 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTermVariationsData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTermVariationsData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -38,7 +39,7 @@ public class LoanTermVariationsData implements Comparable * 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 @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.List; import java.util.ListIterator; + import lombok.Getter; import org.apache.fineract.infrastructure.core.service.DateUtils; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionBalance.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionBalance.java index 0a3e5675da5..90e8903a745 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionBalance.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionBalance.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.math.BigDecimal; + import lombok.Data; import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionType; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionBalanceWithLoanId.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionBalanceWithLoanId.java index 94d5fb505ed..19c4f74f85f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionBalanceWithLoanId.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionBalanceWithLoanId.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.math.BigDecimal; + import lombok.Getter; import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionType; @@ -28,7 +29,7 @@ public class LoanTransactionBalanceWithLoanId extends LoanTransactionBalance { private final Long loanId; public LoanTransactionBalanceWithLoanId(LoanTransactionType transactionType, boolean reversed, boolean manuallyAdjustedOrReversed, - BigDecimal amount, Long loanId) { + BigDecimal amount, Long loanId) { super(transactionType, reversed, manuallyAdjustedOrReversed, amount); this.loanId = loanId; } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionData.java index c57af23d500..f06abde2eef 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionData.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.time.LocalDate; import java.util.Collection; import java.util.List; + import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Builder; @@ -130,15 +131,15 @@ public class LoanTransactionData implements Serializable { private LocalDate calculatedStartDate; public static LoanTransactionData importInstance(BigDecimal repaymentAmount, LocalDate lastRepaymentDate, Long repaymentTypeId, - Integer rowIndex, String locale, String dateFormat) { + Integer rowIndex, String locale, String dateFormat) { return LoanTransactionData.builder().transactionAmount(repaymentAmount).transactionDate(lastRepaymentDate) .paymentTypeId(repaymentTypeId).rowIndex(rowIndex).locale(locale).dateFormat(dateFormat).externalLoanId(ExternalId.empty()) .externalId(ExternalId.empty()).reversalExternalId(ExternalId.empty()).manuallyReversed(false).build(); } public static LoanTransactionData importInstance(BigDecimal repaymentAmount, LocalDate repaymentDate, Long repaymentTypeId, - String accountNumber, Integer checkNumber, Integer routingCode, Integer receiptNumber, Integer bankNumber, Long loanAccountId, - String transactionType, Integer rowIndex, String locale, String dateFormat) { + String accountNumber, Integer checkNumber, Integer routingCode, Integer receiptNumber, Integer bankNumber, Long loanAccountId, + String transactionType, Integer rowIndex, String locale, String dateFormat) { return LoanTransactionData.builder().transactionAmount(repaymentAmount).transactionDate(repaymentDate) .paymentTypeId(repaymentTypeId).accountNumber(accountNumber).checkNumber(checkNumber).routingCode(routingCode) .receiptNumber(receiptNumber).bankNumber(bankNumber).accountId(loanAccountId).transactionType(transactionType) @@ -147,7 +148,7 @@ public static LoanTransactionData importInstance(BigDecimal repaymentAmount, Loc } public static LoanTransactionData templateOnTop(final LoanTransactionData loanTransactionData, - final Collection paymentTypeOptions) { + final Collection paymentTypeOptions) { return builder().id(loanTransactionData.id).officeId(loanTransactionData.officeId).officeName(loanTransactionData.officeName) .type(loanTransactionData.type).paymentDetailData(loanTransactionData.paymentDetailData) .currency(loanTransactionData.currency).date(loanTransactionData.date).amount(loanTransactionData.amount) @@ -176,18 +177,18 @@ public static LoanTransactionData templateOnTop(final LoanTransactionData loanTr } public static LoanTransactionData loanTransactionDataForCreditTemplate(final LoanTransactionEnumData transactionType, - final LocalDate transactionDate, final BigDecimal transactionAmount, final Collection paymentOptions, - final CurrencyData currency, List classificationOptions) { + final LocalDate transactionDate, final BigDecimal transactionAmount, final Collection paymentOptions, + final CurrencyData currency, List classificationOptions) { return builder().type(transactionType).date(transactionDate).amount(transactionAmount).paymentTypeOptions(paymentOptions) .currency(currency).externalLoanId(ExternalId.empty()).externalId(ExternalId.empty()).reversalExternalId(ExternalId.empty()) .manuallyReversed(false).classificationOptions(classificationOptions).build(); } public static LoanTransactionData loanTransactionDataForDisbursalTemplate(final LoanTransactionEnumData transactionType, - final LocalDate expectedDisbursedOnLocalDateForTemplate, final BigDecimal disburseAmountForTemplate, - final BigDecimal netDisbursalAmount, final Collection paymentOptions, final BigDecimal fixedEmiAmount, - final LocalDate possibleNextRepaymentDate, final CurrencyData currency, - final BigDecimal availableDisbursementAmountWithOverApplied) { + final LocalDate expectedDisbursedOnLocalDateForTemplate, final BigDecimal disburseAmountForTemplate, + final BigDecimal netDisbursalAmount, final Collection paymentOptions, final BigDecimal fixedEmiAmount, + final LocalDate possibleNextRepaymentDate, final CurrencyData currency, + final BigDecimal availableDisbursementAmountWithOverApplied) { return builder().type(transactionType).date(expectedDisbursedOnLocalDateForTemplate).amount(disburseAmountForTemplate) .netDisbursalAmount(netDisbursalAmount).paymentTypeOptions(paymentOptions).fixedEmiAmount(fixedEmiAmount) .possibleNextRepaymentDate(possibleNextRepaymentDate).currency(currency) diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionEnumData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionEnumData.java index 743143453f7..2eea79fd3e0 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionEnumData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionEnumData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.Getter; import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionType; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionRelationData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionRelationData.java index cba5bbe748f..79fbfdc8c7d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionRelationData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionRelationData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.math.BigDecimal; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/OutstandingAmountsDTO.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/OutstandingAmountsDTO.java index 265cc6a34fd..3cace0a1e8b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/OutstandingAmountsDTO.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/OutstandingAmountsDTO.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/PaidInAdvanceData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/PaidInAdvanceData.java index be643496f8b..c16fd9e2bd4 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/PaidInAdvanceData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/PaidInAdvanceData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.math.BigDecimal; + import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/RepaymentScheduleRelatedLoanData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/RepaymentScheduleRelatedLoanData.java index 3f2b621f915..8f5e14815a3 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/RepaymentScheduleRelatedLoanData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/RepaymentScheduleRelatedLoanData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import org.apache.fineract.organisation.monetary.data.CurrencyData; @@ -39,15 +40,15 @@ public class RepaymentScheduleRelatedLoanData { private final boolean allowFullTermForTranche; public RepaymentScheduleRelatedLoanData(final LocalDate expectedDisbursementDate, final LocalDate actualDisbursementDate, - final CurrencyData currency, final BigDecimal principal, final BigDecimal inArrearsTolerance, - final BigDecimal totalFeeChargesAtDisbursement) { + final CurrencyData currency, final BigDecimal principal, final BigDecimal inArrearsTolerance, + final BigDecimal totalFeeChargesAtDisbursement) { this(expectedDisbursementDate, actualDisbursementDate, currency, principal, inArrearsTolerance, totalFeeChargesAtDisbursement, false); } public RepaymentScheduleRelatedLoanData(final LocalDate expectedDisbursementDate, final LocalDate actualDisbursementDate, - final CurrencyData currency, final BigDecimal principal, final BigDecimal inArrearsTolerance, - final BigDecimal totalFeeChargesAtDisbursement, final boolean allowFullTermForTranche) { + final CurrencyData currency, final BigDecimal principal, final BigDecimal inArrearsTolerance, + final BigDecimal totalFeeChargesAtDisbursement, final boolean allowFullTermForTranche) { this.expectedDisbursementDate = expectedDisbursementDate; this.actualDisbursementDate = actualDisbursementDate; this.currency = currency; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/ScheduleGeneratorDTO.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/ScheduleGeneratorDTO.java index 3bea4792bf9..aaa0b18b7f9 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/ScheduleGeneratorDTO.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/ScheduleGeneratorDTO.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.time.LocalDate; + import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.portfolio.calendar.data.CalendarHistoryDataWrapper; import org.apache.fineract.portfolio.calendar.domain.Calendar; @@ -49,14 +50,14 @@ public class ScheduleGeneratorDTO { final boolean isPrincipalCompoundingDisabledForOverdueLoans; public ScheduleGeneratorDTO(final LoanScheduleGeneratorFactory loanScheduleFactory, final CurrencyData currency, - final LocalDate calculatedRepaymentsStartingFromDate, final HolidayDetailDTO holidayDetailDTO, - final CalendarInstance calendarInstanceForInterestRecalculation, final CalendarInstance compoundingCalendarInstance, - final LocalDate recalculateFrom, final LocalDate recalculateTill, final Long overdurPenaltyWaitPeriod, - final FloatingRateDTO floatingRateDTO, final Calendar calendar, final CalendarHistoryDataWrapper calendarHistoryDataWrapper, - final Boolean isInterestChargedFromDateAsDisbursementDateEnabled, final Integer numberOfdays, - final boolean isSkipRepaymentOnFirstDayofMonth, final Boolean isChangeEmiIfRepaymentDateSameAsDisbursementDateEnabled, - final boolean isFirstRepaymentDateAllowedOnHoliday, final boolean isInterestToBeRecoveredFirstWhenGreaterThanEMI, - final boolean isPrincipalCompoundingDisabledForOverdueLoans) { + final LocalDate calculatedRepaymentsStartingFromDate, final HolidayDetailDTO holidayDetailDTO, + final CalendarInstance calendarInstanceForInterestRecalculation, final CalendarInstance compoundingCalendarInstance, + final LocalDate recalculateFrom, final LocalDate recalculateTill, final Long overdurPenaltyWaitPeriod, + final FloatingRateDTO floatingRateDTO, final Calendar calendar, final CalendarHistoryDataWrapper calendarHistoryDataWrapper, + final Boolean isInterestChargedFromDateAsDisbursementDateEnabled, final Integer numberOfdays, + final boolean isSkipRepaymentOnFirstDayofMonth, final Boolean isChangeEmiIfRepaymentDateSameAsDisbursementDateEnabled, + final boolean isFirstRepaymentDateAllowedOnHoliday, final boolean isInterestToBeRecoveredFirstWhenGreaterThanEMI, + final boolean isPrincipalCompoundingDisabledForOverdueLoans) { this.loanScheduleFactory = loanScheduleFactory; this.currency = currency; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/TransactionChangeData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/TransactionChangeData.java index 66b29c0a2e8..2392b5a4df9 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/TransactionChangeData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/TransactionChangeData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/TransactionPortionsForForeclosure.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/TransactionPortionsForForeclosure.java index 64d31f8b376..7361bfdea84 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/TransactionPortionsForForeclosure.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/TransactionPortionsForForeclosure.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.math.BigDecimal; + import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionType; public interface TransactionPortionsForForeclosure { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/UnpaidChargeData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/UnpaidChargeData.java index 6e9ede09b09..b1b653a6ea8 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/UnpaidChargeData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/UnpaidChargeData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.util.Objects; + import lombok.Getter; /** diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/AccountingRuleTypeConverter.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/AccountingRuleTypeConverter.java index 5faaef16e6a..6c478bb2187 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/AccountingRuleTypeConverter.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/AccountingRuleTypeConverter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/AmortizationType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/AmortizationType.java index 1c22645aa75..6c6890710d0 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/AmortizationType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/AmortizationType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/ChangedTransactionDetail.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/ChangedTransactionDetail.java index 55ebcb1b76c..81a405dd9df 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/ChangedTransactionDetail.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/ChangedTransactionDetail.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.List; import java.util.Objects; import java.util.Optional; + import lombok.Getter; import org.apache.fineract.portfolio.loanaccount.data.TransactionChangeData; @@ -51,10 +52,10 @@ public void addTransactionChange(final TransactionChangeData transactionChangeDa } public void addNewTransactionChangeBeforeExistingOne(final TransactionChangeData newTransactionChange, - final LoanTransaction existingLoanTransaction) { + final LoanTransaction existingLoanTransaction) { if (existingLoanTransaction != null) { final Optional existingChange = transactionChanges.stream().filter( - change -> change.getNewTransaction() != null && Objects.equals(change.getNewTransaction(), existingLoanTransaction)) + change -> change.getNewTransaction() != null && Objects.equals(change.getNewTransaction(), existingLoanTransaction)) .findFirst(); if (existingChange.isPresent()) { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/DefaultLoanLifecycleStateMachine.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/DefaultLoanLifecycleStateMachine.java index 5b44f78ed48..05b4be88bc7 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/DefaultLoanLifecycleStateMachine.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/DefaultLoanLifecycleStateMachine.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.service.MathUtil; @@ -120,17 +121,17 @@ private LoanStatus getNextStatus(LoanEvent loanEvent, Loan loan) { if (from.hasStateOf(LoanStatus.SUBMITTED_AND_PENDING_APPROVAL)) { newState = rejectedTransition(); } - break; + break; case LOAN_APPROVED: if (from.hasStateOf(LoanStatus.SUBMITTED_AND_PENDING_APPROVAL)) { newState = approvedTransition(); } - break; + break; case LOAN_WITHDRAWN: if (anyOfAllowedWhenComingFrom(from, LoanStatus.SUBMITTED_AND_PENDING_APPROVAL)) { newState = withdrawnByClientTransition(); } - break; + break; case LOAN_DISBURSED: if (anyOfAllowedWhenComingFrom(from, LoanStatus.APPROVED, LoanStatus.CLOSED_OBLIGATIONS_MET)) { newState = activeTransition(); @@ -141,43 +142,43 @@ private LoanStatus getNextStatus(LoanEvent loanEvent, Loan loan) { newState = activeTransition(); } } - break; + break; case LOAN_APPROVAL_UNDO: if (from.hasStateOf(LoanStatus.APPROVED)) { newState = submittedTransition(); } - break; + break; case LOAN_DISBURSAL_UNDO: if (anyOfAllowedWhenComingFrom(from, LoanStatus.ACTIVE)) { newState = approvedTransition(); } - break; + break; case LOAN_CHARGE_PAYMENT: case LOAN_REPAYMENT_OR_WAIVER, LOAN_CHARGEBACK: if (anyOfAllowedWhenComingFrom(from, LoanStatus.CLOSED_OBLIGATIONS_MET, LoanStatus.OVERPAID)) { newState = activeTransition(); } - break; + break; case REPAID_IN_FULL: if (anyOfAllowedWhenComingFrom(from, LoanStatus.ACTIVE, LoanStatus.OVERPAID)) { newState = closeObligationsMetTransition(); } - break; + break; case WRITE_OFF_OUTSTANDING: if (anyOfAllowedWhenComingFrom(from, LoanStatus.ACTIVE)) { newState = closedWrittenOffTransition(); } - break; + break; case LOAN_RESCHEDULE: if (anyOfAllowedWhenComingFrom(from, LoanStatus.ACTIVE)) { newState = closedRescheduleOutstandingAmountTransition(); } - break; + break; case LOAN_OVERPAYMENT: if (anyOfAllowedWhenComingFrom(from, LoanStatus.CLOSED_OBLIGATIONS_MET, LoanStatus.ACTIVE)) { newState = overpaidTransition(); } - break; + break; case LOAN_ADJUST_TRANSACTION: if (anyOfAllowedWhenComingFrom(from, LoanStatus.CLOSED_OBLIGATIONS_MET, LoanStatus.CLOSED_WRITTEN_OFF, LoanStatus.CLOSED_RESCHEDULE_OUTSTANDING_AMOUNT)) { @@ -188,20 +189,20 @@ private LoanStatus getNextStatus(LoanEvent loanEvent, Loan loan) { newState = activeTransition(); } } - break; + break; case LOAN_INITIATE_TRANSFER: newState = transferInProgress(); - break; + break; case LOAN_REJECT_TRANSFER: if (anyOfAllowedWhenComingFrom(from, LoanStatus.TRANSFER_IN_PROGRESS)) { newState = transferOnHold(); } - break; + break; case LOAN_WITHDRAW_TRANSFER: if (anyOfAllowedWhenComingFrom(from, LoanStatus.TRANSFER_IN_PROGRESS)) { newState = activeTransition(); } - break; + break; case LOAN_COMPLETE_TRANSFER: if (anyOfAllowedWhenComingFrom(from, LoanStatus.TRANSFER_IN_PROGRESS)) { boolean isOverpaid = loan.getTotalOverpaid() != null && loan.getTotalOverpaid().compareTo(BigDecimal.ZERO) > 0; @@ -213,29 +214,29 @@ private LoanStatus getNextStatus(LoanEvent loanEvent, Loan loan) { newState = activeTransition(); } } - break; + break; case WRITE_OFF_OUTSTANDING_UNDO: if (anyOfAllowedWhenComingFrom(from, LoanStatus.CLOSED_WRITTEN_OFF)) { newState = activeTransition(); } - break; + break; case LOAN_CREDIT_BALANCE_REFUND: if (anyOfAllowedWhenComingFrom(from, LoanStatus.OVERPAID)) { newState = closeObligationsMetTransition(); } - break; + break; case LOAN_CHARGE_ADDED: if (anyOfAllowedWhenComingFrom(from, LoanStatus.CLOSED_OBLIGATIONS_MET)) { newState = activeTransition(); } - break; + break; case LOAN_CHARGE_ADJUSTMENT: if (from.hasStateOf(LoanStatus.CLOSED_OBLIGATIONS_MET)) { newState = overpaidTransition(); } - break; + break; default: - break; + break; } return newState; } @@ -329,7 +330,7 @@ private LoanStatusTransition determineTransition(final Loan loan, final LoanStat } private LoanStatusTransition determineTransitionFromOverpaid(final Loan loan, final boolean isOverpaid, final boolean isRepaidInFull, - final boolean isAllChargesPaid, final boolean hasOutstanding, final LocalDate transactionDate) { + final boolean isAllChargesPaid, final boolean hasOutstanding, final LocalDate transactionDate) { if (!isOverpaid) { if (isRepaidInFull && isAllChargesPaid) { loan.setClosedOnDate(transactionDate); @@ -344,7 +345,7 @@ private LoanStatusTransition determineTransitionFromOverpaid(final Loan loan, fi } private LoanStatusTransition determineTransitionFromClosedObligationsMet(final Loan loan, final boolean isOverpaid, - final boolean hasOutstanding, LocalDate transactionDate) { + final boolean hasOutstanding, LocalDate transactionDate) { if (isOverpaid) { loan.setOverpaidOnDate(transactionDate); loan.setClosedOnDate(null); @@ -360,7 +361,7 @@ private LoanStatusTransition determineTransitionFromClosedObligationsMet(final L } private LoanStatusTransition determineTransitionFromActive(final Loan loan, final boolean isOverpaid, final boolean isRepaidInFull, - final boolean isAllChargesPaid, final LocalDate transactionDate) { + final boolean isAllChargesPaid, final LocalDate transactionDate) { if (isOverpaid) { loan.setOverpaidOnDate(transactionDate); loan.setActualMaturityDate(null); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/GLIMAccountInfoRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/GLIMAccountInfoRepository.java index ba997981173..dfe1b549923 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/GLIMAccountInfoRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/GLIMAccountInfoRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.domain; import java.math.BigDecimal; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/GroupLoanIndividualMonitoringAccount.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/GroupLoanIndividualMonitoringAccount.java index 52848f8f4d1..4e104a1cfe7 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/GroupLoanIndividualMonitoringAccount.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/GroupLoanIndividualMonitoringAccount.java @@ -6,9 +6,9 @@ * 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 @@ -26,13 +26,15 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.math.BigDecimal; import java.util.Set; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.portfolio.group.domain.Group; @Entity -@Table(name = "glim_accounts", uniqueConstraints = { @UniqueConstraint(columnNames = { "account_number" }, name = "FK_glim_id") }) +@Table(name = "glim_accounts", uniqueConstraints = {@UniqueConstraint(columnNames = {"account_number"}, name = "FK_glim_id")}) public class GroupLoanIndividualMonitoringAccount extends AbstractPersistableCustom { @ManyToOne @@ -60,10 +62,11 @@ public class GroupLoanIndividualMonitoringAccount extends AbstractPersistableCus @Column(name = "application_id", nullable = true) private BigDecimal applicationId; - protected GroupLoanIndividualMonitoringAccount() {} + protected GroupLoanIndividualMonitoringAccount() { + } private GroupLoanIndividualMonitoringAccount(String accountNumber, Group group, BigDecimal principalAmount, Long childAccountsCount, - Boolean isAcceptingChild, Integer loanStatus, BigDecimal applicationId) { + Boolean isAcceptingChild, Integer loanStatus, BigDecimal applicationId) { this.accountNumber = accountNumber; this.group = group; this.principalAmount = principalAmount; @@ -74,7 +77,7 @@ private GroupLoanIndividualMonitoringAccount(String accountNumber, Group group, } public static GroupLoanIndividualMonitoringAccount getInstance(String accountNumber, Group group, BigDecimal principalAmount, - Long childAccountsCount, Boolean isAcceptingChild, Integer loanStatus, BigDecimal applicationId) { + Long childAccountsCount, Boolean isAcceptingChild, Integer loanStatus, BigDecimal applicationId) { return new GroupLoanIndividualMonitoringAccount(accountNumber, group, principalAmount, childAccountsCount, isAcceptingChild, loanStatus, applicationId); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java index ebf39dc5852..c1a65290007 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/Loan.java @@ -6,9 +6,9 @@ * 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 @@ -38,6 +38,7 @@ import jakarta.persistence.UniqueConstraint; import jakarta.persistence.Version; import jakarta.validation.constraints.NotNull; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; @@ -52,6 +53,7 @@ import java.util.function.BiFunction; import java.util.function.Predicate; import java.util.stream.Collectors; + import lombok.AccessLevel; import lombok.Getter; import lombok.Setter; @@ -85,8 +87,8 @@ import org.springframework.lang.NonNull; @Entity -@Table(name = "m_loan", uniqueConstraints = { @UniqueConstraint(columnNames = { "account_no" }, name = "loan_account_no_UNIQUE"), - @UniqueConstraint(columnNames = { "external_id" }, name = "loan_externalid_UNIQUE") }) +@Table(name = "m_loan", uniqueConstraints = {@UniqueConstraint(columnNames = {"account_no"}, name = "loan_account_no_UNIQUE"), + @UniqueConstraint(columnNames = {"external_id"}, name = "loan_externalid_UNIQUE")}) @Getter public class Loan extends AbstractAuditableWithUTCDateTimeCustom { @@ -432,15 +434,15 @@ public class Loan extends AbstractAuditableWithUTCDateTimeCustom { private boolean allowFullTermForTranche = false; public static Loan newIndividualLoanApplication(final String accountNo, final Client client, final AccountType loanType, - final LoanProduct loanProduct, final Fund fund, final Staff officer, final CodeValue loanPurpose, - final LoanRepaymentScheduleTransactionProcessor transactionProcessingStrategy, - final LoanProductRelatedDetail loanRepaymentScheduleDetail, final Set loanCharges, - final Set collateral, final BigDecimal fixedEmiAmount, - final List disbursementDetails, final BigDecimal maxOutstandingLoanBalance, - final Boolean createStandingInstructionAtDisbursement, final Boolean isFloatingInterestRate, - final BigDecimal interestRateDifferential, final List rates, final BigDecimal fixedPrincipalPercentagePerInstallment, - final ExternalId externalId, final LoanApplicationTerms loanApplicationTerms, final Boolean enableInstallmentLevelDelinquency, - final LocalDate submittedOnDate, final Boolean allowFullTermForTranche) { + final LoanProduct loanProduct, final Fund fund, final Staff officer, final CodeValue loanPurpose, + final LoanRepaymentScheduleTransactionProcessor transactionProcessingStrategy, + final LoanProductRelatedDetail loanRepaymentScheduleDetail, final Set loanCharges, + final Set collateral, final BigDecimal fixedEmiAmount, + final List disbursementDetails, final BigDecimal maxOutstandingLoanBalance, + final Boolean createStandingInstructionAtDisbursement, final Boolean isFloatingInterestRate, + final BigDecimal interestRateDifferential, final List rates, final BigDecimal fixedPrincipalPercentagePerInstallment, + final ExternalId externalId, final LoanApplicationTerms loanApplicationTerms, final Boolean enableInstallmentLevelDelinquency, + final LocalDate submittedOnDate, final Boolean allowFullTermForTranche) { return new Loan(accountNo, client, null, loanType, fund, officer, loanPurpose, transactionProcessingStrategy, loanProduct, loanRepaymentScheduleDetail, null, loanCharges, collateral, null, fixedEmiAmount, disbursementDetails, maxOutstandingLoanBalance, createStandingInstructionAtDisbursement, isFloatingInterestRate, interestRateDifferential, rates, @@ -449,15 +451,15 @@ public static Loan newIndividualLoanApplication(final String accountNo, final Cl } public static Loan newGroupLoanApplication(final String accountNo, final Group group, final AccountType loanType, - final LoanProduct loanProduct, final Fund fund, final Staff officer, final CodeValue loanPurpose, - final LoanRepaymentScheduleTransactionProcessor transactionProcessingStrategy, - final LoanProductRelatedDetail loanRepaymentScheduleDetail, final Set loanCharges, - final Boolean syncDisbursementWithMeeting, final BigDecimal fixedEmiAmount, - final List disbursementDetails, final BigDecimal maxOutstandingLoanBalance, - final Boolean createStandingInstructionAtDisbursement, final Boolean isFloatingInterestRate, - final BigDecimal interestRateDifferential, final List rates, final BigDecimal fixedPrincipalPercentagePerInstallment, - final ExternalId externalId, final LoanApplicationTerms loanApplicationTerms, final Boolean enableInstallmentLevelDelinquency, - final LocalDate submittedOnDate, final Boolean allowFullTermForTranche) { + final LoanProduct loanProduct, final Fund fund, final Staff officer, final CodeValue loanPurpose, + final LoanRepaymentScheduleTransactionProcessor transactionProcessingStrategy, + final LoanProductRelatedDetail loanRepaymentScheduleDetail, final Set loanCharges, + final Boolean syncDisbursementWithMeeting, final BigDecimal fixedEmiAmount, + final List disbursementDetails, final BigDecimal maxOutstandingLoanBalance, + final Boolean createStandingInstructionAtDisbursement, final Boolean isFloatingInterestRate, + final BigDecimal interestRateDifferential, final List rates, final BigDecimal fixedPrincipalPercentagePerInstallment, + final ExternalId externalId, final LoanApplicationTerms loanApplicationTerms, final Boolean enableInstallmentLevelDelinquency, + final LocalDate submittedOnDate, final Boolean allowFullTermForTranche) { return new Loan(accountNo, null, group, loanType, fund, officer, loanPurpose, transactionProcessingStrategy, loanProduct, loanRepaymentScheduleDetail, null, loanCharges, null, syncDisbursementWithMeeting, fixedEmiAmount, disbursementDetails, maxOutstandingLoanBalance, createStandingInstructionAtDisbursement, isFloatingInterestRate, interestRateDifferential, rates, @@ -466,15 +468,15 @@ public static Loan newGroupLoanApplication(final String accountNo, final Group g } public static Loan newIndividualLoanApplicationFromGroup(final String accountNo, final Client client, final Group group, - final AccountType loanType, final LoanProduct loanProduct, final Fund fund, final Staff officer, final CodeValue loanPurpose, - final LoanRepaymentScheduleTransactionProcessor transactionProcessingStrategy, - final LoanProductRelatedDetail loanRepaymentScheduleDetail, final Set loanCharges, - final Boolean syncDisbursementWithMeeting, final BigDecimal fixedEmiAmount, - final List disbursementDetails, final BigDecimal maxOutstandingLoanBalance, - final Boolean createStandingInstructionAtDisbursement, final Boolean isFloatingInterestRate, - final BigDecimal interestRateDifferential, final List rates, final BigDecimal fixedPrincipalPercentagePerInstallment, - final ExternalId externalId, final LoanApplicationTerms loanApplicationTerms, final Boolean enableInstallmentLevelDelinquency, - final LocalDate submittedOnDate, final Boolean allowFullTermForTranche) { + final AccountType loanType, final LoanProduct loanProduct, final Fund fund, final Staff officer, final CodeValue loanPurpose, + final LoanRepaymentScheduleTransactionProcessor transactionProcessingStrategy, + final LoanProductRelatedDetail loanRepaymentScheduleDetail, final Set loanCharges, + final Boolean syncDisbursementWithMeeting, final BigDecimal fixedEmiAmount, + final List disbursementDetails, final BigDecimal maxOutstandingLoanBalance, + final Boolean createStandingInstructionAtDisbursement, final Boolean isFloatingInterestRate, + final BigDecimal interestRateDifferential, final List rates, final BigDecimal fixedPrincipalPercentagePerInstallment, + final ExternalId externalId, final LoanApplicationTerms loanApplicationTerms, final Boolean enableInstallmentLevelDelinquency, + final LocalDate submittedOnDate, final Boolean allowFullTermForTranche) { return new Loan(accountNo, client, group, loanType, fund, officer, loanPurpose, transactionProcessingStrategy, loanProduct, loanRepaymentScheduleDetail, null, loanCharges, null, syncDisbursementWithMeeting, fixedEmiAmount, disbursementDetails, maxOutstandingLoanBalance, createStandingInstructionAtDisbursement, isFloatingInterestRate, interestRateDifferential, rates, @@ -487,15 +489,15 @@ protected Loan() { } private Loan(final String accountNo, final Client client, final Group group, final AccountType loanType, final Fund fund, - final Staff loanOfficer, final CodeValue loanPurpose, - final LoanRepaymentScheduleTransactionProcessor transactionProcessingStrategy, final LoanProduct loanProduct, - final LoanProductRelatedDetail loanRepaymentScheduleDetail, final LoanStatus loanStatus, final Set loanCharges, - final Set collateral, final Boolean syncDisbursementWithMeeting, final BigDecimal fixedEmiAmount, - final List disbursementDetails, final BigDecimal maxOutstandingLoanBalance, - final Boolean createStandingInstructionAtDisbursement, final Boolean isFloatingInterestRate, - final BigDecimal interestRateDifferential, final List rates, final BigDecimal fixedPrincipalPercentagePerInstallment, - final ExternalId externalId, final LoanApplicationTerms loanApplicationTerms, final Boolean enableInstallmentLevelDelinquency, - final LocalDate submittedOnDate, final Boolean allowFullTermForTranche) { + final Staff loanOfficer, final CodeValue loanPurpose, + final LoanRepaymentScheduleTransactionProcessor transactionProcessingStrategy, final LoanProduct loanProduct, + final LoanProductRelatedDetail loanRepaymentScheduleDetail, final LoanStatus loanStatus, final Set loanCharges, + final Set collateral, final Boolean syncDisbursementWithMeeting, final BigDecimal fixedEmiAmount, + final List disbursementDetails, final BigDecimal maxOutstandingLoanBalance, + final Boolean createStandingInstructionAtDisbursement, final Boolean isFloatingInterestRate, + final BigDecimal interestRateDifferential, final List rates, final BigDecimal fixedPrincipalPercentagePerInstallment, + final ExternalId externalId, final LoanApplicationTerms loanApplicationTerms, final Boolean enableInstallmentLevelDelinquency, + final LocalDate submittedOnDate, final Boolean allowFullTermForTranche) { this.loanRepaymentScheduleDetail = loanRepaymentScheduleDetail; this.isFloatingInterestRate = isFloatingInterestRate; @@ -691,7 +693,7 @@ public void updateLoanPurpose(final CodeValue loanPurpose) { } public void updateTransactionProcessingStrategy(final String transactionProcessingStrategyCode, - final String transactionProcessingStrategyName) { + final String transactionProcessingStrategyName) { this.transactionProcessingStrategyCode = transactionProcessingStrategyCode; this.transactionProcessingStrategyName = transactionProcessingStrategyName; } @@ -837,7 +839,7 @@ public boolean isDisbursementAllowed() { || disbursementDetails.stream().anyMatch(it -> it.actualDisbursementDate() == null); boolean isMultiDisburseLoanDisbursementAllowed = isMultiDisburmentLoan() && (disbursementDetails == null || disbursementDetails.stream().filter(it -> it.actualDisbursementDate() != null) - .count() < loanProduct.getLoanProductTrancheDetails().getMaxTrancheCount()); + .count() < loanProduct.getLoanProductTrancheDetails().getMaxTrancheCount()); return isSingleDisburseLoanDisbursementAllowed || isMultiDisburseLoanDisbursementAllowed; } @@ -1364,8 +1366,8 @@ public Long loanInterestRecalculationDetailId() { public boolean isInterestBearing() { return BigDecimal.ZERO.compareTo(getLoanRepaymentScheduleDetail().getAnnualNominalInterestRate()) < 0 || (isProgressiveSchedule() && !getLoanTermVariations().isEmpty() - && loanTermVariations.stream().anyMatch(ltv -> ltv.getTermType().isInterestRateFromInstallment() - && ltv.getTermValue() != null && MathUtil.isGreaterThanZero(ltv.getTermValue()))); + && loanTermVariations.stream().anyMatch(ltv -> ltv.getTermType().isInterestRateFromInstallment() + && ltv.getTermValue() != null && MathUtil.isGreaterThanZero(ltv.getTermValue()))); } public boolean isInterestBearingAndInterestRecalculationEnabled() { @@ -1418,7 +1420,7 @@ public void addLoanRepaymentScheduleInstallment(final LoanRepaymentScheduleInsta public LoanRepaymentScheduleInstallment getRelatedRepaymentScheduleInstallment(final LocalDate date) { return getRepaymentScheduleInstallment(e -> (DateUtils.isDateInRangeFromExclusiveToInclusive(date, e.getFromDate(), e.getDueDate()) || (e.isFirstNormalInstallment(getRepaymentScheduleInstallments()) - && DateUtils.isDateInRangeInclusive(date, e.getFromDate(), e.getDueDate())))); + && DateUtils.isDateInRangeInclusive(date, e.getFromDate(), e.getDueDate())))); } public List getInstallmentsUpToTransactionDate(final LocalDate transactionDate) { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainService.java index ad8d5d0fa6f..bd05b2237c2 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainService.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.tuple.Pair; import org.apache.fineract.infrastructure.core.data.CommandProcessingResultBuilder; import org.apache.fineract.infrastructure.core.domain.ExternalId; @@ -35,26 +36,26 @@ public interface LoanAccountDomainService { LoanTransaction makeRepayment(LoanTransactionType repaymentTransactionType, Loan loan, LocalDate transactionDate, - BigDecimal transactionAmount, PaymentDetail paymentDetail, String noteText, ExternalId txnExternalId, - boolean isRecoveryRepayment, String chargeRefundChargeType, boolean isAccountTransfer, HolidayDetailDTO holidayDetailDto, - Boolean isHolidayValidationDone); + BigDecimal transactionAmount, PaymentDetail paymentDetail, String noteText, ExternalId txnExternalId, + boolean isRecoveryRepayment, String chargeRefundChargeType, boolean isAccountTransfer, HolidayDetailDTO holidayDetailDto, + Boolean isHolidayValidationDone); LoanTransaction makeRefund(Long accountId, CommandProcessingResultBuilder builderResult, LocalDate transactionDate, - BigDecimal transactionAmount, PaymentDetail paymentDetail, String noteText, ExternalId txnExternalId); + BigDecimal transactionAmount, PaymentDetail paymentDetail, String noteText, ExternalId txnExternalId); LoanTransaction makeDisburseTransaction(Long loanId, LocalDate transactionDate, BigDecimal transactionAmount, - PaymentDetail paymentDetail, String noteText, ExternalId txnExternalId, boolean isLoanToLoanTransfer); + PaymentDetail paymentDetail, String noteText, ExternalId txnExternalId, boolean isLoanToLoanTransfer); void reverseTransfer(LoanTransaction loanTransaction); LoanTransaction makeChargePayment(Loan loan, Long chargeId, LocalDate transactionDate, BigDecimal transactionAmount, - PaymentDetail paymentDetail, String noteText, ExternalId txnExternalId, Integer transactionType, Integer installmentNumber); + PaymentDetail paymentDetail, String noteText, ExternalId txnExternalId, Integer transactionType, Integer installmentNumber); LoanTransaction makeDisburseTransaction(Long loanId, LocalDate transactionDate, BigDecimal transactionAmount, - PaymentDetail paymentDetail, String noteText, ExternalId txnExternalId); + PaymentDetail paymentDetail, String noteText, ExternalId txnExternalId); LoanTransaction makeRefundForActiveLoan(Long accountId, CommandProcessingResultBuilder builderResult, LocalDate transactionDate, - BigDecimal transactionAmount, PaymentDetail paymentDetail, String noteText, ExternalId txnExternalId); + BigDecimal transactionAmount, PaymentDetail paymentDetail, String noteText, ExternalId txnExternalId); void updateLoanCollateralStatus(Set loanCollateralManagementSet, boolean isReleased); @@ -70,12 +71,12 @@ LoanTransaction makeRefundForActiveLoan(Long accountId, CommandProcessingResultB void setLoanDelinquencyTag(Loan loan, LocalDate transactionDate, List effectiveDelinquencyList); LoanTransaction makeRepayment(LoanTransactionType repaymentTransactionType, Loan loan, LocalDate transactionDate, - BigDecimal transactionAmount, PaymentDetail paymentDetail, String noteText, ExternalId txnExternalId, - boolean isRecoveryRepayment, String chargeRefundChargeType, boolean isAccountTransfer, HolidayDetailDTO holidayDetailDto, - Boolean isHolidayValidationDone, boolean isLoanToLoanTransfer); + BigDecimal transactionAmount, PaymentDetail paymentDetail, String noteText, ExternalId txnExternalId, + boolean isRecoveryRepayment, String chargeRefundChargeType, boolean isAccountTransfer, HolidayDetailDTO holidayDetailDto, + Boolean isHolidayValidationDone, boolean isLoanToLoanTransfer); LoanTransaction foreCloseLoan(Loan loan, LocalDate foreClourseDate, String noteText, ExternalId externalId, - Map changes); + Map changes); /** * Disables all standing instructions linked to a closed loan @@ -86,11 +87,11 @@ LoanTransaction foreCloseLoan(Loan loan, LocalDate foreClourseDate, String noteT void disableStandingInstructionsLinkedToClosedLoan(Loan loan); LoanTransaction creditBalanceRefund(Loan loan, LocalDate transactionDate, BigDecimal transactionAmount, String noteText, - ExternalId externalId, PaymentDetail paymentDetail); + ExternalId externalId, PaymentDetail paymentDetail); Pair makeRefund(Loan loan, ScheduleGeneratorDTO scheduleGeneratorDTO, - LoanTransactionType loanTransactionType, LocalDate transactionDate, BigDecimal transactionAmount, PaymentDetail paymentDetail, - ExternalId txnExternalId, Boolean interestRefundCalculationOverride); + LoanTransactionType loanTransactionType, LocalDate transactionDate, BigDecimal transactionAmount, PaymentDetail paymentDetail, + ExternalId txnExternalId, Boolean interestRefundCalculationOverride); void updateAndSavePostDatedChecksForIndividualAccount(Loan loan, LoanTransaction transaction); @@ -99,5 +100,5 @@ Pair makeRefund(Loan loan, ScheduleGeneratorDT void updateAndSaveLoanCollateralTransactionsForIndividualAccounts(Loan loan, LoanTransaction transaction); LoanTransaction createManualInterestRefundWithAmount(Loan loan, LoanTransaction targetTransaction, BigDecimal amount, - PaymentDetail paymentDetail, ExternalId txnExternalId); + PaymentDetail paymentDetail, ExternalId txnExternalId); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountService.java index 5b0e3ae817b..589b403f9b9 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccrualActivityRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccrualActivityRepository.java index 9b51288c692..2f9c78bcddb 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccrualActivityRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccrualActivityRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.Set; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; @@ -28,6 +29,6 @@ public interface LoanAccrualActivityRepository extends JpaRepository @Query("select loan.id from Loan loan left join LoanTransaction lt on lt.loan = loan and lt.typeOf = :loanType and lt.reversed = false and lt.dateOf = :currentDate inner join LoanRepaymentScheduleInstallment rs on rs.loan = loan and rs.isDownPayment = false and rs.additional = false and rs.dueDate = :currentDate where loan.loanRepaymentScheduleDetail.enableAccrualActivityPosting = true and loan.loanStatus = :loanStatus and lt.id is null ") Set fetchLoanIdsForAccrualActivityPosting(@Param("currentDate") LocalDate currentDate, - @Param("loanType") LoanTransactionType loanTransactionType, @Param("loanStatus") LoanStatus loanStatus); + @Param("loanType") LoanTransactionType loanTransactionType, @Param("loanStatus") LoanStatus loanStatus); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAmortizationAllocationMapping.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAmortizationAllocationMapping.java index 5e19538c5f7..9a467966a25 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAmortizationAllocationMapping.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAmortizationAllocationMapping.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import jakarta.persistence.EnumType; import jakarta.persistence.Enumerated; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAmortizationAllocationMappingRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAmortizationAllocationMappingRepository.java index fd355087c66..6b6487b6bfd 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAmortizationAllocationMappingRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAmortizationAllocationMappingRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.data.AmortizationAllocationMappingDTO; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanApprovedAmountHistory.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanApprovedAmountHistory.java index 8e4963b3b0e..9cd488ad0e7 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanApprovedAmountHistory.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanApprovedAmountHistory.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Table; + import java.math.BigDecimal; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanApprovedAmountHistoryRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanApprovedAmountHistoryRepository.java index 7175b0633c5..8f7c2458398 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanApprovedAmountHistoryRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanApprovedAmountHistoryRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.domain; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.data.LoanApprovedAmountHistoryData; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanBuyDownFeeCalculationType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanBuyDownFeeCalculationType.java index 4991cf498f8..45156ab5d1e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanBuyDownFeeCalculationType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanBuyDownFeeCalculationType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanBuyDownFeeIncomeType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanBuyDownFeeIncomeType.java index aa0b7308250..b43388a4b19 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanBuyDownFeeIncomeType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanBuyDownFeeIncomeType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanBuyDownFeeStrategy.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanBuyDownFeeStrategy.java index a58d13bc6e3..a46ec6226c6 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanBuyDownFeeStrategy.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanBuyDownFeeStrategy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCapitalizedIncomeCalculationType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCapitalizedIncomeCalculationType.java index 8b30a945941..1a86e636ed2 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCapitalizedIncomeCalculationType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCapitalizedIncomeCalculationType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCapitalizedIncomeStrategy.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCapitalizedIncomeStrategy.java index 16df54bae53..c1d00cf3de1 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCapitalizedIncomeStrategy.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCapitalizedIncomeStrategy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCapitalizedIncomeType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCapitalizedIncomeType.java index ca17c8d395e..cc3160b146b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCapitalizedIncomeType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCapitalizedIncomeType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCharge.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCharge.java index 36101f67ae8..c065b04e9aa 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCharge.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCharge.java @@ -6,9 +6,9 @@ * 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 @@ -29,6 +29,7 @@ import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; import jakarta.validation.constraints.NotNull; + import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; @@ -38,6 +39,7 @@ import java.util.Objects; import java.util.Set; import java.util.function.Predicate; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.infrastructure.core.data.EnumOptionData; @@ -58,7 +60,7 @@ @Setter @Getter @Entity -@Table(name = "m_loan_charge", uniqueConstraints = { @UniqueConstraint(columnNames = { "external_id" }, name = "external_id") }) +@Table(name = "m_loan_charge", uniqueConstraints = {@UniqueConstraint(columnNames = {"external_id"}, name = "external_id")}) public class LoanCharge extends AbstractAuditableWithUTCDateTimeCustom { @ManyToOne(optional = false) @@ -495,7 +497,7 @@ public LoanInstallmentCharge getUnpaidInstallmentLoanCharge() { for (final LoanInstallmentCharge loanChargePerInstallment : this.loanInstallmentCharge) { if (loanChargePerInstallment.isPending() && (unpaidChargePerInstallment == null || DateUtils.isAfter(unpaidChargePerInstallment.getRepaymentInstallment().getDueDate(), - loanChargePerInstallment.getRepaymentInstallment().getDueDate()))) { + loanChargePerInstallment.getRepaymentInstallment().getDueDate()))) { unpaidChargePerInstallment = loanChargePerInstallment; } } @@ -666,7 +668,7 @@ public LoanInstallmentCharge getLastPaidOrPartiallyPaidInstallmentLoanCharge(Mon && outstanding.isLessThan(loanChargePerInstallment.getAmount(currency)); if ((partiallyPaid || loanChargePerInstallment.isPaid()) && (paidChargePerInstallment == null || DateUtils.isBefore(paidChargePerInstallment.getRepaymentInstallment().getDueDate(), - loanChargePerInstallment.getRepaymentInstallment().getDueDate()))) { + loanChargePerInstallment.getRepaymentInstallment().getDueDate()))) { paidChargePerInstallment = loanChargePerInstallment; } } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanChargeEffectiveDueDateComparator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanChargeEffectiveDueDateComparator.java index f5360d2845a..7439a3dfd08 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanChargeEffectiveDueDateComparator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanChargeEffectiveDueDateComparator.java @@ -6,9 +6,9 @@ * 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 @@ -29,7 +29,8 @@ public final class LoanChargeEffectiveDueDateComparator implements Comparator * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanChargePaidBy.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanChargePaidBy.java index fb102fd5818..969826f5162 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanChargePaidBy.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanChargePaidBy.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @Entity @@ -49,7 +51,7 @@ protected LoanChargePaidBy() { } public LoanChargePaidBy(final LoanTransaction loanTransaction, final LoanCharge loanCharge, final BigDecimal amount, - Integer installmentNumber) { + Integer installmentNumber) { this.loanTransaction = loanTransaction; this.loanCharge = loanCharge; this.amount = amount; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanChargePaidByRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanChargePaidByRepository.java index be73c209ac5..7829cd18aa5 100755 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanChargePaidByRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanChargePaidByRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanChargeRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanChargeRepository.java index cc7139eede1..bb6cd7f5612 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanChargeRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanChargeRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCollateralManagement.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCollateralManagement.java index 9b180b8f226..b5bfa270407 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCollateralManagement.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCollateralManagement.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.portfolio.collateralmanagement.domain.ClientCollateralManagement; import org.apache.fineract.portfolio.loanaccount.data.LoanCollateralManagementData; @@ -73,7 +75,7 @@ public static LoanCollateralManagement from(final ClientCollateralManagement cli } public static LoanCollateralManagement fromExisting(final ClientCollateralManagement clientCollateralManagement, - final BigDecimal quantity, final Loan loan, final LoanTransaction transaction, final Long id) { + final BigDecimal quantity, final Loan loan, final LoanTransaction transaction, final Long id) { LoanCollateralManagement loanCollateralManagementInstance = new LoanCollateralManagement(quantity, clientCollateralManagement); loanCollateralManagementInstance.setLoan(loan); loanCollateralManagementInstance.setLoanTransactionData(transaction); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCollateralManagementRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCollateralManagementRepository.java index 15a20a9a580..292032f1c46 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCollateralManagementRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCollateralManagementRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCreditAllocationRule.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCreditAllocationRule.java index b61b4a01750..b9f7b319a65 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCreditAllocationRule.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCreditAllocationRule.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.domain; // TODO FINERACT-1932-Fineract modularization: Move to fineract-progressive-loan module after refactor of Loan and LoanTransaction classes + import jakarta.persistence.Column; import jakarta.persistence.Convert; import jakarta.persistence.Entity; @@ -28,7 +29,9 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.util.List; + import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; @@ -43,7 +46,7 @@ @Setter @Entity @Table(name = "m_loan_credit_allocation_rule", uniqueConstraints = { - @UniqueConstraint(columnNames = { "loan_id", "transaction_type" }, name = "uq_m_loan_credit_allocation_rule") }) + @UniqueConstraint(columnNames = {"loan_id", "transaction_type"}, name = "uq_m_loan_credit_allocation_rule")}) @AllArgsConstructor @NoArgsConstructor(access = AccessLevel.PROTECTED) public class LoanCreditAllocationRule extends AbstractAuditableWithUTCDateTimeCustom { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanDisbursementDetails.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanDisbursementDetails.java index ef31e7dec01..7e665849b1b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanDisbursementDetails.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanDisbursementDetails.java @@ -6,9 +6,9 @@ * 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 @@ -23,9 +23,11 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.Objects; + import lombok.Getter; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -60,7 +62,7 @@ protected LoanDisbursementDetails() { } public LoanDisbursementDetails(final LocalDate expectedDisbursementDate, final LocalDate actualDisbursementDate, - final BigDecimal principal, final BigDecimal netDisbursalAmount, final boolean reversed) { + final BigDecimal principal, final BigDecimal netDisbursalAmount, final boolean reversed) { this.expectedDisbursementDate = expectedDisbursementDate; this.actualDisbursementDate = actualDisbursementDate; this.principal = principal; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanDisbursementDetailsRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanDisbursementDetailsRepository.java index 77da6021f77..32c1f4fde35 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanDisbursementDetailsRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanDisbursementDetailsRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanEvent.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanEvent.java index ca570eb66bc..4f4a18b9ffe 100755 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanEvent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanInstallmentCharge.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanInstallmentCharge.java index aa085b45571..5437d40672f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanInstallmentCharge.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanInstallmentCharge.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanInterestRecalcualtionAdditionalDetails.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanInterestRecalcualtionAdditionalDetails.java index 77688589151..327bf74bfe6 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanInterestRecalcualtionAdditionalDetails.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanInterestRecalcualtionAdditionalDetails.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanInterestRecalculationDetails.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanInterestRecalculationDetails.java index 53380a8d14a..0445ce162e2 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanInterestRecalculationDetails.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanInterestRecalculationDetails.java @@ -6,9 +6,9 @@ * 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 @@ -113,11 +113,11 @@ protected LoanInterestRecalculationDetails() { } private LoanInterestRecalculationDetails(final Integer interestRecalculationCompoundingMethod, final Integer rescheduleStrategyMethod, - final Integer restFrequencyType, final Integer restInterval, final Integer restFrequencyNthDay, Integer restFrequencyWeekday, - Integer restFrequencyOnDay, Integer compoundingFrequencyType, Integer compoundingInterval, Integer compoundingFrequencyNthDay, - Integer compoundingFrequencyWeekday, Integer compoundingFrequencyOnDay, final boolean isCompoundingToBePostedAsTransaction, - final boolean allowCompoundingOnEod, final boolean disallowInterestCalculationOnPastDue, - final LoanPreCloseInterestCalculationStrategy preCloseInterestCalculationStrategy) { + final Integer restFrequencyType, final Integer restInterval, final Integer restFrequencyNthDay, Integer restFrequencyWeekday, + Integer restFrequencyOnDay, Integer compoundingFrequencyType, Integer compoundingInterval, Integer compoundingFrequencyNthDay, + Integer compoundingFrequencyWeekday, Integer compoundingFrequencyOnDay, final boolean isCompoundingToBePostedAsTransaction, + final boolean allowCompoundingOnEod, final boolean disallowInterestCalculationOnPastDue, + final LoanPreCloseInterestCalculationStrategy preCloseInterestCalculationStrategy) { this.interestRecalculationCompoundingMethod = interestRecalculationCompoundingMethod; this.rescheduleStrategyMethod = rescheduleStrategyMethod; this.restFrequencyNthDay = restFrequencyNthDay; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanLifecycleStateMachine.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanLifecycleStateMachine.java index e697aa2b2e2..270230c8a56 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanLifecycleStateMachine.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanLifecycleStateMachine.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanOfficerAssignmentHistory.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanOfficerAssignmentHistory.java index ba69ca10767..6fef3ee4151 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanOfficerAssignmentHistory.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanOfficerAssignmentHistory.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.domain.AbstractAuditableCustom; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.organisation.staff.domain.Staff; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanOverAppliedCalculationType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanOverAppliedCalculationType.java index 9508b15f0b3..afc19efddd4 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanOverAppliedCalculationType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanOverAppliedCalculationType.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanOverdueInstallmentCharge.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanOverdueInstallmentCharge.java index 361a49da1c4..2f783a6c7c8 100755 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanOverdueInstallmentCharge.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanOverdueInstallmentCharge.java @@ -6,9 +6,9 @@ * 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 @@ -47,7 +47,7 @@ public LoanOverdueInstallmentCharge() { } public LoanOverdueInstallmentCharge(final LoanCharge loancharge, final LoanRepaymentScheduleInstallment installment, - final Integer frequencyNumber) { + final Integer frequencyNumber) { this.loancharge = loancharge; this.installment = installment; this.frequencyNumber = frequencyNumber; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanPaymentAllocationRule.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanPaymentAllocationRule.java index b4f20b6144d..acec98c3759 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanPaymentAllocationRule.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanPaymentAllocationRule.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.domain; // TODO FINERACT-1932-Fineract modularization: Move to fineract-progressive-loan module after refactor of Loan and LoanTransaction classes + import jakarta.persistence.Column; import jakarta.persistence.Convert; import jakarta.persistence.Entity; @@ -28,7 +29,9 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.util.List; + import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; @@ -44,7 +47,7 @@ @Setter @Entity @Table(name = "m_loan_payment_allocation_rule", uniqueConstraints = { - @UniqueConstraint(columnNames = { "loan_id", "transaction_type" }, name = "uq_m_loan_payment_allocation_rule") }) + @UniqueConstraint(columnNames = {"loan_id", "transaction_type"}, name = "uq_m_loan_payment_allocation_rule")}) @AllArgsConstructor @NoArgsConstructor(access = AccessLevel.PROTECTED) public class LoanPaymentAllocationRule extends AbstractAuditableWithUTCDateTimeCustom { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleInstallment.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleInstallment.java index cc2b6d3ccc8..00a30c89c99 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleInstallment.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleInstallment.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToMany; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.Comparator; @@ -33,6 +34,7 @@ import java.util.List; import java.util.Objects; import java.util.Set; + import lombok.Getter; import lombok.Setter; import org.apache.commons.lang3.StringUtils; @@ -183,18 +185,18 @@ public LoanRepaymentScheduleInstallment() { } public LoanRepaymentScheduleInstallment(final Loan loan, final Integer installmentNumber, final LocalDate fromDate, - final LocalDate dueDate, final BigDecimal principal, final BigDecimal interest, final BigDecimal feeCharges, - final BigDecimal penaltyCharges, final boolean recalculatedInterestComponent, - final Set compoundingDetails, final BigDecimal rescheduleInterestPortion) { + final LocalDate dueDate, final BigDecimal principal, final BigDecimal interest, final BigDecimal feeCharges, + final BigDecimal penaltyCharges, final boolean recalculatedInterestComponent, + final Set compoundingDetails, final BigDecimal rescheduleInterestPortion) { this(loan, installmentNumber, fromDate, dueDate, principal, interest, feeCharges, penaltyCharges, recalculatedInterestComponent, compoundingDetails, rescheduleInterestPortion, false); } public LoanRepaymentScheduleInstallment(final Loan loan, final Integer installmentNumber, final LocalDate fromDate, - final LocalDate dueDate, final BigDecimal principal, final BigDecimal interest, final BigDecimal feeCharges, - final BigDecimal penaltyCharges, final boolean recalculatedInterestComponent, - final Set compoundingDetails, final BigDecimal rescheduleInterestPortion, - final boolean isDownPayment) { + final LocalDate dueDate, final BigDecimal principal, final BigDecimal interest, final BigDecimal feeCharges, + final BigDecimal penaltyCharges, final boolean recalculatedInterestComponent, + final Set compoundingDetails, final BigDecimal rescheduleInterestPortion, + final boolean isDownPayment) { this.loan = loan; this.installmentNumber = installmentNumber; this.fromDate = fromDate; @@ -214,9 +216,9 @@ public LoanRepaymentScheduleInstallment(final Loan loan, final Integer installme } public LoanRepaymentScheduleInstallment(final Loan loan, final Integer installmentNumber, final LocalDate fromDate, - final LocalDate dueDate, final BigDecimal principal, final BigDecimal interest, final BigDecimal feeCharges, - final BigDecimal penaltyCharges, final boolean recalculatedInterestComponent, - final Set compoundingDetails) { + final LocalDate dueDate, final BigDecimal principal, final BigDecimal interest, final BigDecimal feeCharges, + final BigDecimal penaltyCharges, final boolean recalculatedInterestComponent, + final Set compoundingDetails) { this.loan = loan; this.installmentNumber = installmentNumber; this.fromDate = fromDate; @@ -242,9 +244,9 @@ public LoanRepaymentScheduleInstallment(final Loan loan) { } public LoanRepaymentScheduleInstallment(Loan loan, Integer installmentNumber, LocalDate fromDate, LocalDate dueDate, - BigDecimal principal, BigDecimal interestCharged, BigDecimal feeChargesCharged, BigDecimal penaltyCharges, - BigDecimal creditedPrincipal, BigDecimal creditedInterest, BigDecimal creditedFee, BigDecimal creditedPenalty, - boolean additional, boolean isDownPayment, boolean isReAged) { + BigDecimal principal, BigDecimal interestCharged, BigDecimal feeChargesCharged, BigDecimal penaltyCharges, + BigDecimal creditedPrincipal, BigDecimal creditedInterest, BigDecimal creditedFee, BigDecimal creditedPenalty, + boolean additional, boolean isDownPayment, boolean isReAged) { this.loan = loan; this.installmentNumber = installmentNumber; this.fromDate = fromDate; @@ -263,8 +265,8 @@ public LoanRepaymentScheduleInstallment(Loan loan, Integer installmentNumber, Lo } public static LoanRepaymentScheduleInstallment newReAgedInstallment(final Loan loan, final Integer installmentNumber, - final LocalDate fromDate, final LocalDate dueDate, final BigDecimal principal, final BigDecimal interest, final BigDecimal fees, - final BigDecimal penalties, final BigDecimal interestAccrued, final BigDecimal feeAccrued, final BigDecimal penaltyAccrued) { + final LocalDate fromDate, final LocalDate dueDate, final BigDecimal principal, final BigDecimal interest, final BigDecimal fees, + final BigDecimal penalties, final BigDecimal interestAccrued, final BigDecimal feeAccrued, final BigDecimal penaltyAccrued) { LoanRepaymentScheduleInstallment installment = new LoanRepaymentScheduleInstallment(loan, installmentNumber, fromDate, dueDate, principal, interest, fees, penalties, null, null, null, null, false, false, true); installment.setInterestAccrued(interestAccrued); @@ -274,15 +276,15 @@ public static LoanRepaymentScheduleInstallment newReAgedInstallment(final Loan l } public static LoanRepaymentScheduleInstallment newReAgedInstallment(final Loan loan, final Integer installmentNumber, - final LocalDate fromDate, final LocalDate dueDate, final BigDecimal principal, final BigDecimal interest, final BigDecimal fees, - final BigDecimal penalties) { + final LocalDate fromDate, final LocalDate dueDate, final BigDecimal principal, final BigDecimal interest, final BigDecimal fees, + final BigDecimal penalties) { return new LoanRepaymentScheduleInstallment(loan, installmentNumber, fromDate, dueDate, principal, interest, fees, penalties, null, null, null, null, false, false, true); } public static LoanRepaymentScheduleInstallment newInstallmentWithMovedPaidAmountDuringReAging(final Loan loan, - final Integer installmentNumber, final LocalDate fromDate, final LocalDate dueDate, final BigDecimal principal, - final BigDecimal interest) { + final Integer installmentNumber, final LocalDate fromDate, final LocalDate dueDate, final BigDecimal principal, + final BigDecimal interest) { return new LoanRepaymentScheduleInstallment(loan, installmentNumber, fromDate, dueDate, principal, interest, null, null, null, null, null, null, false, false, true); } @@ -784,7 +786,7 @@ public boolean isOverdueOn(final LocalDate date) { } public void updateChargePortion(final Money feeChargesDue, final Money feeChargesWaived, final Money feeChargesWrittenOff, - final Money penaltyChargesDue, final Money penaltyChargesWaived, final Money penaltyChargesWrittenOff) { + final Money penaltyChargesDue, final Money penaltyChargesWaived, final Money penaltyChargesWrittenOff) { setFeeChargesCharged(feeChargesDue.getAmount()); setFeeChargesWaived(feeChargesWaived.getAmount()); setFeeChargesWrittenOff(feeChargesWrittenOff.getAmount()); @@ -794,7 +796,7 @@ public void updateChargePortion(final Money feeChargesDue, final Money feeCharge } public void addToChargePortion(final Money feeChargesDue, final Money feeChargesWaived, final Money feeChargesWrittenOff, - final Money penaltyChargesDue, final Money penaltyChargesWaived, final Money penaltyChargesWrittenOff) { + final Money penaltyChargesDue, final Money penaltyChargesWaived, final Money penaltyChargesWrittenOff) { setFeeChargesCharged(MathUtil.add(feeChargesDue.getAmount(), this.feeChargesCharged)); setFeeChargesWaived(MathUtil.add(feeChargesWaived.getAmount(), this.feeChargesWaived)); setFeeChargesWrittenOff(MathUtil.add(feeChargesWrittenOff.getAmount(), this.feeChargesWrittenOff)); @@ -821,7 +823,7 @@ public void updateObligationsMet(final MonetaryCurrency currency, final LocalDat } private void trackAdvanceAndLateTotalsForRepaymentPeriod(final LocalDate transactionDate, final MonetaryCurrency currency, - final Money amountPaidInRepaymentPeriod) { + final Money amountPaidInRepaymentPeriod) { if (isInAdvance(transactionDate)) { setTotalPaidInAdvance(asMoney(this.totalPaidInAdvance, currency).plus(amountPaidInRepaymentPeriod).getAmount()); } else if (isLatePayment(transactionDate)) { @@ -1066,7 +1068,7 @@ public Money unpayPrincipalComponent(final LocalDate transactionDate, final Mone } private void reduceAdvanceAndLateTotalsForRepaymentPeriod(final LocalDate transactionDate, final MonetaryCurrency currency, - final Money amountDeductedInRepaymentPeriod) { + final Money amountDeductedInRepaymentPeriod) { if (isInAdvance(transactionDate)) { final Money mTotalPaidInAdvance = Money.of(currency, this.totalPaidInAdvance); @@ -1220,7 +1222,7 @@ private void updateLoanCompoundingDetails(Set { nlcd.setLoanRepaymentScheduleInstallment(this); getLoanCompoundingDetails().stream().filter(lcd -> MathUtil.isEqualTo(lcd.getAmount(), nlcd.getAmount()) // - && DateUtils.isEqual(lcd.getEffectiveDate(), nlcd.getEffectiveDate())) // + && DateUtils.isEqual(lcd.getEffectiveDate(), nlcd.getEffectiveDate())) // .findAny().ifPresentOrElse(retainedLoanCompoundingDetails::add, () -> retainedLoanCompoundingDetails.add(nlcd)); }); } @@ -1233,14 +1235,14 @@ private void updateLoaInstallmentCharges(Set installmentC installmentCharges.forEach(nic -> { nic.setInstallment(this); getInstallmentCharges().stream().filter(ic -> MathUtil.isEqualTo(ic.getAmountOutstanding(), nic.getAmountOutstanding()) // - && MathUtil.isEqualTo(ic.getAmountWrittenOff(), nic.getAmountWrittenOff()) // - && MathUtil.isEqualTo(ic.getAmountPaid(), nic.getAmountPaid()) // - && MathUtil.isEqualTo(ic.getAmountThroughChargePayment(), nic.getAmountThroughChargePayment()) // - && MathUtil.isEqualTo(ic.getAmountWaived(), nic.getAmountWaived()) // - && MathUtil.isEqualTo(ic.getAmount(), nic.getAmount()) // - && Boolean.logicalAnd(ic.isPaid(), nic.isPaid()) // - && Boolean.logicalAnd(ic.isWaived(), nic.isWaived()) // - && Boolean.logicalAnd(ic.isPending(), nic.isPending())) // + && MathUtil.isEqualTo(ic.getAmountWrittenOff(), nic.getAmountWrittenOff()) // + && MathUtil.isEqualTo(ic.getAmountPaid(), nic.getAmountPaid()) // + && MathUtil.isEqualTo(ic.getAmountThroughChargePayment(), nic.getAmountThroughChargePayment()) // + && MathUtil.isEqualTo(ic.getAmountWaived(), nic.getAmountWaived()) // + && MathUtil.isEqualTo(ic.getAmount(), nic.getAmount()) // + && Boolean.logicalAnd(ic.isPaid(), nic.isPaid()) // + && Boolean.logicalAnd(ic.isWaived(), nic.isWaived()) // + && Boolean.logicalAnd(ic.isPending(), nic.isPending())) // .findAny().ifPresentOrElse(retainedInstallmentCharges::add, () -> retainedInstallmentCharges.add(nic)); }); } @@ -1253,11 +1255,11 @@ private void updatePostDatedChecks(Set postDatedChecks) { postDatedChecks.forEach(npdc -> { npdc.setLoanRepaymentScheduleInstallment(this); getPostDatedChecks().stream().filter(pdc -> MathUtil.isEqualTo(pdc.getCheckNo(), npdc.getCheckNo()) // - && MathUtil.isEqualTo(pdc.getAccountNo(), npdc.getAccountNo()) // - && MathUtil.isEqualTo(pdc.getAmount(), npdc.getAmount()) // - && StringUtils.equals(pdc.getBankName(), npdc.getBankName()) // - && MathUtil.isEqualTo(pdc.getStatus(), npdc.getStatus()) // - && DateUtils.isEqual(pdc.getRepaymentDate(), npdc.getRepaymentDate())) // + && MathUtil.isEqualTo(pdc.getAccountNo(), npdc.getAccountNo()) // + && MathUtil.isEqualTo(pdc.getAmount(), npdc.getAmount()) // + && StringUtils.equals(pdc.getBankName(), npdc.getBankName()) // + && MathUtil.isEqualTo(pdc.getStatus(), npdc.getStatus()) // + && DateUtils.isEqual(pdc.getRepaymentDate(), npdc.getRepaymentDate())) // .findAny().ifPresentOrElse(retainedPostDatedChecks::add, () -> retainedPostDatedChecks.add(npdc)); }); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleInstallmentRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleInstallmentRepository.java index 325fbb360a7..dce82f3c547 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleInstallmentRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleInstallmentRepository.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.Collection; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.data.LoanScheduleDelinquencyData; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; @@ -44,7 +45,7 @@ public interface LoanRepaymentScheduleInstallmentRepository GROUP BY lrs.loan """) Collection fetchLoanScheduleDataByDueDateAndObligationsMet(@Param("loanStatus") LoanStatus loanStatus, - @Param("businessDate") LocalDate businessDate, @Param("obligationsMet") boolean obligationsMet); + @Param("businessDate") LocalDate businessDate, @Param("obligationsMet") boolean obligationsMet); @Query(""" SELECT new org.apache.fineract.portfolio.loanaccount.data.LoanScheduleDelinquencyData( @@ -61,8 +62,8 @@ Collection fetchLoanScheduleDataByDueDateAndObligat GROUP BY lrs.loan """) Collection fetchLoanScheduleDataByDueDateAndObligationsMet(@Param("loanStatus") LoanStatus loanStatus, - @Param("businessDate") LocalDate businessDate, @Param("obligationsMet") boolean obligationsMet, - @Param("loanIds") List loanIds); + @Param("businessDate") LocalDate businessDate, @Param("obligationsMet") boolean obligationsMet, + @Param("loanIds") List loanIds); @Query(""" SELECT i @@ -73,6 +74,6 @@ Collection fetchLoanScheduleDataByDueDateAndObligat List findByLoanId(@Param("loanId") Long loanId); long countLoanRepaymentScheduleInstallmentsByLoan_IdAndAdditionalAndIsDownPayment(Long loanId, boolean additional, - boolean isDownPayment); + boolean isDownPayment); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleProcessingWrapper.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleProcessingWrapper.java index a3972d84687..43d55d8bd39 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleProcessingWrapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleProcessingWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.Optional; import java.util.Set; import java.util.function.Predicate; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; import org.apache.fineract.organisation.monetary.domain.Money; @@ -36,7 +37,7 @@ public class LoanRepaymentScheduleProcessingWrapper { public void reprocess(final MonetaryCurrency currency, final LocalDate disbursementDate, - final List repaymentPeriods, final Set loanCharges) { + final List repaymentPeriods, final Set loanCharges) { Money totalInterest = Money.zero(currency); Money totalPrincipal = Money.zero(currency); @@ -82,8 +83,8 @@ public void reprocess(final MonetaryCurrency currency, final LocalDate disbursem } private Money cumulativeFeeChargesDueWithin(final LocalDate periodStart, final LocalDate periodEnd, final Set loanCharges, - final MonetaryCurrency monetaryCurrency, LoanRepaymentScheduleInstallment period, final Money totalPrincipal, - final Money totalInterest, boolean isInstallmentChargeApplicable, boolean isFirstPeriod) { + final MonetaryCurrency monetaryCurrency, LoanRepaymentScheduleInstallment period, final Money totalPrincipal, + final Money totalInterest, boolean isInstallmentChargeApplicable, boolean isFirstPeriod) { Money cumulative = Money.zero(monetaryCurrency); for (final LoanCharge loanCharge : loanCharges) { @@ -127,8 +128,8 @@ private Money cumulativeFeeChargesDueWithin(final LocalDate periodStart, final L } private Money cumulativeChargesWaivedWithin(final LocalDate periodStart, final LocalDate periodEnd, final Set loanCharges, - final MonetaryCurrency currency, boolean isInstallmentChargeApplicable, boolean isFirstPeriod, - Predicate predicate) { + final MonetaryCurrency currency, boolean isInstallmentChargeApplicable, boolean isFirstPeriod, + Predicate predicate) { Money cumulative = Money.zero(currency); @@ -150,8 +151,8 @@ private Money cumulativeChargesWaivedWithin(final LocalDate periodStart, final L } private Money cumulativeChargesWrittenOffWithin(final LocalDate periodStart, final LocalDate periodEnd, - final Set loanCharges, final MonetaryCurrency currency, boolean isInstallmentChargeApplicable, - boolean isFirstPeriod, Predicate chargePredicate) { + final Set loanCharges, final MonetaryCurrency currency, boolean isInstallmentChargeApplicable, + boolean isFirstPeriod, Predicate chargePredicate) { Money cumulative = Money.zero(currency); @@ -177,8 +178,8 @@ private Predicate feeCharge() { } private Money cumulativePenaltyChargesDueWithin(final LocalDate periodStart, final LocalDate periodEnd, - final Set loanCharges, final MonetaryCurrency currency, LoanRepaymentScheduleInstallment period, - final Money totalPrincipal, final Money totalInterest, boolean isInstallmentChargeApplicable, boolean isFirstPeriod) { + final Set loanCharges, final MonetaryCurrency currency, LoanRepaymentScheduleInstallment period, + final Money totalPrincipal, final Money totalInterest, boolean isInstallmentChargeApplicable, boolean isFirstPeriod) { Money cumulative = Money.zero(currency); @@ -221,7 +222,7 @@ private BigDecimal getInstallmentFee(MonetaryCurrency currency, LoanRepaymentSch @NonNull private BigDecimal getBaseAmount(MonetaryCurrency monetaryCurrency, LoanRepaymentScheduleInstallment period, LoanCharge loanCharge, - BigDecimal amount) { + BigDecimal amount) { if (loanCharge.getChargeCalculation().isPercentageOfAmountAndInterest()) { amount = amount.add(period.getPrincipal(monetaryCurrency).getAmount()) .add(period.getInterestCharged(monetaryCurrency).getAmount()); @@ -239,7 +240,7 @@ public static int fetchFirstNormalInstallmentNumber(List installments) { + List installments) { int firstPeriod = fetchFirstNormalInstallmentNumber(installments); return isInPeriod(targetDate, targetInstallment, targetInstallment.getInstallmentNumber().equals(firstPeriod)); } @@ -267,7 +268,7 @@ public static boolean isAfterPeriod(LocalDate targetDate, LoanRepaymentScheduleI } public static Optional findInPeriod(LocalDate targetDate, - List installments) { + List installments) { int firstNumber = fetchFirstNormalInstallmentNumber(installments); return installments.stream().filter(e -> isInPeriod(targetDate, e, e.getInstallmentNumber().equals(firstNumber))).findFirst(); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleTransactionProcessorFactory.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleTransactionProcessorFactory.java index 06d7be48326..2eab9c4a0dd 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleTransactionProcessorFactory.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleTransactionProcessorFactory.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Optional; + import lombok.RequiredArgsConstructor; import org.apache.fineract.portfolio.loanaccount.domain.transactionprocessor.LoanRepaymentScheduleTransactionProcessor; import org.apache.fineract.portfolio.loanaccount.exception.LoanTransactionProcessingStrategyNotFoundException; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepository.java index 05c98ee9263..c7f159adeaf 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepository.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.Collection; import java.util.List; import java.util.Optional; + import org.apache.fineract.accounting.common.AccountingRuleType; import org.apache.fineract.cob.data.COBIdAndExternalIdAndAccountNo; import org.apache.fineract.cob.data.COBIdAndLastClosedBusinessDate; @@ -122,7 +123,7 @@ public interface LoanRepository extends JpaRepository, JpaSpecificat @Query(FIND_GROUP_LOANS_DISBURSED_AFTER) List getGroupLoansDisbursedAfter(@Param("disbursementDate") LocalDate disbursementDate, @Param("groupId") Long groupId, - @Param("loanType") AccountType loanType); + @Param("loanType") AccountType loanType); @Query(FIND_CLIENT_OR_JLG_LOANS_DISBURSED_AFTER) List getClientOrJLGLoansDisbursedAfter(@Param("disbursementDate") LocalDate disbursementDate, @Param("clientId") Long clientId); @@ -132,7 +133,7 @@ List getGroupLoansDisbursedAfter(@Param("disbursementDate") LocalDate disb @Query(FIND_MAX_GROUP_LOAN_PRODUCT_COUNTER_QUERY) Integer getMaxGroupLoanProductCounter(@Param("productId") Long productId, @Param("groupId") Long groupId, - @Param("loanType") AccountType loanType); + @Param("loanType") AccountType loanType); @Query(FIND_MAX_CLIENT_OR_JLG_LOAN_COUNTER_QUERY) Integer getMaxClientOrJLGLoanCounter(@Param("clientId") Long clientId); @@ -142,25 +143,25 @@ Integer getMaxGroupLoanProductCounter(@Param("productId") Long productId, @Param @Query(FIND_GROUP_LOANS_TO_UPDATE) List getGroupLoansToUpdateLoanCounter(@Param("loanCounter") Integer loanCounter, @Param("groupId") Long groupId, - @Param("groupLoanType") AccountType groupLoanType); + @Param("groupLoanType") AccountType groupLoanType); @Query(FIND_CLIENT_OR_JLG_LOANS_TO_UPDATE) List getClientOrJLGLoansToUpdateLoanCounter(@Param("loanCounter") Integer loanCounter, @Param("clientId") Long clientId); @Query(FIND_GROUP_LOANS_TO_UPDATE_LOANPRODUCT_COUNTER) List getGroupLoansToUpdateLoanProductCounter(@Param("loanProductCounter") Integer loanProductCounter, - @Param("groupId") Long groupId, @Param("groupLoanType") AccountType groupLoanType); + @Param("groupId") Long groupId, @Param("groupLoanType") AccountType groupLoanType); @Query(FIND_CLIENT_LOANS_TO_UPDATE_LOANPRODUCT_COUNTER) List getClientLoansToUpdateLoanProductCounter(@Param("loanProductCounter") Integer loanProductCounter, - @Param("clientId") Long clientId); + @Param("clientId") Long clientId); @Query("select loan from Loan loan where loan.client.id = :clientId and loan.group.id = :groupId") List findByClientIdAndGroupId(@Param("clientId") Long clientId, @Param("groupId") Long groupId); @Query("select loan from Loan loan where loan.client.id = :clientId and loan.group.id = :groupId and loan.loanStatus IN :loanStatuses") List findByClientIdAndGroupIdAndLoanStatus(@Param("clientId") Long clientId, @Param("groupId") Long groupId, - @Param("loanStatuses") Collection loanStatuses); + @Param("loanStatuses") Collection loanStatuses); @Query("select loan from Loan loan where loan.client.id = :clientId") List findLoanByClientId(@Param("clientId") Long clientId); @@ -173,18 +174,18 @@ List findByClientIdAndGroupIdAndLoanStatus(@Param("clientId") Long clientI @Query("select loan from Loan loan where loan.id IN :ids and loan.loanStatus IN :loanStatuses and loan.loanType IN :loanTypes") List findByIdsAndLoanStatusAndLoanType(@Param("ids") Collection ids, - @Param("loanStatuses") Collection loanStatuses, @Param("loanTypes") Collection loanTypes); + @Param("loanStatuses") Collection loanStatuses, @Param("loanTypes") Collection loanTypes); @Query("select loan.id from Loan loan where loan.actualDisbursementDate > :disbursalDate order by loan.actualDisbursementDate") List getLoansDisbursedAfter(@Param("disbursalDate") LocalDate disbursalDate); @Query("select loan from Loan loan where loan.client.office.id IN :officeIds and loan.loanStatus IN :loanStatuses") List findByClientOfficeIdsAndLoanStatus(@Param("officeIds") Collection officeIds, - @Param("loanStatuses") Collection loanStatuses); + @Param("loanStatuses") Collection loanStatuses); @Query("select loan from Loan loan where loan.group.office.id IN :officeIds and loan.loanStatus IN :loanStatuses") List findByGroupOfficeIdsAndLoanStatus(@Param("officeIds") Collection officeIds, - @Param("loanStatuses") Collection loanStatuses); + @Param("loanStatuses") Collection loanStatuses); /*** FIXME: Add more appropriate names for the query ***/ @Query(FIND_ACTIVE_LOANS_PRODUCT_IDS_BY_CLIENT) @@ -195,19 +196,19 @@ List findByGroupOfficeIdsAndLoanStatus(@Param("officeIds") Collection loanStatuses); + @Param("loanStatuses") Collection loanStatuses); @Query(DOES_PRODUCT_HAVE_LOANS_WITH_STATUSES) boolean doLoanAccountsWithLoansInStatusesExistForProduct(@Param("productId") Long productId, - @Param("loanStatuses") Collection loanStatuses); + @Param("loanStatuses") Collection loanStatuses); @Query(FIND_LOANS_BY_ACCOUNT_NUMBER_AND_STATUSES) Loan findLoanByAccountNumberAndStatuses(@Param("accountNumber") String accountNumber, - @Param("loanStatuses") Collection loanStatuses); + @Param("loanStatuses") Collection loanStatuses); @Query(FIND_LOAN_BY_CLIENT_AND_STATUS) Loan findLoanByClientAndStatus(@Param("loanId") Long loanId, @Param("clientId") Long clientId, - @Param("loanStatus") LoanStatus loanStatus); + @Param("loanStatus") LoanStatus loanStatus); @Query(FIND_BY_ACCOUNT_NUMBER) Loan findLoanAccountByAccountNumber(@Param("accountNumber") String accountNumber); @@ -217,7 +218,7 @@ Loan findLoanByClientAndStatus(@Param("loanId") Long loanId, @Param("clientId") @Query(EXISTS_BY_EXTERNAL_LOAN_ID_AND_STATUSES) boolean existsLoanByExternalLoanIdAndStatuses(@Param("externalLoanId") ExternalId externalLoanId, - @Param("loanStatuses") Collection loanStatuses); + @Param("loanStatuses") Collection loanStatuses); boolean existsByExternalId(@Param("externalId") ExternalId externalId); @@ -232,25 +233,25 @@ boolean existsLoanByExternalLoanIdAndStatuses(@Param("externalLoanId") ExternalI @Query(FIND_ALL_LOANS_BEHIND_BY_LOAN_IDS_AND_STATUSES) List findAllLoansBehindByLoanIdsAndStatuses(@Param("cobBusinessDate") LocalDate cobBusinessDate, - @Param("loanIds") List loanIds, @Param("loanStatuses") Collection loanStatuses); + @Param("loanIds") List loanIds, @Param("loanStatuses") Collection loanStatuses); @Query(FIND_ALL_LOANS_BEHIND_OR_NULL_BY_LOAN_IDS_AND_STATUSES) List findAllLoansBehindOrNullByLoanIdsAndStatuses(@Param("cobBusinessDate") LocalDate cobBusinessDate, - @Param("loanIds") List loanIds, @Param("loanStatuses") Collection loanStatuses); + @Param("loanIds") List loanIds, @Param("loanStatuses") Collection loanStatuses); @Query(FIND_ALL_LOANS_BY_LAST_CLOSED_BUSINESS_DATE_AND_MIN_AND_MAX_LOAN_ID_AND_STATUSES) List findAllLoansByLastClosedBusinessDateAndMinAndMaxLoanIdAndStatuses(@Param("minLoanId") Long minLoanId, - @Param("maxLoanId") Long maxLoanId, @Param("cobBusinessDate") LocalDate cobBusinessDate, - @Param("loanStatuses") Collection loanStatuses); + @Param("maxLoanId") Long maxLoanId, @Param("cobBusinessDate") LocalDate cobBusinessDate, + @Param("loanStatuses") Collection loanStatuses); @Query(FIND_ALL_LOANS_BY_LAST_CLOSED_BUSINESS_DATE_NOT_NULL_AND_MIN_AND_MAX_LOAN_ID_AND_STATUSES) List findAllLoansByLastClosedBusinessDateNotNullAndMinAndMaxLoanIdAndStatuses(@Param("minLoanId") Long minLoanId, - @Param("maxLoanId") Long maxLoanId, @Param("cobBusinessDate") LocalDate cobBusinessDate, - @Param("loanStatuses") Collection loanStatuses); + @Param("maxLoanId") Long maxLoanId, @Param("cobBusinessDate") LocalDate cobBusinessDate, + @Param("loanStatuses") Collection loanStatuses); @Query(FIND_OLDEST_COB_PROCESSED_LOAN) List findOldestCOBProcessedLoan(@Param("cobBusinessDate") LocalDate cobBusinessDate, - @Param("loanStatuses") Collection loanStatuses); + @Param("loanStatuses") Collection loanStatuses); @Query(FIND_ALL_STAYED_LOCKED_BY_COB_BUSINESS_DATE) List findAllStayedLockedByCobBusinessDate(@Param("cobBusinessDate") LocalDate cobBusinessDate); @@ -260,12 +261,12 @@ List findOldestCOBProcessedLoan(@Param("cobBusin @Query(FIND_LOANS_FOR_PERIODIC_ACCRUAL) List findLoansForPeriodicAccrual(@Param("accountingType") AccountingRuleType accountingType, - @Param("tillDate") LocalDate tillDate, @Param("futureCharges") boolean futureCharges, - @Param("loanStatus") LoanStatus loanStatus); + @Param("tillDate") LocalDate tillDate, @Param("futureCharges") boolean futureCharges, + @Param("loanStatus") LoanStatus loanStatus); @Query(FIND_LOANS_FOR_ADD_ACCRUAL) List findLoansForAddAccrual(@Param("accountingType") AccountingRuleType accountingType, @Param("tillDate") LocalDate tillDate, - @Param("futureCharges") boolean futureCharges, @Param("loanStatus") LoanStatus loanStatus); + @Param("futureCharges") boolean futureCharges, @Param("loanStatus") LoanStatus loanStatus); @Query(FIND_LOAN_BY_EXTERNAL_ID) Optional findByExternalId(@Param("externalId") ExternalId externalId); @@ -278,7 +279,7 @@ List findLoansForAddAccrual(@Param("accountingType") AccountingRuleType ac @Query(FIND_ALL_LOANS_BEHIND_ON_DISBURSEMENT_DATE) List findAllLoansBehindOnDisbursementDate(@Param("cobBusinessDate") LocalDate cobBusinessDate, - @Param("loanIds") List loanIds, @Param("loanStatuses") Collection loanStatuses); + @Param("loanIds") List loanIds, @Param("loanStatuses") Collection loanStatuses); @Query("SELECT CASE WHEN COUNT(l) > 0 THEN TRUE ELSE FALSE END FROM Loan l WHERE l.id = :loanId and l.loanRepaymentScheduleDetail.loanScheduleType = org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanScheduleType.PROGRESSIVE") Boolean isProgressiveLoan(@Param("loanId") Long loanId); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepositoryWrapper.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepositoryWrapper.java index 66241087fb6..fb54e3ca2bd 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepositoryWrapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,11 +19,13 @@ package org.apache.fineract.portfolio.loanaccount.domain; import com.google.common.collect.Lists; + import java.time.LocalDate; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.common.AccountingRuleType; import org.apache.fineract.infrastructure.core.config.FineractProperties; @@ -111,13 +113,13 @@ public void delete(final Long loanId) { // Only root entities is enough public List getGroupLoansDisbursedAfter(@Param("disbursementDate") LocalDate disbursementDate, @Param("groupId") Long groupId, - @Param("loanType") AccountType loanType) { + @Param("loanType") AccountType loanType) { return this.repository.getGroupLoansDisbursedAfter(disbursementDate, groupId, loanType); } // Only root entities enough public List getClientOrJLGLoansDisbursedAfter(@Param("disbursementDate") LocalDate disbursementDate, - @Param("clientId") Long clientId) { + @Param("clientId") Long clientId) { return this.repository.getClientOrJLGLoansDisbursedAfter(disbursementDate, clientId); } @@ -126,7 +128,7 @@ public Integer getMaxGroupLoanCounter(@Param("groupId") Long groupId, @Param("lo } public Integer getMaxGroupLoanProductCounter(@Param("productId") Long productId, @Param("groupId") Long groupId, - @Param("loanType") AccountType loanType) { + @Param("loanType") AccountType loanType) { return this.repository.getMaxGroupLoanProductCounter(productId, groupId, loanType); } @@ -149,7 +151,7 @@ public Integer getMaxClientOrJLGLoanProductCounter(@Param("productId") Long prod // Only root entities are enough public List getGroupLoansToUpdateLoanCounter(@Param("loanCounter") Integer loanCounter, @Param("groupId") Long groupId, - @Param("groupLoanType") AccountType groupLoanType) { + @Param("groupLoanType") AccountType groupLoanType) { return this.repository.getGroupLoansToUpdateLoanCounter(loanCounter, groupId, groupLoanType); } @@ -160,13 +162,13 @@ public List getClientOrJLGLoansToUpdateLoanCounter(@Param("loanCounter") I // Only root entities are enough public List getGroupLoansToUpdateLoanProductCounter(@Param("loanProductCounter") Integer loanProductCounter, - @Param("groupId") Long groupId, @Param("groupLoanType") AccountType groupLoanType) { + @Param("groupId") Long groupId, @Param("groupLoanType") AccountType groupLoanType) { return this.repository.getGroupLoansToUpdateLoanProductCounter(loanProductCounter, groupId, groupLoanType); } // Only root entities are enough public List getClientLoansToUpdateLoanProductCounter(@Param("loanProductCounter") Integer loanProductCounter, - @Param("clientId") Long clientId) { + @Param("clientId") Long clientId) { return this.repository.getClientLoansToUpdateLoanProductCounter(loanProductCounter, clientId); } @@ -202,7 +204,7 @@ public List findByGroupId(@Param("groupId") Long groupId) { // Looks like we need complete Data public List findByIdsAndLoanStatusAndLoanType(@Param("ids") Collection ids, - @Param("loanStatuses") Collection loanStatuses, @Param("loanTypes") Collection loanTypes) { + @Param("loanStatuses") Collection loanStatuses, @Param("loanTypes") Collection loanTypes) { List loans = new ArrayList<>(); List> partitions = Lists.partition(ids.stream().toList(), fineractProperties.getQuery().getInClauseParameterSizeLimit()); partitions @@ -222,7 +224,7 @@ public List getLoansDisbursedAfter(@Param("disbursalDate") LocalDate disbu // Repayments Schedule public List findByClientOfficeIdsAndLoanStatus(@Param("officeIds") Collection officeIds, - @Param("loanStatuses") Collection loanStatuses) { + @Param("loanStatuses") Collection loanStatuses) { List loans = this.repository.findByClientOfficeIdsAndLoanStatus(officeIds, loanStatuses); if (loans != null && loans.size() > 0) { for (Loan loan : loans) { @@ -234,7 +236,7 @@ public List findByClientOfficeIdsAndLoanStatus(@Param("officeIds") Collect // Repayments Schedule public List findByGroupOfficeIdsAndLoanStatus(@Param("officeIds") Collection officeIds, - @Param("loanStatuses") Collection loanStatuses) { + @Param("loanStatuses") Collection loanStatuses) { List loans = this.repository.findByGroupOfficeIdsAndLoanStatus(officeIds, loanStatuses); if (loans != null && loans.size() > 0) { for (Loan loan : loans) { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRescheduleRequestToTermVariationMapping.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRescheduleRequestToTermVariationMapping.java index 4e1f570384d..69ca3987c9e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRescheduleRequestToTermVariationMapping.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRescheduleRequestToTermVariationMapping.java @@ -6,9 +6,9 @@ * 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 @@ -43,13 +43,13 @@ protected LoanRescheduleRequestToTermVariationMapping() { } private LoanRescheduleRequestToTermVariationMapping(final LoanRescheduleRequest loanRescheduleRequest, - final LoanTermVariations loanTermVariations) { + final LoanTermVariations loanTermVariations) { this.loanRescheduleRequest = loanRescheduleRequest; this.loanTermVariations = loanTermVariations; } public static LoanRescheduleRequestToTermVariationMapping createNew(final LoanRescheduleRequest loanRescheduleRequest, - final LoanTermVariations loanTermVariation) { + final LoanTermVariations loanTermVariation) { return new LoanRescheduleRequestToTermVariationMapping(loanRescheduleRequest, loanTermVariation); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanStatusChangeHistory.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanStatusChangeHistory.java index d37e609fe94..e48f696a26c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanStatusChangeHistory.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanStatusChangeHistory.java @@ -6,9 +6,9 @@ * 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 @@ -25,7 +25,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.time.LocalDate; + import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanStatusChangeHistoryRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanStatusChangeHistoryRepository.java index 45560d20223..aadad04a557 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanStatusChangeHistoryRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanStatusChangeHistoryRepository.java @@ -6,9 +6,9 @@ * 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 @@ -22,4 +22,5 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor; public interface LoanStatusChangeHistoryRepository - extends JpaRepository, JpaSpecificationExecutor {} + extends JpaRepository, JpaSpecificationExecutor { +} diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanStatusConverter.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanStatusConverter.java index 0d8c0a4c81f..99988b92f9a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanStatusConverter.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanStatusConverter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSubStatus.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSubStatus.java index f48b4220146..9c40d577536 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSubStatus.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSubStatus.java @@ -6,9 +6,9 @@ * 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 @@ -36,10 +36,10 @@ public static LoanSubStatus fromInt(final Integer statusValue) { switch (statusValue) { case 100: enumeration = LoanSubStatus.FORECLOSED; - break; + break; case 900: enumeration = LoanSubStatus.CONTRACT_TERMINATION; - break; + break; } return enumeration; } @@ -80,14 +80,14 @@ public static EnumOptionData loanSubStatusEnum(final LoanSubStatus type) { case FORECLOSED: optionData = new EnumOptionData(LoanSubStatus.FORECLOSED.getValue().longValue(), codePrefix + LoanSubStatus.FORECLOSED.getCode(), "Foreclosed"); - break; + break; case CONTRACT_TERMINATION: optionData = new EnumOptionData(LoanSubStatus.CONTRACT_TERMINATION.getValue().longValue(), codePrefix + LoanSubStatus.CONTRACT_TERMINATION.getCode(), "Contract Termination"); - break; + break; default: optionData = new EnumOptionData(LoanSubStatus.INVALID.getValue().longValue(), LoanSubStatus.INVALID.getCode(), "Invalid"); - break; + break; } return optionData; } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSubStatusConverter.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSubStatusConverter.java index 4ab55ebacdc..9806e569539 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSubStatusConverter.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSubStatusConverter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSummary.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSummary.java index b025ae2b535..3c60586502b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSummary.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSummary.java @@ -6,9 +6,9 @@ * 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 @@ -20,9 +20,11 @@ import jakarta.persistence.Column; import jakarta.persistence.Embeddable; + import java.math.BigDecimal; import java.util.List; import java.util.Set; + import lombok.Getter; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; import org.apache.fineract.organisation.monetary.domain.Money; @@ -188,8 +190,8 @@ public void zeroFields() { } public void updateSummary(final MonetaryCurrency currency, final Money principal, - final List repaymentScheduleInstallments, Set charges, Money capitalizedIncome, - Money capitalizedIncomeAdjustment) { + final List repaymentScheduleInstallments, Set charges, Money capitalizedIncome, + Money capitalizedIncomeAdjustment) { this.totalPrincipalDisbursed = principal.getAmount(); this.totalCapitalizedIncome = capitalizedIncome.getAmount(); this.totalCapitalizedIncomeAdjustment = capitalizedIncomeAdjustment.getAmount(); @@ -337,7 +339,7 @@ public void recalculateDerivedTotalsForAdjustedFeeCharged(final BigDecimal adjus } protected Money calculateTotalPrincipalRepaid(final List repaymentScheduleInstallments, - final MonetaryCurrency currency) { + final MonetaryCurrency currency) { Money total = Money.zero(currency); for (final LoanRepaymentScheduleInstallment installment : repaymentScheduleInstallments) { total = total.plus(installment.getPrincipalCompleted(currency)); @@ -346,7 +348,7 @@ protected Money calculateTotalPrincipalRepaid(final List repaymentScheduleInstallments, - final MonetaryCurrency currency) { + final MonetaryCurrency currency) { Money total = Money.zero(currency); for (final LoanRepaymentScheduleInstallment installment : repaymentScheduleInstallments) { total = total.plus(installment.getCreditedPrincipal(currency)); @@ -355,7 +357,7 @@ protected Money calculateTotalPrincipalAdjusted(final List repaymentScheduleInstallments, - final MonetaryCurrency currency) { + final MonetaryCurrency currency) { Money total = Money.zero(currency); for (final LoanRepaymentScheduleInstallment installment : repaymentScheduleInstallments) { total = total.plus(installment.getCreditedFee(currency)); @@ -364,7 +366,7 @@ protected Money calculateTotalFeeAdjusted(final List repaymentScheduleInstallments, - final MonetaryCurrency currency) { + final MonetaryCurrency currency) { Money total = Money.zero(currency); for (final LoanRepaymentScheduleInstallment installment : repaymentScheduleInstallments) { total = total.plus(installment.getCreditedPenalty(currency)); @@ -373,7 +375,7 @@ protected Money calculateTotalPenaltyAdjusted(final List repaymentScheduleInstallments, - final MonetaryCurrency currency) { + final MonetaryCurrency currency) { Money total = Money.zero(currency); for (final LoanRepaymentScheduleInstallment installment : repaymentScheduleInstallments) { total = total.plus(installment.getPrincipalWrittenOff(currency)); @@ -382,7 +384,7 @@ protected Money calculateTotalPrincipalWrittenOff(final List repaymentScheduleInstallments, - final MonetaryCurrency currency) { + final MonetaryCurrency currency) { Money total = Money.zero(currency); for (final LoanRepaymentScheduleInstallment installment : repaymentScheduleInstallments) { total = total.plus(installment.getInterestCharged(currency)); @@ -391,7 +393,7 @@ protected Money calculateTotalInterestCharged(final List repaymentScheduleInstallments, - final MonetaryCurrency currency) { + final MonetaryCurrency currency) { Money total = Money.zero(currency); for (final LoanRepaymentScheduleInstallment installment : repaymentScheduleInstallments) { total = total.plus(installment.getInterestPaid(currency)); @@ -400,7 +402,7 @@ protected Money calculateTotalInterestRepaid(final List repaymentScheduleInstallments, - final MonetaryCurrency currency) { + final MonetaryCurrency currency) { Money total = Money.zero(currency); for (final LoanRepaymentScheduleInstallment installment : repaymentScheduleInstallments) { total = total.plus(installment.getInterestWaived(currency)); @@ -409,7 +411,7 @@ protected Money calculateTotalInterestWaived(final List repaymentScheduleInstallments, - final MonetaryCurrency currency) { + final MonetaryCurrency currency) { Money total = Money.zero(currency); for (final LoanRepaymentScheduleInstallment installment : repaymentScheduleInstallments) { total = total.plus(installment.getInterestWrittenOff(currency)); @@ -418,7 +420,7 @@ protected Money calculateTotalInterestWrittenOff(final List repaymentScheduleInstallments, - final MonetaryCurrency currency) { + final MonetaryCurrency currency) { Money total = Money.zero(currency); for (final LoanRepaymentScheduleInstallment installment : repaymentScheduleInstallments) { total = total.plus(installment.getFeeChargesCharged(currency)); @@ -427,7 +429,7 @@ protected Money calculateTotalFeeChargesCharged(final List repaymentScheduleInstallments, - final MonetaryCurrency currency) { + final MonetaryCurrency currency) { Money total = Money.zero(currency); for (final LoanRepaymentScheduleInstallment installment : repaymentScheduleInstallments) { total = total.plus(installment.getFeeChargesPaid(currency)); @@ -446,7 +448,7 @@ protected Money calculateTotalFeeChargesWaived(Set charges, final Mo } protected Money calculateTotalFeeChargesWrittenOff(final List repaymentScheduleInstallments, - final MonetaryCurrency currency) { + final MonetaryCurrency currency) { Money total = Money.zero(currency); for (final LoanRepaymentScheduleInstallment installment : repaymentScheduleInstallments) { total = total.plus(installment.getFeeChargesWrittenOff(currency)); @@ -455,7 +457,7 @@ protected Money calculateTotalFeeChargesWrittenOff(final List repaymentScheduleInstallments, - final MonetaryCurrency currency) { + final MonetaryCurrency currency) { Money total = Money.zero(currency); for (final LoanRepaymentScheduleInstallment installment : repaymentScheduleInstallments) { total = total.plus(installment.getPenaltyChargesCharged(currency)); @@ -464,7 +466,7 @@ protected Money calculateTotalPenaltyChargesCharged(final List repaymentScheduleInstallments, - final MonetaryCurrency currency) { + final MonetaryCurrency currency) { Money total = Money.zero(currency); for (final LoanRepaymentScheduleInstallment installment : repaymentScheduleInstallments) { total = total.plus(installment.getPenaltyChargesPaid(currency)); @@ -473,7 +475,7 @@ protected Money calculateTotalPenaltyChargesRepaid(final List repaymentScheduleInstallments, - final MonetaryCurrency currency) { + final MonetaryCurrency currency) { Money total = Money.zero(currency); for (final LoanRepaymentScheduleInstallment installment : repaymentScheduleInstallments) { total = total.plus(installment.getPenaltyChargesWaived(currency)); @@ -482,7 +484,7 @@ protected Money calculateTotalPenaltyChargesWaived(final List repaymentScheduleInstallments, - final MonetaryCurrency currency) { + final MonetaryCurrency currency) { Money total = Money.zero(currency); for (final LoanRepaymentScheduleInstallment installment : repaymentScheduleInstallments) { total = total.plus(installment.getPenaltyChargesWrittenOff(currency)); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSummaryBalancesRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSummaryBalancesRepository.java index 18b4bac5ce4..4216cb4cdf1 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSummaryBalancesRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanSummaryBalancesRepository.java @@ -6,9 +6,9 @@ * 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 @@ -26,12 +26,14 @@ import jakarta.persistence.criteria.Path; import jakarta.persistence.criteria.Predicate; import jakarta.persistence.criteria.Root; + import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.jpa.CriteriaQueryFactory; import org.apache.fineract.portfolio.loanaccount.data.LoanTransactionBalanceWithLoanId; @@ -48,13 +50,13 @@ public class LoanSummaryBalancesRepository { private final CriteriaQueryFactory criteriaQueryFactory; public Collection retrieveLoanSummaryBalancesByTransactionType(final Long loanId, - final List transactionTypes) { + final List transactionTypes) { return retrieveLoanSummaryBalancesByTransactionType(Arrays.asList(loanId), transactionTypes).getOrDefault(loanId, new ArrayList<>()); } public Map> retrieveLoanSummaryBalancesByTransactionType(final List loanIds, - final List transactionTypes) { + final List transactionTypes) { CriteriaBuilder cb = entityManager.getCriteriaBuilder(); CriteriaQuery query = cb.createQuery(LoanTransactionBalanceWithLoanId.class); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTermVariationType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTermVariationType.java index 67fd9bf1fdf..e9dbd59522f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTermVariationType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTermVariationType.java @@ -6,9 +6,9 @@ * 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 @@ -55,37 +55,37 @@ public static LoanTermVariationType fromInt(final Integer value) { switch (value) { case 1: enumeration = LoanTermVariationType.EMI_AMOUNT; - break; + break; case 2: enumeration = LoanTermVariationType.INTEREST_RATE; - break; + break; case 3: enumeration = LoanTermVariationType.PRINCIPAL_AMOUNT; - break; + break; case 4: enumeration = LoanTermVariationType.DUE_DATE; - break; + break; case 5: enumeration = LoanTermVariationType.INSERT_INSTALLMENT; - break; + break; case 6: enumeration = LoanTermVariationType.DELETE_INSTALLMENT; - break; + break; case 7: enumeration = LoanTermVariationType.GRACE_ON_INTEREST; - break; + break; case 8: enumeration = LoanTermVariationType.GRACE_ON_PRINCIPAL; - break; + break; case 9: enumeration = LoanTermVariationType.EXTEND_REPAYMENT_PERIOD; - break; + break; case 10: enumeration = LoanTermVariationType.INTEREST_RATE_FROM_INSTALLMENT; - break; + break; case 11: enumeration = LoanTermVariationType.INTEREST_PAUSE; - break; + break; } return enumeration; } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTermVariations.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTermVariations.java index 906ae257fca..fbbb6a49ec3 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTermVariations.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTermVariations.java @@ -6,9 +6,9 @@ * 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 @@ -25,8 +25,10 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom; import org.apache.fineract.portfolio.loanaccount.data.LoanTermVariationsData; @@ -66,7 +68,7 @@ public class LoanTermVariations extends AbstractAuditableWithUTCDateTimeCustom * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTopupDetails.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTopupDetails.java index 554a3e203bf..a0fdab3d894 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTopupDetails.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTopupDetails.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.OneToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @Entity @@ -43,7 +45,8 @@ public class LoanTopupDetails extends AbstractPersistableCustom { @Column(name = "topup_amount", nullable = true) private BigDecimal topupAmount; - protected LoanTopupDetails() {} + protected LoanTopupDetails() { + } public LoanTopupDetails(final Loan loan, final Long loanIdToClose) { this.loan = loan; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTrancheCharge.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTrancheCharge.java index 5e0fca7ce1a..abdad868b70 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTrancheCharge.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTrancheCharge.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTrancheDisbursementCharge.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTrancheDisbursementCharge.java index e5ab289d3bb..885dcfdf275 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTrancheDisbursementCharge.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTrancheDisbursementCharge.java @@ -6,9 +6,9 @@ * 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 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..10486d2311b 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 @@ -6,9 +6,9 @@ * 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 @@ -29,6 +29,7 @@ import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; import jakarta.persistence.Version; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; @@ -37,6 +38,7 @@ import java.util.List; import java.util.Set; import java.util.function.Predicate; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.infrastructure.codes.domain.CodeValue; @@ -58,7 +60,7 @@ */ @Getter @Entity -@Table(name = "m_loan_transaction", uniqueConstraints = { @UniqueConstraint(columnNames = { "external_id" }, name = "external_id_UNIQUE") }) +@Table(name = "m_loan_transaction", uniqueConstraints = {@UniqueConstraint(columnNames = {"external_id"}, name = "external_id_UNIQUE")}) public class LoanTransaction extends AbstractAuditableWithUTCDateTimeCustom { @Version @@ -155,11 +157,12 @@ public class LoanTransaction extends AbstractAuditableWithUTCDateTimeCustom new LoanTransaction(loan, office, LoanTransactionType.CAPITALIZED_INCOME_AMORTIZATION, dateOf, amount, null, null, - amount, null, null, false, null, externalId); - case INTEREST -> new LoanTransaction(loan, office, LoanTransactionType.CAPITALIZED_INCOME_AMORTIZATION, dateOf, amount, null, - amount, null, null, null, false, null, externalId); + case FEE -> + new LoanTransaction(loan, office, LoanTransactionType.CAPITALIZED_INCOME_AMORTIZATION, dateOf, amount, null, null, + amount, null, null, false, null, externalId); + case INTEREST -> + new LoanTransaction(loan, office, LoanTransactionType.CAPITALIZED_INCOME_AMORTIZATION, dateOf, amount, null, + amount, null, null, null, false, null, externalId); }; } public static LoanTransaction capitalizedIncomeAdjustment(final Loan loan, final Money amount, final PaymentDetail paymentDetail, - final LocalDate transactionDate, final ExternalId externalId) { + final LocalDate transactionDate, final ExternalId externalId) { return new LoanTransaction(loan, loan.getOffice(), LoanTransactionType.CAPITALIZED_INCOME_ADJUSTMENT, transactionDate, amount.getAmount(), amount.getAmount(), null, null, null, null, false, paymentDetail, externalId); } public static LoanTransaction buyDownFeeAdjustment(final Loan loan, final Money amount, final PaymentDetail paymentDetail, - final LocalDate transactionDate, final ExternalId externalId) { + final LocalDate transactionDate, final ExternalId externalId) { return new LoanTransaction(loan, loan.getOffice(), LoanTransactionType.BUY_DOWN_FEE_ADJUSTMENT, transactionDate, amount.getAmount(), null, null, null, null, null, false, paymentDetail, externalId); } public static LoanTransaction capitalizedIncomeAmortizationAdjustment(final Loan loan, final Money amount, - final LocalDate transactionDate, final ExternalId externalId) { + final LocalDate transactionDate, final ExternalId externalId) { return switch (loan.getLoanProductRelatedDetail().getCapitalizedIncomeType()) { - case FEE -> new LoanTransaction(loan, loan.getOffice(), LoanTransactionType.CAPITALIZED_INCOME_AMORTIZATION_ADJUSTMENT, - transactionDate, amount.getAmount(), null, null, amount.getAmount(), null, null, false, null, externalId); - case INTEREST -> new LoanTransaction(loan, loan.getOffice(), LoanTransactionType.CAPITALIZED_INCOME_AMORTIZATION_ADJUSTMENT, - transactionDate, amount.getAmount(), null, amount.getAmount(), null, null, null, false, null, externalId); + case FEE -> + new LoanTransaction(loan, loan.getOffice(), LoanTransactionType.CAPITALIZED_INCOME_AMORTIZATION_ADJUSTMENT, + transactionDate, amount.getAmount(), null, null, amount.getAmount(), null, null, false, null, externalId); + case INTEREST -> + new LoanTransaction(loan, loan.getOffice(), LoanTransactionType.CAPITALIZED_INCOME_AMORTIZATION_ADJUSTMENT, + transactionDate, amount.getAmount(), null, amount.getAmount(), null, null, null, false, null, externalId); }; } public static LoanTransaction buyDownFeeAmortization(final Loan loan, final Office office, final LocalDate dateOf, - final BigDecimal amount, final ExternalId externalId) { + final BigDecimal amount, final ExternalId externalId) { return switch (loan.getLoanProductRelatedDetail().getBuyDownFeeIncomeType()) { - case FEE -> new LoanTransaction(loan, office, LoanTransactionType.BUY_DOWN_FEE_AMORTIZATION, dateOf, amount, null, null, amount, - null, null, false, null, externalId); - case INTEREST -> new LoanTransaction(loan, office, LoanTransactionType.BUY_DOWN_FEE_AMORTIZATION, dateOf, amount, null, amount, - null, null, null, false, null, externalId); + case FEE -> + new LoanTransaction(loan, office, LoanTransactionType.BUY_DOWN_FEE_AMORTIZATION, dateOf, amount, null, null, amount, + null, null, false, null, externalId); + case INTEREST -> + new LoanTransaction(loan, office, LoanTransactionType.BUY_DOWN_FEE_AMORTIZATION, dateOf, amount, null, amount, + null, null, null, false, null, externalId); }; } public static LoanTransaction buyDownFeeAmortizationAdjustment(final Loan loan, final Money amount, final LocalDate transactionDate, - final ExternalId externalId) { + final ExternalId externalId) { return switch (loan.getLoanProductRelatedDetail().getBuyDownFeeIncomeType()) { - case FEE -> new LoanTransaction(loan, loan.getOffice(), LoanTransactionType.BUY_DOWN_FEE_AMORTIZATION_ADJUSTMENT, - transactionDate, amount.getAmount(), null, null, amount.getAmount(), null, null, false, null, externalId); - case INTEREST -> new LoanTransaction(loan, loan.getOffice(), LoanTransactionType.BUY_DOWN_FEE_AMORTIZATION_ADJUSTMENT, - transactionDate, amount.getAmount(), null, amount.getAmount(), null, null, null, false, null, externalId); + case FEE -> + new LoanTransaction(loan, loan.getOffice(), LoanTransactionType.BUY_DOWN_FEE_AMORTIZATION_ADJUSTMENT, + transactionDate, amount.getAmount(), null, null, amount.getAmount(), null, null, false, null, externalId); + case INTEREST -> + new LoanTransaction(loan, loan.getOffice(), LoanTransactionType.BUY_DOWN_FEE_AMORTIZATION_ADJUSTMENT, + transactionDate, amount.getAmount(), null, amount.getAmount(), null, null, null, false, null, externalId); }; } @@ -396,26 +407,26 @@ public LoanTransaction copyTransactionPropertiesAndMappings() { } public static LoanTransaction creditBalanceRefund(final Loan loan, final Office office, final Money amount, final LocalDate paymentDate, - final ExternalId externalId, PaymentDetail paymentDetail) { + final ExternalId externalId, PaymentDetail paymentDetail) { return new LoanTransaction(loan, office, LoanTransactionType.CREDIT_BALANCE_REFUND, paymentDate, amount.getAmount(), null, null, null, null, amount.getAmount(), false, paymentDetail, externalId); } public static LoanTransaction refundForActiveLoan(final Office office, final Money amount, final PaymentDetail paymentDetail, - final LocalDate paymentDate, final ExternalId externalId) { + final LocalDate paymentDate, final ExternalId externalId) { return new LoanTransaction(null, office, LoanTransactionType.REFUND_FOR_ACTIVE_LOAN, paymentDetail, amount.getAmount(), paymentDate, externalId); } public static LoanTransaction interestRefund(final Loan loan, final Office office, final BigDecimal amount, final BigDecimal principal, - final BigDecimal interest, final BigDecimal feeCharges, final BigDecimal penaltyCharges, final PaymentDetail paymentDetail, - final LocalDate refundDate, final ExternalId externalId) { + final BigDecimal interest, final BigDecimal feeCharges, final BigDecimal penaltyCharges, final PaymentDetail paymentDetail, + final LocalDate refundDate, final ExternalId externalId) { return new LoanTransaction(loan, office, LoanTransactionType.INTEREST_REFUND, refundDate, amount, principal, interest, feeCharges, penaltyCharges, amount, false, paymentDetail, externalId); } public static boolean transactionAmountsMatch(final MonetaryCurrency currency, final LoanTransaction loanTransaction, - final LoanTransaction newLoanTransaction) { + final LoanTransaction newLoanTransaction) { return loanTransaction.getAmount(currency).isEqualTo(newLoanTransaction.getAmount(currency)) && loanTransaction.getPrincipalPortion(currency).isEqualTo(newLoanTransaction.getPrincipalPortion(currency)) && loanTransaction.getInterestPortion(currency).isEqualTo(newLoanTransaction.getInterestPortion(currency)) @@ -425,9 +436,9 @@ public static boolean transactionAmountsMatch(final MonetaryCurrency currency, f } public LoanTransaction(final Loan loan, final Office office, final LoanTransactionType typeOf, final LocalDate dateOf, - final BigDecimal amount, final BigDecimal principalPortion, final BigDecimal interestPortion, - final BigDecimal feeChargesPortion, final BigDecimal penaltyChargesPortion, final BigDecimal overPaymentPortion, - final boolean reversed, final PaymentDetail paymentDetail, final ExternalId externalId) { + final BigDecimal amount, final BigDecimal principalPortion, final BigDecimal interestPortion, + final BigDecimal feeChargesPortion, final BigDecimal penaltyChargesPortion, final BigDecimal overPaymentPortion, + final boolean reversed, final PaymentDetail paymentDetail, final ExternalId externalId) { this.loan = loan; this.typeOf = typeOf; @@ -446,7 +457,7 @@ public LoanTransaction(final Loan loan, final Office office, final LoanTransacti } public static LoanTransaction waiveLoanCharge(final Loan loan, final Office office, final Money waived, final LocalDate waiveDate, - final Money feeChargesWaived, final Money penaltyChargesWaived, final Money unrecognizedCharge, final ExternalId externalId) { + final Money feeChargesWaived, final Money penaltyChargesWaived, final Money unrecognizedCharge, final ExternalId externalId) { final LoanTransaction waiver = new LoanTransaction(loan, office, LoanTransactionType.WAIVE_CHARGES, waived.getAmount(), waiveDate, externalId); waiver.updateChargesComponents(feeChargesWaived, penaltyChargesWaived, unrecognizedCharge); @@ -455,7 +466,7 @@ public static LoanTransaction waiveLoanCharge(final Loan loan, final Office offi } public static LoanTransaction writeoff(final Loan loan, final Office office, final LocalDate writeOffDate, - final ExternalId externalId) { + final ExternalId externalId) { return new LoanTransaction(loan, office, LoanTransactionType.WRITEOFF, null, writeOffDate, externalId); } @@ -468,7 +479,7 @@ public static LoanTransaction contractTermination(final Loan loan, final LocalDa } private static LoanTransaction createTerminalTransaction(final Loan loan, final LocalDate transactionDate, - final LoanTransactionType transactionType, final ExternalId externalId) { + final LoanTransactionType transactionType, final ExternalId externalId) { BigDecimal principalPortion = loan.getSummary().getTotalPrincipalOutstanding().compareTo(BigDecimal.ZERO) != 0 ? loan.getSummary().getTotalPrincipalOutstanding() : null; @@ -488,7 +499,7 @@ private static LoanTransaction createTerminalTransaction(final Loan loan, final } private LoanTransaction(final Loan loan, final Office office, final LoanTransactionType type, final BigDecimal amount, - final LocalDate date, final ExternalId externalId) { + final LocalDate date, final ExternalId externalId) { this.loan = loan; this.typeOf = type; this.amount = amount; @@ -499,7 +510,7 @@ private LoanTransaction(final Loan loan, final Office office, final LoanTransact } private LoanTransaction(final Loan loan, final Office office, final LoanTransactionType type, final PaymentDetail paymentDetail, - final BigDecimal amount, final LocalDate date, final ExternalId externalId) { + final BigDecimal amount, final LocalDate date, final ExternalId externalId) { this.loan = loan; this.typeOf = type; this.paymentDetail = paymentDetail; @@ -511,7 +522,7 @@ private LoanTransaction(final Loan loan, final Office office, final LoanTransact } private LoanTransaction(final Loan loan, final Office office, final LoanTransactionType type, final PaymentDetail paymentDetail, - final BigDecimal amount, final LocalDate date, final ExternalId externalId, final String chargeRefundChargeType) { + final BigDecimal amount, final LocalDate date, final ExternalId externalId, final String chargeRefundChargeType) { this.loan = loan; this.typeOf = type; this.paymentDetail = paymentDetail; @@ -891,7 +902,7 @@ public void addLoanTransactionToRepaymentScheduleMappings(final Collection retainMappings, - final LoanTransactionToRepaymentScheduleMapping updatedMapping, boolean overwrite) { + final LoanTransactionToRepaymentScheduleMapping updatedMapping, boolean overwrite) { boolean isMappingUpdated = false; LoanRepaymentScheduleInstallment updatedInstallment = updatedMapping.getLoanRepaymentScheduleInstallment(); for (LoanTransactionToRepaymentScheduleMapping existingMapping : this.loanTransactionToRepaymentScheduleMappings) { @@ -1022,7 +1033,7 @@ public void updateTransactionDate(final LocalDate transactionDate) { } public static LoanTransaction buyDownFee(final Loan loan, final Money amount, final PaymentDetail paymentDetail, - final LocalDate transactionDate, final ExternalId externalId) { + final LocalDate transactionDate, final ExternalId externalId) { return new LoanTransaction(loan, loan.getOffice(), LoanTransactionType.BUY_DOWN_FEE, paymentDetail, amount.getAmount(), transactionDate, externalId); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionComparator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionComparator.java index a16a1f685ce..1298eaed590 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionComparator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionComparator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.domain; import java.util.Comparator; + import org.apache.fineract.infrastructure.core.service.DateUtils; /** diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRelation.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRelation.java index 7e6de72480f..110312434a6 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRelation.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRelation.java @@ -6,9 +6,9 @@ * 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 @@ -52,10 +52,11 @@ public class LoanTransactionRelation extends AbstractAuditableWithUTCDateTimeCus @Column(name = "relation_type_enum", nullable = false) private LoanTransactionRelationTypeEnum relationType; - protected LoanTransactionRelation() {} + protected LoanTransactionRelation() { + } protected LoanTransactionRelation(@NotNull LoanTransaction fromTransaction, LoanTransaction toTransaction, LoanCharge toCharge, - LoanTransactionRelationTypeEnum relationType) { + LoanTransactionRelationTypeEnum relationType) { this.fromTransaction = fromTransaction; this.toTransaction = toTransaction; this.toCharge = toCharge; @@ -63,14 +64,14 @@ protected LoanTransactionRelation(@NotNull LoanTransaction fromTransaction, Loan } public static LoanTransactionRelation linkToTransaction(@NotNull LoanTransaction fromTransaction, - @NotNull LoanTransaction toTransaction, LoanTransactionRelationTypeEnum relation) { + @NotNull LoanTransaction toTransaction, LoanTransactionRelationTypeEnum relation) { LoanTransactionRelation loanTransactionRelation = new LoanTransactionRelation(fromTransaction, toTransaction, null, relation); fromTransaction.getLoanTransactionRelations().add(loanTransactionRelation); return loanTransactionRelation; } public static LoanTransactionRelation linkToCharge(@NotNull LoanTransaction fromTransaction, @NotNull LoanCharge loanCharge, - LoanTransactionRelationTypeEnum relation) { + LoanTransactionRelationTypeEnum relation) { return new LoanTransactionRelation(fromTransaction, null, loanCharge, relation); } } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRelationRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRelationRepository.java index 5d5e09955f3..2c0e3192452 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRelationRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRelationRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRelationTypeEnum.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRelationTypeEnum.java index 85eae4b28cb..24631284165 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRelationTypeEnum.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRelationTypeEnum.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRepaymentPeriodData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRepaymentPeriodData.java index f5c734841da..eb50634e138 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRepaymentPeriodData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRepaymentPeriodData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDate; + import lombok.EqualsAndHashCode; import lombok.Getter; import org.apache.fineract.portfolio.loanaccount.data.LoanPrincipalRelatedDataHolder; @@ -41,7 +42,7 @@ public class LoanTransactionRepaymentPeriodData implements LoanPrincipalRelatedD private final BigDecimal feeChargesPortion; public LoanTransactionRepaymentPeriodData(Long transactionId, Long loanId, LocalDate date, boolean reversed, BigDecimal amount, - BigDecimal unrecognizedAmount, BigDecimal feeChargesPortion) { + BigDecimal unrecognizedAmount, BigDecimal feeChargesPortion) { this.transactionId = transactionId; this.loanId = loanId; this.date = date; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRepository.java index 4862798bf79..53f7f12c201 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionRepository.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.List; import java.util.Optional; import java.util.Set; + import org.apache.fineract.infrastructure.codes.domain.CodeValue; import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.apache.fineract.portfolio.loanaccount.data.CumulativeIncomeFromIncomePosting; @@ -104,7 +105,7 @@ SELECT COALESCE(SUM(lt.interestPortion), 0) AND lt.dateOf <= :dueDate """) BigDecimal findAccrualInterestInPeriod(@Param("loan") Loan loan, @Param("fromDate") LocalDate fromDate, - @Param("dueDate") LocalDate dueDate); + @Param("dueDate") LocalDate dueDate); @Query(""" SELECT CASE WHEN COUNT(lt) > 0 THEN false ELSE true END @@ -166,7 +167,7 @@ AND lt.typeOf NOT IN ( ORDER BY lt.dateOf """) List findTransactionDataForForeclosureIncome(@Param("loan") Loan loan, - @Param("tillDate") LocalDate tillDate); + @Param("tillDate") LocalDate tillDate); @Query(""" SELECT lt @@ -177,7 +178,7 @@ List findTransactionDataForForeclosureIncome( AND lt.dateOf = :transactionDate """) Optional findNonReversedByLoanAndTypesAndDate(@Param("loan") Loan loan, @Param("types") Set types, - @Param("transactionDate") LocalDate transactionDate); + @Param("transactionDate") LocalDate transactionDate); @Query(""" SELECT lt @@ -189,7 +190,7 @@ Optional findNonReversedByLoanAndTypesAndDate(@Param("loan") Lo ORDER BY lt.dateOf, lt.createdDate, lt.id """) List findNonReversedByLoanAndTypesAndAfterDate(@Param("loan") Loan loan, - @Param("types") Set types, @Param("transactionDate") LocalDate transactionDate); + @Param("types") Set types, @Param("transactionDate") LocalDate transactionDate); @Query(""" SELECT lt @@ -201,7 +202,7 @@ List findNonReversedByLoanAndTypesAndAfterDate(@Param("loan") L ORDER BY lt.dateOf, lt.createdDate, lt.id """) List findNonReversedByLoanAndTypeAndAfterDate(@Param("loan") Loan loan, @Param("type") LoanTransactionType type, - @Param("transactionDate") LocalDate transactionDate); + @Param("transactionDate") LocalDate transactionDate); @Query(""" SELECT CASE WHEN COUNT(lt) > 0 THEN true ELSE false END @@ -212,7 +213,7 @@ SELECT CASE WHEN COUNT(lt) > 0 THEN true ELSE false END AND lt.dateOf >= :accrualDate """) boolean existsNonReversedByLoanAndTypesAndOnOrAfterDate(@Param("loan") Loan loan, @Param("types") Set types, - @Param("accrualDate") LocalDate accrualDate); + @Param("accrualDate") LocalDate accrualDate); @Query(""" SELECT lt @@ -224,7 +225,7 @@ boolean existsNonReversedByLoanAndTypesAndOnOrAfterDate(@Param("loan") Loan loan ORDER BY lt.dateOf, lt.createdDate, lt.id """) List findNonReversedByLoanAndTypesAndNotInIds(@Param("loan") Loan loan, @Param("types") Set types, - @Param("existingTransactionIds") List existingTransactionIds); + @Param("existingTransactionIds") List existingTransactionIds); @Query(""" SELECT lt @@ -256,7 +257,7 @@ List findNonReversedByLoanAndTypesAndNotInIds(@Param("loan") Lo ORDER BY lt.dateOf, lt.createdDate, lt.id """) List findNonReversedByLoanAndTypesAndOnOrAfterDate(@Param("loan") Loan loan, - @Param("types") Set types, @Param("date") LocalDate date); + @Param("types") Set types, @Param("date") LocalDate date); @Query(""" SELECT new org.apache.fineract.portfolio.loanaccount.data.CumulativeIncomeFromIncomePosting( @@ -293,7 +294,7 @@ SELECT COALESCE(SUM(CASE WHEN lt.typeOf = org.apache.fineract.portfolio.loanacco AND lt.reversed = false """) BigDecimal findChargeAccrualAmountByInstallment(@Param("loanCharge") LoanCharge loanCharge, - @Param("installmentNumber") Integer installmentNumber); + @Param("installmentNumber") Integer installmentNumber); @Query(""" SELECT COALESCE(SUM(lt.unrecognizedIncomePortion), 0) @@ -313,7 +314,7 @@ SELECT MAX(lt.dateOf) FROM LoanTransaction lt AND lt.typeOf IN :types """) Optional findLastNonReversedTransactionDateByLoanAndTypes(@Param("loan") Loan loan, - @Param("types") Set types); + @Param("types") Set types); @Query(""" SELECT lt FROM LoanTransaction lt @@ -324,7 +325,7 @@ Optional findLastNonReversedTransactionDateByLoanAndTypes(@Param("loa ORDER BY lt.dateOf, lt.createdDate, lt.id """) List findNonReversedLoanAndTypeAndDates(@Param("loan") Loan loan, @Param("type") LoanTransactionType type, - @Param("transactionDates") Set transactionDates); + @Param("transactionDates") Set transactionDates); @Query(""" SELECT lt FROM LoanTransaction lt @@ -335,7 +336,7 @@ List findNonReversedLoanAndTypeAndDates(@Param("loan") Loan loa ORDER BY lt.dateOf, lt.createdDate, lt.id """) List findNonReversedLoanAndTypeAndDate(@Param("loan") Loan loan, @Param("type") LoanTransactionType type, - @Param("transactionDate") LocalDate transactionDate); + @Param("transactionDate") LocalDate transactionDate); @Query(""" SELECT lt FROM LoanTransaction lt @@ -345,7 +346,7 @@ List findNonReversedLoanAndTypeAndDate(@Param("loan") Loan loan ORDER BY lt.dateOf DESC """) List findNonReversedByLoanAndType(@Param("loan") Loan loan, @Param("type") LoanTransactionType type, - Pageable pageable); + Pageable pageable); @Query(""" SELECT COALESCE(SUM(CASE WHEN lt.typeOf = org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionType.CAPITALIZED_INCOME_AMORTIZATION THEN lt.amount @@ -427,7 +428,7 @@ SELECT CASE WHEN COUNT(lt) > 0 THEN true ELSE false END AND lt.dateOf > :transactionDate """) boolean existsNonReversedByLoanAndTypeAndAfterDate(@Param("loan") Loan loan, @Param("type") LoanTransactionType type, - @Param("transactionDate") LocalDate transactionDate); + @Param("transactionDate") LocalDate transactionDate); @Query(""" SELECT lt FROM LoanTransaction lt @@ -472,7 +473,7 @@ SELECT CASE WHEN COUNT(lt) > 0 THEN true ELSE false END AND lt.dateOf = :transactionDate """) boolean existsNonReversedByLoanAndTypeAndDate(@Param("loan") Loan loan, @Param("type") LoanTransactionType type, - @Param("transactionDate") LocalDate transactionDate); + @Param("transactionDate") LocalDate transactionDate); @Query(""" SELECT lt.classification diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionToRepaymentScheduleMapping.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionToRepaymentScheduleMapping.java index 13680708b03..ea920d97c91 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionToRepaymentScheduleMapping.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionToRepaymentScheduleMapping.java @@ -6,9 +6,9 @@ * 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 @@ -24,7 +24,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @@ -67,8 +69,8 @@ protected LoanTransactionToRepaymentScheduleMapping() { } private LoanTransactionToRepaymentScheduleMapping(final LoanTransaction loanTransaction, - final LoanRepaymentScheduleInstallment installment, final BigDecimal principalPortion, final BigDecimal interestPortion, - final BigDecimal feeChargesPortion, final BigDecimal penaltyChargesPortion, final BigDecimal amount) { + final LoanRepaymentScheduleInstallment installment, final BigDecimal principalPortion, final BigDecimal interestPortion, + final BigDecimal feeChargesPortion, final BigDecimal penaltyChargesPortion, final BigDecimal amount) { this.loanTransaction = loanTransaction; this.installment = installment; this.principalPortion = principalPortion; @@ -79,8 +81,8 @@ private LoanTransactionToRepaymentScheduleMapping(final LoanTransaction loanTran } public static LoanTransactionToRepaymentScheduleMapping createFrom(final LoanTransaction loanTransaction, - final LoanRepaymentScheduleInstallment installment, final Money principalPortion, final Money interestPortion, - final Money feeChargesPortion, final Money penaltyChargesPortion) { + final LoanRepaymentScheduleInstallment installment, final Money principalPortion, final Money interestPortion, + final Money feeChargesPortion, final Money penaltyChargesPortion) { return new LoanTransactionToRepaymentScheduleMapping(loanTransaction, installment, defaultToNullIfZero(principalPortion), defaultToNullIfZero(interestPortion), defaultToNullIfZero(feeChargesPortion), defaultToNullIfZero(penaltyChargesPortion), defaultToNullIfZero(MathUtil.plus(principalPortion, interestPortion, feeChargesPortion, penaltyChargesPortion))); @@ -100,7 +102,7 @@ public void updateComponents(Money principal, Money interest, Money feeCharges, } void updateComponents(final BigDecimal principal, final BigDecimal interest, final BigDecimal feeCharges, - final BigDecimal penaltyCharges) { + final BigDecimal penaltyCharges) { this.principalPortion = MathUtil.zeroToNull(MathUtil.add(getPrincipalPortion(), principal)); this.interestPortion = MathUtil.zeroToNull(MathUtil.add(getInterestPortion(), interest)); updateChargesComponents(feeCharges, penaltyCharges); @@ -112,7 +114,7 @@ private void updateAmount() { } public void setComponents(final BigDecimal principal, final BigDecimal interest, final BigDecimal feeCharges, - final BigDecimal penaltyCharges) { + final BigDecimal penaltyCharges) { this.principalPortion = principal; this.interestPortion = interest; this.feeChargesPortion = feeCharges; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionToRepaymentScheduleMappingRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionToRepaymentScheduleMappingRepository.java index 7dfe8e99024..aa7386374c0 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionToRepaymentScheduleMappingRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionToRepaymentScheduleMappingRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionType.java index d1a6ede9f15..73e76002074 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionTypeConverter.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionTypeConverter.java index f15d27c540a..4f13dc981df 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionTypeConverter.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanTransactionTypeConverter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/SingleLoanChargeRepaymentScheduleProcessingWrapper.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/SingleLoanChargeRepaymentScheduleProcessingWrapper.java index bd2522435a0..1aa9cd63233 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/SingleLoanChargeRepaymentScheduleProcessingWrapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/SingleLoanChargeRepaymentScheduleProcessingWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.portfolio.loanaccount.domain; import jakarta.validation.constraints.NotNull; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; import java.util.function.Predicate; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.core.service.MathUtil; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; @@ -36,7 +38,7 @@ public class SingleLoanChargeRepaymentScheduleProcessingWrapper { public void reprocess(final MonetaryCurrency currency, final LocalDate disbursementDate, - final List installments, LoanCharge loanCharge) { + final List installments, LoanCharge loanCharge) { Money zero = Money.zero(currency); Money totalInterest = zero; Money totalPrincipal = zero; @@ -102,8 +104,8 @@ public void reprocess(final MonetaryCurrency currency, final LocalDate disbursem @NotNull private Money calcChargeDue(final LocalDate periodStart, final LocalDate periodEnd, final LoanCharge loanCharge, - final MonetaryCurrency currency, LoanRepaymentScheduleInstallment period, final Money totalPrincipal, final Money totalInterest, - boolean isInstallmentChargeApplicable, boolean isFirstPeriod, Predicate predicate) { + final MonetaryCurrency currency, LoanRepaymentScheduleInstallment period, final Money totalPrincipal, final Money totalInterest, + boolean isInstallmentChargeApplicable, boolean isFirstPeriod, Predicate predicate) { Money zero = Money.zero(currency); if (!predicate.test(loanCharge)) { return zero; @@ -142,8 +144,8 @@ private Money calcChargeDue(final LocalDate periodStart, final LocalDate periodE } private Money calcChargeWaived(final LocalDate periodStart, final LocalDate periodEnd, final LoanCharge loanCharge, - final MonetaryCurrency currency, boolean isInstallmentChargeApplicable, boolean isFirstPeriod, - Predicate predicate) { + final MonetaryCurrency currency, boolean isInstallmentChargeApplicable, boolean isFirstPeriod, + Predicate predicate) { Money zero = Money.zero(currency); if (!predicate.test(loanCharge)) { return zero; @@ -159,8 +161,8 @@ private Money calcChargeWaived(final LocalDate periodStart, final LocalDate peri } private Money calcChargeWrittenOff(final LocalDate periodStart, final LocalDate periodEnd, final LoanCharge loanCharge, - final MonetaryCurrency currency, boolean isInstallmentChargeApplicable, boolean isFirstPeriod, - Predicate predicate) { + final MonetaryCurrency currency, boolean isInstallmentChargeApplicable, boolean isFirstPeriod, + Predicate predicate) { Money zero = Money.zero(currency); if (!predicate.test(loanCharge)) { return zero; @@ -185,7 +187,7 @@ private BigDecimal getInstallmentFee(MonetaryCurrency currency, LoanRepaymentSch @NotNull private BigDecimal getBaseAmount(MonetaryCurrency currency, LoanRepaymentScheduleInstallment period, LoanCharge loanCharge, - BigDecimal amount) { + BigDecimal amount) { BigDecimal baseAmount = getBaseAmount(loanCharge, period.getPrincipal(currency).getAmount(), period.getInterestCharged(currency).getAmount()); return MathUtil.add(amount, baseAmount); @@ -207,7 +209,7 @@ private BigDecimal getBaseAmount(LoanCharge loanCharge, BigDecimal principal, Bi * @return newly added period if there is any */ public LoanRepaymentScheduleInstallment addChargeOnlyRepaymentInstallmentIfRequired(@NotNull LoanCharge loanCharge, - List installments) { + List installments) { if (installments == null) { return null; } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/TransactionProccessingResult.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/TransactionProccessingResult.java index a6a16d4e454..342d5a9cd08 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/TransactionProccessingResult.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/TransactionProccessingResult.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/arrears/LoanArrearsData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/arrears/LoanArrearsData.java index 8791742047a..55dff214e06 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/arrears/LoanArrearsData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/arrears/LoanArrearsData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Data; @Data diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/reaging/LoanReAgeInterestHandlingType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/reaging/LoanReAgeInterestHandlingType.java index f61ba080a08..9dfe1be3566 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/reaging/LoanReAgeInterestHandlingType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/reaging/LoanReAgeInterestHandlingType.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.StringEnumOptionData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/reaging/LoanReAgeParameter.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/reaging/LoanReAgeParameter.java index b9dcb87b280..5f333542342 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/reaging/LoanReAgeParameter.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/reaging/LoanReAgeParameter.java @@ -6,9 +6,9 @@ * 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 @@ -26,7 +26,9 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToOne; import jakarta.persistence.Table; + import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.Getter; import org.apache.fineract.infrastructure.codes.domain.CodeValue; @@ -67,7 +69,8 @@ public class LoanReAgeParameter extends AbstractAuditableWithUTCDateTimeCustom * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.portfolio.loanaccount.domain.reaging; // TODO FINERACT-1932-Fineract modularization: Move to fineract-progressive-loan module after refactor of Loan and LoanTransaction classes + import java.util.Optional; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.repository.query.Param; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/reamortization/LoanReAmortizationInterestHandlingType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/reamortization/LoanReAmortizationInterestHandlingType.java index bb3d77cf1fd..6baf81c8358 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/reamortization/LoanReAmortizationInterestHandlingType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/reamortization/LoanReAmortizationInterestHandlingType.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.StringEnumOptionData; 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..ec3e03c5dd1 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 @@ -6,9 +6,9 @@ * 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 @@ -51,7 +51,8 @@ public class LoanReAmortizationParameter extends AbstractAuditableWithUTCDateTim private CodeValue reamortizationReason; // for JPA, don't use - protected LoanReAmortizationParameter() {} + 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/domain/transactionprocessor/AbstractLoanRepaymentScheduleTransactionProcessor.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/AbstractLoanRepaymentScheduleTransactionProcessor.java index 9b96bccafe6..c6c8a9716d2 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/AbstractLoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/AbstractLoanRepaymentScheduleTransactionProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -34,6 +34,7 @@ import java.util.Objects; import java.util.Optional; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.core.service.ExternalIdFactory; @@ -88,8 +89,8 @@ public boolean accept(String s) { @Override public ChangedTransactionDetail reprocessLoanTransactions(final LocalDate disbursementDate, - final List transactionsPostDisbursement, final MonetaryCurrency currency, - final List installments, final Set charges) { + final List transactionsPostDisbursement, final MonetaryCurrency currency, + final List installments, final Set charges) { if (charges != null) { for (final LoanCharge loanCharge : charges) { @@ -235,7 +236,8 @@ public ChangedTransactionDetail reprocessLoanTransactions(final LocalDate disbur public ChangedTransactionDetail processLatestTransaction(final LoanTransaction loanTransaction, final TransactionCtx ctx) { switch (loanTransaction.getTypeOf()) { case WRITEOFF -> handleWriteOff(loanTransaction, ctx.getCurrency(), ctx.getInstallments()); - case REFUND_FOR_ACTIVE_LOAN -> handleRefund(loanTransaction, ctx.getCurrency(), ctx.getInstallments(), ctx.getCharges()); + case REFUND_FOR_ACTIVE_LOAN -> + handleRefund(loanTransaction, ctx.getCurrency(), ctx.getInstallments(), ctx.getCharges()); case CHARGEBACK -> handleChargeback(loanTransaction, ctx); case CHARGE_OFF -> handleChargeOff(loanTransaction, ctx); default -> { @@ -261,7 +263,7 @@ public ChangedTransactionDetail processLatestTransaction(final LoanTransaction l @Override public Money handleRepaymentSchedule(final List transactionsPostDisbursement, final MonetaryCurrency currency, - final List installments, Set loanCharges) { + final List installments, Set loanCharges) { Money unProcessed = Money.zero(currency); for (final LoanTransaction loanTransaction : transactionsPostDisbursement) { if (loanTransaction.isRepaymentLikeType() || loanTransaction.isInterestWaiver() || loanTransaction.isRecoveryRepayment()) { @@ -291,8 +293,8 @@ public boolean isInterestFirstRepaymentScheduleTransactionProcessor() { * @param charges */ protected abstract Money handleTransactionThatIsPaymentInAdvanceOfInstallment(LoanRepaymentScheduleInstallment currentInstallment, - List installments, LoanTransaction loanTransaction, Money paymentInAdvance, - List transactionMappings, Set charges); + List installments, LoanTransaction loanTransaction, Money paymentInAdvance, + List transactionMappings, Set charges); /** * For normal on-time repayments. @@ -302,8 +304,8 @@ protected abstract Money handleTransactionThatIsPaymentInAdvanceOfInstallment(Lo * @param charges */ protected abstract Money handleTransactionThatIsOnTimePaymentOfInstallment(LoanRepaymentScheduleInstallment currentInstallment, - LoanTransaction loanTransaction, Money transactionAmountUnprocessed, - List transactionMappings, Set charges); + LoanTransaction loanTransaction, Money transactionAmountUnprocessed, + List transactionMappings, Set charges); /** * For late repayments, how should components of installment be paid off @@ -313,8 +315,8 @@ protected abstract Money handleTransactionThatIsOnTimePaymentOfInstallment(LoanR * @param charges */ protected abstract Money handleTransactionThatIsALateRepaymentOfInstallment(LoanRepaymentScheduleInstallment currentInstallment, - List installments, LoanTransaction loanTransaction, Money transactionAmountUnprocessed, - List transactionMappings, Set charges); + List installments, LoanTransaction loanTransaction, Money transactionAmountUnprocessed, + List transactionMappings, Set charges); /** * Invoked when a transaction results in an over-payment of the full loan. @@ -336,8 +338,8 @@ protected void onLoanOverpayment(final LoanTransaction loanTransaction, final Mo * */ protected abstract Money handleRefundTransactionPaymentOfInstallment(LoanRepaymentScheduleInstallment currentInstallment, - LoanTransaction loanTransaction, Money transactionAmountUnprocessed, - List transactionMappings); + LoanTransaction loanTransaction, Money transactionAmountUnprocessed, + List transactionMappings); /** * This method is responsible for checking if the current transaction is 'an advance/early payment' based on the @@ -346,7 +348,7 @@ protected abstract Money handleRefundTransactionPaymentOfInstallment(LoanRepayme * Default implementation is check transaction date is before installment due date. */ protected boolean isTransactionInAdvanceOfInstallment(final int installmentIndex, - final List installments, final LocalDate transactionDate) { + final List installments, final LocalDate transactionDate) { final LoanRepaymentScheduleInstallment currentInstallment = installments.get(installmentIndex); return DateUtils.isBefore(transactionDate, currentInstallment.getDueDate()); } @@ -359,13 +361,13 @@ protected boolean isTransactionInAdvanceOfInstallment(final int installmentIndex * due date. */ protected boolean isTransactionALateRepaymentOnInstallment(final int installmentIndex, - final List installments, final LocalDate transactionDate) { + final List installments, final LocalDate transactionDate) { final LoanRepaymentScheduleInstallment currentInstallment = installments.get(installmentIndex); return DateUtils.isAfter(transactionDate, currentInstallment.getDueDate()); } private void recalculateChargeOffTransaction(ChangedTransactionDetail changedTransactionDetail, LoanTransaction loanTransaction, - MonetaryCurrency currency, List installments) { + MonetaryCurrency currency, List installments) { final LoanTransaction newLoanTransaction = LoanTransaction.copyTransactionProperties(loanTransaction); final BigDecimal newInterest = getInterestTillChargeOffForPeriod(newLoanTransaction.getLoan(), @@ -395,7 +397,7 @@ private void recalculateChargeOffTransaction(ChangedTransactionDetail changedTra } private void reprocessChargebackTransactionRelation(ChangedTransactionDetail changedTransactionDetail, - List transactionsToBeProcessed) { + List transactionsToBeProcessed) { List mergedTransactionList = getMergedTransactionList(transactionsToBeProcessed, changedTransactionDetail); for (TransactionChangeData change : changedTransactionDetail.getTransactionChanges()) { LoanTransaction newTransaction = change.getNewTransaction(); @@ -428,7 +430,7 @@ private void reprocessChargebackTransactionRelation(ChangedTransactionDetail cha } protected void reprocessInstallments(LocalDate disbursementDate, List transactions, - List installments, MonetaryCurrency currency) { + List installments, MonetaryCurrency currency) { LoanRepaymentScheduleInstallment lastInstallment = installments.getLast(); if (lastInstallment.isAdditional() && lastInstallment.getDue(currency).isZero()) { installments.remove(lastInstallment); @@ -463,7 +465,7 @@ private boolean isTransactionAfterObligationsMetOnDate(LocalDate waiverTxDate, L } private boolean isObligationsMetOnDisbursementDate(LocalDate disbursementDate, - LoanRepaymentScheduleInstallment loanRepaymentScheduleInstallment) { + LoanRepaymentScheduleInstallment loanRepaymentScheduleInstallment) { return loanRepaymentScheduleInstallment.isObligationsMet() && disbursementDate.equals(loanRepaymentScheduleInstallment.getObligationsMetOnDate()); } @@ -473,7 +475,7 @@ protected boolean isNotObligationsMet(LoanRepaymentScheduleInstallment loanRepay } private void recalculateCreditTransaction(ChangedTransactionDetail changedTransactionDetail, LoanTransaction loanTransaction, - MonetaryCurrency currency, List installments, MoneyHolder overpaymentHolder) { + MonetaryCurrency currency, List installments, MoneyHolder overpaymentHolder) { // pass through for new transactions if (loanTransaction.getId() == null) { return; @@ -487,7 +489,7 @@ private void recalculateCreditTransaction(ChangedTransactionDetail changedTransa } private List getMergedTransactionList(List transactionList, - ChangedTransactionDetail changedTransactionDetail) { + ChangedTransactionDetail changedTransactionDetail) { List mergedList = new ArrayList<>( changedTransactionDetail.getTransactionChanges().stream().map(TransactionChangeData::getNewTransaction).toList()); mergedList.addAll(transactionList); @@ -495,7 +497,7 @@ private List getMergedTransactionList(List tra } protected void createNewTransaction(LoanTransaction loanTransaction, LoanTransaction newLoanTransaction, - ChangedTransactionDetail changedTransactionDetail) { + ChangedTransactionDetail changedTransactionDetail) { loanChargeValidator.validateRepaymentTypeTransactionNotBeforeAChargeRefund(loanTransaction.getLoan(), loanTransaction, "reversed"); loanTransaction.reverse(); loanTransaction.updateExternalId(null); @@ -507,7 +509,7 @@ protected void createNewTransaction(LoanTransaction loanTransaction, LoanTransac } protected void processCreditTransaction(LoanTransaction loanTransaction, MoneyHolder overpaymentHolder, MonetaryCurrency currency, - List installments) { + List installments) { loanTransaction.resetDerivedComponents(); List transactionMappings = new ArrayList<>(); final Comparator byDate = Comparator.comparing(LoanRepaymentScheduleInstallment::getDueDate); @@ -589,8 +591,8 @@ protected void processCreditTransaction(LoanTransaction loanTransaction, MoneyHo } protected Money handleTransactionAndCharges(final LoanTransaction loanTransaction, final MonetaryCurrency currency, - final List installments, final Set charges, final Money chargeAmountToProcess, - final boolean isFeeCharge) { + final List installments, final Set charges, final Money chargeAmountToProcess, + final boolean isFeeCharge) { if (loanTransaction.isRepaymentLikeType() || loanTransaction.isInterestWaiver() || loanTransaction.isRecoveryRepayment()) { loanTransaction.resetDerivedComponents(); } @@ -625,7 +627,7 @@ protected Money handleTransactionAndCharges(final LoanTransaction loanTransactio } protected Money processTransaction(final LoanTransaction loanTransaction, final MonetaryCurrency currency, - final List installments, final Set charges, Money amountToProcess) { + final List installments, final Set charges, Money amountToProcess) { int installmentIndex = 0; final LocalDate transactionDate = loanTransaction.getTransactionDate(); @@ -678,7 +680,7 @@ protected Set extractPenaltyCharges(final Set loanCharge } protected void updateChargesPaidAmountBy(final LoanTransaction loanTransaction, final Money chargeAmount, final Set charges, - final Integer installmentNumber) { + final Integer installmentNumber) { Money amountRemaining = chargeAmount; final Set chargesThatCannotBeFullyPaidByOneInstallment = new HashSet<>(); @@ -762,7 +764,7 @@ protected LoanCharge findEarliestUnpaidChargeFromUnOrderedSet(final Set installments) { + final List installments) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); Money principalPortion = Money.zero(currency); @@ -797,12 +799,12 @@ private void handleChargeOff(LoanTransaction loanTransaction, TransactionCtx tra } protected void handleCreditBalanceRefund(LoanTransaction loanTransaction, MonetaryCurrency currency, - List installments, MoneyHolder overpaidAmountHolder) { + List installments, MoneyHolder overpaidAmountHolder) { processCreditTransaction(loanTransaction, overpaidAmountHolder, currency, installments); } protected void handleRefund(LoanTransaction loanTransaction, MonetaryCurrency currency, - List installments, final Set charges) { + List installments, final Set charges) { List transactionMappings = new ArrayList<>(); final Comparator byDate = Comparator.comparing(LoanRepaymentScheduleInstallment::getDueDate); installments.sort(Collections.reverseOrder(byDate)); @@ -841,7 +843,7 @@ protected void handleRefund(LoanTransaction loanTransaction, MonetaryCurrency cu } protected void undoChargesPaidAmountBy(final LoanTransaction loanTransaction, final Money chargeAmount, final Set charges, - final Integer installmentNumber) { + final Integer installmentNumber) { Money amountRemaining = chargeAmount; while (amountRemaining.isGreaterThanZero()) { @@ -877,7 +879,7 @@ private LoanCharge findLatestPaidChargeFromUnOrderedSet(final Set ch .getLastPaidOrPartiallyPaidInstallmentLoanCharge(currency); if (chargePerInstallment == null || (paidLoanChargePerInstallment != null && DateUtils.isBefore(chargePerInstallment.getRepaymentInstallment().getDueDate(), - paidLoanChargePerInstallment.getRepaymentInstallment().getDueDate()))) { + paidLoanChargePerInstallment.getRepaymentInstallment().getDueDate()))) { installemntCharge = loanCharge; chargePerInstallment = paidLoanChargePerInstallment; } @@ -896,7 +898,7 @@ private LoanCharge findLatestPaidChargeFromUnOrderedSet(final Set ch } protected void addChargeOnlyRepaymentInstallmentIfRequired(Set charges, - List installments) { + List installments) { LoanCharge latestCharge = getLatestLoanChargeWithSpecificDueDate(charges); if (latestCharge == null) { return; @@ -955,8 +957,8 @@ private BigDecimal getInterestTillChargeOffForPeriod(final Loan loan, final Loca } private void createMissingAccrualTransactionDuringChargeOffIfNeeded(final BigDecimal newInterest, - final LoanTransaction chargeOffTransaction, final LocalDate chargeOffDate, - final ChangedTransactionDetail changedTransactionDetail) { + final LoanTransaction chargeOffTransaction, final LocalDate chargeOffDate, + final ChangedTransactionDetail changedTransactionDetail) { final Loan loan = chargeOffTransaction.getLoan(); final List relevantInstallments = loan.getRepaymentScheduleInstallments().stream() .filter(i -> !i.getFromDate().isAfter(chargeOffDate)).toList(); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/LoanRepaymentScheduleTransactionProcessor.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/LoanRepaymentScheduleTransactionProcessor.java index 411f26309d4..9404890e4db 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/LoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/LoanRepaymentScheduleTransactionProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.List; import java.util.Set; + import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.portfolio.loanaccount.domain.ChangedTransactionDetail; @@ -51,10 +52,10 @@ public interface LoanRepaymentScheduleTransactionProcessor { * needs to be re-processed. */ ChangedTransactionDetail reprocessLoanTransactions(LocalDate disbursementDate, List repaymentsOrWaivers, - MonetaryCurrency currency, List repaymentScheduleInstallments, Set charges); + MonetaryCurrency currency, List repaymentScheduleInstallments, Set charges); Money handleRepaymentSchedule(List transactionsPostDisbursement, MonetaryCurrency currency, - List installments, Set loanCharges); + List installments, Set loanCharges); /** * Used in interest recalculation to introduce new interest only installment. diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/MoneyHolder.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/MoneyHolder.java index f967e8ffb4a..ac1c95a5816 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/MoneyHolder.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/MoneyHolder.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/TransactionCtx.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/TransactionCtx.java index 5ba265f48f8..ce6e40792e3 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/TransactionCtx.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/TransactionCtx.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Set; + import lombok.AllArgsConstructor; import lombok.Data; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/CreocoreLoanRepaymentScheduleTransactionProcessor.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/CreocoreLoanRepaymentScheduleTransactionProcessor.java index 2518955dde6..2b809ccef2e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/CreocoreLoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/CreocoreLoanRepaymentScheduleTransactionProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.List; import java.util.Set; + import org.apache.fineract.infrastructure.core.service.ExternalIdFactory; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; import org.apache.fineract.organisation.monetary.domain.Money; @@ -50,7 +51,7 @@ public class CreocoreLoanRepaymentScheduleTransactionProcessor extends AbstractL public static final String STRATEGY_NAME = "Creocore Unique"; public CreocoreLoanRepaymentScheduleTransactionProcessor(final ExternalIdFactory externalIdFactory, - final LoanChargeValidator loanChargeValidator, final LoanBalanceService loanBalanceService) { + final LoanChargeValidator loanChargeValidator, final LoanBalanceService loanBalanceService) { super(externalIdFactory, loanChargeValidator, loanBalanceService); } @@ -70,8 +71,8 @@ public String getName() { @SuppressWarnings("unused") @Override protected Money handleTransactionThatIsPaymentInAdvanceOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final List installments, final LoanTransaction loanTransaction, final Money paymentInAdvance, - final List transactionMappings, Set charges) { + final List installments, final LoanTransaction loanTransaction, final Money paymentInAdvance, + final List transactionMappings, Set charges) { return handleTransactionThatIsOnTimePaymentOfInstallment(currentInstallment, loanTransaction, paymentInAdvance, transactionMappings, charges); @@ -83,9 +84,9 @@ protected Money handleTransactionThatIsPaymentInAdvanceOfInstallment(final LoanR @SuppressWarnings("unused") @Override protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final List installments, final LoanTransaction loanTransaction, - final Money transactionAmountUnprocessed, final List transactionMappings, - Set charges) { + final List installments, final LoanTransaction loanTransaction, + final Money transactionAmountUnprocessed, final List transactionMappings, + Set charges) { return handleTransactionThatIsOnTimePaymentOfInstallment(currentInstallment, loanTransaction, transactionAmountUnprocessed, transactionMappings, charges); @@ -96,8 +97,8 @@ protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRep */ @Override protected Money handleTransactionThatIsOnTimePaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, - final List transactionMappings, Set charges) { + final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, + final List transactionMappings, Set charges) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); final MonetaryCurrency currency = transactionAmountUnprocessed.getCurrency(); @@ -151,8 +152,8 @@ protected Money handleTransactionThatIsOnTimePaymentOfInstallment(final LoanRepa @Override protected Money handleRefundTransactionPaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, - List transactionMappings) { + final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, + List transactionMappings) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); Money transactionAmountRemaining = transactionAmountUnprocessed; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/DuePenFeeIntPriInAdvancePriPenFeeIntLoanRepaymentScheduleTransactionProcessor.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/DuePenFeeIntPriInAdvancePriPenFeeIntLoanRepaymentScheduleTransactionProcessor.java index e24e00f1d2b..ed235668c2c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/DuePenFeeIntPriInAdvancePriPenFeeIntLoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/DuePenFeeIntPriInAdvancePriPenFeeIntLoanRepaymentScheduleTransactionProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.List; import java.util.Set; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.core.service.ExternalIdFactory; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; @@ -51,7 +52,7 @@ public class DuePenFeeIntPriInAdvancePriPenFeeIntLoanRepaymentScheduleTransactio public static final String STRATEGY_NAME = "Due penalty, fee, interest, principal, In advance principal, penalty, fee, interest"; public DuePenFeeIntPriInAdvancePriPenFeeIntLoanRepaymentScheduleTransactionProcessor(final ExternalIdFactory externalIdFactory, - final LoanChargeValidator loanChargeValidator, final LoanBalanceService loanBalanceService) { + final LoanChargeValidator loanChargeValidator, final LoanBalanceService loanBalanceService) { super(externalIdFactory, loanChargeValidator, loanBalanceService); } @@ -70,8 +71,8 @@ public String getName() { */ @Override protected Money handleTransactionThatIsPaymentInAdvanceOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final List installments, final LoanTransaction loanTransaction, final Money paymentInAdvance, - List transactionMappings, Set charges) { + final List installments, final LoanTransaction loanTransaction, final Money paymentInAdvance, + List transactionMappings, Set charges) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); @@ -180,9 +181,9 @@ protected Money handleTransactionThatIsPaymentInAdvanceOfInstallment(final LoanR */ @Override protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final List installments, final LoanTransaction loanTransaction, - final Money transactionAmountUnprocessed, List transactionMappings, - Set charges) { + final List installments, final LoanTransaction loanTransaction, + final Money transactionAmountUnprocessed, List transactionMappings, + Set charges) { return handleTransactionThatIsOnTimePaymentOfInstallment(currentInstallment, loanTransaction, transactionAmountUnprocessed, transactionMappings, charges); @@ -193,8 +194,8 @@ protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRep */ @Override protected Money handleTransactionThatIsOnTimePaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, - List transactionMappings, Set charges) { + final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, + List transactionMappings, Set charges) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); @@ -256,8 +257,8 @@ protected Money handleTransactionThatIsOnTimePaymentOfInstallment(final LoanRepa @Override protected Money handleRefundTransactionPaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, - List transactionMappings) { + final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, + List transactionMappings) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); final MonetaryCurrency currency = transactionAmountUnprocessed.getCurrency(); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/DuePenIntPriFeeInAdvancePenIntPriFeeLoanRepaymentScheduleTransactionProcessor.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/DuePenIntPriFeeInAdvancePenIntPriFeeLoanRepaymentScheduleTransactionProcessor.java index 148c0f4a2c9..57b763ffcf1 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/DuePenIntPriFeeInAdvancePenIntPriFeeLoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/DuePenIntPriFeeInAdvancePenIntPriFeeLoanRepaymentScheduleTransactionProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.List; import java.util.Set; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.core.service.ExternalIdFactory; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; @@ -51,7 +52,7 @@ public class DuePenIntPriFeeInAdvancePenIntPriFeeLoanRepaymentScheduleTransactio public static final String STRATEGY_NAME = "Due penalty, interest, principal, fee, In advance penalty, interest, principal, fee"; public DuePenIntPriFeeInAdvancePenIntPriFeeLoanRepaymentScheduleTransactionProcessor(final ExternalIdFactory externalIdFactory, - final LoanChargeValidator loanChargeValidator, final LoanBalanceService loanBalanceService) { + final LoanChargeValidator loanChargeValidator, final LoanBalanceService loanBalanceService) { super(externalIdFactory, loanChargeValidator, loanBalanceService); } @@ -70,8 +71,8 @@ public String getName() { */ @Override protected Money handleTransactionThatIsPaymentInAdvanceOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final List installments, final LoanTransaction loanTransaction, final Money inAdvancePayment, - List transactionMappings, Set charges) { + final List installments, final LoanTransaction loanTransaction, final Money inAdvancePayment, + List transactionMappings, Set charges) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); final MonetaryCurrency currency = inAdvancePayment.getCurrency(); @@ -181,8 +182,8 @@ protected Money handleTransactionThatIsPaymentInAdvanceOfInstallment(final LoanR */ @Override protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final List installments, final LoanTransaction loanTransaction, final Money latePayment, - List transactionMappings, Set charges) { + final List installments, final LoanTransaction loanTransaction, final Money latePayment, + List transactionMappings, Set charges) { return handleTransactionThatIsOnTimePaymentOfInstallment(currentInstallment, loanTransaction, latePayment, transactionMappings, charges); @@ -193,8 +194,8 @@ protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRep */ @Override protected Money handleTransactionThatIsOnTimePaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final LoanTransaction loanTransaction, final Money onTimePayment, - List transactionMappings, Set charges) { + final LoanTransaction loanTransaction, final Money onTimePayment, + List transactionMappings, Set charges) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); @@ -256,8 +257,8 @@ protected Money handleTransactionThatIsOnTimePaymentOfInstallment(final LoanRepa @Override protected Money handleRefundTransactionPaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, - List transactionMappings) { + final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, + List transactionMappings) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); final MonetaryCurrency currency = transactionAmountUnprocessed.getCurrency(); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/EarlyPaymentLoanRepaymentScheduleTransactionProcessor.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/EarlyPaymentLoanRepaymentScheduleTransactionProcessor.java index 8d2d11e075e..1795b0ba0a6 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/EarlyPaymentLoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/EarlyPaymentLoanRepaymentScheduleTransactionProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.List; import java.util.Set; + import org.apache.fineract.infrastructure.core.service.ExternalIdFactory; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; import org.apache.fineract.organisation.monetary.domain.Money; @@ -44,7 +45,7 @@ public class EarlyPaymentLoanRepaymentScheduleTransactionProcessor extends Abstr public static final String STRATEGY_NAME = "Early Repayment Strategy"; public EarlyPaymentLoanRepaymentScheduleTransactionProcessor(final ExternalIdFactory externalIdFactory, - final LoanChargeValidator loanChargeValidator, final LoanBalanceService loanBalanceService) { + final LoanChargeValidator loanChargeValidator, final LoanBalanceService loanBalanceService) { super(externalIdFactory, loanChargeValidator, loanBalanceService); } @@ -65,8 +66,8 @@ public String getName() { @SuppressWarnings("unused") @Override protected Money handleTransactionThatIsPaymentInAdvanceOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final List installments, final LoanTransaction loanTransaction, final Money paymentInAdvance, - final List transactionMappings, Set charges) { + final List installments, final LoanTransaction loanTransaction, final Money paymentInAdvance, + final List transactionMappings, Set charges) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); final MonetaryCurrency currency = paymentInAdvance.getCurrency(); @@ -121,9 +122,9 @@ protected Money handleTransactionThatIsPaymentInAdvanceOfInstallment(final LoanR @SuppressWarnings("unused") @Override protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final List installments, final LoanTransaction loanTransaction, - final Money transactionAmountUnprocessed, List transactionMappings, - Set charges) { + final List installments, final LoanTransaction loanTransaction, + final Money transactionAmountUnprocessed, List transactionMappings, + Set charges) { return handleTransactionThatIsOnTimePaymentOfInstallment(currentInstallment, loanTransaction, transactionAmountUnprocessed, transactionMappings, charges); @@ -134,8 +135,8 @@ protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRep */ @Override protected Money handleTransactionThatIsOnTimePaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, - final List transactionMappings, Set charges) { + final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, + final List transactionMappings, Set charges) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); final MonetaryCurrency currency = transactionAmountUnprocessed.getCurrency(); @@ -186,8 +187,8 @@ protected Money handleTransactionThatIsOnTimePaymentOfInstallment(final LoanRepa @Override protected Money handleRefundTransactionPaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, - List transactionMappings) { + final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, + List transactionMappings) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); // final MonetaryCurrency currency = diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/FineractStyleLoanRepaymentScheduleTransactionProcessor.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/FineractStyleLoanRepaymentScheduleTransactionProcessor.java index 371784261e2..143374a849b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/FineractStyleLoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/FineractStyleLoanRepaymentScheduleTransactionProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.List; import java.util.Set; + import org.apache.fineract.infrastructure.core.service.ExternalIdFactory; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; import org.apache.fineract.organisation.monetary.domain.Money; @@ -50,7 +51,7 @@ public class FineractStyleLoanRepaymentScheduleTransactionProcessor extends Abst public static final String STRATEGY_NAME = "Penalties, Fees, Interest, Principal order"; public FineractStyleLoanRepaymentScheduleTransactionProcessor(final ExternalIdFactory externalIdFactory, - final LoanChargeValidator loanChargeValidator, final LoanBalanceService loanBalanceService) { + final LoanChargeValidator loanChargeValidator, final LoanBalanceService loanBalanceService) { super(externalIdFactory, loanChargeValidator, loanBalanceService); } @@ -69,8 +70,8 @@ public String getName() { */ @Override protected Money handleTransactionThatIsPaymentInAdvanceOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final List installments, final LoanTransaction loanTransaction, final Money paymentInAdvance, - List transactionMappings, Set charges) { + final List installments, final LoanTransaction loanTransaction, final Money paymentInAdvance, + List transactionMappings, Set charges) { return handleTransactionThatIsOnTimePaymentOfInstallment(currentInstallment, loanTransaction, paymentInAdvance, transactionMappings, charges); @@ -81,9 +82,9 @@ protected Money handleTransactionThatIsPaymentInAdvanceOfInstallment(final LoanR */ @Override protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final List installments, final LoanTransaction loanTransaction, - final Money transactionAmountUnprocessed, List transactionMappings, - Set charges) { + final List installments, final LoanTransaction loanTransaction, + final Money transactionAmountUnprocessed, List transactionMappings, + Set charges) { return handleTransactionThatIsOnTimePaymentOfInstallment(currentInstallment, loanTransaction, transactionAmountUnprocessed, transactionMappings, charges); @@ -94,8 +95,8 @@ protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRep */ @Override protected Money handleTransactionThatIsOnTimePaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, - List transactionMappings, Set charges) { + final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, + List transactionMappings, Set charges) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); final MonetaryCurrency currency = transactionAmountUnprocessed.getCurrency(); @@ -152,8 +153,8 @@ protected Money handleTransactionThatIsOnTimePaymentOfInstallment(final LoanRepa @Override protected Money handleRefundTransactionPaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, - List transactionMappings) { + final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, + List transactionMappings) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); final MonetaryCurrency currency = transactionAmountUnprocessed.getCurrency(); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/HeavensFamilyLoanRepaymentScheduleTransactionProcessor.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/HeavensFamilyLoanRepaymentScheduleTransactionProcessor.java index fbafe962071..d5f2161d4b2 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/HeavensFamilyLoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/HeavensFamilyLoanRepaymentScheduleTransactionProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.List; import java.util.Set; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.core.service.ExternalIdFactory; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; @@ -52,7 +53,7 @@ public class HeavensFamilyLoanRepaymentScheduleTransactionProcessor extends Abst public static final String STRATEGY_NAME = "HeavensFamily Unique"; public HeavensFamilyLoanRepaymentScheduleTransactionProcessor(final ExternalIdFactory externalIdFactory, - final LoanChargeValidator loanChargeValidator, final LoanBalanceService loanBalanceService) { + final LoanChargeValidator loanChargeValidator, final LoanBalanceService loanBalanceService) { super(externalIdFactory, loanChargeValidator, loanBalanceService); } @@ -71,9 +72,9 @@ public String getName() { */ @Override protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final List installments, final LoanTransaction loanTransaction, - final Money transactionAmountUnprocessed, List transactionMappings, - Set charges) { + final List installments, final LoanTransaction loanTransaction, + final Money transactionAmountUnprocessed, List transactionMappings, + Set charges) { return handleTransactionThatIsOnTimePaymentOfInstallment(currentInstallment, loanTransaction, transactionAmountUnprocessed, transactionMappings, charges); @@ -81,7 +82,7 @@ protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRep @Override protected boolean isTransactionInAdvanceOfInstallment(final int currentInstallmentIndex, - final List installments, final LocalDate transactionDate) { + final List installments, final LocalDate transactionDate) { boolean isInAdvance = false; @@ -102,8 +103,8 @@ protected boolean isTransactionInAdvanceOfInstallment(final int currentInstallme */ @Override protected Money handleTransactionThatIsPaymentInAdvanceOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final List installments, final LoanTransaction loanTransaction, final Money paymentInAdvance, - final List transactionMappings, Set charges) { + final List installments, final LoanTransaction loanTransaction, final Money paymentInAdvance, + final List transactionMappings, Set charges) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); final MonetaryCurrency currency = paymentInAdvance.getCurrency(); @@ -167,8 +168,8 @@ protected Money handleTransactionThatIsPaymentInAdvanceOfInstallment(final LoanR */ @Override protected Money handleTransactionThatIsOnTimePaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, - List transactionMappings, Set charges) { + final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, + List transactionMappings, Set charges) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); final MonetaryCurrency currency = transactionAmountUnprocessed.getCurrency(); @@ -225,8 +226,8 @@ protected Money handleTransactionThatIsOnTimePaymentOfInstallment(final LoanRepa @Override protected Money handleRefundTransactionPaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, - List transactionMappings) { + final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, + List transactionMappings) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); Money transactionAmountRemaining = transactionAmountUnprocessed; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/InterestPrincipalPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/InterestPrincipalPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor.java index d82dc0b299f..aeb962a01a5 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/InterestPrincipalPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/InterestPrincipalPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.List; import java.util.Set; + import org.apache.fineract.infrastructure.core.service.ExternalIdFactory; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; import org.apache.fineract.organisation.monetary.domain.Money; @@ -45,7 +46,7 @@ public class InterestPrincipalPenaltyFeesOrderLoanRepaymentScheduleTransactionPr public static final String STRATEGY_NAME = "Interest, Principal, Penalties, Fees Order"; public InterestPrincipalPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor(final ExternalIdFactory externalIdFactory, - final LoanChargeValidator loanChargeValidator, final LoanBalanceService loanBalanceService) { + final LoanChargeValidator loanChargeValidator, final LoanBalanceService loanBalanceService) { super(externalIdFactory, loanChargeValidator, loanBalanceService); } @@ -66,8 +67,8 @@ public String getName() { @SuppressWarnings("unused") @Override protected Money handleTransactionThatIsPaymentInAdvanceOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final List installments, final LoanTransaction loanTransaction, final Money paymentInAdvance, - List transactionMappings, Set charges) { + final List installments, final LoanTransaction loanTransaction, final Money paymentInAdvance, + List transactionMappings, Set charges) { return handleTransactionThatIsOnTimePaymentOfInstallment(currentInstallment, loanTransaction, paymentInAdvance, transactionMappings, charges); @@ -79,9 +80,9 @@ protected Money handleTransactionThatIsPaymentInAdvanceOfInstallment(final LoanR @SuppressWarnings("unused") @Override protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final List installments, final LoanTransaction loanTransaction, - final Money transactionAmountUnprocessed, List transactionMappings, - Set charges) { + final List installments, final LoanTransaction loanTransaction, + final Money transactionAmountUnprocessed, List transactionMappings, + Set charges) { return handleTransactionThatIsOnTimePaymentOfInstallment(currentInstallment, loanTransaction, transactionAmountUnprocessed, transactionMappings, charges); @@ -92,8 +93,8 @@ protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRep */ @Override protected Money handleTransactionThatIsOnTimePaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, - List transactionMappings, Set charges) { + final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, + List transactionMappings, Set charges) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); final MonetaryCurrency currency = transactionAmountUnprocessed.getCurrency(); @@ -150,8 +151,8 @@ protected Money handleTransactionThatIsOnTimePaymentOfInstallment(final LoanRepa @Override protected Money handleRefundTransactionPaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, - List transactionMappings) { + final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, + List transactionMappings) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); Money transactionAmountRemaining = transactionAmountUnprocessed; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/PrincipalInterestPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/PrincipalInterestPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor.java index 5e46fa0a70e..1efce233ff2 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/PrincipalInterestPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/PrincipalInterestPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.List; import java.util.Set; + import org.apache.fineract.infrastructure.core.service.ExternalIdFactory; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; import org.apache.fineract.organisation.monetary.domain.Money; @@ -45,7 +46,7 @@ public class PrincipalInterestPenaltyFeesOrderLoanRepaymentScheduleTransactionPr public static final String STRATEGY_NAME = "Principal, Interest, Penalties, Fees Order"; public PrincipalInterestPenaltyFeesOrderLoanRepaymentScheduleTransactionProcessor(final ExternalIdFactory externalIdFactory, - final LoanChargeValidator loanChargeValidator, final LoanBalanceService loanBalanceService) { + final LoanChargeValidator loanChargeValidator, final LoanBalanceService loanBalanceService) { super(externalIdFactory, loanChargeValidator, loanBalanceService); } @@ -66,8 +67,8 @@ public String getName() { @SuppressWarnings("unused") @Override protected Money handleTransactionThatIsPaymentInAdvanceOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final List installments, final LoanTransaction loanTransaction, final Money paymentInAdvance, - List transactionMappings, Set charges) { + final List installments, final LoanTransaction loanTransaction, final Money paymentInAdvance, + List transactionMappings, Set charges) { return handleTransactionThatIsOnTimePaymentOfInstallment(currentInstallment, loanTransaction, paymentInAdvance, transactionMappings, charges); @@ -79,9 +80,9 @@ protected Money handleTransactionThatIsPaymentInAdvanceOfInstallment(final LoanR @SuppressWarnings("unused") @Override protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final List installments, final LoanTransaction loanTransaction, - final Money transactionAmountUnprocessed, List transactionMappings, - Set charges) { + final List installments, final LoanTransaction loanTransaction, + final Money transactionAmountUnprocessed, List transactionMappings, + Set charges) { return handleTransactionThatIsOnTimePaymentOfInstallment(currentInstallment, loanTransaction, transactionAmountUnprocessed, transactionMappings, charges); @@ -92,8 +93,8 @@ protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRep */ @Override protected Money handleTransactionThatIsOnTimePaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, - List transactionMappings, Set charges) { + final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, + List transactionMappings, Set charges) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); final MonetaryCurrency currency = transactionAmountUnprocessed.getCurrency(); @@ -151,8 +152,8 @@ protected Money handleTransactionThatIsOnTimePaymentOfInstallment(final LoanRepa @Override protected Money handleRefundTransactionPaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, - List transactionMappings) { + final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, + List transactionMappings) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); // final MonetaryCurrency currency = diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/RBILoanRepaymentScheduleTransactionProcessor.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/RBILoanRepaymentScheduleTransactionProcessor.java index bbeadc84ae2..9fbf644720a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/RBILoanRepaymentScheduleTransactionProcessor.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/RBILoanRepaymentScheduleTransactionProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.List; import java.util.Set; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.core.service.ExternalIdFactory; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; @@ -54,7 +55,7 @@ public class RBILoanRepaymentScheduleTransactionProcessor extends AbstractLoanRe public static final String STRATEGY_NAME = "Overdue/Due Fee/Int,Principal"; public RBILoanRepaymentScheduleTransactionProcessor(final ExternalIdFactory externalIdFactory, - final LoanChargeValidator loanChargeValidator, final LoanBalanceService loanBalanceService) { + final LoanChargeValidator loanChargeValidator, final LoanBalanceService loanBalanceService) { super(externalIdFactory, loanChargeValidator, loanBalanceService); } @@ -74,8 +75,8 @@ public String getName() { @SuppressWarnings("unused") @Override protected Money handleTransactionThatIsPaymentInAdvanceOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final List installments, final LoanTransaction loanTransaction, final Money paymentInAdvance, - List transactionMappings, Set charges) { + final List installments, final LoanTransaction loanTransaction, final Money paymentInAdvance, + List transactionMappings, Set charges) { return handleTransactionThatIsOnTimePaymentOfInstallment(currentInstallment, loanTransaction, paymentInAdvance, transactionMappings, charges); @@ -86,9 +87,9 @@ protected Money handleTransactionThatIsPaymentInAdvanceOfInstallment(final LoanR */ @Override protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final List installments, final LoanTransaction loanTransaction, - final Money transactionAmountUnprocessed, List transactionMappings, - Set charges) { + final List installments, final LoanTransaction loanTransaction, + final Money transactionAmountUnprocessed, List transactionMappings, + Set charges) { // pay of overdue and current interest due given transaction date final LocalDate transactionDate = loanTransaction.getTransactionDate(); @@ -132,7 +133,7 @@ protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRep if ((installment.isInterestDue(currency) || installment.getFeeChargesOutstanding(currency).isGreaterThanZero() || installment.getPenaltyChargesOutstanding(currency).isGreaterThanZero()) && (installment.isOverdueOn(loanTransaction.getTransactionDate()) || installment.getInstallmentNumber() - .equals(currentInstallmentBasedOnTransactionDate.getInstallmentNumber()))) { + .equals(currentInstallmentBasedOnTransactionDate.getInstallmentNumber()))) { penaltyChargesPortion = installment.payPenaltyChargesComponent(transactionDate, transactionAmountRemaining); transactionAmountRemaining = transactionAmountRemaining.minus(penaltyChargesPortion); @@ -182,7 +183,7 @@ protected Money handleTransactionThatIsALateRepaymentOfInstallment(final LoanRep } private LoanRepaymentScheduleInstallment nearestInstallment(final LocalDate transactionDate, - final List installments) { + final List installments) { LoanRepaymentScheduleInstallment nearest = installments.get(0); // installments must be sorted by dates for (final LoanRepaymentScheduleInstallment installment : installments) { if (DateUtils.isBefore(transactionDate, installment.getDueDate())) { @@ -198,8 +199,8 @@ private LoanRepaymentScheduleInstallment nearestInstallment(final LocalDate tran */ @Override protected Money handleTransactionThatIsOnTimePaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, - final List transactionMappings, Set charges) { + final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, + final List transactionMappings, Set charges) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); final MonetaryCurrency currency = transactionAmountUnprocessed.getCurrency(); @@ -260,8 +261,8 @@ public boolean isInterestFirstRepaymentScheduleTransactionProcessor() { @Override protected Money handleRefundTransactionPaymentOfInstallment(final LoanRepaymentScheduleInstallment currentInstallment, - final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, - final List transactionMappings) { + final LoanTransaction loanTransaction, final Money transactionAmountUnprocessed, + final List transactionMappings) { final LocalDate transactionDate = loanTransaction.getTransactionDate(); // final MonetaryCurrency currency = diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/DateMismatchException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/DateMismatchException.java index e0402548480..b51170531a3 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/DateMismatchException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/DateMismatchException.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.exception; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** @@ -30,7 +31,7 @@ public class DateMismatchException extends AbstractPlatformDomainRuleException { public DateMismatchException(final LocalDate actualDisbursementDate, final LocalDate expectedDisbursedOnLocalDate) { super("error.msg.actual.disbursement.date.does.not.match.with.expected.disbursal.date", "Actual disbursement date (" - + actualDisbursementDate + ") " + "should be equal to Expected disbursal date (" + expectedDisbursedOnLocalDate + ")", + + actualDisbursementDate + ") " + "should be equal to Expected disbursal date (" + expectedDisbursedOnLocalDate + ")", actualDisbursementDate, expectedDisbursedOnLocalDate, null); } } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/ExceedingTrancheCountException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/ExceedingTrancheCountException.java index 3209626ac8b..c39cd735266 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/ExceedingTrancheCountException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/ExceedingTrancheCountException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InstallmentNotFoundException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InstallmentNotFoundException.java index cf478b35a2e..caadee7f8a1 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InstallmentNotFoundException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InstallmentNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidAmountOfCollateralQuantity.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidAmountOfCollateralQuantity.java index 93ab45dd473..0159356c911 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidAmountOfCollateralQuantity.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidAmountOfCollateralQuantity.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.exception; import java.math.BigDecimal; + import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; public class InvalidAmountOfCollateralQuantity extends AbstractPlatformDomainRuleException { @@ -26,7 +27,7 @@ public class InvalidAmountOfCollateralQuantity extends AbstractPlatformDomainRul public InvalidAmountOfCollateralQuantity(final BigDecimal quantity) { super("error.msg.loan.collateral.failed", "The collateral quantity value`" + quantity.toString() + "`" + "` cannot exceed the available quantity", - new Object[] { quantity.toString() }); + new Object[]{quantity.toString()}); } public InvalidAmountOfCollateralQuantity(final String defaultUserMessage, final String entity, final Object... defaultUserMessageArgs) { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidAmountOfCollaterals.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidAmountOfCollaterals.java index 3076d28a672..a5ec43e6ae0 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidAmountOfCollaterals.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidAmountOfCollaterals.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.exception; import java.math.BigDecimal; + import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; public class InvalidAmountOfCollaterals extends AbstractPlatformDomainRuleException { @@ -26,7 +27,7 @@ public class InvalidAmountOfCollaterals extends AbstractPlatformDomainRuleExcept public InvalidAmountOfCollaterals(final BigDecimal amount) { super("error.msg.loan.collateral.failed", "The total collateral value`" + amount.toString() + "`" + "` should be greater than or equal to the loan amount", - new Object[] { amount.toString() }); + new Object[]{amount.toString()}); } public InvalidAmountOfCollaterals(final String defaultUserMessage, final String entity, final Object... defaultUserMessageArgs) { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanStateTransitionException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanStateTransitionException.java index ef85d50fddf..58602e343a1 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanStateTransitionException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanStateTransitionException.java @@ -6,9 +6,9 @@ * 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 @@ -27,7 +27,7 @@ public class InvalidLoanStateTransitionException extends AbstractPlatformDomainRuleException { public InvalidLoanStateTransitionException(final String action, final String postFix, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg.loan." + action + "." + postFix, defaultUserMessage, defaultUserMessageArgs); } } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanTransactionTypeException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanTransactionTypeException.java index 8b8342295e0..ddb0fc86697 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanTransactionTypeException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanTransactionTypeException.java @@ -6,9 +6,9 @@ * 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 @@ -27,7 +27,7 @@ public class InvalidLoanTransactionTypeException extends AbstractPlatformDomainRuleException { public InvalidLoanTransactionTypeException(final String action, final String postFix, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg.loan." + action + "." + postFix, defaultUserMessage, defaultUserMessageArgs); } } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanTypeException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanTypeException.java index 94e063a4907..c75ab571775 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanTypeException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidLoanTypeException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidPaidInAdvanceAmountException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidPaidInAdvanceAmountException.java index d46339e9084..8c01bdc2294 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidPaidInAdvanceAmountException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidPaidInAdvanceAmountException.java @@ -6,9 +6,9 @@ * 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 @@ -29,7 +29,7 @@ public class InvalidPaidInAdvanceAmountException extends AbstractPlatformDomainR public InvalidPaidInAdvanceAmountException(final String refundAmountString) { super("error.msg.loan.refund.amount.invalid", "The refund amount `" + refundAmountString + "`" + "` is invalid or loan is not paid in advance.", - new Object[] { refundAmountString }); + new Object[]{refundAmountString}); } } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidRefundDateException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidRefundDateException.java index de90e8faa3d..e03daa9868e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidRefundDateException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/InvalidRefundDateException.java @@ -6,9 +6,9 @@ * 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 @@ -25,7 +25,7 @@ public class InvalidRefundDateException extends AbstractPlatformDomainRuleExcept public InvalidRefundDateException(final String refundDateAsString) { super("error.msg.loan.refund.failed", "The refund date`" + refundDateAsString + "`" + "` cannot be before the smallest repayment transaction date", - new Object[] { refundDateAsString }); + new Object[]{refundDateAsString}); } public InvalidRefundDateException(final String defaultUserMessage, final String entity, final Object... defaultUserMessageArgs) { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationDateException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationDateException.java index 7796c6637af..12a7d4bca1b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationDateException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationDateException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeDeleted.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeDeleted.java index 751d2e8e267..55484d767bb 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeDeleted.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeDeleted.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeModified.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeModified.java index 0f3fd367d1d..d05c36b7e0b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeModified.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanApplicationNotInSubmittedAndPendingApprovalStateCannotBeModified.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanChargeAdjustmentException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanChargeAdjustmentException.java index da5e52918fe..3a7cfd6a15f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanChargeAdjustmentException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanChargeAdjustmentException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanChargeDeactivationException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanChargeDeactivationException.java index ccc9b2a0568..f23d0e5e4ef 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanChargeDeactivationException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanChargeDeactivationException.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,7 @@ public class LoanChargeDeactivationException extends AbstractPlatformDomainRuleException { public LoanChargeDeactivationException(final String errorCode, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg." + errorCode, defaultUserMessage, defaultUserMessageArgs); } } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanChargeRefundException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanChargeRefundException.java index 54848d422f7..0bd58287cc5 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanChargeRefundException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanChargeRefundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanDisbursalException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanDisbursalException.java index e319217b1a8..8fa8dff1a10 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanDisbursalException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanDisbursalException.java @@ -6,9 +6,9 @@ * 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 @@ -25,7 +25,7 @@ public class LoanDisbursalException extends AbstractPlatformDomainRuleException public LoanDisbursalException(final String currentProduct, final String restrictedProduct) { super("error.msg.loan.disbursal.failed", "This loan could not be disbursed as `" + currentProduct + "` and `" + restrictedProduct + "` are not allowed to co-exist", - new Object[] { currentProduct, restrictedProduct }); + new Object[]{currentProduct, restrictedProduct}); } public LoanDisbursalException(final String defaultUserMessage, final String entity, final Object... defaultUserMessageArgs) { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanForeclosureException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanForeclosureException.java index 79eb7d9e156..d228ec2299c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanForeclosureException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanForeclosureException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanMultiDisbursementException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanMultiDisbursementException.java index f538e476f37..2bb1c5d76fc 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanMultiDisbursementException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanMultiDisbursementException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanNotFoundException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanNotFoundException.java index aa97f8c7771..69fff065990 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanNotFoundException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanOfficerAssignmentDateException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanOfficerAssignmentDateException.java index 918dbf46824..1fd1539d531 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanOfficerAssignmentDateException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanOfficerAssignmentDateException.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,7 @@ public class LoanOfficerAssignmentDateException extends AbstractPlatformDomainRuleException { public LoanOfficerAssignmentDateException(final String postFix, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg.loan.assignment.date." + postFix, defaultUserMessage, defaultUserMessageArgs); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanOfficerAssignmentException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanOfficerAssignmentException.java index d97fa8eda01..061223b73ba 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanOfficerAssignmentException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanOfficerAssignmentException.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.exception; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; public class LoanOfficerAssignmentException extends AbstractPlatformDomainRuleException { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanOfficerUnassignmentDateException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanOfficerUnassignmentDateException.java index 297433d4d2d..289fac867cc 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanOfficerUnassignmentDateException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanOfficerUnassignmentDateException.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,7 @@ public class LoanOfficerUnassignmentDateException extends AbstractPlatformDomainRuleException { public LoanOfficerUnassignmentDateException(final String postFix, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg.loan.loanofficer.unassign.date." + postFix, defaultUserMessage, defaultUserMessageArgs); } } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanOfficerUnassignmentException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanOfficerUnassignmentException.java index 0b8afb965d1..e4db72d2875 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanOfficerUnassignmentException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanOfficerUnassignmentException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanRepaymentScheduleNotFoundException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanRepaymentScheduleNotFoundException.java index 5ca96c147f2..6a4212d991c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanRepaymentScheduleNotFoundException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanRepaymentScheduleNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTemplateTypeRequiredException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTemplateTypeRequiredException.java index b151a8cc7d6..b2409933693 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTemplateTypeRequiredException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTemplateTypeRequiredException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTransactionProcessingException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTransactionProcessingException.java index ed90a98c754..bba6dd363a5 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTransactionProcessingException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTransactionProcessingException.java @@ -6,9 +6,9 @@ * 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 @@ -30,7 +30,7 @@ public LoanTransactionProcessingException(final String defaultUserMessage, final } public LoanTransactionProcessingException(final String action, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg.loan.transaction." + action, defaultUserMessage, defaultUserMessageArgs); } } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTransactionProcessingStrategyNotFoundException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTransactionProcessingStrategyNotFoundException.java index 35745f1d8ed..84409df2f5f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTransactionProcessingStrategyNotFoundException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/LoanTransactionProcessingStrategyNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/MinDaysBetweenDisbursalAndFirstRepaymentViolationException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/MinDaysBetweenDisbursalAndFirstRepaymentViolationException.java index 4650808e035..75d13951f84 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/MinDaysBetweenDisbursalAndFirstRepaymentViolationException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/MinDaysBetweenDisbursalAndFirstRepaymentViolationException.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.exception; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; /** @@ -29,7 +30,7 @@ public class MinDaysBetweenDisbursalAndFirstRepaymentViolationException extends AbstractPlatformDomainRuleException { public MinDaysBetweenDisbursalAndFirstRepaymentViolationException(final LocalDate disbursalDate, final LocalDate firstRepaymentDate, - Integer minimumDaysBetweenDisbursalAndFirstRepayment) { + Integer minimumDaysBetweenDisbursalAndFirstRepayment) { super("error.msg.loan.days.between.first.repayment.and.disbursal.are.less.than.minimum.allowed", "Number of days between loan disbursal (" + disbursalDate + ") and first repayment (" + firstRepaymentDate + ") can't be less than (" + minimumDaysBetweenDisbursalAndFirstRepayment + ").", diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/MultiDisbursementDataNotAllowedException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/MultiDisbursementDataNotAllowedException.java index 9a9caddd56f..be440c9f88d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/MultiDisbursementDataNotAllowedException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/MultiDisbursementDataNotAllowedException.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,7 @@ public class MultiDisbursementDataNotAllowedException extends AbstractPlatformDomainRuleException { public MultiDisbursementDataNotAllowedException(final String entity, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg." + entity + ".not.allowed", defaultUserMessage, defaultUserMessageArgs); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/MultiDisbursementDataRequiredException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/MultiDisbursementDataRequiredException.java index 456363fe3b5..3374dce5cb7 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/MultiDisbursementDataRequiredException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/MultiDisbursementDataRequiredException.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,7 @@ public class MultiDisbursementDataRequiredException extends AbstractPlatformDomainRuleException { public MultiDisbursementDataRequiredException(final String entity, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg." + entity + ".required", defaultUserMessage, defaultUserMessageArgs); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/NotSupportedLoanTemplateTypeException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/NotSupportedLoanTemplateTypeException.java index 7b1371eaf5f..09d164ec193 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/NotSupportedLoanTemplateTypeException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/NotSupportedLoanTemplateTypeException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/UndoLastTrancheDisbursementException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/UndoLastTrancheDisbursementException.java index cd3031e5af0..a6b099be4ab 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/UndoLastTrancheDisbursementException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/exception/UndoLastTrancheDisbursementException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/GuarantorConstants.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/GuarantorConstants.java index ee524027743..8409f159d64 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/GuarantorConstants.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/GuarantorConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/command/GuarantorCommand.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/command/GuarantorCommand.java index 462ae9e33ca..951c6fd404c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/command/GuarantorCommand.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/command/GuarantorCommand.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; @@ -57,9 +58,9 @@ public class GuarantorCommand { private final BigDecimal amount; public GuarantorCommand(final Long clientRelationshipTypeId, final Integer guarantorTypeId, final Long entityId, final String firstname, - final String lastname, final String addressLine1, final String addressLine2, final String city, final String state, - final String zip, final String country, final String mobileNumber, final String housePhoneNumber, final String comment, - final LocalDate dob, final Long savingsId, final BigDecimal amount) { + final String lastname, final String addressLine1, final String addressLine2, final String city, final String state, + final String zip, final String country, final String mobileNumber, final String housePhoneNumber, final String comment, + final LocalDate dob, final Long savingsId, final BigDecimal amount) { this.clientRelationshipTypeId = clientRelationshipTypeId; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorDTO.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorDTO.java index 937e8e26f12..f8e0cc900f4 100755 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorDTO.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorDTO.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.guarantor.data; import java.math.BigDecimal; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; public class GuarantorDTO { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/IGuarantor.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/IGuarantor.java index cb1d9118835..3dd584ee436 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/IGuarantor.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/IGuarantor.java @@ -6,9 +6,9 @@ * 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 @@ -20,4 +20,5 @@ import java.io.Serializable; -public interface IGuarantor extends Serializable {} +public interface IGuarantor extends Serializable { +} diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/ObligeeData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/ObligeeData.java index f2e2f2be125..fcfcd541d3b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/ObligeeData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/ObligeeData.java @@ -6,9 +6,9 @@ * 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 @@ -34,7 +34,7 @@ public final class ObligeeData { private final BigDecimal amountTransferred; private ObligeeData(String firstName, String lastName, String displayName, String accountNumber, BigDecimal loanAmount, - BigDecimal guaranteeAmount, BigDecimal amountReleased, BigDecimal amountTransferred) { + BigDecimal guaranteeAmount, BigDecimal amountReleased, BigDecimal amountTransferred) { this.firstName = firstName; this.lastName = lastName; this.displayName = displayName; @@ -46,8 +46,8 @@ private ObligeeData(String firstName, String lastName, String displayName, Strin } public static ObligeeData instance(final String firstName, final String lastName, final String displayName, final String accountNumber, - final BigDecimal loanAmount, final BigDecimal guaranteeAmount, final BigDecimal amountReleased, - final BigDecimal amountTransferred) { + final BigDecimal loanAmount, final BigDecimal guaranteeAmount, final BigDecimal amountReleased, + final BigDecimal amountTransferred) { return new ObligeeData(firstName, lastName, displayName, accountNumber, loanAmount, guaranteeAmount, amountReleased, amountTransferred); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundStatusType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundStatusType.java index e38a7e7e781..2e7941b8bf6 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundStatusType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundStatusType.java @@ -6,9 +6,9 @@ * 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 @@ -38,16 +38,16 @@ public static GuarantorFundStatusType fromInt(final Integer type) { switch (type) { case 100: enumeration = GuarantorFundStatusType.ACTIVE; - break; + break; case 200: enumeration = GuarantorFundStatusType.COMPLETED; - break; + break; case 300: enumeration = GuarantorFundStatusType.WITHDRAWN; - break; + break; case 400: enumeration = GuarantorFundStatusType.DELETED; - break; + break; } return enumeration; } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorType.java index 966274a4c5e..b704483c4a1 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/exception/DuplicateGuarantorException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/exception/DuplicateGuarantorException.java index c14901fe2b7..2374bfbd54c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/exception/DuplicateGuarantorException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/exception/DuplicateGuarantorException.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,7 @@ public class DuplicateGuarantorException extends AbstractPlatformDomainRuleException { public DuplicateGuarantorException(final String action, final String postFix, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg." + action + "." + postFix, defaultUserMessage, defaultUserMessageArgs); // TODO Auto-generated constructor stub } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/exception/GuarantorNotFoundException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/exception/GuarantorNotFoundException.java index b5cc3cf9dbd..7c770e982ca 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/exception/GuarantorNotFoundException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/exception/GuarantorNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/exception/InvalidGuarantorException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/exception/InvalidGuarantorException.java index 7c7ec95806b..d98f2f8f8ed 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/exception/InvalidGuarantorException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/exception/InvalidGuarantorException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/handler/CreateGuarantorCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/handler/CreateGuarantorCommandHandler.java index a532507f45d..846cd393f41 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/handler/CreateGuarantorCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/handler/CreateGuarantorCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/handler/DeleteGuarantorCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/handler/DeleteGuarantorCommandHandler.java index 032efa57b61..02179b2644f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/handler/DeleteGuarantorCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/handler/DeleteGuarantorCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/handler/UpdateGuarantorCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/handler/UpdateGuarantorCommandHandler.java index 808eb669b38..b0d9740f83d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/handler/UpdateGuarantorCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/handler/UpdateGuarantorCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/serialization/GuarantorCommandFromApiJsonDeserializer.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/serialization/GuarantorCommandFromApiJsonDeserializer.java index f14da974131..291903bb8e2 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/serialization/GuarantorCommandFromApiJsonDeserializer.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/serialization/GuarantorCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,12 +20,14 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; import java.util.Locale; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.exception.InvalidJsonException; import org.apache.fineract.infrastructure.core.serialization.AbstractFromApiJsonDeserializer; @@ -55,7 +57,8 @@ public GuarantorCommand commandFromApiJson(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final Set supportedParameters = GuarantorJSONinputParams.getAllValues(); supportedParameters.add("locale"); supportedParameters.add("dateFormat"); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorEnumerations.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorEnumerations.java index ac7cff27bcb..d14e47ce29f 100755 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorEnumerations.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.loanaccount.guarantor.domain.GuarantorFundStatusType; import org.apache.fineract.portfolio.loanaccount.guarantor.domain.GuarantorType; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorWritePlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorWritePlatformService.java index f545a26c53e..feb9f42ac22 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorWritePlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/AddAndDeleteLoanDisburseDetailsCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/AddAndDeleteLoanDisburseDetailsCommandHandler.java index 07c161bdb52..59025a00b12 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/AddAndDeleteLoanDisburseDetailsCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/AddAndDeleteLoanDisburseDetailsCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/AddLoanChargeCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/AddLoanChargeCommandHandler.java index 46c50bb5bfd..93d8aa56f9d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/AddLoanChargeCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/AddLoanChargeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/BulkUpdateLoanOfficerCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/BulkUpdateLoanOfficerCommandHandler.java index aac2d9dbc71..b2afcf7ba8a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/BulkUpdateLoanOfficerCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/BulkUpdateLoanOfficerCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/ChargeOffLoanCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/ChargeOffLoanCommandHandler.java index acf640f21c1..d2d2f535a96 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/ChargeOffLoanCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/ChargeOffLoanCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/CloseLoanAsRescheduledCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/CloseLoanAsRescheduledCommandHandler.java index d45b62f25a5..c8977123866 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/CloseLoanAsRescheduledCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/CloseLoanAsRescheduledCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/CloseLoanCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/CloseLoanCommandHandler.java index c95416c65d4..e182b62b75d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/CloseLoanCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/CloseLoanCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/CreditBalanceRefundCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/CreditBalanceRefundCommandHandler.java index 43aad521145..a3527f1c58f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/CreditBalanceRefundCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/CreditBalanceRefundCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/DeleteLoanChargeCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/DeleteLoanChargeCommandHandler.java index b758e4d25a3..aa92bd06842 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/DeleteLoanChargeCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/DeleteLoanChargeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/DisburseLoanCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/DisburseLoanCommandHandler.java index 83267c329fd..19d8afd86fe 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/DisburseLoanCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/DisburseLoanCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/DisburseLoanToSavingsCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/DisburseLoanToSavingsCommandHandler.java index 762b7c389ba..f86c7f64fb7 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/DisburseLoanToSavingsCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/DisburseLoanToSavingsCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/DisburseLoanWithoutAutoPaymentHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/DisburseLoanWithoutAutoPaymentHandler.java index 54a09e74af4..1d5204d602b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/DisburseLoanWithoutAutoPaymentHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/DisburseLoanWithoutAutoPaymentHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/ForeClosureCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/ForeClosureCommandHandler.java index caf039903d7..2f022ac46b3 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/ForeClosureCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/ForeClosureCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/GLIMApplicationRejectionCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/GLIMApplicationRejectionCommandHandler.java index 391a81229fb..4c9c78b4d38 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/GLIMApplicationRejectionCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/GLIMApplicationRejectionCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/GLIMBulkRepaymentCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/GLIMBulkRepaymentCommandHandler.java index 3df1773170f..8b957caf730 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/GLIMBulkRepaymentCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/GLIMBulkRepaymentCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/GLIMLoanApplicationApprovalCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/GLIMLoanApplicationApprovalCommandHandler.java index c757595e6b2..dfdc2aec072 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/GLIMLoanApplicationApprovalCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/GLIMLoanApplicationApprovalCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/GlimLoanApplicationDisburseCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/GlimLoanApplicationDisburseCommandHandler.java index 3a3d5faaf1f..f26e19fc625 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/GlimLoanApplicationDisburseCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/GlimLoanApplicationDisburseCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationApprovalCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationApprovalCommandHandler.java index 55ff61894bc..a44109b9110 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationApprovalCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationApprovalCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationApprovalUndoCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationApprovalUndoCommandHandler.java index 6860885a1fd..741d00a5b90 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationApprovalUndoCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationApprovalUndoCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationDeletionCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationDeletionCommandHandler.java index fa0e328d92e..f07cce1b755 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationDeletionCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationDeletionCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationModificationCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationModificationCommandHandler.java index 21e33872935..4e0ce5796ac 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationModificationCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationModificationCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationRejectedCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationRejectedCommandHandler.java index 39d07364a01..24e30ec312c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationRejectedCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationRejectedCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationSubmittalCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationSubmittalCommandHandler.java index bdfc0e49929..c4e02abc0e1 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationSubmittalCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationSubmittalCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationWithdrawnByApplicantCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationWithdrawnByApplicantCommandHandler.java index e1965a4f668..56fa5484626 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationWithdrawnByApplicantCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApplicationWithdrawnByApplicantCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApprovedAmountModificationCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApprovedAmountModificationCommandHandler.java index a88a6b4965c..ef90f46d458 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApprovedAmountModificationCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanApprovedAmountModificationCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanAvailableDisbursementAmountModificationCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanAvailableDisbursementAmountModificationCommandHandler.java index 99e545aae6e..a7f9442d1a6 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanAvailableDisbursementAmountModificationCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanAvailableDisbursementAmountModificationCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanChargeAdjustmentCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanChargeAdjustmentCommandHandler.java index 67769a8428b..13ebf5d3942 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanChargeAdjustmentCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanChargeAdjustmentCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanChargeDeactivateOverdueCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanChargeDeactivateOverdueCommandHandler.java index d40fe0a1149..541d00aee1d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanChargeDeactivateOverdueCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanChargeDeactivateOverdueCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanChargeRefundCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanChargeRefundCommandHandler.java index 245cf24734c..75d9b04e1af 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanChargeRefundCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanChargeRefundCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanDownPaymentCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanDownPaymentCommandHandler.java index ab2ce495db3..ed998ee9d8a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanDownPaymentCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanDownPaymentCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanGoodwillCreditCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanGoodwillCreditCommandHandler.java index 196dd35a321..08b2d5f6217 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanGoodwillCreditCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanGoodwillCreditCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanMerchantIssuedRefundCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanMerchantIssuedRefundCommandHandler.java index 41f371a8dcd..716e18a20ed 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanMerchantIssuedRefundCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanMerchantIssuedRefundCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanPayoutRefundCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanPayoutRefundCommandHandler.java index 54dcbe4173e..cd4e03ea9c7 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanPayoutRefundCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanPayoutRefundCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRecoveryPaymentCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRecoveryPaymentCommandHandler.java index 8004f99f670..b20bdd90374 100755 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRecoveryPaymentCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRecoveryPaymentCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRefundByCashCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRefundByCashCommandHandler.java index d61a626d6f6..82d06faf18a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRefundByCashCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRefundByCashCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRepaymentAdjustmentCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRepaymentAdjustmentCommandHandler.java index 3e313f152b7..b279dd0322a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRepaymentAdjustmentCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRepaymentAdjustmentCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRepaymentChargebackCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRepaymentChargebackCommandHandler.java index 58991fac3ef..41158a7389b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRepaymentChargebackCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRepaymentChargebackCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRepaymentCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRepaymentCommandHandler.java index 28d679b7697..f8f9539c49b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRepaymentCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanRepaymentCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanScheduleCreateVariationCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanScheduleCreateVariationCommandHandler.java index af9c6357572..77ccf640284 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanScheduleCreateVariationCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanScheduleCreateVariationCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanScheduleDeleteVariationCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanScheduleDeleteVariationCommandHandler.java index e6e9626247d..cfab50eefe5 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanScheduleDeleteVariationCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanScheduleDeleteVariationCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/ManualInterestRefundCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/ManualInterestRefundCommandHandler.java index b5257eecde9..85eb98b504f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/ManualInterestRefundCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/ManualInterestRefundCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/MarkLoanAsFraudCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/MarkLoanAsFraudCommandHandler.java index e481cb5c9b7..f39a8819e9e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/MarkLoanAsFraudCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/MarkLoanAsFraudCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/PayLoanChargeCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/PayLoanChargeCommandHandler.java index 1d3a25101db..bd7c0788e5b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/PayLoanChargeCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/PayLoanChargeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/RecoverFromGuarantorCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/RecoverFromGuarantorCommandHandler.java index 2c25fdfd7ab..c2a912488d0 100755 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/RecoverFromGuarantorCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/RecoverFromGuarantorCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/RemoveLoanOfficerCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/RemoveLoanOfficerCommandHandler.java index 15e791cb153..417244ac3f3 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/RemoveLoanOfficerCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/RemoveLoanOfficerCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoChargeOffLoanCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoChargeOffLoanCommandHandler.java index 90e324bc084..da43f952239 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoChargeOffLoanCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoChargeOffLoanCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoDisbursalLoanCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoDisbursalLoanCommandHandler.java index f1214b77259..953f40af953 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoDisbursalLoanCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoDisbursalLoanCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoGLIMLoanApplicationApproval.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoGLIMLoanApplicationApproval.java index f16c0ba43b5..9cb3212b92c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoGLIMLoanApplicationApproval.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoGLIMLoanApplicationApproval.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoGLIMLoanDisbursalCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoGLIMLoanDisbursalCommandHandler.java index 7ab5b49acb7..e6953b1af36 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoGLIMLoanDisbursalCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoGLIMLoanDisbursalCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoLastDisbursalLoanCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoLastDisbursalLoanCommandHandler.java index edf72ab227c..7f505e6f9fc 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoLastDisbursalLoanCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoLastDisbursalLoanCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoLoanChargeWaiveCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoLoanChargeWaiveCommandHandler.java index 9bd0b61da4e..61bfb0ad4c9 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoLoanChargeWaiveCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoLoanChargeWaiveCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoWriteOffLoanCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoWriteOffLoanCommandHandler.java index f0559fa6520..f735093764a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoWriteOffLoanCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UndoWriteOffLoanCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UpdateLoanChargeCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UpdateLoanChargeCommandHandler.java index 7392b95ae72..ce1a2896d5d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UpdateLoanChargeCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UpdateLoanChargeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UpdateLoanDisburseDateCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UpdateLoanDisburseDateCommandHandler.java index 17fa829dcff..f7196a2e93a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UpdateLoanDisburseDateCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UpdateLoanDisburseDateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UpdateLoanOfficerCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UpdateLoanOfficerCommandHandler.java index 5d840bf6efa..73081b13f1f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UpdateLoanOfficerCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/UpdateLoanOfficerCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/WaiveInterestPortionOnLoanCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/WaiveInterestPortionOnLoanCommandHandler.java index a80f32b47e7..d361c937c4a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/WaiveInterestPortionOnLoanCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/WaiveInterestPortionOnLoanCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/WaiveLoanChargeCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/WaiveLoanChargeCommandHandler.java index 1537393f3ce..a356db1343c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/WaiveLoanChargeCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/WaiveLoanChargeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/WriteOffLoanCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/WriteOffLoanCommandHandler.java index 297f85a18bc..ebac23adf1a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/WriteOffLoanCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/WriteOffLoanCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addperiodicaccrualentries/AddPeriodicAccrualEntriesConfig.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addperiodicaccrualentries/AddPeriodicAccrualEntriesConfig.java index 49a0d29af78..09e4b582d7c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addperiodicaccrualentries/AddPeriodicAccrualEntriesConfig.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addperiodicaccrualentries/AddPeriodicAccrualEntriesConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addperiodicaccrualentries/AddPeriodicAccrualEntriesTasklet.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addperiodicaccrualentries/AddPeriodicAccrualEntriesTasklet.java index 405b513522a..86ecb8d1273 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addperiodicaccrualentries/AddPeriodicAccrualEntriesTasklet.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addperiodicaccrualentries/AddPeriodicAccrualEntriesTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.jobs.addperiodicaccrualentries; import java.time.LocalDate; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.exception.MultiException; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/setloandelinquencytags/SetLoanDelinquencyTagsConfig.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/setloandelinquencytags/SetLoanDelinquencyTagsConfig.java index f15ead37acb..8b78ee13963 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/setloandelinquencytags/SetLoanDelinquencyTagsConfig.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/setloandelinquencytags/SetLoanDelinquencyTagsConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/setloandelinquencytags/SetLoanDelinquencyTagsTasklet.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/setloandelinquencytags/SetLoanDelinquencyTagsTasklet.java index ccf54f3dd00..532de59611d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/setloandelinquencytags/SetLoanDelinquencyTagsTasklet.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/setloandelinquencytags/SetLoanDelinquencyTagsTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.domain.ActionContext; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsageing/LoanArrearsAgeingUpdateHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsageing/LoanArrearsAgeingUpdateHandler.java index c9bf5bf86d3..4669d9367aa 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsageing/LoanArrearsAgeingUpdateHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsageing/LoanArrearsAgeingUpdateHandler.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; @@ -83,7 +84,7 @@ public void updateLoanArrearsAgeingDetails(List loanIdsForUpdate) { List batch = new ArrayList(); if (!loanIdsForUpdate.isEmpty()) { for (Long loanId : loanIdsForUpdate) { - Object[] values = new Object[] { loanId }; + Object[] values = new Object[]{loanId}; batch.add(values); } } @@ -154,7 +155,7 @@ private List updateLoanArrearsAgeingDetailsWithOriginalSchedule(List loanIds = this.jdbcTemplate.queryForList(sqlForLoanIdentifiers, loanIdsForQuery.toArray(), new int[] { Types.BIGINT }, + List loanIds = this.jdbcTemplate.queryForList(sqlForLoanIdentifiers, loanIdsForQuery.toArray(), new int[]{Types.BIGINT}, Long.class); if (!loanIds.isEmpty()) { Map> scheduleDate = getScheduleDate(loanIds); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsageing/UpdateLoanArrearsAgeingConfig.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsageing/UpdateLoanArrearsAgeingConfig.java index 063285c1826..7c8eb197e2f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsageing/UpdateLoanArrearsAgeingConfig.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsageing/UpdateLoanArrearsAgeingConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsageing/UpdateLoanArrearsAgeingTasklet.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsageing/UpdateLoanArrearsAgeingTasklet.java index ce8fb3d88b5..acccf083f7c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsageing/UpdateLoanArrearsAgeingTasklet.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/updateloanarrearsageing/UpdateLoanArrearsAgeingTasklet.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/InterestRecalculationAdditionalDetailData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/InterestRecalculationAdditionalDetailData.java index da6374263bc..c9be3a6d82e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/InterestRecalculationAdditionalDetailData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/InterestRecalculationAdditionalDetailData.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.LocalDate; import java.util.HashSet; import java.util.Set; + import lombok.AllArgsConstructor; import lombok.Getter; import org.apache.fineract.portfolio.loanaccount.domain.LoanInterestRecalcualtionAdditionalDetails; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleDTO.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleDTO.java index c3fd4ef9909..5caeec40a3e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleDTO.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleDTO.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.loanschedule.data; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment; import org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanScheduleModel; @@ -36,7 +37,7 @@ private LoanScheduleDTO(final List installment } public static LoanScheduleDTO from(final List installments, - final LoanScheduleModel loanScheduleModel) { + final LoanScheduleModel loanScheduleModel) { return new LoanScheduleDTO(installments, loanScheduleModel); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleData.java index 4f7a4d15388..4f203ff51a6 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.util.Collection; + import lombok.Getter; import org.apache.fineract.organisation.monetary.data.CurrencyData; @@ -64,11 +65,11 @@ public class LoanScheduleData { private Collection futurePeriods; public LoanScheduleData(final CurrencyData currency, final Collection periods, final Integer loanTermInDays, - final BigDecimal totalPrincipalDisbursed, final BigDecimal totalPrincipalExpected, final BigDecimal totalPrincipalPaid, - final BigDecimal totalInterestCharged, final BigDecimal totalFeeChargesCharged, final BigDecimal totalPenaltyChargesCharged, - final BigDecimal totalWaived, final BigDecimal totalWrittenOff, final BigDecimal totalRepaymentExpected, - final BigDecimal totalRepayment, final BigDecimal totalPaidInAdvance, final BigDecimal totalPaidLate, - final BigDecimal totalOutstanding, final BigDecimal totalCredits) { + final BigDecimal totalPrincipalDisbursed, final BigDecimal totalPrincipalExpected, final BigDecimal totalPrincipalPaid, + final BigDecimal totalInterestCharged, final BigDecimal totalFeeChargesCharged, final BigDecimal totalPenaltyChargesCharged, + final BigDecimal totalWaived, final BigDecimal totalWrittenOff, final BigDecimal totalRepaymentExpected, + final BigDecimal totalRepayment, final BigDecimal totalPaidInAdvance, final BigDecimal totalPaidLate, + final BigDecimal totalOutstanding, final BigDecimal totalCredits) { this.currency = currency; this.periods = periods; this.loanTermInDays = loanTermInDays; @@ -89,8 +90,8 @@ public LoanScheduleData(final CurrencyData currency, final Collection periods, final Integer loanTermInDays, - final BigDecimal totalPrincipalDisbursed, final BigDecimal totalPrincipalExpected, final BigDecimal totalInterestCharged, - final BigDecimal totalFeeChargesCharged, final BigDecimal totalPenaltyChargesCharged, final BigDecimal totalRepaymentExpected) { + final BigDecimal totalPrincipalDisbursed, final BigDecimal totalPrincipalExpected, final BigDecimal totalInterestCharged, + final BigDecimal totalFeeChargesCharged, final BigDecimal totalPenaltyChargesCharged, final BigDecimal totalRepaymentExpected) { this.currency = currency; this.periods = periods; this.loanTermInDays = loanTermInDays; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleModelDownPaymentPeriod.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleModelDownPaymentPeriod.java index 4931a78b09c..57932886820 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleModelDownPaymentPeriod.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleModelDownPaymentPeriod.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.Set; + import lombok.Getter; import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanScheduleModelPeriod; @@ -34,7 +35,7 @@ public final class LoanScheduleModelDownPaymentPeriod implements LoanScheduleMod private final Money outstandingLoanBalance; public static LoanScheduleModelDownPaymentPeriod downPayment(final int periodNumber, final LocalDate periodDate, - final Money principalDue, final Money outstandingLoanBalance) { + final Money principalDue, final Money outstandingLoanBalance) { return new LoanScheduleModelDownPaymentPeriod(periodNumber, periodDate, principalDue, outstandingLoanBalance); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleParams.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleParams.java index 2c4e95993bf..78d7f702d89 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleParams.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanScheduleParams.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.List; import java.util.Map; import java.util.TreeMap; + import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment; @@ -102,15 +103,15 @@ public void setCompoundedInLastInstallment(Money compoundedInLastInstallment) { private final MathContext mc; private LoanScheduleParams(final int periodNumber, final int instalmentNumber, int loanTermInDays, LocalDate periodStartDate, - final LocalDate actualRepaymentDate, final Money totalCumulativePrincipal, final Money totalCumulativeInterest, - final Money totalFeeChargesCharged, final Money totalPenaltyChargesCharged, final Money totalRepaymentExpected, - Money totalOutstandingInterestPaymentDueToGrace, final Money reducePrincipal, final Map principalPortionMap, - final Map latePaymentMap, final Map compoundingMap, final Money unCompoundedAmount, - final Map disburseDetailMap, Money principalToBeScheduled, final Money outstandingBalance, - final Money outstandingBalanceAsPerRest, final List installments, - final Collection recalculationDetails, - final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, final LocalDate scheduleTillDate, - final boolean partialUpdate, final CurrencyData currency, final boolean applyInterestRecalculation, final MathContext mc) { + final LocalDate actualRepaymentDate, final Money totalCumulativePrincipal, final Money totalCumulativeInterest, + final Money totalFeeChargesCharged, final Money totalPenaltyChargesCharged, final Money totalRepaymentExpected, + Money totalOutstandingInterestPaymentDueToGrace, final Money reducePrincipal, final Map principalPortionMap, + final Map latePaymentMap, final Map compoundingMap, final Money unCompoundedAmount, + final Map disburseDetailMap, Money principalToBeScheduled, final Money outstandingBalance, + final Money outstandingBalanceAsPerRest, final List installments, + final Collection recalculationDetails, + final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, final LocalDate scheduleTillDate, + final boolean partialUpdate, final CurrencyData currency, final boolean applyInterestRecalculation, final MathContext mc) { this.periodNumber = periodNumber; this.instalmentNumber = instalmentNumber; this.loanTermInDays = loanTermInDays; @@ -145,15 +146,15 @@ private LoanScheduleParams(final int periodNumber, final int instalmentNumber, i } public static LoanScheduleParams createLoanScheduleParamsForPartialUpdate(final int periodNumber, final int instalmentNumber, - int loanTermInDays, LocalDate periodStartDate, final LocalDate actualRepaymentDate, final Money totalCumulativePrincipal, - final Money totalCumulativeInterest, final Money totalFeeChargesCharged, final Money totalPenaltyChargesCharged, - final Money totalRepaymentExpected, Money totalOutstandingInterestPaymentDueToGrace, final Money reducePrincipal, - final Map principalPortionMap, final Map latePaymentMap, - final Map compoundingMap, Money unCompoundedAmount, final Map disburseDetailMap, - final Money principalToBeScheduled, final Money outstandingBalance, final Money outstandingBalanceAsPerRest, - final List installments, final Collection recalculationDetails, - final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, final LocalDate scheduleTillDate, - final CurrencyData currency, final boolean applyInterestRecalculation, final MathContext mc) { + int loanTermInDays, LocalDate periodStartDate, final LocalDate actualRepaymentDate, final Money totalCumulativePrincipal, + final Money totalCumulativeInterest, final Money totalFeeChargesCharged, final Money totalPenaltyChargesCharged, + final Money totalRepaymentExpected, Money totalOutstandingInterestPaymentDueToGrace, final Money reducePrincipal, + final Map principalPortionMap, final Map latePaymentMap, + final Map compoundingMap, Money unCompoundedAmount, final Map disburseDetailMap, + final Money principalToBeScheduled, final Money outstandingBalance, final Money outstandingBalanceAsPerRest, + final List installments, final Collection recalculationDetails, + final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, final LocalDate scheduleTillDate, + final CurrencyData currency, final boolean applyInterestRecalculation, final MathContext mc) { final boolean partialUpdate = true; return new LoanScheduleParams(periodNumber, instalmentNumber, loanTermInDays, periodStartDate, actualRepaymentDate, totalCumulativePrincipal, totalCumulativeInterest, totalFeeChargesCharged, totalPenaltyChargesCharged, @@ -164,8 +165,8 @@ public static LoanScheduleParams createLoanScheduleParamsForPartialUpdate(final } public static LoanScheduleParams createLoanScheduleParamsForCompleteUpdate(final Collection recalculationDetails, - final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, final LocalDate scheduleTillDate, - final boolean applyInterestRecalculation, MathContext mc) { + final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, final LocalDate scheduleTillDate, + final boolean applyInterestRecalculation, MathContext mc) { final int periodNumber = 1; final int instalmentNumber = 1; final LocalDate periodStartDate = null; @@ -198,7 +199,7 @@ public static LoanScheduleParams createLoanScheduleParamsForCompleteUpdate(final } public static LoanScheduleParams createLoanScheduleParams(final CurrencyData currency, final Money chargesDueAtTimeOfDisbursement, - final LocalDate periodStartDate, final Money principalToBeScheduled, final MathContext mc) { + final LocalDate periodStartDate, final Money principalToBeScheduled, final MathContext mc) { final int loanTermInDays = 0; final int periodNumber = 1; final int instalmentNumber = 1; @@ -232,8 +233,8 @@ public static LoanScheduleParams createLoanScheduleParams(final CurrencyData cur } public static LoanScheduleParams createLoanScheduleParams(final CurrencyData currency, final Money chargesDueAtTimeOfDisbursement, - final LocalDate periodStartDate, final Money principalToBeScheduled, final LoanScheduleParams loanScheduleParams, - MathContext mc) { + final LocalDate periodStartDate, final Money principalToBeScheduled, final LoanScheduleParams loanScheduleParams, + MathContext mc) { final int loanTermInDays = 0; final int periodNumber = 1; final int instalmentNumber = 1; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePeriodData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePeriodData.java index 65aac943cbb..1affb798b3b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePeriodData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePeriodData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; + import lombok.Builder; import lombok.Getter; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -80,7 +81,7 @@ public final class LoanSchedulePeriodData { private final boolean downPaymentPeriod; public static LoanSchedulePeriodData disbursementOnlyPeriod(final LocalDate disbursementDate, final BigDecimal principalDisbursed, - final BigDecimal feeChargesDueAtTimeOfDisbursement, final boolean isDisbursed) { + final BigDecimal feeChargesDueAtTimeOfDisbursement, final boolean isDisbursed) { return builder().dueDate(disbursementDate) // .principalDisbursed(principalDisbursed) // .principalLoanBalanceOutstanding(principalDisbursed) // @@ -97,8 +98,8 @@ public static LoanSchedulePeriodData disbursementOnlyPeriod(final LocalDate disb } public static LoanSchedulePeriodData repaymentOnlyPeriod(final Integer periodNumber, final LocalDate fromDate, final LocalDate dueDate, - final BigDecimal principalDue, final BigDecimal outstandingLoanBalance, final BigDecimal interestDue, final BigDecimal feeDue, - final BigDecimal penaltyDue) { + final BigDecimal principalDue, final BigDecimal outstandingLoanBalance, final BigDecimal interestDue, final BigDecimal feeDue, + final BigDecimal penaltyDue) { BigDecimal totalDue = MathUtil.add(principalDue, interestDue, feeDue, penaltyDue); BigDecimal totalActualCostOfLoanForPeriod = MathUtil.add(interestDue, feeDue, penaltyDue); @@ -129,7 +130,7 @@ public static LoanSchedulePeriodData repaymentOnlyPeriod(final Integer periodNum } public static LoanSchedulePeriodData downPaymentOnlyPeriod(final Integer periodNumber, final LocalDate periodDate, - final BigDecimal principalDue, final BigDecimal outstandingLoanBalance) { + final BigDecimal principalDue, final BigDecimal outstandingLoanBalance) { return builder().period(periodNumber) // .fromDate(periodDate) // .dueDate(periodDate) // @@ -147,16 +148,16 @@ public static LoanSchedulePeriodData downPaymentOnlyPeriod(final Integer periodN } public static LoanSchedulePeriodData periodWithPayments(final Integer periodNumber, final LocalDate fromDate, final LocalDate dueDate, - final LocalDate obligationsMetOnDate, final boolean complete, final BigDecimal principalOriginalDue, - final BigDecimal principalPaid, final BigDecimal principalWrittenOff, final BigDecimal principalOutstanding, - final BigDecimal outstandingPrincipalBalanceOfLoan, final BigDecimal interestDue, final BigDecimal interestPaid, - final BigDecimal interestWaived, final BigDecimal interestWrittenOff, final BigDecimal interestOutstanding, - final BigDecimal feeChargesDue, final BigDecimal feeChargesPaid, final BigDecimal feeChargesWaived, - final BigDecimal feeChargesWrittenOff, final BigDecimal feeChargesOutstanding, final BigDecimal penaltyChargesDue, - final BigDecimal penaltyChargesPaid, final BigDecimal penaltyChargesWaived, final BigDecimal penaltyChargesWrittenOff, - final BigDecimal penaltyChargesOutstanding, final BigDecimal totalPaid, final BigDecimal totalPaidInAdvanceForPeriod, - final BigDecimal totalPaidLateForPeriod, final BigDecimal totalWaived, final BigDecimal totalWrittenOff, - final BigDecimal totalCredits, final boolean isDownPayment, final BigDecimal totalAccruedInterest) { + final LocalDate obligationsMetOnDate, final boolean complete, final BigDecimal principalOriginalDue, + final BigDecimal principalPaid, final BigDecimal principalWrittenOff, final BigDecimal principalOutstanding, + final BigDecimal outstandingPrincipalBalanceOfLoan, final BigDecimal interestDue, final BigDecimal interestPaid, + final BigDecimal interestWaived, final BigDecimal interestWrittenOff, final BigDecimal interestOutstanding, + final BigDecimal feeChargesDue, final BigDecimal feeChargesPaid, final BigDecimal feeChargesWaived, + final BigDecimal feeChargesWrittenOff, final BigDecimal feeChargesOutstanding, final BigDecimal penaltyChargesDue, + final BigDecimal penaltyChargesPaid, final BigDecimal penaltyChargesWaived, final BigDecimal penaltyChargesWrittenOff, + final BigDecimal penaltyChargesOutstanding, final BigDecimal totalPaid, final BigDecimal totalPaidInAdvanceForPeriod, + final BigDecimal totalPaidLateForPeriod, final BigDecimal totalWaived, final BigDecimal totalWrittenOff, + final BigDecimal totalCredits, final boolean isDownPayment, final BigDecimal totalAccruedInterest) { final MathContext mc = MoneyHelper.getMathContext(); @@ -212,8 +213,8 @@ public static LoanSchedulePeriodData periodWithPayments(final Integer periodNumb } public static LoanSchedulePeriodData withPaidDetail(final LoanSchedulePeriodData loanSchedulePeriodData, final boolean complete, - final BigDecimal principalPaid, final BigDecimal interestPaid, final BigDecimal feeChargesPaid, - final BigDecimal penaltyChargesPaid) { + final BigDecimal principalPaid, final BigDecimal interestPaid, final BigDecimal feeChargesPaid, + final BigDecimal penaltyChargesPaid) { BigDecimal totalOutstanding = MathUtil.subtract(loanSchedulePeriodData.totalDueForPeriod, principalPaid, interestPaid, feeChargesPaid, penaltyChargesPaid); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/OverdueLoanScheduleData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/OverdueLoanScheduleData.java index 1d5448c6cd6..aab3f049663 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/OverdueLoanScheduleData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/OverdueLoanScheduleData.java @@ -6,9 +6,9 @@ * 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 @@ -33,8 +33,8 @@ public class OverdueLoanScheduleData { private final Integer periodNumber; public OverdueLoanScheduleData(final Long loanId, final Long chargeId, final String dueDate, final BigDecimal amount, - final String dateFormat, final String locale, final BigDecimal principalOverdue, final BigDecimal interestOverdue, - final Integer periodNumber) { + final String dateFormat, final String locale, final BigDecimal principalOverdue, final BigDecimal interestOverdue, + final Integer periodNumber) { this.loanId = loanId; this.chargeId = chargeId; this.dueDate = dueDate; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractCumulativeLoanScheduleGenerator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractCumulativeLoanScheduleGenerator.java index 3db878deb64..2a3cd78a0ef 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractCumulativeLoanScheduleGenerator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AbstractCumulativeLoanScheduleGenerator.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import static org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleProcessingWrapper.isBeforePeriod; import jakarta.validation.constraints.NotNull; + import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; @@ -35,6 +36,7 @@ import java.util.Objects; import java.util.Set; import java.util.TreeMap; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.core.service.MathUtil; @@ -75,12 +77,12 @@ public abstract class AbstractCumulativeLoanScheduleGenerator implements LoanSch @Override public LoanScheduleModel generate(final MathContext mc, final LoanApplicationTerms loanApplicationTerms, - final Set loanCharges, final HolidayDetailDTO holidayDetailDTO) { + final Set loanCharges, final HolidayDetailDTO holidayDetailDTO) { return generate(mc, loanApplicationTerms, loanCharges, holidayDetailDTO, null); } private LoanScheduleModel generate(final MathContext mc, final LoanApplicationTerms loanApplicationTerms, - final Set loanCharges, final HolidayDetailDTO holidayDetailDTO, final LoanScheduleParams loanScheduleParams) { + final Set loanCharges, final HolidayDetailDTO holidayDetailDTO, final LoanScheduleParams loanScheduleParams) { // generate list of proposed schedule due dates LocalDate loanEndDate = getScheduledDateGenerator().getLastRepaymentDate(loanApplicationTerms, holidayDetailDTO); @@ -444,7 +446,7 @@ private LoanScheduleModel generate(final MathContext mc, final LoanApplicationTe } private void updateCompoundingDetails(final Collection periods, final LoanScheduleParams params, - final LoanApplicationTerms loanApplicationTerms) { + final LoanApplicationTerms loanApplicationTerms) { final Map> compoundingDetails = params.getCompoundingDateVariations(); if (compoundingDetails.isEmpty()) { return; @@ -471,8 +473,8 @@ private void updateCompoundingDetails(final Collection } private void applyChargesForCurrentPeriod(final Set loanCharges, final MonetaryCurrency currency, - LoanScheduleParams scheduleParams, LocalDate scheduledDueDate, ScheduleCurrentPeriodParams currentPeriodParams, - final MathContext mc) { + LoanScheduleParams scheduleParams, LocalDate scheduledDueDate, ScheduleCurrentPeriodParams currentPeriodParams, + final MathContext mc) { PrincipalInterest principalInterest = new PrincipalInterest(currentPeriodParams.getPrincipalForThisPeriod(), currentPeriodParams.getInterestForThisPeriod(), null); currentPeriodParams.setFeeChargesForInstallment(cumulativeFeeChargesDueWithin(scheduleParams.getPeriodStartDate(), scheduledDueDate, @@ -486,7 +488,7 @@ private void applyChargesForCurrentPeriod(final Set loanCharges, fin } private void updatePeriodsWithCharges(final MonetaryCurrency currency, LoanScheduleParams scheduleParams, - final Collection periods, final Set nonCompoundingCharges, final MathContext mc) { + final Collection periods, final Set nonCompoundingCharges, final MathContext mc) { for (LoanScheduleModelPeriod loanScheduleModelPeriod : periods) { if (loanScheduleModelPeriod.isRepaymentPeriod()) { PrincipalInterest principalInterest = new PrincipalInterest(Money.of(currency, loanScheduleModelPeriod.principalDue()), @@ -508,8 +510,8 @@ private void updatePeriodsWithCharges(final MonetaryCurrency currency, LoanSched } private void updateAmountsWithEffectiveDate(final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO, - LoanScheduleParams scheduleParams, LocalDate scheduledDueDate, ScheduleCurrentPeriodParams currentPeriodParams, - LoanScheduleModelPeriod installment, LocalDate lastRestDate) { + LoanScheduleParams scheduleParams, LocalDate scheduledDueDate, ScheduleCurrentPeriodParams currentPeriodParams, + LoanScheduleModelPeriod installment, LocalDate lastRestDate) { LocalDate amountApplicableDate = installment.periodDueDate(); if (loanApplicationTerms.isInterestBearingAndInterestRecalculationEnabled()) { amountApplicableDate = getNextRestScheduleDate(installment.periodDueDate().minusDays(1), loanApplicationTerms, @@ -524,13 +526,13 @@ private void updateAmountsWithEffectiveDate(final LoanApplicationTerms loanAppli } private LoanScheduleModelPeriod handleRecalculationForTransactions(final MathContext mc, - final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO, final MonetaryCurrency currency, - final LoanScheduleParams scheduleParams, - final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, - final Money totalInterestChargedForFullLoanTerm, final LocalDate lastRestDate, final LocalDate scheduledDueDate, - final LocalDate periodStartDateApplicableForInterest, final Collection applicableTransactions, - final ScheduleCurrentPeriodParams currentPeriodParams, final Money lastTotalOutstandingInterestPaymentDueToGrace, - final LoanScheduleModelPeriod installment, Set loanCharges) { + final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO, final MonetaryCurrency currency, + final LoanScheduleParams scheduleParams, + final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, + final Money totalInterestChargedForFullLoanTerm, final LocalDate lastRestDate, final LocalDate scheduledDueDate, + final LocalDate periodStartDateApplicableForInterest, final Collection applicableTransactions, + final ScheduleCurrentPeriodParams currentPeriodParams, final Money lastTotalOutstandingInterestPaymentDueToGrace, + final LoanScheduleModelPeriod installment, Set loanCharges) { LoanScheduleModelPeriod modifiedInstallment = installment; if (scheduleParams.applyInterestRecalculation() && loanRepaymentScheduleTransactionProcessor != null) { Money principalProcessed = Money.zero(currency); @@ -588,12 +590,12 @@ private LoanScheduleModelPeriod handleRecalculationForTransactions(final MathCon } private LoanScheduleModelPeriod handlePrepaymentOfLoan(final MathContext mc, final LoanApplicationTerms loanApplicationTerms, - final HolidayDetailDTO holidayDetailDTO, final LoanScheduleParams scheduleParams, - final Money totalInterestChargedForFullLoanTerm, final LocalDate scheduledDueDate, - LocalDate periodStartDateApplicableForInterest, final BigDecimal interestCalculationGraceOnRepaymentPeriodFraction, - final ScheduleCurrentPeriodParams currentPeriodParams, final Money lastTotalOutstandingInterestPaymentDueToGrace, - final LocalDate transactionDate, final LoanScheduleModelPeriod installment, Set loanCharges, - MonetaryCurrency currency) { + final HolidayDetailDTO holidayDetailDTO, final LoanScheduleParams scheduleParams, + final Money totalInterestChargedForFullLoanTerm, final LocalDate scheduledDueDate, + LocalDate periodStartDateApplicableForInterest, final BigDecimal interestCalculationGraceOnRepaymentPeriodFraction, + final ScheduleCurrentPeriodParams currentPeriodParams, final Money lastTotalOutstandingInterestPaymentDueToGrace, + final LocalDate transactionDate, final LoanScheduleModelPeriod installment, Set loanCharges, + MonetaryCurrency currency) { LoanScheduleModelPeriod modifiedInstallment = installment; Money outstanding = scheduleParams.getOutstandingBalance(); PrincipalInterest tempPrincipalInterest = new PrincipalInterest(currentPeriodParams.getPrincipalForThisPeriod(), @@ -678,7 +680,7 @@ private LoanScheduleModelPeriod handlePrepaymentOfLoan(final MathContext mc, fin } private void updateAmountsBasedOnCurrentEarlyPayments(final MathContext mc, final LoanApplicationTerms loanApplicationTerms, - LoanScheduleParams scheduleParams, ScheduleCurrentPeriodParams currentPeriodParams) { + LoanScheduleParams scheduleParams, ScheduleCurrentPeriodParams currentPeriodParams) { currentPeriodParams.setReducedBalance(currentPeriodParams.getEarlyPaidAmount()); currentPeriodParams.minusEarlyPaidAmount(currentPeriodParams.getPrincipalForThisPeriod()); if (currentPeriodParams.getEarlyPaidAmount().isGreaterThanZero()) { @@ -702,7 +704,7 @@ private void updateAmountsBasedOnCurrentEarlyPayments(final MathContext mc, fina } private void updatePrincipalPortionBasedOnPreviousEarlyPayments(final CurrencyData currency, final LoanScheduleParams scheduleParams, - final ScheduleCurrentPeriodParams currentPeriodParams) { + final ScheduleCurrentPeriodParams currentPeriodParams) { if (currentPeriodParams.getPrincipalForThisPeriod().isGreaterThan(scheduleParams.getReducePrincipal())) { currentPeriodParams.minusPrincipalForThisPeriod(scheduleParams.getReducePrincipal()); scheduleParams.setReducePrincipal(Money.zero(currency)); @@ -722,11 +724,11 @@ private void updateCompoundingDetails(LoanScheduleParams scheduleParams, LocalDa } private void handleRecalculationForNonDueDateTransactions(final MathContext mc, final LoanApplicationTerms loanApplicationTerms, - final Set loanCharges, final HolidayDetailDTO holidayDetailDTO, LoanScheduleParams scheduleParams, - final Collection periods, final Money totalInterestChargedForFullLoanTerm, - final LocalDate idealDisbursementDate, LocalDate firstRepaymentDate, final LocalDate lastRestDate, - final LocalDate scheduledDueDate, final LocalDate periodStartDateForInterest, - final Collection applicableTransactions, final ScheduleCurrentPeriodParams currentPeriodParams) { + final Set loanCharges, final HolidayDetailDTO holidayDetailDTO, LoanScheduleParams scheduleParams, + final Collection periods, final Money totalInterestChargedForFullLoanTerm, + final LocalDate idealDisbursementDate, LocalDate firstRepaymentDate, final LocalDate lastRestDate, + final LocalDate scheduledDueDate, final LocalDate periodStartDateForInterest, + final Collection applicableTransactions, final ScheduleCurrentPeriodParams currentPeriodParams) { if (scheduleParams.applyInterestRecalculation()) { final MonetaryCurrency currency = MonetaryCurrency.fromCurrencyData(scheduleParams.getCurrency()); final Collection interestRates = loanApplicationTerms.getLoanTermVariations().getInterestRateChanges(); @@ -967,14 +969,14 @@ private void handleRecalculationForNonDueDateTransactions(final MathContext mc, * @param detail */ private void handleLatePayments(final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO, - final MonetaryCurrency currency, LoanScheduleParams scheduleParams, LocalDate lastRestDate, RecalculationDetail detail) { + final MonetaryCurrency currency, LoanScheduleParams scheduleParams, LocalDate lastRestDate, RecalculationDetail detail) { updateLatePaidAmountsToPrincipalMap(detail.getTransaction(), loanApplicationTerms, currency, holidayDetailDTO, lastRestDate, scheduleParams); } private void updateAmountsBasedOnEarlyPayment(final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO, - LoanScheduleParams scheduleParams, final LoanScheduleModelPeriod installment, RecalculationDetail detail, Money unprocessed, - Money addToPrincipal) { + LoanScheduleParams scheduleParams, final LoanScheduleModelPeriod installment, RecalculationDetail detail, Money unprocessed, + Money addToPrincipal) { updatePrincipalPaidPortionToMap(loanApplicationTerms, holidayDetailDTO, scheduleParams.getPrincipalPortionMap(), installment, detail, unprocessed.plus(addToPrincipal), scheduleParams.getInstallments()); scheduleParams.addTotalRepaymentExpected(unprocessed.plus(addToPrincipal)); @@ -982,7 +984,7 @@ private void updateAmountsBasedOnEarlyPayment(final LoanApplicationTerms loanApp } private void updateOutstandingBalanceAsPerRest(LoanApplicationTerms loanApplicationTerms, final LoanScheduleParams scheduleParams, - final LocalDate scheduledDueDate) { + final LocalDate scheduledDueDate) { scheduleParams.setOutstandingBalanceAsPerRest(updateBalanceForInterestCalculation(scheduleParams.getPrincipalPortionMap(), scheduledDueDate, scheduleParams.getOutstandingBalanceAsPerRest())); scheduleParams.setOutstandingBalanceAsPerRest(calculateOutstandingBalanceAsPerRest(loanApplicationTerms, @@ -990,7 +992,7 @@ private void updateOutstandingBalanceAsPerRest(LoanApplicationTerms loanApplicat } private Money calculateOutstandingBalanceAsPerRest(LoanApplicationTerms loanApplicationTerms, Map disburseDetailMap, - LocalDate scheduledDueDate, Money outstandingBalance) { + LocalDate scheduledDueDate, Money outstandingBalance) { List removeFromMap = new ArrayList<>(); for (Map.Entry entry : disburseDetailMap.entrySet()) { if (!DateUtils.isAfter(entry.getKey(), scheduledDueDate)) { @@ -1019,7 +1021,7 @@ private Money calculateOutstandingBalanceAsPerRest(LoanApplicationTerms loanAppl * */ private void processDisbursements(final LoanApplicationTerms loanApplicationTerms, final BigDecimal chargesDueAtTimeOfDisbursement, - LoanScheduleParams scheduleParams, final Collection periods, final LocalDate scheduledDueDate) { + LoanScheduleParams scheduleParams, final Collection periods, final LocalDate scheduledDueDate) { for (Map.Entry disburseDetail : scheduleParams.getDisburseDetailMap().entrySet()) { if (DateUtils.isAfter(disburseDetail.getKey(), scheduleParams.getPeriodStartDate()) && !DateUtils.isAfter(disburseDetail.getKey(), scheduledDueDate)) { @@ -1073,8 +1075,8 @@ private void processDisbursements(final LoanApplicationTerms loanApplicationTerm * @return */ private LoanTermVariationParams applyLoanTermVariations(final LoanApplicationTerms loanApplicationTerms, - final LoanScheduleParams scheduleParams, final LocalDate previousRepaymentDate, final LocalDate scheduledDueDate, - Collection interestRatesForInstallments, PaymentPeriodsInOneYearCalculator calculator, MathContext mc) { + final LoanScheduleParams scheduleParams, final LocalDate previousRepaymentDate, final LocalDate scheduledDueDate, + Collection interestRatesForInstallments, PaymentPeriodsInOneYearCalculator calculator, MathContext mc) { boolean skipPeriod = false; boolean recalculateAmounts = false; LocalDate modifiedScheduledDueDate = scheduledDueDate; @@ -1132,13 +1134,13 @@ private LoanTermVariationParams applyLoanTermVariations(final LoanApplicationTer recalculateAmounts = true; } loanTermVariationsData.setProcessed(true); - break; + break; case DELETE_INSTALLMENT: if (DateUtils.isEqual(modifiedScheduledDueDate, loanTermVariationsData.getTermVariationApplicableFrom())) { skipPeriod = true; loanTermVariationsData.setProcessed(true); } - break; + break; case EMI_AMOUNT: if (loanTermVariationsData.isSpecificToInstallment()) { loanApplicationTerms.setCurrentPeriodFixedEmiAmount(loanTermVariationsData.getDecimalValue()); @@ -1148,7 +1150,7 @@ private LoanTermVariationParams applyLoanTermVariations(final LoanApplicationTer loanApplicationTerms.setFixedEmiAmount(loanTermVariationsData.getDecimalValue()); } loanTermVariationsData.setProcessed(true); - break; + break; case PRINCIPAL_AMOUNT: if (loanTermVariationsData.isSpecificToInstallment()) { loanApplicationTerms.setCurrentPeriodFixedPrincipalAmount(loanTermVariationsData.getDecimalValue()); @@ -1157,7 +1159,7 @@ private LoanTermVariationParams applyLoanTermVariations(final LoanApplicationTer loanApplicationTerms.setFixedPrincipalAmount(loanTermVariationsData.getDecimalValue()); } loanTermVariationsData.setProcessed(true); - break; + break; case EXTEND_REPAYMENT_PERIOD: Integer rescheduleNumberOfRepayments = loanApplicationTerms.getNumberOfRepayments(); rescheduleNumberOfRepayments += loanTermVariationsData.getDecimalValue().intValue(); @@ -1171,14 +1173,14 @@ private LoanTermVariationParams applyLoanTermVariations(final LoanApplicationTer adjustInstallmentOrPrincipalAmount(loanApplicationTerms, scheduleParams.getTotalCumulativePrincipal(), scheduleParams.getPeriodNumber(), mc); loanTermVariationsData.setProcessed(true); - break; + break; case GRACE_ON_PRINCIPAL: loanApplicationTerms.updatePrincipalGrace(loanTermVariationsData.getDecimalValue().intValue()); Integer interestPaymentGrace = 0; loanApplicationTerms.updateInterestPaymentGrace(interestPaymentGrace); loanApplicationTerms.updatePeriodNumberApplicableForPrincipalOrInterestGrace(scheduleParams.getPeriodNumber()); loanTermVariationsData.setProcessed(true); - break; + break; case GRACE_ON_INTEREST: loanApplicationTerms.updateInterestPaymentGrace(loanTermVariationsData.getDecimalValue().intValue()); Integer principalGrace = 0; @@ -1186,9 +1188,9 @@ private LoanTermVariationParams applyLoanTermVariations(final LoanApplicationTer loanApplicationTerms.updatePeriodNumberApplicableForPrincipalOrInterestGrace(scheduleParams.getPeriodNumber()); loanApplicationTerms.updateTotalInterestAccounted(scheduleParams.getTotalCumulativeInterest()); loanTermVariationsData.setProcessed(true); - break; + break; default: - break; + break; } } @@ -1209,8 +1211,8 @@ private LoanTermVariationParams applyLoanTermVariations(final LoanApplicationTer * @return */ private LoanTermVariationParams applyExceptionLoanTermVariations(final LoanApplicationTerms loanApplicationTerms, - final LocalDate scheduledDueDate, final ListIterator exceptionDataListIterator, int instalmentNumber, - Money totalCumulativePrincipal, Money totalCumulativeInterest, MathContext mc) { + final LocalDate scheduledDueDate, final ListIterator exceptionDataListIterator, int instalmentNumber, + Money totalCumulativePrincipal, Money totalCumulativeInterest, MathContext mc) { boolean skipPeriod = false; boolean recalculateAmounts = false; LocalDate modifiedScheduledDueDate = scheduledDueDate; @@ -1238,20 +1240,20 @@ private LoanTermVariationParams applyExceptionLoanTermVariations(final LoanAppli case INSERT_INSTALLMENT: modifiedScheduledDueDate = loanTermVariationsData.getTermVariationApplicableFrom(); variationsData.add(loanTermVariationsData); - break; + break; case DELETE_INSTALLMENT: if (DateUtils.isEqual(modifiedScheduledDueDate, loanTermVariationsData.getTermVariationApplicableFrom())) { skipPeriod = true; variationsData.add(loanTermVariationsData); } - break; + break; case GRACE_ON_PRINCIPAL: loanApplicationTerms.updatePrincipalGrace(loanTermVariationsData.getDecimalValue().intValue()); Integer interestPaymentGrace = 0; loanApplicationTerms.updateInterestPaymentGrace(interestPaymentGrace); loanApplicationTerms.updatePeriodNumberApplicableForPrincipalOrInterestGrace(instalmentNumber); variationsData.add(loanTermVariationsData); - break; + break; case GRACE_ON_INTEREST: loanApplicationTerms.updateInterestPaymentGrace(loanTermVariationsData.getDecimalValue().intValue()); Integer principalGrace = 0; @@ -1259,7 +1261,7 @@ private LoanTermVariationParams applyExceptionLoanTermVariations(final LoanAppli loanApplicationTerms.updatePeriodNumberApplicableForPrincipalOrInterestGrace(instalmentNumber); loanApplicationTerms.updateTotalInterestAccounted(totalCumulativeInterest); variationsData.add(loanTermVariationsData); - break; + break; case EXTEND_REPAYMENT_PERIOD: Integer rescheduleNumberOfRepayments = loanApplicationTerms.getNumberOfRepayments(); rescheduleNumberOfRepayments += loanTermVariationsData.getDecimalValue().intValue(); @@ -1272,9 +1274,9 @@ private LoanTermVariationParams applyExceptionLoanTermVariations(final LoanAppli loanTermVariationsData.setProcessed(true); loanApplicationTerms.updateAccountedTillPeriod(instalmentNumber - 1, totalCumulativePrincipal, totalCumulativeInterest, loanTermVariationsData.getDecimalValue().intValue()); - break; + break; default: - break; + break; } } @@ -1288,8 +1290,8 @@ private LoanTermVariationParams applyExceptionLoanTermVariations(final LoanAppli * @param interestRatesForInstallments */ private void applyLoanVariationsForPartialScheduleGenerate(final LoanApplicationTerms loanApplicationTerms, - LoanScheduleParams scheduleParams, final Collection interestRates, - final Collection interestRatesForInstallments) { + LoanScheduleParams scheduleParams, final Collection interestRates, + final Collection interestRatesForInstallments) { // Applies loan variations while (loanApplicationTerms.getLoanTermVariations().hasVariation(scheduleParams.getPeriodStartDate())) { LoanTermVariationsData variation = loanApplicationTerms.getLoanTermVariations().nextVariation(); @@ -1297,12 +1299,12 @@ private void applyLoanVariationsForPartialScheduleGenerate(final LoanApplication switch (variation.getTermVariationType()) { case EMI_AMOUNT: loanApplicationTerms.setFixedEmiAmount(variation.getDecimalValue()); - break; + break; case PRINCIPAL_AMOUNT: loanApplicationTerms.setFixedPrincipalAmount(variation.getDecimalValue()); - break; + break; default: - break; + break; } } @@ -1347,7 +1349,7 @@ private Money getPrincipalToBeScheduled(final LoanApplicationTerms loanApplicati } private void updateFixedInstallmentAmount(final MathContext mc, final LoanApplicationTerms loanApplicationTerms, int periodNumber, - Money outstandingBalance) { + Money outstandingBalance) { if (loanApplicationTerms.getActualFixedEmiAmount() == null && loanApplicationTerms.getInterestMethod().isDecliningBalance() && loanApplicationTerms.getAmortizationMethod().isEqualInstallment()) { if (periodNumber < loanApplicationTerms.getPrincipalGrace() + 1) { @@ -1360,14 +1362,14 @@ private void updateFixedInstallmentAmount(final MathContext mc, final LoanApplic } private Money fetchArrears(final LoanApplicationTerms loanApplicationTerms, final MonetaryCurrency currency, - final LoanTransaction transaction) { + final LoanTransaction transaction) { Money arrears = transaction.getPrincipalPortion(currency); arrears = arrears.plus(fetchCompoundedArrears(loanApplicationTerms, currency, transaction)); return arrears; } private Money fetchCompoundedArrears(final LoanApplicationTerms loanApplicationTerms, final MonetaryCurrency currency, - final LoanTransaction transaction) { + final LoanTransaction transaction) { Money arrears = Money.zero(currency); if (loanApplicationTerms.getInterestRecalculationCompoundingMethod().isInterestCompoundingEnabled()) { arrears = arrears.plus(transaction.getInterestPortion(currency)); @@ -1385,9 +1387,9 @@ private Money fetchCompoundedArrears(final LoanApplicationTerms loanApplicationT * */ private Money addInterestOnlyRepaymentScheduleForCurrentDate(final MathContext mc, final LoanApplicationTerms loanApplicationTerms, - final HolidayDetailDTO holidayDetailDTO, final MonetaryCurrency currency, final Collection periods, - final LocalDate currentDate, LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, - final Collection transactions, final Set loanCharges, final LoanScheduleParams params) { + final HolidayDetailDTO holidayDetailDTO, final MonetaryCurrency currency, final Collection periods, + final LocalDate currentDate, LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, + final Collection transactions, final Set loanCharges, final LoanScheduleParams params) { boolean isFirstRepayment = false; LocalDate startDate = params.getPeriodStartDate(); Money outstanding = params.getOutstandingBalanceAsPerRest(); @@ -1527,7 +1529,7 @@ private boolean isCompleted(List installments) } private Collection getApplicableTransactionsForPeriod(final boolean applyInterestRecalculation, - LocalDate repaymentDate, final Collection transactions) { + LocalDate repaymentDate, final Collection transactions) { Collection applicableTransactions = new ArrayList<>(); if (applyInterestRecalculation && !Objects.isNull(transactions)) { for (RecalculationDetail detail : transactions) { @@ -1552,33 +1554,33 @@ private List createCurrentTransactionList(RecalculationDetail d * method applies early payment strategy as per the configurations provided */ private Money applyEarlyPaymentStrategy(final LoanApplicationTerms loanApplicationTerms, Money reducePrincipal, - final Money totalCumulativePrincipal, int periodNumber, final MathContext mc) { + final Money totalCumulativePrincipal, int periodNumber, final MathContext mc) { if (reducePrincipal.isGreaterThanZero()) { switch (loanApplicationTerms.getRescheduleStrategyMethod()) { case REDUCE_EMI_AMOUNT: adjustInstallmentOrPrincipalAmount(loanApplicationTerms, totalCumulativePrincipal, periodNumber, mc); reducePrincipal = reducePrincipal.zero(); - break; + break; case REDUCE_NUMBER_OF_INSTALLMENTS: // number of installments will reduce but emi amount won't // get effected reducePrincipal = reducePrincipal.zero(); - break; + break; case RESCHEDULE_NEXT_REPAYMENTS: - // will reduce principal from the reduce Principal for each - // installment(means installments will have less emi amount) - // until this - // amount becomes zero - break; + // will reduce principal from the reduce Principal for each + // installment(means installments will have less emi amount) + // until this + // amount becomes zero + break; default: - break; + break; } } return reducePrincipal; } private void adjustInstallmentOrPrincipalAmount(final LoanApplicationTerms loanApplicationTerms, final Money totalCumulativePrincipal, - int periodNumber, final MathContext mc) { + int periodNumber, final MathContext mc) { // in this case emi amount will be reduced but number of // installments won't change Money principal = getPrincipalToBeScheduled(loanApplicationTerms); @@ -1598,7 +1600,7 @@ private void adjustInstallmentOrPrincipalAmount(final LoanApplicationTerms loanA * Identifies all the past date principal changes and apply them on outstanding balance for future calculations */ private Money updateBalanceForInterestCalculation(final Map principalPortionMap, final LocalDate scheduledDueDate, - final Money outstandingBalanceAsPerRest) { + final Money outstandingBalanceAsPerRest) { List removeFromPrincipalPortionMap = new ArrayList<>(); Money outstandingBalance = outstandingBalanceAsPerRest; for (Map.Entry principal : principalPortionMap.entrySet()) { @@ -1616,8 +1618,8 @@ private Money updateBalanceForInterestCalculation(final Map pr // this is to make sure even paid late payments(principal and compounded // interest/fee) should be reduced as per rest date private void updateLatePaidAmountsToPrincipalMap(final LoanTransaction loanTransaction, final LoanApplicationTerms applicationTerms, - final MonetaryCurrency currency, final HolidayDetailDTO holidayDetailDTO, final LocalDate lastRestDate, - final LoanScheduleParams params) { + final MonetaryCurrency currency, final HolidayDetailDTO holidayDetailDTO, final LocalDate lastRestDate, + final LoanScheduleParams params) { LocalDate applicableDate = getNextRestScheduleDate(loanTransaction.getTransactionDate().minusDays(1), applicationTerms, holidayDetailDTO); @@ -1629,8 +1631,8 @@ private void updateLatePaidAmountsToPrincipalMap(final LoanTransaction loanTrans } private void updateLatePaymentCompoundingAmount(final Map principalVariationMap, - final Map latePaymentCompoundingMap, final MonetaryCurrency currency, final LocalDate lastRestDate, - Money compoundedPortion, final LocalDate applicableDate) { + final Map latePaymentCompoundingMap, final MonetaryCurrency currency, final LocalDate lastRestDate, + Money compoundedPortion, final LocalDate applicableDate) { Money appliedOnPrincipalVariationMap = Money.zero(currency); Map temp = new HashMap<>(); for (LocalDate date : latePaymentCompoundingMap.keySet()) { @@ -1664,8 +1666,8 @@ private void updateLatePaymentCompoundingAmount(final Map prin * */ private void updateLatePaymentsToMap(final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO, - final MonetaryCurrency currency, final Map latePaymentMap, final LocalDate scheduledDueDate, - List installments, boolean applyRestFrequencyForPrincipal, final LocalDate lastRestDate) { + final MonetaryCurrency currency, final Map latePaymentMap, final LocalDate scheduledDueDate, + List installments, boolean applyRestFrequencyForPrincipal, final LocalDate lastRestDate) { latePaymentMap.clear(); LocalDate currentDate = DateUtils.getBusinessLocalDate(); @@ -1694,7 +1696,7 @@ private void updateLatePaymentsToMap(final LoanApplicationTerms loanApplicationT } private void updateCompoundingMap(final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO, - final LoanScheduleParams params, final LocalDate lastRestDate, final LocalDate scheduledDueDate) { + final LoanScheduleParams params, final LocalDate lastRestDate, final LocalDate scheduledDueDate) { if (loanApplicationTerms.isInterestBearingAndInterestRecalculationEnabled() && loanApplicationTerms.getInterestRecalculationCompoundingMethod().isCompoundingEnabled()) { final MonetaryCurrency currency = MonetaryCurrency.fromCurrencyData(params.getCurrency()); @@ -1781,32 +1783,32 @@ private void updateCompoundingMap(final LoanApplicationTerms loanApplicationTerm } private Money getIncomeForCompounding(final LoanApplicationTerms loanApplicationTerms, final MonetaryCurrency currency, - LoanRepaymentScheduleInstallment loanRepaymentScheduleInstallment) { + LoanRepaymentScheduleInstallment loanRepaymentScheduleInstallment) { Money interestCharged = Money.zero(currency); Money feeCharged = Money.zero(currency); Money penaltyCharged = Money.zero(currency); switch (loanApplicationTerms.getInterestRecalculationCompoundingMethod()) { case INTEREST: interestCharged = interestCharged.plus(loanRepaymentScheduleInstallment.getInterestCharged(currency)); - break; + break; case FEE: feeCharged = feeCharged.plus(loanRepaymentScheduleInstallment.getFeeChargesCharged(currency)); penaltyCharged = penaltyCharged.plus(loanRepaymentScheduleInstallment.getPenaltyChargesCharged(currency)); - break; + break; case INTEREST_AND_FEE: interestCharged = interestCharged.plus(loanRepaymentScheduleInstallment.getInterestCharged(currency)); feeCharged = feeCharged.plus(loanRepaymentScheduleInstallment.getFeeChargesCharged(currency)); penaltyCharged = penaltyCharged.plus(loanRepaymentScheduleInstallment.getPenaltyChargesCharged(currency)); - break; + break; default: - break; + break; } return interestCharged.plus(feeCharged).plus(penaltyCharged); } private void adjustCompoundedAmountWithPaidDetail(final LoanScheduleParams params, final LocalDate lastRestDate, - final Collection transactions, final LoanApplicationTerms loanApplicationTerms, - HolidayDetailDTO holidayDetailDTO) { + final Collection transactions, final LoanApplicationTerms loanApplicationTerms, + HolidayDetailDTO holidayDetailDTO) { for (LoanTransaction loanTransaction : transactions) { final LocalDate amountApplicableDate = getNextRestScheduleDate(loanTransaction.getTransactionDate().minusDays(1), loanApplicationTerms, holidayDetailDTO); @@ -1815,14 +1817,14 @@ private void adjustCompoundedAmountWithPaidDetail(final LoanScheduleParams param } private void adjustCompoundedAmountWithPaidDetail(final LoanScheduleParams params, final LocalDate lastRestDate, - final LocalDate amountApplicableDate, final LoanTransaction transaction, final LoanApplicationTerms loanApplicationTerms) { + final LocalDate amountApplicableDate, final LoanTransaction transaction, final LoanApplicationTerms loanApplicationTerms) { adjustCompoundedAmountWithPaidDetail(params.getPrincipalPortionMap(), lastRestDate, amountApplicableDate, transaction, loanApplicationTerms, MonetaryCurrency.fromCurrencyData(params.getCurrency())); } private void adjustCompoundedAmountWithPaidDetail(final Map principalPortionMap, final LocalDate lastRestDate, - final LocalDate amountApplicableDate, final LoanTransaction transaction, final LoanApplicationTerms loanApplicationTerms, - final MonetaryCurrency currency) { + final LocalDate amountApplicableDate, final LoanTransaction transaction, final LoanApplicationTerms loanApplicationTerms, + final MonetaryCurrency currency) { if (!DateUtils.isEqual(amountApplicableDate, lastRestDate)) { Money compoundedIncome = fetchCompoundedArrears(loanApplicationTerms, currency, transaction); updateMapWithAmount(principalPortionMap, compoundedIncome, amountApplicableDate); @@ -1831,8 +1833,8 @@ private void adjustCompoundedAmountWithPaidDetail(final Map pr } private void populateCompoundingDatesInPeriod(final LocalDate startDate, final LocalDate endDate, - final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO, - final LoanScheduleParams scheduleParams, final Set charges, MonetaryCurrency currency, final MathContext mc) { + final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO, + final LoanScheduleParams scheduleParams, final Set charges, MonetaryCurrency currency, final MathContext mc) { if (loanApplicationTerms.getInterestRecalculationCompoundingMethod().isCompoundingEnabled()) { final Map compoundingMap = scheduleParams.getCompoundingMap(); LocalDate lastCompoundingDate = startDate; @@ -1868,8 +1870,8 @@ private void populateCompoundingDatesInPeriod(final LocalDate startDate, final L * */ private void updatePrincipalPaidPortionToMap(final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO, - Map principalPortionMap, final LoanScheduleModelPeriod installment, final RecalculationDetail detail, - final Money unprocessed, final List installments) { + Map principalPortionMap, final LoanScheduleModelPeriod installment, final RecalculationDetail detail, + final Money unprocessed, final List installments) { LocalDate applicableDate = getNextRestScheduleDate(detail.getTransactionDate().minusDays(1), loanApplicationTerms, holidayDetailDTO); updateMapWithAmount(principalPortionMap, unprocessed, applicableDate); @@ -1929,8 +1931,8 @@ private TreeMap mergeVariationsToMap(LoanApplicationTerms loan * TODO */ private LocalDate calculateInterestStartDateForPeriod(final LoanApplicationTerms loanApplicationTerms, LocalDate periodStartDate, - final LocalDate idealDisbursementDate, final LocalDate firstRepaymentDate, - final Boolean isInterestChargedFromDateSameAsDisbursalDateEnabled, final LocalDate expectedDisbursementDate) { + final LocalDate idealDisbursementDate, final LocalDate firstRepaymentDate, + final Boolean isInterestChargedFromDateSameAsDisbursalDateEnabled, final LocalDate expectedDisbursementDate) { LocalDate periodStartDateApplicableForInterest = periodStartDate; if (DateUtils.isBefore(periodStartDate, idealDisbursementDate) || DateUtils.isBefore(periodStartDate, firstRepaymentDate)) { if (loanApplicationTerms.getInterestChargedFromLocalDate() != null) { @@ -1962,11 +1964,11 @@ private void updateMapWithAmount(final Map map, final Money am public abstract PaymentPeriodsInOneYearCalculator getPaymentPeriodsInOneYearCalculator(); public abstract PrincipalInterest calculatePrincipalInterestComponentsForPeriod(PaymentPeriodsInOneYearCalculator calculator, - BigDecimal interestCalculationGraceOnRepaymentPeriodFraction, Money totalCumulativePrincipal, Money totalCumulativeInterest, - Money totalInterestDueForLoan, Money cumulatingInterestPaymentDueToGrace, Money outstandingBalance, - LoanApplicationTerms loanApplicationTerms, int periodNumber, MathContext mc, TreeMap principalVariation, - Map compoundingMap, LocalDate periodStartDate, LocalDate periodEndDate, - Collection termVariations); + BigDecimal interestCalculationGraceOnRepaymentPeriodFraction, Money totalCumulativePrincipal, Money totalCumulativeInterest, + Money totalInterestDueForLoan, Money cumulatingInterestPaymentDueToGrace, Money outstandingBalance, + LoanApplicationTerms loanApplicationTerms, int periodNumber, MathContext mc, TreeMap principalVariation, + Map compoundingMap, LocalDate periodStartDate, LocalDate periodEndDate, + Collection termVariations); private BigDecimal deriveTotalChargesDueAtTimeOfDisbursement(final Set loanCharges) { BigDecimal chargesDueAtTimeOfDisbursement = BigDecimal.ZERO; @@ -1979,7 +1981,7 @@ private BigDecimal deriveTotalChargesDueAtTimeOfDisbursement(final Set disburseDetails, final boolean excludePastUnDisbursed) { + final Map disburseDetails, final boolean excludePastUnDisbursed) { // this method relates to multi-disbursement loans BigDecimal principal = BigDecimal.ZERO; @@ -2016,7 +2018,7 @@ private BigDecimal getDisbursementAmount(final LoanApplicationTerms loanApplicat } private List createNewLoanScheduleListWithDisbursementDetails(final LoanApplicationTerms loanApplicationTerms, - final LoanScheduleParams loanScheduleParams, final BigDecimal chargesDueAtTimeOfDisbursement) { + final LoanScheduleParams loanScheduleParams, final BigDecimal chargesDueAtTimeOfDisbursement) { List periods = new ArrayList<>(); if (!loanApplicationTerms.isMultiDisburseLoan()) { final LoanScheduleModelDisbursementPeriod disbursementPeriod = LoanScheduleModelDisbursementPeriod.disbursement( @@ -2055,7 +2057,7 @@ private List createNewLoanScheduleListWithDisbursementD } private LoanScheduleModelDownPaymentPeriod createDownPaymentPeriod(LoanApplicationTerms loanApplicationTerms, - LoanScheduleParams scheduleParams, LocalDate date, BigDecimal periodBaseAmount) { + LoanScheduleParams scheduleParams, LocalDate date, BigDecimal periodBaseAmount) { Money downPaymentAmount = Money.of(loanApplicationTerms.getCurrency(), MathUtil.percentageOf(periodBaseAmount, loanApplicationTerms.getDisbursedAmountPercentageForDownPayment(), 19)); if (loanApplicationTerms.getInstallmentAmountInMultiplesOf() != null) { @@ -2085,9 +2087,9 @@ private Set separateTotalCompoundingPercentageCharges(final Set loanCharges, - final MonetaryCurrency monetaryCurrency, final PrincipalInterest principalInterestForThisPeriod, final Money principalDisbursed, - final Money totalInterestChargedForFullLoanTerm, boolean isInstallmentChargeApplicable, final boolean isFirstPeriod, - final MathContext mc) { + final MonetaryCurrency monetaryCurrency, final PrincipalInterest principalInterestForThisPeriod, final Money principalDisbursed, + final Money totalInterestChargedForFullLoanTerm, boolean isInstallmentChargeApplicable, final boolean isFirstPeriod, + final MathContext mc) { Money cumulative = Money.zero(monetaryCurrency); @@ -2111,7 +2113,7 @@ private Money cumulativeFeeChargesDueWithin(final LocalDate periodStart, final L } private Money calculateSpecificDueDateChargeWithPercentage(final Money principalDisbursed, - final Money totalInterestChargedForFullLoanTerm, Money cumulative, final LoanCharge loanCharge, final MathContext mc) { + final Money totalInterestChargedForFullLoanTerm, Money cumulative, final LoanCharge loanCharge, final MathContext mc) { BigDecimal amount = BigDecimal.ZERO; if (loanCharge.getChargeCalculation().isPercentageOfAmountAndInterest()) { amount = amount.add(principalDisbursed.getAmount()).add(totalInterestChargedForFullLoanTerm.getAmount()); @@ -2126,7 +2128,7 @@ private Money calculateSpecificDueDateChargeWithPercentage(final Money principal } private Money calculateInstallmentCharge(final PrincipalInterest principalInterestForThisPeriod, Money cumulative, - final LoanCharge loanCharge, final MathContext mc) { + final LoanCharge loanCharge, final MathContext mc) { if (loanCharge.getChargeCalculation().isPercentageBased()) { BigDecimal amount = BigDecimal.ZERO; if (loanCharge.getChargeCalculation().isPercentageOfAmountAndInterest()) { @@ -2146,10 +2148,10 @@ private Money calculateInstallmentCharge(final PrincipalInterest principalIntere } private Money cumulativePenaltyChargesDueWithin(final LocalDate periodStart, final LocalDate periodEnd, - final Set loanCharges, final MonetaryCurrency monetaryCurrency, - final PrincipalInterest principalInterestForThisPeriod, final Money principalDisbursed, - final Money totalInterestChargedForFullLoanTerm, boolean isInstallmentChargeApplicable, final boolean isFirstPeriod, - final MathContext mc) { + final Set loanCharges, final MonetaryCurrency monetaryCurrency, + final PrincipalInterest principalInterestForThisPeriod, final Money principalDisbursed, + final Money totalInterestChargedForFullLoanTerm, boolean isInstallmentChargeApplicable, final boolean isFirstPeriod, + final MathContext mc) { Money cumulative = Money.zero(monetaryCurrency); @@ -2177,8 +2179,8 @@ private Money cumulativePenaltyChargesDueWithin(final LocalDate periodStart, fin */ @Override public LoanScheduleDTO rescheduleNextInstallments(final MathContext mc, final LoanApplicationTerms loanApplicationTerms, Loan loan, - final HolidayDetailDTO holidayDetailDTO, - final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, final LocalDate rescheduleFrom) { + final HolidayDetailDTO holidayDetailDTO, + final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, final LocalDate rescheduleFrom) { // Fixed schedule End Date for generating schedule final LocalDate scheduleTillDate = null; @@ -2189,9 +2191,9 @@ public LoanScheduleDTO rescheduleNextInstallments(final MathContext mc, final Lo @Override public LoanScheduleDTO rescheduleNextInstallments(final MathContext mc, final LoanApplicationTerms loanApplicationTerms, Loan loan, - final HolidayDetailDTO holidayDetailDTO, - final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, LocalDate rescheduleFrom, - final LocalDate scheduleTillDate) { + final HolidayDetailDTO holidayDetailDTO, + final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, LocalDate rescheduleFrom, + final LocalDate scheduleTillDate) { // Loan transactions to process and find the variation on payments Collection recalculationDetails = new ArrayList<>(); List transactions = loan.getLoanTransactions(); @@ -2259,7 +2261,7 @@ public LoanScheduleDTO rescheduleNextInstallments(final MathContext mc, final Lo } LocalDate actualRepaymentDate = RepaymentStartDateType.DISBURSEMENT_DATE .equals(loanApplicationTerms.getRepaymentStartDateType()) ? loanApplicationTerms.getExpectedDisbursementDate() - : loanApplicationTerms.getSubmittedOnDate(); + : loanApplicationTerms.getSubmittedOnDate(); boolean isFirstRepayment = true; // cumulative fields @@ -2577,10 +2579,10 @@ private List fetchRetainedInstallments( * Method identifies the early paid amounts for a installment and update the principal map for further calculations */ private Money updateEarlyPaidAmountsToMap(final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO, - final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, - final List newRepaymentScheduleInstallments, MonetaryCurrency currency, - final Map principalPortionMap, LoanRepaymentScheduleInstallment installment, - Collection applicableTransactions, Money actualPrincipalPortion, Set loanCharges) { + final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, + final List newRepaymentScheduleInstallments, MonetaryCurrency currency, + final Map principalPortionMap, LoanRepaymentScheduleInstallment installment, + Collection applicableTransactions, Money actualPrincipalPortion, Set loanCharges) { Money unprocessed = Money.zero(currency); Money totalUnprocessed = Money.zero(currency); for (RecalculationDetail detail : applicableTransactions) { @@ -2620,9 +2622,9 @@ private Money updateEarlyPaidAmountsToMap(final LoanApplicationTerms loanApplica } private Money updateCompoundingDetailsForPartialScheduleGeneration(final LoanRepaymentScheduleInstallment installment, - LoanApplicationTerms loanApplicationTerms, Map principalMap, - final Map> compoundingDateVariations, final Money uncompoundedAmount, - final Collection applicableTransactions, LocalDate lastRestDate, HolidayDetailDTO holidayDetailDTO) { + LoanApplicationTerms loanApplicationTerms, Map principalMap, + final Map> compoundingDateVariations, final Money uncompoundedAmount, + final Collection applicableTransactions, LocalDate lastRestDate, HolidayDetailDTO holidayDetailDTO) { Money uncompounded = uncompoundedAmount; MonetaryCurrency currency = uncompoundedAmount.getCurrency(); for (RecalculationDetail detail : applicableTransactions) { @@ -2662,7 +2664,7 @@ private Money updateCompoundingDetailsForPartialScheduleGeneration(final LoanRep } private void updateAmortization(final MathContext mc, final LoanApplicationTerms loanApplicationTerms, int periodNumber, - Money outstandingBalance) { + Money outstandingBalance) { if (loanApplicationTerms.getAmortizationMethod().isEqualInstallment()) { updateFixedInstallmentAmount(mc, loanApplicationTerms, periodNumber, outstandingBalance); } else { @@ -2674,7 +2676,7 @@ private void updateAmortization(final MathContext mc, final LoanApplicationTerms * Method identifies early paid amount and applies the early payment strategy */ private Money fetchEarlyPaidAmount(final Money principalPortion, final Money principalPortionCalculated, final Money reducePrincipal, - final LoanApplicationTerms applicationTerms, final Money totalCumulativePrincipal, int periodNumber, final MathContext mc) { + final LoanApplicationTerms applicationTerms, final Money totalCumulativePrincipal, int periodNumber, final MathContext mc) { Money existingEarlyPayment = reducePrincipal.minus(principalPortionCalculated); Money earlyPaidAmount = principalPortion.plus(existingEarlyPayment); if (existingEarlyPayment.isLessThanZero()) { @@ -2691,20 +2693,20 @@ private Money fetchEarlyPaidAmount(final Money principalPortion, final Money pri case REDUCE_EMI_AMOUNT: adjustInstallmentOrPrincipalAmount(applicationTerms, totalCumulativePrincipal, periodNumber, mc); earlyPaidAmount = earlyPaidAmount.zero(); - break; + break; case REDUCE_NUMBER_OF_INSTALLMENTS: // number of installments will reduce but emi amount won't // get effected earlyPaidAmount = earlyPaidAmount.zero(); - break; + break; case RESCHEDULE_NEXT_REPAYMENTS: - // will reduce principal from the reduce Principal for each - // installment(means installments will have less emi amount) - // until this - // amount becomes zero - break; + // will reduce principal from the reduce Principal for each + // installment(means installments will have less emi amount) + // until this + // amount becomes zero + break; default: - break; + break; } } @@ -2722,7 +2724,7 @@ private Money calculateExpectedPrincipalPortion(final Money interestPortion, fin } private void addLoanRepaymentScheduleInstallment(final List installments, - final LoanScheduleModelPeriod scheduledLoanInstallment) { + final LoanScheduleModelPeriod scheduledLoanInstallment) { if (scheduledLoanInstallment.isRepaymentPeriod() || scheduledLoanInstallment.isDownPaymentPeriod()) { final LoanRepaymentScheduleInstallment installment = new LoanRepaymentScheduleInstallment(null, scheduledLoanInstallment.periodNumber(), scheduledLoanInstallment.periodFromDate(), @@ -2736,14 +2738,14 @@ private void addLoanRepaymentScheduleInstallment(final List * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.loanschedule.domain; import java.math.BigDecimal; + import lombok.RequiredArgsConstructor; import org.apache.fineract.organisation.monetary.domain.MoneyHelper; import org.apache.fineract.portfolio.common.domain.DaysInYearType; @@ -32,22 +33,22 @@ public class AprCalculator { private final PaymentPeriodsInOneYearCalculator paymentPeriodsInOneYearCalculator; public BigDecimal calculateFrom(final PeriodFrequencyType interestPeriodFrequencyType, final BigDecimal interestRatePerPeriod, - final Integer numberOfRepayments, final Integer repaymentEvery, final PeriodFrequencyType repaymentPeriodFrequencyType, - final DaysInYearType daysInYearType) { + final Integer numberOfRepayments, final Integer repaymentEvery, final PeriodFrequencyType repaymentPeriodFrequencyType, + final DaysInYearType daysInYearType) { BigDecimal defaultAnnualNominalInterestRate = BigDecimal.ZERO; switch (interestPeriodFrequencyType) { case DAYS: defaultAnnualNominalInterestRate = interestRatePerPeriod.multiply(BigDecimal.valueOf(getDaysInYear(daysInYearType))); - break; + break; case WEEKS: defaultAnnualNominalInterestRate = interestRatePerPeriod.multiply(BigDecimal.valueOf(52)); - break; + break; case MONTHS: defaultAnnualNominalInterestRate = interestRatePerPeriod.multiply(BigDecimal.valueOf(12)); - break; + break; case YEARS: defaultAnnualNominalInterestRate = interestRatePerPeriod.multiply(BigDecimal.valueOf(1)); - break; + break; case WHOLE_TERM: final BigDecimal ratePerPeriod = interestRatePerPeriod.divide(BigDecimal.valueOf(numberOfRepayments * repaymentEvery), 8, MoneyHelper.getRoundingMode()); @@ -55,24 +56,24 @@ public BigDecimal calculateFrom(final PeriodFrequencyType interestPeriodFrequenc switch (repaymentPeriodFrequencyType) { case DAYS: defaultAnnualNominalInterestRate = ratePerPeriod.multiply(BigDecimal.valueOf(getDaysInYear(daysInYearType))); - break; + break; case WEEKS: defaultAnnualNominalInterestRate = ratePerPeriod.multiply(BigDecimal.valueOf(52)); - break; + break; case MONTHS: defaultAnnualNominalInterestRate = ratePerPeriod.multiply(BigDecimal.valueOf(12)); - break; + break; case YEARS: defaultAnnualNominalInterestRate = ratePerPeriod.multiply(BigDecimal.valueOf(1)); - break; + break; case WHOLE_TERM: - break; + break; case INVALID: - break; + break; } - break; + break; case INVALID: - break; + break; } return defaultAnnualNominalInterestRate; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/CumulativeDecliningBalanceInterestLoanScheduleGenerator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/CumulativeDecliningBalanceInterestLoanScheduleGenerator.java index c68596013e1..f3e3a5bafda 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/CumulativeDecliningBalanceInterestLoanScheduleGenerator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/CumulativeDecliningBalanceInterestLoanScheduleGenerator.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.HashMap; import java.util.Map; import java.util.TreeMap; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.organisation.monetary.mapper.CurrencyMapper; @@ -63,8 +64,8 @@ public class CumulativeDecliningBalanceInterestLoanScheduleGenerator extends Abs private final PaymentPeriodsInOneYearCalculator paymentPeriodsInOneYearCalculator; public CumulativeDecliningBalanceInterestLoanScheduleGenerator(final ScheduledDateGenerator scheduledDateGenerator, - final PaymentPeriodsInOneYearCalculator paymentPeriodsInOneYearCalculator, - final LoanTransactionRepository loanTransactionRepository, final CurrencyMapper currencyMapper) { + final PaymentPeriodsInOneYearCalculator paymentPeriodsInOneYearCalculator, + final LoanTransactionRepository loanTransactionRepository, final CurrencyMapper currencyMapper) { super(loanTransactionRepository, currencyMapper); this.scheduledDateGenerator = scheduledDateGenerator; this.paymentPeriodsInOneYearCalculator = paymentPeriodsInOneYearCalculator; @@ -82,12 +83,12 @@ public PaymentPeriodsInOneYearCalculator getPaymentPeriodsInOneYearCalculator() @Override public PrincipalInterest calculatePrincipalInterestComponentsForPeriod(final PaymentPeriodsInOneYearCalculator calculator, - final BigDecimal interestCalculationGraceOnRepaymentPeriodFraction, final Money totalCumulativePrincipal, - @SuppressWarnings("unused") final Money totalCumulativeInterest, - @SuppressWarnings("unused") final Money totalInterestDueForLoan, final Money cumulatingInterestPaymentDueToGrace, - final Money outstandingBalance, final LoanApplicationTerms loanApplicationTerms, final int periodNumber, final MathContext mc, - final TreeMap principalVariation, final Map compoundingMap, final LocalDate periodStartDate, - final LocalDate periodEndDate, final Collection termVariations) { + final BigDecimal interestCalculationGraceOnRepaymentPeriodFraction, final Money totalCumulativePrincipal, + @SuppressWarnings("unused") final Money totalCumulativeInterest, + @SuppressWarnings("unused") final Money totalInterestDueForLoan, final Money cumulatingInterestPaymentDueToGrace, + final Money outstandingBalance, final LoanApplicationTerms loanApplicationTerms, final int periodNumber, final MathContext mc, + final TreeMap principalVariation, final Map compoundingMap, final LocalDate periodStartDate, + final LocalDate periodEndDate, final Collection termVariations) { LocalDate interestStartDate = periodStartDate; Money interestForThisInstallment = totalCumulativePrincipal.zero(); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/CumulativeFlatInterestLoanScheduleGenerator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/CumulativeFlatInterestLoanScheduleGenerator.java index 1c3cb39999f..31c9e6eb31d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/CumulativeFlatInterestLoanScheduleGenerator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/CumulativeFlatInterestLoanScheduleGenerator.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.Collection; import java.util.Map; import java.util.TreeMap; + import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.organisation.monetary.mapper.CurrencyMapper; import org.apache.fineract.portfolio.loanaccount.data.LoanTermVariationsData; @@ -37,8 +38,8 @@ public class CumulativeFlatInterestLoanScheduleGenerator extends AbstractCumulat private final PaymentPeriodsInOneYearCalculator paymentPeriodsInOneYearCalculator; public CumulativeFlatInterestLoanScheduleGenerator(final ScheduledDateGenerator scheduledDateGenerator, - final PaymentPeriodsInOneYearCalculator paymentPeriodsInOneYearCalculator, - final LoanTransactionRepository loanTransactionRepository, final CurrencyMapper currencyMapper) { + final PaymentPeriodsInOneYearCalculator paymentPeriodsInOneYearCalculator, + final LoanTransactionRepository loanTransactionRepository, final CurrencyMapper currencyMapper) { super(loanTransactionRepository, currencyMapper); this.scheduledDateGenerator = scheduledDateGenerator; this.paymentPeriodsInOneYearCalculator = paymentPeriodsInOneYearCalculator; @@ -56,12 +57,12 @@ public PaymentPeriodsInOneYearCalculator getPaymentPeriodsInOneYearCalculator() @Override public PrincipalInterest calculatePrincipalInterestComponentsForPeriod(final PaymentPeriodsInOneYearCalculator calculator, - final BigDecimal interestCalculationGraceOnRepaymentPeriodFraction, final Money totalCumulativePrincipal, - Money totalCumulativeInterest, Money totalInterestDueForLoan, final Money cumulatingInterestPaymentDueToGrace, - final Money outstandingBalance, final LoanApplicationTerms loanApplicationTerms, final int periodNumber, final MathContext mc, - @SuppressWarnings("unused") TreeMap principalVariation, - @SuppressWarnings("unused") Map compoundingMap, LocalDate periodStartDate, LocalDate periodEndDate, - @SuppressWarnings("unused") Collection termVariations) { + final BigDecimal interestCalculationGraceOnRepaymentPeriodFraction, final Money totalCumulativePrincipal, + Money totalCumulativeInterest, Money totalInterestDueForLoan, final Money cumulatingInterestPaymentDueToGrace, + final Money outstandingBalance, final LoanApplicationTerms loanApplicationTerms, final int periodNumber, final MathContext mc, + @SuppressWarnings("unused") TreeMap principalVariation, + @SuppressWarnings("unused") Map compoundingMap, LocalDate periodStartDate, LocalDate periodEndDate, + @SuppressWarnings("unused") Collection termVariations) { final PrincipalInterest result = loanApplicationTerms.calculateTotalInterestForPeriod(calculator, interestCalculationGraceOnRepaymentPeriodFraction, periodNumber, mc, cumulatingInterestPaymentDueToGrace, diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultPaymentPeriodsInOneYearCalculator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultPaymentPeriodsInOneYearCalculator.java index 973f53d18c4..f28a9084494 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultPaymentPeriodsInOneYearCalculator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultPaymentPeriodsInOneYearCalculator.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.domain.LocalDateInterval; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -38,30 +39,30 @@ public Integer calculate(final PeriodFrequencyType repaymentFrequencyType) { switch (repaymentFrequencyType) { case DAYS: paymentPeriodsInOneYear = 365; - break; + break; case WEEKS: paymentPeriodsInOneYear = 52; - break; + break; case MONTHS: paymentPeriodsInOneYear = 12; - break; + break; case YEARS: paymentPeriodsInOneYear = 1; - break; + break; case INVALID: paymentPeriodsInOneYear = 0; - break; + break; case WHOLE_TERM: log.error("TODO Implement repaymentFrequencyType for WHOLE_TERM"); - break; + break; } return paymentPeriodsInOneYear; } @Override public BigDecimal calculatePortionOfRepaymentPeriodInterestChargingGrace(final LocalDate repaymentPeriodStartDate, - final LocalDate scheduledDueDate, final LocalDate interestChargedFromLocalDate, - final PeriodFrequencyType repaymentPeriodFrequencyType, final int repaidEvery, MathContext mc) { + final LocalDate scheduledDueDate, final LocalDate interestChargedFromLocalDate, + final PeriodFrequencyType repaymentPeriodFrequencyType, final int repaidEvery, MathContext mc) { BigDecimal periodFraction = BigDecimal.ZERO; @@ -81,7 +82,7 @@ public BigDecimal calculatePortionOfRepaymentPeriodInterestChargingGrace(final L } private BigDecimal calculateRepaymentPeriodFraction(final PeriodFrequencyType repaymentPeriodFrequencyType, final int repaidEvery, - final int numberOfDaysInterestCalculationGrace, final MathContext mc) { + final int numberOfDaysInterestCalculationGrace, final MathContext mc) { BigDecimal repayEveryBD = BigDecimal.valueOf(repaidEvery); BigDecimal noDaysInterestCalculationGrace = BigDecimal.valueOf(numberOfDaysInterestCalculationGrace); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultScheduledDateGenerator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultScheduledDateGenerator.java index f0e75b4d4f3..6095e962362 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultScheduledDateGenerator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultScheduledDateGenerator.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.time.temporal.Temporal; import java.util.ArrayList; import java.util.List; + import net.fortuna.ical4j.model.Recur; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.organisation.holiday.domain.Holiday; @@ -48,7 +49,7 @@ public class DefaultScheduledDateGenerator implements ScheduledDateGenerator { @Override public List generateRepaymentPeriods(final MathContext mc, final LocalDate scheduleStartDate, - final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO) { + final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO) { final Money zeroAmount = Money.zero(loanApplicationTerms.getCurrency(), mc); final int numberOfRepayments = loanApplicationTerms.getNumberOfRepayments(); final ArrayList repaymentPeriods = new ArrayList<>(numberOfRepayments); @@ -115,7 +116,7 @@ public LocalDate getLastRepaymentDate(final LoanApplicationTerms loanApplication @Override public LocalDate generateNextRepaymentDate(final LocalDate lastRepaymentDate, final LoanApplicationTerms loanApplicationTerms, - boolean isFirstRepayment) { + boolean isFirstRepayment) { final LocalDate firstRepaymentPeriodDate = loanApplicationTerms.getCalculatedRepaymentsStartingFromLocalDate(); LocalDate dueRepaymentPeriodDate = null; if (isFirstRepayment && firstRepaymentPeriodDate != null) { @@ -177,7 +178,7 @@ private Temporal adjustDate(final Temporal date, final Temporal seedDate, final @Override public LocalDate generateNextRepaymentDate(LocalDate lastRepaymentDate, LoanApplicationTerms loanApplicationTerms, - final boolean isFirstRepayment, final Integer periodNumber) { + final boolean isFirstRepayment, final Integer periodNumber) { LocalDate dueRepaymentPeriodDate = generateNextRepaymentDate(lastRepaymentDate, loanApplicationTerms, isFirstRepayment); // Fixed Length validation only for Last Installment @@ -193,13 +194,13 @@ public LocalDate generateNextRepaymentDate(LocalDate lastRepaymentDate, LoanAppl @Override public AdjustedDateDetailsDTO adjustRepaymentDate(final LocalDate dueRepaymentPeriodDate, - final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO) { + final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO) { final LocalDate adjustedDate = dueRepaymentPeriodDate; return getAdjustedDateDetailsDTO(dueRepaymentPeriodDate, loanApplicationTerms, holidayDetailDTO, adjustedDate); } private AdjustedDateDetailsDTO getAdjustedDateDetailsDTO(final LocalDate dueRepaymentPeriodDate, - final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO, final LocalDate adjustedDate) { + final LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO, final LocalDate adjustedDate) { final boolean isFirstRepayment = false; final LocalDate nextRepaymentPeriodDueDate = generateNextRepaymentDate(adjustedDate, loanApplicationTerms, isFirstRepayment); final AdjustedDateDetailsDTO newAdjustedDateDetailsDTO = new AdjustedDateDetailsDTO(adjustedDate, dueRepaymentPeriodDate, @@ -240,7 +241,7 @@ private AdjustedDateDetailsDTO recursivelyCheckNonWorkingDaysAndHolidaysAndWorki if ((holidayDetailDTO.isHolidayEnabled() && HolidayUtil.getApplicableHoliday(adjustedDateDetailsDTO.getChangedScheduleDate(), holidayDetailDTO.getHolidays()) != null) || WorkingDaysUtil.isNonWorkingDay(holidayDetailDTO.getWorkingDays(), - adjustedDateDetailsDTO.getChangedScheduleDate())) { + adjustedDateDetailsDTO.getChangedScheduleDate())) { recursivelyCheckNonWorkingDaysAndHolidaysAndWorkingDaysExemptionToGenerateNextRepaymentPeriodDate(adjustedDateDetailsDTO, loanApplicationTerms, holidayDetailDTO, isFirstRepayment); } @@ -257,7 +258,7 @@ private AdjustedDateDetailsDTO recursivelyCheckNonWorkingDaysAndHolidaysAndWorki * @param isFirstRepayment */ private void checkAndUpdateWorkingDayIfRepaymentDateIsHolidayDay(final AdjustedDateDetailsDTO adjustedDateDetailsDTO, - final HolidayDetailDTO holidayDetailDTO, final LoanApplicationTerms loanApplicationTerms, final boolean isFirstRepayment) { + final HolidayDetailDTO holidayDetailDTO, final LoanApplicationTerms loanApplicationTerms, final boolean isFirstRepayment) { if (holidayDetailDTO.isHolidayEnabled()) { Holiday applicableHolidayForNewAdjustedDate = null; while ((applicableHolidayForNewAdjustedDate = HolidayUtil.getApplicableHoliday(adjustedDateDetailsDTO.getChangedScheduleDate(), @@ -288,7 +289,7 @@ private void checkAndUpdateWorkingDayIfRepaymentDateIsHolidayDay(final AdjustedD * @param loanApplicationTerms */ private void checkAndUpdateWorkingDayIfRepaymentDateIsNonWorkingDay(final AdjustedDateDetailsDTO adjustedDateDetailsDTO, - final HolidayDetailDTO holidayDetailDTO, final LoanApplicationTerms loanApplicationTerms, final boolean isFirstRepayment) { + final HolidayDetailDTO holidayDetailDTO, final LoanApplicationTerms loanApplicationTerms, final boolean isFirstRepayment) { while (WorkingDaysUtil.isNonWorkingDay(holidayDetailDTO.getWorkingDays(), adjustedDateDetailsDTO.getChangedScheduleDate())) { final RepaymentRescheduleType repaymentRescheduleType = WorkingDaysUtil @@ -313,34 +314,34 @@ public LocalDate getRepaymentPeriodDate(final PeriodFrequencyType frequency, fin switch (frequency) { case DAYS: dueRepaymentPeriodDate = startDate.plusDays(repaidEvery); - break; + break; case WEEKS: dueRepaymentPeriodDate = startDate.plusWeeks(repaidEvery); - break; + break; case MONTHS: dueRepaymentPeriodDate = startDate.plusMonths(repaidEvery); - break; + break; case YEARS: dueRepaymentPeriodDate = startDate.plusYears(repaidEvery); - break; + break; case INVALID: - break; + break; case WHOLE_TERM: - // TODO: Implement getRepaymentPeriodDate for WHOLE_TERM - break; + // TODO: Implement getRepaymentPeriodDate for WHOLE_TERM + break; } return dueRepaymentPeriodDate; } @Override public Boolean isDateFallsInSchedule(final PeriodFrequencyType frequency, final int repaidEvery, final LocalDate startDate, - final LocalDate date) { + final LocalDate date) { boolean isScheduledDate = false; switch (frequency) { case DAYS: int diff = DateUtils.getExactDifferenceInDays(startDate, date); isScheduledDate = (diff % repaidEvery) == 0; - break; + break; case WEEKS: int weekDiff = DateUtils.getExactDifference(startDate, date, ChronoUnit.WEEKS); isScheduledDate = (weekDiff % repaidEvery) == 0; @@ -348,7 +349,7 @@ public Boolean isDateFallsInSchedule(final PeriodFrequencyType frequency, final LocalDate modifiedDate = startDate.plusWeeks(weekDiff); isScheduledDate = DateUtils.isEqual(modifiedDate, date); } - break; + break; case MONTHS: int monthDiff = DateUtils.getExactDifference(startDate, date, ChronoUnit.MONTHS); isScheduledDate = (monthDiff % repaidEvery) == 0; @@ -356,7 +357,7 @@ public Boolean isDateFallsInSchedule(final PeriodFrequencyType frequency, final LocalDate modifiedDate = startDate.plusMonths(monthDiff); isScheduledDate = DateUtils.isEqual(modifiedDate, date); } - break; + break; case YEARS: int yearDiff = DateUtils.getExactDifference(startDate, date, ChronoUnit.YEARS); isScheduledDate = (yearDiff % repaidEvery) == 0; @@ -364,30 +365,30 @@ public Boolean isDateFallsInSchedule(final PeriodFrequencyType frequency, final LocalDate modifiedDate = startDate.plusYears(yearDiff); isScheduledDate = DateUtils.isEqual(modifiedDate, date); } - break; + break; case INVALID: - break; + break; case WHOLE_TERM: - // TODO: Implement getRepaymentPeriodDate for WHOLE_TERM - break; + // TODO: Implement getRepaymentPeriodDate for WHOLE_TERM + break; } return isScheduledDate; } @Override public LocalDate idealDisbursementDateBasedOnFirstRepaymentDate(final PeriodFrequencyType repaymentPeriodFrequencyType, - final int repaidEvery, final LocalDate firstRepaymentDate, final Calendar loanCalendar, final HolidayDetailDTO holidayDetailDTO, - final LoanApplicationTerms loanApplicationTerms) { + final int repaidEvery, final LocalDate firstRepaymentDate, final Calendar loanCalendar, final HolidayDetailDTO holidayDetailDTO, + final LoanApplicationTerms loanApplicationTerms) { LocalDate idealDisbursementDate = null; switch (repaymentPeriodFrequencyType) { case DAYS: idealDisbursementDate = firstRepaymentDate.minusDays(repaidEvery); - break; + break; case WEEKS: idealDisbursementDate = firstRepaymentDate.minusWeeks(repaidEvery); - break; + break; case MONTHS: if (loanCalendar == null) { idealDisbursementDate = firstRepaymentDate.minusMonths(repaidEvery); @@ -398,15 +399,15 @@ public LocalDate idealDisbursementDateBasedOnFirstRepaymentDate(final PeriodFreq holidayDetailDTO.getWorkingDays(), loanApplicationTerms.isSkipRepaymentOnFirstDayofMonth(), loanApplicationTerms.getNumberOfdays()); } - break; + break; case YEARS: idealDisbursementDate = firstRepaymentDate.minusYears(repaidEvery); - break; + break; case INVALID: - break; + break; case WHOLE_TERM: - // TODO: Implement getRepaymentPeriodDate for WHOLE_TERM - break; + // TODO: Implement getRepaymentPeriodDate for WHOLE_TERM + break; } return idealDisbursementDate; @@ -414,7 +415,7 @@ public LocalDate idealDisbursementDateBasedOnFirstRepaymentDate(final PeriodFreq @Override public LocalDate generateNextScheduleDateStartingFromDisburseDate(LocalDate lastRepaymentDate, - LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO) { + LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO) { LocalDate generatedDate = loanApplicationTerms.getExpectedDisbursementDate(); boolean isFirstRepayment = true; @@ -428,7 +429,7 @@ public LocalDate generateNextScheduleDateStartingFromDisburseDate(LocalDate last @Override public LocalDate generateNextScheduleDateStartingFromDisburseDateOrRescheduleDate(LocalDate lastRepaymentDate, - LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO) { + LoanApplicationTerms loanApplicationTerms, final HolidayDetailDTO holidayDetailDTO) { LocalDate generatedDate = loanApplicationTerms.getExpectedDisbursementDate(); boolean isFirstRepayment = true; @@ -446,7 +447,7 @@ public LocalDate generateNextScheduleDateStartingFromDisburseDateOrRescheduleDat } public LocalDate generateNextRepaymentDateWhenHolidayApply(final LocalDate lastRepaymentDate, - final LoanApplicationTerms loanApplicationTerms) { + final LoanApplicationTerms loanApplicationTerms) { LocalDate seedDate; String reccuringString; Calendar currentCalendar = loanApplicationTerms.getLoanCalendar(); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/FinanicalFunctions.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/FinanicalFunctions.java index 8813b09629e..ea23f4fc996 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/FinanicalFunctions.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/FinanicalFunctions.java @@ -6,9 +6,9 @@ * 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 @@ -42,7 +42,7 @@ private FinanicalFunctions() { * @param type */ public static double pmt(final double interestRateFraction, final double numberOfPayments, final double principal, - final double futureValue, final boolean type) { + final double futureValue, final boolean type) { double payment = 0; if (interestRateFraction == 0) { payment = -1 * (futureValue + principal) / numberOfPayments; @@ -55,7 +55,7 @@ public static double pmt(final double interestRateFraction, final double numberO } public static int nop(final double interestRateFraction, final double emiAmount, final double principal, final double futureValue, - final boolean type) { + final boolean type) { double numberOfPayments = 0; if (interestRateFraction == 0) { numberOfPayments = ((Double) (-1 * (futureValue + principal) / emiAmount)).intValue(); 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 8b6a9b46933..6d8770d3956 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 @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.loanschedule.domain; import jakarta.validation.constraints.NotNull; + import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; @@ -27,6 +28,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -607,40 +609,40 @@ public static LoanApplicationTerms assembleFrom(LoanRepaymentScheduleModelData m } public static LoanApplicationTerms assembleFrom(final CurrencyData currency, final Integer loanTermFrequency, - final PeriodFrequencyType loanTermPeriodFrequencyType, final Integer numberOfRepayments, final Integer repaymentEvery, - final PeriodFrequencyType repaymentPeriodFrequencyType, Integer nthDay, DayOfWeekType weekDayType, - final AmortizationMethod amortizationMethod, final InterestMethod interestMethod, final BigDecimal interestRatePerPeriod, - final PeriodFrequencyType interestRatePeriodFrequencyType, final BigDecimal annualNominalInterestRate, - final InterestCalculationPeriodMethod interestCalculationPeriodMethod, final boolean allowPartialPeriodInterestCalculation, - final Money principalMoney, final LocalDate expectedDisbursementDate, final LocalDate repaymentsStartingFromDate, - final LocalDate calculatedRepaymentsStartingFromDate, final Integer graceOnPrincipalPayment, - final Integer recurringMoratoriumOnPrincipalPeriods, final Integer graceOnInterestPayment, final Integer graceOnInterestCharged, - final LocalDate interestChargedFromDate, final Money inArrearsTolerance, final boolean multiDisburseLoan, - final BigDecimal emiAmount, final List disbursementDatas, final BigDecimal maxOutstandingBalance, - final Integer graceOnArrearsAgeing, final DaysInMonthType daysInMonthType, final DaysInYearType daysInYearType, - final boolean isInterestRecalculationEnabled, final RecalculationFrequencyType recalculationFrequencyType, - final CalendarInstance restCalendarInstance, - final InterestRecalculationCompoundingMethod interestRecalculationCompoundingMethod, - final CalendarInstance compoundingCalendarInstance, final RecalculationFrequencyType compoundingFrequencyType, - final BigDecimal principalThresholdForLastInstalment, final Integer installmentAmountInMultiplesOf, - final LoanPreCloseInterestCalculationStrategy preClosureInterestCalculationStrategy, final Calendar loanCalendar, - BigDecimal approvedAmount, List loanTermVariations, - Boolean isInterestChargedFromDateSameAsDisbursalDateEnabled, final Integer numberOfDays, - boolean isSkipRepaymentOnFirstDayOfMonth, final HolidayDetailDTO holidayDetailDTO, final boolean allowCompoundingOnEod, - final boolean isEqualAmortization, final boolean isInterestToBeRecoveredFirstWhenGreaterThanEMI, - final BigDecimal fixedPrincipalPercentagePerInstallment, final boolean isPrincipalCompoundingDisabledForOverdueLoans, - final Boolean enableDownPayment, final BigDecimal disbursedAmountPercentageForDownPayment, - final Boolean isAutoRepaymentForDownPaymentEnabled, final RepaymentStartDateType repaymentStartDateType, - final LocalDate submittedOnDate, final LoanScheduleType loanScheduleType, - final LoanScheduleProcessingType loanScheduleProcessingType, final Integer fixedLength, - final boolean enableAccrualActivityPosting, final List supportedInterestRefundTypes, - final LoanChargeOffBehaviour chargeOffBehaviour, final boolean interestRecognitionOnDisbursementDate, - final DaysInYearCustomStrategyType daysInYearCustomStrategy, final boolean enableIncomeCapitalization, - final LoanCapitalizedIncomeCalculationType capitalizedIncomeCalculationType, - final LoanCapitalizedIncomeStrategy capitalizedIncomeStrategy, final LoanCapitalizedIncomeType capitalizedIncomeType, - final boolean enableBuyDownFee, final LoanBuyDownFeeCalculationType buyDownFeeCalculationType, - final LoanBuyDownFeeStrategy buyDownFeeStrategy, final LoanBuyDownFeeIncomeType buyDownFeeIncomeType, - final boolean merchantBuyDownFee, final boolean allowFullTermForTranche) { + final PeriodFrequencyType loanTermPeriodFrequencyType, final Integer numberOfRepayments, final Integer repaymentEvery, + final PeriodFrequencyType repaymentPeriodFrequencyType, Integer nthDay, DayOfWeekType weekDayType, + final AmortizationMethod amortizationMethod, final InterestMethod interestMethod, final BigDecimal interestRatePerPeriod, + final PeriodFrequencyType interestRatePeriodFrequencyType, final BigDecimal annualNominalInterestRate, + final InterestCalculationPeriodMethod interestCalculationPeriodMethod, final boolean allowPartialPeriodInterestCalculation, + final Money principalMoney, final LocalDate expectedDisbursementDate, final LocalDate repaymentsStartingFromDate, + final LocalDate calculatedRepaymentsStartingFromDate, final Integer graceOnPrincipalPayment, + final Integer recurringMoratoriumOnPrincipalPeriods, final Integer graceOnInterestPayment, final Integer graceOnInterestCharged, + final LocalDate interestChargedFromDate, final Money inArrearsTolerance, final boolean multiDisburseLoan, + final BigDecimal emiAmount, final List disbursementDatas, final BigDecimal maxOutstandingBalance, + final Integer graceOnArrearsAgeing, final DaysInMonthType daysInMonthType, final DaysInYearType daysInYearType, + final boolean isInterestRecalculationEnabled, final RecalculationFrequencyType recalculationFrequencyType, + final CalendarInstance restCalendarInstance, + final InterestRecalculationCompoundingMethod interestRecalculationCompoundingMethod, + final CalendarInstance compoundingCalendarInstance, final RecalculationFrequencyType compoundingFrequencyType, + final BigDecimal principalThresholdForLastInstalment, final Integer installmentAmountInMultiplesOf, + final LoanPreCloseInterestCalculationStrategy preClosureInterestCalculationStrategy, final Calendar loanCalendar, + BigDecimal approvedAmount, List loanTermVariations, + Boolean isInterestChargedFromDateSameAsDisbursalDateEnabled, final Integer numberOfDays, + boolean isSkipRepaymentOnFirstDayOfMonth, final HolidayDetailDTO holidayDetailDTO, final boolean allowCompoundingOnEod, + final boolean isEqualAmortization, final boolean isInterestToBeRecoveredFirstWhenGreaterThanEMI, + final BigDecimal fixedPrincipalPercentagePerInstallment, final boolean isPrincipalCompoundingDisabledForOverdueLoans, + final Boolean enableDownPayment, final BigDecimal disbursedAmountPercentageForDownPayment, + final Boolean isAutoRepaymentForDownPaymentEnabled, final RepaymentStartDateType repaymentStartDateType, + final LocalDate submittedOnDate, final LoanScheduleType loanScheduleType, + final LoanScheduleProcessingType loanScheduleProcessingType, final Integer fixedLength, + final boolean enableAccrualActivityPosting, final List supportedInterestRefundTypes, + final LoanChargeOffBehaviour chargeOffBehaviour, final boolean interestRecognitionOnDisbursementDate, + final DaysInYearCustomStrategyType daysInYearCustomStrategy, final boolean enableIncomeCapitalization, + final LoanCapitalizedIncomeCalculationType capitalizedIncomeCalculationType, + final LoanCapitalizedIncomeStrategy capitalizedIncomeStrategy, final LoanCapitalizedIncomeType capitalizedIncomeType, + final boolean enableBuyDownFee, final LoanBuyDownFeeCalculationType buyDownFeeCalculationType, + final LoanBuyDownFeeStrategy buyDownFeeStrategy, final LoanBuyDownFeeIncomeType buyDownFeeIncomeType, + final boolean merchantBuyDownFee, final boolean allowFullTermForTranche) { final LoanRescheduleStrategyMethod rescheduleStrategyMethod = null; final CalendarHistoryDataWrapper calendarHistoryDataWrapper = null; @@ -667,23 +669,23 @@ public static LoanApplicationTerms assembleFrom(final CurrencyData currency, fin } public static LoanApplicationTerms assembleFrom(final CurrencyData currency, final Integer loanTermFrequency, - final PeriodFrequencyType loanTermPeriodFrequencyType, NthDayType nthDay, DayOfWeekType dayOfWeek, - final LocalDate expectedDisbursementDate, final LocalDate repaymentsStartingFromDate, - final LocalDate calculatedRepaymentsStartingFromDate, final Money inArrearsTolerance, - final LoanProductRelatedDetail loanProductRelatedDetail, final boolean multiDisburseLoan, final BigDecimal emiAmount, - final List disbursementDatas, final BigDecimal maxOutstandingBalance, final LocalDate interestChargedFromDate, - final BigDecimal principalThresholdForLastInstalment, final Integer installmentAmountInMultiplesOf, - final RecalculationFrequencyType recalculationFrequencyType, final CalendarInstance restCalendarInstance, - final InterestRecalculationCompoundingMethod compoundingMethod, final CalendarInstance compoundingCalendarInstance, - final RecalculationFrequencyType compoundingFrequencyType, - final LoanPreCloseInterestCalculationStrategy loanPreClosureInterestCalculationStrategy, - final LoanRescheduleStrategyMethod rescheduleStrategyMethod, final Calendar loanCalendar, BigDecimal approvedAmount, - BigDecimal annualNominalInterestRate, final List loanTermVariations, - final CalendarHistoryDataWrapper calendarHistoryDataWrapper, final Integer numberOfDays, - final boolean isSkipRepaymentOnFirstDayOfMonth, final HolidayDetailDTO holidayDetailDTO, final boolean allowCompoundingOnEod, - final boolean isFirstRepaymentDateAllowedOnHoliday, final boolean isInterestToBeRecoveredFirstWhenGreaterThanEMI, - final BigDecimal fixedPrincipalPercentagePerInstallment, final boolean isPrincipalCompoundingDisabledForOverdueLoans, - final RepaymentStartDateType repaymentStartDateType, final LocalDate submittedOnDate, final boolean allowFullTermForTranche) { + final PeriodFrequencyType loanTermPeriodFrequencyType, NthDayType nthDay, DayOfWeekType dayOfWeek, + final LocalDate expectedDisbursementDate, final LocalDate repaymentsStartingFromDate, + final LocalDate calculatedRepaymentsStartingFromDate, final Money inArrearsTolerance, + final LoanProductRelatedDetail loanProductRelatedDetail, final boolean multiDisburseLoan, final BigDecimal emiAmount, + final List disbursementDatas, final BigDecimal maxOutstandingBalance, final LocalDate interestChargedFromDate, + final BigDecimal principalThresholdForLastInstalment, final Integer installmentAmountInMultiplesOf, + final RecalculationFrequencyType recalculationFrequencyType, final CalendarInstance restCalendarInstance, + final InterestRecalculationCompoundingMethod compoundingMethod, final CalendarInstance compoundingCalendarInstance, + final RecalculationFrequencyType compoundingFrequencyType, + final LoanPreCloseInterestCalculationStrategy loanPreClosureInterestCalculationStrategy, + final LoanRescheduleStrategyMethod rescheduleStrategyMethod, final Calendar loanCalendar, BigDecimal approvedAmount, + BigDecimal annualNominalInterestRate, final List loanTermVariations, + final CalendarHistoryDataWrapper calendarHistoryDataWrapper, final Integer numberOfDays, + final boolean isSkipRepaymentOnFirstDayOfMonth, final HolidayDetailDTO holidayDetailDTO, final boolean allowCompoundingOnEod, + final boolean isFirstRepaymentDateAllowedOnHoliday, final boolean isInterestToBeRecoveredFirstWhenGreaterThanEMI, + final BigDecimal fixedPrincipalPercentagePerInstallment, final boolean isPrincipalCompoundingDisabledForOverdueLoans, + final RepaymentStartDateType repaymentStartDateType, final LocalDate submittedOnDate, final boolean allowFullTermForTranche) { final Integer numberOfRepayments = loanProductRelatedDetail.getNumberOfRepayments(); final Integer repaymentEvery = loanProductRelatedDetail.getRepayEvery(); @@ -745,39 +747,39 @@ public static LoanApplicationTerms assembleFrom(final CurrencyData currency, fin } private LoanApplicationTerms(final CurrencyData currency, final Integer loanTermFrequency, - final PeriodFrequencyType loanTermPeriodFrequencyType, final Integer numberOfRepayments, final Integer repaymentEvery, - 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 Money principal, final LocalDate expectedDisbursementDate, final LocalDate repaymentsStartingFromDate, - final LocalDate calculatedRepaymentsStartingFromDate, final Integer principalGrace, - final Integer recurringMoratoriumOnPrincipalPeriods, final Integer interestPaymentGrace, final Integer interestChargingGrace, - final LocalDate interestChargedFromDate, final Money inArrearsTolerance, final boolean multiDisburseLoan, - final BigDecimal emiAmount, final List disbursementDatas, final BigDecimal maxOutstandingBalance, - final Integer graceOnArrearsAgeing, final DaysInMonthType daysInMonthType, final DaysInYearType daysInYearType, - final boolean isInterestRecalculationEnabled, final LoanRescheduleStrategyMethod rescheduleStrategyMethod, - final InterestRecalculationCompoundingMethod interestRecalculationCompoundingMethod, - final CalendarInstance restCalendarInstance, final RecalculationFrequencyType recalculationFrequencyType, - final CalendarInstance compoundingCalendarInstance, final RecalculationFrequencyType compoundingFrequencyType, - final BigDecimal principalThresholdForLastInstalment, final Integer installmentAmountInMultiplesOf, - final LoanPreCloseInterestCalculationStrategy preClosureInterestCalculationStrategy, final Calendar loanCalendar, - BigDecimal approvedAmount, List loanTermVariations, - final CalendarHistoryDataWrapper calendarHistoryDataWrapper, Boolean isInterestChargedFromDateSameAsDisbursalDateEnabled, - final Integer numberOfDays, final boolean isSkipRepaymentOnFirstDayOfMonth, final HolidayDetailDTO holidayDetailDTO, - final boolean allowCompoundingOnEod, final boolean isEqualAmortization, final boolean isFirstRepaymentDateAllowedOnHoliday, - final boolean isInterestToBeRecoveredFirstWhenGreaterThanEMI, final BigDecimal fixedPrincipalPercentagePerInstallment, - final boolean isPrincipalCompoundingDisabledForOverdueLoans, final boolean isDownPaymentEnabled, - final BigDecimal disbursedAmountPercentageForDownPayment, final boolean isAutoRepaymentForDownPaymentEnabled, - final RepaymentStartDateType repaymentStartDateType, final LocalDate submittedOnDate, final LoanScheduleType loanScheduleType, - final LoanScheduleProcessingType loanScheduleProcessingType, final Integer fixedLength, boolean enableAccrualActivityPosting, - final List supportedInterestRefundTypes, final LoanChargeOffBehaviour chargeOffBehaviour, - final boolean interestRecognitionOnDisbursementDate, final DaysInYearCustomStrategyType daysInYearCustomStrategy, - final boolean enableIncomeCapitalization, final LoanCapitalizedIncomeCalculationType capitalizedIncomeCalculationType, - final LoanCapitalizedIncomeStrategy capitalizedIncomeStrategy, final LoanCapitalizedIncomeType capitalizedIncomeType, - final boolean enableBuyDownFee, final LoanBuyDownFeeCalculationType buyDownFeeCalculationType, - final LoanBuyDownFeeStrategy buyDownFeeStrategy, final LoanBuyDownFeeIncomeType buyDownFeeIncomeType, - final boolean merchantBuyDownFee, final boolean allowFullTermForTranche) { + final PeriodFrequencyType loanTermPeriodFrequencyType, final Integer numberOfRepayments, final Integer repaymentEvery, + 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 Money principal, final LocalDate expectedDisbursementDate, final LocalDate repaymentsStartingFromDate, + final LocalDate calculatedRepaymentsStartingFromDate, final Integer principalGrace, + final Integer recurringMoratoriumOnPrincipalPeriods, final Integer interestPaymentGrace, final Integer interestChargingGrace, + final LocalDate interestChargedFromDate, final Money inArrearsTolerance, final boolean multiDisburseLoan, + final BigDecimal emiAmount, final List disbursementDatas, final BigDecimal maxOutstandingBalance, + final Integer graceOnArrearsAgeing, final DaysInMonthType daysInMonthType, final DaysInYearType daysInYearType, + final boolean isInterestRecalculationEnabled, final LoanRescheduleStrategyMethod rescheduleStrategyMethod, + final InterestRecalculationCompoundingMethod interestRecalculationCompoundingMethod, + final CalendarInstance restCalendarInstance, final RecalculationFrequencyType recalculationFrequencyType, + final CalendarInstance compoundingCalendarInstance, final RecalculationFrequencyType compoundingFrequencyType, + final BigDecimal principalThresholdForLastInstalment, final Integer installmentAmountInMultiplesOf, + final LoanPreCloseInterestCalculationStrategy preClosureInterestCalculationStrategy, final Calendar loanCalendar, + BigDecimal approvedAmount, List loanTermVariations, + final CalendarHistoryDataWrapper calendarHistoryDataWrapper, Boolean isInterestChargedFromDateSameAsDisbursalDateEnabled, + final Integer numberOfDays, final boolean isSkipRepaymentOnFirstDayOfMonth, final HolidayDetailDTO holidayDetailDTO, + final boolean allowCompoundingOnEod, final boolean isEqualAmortization, final boolean isFirstRepaymentDateAllowedOnHoliday, + final boolean isInterestToBeRecoveredFirstWhenGreaterThanEMI, final BigDecimal fixedPrincipalPercentagePerInstallment, + final boolean isPrincipalCompoundingDisabledForOverdueLoans, final boolean isDownPaymentEnabled, + final BigDecimal disbursedAmountPercentageForDownPayment, final boolean isAutoRepaymentForDownPaymentEnabled, + final RepaymentStartDateType repaymentStartDateType, final LocalDate submittedOnDate, final LoanScheduleType loanScheduleType, + final LoanScheduleProcessingType loanScheduleProcessingType, final Integer fixedLength, boolean enableAccrualActivityPosting, + final List supportedInterestRefundTypes, final LoanChargeOffBehaviour chargeOffBehaviour, + final boolean interestRecognitionOnDisbursementDate, final DaysInYearCustomStrategyType daysInYearCustomStrategy, + final boolean enableIncomeCapitalization, final LoanCapitalizedIncomeCalculationType capitalizedIncomeCalculationType, + final LoanCapitalizedIncomeStrategy capitalizedIncomeStrategy, final LoanCapitalizedIncomeType capitalizedIncomeType, + final boolean enableBuyDownFee, final LoanBuyDownFeeCalculationType buyDownFeeCalculationType, + final LoanBuyDownFeeStrategy buyDownFeeStrategy, final LoanBuyDownFeeIncomeType buyDownFeeIncomeType, + final boolean merchantBuyDownFee, final boolean allowFullTermForTranche) { this.currency = currency; this.loanTermFrequency = loanTermFrequency; @@ -892,7 +894,7 @@ private LoanApplicationTerms(final CurrencyData currency, final Integer loanTerm } public Money adjustPrincipalIfLastRepaymentPeriod(final Money principalForPeriod, final Money totalCumulativePrincipalToDate, - final int periodNumber) { + final int periodNumber) { Money adjusted = principalForPeriod; @@ -922,7 +924,7 @@ public Money adjustPrincipalIfLastRepaymentPeriod(final Money principalForPeriod } public Money adjustInterestIfLastRepaymentPeriod(final Money interestForThisPeriod, final Money totalCumulativeInterestToDate, - final Money totalInterestDueForLoan, final int periodNumber) { + final Money totalInterestDueForLoan, final int periodNumber) { Money adjusted = interestForThisPeriod; @@ -962,47 +964,47 @@ public Money calculateTotalInterestCharged(final PaymentPeriodsInOneYearCalculat final Money totalGraceOnInterestCharged = totalInterestPerInstallment.multiplyRetainScale(getInterestChargingGrace(), mc); totalInterestCharged = totalInterestChargedForLoanTerm.minus(totalGraceOnInterestCharged); - break; + break; case DECLINING_BALANCE: case INVALID: - break; + break; } return totalInterestCharged; } public Money calculateTotalPrincipalForPeriod(final PaymentPeriodsInOneYearCalculator calculator, final Money outstandingBalance, - final int periodNumber, final MathContext mc, Money interestForThisInstallment) { + final int periodNumber, final MathContext mc, Money interestForThisInstallment) { Money principalForInstallment = this.principal.zero(); switch (this.interestMethod) { case FLAT: principalForInstallment = calculateTotalPrincipalPerPeriodWithoutGrace(mc, periodNumber, interestForThisInstallment); - break; + break; case DECLINING_BALANCE: switch (this.amortizationMethod) { case EQUAL_INSTALLMENTS: Money totalPmtForThisInstallment = pmtForInstallment(calculator, outstandingBalance, periodNumber, mc); principalForInstallment = calculatePrincipalDueForInstallment(periodNumber, totalPmtForThisInstallment, interestForThisInstallment); - break; + break; case EQUAL_PRINCIPAL: principalForInstallment = calculateEqualPrincipalDueForInstallment(mc, periodNumber); - break; + break; case INVALID: - break; + break; } - break; + break; case INVALID: - break; + break; } return principalForInstallment; } public Money pmtForInstallment(final PaymentPeriodsInOneYearCalculator calculator, final Money outstandingBalance, - final int periodNumber, final MathContext mc) { + final int periodNumber, final MathContext mc) { // Calculate exact period from disbursement date final LocalDate periodStartDate = getExpectedDisbursementDate().withDayOfMonth(1); final LocalDate periodEndDate = getPeriodEndDate(periodStartDate); @@ -1022,29 +1024,29 @@ private LocalDate getPeriodEndDate(final LocalDate startDate) { switch (this.repaymentPeriodFrequencyType) { case DAYS: dueRepaymentPeriodDate = startDate.plusDays(this.repaymentEvery); - break; + break; case WEEKS: dueRepaymentPeriodDate = startDate.plusWeeks(this.repaymentEvery); - break; + break; case MONTHS: dueRepaymentPeriodDate = startDate.plusMonths(this.repaymentEvery); - break; + break; case YEARS: dueRepaymentPeriodDate = startDate.plusYears(this.repaymentEvery); - break; + break; case INVALID: - break; + break; case WHOLE_TERM: - // TODO: Implement getPeriodEndDate for WHOLE_TERM - break; + // TODO: Implement getPeriodEndDate for WHOLE_TERM + break; } return dueRepaymentPeriodDate; } public PrincipalInterest calculateTotalInterestForPeriod(final PaymentPeriodsInOneYearCalculator calculator, - final BigDecimal interestCalculationGraceOnRepaymentPeriodFraction, final int periodNumber, final MathContext mc, - final Money cumulatingInterestPaymentDueToGrace, final Money outstandingBalance, final LocalDate periodStartDate, - final LocalDate periodEndDate) { + final BigDecimal interestCalculationGraceOnRepaymentPeriodFraction, final int periodNumber, final MathContext mc, + final Money cumulatingInterestPaymentDueToGrace, final Money outstandingBalance, final LocalDate periodStartDate, + final LocalDate periodEndDate) { Money interestForInstallment = this.principal.zero(); Money interestBroughtForwardDueToGrace = cumulatingInterestPaymentDueToGrace.copy(); @@ -1064,7 +1066,7 @@ public PrincipalInterest calculateTotalInterestForPeriod(final PaymentPeriodsInO // instalments where interest is applicable interestForInstallment = calculateTotalFlatInterestForInstallmentAveragingOutGracePeriods(calculator, periodNumber, mc); - break; + break; case EQUAL_PRINCIPAL: // interest follows time-value of money and is // brought @@ -1074,12 +1076,12 @@ public PrincipalInterest calculateTotalInterestForPeriod(final PaymentPeriodsInO interestBroughtForwardDueToGrace); interestForInstallment = result.interest(); interestBroughtForwardDueToGrace = result.interestPaymentDueToGrace(); - break; + break; case INVALID: - break; + break; } } - break; + break; case DECLINING_BALANCE: final Money interestForThisInstallmentBeforeGrace = calculateDecliningInterestDueForInstallmentBeforeApplyingGrace( @@ -1098,9 +1100,9 @@ public PrincipalInterest calculateTotalInterestForPeriod(final PaymentPeriodsInO } else { interestBroughtForwardDueToGrace = interestBroughtForwardDueToGrace.plus(interestForThisInstallmentBeforeGrace); } - break; + break; case INVALID: - break; + break; } return new PrincipalInterest(null, interestForInstallment, interestBroughtForwardDueToGrace); @@ -1127,11 +1129,11 @@ private Money calculateTotalFlatInterestDueWithoutGrace(final PaymentPeriodsInOn totalInterestDue = this.disbursedPrincipal.minus(totalPrincipalAccountedForInterestCalcualtion) .multiplyRetainScale(interestRateForLoanTerm, mc); - break; + break; case DECLINING_BALANCE: - break; + break; case INVALID: - break; + break; } return totalInterestDue; @@ -1164,9 +1166,9 @@ private BigDecimal calculatePeriodsInLoanTerm() { final int periodsInLoanTermInteger = DateUtils.getExactDifferenceInDays(loanStartDate, this.loanEndDate); periodsInLoanTerm = BigDecimal.valueOf(periodsInLoanTermInteger); - break; + break; case INVALID: - break; + break; case SAME_AS_REPAYMENT_PERIOD: if (this.allowPartialPeriodInterestCalculation) { LocalDate startDate = getExpectedDisbursementDate(); @@ -1175,7 +1177,7 @@ private BigDecimal calculatePeriodsInLoanTerm() { } periodsInLoanTerm = calculatePeriodsBetweenDates(startDate, this.loanEndDate); } - break; + break; } return periodsInLoanTerm; @@ -1187,13 +1189,13 @@ public BigDecimal calculatePeriodsBetweenDates(final LocalDate startDate, final case DAYS: int numOfDays = DateUtils.getExactDifferenceInDays(startDate, endDate); numberOfPeriods = BigDecimal.valueOf((double) numOfDays); - break; + break; case WEEKS: int numberOfWeeks = DateUtils.getExactDifference(startDate, endDate, ChronoUnit.WEEKS); int daysLeftAfterWeeks = DateUtils.getExactDifferenceInDays(startDate.plusWeeks(numberOfWeeks), endDate); numberOfPeriods = numberOfPeriods.add(BigDecimal.valueOf(numberOfWeeks)) .add(BigDecimal.valueOf((double) daysLeftAfterWeeks / 7)); - break; + break; case MONTHS: int numberOfMonths = DateUtils.getExactDifference(startDate, endDate, ChronoUnit.MONTHS); LocalDate startDateAfterConsideringMonths = null; @@ -1236,7 +1238,7 @@ public BigDecimal calculatePeriodsBetweenDates(final LocalDate startDate, final endDateAfterConsideringMonths); numberOfPeriods = numberOfPeriods.add(BigDecimal.valueOf(numberOfMonths)) .add(BigDecimal.valueOf((double) daysLeftAfterMonths / daysInPeriodAfterMonths)); - break; + break; case YEARS: int numberOfYears = DateUtils.getExactDifference(startDate, endDate, ChronoUnit.YEARS); LocalDate startDateAfterConsideringYears = startDate.plusYears(numberOfYears); @@ -1246,9 +1248,9 @@ public BigDecimal calculatePeriodsBetweenDates(final LocalDate startDate, final endDateAfterConsideringYears); numberOfPeriods = numberOfPeriods.add(BigDecimal.valueOf(numberOfYears)) .add(BigDecimal.valueOf((double) daysLeftAfterYears / daysInPeriodAfterYears)); - break; + break; default: - break; + break; } return numberOfPeriods; } @@ -1258,7 +1260,7 @@ public void updateLoanEndDate(final LocalDate loanEndDate) { } private Money calculateTotalInterestPerInstallmentWithoutGrace(final PaymentPeriodsInOneYearCalculator calculator, - final MathContext mc) { + final MathContext mc) { final Money totalInterestForLoanTerm = calculateTotalFlatInterestDueWithoutGrace(calculator, mc); return flatInterestPerInstallment(mc, totalInterestForLoanTerm); @@ -1277,7 +1279,7 @@ private Money flatInterestPerInstallment(final MathContext mc, final Money total } private Money calculateTotalPrincipalPerPeriodWithoutGrace(final MathContext mc, final int periodNumber, - Money interestForThisInstallment) { + Money interestForThisInstallment) { final int totalRepaymentsWithCapitalPayment = calculateNumberOfRepaymentsWithPrincipalPayment(); Money principalPerPeriod; if (getFixedEmiAmount() == null) { @@ -1326,7 +1328,7 @@ private Money calculateTotalPrincipalPerPeriodWithoutGrace(final MathContext mc, } private PrincipalInterest calculateTotalFlatInterestForPeriod(final PaymentPeriodsInOneYearCalculator calculator, - final int periodNumber, final MathContext mc, final Money cumulatingInterestPaymentDueToGrace) { + final int periodNumber, final MathContext mc, final Money cumulatingInterestPaymentDueToGrace) { Money interestBroughtForwardDueToGrace = cumulatingInterestPaymentDueToGrace.copy(); @@ -1350,7 +1352,7 @@ private PrincipalInterest calculateTotalFlatInterestForPeriod(final PaymentPerio * interest is due and should be paid against the total known interest that is due without grace. */ private Money calculateTotalFlatInterestForInstallmentAveragingOutGracePeriods(final PaymentPeriodsInOneYearCalculator calculator, - final int periodNumber, final MathContext mc) { + final int periodNumber, final MathContext mc) { Money interestForInstallment = calculateTotalInterestPerInstallmentWithoutGrace(calculator, mc); if (isInterestPaymentGraceApplicableForThisPeriod(periodNumber)) { @@ -1391,14 +1393,14 @@ private Money calculateTotalFlatInterestForInstallmentAveragingOutGracePeriods(f } private BigDecimal periodicInterestRate(final PaymentPeriodsInOneYearCalculator calculator, final MathContext mc, - final DaysInMonthType daysInMonthType, final DaysInYearType daysInYearType, LocalDate periodStartDate, - LocalDate periodEndDate) { + final DaysInMonthType daysInMonthType, final DaysInYearType daysInYearType, LocalDate periodStartDate, + LocalDate periodEndDate) { return periodicInterestRate(calculator, mc, daysInMonthType, daysInYearType, periodStartDate, periodEndDate, false); } private BigDecimal periodicInterestRate(final PaymentPeriodsInOneYearCalculator calculator, final MathContext mc, - final DaysInMonthType daysInMonthType, final DaysInYearType daysInYearType, LocalDate periodStartDate, LocalDate periodEndDate, - boolean isForPMT) { + final DaysInMonthType daysInMonthType, final DaysInYearType daysInYearType, LocalDate periodStartDate, LocalDate periodEndDate, + boolean isForPMT) { final long loanTermPeriodsInOneYear = calculatePeriodsInOneYear(calculator); @@ -1414,7 +1416,7 @@ private BigDecimal periodicInterestRate(final PaymentPeriodsInOneYearCalculator } switch (this.interestCalculationPeriodMethod) { case INVALID: - break; + break; case DAILY: // For daily work out number of days in the period BigDecimal numberOfDaysInPeriod = BigDecimal.valueOf(DateUtils.getDifferenceInDays(periodStartDate, periodEndDate)); @@ -1424,44 +1426,44 @@ private BigDecimal periodicInterestRate(final PaymentPeriodsInOneYearCalculator switch (this.repaymentPeriodFrequencyType) { case INVALID: - break; + break; case DAYS: periodicInterestRate = oneDayOfYearInterestRate.multiply(numberOfDaysInPeriod, mc); - break; + break; case WEEKS: periodicInterestRate = oneDayOfYearInterestRate.multiply(numberOfDaysInPeriod, mc); - break; + break; case MONTHS: if (daysInMonthType.isDaysInMonth_30()) { numberOfDaysInPeriod = loanTermFrequencyBigDecimal.multiply(BigDecimal.valueOf(30), mc); } periodicInterestRate = oneDayOfYearInterestRate.multiply(numberOfDaysInPeriod, mc); - break; + break; case YEARS: switch (daysInYearType) { case DAYS_360: numberOfDaysInPeriod = loanTermFrequencyBigDecimal.multiply(BigDecimal.valueOf(360), mc); - break; + break; case DAYS_364: numberOfDaysInPeriod = loanTermFrequencyBigDecimal.multiply(BigDecimal.valueOf(364), mc); - break; + break; case DAYS_365: numberOfDaysInPeriod = loanTermFrequencyBigDecimal.multiply(BigDecimal.valueOf(365), mc); - break; + break; default: - break; + break; } periodicInterestRate = oneDayOfYearInterestRate.multiply(numberOfDaysInPeriod, mc); - break; + break; case WHOLE_TERM: - // TODO: Implement getPeriodEndDate for WHOLE_TERM - break; + // TODO: Implement getPeriodEndDate for WHOLE_TERM + break; } - break; + break; case SAME_AS_REPAYMENT_PERIOD: periodicInterestRate = this.annualNominalInterestRate.divide(loanTermPeriodsInYearBigDecimal, mc).divide(divisor, mc) .multiply(loanTermFrequencyBigDecimal); - break; + break; } return periodicInterestRate; @@ -1476,7 +1478,7 @@ private BigDecimal calculateLoanTermFrequency(final LocalDate periodStartDate, f } public BigDecimal interestRateFor(final PaymentPeriodsInOneYearCalculator calculator, final MathContext mc, - final Money outstandingBalance, final LocalDate fromDate, final LocalDate toDate) { + final Money outstandingBalance, final LocalDate fromDate, final LocalDate toDate) { long loanTermPeriodsInOneYear = calculator.calculate(PeriodFrequencyType.DAYS).longValue(); int repaymentEvery = DateUtils.getExactDifferenceInDays(fromDate, toDate); @@ -1510,11 +1512,11 @@ private long calculatePeriodsInOneYear(final PaymentPeriodsInOneYearCalculator c periodsInOneYear = !this.daysInYearType.getCode().equalsIgnoreCase("DaysInYearType.actual") ? this.daysInYearType.getValue().longValue() : calculator.calculate(PeriodFrequencyType.DAYS).longValue(); - break; + break; case INVALID: - break; + break; case SAME_AS_REPAYMENT_PERIOD: - break; + break; } return periodsInOneYear; @@ -1623,7 +1625,7 @@ private double paymentPerPeriod(final BigDecimal periodicInterestRate, final Mon } private Money calculateDecliningInterestDueForInstallmentBeforeApplyingGrace(final PaymentPeriodsInOneYearCalculator calculator, - final MathContext mc, final Money outstandingBalance, LocalDate periodStartDate, LocalDate periodEndDate) { + final MathContext mc, final Money outstandingBalance, LocalDate periodStartDate, LocalDate periodEndDate) { Money interestDue = Money.zero(outstandingBalance.getCurrency()); @@ -1635,8 +1637,8 @@ private Money calculateDecliningInterestDueForInstallmentBeforeApplyingGrace(fin } private Money calculateDecliningInterestDueForInstallmentAfterApplyingGrace(final PaymentPeriodsInOneYearCalculator calculator, - final BigDecimal interestCalculationGraceOnRepaymentPeriodFraction, final MathContext mc, final Money outstandingBalance, - final int periodNumber, LocalDate periodStartDate, LocalDate periodEndDate) { + final BigDecimal interestCalculationGraceOnRepaymentPeriodFraction, final MathContext mc, final Money outstandingBalance, + final int periodNumber, LocalDate periodStartDate, LocalDate periodEndDate) { Money interest = calculateDecliningInterestDueForInstallmentBeforeApplyingGrace(calculator, mc, outstandingBalance, periodStartDate, periodEndDate); @@ -1708,7 +1710,7 @@ private Integer calculateNumberOfRemainingPrincipalPaymentPeriods(final Integer } private Money calculatePrincipalDueForInstallment(final int periodNumber, final Money totalDuePerInstallment, - final Money periodInterest) { + final Money periodInterest) { Money principal = totalDuePerInstallment.minus(periodInterest); if (isPrincipalGraceApplicableForThisPeriod(periodNumber)) { principal = principal.zero(); @@ -1717,7 +1719,7 @@ private Money calculatePrincipalDueForInstallment(final int periodNumber, final } private Money calculateTotalDueForEqualInstallmentRepaymentPeriod(final BigDecimal periodicInterestRate, final Money balance, - final int periodsElapsed) { + final int periodsElapsed) { final double paymentPerRepaymentPeriod = paymentPerPeriod(periodicInterestRate, balance, periodsElapsed); @@ -1811,7 +1813,7 @@ private boolean isFallingInRepaymentPeriod(LocalDate fromDate, LocalDate toDate) case WEEKS: int days = DateUtils.getExactDifferenceInDays(fromDate, toDate); isSameAsRepaymentPeriod = (days % 7) == 0; - break; + break; case MONTHS: boolean isFromDateOnEndDate = fromDate.getDayOfMonth() > fromDate.plusDays(1).getDayOfMonth(); boolean isToDateOnEndDate = toDate.getDayOfMonth() > toDate.plusDays(1).getDayOfMonth(); @@ -1825,9 +1827,9 @@ private boolean isFallingInRepaymentPeriod(LocalDate fromDate, LocalDate toDate) isSameAsRepaymentPeriod = DateUtils.isEqual(fromDate, toDate); } - break; + break; default: - break; + break; } } return isSameAsRepaymentPeriod; @@ -1838,18 +1840,18 @@ private Integer getPeriodsBetween(LocalDate fromDate, LocalDate toDate) { switch (this.repaymentPeriodFrequencyType) { case DAYS: numberOfPeriods = DateUtils.getExactDifferenceInDays(fromDate, toDate); - break; + break; case WEEKS: numberOfPeriods = DateUtils.getExactDifference(fromDate, toDate, ChronoUnit.WEEKS); - break; + break; case MONTHS: numberOfPeriods = DateUtils.getExactDifference(fromDate, toDate, ChronoUnit.MONTHS); - break; + break; case YEARS: numberOfPeriods = DateUtils.getExactDifference(fromDate, toDate, ChronoUnit.YEARS); - break; + break; default: - break; + break; } return numberOfPeriods; } @@ -2025,7 +2027,7 @@ public void setTotalPrincipalAccountedForInterestCalculation(Money totalPrincipa // Used for FLAT loans to calculate principal and interest per installment public void updateAccountedTillPeriod(int periodNumber, Money totalPrincipalAccounted, Money totalInterestAccounted, - int extendPeriods) { + int extendPeriods) { this.periodsCompleted = periodNumber; this.totalPrincipalAccounted = totalPrincipalAccounted; this.totalInterestAccounted = totalInterestAccounted; @@ -2077,21 +2079,21 @@ public LocalDate calculateMaxDateForFixedLength() { switch (repaymentPeriodFrequencyType) { case DAYS: maxDateForFixedLength = startDate.plusDays(fixedLength + variationDays); - break; + break; case WEEKS: maxDateForFixedLength = startDate.plusWeeks(fixedLength + variationDays); - break; + break; case MONTHS: maxDateForFixedLength = startDate.plusMonths(fixedLength + variationDays); - break; + break; case YEARS: maxDateForFixedLength = startDate.plusYears(fixedLength + variationDays); - break; + break; case INVALID: - break; + break; case WHOLE_TERM: - // TODO: Implement getPeriodEndDate for WHOLE_TERM - break; + // TODO: Implement getPeriodEndDate for WHOLE_TERM + break; } return maxDateForFixedLength; } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanRepaymentScheduleHistory.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanRepaymentScheduleHistory.java index b2f52da5859..b004c934d7f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanRepaymentScheduleHistory.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanRepaymentScheduleHistory.java @@ -6,9 +6,9 @@ * 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 @@ -27,10 +27,12 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.OffsetDateTime; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.rescheduleloan.domain.LoanRescheduleRequest; @@ -92,17 +94,18 @@ public class LoanRepaymentScheduleHistory extends AbstractPersistableCustom * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanRepaymentScheduleModelData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanRepaymentScheduleModelData.java index 66fca947cbe..071ec195a83 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanRepaymentScheduleModelData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanRepaymentScheduleModelData.java @@ -6,9 +6,9 @@ * 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 @@ -21,20 +21,29 @@ import jakarta.annotation.Nullable; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; + import java.math.BigDecimal; import java.time.LocalDate; + import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.portfolio.common.domain.DaysInMonthType; import org.apache.fineract.portfolio.common.domain.DaysInYearCustomStrategyType; import org.apache.fineract.portfolio.common.domain.DaysInYearType; import org.apache.fineract.portfolio.loanproduct.domain.InterestMethod; -public record LoanRepaymentScheduleModelData(@NotNull LocalDate scheduleGenerationStartDate, @NotNull CurrencyData currency, - @NotNull BigDecimal disbursementAmount, @NotNull LocalDate disbursementDate, @NotNull int numberOfRepayments, - @NotNull int repaymentFrequency, @NotBlank String repaymentFrequencyType, @NotNull BigDecimal annualNominalInterestRate, - @NotNull boolean downPaymentEnabled, @NotNull DaysInMonthType daysInMonth, @NotNull DaysInYearType daysInYear, - BigDecimal downPaymentPercentage, Integer installmentAmountInMultiplesOf, Integer fixedLength, - @NotNull Boolean interestRecognitionOnDisbursementDate, @Nullable DaysInYearCustomStrategyType daysInYearCustomStrategy, - @NotNull InterestMethod interestMethod, @NotNull boolean allowPartialPeriodInterestCalculation, - @NotNull boolean allowFullTermForTranche) { +public record LoanRepaymentScheduleModelData(@NotNull LocalDate scheduleGenerationStartDate, + @NotNull CurrencyData currency, + @NotNull BigDecimal disbursementAmount, + @NotNull LocalDate disbursementDate, @NotNull int numberOfRepayments, + @NotNull int repaymentFrequency, @NotBlank String repaymentFrequencyType, + @NotNull BigDecimal annualNominalInterestRate, + @NotNull boolean downPaymentEnabled, @NotNull DaysInMonthType daysInMonth, + @NotNull DaysInYearType daysInYear, + BigDecimal downPaymentPercentage, Integer installmentAmountInMultiplesOf, + Integer fixedLength, + @NotNull Boolean interestRecognitionOnDisbursementDate, + @Nullable DaysInYearCustomStrategyType daysInYearCustomStrategy, + @NotNull InterestMethod interestMethod, + @NotNull boolean allowPartialPeriodInterestCalculation, + @NotNull boolean allowFullTermForTranche) { } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleGenerator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleGenerator.java index abe62c20e24..c890fe11e62 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleGenerator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleGenerator.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.portfolio.loanaccount.loanschedule.domain; import jakarta.validation.constraints.NotNull; + import java.math.MathContext; import java.time.LocalDate; import java.util.Set; + import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.portfolio.loanaccount.data.HolidayDetailDTO; @@ -35,19 +37,19 @@ public interface LoanScheduleGenerator { LoanScheduleModel generate(MathContext mc, LoanApplicationTerms loanApplicationTerms, Set loanCharges, - HolidayDetailDTO holidayDetailDTO); + HolidayDetailDTO holidayDetailDTO); LoanScheduleDTO rescheduleNextInstallments(MathContext mc, LoanApplicationTerms loanApplicationTerms, Loan loan, - HolidayDetailDTO holidayDetailDTO, LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, - LocalDate rescheduleFrom); + HolidayDetailDTO holidayDetailDTO, LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, + LocalDate rescheduleFrom); LoanScheduleDTO rescheduleNextInstallments(MathContext mc, LoanApplicationTerms loanApplicationTerms, Loan loan, - HolidayDetailDTO holidayDetailDTO, LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, - LocalDate rescheduleFrom, LocalDate rescheduleTill); + HolidayDetailDTO holidayDetailDTO, LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, + LocalDate rescheduleFrom, LocalDate rescheduleTill); OutstandingAmountsDTO calculatePrepaymentAmount(MonetaryCurrency currency, LocalDate onDate, LoanApplicationTerms loanApplicationTerms, - MathContext mc, Loan loan, HolidayDetailDTO holidayDetailDTO, - LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor); + MathContext mc, Loan loan, HolidayDetailDTO holidayDetailDTO, + LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor); Money getPeriodInterestTillDate(@NotNull LoanRepaymentScheduleInstallment installment, @NotNull LocalDate targetDate); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleGeneratorFactory.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleGeneratorFactory.java index 46594b09ecc..97b4ffdf2e3 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleGeneratorFactory.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleGeneratorFactory.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModel.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModel.java index 6f28c5376bb..245eb885fcc 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModel.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModel.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; + import lombok.Getter; import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.organisation.monetary.domain.Money; @@ -49,16 +50,16 @@ public final class LoanScheduleModel { private final BigDecimal totalOutstanding; public static LoanScheduleModel from(final List periods, final CurrencyData currency, final int loanTermInDays, - final Money principalDisbursed, final BigDecimal totalPrincipalExpected, final BigDecimal totalPrincipalPaid, - final BigDecimal totalInterestCharged, final BigDecimal totalFeeChargesCharged, final BigDecimal totalPenaltyChargesCharged, - final BigDecimal totalRepaymentExpected, final BigDecimal totalOutstanding) { + final Money principalDisbursed, final BigDecimal totalPrincipalExpected, final BigDecimal totalPrincipalPaid, + final BigDecimal totalInterestCharged, final BigDecimal totalFeeChargesCharged, final BigDecimal totalPenaltyChargesCharged, + final BigDecimal totalRepaymentExpected, final BigDecimal totalOutstanding) { return new LoanScheduleModel(periods, currency, loanTermInDays, principalDisbursed, totalPrincipalExpected, totalPrincipalPaid, totalInterestCharged, totalFeeChargesCharged, totalPenaltyChargesCharged, totalRepaymentExpected, totalOutstanding); } public static LoanScheduleModel withOverdueChargeUpdation(final List periods, - final LoanScheduleModel loanScheduleModel, final BigDecimal totalPenaltyChargesCharged) { + final LoanScheduleModel loanScheduleModel, final BigDecimal totalPenaltyChargesCharged) { return new LoanScheduleModel(periods, loanScheduleModel.currency, loanScheduleModel.loanTermInDays, loanScheduleModel.totalPrincipalDisbursed, loanScheduleModel.totalPrincipalExpected, loanScheduleModel.totalPrincipalPaid, @@ -67,7 +68,7 @@ public static LoanScheduleModel withOverdueChargeUpdation(final List periods, - final LoanScheduleModel loanScheduleModel) { + final LoanScheduleModel loanScheduleModel) { return new LoanScheduleModel(periods, loanScheduleModel.currency, loanScheduleModel.loanTermInDays, loanScheduleModel.totalPrincipalDisbursed, loanScheduleModel.totalPrincipalExpected, loanScheduleModel.totalPrincipalPaid, @@ -76,9 +77,9 @@ public static LoanScheduleModel withLoanScheduleModelPeriods(final List periods, final CurrencyData currency, final int loanTermInDays, - final Money principalDisbursed, final BigDecimal totalPrincipalExpected, final BigDecimal totalPrincipalPaid, - final BigDecimal totalInterestCharged, final BigDecimal totalFeeChargesCharged, final BigDecimal totalPenaltyChargesCharged, - final BigDecimal totalRepaymentExpected, final BigDecimal totalOutstanding) { + final Money principalDisbursed, final BigDecimal totalPrincipalExpected, final BigDecimal totalPrincipalPaid, + final BigDecimal totalInterestCharged, final BigDecimal totalFeeChargesCharged, final BigDecimal totalPenaltyChargesCharged, + final BigDecimal totalRepaymentExpected, final BigDecimal totalOutstanding) { this.periods = periods; this.currency = currency; this.loanTermInDays = loanTermInDays; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelDisbursementPeriod.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelDisbursementPeriod.java index 40d21cb71ba..59a3bd40f62 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelDisbursementPeriod.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelDisbursementPeriod.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.Set; + import lombok.Getter; import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.portfolio.loanaccount.loanschedule.data.InterestRecalculationAdditionalDetailData; @@ -40,12 +41,12 @@ public final class LoanScheduleModelDisbursementPeriod implements LoanScheduleMo private boolean isEMIFixedSpecificToInstallment = false; public static LoanScheduleModelDisbursementPeriod disbursement(final LocalDate disbursementDate, final Money principalDisbursed, - final BigDecimal chargesDueAtTimeOfDisbursement) { + final BigDecimal chargesDueAtTimeOfDisbursement) { return new LoanScheduleModelDisbursementPeriod(null, disbursementDate, principalDisbursed, chargesDueAtTimeOfDisbursement); } private LoanScheduleModelDisbursementPeriod(final Integer periodNumber, final LocalDate disbursementDate, - final Money principalDisbursed, final BigDecimal chargesDueAtTimeOfDisbursement) { + final Money principalDisbursed, final BigDecimal chargesDueAtTimeOfDisbursement) { this.periodNumber = periodNumber; this.disbursementDate = disbursementDate; this.principalDisbursed = principalDisbursed; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelPeriod.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelPeriod.java index 8c477632896..a851b35a1f9 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelPeriod.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelPeriod.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.Set; + import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.portfolio.loanaccount.loanschedule.data.InterestRecalculationAdditionalDetailData; import org.apache.fineract.portfolio.loanaccount.loanschedule.data.LoanSchedulePeriodData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelRepaymentPeriod.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelRepaymentPeriod.java index 96f4ecbe8e3..36e8d9a0d9c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelRepaymentPeriod.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleModelRepaymentPeriod.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.LocalDate; import java.util.HashSet; import java.util.Set; + import lombok.Getter; import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.portfolio.loanaccount.loanschedule.data.InterestRecalculationAdditionalDetailData; @@ -50,17 +51,17 @@ public final class LoanScheduleModelRepaymentPeriod implements LoanScheduleModel private final MathContext mc; public static LoanScheduleModelRepaymentPeriod repayment(final int periodNumber, final LocalDate startDate, - final LocalDate scheduledDueDate, final Money principalDue, final Money outstandingLoanBalance, final Money interestDue, - final Money feeChargesDue, final Money penaltyChargesDue, final Money totalDue, boolean recalculatedInterestComponent, - final MathContext mc) { + final LocalDate scheduledDueDate, final Money principalDue, final Money outstandingLoanBalance, final Money interestDue, + final Money feeChargesDue, final Money penaltyChargesDue, final Money totalDue, boolean recalculatedInterestComponent, + final MathContext mc) { return new LoanScheduleModelRepaymentPeriod(periodNumber, startDate, scheduledDueDate, principalDue, outstandingLoanBalance, interestDue, feeChargesDue, penaltyChargesDue, totalDue, recalculatedInterestComponent, mc); } public LoanScheduleModelRepaymentPeriod(final int periodNumber, final LocalDate fromDate, final LocalDate dueDate, - final Money principalDue, final Money outstandingLoanBalance, final Money interestDue, final Money feeChargesDue, - final Money penaltyChargesDue, final Money totalDue, final boolean recalculatedInterestComponent, final MathContext mc) { + final Money principalDue, final Money outstandingLoanBalance, final Money interestDue, final Money feeChargesDue, + final Money penaltyChargesDue, final Money totalDue, final boolean recalculatedInterestComponent, final MathContext mc) { this.periodNumber = periodNumber; this.fromDate = fromDate; this.dueDate = dueDate; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleProcessingType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleProcessingType.java index 46dd028a8b0..d44524c6c2f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleProcessingType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleProcessingType.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleType.java index 0a42520cb57..46b508a2a85 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleType.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanTermVariationParams.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanTermVariationParams.java index 1651c04b314..e4b5d00b703 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanTermVariationParams.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanTermVariationParams.java @@ -6,9 +6,9 @@ * 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 @@ -20,8 +20,9 @@ import java.time.LocalDate; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.data.LoanTermVariationsData; public record LoanTermVariationParams(boolean skipPeriod, boolean recalculateAmounts, LocalDate scheduledDueDate, - List variationsData) { + List variationsData) { } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/PaymentPeriodsInOneYearCalculator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/PaymentPeriodsInOneYearCalculator.java index 508c6379f0a..31a71008f28 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/PaymentPeriodsInOneYearCalculator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/PaymentPeriodsInOneYearCalculator.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; + import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType; public interface PaymentPeriodsInOneYearCalculator { @@ -28,6 +29,6 @@ public interface PaymentPeriodsInOneYearCalculator { Integer calculate(PeriodFrequencyType repaymentFrequencyType); BigDecimal calculatePortionOfRepaymentPeriodInterestChargingGrace(LocalDate repaymentPeriodStartDate, LocalDate scheduledDueDate, - LocalDate interestChargedFromLocalDate, PeriodFrequencyType repaymentPeriodFrequencyType, int repaidEvery, MathContext mc); + LocalDate interestChargedFromLocalDate, PeriodFrequencyType repaymentPeriodFrequencyType, int repaidEvery, MathContext mc); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/PrincipalInterest.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/PrincipalInterest.java index 3a0e724fa77..ff0d97ca880 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/PrincipalInterest.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/PrincipalInterest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/RecalculatedSchedule.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/RecalculatedSchedule.java index a959c607a0c..eb1a7bf151e 100755 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/RecalculatedSchedule.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/RecalculatedSchedule.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/RecalculationDetail.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/RecalculationDetail.java index a766d574806..5355b5d5a4d 100755 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/RecalculationDetail.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/RecalculationDetail.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.loanschedule.domain; import java.time.LocalDate; + import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction; public class RecalculationDetail { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/ScheduleCurrentPeriodParams.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/ScheduleCurrentPeriodParams.java index 5d6822b85fa..ce069d3f50a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/ScheduleCurrentPeriodParams.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/ScheduleCurrentPeriodParams.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.loanschedule.domain; import java.math.BigDecimal; + import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.organisation.monetary.domain.Money; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/ScheduledDateGenerator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/ScheduledDateGenerator.java index 16ceae37159..9fc706f88f2 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/ScheduledDateGenerator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/ScheduledDateGenerator.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.MathContext; import java.time.LocalDate; import java.util.List; + import org.apache.fineract.organisation.workingdays.data.AdjustedDateDetailsDTO; import org.apache.fineract.portfolio.calendar.domain.Calendar; import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType; @@ -29,29 +30,29 @@ public interface ScheduledDateGenerator { List generateRepaymentPeriods(MathContext mc, LocalDate scheduledDueDate, - LoanApplicationTerms loanApplicationTerms, HolidayDetailDTO holidayDetailDTO); + LoanApplicationTerms loanApplicationTerms, HolidayDetailDTO holidayDetailDTO); LocalDate getLastRepaymentDate(LoanApplicationTerms loanApplicationTerms, HolidayDetailDTO holidayDetailDTO); LocalDate idealDisbursementDateBasedOnFirstRepaymentDate(PeriodFrequencyType repaymentPeriodFrequencyType, int repaidEvery, - LocalDate firstRepaymentDate, Calendar loanCalendar, HolidayDetailDTO holidayDetailDTO, - LoanApplicationTerms loanApplicationTerms); + LocalDate firstRepaymentDate, Calendar loanCalendar, HolidayDetailDTO holidayDetailDTO, + LoanApplicationTerms loanApplicationTerms); LocalDate generateNextRepaymentDate(LocalDate lastRepaymentDate, LoanApplicationTerms loanApplicationTerms, boolean isFirstRepayment); LocalDate generateNextRepaymentDate(LocalDate lastRepaymentDate, LoanApplicationTerms loanApplicationTerms, boolean isFirstRepayment, - Integer periodNumber); + Integer periodNumber); AdjustedDateDetailsDTO adjustRepaymentDate(LocalDate dueRepaymentPeriodDate, LoanApplicationTerms loanApplicationTerms, - HolidayDetailDTO holidayDetailDTO); + HolidayDetailDTO holidayDetailDTO); LocalDate getRepaymentPeriodDate(PeriodFrequencyType frequency, int repaidEvery, LocalDate startDate); Boolean isDateFallsInSchedule(PeriodFrequencyType frequency, int repaidEvery, LocalDate startDate, LocalDate date); LocalDate generateNextScheduleDateStartingFromDisburseDate(LocalDate lastRepaymentDate, LoanApplicationTerms loanApplicationTerms, - HolidayDetailDTO holidayDetailDTO); + HolidayDetailDTO holidayDetailDTO); LocalDate generateNextScheduleDateStartingFromDisburseDateOrRescheduleDate(LocalDate lastRepaymentDate, - LoanApplicationTerms loanApplicationTerms, HolidayDetailDTO holidayDetailDTO); + LoanApplicationTerms loanApplicationTerms, HolidayDetailDTO holidayDetailDTO); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/exception/MultiDisbursementDisbursementDateException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/exception/MultiDisbursementDisbursementDateException.java index 10d514c6b17..5b47c3bb573 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/exception/MultiDisbursementDisbursementDateException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/exception/MultiDisbursementDisbursementDateException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/exception/MultiDisbursementEmiAmountException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/exception/MultiDisbursementEmiAmountException.java index 7e99f0ecf59..440b6311021 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/exception/MultiDisbursementEmiAmountException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/exception/MultiDisbursementEmiAmountException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/exception/MultiDisbursementOutstandingAmoutException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/exception/MultiDisbursementOutstandingAmoutException.java index d2755d6bb44..84acea5cc8c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/exception/MultiDisbursementOutstandingAmoutException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/exception/MultiDisbursementOutstandingAmoutException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/exception/ScheduleDateException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/exception/ScheduleDateException.java index fea7c061982..6cf19deee95 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/exception/ScheduleDateException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/exception/ScheduleDateException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleCalculationPlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleCalculationPlatformService.java index 331962f44d7..6420ca4320e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleCalculationPlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleCalculationPlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleHistoryReadPlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleHistoryReadPlatformService.java index 3b25c50278a..ca8da7eb415 100755 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleHistoryReadPlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleHistoryReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.Map; + import org.apache.fineract.portfolio.loanaccount.data.DisbursementData; import org.apache.fineract.portfolio.loanaccount.data.RepaymentScheduleRelatedLoanData; import org.apache.fineract.portfolio.loanaccount.loanschedule.data.LoanScheduleData; @@ -30,7 +31,7 @@ public interface LoanScheduleHistoryReadPlatformService { Integer fetchCurrentVersionNumber(Long loanId); LoanScheduleData retrieveRepaymentArchiveSchedule(Long loanId, RepaymentScheduleRelatedLoanData repaymentScheduleRelatedLoanData, - Collection disbursementData, LoanScheduleType loanScheduleType); + Collection disbursementData, LoanScheduleType loanScheduleType); Map fetchOldAuditDates(Long id); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleHistoryWritePlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleHistoryWritePlatformService.java index 3efbff13673..4419c36de49 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleHistoryWritePlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleHistoryWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.loanschedule.service; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment; import org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanRepaymentScheduleHistory; @@ -27,9 +28,9 @@ public interface LoanScheduleHistoryWritePlatformService { List createLoanScheduleArchive(List repaymentScheduleInstallments, - Loan loan, LoanRescheduleRequest loanRescheduleRequest); + Loan loan, LoanRescheduleRequest loanRescheduleRequest); void createAndSaveLoanScheduleArchive(List repaymentScheduleInstallments, Loan loan, - LoanRescheduleRequest loanRescheduleRequest); + LoanRescheduleRequest loanRescheduleRequest); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleWritePlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleWritePlatformService.java index 8c05820e017..aaac4cf6981 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleWritePlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanChargeMapper.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanChargeMapper.java index 9b92eda4f42..81acdc9c6fc 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanChargeMapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanChargeMapper.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Set; import java.util.stream.Collectors; + import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; import org.apache.fineract.portfolio.loanaccount.command.LoanChargeCommand; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanChargePaidByMapper.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanChargePaidByMapper.java index 9e1ef978f95..2c8fc2e1675 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanChargePaidByMapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanChargePaidByMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.mapper; import java.util.List; + import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.portfolio.loanaccount.data.LoanChargePaidByData; import org.apache.fineract.portfolio.loanaccount.domain.LoanChargePaidBy; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanCollateralManagementMapper.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanCollateralManagementMapper.java index b591a6a7560..9e8a10d5ec6 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanCollateralManagementMapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanCollateralManagementMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.mapper; import java.util.Set; + import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.portfolio.loanaccount.data.LoanCollateralManagementData; import org.apache.fineract.portfolio.loanaccount.domain.LoanCollateralManagement; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanMapper.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanMapper.java index d6bc7ae527b..fa5f1c27329 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanMapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanMapper.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.Iterator; import java.util.List; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.organisation.monetary.domain.MoneyHelper; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanTermVariationsMapper.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanTermVariationsMapper.java index a4b909c6d6a..812f9e242ea 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanTermVariationsMapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanTermVariationsMapper.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.portfolio.calendar.data.CalendarHistoryDataWrapper; import org.apache.fineract.portfolio.calendar.domain.Calendar; @@ -52,7 +53,7 @@ public class LoanTermVariationsMapper { public BigDecimal constructLoanTermVariations(final FloatingRateDTO floatingRateDTO, final BigDecimal annualNominalInterestRate, - final List loanTermVariations, final Loan loan) { + final List loanTermVariations, final Loan loan) { for (LoanTermVariations variationTerms : loan.getLoanTermVariations()) { if (variationTerms.isActive()) { loanTermVariations.add(variationTerms.toData()); @@ -125,7 +126,7 @@ public LoanApplicationTerms constructLoanApplicationTerms(final ScheduleGenerato } private BigDecimal constructFloatingInterestRates(final BigDecimal annualNominalInterestRate, final FloatingRateDTO floatingRateDTO, - final List loanTermVariations, final Loan loan) { + final List loanTermVariations, final Loan loan) { final LocalDate dateValue = null; final boolean isSpecificToInstallment = false; BigDecimal interestRate = annualNominalInterestRate; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanTransactionMapper.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanTransactionMapper.java index bed240b3f68..b3010cf5d1e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanTransactionMapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanTransactionMapper.java @@ -6,9 +6,9 @@ * 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 @@ -25,8 +25,8 @@ import org.mapstruct.Mapper; import org.mapstruct.Mapping; -@Mapper(config = MapstructMapperConfig.class, uses = { LoanTransactionRelationMapper.class, LoanChargePaidByMapper.class, - CurrencyMapper.class }) +@Mapper(config = MapstructMapperConfig.class, uses = {LoanTransactionRelationMapper.class, LoanChargePaidByMapper.class, + CurrencyMapper.class}) public interface LoanTransactionMapper { @Mapping(target = "numberOfRepayments", ignore = true) diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanTransactionRelationMapper.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanTransactionRelationMapper.java index 93c09effd10..332aff0b935 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanTransactionRelationMapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanTransactionRelationMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.mapper; import java.util.List; + import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.portfolio.loanaccount.data.LoanTransactionRelationData; import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRelation; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/RescheduleLoansApiConstants.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/RescheduleLoansApiConstants.java index 8973b74be63..9c9de9828c5 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/RescheduleLoansApiConstants.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/RescheduleLoansApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/api/RescheduleLoansApiResourceSwagger.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/api/RescheduleLoansApiResourceSwagger.java index c08010ef6fd..75ecbd7b5f6 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/api/RescheduleLoansApiResourceSwagger.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/api/RescheduleLoansApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.rescheduleloan.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.Set; @@ -28,16 +29,19 @@ */ final class RescheduleLoansApiResourceSwagger { - private RescheduleLoansApiResourceSwagger() {} + private RescheduleLoansApiResourceSwagger() { + } @Schema(description = "GetRescheduleReasonsTemplateResponse") public static final class GetRescheduleReasonsTemplateResponse { - private GetRescheduleReasonsTemplateResponse() {} + private GetRescheduleReasonsTemplateResponse() { + } static final class GetRescheduleReasonsAllowedTypes { - private GetRescheduleReasonsAllowedTypes() {} + private GetRescheduleReasonsAllowedTypes() { + } @Schema(example = "1") public Long id; @@ -59,11 +63,13 @@ private GetRescheduleReasonsAllowedTypes() {} @Schema(description = "GetLoanRescheduleRequestResponse") public static final class GetLoanRescheduleRequestResponse { - private GetLoanRescheduleRequestResponse() {} + private GetLoanRescheduleRequestResponse() { + } static final class GetLoanRescheduleRequestStatus { - private GetLoanRescheduleRequestStatus() {} + private GetLoanRescheduleRequestStatus() { + } @Schema(example = "100") public Long id; @@ -81,7 +87,8 @@ private GetLoanRescheduleRequestStatus() {} static final class RescheduleReasonsCodeValue { - private RescheduleReasonsCodeValue() {} + private RescheduleReasonsCodeValue() { + } @Schema(example = "1") public Long id; @@ -95,7 +102,8 @@ private RescheduleReasonsCodeValue() {} static final class RescheduleReasonsTimeline { - private RescheduleReasonsTimeline() {} + private RescheduleReasonsTimeline() { + } @Schema(example = "[2014, 5, 1]") public LocalDate submittedOnDate; @@ -117,7 +125,8 @@ private RescheduleReasonsTimeline() {} static final class LoanTermTypeOptions { - private LoanTermTypeOptions() {} + private LoanTermTypeOptions() { + } @Schema(example = "2") public Long id; @@ -129,7 +138,8 @@ private LoanTermTypeOptions() {} static final class LoanTermVariationsData { - private LoanTermVariationsData() {} + private LoanTermVariationsData() { + } @Schema(example = "1") public Long id; @@ -222,7 +232,8 @@ public static final class PostUpdateRescheduleLoansRequest { @Schema(description = "PostCreateRescheduleLoansResponse ") public static final class PostCreateRescheduleLoansResponse { - private PostCreateRescheduleLoansResponse() {} + private PostCreateRescheduleLoansResponse() { + } @Schema(example = "1") public Long officeId; @@ -237,11 +248,13 @@ private PostCreateRescheduleLoansResponse() {} @Schema(description = "PostUpdateRescheduleLoansResponse ") public static final class PostUpdateRescheduleLoansResponse { - private PostUpdateRescheduleLoansResponse() {} + private PostUpdateRescheduleLoansResponse() { + } static final class PostUpdateRescheduleLoanChanges { - private PostUpdateRescheduleLoanChanges() {} + private PostUpdateRescheduleLoanChanges() { + } @Schema(example = "en") public String locale; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestData.java index 1312be79dab..6c899889f00 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.Collection; + import lombok.Getter; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.portfolio.loanaccount.data.LoanTermVariationsData; @@ -54,10 +55,10 @@ public final class LoanRescheduleRequestData { * TODO **/ private LoanRescheduleRequestData(Long id, Long loanId, LoanRescheduleRequestStatusEnumData statusEnum, - Integer rescheduleFromInstallment, LocalDate rescheduleFromDate, CodeValueData rescheduleReasonCodeValue, - String rescheduleReasonComment, LoanRescheduleRequestTimelineData timeline, final String clientName, - final String loanAccountNumber, final Long clientId, final Boolean recalculateInterest, - Collection rescheduleReasons, final Collection loanTermVariationsData) { + Integer rescheduleFromInstallment, LocalDate rescheduleFromDate, CodeValueData rescheduleReasonCodeValue, + String rescheduleReasonComment, LoanRescheduleRequestTimelineData timeline, final String clientName, + final String loanAccountNumber, final Long clientId, final Boolean recalculateInterest, + Collection rescheduleReasons, final Collection loanTermVariationsData) { this.id = id; this.loanId = loanId; @@ -81,10 +82,10 @@ private LoanRescheduleRequestData(Long id, Long loanId, LoanRescheduleRequestSta * @return an instance of the LoanRescheduleRequestData class **/ public static LoanRescheduleRequestData instance(Long id, Long loanId, LoanRescheduleRequestStatusEnumData statusEnum, - Integer rescheduleFromInstallment, LocalDate rescheduleFromDate, CodeValueData rescheduleReasonCodeValue, - String rescheduleReasonComment, LoanRescheduleRequestTimelineData timeline, final String clientName, - final String loanAccountNumber, final Long clientId, final Boolean recalculateInterest, - Collection rescheduleReasons, final Collection loanTermVariationsData) { + Integer rescheduleFromInstallment, LocalDate rescheduleFromDate, CodeValueData rescheduleReasonCodeValue, + String rescheduleReasonComment, LoanRescheduleRequestTimelineData timeline, final String clientName, + final String loanAccountNumber, final Long clientId, final Boolean recalculateInterest, + Collection rescheduleReasons, final Collection loanTermVariationsData) { return new LoanRescheduleRequestData(id, loanId, statusEnum, rescheduleFromInstallment, rescheduleFromDate, rescheduleReasonCodeValue, rescheduleReasonComment, timeline, clientName, loanAccountNumber, clientId, recalculateInterest, @@ -98,8 +99,8 @@ public static LoanRescheduleRequestData instance(Long id, Long loanId, LoanResch * TODO **/ private LoanRescheduleRequestData(Long id, Long loanId, LoanRescheduleRequestStatusEnumData statusEnum, final String clientName, - final String loanAccountNumber, final Long clientId, final LocalDate rescheduleFromDate, - final CodeValueData rescheduleReasonCodeValue) { + final String loanAccountNumber, final Long clientId, final LocalDate rescheduleFromDate, + final CodeValueData rescheduleReasonCodeValue) { this.id = id; this.loanId = loanId; @@ -121,8 +122,8 @@ private LoanRescheduleRequestData(Long id, Long loanId, LoanRescheduleRequestSta * @return an instance of the LoanRescheduleRequestData class **/ public static LoanRescheduleRequestData instance(Long id, Long loanId, LoanRescheduleRequestStatusEnumData statusEnum, - final String clientName, final String loanAccountNumber, final Long clientId, final LocalDate rescheduleFromDate, - final CodeValueData rescheduleReasonCodeValue) { + final String clientName, final String loanAccountNumber, final Long clientId, final LocalDate rescheduleFromDate, + final CodeValueData rescheduleReasonCodeValue) { return new LoanRescheduleRequestData(id, loanId, statusEnum, clientName, loanAccountNumber, clientId, rescheduleFromDate, rescheduleReasonCodeValue); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestDataValidator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestDataValidator.java index 87dc0f86fd4..a5adf260a51 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestDataValidator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestDataValidator.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestEnumerations.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestEnumerations.java index 77a81836f4c..35851158b5e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestEnumerations.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -48,20 +48,20 @@ public static LoanRescheduleRequestStatusEnumData status(final LoanStatus status case SUBMITTED_AND_PENDING_APPROVAL: enumData = new LoanRescheduleRequestStatusEnumData(LoanStatus.SUBMITTED_AND_PENDING_APPROVAL.getValue().longValue(), LoanStatus.SUBMITTED_AND_PENDING_APPROVAL.getCode(), "Submitted and pending approval"); - break; + break; case APPROVED: enumData = new LoanRescheduleRequestStatusEnumData(LoanStatus.APPROVED.getValue().longValue(), LoanStatus.APPROVED.getCode(), "Approved"); - break; + break; case REJECTED: enumData = new LoanRescheduleRequestStatusEnumData(LoanStatus.REJECTED.getValue().longValue(), LoanStatus.REJECTED.getCode(), "Rejected"); - break; + break; default: - break; + break; } return enumData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestStatusEnumData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestStatusEnumData.java index 6685101639c..fe04ef5e341 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestStatusEnumData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestStatusEnumData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestTimelineData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestTimelineData.java index d9b70f18fac..faf3b36e4f9 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestTimelineData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/LoanRescheduleRequestTimelineData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.rescheduleloan.data; import java.time.LocalDate; + import lombok.Data; /** @@ -44,10 +45,10 @@ public class LoanRescheduleRequestTimelineData { private final String rejectedByLastname; public LoanRescheduleRequestTimelineData(final LocalDate submittedOnDate, final String submittedByUsername, - final String submittedByFirstname, final String submittedByLastname, final LocalDate approvedOnDate, - final String approvedByUsername, final String approvedByFirstname, final String approvedByLastname, - final LocalDate rejectedOnDate, final String rejectedByUsername, final String rejectedByFirstname, - final String rejectedByLastname) { + final String submittedByFirstname, final String submittedByLastname, final LocalDate approvedOnDate, + final String approvedByUsername, final String approvedByFirstname, final String approvedByLastname, + final LocalDate rejectedOnDate, final String rejectedByUsername, final String rejectedByFirstname, + final String rejectedByLastname) { this.submittedOnDate = submittedOnDate; this.submittedByUsername = submittedByUsername; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleModalPeriod.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleModalPeriod.java index 472ecc7da8a..7d2ca9c4f85 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleModalPeriod.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleModalPeriod.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import org.apache.fineract.portfolio.loanaccount.loanschedule.data.LoanSchedulePeriodData; public interface LoanRescheduleModalPeriod { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleModelRepaymentPeriod.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleModelRepaymentPeriod.java index b487c862c40..90133322175 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleModelRepaymentPeriod.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleModelRepaymentPeriod.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Setter; import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.portfolio.loanaccount.loanschedule.data.LoanSchedulePeriodData; @@ -40,8 +41,8 @@ public final class LoanRescheduleModelRepaymentPeriod implements LoanRescheduleM private boolean isNew; public LoanRescheduleModelRepaymentPeriod(final int periodNumber, final int oldPeriodNumber, LocalDate fromDate, - final LocalDate dueDate, final Money principalDue, final Money outstandingLoanBalance, final Money interestDue, - final Money feeChargesDue, final Money penaltyChargesDue, final Money totalDue, final boolean isNew) { + final LocalDate dueDate, final Money principalDue, final Money outstandingLoanBalance, final Money interestDue, + final Money feeChargesDue, final Money penaltyChargesDue, final Money totalDue, final boolean isNew) { this.periodNumber = periodNumber; this.oldPeriodNumber = oldPeriodNumber; this.fromDate = fromDate; @@ -56,8 +57,8 @@ public LoanRescheduleModelRepaymentPeriod(final int periodNumber, final int oldP } public static LoanRescheduleModelRepaymentPeriod instance(final int periodNumber, final int oldPeriodNumber, LocalDate fromDate, - final LocalDate dueDate, final Money principalDue, final Money outstandingLoanBalance, final Money interestDue, - final Money feeChargesDue, final Money penaltyChargesDue, final Money totalDue, final boolean isNew) { + final LocalDate dueDate, final Money principalDue, final Money outstandingLoanBalance, final Money interestDue, + final Money feeChargesDue, final Money penaltyChargesDue, final Money totalDue, final boolean isNew) { return new LoanRescheduleModelRepaymentPeriod(periodNumber, oldPeriodNumber, fromDate, dueDate, principalDue, outstandingLoanBalance, interestDue, feeChargesDue, penaltyChargesDue, totalDue, isNew); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequest.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequest.java index ef743f0038e..2fbc4ad8c84 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequest.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequest.java @@ -6,9 +6,9 @@ * 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 @@ -26,10 +26,12 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToMany; import jakarta.persistence.Table; + import java.time.LocalDate; import java.util.HashSet; import java.util.List; import java.util.Set; + import lombok.Getter; import org.apache.fineract.infrastructure.codes.domain.CodeValue; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @@ -94,15 +96,16 @@ public class LoanRescheduleRequest extends AbstractPersistableCustom { /** * LoanRescheduleRequest constructor **/ - protected LoanRescheduleRequest() {} + protected LoanRescheduleRequest() { + } /** * LoanRescheduleRequest constructor **/ private LoanRescheduleRequest(final Loan loan, final Integer statusEnum, final Integer rescheduleFromInstallment, - final LocalDate rescheduleFromDate, final Boolean recalculateInterest, final CodeValue rescheduleReasonCodeValue, - final String rescheduleReasonComment, final LocalDate submittedOnDate, final AppUser submittedByUser, - final LocalDate approvedOnDate, final AppUser approvedByUser, final LocalDate rejectedOnDate, AppUser rejectedByUser) { + final LocalDate rescheduleFromDate, final Boolean recalculateInterest, final CodeValue rescheduleReasonCodeValue, + final String rescheduleReasonComment, final LocalDate submittedOnDate, final AppUser submittedByUser, + final LocalDate approvedOnDate, final AppUser approvedByUser, final LocalDate rejectedOnDate, AppUser rejectedByUser) { this.loan = loan; this.statusEnum = statusEnum; this.rescheduleFromInstallment = rescheduleFromInstallment; @@ -122,9 +125,9 @@ private LoanRescheduleRequest(final Loan loan, final Integer statusEnum, final I * @return a new instance of the LoanRescheduleRequest class **/ public static LoanRescheduleRequest instance(final Loan loan, final Integer statusEnum, final Integer rescheduleFromInstallment, - final LocalDate rescheduleFromDate, final Boolean recalculateInterest, final CodeValue rescheduleReasonCodeValue, - final String rescheduleReasonComment, final LocalDate submittedOnDate, final AppUser submittedByUser, - final LocalDate approvedOnDate, final AppUser approvedByUser, final LocalDate rejectedOnDate, AppUser rejectedByUser) { + final LocalDate rescheduleFromDate, final Boolean recalculateInterest, final CodeValue rescheduleReasonCodeValue, + final String rescheduleReasonComment, final LocalDate submittedOnDate, final AppUser submittedByUser, + final LocalDate approvedOnDate, final AppUser approvedByUser, final LocalDate rejectedOnDate, AppUser rejectedByUser) { return new LoanRescheduleRequest(loan, statusEnum, rescheduleFromInstallment, rescheduleFromDate, recalculateInterest, rescheduleReasonCodeValue, rescheduleReasonComment, submittedOnDate, submittedByUser, approvedOnDate, approvedByUser, diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequestRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequestRepository.java index 42e4b194c29..8628865f0d9 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequestRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequestRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.rescheduleloan.domain; import java.util.Optional; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequestRepositoryWrapper.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequestRepositoryWrapper.java index b2e8cc78dcb..a8c954dae51 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequestRepositoryWrapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanRescheduleRequestRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanTermVariationsRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanTermVariationsRepository.java index 57993fe05e0..e9e523913a7 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanTermVariationsRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/domain/LoanTermVariationsRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Optional; + import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.apache.fineract.portfolio.loanaccount.data.LoanTermVariationsData; import org.apache.fineract.portfolio.loanaccount.domain.LoanTermVariations; @@ -60,7 +61,7 @@ public interface LoanTermVariationsRepository order by ltv.termApplicableFrom """) List findLoanTermVariationsByExternalLoanIdAndTermType(@Param("loanExternalId") ExternalId loanExternalId, - @Param("termType") int termType); + @Param("termType") int termType); @Query(""" select ltv @@ -68,5 +69,5 @@ List findLoanTermVariationsByExternalLoanIdAndTermType(@ where ltv.id = :variationId and ltv.loan.id = :loanId and ltv.termType = :termType """) Optional findByIdAndLoanIdAndTermType(@Param("variationId") long variationId, @Param("loanId") long loanId, - @Param("termType") int termType); + @Param("termType") int termType); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/exception/LoanRescheduleRequestNotFoundException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/exception/LoanRescheduleRequestNotFoundException.java index 787306e7976..24686b7711e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/exception/LoanRescheduleRequestNotFoundException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/exception/LoanRescheduleRequestNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/handler/ApproveLoanRescheduleRequestCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/handler/ApproveLoanRescheduleRequestCommandHandler.java index 04f0d957147..41a03cb6c3e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/handler/ApproveLoanRescheduleRequestCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/handler/ApproveLoanRescheduleRequestCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/handler/CreateLoanRescheduleRequestCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/handler/CreateLoanRescheduleRequestCommandHandler.java index f2b98050c9e..5aeebe05414 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/handler/CreateLoanRescheduleRequestCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/handler/CreateLoanRescheduleRequestCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/handler/RejectLoanRescheduleRequestCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/handler/RejectLoanRescheduleRequestCommandHandler.java index 2004cbb8815..ea894e68c74 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/handler/RejectLoanRescheduleRequestCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/handler/RejectLoanRescheduleRequestCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanReschedulePreviewPlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanReschedulePreviewPlatformService.java index 32c1d9e41b7..f90a8817114 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanReschedulePreviewPlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanReschedulePreviewPlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformService.java index 278262bb886..2875a3f1684 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.rescheduleloan.service; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.rescheduleloan.data.LoanRescheduleRequestData; public interface LoanRescheduleRequestReadPlatformService { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformServiceImpl.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformServiceImpl.java index ce6c3e8b30d..b1e8931f4b1 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformServiceImpl.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.codes.service.CodeValueReadPlatformService; @@ -55,7 +56,7 @@ public class LoanRescheduleRequestReadPlatformServiceImpl implements LoanResched @Autowired public LoanRescheduleRequestReadPlatformServiceImpl(final JdbcTemplate jdbcTemplate, LoanRepositoryWrapper loanRepositoryWrapper, - final CodeValueReadPlatformService codeValueReadPlatformService) { + final CodeValueReadPlatformService codeValueReadPlatformService) { this.jdbcTemplate = jdbcTemplate; this.loanRepositoryWrapper = loanRepositoryWrapper; this.codeValueReadPlatformService = codeValueReadPlatformService; @@ -235,9 +236,7 @@ public LoanRescheduleRequestData readLoanRescheduleRequest(Long requestId) { final String sql = "select " + LOAN_RESCHEDULE_REQUEST_ROW_MAPPER.schema() + " where lr.id = ?"; return this.jdbcTemplate.queryForObject(sql, LOAN_RESCHEDULE_REQUEST_ROW_MAPPER, requestId); // NOSONAR - } - - catch (final EmptyResultDataAccessException e) { + } catch (final EmptyResultDataAccessException e) { return null; } } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestWritePlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestWritePlatformService.java index c8a7e607e7b..0a55ede00ca 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestWritePlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApplicationTransitionValidator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApplicationTransitionValidator.java index c2212a1aeef..2bfd1e3d249 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApplicationTransitionValidator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApplicationTransitionValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -29,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -76,7 +78,8 @@ public void validateApproval(final String json) { LoanApiConstants.noteParameterName, LoanApiConstants.localeParameterName, LoanApiConstants.dateFormatParameterName, LoanApiConstants.disbursementDataParameterName, LoanApiConstants.expectedDisbursementDateParameterName)); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, disbursementParameters); final List dataValidationErrors = new ArrayList<>(); @@ -126,7 +129,8 @@ private void validateLoanRejectionRequestBody(String json) { final Set disbursementParameters = new HashSet<>(Arrays.asList(LoanApiConstants.rejectedOnDateParameterName, LoanApiConstants.noteParameterName, LoanApiConstants.localeParameterName, LoanApiConstants.dateFormatParameterName)); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, disbursementParameters); final List dataValidationErrors = new ArrayList<>(); @@ -191,7 +195,8 @@ private void validateApplicantWithdrawalRequestBody(String json) { final Set disbursementParameters = new HashSet<>(Arrays.asList(LoanApiConstants.withdrawnOnDateParameterName, LoanApiConstants.noteParameterName, LoanApiConstants.localeParameterName, LoanApiConstants.dateFormatParameterName)); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, disbursementParameters); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApprovedAmountValidator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApprovedAmountValidator.java index f929056ec84..b3c1cc1fdab 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApprovedAmountValidator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApprovedAmountValidator.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanChargeApiJsonValidator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanChargeApiJsonValidator.java index 05e26d689b6..99f30798c3d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanChargeApiJsonValidator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanChargeApiJsonValidator.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -32,6 +33,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import lombok.AllArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -270,24 +272,24 @@ public void validateLoanCharges(final Set charges, final List * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.serialization; import java.time.LocalDate; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.portfolio.charge.exception.LoanChargeCannotBeAddedException; @@ -57,7 +58,7 @@ public void validateLoanChargeIsNotWaived(final Loan loan, final LoanCharge loan } public void validateChargeHasValidSpecifiedDateIfApplicable(final Loan loan, final LoanCharge loanCharge, - final LocalDate disbursementDate) { + final LocalDate disbursementDate) { if (loanCharge.isSpecifiedDueDate() && DateUtils.isBefore(loanCharge.getDueLocalDate(), disbursementDate)) { final String defaultUserMessage = "This charge with specified due date cannot be added as the it is not in schedule range."; throw new LoanChargeCannotBeAddedException("loanCharge", "specified.due.date.outside.range", defaultUserMessage, @@ -84,7 +85,7 @@ public void validateChargeAdditionForDisbursedLoan(final Loan loan, final LoanCh } public void validateRepaymentTypeTransactionNotBeforeAChargeRefund(final Loan loan, final LoanTransaction repaymentTransaction, - final String reversedOrCreated) { + final String reversedOrCreated) { if (repaymentTransaction.isRepaymentLikeType() && !repaymentTransaction.isChargeRefund()) { final boolean existsChargeRefund = loanTransactionRepository.existsNonReversedByLoanAndTypeAndAfterDate(loan, LoanTransactionType.CHARGE_REFUND, repaymentTransaction.getTransactionDate()); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanDownPaymentTransactionValidator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanDownPaymentTransactionValidator.java index b900baa6a4e..c143267c1b2 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanDownPaymentTransactionValidator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanDownPaymentTransactionValidator.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; @@ -42,7 +43,7 @@ public final class LoanDownPaymentTransactionValidator { private final LoanBalanceService loanBalanceService; public void validateRepaymentDateIsOnNonWorkingDay(final LocalDate repaymentDate, final WorkingDays workingDays, - final boolean allowTransactionsOnNonWorkingDay) { + final boolean allowTransactionsOnNonWorkingDay) { if (!allowTransactionsOnNonWorkingDay && !WorkingDaysUtil.isWorkingDay(workingDays, repaymentDate)) { final String errorMessage = "Repayment date cannot be on a non working day"; throw new LoanApplicationDateException("repayment.date.on.non.working.day", errorMessage, repaymentDate); @@ -50,7 +51,7 @@ public void validateRepaymentDateIsOnNonWorkingDay(final LocalDate repaymentDate } public void validateRepaymentDateIsOnHoliday(final LocalDate repaymentDate, final boolean allowTransactionsOnHoliday, - final List holidays) { + final List holidays) { if (!allowTransactionsOnHoliday && HolidayUtil.isHoliday(repaymentDate, holidays)) { final String errorMessage = "Repayment date cannot be on a holiday"; throw new LoanApplicationDateException("repayment.date.on.holiday", errorMessage, repaymentDate); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanRefundValidator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanRefundValidator.java index 3a9c72e4275..2c2637a50d5 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanRefundValidator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanRefundValidator.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; import org.apache.fineract.infrastructure.core.service.DateUtils; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanTransactionValidator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanTransactionValidator.java index c0a749d4a6b..32fc49d86a4 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanTransactionValidator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanTransactionValidator.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.portfolio.loanaccount.serialization; import com.google.gson.JsonElement; + import java.time.LocalDate; import java.util.List; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.organisation.holiday.domain.Holiday; @@ -82,7 +84,7 @@ default void validateTransaction(Loan loan, LoanTransactionType loanTransactionT void validateRefund(String json); void validateRefund(Loan loan, LoanTransactionType loanTransactionType, LocalDate transactionDate, - ScheduleGeneratorDTO scheduleGeneratorDTO); + ScheduleGeneratorDTO scheduleGeneratorDTO); void validateRefundDateIsAfterLastRepayment(Loan loan, LocalDate refundTransactionDate); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanUpdateCommandFromApiJsonDeserializer.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanUpdateCommandFromApiJsonDeserializer.java index 5be2cd6bec4..778df46f369 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanUpdateCommandFromApiJsonDeserializer.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanUpdateCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,12 +20,14 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.time.LocalDate; import java.util.Arrays; import java.util.HashSet; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.exception.InvalidJsonException; import org.apache.fineract.infrastructure.core.serialization.AbstractFromApiJsonDeserializer; @@ -59,7 +61,8 @@ public LoanUpdateCommand commandFromApiJson(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/VariableLoanScheduleFromApiJsonValidator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/VariableLoanScheduleFromApiJsonValidator.java index 56f79545164..698253d46d2 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/VariableLoanScheduleFromApiJsonValidator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/VariableLoanScheduleFromApiJsonValidator.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -32,6 +33,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -72,7 +74,8 @@ public void validateSchedule(final String json, final Loan loan) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, VARIABLE_SCHEDULESUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -122,7 +125,7 @@ public void validateSchedule(final String json, final Loan loan) { } private void validateLoanTermVariations(final Loan loan, final DataValidatorBuilder baseDataValidator, final String dateFormat, - final Locale locale, final JsonArray modificationsArray, final Set supportParams, final String arrayName) { + final Locale locale, final JsonArray modificationsArray, final Set supportParams, final String arrayName) { for (int i = 1; i <= modificationsArray.size(); i++) { final JsonObject arrayElement = modificationsArray.get(i - 1).getAsJsonObject(); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeBalanceService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeBalanceService.java index 4229e38557f..f3043ab72c6 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeBalanceService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeBalanceService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomePlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomePlatformService.java index b0bacc6d84c..e4b5553f086 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomePlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/GLIMAccountInfoReadPlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/GLIMAccountInfoReadPlatformService.java index cf5960ea50b..45090772b7b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/GLIMAccountInfoReadPlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/GLIMAccountInfoReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.util.Collection; + import org.apache.fineract.portfolio.loanaccount.data.GLIMContainer; import org.apache.fineract.portfolio.loanaccount.data.GlimRepaymentTemplate; import org.apache.fineract.portfolio.loanaccount.data.GroupLoanIndividualMonitoringAccountData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/GLIMAccountInfoWritePlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/GLIMAccountInfoWritePlatformService.java index 8fa3e09b9a6..46a32c4e9a6 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/GLIMAccountInfoWritePlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/GLIMAccountInfoWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.math.BigDecimal; + import org.apache.fineract.portfolio.group.domain.Group; import org.apache.fineract.portfolio.loanaccount.domain.GroupLoanIndividualMonitoringAccount; @@ -32,5 +33,5 @@ public interface GLIMAccountInfoWritePlatformService { void incrementChildAccountCount(GroupLoanIndividualMonitoringAccount glimAccount); GroupLoanIndividualMonitoringAccount createGLIMAccount(String accountNumber, Group group, BigDecimal principalAmount, - Long childAccountsCount, Boolean isAcceptingChild, Integer loanStatus, BigDecimal applicationId); + Long childAccountsCount, Boolean isAcceptingChild, Integer loanStatus, BigDecimal applicationId); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/GLIMAccountInfoWritePlatformServiceImpl.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/GLIMAccountInfoWritePlatformServiceImpl.java index b4329c588d1..7a9027390bc 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/GLIMAccountInfoWritePlatformServiceImpl.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/GLIMAccountInfoWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.math.BigDecimal; + import lombok.RequiredArgsConstructor; import org.apache.fineract.portfolio.group.domain.Group; import org.apache.fineract.portfolio.loanaccount.domain.GLIMAccountInfoRepository; @@ -32,7 +33,7 @@ public class GLIMAccountInfoWritePlatformServiceImpl implements GLIMAccountInfoW @Override public GroupLoanIndividualMonitoringAccount createGLIMAccount(String accountNumber, Group group, BigDecimal principalAmount, - Long childAccountsCount, Boolean isAcceptingChild, Integer loanStatus, BigDecimal applicationId) { + Long childAccountsCount, Boolean isAcceptingChild, Integer loanStatus, BigDecimal applicationId) { GroupLoanIndividualMonitoringAccount glimAccountInfo = GroupLoanIndividualMonitoringAccount.getInstance(accountNumber, group, principalAmount, childAccountsCount, isAcceptingChild, loanStatus, applicationId); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ILoanUtilService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ILoanUtilService.java index 976f7e7d3b5..7199a110a3c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ILoanUtilService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ILoanUtilService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.time.LocalDate; + import org.apache.fineract.portfolio.calendar.domain.Calendar; import org.apache.fineract.portfolio.group.domain.Group; import org.apache.fineract.portfolio.loanaccount.data.HolidayDetailDTO; @@ -33,7 +34,7 @@ public interface ILoanUtilService { ScheduleGeneratorDTO buildScheduleGeneratorDTO(Loan loan, LocalDate recalculateFrom, LocalDate rescheduleTill); ScheduleGeneratorDTO buildScheduleGeneratorDTO(Loan loan, LocalDate recalculateFrom, LocalDate recalculateTill, - HolidayDetailDTO holidayDetailDTO); + HolidayDetailDTO holidayDetailDTO); Boolean isLoanRepaymentsSyncWithMeeting(Group group, Calendar calendar); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestRefundService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestRefundService.java index 576d883fa51..955aa76b6a3 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestRefundService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestRefundService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.domain.LoanTermVariations; @@ -34,6 +35,6 @@ public interface InterestRefundService { @Transactional(readOnly = true, propagation = Propagation.REQUIRES_NEW) Money totalInterestByTransactions(LoanRepaymentScheduleTransactionProcessor processor, Long loanId, - LocalDate relatedRefundTransactionDate, List newTransactions, List oldTransactionIds, - List activeLoanTermVariations); + LocalDate relatedRefundTransactionDate, List newTransactions, List oldTransactionIds, + List activeLoanTermVariations); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualActivityProcessingService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualActivityProcessingService.java index aa4769f5f59..5f54a7f7d7e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualActivityProcessingService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualActivityProcessingService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.time.LocalDate; + import org.apache.fineract.portfolio.loanaccount.domain.ChangedTransactionDetail; import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.springframework.lang.NonNull; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualTransactionBusinessEventService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualTransactionBusinessEventService.java index 9723246ab09..eb60a0e82aa 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualTransactionBusinessEventService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualTransactionBusinessEventService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; public interface LoanAccrualTransactionBusinessEventService { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualTransactionBusinessEventServiceImpl.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualTransactionBusinessEventServiceImpl.java index ada8264fb69..16d06cc19f8 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualTransactionBusinessEventServiceImpl.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualTransactionBusinessEventServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.List; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.event.business.domain.loan.transaction.LoanAccrualAdjustmentTransactionBusinessEvent; import org.apache.fineract.infrastructure.event.business.domain.loan.transaction.LoanAccrualTransactionCreatedBusinessEvent; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualsProcessingService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualsProcessingService.java index be7e05a4ae1..5ec56b6432d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualsProcessingService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualsProcessingService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import org.apache.fineract.infrastructure.core.exception.MultiException; import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction; @@ -44,5 +45,5 @@ public interface LoanAccrualsProcessingService { void processAccrualsOnLoanClosure(@NonNull Loan loan, boolean addJournal); void processAccrualsOnLoanForeClosure(@NonNull Loan loan, @NonNull LocalDate foreClosureDate, - @NonNull List newAccrualTransactions); + @NonNull List newAccrualTransactions); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAmortizationAllocationService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAmortizationAllocationService.java index 56ea4682088..4d7ebf673b8 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAmortizationAllocationService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAmortizationAllocationService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.math.BigDecimal; + import org.apache.fineract.portfolio.loanaccount.data.LoanAmortizationAllocationData; import org.apache.fineract.portfolio.loanaccount.domain.AmortizationType; import org.apache.fineract.portfolio.loanaccount.domain.LoanAmortizationAllocationMapping; @@ -39,8 +40,8 @@ public interface LoanAmortizationAllocationService { BigDecimal calculateAlreadyAmortizedAmount(Long loanTransactionId, Long loanId); LoanAmortizationAllocationMapping createAmortizationAllocationMappingWithBaseLoanTransaction(LoanTransaction loanTransaction, - BigDecimal amount, AmortizationType amortizationType); + BigDecimal amount, AmortizationType amortizationType); void setAmortizationTransactionDataAndSaveAmortizationAllocationMapping(LoanAmortizationAllocationMapping amortizationAllocationMapping, - LoanTransaction amortizationTransaction); + LoanTransaction amortizationTransaction); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformService.java index 510b8866bb2..f0d3b0cd99c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApprovedAmountWritePlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApprovedAmountWritePlatformService.java index 5c0c45a8fad..558ce45fcde 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApprovedAmountWritePlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApprovedAmountWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApprovedAmountWritePlatformServiceImpl.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApprovedAmountWritePlatformServiceImpl.java index 568ca05168d..87489f348ea 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApprovedAmountWritePlatformServiceImpl.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApprovedAmountWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.util.LinkedHashMap; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingService.java index 0625fdaf550..cf005498b94 100755 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Map; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.domain.arrears.LoanArrearsData; import org.apache.fineract.portfolio.loanaccount.loanschedule.data.LoanSchedulePeriodData; @@ -33,7 +34,7 @@ public interface LoanArrearsAgingService { void updateLoanArrearsAgeingDetails(Loan loan); void createInsertStatements(List insertStatement, Map> scheduleDate, - boolean isInsertStatement); + boolean isInsertStatement); void updateScheduleWithPaidDetail(Map> scheduleDate, List> loanSummary); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java index 7e126b3bb60..4be506748bb 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanArrearsAgingServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import jakarta.annotation.PostConstruct; + import java.math.BigDecimal; import java.sql.ResultSet; import java.sql.SQLException; @@ -28,6 +29,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; @@ -217,7 +219,7 @@ private List> getLoanSummary(final Long loanId, final LoanSu @Override public void createInsertStatements(List insertStatement, Map> scheduleDate, - boolean isInsertStatement) { + boolean isInsertStatement) { for (Map.Entry> entry : scheduleDate.entrySet()) { final Long loanId = entry.getKey(); BigDecimal principalOverdue = BigDecimal.ZERO; @@ -259,7 +261,7 @@ public void createInsertStatements(List insertStatement, Map * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.util.Map; + import org.apache.fineract.infrastructure.codes.domain.CodeValue; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.domain.ExternalId; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanBalanceService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanBalanceService.java index 04fed6458f8..b0cb93dcd46 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanBalanceService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanBalanceService.java @@ -6,9 +6,9 @@ * 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 @@ -19,11 +19,13 @@ package org.apache.fineract.portfolio.loanaccount.service; import jakarta.persistence.FlushModeType; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.persistence.FlushModeHandler; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -323,7 +325,7 @@ private Money[] retrieveIncomeOutstandingTillDate(final Loan loan, final LocalDa } private Money[] fetchInterestFeeAndPenaltyTillDate(final Loan loan, final LocalDate paymentDate, final MonetaryCurrency currency, - final LoanRepaymentScheduleInstallment installment, final boolean isFirstNormalInstallment) { + final LoanRepaymentScheduleInstallment installment, final boolean isFirstNormalInstallment) { Money penaltyForCurrentPeriod = Money.zero(loan.getCurrency()); Money penaltyAccoutedForCurrentPeriod = Money.zero(loan.getCurrency()); Money feeForCurrentPeriod = Money.zero(loan.getCurrency()); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanBuyDownFeeAmortizationProcessingService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanBuyDownFeeAmortizationProcessingService.java index 9caee39923f..5beb270c372 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanBuyDownFeeAmortizationProcessingService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanBuyDownFeeAmortizationProcessingService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.time.LocalDate; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction; import org.springframework.lang.NonNull; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCalculateRepaymentPastDueService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCalculateRepaymentPastDueService.java index 6c7abcca34f..0ce9954c4c0 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCalculateRepaymentPastDueService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCalculateRepaymentPastDueService.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.LocalDate; import java.util.List; import java.util.stream.Collectors; + import lombok.NoArgsConstructor; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; @@ -40,7 +41,7 @@ public LoanRepaymentPastDueData retrieveLoanRepaymentPastDueAmountTillDate(Loan } private LoanRepaymentPastDueData calculatePastDueAmountsForRepayments(List pastDueRepayments, - MonetaryCurrency currency) { + MonetaryCurrency currency) { BigDecimal totalAmount = BigDecimal.ZERO; BigDecimal principalAmount = BigDecimal.ZERO; BigDecimal interestAmount = BigDecimal.ZERO; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationProcessingService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationProcessingService.java index 84ac57ab487..877107cece1 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationProcessingService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationProcessingService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.time.LocalDate; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction; import org.springframework.lang.NonNull; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargePaidByReadService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargePaidByReadService.java index ae2b4b806ec..af1cd5a309b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargePaidByReadService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargePaidByReadService.java @@ -6,9 +6,9 @@ * 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 @@ -27,9 +27,11 @@ import jakarta.persistence.criteria.Order; import jakarta.persistence.criteria.Path; import jakarta.persistence.criteria.Root; + import java.util.ArrayList; import java.util.Arrays; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.portfolio.loanaccount.data.LoanChargePaidByData; import org.apache.fineract.portfolio.loanaccount.domain.LoanChargePaidBy; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeReadPlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeReadPlatformService.java index 30e62a15d6d..88b60677a80 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeReadPlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.List; + import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.apache.fineract.portfolio.charge.data.ChargeData; import org.apache.fineract.portfolio.charge.domain.Charge; @@ -44,7 +45,7 @@ public interface LoanChargeReadPlatformService { Collection retrieveOverdueInstallmentChargeFrequencyNumber(Loan loan, Charge charge, Integer periodNumber); Collection retrieveLoanChargesPaidBy(Long chargeId, LoanTransactionType transactionType, - Integer installmentNumber); + Integer installmentNumber); Long retrieveLoanChargeIdByExternalId(ExternalId loanChargeExternalId); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeService.java index 5f439b6c74b..d9f8a38df0c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeService.java @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.configuration.service.TemporaryConfigurationServiceContainer; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -76,7 +77,7 @@ public void recalculateAllCharges(final Loan loan) { } public void recalculateParticularChargesAfterTransactionOccurs(final Loan loan, final List loanCharges, - final LocalDate transactionDate) { + final LocalDate transactionDate) { for (final LoanCharge loanCharge : loanCharges) { recalculateLoanCharge(loan, loanCharge, 0, transactionDate); } @@ -109,7 +110,7 @@ public void recalculateLoanCharge(final Loan loan, final LoanCharge loanCharge, } public void recalculateLoanCharge(final Loan loan, final LoanCharge loanCharge, final int penaltyWaitPeriod, - final LocalDate transactionDate) { + final LocalDate transactionDate) { BigDecimal amount = BigDecimal.ZERO; BigDecimal chargeAmt; BigDecimal totalChargeAmt = BigDecimal.ZERO; @@ -135,7 +136,7 @@ public void recalculateLoanCharge(final Loan loan, final LoanCharge loanCharge, } public void makeChargePayment(final Loan loan, final Long chargeId, final LoanTransaction paymentTransaction, - final Integer installmentNumber) { + final Integer installmentNumber) { loanChargeValidator.validateChargePaymentNotInFuture(paymentTransaction); LoanCharge charge = null; for (final LoanCharge loanCharge : loan.getCharges()) { @@ -154,7 +155,7 @@ public void makeChargePayment(final Loan loan, final Long chargeId, final LoanTr * is lesser than today's date. If not, the transaction date is set to today's date */ public LoanTransaction handleChargeAppliedTransaction(final Loan loan, final LoanCharge loanCharge, - final LocalDate suppliedTransactionDate) { + final LocalDate suppliedTransactionDate) { if (loan.isProgressiveSchedule()) { return null; } @@ -163,7 +164,7 @@ public LoanTransaction handleChargeAppliedTransaction(final Loan loan, final Loa } public LoanTransaction createChargeAppliedTransaction(final Loan loan, final LoanCharge loanCharge, - final LocalDate suppliedTransactionDate) { + final LocalDate suppliedTransactionDate) { final Money chargeAmount = loanCharge.getAmount(loan.getCurrency()); Money feeCharges = chargeAmount; Money penaltyCharges = Money.zero(loan.getCurrency()); @@ -331,7 +332,7 @@ public void updateLoanCharges(final Loan loan, final Set loanCharges } public BigDecimal calculatePerInstallmentChargeAmount(final Loan loan, final ChargeCalculationType calculationType, - final BigDecimal percentage) { + final BigDecimal percentage) { Money amount = Money.zero(loan.getCurrency()); List installments = loan.getRepaymentScheduleInstallments(); for (final LoanRepaymentScheduleInstallment installment : installments) { @@ -364,7 +365,7 @@ public Map update(final JsonCommand command, final BigDecimal am actualChanges.put("locale", localeAsInput); switch (loanCharge.getChargeCalculation()) { case INVALID: - break; + break; case FLAT: if (loanCharge.isInstalmentFee()) { loanCharge.setAmount( @@ -373,7 +374,7 @@ public Map update(final JsonCommand command, final BigDecimal am loanCharge.setAmount(newValue); } loanCharge.setAmountOutstanding(loanCharge.calculateOutstanding()); - break; + break; case PERCENT_OF_AMOUNT: case PERCENT_OF_AMOUNT_AND_INTEREST: case PERCENT_OF_INTEREST: @@ -390,7 +391,7 @@ public Map update(final JsonCommand command, final BigDecimal am } loanCharge.setAmount(loanCharge.minimumAndMaximumCap(loanChargeAmount)); loanCharge.setAmountOutstanding(loanCharge.calculateOutstanding()); - break; + break; } loanCharge.setAmountOrPercentage(newValue); if (loanCharge.isInstalmentFee()) { @@ -401,7 +402,7 @@ public Map update(final JsonCommand command, final BigDecimal am } public void populateDerivedFields(final LoanCharge loanCharge, final BigDecimal amountPercentageAppliedTo, - final BigDecimal chargeAmount, Integer numberOfRepayments, BigDecimal loanChargeAmount) { + final BigDecimal chargeAmount, Integer numberOfRepayments, BigDecimal loanChargeAmount) { switch (loanCharge.getChargeCalculation()) { case INVALID: loanCharge.setPercentage(null); @@ -411,7 +412,7 @@ public void populateDerivedFields(final LoanCharge loanCharge, final BigDecimal loanCharge.setAmountOutstanding(BigDecimal.ZERO); loanCharge.setAmountWaived(null); loanCharge.setAmountWrittenOff(null); - break; + break; case FLAT: loanCharge.setPercentage(null); loanCharge.setAmountPercentageAppliedTo(null); @@ -427,7 +428,7 @@ public void populateDerivedFields(final LoanCharge loanCharge, final BigDecimal loanCharge.setAmountOutstanding(loanCharge.getAmount()); loanCharge.setAmountWaived(null); loanCharge.setAmountWrittenOff(null); - break; + break; case PERCENT_OF_AMOUNT: case PERCENT_OF_AMOUNT_AND_INTEREST: case PERCENT_OF_INTEREST: @@ -442,7 +443,7 @@ public void populateDerivedFields(final LoanCharge loanCharge, final BigDecimal loanCharge.setAmountOutstanding(loanCharge.calculateOutstanding()); loanCharge.setAmountWaived(null); loanCharge.setAmountWrittenOff(null); - break; + break; } loanCharge.setAmountOrPercentage(chargeAmount); if (loanCharge.getLoan() != null && loanCharge.isInstalmentFee()) { @@ -466,29 +467,29 @@ public void update(final LoanCharge loanCharge, final BigDecimal amount, final L } else { amountPercentageAppliedTo = loanCharge.getLoan().getPrincipal().getAmount(); } - break; + break; case PERCENT_OF_AMOUNT_AND_INTEREST: amountPercentageAppliedTo = loanCharge.getLoan().getPrincipal().getAmount() .add(loanCharge.getLoan().getTotalInterest()); - break; + break; case PERCENT_OF_INTEREST: amountPercentageAppliedTo = loanCharge.getLoan().getTotalInterest(); - break; + break; case PERCENT_OF_DISBURSEMENT_AMOUNT: LoanTrancheDisbursementCharge loanTrancheDisbursementCharge = loanCharge.getLoanTrancheDisbursementCharge(); amountPercentageAppliedTo = loanTrancheDisbursementCharge.getloanDisbursementDetails().getPrincipal(); - break; + break; default: - break; + break; } } update(loanCharge, amount, dueDate, amountPercentageAppliedTo, numberOfRepayments, BigDecimal.ZERO); } public LoanCharge create(final Loan loan, final Charge chargeDefinition, final BigDecimal loanPrincipal, final BigDecimal amount, - final ChargeTimeType chargeTime, final ChargeCalculationType chargeCalculation, final LocalDate dueDate, - final ChargePaymentMode chargePaymentMode, final Integer numberOfRepayments, final BigDecimal loanChargeAmount, - final ExternalId externalId) { + final ChargeTimeType chargeTime, final ChargeCalculationType chargeCalculation, final LocalDate dueDate, + final ChargePaymentMode chargePaymentMode, final Integer numberOfRepayments, final BigDecimal loanChargeAmount, + final ExternalId externalId) { final LoanCharge loanCharge = new LoanCharge(); loanCharge.setLoan(loan); loanCharge.setCharge(chargeDefinition); @@ -571,7 +572,7 @@ private void clearLoanInstallmentChargesBeforeRegeneration(final LoanCharge loan if (!loan.isSubmittedAndPendingApproval() && !loan.isApproved()) { return; } // doing for both just in case status is not - // updated at this points + // updated at this points if (loanCharge.isInstalmentFee()) { loanCharge.clearLoanInstallmentCharges(); for (final LoanRepaymentScheduleInstallment installment : loan.getRepaymentScheduleInstallments()) { @@ -584,7 +585,7 @@ private void clearLoanInstallmentChargesBeforeRegeneration(final LoanCharge loan } private void handleChargePaidTransaction(final Loan loan, final LoanCharge charge, final LoanTransaction chargesPayment, - final Integer installmentNumber) { + final Integer installmentNumber) { chargesPayment.updateLoan(loan); final LoanChargePaidBy loanChargePaidBy = new LoanChargePaidBy(chargesPayment, charge, chargesPayment.getAmount(loan.getCurrency()).getAmount(), installmentNumber); @@ -682,7 +683,7 @@ private List generateInstallmentLoanCharges(final Loan lo } private List generateInstallmentLoanCharges(final Loan loan, final LoanCharge loanCharge, - final LocalDate transactionDate) { + final LocalDate transactionDate) { final List loanChargePerInstallments = new ArrayList<>(); if (loanCharge.isInstalmentFee()) { final List installments = loan.getRepaymentScheduleInstallments().stream() @@ -754,7 +755,7 @@ public void updateInstallmentCharges(final LoanCharge loanCharge, final LocalDat } private BigDecimal calculateOverdueAmountPercentageAppliedTo(final Loan loan, final LoanCharge loanCharge, - final int penaltyWaitPeriod) { + final int penaltyWaitPeriod) { LoanRepaymentScheduleInstallment installment = loanCharge.getOverdueInstallmentCharge().getInstallment(); LocalDate graceDate = DateUtils.getBusinessLocalDate().minusDays(penaltyWaitPeriod); Money amount = Money.zero(loan.getCurrency()); @@ -771,18 +772,18 @@ private BigDecimal calculateOverdueAmountPercentageAppliedTo(final Loan loan, fi } private Money calculateOverdueAmountPercentageAppliedTo(final Loan loan, final LoanRepaymentScheduleInstallment installment, - final ChargeCalculationType calculationType) { + final ChargeCalculationType calculationType) { return switch (calculationType) { case PERCENT_OF_AMOUNT -> installment.getPrincipalOutstanding(loan.getCurrency()); case PERCENT_OF_AMOUNT_AND_INTEREST -> - installment.getPrincipalOutstanding(loan.getCurrency()).plus(installment.getInterestOutstanding(loan.getCurrency())); + installment.getPrincipalOutstanding(loan.getCurrency()).plus(installment.getInterestOutstanding(loan.getCurrency())); case PERCENT_OF_INTEREST -> installment.getInterestOutstanding(loan.getCurrency()); default -> Money.zero(loan.getCurrency()); }; } private void update(final LoanCharge loanCharge, final BigDecimal amount, final LocalDate dueDate, final BigDecimal loanPrincipal, - Integer numberOfRepayments, BigDecimal loanChargeAmount) { + Integer numberOfRepayments, BigDecimal loanChargeAmount) { if (dueDate != null) { loanCharge.setDueDate(dueDate); } @@ -790,7 +791,7 @@ private void update(final LoanCharge loanCharge, final BigDecimal amount, final if (amount != null) { switch (loanCharge.getChargeCalculation()) { case INVALID: - break; + break; case FLAT: if (loanCharge.isInstalmentFee()) { if (numberOfRepayments == null) { @@ -800,7 +801,7 @@ private void update(final LoanCharge loanCharge, final BigDecimal amount, final } else { loanCharge.setAmount(amount); } - break; + break; case PERCENT_OF_AMOUNT: case PERCENT_OF_AMOUNT_AND_INTEREST: case PERCENT_OF_INTEREST: @@ -811,7 +812,7 @@ private void update(final LoanCharge loanCharge, final BigDecimal amount, final loanChargeAmount = loanCharge.percentageOf(loanCharge.getAmountPercentageAppliedTo()); } loanCharge.setAmount(loanCharge.minimumAndMaximumCap(loanChargeAmount)); - break; + break; } loanCharge.setAmountOrPercentage(amount); loanCharge.setAmountOutstanding(loanCharge.calculateOutstanding()); @@ -822,7 +823,7 @@ private void update(final LoanCharge loanCharge, final BigDecimal amount, final } private void update(final LoanCharge loanCharge, final BigDecimal amount, final LocalDate dueDate, final BigDecimal loanPrincipal, - Integer numberOfRepayments, BigDecimal loanChargeAmount, final LocalDate transactionDate) { + Integer numberOfRepayments, BigDecimal loanChargeAmount, final LocalDate transactionDate) { if (dueDate != null) { loanCharge.setDueDate(dueDate); } @@ -830,7 +831,7 @@ private void update(final LoanCharge loanCharge, final BigDecimal amount, final if (amount != null) { switch (loanCharge.getChargeCalculation()) { case INVALID: - break; + break; case FLAT: if (loanCharge.isInstalmentFee()) { if (numberOfRepayments == null) { @@ -840,7 +841,7 @@ private void update(final LoanCharge loanCharge, final BigDecimal amount, final } else { loanCharge.setAmount(amount); } - break; + break; case PERCENT_OF_AMOUNT: case PERCENT_OF_AMOUNT_AND_INTEREST: case PERCENT_OF_INTEREST: @@ -851,7 +852,7 @@ private void update(final LoanCharge loanCharge, final BigDecimal amount, final loanChargeAmount = loanCharge.percentageOf(loanCharge.getAmountPercentageAppliedTo()); } loanCharge.setAmount(loanCharge.minimumAndMaximumCap(loanChargeAmount)); - break; + break; } loanCharge.setAmountOrPercentage(amount); loanCharge.setAmountOutstanding(loanCharge.calculateOutstanding()); @@ -889,11 +890,11 @@ private List fetchAllLoanChargeIds(final Loan loan) { } private Money calculateInstallmentChargeAmount(final Loan loan, final ChargeCalculationType calculationType, - final BigDecimal percentage, final LoanRepaymentScheduleInstallment installment) { + final BigDecimal percentage, final LoanRepaymentScheduleInstallment installment) { Money percentOf = switch (calculationType) { case PERCENT_OF_AMOUNT -> installment.getPrincipal(loan.getCurrency()); case PERCENT_OF_AMOUNT_AND_INTEREST -> - installment.getPrincipal(loan.getCurrency()).plus(installment.getInterestCharged(loan.getCurrency())); + installment.getPrincipal(loan.getCurrency()).plus(installment.getInterestCharged(loan.getCurrency())); case PERCENT_OF_INTEREST -> installment.getInterestCharged(loan.getCurrency()); case PERCENT_OF_DISBURSEMENT_AMOUNT, INVALID, FLAT -> Money.zero(loan.getCurrency()); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeWritePlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeWritePlatformService.java index f96a7d60be5..da8da91e008 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeWritePlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.util.Collection; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.portfolio.loanaccount.loanschedule.data.OverdueLoanScheduleData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanDownPaymentHandlerService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanDownPaymentHandlerService.java index f57b2c5ee56..daefaf4ab62 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanDownPaymentHandlerService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanDownPaymentHandlerService.java @@ -6,9 +6,9 @@ * 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 @@ -26,8 +26,8 @@ public interface LoanDownPaymentHandlerService { LoanTransaction handleDownPayment(ScheduleGeneratorDTO scheduleGeneratorDTO, JsonCommand command, - LoanTransaction disbursementTransaction, Loan loan); + LoanTransaction disbursementTransaction, Loan loan); void handleRepaymentOrRecoveryOrWaiverTransaction(Loan loan, LoanTransaction newTransactionDetail, - LoanTransaction transactionForAdjustment, ScheduleGeneratorDTO scheduleGeneratorDTO); + LoanTransaction transactionForAdjustment, ScheduleGeneratorDTO scheduleGeneratorDTO); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanDownPaymentHandlerServiceImpl.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanDownPaymentHandlerServiceImpl.java index 378a48d3754..3bd7a090d4d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanDownPaymentHandlerServiceImpl.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanDownPaymentHandlerServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.configuration.service.TemporaryConfigurationServiceContainer; @@ -67,7 +68,7 @@ public class LoanDownPaymentHandlerServiceImpl implements LoanDownPaymentHandler @Override public LoanTransaction handleDownPayment(ScheduleGeneratorDTO scheduleGeneratorDTO, JsonCommand command, - LoanTransaction disbursementTransaction, Loan loan) { + LoanTransaction disbursementTransaction, Loan loan) { businessEventNotifierService.notifyPreBusinessEvent(new LoanTransactionDownPaymentPreBusinessEvent(loan)); LoanTransaction downPaymentTransaction = handleDownPayment(loan, disbursementTransaction, command, scheduleGeneratorDTO); if (downPaymentTransaction != null) { @@ -80,7 +81,7 @@ public LoanTransaction handleDownPayment(ScheduleGeneratorDTO scheduleGeneratorD @Override public void handleRepaymentOrRecoveryOrWaiverTransaction(final Loan loan, final LoanTransaction loanTransaction, - final LoanTransaction adjustedTransaction, final ScheduleGeneratorDTO scheduleGeneratorDTO) { + final LoanTransaction adjustedTransaction, final ScheduleGeneratorDTO scheduleGeneratorDTO) { if (loanTransaction.isRecoveryRepayment()) { loanLifecycleStateMachine.transition(LoanEvent.LOAN_RECOVERY_PAYMENT, loan); } @@ -185,7 +186,7 @@ public void handleRepaymentOrRecoveryOrWaiverTransaction(final Loan loan, final } private LoanTransaction handleDownPayment(final Loan loan, final LoanTransaction disbursementTransaction, final JsonCommand command, - final ScheduleGeneratorDTO scheduleGeneratorDTO) { + final ScheduleGeneratorDTO scheduleGeneratorDTO) { final LocalDate disbursedOn = command.localDateValueOfParameterNamed(ACTUAL_DISBURSEMENT_DATE); final BigDecimal disbursedAmountPercentageForDownPayment = loan.getLoanRepaymentScheduleDetail() .getDisbursedAmountPercentageForDownPayment(); @@ -215,7 +216,7 @@ private LoanTransaction handleDownPayment(final Loan loan, final LoanTransaction // For Progressive loan: Disbursement transaction portion balances are enough to see whether the overpayment // amount was more than the calculated down-payment amount case PROGRESSIVE -> - MathUtil.negativeToZero(downPaymentMoney.minus(disbursementTransaction.getOverPaymentPortion(loan.getCurrency()))); + MathUtil.negativeToZero(downPaymentMoney.minus(disbursementTransaction.getOverPaymentPortion(loan.getCurrency()))); }; if (adjustedDownPaymentMoney.isGreaterThanZero()) { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanJournalEntryPoster.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanJournalEntryPoster.java index 65c41474fca..085c1713298 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanJournalEntryPoster.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanJournalEntryPoster.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanMaximumAmountCalculator.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanMaximumAmountCalculator.java index 70d2a9d498d..de68cc09082 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanMaximumAmountCalculator.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanMaximumAmountCalculator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.math.BigDecimal; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.domain.LoanOverAppliedCalculationType; import org.apache.fineract.portfolio.loanproduct.domain.LoanProduct; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanOriginatorLinkingService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanOriginatorLinkingService.java index 4d585c26470..8d76e3444ec 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanOriginatorLinkingService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanOriginatorLinkingService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanOriginatorLinkingServiceNoOp.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanOriginatorLinkingServiceNoOp.java index 5f41e37271a..b6d7c03d040 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanOriginatorLinkingServiceNoOp.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanOriginatorLinkingServiceNoOp.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformService.java index f372b117b30..f5d591979bc 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.infrastructure.core.service.SearchParameters; @@ -52,13 +53,13 @@ public interface LoanReadPlatformService { LoanAccountData fetchRepaymentScheduleData(LoanAccountData accountData); LoanScheduleData retrieveRepaymentSchedule(Long loanId, RepaymentScheduleRelatedLoanData repaymentScheduleRelatedData, - Collection disbursementData, Collection capitalizedIncomeData, - boolean isInterestRecalculationEnabled, LoanScheduleType loanScheduleType); + Collection disbursementData, Collection capitalizedIncomeData, + boolean isInterestRecalculationEnabled, LoanScheduleType loanScheduleType); Collection retrieveLoanTransactions(Long loanId); org.springframework.data.domain.Page retrieveLoanTransactions(@NonNull Long loanId, - Set excludedTransactionTypes, Pageable pageable); + Set excludedTransactionTypes, Pageable pageable); LoanAccountData retrieveTemplateWithClientAndProductDetails(Long clientId, Long productId); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanRefundService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanRefundService.java index e367455e89c..efa66c2b68b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanRefundService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanRefundService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.time.LocalDate; + import lombok.RequiredArgsConstructor; import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.domain.LoanEvent; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanScheduleGeneratorService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanScheduleGeneratorService.java index 0c56ea0b20a..cfe0079659f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanScheduleGeneratorService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanScheduleGeneratorService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.math.BigDecimal; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; public interface LoanScheduleGeneratorService { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanScheduleService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanScheduleService.java index 55dba665987..baf08f33a62 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanScheduleService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanScheduleService.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.List; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.portfolio.loanaccount.data.ScheduleGeneratorDTO; @@ -71,12 +72,12 @@ public void regenerateScheduleWithReprocessingTransactions(final Loan loan, fina } public void recalculateScheduleFromLastTransaction(final Loan loan, final ScheduleGeneratorDTO generatorDTO, - final List existingTransactionIds, final List existingReversedTransactionIds) { + final List existingTransactionIds, final List existingReversedTransactionIds) { recalculateScheduleFromLastTransaction(loan, generatorDTO, existingTransactionIds, existingReversedTransactionIds, false); } public void recalculateScheduleFromLastTransaction(final Loan loan, final ScheduleGeneratorDTO generatorDTO, - final List existingTransactionIds, final List existingReversedTransactionIds, boolean skipTransactionIdCollecting) { + final List existingTransactionIds, final List existingReversedTransactionIds, boolean skipTransactionIdCollecting) { if (!skipTransactionIdCollecting) { existingTransactionIds.addAll(loanTransactionRepository.findTransactionIdsByLoan(loan)); existingReversedTransactionIds.addAll(loanTransactionRepository.findReversedTransactionIdsByLoan(loan)); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanStatusChangeHistoryListener.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanStatusChangeHistoryListener.java index 1048d620a5d..da8e90f6243 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanStatusChangeHistoryListener.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanStatusChangeHistoryListener.java @@ -6,9 +6,9 @@ * 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 @@ -20,11 +20,13 @@ import com.google.common.base.Splitter; import jakarta.annotation.PostConstruct; + import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanStatusChangePlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanStatusChangePlatformService.java index fc737fec8e8..850ac69e49e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanStatusChangePlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanStatusChangePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -18,4 +18,5 @@ */ package org.apache.fineract.portfolio.loanaccount.service; -public interface LoanStatusChangePlatformService {} +public interface LoanStatusChangePlatformService { +} diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanStatusChangePlatformServiceImpl.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanStatusChangePlatformServiceImpl.java index 83b5f03d8bb..f220ebc3871 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanStatusChangePlatformServiceImpl.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanStatusChangePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanSummaryDataProvider.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanSummaryDataProvider.java index 6a59289a0a1..5ac908d87e3 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanSummaryDataProvider.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanSummaryDataProvider.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.Collection; + import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.portfolio.loanaccount.data.LoanSummaryData; import org.apache.fineract.portfolio.loanaccount.data.LoanTransactionBalance; @@ -33,15 +34,15 @@ public interface LoanSummaryDataProvider { BigDecimal computeTotalUnpaidPayableDueInterestAmount(Collection periods, LocalDate businessDate); BigDecimal computeTotalUnpaidPayableNotDueInterestAmountOnActualPeriod(Loan loan, Collection periods, - LocalDate businessDate, CurrencyData currency, BigDecimal totalUnpaidPayableDueInterest); + LocalDate businessDate, CurrencyData currency, BigDecimal totalUnpaidPayableDueInterest); LoanSummaryData withOnlyCurrencyData(CurrencyData currencyData); LoanSummaryData withTransactionAmountsSummary(Long loanId, LoanSummaryData defaultSummaryData, LoanScheduleData repaymentSchedule, - Collection loanTransactionBalances); + Collection loanTransactionBalances); LoanSummaryData withTransactionAmountsSummary(Loan loan, LoanSummaryData defaultSummaryData, LoanScheduleData repaymentSchedule, - Collection loanTransactionBalances); + Collection loanTransactionBalances); boolean accept(String loanProcessingStrategyCode); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanSummaryProviderDelegate.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanSummaryProviderDelegate.java index 20f9663fcef..0bcdd721bf3 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanSummaryProviderDelegate.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanSummaryProviderDelegate.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.util.List; + import lombok.AllArgsConstructor; import org.springframework.stereotype.Component; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionProcessingService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionProcessingService.java index a57d20ccad1..9430c54d492 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionProcessingService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionProcessingService.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.List; import java.util.Set; + import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; import org.apache.fineract.portfolio.loanaccount.data.OutstandingAmountsDTO; import org.apache.fineract.portfolio.loanaccount.data.ScheduleGeneratorDTO; @@ -36,14 +37,14 @@ public interface LoanTransactionProcessingService { boolean canProcessLatestTransactionOnly(Loan loan, LoanTransaction loanTransaction, - LoanRepaymentScheduleInstallment currentInstallment); + LoanRepaymentScheduleInstallment currentInstallment); ChangedTransactionDetail processLatestTransaction(String transactionProcessingStrategyCode, LoanTransaction loanTransaction, - TransactionCtx ctx); + TransactionCtx ctx); ChangedTransactionDetail reprocessLoanTransactions(String transactionProcessingStrategyCode, LocalDate disbursementDate, - List repaymentsOrWaivers, MonetaryCurrency currency, - List repaymentScheduleInstallments, Set charges); + List repaymentsOrWaivers, MonetaryCurrency currency, + List repaymentScheduleInstallments, Set charges); LoanRepaymentScheduleTransactionProcessor getTransactionProcessor(String transactionProcessingStrategyCode); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionReadService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionReadService.java index bc7507b10de..3ad20994d12 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionReadService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionReadService.java @@ -6,9 +6,9 @@ * 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 @@ -28,8 +28,10 @@ import jakarta.persistence.criteria.Path; import jakarta.persistence.criteria.Predicate; import jakarta.persistence.criteria.Root; + import java.util.ArrayList; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction; import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionType; @@ -44,14 +46,14 @@ public class LoanTransactionReadService { private EntityManager entityManager; public List fetchLoanTransactionsByType(final Long loanId, final String externalId, - final LoanTransactionType transactionType) { + final LoanTransactionType transactionType) { final List transactionTypes = new ArrayList<>(); transactionTypes.add(transactionType); return fetchLoanTransactionsByTypes(loanId, externalId, transactionTypes); } public List fetchLoanTransactionsByTypes(final Long loanId, final String externalId, - final List transactionTypes) { + final List transactionTypes) { final CriteriaBuilder cb = entityManager.getCriteriaBuilder(); final CriteriaQuery query = cb.createQuery(LoanTransaction.class); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionRelationReadService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionRelationReadService.java index 504ea4ebf37..18276b0dd67 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionRelationReadService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionRelationReadService.java @@ -6,9 +6,9 @@ * 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 @@ -27,9 +27,11 @@ import jakarta.persistence.criteria.Order; import jakarta.persistence.criteria.Path; import jakarta.persistence.criteria.Root; + import java.util.ArrayList; import java.util.Arrays; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.portfolio.loanaccount.data.LoanTransactionRelationData; import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionService.java index 50afd7d8d30..e23cc45d511 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionService.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.Optional; import java.util.function.Predicate; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.portfolio.loanaccount.domain.Loan; @@ -53,7 +54,7 @@ public boolean isChronologicallyLatestRepaymentOrWaiver(final Loan loan, final L private Predicate loanTransactionForReprocessingPredicate() { return transaction -> transaction.isNotReversed() && (transaction.isChargeOff() || transaction.isReAge() || transaction.isAccrualActivity() || transaction.isReAmortize() - || !transaction.isNonMonetaryTransaction() || transaction.isContractTermination()); + || !transaction.isNonMonetaryTransaction() || transaction.isContractTermination()); } } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformService.java index 59cf3054dfb..043b46d41b5 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.Collection; import java.util.Map; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.organisation.office.domain.Office; @@ -41,16 +42,16 @@ public interface LoanWritePlatformService { CommandProcessingResult disburseLoan(Long loanId, JsonCommand command, Boolean isAccountTransfer, Boolean isWithoutAutoPayment); Map bulkLoanDisbursal(JsonCommand command, CollectionSheetBulkDisbursalCommand bulkDisbursalCommand, - Boolean isAccountTransfer); + Boolean isAccountTransfer); CommandProcessingResult undoLoanDisbursal(Long loanId, JsonCommand command); CommandProcessingResult makeLoanRepayment(LoanTransactionType repaymentTransactionType, Long loanId, JsonCommand command, - boolean isRecoveryRepayment); + boolean isRecoveryRepayment); @Transactional CommandProcessingResult makeLoanRepaymentWithChargeRefundChargeType(LoanTransactionType repaymentTransactionType, Long loanId, - JsonCommand command, boolean isRecoveryRepayment, String chargeRefundChargeType); + JsonCommand command, boolean isRecoveryRepayment, String chargeRefundChargeType); @Transactional CommandProcessingResult makeInterestPaymentWaiver(JsonCommand command); @@ -76,7 +77,7 @@ CommandProcessingResult makeLoanRepaymentWithChargeRefundChargeType(LoanTransact CommandProcessingResult removeLoanOfficer(Long loanId, JsonCommand command); void applyMeetingDateChanges(Calendar calendar, Collection loanCalendarInstances, - Boolean reschedulebasedOnMeetingDates, LocalDate presentMeetingDate, LocalDate newMeetingDate); + Boolean reschedulebasedOnMeetingDates, LocalDate presentMeetingDate, LocalDate newMeetingDate); LoanTransaction initiateLoanTransfer(Loan loan, LocalDate transferDate); diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/RecalculateInterestPoster.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/RecalculateInterestPoster.java index 030e93c29e4..2fd78a823eb 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/RecalculateInterestPoster.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/RecalculateInterestPoster.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.Collection; import java.util.List; import java.util.concurrent.Callable; + import lombok.RequiredArgsConstructor; import lombok.Setter; import lombok.extern.slf4j.Slf4j; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ReplayedTransactionBusinessEventService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ReplayedTransactionBusinessEventService.java index 614c9b719e8..75f577026ca 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ReplayedTransactionBusinessEventService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ReplayedTransactionBusinessEventService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ReplayedTransactionBusinessEventServiceImpl.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ReplayedTransactionBusinessEventServiceImpl.java index fe1737c8a62..5b43e873caa 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ReplayedTransactionBusinessEventServiceImpl.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ReplayedTransactionBusinessEventServiceImpl.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ReprocessLoanTransactionsService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ReprocessLoanTransactionsService.java index 5db714ebdcf..104e2f2928a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ReprocessLoanTransactionsService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ReprocessLoanTransactionsService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/listener/LoanTransactionDelinquencyRecalculationListener.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/listener/LoanTransactionDelinquencyRecalculationListener.java index 2d0c27acc2c..0ed7f7cfe5c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/listener/LoanTransactionDelinquencyRecalculationListener.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/listener/LoanTransactionDelinquencyRecalculationListener.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service.listener; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.event.business.BusinessEventListener; import org.apache.fineract.infrastructure.event.business.domain.loan.transaction.LoanTransactionBusinessEvent; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/schedule/LoanScheduleComponent.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/schedule/LoanScheduleComponent.java index aba2f2d32ae..f75cf08e392 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/schedule/LoanScheduleComponent.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/schedule/LoanScheduleComponent.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment; @@ -80,7 +81,7 @@ public void updateLoanSchedule(Loan loan, final List installments, - final Integer installmentNumber) { + final Integer installmentNumber) { return installments.stream().filter(i -> installmentNumber.compareTo(i.getInstallmentNumber()) == 0).findFirst().orElse(null); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/CreocoreLoanRepaymentScheduleTransactionProcessorCondition.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/CreocoreLoanRepaymentScheduleTransactionProcessorCondition.java index 2a2dd4f3082..6033083c9c1 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/CreocoreLoanRepaymentScheduleTransactionProcessorCondition.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/CreocoreLoanRepaymentScheduleTransactionProcessorCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/DuePenFeeIntPriInAdvancePriPenFeeIntLoanRepaymentScheduleTransactionProcessorCondition.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/DuePenFeeIntPriInAdvancePriPenFeeIntLoanRepaymentScheduleTransactionProcessorCondition.java index a910992a1b3..209293d54a5 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/DuePenFeeIntPriInAdvancePriPenFeeIntLoanRepaymentScheduleTransactionProcessorCondition.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/DuePenFeeIntPriInAdvancePriPenFeeIntLoanRepaymentScheduleTransactionProcessorCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/DuePenIntPriFeeInAdvancePenIntPriFeeLoanRepaymentScheduleTransactionProcessorCondition.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/DuePenIntPriFeeInAdvancePenIntPriFeeLoanRepaymentScheduleTransactionProcessorCondition.java index a06c1e262e1..bd3686d1079 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/DuePenIntPriFeeInAdvancePenIntPriFeeLoanRepaymentScheduleTransactionProcessorCondition.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/DuePenIntPriFeeInAdvancePenIntPriFeeLoanRepaymentScheduleTransactionProcessorCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/EarlyRepaymentLoanRepaymentScheduleTransactionProcessorCondition.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/EarlyRepaymentLoanRepaymentScheduleTransactionProcessorCondition.java index e7ac158c6ee..f00620b5197 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/EarlyRepaymentLoanRepaymentScheduleTransactionProcessorCondition.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/EarlyRepaymentLoanRepaymentScheduleTransactionProcessorCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/HeavensFamilyLoanRepaymentScheduleTransactionProcessorCondition.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/HeavensFamilyLoanRepaymentScheduleTransactionProcessorCondition.java index 9e681a40fd9..526b53d152c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/HeavensFamilyLoanRepaymentScheduleTransactionProcessorCondition.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/HeavensFamilyLoanRepaymentScheduleTransactionProcessorCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/InterestPrincipalPenaltiesFeesLoanRepaymentScheduleTransactionProcessorCondition.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/InterestPrincipalPenaltiesFeesLoanRepaymentScheduleTransactionProcessorCondition.java index cac74e1f873..2d05f83dd32 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/InterestPrincipalPenaltiesFeesLoanRepaymentScheduleTransactionProcessorCondition.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/InterestPrincipalPenaltiesFeesLoanRepaymentScheduleTransactionProcessorCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/MifosStandardLoanRepaymentScheduleTransactionProcessorCondition.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/MifosStandardLoanRepaymentScheduleTransactionProcessorCondition.java index 196cf2f9319..bc33137c2ac 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/MifosStandardLoanRepaymentScheduleTransactionProcessorCondition.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/MifosStandardLoanRepaymentScheduleTransactionProcessorCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/PrincipalInterestPenaltiesFeesLoanRepaymentScheduleTransactionProcessorCondition.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/PrincipalInterestPenaltiesFeesLoanRepaymentScheduleTransactionProcessorCondition.java index 2afa6cee65e..bb4945a006c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/PrincipalInterestPenaltiesFeesLoanRepaymentScheduleTransactionProcessorCondition.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/PrincipalInterestPenaltiesFeesLoanRepaymentScheduleTransactionProcessorCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/RBIIndiaLoanRepaymentScheduleTransactionProcessorCondition.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/RBIIndiaLoanRepaymentScheduleTransactionProcessorCondition.java index 88754617bc9..1d90040fcc0 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/RBIIndiaLoanRepaymentScheduleTransactionProcessorCondition.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/RBIIndiaLoanRepaymentScheduleTransactionProcessorCondition.java @@ -6,9 +6,9 @@ * 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 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..13d036df579 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 @@ -6,9 +6,9 @@ * 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 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..506a696e5ff 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 @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.portfolio.loanproduct.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; import java.util.Set; + import org.apache.fineract.accounting.glaccount.data.GLAccountData; import org.apache.fineract.infrastructure.codes.api.CodeValuesApiResourceSwagger.GetCodeValuesDataResponse; import org.apache.fineract.infrastructure.core.data.EnumOptionData; @@ -34,12 +36,14 @@ */ public final class LoanProductsApiResourceSwagger { - private LoanProductsApiResourceSwagger() {} + private LoanProductsApiResourceSwagger() { + } @Schema(description = "LoanProductChargeData") public static final class LoanProductChargeData { - private LoanProductChargeData() {} + private LoanProductChargeData() { + } @Schema(example = "1") public Long id; @@ -50,7 +54,8 @@ private LoanProductChargeData() {} @Schema(description = "LoanProductChargeToGLAccountMapper") public static final class LoanProductChargeToGLAccountMapper { - private LoanProductChargeToGLAccountMapper() {} + private LoanProductChargeToGLAccountMapper() { + } public LoanProductChargeData charge; public GLAccountData incomeAccount; @@ -60,7 +65,8 @@ private LoanProductChargeToGLAccountMapper() {} @Schema(description = "PostLoanProductsRequest") public static final class PostLoanProductsRequest { - private PostLoanProductsRequest() {} + private PostLoanProductsRequest() { + } @Schema(example = "LP Accrual Accounting") public String name; @@ -204,7 +210,7 @@ private PostLoanProductsRequest() {} public String capitalizedIncomeCalculationType; @Schema(example = "EQUAL_AMORTIZATION", allowableValues = "EQUAL_AMORTIZATION") public String capitalizedIncomeStrategy; - @Schema(example = "FEE", allowableValues = { "FEE", "INTEREST" }) + @Schema(example = "FEE", allowableValues = {"FEE", "INTEREST"}) public String capitalizedIncomeType; @Schema(example = "false") public Boolean enableBuyDownFee; @@ -212,7 +218,7 @@ private PostLoanProductsRequest() {} public String buyDownFeeCalculationType; @Schema(example = "EQUAL_AMORTIZATION", allowableValues = "EQUAL_AMORTIZATION") public String buyDownFeeStrategy; - @Schema(example = "FEE", allowableValues = { "FEE", "INTEREST" }) + @Schema(example = "FEE", allowableValues = {"FEE", "INTEREST"}) public String buyDownFeeIncomeType; @Schema(example = "false") public Boolean merchantBuyDownFee; @@ -335,7 +341,8 @@ private PostLoanProductsRequest() {} static final class AllowAttributeOverrides { - private AllowAttributeOverrides() {} + private AllowAttributeOverrides() { + } @Schema(example = "true") public boolean amortizationType; @@ -357,7 +364,8 @@ private AllowAttributeOverrides() {} static final class RateData { - private RateData() {} + private RateData() { + } @Schema(example = "1") public Long id; @@ -377,7 +385,8 @@ private RateData() {} public static final class PostChargeOffReasonToExpenseAccountMappings { - private PostChargeOffReasonToExpenseAccountMappings() {} + private PostChargeOffReasonToExpenseAccountMappings() { + } @Schema(example = "1") public Long chargeOffReasonCodeValueId; @@ -388,7 +397,8 @@ private PostChargeOffReasonToExpenseAccountMappings() {} @Schema(description = "PostWriteOffReasonToExpenseAccountMappings") public static final class PostWriteOffReasonToExpenseAccountMappings { - private PostWriteOffReasonToExpenseAccountMappings() {} + private PostWriteOffReasonToExpenseAccountMappings() { + } @Schema(example = "1") public String writeOffReasonCodeValueId; @@ -398,7 +408,8 @@ private PostWriteOffReasonToExpenseAccountMappings() {} static final class PostClassificationToIncomeAccountMappings { - private PostClassificationToIncomeAccountMappings() {} + private PostClassificationToIncomeAccountMappings() { + } @Schema(example = "1") public Long classificationCodeValueId; @@ -410,7 +421,8 @@ private PostClassificationToIncomeAccountMappings() {} @Schema(description = "PostLoanProductsResponse") public static final class PostLoanProductsResponse { - private PostLoanProductsResponse() {} + private PostLoanProductsResponse() { + } @Schema(example = "3") public Long resourceId; @@ -418,7 +430,8 @@ private PostLoanProductsResponse() {} public static final class GetLoanProductsDaysInMonthType { - private GetLoanProductsDaysInMonthType() {} + private GetLoanProductsDaysInMonthType() { + } @Schema(example = "1") public Long id; @@ -430,7 +443,8 @@ private GetLoanProductsDaysInMonthType() {} public static final class GetLoanProductsDaysInYearType { - private GetLoanProductsDaysInYearType() {} + private GetLoanProductsDaysInYearType() { + } @Schema(example = "1") public Long id; @@ -443,11 +457,13 @@ private GetLoanProductsDaysInYearType() {} @Schema(description = "GetLoanProductsResponse") public static final class GetLoanProductsResponse { - private GetLoanProductsResponse() {} + private GetLoanProductsResponse() { + } static final class GetLoanProductsCurrency { - private GetLoanProductsCurrency() {} + private GetLoanProductsCurrency() { + } @Schema(example = "USD") public String code; @@ -467,7 +483,8 @@ private GetLoanProductsCurrency() {} static final class GetLoanProductsRepaymentFrequencyType { - private GetLoanProductsRepaymentFrequencyType() {} + private GetLoanProductsRepaymentFrequencyType() { + } @Schema(example = "0") public Long id; @@ -479,7 +496,8 @@ private GetLoanProductsRepaymentFrequencyType() {} static final class GetLoanProductsInterestRateFrequencyType { - private GetLoanProductsInterestRateFrequencyType() {} + private GetLoanProductsInterestRateFrequencyType() { + } @Schema(example = "3") public Long id; @@ -491,7 +509,8 @@ private GetLoanProductsInterestRateFrequencyType() {} static final class GetLoanProductsAmortizationType { - private GetLoanProductsAmortizationType() {} + private GetLoanProductsAmortizationType() { + } @Schema(example = "1") public Long id; @@ -503,7 +522,8 @@ private GetLoanProductsAmortizationType() {} static final class GetLoanProductsInterestType { - private GetLoanProductsInterestType() {} + private GetLoanProductsInterestType() { + } @Schema(example = "1") public Long id; @@ -515,7 +535,8 @@ private GetLoanProductsInterestType() {} static final class GetLoansProductsInterestCalculationPeriodType { - private GetLoansProductsInterestCalculationPeriodType() {} + private GetLoansProductsInterestCalculationPeriodType() { + } @Schema(example = "1") public Long id; @@ -527,7 +548,8 @@ private GetLoansProductsInterestCalculationPeriodType() {} static final class GetLoanProductsDaysInYearCustomStrategy { - private GetLoanProductsDaysInYearCustomStrategy() {} + private GetLoanProductsDaysInYearCustomStrategy() { + } @Schema(example = "FULL_LEAP_YEAR") public String id; @@ -539,7 +561,8 @@ private GetLoanProductsDaysInYearCustomStrategy() {} static final class GetLoanProductsRepaymentStartDateType { - private GetLoanProductsRepaymentStartDateType() {} + private GetLoanProductsRepaymentStartDateType() { + } @Schema(example = "1") public Long id; @@ -551,11 +574,13 @@ private GetLoanProductsRepaymentStartDateType() {} static final class GetLoanProductsInterestRecalculationData { - private GetLoanProductsInterestRecalculationData() {} + private GetLoanProductsInterestRecalculationData() { + } static final class GetLoanProductsInterestRecalculationCompoundingType { - private GetLoanProductsInterestRecalculationCompoundingType() {} + private GetLoanProductsInterestRecalculationCompoundingType() { + } @Schema(example = "2") public Long id; @@ -567,7 +592,8 @@ private GetLoanProductsInterestRecalculationCompoundingType() {} static final class GetLoanProductsInterestRecalculationCompoundingFrequencyType { - private GetLoanProductsInterestRecalculationCompoundingFrequencyType() {} + private GetLoanProductsInterestRecalculationCompoundingFrequencyType() { + } @Schema(example = "1") public Long id; @@ -579,7 +605,8 @@ private GetLoanProductsInterestRecalculationCompoundingFrequencyType() {} static final class GetLoanProductsRescheduleStrategyType { - private GetLoanProductsRescheduleStrategyType() {} + private GetLoanProductsRescheduleStrategyType() { + } @Schema(example = "2") public Long id; @@ -591,7 +618,8 @@ private GetLoanProductsRescheduleStrategyType() {} static final class GetLoanProductsPreClosureInterestCalculationStrategy { - private GetLoanProductsPreClosureInterestCalculationStrategy() {} + private GetLoanProductsPreClosureInterestCalculationStrategy() { + } @Schema(example = "1") public Long id; @@ -628,7 +656,8 @@ private GetLoanProductsPreClosureInterestCalculationStrategy() {} static final class GetLoanProductsAccountingRule { - private GetLoanProductsAccountingRule() {} + private GetLoanProductsAccountingRule() { + } @Schema(example = "2") public Long id; @@ -729,11 +758,13 @@ private GetLoanProductsAccountingRule() {} @Schema(description = "GetLoanProductsTemplateResponse") public static final class GetLoanProductsTemplateResponse { - private GetLoanProductsTemplateResponse() {} + private GetLoanProductsTemplateResponse() { + } static final class GetLoanProductsTemplateCurrency { - private GetLoanProductsTemplateCurrency() {} + private GetLoanProductsTemplateCurrency() { + } @Schema(example = "USD") public String code; @@ -753,7 +784,8 @@ private GetLoanProductsTemplateCurrency() {} static final class GetLoanProductsRepaymentTemplateFrequencyType { - private GetLoanProductsRepaymentTemplateFrequencyType() {} + private GetLoanProductsRepaymentTemplateFrequencyType() { + } @Schema(example = "2") public Long id; @@ -765,7 +797,8 @@ private GetLoanProductsRepaymentTemplateFrequencyType() {} static final class GetLoanProductsInterestRateTemplateFrequencyType { - private GetLoanProductsInterestRateTemplateFrequencyType() {} + private GetLoanProductsInterestRateTemplateFrequencyType() { + } @Schema(example = "2") public Long id; @@ -777,7 +810,8 @@ private GetLoanProductsInterestRateTemplateFrequencyType() {} static final class GetLoanProductsInterestTemplateType { - private GetLoanProductsInterestTemplateType() {} + private GetLoanProductsInterestTemplateType() { + } @Schema(example = "0") public Long id; @@ -789,7 +823,8 @@ private GetLoanProductsInterestTemplateType() {} static final class GetLoanProductsAccountingRule { - private GetLoanProductsAccountingRule() {} + private GetLoanProductsAccountingRule() { + } @Schema(example = "1") public Long id; @@ -801,11 +836,13 @@ private GetLoanProductsAccountingRule() {} static final class GetLoanProductsInterestRecalculationTemplateData { - private GetLoanProductsInterestRecalculationTemplateData() {} + private GetLoanProductsInterestRecalculationTemplateData() { + } static final class GetLoanProductsInterestRecalculationCompoundingType { - private GetLoanProductsInterestRecalculationCompoundingType() {} + private GetLoanProductsInterestRecalculationCompoundingType() { + } @Schema(example = "0") public Long id; @@ -817,7 +854,8 @@ private GetLoanProductsInterestRecalculationCompoundingType() {} static final class GetLoanProductsRescheduleStrategyType { - private GetLoanProductsRescheduleStrategyType() {} + private GetLoanProductsRescheduleStrategyType() { + } @Schema(example = "3") public Long id; @@ -834,7 +872,8 @@ private GetLoanProductsRescheduleStrategyType() {} static final class GetLoanProductsPaymentTypeOptions { - private GetLoanProductsPaymentTypeOptions() {} + private GetLoanProductsPaymentTypeOptions() { + } @Schema(example = "10") public Long id; @@ -846,7 +885,8 @@ private GetLoanProductsPaymentTypeOptions() {} static final class GetLoanProductsCurrencyOptions { - private GetLoanProductsCurrencyOptions() {} + private GetLoanProductsCurrencyOptions() { + } @Schema(example = "USD") public String code; @@ -864,7 +904,8 @@ private GetLoanProductsCurrencyOptions() {} static final class GetLoanProductsTransactionProcessingStrategyOptions { - private GetLoanProductsTransactionProcessingStrategyOptions() {} + private GetLoanProductsTransactionProcessingStrategyOptions() { + } @Schema(example = "1") public Long id; @@ -876,11 +917,13 @@ private GetLoanProductsTransactionProcessingStrategyOptions() {} static final class GetLoanProductsChargeOptions { - private GetLoanProductsChargeOptions() {} + private GetLoanProductsChargeOptions() { + } static final class GetLoanChargeTimeType { - private GetLoanChargeTimeType() {} + private GetLoanChargeTimeType() { + } @Schema(example = "1") public Long id; @@ -892,7 +935,8 @@ private GetLoanChargeTimeType() {} static final class GetLoanProductsChargeAppliesTo { - private GetLoanProductsChargeAppliesTo() {} + private GetLoanProductsChargeAppliesTo() { + } @Schema(example = "1 ") public Long id; @@ -904,7 +948,8 @@ private GetLoanProductsChargeAppliesTo() {} static final class GetLoanChargeCalculationType { - private GetLoanChargeCalculationType() {} + private GetLoanChargeCalculationType() { + } @Schema(example = "1") public Long id; @@ -916,7 +961,8 @@ private GetLoanChargeCalculationType() {} static final class GetLoansChargePaymentMode { - private GetLoansChargePaymentMode() {} + private GetLoansChargePaymentMode() { + } @Schema(example = "0") public Long id; @@ -945,15 +991,18 @@ private GetLoansChargePaymentMode() {} static final class GetLoanProductsAccountingMappingOptions { - private GetLoanProductsAccountingMappingOptions() {} + private GetLoanProductsAccountingMappingOptions() { + } static final class GetLoanProductsLiabilityAccountOptions { - private GetLoanProductsLiabilityAccountOptions() {} + private GetLoanProductsLiabilityAccountOptions() { + } static final class GetLoanProductsLiabilityType { - private GetLoanProductsLiabilityType() {} + private GetLoanProductsLiabilityType() { + } @Schema(example = "2") public Long id; @@ -965,7 +1014,8 @@ private GetLoanProductsLiabilityType() {} static final class GetLoanProductsLiabilityUsage { - private GetLoanProductsLiabilityUsage() {} + private GetLoanProductsLiabilityUsage() { + } @Schema(example = "1") public Long id; @@ -977,7 +1027,8 @@ private GetLoanProductsLiabilityUsage() {} static final class GetLoanProductsLiabilityTagId { - private GetLoanProductsLiabilityTagId() {} + private GetLoanProductsLiabilityTagId() { + } @Schema(example = "0") public Long id; @@ -1004,7 +1055,8 @@ private GetLoanProductsLiabilityTagId() {} static final class GetLoanProductsAssetAccountOptions { - private GetLoanProductsAssetAccountOptions() {} + private GetLoanProductsAssetAccountOptions() { + } @Schema(example = "2") public Long id; @@ -1027,11 +1079,13 @@ private GetLoanProductsAssetAccountOptions() {} static final class GetLoanProductsExpenseAccountOptions { - private GetLoanProductsExpenseAccountOptions() {} + private GetLoanProductsExpenseAccountOptions() { + } static final class GetLoanProductsExpenseType { - private GetLoanProductsExpenseType() {} + private GetLoanProductsExpenseType() { + } @Schema(example = "5") public Long id; @@ -1062,11 +1116,13 @@ private GetLoanProductsExpenseType() {} static final class GetLoanProductsIncomeAccountOptions { - private GetLoanProductsIncomeAccountOptions() {} + private GetLoanProductsIncomeAccountOptions() { + } static final class GetLoanProductsIncomeType { - private GetLoanProductsIncomeType() {} + private GetLoanProductsIncomeType() { + } @Schema(example = "4") public Long id; @@ -1103,7 +1159,8 @@ private GetLoanProductsIncomeType() {} static final class GetLoanProductsValueConditionTypeOptions { - private GetLoanProductsValueConditionTypeOptions() {} + private GetLoanProductsValueConditionTypeOptions() { + } @Schema(example = "2") public Long id; @@ -1203,11 +1260,13 @@ private GetLoanProductsValueConditionTypeOptions() {} @Schema(description = "GetLoanProductsProductIdResponse") public static final class GetLoanProductsProductIdResponse { - private GetLoanProductsProductIdResponse() {} + private GetLoanProductsProductIdResponse() { + } static final class GetLoanProductsInterestRateFrequencyType { - private GetLoanProductsInterestRateFrequencyType() {} + private GetLoanProductsInterestRateFrequencyType() { + } @Schema(example = "2") public Long id; @@ -1219,7 +1278,8 @@ private GetLoanProductsInterestRateFrequencyType() {} static final class GetLoanProductsRepaymentStartDateType { - private GetLoanProductsRepaymentStartDateType() {} + private GetLoanProductsRepaymentStartDateType() { + } @Schema(example = "1") public Long id; @@ -1231,11 +1291,13 @@ private GetLoanProductsRepaymentStartDateType() {} static final class GetLoanProductsPrincipalVariationsForBorrowerCycle { - private GetLoanProductsPrincipalVariationsForBorrowerCycle() {} + private GetLoanProductsPrincipalVariationsForBorrowerCycle() { + } static final class GetLoanProductsParamType { - private GetLoanProductsParamType() {} + private GetLoanProductsParamType() { + } @Schema(example = "1") public Long id; @@ -1247,7 +1309,8 @@ private GetLoanProductsParamType() {} static final class GetLoanProductsValueConditionType { - private GetLoanProductsValueConditionType() {} + private GetLoanProductsValueConditionType() { + } @Schema(example = "2") public Long id; @@ -1273,11 +1336,13 @@ private GetLoanProductsValueConditionType() {} static final class GetLoanAccountingMappings { - private GetLoanAccountingMappings() {} + private GetLoanAccountingMappings() { + } static final class GetGlAccountMapping { - private GetGlAccountMapping() {} + private GetGlAccountMapping() { + } @Schema(example = "10") public Long id; @@ -1316,7 +1381,8 @@ private GetGlAccountMapping() {} static final class GetLoanPaymentChannelToFundSourceMappings { - private GetLoanPaymentChannelToFundSourceMappings() {} + private GetLoanPaymentChannelToFundSourceMappings() { + } @Schema(example = "10") public Long paymentTypeId; @@ -1326,7 +1392,8 @@ private GetLoanPaymentChannelToFundSourceMappings() {} static final class GetGLAccountData { - private GetGLAccountData() {} + private GetGLAccountData() { + } @Schema(example = "1") public Long id; @@ -1338,7 +1405,8 @@ private GetGLAccountData() {} static final class GetClassificationToIncomeAccountMappings { - private GetClassificationToIncomeAccountMappings() {} + private GetClassificationToIncomeAccountMappings() { + } public GetCodeValuesDataResponse classificationCodeValue; public GetGLAccountData incomeAccount; @@ -1346,7 +1414,8 @@ private GetClassificationToIncomeAccountMappings() {} static final class GetChargeOffReasonToExpenseAccountMappings { - private GetChargeOffReasonToExpenseAccountMappings() {} + private GetChargeOffReasonToExpenseAccountMappings() { + } public GetCodeValuesDataResponse reasonCodeValue; public GetGLAccountData expenseAccount; @@ -1355,11 +1424,13 @@ private GetChargeOffReasonToExpenseAccountMappings() {} static final class GetLoanFeeToIncomeAccountMappings { - private GetLoanFeeToIncomeAccountMappings() {} + private GetLoanFeeToIncomeAccountMappings() { + } static final class GetLoanCharge { - private GetLoanCharge() {} + private GetLoanCharge() { + } @Schema(example = "1") public Long id; @@ -1382,7 +1453,8 @@ private GetLoanCharge() {} @Schema(description = "GetWriteOffReasonToExpenseAccountMappings") public static final class GetWriteOffReasonToExpenseAccountMappings { - private GetWriteOffReasonToExpenseAccountMappings() {} + private GetWriteOffReasonToExpenseAccountMappings() { + } @Schema(example = "1") public String writeOffReasonCodeValueId; @@ -1563,7 +1635,8 @@ private GetWriteOffReasonToExpenseAccountMappings() {} @Schema(description = "PutLoanProductsProductIdRequest") public static final class PutLoanProductsProductIdRequest { - private PutLoanProductsProductIdRequest() {} + private PutLoanProductsProductIdRequest() { + } @Schema(example = "LP Accrual Accounting") public String name; @@ -1832,7 +1905,7 @@ private PutLoanProductsProductIdRequest() {} public String capitalizedIncomeCalculationType; @Schema(example = "EQUAL_AMORTIZATION", allowableValues = "EQUAL_AMORTIZATION") public String capitalizedIncomeStrategy; - @Schema(example = "FEE", allowableValues = { "FEE", "INTEREST" }) + @Schema(example = "FEE", allowableValues = {"FEE", "INTEREST"}) public String capitalizedIncomeType; @Schema(example = "false") public Boolean enableBuyDownFee; @@ -1840,7 +1913,7 @@ private PutLoanProductsProductIdRequest() {} public String buyDownFeeCalculationType; @Schema(example = "EQUAL_AMORTIZATION", allowableValues = "EQUAL_AMORTIZATION") public String buyDownFeeStrategy; - @Schema(example = "FEE", allowableValues = { "FEE", "INTEREST" }) + @Schema(example = "FEE", allowableValues = {"FEE", "INTEREST"}) public String buyDownFeeIncomeType; @Schema(example = "false") public Boolean merchantBuyDownFee; @@ -1886,11 +1959,13 @@ public static class CreditAllocationOrder { @Schema(description = "PutLoanProductsProductIdResponse") public static final class PutLoanProductsProductIdResponse { - private PutLoanProductsProductIdResponse() {} + private PutLoanProductsProductIdResponse() { + } static final class PutLoanChanges { - private PutLoanChanges() {} + private PutLoanChanges() { + } @Schema(example = "70,000.00") public Double principal; @@ -1906,7 +1981,8 @@ private PutLoanChanges() {} @Schema(description = "GetLoanProductsChargeOffReasonOptions") public static final class GetLoanProductsChargeOffReasonOptions { - private GetLoanProductsChargeOffReasonOptions() {} + private GetLoanProductsChargeOffReasonOptions() { + } @Schema(example = "2") public Long id; @@ -1925,7 +2001,8 @@ private GetLoanProductsChargeOffReasonOptions() {} @Schema(description = "GetLoanProductsWriteOffReasonOptions") public static final class GetLoanProductsWriteOffReasonOptions { - private GetLoanProductsWriteOffReasonOptions() {} + private GetLoanProductsWriteOffReasonOptions() { + } @Schema(example = "2") public Long id; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/AdvancedPaymentData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/AdvancedPaymentData.java index 6da91b31923..ebaccc34b95 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/AdvancedPaymentData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/AdvancedPaymentData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/CreditAllocationData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/CreditAllocationData.java index 917c818e188..e6bf650a3b2 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/CreditAllocationData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/CreditAllocationData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanConfigurationDetails.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanConfigurationDetails.java index 3fdede017f0..52260b4b16e 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanConfigurationDetails.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanConfigurationDetails.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanproduct.data; import java.math.BigDecimal; + import lombok.Getter; import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.portfolio.common.domain.DaysInMonthType; @@ -65,15 +66,15 @@ public class LoanConfigurationDetails implements ILoanConfigurationDetails { private final LoanScheduleProcessingType loanScheduleProcessingType; public LoanConfigurationDetails(CurrencyData currency, BigDecimal interestRatePerPeriod, BigDecimal annualNominalInterestRate, - Integer interestChargingGrace, Integer interestPaymentGrace, Integer principalGrace, - Integer recurringMoratoriumOnPrincipalPeriods, InterestMethod interestMethod, - InterestCalculationPeriodMethod interestCalculationPeriodMethod, DaysInYearType daysInYearType, DaysInMonthType daysInMonthType, - AmortizationMethod amortizationMethod, PeriodFrequencyType repaymentPeriodFrequencyType, Integer repaymentEvery, - Integer numberOfRepayments, boolean interestRecognitionOnDisbursementDate, - DaysInYearCustomStrategyType daysInYearCustomStrategy, boolean allowPartialPeriodInterestCalculation, - boolean isInterestRecalculationEnabled, RecalculationFrequencyType restFrequencyType, - LoanPreCloseInterestCalculationStrategy preCloseInterestCalculationStrategy, boolean allowFullTermForTranche, - LoanScheduleProcessingType loanScheduleProcessingType) { + Integer interestChargingGrace, Integer interestPaymentGrace, Integer principalGrace, + Integer recurringMoratoriumOnPrincipalPeriods, InterestMethod interestMethod, + InterestCalculationPeriodMethod interestCalculationPeriodMethod, DaysInYearType daysInYearType, DaysInMonthType daysInMonthType, + AmortizationMethod amortizationMethod, PeriodFrequencyType repaymentPeriodFrequencyType, Integer repaymentEvery, + Integer numberOfRepayments, boolean interestRecognitionOnDisbursementDate, + DaysInYearCustomStrategyType daysInYearCustomStrategy, boolean allowPartialPeriodInterestCalculation, + boolean isInterestRecalculationEnabled, RecalculationFrequencyType restFrequencyType, + LoanPreCloseInterestCalculationStrategy preCloseInterestCalculationStrategy, boolean allowFullTermForTranche, + LoanScheduleProcessingType loanScheduleProcessingType) { this.currency = currency; this.interestRatePerPeriod = interestRatePerPeriod; this.annualNominalInterestRate = annualNominalInterestRate; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanOverdueDTO.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanOverdueDTO.java index 177c3285bc8..c2feee68368 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanOverdueDTO.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanOverdueDTO.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanproduct.data; import java.time.LocalDate; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; public class LoanOverdueDTO { @@ -29,7 +30,7 @@ public class LoanOverdueDTO { private final LocalDate lastChargeAppliedDate; public LoanOverdueDTO(final Loan loan, final boolean runInterestRecalculation, final LocalDate recalculateFrom, - final LocalDate lastChargeAppliedDate) { + final LocalDate lastChargeAppliedDate) { this.loan = loan; this.runInterestRecalculation = runInterestRecalculation; this.recalculateFrom = recalculateFrom; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductBasicDetailsData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductBasicDetailsData.java index b5b7c83aaa1..cbfac358bff 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductBasicDetailsData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductBasicDetailsData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductBorrowerCycleVariationData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductBorrowerCycleVariationData.java index 04ae7c21a31..3dbfccbaed5 100755 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductBorrowerCycleVariationData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductBorrowerCycleVariationData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.math.BigDecimal; + import lombok.Getter; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.loanproduct.domain.LoanProductParamType; @@ -37,7 +38,7 @@ public class LoanProductBorrowerCycleVariationData implements Serializable { private final BigDecimal defaultValue; public LoanProductBorrowerCycleVariationData(final Long id, final Integer borrowerCycleNumber, final EnumOptionData paramType, - final EnumOptionData valueConditionType, final BigDecimal defaultValue, final BigDecimal minValue, final BigDecimal maxValue) { + final EnumOptionData valueConditionType, final BigDecimal defaultValue, final BigDecimal minValue, final BigDecimal maxValue) { this.id = id; this.borrowerCycleNumber = borrowerCycleNumber; this.paramType = paramType; 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..49667dc256a 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 @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanproduct.data; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDate; @@ -26,6 +27,7 @@ import java.util.Collection; import java.util.List; import java.util.Map; + import lombok.Getter; import org.apache.fineract.accounting.common.AccountingEnumerations; import org.apache.fineract.accounting.common.AccountingRuleType; @@ -702,10 +704,10 @@ public static LoanProductData sensibleDefaultsForNewLoanProductCreation() { } public static LoanProductData loanProductWithFloatingRates(final Long id, final String name, - final boolean isLinkedToFloatingInterestRates, final Integer floatingRateId, final String floatingRateName, - final BigDecimal interestRateDifferential, final BigDecimal minDifferentialLendingRate, - final BigDecimal defaultDifferentialLendingRate, final BigDecimal maxDifferentialLendingRate, - final boolean isFloatingInterestRateCalculationAllowed) { + final boolean isLinkedToFloatingInterestRates, final Integer floatingRateId, final String floatingRateName, + final BigDecimal interestRateDifferential, final BigDecimal minDifferentialLendingRate, + final BigDecimal defaultDifferentialLendingRate, final BigDecimal maxDifferentialLendingRate, + final boolean isFloatingInterestRateCalculationAllowed) { final String shortName = null; final String description = null; final CurrencyData currency = CurrencyData.blank(); @@ -843,13 +845,13 @@ public static LoanProductData loanProductWithFloatingRates(final Long id, final } public static LoanProductData withAccountingDetails(final LoanProductData productData, final Map accountingMappings, - final Collection paymentChannelToFundSourceMappings, - final Collection feeToGLAccountMappings, - final Collection penaltyToGLAccountMappings, - final List chargeOffReasonToGLAccountMappings, - final List writeOffReasonToGLAccountMappings, - final List capitalizedIncomeClassificationToIncomeAccountMappings, - final List buydownFeeClassificationToIncomeAccountMappings) { + final Collection paymentChannelToFundSourceMappings, + final Collection feeToGLAccountMappings, + final Collection penaltyToGLAccountMappings, + final List chargeOffReasonToGLAccountMappings, + final List writeOffReasonToGLAccountMappings, + final List capitalizedIncomeClassificationToIncomeAccountMappings, + final List buydownFeeClassificationToIncomeAccountMappings) { productData.accountingMappings = accountingMappings; productData.paymentChannelToFundSourceMappings = paymentChannelToFundSourceMappings; productData.feeToIncomeAccountMappings = feeToGLAccountMappings; @@ -862,51 +864,51 @@ public static LoanProductData withAccountingDetails(final LoanProductData produc } public LoanProductData(final Long id, final String name, final String shortName, final String description, final CurrencyData currency, - final BigDecimal principal, final BigDecimal minPrincipal, final BigDecimal maxPrincipal, final BigDecimal tolerance, - final Integer numberOfRepayments, final Integer minNumberOfRepayments, final Integer maxNumberOfRepayments, - final Integer repaymentEvery, final BigDecimal interestRatePerPeriod, final BigDecimal minInterestRatePerPeriod, - final BigDecimal maxInterestRatePerPeriod, final BigDecimal annualInterestRate, final EnumOptionData repaymentFrequencyType, - final EnumOptionData interestRateFrequencyType, final EnumOptionData amortizationType, final EnumOptionData interestType, - final EnumOptionData interestCalculationPeriodType, final Boolean allowPartialPeriodInterestCalculation, final Long fundId, - final String fundName, final String transactionProcessingStrategyCode, final String transactionProcessingStrategyName, - final Integer graceOnPrincipalPayment, final Integer recurringMoratoriumOnPrincipalPeriods, - final Integer graceOnInterestPayment, final Integer graceOnInterestCharged, final Collection charges, - final EnumOptionData accountingType, final boolean includeInBorrowerCycle, boolean useBorrowerCycle, final LocalDate startDate, - final LocalDate closeDate, final String status, final String externalId, - Collection principalVariations, - Collection interestRateVariations, - 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 overdueDaysForNPA, final EnumOptionData daysInMonthType, final EnumOptionData daysInYearType, - final boolean isInterestRecalculationEnabled, final LoanProductInterestRecalculationData interestRecalculationData, - final Integer minimumDaysBetweenDisbursalAndFirstRepayment, boolean holdGuaranteeFunds, - final LoanProductGuaranteeData loanProductGuaranteeData, final BigDecimal principalThresholdForLastInstallment, - final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion, boolean canDefineInstallmentAmount, - Integer installmentAmountInMultiplesOf, LoanProductConfigurableAttributes allowAttributeOverrides, - boolean isLinkedToFloatingInterestRates, Integer floatingRateId, String floatingRateName, BigDecimal interestRateDifferential, - BigDecimal minDifferentialLendingRate, BigDecimal defaultDifferentialLendingRate, BigDecimal maxDifferentialLendingRate, - boolean isFloatingInterestRateCalculationAllowed, final boolean isVariableInstallmentsAllowed, - final Integer minimumGapBetweenInstallments, final Integer maximumGapBetweenInstallments, - final boolean syncExpectedWithDisbursementDate, final boolean canUseForTopup, final boolean isEqualAmortization, - Collection rateOptions, Collection rates, final boolean isRatesEnabled, - final BigDecimal fixedPrincipalPercentagePerInstallment, final Collection delinquencyBucketOptions, - final DelinquencyBucketData delinquencyBucket, final Integer dueDaysForRepaymentEvent, - final Integer overDueDaysForRepaymentEvent, final boolean enableDownPayment, - final BigDecimal disbursedAmountPercentageForDownPayment, final boolean enableAutoRepaymentForDownPayment, - final Collection paymentAllocation, final Collection creditAllocation, - final EnumOptionData repaymentStartDateType, final boolean enableInstallmentLevelDelinquency, - final EnumOptionData loanScheduleType, final EnumOptionData loanScheduleProcessingType, final Integer fixedLength, - final boolean enableAccrualActivityPosting, final List supportedInterestRefundTypes, - StringEnumOptionData chargeOffBehaviour, final boolean interestRecognitionOnDisbursementDate, - final StringEnumOptionData daysInYearCustomStrategy, final boolean enableIncomeCapitalization, - final StringEnumOptionData capitalizedIncomeCalculationType, final StringEnumOptionData capitalizedIncomeStrategy, - final StringEnumOptionData capitalizedIncomeType, final boolean enableBuyDownFee, - final StringEnumOptionData buyDownFeeCalculationType, final StringEnumOptionData buyDownFeeStrategy, - final StringEnumOptionData buyDownFeeIncomeType, final boolean merchantBuyDownFee, - final List writeOffReasonsToExpenseMappings, - final List writeOffReasonOptions) { + final BigDecimal principal, final BigDecimal minPrincipal, final BigDecimal maxPrincipal, final BigDecimal tolerance, + final Integer numberOfRepayments, final Integer minNumberOfRepayments, final Integer maxNumberOfRepayments, + final Integer repaymentEvery, final BigDecimal interestRatePerPeriod, final BigDecimal minInterestRatePerPeriod, + final BigDecimal maxInterestRatePerPeriod, final BigDecimal annualInterestRate, final EnumOptionData repaymentFrequencyType, + final EnumOptionData interestRateFrequencyType, final EnumOptionData amortizationType, final EnumOptionData interestType, + final EnumOptionData interestCalculationPeriodType, final Boolean allowPartialPeriodInterestCalculation, final Long fundId, + final String fundName, final String transactionProcessingStrategyCode, final String transactionProcessingStrategyName, + final Integer graceOnPrincipalPayment, final Integer recurringMoratoriumOnPrincipalPeriods, + final Integer graceOnInterestPayment, final Integer graceOnInterestCharged, final Collection charges, + final EnumOptionData accountingType, final boolean includeInBorrowerCycle, boolean useBorrowerCycle, final LocalDate startDate, + final LocalDate closeDate, final String status, final String externalId, + Collection principalVariations, + Collection interestRateVariations, + 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 overdueDaysForNPA, final EnumOptionData daysInMonthType, final EnumOptionData daysInYearType, + final boolean isInterestRecalculationEnabled, final LoanProductInterestRecalculationData interestRecalculationData, + final Integer minimumDaysBetweenDisbursalAndFirstRepayment, boolean holdGuaranteeFunds, + final LoanProductGuaranteeData loanProductGuaranteeData, final BigDecimal principalThresholdForLastInstallment, + final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion, boolean canDefineInstallmentAmount, + Integer installmentAmountInMultiplesOf, LoanProductConfigurableAttributes allowAttributeOverrides, + boolean isLinkedToFloatingInterestRates, Integer floatingRateId, String floatingRateName, BigDecimal interestRateDifferential, + BigDecimal minDifferentialLendingRate, BigDecimal defaultDifferentialLendingRate, BigDecimal maxDifferentialLendingRate, + boolean isFloatingInterestRateCalculationAllowed, final boolean isVariableInstallmentsAllowed, + final Integer minimumGapBetweenInstallments, final Integer maximumGapBetweenInstallments, + final boolean syncExpectedWithDisbursementDate, final boolean canUseForTopup, final boolean isEqualAmortization, + Collection rateOptions, Collection rates, final boolean isRatesEnabled, + final BigDecimal fixedPrincipalPercentagePerInstallment, final Collection delinquencyBucketOptions, + final DelinquencyBucketData delinquencyBucket, final Integer dueDaysForRepaymentEvent, + final Integer overDueDaysForRepaymentEvent, final boolean enableDownPayment, + final BigDecimal disbursedAmountPercentageForDownPayment, final boolean enableAutoRepaymentForDownPayment, + final Collection paymentAllocation, final Collection creditAllocation, + final EnumOptionData repaymentStartDateType, final boolean enableInstallmentLevelDelinquency, + final EnumOptionData loanScheduleType, final EnumOptionData loanScheduleProcessingType, final Integer fixedLength, + final boolean enableAccrualActivityPosting, final List supportedInterestRefundTypes, + StringEnumOptionData chargeOffBehaviour, final boolean interestRecognitionOnDisbursementDate, + final StringEnumOptionData daysInYearCustomStrategy, final boolean enableIncomeCapitalization, + final StringEnumOptionData capitalizedIncomeCalculationType, final StringEnumOptionData capitalizedIncomeStrategy, + final StringEnumOptionData capitalizedIncomeType, final boolean enableBuyDownFee, + final StringEnumOptionData buyDownFeeCalculationType, final StringEnumOptionData buyDownFeeStrategy, + final StringEnumOptionData buyDownFeeIncomeType, final boolean merchantBuyDownFee, + final List writeOffReasonsToExpenseMappings, + final List writeOffReasonOptions) { this.id = id; this.name = name; this.shortName = shortName; @@ -1079,34 +1081,34 @@ public LoanProductData(final Long id, final String name, final String shortName, } public LoanProductData(final LoanProductData productData, final Collection chargeOptions, - final Collection penaltyOptions, final Collection paymentTypeOptions, - final Collection currencyOptions, final List amortizationTypeOptions, - final List interestTypeOptions, final List interestCalculationPeriodTypeOptions, - final List repaymentFrequencyTypeOptions, final List interestRateFrequencyTypeOptions, - final Collection fundOptions, final Collection transactionStrategyOptions, - final Collection rateOptions, final Map> accountingMappingOptions, - final List accountingRuleOptions, final List valueConditionTypeOptions, - final List daysInMonthTypeOptions, final List daysInYearTypeOptions, - final List interestRecalculationCompoundingTypeOptions, - final List rescheduleStrategyTypeOptions, final List interestRecalculationFrequencyTypeOptions, - final List preCloseInterestCalculationStrategyOptions, final List floatingRateOptions, - final List interestRecalculationNthDayTypeOptions, - final List interestRecalculationDayOfWeekTypeOptions, final boolean isRatesEnabled, - final Collection delinquencyBucketOptions, final List repaymentStartDateTypeOptions, - final List advancedPaymentAllocationTransactionTypes, - final List advancedPaymentAllocationFutureInstallmentAllocationRules, - final List advancedPaymentAllocationTypes, final List loanScheduleTypeOptions, - final List loanScheduleProcessingTypeOptions, final List creditAllocationTransactionTypes, - final List creditAllocationAllocationTypes, - final List supportedInterestRefundTypesOptions, - final List chargeOffBehaviourOptions, final List chargeOffReasonOptions, - final List daysInYearCustomStrategyOptions, - final List capitalizedIncomeCalculationTypeOptions, - final List capitalizedIncomeStrategyOptions, - final List capitalizedIncomeTypeOptions, - final List buyDownFeeCalculationTypeOptions, final List buyDownFeeStrategyOptions, - final List buyDownFeeIncomeTypeOptions, final List writeOffReasonOptions, - final List capitalizedIncomeClassificationOptions, final List buydownFeeClassificationOptions) { + final Collection penaltyOptions, final Collection paymentTypeOptions, + final Collection currencyOptions, final List amortizationTypeOptions, + final List interestTypeOptions, final List interestCalculationPeriodTypeOptions, + final List repaymentFrequencyTypeOptions, final List interestRateFrequencyTypeOptions, + final Collection fundOptions, final Collection transactionStrategyOptions, + final Collection rateOptions, final Map> accountingMappingOptions, + final List accountingRuleOptions, final List valueConditionTypeOptions, + final List daysInMonthTypeOptions, final List daysInYearTypeOptions, + final List interestRecalculationCompoundingTypeOptions, + final List rescheduleStrategyTypeOptions, final List interestRecalculationFrequencyTypeOptions, + final List preCloseInterestCalculationStrategyOptions, final List floatingRateOptions, + final List interestRecalculationNthDayTypeOptions, + final List interestRecalculationDayOfWeekTypeOptions, final boolean isRatesEnabled, + final Collection delinquencyBucketOptions, final List repaymentStartDateTypeOptions, + final List advancedPaymentAllocationTransactionTypes, + final List advancedPaymentAllocationFutureInstallmentAllocationRules, + final List advancedPaymentAllocationTypes, final List loanScheduleTypeOptions, + final List loanScheduleProcessingTypeOptions, final List creditAllocationTransactionTypes, + final List creditAllocationAllocationTypes, + final List supportedInterestRefundTypesOptions, + final List chargeOffBehaviourOptions, final List chargeOffReasonOptions, + final List daysInYearCustomStrategyOptions, + final List capitalizedIncomeCalculationTypeOptions, + final List capitalizedIncomeStrategyOptions, + final List capitalizedIncomeTypeOptions, + final List buyDownFeeCalculationTypeOptions, final List buyDownFeeStrategyOptions, + final List buyDownFeeIncomeTypeOptions, final List writeOffReasonOptions, + final List capitalizedIncomeClassificationOptions, final List buydownFeeClassificationOptions) { this.id = productData.id; this.name = productData.name; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductGuaranteeData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductGuaranteeData.java index 32fb610e774..a31079c4cba 100755 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductGuaranteeData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductGuaranteeData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.math.BigDecimal; + import lombok.Getter; import lombok.RequiredArgsConstructor; @@ -34,7 +35,7 @@ public final class LoanProductGuaranteeData implements Serializable { private final BigDecimal minimumGuaranteeFromGuarantor; public static LoanProductGuaranteeData instance(final Long id, final Long productId, final BigDecimal mandatoryGuarantee, - final BigDecimal minimumGuaranteeFromOwnFunds, final BigDecimal minimumGuaranteeFromGuarantor) { + final BigDecimal minimumGuaranteeFromOwnFunds, final BigDecimal minimumGuaranteeFromGuarantor) { return new LoanProductGuaranteeData(id, productId, mandatoryGuarantee, minimumGuaranteeFromOwnFunds, minimumGuaranteeFromGuarantor); } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductInterestRecalculationData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductInterestRecalculationData.java index 478cc47c1a1..3990280e752 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductInterestRecalculationData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/LoanProductInterestRecalculationData.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import static org.apache.fineract.portfolio.loanproduct.service.LoanEnumerations.rescheduleStrategyType; import java.io.Serializable; + import lombok.Getter; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.loanproduct.domain.InterestRecalculationCompoundingMethod; @@ -53,15 +54,15 @@ public class LoanProductInterestRecalculationData implements Serializable { private final Boolean disallowInterestCalculationOnPastDue; public LoanProductInterestRecalculationData(final Long id, final Long productId, - final EnumOptionData interestRecalculationCompoundingType, final EnumOptionData rescheduleStrategyType, - final EnumOptionData recalculationRestFrequencyType, final Integer recalculationRestFrequencyInterval, - final EnumOptionData recalculationRestFrequencyNthDay, final EnumOptionData recalculationRestFrequencyWeekday, - final Integer recalculationRestFrequencyOnDay, final EnumOptionData recalculationCompoundingFrequencyType, - final Integer recalculationCompoundingFrequencyInterval, final EnumOptionData recalculationCompoundingFrequencyNthDay, - final EnumOptionData recalculationCompoundingFrequencyWeekday, final Integer recalculationCompoundingFrequencyOnDay, - final boolean isArrearsBasedOnOriginalSchedule, boolean isCompoundingToBePostedAsTransaction, - final EnumOptionData preCloseInterestCalculationStrategy, final boolean allowCompoundingOnEod, - final Boolean disallowInterestCalculationOnPastDue) { + final EnumOptionData interestRecalculationCompoundingType, final EnumOptionData rescheduleStrategyType, + final EnumOptionData recalculationRestFrequencyType, final Integer recalculationRestFrequencyInterval, + final EnumOptionData recalculationRestFrequencyNthDay, final EnumOptionData recalculationRestFrequencyWeekday, + final Integer recalculationRestFrequencyOnDay, final EnumOptionData recalculationCompoundingFrequencyType, + final Integer recalculationCompoundingFrequencyInterval, final EnumOptionData recalculationCompoundingFrequencyNthDay, + final EnumOptionData recalculationCompoundingFrequencyWeekday, final Integer recalculationCompoundingFrequencyOnDay, + final boolean isArrearsBasedOnOriginalSchedule, boolean isCompoundingToBePostedAsTransaction, + final EnumOptionData preCloseInterestCalculationStrategy, final boolean allowCompoundingOnEod, + final Boolean disallowInterestCalculationOnPastDue) { this.id = id; this.productId = productId; this.interestRecalculationCompoundingType = interestRecalculationCompoundingType; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/TransactionProcessingStrategyData.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/TransactionProcessingStrategyData.java index 479983b958c..fcad9044e18 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/TransactionProcessingStrategyData.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/data/TransactionProcessingStrategyData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanproduct.data; import java.io.Serializable; + import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AllocationType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AllocationType.java index ff27ecad76b..4f02bfeceb2 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AllocationType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AllocationType.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AllocationTypeListConverter.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AllocationTypeListConverter.java index 7659ea36d0d..9a8cff9ec69 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AllocationTypeListConverter.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AllocationTypeListConverter.java @@ -6,9 +6,9 @@ * 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 @@ -20,7 +20,9 @@ import jakarta.persistence.AttributeConverter; import jakarta.persistence.Converter; + import java.util.List; + import org.apache.fineract.infrastructure.core.data.GenericEnumListConverter; @Converter(autoApply = true) diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AmortizationMethod.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AmortizationMethod.java index c07f59a9304..ac1008cca60 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AmortizationMethod.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AmortizationMethod.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationTransactionType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationTransactionType.java index 5186808704a..f4bb8d08b2c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationTransactionType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationTransactionType.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.portfolio.loanproduct.domain; // TODO FINERACT-1932-Fineract modularization: Move to fineract-progressive-loan module after refactor of Loan and LoanProduct classes + import java.util.Arrays; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/DueType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/DueType.java index 493f6e6e8cb..cfc4874b7fd 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/DueType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/DueType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/FutureInstallmentAllocationRule.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/FutureInstallmentAllocationRule.java index 806c67478f1..3c434c912dd 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/FutureInstallmentAllocationRule.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/FutureInstallmentAllocationRule.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.portfolio.loanproduct.domain; // TODO FINERACT-1932-Fineract modularization: Move to fineract-progressive-loan module after refactor of Loan and LoanProduct classes + import java.util.Arrays; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/ILoanConfigurationDetails.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/ILoanConfigurationDetails.java index 79fe75bc9e5..e66060b94b3 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/ILoanConfigurationDetails.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/ILoanConfigurationDetails.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanproduct.domain; import java.math.BigDecimal; + import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.portfolio.common.domain.DaysInYearCustomStrategyType; import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestCalculationPeriodMethod.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestCalculationPeriodMethod.java index 1e5ed160c59..09130f11717 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestCalculationPeriodMethod.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestCalculationPeriodMethod.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestMethod.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestMethod.java index 407f7fcc38e..3fa99c160d9 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestMethod.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestMethod.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestRecalculationCompoundingMethod.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestRecalculationCompoundingMethod.java index c6e7725158b..0c50cb9909c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestRecalculationCompoundingMethod.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestRecalculationCompoundingMethod.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestRecalculationPeriodMethod.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestRecalculationPeriodMethod.java index 4561bef7493..6a717106edf 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestRecalculationPeriodMethod.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/InterestRecalculationPeriodMethod.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LendingStrategy.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LendingStrategy.java index e78784c6588..2ed57bce4e8 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LendingStrategy.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LendingStrategy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanPreCloseInterestCalculationStrategy.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanPreCloseInterestCalculationStrategy.java index fb653f8ed23..df3df144743 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanPreCloseInterestCalculationStrategy.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanPreCloseInterestCalculationStrategy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProduct.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProduct.java index 9f79209630b..93a559b2b43 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProduct.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProduct.java @@ -6,9 +6,9 @@ * 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 @@ -31,6 +31,7 @@ import jakarta.persistence.OneToOne; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; @@ -41,6 +42,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.Getter; import lombok.Setter; import org.apache.commons.lang3.StringUtils; @@ -83,9 +85,9 @@ @Entity @Getter @Setter -@Table(name = "m_product_loan", uniqueConstraints = { @UniqueConstraint(columnNames = { "name" }, name = "unq_name"), - @UniqueConstraint(columnNames = { "external_id" }, name = "external_id_UNIQUE"), - @UniqueConstraint(columnNames = { "short_name" }, name = "unq_short_name") }) +@Table(name = "m_product_loan", uniqueConstraints = {@UniqueConstraint(columnNames = {"name"}, name = "unq_name"), + @UniqueConstraint(columnNames = {"external_id"}, name = "external_id_UNIQUE"), + @UniqueConstraint(columnNames = {"short_name"}, name = "unq_short_name")}) public class LoanProduct extends AbstractPersistableCustom { @ManyToOne @@ -246,49 +248,49 @@ public LoanProduct() { } public LoanProduct(final Fund fund, final String transactionProcessingStrategyCode, - final List paymentAllocationRules, - final List creditAllocationRules, final String name, final String shortName, - final String description, final MonetaryCurrency currency, final BigDecimal defaultPrincipal, - final BigDecimal defaultMinPrincipal, final BigDecimal defaultMaxPrincipal, - final BigDecimal defaultNominalInterestRatePerPeriod, final BigDecimal defaultMinNominalInterestRatePerPeriod, - final BigDecimal defaultMaxNominalInterestRatePerPeriod, final PeriodFrequencyType interestPeriodFrequencyType, - final BigDecimal defaultAnnualNominalInterestRate, final InterestMethod interestMethod, - final InterestCalculationPeriodMethod interestCalculationPeriodMethod, final boolean considerPartialPeriodInterest, - final Integer repayEvery, final PeriodFrequencyType repaymentFrequencyType, final Integer defaultNumberOfInstallments, - final Integer defaultMinNumberOfInstallments, final Integer defaultMaxNumberOfInstallments, - final Integer graceOnPrincipalPayment, final Integer recurringMoratoriumOnPrincipalPeriods, - final Integer graceOnInterestPayment, final Integer graceOnInterestCharged, final AmortizationMethod amortizationMethod, - final BigDecimal inArrearsTolerance, final List charges, final AccountingRuleType accountingRuleType, - final boolean includeInBorrowerCycle, final LocalDate startDate, final LocalDate closeDate, final ExternalId externalId, - final boolean useBorrowerCycle, final Set loanProductBorrowerCycleVariations, - final boolean multiDisburseLoan, final Integer maxTrancheCount, final BigDecimal outstandingLoanBalance, - final Integer graceOnArrearsAgeing, final Integer overdueDaysForNPA, final DaysInMonthType daysInMonthType, - final DaysInYearType daysInYearType, final boolean isInterestRecalculationEnabled, - final LoanProductInterestRecalculationDetails productInterestRecalculationDetails, - final Integer minimumDaysBetweenDisbursalAndFirstRepayment, final boolean holdGuarantorFunds, - final LoanProductGuaranteeDetails loanProductGuaranteeDetails, final BigDecimal principalThresholdForLastInstallment, - final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion, final boolean canDefineEmiAmount, - final Integer installmentAmountInMultiplesOf, final LoanProductConfigurableAttributes loanProductConfigurableAttributes, - Boolean isLinkedToFloatingInterestRates, FloatingRate floatingRate, BigDecimal interestRateDifferential, - BigDecimal minDifferentialLendingRate, BigDecimal maxDifferentialLendingRate, BigDecimal defaultDifferentialLendingRate, - Boolean isFloatingInterestRateCalculationAllowed, final Boolean isVariableInstallmentsAllowed, - final Integer minimumGapBetweenInstallments, final Integer maximumGapBetweenInstallments, - final boolean syncExpectedWithDisbursementDate, final boolean canUseForTopup, final boolean isEqualAmortization, - final List rates, final BigDecimal fixedPrincipalPercentagePerInstallment, final boolean disallowExpectedDisbursements, - final boolean allowApprovedDisbursedAmountsOverApplied, final String overAppliedCalculationType, - final Integer overAppliedNumber, final Integer dueDaysForRepaymentEvent, final Integer overDueDaysForRepaymentEvent, - final boolean enableDownPayment, final BigDecimal disbursedAmountPercentageForDownPayment, - final boolean enableAutoRepaymentForDownPayment, final RepaymentStartDateType repaymentStartDateType, - final boolean enableInstallmentLevelDelinquency, final LoanScheduleType loanScheduleType, - final LoanScheduleProcessingType loanScheduleProcessingType, final Integer fixedLength, - final boolean enableAccrualActivityPosting, final List supportedInterestRefundTypes, - final LoanChargeOffBehaviour chargeOffBehaviour, final boolean isInterestRecognitionOnDisbursementDate, - final DaysInYearCustomStrategyType daysInYearCustomStrategy, final boolean enableIncomeCapitalization, - final LoanCapitalizedIncomeCalculationType capitalizedIncomeCalculationType, - final LoanCapitalizedIncomeStrategy capitalizedIncomeStrategy, final LoanCapitalizedIncomeType capitalizedIncomeType, - final boolean enableBuyDownFee, final LoanBuyDownFeeCalculationType buyDownFeeCalculationType, - final LoanBuyDownFeeStrategy buyDownFeeStrategy, final LoanBuyDownFeeIncomeType buyDownFeeIncomeType, - final boolean merchantBuyDownFee, final boolean allowFullTermForTranche) { + final List paymentAllocationRules, + final List creditAllocationRules, final String name, final String shortName, + final String description, final MonetaryCurrency currency, final BigDecimal defaultPrincipal, + final BigDecimal defaultMinPrincipal, final BigDecimal defaultMaxPrincipal, + final BigDecimal defaultNominalInterestRatePerPeriod, final BigDecimal defaultMinNominalInterestRatePerPeriod, + final BigDecimal defaultMaxNominalInterestRatePerPeriod, final PeriodFrequencyType interestPeriodFrequencyType, + final BigDecimal defaultAnnualNominalInterestRate, final InterestMethod interestMethod, + final InterestCalculationPeriodMethod interestCalculationPeriodMethod, final boolean considerPartialPeriodInterest, + final Integer repayEvery, final PeriodFrequencyType repaymentFrequencyType, final Integer defaultNumberOfInstallments, + final Integer defaultMinNumberOfInstallments, final Integer defaultMaxNumberOfInstallments, + final Integer graceOnPrincipalPayment, final Integer recurringMoratoriumOnPrincipalPeriods, + final Integer graceOnInterestPayment, final Integer graceOnInterestCharged, final AmortizationMethod amortizationMethod, + final BigDecimal inArrearsTolerance, final List charges, final AccountingRuleType accountingRuleType, + final boolean includeInBorrowerCycle, final LocalDate startDate, final LocalDate closeDate, final ExternalId externalId, + final boolean useBorrowerCycle, final Set loanProductBorrowerCycleVariations, + final boolean multiDisburseLoan, final Integer maxTrancheCount, final BigDecimal outstandingLoanBalance, + final Integer graceOnArrearsAgeing, final Integer overdueDaysForNPA, final DaysInMonthType daysInMonthType, + final DaysInYearType daysInYearType, final boolean isInterestRecalculationEnabled, + final LoanProductInterestRecalculationDetails productInterestRecalculationDetails, + final Integer minimumDaysBetweenDisbursalAndFirstRepayment, final boolean holdGuarantorFunds, + final LoanProductGuaranteeDetails loanProductGuaranteeDetails, final BigDecimal principalThresholdForLastInstallment, + final boolean accountMovesOutOfNPAOnlyOnArrearsCompletion, final boolean canDefineEmiAmount, + final Integer installmentAmountInMultiplesOf, final LoanProductConfigurableAttributes loanProductConfigurableAttributes, + Boolean isLinkedToFloatingInterestRates, FloatingRate floatingRate, BigDecimal interestRateDifferential, + BigDecimal minDifferentialLendingRate, BigDecimal maxDifferentialLendingRate, BigDecimal defaultDifferentialLendingRate, + Boolean isFloatingInterestRateCalculationAllowed, final Boolean isVariableInstallmentsAllowed, + final Integer minimumGapBetweenInstallments, final Integer maximumGapBetweenInstallments, + final boolean syncExpectedWithDisbursementDate, final boolean canUseForTopup, final boolean isEqualAmortization, + final List rates, final BigDecimal fixedPrincipalPercentagePerInstallment, final boolean disallowExpectedDisbursements, + final boolean allowApprovedDisbursedAmountsOverApplied, final String overAppliedCalculationType, + final Integer overAppliedNumber, final Integer dueDaysForRepaymentEvent, final Integer overDueDaysForRepaymentEvent, + final boolean enableDownPayment, final BigDecimal disbursedAmountPercentageForDownPayment, + final boolean enableAutoRepaymentForDownPayment, final RepaymentStartDateType repaymentStartDateType, + final boolean enableInstallmentLevelDelinquency, final LoanScheduleType loanScheduleType, + final LoanScheduleProcessingType loanScheduleProcessingType, final Integer fixedLength, + final boolean enableAccrualActivityPosting, final List supportedInterestRefundTypes, + final LoanChargeOffBehaviour chargeOffBehaviour, final boolean isInterestRecognitionOnDisbursementDate, + final DaysInYearCustomStrategyType daysInYearCustomStrategy, final boolean enableIncomeCapitalization, + final LoanCapitalizedIncomeCalculationType capitalizedIncomeCalculationType, + final LoanCapitalizedIncomeStrategy capitalizedIncomeStrategy, final LoanCapitalizedIncomeType capitalizedIncomeType, + final boolean enableBuyDownFee, final LoanBuyDownFeeCalculationType buyDownFeeCalculationType, + final LoanBuyDownFeeStrategy buyDownFeeStrategy, final LoanBuyDownFeeIncomeType buyDownFeeIncomeType, + final boolean merchantBuyDownFee, final boolean allowFullTermForTranche) { this.fund = fund; this.transactionProcessingStrategyCode = transactionProcessingStrategyCode; @@ -690,7 +692,7 @@ public Map fetchBorrowerCycleVariationsForCycleNumber(final borrowerCycleVariations.put(LoanProductConstants.MAX_PRINCIPAL, cycleVariation.getMaxValue()); principalCycleUsed = cycleVariation.getBorrowerCycleNumber(); } - break; + break; case INTERESTRATE: if (interestCycleUsed < cycleVariation.getBorrowerCycleNumber()) { borrowerCycleVariations.put(LoanProductConstants.INTEREST_RATE_PER_PERIOD, @@ -701,7 +703,7 @@ public Map fetchBorrowerCycleVariationsForCycleNumber(final cycleVariation.getMaxValue()); interestCycleUsed = cycleVariation.getBorrowerCycleNumber(); } - break; + break; case REPAYMENT: if (repaymentCycleUsed < cycleVariation.getBorrowerCycleNumber()) { borrowerCycleVariations.put(LoanProductConstants.MAX_INTEREST_RATE_PER_PERIOD, @@ -710,9 +712,9 @@ public Map fetchBorrowerCycleVariationsForCycleNumber(final borrowerCycleVariations.put(LoanProductConstants.MAX_NUMBER_OF_REPAYMENTS, cycleVariation.getMaxValue()); repaymentCycleUsed = cycleVariation.getBorrowerCycleNumber(); } - break; + break; default: - break; + break; } } } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductBorrowerCycleVariations.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductBorrowerCycleVariations.java index 09ee218bdf3..de7b86d27c6 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductBorrowerCycleVariations.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductBorrowerCycleVariations.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.util.Objects; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @Entity @@ -53,10 +55,11 @@ public class LoanProductBorrowerCycleVariations extends AbstractPersistableCusto @Column(name = "default_value", scale = 6, precision = 19, nullable = false) private BigDecimal defaultValue; - protected LoanProductBorrowerCycleVariations() {} + protected LoanProductBorrowerCycleVariations() { + } public LoanProductBorrowerCycleVariations(final Integer borrowerCycleNumber, final Integer paramType, final Integer valueConditionType, - final BigDecimal minValue, final BigDecimal maxValue, final BigDecimal defaultValue) { + final BigDecimal minValue, final BigDecimal maxValue, final BigDecimal defaultValue) { this.borrowerCycleNumber = borrowerCycleNumber; this.paramType = paramType; this.valueConditionType = valueConditionType; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductConfigurableAttributes.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductConfigurableAttributes.java index ffde89ff12d..295758d59ce 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductConfigurableAttributes.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductConfigurableAttributes.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.OneToOne; import jakarta.persistence.Table; + import java.io.Serializable; import java.util.Objects; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.portfolio.loanproduct.LoanProductConstants; @@ -61,11 +63,11 @@ public class LoanProductConfigurableAttributes extends AbstractPersistableCustom @Column(name = "grace_on_arrears_ageing") private Boolean graceOnArrearsAgeing; - private static final String[] supportedLoanConfigurableAttributes = { LoanProductConstants.amortizationTypeParamName, + private static final String[] supportedLoanConfigurableAttributes = {LoanProductConstants.amortizationTypeParamName, LoanProductConstants.interestTypeParamName, LoanProductConstants.transactionProcessingStrategyCodeParamName, LoanProductConstants.interestCalculationPeriodTypeParamName, LoanProductConstants.inArrearsToleranceParamName, LoanProductConstants.repaymentEveryParamName, LoanProductConstants.graceOnPrincipalAndInterestPaymentParamName, - LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME }; + LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME}; public static LoanProductConfigurableAttributes createFrom(JsonCommand command) { @@ -117,8 +119,8 @@ public static LoanProductConfigurableAttributes populateDefaultsForConfigurableA } public LoanProductConfigurableAttributes(Boolean amortization, Boolean interestMethod, Boolean transactionProcessingStrategyCode, - Boolean interestCalcPeriod, Boolean arrearsTolerance, Boolean repaymentEvery, Boolean graceOnPrincipalAndInterestPayment, - Boolean graceOnArrearsAging) { + Boolean interestCalcPeriod, Boolean arrearsTolerance, Boolean repaymentEvery, Boolean graceOnPrincipalAndInterestPayment, + Boolean graceOnArrearsAging) { this.amortizationType = amortization; this.interestType = interestMethod; this.inArrearsTolerance = arrearsTolerance; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductCreditAllocationRule.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductCreditAllocationRule.java index 31024d7aad7..a34453ae243 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductCreditAllocationRule.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductCreditAllocationRule.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanproduct.domain; // TODO FINERACT-1932-Fineract modularization: Move to fineract-progressive-loan module after refactor of Loan and LoanProduct classes + import jakarta.persistence.Column; import jakarta.persistence.Convert; import jakarta.persistence.Entity; @@ -28,7 +29,9 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.util.List; + import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; @@ -40,7 +43,7 @@ @Setter @Entity @Table(name = "m_loan_product_credit_allocation_rule", uniqueConstraints = { - @UniqueConstraint(columnNames = { "loan_product_id", "transaction_type" }, name = "uq_m_loan_product_credit_allocation_rule") }) + @UniqueConstraint(columnNames = {"loan_product_id", "transaction_type"}, name = "uq_m_loan_product_credit_allocation_rule")}) @AllArgsConstructor @NoArgsConstructor(access = AccessLevel.PROTECTED) public class LoanProductCreditAllocationRule extends AbstractAuditableWithUTCDateTimeCustom { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductFloatingRates.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductFloatingRates.java index db544d87d91..647c71763be 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductFloatingRates.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductFloatingRates.java @@ -6,9 +6,9 @@ * 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 @@ -24,8 +24,10 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.util.Collection; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @@ -67,8 +69,8 @@ public LoanProductFloatingRates() { } public LoanProductFloatingRates(FloatingRate floatingRate, LoanProduct loanProduct, BigDecimal interestRateDifferential, - BigDecimal minDifferentialLendingRate, BigDecimal maxDifferentialLendingRate, BigDecimal defaultDifferentialLendingRate, - boolean isFloatingInterestRateCalculationAllowed) { + BigDecimal minDifferentialLendingRate, BigDecimal maxDifferentialLendingRate, BigDecimal defaultDifferentialLendingRate, + boolean isFloatingInterestRateCalculationAllowed) { this.floatingRate = floatingRate; this.loanProduct = loanProduct; this.interestRateDifferential = interestRateDifferential; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductGuaranteeDetails.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductGuaranteeDetails.java index cd8df055eb7..a86a3c01987 100755 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductGuaranteeDetails.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductGuaranteeDetails.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.OneToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @@ -58,7 +60,7 @@ protected LoanProductGuaranteeDetails() { } public LoanProductGuaranteeDetails(final BigDecimal mandatoryGuarantee, final BigDecimal minimumGuaranteeFromOwnFunds, - final BigDecimal minimumGuaranteeFromGuarantor) { + final BigDecimal minimumGuaranteeFromGuarantor) { this.mandatoryGuarantee = mandatoryGuarantee; this.minimumGuaranteeFromGuarantor = minimumGuaranteeFromGuarantor; this.minimumGuaranteeFromOwnFunds = minimumGuaranteeFromOwnFunds; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductInterestRecalculationDetails.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductInterestRecalculationDetails.java index 1bc08ad4020..bba468aa028 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductInterestRecalculationDetails.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductInterestRecalculationDetails.java @@ -6,9 +6,9 @@ * 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 @@ -105,13 +105,13 @@ protected LoanProductInterestRecalculationDetails() { } public LoanProductInterestRecalculationDetails(final Integer interestRecalculationCompoundingMethod, - final Integer rescheduleStrategyMethod, final Integer restFrequencyType, final Integer restInterval, - final Integer restFrequencyNthDay, final Integer restFrequencyOnDay, final Integer restFrequencyWeekday, - Integer compoundingFrequencyType, Integer compoundingInterval, final Integer compoundingFrequencyNthDay, - final Integer compoundingFrequencyOnDay, final Integer compoundingFrequencyWeekday, - final boolean isArrearsBasedOnOriginalSchedule, final Integer preCloseInterestCalculationStrategy, - final boolean isCompoundingToBePostedAsTransaction, final boolean allowCompoundingOnEod, - final boolean disallowInterestCalculationOnPastDue) { + final Integer rescheduleStrategyMethod, final Integer restFrequencyType, final Integer restInterval, + final Integer restFrequencyNthDay, final Integer restFrequencyOnDay, final Integer restFrequencyWeekday, + Integer compoundingFrequencyType, Integer compoundingInterval, final Integer compoundingFrequencyNthDay, + final Integer compoundingFrequencyOnDay, final Integer compoundingFrequencyWeekday, + final boolean isArrearsBasedOnOriginalSchedule, final Integer preCloseInterestCalculationStrategy, + final boolean isCompoundingToBePostedAsTransaction, final boolean allowCompoundingOnEod, + final boolean disallowInterestCalculationOnPastDue) { this.interestRecalculationCompoundingMethod = interestRecalculationCompoundingMethod; this.rescheduleStrategyMethod = rescheduleStrategyMethod; this.restFrequencyType = restFrequencyType; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductMinMaxConstraints.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductMinMaxConstraints.java index 2ba6fcb681f..04eb8cdfb2a 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductMinMaxConstraints.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductMinMaxConstraints.java @@ -6,9 +6,9 @@ * 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 @@ -20,9 +20,11 @@ import jakarta.persistence.Column; import jakarta.persistence.Embeddable; + import java.math.BigDecimal; import java.util.LinkedHashMap; import java.util.Map; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductParamType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductParamType.java index 48ea5292f2e..efdb4bf1e2f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductParamType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductParamType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductPaymentAllocationRule.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductPaymentAllocationRule.java index ae26834ebe4..0537a9e2695 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductPaymentAllocationRule.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductPaymentAllocationRule.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanproduct.domain; // TODO FINERACT-1932-Fineract modularization: Move to fineract-progressive-loan module after refactor of Loan and LoanProduct classes + import jakarta.persistence.Column; import jakarta.persistence.Convert; import jakarta.persistence.Entity; @@ -28,7 +29,9 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.util.List; + import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; @@ -40,7 +43,7 @@ @Setter @Entity @Table(name = "m_loan_product_payment_allocation_rule", uniqueConstraints = { - @UniqueConstraint(columnNames = { "loan_product_id", "transaction_type" }, name = "uq_m_loan_product_payment_allocation_rule") }) + @UniqueConstraint(columnNames = {"loan_product_id", "transaction_type"}, name = "uq_m_loan_product_payment_allocation_rule")}) @AllArgsConstructor @NoArgsConstructor(access = AccessLevel.PROTECTED) public class LoanProductPaymentAllocationRule extends AbstractAuditableWithUTCDateTimeCustom { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductRelatedDetail.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductRelatedDetail.java index 5dc77092720..7c9e1482075 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductRelatedDetail.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductRelatedDetail.java @@ -6,9 +6,9 @@ * 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 @@ -24,8 +24,10 @@ import jakarta.persistence.Embedded; import jakarta.persistence.EnumType; import jakarta.persistence.Enumerated; + import java.math.BigDecimal; import java.util.List; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.organisation.monetary.data.CurrencyData; @@ -211,25 +213,25 @@ public class LoanProductRelatedDetail { private Integer installmentAmountInMultiplesOf; public static LoanProductRelatedDetail createFrom(final CurrencyData currencyData, final BigDecimal principal, - final BigDecimal nominalInterestRatePerPeriod, final PeriodFrequencyType interestRatePeriodFrequencyType, - final BigDecimal nominalAnnualInterestRate, final InterestMethod interestMethod, - final InterestCalculationPeriodMethod interestCalculationPeriodMethod, final boolean allowPartialPeriodInterestCalculation, - final Integer repaymentEvery, final PeriodFrequencyType repaymentPeriodFrequencyType, final Integer numberOfRepayments, - final Integer graceOnPrincipalPayment, final Integer recurringMoratoriumOnPrincipalPeriods, - final Integer graceOnInterestPayment, final Integer graceOnInterestCharged, final AmortizationMethod amortizationMethod, - final BigDecimal inArrearsTolerance, final Integer graceOnArrearsAgeing, final Integer daysInMonthType, - final Integer daysInYearType, final boolean isInterestRecalculationEnabled, final boolean isEqualAmortization, - final boolean enableDownPayment, final BigDecimal disbursedAmountPercentageForDownPayment, - final boolean enableAutoRepaymentForDownPayment, final LoanScheduleType loanScheduleType, - final LoanScheduleProcessingType loanScheduleProcessingType, final Integer fixedLength, - final boolean enableAccrualActivityPosting, final List supportedInterestRefundTypes, - final LoanChargeOffBehaviour chargeOffBehaviour, final boolean interestRecognitionOnDisbursementDate, - final DaysInYearCustomStrategyType daysInYearCustomStrategy, final boolean enableIncomeCapitalization, - final LoanCapitalizedIncomeCalculationType capitalizedIncomeCalculationType, - final LoanCapitalizedIncomeStrategy capitalizedIncomeStrategy, final LoanCapitalizedIncomeType capitalizedIncomeType, - final Integer installmentAmountInMultiplesOf, final boolean enableBuyDownFee, - final LoanBuyDownFeeCalculationType buyDownFeeCalculationType, final LoanBuyDownFeeStrategy buyDownFeeStrategy, - final LoanBuyDownFeeIncomeType buyDownFeeIncomeType, final boolean merchantBuyDownFee) { + final BigDecimal nominalInterestRatePerPeriod, final PeriodFrequencyType interestRatePeriodFrequencyType, + final BigDecimal nominalAnnualInterestRate, final InterestMethod interestMethod, + final InterestCalculationPeriodMethod interestCalculationPeriodMethod, final boolean allowPartialPeriodInterestCalculation, + final Integer repaymentEvery, final PeriodFrequencyType repaymentPeriodFrequencyType, final Integer numberOfRepayments, + final Integer graceOnPrincipalPayment, final Integer recurringMoratoriumOnPrincipalPeriods, + final Integer graceOnInterestPayment, final Integer graceOnInterestCharged, final AmortizationMethod amortizationMethod, + final BigDecimal inArrearsTolerance, final Integer graceOnArrearsAgeing, final Integer daysInMonthType, + final Integer daysInYearType, final boolean isInterestRecalculationEnabled, final boolean isEqualAmortization, + final boolean enableDownPayment, final BigDecimal disbursedAmountPercentageForDownPayment, + final boolean enableAutoRepaymentForDownPayment, final LoanScheduleType loanScheduleType, + final LoanScheduleProcessingType loanScheduleProcessingType, final Integer fixedLength, + final boolean enableAccrualActivityPosting, final List supportedInterestRefundTypes, + final LoanChargeOffBehaviour chargeOffBehaviour, final boolean interestRecognitionOnDisbursementDate, + final DaysInYearCustomStrategyType daysInYearCustomStrategy, final boolean enableIncomeCapitalization, + final LoanCapitalizedIncomeCalculationType capitalizedIncomeCalculationType, + final LoanCapitalizedIncomeStrategy capitalizedIncomeStrategy, final LoanCapitalizedIncomeType capitalizedIncomeType, + final Integer installmentAmountInMultiplesOf, final boolean enableBuyDownFee, + final LoanBuyDownFeeCalculationType buyDownFeeCalculationType, final LoanBuyDownFeeStrategy buyDownFeeStrategy, + final LoanBuyDownFeeIncomeType buyDownFeeIncomeType, final boolean merchantBuyDownFee) { final MonetaryCurrency currency = MonetaryCurrency.fromCurrencyData(currencyData); return new LoanProductRelatedDetail(currency, principal, nominalInterestRatePerPeriod, interestRatePeriodFrequencyType, @@ -249,25 +251,25 @@ protected LoanProductRelatedDetail() { } public LoanProductRelatedDetail(final MonetaryCurrency currency, final BigDecimal defaultPrincipal, - final BigDecimal defaultNominalInterestRatePerPeriod, final PeriodFrequencyType interestPeriodFrequencyType, - final BigDecimal defaultAnnualNominalInterestRate, final InterestMethod interestMethod, - final InterestCalculationPeriodMethod interestCalculationPeriodMethod, final boolean allowPartialPeriodInterestCalculation, - final Integer repayEvery, final PeriodFrequencyType repaymentFrequencyType, final Integer defaultNumberOfRepayments, - final Integer graceOnPrincipalPayment, final Integer recurringMoratoriumOnPrincipalPeriods, - final Integer graceOnInterestPayment, final Integer graceOnInterestCharged, final AmortizationMethod amortizationMethod, - final BigDecimal inArrearsTolerance, final Integer graceOnArrearsAgeing, final Integer daysInMonthType, - final Integer daysInYearType, final boolean isInterestRecalculationEnabled, final boolean isEqualAmortization, - final boolean enableDownPayment, final BigDecimal disbursedAmountPercentageForDownPayment, - final boolean enableAutoRepaymentForDownPayment, final LoanScheduleType loanScheduleType, - final LoanScheduleProcessingType loanScheduleProcessingType, final Integer fixedLength, - final boolean enableAccrualActivityPosting, List supportedInterestRefundTypes, - final LoanChargeOffBehaviour chargeOffBehaviour, final boolean interestRecognitionOnDisbursementDate, - final DaysInYearCustomStrategyType daysInYearCustomStrategy, final boolean enableIncomeCapitalization, - final LoanCapitalizedIncomeCalculationType capitalizedIncomeCalculationType, - final LoanCapitalizedIncomeStrategy capitalizedIncomeStrategy, final LoanCapitalizedIncomeType capitalizedIncomeType, - final Integer installmentAmountInMultiplesOf, final boolean enableBuyDownFee, - final LoanBuyDownFeeCalculationType buyDownFeeCalculationType, final LoanBuyDownFeeStrategy buyDownFeeStrategy, - final LoanBuyDownFeeIncomeType buyDownFeeIncomeType, final boolean merchantBuyDownFee) { + final BigDecimal defaultNominalInterestRatePerPeriod, final PeriodFrequencyType interestPeriodFrequencyType, + final BigDecimal defaultAnnualNominalInterestRate, final InterestMethod interestMethod, + final InterestCalculationPeriodMethod interestCalculationPeriodMethod, final boolean allowPartialPeriodInterestCalculation, + final Integer repayEvery, final PeriodFrequencyType repaymentFrequencyType, final Integer defaultNumberOfRepayments, + final Integer graceOnPrincipalPayment, final Integer recurringMoratoriumOnPrincipalPeriods, + final Integer graceOnInterestPayment, final Integer graceOnInterestCharged, final AmortizationMethod amortizationMethod, + final BigDecimal inArrearsTolerance, final Integer graceOnArrearsAgeing, final Integer daysInMonthType, + final Integer daysInYearType, final boolean isInterestRecalculationEnabled, final boolean isEqualAmortization, + final boolean enableDownPayment, final BigDecimal disbursedAmountPercentageForDownPayment, + final boolean enableAutoRepaymentForDownPayment, final LoanScheduleType loanScheduleType, + final LoanScheduleProcessingType loanScheduleProcessingType, final Integer fixedLength, + final boolean enableAccrualActivityPosting, List supportedInterestRefundTypes, + final LoanChargeOffBehaviour chargeOffBehaviour, final boolean interestRecognitionOnDisbursementDate, + final DaysInYearCustomStrategyType daysInYearCustomStrategy, final boolean enableIncomeCapitalization, + final LoanCapitalizedIncomeCalculationType capitalizedIncomeCalculationType, + final LoanCapitalizedIncomeStrategy capitalizedIncomeStrategy, final LoanCapitalizedIncomeType capitalizedIncomeType, + final Integer installmentAmountInMultiplesOf, final boolean enableBuyDownFee, + final LoanBuyDownFeeCalculationType buyDownFeeCalculationType, final LoanBuyDownFeeStrategy buyDownFeeStrategy, + final LoanBuyDownFeeIncomeType buyDownFeeIncomeType, final boolean merchantBuyDownFee) { this.currency = currency; this.principal = defaultPrincipal; this.nominalInterestRatePerPeriod = defaultNominalInterestRatePerPeriod; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductRepository.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductRepository.java index 6a35428a311..f30a8c32182 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductRepository.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.apache.fineract.portfolio.delinquency.domain.DelinquencyBucket; import org.springframework.data.jpa.repository.JpaRepository; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductTrancheDetails.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductTrancheDetails.java index 5a552f63fa4..aff568348cc 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductTrancheDetails.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductTrancheDetails.java @@ -6,9 +6,9 @@ * 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 @@ -20,7 +20,9 @@ import jakarta.persistence.Column; import jakarta.persistence.Embeddable; + import java.math.BigDecimal; + import lombok.Getter; import lombok.Setter; @@ -46,7 +48,7 @@ protected LoanProductTrancheDetails() { } public LoanProductTrancheDetails(final boolean multiDisburseLoan, final Integer maxTrancheCount, - final BigDecimal outstandingLoanBalance, final boolean allowFullTermForTranche) { + final BigDecimal outstandingLoanBalance, final boolean allowFullTermForTranche) { this.multiDisburseLoan = multiDisburseLoan; this.maxTrancheCount = maxTrancheCount; this.outstandingLoanBalance = outstandingLoanBalance; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductValueConditionType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductValueConditionType.java index 9491eb1abab..114d6bfce20 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductValueConditionType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductValueConditionType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductVariableInstallmentConfig.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductVariableInstallmentConfig.java index d2accf793de..6b77b664060 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductVariableInstallmentConfig.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductVariableInstallmentConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanRescheduleStrategyMethod.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanRescheduleStrategyMethod.java index 293f0309a44..3030a14a313 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanRescheduleStrategyMethod.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanRescheduleStrategyMethod.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanSupportedInterestRefundTypes.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanSupportedInterestRefundTypes.java index 9e899080064..ac604a17344 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanSupportedInterestRefundTypes.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/LoanSupportedInterestRefundTypes.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/PaymentAllocationTransactionType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/PaymentAllocationTransactionType.java index 6194a99de2b..5e6b085caba 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/PaymentAllocationTransactionType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/PaymentAllocationTransactionType.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.portfolio.loanproduct.domain; // TODO FINERACT-1932-Fineract modularization: Move to fineract-progressive-loan module after refactor of Loan and LoanProduct classes + import java.util.Arrays; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/PaymentAllocationType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/PaymentAllocationType.java index c5e53106526..94b07f1fb7c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/PaymentAllocationType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/PaymentAllocationType.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanproduct.domain; // TODO FINERACT-1932-Fineract modularization: Move to fineract-progressive-loan module after refactor of Loan and LoanProduct classes + import static org.apache.fineract.portfolio.loanproduct.domain.AllocationType.FEE; import static org.apache.fineract.portfolio.loanproduct.domain.AllocationType.INTEREST; import static org.apache.fineract.portfolio.loanproduct.domain.AllocationType.PENALTY; @@ -29,6 +30,7 @@ import java.util.Arrays; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/PaymentAllocationTypeListConverter.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/PaymentAllocationTypeListConverter.java index 5a1943f3e79..b407f0edf61 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/PaymentAllocationTypeListConverter.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/PaymentAllocationTypeListConverter.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,12 @@ package org.apache.fineract.portfolio.loanproduct.domain; // TODO FINERACT-1932-Fineract modularization: Move to fineract-progressive-loan module after refactor of Loan and LoanProduct classes + import jakarta.persistence.AttributeConverter; import jakarta.persistence.Converter; + import java.util.List; + import org.apache.fineract.infrastructure.core.data.GenericEnumListConverter; @Converter(autoApply = true) diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/RecalculationFrequencyType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/RecalculationFrequencyType.java index 1fd4d83895d..70145811ae4 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/RecalculationFrequencyType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/RecalculationFrequencyType.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.HashMap; import java.util.Map; + import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType; public enum RecalculationFrequencyType { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/RepaymentStartDateType.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/RepaymentStartDateType.java index 7d4e88fbc3b..22c95efbac7 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/RepaymentStartDateType.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/RepaymentStartDateType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/SupportedInterestRefundTypesListConverter.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/SupportedInterestRefundTypesListConverter.java index 5476e7453cc..d8176d1d355 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/SupportedInterestRefundTypesListConverter.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/SupportedInterestRefundTypesListConverter.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import jakarta.persistence.AttributeConverter; import jakarta.persistence.Converter; + import java.util.List; + import org.apache.fineract.infrastructure.core.data.GenericEnumListConverter; @Converter(autoApply = true) diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/EqualAmortizationUnsupportedFeatureException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/EqualAmortizationUnsupportedFeatureException.java index 8df7ec73714..fc0e430649c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/EqualAmortizationUnsupportedFeatureException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/EqualAmortizationUnsupportedFeatureException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/InvalidLendingStrategy.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/InvalidLendingStrategy.java index af27fff7cec..054057fb8ed 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/InvalidLendingStrategy.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/InvalidLendingStrategy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LinkedAccountRequiredException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LinkedAccountRequiredException.java index f81816b56fb..b137c556951 100755 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LinkedAccountRequiredException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LinkedAccountRequiredException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LoanProductCannotBeModifiedDueToNonClosedLoansException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LoanProductCannotBeModifiedDueToNonClosedLoansException.java index f0bb5574f04..1e261726a1f 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LoanProductCannotBeModifiedDueToNonClosedLoansException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LoanProductCannotBeModifiedDueToNonClosedLoansException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LoanProductDateException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LoanProductDateException.java index cdb08ead58a..ad0dacd313d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LoanProductDateException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LoanProductDateException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LoanProductGeneralRuleException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LoanProductGeneralRuleException.java index 8074d2ffdaf..c3611ce343b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LoanProductGeneralRuleException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LoanProductGeneralRuleException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LoanProductNotFoundException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LoanProductNotFoundException.java index 149d24f0d1b..f0a8f31dc59 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LoanProductNotFoundException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/LoanProductNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/NotInMinMaxRangeException.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/NotInMinMaxRangeException.java index ae6a1539af8..48ae3e02319 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/NotInMinMaxRangeException.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/exception/NotInMinMaxRangeException.java @@ -6,9 +6,9 @@ * 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 @@ -27,7 +27,7 @@ public class NotInMinMaxRangeException extends AbstractPlatformDomainRuleException { public NotInMinMaxRangeException(final String entity, final String postFix, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("validation.msg." + entity + "." + postFix + ".is.not.within.min.max.range", defaultUserMessage, defaultUserMessageArgs); } } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/handler/CreateLoanProductCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/handler/CreateLoanProductCommandHandler.java index 98bd2686644..4a5aa5f89e2 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/handler/CreateLoanProductCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/handler/CreateLoanProductCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/handler/UpdateLoanProductCommandHandler.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/handler/UpdateLoanProductCommandHandler.java index 3f7a39c28f4..39ea9dbad65 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/handler/UpdateLoanProductCommandHandler.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/handler/UpdateLoanProductCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/mapper/LoanProductBasicDetailsMapper.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/mapper/LoanProductBasicDetailsMapper.java index 26f1d4a6bed..ef706bf0901 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/mapper/LoanProductBasicDetailsMapper.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/mapper/LoanProductBasicDetailsMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanproduct.mapper; import java.util.List; + import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LendingStrategyEnumerations.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LendingStrategyEnumerations.java index 9d0716042f5..f66be466750 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LendingStrategyEnumerations.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LendingStrategyEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -35,9 +35,11 @@ public static EnumOptionData lendingStrategy(final LendingStrategy type) { return switch (type) { case INDIVIDUAL_LOAN -> new EnumOptionData(type.getId().longValue(), type.getCode(), "Individual loan"); case GROUP_LOAN -> new EnumOptionData(type.getId().longValue(), type.getCode(), "Group loan"); - case JOINT_LIABILITY_LOAN -> new EnumOptionData(type.getId().longValue(), type.getCode(), "Joint liability loan"); + case JOINT_LIABILITY_LOAN -> + new EnumOptionData(type.getId().longValue(), type.getCode(), "Joint liability loan"); case LINKED_LOAN -> new EnumOptionData(type.getId().longValue(), type.getCode(), "Linked loan"); - default -> new EnumOptionData(LendingStrategy.INVALID.getId().longValue(), LendingStrategy.INVALID.getCode(), "Invalid"); + default -> + new EnumOptionData(LendingStrategy.INVALID.getId().longValue(), LendingStrategy.INVALID.getCode(), "Invalid"); }; } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanDropdownReadPlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanDropdownReadPlatformService.java index 91cda2f6e41..5b00c85e83b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanDropdownReadPlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanDropdownReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.loanproduct.data.TransactionProcessingStrategyData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanDropdownReadPlatformServiceImpl.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanDropdownReadPlatformServiceImpl.java index af8e2d8b68b..07c5bcc763d 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanDropdownReadPlatformServiceImpl.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanDropdownReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -38,6 +38,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.common.domain.DayOfWeekType; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanEnumerations.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanEnumerations.java index 6ff0c86c384..d334145663c 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanEnumerations.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -84,12 +84,15 @@ public static EnumOptionData repaymentStartDateType(int id) { public static EnumOptionData repaymentStartDateType(final RepaymentStartDateType type) { return switch (type) { - case DISBURSEMENT_DATE -> new EnumOptionData(RepaymentStartDateType.DISBURSEMENT_DATE.getValue().longValue(), - RepaymentStartDateType.DISBURSEMENT_DATE.getCode(), "Disbursement Date"); - case SUBMITTED_ON_DATE -> new EnumOptionData(RepaymentStartDateType.SUBMITTED_ON_DATE.getValue().longValue(), - RepaymentStartDateType.SUBMITTED_ON_DATE.getCode(), "Submitted On Date"); - default -> new EnumOptionData(RepaymentStartDateType.INVALID.getValue().longValue(), RepaymentStartDateType.INVALID.getCode(), - "Invalid"); + case DISBURSEMENT_DATE -> + new EnumOptionData(RepaymentStartDateType.DISBURSEMENT_DATE.getValue().longValue(), + RepaymentStartDateType.DISBURSEMENT_DATE.getCode(), "Disbursement Date"); + case SUBMITTED_ON_DATE -> + new EnumOptionData(RepaymentStartDateType.SUBMITTED_ON_DATE.getValue().longValue(), + RepaymentStartDateType.SUBMITTED_ON_DATE.getCode(), "Submitted On Date"); + default -> + new EnumOptionData(RepaymentStartDateType.INVALID.getValue().longValue(), RepaymentStartDateType.INVALID.getCode(), + "Invalid"); }; } @@ -109,7 +112,7 @@ public static EnumOptionData loanTermFrequencyType(final PeriodFrequencyType typ case YEARS -> new EnumOptionData(PeriodFrequencyType.YEARS.getValue().longValue(), codePrefix + PeriodFrequencyType.YEARS.getCode(), "Years"); default -> - new EnumOptionData(PeriodFrequencyType.INVALID.getValue().longValue(), PeriodFrequencyType.INVALID.getCode(), "Invalid"); + new EnumOptionData(PeriodFrequencyType.INVALID.getValue().longValue(), PeriodFrequencyType.INVALID.getCode(), "Invalid"); }; } @@ -129,7 +132,7 @@ public static EnumOptionData termFrequencyType(final PeriodFrequencyType type) { case YEARS -> new EnumOptionData(PeriodFrequencyType.YEARS.getValue().longValue(), codePrefix + PeriodFrequencyType.YEARS.getCode(), "Years"); default -> - new EnumOptionData(PeriodFrequencyType.INVALID.getValue().longValue(), PeriodFrequencyType.INVALID.getCode(), "Invalid"); + new EnumOptionData(PeriodFrequencyType.INVALID.getValue().longValue(), PeriodFrequencyType.INVALID.getCode(), "Invalid"); }; } @@ -184,7 +187,7 @@ public static EnumOptionData repaymentFrequencyType(final PeriodFrequencyType ty case YEARS -> new EnumOptionData(PeriodFrequencyType.YEARS.getValue().longValue(), codePrefix + PeriodFrequencyType.YEARS.getCode(), "Years"); default -> - new EnumOptionData(PeriodFrequencyType.INVALID.getValue().longValue(), PeriodFrequencyType.INVALID.getCode(), "Invalid"); + new EnumOptionData(PeriodFrequencyType.INVALID.getValue().longValue(), PeriodFrequencyType.INVALID.getCode(), "Invalid"); }; } @@ -202,7 +205,7 @@ public static EnumOptionData interestRateFrequencyType(final PeriodFrequencyType case WHOLE_TERM -> new EnumOptionData(PeriodFrequencyType.WHOLE_TERM.getValue().longValue(), codePrefix + PeriodFrequencyType.WHOLE_TERM.getCode(), "Whole term"); default -> - new EnumOptionData(PeriodFrequencyType.INVALID.getValue().longValue(), PeriodFrequencyType.INVALID.getCode(), "Invalid"); + new EnumOptionData(PeriodFrequencyType.INVALID.getValue().longValue(), PeriodFrequencyType.INVALID.getCode(), "Invalid"); }; } @@ -217,7 +220,7 @@ public static EnumOptionData amortizationType(final AmortizationMethod amortizat case EQUAL_PRINCIPAL -> new EnumOptionData(AmortizationMethod.EQUAL_PRINCIPAL.getValue().longValue(), AmortizationMethod.EQUAL_PRINCIPAL.getCode(), "Equal principal payments"); default -> - new EnumOptionData(AmortizationMethod.INVALID.getValue().longValue(), AmortizationMethod.INVALID.getCode(), "Invalid"); + new EnumOptionData(AmortizationMethod.INVALID.getValue().longValue(), AmortizationMethod.INVALID.getCode(), "Invalid"); }; } @@ -227,10 +230,12 @@ public static EnumOptionData interestType(final Integer id) { public static EnumOptionData interestType(final InterestMethod type) { return switch (type) { - case FLAT -> new EnumOptionData(InterestMethod.FLAT.getValue().longValue(), InterestMethod.FLAT.getCode(), "Flat"); + case FLAT -> + new EnumOptionData(InterestMethod.FLAT.getValue().longValue(), InterestMethod.FLAT.getCode(), "Flat"); case DECLINING_BALANCE -> new EnumOptionData(InterestMethod.DECLINING_BALANCE.getValue().longValue(), InterestMethod.DECLINING_BALANCE.getCode(), "Declining Balance"); - default -> new EnumOptionData(InterestMethod.INVALID.getValue().longValue(), InterestMethod.INVALID.getCode(), "Invalid"); + default -> + new EnumOptionData(InterestMethod.INVALID.getValue().longValue(), InterestMethod.INVALID.getCode(), "Invalid"); }; } @@ -243,8 +248,8 @@ public static EnumOptionData interestCalculationPeriodType(final InterestCalcula case DAILY -> new EnumOptionData(InterestCalculationPeriodMethod.DAILY.getValue().longValue(), InterestCalculationPeriodMethod.DAILY.getCode(), "Daily"); case SAME_AS_REPAYMENT_PERIOD -> - new EnumOptionData(InterestCalculationPeriodMethod.SAME_AS_REPAYMENT_PERIOD.getValue().longValue(), - InterestCalculationPeriodMethod.SAME_AS_REPAYMENT_PERIOD.getCode(), "Same as repayment period"); + new EnumOptionData(InterestCalculationPeriodMethod.SAME_AS_REPAYMENT_PERIOD.getValue().longValue(), + InterestCalculationPeriodMethod.SAME_AS_REPAYMENT_PERIOD.getCode(), "Same as repayment period"); default -> new EnumOptionData(InterestCalculationPeriodMethod.INVALID.getValue().longValue(), InterestCalculationPeriodMethod.INVALID.getCode(), "Invalid"); }; @@ -263,91 +268,113 @@ public static LoanTransactionEnumData transactionType(final LoanTransactionType case REPAYMENT -> new LoanTransactionEnumData(LoanTransactionType.REPAYMENT.getValue().longValue(), LoanTransactionType.REPAYMENT.getCode(), "Repayment"); case REPAYMENT_AT_DISBURSEMENT -> - new LoanTransactionEnumData(LoanTransactionType.REPAYMENT_AT_DISBURSEMENT.getValue().longValue(), - LoanTransactionType.REPAYMENT_AT_DISBURSEMENT.getCode(), "Repayment (at time of disbursement)"); + new LoanTransactionEnumData(LoanTransactionType.REPAYMENT_AT_DISBURSEMENT.getValue().longValue(), + LoanTransactionType.REPAYMENT_AT_DISBURSEMENT.getCode(), "Repayment (at time of disbursement)"); case CONTRA -> new LoanTransactionEnumData(LoanTransactionType.CONTRA.getValue().longValue(), LoanTransactionType.CONTRA.getCode(), "Reversal"); - case WAIVE_INTEREST -> new LoanTransactionEnumData(LoanTransactionType.WAIVE_INTEREST.getValue().longValue(), - LoanTransactionType.WAIVE_INTEREST.getCode(), "Waive interest"); - case MARKED_FOR_RESCHEDULING -> new LoanTransactionEnumData(LoanTransactionType.MARKED_FOR_RESCHEDULING.getValue().longValue(), - LoanTransactionType.MARKED_FOR_RESCHEDULING.getCode(), "Close (as rescheduled)"); + case WAIVE_INTEREST -> + new LoanTransactionEnumData(LoanTransactionType.WAIVE_INTEREST.getValue().longValue(), + LoanTransactionType.WAIVE_INTEREST.getCode(), "Waive interest"); + case MARKED_FOR_RESCHEDULING -> + new LoanTransactionEnumData(LoanTransactionType.MARKED_FOR_RESCHEDULING.getValue().longValue(), + LoanTransactionType.MARKED_FOR_RESCHEDULING.getCode(), "Close (as rescheduled)"); case WRITEOFF -> new LoanTransactionEnumData(LoanTransactionType.WRITEOFF.getValue().longValue(), LoanTransactionType.WRITEOFF.getCode(), "Close (as written-off)"); - case RECOVERY_REPAYMENT -> new LoanTransactionEnumData(LoanTransactionType.RECOVERY_REPAYMENT.getValue().longValue(), - LoanTransactionType.RECOVERY_REPAYMENT.getCode(), "Repayment (after write-off)"); + case RECOVERY_REPAYMENT -> + new LoanTransactionEnumData(LoanTransactionType.RECOVERY_REPAYMENT.getValue().longValue(), + LoanTransactionType.RECOVERY_REPAYMENT.getCode(), "Repayment (after write-off)"); case WAIVE_CHARGES -> new LoanTransactionEnumData(LoanTransactionType.WAIVE_CHARGES.getValue().longValue(), LoanTransactionType.WAIVE_CHARGES.getCode(), "Waive loan charges"); case ACCRUAL -> new LoanTransactionEnumData(LoanTransactionType.ACCRUAL.getValue().longValue(), LoanTransactionType.ACCRUAL.getCode(), "Accrual"); - case APPROVE_TRANSFER -> new LoanTransactionEnumData(LoanTransactionType.APPROVE_TRANSFER.getValue().longValue(), - LoanTransactionType.APPROVE_TRANSFER.getCode(), "Transfer approved"); - case INITIATE_TRANSFER -> new LoanTransactionEnumData(LoanTransactionType.INITIATE_TRANSFER.getValue().longValue(), - LoanTransactionType.INITIATE_TRANSFER.getCode(), "Transfer initiated"); - case WITHDRAW_TRANSFER -> new LoanTransactionEnumData(LoanTransactionType.WITHDRAW_TRANSFER.getValue().longValue(), - LoanTransactionType.WITHDRAW_TRANSFER.getCode(), "Transfer Withdrawn"); - case REJECT_TRANSFER -> new LoanTransactionEnumData(LoanTransactionType.REJECT_TRANSFER.getValue().longValue(), - LoanTransactionType.REJECT_TRANSFER.getCode(), "Transfer Rejected"); + case APPROVE_TRANSFER -> + new LoanTransactionEnumData(LoanTransactionType.APPROVE_TRANSFER.getValue().longValue(), + LoanTransactionType.APPROVE_TRANSFER.getCode(), "Transfer approved"); + case INITIATE_TRANSFER -> + new LoanTransactionEnumData(LoanTransactionType.INITIATE_TRANSFER.getValue().longValue(), + LoanTransactionType.INITIATE_TRANSFER.getCode(), "Transfer initiated"); + case WITHDRAW_TRANSFER -> + new LoanTransactionEnumData(LoanTransactionType.WITHDRAW_TRANSFER.getValue().longValue(), + LoanTransactionType.WITHDRAW_TRANSFER.getCode(), "Transfer Withdrawn"); + case REJECT_TRANSFER -> + new LoanTransactionEnumData(LoanTransactionType.REJECT_TRANSFER.getValue().longValue(), + LoanTransactionType.REJECT_TRANSFER.getCode(), "Transfer Rejected"); case REFUND -> new LoanTransactionEnumData(LoanTransactionType.REFUND.getValue().longValue(), LoanTransactionType.REFUND.getCode(), "Transfer Refund"); - case CHARGE_PAYMENT -> new LoanTransactionEnumData(LoanTransactionType.CHARGE_PAYMENT.getValue().longValue(), - LoanTransactionType.CHARGE_PAYMENT.getCode(), "Charge Payment"); - case REFUND_FOR_ACTIVE_LOAN -> new LoanTransactionEnumData(LoanTransactionType.REFUND_FOR_ACTIVE_LOAN.getValue().longValue(), - LoanTransactionType.REFUND_FOR_ACTIVE_LOAN.getCode(), "Refund"); - case INCOME_POSTING -> new LoanTransactionEnumData(LoanTransactionType.INCOME_POSTING.getValue().longValue(), - LoanTransactionType.INCOME_POSTING.getCode(), "Income Posting"); - case CREDIT_BALANCE_REFUND -> new LoanTransactionEnumData(LoanTransactionType.CREDIT_BALANCE_REFUND.getValue().longValue(), - LoanTransactionType.CREDIT_BALANCE_REFUND.getCode(), "Credit Balance Refund"); - case MERCHANT_ISSUED_REFUND -> new LoanTransactionEnumData(LoanTransactionType.MERCHANT_ISSUED_REFUND.getValue().longValue(), - LoanTransactionType.MERCHANT_ISSUED_REFUND.getCode(), "Merchant Issued Refund"); + case CHARGE_PAYMENT -> + new LoanTransactionEnumData(LoanTransactionType.CHARGE_PAYMENT.getValue().longValue(), + LoanTransactionType.CHARGE_PAYMENT.getCode(), "Charge Payment"); + case REFUND_FOR_ACTIVE_LOAN -> + new LoanTransactionEnumData(LoanTransactionType.REFUND_FOR_ACTIVE_LOAN.getValue().longValue(), + LoanTransactionType.REFUND_FOR_ACTIVE_LOAN.getCode(), "Refund"); + case INCOME_POSTING -> + new LoanTransactionEnumData(LoanTransactionType.INCOME_POSTING.getValue().longValue(), + LoanTransactionType.INCOME_POSTING.getCode(), "Income Posting"); + case CREDIT_BALANCE_REFUND -> + new LoanTransactionEnumData(LoanTransactionType.CREDIT_BALANCE_REFUND.getValue().longValue(), + LoanTransactionType.CREDIT_BALANCE_REFUND.getCode(), "Credit Balance Refund"); + case MERCHANT_ISSUED_REFUND -> + new LoanTransactionEnumData(LoanTransactionType.MERCHANT_ISSUED_REFUND.getValue().longValue(), + LoanTransactionType.MERCHANT_ISSUED_REFUND.getCode(), "Merchant Issued Refund"); case PAYOUT_REFUND -> new LoanTransactionEnumData(LoanTransactionType.PAYOUT_REFUND.getValue().longValue(), LoanTransactionType.PAYOUT_REFUND.getCode(), "Payout Refund"); - case GOODWILL_CREDIT -> new LoanTransactionEnumData(LoanTransactionType.GOODWILL_CREDIT.getValue().longValue(), - LoanTransactionType.GOODWILL_CREDIT.getCode(), "Goodwill Credit"); - case INTEREST_PAYMENT_WAIVER -> new LoanTransactionEnumData(LoanTransactionType.INTEREST_PAYMENT_WAIVER.getValue().longValue(), - LoanTransactionType.INTEREST_PAYMENT_WAIVER.getCode(), "Interest Payment Waiver"); + case GOODWILL_CREDIT -> + new LoanTransactionEnumData(LoanTransactionType.GOODWILL_CREDIT.getValue().longValue(), + LoanTransactionType.GOODWILL_CREDIT.getCode(), "Goodwill Credit"); + case INTEREST_PAYMENT_WAIVER -> + new LoanTransactionEnumData(LoanTransactionType.INTEREST_PAYMENT_WAIVER.getValue().longValue(), + LoanTransactionType.INTEREST_PAYMENT_WAIVER.getCode(), "Interest Payment Waiver"); case CHARGE_REFUND -> new LoanTransactionEnumData(LoanTransactionType.CHARGE_REFUND.getValue().longValue(), LoanTransactionType.CHARGE_REFUND.getCode(), "Charge Refund"); case CHARGEBACK -> new LoanTransactionEnumData(LoanTransactionType.CHARGEBACK.getValue().longValue(), LoanTransactionType.CHARGEBACK.getCode(), "Chargeback"); - case CHARGE_ADJUSTMENT -> new LoanTransactionEnumData(LoanTransactionType.CHARGE_ADJUSTMENT.getValue().longValue(), - LoanTransactionType.CHARGE_ADJUSTMENT.getCode(), "Charge Adjustment"); + case CHARGE_ADJUSTMENT -> + new LoanTransactionEnumData(LoanTransactionType.CHARGE_ADJUSTMENT.getValue().longValue(), + LoanTransactionType.CHARGE_ADJUSTMENT.getCode(), "Charge Adjustment"); case CHARGE_OFF -> new LoanTransactionEnumData(LoanTransactionType.CHARGE_OFF.getValue().longValue(), LoanTransactionType.CHARGE_OFF.getCode(), "Charge-off"); case DOWN_PAYMENT -> new LoanTransactionEnumData(LoanTransactionType.DOWN_PAYMENT.getValue().longValue(), LoanTransactionType.DOWN_PAYMENT.getCode(), "Down Payment"); - case REAGE -> new LoanTransactionEnumData(LoanTransactionType.REAGE.getValue().longValue(), LoanTransactionType.REAGE.getCode(), - "Re-age"); + case REAGE -> + new LoanTransactionEnumData(LoanTransactionType.REAGE.getValue().longValue(), LoanTransactionType.REAGE.getCode(), + "Re-age"); case REAMORTIZE -> new LoanTransactionEnumData(LoanTransactionType.REAMORTIZE.getValue().longValue(), LoanTransactionType.REAMORTIZE.getCode(), "Re-amortize"); - case ACCRUAL_ACTIVITY -> new LoanTransactionEnumData(LoanTransactionType.ACCRUAL_ACTIVITY.getValue().longValue(), - LoanTransactionType.ACCRUAL_ACTIVITY.getCode(), "Accrual Activity"); - case INTEREST_REFUND -> new LoanTransactionEnumData(LoanTransactionType.INTEREST_REFUND.getValue().longValue(), - LoanTransactionType.INTEREST_REFUND.getCode(), "Interest Refund"); - case ACCRUAL_ADJUSTMENT -> new LoanTransactionEnumData(LoanTransactionType.ACCRUAL_ADJUSTMENT.getValue().longValue(), - LoanTransactionType.ACCRUAL_ADJUSTMENT.getCode(), "Accrual Adjustment"); - case CAPITALIZED_INCOME -> new LoanTransactionEnumData(LoanTransactionType.CAPITALIZED_INCOME.getValue().longValue(), - LoanTransactionType.CAPITALIZED_INCOME.getCode(), "Capitalized Income"); + case ACCRUAL_ACTIVITY -> + new LoanTransactionEnumData(LoanTransactionType.ACCRUAL_ACTIVITY.getValue().longValue(), + LoanTransactionType.ACCRUAL_ACTIVITY.getCode(), "Accrual Activity"); + case INTEREST_REFUND -> + new LoanTransactionEnumData(LoanTransactionType.INTEREST_REFUND.getValue().longValue(), + LoanTransactionType.INTEREST_REFUND.getCode(), "Interest Refund"); + case ACCRUAL_ADJUSTMENT -> + new LoanTransactionEnumData(LoanTransactionType.ACCRUAL_ADJUSTMENT.getValue().longValue(), + LoanTransactionType.ACCRUAL_ADJUSTMENT.getCode(), "Accrual Adjustment"); + case CAPITALIZED_INCOME -> + new LoanTransactionEnumData(LoanTransactionType.CAPITALIZED_INCOME.getValue().longValue(), + LoanTransactionType.CAPITALIZED_INCOME.getCode(), "Capitalized Income"); case CAPITALIZED_INCOME_AMORTIZATION -> - new LoanTransactionEnumData(LoanTransactionType.CAPITALIZED_INCOME_AMORTIZATION.getValue().longValue(), - LoanTransactionType.CAPITALIZED_INCOME_AMORTIZATION.getCode(), "Capitalized Income Amortization"); + new LoanTransactionEnumData(LoanTransactionType.CAPITALIZED_INCOME_AMORTIZATION.getValue().longValue(), + LoanTransactionType.CAPITALIZED_INCOME_AMORTIZATION.getCode(), "Capitalized Income Amortization"); case CAPITALIZED_INCOME_ADJUSTMENT -> - new LoanTransactionEnumData(LoanTransactionType.CAPITALIZED_INCOME_ADJUSTMENT.getValue().longValue(), - LoanTransactionType.CAPITALIZED_INCOME_ADJUSTMENT.getCode(), "Capitalized Income Adjustment"); - case CONTRACT_TERMINATION -> new LoanTransactionEnumData(LoanTransactionType.CONTRACT_TERMINATION.getValue().longValue(), - LoanTransactionType.CONTRACT_TERMINATION.getCode(), "Contract Termination"); + new LoanTransactionEnumData(LoanTransactionType.CAPITALIZED_INCOME_ADJUSTMENT.getValue().longValue(), + LoanTransactionType.CAPITALIZED_INCOME_ADJUSTMENT.getCode(), "Capitalized Income Adjustment"); + case CONTRACT_TERMINATION -> + new LoanTransactionEnumData(LoanTransactionType.CONTRACT_TERMINATION.getValue().longValue(), + LoanTransactionType.CONTRACT_TERMINATION.getCode(), "Contract Termination"); case CAPITALIZED_INCOME_AMORTIZATION_ADJUSTMENT -> new LoanTransactionEnumData( LoanTransactionType.CAPITALIZED_INCOME_AMORTIZATION_ADJUSTMENT.getValue().longValue(), LoanTransactionType.CAPITALIZED_INCOME_AMORTIZATION_ADJUSTMENT.getCode(), "Capitalized Income Amortization Adjustment"); case BUY_DOWN_FEE -> new LoanTransactionEnumData(LoanTransactionType.BUY_DOWN_FEE.getValue().longValue(), LoanTransactionType.BUY_DOWN_FEE.getCode(), "Buy Down Fee"); - case BUY_DOWN_FEE_ADJUSTMENT -> new LoanTransactionEnumData(LoanTransactionType.BUY_DOWN_FEE_ADJUSTMENT.getValue().longValue(), - LoanTransactionType.BUY_DOWN_FEE_ADJUSTMENT.getCode(), "Buy Down Fee Adjustment"); + case BUY_DOWN_FEE_ADJUSTMENT -> + new LoanTransactionEnumData(LoanTransactionType.BUY_DOWN_FEE_ADJUSTMENT.getValue().longValue(), + LoanTransactionType.BUY_DOWN_FEE_ADJUSTMENT.getCode(), "Buy Down Fee Adjustment"); case BUY_DOWN_FEE_AMORTIZATION -> - new LoanTransactionEnumData(LoanTransactionType.BUY_DOWN_FEE_AMORTIZATION.getValue().longValue(), - LoanTransactionType.BUY_DOWN_FEE_AMORTIZATION.getCode(), "Buy Down Fee Amortization"); + new LoanTransactionEnumData(LoanTransactionType.BUY_DOWN_FEE_AMORTIZATION.getValue().longValue(), + LoanTransactionType.BUY_DOWN_FEE_AMORTIZATION.getCode(), "Buy Down Fee Amortization"); case BUY_DOWN_FEE_AMORTIZATION_ADJUSTMENT -> - new LoanTransactionEnumData(LoanTransactionType.BUY_DOWN_FEE_AMORTIZATION_ADJUSTMENT.getValue().longValue(), - LoanTransactionType.BUY_DOWN_FEE_AMORTIZATION_ADJUSTMENT.getCode(), "Buy Down Fee Amortization Adjustment"); + new LoanTransactionEnumData(LoanTransactionType.BUY_DOWN_FEE_AMORTIZATION_ADJUSTMENT.getValue().longValue(), + LoanTransactionType.BUY_DOWN_FEE_AMORTIZATION_ADJUSTMENT.getCode(), "Buy Down Fee Amortization Adjustment"); }; } @@ -366,22 +393,29 @@ public static LoanStatusEnumData status(final Integer statusId) { public static LoanStatusEnumData status(final LoanStatus status) { return switch (status) { - case INVALID -> new LoanStatusEnumData(LoanStatus.INVALID.getValue().longValue(), LoanStatus.INVALID.getCode(), "Invalid"); - case SUBMITTED_AND_PENDING_APPROVAL -> new LoanStatusEnumData(LoanStatus.SUBMITTED_AND_PENDING_APPROVAL.getValue().longValue(), - LoanStatus.SUBMITTED_AND_PENDING_APPROVAL.getCode(), "Submitted and pending approval"); - case APPROVED -> new LoanStatusEnumData(LoanStatus.APPROVED.getValue().longValue(), LoanStatus.APPROVED.getCode(), "Approved"); - case ACTIVE -> new LoanStatusEnumData(LoanStatus.ACTIVE.getValue().longValue(), LoanStatus.ACTIVE.getCode(), "Active"); - case REJECTED -> new LoanStatusEnumData(LoanStatus.REJECTED.getValue().longValue(), LoanStatus.REJECTED.getCode(), "Rejected"); + case INVALID -> + new LoanStatusEnumData(LoanStatus.INVALID.getValue().longValue(), LoanStatus.INVALID.getCode(), "Invalid"); + case SUBMITTED_AND_PENDING_APPROVAL -> + new LoanStatusEnumData(LoanStatus.SUBMITTED_AND_PENDING_APPROVAL.getValue().longValue(), + LoanStatus.SUBMITTED_AND_PENDING_APPROVAL.getCode(), "Submitted and pending approval"); + case APPROVED -> + new LoanStatusEnumData(LoanStatus.APPROVED.getValue().longValue(), LoanStatus.APPROVED.getCode(), "Approved"); + case ACTIVE -> + new LoanStatusEnumData(LoanStatus.ACTIVE.getValue().longValue(), LoanStatus.ACTIVE.getCode(), "Active"); + case REJECTED -> + new LoanStatusEnumData(LoanStatus.REJECTED.getValue().longValue(), LoanStatus.REJECTED.getCode(), "Rejected"); case WITHDRAWN_BY_CLIENT -> new LoanStatusEnumData(LoanStatus.WITHDRAWN_BY_CLIENT.getValue().longValue(), LoanStatus.WITHDRAWN_BY_CLIENT.getCode(), "Withdrawn by applicant"); - case CLOSED_OBLIGATIONS_MET -> new LoanStatusEnumData(LoanStatus.CLOSED_OBLIGATIONS_MET.getValue().longValue(), - LoanStatus.CLOSED_OBLIGATIONS_MET.getCode(), "Closed (obligations met)"); + case CLOSED_OBLIGATIONS_MET -> + new LoanStatusEnumData(LoanStatus.CLOSED_OBLIGATIONS_MET.getValue().longValue(), + LoanStatus.CLOSED_OBLIGATIONS_MET.getCode(), "Closed (obligations met)"); case CLOSED_WRITTEN_OFF -> new LoanStatusEnumData(LoanStatus.CLOSED_WRITTEN_OFF.getValue().longValue(), LoanStatus.CLOSED_WRITTEN_OFF.getCode(), "Closed (written off)"); case CLOSED_RESCHEDULE_OUTSTANDING_AMOUNT -> - new LoanStatusEnumData(LoanStatus.CLOSED_RESCHEDULE_OUTSTANDING_AMOUNT.getValue().longValue(), - LoanStatus.CLOSED_RESCHEDULE_OUTSTANDING_AMOUNT.getCode(), "Closed (rescheduled)"); - case OVERPAID -> new LoanStatusEnumData(LoanStatus.OVERPAID.getValue().longValue(), LoanStatus.OVERPAID.getCode(), "Overpaid"); + new LoanStatusEnumData(LoanStatus.CLOSED_RESCHEDULE_OUTSTANDING_AMOUNT.getValue().longValue(), + LoanStatus.CLOSED_RESCHEDULE_OUTSTANDING_AMOUNT.getCode(), "Closed (rescheduled)"); + case OVERPAID -> + new LoanStatusEnumData(LoanStatus.OVERPAID.getValue().longValue(), LoanStatus.OVERPAID.getCode(), "Overpaid"); case TRANSFER_IN_PROGRESS -> new LoanStatusEnumData(LoanStatus.TRANSFER_IN_PROGRESS.getValue().longValue(), LoanStatus.TRANSFER_IN_PROGRESS.getCode(), "Transfer in progress"); case TRANSFER_ON_HOLD -> new LoanStatusEnumData(LoanStatus.TRANSFER_ON_HOLD.getValue().longValue(), @@ -417,7 +451,7 @@ public static EnumOptionData loanCycleParamType(final LoanProductParamType type) case REPAYMENT -> new EnumOptionData(LoanProductParamType.REPAYMENT.getValue().longValue(), LoanProductParamType.REPAYMENT.getCode(), "repayment"); default -> - new EnumOptionData(LoanProductParamType.INVALID.getValue().longValue(), LoanProductParamType.INVALID.getCode(), "Invalid"); + new EnumOptionData(LoanProductParamType.INVALID.getValue().longValue(), LoanProductParamType.INVALID.getCode(), "Invalid"); }; } @@ -431,27 +465,32 @@ public static EnumOptionData loanVariationType(final LoanTermVariationType type) LoanTermVariationType.EMI_AMOUNT.getCode(), "emiAmount"); case INTEREST_RATE -> new EnumOptionData(LoanTermVariationType.INTEREST_RATE.getValue().longValue(), LoanTermVariationType.INTEREST_RATE.getCode(), "interestRate"); - case DELETE_INSTALLMENT -> new EnumOptionData(LoanTermVariationType.DELETE_INSTALLMENT.getValue().longValue(), - LoanTermVariationType.DELETE_INSTALLMENT.getCode(), "deleteInstallment"); + case DELETE_INSTALLMENT -> + new EnumOptionData(LoanTermVariationType.DELETE_INSTALLMENT.getValue().longValue(), + LoanTermVariationType.DELETE_INSTALLMENT.getCode(), "deleteInstallment"); case DUE_DATE -> new EnumOptionData(LoanTermVariationType.DUE_DATE.getValue().longValue(), LoanTermVariationType.DUE_DATE.getCode(), "dueDate"); - case INSERT_INSTALLMENT -> new EnumOptionData(LoanTermVariationType.INSERT_INSTALLMENT.getValue().longValue(), - LoanTermVariationType.DUE_DATE.getCode(), "insertInstallment"); + case INSERT_INSTALLMENT -> + new EnumOptionData(LoanTermVariationType.INSERT_INSTALLMENT.getValue().longValue(), + LoanTermVariationType.DUE_DATE.getCode(), "insertInstallment"); case PRINCIPAL_AMOUNT -> new EnumOptionData(LoanTermVariationType.PRINCIPAL_AMOUNT.getValue().longValue(), LoanTermVariationType.PRINCIPAL_AMOUNT.getCode(), "principalAmount"); case GRACE_ON_INTEREST -> new EnumOptionData(LoanTermVariationType.GRACE_ON_INTEREST.getValue().longValue(), LoanTermVariationType.GRACE_ON_INTEREST.getCode(), "graceOnInterest"); - case GRACE_ON_PRINCIPAL -> new EnumOptionData(LoanTermVariationType.GRACE_ON_PRINCIPAL.getValue().longValue(), - LoanTermVariationType.GRACE_ON_PRINCIPAL.getCode(), "graceOnPrincipal"); - case EXTEND_REPAYMENT_PERIOD -> new EnumOptionData(LoanTermVariationType.EXTEND_REPAYMENT_PERIOD.getValue().longValue(), - LoanTermVariationType.EXTEND_REPAYMENT_PERIOD.getCode(), "extendRepaymentPeriod"); + case GRACE_ON_PRINCIPAL -> + new EnumOptionData(LoanTermVariationType.GRACE_ON_PRINCIPAL.getValue().longValue(), + LoanTermVariationType.GRACE_ON_PRINCIPAL.getCode(), "graceOnPrincipal"); + case EXTEND_REPAYMENT_PERIOD -> + new EnumOptionData(LoanTermVariationType.EXTEND_REPAYMENT_PERIOD.getValue().longValue(), + LoanTermVariationType.EXTEND_REPAYMENT_PERIOD.getCode(), "extendRepaymentPeriod"); case INTEREST_RATE_FROM_INSTALLMENT -> - new EnumOptionData(LoanTermVariationType.INTEREST_RATE_FROM_INSTALLMENT.getValue().longValue(), - LoanTermVariationType.INTEREST_RATE_FROM_INSTALLMENT.getCode(), "interestRateForInstallment"); + new EnumOptionData(LoanTermVariationType.INTEREST_RATE_FROM_INSTALLMENT.getValue().longValue(), + LoanTermVariationType.INTEREST_RATE_FROM_INSTALLMENT.getCode(), "interestRateForInstallment"); case INTEREST_PAUSE -> new EnumOptionData(LoanTermVariationType.INTEREST_PAUSE.getValue().longValue(), LoanTermVariationType.INTEREST_PAUSE.getCode(), "interestPause"); - default -> new EnumOptionData(LoanTermVariationType.INVALID.getValue().longValue(), LoanTermVariationType.INVALID.getCode(), - "Invalid"); + default -> + new EnumOptionData(LoanTermVariationType.INVALID.getValue().longValue(), LoanTermVariationType.INVALID.getCode(), + "Invalid"); }; } @@ -465,8 +504,9 @@ public static EnumOptionData interestRecalculationCompoundingType(final Interest InterestRecalculationCompoundingMethod.FEE.getCode(), "Fee"); case INTEREST -> new EnumOptionData(InterestRecalculationCompoundingMethod.INTEREST.getValue().longValue(), InterestRecalculationCompoundingMethod.INTEREST.getCode(), "Interest"); - case INTEREST_AND_FEE -> new EnumOptionData(InterestRecalculationCompoundingMethod.INTEREST_AND_FEE.getValue().longValue(), - InterestRecalculationCompoundingMethod.INTEREST_AND_FEE.getCode(), "Fee and Interest"); + case INTEREST_AND_FEE -> + new EnumOptionData(InterestRecalculationCompoundingMethod.INTEREST_AND_FEE.getValue().longValue(), + InterestRecalculationCompoundingMethod.INTEREST_AND_FEE.getCode(), "Fee and Interest"); default -> new EnumOptionData(InterestRecalculationCompoundingMethod.NONE.getValue().longValue(), InterestRecalculationCompoundingMethod.NONE.getCode(), "None"); }; @@ -511,17 +551,18 @@ public static EnumOptionData rescheduleStrategyType(final int id) { public static EnumOptionData rescheduleStrategyType(final LoanRescheduleStrategyMethod type) { return switch (type) { - case REDUCE_EMI_AMOUNT -> new EnumOptionData(LoanRescheduleStrategyMethod.REDUCE_EMI_AMOUNT.getValue().longValue(), - LoanRescheduleStrategyMethod.REDUCE_EMI_AMOUNT.getCode(), "Reduce EMI amount"); + case REDUCE_EMI_AMOUNT -> + new EnumOptionData(LoanRescheduleStrategyMethod.REDUCE_EMI_AMOUNT.getValue().longValue(), + LoanRescheduleStrategyMethod.REDUCE_EMI_AMOUNT.getCode(), "Reduce EMI amount"); case REDUCE_NUMBER_OF_INSTALLMENTS -> - new EnumOptionData(LoanRescheduleStrategyMethod.REDUCE_NUMBER_OF_INSTALLMENTS.getValue().longValue(), - LoanRescheduleStrategyMethod.REDUCE_NUMBER_OF_INSTALLMENTS.getCode(), "Reduce number of installments"); + new EnumOptionData(LoanRescheduleStrategyMethod.REDUCE_NUMBER_OF_INSTALLMENTS.getValue().longValue(), + LoanRescheduleStrategyMethod.REDUCE_NUMBER_OF_INSTALLMENTS.getCode(), "Reduce number of installments"); case RESCHEDULE_NEXT_REPAYMENTS -> - new EnumOptionData(LoanRescheduleStrategyMethod.RESCHEDULE_NEXT_REPAYMENTS.getValue().longValue(), - LoanRescheduleStrategyMethod.RESCHEDULE_NEXT_REPAYMENTS.getCode(), "Reschedule next repayments"); + new EnumOptionData(LoanRescheduleStrategyMethod.RESCHEDULE_NEXT_REPAYMENTS.getValue().longValue(), + LoanRescheduleStrategyMethod.RESCHEDULE_NEXT_REPAYMENTS.getCode(), "Reschedule next repayments"); case ADJUST_LAST_UNPAID_PERIOD -> - new EnumOptionData(LoanRescheduleStrategyMethod.ADJUST_LAST_UNPAID_PERIOD.getValue().longValue(), - LoanRescheduleStrategyMethod.ADJUST_LAST_UNPAID_PERIOD.getCode(), "Adjust last, unpaid period"); + new EnumOptionData(LoanRescheduleStrategyMethod.ADJUST_LAST_UNPAID_PERIOD.getValue().longValue(), + LoanRescheduleStrategyMethod.ADJUST_LAST_UNPAID_PERIOD.getCode(), "Adjust last, unpaid period"); default -> new EnumOptionData(LoanRescheduleStrategyMethod.INVALID.getValue().longValue(), LoanRescheduleStrategyMethod.INVALID.getCode(), "Invalid"); }; @@ -537,8 +578,9 @@ public static EnumOptionData interestRecalculationFrequencyType(final Recalculat RecalculationFrequencyType.DAILY.getCode(), "Daily"); case MONTHLY -> new EnumOptionData(RecalculationFrequencyType.MONTHLY.getValue().longValue(), RecalculationFrequencyType.MONTHLY.getCode(), "Monthly"); - case SAME_AS_REPAYMENT_PERIOD -> new EnumOptionData(RecalculationFrequencyType.SAME_AS_REPAYMENT_PERIOD.getValue().longValue(), - RecalculationFrequencyType.SAME_AS_REPAYMENT_PERIOD.getCode(), "Same as repayment period"); + case SAME_AS_REPAYMENT_PERIOD -> + new EnumOptionData(RecalculationFrequencyType.SAME_AS_REPAYMENT_PERIOD.getValue().longValue(), + RecalculationFrequencyType.SAME_AS_REPAYMENT_PERIOD.getCode(), "Same as repayment period"); case WEEKLY -> new EnumOptionData(RecalculationFrequencyType.WEEKLY.getValue().longValue(), RecalculationFrequencyType.WEEKLY.getCode(), "Weekly"); default -> new EnumOptionData(RecalculationFrequencyType.INVALID.getValue().longValue(), @@ -556,13 +598,13 @@ public static EnumOptionData preCloseInterestCalculationStrategy(final LoanPreCl case TILL_PRE_CLOSURE_DATE: optionData = new EnumOptionData(LoanPreCloseInterestCalculationStrategy.TILL_PRE_CLOSURE_DATE.getValue().longValue(), LoanPreCloseInterestCalculationStrategy.TILL_PRE_CLOSURE_DATE.getCode(), "Till Pre-Close Date"); - break; + break; case TILL_REST_FREQUENCY_DATE: optionData = new EnumOptionData(LoanPreCloseInterestCalculationStrategy.TILL_REST_FREQUENCY_DATE.getValue().longValue(), LoanPreCloseInterestCalculationStrategy.TILL_REST_FREQUENCY_DATE.getCode(), "Till Rest Frequency Date"); - break; + break; case NONE: - break; + break; } return optionData; } diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadBasicDetailsService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadBasicDetailsService.java index b790823e811..74b17bd4d34 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadBasicDetailsService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadBasicDetailsService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanproduct.service; import java.util.Collection; + import org.apache.fineract.portfolio.loanproduct.data.LoanProductBasicDetailsData; public interface LoanProductReadBasicDetailsService { diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadBasicDetailsServiceImpl.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadBasicDetailsServiceImpl.java index b966dc6b597..3d38624b6b5 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadBasicDetailsServiceImpl.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadBasicDetailsServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanproduct.service; import java.util.Collection; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.portfolio.loanproduct.data.LoanProductBasicDetailsData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadPlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadPlatformService.java index 5536b45b33d..79141366f69 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadPlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanproduct.service; import java.util.Collection; + import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.apache.fineract.portfolio.loanproduct.data.AdvancedPaymentData; import org.apache.fineract.portfolio.loanproduct.data.CreditAllocationData; diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductWritePlatformService.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductWritePlatformService.java index d95de8fdae4..05f07f94bea 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductWritePlatformService.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/domain/PostDatedChecks.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/domain/PostDatedChecks.java index 882194d2599..1382e2c912b 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/domain/PostDatedChecks.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/domain/PostDatedChecks.java @@ -6,9 +6,9 @@ * 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 @@ -23,10 +23,12 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.HashMap; import java.util.Map; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -61,11 +63,12 @@ public class PostDatedChecks extends AbstractPersistableCustom { @Column(name = "check_no", nullable = false, unique = true) private Long checkNo; - public PostDatedChecks() {} + public PostDatedChecks() { + } private PostDatedChecks(final Long accountNo, final String bankName, final BigDecimal amount, - final LoanRepaymentScheduleInstallment loanRepaymentScheduleInstallment, final LocalDate date, final Loan loan, - final Long checkNo) { + final LoanRepaymentScheduleInstallment loanRepaymentScheduleInstallment, final LocalDate date, final Loan loan, + final Long checkNo) { this.bankName = bankName; this.accountNo = accountNo; this.amount = amount; @@ -76,7 +79,7 @@ private PostDatedChecks(final Long accountNo, final String bankName, final BigDe } public static PostDatedChecks instanceOf(final Long accountNo, final String bankName, final BigDecimal amount, - final LoanRepaymentScheduleInstallment loanRepaymentScheduleInstallment, final Loan loan, final Long checkNo) { + final LoanRepaymentScheduleInstallment loanRepaymentScheduleInstallment, final Loan loan, final Long checkNo) { return new PostDatedChecks(accountNo, bankName, amount, loanRepaymentScheduleInstallment, loanRepaymentScheduleInstallment.getDueDate(), loan, checkNo); } diff --git a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/module-changelog-master.xml b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/module-changelog-master.xml index e086e3124da..997402958cc 100644 --- a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/module-changelog-master.xml +++ b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/module-changelog-master.xml @@ -20,41 +20,45 @@ --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1002_add_payment_allocation_rule.xml b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1002_add_payment_allocation_rule.xml index ae59865f116..5c85a31ed85 100644 --- a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1002_add_payment_allocation_rule.xml +++ b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1002_add_payment_allocation_rule.xml @@ -28,7 +28,8 @@ - + @@ -51,7 +52,8 @@ - + @@ -107,21 +109,28 @@ - - + + - - + diff --git a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1008_add_loan_installment_delinquency_tag.xml b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1008_add_loan_installment_delinquency_tag.xml index a7dc10ee709..6ccfddcc826 100644 --- a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1008_add_loan_installment_delinquency_tag.xml +++ b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1008_add_loan_installment_delinquency_tag.xml @@ -28,32 +28,32 @@ - + - + - + - + - + - + - + - + @@ -78,7 +78,8 @@ - @@ -86,9 +87,11 @@ constraintName="FK_m_delinquency_installment_tags_loan" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id" referencedTableName="m_loan" validate="true"/> - + referencedColumnNames="id" referencedTableName="m_loan_repayment_schedule" + validate="true"/> diff --git a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1009_refactor_loan_Installment_delinquency_tag.xml b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1009_refactor_loan_Installment_delinquency_tag.xml index 62df114406b..f95c366c319 100644 --- a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1009_refactor_loan_Installment_delinquency_tag.xml +++ b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1009_refactor_loan_Installment_delinquency_tag.xml @@ -23,9 +23,11 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> - + - + diff --git a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1011_add_delinquency_actions_table.xml b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1011_add_delinquency_actions_table.xml index 2a86c409318..45857e24f40 100644 --- a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1011_add_delinquency_actions_table.xml +++ b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1011_add_delinquency_actions_table.xml @@ -28,7 +28,7 @@ - + @@ -38,10 +38,10 @@ - + - + diff --git a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1016_add_credit_allocation_rule.xml b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1016_add_credit_allocation_rule.xml index bbcb645531c..587fedc7342 100644 --- a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1016_add_credit_allocation_rule.xml +++ b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1016_add_credit_allocation_rule.xml @@ -28,7 +28,8 @@ - + @@ -48,7 +49,8 @@ - + @@ -101,21 +103,28 @@ - - + + - - + diff --git a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1017_add_fee_and_penalty_adjustments_to_loan.xml b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1017_add_fee_and_penalty_adjustments_to_loan.xml index 6c110c4e98f..330c392227a 100644 --- a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1017_add_fee_and_penalty_adjustments_to_loan.xml +++ b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1017_add_fee_and_penalty_adjustments_to_loan.xml @@ -19,7 +19,9 @@ under the License. --> - + diff --git a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1018_rename_credited_principal_back_to_credits_amount.xml b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1018_rename_credited_principal_back_to_credits_amount.xml index 129548bba2d..f1b45ebcab8 100644 --- a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1018_rename_credited_principal_back_to_credits_amount.xml +++ b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1018_rename_credited_principal_back_to_credits_amount.xml @@ -19,13 +19,17 @@ under the License. --> - + SELECT 1 - FROM information_schema.columns - WHERE table_name='m_loan_repayment_schedule' and column_name='credited_principal' + FROM information_schema.columns + WHERE table_name='m_loan_repayment_schedule' and column_name='credited_principal' + - + diff --git a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1020_add_re_aged_flag_to_loan_installment.xml b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1020_add_re_aged_flag_to_loan_installment.xml index df8158a9c2f..5cd8423baf2 100644 --- a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1020_add_re_aged_flag_to_loan_installment.xml +++ b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1020_add_re_aged_flag_to_loan_installment.xml @@ -19,7 +19,9 @@ under the License. --> - + diff --git a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1021_add_loan_status_change_history.xml b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1021_add_loan_status_change_history.xml index 413bcf35305..ea3c07d547f 100644 --- a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1021_add_loan_status_change_history.xml +++ b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1021_add_loan_status_change_history.xml @@ -28,7 +28,8 @@ - + @@ -66,7 +67,8 @@ UPDATE m_loan_recalculation_details SET pre_close_interest_calculation_strategy = 2 WHERE loan_id IN ( - SELECT ml.id FROM m_loan ml, m_product_loan_recalculation_details plrd WHERE plrd.product_id = ml.product_id AND plrd.pre_close_interest_calculation_strategy = 2 + SELECT ml.id FROM m_loan ml, m_product_loan_recalculation_details plrd WHERE plrd.product_id = ml.product_id + AND plrd.pre_close_interest_calculation_strategy = 2 ) diff --git a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1029_add_installment_amount_in_multiples_of_to_loan.xml b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1029_add_installment_amount_in_multiples_of_to_loan.xml index dcfc9823ce4..91095cd1354 100644 --- a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1029_add_installment_amount_in_multiples_of_to_loan.xml +++ b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1029_add_installment_amount_in_multiples_of_to_loan.xml @@ -32,7 +32,7 @@ 9:e513a98940f115bc53cdd5e656b19bcd UPDATE m_loan SET installment_amount_in_multiples_of = lp.instalment_amount_in_multiples_of FROM ( - SELECT id, instalment_amount_in_multiples_of FROM m_product_loan + SELECT id, instalment_amount_in_multiples_of FROM m_product_loan ) lp WHERE lp.id = m_loan.product_id AND lp.instalment_amount_in_multiples_of IS NOT NULL @@ -40,11 +40,12 @@ 9:e7490702ae64f9df7509a1c4fc37d2ba UPDATE m_loan JOIN m_product_loan lp ON lp.id = m_loan.product_id - SET m_loan.installment_amount_in_multiples_of = lp.instalment_amount_in_multiples_of + SET m_loan.installment_amount_in_multiples_of = lp.instalment_amount_in_multiples_of WHERE lp.instalment_amount_in_multiples_of IS NOT NULL - + diff --git a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1034_loan_reamortization_parameters.xml b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1034_loan_reamortization_parameters.xml index b1f3ad9cea9..5d37dd9ea85 100644 --- a/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1034_loan_reamortization_parameters.xml +++ b/fineract-loan/src/main/resources/db/changelog/tenant/module/loan/parts/1034_loan_reamortization_parameters.xml @@ -69,7 +69,8 @@ - diff --git a/fineract-loan/src/main/resources/jpa/static-weaving/module/fineract-loan/persistence.xml b/fineract-loan/src/main/resources/jpa/static-weaving/module/fineract-loan/persistence.xml index e25219d7750..3a4715a74ef 100644 --- a/fineract-loan/src/main/resources/jpa/static-weaving/module/fineract-loan/persistence.xml +++ b/fineract-loan/src/main/resources/jpa/static-weaving/module/fineract-loan/persistence.xml @@ -155,7 +155,7 @@ false - + diff --git a/fineract-loan/src/test/java/org/apache/fineract/infrastructure/core/exception/LinkedAccountRequiredExceptionMapperTest.java b/fineract-loan/src/test/java/org/apache/fineract/infrastructure/core/exception/LinkedAccountRequiredExceptionMapperTest.java index 1cc2f473642..9b2e303d7c4 100644 --- a/fineract-loan/src/test/java/org/apache/fineract/infrastructure/core/exception/LinkedAccountRequiredExceptionMapperTest.java +++ b/fineract-loan/src/test/java/org/apache/fineract/infrastructure/core/exception/LinkedAccountRequiredExceptionMapperTest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/test/java/org/apache/fineract/infrastructure/core/exception/LoanIdsHardLockedExceptionMapperTest.java b/fineract-loan/src/test/java/org/apache/fineract/infrastructure/core/exception/LoanIdsHardLockedExceptionMapperTest.java index 8971c199d96..cc30e649da5 100644 --- a/fineract-loan/src/test/java/org/apache/fineract/infrastructure/core/exception/LoanIdsHardLockedExceptionMapperTest.java +++ b/fineract-loan/src/test/java/org/apache/fineract/infrastructure/core/exception/LoanIdsHardLockedExceptionMapperTest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/test/java/org/apache/fineract/infrastructure/core/exception/MultiDisbursementDataRequiredExceptionMapperTest.java b/fineract-loan/src/test/java/org/apache/fineract/infrastructure/core/exception/MultiDisbursementDataRequiredExceptionMapperTest.java index 75d15c2d26d..316d0c37a19 100644 --- a/fineract-loan/src/test/java/org/apache/fineract/infrastructure/core/exception/MultiDisbursementDataRequiredExceptionMapperTest.java +++ b/fineract-loan/src/test/java/org/apache/fineract/infrastructure/core/exception/MultiDisbursementDataRequiredExceptionMapperTest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionDataTest.java b/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionDataTest.java index 4ee6a17f0f1..c7a0e8cbd36 100644 --- a/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionDataTest.java +++ b/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/data/LoanTransactionDataTest.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import java.time.LocalDate; import java.util.Collection; import java.util.List; + import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.apache.fineract.organisation.monetary.data.CurrencyData; diff --git a/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleInstallmentTest.java b/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleInstallmentTest.java index 5ab2156a5ee..ad434ea4110 100644 --- a/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleInstallmentTest.java +++ b/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/LoanRepaymentScheduleInstallmentTest.java @@ -6,9 +6,9 @@ * 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 @@ -30,6 +30,7 @@ import java.time.ZoneId; import java.util.function.Consumer; import java.util.function.Supplier; + import org.apache.fineract.organisation.monetary.domain.MoneyHelper; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; diff --git a/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/SingleLoanChargeRepaymentScheduleProcessingWrapperTest.java b/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/SingleLoanChargeRepaymentScheduleProcessingWrapperTest.java index 6d5fd8f8787..599c3ab88e1 100644 --- a/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/SingleLoanChargeRepaymentScheduleProcessingWrapperTest.java +++ b/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/SingleLoanChargeRepaymentScheduleProcessingWrapperTest.java @@ -6,9 +6,9 @@ * 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 @@ -33,6 +33,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.businessdate.domain.BusinessDateType; import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil; import org.apache.fineract.organisation.monetary.data.CurrencyData; @@ -121,8 +122,8 @@ public void testTwoPeriodsWithPenaltyCharge() { } private void customVerify(LoanRepaymentScheduleInstallment period, String expectedFeeChargesDue, String expectedFeeChargesWaived, - String expectedFeeChargesWrittenOff, String expectedPenaltyChargesDue, String expectedPenaltyChargesWaived, - String expectedPenaltyChargesWrittenOff) { + String expectedFeeChargesWrittenOff, String expectedPenaltyChargesDue, String expectedPenaltyChargesWaived, + String expectedPenaltyChargesWrittenOff) { verify(period, times(1)).addToChargePortion(feeChargesDue.capture(), feeChargesWaived.capture(), feeChargesWrittenOff.capture(), penaltyChargesDue.capture(), penaltyChargesWaived.capture(), penaltyChargesWrittenOff.capture()); diff --git a/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AprCalculatorTest.java b/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AprCalculatorTest.java index f11129deee6..9a43c8e5bb0 100644 --- a/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AprCalculatorTest.java +++ b/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/AprCalculatorTest.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.math.BigDecimal; import java.math.MathContext; import java.math.RoundingMode; + import org.apache.fineract.organisation.monetary.domain.MoneyHelper; import org.apache.fineract.portfolio.common.domain.DaysInYearType; import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType; diff --git a/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanTransactionMapperTest.java b/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanTransactionMapperTest.java index 31e11e58a0f..301732ec3ff 100644 --- a/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanTransactionMapperTest.java +++ b/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanTransactionMapperTest.java @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.time.ZoneId; + import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; diff --git a/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductTest.java b/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductTest.java index 6c3f3ffde4b..2be641a7672 100644 --- a/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductTest.java +++ b/fineract-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/LoanProductTest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-mix/build.gradle b/fineract-mix/build.gradle index bbde3766997..3f3dc209919 100644 --- a/fineract-mix/build.gradle +++ b/fineract-mix/build.gradle @@ -52,9 +52,9 @@ apply from: 'dependencies.gradle' // https://github.com/andygoossens/gradle-modernizer-plugin modernizer { ignoreClassNamePatterns = [ - '.*AbstractPersistableCustom', - '.*EntityTables', - '.*domain.*' + '.*AbstractPersistableCustom', + '.*EntityTables', + '.*domain.*' ] } diff --git a/fineract-mix/dependencies.gradle b/fineract-mix/dependencies.gradle index cf823616690..b49a6f19af7 100644 --- a/fineract-mix/dependencies.gradle +++ b/fineract-mix/dependencies.gradle @@ -27,7 +27,7 @@ dependencies { implementation( project(path: ':fineract-core'), project(path: ':fineract-command'), - ) + ) implementation( 'org.springframework.boot:spring-boot-starter-web', @@ -48,7 +48,7 @@ dependencies { 'org.mapstruct:mapstruct', 'io.github.resilience4j:resilience4j-spring-boot3', - ) + ) compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' annotationProcessor 'org.mapstruct:mapstruct-processor' @@ -58,13 +58,13 @@ dependencies { // testCompile dependencies are ONLY used in src/test, not src/main. // Do NOT repeat dependencies which are ALREADY in implementation or runtimeOnly! // - testImplementation( 'io.github.classgraph:classgraph' ) - testImplementation ('org.springframework.boot:spring-boot-starter-test') { + testImplementation('io.github.classgraph:classgraph') + testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'com.jayway.jsonpath', module: 'json-path' exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' exclude group: 'jakarta.activation' exclude group: 'javax.activation' exclude group: 'org.skyscreamer' } - testImplementation ('org.mockito:mockito-inline') + testImplementation('org.mockito:mockito-inline') } diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/command/MixTaxonomyMappingUpdateCommand.java b/fineract-mix/src/main/java/org/apache/fineract/mix/command/MixTaxonomyMappingUpdateCommand.java index fa59fe6a50f..e8fb00cfa12 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/command/MixTaxonomyMappingUpdateCommand.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/command/MixTaxonomyMappingUpdateCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class MixTaxonomyMappingUpdateCommand extends Command {} +public class MixTaxonomyMappingUpdateCommand extends Command { +} diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixReportXBRLContextData.java b/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixReportXBRLContextData.java index d70d6abe5ff..e5ee38d2def 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixReportXBRLContextData.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixReportXBRLContextData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixReportXBRLData.java b/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixReportXBRLData.java index a6f60929ac9..3b77a71e46b 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixReportXBRLData.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixReportXBRLData.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.math.BigDecimal; import java.sql.Date; import java.util.Map; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixReportXBRLNamespaceData.java b/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixReportXBRLNamespaceData.java index 6e256bc663d..d19cd995ac0 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixReportXBRLNamespaceData.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixReportXBRLNamespaceData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixTaxonomyData.java b/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixTaxonomyData.java index 857df912a33..c938fb0fdc0 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixTaxonomyData.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixTaxonomyData.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.mix.data; import com.fasterxml.jackson.annotation.JsonIgnore; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixTaxonomyMappingData.java b/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixTaxonomyMappingData.java index 26e71b3a581..aaa07ffdf6e 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixTaxonomyMappingData.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixTaxonomyMappingData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixTaxonomyMappingUpdateRequest.java b/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixTaxonomyMappingUpdateRequest.java index eeea823cd52..2d69d5ba434 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixTaxonomyMappingUpdateRequest.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixTaxonomyMappingUpdateRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixTaxonomyMappingUpdateResponse.java b/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixTaxonomyMappingUpdateResponse.java index 059f15bee42..2637aa3344b 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixTaxonomyMappingUpdateResponse.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/data/MixTaxonomyMappingUpdateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixReportXBRLNamespace.java b/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixReportXBRLNamespace.java index d73813aeb3b..473538c919f 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixReportXBRLNamespace.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixReportXBRLNamespace.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixReportXBRLNamespaceRepository.java b/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixReportXBRLNamespaceRepository.java index a8806fa0464..b3fa06866f6 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixReportXBRLNamespaceRepository.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixReportXBRLNamespaceRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.mix.domain; import java.util.Optional; + import org.springframework.data.repository.ListCrudRepository; import org.springframework.data.repository.query.QueryByExampleExecutor; diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixTaxonomy.java b/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixTaxonomy.java index 79b3462a3f4..e9307ced7ee 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixTaxonomy.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixTaxonomy.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixTaxonomyMapping.java b/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixTaxonomyMapping.java index 30e4abc7cf5..b71d4e08ef1 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixTaxonomyMapping.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixTaxonomyMapping.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixTaxonomyMappingRepository.java b/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixTaxonomyMappingRepository.java index 35baecaab26..841fd663c61 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixTaxonomyMappingRepository.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixTaxonomyMappingRepository.java @@ -6,9 +6,9 @@ * 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 @@ -22,4 +22,5 @@ import org.springframework.data.repository.query.QueryByExampleExecutor; public interface MixTaxonomyMappingRepository - extends ListCrudRepository, QueryByExampleExecutor {} + extends ListCrudRepository, QueryByExampleExecutor { +} diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixTaxonomyRepository.java b/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixTaxonomyRepository.java index 8b1fa29ad01..003adfb59ba 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixTaxonomyRepository.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/domain/MixTaxonomyRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.mix.domain; import java.util.List; + import org.springframework.data.repository.ListCrudRepository; import org.springframework.data.repository.query.QueryByExampleExecutor; diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/exception/MixReportXBRLMappingInvalidException.java b/fineract-mix/src/main/java/org/apache/fineract/mix/exception/MixReportXBRLMappingInvalidException.java index cf78409424f..2ed7e8f2cec 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/exception/MixReportXBRLMappingInvalidException.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/exception/MixReportXBRLMappingInvalidException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/handler/MixTaxonomyMappingUpdateCommandHandler.java b/fineract-mix/src/main/java/org/apache/fineract/mix/handler/MixTaxonomyMappingUpdateCommandHandler.java index af59efdd713..285c5705259 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/handler/MixTaxonomyMappingUpdateCommandHandler.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/handler/MixTaxonomyMappingUpdateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/mapping/MixReportXBRLNamespaceMapper.java b/fineract-mix/src/main/java/org/apache/fineract/mix/mapping/MixReportXBRLNamespaceMapper.java index bbd88503e78..2d1f5eef7cb 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/mapping/MixReportXBRLNamespaceMapper.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/mapping/MixReportXBRLNamespaceMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/mapping/MixTaxonomyMapper.java b/fineract-mix/src/main/java/org/apache/fineract/mix/mapping/MixTaxonomyMapper.java index ad23c6dd93d..d8a0ae900ff 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/mapping/MixTaxonomyMapper.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/mapping/MixTaxonomyMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/mapping/MixTaxonomyMappingMapper.java b/fineract-mix/src/main/java/org/apache/fineract/mix/mapping/MixTaxonomyMappingMapper.java index ac61c5eb492..09d644dc01e 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/mapping/MixTaxonomyMappingMapper.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/mapping/MixTaxonomyMappingMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/mapping/MixTaxonomyMappingUpdateRequestMapper.java b/fineract-mix/src/main/java/org/apache/fineract/mix/mapping/MixTaxonomyMappingUpdateRequestMapper.java index a985c30a625..681f6af47c6 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/mapping/MixTaxonomyMappingUpdateRequestMapper.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/mapping/MixTaxonomyMappingUpdateRequestMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLBuilder.java b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLBuilder.java index 1d97f3210aa..c68b18775fc 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLBuilder.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLBuilder.java @@ -6,9 +6,9 @@ * 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 @@ -19,12 +19,14 @@ package org.apache.fineract.mix.service; import com.google.common.base.Splitter; + import java.math.BigDecimal; import java.sql.Date; import java.text.SimpleDateFormat; import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.mix.data.MixReportXBRLContextData; @@ -82,8 +84,8 @@ public String build(final Map map, final Date start } private Element addTaxonomy(final Element rootElement, final MixTaxonomyData taxonomy, final BigDecimal value, final Date startDate, - final Date endDate, Integer instantScenarioCounter, Integer durationScenarioCounter, - final Map contextMap) { + final Date endDate, Integer instantScenarioCounter, Integer durationScenarioCounter, + final Map contextMap) { // throw an error is start / endate is null if (startDate == null || endDate == null) { @@ -174,7 +176,7 @@ private void addCurrencyUnit(final Element root, final String currencyCode) { } private void addContexts(final Element root, final Date startDate, final Date endDate, - final Map contextMap) { + final Map contextMap) { final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); for (final Map.Entry entry : contextMap.entrySet()) { final MixReportXBRLContextData context = entry.getKey(); diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLNamespaceReadService.java b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLNamespaceReadService.java index 8296fc6c164..cdff1e784b5 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLNamespaceReadService.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLNamespaceReadService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLNamespaceReadServiceImpl.java b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLNamespaceReadServiceImpl.java index 7a4c1f998e8..931ee799297 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLNamespaceReadServiceImpl.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLNamespaceReadServiceImpl.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLResultService.java b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLResultService.java index 9e4fb0f4624..4ad244286da 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLResultService.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLResultService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.mix.service; import java.sql.Date; + import org.apache.fineract.mix.data.MixReportXBRLData; public interface MixReportXBRLResultService { diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLResultServiceImpl.java b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLResultServiceImpl.java index 17eb95cc868..e2d09e5620a 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLResultServiceImpl.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixReportXBRLResultServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.mix.service; import com.google.gson.Gson; + import java.math.BigDecimal; import java.sql.Date; import java.util.ArrayList; @@ -30,6 +31,7 @@ import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; import javax.script.ScriptException; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.mix.data.MixReportXBRLData; import org.apache.fineract.mix.data.MixTaxonomyData; @@ -52,7 +54,7 @@ public class MixReportXBRLResultServiceImpl implements MixReportXBRLResultServic @Autowired public MixReportXBRLResultServiceImpl(final JdbcTemplate jdbcTemplate, final MixTaxonomyMappingReadService readTaxonomyMappingService, - final MixTaxonomyReadService readTaxonomyService) { + final MixTaxonomyReadService readTaxonomyService) { this.readTaxonomyMappingService = readTaxonomyMappingService; this.readTaxonomyService = readTaxonomyService; this.jdbcTemplate = jdbcTemplate; diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyMappingReadService.java b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyMappingReadService.java index 32c0f6c8fb5..5260344a782 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyMappingReadService.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyMappingReadService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyMappingReadServiceImpl.java b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyMappingReadServiceImpl.java index 4047f1d09ef..5d001b3b53e 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyMappingReadServiceImpl.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyMappingReadServiceImpl.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyMappingWriteService.java b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyMappingWriteService.java index 1c91559b6bd..a86ac662ae5 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyMappingWriteService.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyMappingWriteService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyMappingWriteServiceImpl.java b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyMappingWriteServiceImpl.java index 4876476fa62..935b1b279e0 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyMappingWriteServiceImpl.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyMappingWriteServiceImpl.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyReadService.java b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyReadService.java index e541366c3a7..cd32140d0a7 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyReadService.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyReadService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.mix.service; import java.util.List; + import org.apache.fineract.mix.data.MixTaxonomyData; public interface MixTaxonomyReadService { diff --git a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyReadServiceImpl.java b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyReadServiceImpl.java index 152055967fb..4ca996fc1f6 100644 --- a/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyReadServiceImpl.java +++ b/fineract-mix/src/main/java/org/apache/fineract/mix/service/MixTaxonomyReadServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.mix.service; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.mix.data.MixTaxonomyData; diff --git a/fineract-progressive-loan-embeddable-schedule-generator/README.md b/fineract-progressive-loan-embeddable-schedule-generator/README.md index 81e67c4be4e..f7da9b27dd8 100644 --- a/fineract-progressive-loan-embeddable-schedule-generator/README.md +++ b/fineract-progressive-loan-embeddable-schedule-generator/README.md @@ -8,21 +8,22 @@ ./gradlew :fineract-progressive-loan-embeddable-schedule-generator:shadowJar ``` -- Copy Jar from `fineract-progressive-loan-embeddable-schedule-generator/build/libs/fineract-progressive-loan-embeddable-schedule-generator-*-SNAPSHOT-all.jar` to Your class path. +- Copy Jar from + `fineract-progressive-loan-embeddable-schedule-generator/build/libs/fineract-progressive-loan-embeddable-schedule-generator-*-SNAPSHOT-all.jar` + to Your class path. ## Dependencies There is no extra dependency. - ## Sample Application Copy a [Main.java](misc/Main.java) file from the `misc` directory into the working directory: The project directory structure: - - `Main.java` - - `fineract-embeddable-calculator-1.11.0-SNAPSHOT-all.jar` +- `Main.java` +- `fineract-embeddable-calculator-1.11.0-SNAPSHOT-all.jar` - Check Java minimum version diff --git a/fineract-progressive-loan-embeddable-schedule-generator/build.gradle b/fineract-progressive-loan-embeddable-schedule-generator/build.gradle index b150208eb21..204d7f548c8 100644 --- a/fineract-progressive-loan-embeddable-schedule-generator/build.gradle +++ b/fineract-progressive-loan-embeddable-schedule-generator/build.gradle @@ -33,7 +33,7 @@ var requiredModuleNames = [ tasks.named('shadowJar', ShadowJar) { dependencies { - exclude((dep) -> !requiredModuleNames.any( (reqModName) -> dep.moduleName.contains(reqModName))) + exclude((dep) -> !requiredModuleNames.any((reqModName) -> dep.moduleName.contains(reqModName))) } minimize() { exclude("*.xml") diff --git a/fineract-progressive-loan-embeddable-schedule-generator/misc/Main.java b/fineract-progressive-loan-embeddable-schedule-generator/misc/Main.java index e3fd40de21c..7332a8d93fd 100644 --- a/fineract-progressive-loan-embeddable-schedule-generator/misc/Main.java +++ b/fineract-progressive-loan-embeddable-schedule-generator/misc/Main.java @@ -6,9 +6,9 @@ * 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 @@ -16,6 +16,7 @@ * specific language governing permissions and limitations * under the License. */ + import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.portfolio.common.domain.DaysInMonthType; import org.apache.fineract.portfolio.common.domain.DaysInYearType; @@ -80,9 +81,11 @@ static void printPlan(final LoanSchedulePlan plan) throws InterruptedException { for (LoanSchedulePlanPeriod period : plan.getPeriods()) { if (period instanceof LoanSchedulePlanDisbursementPeriod dp) { System.out.printf(" Disbursement - Date: %s, Amount: %s%n", dp.periodDueDate(), dp.getPrincipalAmount()); - } if (period instanceof LoanSchedulePlanDownPaymentPeriod rp) { + } + if (period instanceof LoanSchedulePlanDownPaymentPeriod rp) { System.out.printf(" Down payment Period: #%d, Due Date: %s, Balance: %s, Principal: %s, Total: %s, Total Outstanding Balance: %s%n", rp.periodNumber(), rp.periodDueDate(), rp.getOutstandingLoanBalance(), rp.getPrincipalAmount(), rp.getTotalDueAmount(), rp.getTotalOutstandingLoanBalance()); - } if (period instanceof LoanSchedulePlanRepaymentPeriod rp) { + } + if (period instanceof LoanSchedulePlanRepaymentPeriod rp) { System.out.printf(" Repayment Period: #%d, Due Date: %s, Balance: %s, Principal: %s, Interest: %s, Total: %s, Total Outstanding Balance: %s%n", rp.periodNumber(), rp.periodDueDate(), rp.getOutstandingLoanBalance(), rp.getPrincipalAmount(), rp.getInterestAmount(), rp.getTotalDueAmount(), rp.getTotalOutstandingLoanBalance()); } } diff --git a/fineract-progressive-loan-embeddable-schedule-generator/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/EmbeddableProgressiveLoanScheduleGenerator.java b/fineract-progressive-loan-embeddable-schedule-generator/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/EmbeddableProgressiveLoanScheduleGenerator.java index 79f97b75661..f0f23c38b2a 100644 --- a/fineract-progressive-loan-embeddable-schedule-generator/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/EmbeddableProgressiveLoanScheduleGenerator.java +++ b/fineract-progressive-loan-embeddable-schedule-generator/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/EmbeddableProgressiveLoanScheduleGenerator.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.MathContext; import java.time.LocalDate; import java.util.Optional; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.domain.ProgressiveLoanModel; import org.apache.fineract.portfolio.loanaccount.loanschedule.data.LoanSchedulePlan; @@ -70,7 +71,7 @@ public ProgressiveLoanInterestScheduleModel writeInterestScheduleModel(Loan loan @Override public Optional readProgressiveLoanInterestScheduleModel(Long loanId, - ILoanConfigurationDetails detail, Integer installmentAmountInMultipliesOf) { + ILoanConfigurationDetails detail, Integer installmentAmountInMultipliesOf) { return Optional.empty(); } diff --git a/fineract-progressive-loan-embeddable-schedule-generator/src/test/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/EmbeddableProgressiveLoanScheduleGeneratorTest.java b/fineract-progressive-loan-embeddable-schedule-generator/src/test/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/EmbeddableProgressiveLoanScheduleGeneratorTest.java index 7bf3e57311e..515b37d53b9 100644 --- a/fineract-progressive-loan-embeddable-schedule-generator/src/test/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/EmbeddableProgressiveLoanScheduleGeneratorTest.java +++ b/fineract-progressive-loan-embeddable-schedule-generator/src/test/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/EmbeddableProgressiveLoanScheduleGeneratorTest.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.math.MathContext; import java.math.RoundingMode; import java.time.LocalDate; + import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.portfolio.common.domain.DaysInMonthType; import org.apache.fineract.portfolio.common.domain.DaysInYearCustomStrategyType; @@ -93,13 +94,13 @@ void testGenerate() { } private static void checkPeriod(LoanSchedulePlanPeriod period, LocalDate fromDate, LocalDate dueDate, double principal, - double outstandingBalance) { + double outstandingBalance) { checkPeriod(period, null, fromDate, dueDate, principal, 0.0, 0.0, 0.0, 0.0, outstandingBalance, 0.0); } private static void checkPeriod(LoanSchedulePlanPeriod period, Integer periodNumber, LocalDate fromDate, LocalDate dueDate, - double principal, double interest, double fee, double penalty, double totalDue, double outstandingBalance, - double totalOutstandingBalance) { + double principal, double interest, double fee, double penalty, double totalDue, double outstandingBalance, + double totalOutstandingBalance) { Assertions.assertEquals(periodNumber, period.periodNumber()); Assertions.assertEquals(fromDate, period.periodFromDate()); Assertions.assertEquals(dueDate, period.periodDueDate()); diff --git a/fineract-progressive-loan/build.gradle b/fineract-progressive-loan/build.gradle index 58969916df0..de85ae16008 100644 --- a/fineract-progressive-loan/build.gradle +++ b/fineract-progressive-loan/build.gradle @@ -52,9 +52,9 @@ apply from: 'dependencies.gradle' // https://github.com/andygoossens/gradle-modernizer-plugin modernizer { ignoreClassNamePatterns = [ - '.*AbstractPersistableCustom', - '.*EntityTables', - '.*domain.*' + '.*AbstractPersistableCustom', + '.*EntityTables', + '.*domain.*' ] } @@ -66,7 +66,7 @@ if (project.hasProperty('env') && project.getProperty('env') == 'eclipse') { eclipse { project { - buildCommand([ LaunchConfigHandle: "/.externalToolBuilders/OpenJPA Enhance Builder.launch" ], 'org.eclipse.ui.externaltools.ExternalToolBuilder') + buildCommand([LaunchConfigHandle: "/.externalToolBuilders/OpenJPA Enhance Builder.launch"], 'org.eclipse.ui.externaltools.ExternalToolBuilder') } } diff --git a/fineract-progressive-loan/dependencies.gradle b/fineract-progressive-loan/dependencies.gradle index c39bee8640e..5b8e53e8f24 100644 --- a/fineract-progressive-loan/dependencies.gradle +++ b/fineract-progressive-loan/dependencies.gradle @@ -31,7 +31,7 @@ dependencies { implementation('org.apache.avro:avro') implementation( project(path: ':fineract-avro-schemas') - ) + ) implementation( 'org.springframework.boot:spring-boot-starter-web', @@ -55,11 +55,11 @@ dependencies { 'org.mapstruct:mapstruct', 'io.github.resilience4j:resilience4j-spring-boot3', - ) + ) compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' annotationProcessor 'org.mapstruct:mapstruct-processor' - implementation ('org.springframework.boot:spring-boot-starter-data-jpa') { + implementation('org.springframework.boot:spring-boot-starter-data-jpa') { exclude group: 'org.hibernate' } implementation('org.eclipse.persistence:org.eclipse.persistence.jpa') { @@ -68,13 +68,13 @@ dependencies { // testCompile dependencies are ONLY used in src/test, not src/main. // Do NOT repeat dependencies which are ALREADY in implementation or runtimeOnly! // - testImplementation( 'io.github.classgraph:classgraph' ) - testImplementation ('org.springframework.boot:spring-boot-starter-test') { + testImplementation('io.github.classgraph:classgraph') + testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'com.jayway.jsonpath', module: 'json-path' exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' exclude group: 'jakarta.activation' exclude group: 'javax.activation' exclude group: 'org.skyscreamer' } - testImplementation ('org.mockito:mockito-inline') + testImplementation('org.mockito:mockito-inline') } diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/configuration/FineractProgressiveLoanBeanConfiguration.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/configuration/FineractProgressiveLoanBeanConfiguration.java index f4e58567f49..663ab1dd88e 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/configuration/FineractProgressiveLoanBeanConfiguration.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/configuration/FineractProgressiveLoanBeanConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/ProgressivePossibleNextRepaymentCalculationServiceImpl.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/ProgressivePossibleNextRepaymentCalculationServiceImpl.java index 4230db2400c..7c0ab55e55f 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/ProgressivePossibleNextRepaymentCalculationServiceImpl.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/delinquency/service/ProgressivePossibleNextRepaymentCalculationServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.List; import java.util.Optional; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; import org.apache.fineract.portfolio.loanaccount.domain.ChangedTransactionDetail; @@ -46,7 +47,7 @@ public class ProgressivePossibleNextRepaymentCalculationServiceImpl extends Abst @Override public BigDecimal calculateInterestRecalculationFutureOutstandingValue(Loan loan, LocalDate nextPaymentDueDate, - LoanRepaymentScheduleInstallment nextInstallment) { + LoanRepaymentScheduleInstallment nextInstallment) { MonetaryCurrency currency = loan.getCurrency(); Optional progressiveLoanModel = interestScheduleModelRepository.findOneByLoan(loan); Optional optionalScheduleModel = interestScheduleModelRepository diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/BuyDownFeeAmortizationDetails.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/BuyDownFeeAmortizationDetails.java index 191e73dda21..2995160821b 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/BuyDownFeeAmortizationDetails.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/BuyDownFeeAmortizationDetails.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import java.math.BigDecimal; import java.time.LocalDate; -public record BuyDownFeeAmortizationDetails(Long id, Long loanId, Long transactionId, LocalDate buyDownFeeDate, BigDecimal buyDownFeeAmount, - BigDecimal amortizedAmount, BigDecimal notYetAmortizedAmount, BigDecimal adjustedAmount, BigDecimal chargedOffAmount) { +public record BuyDownFeeAmortizationDetails(Long id, Long loanId, Long transactionId, LocalDate buyDownFeeDate, + BigDecimal buyDownFeeAmount, + BigDecimal amortizedAmount, BigDecimal notYetAmortizedAmount, + BigDecimal adjustedAmount, BigDecimal chargedOffAmount) { } diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/CapitalizedIncomeDetails.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/CapitalizedIncomeDetails.java index 1fabf897eb2..924c3c913b5 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/CapitalizedIncomeDetails.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/CapitalizedIncomeDetails.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.math.BigDecimal; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanCapitalizedIncomeData.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanCapitalizedIncomeData.java index a7168064fbe..e872a2f62e0 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanCapitalizedIncomeData.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanCapitalizedIncomeData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanBuyDownFeeBalance.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanBuyDownFeeBalance.java index 6d4786e30ff..f846a5dc41d 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanBuyDownFeeBalance.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanBuyDownFeeBalance.java @@ -6,9 +6,9 @@ * 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 @@ -24,8 +24,10 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.Version; + import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCapitalizedIncomeBalance.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCapitalizedIncomeBalance.java index fd8f383af4d..f4b94301d26 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCapitalizedIncomeBalance.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCapitalizedIncomeBalance.java @@ -6,9 +6,9 @@ * 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 @@ -24,8 +24,10 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.Version; + import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/ProgressiveLoanModel.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/ProgressiveLoanModel.java index 5ac311c8607..f0fc51a168b 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/ProgressiveLoanModel.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/ProgressiveLoanModel.java @@ -6,9 +6,9 @@ * 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 @@ -24,8 +24,10 @@ import jakarta.persistence.OneToOne; import jakarta.persistence.Table; import jakarta.persistence.Version; + import java.time.LocalDate; import java.time.OffsetDateTime; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/ChangeOperation.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/ChangeOperation.java index 9042dfec10d..777eb4f9800 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/ChangeOperation.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/ChangeOperation.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.portfolio.loanaccount.domain.transactionprocessor.impl; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.Optional; + import lombok.Getter; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.portfolio.loanaccount.data.LoanTermVariationsData; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/ProgressiveTransactionCtx.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/ProgressiveTransactionCtx.java index 2dc3a87c818..de66fc470e1 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/ProgressiveTransactionCtx.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/ProgressiveTransactionCtx.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.List; import java.util.Set; import java.util.stream.Collectors; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @@ -56,25 +57,25 @@ public class ProgressiveTransactionCtx extends TransactionCtx { private final List processedLoanChargeIds; public ProgressiveTransactionCtx(MonetaryCurrency currency, List installments, - Set charges, MoneyHolder overpaymentHolder, ChangedTransactionDetail changedTransactionDetail, - ProgressiveLoanInterestScheduleModel model, List activeLoanTermVariations) { + Set charges, MoneyHolder overpaymentHolder, ChangedTransactionDetail changedTransactionDetail, + ProgressiveLoanInterestScheduleModel model, List activeLoanTermVariations) { this(currency, installments, charges, overpaymentHolder, changedTransactionDetail, model, Money.zero(currency), activeLoanTermVariations); } public ProgressiveTransactionCtx(MonetaryCurrency currency, List installments, - Set charges, MoneyHolder overpaymentHolder, ChangedTransactionDetail changedTransactionDetail, - ProgressiveLoanInterestScheduleModel model, Money sumOfInterestRefundAmount, - List activeLoanTermVariations) { + Set charges, MoneyHolder overpaymentHolder, ChangedTransactionDetail changedTransactionDetail, + ProgressiveLoanInterestScheduleModel model, Money sumOfInterestRefundAmount, + List activeLoanTermVariations) { this(currency, installments, charges, overpaymentHolder, changedTransactionDetail, model, sumOfInterestRefundAmount, activeLoanTermVariations, charges == null ? new ArrayList<>() : charges.stream().map(AbstractPersistableCustom::getId).toList()); } public ProgressiveTransactionCtx(MonetaryCurrency currency, List installments, - Set charges, MoneyHolder overpaymentHolder, ChangedTransactionDetail changedTransactionDetail, - ProgressiveLoanInterestScheduleModel model, Money sumOfInterestRefundAmount, List activeLoanTermVariations, - List processedLoanChargeIds) { + Set charges, MoneyHolder overpaymentHolder, ChangedTransactionDetail changedTransactionDetail, + ProgressiveLoanInterestScheduleModel model, Money sumOfInterestRefundAmount, List activeLoanTermVariations, + List processedLoanChargeIds) { super(currency, installments, charges, overpaymentHolder, changedTransactionDetail, activeLoanTermVariations); this.sumOfInterestRefundAmount = sumOfInterestRefundAmount; this.model = model; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/AddBuyDownFeeCommandHandler.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/AddBuyDownFeeCommandHandler.java index 6fde5230f9a..cbd5fc0da44 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/AddBuyDownFeeCommandHandler.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/AddBuyDownFeeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/AddCapitalizedIncomeCommandHandler.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/AddCapitalizedIncomeCommandHandler.java index 998d74fb083..1160ed39a19 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/AddCapitalizedIncomeCommandHandler.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/AddCapitalizedIncomeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/BuyDownFeeAdjustmentCommandHandler.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/BuyDownFeeAdjustmentCommandHandler.java index 27f5c937a95..1b94a895133 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/BuyDownFeeAdjustmentCommandHandler.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/BuyDownFeeAdjustmentCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/CapitalizedIncomeAdjustmentCommandHandler.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/CapitalizedIncomeAdjustmentCommandHandler.java index 1815a988126..96c4be4bb3a 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/CapitalizedIncomeAdjustmentCommandHandler.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/CapitalizedIncomeAdjustmentCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlan.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlan.java index fbd32fef23f..91ea5b9cbc0 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlan.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlan.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicReference; + import lombok.Data; import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanScheduleModel; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlanDisbursementPeriod.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlanDisbursementPeriod.java index 3de91b867c0..82e01311bd3 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlanDisbursementPeriod.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlanDisbursementPeriod.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Data; @Data diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlanDownPaymentPeriod.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlanDownPaymentPeriod.java index 15e46fb4685..9d48c010d0f 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlanDownPaymentPeriod.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlanDownPaymentPeriod.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Data; @Data diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlanPeriod.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlanPeriod.java index 72a24368779..0582f1a56c8 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlanPeriod.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlanPeriod.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlanRepaymentPeriod.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlanRepaymentPeriod.java index 3f40ebf53f2..7494ad9c854 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlanRepaymentPeriod.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/data/LoanSchedulePlanRepaymentPeriod.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Data; @Data diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/ProgressiveLoanScheduleGenerator.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/ProgressiveLoanScheduleGenerator.java index a146fd850cf..6f8041de879 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/ProgressiveLoanScheduleGenerator.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/ProgressiveLoanScheduleGenerator.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleProcessingWrapper.findInPeriod; import jakarta.validation.constraints.NotNull; + import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; @@ -31,6 +32,7 @@ import java.util.List; import java.util.Optional; import java.util.Set; + import org.apache.fineract.infrastructure.core.service.MathUtil; import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; @@ -67,7 +69,7 @@ public class ProgressiveLoanScheduleGenerator implements LoanScheduleGenerator { private LoanTransactionProcessingService loanTransactionProcessingService; public ProgressiveLoanScheduleGenerator(ScheduledDateGenerator scheduledDateGenerator, EMICalculator emiCalculator, - InterestScheduleModelRepositoryWrapper interestScheduleModelRepositoryWrapper) { + InterestScheduleModelRepositoryWrapper interestScheduleModelRepositoryWrapper) { this.scheduledDateGenerator = scheduledDateGenerator; this.emiCalculator = emiCalculator; this.interestScheduleModelRepositoryWrapper = interestScheduleModelRepositoryWrapper; @@ -85,7 +87,7 @@ public LoanSchedulePlan generate(final MathContext mc, final LoanRepaymentSchedu @Override public LoanScheduleModel generate(final MathContext mc, final LoanApplicationTerms loanApplicationTerms, - final Set loanCharges, final HolidayDetailDTO holidayDetailDTO) { + final Set loanCharges, final HolidayDetailDTO holidayDetailDTO) { // determine the total charges due at time of disbursement final BigDecimal chargesDueAtTimeOfDisbursement = deriveTotalChargesDueAtTimeOfDisbursement(loanCharges); @@ -166,24 +168,24 @@ public LoanScheduleModel generate(final MathContext mc, final LoanApplicationTer @Override public LoanScheduleDTO rescheduleNextInstallments(MathContext mc, LoanApplicationTerms loanApplicationTerms, Loan loan, - HolidayDetailDTO holidayDetailDTO, LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, - LocalDate rescheduleFrom) { + HolidayDetailDTO holidayDetailDTO, LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, + LocalDate rescheduleFrom) { LoanScheduleModel model = generate(mc, loanApplicationTerms, loan.getActiveCharges(), holidayDetailDTO); return LoanScheduleDTO.from(null, model); } @Override public LoanScheduleDTO rescheduleNextInstallments(MathContext mc, LoanApplicationTerms loanApplicationTerms, Loan loan, - HolidayDetailDTO holidayDetailDTO, LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, - LocalDate rescheduleFrom, LocalDate rescheduleTill) { + HolidayDetailDTO holidayDetailDTO, LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, + LocalDate rescheduleFrom, LocalDate rescheduleTill) { return rescheduleNextInstallments(mc, loanApplicationTerms, loan, holidayDetailDTO, loanRepaymentScheduleTransactionProcessor, rescheduleFrom); } @Override public OutstandingAmountsDTO calculatePrepaymentAmount(MonetaryCurrency currency, LocalDate onDate, - LoanApplicationTerms loanApplicationTerms, MathContext mc, Loan loan, HolidayDetailDTO holidayDetailDTO, - LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor) { + LoanApplicationTerms loanApplicationTerms, MathContext mc, Loan loan, HolidayDetailDTO holidayDetailDTO, + LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor) { if (!(loanRepaymentScheduleTransactionProcessor instanceof AdvancedPaymentScheduleTransactionProcessor processor)) { throw new IllegalStateException("Expected an AdvancedPaymentScheduleTransactionProcessor"); } @@ -263,7 +265,7 @@ private List getSortedDisbursementList(LoanApplicationTerms lo } private void applyInterestRateChangesOnPeriod(final LoanApplicationTerms loanApplicationTerms, - final LoanScheduleModelRepaymentPeriod repaymentPeriod, final ProgressiveLoanInterestScheduleModel interestScheduleModel) { + final LoanScheduleModelRepaymentPeriod repaymentPeriod, final ProgressiveLoanInterestScheduleModel interestScheduleModel) { if (loanApplicationTerms.getLoanTermVariations() == null) { return; } @@ -292,9 +294,9 @@ private void prepareDisbursementsOnLoanApplicationTerms(final LoanApplicationTer } private void processDisbursements(final LoanApplicationTerms loanApplicationTerms, final List disbursementDataList, - final LoanScheduleParams scheduleParams, final ProgressiveLoanInterestScheduleModel interestScheduleModel, - final List periods, final BigDecimal chargesDueAtTimeOfDisbursement, - final boolean includeDisbursementsAfterMaturityDate, final MathContext mc) { + final LoanScheduleParams scheduleParams, final ProgressiveLoanInterestScheduleModel interestScheduleModel, + final List periods, final BigDecimal chargesDueAtTimeOfDisbursement, + final boolean includeDisbursementsAfterMaturityDate, final MathContext mc) { for (DisbursementData disbursementData : disbursementDataList) { final LocalDate disbursementDate = disbursementData.disbursementDate(); @@ -365,7 +367,7 @@ private BigDecimal deriveTotalChargesDueAtTimeOfDisbursement(final Set loanCharges, - final LoanScheduleParams scheduleParams, final CurrencyData currency, final MathContext mc) { + final LoanScheduleParams scheduleParams, final CurrencyData currency, final MathContext mc) { final PrincipalInterest principalInterest = new PrincipalInterest(repaymentPeriod.getPrincipalDue(), repaymentPeriod.getInterestDue(), null); @@ -382,9 +384,9 @@ private void applyChargesForCurrentPeriod(final LoanScheduleModelRepaymentPeriod } private Money cumulativeFeeChargesDueWithin(final LocalDate periodStart, final LocalDate periodEnd, final Set loanCharges, - final CurrencyData currency, final PrincipalInterest principalInterestForThisPeriod, final Money principalDisbursed, - final Money totalInterestChargedForFullLoanTerm, boolean isInstallmentChargeApplicable, final boolean isFirstPeriod, - final MathContext mc) { + final CurrencyData currency, final PrincipalInterest principalInterestForThisPeriod, final Money principalDisbursed, + final Money totalInterestChargedForFullLoanTerm, boolean isInstallmentChargeApplicable, final boolean isFirstPeriod, + final MathContext mc) { Money cumulative = Money.zero(currency, mc); if (loanCharges != null) { for (final LoanCharge loanCharge : loanCharges) { @@ -398,8 +400,8 @@ private Money cumulativeFeeChargesDueWithin(final LocalDate periodStart, final L } private Money getCumulativeAmountOfCharge(LocalDate periodStart, LocalDate periodEnd, PrincipalInterest principalInterestForThisPeriod, - Money principalDisbursed, Money totalInterestChargedForFullLoanTerm, boolean isInstallmentChargeApplicable, - boolean isFirstPeriod, LoanCharge loanCharge, Money cumulative, MathContext mc) { + Money principalDisbursed, Money totalInterestChargedForFullLoanTerm, boolean isInstallmentChargeApplicable, + boolean isFirstPeriod, LoanCharge loanCharge, Money cumulative, MathContext mc) { boolean isDue = loanCharge.isDueInPeriod(periodStart, periodEnd, isFirstPeriod); if (loanCharge.isInstalmentFee() && isInstallmentChargeApplicable) { cumulative = calculateInstallmentCharge(principalInterestForThisPeriod, cumulative, loanCharge, mc); @@ -415,9 +417,9 @@ private Money getCumulativeAmountOfCharge(LocalDate periodStart, LocalDate perio } private Money cumulativePenaltyChargesDueWithin(final LocalDate periodStart, final LocalDate periodEnd, - final Set loanCharges, final CurrencyData currency, final PrincipalInterest principalInterestForThisPeriod, - final Money principalDisbursed, final Money totalInterestChargedForFullLoanTerm, boolean isInstallmentChargeApplicable, - final boolean isFirstPeriod, final MathContext mc) { + final Set loanCharges, final CurrencyData currency, final PrincipalInterest principalInterestForThisPeriod, + final Money principalDisbursed, final Money totalInterestChargedForFullLoanTerm, boolean isInstallmentChargeApplicable, + final boolean isFirstPeriod, final MathContext mc) { Money cumulative = Money.zero(currency, mc); if (loanCharges != null) { for (final LoanCharge loanCharge : loanCharges) { @@ -431,7 +433,7 @@ private Money cumulativePenaltyChargesDueWithin(final LocalDate periodStart, fin } private Money calculateInstallmentCharge(final PrincipalInterest principalInterestForThisPeriod, Money cumulative, - final LoanCharge loanCharge, final MathContext mc) { + final LoanCharge loanCharge, final MathContext mc) { if (loanCharge.getChargeCalculation().isPercentageBased()) { BigDecimal amount = BigDecimal.ZERO; if (loanCharge.getChargeCalculation().isPercentageOfAmountAndInterest()) { @@ -452,7 +454,7 @@ private Money calculateInstallmentCharge(final PrincipalInterest principalIntere } private Money calculateSpecificDueDateChargeWithPercentage(final Money principalDisbursed, - final Money totalInterestChargedForFullLoanTerm, Money cumulative, final LoanCharge loanCharge, final MathContext mc) { + final Money totalInterestChargedForFullLoanTerm, Money cumulative, final LoanCharge loanCharge, final MathContext mc) { BigDecimal amount = BigDecimal.ZERO; if (loanCharge.getChargeCalculation().isPercentageOfAmountAndInterest()) { amount = amount.add(principalDisbursed.getAmount()).add(totalInterestChargedForFullLoanTerm.getAmount()); @@ -468,7 +470,7 @@ private Money calculateSpecificDueDateChargeWithPercentage(final Money principal } private void updatePeriodsWithCharges(final CurrencyData currency, LoanScheduleParams scheduleParams, - final Collection periods, final Set nonCompoundingCharges, MathContext mc) { + final Collection periods, final Set nonCompoundingCharges, MathContext mc) { for (LoanScheduleModelPeriod loanScheduleModelPeriod : periods) { if (loanScheduleModelPeriod.isRepaymentPeriod()) { PrincipalInterest principalInterest = new PrincipalInterest(Money.of(currency, loanScheduleModelPeriod.principalDue(), mc), diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanConfigurationDetailsMapper.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanConfigurationDetailsMapper.java index 6a6896b4a8e..6371ce98eaf 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanConfigurationDetailsMapper.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/mapper/LoanConfigurationDetailsMapper.java @@ -6,9 +6,9 @@ * 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 @@ -31,7 +31,8 @@ public final class LoanConfigurationDetailsMapper { - private LoanConfigurationDetailsMapper() {} + private LoanConfigurationDetailsMapper() { + } public static ILoanConfigurationDetails map(Loan loan) { if (loan == null) { diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/repository/CustomizedLoanCapitalizedIncomeBalanceRepository.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/repository/CustomizedLoanCapitalizedIncomeBalanceRepository.java index 4029d0c5646..3b52270b395 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/repository/CustomizedLoanCapitalizedIncomeBalanceRepository.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/repository/CustomizedLoanCapitalizedIncomeBalanceRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Map; + import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRepaymentPeriodData; public interface CustomizedLoanCapitalizedIncomeBalanceRepository { diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/repository/CustomizedLoanCapitalizedIncomeBalanceRepositoryImpl.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/repository/CustomizedLoanCapitalizedIncomeBalanceRepositoryImpl.java index 4d02e3d5f4f..40dd158eb9f 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/repository/CustomizedLoanCapitalizedIncomeBalanceRepositoryImpl.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/repository/CustomizedLoanCapitalizedIncomeBalanceRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,10 +21,12 @@ import com.google.common.collect.Lists; import jakarta.persistence.EntityManager; import jakarta.persistence.TypedQuery; + import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.database.DatabaseSpecificSQLGenerator; import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRepaymentPeriodData; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/repository/LoanBuyDownFeeBalanceRepository.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/repository/LoanBuyDownFeeBalanceRepository.java index 08e126f306f..d3a9721bf54 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/repository/LoanBuyDownFeeBalanceRepository.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/repository/LoanBuyDownFeeBalanceRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.repository; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.data.AmortizationAllocationBaseTransactionDTO; import org.apache.fineract.portfolio.loanaccount.domain.LoanBuyDownFeeBalance; import org.springframework.data.jpa.repository.JpaRepository; @@ -48,5 +49,5 @@ public interface LoanBuyDownFeeBalanceRepository WHERE lbdfb.loanTransaction.id = :loanTransactionId AND l.id = :loanId """) AmortizationAllocationBaseTransactionDTO findBaseTransactionInfo(@Param("loanTransactionId") Long loanTransactionId, - @Param("loanId") Long loanId); + @Param("loanId") Long loanId); } diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/repository/LoanCapitalizedIncomeBalanceRepository.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/repository/LoanCapitalizedIncomeBalanceRepository.java index f7a096fb17c..ed18c712e1d 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/repository/LoanCapitalizedIncomeBalanceRepository.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/repository/LoanCapitalizedIncomeBalanceRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.data.AmortizationAllocationBaseTransactionDTO; import org.apache.fineract.portfolio.loanaccount.domain.LoanCapitalizedIncomeBalance; import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionRepaymentPeriodData; @@ -62,5 +63,5 @@ public interface LoanCapitalizedIncomeBalanceRepository extends JpaRepository * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.repository; import java.util.Optional; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.domain.ProgressiveLoanModel; import org.springframework.data.jpa.repository.JpaRepository; 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 d3cdbf02db2..bd07881a137 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 @@ -6,9 +6,9 @@ * 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 @@ -33,11 +33,13 @@ import static org.apache.fineract.portfolio.loanaccount.rescheduleloan.data.LoanRescheduleRequestDataValidatorImpl.validateSupportedParameters; import com.google.gson.JsonElement; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; import java.util.stream.Stream; + import lombok.AllArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -123,7 +125,7 @@ private void validateExtraTerms(DataValidatorBuilder dataValidatorBuilder, Loan } private Integer validateExtraTermsParam(FromJsonHelper fromJsonHelper, JsonElement jsonElement, - DataValidatorBuilder dataValidatorBuilder, Loan loan) { + DataValidatorBuilder dataValidatorBuilder, Loan loan) { final Integer extraTerms = fromJsonHelper.extractIntegerWithLocaleNamed(RescheduleLoansApiConstants.extraTermsParamName, jsonElement); @@ -216,7 +218,7 @@ public void validateForRejectAction(JsonCommand jsonCommand, LoanRescheduleReque } private BigDecimal validateInterestRateParam(final FromJsonHelper fromJsonHelper, final JsonElement jsonElement, - DataValidatorBuilder dataValidatorBuilder, Loan loan) { + DataValidatorBuilder dataValidatorBuilder, Loan loan) { final BigDecimal interestRate = fromJsonHelper .extractBigDecimalWithLocaleNamed(RescheduleLoansApiConstants.newInterestRateParamName, jsonElement); DataValidatorBuilder interestRateDataValidatorBuilder = dataValidatorBuilder.reset() diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BuyDownFeePlatformService.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BuyDownFeePlatformService.java index 69180af13fe..77d3791933f 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BuyDownFeePlatformService.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BuyDownFeePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BuyDownFeeReadPlatformService.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BuyDownFeeReadPlatformService.java index e717082dff1..0fd7fecc555 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BuyDownFeeReadPlatformService.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BuyDownFeeReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.data.BuyDownFeeAmortizationDetails; public interface BuyDownFeeReadPlatformService { diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BuyDownFeeReadPlatformServiceImpl.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BuyDownFeeReadPlatformServiceImpl.java index 49ea50a6b7b..cdb72071fe5 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BuyDownFeeReadPlatformServiceImpl.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BuyDownFeeReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.util.List; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.exception.GeneralPlatformDomainRuleException; import org.apache.fineract.infrastructure.core.service.MathUtil; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BuyDownFeeWritePlatformServiceImpl.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BuyDownFeeWritePlatformServiceImpl.java index 1a67e42cdc5..c2da2e0404f 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BuyDownFeeWritePlatformServiceImpl.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BuyDownFeeWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.LinkedHashMap; import java.util.Map; import java.util.Optional; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeBalanceReadService.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeBalanceReadService.java index aefc0de5ea6..8d0b1613157 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeBalanceReadService.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeBalanceReadService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.data.CapitalizedIncomeDetails; import org.apache.fineract.portfolio.loanaccount.data.LoanCapitalizedIncomeData; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeBalanceReadServiceImpl.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeBalanceReadServiceImpl.java index 1dbfc44e7a4..537977cecbf 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeBalanceReadServiceImpl.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeBalanceReadServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.exception.GeneralPlatformDomainRuleException; import org.apache.fineract.infrastructure.core.service.MathUtil; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeBalanceServiceImpl.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeBalanceServiceImpl.java index 60a7271cf57..88c21287577 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeBalanceServiceImpl.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeBalanceServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.math.BigDecimal; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.organisation.monetary.domain.Money; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeWritePlatformServiceImpl.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeWritePlatformServiceImpl.java index 2c804898ca7..7f19bb7f149 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeWritePlatformServiceImpl.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CapitalizedIncomeWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.List; import java.util.Map; import java.util.Optional; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.codes.domain.CodeValueRepository; @@ -132,7 +133,7 @@ public CommandProcessingResult addCapitalizedIncome(final Long loanId, final Jso @Override public CommandProcessingResult capitalizedIncomeAdjustment(final Long loanId, final Long capitalizedIncomeTransactionId, - final JsonCommand command) { + final JsonCommand command) { loanTransactionValidator.validateCapitalizedIncomeAdjustment(command, loanId, capitalizedIncomeTransactionId); final Loan loan = loanAssembler.assembleFrom(loanId); final Map changes = new LinkedHashMap<>(); diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestScheduleModelRepositoryWrapper.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestScheduleModelRepositoryWrapper.java index 977fa53dc12..d1afecfebe3 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestScheduleModelRepositoryWrapper.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestScheduleModelRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.Optional; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.domain.ProgressiveLoanModel; import org.apache.fineract.portfolio.loanproduct.calc.data.ProgressiveLoanInterestScheduleModel; @@ -36,7 +37,7 @@ public interface InterestScheduleModelRepositoryWrapper { ProgressiveLoanInterestScheduleModel writeInterestScheduleModel(Loan loan, ProgressiveLoanInterestScheduleModel model); Optional readProgressiveLoanInterestScheduleModel(Long loanId, ILoanConfigurationDetails detail, - Integer installmentAmountInMultipliesOf); + Integer installmentAmountInMultipliesOf); boolean hasValidModelForDate(Long loanId, LocalDate targetDate); diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestScheduleModelRepositoryWrapperImpl.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestScheduleModelRepositoryWrapperImpl.java index 97683efefcd..c1d8fd9bbb1 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestScheduleModelRepositoryWrapperImpl.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestScheduleModelRepositoryWrapperImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,10 +20,12 @@ import jakarta.persistence.FlushModeType; import jakarta.transaction.Transactional; + import java.time.LocalDate; import java.util.Optional; import java.util.Set; import java.util.concurrent.atomic.AtomicReference; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.persistence.FlushModeHandler; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -129,7 +131,7 @@ public Optional getSavedModel(Loan loan, L @Override public Optional readProgressiveLoanInterestScheduleModel(final Long loanId, - final ILoanConfigurationDetails detail, final Integer installmentAmountInMultipliesOf) { + final ILoanConfigurationDetails detail, final Integer installmentAmountInMultipliesOf) { return loanModelRepository.findOneByLoanId(loanId) // .map(ProgressiveLoanModel::getJsonModel) // .map(jsonModel -> progressiveLoanInterestScheduleModelParserService.fromJson(jsonModel, detail, diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestScheduleModelServiceGsonContext.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestScheduleModelServiceGsonContext.java index 3b28767c5fd..f057fa4f56a 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestScheduleModelServiceGsonContext.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestScheduleModelServiceGsonContext.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.lang.reflect.Type; import java.math.MathContext; import java.util.ArrayList; + import lombok.Data; import lombok.RequiredArgsConstructor; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanConfiguration.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanConfiguration.java index 08b25899e8f..440f84197df 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanConfiguration.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanInterestScheduleModelParserService.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanInterestScheduleModelParserService.java index 0d3487a8a74..e91ee79df64 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanInterestScheduleModelParserService.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanInterestScheduleModelParserService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.math.MathContext; + import org.apache.fineract.portfolio.loanproduct.calc.data.ProgressiveLoanInterestScheduleModel; import org.apache.fineract.portfolio.loanproduct.domain.ILoanConfigurationDetails; @@ -33,5 +34,5 @@ public interface ProgressiveLoanInterestScheduleModelParserService { * Restore a ProgressiveLoanInterestScheduleModel from a JSON string. */ ProgressiveLoanInterestScheduleModel fromJson(String s, ILoanConfigurationDetails loanProductRelatedDetail, MathContext mc, - Integer installmentAmountInMultipliesOf); + Integer installmentAmountInMultipliesOf); } diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanInterestScheduleModelParserServiceGsonImpl.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanInterestScheduleModelParserServiceGsonImpl.java index 477df16df0c..00ef9c72258 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanInterestScheduleModelParserServiceGsonImpl.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanInterestScheduleModelParserServiceGsonImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,10 @@ import com.google.gson.GsonBuilder; import com.google.gson.InstanceCreator; import com.google.gson.ToNumberPolicy; + import java.math.MathContext; import java.time.LocalDate; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.serialization.gson.JsonExcludeAnnotationBasedExclusionStrategy; @@ -52,7 +54,7 @@ private Gson createSerializer() { } private Gson createDeserializer(ILoanConfigurationDetails loanProductRelatedDetail, MathContext mc, - Integer installmentAmountInMultipliesOf) { + Integer installmentAmountInMultipliesOf) { InterestScheduleModelServiceGsonContext ctx = new InterestScheduleModelServiceGsonContext( new MonetaryCurrency(loanProductRelatedDetail.getCurrencyData()), mc, loanProductRelatedDetail, installmentAmountInMultipliesOf); @@ -74,7 +76,7 @@ public String toJson(@NonNull ProgressiveLoanInterestScheduleModel model) { @Override public ProgressiveLoanInterestScheduleModel fromJson(String s, @NonNull ILoanConfigurationDetails loanProductRelatedDetail, - @NonNull MathContext mc, Integer installmentAmountInMultipliesOf) { + @NonNull MathContext mc, Integer installmentAmountInMultipliesOf) { if (s == null) { return null; } diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanModelProcessingService.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanModelProcessingService.java index 4cedc8a6ccc..b6823c5839e 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanModelProcessingService.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanModelProcessingService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil; import org.apache.fineract.portfolio.loanaccount.domain.Loan; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanModelRecalculationService.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanModelRecalculationService.java index 66e41f573c6..ec2bbc78d74 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanModelRecalculationService.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanModelRecalculationService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.tuple.Pair; import org.apache.fineract.portfolio.loanaccount.domain.ChangedTransactionDetail; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanStatusChangePlatformServiceImpl.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanStatusChangePlatformServiceImpl.java index de25df23338..09466c2fe62 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanStatusChangePlatformServiceImpl.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanStatusChangePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanTransactionValidator.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanTransactionValidator.java index 553c6adff6b..c3efca74f66 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanTransactionValidator.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanTransactionValidator.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/AdvancedPaymentScheduleTransactionProcessorCondition.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/AdvancedPaymentScheduleTransactionProcessorCondition.java index 6dbaf666572..4a894b53a17 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/AdvancedPaymentScheduleTransactionProcessorCondition.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/AdvancedPaymentScheduleTransactionProcessorCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/ProgressiveLoanAccountConfiguration.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/ProgressiveLoanAccountConfiguration.java index 936e0f8e1e4..744cac0915c 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/ProgressiveLoanAccountConfiguration.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanaccount/starter/ProgressiveLoanAccountConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -54,12 +54,12 @@ public class ProgressiveLoanAccountConfiguration { @Bean @ConditionalOnMissingBean(CapitalizedIncomePlatformService.class) public CapitalizedIncomePlatformService capitalizedIncomePlatformService(ProgressiveLoanTransactionValidator loanTransactionValidator, - LoanAssembler loanAssembler, LoanTransactionRepository loanTransactionRepository, - PaymentDetailWritePlatformService paymentDetailWritePlatformService, LoanJournalEntryPoster journalEntryPoster, - ExternalIdFactory externalIdFactory, LoanCapitalizedIncomeBalanceRepository capitalizedIncomeBalanceRepository, - ReprocessLoanTransactionsService reprocessLoanTransactionsService, LoanBalanceService loanBalanceService, - LoanLifecycleStateMachine loanLifecycleStateMachine, BusinessEventNotifierService businessEventNotifierService, - CodeValueRepository codeValueRepository, LoanScheduleService loanScheduleService, ApplicationEventPublisher eventPublisher) { + LoanAssembler loanAssembler, LoanTransactionRepository loanTransactionRepository, + PaymentDetailWritePlatformService paymentDetailWritePlatformService, LoanJournalEntryPoster journalEntryPoster, + ExternalIdFactory externalIdFactory, LoanCapitalizedIncomeBalanceRepository capitalizedIncomeBalanceRepository, + ReprocessLoanTransactionsService reprocessLoanTransactionsService, LoanBalanceService loanBalanceService, + LoanLifecycleStateMachine loanLifecycleStateMachine, BusinessEventNotifierService businessEventNotifierService, + CodeValueRepository codeValueRepository, LoanScheduleService loanScheduleService, ApplicationEventPublisher eventPublisher) { return new CapitalizedIncomeWritePlatformServiceImpl(loanTransactionValidator, loanAssembler, loanTransactionRepository, paymentDetailWritePlatformService, journalEntryPoster, externalIdFactory, capitalizedIncomeBalanceRepository, reprocessLoanTransactionsService, loanBalanceService, loanLifecycleStateMachine, businessEventNotifierService, @@ -69,10 +69,10 @@ public CapitalizedIncomePlatformService capitalizedIncomePlatformService(Progres @Bean @ConditionalOnMissingBean(ProgressiveLoanTransactionValidator.class) public ProgressiveLoanTransactionValidator progressiveLoanTransactionValidator(FromJsonHelper fromApiJsonHelper, - LoanTransactionValidator loanTransactionValidator, LoanRepositoryWrapper loanRepositoryWrapper, - LoanCapitalizedIncomeBalanceRepository loanCapitalizedIncomeBalanceRepository, - LoanBuyDownFeeBalanceRepository loanBuydownFeeBalanceRepository, LoanTransactionRepository loanTransactionRepository, - LoanMaximumAmountCalculator loanMaximumAmountCalculator) { + LoanTransactionValidator loanTransactionValidator, LoanRepositoryWrapper loanRepositoryWrapper, + LoanCapitalizedIncomeBalanceRepository loanCapitalizedIncomeBalanceRepository, + LoanBuyDownFeeBalanceRepository loanBuydownFeeBalanceRepository, LoanTransactionRepository loanTransactionRepository, + LoanMaximumAmountCalculator loanMaximumAmountCalculator) { return new ProgressiveLoanTransactionValidatorImpl(fromApiJsonHelper, loanTransactionValidator, loanRepositoryWrapper, loanCapitalizedIncomeBalanceRepository, loanBuydownFeeBalanceRepository, loanTransactionRepository, loanMaximumAmountCalculator); @@ -88,7 +88,7 @@ public CapitalizedIncomeBalanceService capitalizedIncomeBalanceService( @Bean @ConditionalOnMissingBean(CapitalizedIncomeBalanceReadService.class) public CapitalizedIncomeBalanceReadService capitalizedIncomeBalanceReadService(LoanRepositoryWrapper loanRepository, - LoanCapitalizedIncomeBalanceRepository loanCapitalizedIncomeBalanceRepository) { + LoanCapitalizedIncomeBalanceRepository loanCapitalizedIncomeBalanceRepository) { return new CapitalizedIncomeBalanceReadServiceImpl(loanRepository, loanCapitalizedIncomeBalanceRepository); } 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 9960b8d6608..d9e10c885fc 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 @@ -6,9 +6,9 @@ * 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 @@ -19,11 +19,13 @@ package org.apache.fineract.portfolio.loanproduct.calc; import jakarta.validation.constraints.NotNull; + import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; import java.util.List; import java.util.Optional; + import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.portfolio.loanaccount.loanschedule.domain.LoanApplicationTerms; @@ -46,7 +48,7 @@ public interface EMICalculator { */ @NotNull ProgressiveLoanInterestScheduleModel generatePeriodInterestScheduleModel(@NotNull List periods, - @NotNull ILoanConfigurationDetails loanProductRelatedDetail, Integer installmentAmountInMultiplesOf, MathContext mc); + @NotNull ILoanConfigurationDetails loanProductRelatedDetail, Integer installmentAmountInMultiplesOf, MathContext mc); /** * This method creates an Interest model with repayment periods from the installments which retrieved from the @@ -61,7 +63,7 @@ ProgressiveLoanInterestScheduleModel generateInstallmentInterestScheduleModel( * Find repayment period based on Due Date. */ Optional findRepaymentPeriod(ProgressiveLoanInterestScheduleModel scheduleModel, LocalDate fromDate, - LocalDate dueDate); + LocalDate dueDate); /** * Applies the disbursement on the interest model. This method recalculates the EMI amounts from the action date. @@ -79,10 +81,10 @@ Optional findRepaymentPeriod(ProgressiveLoanInterestScheduleMod * date. */ void changeInterestRate(ProgressiveLoanInterestScheduleModel scheduleModel, LocalDate newInterestSubmittedOnDate, - BigDecimal newInterestRate); + BigDecimal newInterestRate); void addRepaymentPeriods(ProgressiveLoanInterestScheduleModel scheduleModel, LocalDate submittedOnDate, - int numberOfRepaymentPeriodsToAdd, List alreadyProcessedTransactions); + int numberOfRepaymentPeriodsToAdd, List alreadyProcessedTransactions); /** * This method applies outstanding balance correction on the interest model. Negative amount decreases the @@ -90,19 +92,19 @@ void addRepaymentPeriods(ProgressiveLoanInterestScheduleModel scheduleModel, Loc * repayments. */ void addBalanceCorrection(ProgressiveLoanInterestScheduleModel scheduleModel, LocalDate balanceCorrectionDate, - Money balanceCorrectionAmount); + Money balanceCorrectionAmount); /** * This method used for pay interest portion during the repayment transaction. */ void payInterest(ProgressiveLoanInterestScheduleModel scheduleModel, LocalDate repaymentPeriodFromDate, - LocalDate repaymentPeriodDueDate, LocalDate transactionDate, Money interestAmount); + LocalDate repaymentPeriodDueDate, LocalDate transactionDate, Money interestAmount); /** * This method used for pay principal portion during the repayment transaction. */ void payPrincipal(ProgressiveLoanInterestScheduleModel scheduleModel, LocalDate repaymentPeriodFromDate, - LocalDate repaymentPeriodDueDate, LocalDate transactionDate, Money principalAmount); + LocalDate repaymentPeriodDueDate, LocalDate transactionDate, Money principalAmount); /** * This method used for credit principal portion. This method increases the outstanding balance. This method creates @@ -121,7 +123,7 @@ void payPrincipal(ProgressiveLoanInterestScheduleModel scheduleModel, LocalDate */ @NotNull PeriodDueDetails getDueAmounts(@NotNull ProgressiveLoanInterestScheduleModel scheduleModel, @NotNull LocalDate periodFromDate, - @NotNull LocalDate periodDueDate, @NotNull LocalDate targetDate); + @NotNull LocalDate periodDueDate, @NotNull LocalDate targetDate); /** * Gives back the sum of the interest from the whole model on the given date. Fixed interest till date calculation @@ -133,8 +135,8 @@ PeriodDueDetails getDueAmounts(@NotNull ProgressiveLoanInterestScheduleModel sch */ @NotNull Money getPeriodInterestTillDate(@NotNull ProgressiveLoanInterestScheduleModel scheduleModel, @NotNull LocalDate periodFromDate, - @NotNull LocalDate periodDueDate, @NotNull LocalDate targetDate, boolean includeChargebackInterest, - boolean fixedInterestTillDate); + @NotNull LocalDate periodDueDate, @NotNull LocalDate targetDate, boolean includeChargebackInterest, + boolean fixedInterestTillDate); Money getOutstandingLoanBalanceOfPeriod(ProgressiveLoanInterestScheduleModel interestScheduleModel, LocalDate targetDate); @@ -151,7 +153,7 @@ Money getPeriodInterestTillDate(@NotNull ProgressiveLoanInterestScheduleModel sc void applyInterestPause(ProgressiveLoanInterestScheduleModel scheduleModel, LocalDate fromDate, LocalDate endDate); void updateModelRepaymentPeriodsDuringReAge(ProgressiveLoanInterestScheduleModel ctx, LocalDate loanTransaction, - LocalDate reAgeFirstDueDate, LocalDate transactionDate, LoanApplicationTerms loanApplicationTerms, MathContext mc); + LocalDate reAgeFirstDueDate, LocalDate transactionDate, LoanApplicationTerms loanApplicationTerms, MathContext mc); boolean recalculateModelOverdueAmountsTillDate(ProgressiveLoanInterestScheduleModel ctx, LocalDate targetDate, boolean prepayAttempt); @@ -162,24 +164,24 @@ void updateModelRepaymentPeriodsDuringReAge(ProgressiveLoanInterestScheduleModel Money getOutstandingInterestTillDate(@NotNull ProgressiveLoanInterestScheduleModel scheduleModel, @NotNull LocalDate tillDate); OutstandingDetails precalculateReAgeEqualAmortizationAmount(ProgressiveLoanInterestScheduleModel interestSchedule, - LocalDate transactionDate, LoanReAgeParameterData reageParameter); + LocalDate transactionDate, LoanReAgeParameterData reageParameter); void reAgeEqualAmortization(ProgressiveLoanInterestScheduleModel interestSchedule, LocalDate transactionDate, - LoanReAgeParameterData reageParameter, Money feesPenaltiesOutstanding, - EqualAmortizationValues feesPenaltiesEqualAmortizationValues); + LoanReAgeParameterData reageParameter, Money feesPenaltiesOutstanding, + EqualAmortizationValues feesPenaltiesEqualAmortizationValues); EqualAmortizationValues calculateEqualAmortizationValues(Money totalOutstanding, Integer numberOfInstallments, - Integer installmentAmountInMultiplesOf, MonetaryCurrency currency); + Integer installmentAmountInMultiplesOf, MonetaryCurrency currency); EqualAmortizationValues calculateAdjustedEqualAmortizationValues(Money outstanding, Money total, - Money sumOfOtherEqualAmortizationValues, Integer numberOfInstallments, Integer installmentAmountInMultiplesOf, - MonetaryCurrency currency); + Money sumOfOtherEqualAmortizationValues, Integer numberOfInstallments, Integer installmentAmountInMultiplesOf, + MonetaryCurrency currency); void changeDueDate(ProgressiveLoanInterestScheduleModel scheduleModel, LoanApplicationTerms loanApplicationTerms, - LocalDate targetRepaymentPeriodDueDate, LocalDate newDueDate); + LocalDate targetRepaymentPeriodDueDate, LocalDate newDueDate); void updateModelRepaymentPeriodsDuringReAmortization(ProgressiveLoanInterestScheduleModel model, LocalDate transactionDate); void updateModelRepaymentPeriodsDuringReAmortizationWithEqualInterestSplit(ProgressiveLoanInterestScheduleModel model, - LocalDate transactionDate); + LocalDate transactionDate); } diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/EMICalculatorDataMapper.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/EMICalculatorDataMapper.java index 51b8f46835a..57c71560fa4 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/EMICalculatorDataMapper.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/EMICalculatorDataMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanproduct.calc; import java.util.List; + 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; @@ -31,7 +32,8 @@ public final class EMICalculatorDataMapper { - private EMICalculatorDataMapper() {} + private EMICalculatorDataMapper() { + } public static RepaymentScheduleInstallmentData toRepaymentScheduleInstallmentData(LoanRepaymentScheduleInstallment installment) { return RepaymentScheduleInstallmentConverter.toData(installment); 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 6324f0bf7c6..a3bc1258c48 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 @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import jakarta.annotation.Nonnull; import jakarta.validation.constraints.NotNull; + import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; @@ -37,6 +38,7 @@ import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.IntStream; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.LocalDateInterval; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -80,8 +82,8 @@ public final class ProgressiveEMICalculator implements EMICalculator { @Override @NotNull public ProgressiveLoanInterestScheduleModel generatePeriodInterestScheduleModel(@NotNull List periods, - @NotNull ILoanConfigurationDetails loanProductRelatedDetail, final Integer installmentAmountInMultiplesOf, - final MathContext mc) { + @NotNull ILoanConfigurationDetails loanProductRelatedDetail, final Integer installmentAmountInMultiplesOf, + final MathContext mc) { return generateInterestScheduleModel(periods, LoanScheduleModelRepaymentPeriod::periodFromDate, LoanScheduleModelRepaymentPeriod::periodDueDate, loanProductRelatedDetail, installmentAmountInMultiplesOf, mc); } @@ -98,8 +100,8 @@ public ProgressiveLoanInterestScheduleModel generateInstallmentInterestScheduleM @NotNull private ProgressiveLoanInterestScheduleModel generateInterestScheduleModel(@NotNull List periods, Function from, - Function to, @NotNull ILoanConfigurationDetails loanProductRelatedDetail, - final Integer installmentAmountInMultiplesOf, final MathContext mc) { + Function to, @NotNull ILoanConfigurationDetails loanProductRelatedDetail, + final Integer installmentAmountInMultiplesOf, final MathContext mc) { final Money zero = Money.zero(loanProductRelatedDetail.getCurrencyData(), mc); final AtomicReference prev = new AtomicReference<>(); List repaymentPeriods = periods.stream().map(e -> { @@ -112,7 +114,7 @@ private ProgressiveLoanInterestScheduleModel generateInterestScheduleModel(@ @Override public Optional findRepaymentPeriod(final ProgressiveLoanInterestScheduleModel scheduleModel, - final LocalDate repaymentPeriodFromDate, final LocalDate repaymentPeriodDueDate) { + final LocalDate repaymentPeriodFromDate, final LocalDate repaymentPeriodDueDate) { if (scheduleModel == null) { return Optional.empty(); } @@ -124,13 +126,13 @@ public Optional findRepaymentPeriod(final ProgressiveLoanIntere */ @Override public void addDisbursement(final ProgressiveLoanInterestScheduleModel scheduleModel, final LocalDate disbursementDueDate, - final Money disbursedAmount) { + final Money disbursedAmount) { LocalDate effectiveDueDate = scheduleModel.loanProductRelatedDetail().getInterestCalculationPeriodMethod() != null && scheduleModel.loanProductRelatedDetail().getInterestCalculationPeriodMethod().isSameAsRepaymentPeriod() && !scheduleModel.loanProductRelatedDetail().isAllowPartialPeriodInterestCalculation() - ? scheduleModel.repaymentPeriods().stream().filter(rp -> rp.getDueDate().isAfter(disbursementDueDate)).findFirst() - .map(RepaymentPeriod::getFromDate).orElse(disbursementDueDate) - : disbursementDueDate; + ? scheduleModel.repaymentPeriods().stream().filter(rp -> rp.getDueDate().isAfter(disbursementDueDate)).findFirst() + .map(RepaymentPeriod::getFromDate).orElse(disbursementDueDate) + : disbursementDueDate; addDisbursement(scheduleModel, EmiChangeOperation.disburse(effectiveDueDate, disbursedAmount)); } @@ -153,7 +155,7 @@ private void addDisbursement(final ProgressiveLoanInterestScheduleModel schedule } private void addFullTermTrancheDisbursement(final ProgressiveLoanInterestScheduleModel scheduleModel, - final EmiChangeOperation operation) { + final EmiChangeOperation operation) { final MathContext mc = scheduleModel.mc(); final LocalDate disbursementDate = operation.getSubmittedOnDate(); final Money disbursedAmount = operation.getAmount(); @@ -174,7 +176,7 @@ private void addFullTermTrancheDisbursement(final ProgressiveLoanInterestSchedul } private LoanApplicationTerms buildLoanApplicationTerms(final ILoanConfigurationDetails loanProductRelatedDetail, - final LocalDate firstDisbursedPeriodStartDate, final Money disbursedAmount, final MathContext mc) { + final LocalDate firstDisbursedPeriodStartDate, final Money disbursedAmount, final MathContext mc) { return new LoanApplicationTerms.Builder() // Loan basics .currency(loanProductRelatedDetail.getCurrencyData()).principal(disbursedAmount) @@ -204,7 +206,7 @@ private LoanApplicationTerms buildLoanApplicationTerms(final ILoanConfigurationD } private void mergeNewScheduleModelWithExistingOne(final ProgressiveLoanInterestScheduleModel scheduleModel, - final ProgressiveLoanInterestScheduleModel temporaryScheduleModel, final EmiChangeOperation operation) { + final ProgressiveLoanInterestScheduleModel temporaryScheduleModel, final EmiChangeOperation operation) { final List newPeriods = temporaryScheduleModel.repaymentPeriods(); if (newPeriods.isEmpty()) { @@ -248,7 +250,7 @@ private void mergeNewScheduleModelWithExistingOne(final ProgressiveLoanInterestS } private LocalDate getEffectiveRepaymentDueDate(final ProgressiveLoanInterestScheduleModel scheduleModel, - final RepaymentPeriod changedRepaymentPeriod, final LocalDate operationDueDate) { + final RepaymentPeriod changedRepaymentPeriod, final LocalDate operationDueDate) { final boolean isRelatedToNextRepaymentPeriod = changedRepaymentPeriod.getDueDate().isEqual(operationDueDate); if (isRelatedToNextRepaymentPeriod) { final Optional nextRepaymentPeriod = scheduleModel.repaymentPeriods().stream() @@ -267,7 +269,7 @@ private LocalDate getEffectiveRepaymentDueDate(final ProgressiveLoanInterestSche */ @Override public void addCapitalizedIncome(final ProgressiveLoanInterestScheduleModel scheduleModel, final LocalDate transactionDueDate, - final Money transactionAmount) { + final Money transactionAmount) { addCapitalizedIncome(scheduleModel, EmiChangeOperation.capitalizedIncome(transactionDueDate, transactionAmount)); } @@ -277,28 +279,28 @@ private void addCapitalizedIncome(final ProgressiveLoanInterestScheduleModel sch scheduleModel.changeOutstandingBalanceAndUpdateInterestPeriods(operation.getSubmittedOnDate(), scheduleModel.zero(), scheduleModel.zero(), operation.getAmount()).ifPresent((repaymentPeriod) -> { - calculateEMIValueAndRateFactors( - getEffectiveRepaymentDueDate(scheduleModel, repaymentPeriod, operation.getSubmittedOnDate()), scheduleModel, - operation); - }); + calculateEMIValueAndRateFactors( + getEffectiveRepaymentDueDate(scheduleModel, repaymentPeriod, operation.getSubmittedOnDate()), scheduleModel, + operation); + }); } @Override public void changeInterestRate(final ProgressiveLoanInterestScheduleModel scheduleModel, final LocalDate newInterestSubmittedOnDate, - final BigDecimal newInterestRate) { + final BigDecimal newInterestRate) { changeInterestRate(scheduleModel, EmiChangeOperation.changeInterestRate(newInterestSubmittedOnDate, newInterestRate)); } @Override public void addRepaymentPeriods(final ProgressiveLoanInterestScheduleModel scheduleModel, final LocalDate submittedOnDate, - final int numberOfRepaymentPeriodsToAdd, final List alreadyProcessedTransactions) { + final int numberOfRepaymentPeriodsToAdd, final List alreadyProcessedTransactions) { addRepaymentPeriods(scheduleModel, EmiChangeOperation.addRepaymentPeriods(submittedOnDate, scheduleModel.zero(), numberOfRepaymentPeriodsToAdd), alreadyProcessedTransactions); } private void addRepaymentPeriods(final ProgressiveLoanInterestScheduleModel scheduleModel, final EmiChangeOperation operation, - final List alreadyProcessedTransactions) { + final List alreadyProcessedTransactions) { final Optional reAgeTransactionParameter = alreadyProcessedTransactions.stream() .filter(ProcessedTransactionData::isReAge).findFirst().flatMap(ProcessedTransactionData::getReAgeParameterOptional); final LocalDate seedDate = reAgeTransactionParameter.map(LoanReAgeParameterData::getStartDate).orElse(scheduleModel.getStartDate()); @@ -320,7 +322,7 @@ private void addRepaymentPeriods(final ProgressiveLoanInterestScheduleModel sche } public void updateModel(ProgressiveLoanInterestScheduleModel scheduleModel, List updateExpectedRepaymentPeriods, - Function from, Function to) { + Function from, Function to) { final ILoanConfigurationDetails loanProductRelatedDetail = scheduleModel.loanProductRelatedDetail(); MathContext mc = scheduleModel.mc(); final Money zero = Money.zero(loanProductRelatedDetail.getCurrencyData(), mc); @@ -338,7 +340,7 @@ public void updateModel(ProgressiveLoanInterestScheduleModel scheduleModel, } List generateAdditionalRepaymentPeriodDueDates(final ProgressiveLoanInterestScheduleModel scheduleModel, - final int periods, final int existingRepayments, Function repaymentPeriodLengthResolver) { + final int periods, final int existingRepayments, Function repaymentPeriodLengthResolver) { final List expectedRepaymentPeriods = new ArrayList<>(); Integer repayEvery = scheduleModel.loanProductRelatedDetail().getRepayEvery(); IntStream.range(existingRepayments, existingRepayments + periods).forEach( @@ -360,17 +362,17 @@ private void changeInterestRate(final ProgressiveLoanInterestScheduleModel sched @Override public void addBalanceCorrection(ProgressiveLoanInterestScheduleModel scheduleModel, LocalDate balanceCorrectionDate, - Money balanceCorrectionAmount) { + Money balanceCorrectionAmount) { scheduleModel.changeOutstandingBalanceAndUpdateInterestPeriods(balanceCorrectionDate, scheduleModel.zero(), balanceCorrectionAmount, scheduleModel.zero()).ifPresent(repaymentPeriod -> { - calculateRateFactorForRepaymentPeriod(repaymentPeriod, scheduleModel); - calculateOutstandingBalance(scheduleModel); - calculateLastUnpaidRepaymentPeriodEMI(scheduleModel, balanceCorrectionDate); - }); + calculateRateFactorForRepaymentPeriod(repaymentPeriod, scheduleModel); + calculateOutstandingBalance(scheduleModel); + calculateLastUnpaidRepaymentPeriodEMI(scheduleModel, balanceCorrectionDate); + }); } public void addOverdueBalanceCorrection(final ProgressiveLoanInterestScheduleModel scheduleModel, final LocalDate correctionDate, - final Money overdueAmount) { + final Money overdueAmount) { scheduleModel .changeOutstandingBalanceAndUpdateInterestPeriods(correctionDate, scheduleModel.zero(), overdueAmount, scheduleModel.zero()) .ifPresent(repaymentPeriod -> { @@ -383,7 +385,7 @@ public void addOverdueBalanceCorrection(final ProgressiveLoanInterestScheduleMod @Override public void payInterest(ProgressiveLoanInterestScheduleModel scheduleModel, LocalDate repaymentPeriodFromDate, - LocalDate repaymentPeriodDueDate, LocalDate transactionDate, Money interestAmount) { + LocalDate repaymentPeriodDueDate, LocalDate transactionDate, Money interestAmount) { Optional repaymentPeriod = findRepaymentPeriod(scheduleModel, repaymentPeriodFromDate, repaymentPeriodDueDate); Optional latestNotLastOpenRepaymentPeriodBeforeDate = getLatestNotLastOpenRepaymentPeriodBeforeDate(scheduleModel, @@ -400,7 +402,7 @@ public void payInterest(ProgressiveLoanInterestScheduleModel scheduleModel, Loca @Override public void payPrincipal(ProgressiveLoanInterestScheduleModel scheduleModel, LocalDate repaymentPeriodFromDate, - LocalDate repaymentPeriodDueDate, LocalDate transactionDate, Money principalAmount) { + LocalDate repaymentPeriodDueDate, LocalDate transactionDate, Money principalAmount) { if (MathUtil.isEmpty(principalAmount)) { return; } @@ -432,7 +434,7 @@ public void payPrincipal(ProgressiveLoanInterestScheduleModel scheduleModel, Loc } private Optional getLatestNotLastOpenRepaymentPeriodBeforeDate(ProgressiveLoanInterestScheduleModel scheduleModel, - LocalDate transactionDate) { + LocalDate transactionDate) { List unpaidRepaymentPeriods = scheduleModel.repaymentPeriods() // .stream() // .filter(rp -> !rp.isFullyPaid()) // @@ -452,7 +454,7 @@ private Optional getLatestNotLastOpenRepaymentPeriodBeforeDate( } private void addCreditedAmountsToInterestPeriod(ProgressiveLoanInterestScheduleModel scheduleModel, LocalDate transactionDate, - Money creditedPrincipalAmount, Money creditedInterestAmount) { + Money creditedPrincipalAmount, Money creditedInterestAmount) { scheduleModel.repaymentPeriods().stream().filter(checkRepaymentPeriodIsInCreditRange(scheduleModel, transactionDate)).findFirst() .flatMap(repaymentPeriod -> repaymentPeriod.getInterestPeriods().stream() .filter(interestPeriod -> interestPeriod.getFromDate().equals(transactionDate)).reduce((v1, v2) -> v2)) @@ -464,7 +466,7 @@ private void addCreditedAmountsToInterestPeriod(ProgressiveLoanInterestScheduleM @Nonnull private static Predicate checkRepaymentPeriodIsInCreditRange(ProgressiveLoanInterestScheduleModel scheduleModel, - LocalDate transactionDate) { + LocalDate transactionDate) { return repaymentPeriod -> scheduleModel.isLastRepaymentPeriod(repaymentPeriod) ? !transactionDate.isBefore(repaymentPeriod.getFromDate()) && !transactionDate.isAfter(repaymentPeriod.getDueDate()) : !transactionDate.isBefore(repaymentPeriod.getFromDate()) && transactionDate.isBefore(repaymentPeriod.getDueDate()); @@ -472,25 +474,25 @@ private static Predicate checkRepaymentPeriodIsInCreditRange(Pr @Override public void creditPrincipal(ProgressiveLoanInterestScheduleModel scheduleModel, LocalDate transactionDate, - Money creditedPrincipalAmount) { + Money creditedPrincipalAmount) { addCredit(scheduleModel, transactionDate, creditedPrincipalAmount, scheduleModel.zero()); } @Override public void creditInterest(ProgressiveLoanInterestScheduleModel scheduleModel, LocalDate transactionDate, - Money creditedInterestAmount) { + Money creditedInterestAmount) { addCredit(scheduleModel, transactionDate, scheduleModel.zero(), creditedInterestAmount); } private void addCredit(ProgressiveLoanInterestScheduleModel scheduleModel, LocalDate transactionDate, Money creditedPrincipalAmount, - Money creditedInterestAmount) { + Money creditedInterestAmount) { scheduleModel.changeOutstandingBalanceAndUpdateInterestPeriods(transactionDate, scheduleModel.zero(), creditedPrincipalAmount, scheduleModel.zero()).ifPresent(repaymentPeriod -> { - addCreditedAmountsToInterestPeriod(scheduleModel, transactionDate, creditedPrincipalAmount, creditedInterestAmount); - calculateRateFactorForRepaymentPeriod(repaymentPeriod, scheduleModel); - calculateOutstandingBalance(scheduleModel); - calculateLastUnpaidRepaymentPeriodEMI(scheduleModel, transactionDate); - }); + addCreditedAmountsToInterestPeriod(scheduleModel, transactionDate, creditedPrincipalAmount, creditedInterestAmount); + calculateRateFactorForRepaymentPeriod(repaymentPeriod, scheduleModel); + calculateOutstandingBalance(scheduleModel); + calculateLastUnpaidRepaymentPeriodEMI(scheduleModel, transactionDate); + }); } /** @@ -499,7 +501,7 @@ private void addCredit(ProgressiveLoanInterestScheduleModel scheduleModel, Local @Override @NotNull public PeriodDueDetails getDueAmounts(@NotNull ProgressiveLoanInterestScheduleModel scheduleModel, @NotNull LocalDate periodFromDate, - @NotNull LocalDate periodDueDate, @NotNull LocalDate targetDate) { + @NotNull LocalDate periodDueDate, @NotNull LocalDate targetDate) { ProgressiveLoanInterestScheduleModel recalculatedScheduleModelTillDate = recalculateScheduleModelTillDate(scheduleModel, targetDate); RepaymentPeriod repaymentPeriod = recalculatedScheduleModelTillDate @@ -539,8 +541,8 @@ public PeriodDueDetails getDueAmounts(@NotNull ProgressiveLoanInterestScheduleMo @Override @NotNull public Money getPeriodInterestTillDate(@NotNull final ProgressiveLoanInterestScheduleModel scheduleModel, - @NotNull final LocalDate periodFromDate, @NotNull final LocalDate periodDueDate, @NotNull final LocalDate targetDate, - final boolean includeCreditedInterest, final boolean fixedInterestTillDate) { + @NotNull final LocalDate periodFromDate, @NotNull final LocalDate periodDueDate, @NotNull final LocalDate targetDate, + final boolean includeCreditedInterest, final boolean fixedInterestTillDate) { final ProgressiveLoanInterestScheduleModel recalculatedScheduleModelTillDate = recalculateScheduleModelTillDate(scheduleModel, targetDate); final MathContext mc = recalculatedScheduleModelTillDate.mc(); @@ -589,7 +591,7 @@ public OutstandingDetails getOutstandingAmountsTillDate(ProgressiveLoanInterestS @Override public void calculateRateFactorForRepaymentPeriod(final RepaymentPeriod repaymentPeriod, - final ProgressiveLoanInterestScheduleModel scheduleModel) { + final ProgressiveLoanInterestScheduleModel scheduleModel) { repaymentPeriod.getInterestPeriods().forEach(interestPeriod -> { interestPeriod.setRateFactor(calculateRateFactorPerPeriod(scheduleModel, repaymentPeriod, interestPeriod.getFromDate(), interestPeriod.getDueDate())); @@ -634,7 +636,7 @@ private ProgressiveLoanInterestScheduleModel recalculateScheduleModelTillDate( }); } else if (rp.getPrevious().isPresent() && rp.getPrevious().get().equals(repaymentPeriod) && (rp.getInterestPeriods().getFirst().getCreditedInterest().isGreaterThanZero() - || rp.getInterestPeriods().getFirst().getCreditedPrincipal().isGreaterThanZero())) { + || rp.getInterestPeriods().getFirst().getCreditedPrincipal().isGreaterThanZero())) { // NOTE: we need to check whether there is credited on the 1st interest period of the next // period // if so, we need to retain that interest period, but need to update due date to match with from @@ -656,7 +658,7 @@ private ProgressiveLoanInterestScheduleModel recalculateScheduleModelTillDate( } private void calculateEMIValueAndRateFactorsForFlatInterestMethod(final LocalDate calculateFromRepaymentPeriodDueDate, - final ProgressiveLoanInterestScheduleModel scheduleModel, final EmiChangeOperation operation) { + final ProgressiveLoanInterestScheduleModel scheduleModel, final EmiChangeOperation operation) { final List relatedRepaymentPeriods = scheduleModel.getRelatedRepaymentPeriods(calculateFromRepaymentPeriodDueDate); applyInterestMoratoriumIfRequired(scheduleModel); calculateRateFactorForPeriods(relatedRepaymentPeriods, scheduleModel); @@ -671,19 +673,20 @@ private void calculateEMIValueAndRateFactorsForFlatInterestMethod(final LocalDat * Calculate Equal Monthly Installment value and Rate Factor -1 values for calculate Interest */ private void calculateEMIValueAndRateFactors(final LocalDate calculateFromRepaymentPeriodDueDate, - final ProgressiveLoanInterestScheduleModel scheduleModel, final EmiChangeOperation operation) { + final ProgressiveLoanInterestScheduleModel scheduleModel, final EmiChangeOperation operation) { switch (scheduleModel.loanProductRelatedDetail().getInterestMethod()) { case FLAT -> - calculateEMIValueAndRateFactorsForFlatInterestMethod(calculateFromRepaymentPeriodDueDate, scheduleModel, operation); - case DECLINING_BALANCE -> calculateEMIValueAndRateFactorsForDecliningBalanceInterestMethod(calculateFromRepaymentPeriodDueDate, - scheduleModel, operation); + calculateEMIValueAndRateFactorsForFlatInterestMethod(calculateFromRepaymentPeriodDueDate, scheduleModel, operation); + case DECLINING_BALANCE -> + calculateEMIValueAndRateFactorsForDecliningBalanceInterestMethod(calculateFromRepaymentPeriodDueDate, + scheduleModel, operation); default -> throw new UnsupportedOperationException( "Unsupported interest method: " + scheduleModel.loanProductRelatedDetail().getInterestMethod()); } } private void calculateEMIValueAndRateFactorsForDecliningBalanceInterestMethod(final LocalDate calculateFromRepaymentPeriodDueDate, - final ProgressiveLoanInterestScheduleModel scheduleModel, final EmiChangeOperation operation) { + final ProgressiveLoanInterestScheduleModel scheduleModel, final EmiChangeOperation operation) { final List relatedRepaymentPeriods = scheduleModel.getRelatedRepaymentPeriods(calculateFromRepaymentPeriodDueDate); final boolean onlyOnActualModelShouldApply = scheduleModel.isEmpty() || operation.getAction() == EmiChangeOperation.Action.INTEREST_RATE_CHANGE @@ -707,8 +710,8 @@ private void calculateEMIValueAndRateFactorsForDecliningBalanceInterestMethod(fi @Override public void updateModelRepaymentPeriodsDuringReAge(final ProgressiveLoanInterestScheduleModel scheduleModel, - final LocalDate reAgePeriodStartDate, final LocalDate reAgeFirstDueDate, final LocalDate targetDate, - final LoanApplicationTerms loanApplicationTerms, final MathContext mc) { + 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); @@ -733,7 +736,7 @@ public void updateModelRepaymentPeriodsDuringReAge(final ProgressiveLoanInterest @Override public boolean recalculateModelOverdueAmountsTillDate(final ProgressiveLoanInterestScheduleModel scheduleModel, - final LocalDate targetDate, boolean prepayAttempt) { + final LocalDate targetDate, boolean prepayAttempt) { boolean hasChange = false; LocalDate recalculatedTargetDate = DateUtils.isAfter(targetDate, scheduleModel.getLastRepaymentPeriod().getDueDate()) ? scheduleModel.getLastRepaymentPeriod().getDueDate() @@ -784,7 +787,7 @@ public Money getOutstandingInterestTillDate(final ProgressiveLoanInterestSchedul @Override public void changeDueDate(final ProgressiveLoanInterestScheduleModel scheduleModel, final LoanApplicationTerms loanApplicationTerms, - final LocalDate targetRepaymentPeriodDueDate, LocalDate newDueDate) { + final LocalDate targetRepaymentPeriodDueDate, LocalDate newDueDate) { final RepaymentPeriod targetRepaymentPeriod = scheduleModel.findRepaymentPeriod(targetRepaymentPeriodDueDate).orElseThrow(); targetRepaymentPeriod.setDueDate(newDueDate); @@ -825,7 +828,7 @@ public void changeDueDate(final ProgressiveLoanInterestScheduleModel scheduleMod @Override public void updateModelRepaymentPeriodsDuringReAmortization(final ProgressiveLoanInterestScheduleModel model, - final LocalDate transactionDate) { + final LocalDate transactionDate) { moveOutstandingAmountsFromPeriodsBeforeTransactionDate(model.repaymentPeriods(), transactionDate); final List reAmortizedPeriods = model.repaymentPeriods().stream() .filter(rp -> rp.getDueDate().isAfter(transactionDate)).toList(); @@ -837,7 +840,7 @@ public void updateModelRepaymentPeriodsDuringReAmortization(final ProgressiveLoa @Override public void updateModelRepaymentPeriodsDuringReAmortizationWithEqualInterestSplit(final ProgressiveLoanInterestScheduleModel model, - final LocalDate transactionDate) { + final LocalDate transactionDate) { final MathContext mc = model.mc(); final List periodsBeforeTransactionDate = model.repaymentPeriods().stream() .filter(rp -> !rp.getDueDate().isAfter(transactionDate) && !rp.isFullyPaid()).toList(); @@ -913,7 +916,7 @@ private void moveOutstandingAmountsFromPeriodsBeforeTransactionDateForEqualInter } private LocalDate calculateDateForFixedLength(final ProgressiveLoanInterestScheduleModel scheduleModel, - final LoanApplicationTerms loanApplicationTerms, final LocalDate targetRepaymentPeriodDueDate, final LocalDate newDueDate) { + final LoanApplicationTerms loanApplicationTerms, final LocalDate targetRepaymentPeriodDueDate, final LocalDate newDueDate) { final long variationDays = DateUtils.getDifferenceInDays(targetRepaymentPeriodDueDate, newDueDate); final LocalDate repaymentStartDate = scheduleModel.repaymentPeriods().getFirst().getFromDate(); @@ -928,7 +931,7 @@ private LocalDate calculateDateForFixedLength(final ProgressiveLoanInterestSched } private List findPossiblyOverdueRepaymentPeriods(final LocalDate targetDate, - final ProgressiveLoanInterestScheduleModel model) { + final ProgressiveLoanInterestScheduleModel model) { return model.repaymentPeriods().stream() // .filter(repaymentPeriod -> !repaymentPeriod.isReAgedEarlyRepaymentHolder() && DateUtils.isAfter(targetDate, repaymentPeriod.getDueDate())) @@ -936,8 +939,8 @@ private List findPossiblyOverdueRepaymentPeriods(final LocalDat } private boolean adjustOverduePrincipal(final LocalDate currentDate, final RepaymentPeriod currentInstallment, - final Money overduePrincipal, final Money aggregatedOverDuePrincipal, final ProgressiveLoanInterestScheduleModel model, - boolean prepayAttempt) { + final Money overduePrincipal, final Money aggregatedOverDuePrincipal, final ProgressiveLoanInterestScheduleModel model, + boolean prepayAttempt) { final LocalDate fromDate = currentInstallment.getFromDate(); final LocalDate toDate = currentInstallment.getDueDate(); @@ -964,7 +967,7 @@ private boolean adjustOverduePrincipal(final LocalDate currentDate, final Repaym } private boolean shouldRecalculateTillInstallmentDueDate(final ILoanConfigurationDetails loanProductRelatedDetails, - final boolean isPrepayAttempt) { + final boolean isPrepayAttempt) { // Rest frequency type and pre close interest calculation strategy can be controversial // if restFrequencyType == DAILY and preCloseInterestCalculationStrategy == TILL_PRE_CLOSURE_DATE // no problem. Calculate till transaction date @@ -977,9 +980,9 @@ private boolean shouldRecalculateTillInstallmentDueDate(final ILoanConfiguration // we cannot harmonize the two configs. Behaviour should mimic prepay api. return switch (loanProductRelatedDetails.getRestFrequencyType()) { case DAILY -> - isPrepayAttempt && loanProductRelatedDetails.getPreCloseInterestCalculationStrategy().calculateTillRestFrequencyEnabled(); + isPrepayAttempt && loanProductRelatedDetails.getPreCloseInterestCalculationStrategy().calculateTillRestFrequencyEnabled(); case SAME_AS_REPAYMENT_PERIOD -> - loanProductRelatedDetails.getPreCloseInterestCalculationStrategy().calculateTillRestFrequencyEnabled(); + loanProductRelatedDetails.getPreCloseInterestCalculationStrategy().calculateTillRestFrequencyEnabled(); case WEEKLY -> throw new IllegalStateException("Unexpected RecalculationFrequencyType: WEEKLY"); case MONTHLY -> throw new IllegalStateException("Unexpected RecalculationFrequencyType: MONTHLY"); case INVALID -> throw new IllegalStateException("Unexpected RecalculationFrequencyType: INVALID"); @@ -992,8 +995,8 @@ private boolean shouldRecalculateTillInstallmentDueDate(final ILoanConfiguration * period differs significantly from other periods. */ private void attachTemporaryScheduleModelReAgedPeriodsToExistingModel(final ProgressiveLoanInterestScheduleModel scheduleModel, - final ProgressiveLoanInterestScheduleModel temporaryReAgedScheduleModel, final LocalDate reAgeFirstDueDate, - final LocalDate targetDate, final OutstandingDetails paidBalancesFromTransactionDate) { + final ProgressiveLoanInterestScheduleModel temporaryReAgedScheduleModel, final LocalDate reAgeFirstDueDate, + final LocalDate targetDate, final OutstandingDetails paidBalancesFromTransactionDate) { final List newPeriods = temporaryReAgedScheduleModel.repaymentPeriods(); if (newPeriods.isEmpty()) { @@ -1052,7 +1055,7 @@ private void attachTemporaryScheduleModelReAgedPeriodsToExistingModel(final Prog */ @NotNull private ProgressiveLoanInterestScheduleModel generateTemporaryScheduleModel(final LoanApplicationTerms loanApplicationTerms, - final MathContext mc, final LocalDate periodStartDate, final LocalDate disbursementDate) { + final MathContext mc, final LocalDate periodStartDate, final LocalDate disbursementDate) { final List expectedRepaymentPeriods = scheduledDateGenerator.generateRepaymentPeriods(mc, periodStartDate, loanApplicationTerms, null); final ProgressiveLoanInterestScheduleModel temporaryReAgedScheduleModel = generatePeriodInterestScheduleModel( @@ -1069,7 +1072,7 @@ private ProgressiveLoanInterestScheduleModel generateTemporaryScheduleModel(fina * of the principal that was moved. */ private static void moveOutstandingAmountsFromPeriodsBeforeTransactionDate(final List existingRepaymentPeriods, - final LocalDate transactionDate) { + final LocalDate transactionDate) { final List periodsBeforeTransactionDate = existingRepaymentPeriods.stream() .filter(rp -> !rp.getFromDate().isAfter(transactionDate) && !rp.isFullyPaid()).toList(); @@ -1170,7 +1173,7 @@ private void calculateLastUnpaidRepaymentPeriodEMI(ProgressiveLoanInterestSchedu } private void calculateUnrecognizedInterestTillDateOnScheduleModelCopyAndDefer(ProgressiveLoanInterestScheduleModel scheduleModel, - RepaymentPeriod repaymentPeriod, LocalDate tillDate) { + RepaymentPeriod repaymentPeriod, LocalDate tillDate) { MathContext mc = scheduleModel.mc(); ProgressiveLoanInterestScheduleModel scheduleModelCopy = scheduleModel.deepCopy(mc); @@ -1207,7 +1210,7 @@ private void calculateOutstandingBalance(ProgressiveLoanInterestScheduleModel sc } private void checkAndAdjustEmiIfNeededOnRelatedRepaymentPeriods(final ProgressiveLoanInterestScheduleModel scheduleModel, - final List relatedRepaymentPeriods) { + final List relatedRepaymentPeriods) { MathContext mc = scheduleModel.mc(); ProgressiveLoanInterestScheduleModel newScheduleModel = null; int adjustCounter = 1; @@ -1275,7 +1278,7 @@ private BigDecimal calcNominalInterestRatePercentage(final BigDecimal interestRa * * Calculate rate factors from ONLY repayment periods */ private void calculateRateFactorForPeriods(final List repaymentPeriods, - final ProgressiveLoanInterestScheduleModel scheduleModel) { + final ProgressiveLoanInterestScheduleModel scheduleModel) { repaymentPeriods.forEach(repaymentPeriod -> calculateRateFactorForRepaymentPeriod(repaymentPeriod, scheduleModel)); } @@ -1296,7 +1299,7 @@ private Integer numberOfDaysFeb29PeriodOnly(final LocalDate repaymentPeriodFromD } private BigDecimal getNumberOfDays(DaysInYearType daysInYearType, DaysInYearCustomStrategyType customStrategy, - LocalDate interestPeriodFromDate, LocalDate repaymentPeriodFromDate, LocalDate repaymentPeriodDueDate) { + LocalDate interestPeriodFromDate, LocalDate repaymentPeriodFromDate, LocalDate repaymentPeriodDueDate) { Integer numberOfDays = daysInYearType.getNumberOfDays(interestPeriodFromDate); if (numberOfDays == 366 && DaysInYearCustomStrategyType.FEB_29_PERIOD_ONLY.equals(customStrategy)) { numberOfDays = numberOfDaysFeb29PeriodOnly(repaymentPeriodFromDate, repaymentPeriodDueDate); @@ -1305,7 +1308,7 @@ private BigDecimal getNumberOfDays(DaysInYearType daysInYearType, DaysInYearCust } BigDecimal calculateRateFactorPerPeriodForInterest(final ProgressiveLoanInterestScheduleModel scheduleModel, - final RepaymentPeriod repaymentPeriod, final LocalDate interestPeriodFromDate, final LocalDate interestPeriodDueDate) { + final RepaymentPeriod repaymentPeriod, final LocalDate interestPeriodFromDate, final LocalDate interestPeriodDueDate) { final MathContext mc = scheduleModel.mc(); final ILoanConfigurationDetails loanProductRelatedDetail = scheduleModel.loanProductRelatedDetail(); final BigDecimal interestRate = calcNominalInterestRatePercentage(scheduleModel.getInterestRate(interestPeriodFromDate), @@ -1323,7 +1326,7 @@ BigDecimal calculateRateFactorPerPeriodForInterest(final ProgressiveLoanInterest final int numberOfYearsDifferenceInPeriod = interestPeriodDueDate.getYear() - interestPeriodFromDate.getYear(); final boolean partialPeriodCalculationNeeded = daysInYearType == DaysInYearType.ACTUAL && numberOfYearsDifferenceInPeriod > 0 && (!DaysInYearCustomStrategyType.FEB_29_PERIOD_ONLY.equals(daysInYearCustomStrategy) - || isPeriodContainsFeb29(repaymentPeriod.getFromDate(), repaymentPeriod.getDueDate())); + || isPeriodContainsFeb29(repaymentPeriod.getFromDate(), repaymentPeriod.getDueDate())); final BigDecimal repaymentEvery = BigDecimal.valueOf(loanProductRelatedDetail.getRepayEvery()); if (loanProductRelatedDetail.getInterestCalculationPeriodMethod() != null @@ -1358,7 +1361,8 @@ BigDecimal calculateRateFactorPerPeriodForInterest(final ProgressiveLoanInterest case MONTHS -> calculatePeriodRatio(scheduleModel, repaymentPeriod, ChronoUnit.MONTHS, mc); case WEEKS -> calculatePeriodRatio(scheduleModel, repaymentPeriod, ChronoUnit.WEEKS, mc); case DAYS -> calculatePeriodRatio(scheduleModel, repaymentPeriod, ChronoUnit.DAYS, mc); - default -> throw new UnsupportedOperationException("Unsupported repayment frequency: " + repaymentFrequency); + default -> + throw new UnsupportedOperationException("Unsupported repayment frequency: " + repaymentFrequency); }; return calculateRateFactorPerPeriodBasedOnRepaymentFrequency(interestRate, repaymentFrequency, periodRatio, @@ -1369,11 +1373,12 @@ BigDecimal calculateRateFactorPerPeriodForInterest(final ProgressiveLoanInterest } private static BigDecimal calculatePeriodRatio(ProgressiveLoanInterestScheduleModel scheduleModel, RepaymentPeriod repaymentPeriod, - ChronoUnit chronoUnit, MathContext mc) { + ChronoUnit chronoUnit, MathContext mc) { LocalDate seedDate = calculateSeedDate(scheduleModel, repaymentPeriod); int numberOfPeriodBetweenSeedDateAndActualRepaymentPeriod = switch (chronoUnit) { - case DAYS, WEEKS, YEARS -> DateUtils.getExactDifference(seedDate, repaymentPeriod.getFromDate(), chronoUnit); + case DAYS, WEEKS, YEARS -> + DateUtils.getExactDifference(seedDate, repaymentPeriod.getFromDate(), chronoUnit); case MONTHS -> { int seedDateDay = seedDate.getDayOfMonth(); int targetDateDay = repaymentPeriod.getFromDate().getDayOfMonth(); @@ -1428,15 +1433,15 @@ private static LocalDate calculateSeedDate(ProgressiveLoanInterestScheduleModel } while (calculatedDate.isBefore(repaymentPeriod.getDueDate())); return calculatedDate.equals(repaymentPeriod.getDueDate()) && calculatedDate .minus(scheduleModel.loanProductRelatedDetail().getRepayEvery(), chronoUnit).isEqual(repaymentPeriod.getFromDate()) - ? seedDate - : repaymentPeriod.getFromDate(); + ? seedDate + : repaymentPeriod.getFromDate(); } /** * Calculate Rate Factor for an exact Period */ private BigDecimal calculateRateFactorPerPeriod(final ProgressiveLoanInterestScheduleModel scheduleModel, - final RepaymentPeriod repaymentPeriod, final LocalDate interestPeriodFromDate, final LocalDate interestPeriodDueDate) { + final RepaymentPeriod repaymentPeriod, final LocalDate interestPeriodFromDate, final LocalDate interestPeriodDueDate) { final MathContext mc = scheduleModel.mc(); final ILoanConfigurationDetails loanProductRelatedDetail = scheduleModel.loanProductRelatedDetail(); final BigDecimal interestRate = calcNominalInterestRatePercentage(scheduleModel.getInterestRate(interestPeriodFromDate), @@ -1456,7 +1461,7 @@ private BigDecimal calculateRateFactorPerPeriod(final ProgressiveLoanInterestSch final int numberOfYearsDifferenceInPeriod = interestPeriodDueDate.getYear() - interestPeriodFromDate.getYear(); final boolean partialPeriodCalculationNeeded = daysInYearType == DaysInYearType.ACTUAL && numberOfYearsDifferenceInPeriod > 0 && (!DaysInYearCustomStrategyType.FEB_29_PERIOD_ONLY.equals(daysInYearCustomStrategy) - || isPeriodContainsFeb29(repaymentPeriod.getFromDate(), repaymentPeriod.getDueDate())); + || isPeriodContainsFeb29(repaymentPeriod.getFromDate(), repaymentPeriod.getDueDate())); final BigDecimal daysInMonth = daysInMonthType.isDaysInMonth_30() ? BigDecimal.valueOf(30) : calculatedDaysInRepaymentPeriod; if (loanProductRelatedDetail.getInterestCalculationPeriodMethod() != null @@ -1483,11 +1488,14 @@ private BigDecimal calculateRateFactorPerPeriod(final ProgressiveLoanInterestSch } return switch (daysInMonthType) { - case ACTUAL -> rateFactorByRepaymentPeriod(interestRate, actualDaysInPeriod, BigDecimal.ONE, daysInYear, BigDecimal.ONE, - BigDecimal.ONE, mc); - case DAYS_30 -> calculateRateFactorPerPeriodBasedOnRepaymentFrequency(interestRate, repaymentFrequency, repaymentEvery, - daysInMonth, daysInYear, actualDaysInPeriod, calculatedDaysInRepaymentPeriod, mc); - default -> throw new UnsupportedOperationException("Unsupported combination: Days in month: " + daysInMonthType); + case ACTUAL -> + rateFactorByRepaymentPeriod(interestRate, actualDaysInPeriod, BigDecimal.ONE, daysInYear, BigDecimal.ONE, + BigDecimal.ONE, mc); + case DAYS_30 -> + calculateRateFactorPerPeriodBasedOnRepaymentFrequency(interestRate, repaymentFrequency, repaymentEvery, + daysInMonth, daysInYear, actualDaysInPeriod, calculatedDaysInRepaymentPeriod, mc); + default -> + throw new UnsupportedOperationException("Unsupported combination: Days in month: " + daysInMonthType); }; } @@ -1500,7 +1508,7 @@ private BigDecimal calculateRateFactorPerPeriod(final ProgressiveLoanInterestSch * @return */ public BigDecimal calculatePeriodFractions(ProgressiveLoanInterestScheduleModel scheduleModel, final LocalDate interestPeriodFromDate, - final LocalDate interestPeriodDueDate, MathContext mc) { + final LocalDate interestPeriodDueDate, MathContext mc) { BigDecimal cumulatedRateFactor = BigDecimal.ZERO; int actualYear = interestPeriodFromDate.getYear(); int endYear = interestPeriodDueDate.getYear(); @@ -1548,22 +1556,23 @@ private LocalDate getFractionPeriodDueDateForEndOfYear(ProgressiveLoanInterestSc * @return */ private BigDecimal calculateRateFactorPerPeriodBasedOnRepaymentFrequency(final BigDecimal interestRate, - final PeriodFrequencyType repaymentFrequency, final BigDecimal repaymentEvery, final BigDecimal daysInMonth, - final BigDecimal daysInYear, final BigDecimal actualDaysInPeriod, final BigDecimal calculatedDaysInPeriod, - final MathContext mc) { + final PeriodFrequencyType repaymentFrequency, final BigDecimal repaymentEvery, final BigDecimal daysInMonth, + final BigDecimal daysInYear, final BigDecimal actualDaysInPeriod, final BigDecimal calculatedDaysInPeriod, + final MathContext mc) { return switch (repaymentFrequency) { case DAYS -> - rateFactorByRepaymentEveryDay(interestRate, repaymentEvery, daysInYear, actualDaysInPeriod, calculatedDaysInPeriod, mc); + rateFactorByRepaymentEveryDay(interestRate, repaymentEvery, daysInYear, actualDaysInPeriod, calculatedDaysInPeriod, mc); case WEEKS -> - rateFactorByRepaymentEveryWeek(interestRate, repaymentEvery, daysInYear, actualDaysInPeriod, calculatedDaysInPeriod, mc); - case MONTHS -> rateFactorByRepaymentEveryMonth(interestRate, repaymentEvery, daysInMonth, daysInYear, actualDaysInPeriod, - calculatedDaysInPeriod, mc); + rateFactorByRepaymentEveryWeek(interestRate, repaymentEvery, daysInYear, actualDaysInPeriod, calculatedDaysInPeriod, mc); + case MONTHS -> + rateFactorByRepaymentEveryMonth(interestRate, repaymentEvery, daysInMonth, daysInYear, actualDaysInPeriod, + calculatedDaysInPeriod, mc); default -> throw new UnsupportedOperationException("Invalid repayment frequency"); // not supported yet }; } private void calculateEMIOnActualModelWithFlatInterestMethod(List repaymentPeriods, - ProgressiveLoanInterestScheduleModel scheduleModel) { + ProgressiveLoanInterestScheduleModel scheduleModel) { final MathContext mc = scheduleModel.mc(); final CurrencyData currency = scheduleModel.loanProductRelatedDetail().getCurrencyData(); @@ -1629,13 +1638,14 @@ private void calculateEMIOnActualModel(List repaymentPeriods, P } switch (scheduleModel.loanProductRelatedDetail().getInterestMethod()) { case FLAT -> calculateEMIOnActualModelWithFlatInterestMethod(repaymentPeriods, scheduleModel); - case DECLINING_BALANCE -> calculateEMIOnActualModelWithDecliningBalanceInterestMethod(repaymentPeriods, scheduleModel); + case DECLINING_BALANCE -> + calculateEMIOnActualModelWithDecliningBalanceInterestMethod(repaymentPeriods, scheduleModel); default -> throw new UnsupportedOperationException("Unsupported interest method"); } } private void applyPrincipalMoratoriumIfRequired(List repaymentPeriods, - ProgressiveLoanInterestScheduleModel scheduleModel) { + ProgressiveLoanInterestScheduleModel scheduleModel) { if (repaymentPeriods.isEmpty()) { return; } @@ -1672,7 +1682,7 @@ private void applyInterestMoratoriumIfRequired(final ProgressiveLoanInterestSche } private void calculateEMIOnActualModelWithDecliningBalanceInterestMethod(List repaymentPeriods, - ProgressiveLoanInterestScheduleModel scheduleModel) { + ProgressiveLoanInterestScheduleModel scheduleModel) { final MathContext mc = scheduleModel.mc(); final BigDecimal rateFactorN = MathUtil.stripTrailingZeros(calculateRateFactorPlus1NForEmi(repaymentPeriods, scheduleModel, mc)); final BigDecimal fnResult = MathUtil.stripTrailingZeros(calculateFnResultForEmi(repaymentPeriods, scheduleModel, mc)); @@ -1694,7 +1704,7 @@ private void calculateEMIOnActualModelWithDecliningBalanceInterestMethod(List repaymentPeriods, ProgressiveLoanInterestScheduleModel scheduleModel, - final EmiChangeOperation operation) { + final EmiChangeOperation operation) { if (repaymentPeriods.isEmpty()) { return; } @@ -1711,7 +1721,7 @@ private void calculateEMIOnNewModelAndMerge(List repaymentPerio } private Money applyInstallmentAmountInMultiplesOf(final ProgressiveLoanInterestScheduleModel scheduleModel, - final Money equalMonthlyInstallment) { + final Money equalMonthlyInstallment) { return scheduleModel.installmentAmountInMultiplesOf() != null && scheduleModel.installmentAmountInMultiplesOf() > 0 ? safeRoundingForEMI(equalMonthlyInstallment, scheduleModel.installmentAmountInMultiplesOf()) : equalMonthlyInstallment; @@ -1743,7 +1753,7 @@ public EmiAdjustment getEmiAdjustment(final List repaymentPerio } private void calculateRateFactorForScheduleTillDateInclusive(ProgressiveLoanInterestScheduleModel scheduleModelCopy, - LocalDate targetDate) { + LocalDate targetDate) { scheduleModelCopy.findRepaymentPeriod(targetDate).flatMap(rp -> rp.findInterestPeriod(targetDate)) .ifPresent(ip -> ip.setDueDate(targetDate)); @@ -1757,7 +1767,7 @@ private void calculateRateFactorForScheduleTillDateInclusive(ProgressiveLoanInte } private Optional getPeriodWithUnrecognizedInterest(RepaymentPeriod lastUnpaidRepaymentPeriod, - ProgressiveLoanInterestScheduleModel scheduleModelCopy) { + ProgressiveLoanInterestScheduleModel scheduleModelCopy) { for (RepaymentPeriod period : scheduleModelCopy.repaymentPeriods().reversed()) { if (MathUtil.isGreaterThanZero(period.getUnrecognizedInterest()) && period.getDueDate().isAfter(lastUnpaidRepaymentPeriod.getDueDate())) { @@ -1768,13 +1778,13 @@ private Optional getPeriodWithUnrecognizedInterest(RepaymentPer } private BigDecimal calculateRateFactorPlus1NForEmi(final List periods, - final ProgressiveLoanInterestScheduleModel scheduleModel, MathContext mc) { + final ProgressiveLoanInterestScheduleModel scheduleModel, MathContext mc) { return periods.stream().map(period -> getRateFactorPlus1ForEmi(period, scheduleModel)).reduce(BigDecimal.ONE, (BigDecimal acc, BigDecimal value) -> acc.multiply(value, mc)); } private BigDecimal calculateFnResultForEmi(final List periods, - final ProgressiveLoanInterestScheduleModel scheduleModel, final MathContext mc) { + final ProgressiveLoanInterestScheduleModel scheduleModel, final MathContext mc) { return periods.stream()// .skip(1)// .map(period -> getRateFactorPlus1ForEmi(period, scheduleModel))// @@ -1790,7 +1800,7 @@ private BigDecimal getRateFactorPlus1ForEmi(final RepaymentPeriod period, final * Calculate the EMI (Equal Monthly Installment) value */ private BigDecimal calculateEMIValue(final BigDecimal rateFactorPlus1N, final BigDecimal outstandingBalanceForRest, - final BigDecimal fnResult, MathContext mc) { + final BigDecimal fnResult, MathContext mc) { return rateFactorPlus1N.multiply(outstandingBalanceForRest, mc).divide(fnResult, mc); } @@ -1827,7 +1837,7 @@ private BigDecimal calculateEMIValueForFixedInterest(final List * @return Rate Factor for period */ private BigDecimal rateFactorByRepaymentEveryDay(final BigDecimal interestRate, final BigDecimal repaymentEvery, - final BigDecimal daysInYear, final BigDecimal actualDaysInPeriod, final BigDecimal calculatedDaysInPeriod, MathContext mc) { + final BigDecimal daysInYear, final BigDecimal actualDaysInPeriod, final BigDecimal calculatedDaysInPeriod, MathContext mc) { return rateFactorByRepaymentPeriod(interestRate, BigDecimal.ONE, repaymentEvery, daysInYear, actualDaysInPeriod, calculatedDaysInPeriod, mc); } @@ -1857,7 +1867,7 @@ private BigDecimal rateFactorByRepaymentEveryDay(final BigDecimal interestRate, * @return Rate Factor for period */ private BigDecimal rateFactorByRepaymentEveryWeek(final BigDecimal interestRate, final BigDecimal repaymentEvery, - final BigDecimal daysInYear, final BigDecimal actualDaysInPeriod, final BigDecimal calculatedDaysInPeriod, MathContext mc) { + final BigDecimal daysInYear, final BigDecimal actualDaysInPeriod, final BigDecimal calculatedDaysInPeriod, MathContext mc) { return rateFactorByRepaymentPeriod(interestRate, ONE_WEEK_IN_DAYS, repaymentEvery, daysInYear, actualDaysInPeriod, calculatedDaysInPeriod, mc); } @@ -1890,8 +1900,8 @@ private BigDecimal rateFactorByRepaymentEveryWeek(final BigDecimal interestRate, * @return Rate Factor for period */ BigDecimal rateFactorByRepaymentEveryMonth(final BigDecimal interestRate, final BigDecimal repaymentEvery, final BigDecimal daysInMonth, - final BigDecimal daysInYear, final BigDecimal actualDaysInPeriod, final BigDecimal calculatedDaysInPeriod, - final MathContext mc) { + final BigDecimal daysInYear, final BigDecimal actualDaysInPeriod, final BigDecimal calculatedDaysInPeriod, + final MathContext mc) { return rateFactorByRepaymentPeriod(interestRate, daysInMonth, repaymentEvery, daysInYear, actualDaysInPeriod, calculatedDaysInPeriod, mc); } @@ -1924,8 +1934,8 @@ BigDecimal rateFactorByRepaymentEveryMonth(final BigDecimal interestRate, final * @return Rate Factor for period */ private BigDecimal rateFactorByRepaymentPeriod(final BigDecimal interestRate, final BigDecimal repaymentPeriodMultiplierInDays, - final BigDecimal repaymentEvery, final BigDecimal daysInYear, final BigDecimal actualDaysInPeriod, - final BigDecimal calculatedDaysInPeriod, final MathContext mc) { + final BigDecimal repaymentEvery, final BigDecimal daysInYear, final BigDecimal actualDaysInPeriod, + final BigDecimal calculatedDaysInPeriod, final MathContext mc) { if (MathUtil.isZero(calculatedDaysInPeriod)) { return BigDecimal.ZERO; } @@ -1943,8 +1953,8 @@ private BigDecimal rateFactorByRepaymentPeriod(final BigDecimal interestRate, fi * */ private BigDecimal rateFactorByRepaymentPartialPeriod(final BigDecimal interestRate, final BigDecimal repaymentEvery, - final BigDecimal cumulatedPeriodRatio, final BigDecimal actualDaysInPeriod, final BigDecimal calculatedDaysInPeriod, - final MathContext mc) { + final BigDecimal cumulatedPeriodRatio, final BigDecimal actualDaysInPeriod, final BigDecimal calculatedDaysInPeriod, + final MathContext mc) { if (MathUtil.isZero(calculatedDaysInPeriod)) { return BigDecimal.ZERO; } @@ -1989,7 +1999,7 @@ public Money getSumOfDueInterestsOnDate(ProgressiveLoanInterestScheduleModel sch @Override public void applyInterestPause(final ProgressiveLoanInterestScheduleModel scheduleModel, final LocalDate fromDate, - final LocalDate endDate) { + final LocalDate endDate) { scheduleModel.updateInterestPeriodsForInterestPause(fromDate, endDate) .ifPresent(repaymentPeriod -> calculateRateFactorsForInterestPause(scheduleModel, repaymentPeriod.getFromDate())); } @@ -2008,7 +2018,7 @@ private long getUncountablePeriods(final List relatedRepaymentP } private void accelerateRepaymentDueDateTo(ProgressiveLoanInterestScheduleModel interestSchedule, RepaymentPeriod repaymentPeriod, - LocalDate transactionDate) { + LocalDate transactionDate) { repaymentPeriod.setDueDate(transactionDate); repaymentPeriod.getInterestPeriods().getLast().setDueDate(transactionDate); calculateRateFactorForRepaymentPeriod(repaymentPeriod, interestSchedule); @@ -2028,7 +2038,7 @@ private void accelerateMaturityDateTo(ProgressiveLoanInterestScheduleModel inter } private void updateEMIForReAgeEqualAmortization(List repaymentPeriods, Money principal, Money interest, - Money feesPenaltiesOutstanding, EqualAmortizationValues feesPenaltiesEqualAmortizationValues, MonetaryCurrency currency) { + Money feesPenaltiesOutstanding, EqualAmortizationValues feesPenaltiesEqualAmortizationValues, MonetaryCurrency currency) { EqualAmortizationValues interestEAV = calculateEqualAmortizationValues(interest, repaymentPeriods.size(), null, currency); EqualAmortizationValues principalEAV = calculateAdjustedEqualAmortizationValues(principal, principal.add(interest).add(feesPenaltiesOutstanding), @@ -2045,7 +2055,7 @@ private void updateEMIForReAgeEqualAmortization(List repaymentP @Override public OutstandingDetails precalculateReAgeEqualAmortizationAmount(ProgressiveLoanInterestScheduleModel interestSchedule, - LocalDate transactionDate, LoanReAgeParameterData reageParameter) { + LocalDate transactionDate, LoanReAgeParameterData reageParameter) { return getOutstandingAmountsTillDate(interestSchedule, reageParameter.getInterestHandlingType().equals(LoanReAgeInterestHandlingType.EQUAL_AMORTIZATION_PAYABLE_INTEREST) ? transactionDate @@ -2054,8 +2064,8 @@ public OutstandingDetails precalculateReAgeEqualAmortizationAmount(ProgressiveLo @Override public void reAgeEqualAmortization(ProgressiveLoanInterestScheduleModel interestSchedule, LocalDate transactionDate, - LoanReAgeParameterData reageParameter, Money feesPenaltiesOutstanding, - EqualAmortizationValues feesPenaltiesEqualAmortizationValues) { + LoanReAgeParameterData reageParameter, Money feesPenaltiesOutstanding, + EqualAmortizationValues feesPenaltiesEqualAmortizationValues) { LocalDate originalMaturityDate = interestSchedule.getMaturityDate(); List reAgedRepaymentPeriods = new ArrayList<>(reageParameter.getNumberOfInstallments()); OutstandingDetails reAgeingAmounts = precalculateReAgeEqualAmortizationAmount(interestSchedule, transactionDate, reageParameter); @@ -2108,7 +2118,7 @@ public void reAgeEqualAmortization(ProgressiveLoanInterestScheduleModel interest } private void updateModelForReageEqualAmortization(ProgressiveLoanInterestScheduleModel interestSchedule, - LoanReAgeParameterData reageParameter, List reAgedRepaymentPeriods) { + LoanReAgeParameterData reageParameter, List reAgedRepaymentPeriods) { int numberOfInstallmentsToAdd = reageParameter.getNumberOfInstallments(); LocalDate toDate = reageParameter.getStartDate(); RepaymentPeriod previous = interestSchedule.getLastRepaymentPeriod(); @@ -2130,7 +2140,7 @@ private void updateModelForReageEqualAmortization(ProgressiveLoanInterestSchedul } private void createRepaymentPeriodForEarlyRepaidAmountsDuringReAgeing(final ProgressiveLoanInterestScheduleModel interestSchedule, - final Money totalPaidPrincipal, final Money totalPaidInterest, final boolean isReAged) { + final Money totalPaidPrincipal, final Money totalPaidInterest, final boolean isReAged) { final RepaymentPeriod targetPeriod = interestSchedule.getLastRepaymentPeriod(); final Money paidInterestToAdd = totalPaidInterest.minus(targetPeriod.getPaidInterest()); @@ -2146,7 +2156,7 @@ private void createRepaymentPeriodForEarlyRepaidAmountsDuringReAgeing(final Prog } private OutstandingDetails calculatePaidBalancesAfterDate(ProgressiveLoanInterestScheduleModel interestSchedule, - LocalDate transactionDate) { + LocalDate transactionDate) { Money principal = interestSchedule.repaymentPeriods().stream().filter(rp -> !rp.getDueDate().isBefore(transactionDate)) .map(RepaymentPeriod::getPaidPrincipal).reduce(interestSchedule.zero(), Money::add); Money interest = interestSchedule.repaymentPeriods().stream().filter(rp -> !rp.getDueDate().isBefore(transactionDate)) @@ -2156,7 +2166,7 @@ private OutstandingDetails calculatePaidBalancesAfterDate(ProgressiveLoanInteres @Override public EqualAmortizationValues calculateEqualAmortizationValues(Money totalOutstanding, Integer numberOfInstallments, - Integer installmentAmountInMultiplesOf, MonetaryCurrency currency) { + Integer installmentAmountInMultiplesOf, MonetaryCurrency currency) { if (totalOutstanding.isGreaterThanZero()) { Money equalMonthlyValue = totalOutstanding.dividedBy(numberOfInstallments, totalOutstanding.getMc()); if (installmentAmountInMultiplesOf != null) { @@ -2170,8 +2180,8 @@ public EqualAmortizationValues calculateEqualAmortizationValues(Money totalOutst @Override public EqualAmortizationValues calculateAdjustedEqualAmortizationValues(Money outstanding, Money total, - Money sumOfOtherEqualAmortizationValues, Integer numberOfInstallments, Integer installmentAmountInMultiplesOf, - MonetaryCurrency currency) { + Money sumOfOtherEqualAmortizationValues, Integer numberOfInstallments, Integer installmentAmountInMultiplesOf, + MonetaryCurrency currency) { EqualAmortizationValues calculatedEMI = calculateEqualAmortizationValues(total, numberOfInstallments, installmentAmountInMultiplesOf, currency); Money value = calculatedEMI.value().minus(sumOfOtherEqualAmortizationValues); diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/converter/LoanReAgeParameterConverter.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/converter/LoanReAgeParameterConverter.java index 2692b3f61bc..9ed216b8a90 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/converter/LoanReAgeParameterConverter.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/converter/LoanReAgeParameterConverter.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,8 @@ public final class LoanReAgeParameterConverter { - private LoanReAgeParameterConverter() {} + private LoanReAgeParameterConverter() { + } public static LoanReAgeParameterData toData(LoanReAgeParameter parameter) { if (parameter == null) { diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/converter/LoanTransactionConverter.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/converter/LoanTransactionConverter.java index 85b6f47ed90..8e606d3689a 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/converter/LoanTransactionConverter.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/converter/LoanTransactionConverter.java @@ -6,9 +6,9 @@ * 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 @@ -19,13 +19,15 @@ package org.apache.fineract.portfolio.loanproduct.calc.converter; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction; import org.apache.fineract.portfolio.loanproduct.calc.data.LoanReAgeParameterData; import org.apache.fineract.portfolio.loanproduct.calc.data.ProcessedTransactionData; public final class LoanTransactionConverter { - private LoanTransactionConverter() {} + private LoanTransactionConverter() { + } public static ProcessedTransactionData toData(LoanTransaction transaction) { LoanReAgeParameterData reAgeParameterData = LoanReAgeParameterConverter.toData(transaction.getLoanReAgeParameter()); diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/converter/RepaymentScheduleInstallmentConverter.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/converter/RepaymentScheduleInstallmentConverter.java index 5b155e06adc..7439882dde2 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/converter/RepaymentScheduleInstallmentConverter.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/converter/RepaymentScheduleInstallmentConverter.java @@ -6,9 +6,9 @@ * 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 @@ -19,12 +19,14 @@ package org.apache.fineract.portfolio.loanproduct.calc.converter; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment; import org.apache.fineract.portfolio.loanproduct.calc.data.RepaymentScheduleInstallmentData; public final class RepaymentScheduleInstallmentConverter { - private RepaymentScheduleInstallmentConverter() {} + private RepaymentScheduleInstallmentConverter() { + } public static RepaymentScheduleInstallmentData toData(LoanRepaymentScheduleInstallment installment) { return RepaymentScheduleInstallmentData.of(installment.getFromDate(), installment.getDueDate(), installment.isDownPayment(), diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/EmiAdjustment.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/EmiAdjustment.java index 7673543dcde..84e49ffbb0e 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/EmiAdjustment.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/EmiAdjustment.java @@ -6,9 +6,9 @@ * 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 @@ -19,13 +19,14 @@ package org.apache.fineract.portfolio.loanproduct.calc.data; import java.util.List; + import org.apache.fineract.organisation.monetary.domain.Money; public record EmiAdjustment(// - Money originalEmi, // - Money emiDifference, // - List relatedRepaymentPeriods, // - long uncountablePeriods// + Money originalEmi, // + Money emiDifference, // + List relatedRepaymentPeriods, // + long uncountablePeriods// ) { public boolean shouldBeAdjusted() { diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/EmiChangeOperation.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/EmiChangeOperation.java index 5eab7086ad6..c91fd18fef8 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/EmiChangeOperation.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/EmiChangeOperation.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; @@ -57,7 +58,7 @@ public static EmiChangeOperation capitalizedIncome(final LocalDate transactionDu } public static EmiChangeOperation addRepaymentPeriods(final LocalDate transactionDueDate, final Money transactionAmount, - final int numPeriods) { + final int numPeriods) { return new EmiChangeOperation(Action.ADD_REPAYMENT_PERIODS, transactionDueDate, transactionAmount, null, numPeriods); } diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/EqualAmortizationValues.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/EqualAmortizationValues.java index 1d4331969c3..54f265de6aa 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/EqualAmortizationValues.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/EqualAmortizationValues.java @@ -6,9 +6,9 @@ * 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 @@ -20,9 +20,11 @@ import java.math.BigDecimal; import java.util.Objects; + import org.apache.fineract.organisation.monetary.domain.Money; -public record EqualAmortizationValues(Money totalOutstanding, Integer numberOfInstallments, Money value, Money adjustment) { +public record EqualAmortizationValues(Money totalOutstanding, Integer numberOfInstallments, Money value, + Money adjustment) { public Money getAdjustedValue() { return value.add(adjustment); diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/InterestPeriod.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/InterestPeriod.java index 9088a99cd11..eaa0cd2f06a 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/InterestPeriod.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/InterestPeriod.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.portfolio.loanproduct.calc.data; import jakarta.validation.constraints.NotNull; + import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; import java.util.Optional; + import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; @@ -37,8 +39,8 @@ import org.apache.fineract.portfolio.loanproduct.domain.InterestMethod; @Getter -@ToString(exclude = { "repaymentPeriod" }) -@EqualsAndHashCode(exclude = { "repaymentPeriod" }) +@ToString(exclude = {"repaymentPeriod"}) +@EqualsAndHashCode(exclude = {"repaymentPeriod"}) @AllArgsConstructor(access = AccessLevel.PROTECTED) public class InterestPeriod implements Comparable { @@ -92,14 +94,14 @@ public static InterestPeriod copy(@NotNull RepaymentPeriod repaymentPeriod, @Not } public static InterestPeriod withEmptyAmounts(@NotNull RepaymentPeriod repaymentPeriod, @NotNull LocalDate fromDate, - LocalDate dueDate) { + LocalDate dueDate) { final Money zero = repaymentPeriod.getZero(); return new InterestPeriod(repaymentPeriod, fromDate, dueDate, BigDecimal.ZERO, BigDecimal.ZERO, zero, zero, zero, zero, zero, zero, zero.getMc(), false); } public static InterestPeriod withEmptyAmounts(@NotNull RepaymentPeriod repaymentPeriod, @NotNull LocalDate fromDate, LocalDate dueDate, - boolean isPaused) { + boolean isPaused) { final Money zero = repaymentPeriod.getZero(); return new InterestPeriod(repaymentPeriod, fromDate, dueDate, BigDecimal.ZERO, BigDecimal.ZERO, zero, zero, zero, zero, zero, zero, zero.getMc(), isPaused); @@ -147,7 +149,8 @@ public BigDecimal getCalculatedDueInterest(InterestMethod method, long lengthTil return BigDecimal.ZERO; } BigDecimal baseAmount = switch (method) { - case FLAT -> getRepaymentPeriod().calculateTotalDisbursedAndCapitalizedIncomeAmountTillGivenPeriod(this).getAmount(); + case FLAT -> + getRepaymentPeriod().calculateTotalDisbursedAndCapitalizedIncomeAmountTillGivenPeriod(this).getAmount(); case DECLINING_BALANCE -> getOutstandingLoanBalance().getAmount(); default -> throw new UnsupportedOperationException("Method not implemented: " + method); }; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/InterestRate.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/InterestRate.java index 382aacc1878..cf9fc60c16b 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/InterestRate.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/InterestRate.java @@ -6,9 +6,9 @@ * 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 @@ -20,11 +20,12 @@ import java.math.BigDecimal; import java.time.LocalDate; + import org.springframework.lang.NonNull; public record InterestRate(// - LocalDate effectiveFrom, // - BigDecimal interestRate// + LocalDate effectiveFrom, // + BigDecimal interestRate// ) implements Comparable { @Override diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/LoanInterestScheduleModelModifiers.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/LoanInterestScheduleModelModifiers.java index 79faa8ed0f8..8b766bcede1 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/LoanInterestScheduleModelModifiers.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/LoanInterestScheduleModelModifiers.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/LoanReAgeParameterData.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/LoanReAgeParameterData.java index 0dc7fae2708..5aea104d5e6 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/LoanReAgeParameterData.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/LoanReAgeParameterData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanproduct.calc.data; import java.time.LocalDate; + import lombok.Builder; import lombok.Getter; import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType; @@ -35,7 +36,7 @@ public final class LoanReAgeParameterData { private final LoanReAgeInterestHandlingType interestHandlingType; public static LoanReAgeParameterData of(PeriodFrequencyType frequencyType, Integer frequencyNumber, LocalDate startDate, - Integer numberOfInstallments, LoanReAgeInterestHandlingType interestHandlingType) { + Integer numberOfInstallments, LoanReAgeInterestHandlingType interestHandlingType) { return LoanReAgeParameterData.builder().frequencyType(frequencyType).frequencyNumber(frequencyNumber).startDate(startDate) .numberOfInstallments(numberOfInstallments).interestHandlingType(interestHandlingType).build(); } diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/OutstandingDetails.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/OutstandingDetails.java index 6010c17a446..145b5ae6469 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/OutstandingDetails.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/OutstandingDetails.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/OverdueBalanceCorrection.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/OverdueBalanceCorrection.java index c6ab29a54d8..d414d2da83d 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/OverdueBalanceCorrection.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/OverdueBalanceCorrection.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanproduct.calc.data; import java.time.LocalDate; + import org.apache.fineract.organisation.monetary.domain.Money; /** diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/PeriodDueDetails.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/PeriodDueDetails.java index 7f9a3a8ec86..1d234829aa9 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/PeriodDueDetails.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/PeriodDueDetails.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/ProcessedTransactionData.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/ProcessedTransactionData.java index f5a4ab1be82..9b7a82131b6 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/ProcessedTransactionData.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/ProcessedTransactionData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.Optional; + import lombok.Builder; import lombok.Getter; import org.apache.fineract.portfolio.loanaccount.domain.LoanTransactionType; @@ -33,7 +34,7 @@ public final class ProcessedTransactionData { private final LoanReAgeParameterData reAgeParameter; public static ProcessedTransactionData of(LoanTransactionType transactionType, LocalDate transactionDate, - LoanReAgeParameterData reAgeParameter) { + LoanReAgeParameterData reAgeParameter) { return ProcessedTransactionData.builder().transactionType(transactionType).transactionDate(transactionDate) .reAgeParameter(reAgeParameter).build(); } 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 08bd958a239..571099277ee 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 @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import static org.apache.fineract.portfolio.loanproduct.calc.data.LoanInterestScheduleModelModifiers.INTEREST_RECALCULATION_ENABLED; import jakarta.validation.constraints.NotNull; + import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; @@ -40,6 +41,7 @@ import java.util.function.BiFunction; import java.util.function.Consumer; import java.util.function.Function; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.Setter; @@ -72,7 +74,7 @@ public class ProgressiveLoanInterestScheduleModel { private List overdueCorrections = new ArrayList<>(); public ProgressiveLoanInterestScheduleModel(final List repaymentPeriods, - final ILoanConfigurationDetails loanProductRelatedDetail, final Integer installmentAmountInMultiplesOf, final MathContext mc) { + final ILoanConfigurationDetails loanProductRelatedDetail, final Integer installmentAmountInMultiplesOf, final MathContext mc) { this.repaymentPeriods = new ArrayList<>(repaymentPeriods); this.interestRates = new TreeSet<>(Collections.reverseOrder()); this.loanProductRelatedDetail = loanProductRelatedDetail; @@ -87,8 +89,8 @@ public ProgressiveLoanInterestScheduleModel(final List repaymen } private ProgressiveLoanInterestScheduleModel(final List repaymentPeriods, final TreeSet interestRates, - final ILoanConfigurationDetails loanProductRelatedDetail, final Integer installmentAmountInMultiplesOf, final MathContext mc, - final boolean isCopiedForCalculation) { + final ILoanConfigurationDetails loanProductRelatedDetail, final Integer installmentAmountInMultiplesOf, final MathContext mc, + final boolean isCopiedForCalculation) { this.mc = mc; this.repaymentPeriods = copyRepaymentPeriods(repaymentPeriods, (previousPeriod, repaymentPeriod) -> RepaymentPeriod.copy(previousPeriod, repaymentPeriod, mc)); @@ -142,7 +144,7 @@ public ProgressiveLoanInterestScheduleModel copyWithoutPaidAmounts() { } private List copyRepaymentPeriods(final List repaymentPeriods, - final BiFunction repaymentCopyFunction) { + final BiFunction repaymentCopyFunction) { final List repaymentCopies = new ArrayList<>(repaymentPeriods.size()); RepaymentPeriod previousPeriod = null; for (RepaymentPeriod repaymentPeriod : repaymentPeriods) { @@ -170,7 +172,7 @@ public void addInterestRate(final LocalDate newInterestEffectiveDate, final BigD } public Optional findRepaymentPeriodByFromAndDueDate(final LocalDate repaymentPeriodFromDate, - final LocalDate repaymentPeriodDueDate) { + final LocalDate repaymentPeriodDueDate) { if (repaymentPeriodDueDate == null) { return Optional.empty(); } @@ -215,7 +217,7 @@ public LocalDate getMaturityDate() { } public Optional changeOutstandingBalanceAndUpdateInterestPeriods(final LocalDate balanceChangeDate, - final Money disbursedAmount, final Money correctionAmount, final Money capitalizedIncomePrincipal) { + final Money disbursedAmount, final Money correctionAmount, final Money capitalizedIncomePrincipal) { return findRepaymentPeriodForBalanceChange(balanceChangeDate).stream()// .peek(updateInterestPeriodOnRepaymentPeriod(balanceChangeDate, disbursedAmount, correctionAmount, capitalizedIncomePrincipal))// @@ -245,7 +247,7 @@ Optional findRepaymentPeriodForBalanceChange(final LocalDate ba } private Consumer updateInterestPeriodOnRepaymentPeriod(final LocalDate balanceChangeDate, final Money disbursedAmount, - final Money correctionAmount, final Money capitalizedIncomePrincipal) { + final Money correctionAmount, final Money capitalizedIncomePrincipal) { return repaymentPeriod -> { final boolean isChangeOnMaturityDate = isLastRepaymentPeriod(repaymentPeriod) && balanceChangeDate.isEqual(repaymentPeriod.getDueDate()); @@ -262,7 +264,7 @@ private Consumer updateInterestPeriodOnRepaymentPeriod(final Lo } private Optional findInterestPeriodForBalanceChange(final RepaymentPeriod repaymentPeriod, - final LocalDate balanceChangeDate, final boolean isChangeOnMaturityDate) { + final LocalDate balanceChangeDate, final boolean isChangeOnMaturityDate) { if (repaymentPeriod == null || balanceChangeDate == null) { return Optional.empty(); } @@ -278,7 +280,7 @@ private Optional findInterestPeriodForBalanceChange(final Repaym } void insertInterestPeriod(final RepaymentPeriod repaymentPeriod, final LocalDate balanceChangeDate, final Money disbursedAmount, - final Money correctionAmount, Money capitalizedIncomePrincipal) { + final Money correctionAmount, Money capitalizedIncomePrincipal) { final InterestPeriod previousInterestPeriod = findPreviousInterestPeriod(repaymentPeriod, balanceChangeDate); final LocalDate originalDueDate = previousInterestPeriod.getDueDate(); final LocalDate newDueDate = calculateNewDueDate(previousInterestPeriod, balanceChangeDate); @@ -296,7 +298,7 @@ void insertInterestPeriod(final RepaymentPeriod repaymentPeriod, final LocalDate } private void insertInterestPausePeriodsByAdjustedDates(final RepaymentPeriod repaymentPeriod, final LocalDate pauseStart, - final LocalDate pauseEnd) { + final LocalDate pauseEnd) { boolean hasStartInterestPeriod = repaymentPeriod.getInterestPeriods().stream().filter(ip -> ip.getFromDate().isEqual(pauseStart)) .findFirst().isPresent(); if (!hasStartInterestPeriod) { @@ -418,7 +420,7 @@ public boolean isLastRepaymentPeriod(@NotNull RepaymentPeriod repaymentPeriod) { * Consumer to copy attributes. Params: (from, to) */ public void copyPeriodsFrom(final LocalDate periodFromDueDate, List copyFromPeriods, - BiConsumer copyConsumer) { + BiConsumer copyConsumer) { if (copyFromPeriods.isEmpty()) { return; } diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/RepaymentPeriod.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/RepaymentPeriod.java index 0adaf82529e..9dad321bf53 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/RepaymentPeriod.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/RepaymentPeriod.java @@ -6,9 +6,9 @@ * 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 @@ -21,12 +21,14 @@ import static org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleProcessingWrapper.isInPeriod; import jakarta.validation.constraints.NotNull; + import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; import java.util.Optional; + import lombok.EqualsAndHashCode; import lombok.Getter; import lombok.Setter; @@ -39,8 +41,8 @@ import org.apache.fineract.portfolio.loanproduct.domain.ILoanConfigurationDetails; import org.apache.fineract.portfolio.util.Memo; -@ToString(exclude = { "previous" }) -@EqualsAndHashCode(exclude = { "previous" }) +@ToString(exclude = {"previous"}) +@EqualsAndHashCode(exclude = {"previous"}) public class RepaymentPeriod { @JsonExclude @@ -113,9 +115,9 @@ public class RepaymentPeriod { private Money fixedInterest; protected RepaymentPeriod(RepaymentPeriod previous, LocalDate fromDate, LocalDate dueDate, List interestPeriods, - Money emi, Money originalEmi, Money paidPrincipal, Money paidInterest, Money futureUnrecognizedInterest, MathContext mc, - ILoanConfigurationDetails loanProductRelatedDetail, boolean isInterestMovedDownward, boolean reAged, - boolean reAgedEarlyRepaymentHolder, Money fixedInterest) { + Money emi, Money originalEmi, Money paidPrincipal, Money paidInterest, Money futureUnrecognizedInterest, MathContext mc, + ILoanConfigurationDetails loanProductRelatedDetail, boolean isInterestMovedDownward, boolean reAged, + boolean reAgedEarlyRepaymentHolder, Money fixedInterest) { this.previous = previous; this.fromDate = fromDate; this.dueDate = dueDate; @@ -141,7 +143,7 @@ public static RepaymentPeriod empty(RepaymentPeriod previous, MathContext mc, IL } public static RepaymentPeriod create(RepaymentPeriod previous, LocalDate fromDate, LocalDate dueDate, Money emi, MathContext mc, - ILoanConfigurationDetails loanProductRelatedDetail) { + ILoanConfigurationDetails loanProductRelatedDetail) { final Money zero = emi.zero(); final RepaymentPeriod newRepaymentPeriod = new RepaymentPeriod(previous, fromDate, dueDate, new ArrayList<>(), emi, emi, zero, zero, zero, mc, loanProductRelatedDetail, false, false, false, zero); @@ -226,8 +228,8 @@ private BigDecimal calculateRateFactorPlus1() { public Money getCalculatedDueInterest() { if (calculatedDueInterestCalculation == null) { calculatedDueInterestCalculation = Memo.of(this::calculateCalculatedDueInterest, - () -> new Object[] { previous, interestPeriods, futureUnrecognizedInterest, isInterestMovedUpward, - isInterestMovedDownward, totalDisbursedAmount, fixedInterest, reAged }); + () -> new Object[]{previous, interestPeriods, futureUnrecognizedInterest, isInterestMovedUpward, + isInterestMovedDownward, totalDisbursedAmount, fixedInterest, reAged}); } return calculatedDueInterestCalculation.get(); } @@ -277,10 +279,10 @@ public Money getDueInterest() { // Due interest might be the maximum paid if there is pay-off or early repayment dueInterestCalculation = Memo.of( () -> MathUtil.max(getPaidPrincipal().isGreaterThan(getCalculatedDuePrincipal()) ? getPaidInterest() - : MathUtil.min(getCalculatedDueInterest(), getEmiPlusCreditedAmountsPlusFutureUnrecognizedInterest(), false), + : MathUtil.min(getCalculatedDueInterest(), getEmiPlusCreditedAmountsPlusFutureUnrecognizedInterest(), false), getPaidInterest(), false), - () -> new Object[] { paidPrincipal, paidInterest, interestPeriods, futureUnrecognizedInterest, totalDisbursedAmount, - fixedInterest, reAged, emi, interestPaymentGrace }); + () -> new Object[]{paidPrincipal, paidInterest, interestPeriods, futureUnrecognizedInterest, totalDisbursedAmount, + fixedInterest, reAged, emi, interestPaymentGrace}); } return dueInterestCalculation.get(); } @@ -345,7 +347,7 @@ public Money getCapitalizedIncomePrincipal() { public Money getDuePrincipal() { // Due principal might be the maximum paid if there is pay-off or early repayment return MathUtil.max(MathUtil - .negativeToZero(getEmiPlusCreditedAmountsPlusFutureUnrecognizedInterest().minus(getDueInterest(), getMc()), getMc()), + .negativeToZero(getEmiPlusCreditedAmountsPlusFutureUnrecognizedInterest().minus(getDueInterest(), getMc()), getMc()), getPaidPrincipal(), false); } @@ -397,7 +399,7 @@ public Money getOutstandingLoanBalance() { .plus(getPaidPrincipal(), getMc()) // .minus(getDuePrincipal(), getMc()); // return MathUtil.negativeToZero(calculatedOutStandingLoanBalance, getMc()); - }, () -> new Object[] { paidPrincipal, paidInterest, interestPeriods, totalDisbursedAmount }); + }, () -> new Object[]{paidPrincipal, paidInterest, interestPeriods, totalDisbursedAmount}); } return outstandingBalanceCalculation.get(); } diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/RepaymentScheduleInstallmentData.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/RepaymentScheduleInstallmentData.java index fbfbf98adfa..7df64d60693 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/RepaymentScheduleInstallmentData.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/calc/data/RepaymentScheduleInstallmentData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanproduct.calc.data; import java.time.LocalDate; + import lombok.Builder; import lombok.Getter; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AdvancedPaymentAllocationsJsonParser.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AdvancedPaymentAllocationsJsonParser.java index 035939afd7b..c5d9b4c4b75 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AdvancedPaymentAllocationsJsonParser.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/AdvancedPaymentAllocationsJsonParser.java @@ -6,9 +6,9 @@ * 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 @@ -21,9 +21,11 @@ import com.google.common.base.Enums; import com.google.gson.JsonArray; import com.google.gson.JsonElement; + import java.util.Comparator; import java.util.List; import java.util.Map; + import lombok.AllArgsConstructor; import org.apache.commons.lang3.tuple.Pair; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -37,7 +39,7 @@ public class AdvancedPaymentAllocationsJsonParser { public final AdvancedPaymentAllocationsValidator advancedPaymentAllocationsValidator; public List assembleLoanProductPaymentAllocationRules(final JsonCommand command, - String loanTransactionProcessingStrategyCode) { + String loanTransactionProcessingStrategyCode) { JsonArray paymentAllocations = command.arrayOfParameterNamed("paymentAllocation"); List productPaymentAllocationRules = null; if (paymentAllocations != null) { @@ -55,7 +57,7 @@ public List assembleLoanProductPaymentAllocati } private void populatePaymentAllocationRules(Map map, - LoanProductPaymentAllocationRule loanProductPaymentAllocationRule) { + LoanProductPaymentAllocationRule loanProductPaymentAllocationRule) { JsonArray paymentAllocationOrder = asJsonArrayOrNull(map.get("paymentAllocationOrder")); if (paymentAllocationOrder != null) { loanProductPaymentAllocationRule.setAllocationTypes(getPaymentAllocationTypes(paymentAllocationOrder)); @@ -63,7 +65,7 @@ private void populatePaymentAllocationRules(Map map, } private void populateFutureInstallment(Map map, - LoanProductPaymentAllocationRule loanProductPaymentAllocationRule) { + LoanProductPaymentAllocationRule loanProductPaymentAllocationRule) { String futureInstallmentAllocationRule = asStringOrNull(map.get("futureInstallmentAllocationRule")); if (futureInstallmentAllocationRule != null) { loanProductPaymentAllocationRule.setFutureInstallmentAllocationRule( 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..f16feb2c286 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 @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.IntStream; + import org.apache.commons.lang3.tuple.Pair; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; @@ -84,7 +85,7 @@ public void checkGroupingOfAllocationRules(List validateDueType(pastDueRuleInteger, dueRuleInteger, inAdvanceRuleInteger); case DUE -> validateDueType(dueRuleInteger, pastDueRuleInteger, inAdvanceRuleInteger); diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationsJsonParser.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationsJsonParser.java index bab9a2e327f..3b024bcbb26 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationsJsonParser.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationsJsonParser.java @@ -6,9 +6,9 @@ * 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 @@ -21,9 +21,11 @@ import com.google.common.base.Enums; import com.google.gson.JsonArray; import com.google.gson.JsonElement; + import java.util.Comparator; import java.util.List; import java.util.Map; + import lombok.AllArgsConstructor; import org.apache.commons.lang3.tuple.Pair; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -37,7 +39,7 @@ public class CreditAllocationsJsonParser { public final CreditAllocationsValidator creditAllocationsValidator; public List assembleLoanProductCreditAllocationRules(final JsonCommand command, - String loanTransactionProcessingStrategyCode) { + String loanTransactionProcessingStrategyCode) { JsonArray creditAllocation = command.arrayOfParameterNamed("creditAllocation"); List productCreditAllocationRules = null; if (creditAllocation != null) { diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationsValidator.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationsValidator.java index ed811f2b482..feb053f59ea 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationsValidator.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationsValidator.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.List; import java.util.stream.IntStream; + import org.apache.commons.lang3.tuple.Pair; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/mapper/AdvancedPaymentDataMapper.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/mapper/AdvancedPaymentDataMapper.java index 09523a681ae..c9bed4207df 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/mapper/AdvancedPaymentDataMapper.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/mapper/AdvancedPaymentDataMapper.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.concurrent.atomic.AtomicInteger; + import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.portfolio.loanaccount.domain.LoanPaymentAllocationRule; import org.apache.fineract.portfolio.loanproduct.data.AdvancedPaymentData; diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductCreditAllocationRuleMerger.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductCreditAllocationRuleMerger.java index 1704cbc1182..199ffbe3bce 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductCreditAllocationRuleMerger.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductCreditAllocationRuleMerger.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.Set; import java.util.function.Function; import java.util.stream.Collectors; + import org.apache.fineract.portfolio.loanproduct.domain.CreditAllocationTransactionType; import org.apache.fineract.portfolio.loanproduct.domain.LoanProduct; import org.apache.fineract.portfolio.loanproduct.domain.LoanProductCreditAllocationRule; @@ -32,7 +33,7 @@ public class LoanProductCreditAllocationRuleMerger { public boolean updateCreditAllocationRules(LoanProduct loanProduct, - final List newLoanProductCreditAllocationRules) { + final List newLoanProductCreditAllocationRules) { if (newLoanProductCreditAllocationRules == null) { return false; } diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductPaymentAllocationRuleMerger.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductPaymentAllocationRuleMerger.java index 275c0f98c9c..1391bf75c16 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductPaymentAllocationRuleMerger.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductPaymentAllocationRuleMerger.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.Set; import java.util.function.Function; import java.util.stream.Collectors; + import org.apache.fineract.portfolio.loanproduct.domain.LoanProduct; import org.apache.fineract.portfolio.loanproduct.domain.LoanProductPaymentAllocationRule; import org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationTransactionType; @@ -32,7 +33,7 @@ public class LoanProductPaymentAllocationRuleMerger { public boolean updateProductPaymentAllocationRules(LoanProduct loanProduct, - final List newLoanProductPaymentAllocationRules) { + final List newLoanProductPaymentAllocationRules) { if (newLoanProductPaymentAllocationRules == null) { return false; } @@ -76,7 +77,7 @@ public boolean updateProductPaymentAllocationRules(LoanProduct loanProduct, } private boolean mergeLoanProductPaymentAllocationRule(LoanProductPaymentAllocationRule into, - LoanProductPaymentAllocationRule newElement) { + LoanProductPaymentAllocationRule newElement) { boolean changed = false; if (!Objects.equals(into.getFutureInstallmentAllocationRule(), newElement.getFutureInstallmentAllocationRule())) { diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/util/InstallmentProcessingHelper.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/util/InstallmentProcessingHelper.java index 9a86f0eb1e5..89ebddd10df 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/util/InstallmentProcessingHelper.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/util/InstallmentProcessingHelper.java @@ -6,9 +6,9 @@ * 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 @@ -19,14 +19,16 @@ package org.apache.fineract.portfolio.util; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallment; public final class InstallmentProcessingHelper { - private InstallmentProcessingHelper() {} + private InstallmentProcessingHelper() { + } public static void addOneToInstallmentNumberFromInstallment(final List installments, - final int installmentNumber) { + final int installmentNumber) { installments.stream().filter(i -> i.getInstallmentNumber() != null && i.getInstallmentNumber() >= installmentNumber) .forEach(i -> i.setInstallmentNumber(i.getInstallmentNumber() + 1)); } diff --git a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/util/Memo.java b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/util/Memo.java index dd3f71a12dd..70eac8eeeff 100644 --- a/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/util/Memo.java +++ b/fineract-progressive-loan/src/main/java/org/apache/fineract/portfolio/util/Memo.java @@ -6,9 +6,9 @@ * 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 @@ -71,7 +71,7 @@ private boolean checkDependencyChangedAndUpdate(Object actualDependencies) { } return !isSame; } else { - final int[] actualDependencyHashCodes = { getHashCode(actualDependencies) }; + final int[] actualDependencyHashCodes = {getHashCode(actualDependencies)}; final boolean isSame = dependencyHashCodes.length == actualDependencyHashCodes.length && dependencyHashCodes[0] == actualDependencyHashCodes[0]; if (!isSame) { diff --git a/fineract-progressive-loan/src/main/resources/db/changelog/tenant/module/progressiveloan/parts/5001_create_progressive_loan_model.xml b/fineract-progressive-loan/src/main/resources/db/changelog/tenant/module/progressiveloan/parts/5001_create_progressive_loan_model.xml index de328cf033c..b9e51a61816 100644 --- a/fineract-progressive-loan/src/main/resources/db/changelog/tenant/module/progressiveloan/parts/5001_create_progressive_loan_model.xml +++ b/fineract-progressive-loan/src/main/resources/db/changelog/tenant/module/progressiveloan/parts/5001_create_progressive_loan_model.xml @@ -27,7 +27,7 @@ objectQuotingStrategy="QUOTE_ONLY_RESERVED_WORDS"> - + diff --git a/fineract-progressive-loan/src/main/resources/jpa/static-weaving/module/fineract-progressive-loan/persistence.xml b/fineract-progressive-loan/src/main/resources/jpa/static-weaving/module/fineract-progressive-loan/persistence.xml index 3b3a6142c0f..1dab5fb156c 100644 --- a/fineract-progressive-loan/src/main/resources/jpa/static-weaving/module/fineract-progressive-loan/persistence.xml +++ b/fineract-progressive-loan/src/main/resources/jpa/static-weaving/module/fineract-progressive-loan/persistence.xml @@ -160,7 +160,7 @@ false - + 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 fbe64f8687b..271100e5fc0 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 @@ -6,9 +6,9 @@ * 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 @@ -47,6 +47,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.fineract.infrastructure.businessdate.domain.BusinessDateType; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; import org.apache.fineract.infrastructure.core.domain.ActionContext; @@ -606,7 +607,7 @@ private LoanCreditAllocationRule createMockCreditAllocationRule(AllocationType.. } private LoanTransaction createRepayment(Loan loan, LoanTransaction toTransaction, double principalPortion, double interestPortion, - double feePortion, double penaltyPortion) { + double feePortion, double penaltyPortion) { LoanTransaction repayment = mock(LoanTransaction.class); lenient().when(repayment.getLoan()).thenReturn(loan); lenient().when(repayment.isRepayment()).thenReturn(true); @@ -671,7 +672,7 @@ private void verify(Map expected, Map allocationMap(double principal, double interest, double fee, double penalty, - MonetaryCurrency currency) { + MonetaryCurrency currency) { Map allocationMap = new HashMap<>(); allocationMap.put(AllocationType.PRINCIPAL, Money.of(currency, BigDecimal.valueOf(principal))); allocationMap.put(AllocationType.INTEREST, Money.of(currency, BigDecimal.valueOf(interest))); diff --git a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/ChangeOperationTest.java b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/ChangeOperationTest.java index af5b4e5c9f7..9c9d836e20e 100644 --- a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/ChangeOperationTest.java +++ b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/domain/transactionprocessor/impl/ChangeOperationTest.java @@ -6,9 +6,9 @@ * 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 @@ -19,12 +19,14 @@ package org.apache.fineract.portfolio.loanaccount.domain.transactionprocessor.impl; import com.google.common.collect.Collections2; + import java.time.LocalDate; import java.time.OffsetDateTime; import java.util.Collection; import java.util.List; import java.util.Optional; import java.util.stream.Stream; + import org.apache.fineract.infrastructure.core.domain.FineractPlatformTenant; import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil; import org.apache.fineract.portfolio.loanaccount.data.LoanTermVariationsData; @@ -81,8 +83,8 @@ public void testCompareToEqualBackdatedCharge() { @ParameterizedTest @MethodSource("provideComparisonTestData") public void testComparison(String chargeEffectiveDate, String chargeSubmittedDate, String chargeCreationDateTime, - String transactionDate, String transactionSubmittedDate, String transactionCreationDateTime, int expectedChargeVsTransaction, - int expectedTransactionVsCharge) { + String transactionDate, String transactionSubmittedDate, String transactionCreationDateTime, int expectedChargeVsTransaction, + int expectedTransactionVsCharge) { ChangeOperation charge = createCharge(chargeEffectiveDate, chargeSubmittedDate, chargeCreationDateTime); ChangeOperation transaction = createTransaction(transactionDate, transactionSubmittedDate, transactionCreationDateTime); diff --git a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleGeneratorTest.java b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleGeneratorTest.java index 06d86fe6ad1..b2060cdf1f8 100644 --- a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleGeneratorTest.java +++ b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/LoanScheduleGeneratorTest.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.math.MathContext; import java.math.RoundingMode; import java.time.LocalDate; + import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.organisation.monetary.domain.ApplicationCurrency; import org.apache.fineract.portfolio.common.domain.DaysInMonthType; @@ -138,7 +139,7 @@ void testGenerateLoanScheduleWithDownPayment() { } private void checkDisbursementPeriod(LoanSchedulePlanDisbursementPeriod period, LocalDate disbursementDate, BigDecimal principalAmount, - BigDecimal outstandingAmount) { + BigDecimal outstandingAmount) { assertEquals(disbursementDate, period.getPeriodFromDate()); assertEquals(disbursementDate, period.getPeriodDueDate()); assertEquals(0, principalAmount.compareTo(period.getPrincipalAmount())); @@ -147,8 +148,8 @@ private void checkDisbursementPeriod(LoanSchedulePlanDisbursementPeriod period, } private void checkRepaymentPeriod(LoanSchedulePlanRepaymentPeriod period, int expectedPeriodNumber, LocalDate expectedFromDate, - LocalDate expectedDueDate, BigDecimal expectedPrincipalDue, BigDecimal expectedInterestDue, BigDecimal expectedTotalDue, - BigDecimal expectedOutstandingLoanBalance) { + LocalDate expectedDueDate, BigDecimal expectedPrincipalDue, BigDecimal expectedInterestDue, BigDecimal expectedTotalDue, + BigDecimal expectedOutstandingLoanBalance) { assertEquals(expectedPeriodNumber, period.getPeriodNumber()); assertEquals(expectedFromDate, period.getPeriodFromDate()); assertEquals(expectedDueDate, period.getPeriodDueDate()); @@ -159,8 +160,8 @@ private void checkRepaymentPeriod(LoanSchedulePlanRepaymentPeriod period, int ex } private void checkDownPaymentPeriod(LoanSchedulePlanDownPaymentPeriod period, int expectedPeriodNumber, LocalDate expectedFromDate, - LocalDate expectedDueDate, BigDecimal expectedPrincipalDue, BigDecimal expectedTotalDue, - BigDecimal expectedOutstandingLoanBalance) { + LocalDate expectedDueDate, BigDecimal expectedPrincipalDue, BigDecimal expectedTotalDue, + BigDecimal expectedOutstandingLoanBalance) { assertEquals(expectedPeriodNumber, period.getPeriodNumber()); assertEquals(expectedFromDate, period.getPeriodFromDate()); assertEquals(expectedDueDate, period.getPeriodDueDate()); diff --git a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/ProgressiveLoanRescheduleRequestDataValidatorTest.java b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/ProgressiveLoanRescheduleRequestDataValidatorTest.java index e52d763b9d0..17df3fe2bba 100644 --- a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/ProgressiveLoanRescheduleRequestDataValidatorTest.java +++ b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/data/ProgressiveLoanRescheduleRequestDataValidatorTest.java @@ -6,9 +6,9 @@ * 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 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 b668b21d95c..660af0d85bd 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 @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.List; import java.util.stream.IntStream; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil; @@ -117,7 +118,7 @@ public void setupTestDefaults() { } private BigDecimal getRateFactorsByMonth(final DaysInYearType daysInYearType, final DaysInMonthType daysInMonthType, - final BigDecimal interestRate, LoanRepaymentScheduleInstallment period) { + final BigDecimal interestRate, LoanRepaymentScheduleInstallment period) { final BigDecimal daysInPeriod = BigDecimal.valueOf(DateUtils.getDifferenceInDays(period.getFromDate(), period.getDueDate())); final BigDecimal daysInYear = BigDecimal.valueOf(daysInYearType.getNumberOfDays(period.getFromDate())); final BigDecimal daysInMonth = BigDecimal.valueOf(daysInMonthType.getNumberOfDays(period.getFromDate())); @@ -130,8 +131,8 @@ public void test_rateFactorByRepaymentEveryMonthMethod_DayInYear365_DaysInMonthA // Given final DaysInYearType daysInYearType = DaysInYearType.DAYS_365; final DaysInMonthType daysInMonthType = DaysInMonthType.ACTUAL; - final String[] expectedValues = new String[] { "0.008053375342", "0.007533802740", "0.008053375342", "0.007793589041", - "0.008053375342", "0.007793589041" }; + final String[] expectedValues = new String[]{"0.008053375342", "0.007533802740", "0.008053375342", "0.007793589041", + "0.008053375342", "0.007793589041"}; // Then for (LoanRepaymentScheduleInstallment period : periods) { @@ -146,8 +147,8 @@ public void test_rateFactorByRepaymentEveryMonthMethod_DayInYearActual_DaysInMon final DaysInYearType daysInYearType = DaysInYearType.ACTUAL; final DaysInMonthType daysInMonthType = DaysInMonthType.ACTUAL; - final String[] expectedValues = new String[] { "0.008031371585", "0.007513218579", "0.008031371585", "0.007772295082", - "0.008031371585", "0.007772295082" }; + final String[] expectedValues = new String[]{"0.008031371585", "0.007513218579", "0.008031371585", "0.007772295082", + "0.008031371585", "0.007772295082"}; // Then for (LoanRepaymentScheduleInstallment period : periods) { @@ -162,8 +163,8 @@ public void test_fnValueFunction_RepayEvery1Month_DayInYear365_DaysInMonthActual final DaysInYearType daysInYearType = DaysInYearType.DAYS_365; final DaysInMonthType daysInMonthType = DaysInMonthType.ACTUAL; - final String[] expectedValues = new String[] { "1.00000000000", "2.00753380274", "3.02370122596", "4.04726671069", "5.07986086861", - "6.11945121660" }; + final String[] expectedValues = new String[]{"1.00000000000", "2.00753380274", "3.02370122596", "4.04726671069", "5.07986086861", + "6.11945121660"}; final List fnValuesCalculated = new ArrayList<>(); BigDecimal previousFnValue = BigDecimal.ZERO; @@ -5160,7 +5161,7 @@ List expectedRepaymentDays(final LocalDate dis } List expectedRepaymentsMonthly(final LocalDate disbursementDate, final int periods, - final int length) { + final int length) { final List expectedRepaymentPeriods = new ArrayList<>(periods); IntStream.range(0, periods).forEach(i -> expectedRepaymentPeriods .add(periodData(disbursementDate.plusMonths((long) i * length), disbursementDate.plusMonths((long) (i + 1) * length)))); @@ -5189,7 +5190,7 @@ private static LoanRepaymentScheduleInstallment createPeriod(int periodId, Local } private static void checkDailyInterest(final ProgressiveLoanInterestScheduleModel interestModel, final LocalDate repaymentPeriodDueDate, - final LocalDate interestStartDay, final int dayOffset, final double dailyInterest, final double interest) { + final LocalDate interestStartDay, final int dayOffset, final double dailyInterest, final double interest) { Money previousInterest = emiCalculator.getPeriodInterestTillDate(interestModel, interestStartDay, repaymentPeriodDueDate, interestStartDay.plusDays(dayOffset - 1), true, true); Money currentInterest = emiCalculator.getPeriodInterestTillDate(interestModel, interestStartDay, repaymentPeriodDueDate, @@ -5199,25 +5200,25 @@ private static void checkDailyInterest(final ProgressiveLoanInterestScheduleMode } private static void checkEmi(final ProgressiveLoanInterestScheduleModel interestScheduleModel, final int repaymentIdx, - final double emiValue) { + final double emiValue) { Assertions.assertEquals(emiValue, toDouble(interestScheduleModel.repaymentPeriods().get(repaymentIdx).getEmi())); } private static void checkTotalInterestDue(final ProgressiveLoanInterestScheduleModel interestScheduleModel, - final double totalInterestDue) { + final double totalInterestDue) { Assertions.assertEquals(totalInterestDue, toDouble(interestScheduleModel.getTotalDueInterest())); } private static void checkPeriod(final ProgressiveLoanInterestScheduleModel interestScheduleModel, final int repaymentIdx, - final int interestIdx, final double emiValue, final double rateFactor, final double interestDue, final double principalDue, - final double remaingBalance) { + final int interestIdx, final double emiValue, final double rateFactor, final double interestDue, final double principalDue, + final double remaingBalance) { checkPeriod(interestScheduleModel, repaymentIdx, interestIdx, emiValue, rateFactor, interestDue, interestDue, principalDue, remaingBalance); } private static void checkPeriod(final ProgressiveLoanInterestScheduleModel interestScheduleModel, final int repaymentIdx, - final double emiValue, final double interestDueCumulated, final double principalDue, final double remainingBalance, - final boolean fullyRepaid) { + final double emiValue, final double interestDueCumulated, final double principalDue, final double remainingBalance, + final boolean fullyRepaid) { final RepaymentPeriod repaymentPeriod = interestScheduleModel.repaymentPeriods().get(repaymentIdx); Assertions.assertEquals(emiValue, toDouble(repaymentPeriod.getEmi())); @@ -5228,8 +5229,8 @@ private static void checkPeriod(final ProgressiveLoanInterestScheduleModel inter } private static void checkPeriod(final ProgressiveLoanInterestScheduleModel interestScheduleModel, final int repaymentIdx, - final int interestIdx, final double emiValue, final double rateFactor, final double interestDue, - final double interestDueCumulated, final double principalDue, final double remaingBalance) { + final int interestIdx, final double emiValue, final double rateFactor, final double interestDue, + final double interestDueCumulated, final double principalDue, final double remaingBalance) { Assertions.assertTrue(repaymentIdx < interestScheduleModel.repaymentPeriods().size(), repaymentIdx + "th repaymentPeriod is not found."); final RepaymentPeriod repaymentPeriod = interestScheduleModel.repaymentPeriods().get(repaymentIdx); @@ -5262,7 +5263,7 @@ private static Money toMoney(final double value) { } private static void verifyAllPeriods(final ProgressiveLoanInterestScheduleModel expectedModel, - final ProgressiveLoanInterestScheduleModel actualModel) { + final ProgressiveLoanInterestScheduleModel actualModel) { for (int repInd = 0; repInd < expectedModel.repaymentPeriods().size(); repInd++) { RepaymentPeriod repaymentPeriod = expectedModel.repaymentPeriods().get(repInd); for (int interestPeriodIndex = 0; interestPeriodIndex < repaymentPeriod.getInterestPeriods().size(); interestPeriodIndex++) { diff --git a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/data/InterestPeriodTest.java b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/data/InterestPeriodTest.java index 2a6defe2406..bf41c6592ef 100644 --- a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/data/InterestPeriodTest.java +++ b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/data/InterestPeriodTest.java @@ -6,9 +6,9 @@ * 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 @@ -29,6 +29,7 @@ import java.time.LocalDate; import java.time.ZoneId; import java.util.List; + import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.organisation.monetary.domain.MoneyHelper; diff --git a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/data/RepaymentPeriodTest.java b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/data/RepaymentPeriodTest.java index 55048f28574..13ddcd872d6 100644 --- a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/data/RepaymentPeriodTest.java +++ b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/calc/data/RepaymentPeriodTest.java @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import java.math.RoundingMode; import java.time.LocalDate; import java.time.ZoneId; + import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.organisation.monetary.domain.MoneyHelper; 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..81b38172b53 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 @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.gson.JsonParser; + import java.util.ArrayList; import java.util.Arrays; import java.util.EnumSet; @@ -34,6 +35,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; + import org.apache.commons.lang3.tuple.Pair; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; @@ -149,7 +151,7 @@ public void testInvalidAndNullAllocationRules() throws JsonProcessingException { Map map = new HashMap<>(); List> paymentAllocations = new ArrayList<>(); map.put("paymentAllocation", paymentAllocations); - List allocationRule = Arrays.asList(new String[] { "invalid", null, "IN_ADVANCE_PENALTY" }); + List allocationRule = Arrays.asList(new String[]{"invalid", null, "IN_ADVANCE_PENALTY"}); paymentAllocations.add(createPaymentAllocationEntry("DEFAULT", "NEXT_INSTALLMENT", allocationRule)); JsonCommand command = createJsonCommand(map); @@ -203,7 +205,7 @@ public void testNullTransactionTypeAndFutureAllocation() throws JsonProcessingEx } public Map createPaymentAllocationEntry(String transactionType, String futureInstallmentAllocation, - List orderedRules) { + List orderedRules) { Map map = new HashMap<>(); map.put("transactionType", transactionType); map.put("futureInstallmentAllocationRule", futureInstallmentAllocation); diff --git a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/AdvancedPaymentAllocationsValidatorTest.java b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/AdvancedPaymentAllocationsValidatorTest.java index c40689014cc..32dfa5f0a74 100644 --- a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/AdvancedPaymentAllocationsValidatorTest.java +++ b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/AdvancedPaymentAllocationsValidatorTest.java @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import java.util.Collections; import java.util.EnumSet; import java.util.List; + import org.apache.commons.lang3.tuple.Pair; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; import org.junit.jupiter.api.Assertions; @@ -223,7 +224,7 @@ private static List> createPaymentAllocatio } private void assertPlatformException(String expectedMessage, String expectedCode, - PlatformApiDataValidationException platformApiDataValidationException) { + PlatformApiDataValidationException platformApiDataValidationException) { Assertions.assertEquals(expectedMessage, platformApiDataValidationException.getErrors().get(0).getDefaultUserMessage()); Assertions.assertEquals(expectedCode, platformApiDataValidationException.getErrors().get(0).getUserMessageGlobalisationCode()); } diff --git a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationsJsonParserTest.java b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationsJsonParserTest.java index 129b81cf68b..395d17538ce 100644 --- a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationsJsonParserTest.java +++ b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationsJsonParserTest.java @@ -6,9 +6,9 @@ * 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 @@ -24,12 +24,14 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.gson.JsonParser; + import java.util.ArrayList; import java.util.EnumSet; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; + import org.apache.commons.lang3.tuple.Pair; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; diff --git a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationsValidatorTest.java b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationsValidatorTest.java index d6c264afc2e..6a8751bf510 100644 --- a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationsValidatorTest.java +++ b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/domain/CreditAllocationsValidatorTest.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.EnumSet; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; + import org.apache.commons.lang3.tuple.Pair; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; import org.junit.jupiter.api.Assertions; @@ -124,7 +125,7 @@ private void assertPlatformValidationException(String message, String code, Exec } private void assertPlatformException(String expectedMessage, String expectedCode, - PlatformApiDataValidationException platformApiDataValidationException) { + PlatformApiDataValidationException platformApiDataValidationException) { Assertions.assertEquals(expectedMessage, platformApiDataValidationException.getErrors().get(0).getDefaultUserMessage()); Assertions.assertEquals(expectedCode, platformApiDataValidationException.getErrors().get(0).getUserMessageGlobalisationCode()); } diff --git a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductCreditAllocationRuleMergerTest.java b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductCreditAllocationRuleMergerTest.java index 27b569d1232..1e427cfe0d2 100644 --- a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductCreditAllocationRuleMergerTest.java +++ b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductCreditAllocationRuleMergerTest.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import static org.apache.fineract.portfolio.loanproduct.domain.AllocationType.PRINCIPAL; import java.util.List; + import org.apache.fineract.portfolio.loanproduct.domain.AllocationType; import org.apache.fineract.portfolio.loanproduct.domain.CreditAllocationTransactionType; import org.apache.fineract.portfolio.loanproduct.domain.LoanProduct; @@ -99,7 +100,7 @@ public void testMergerExistingDeleted() { } public LoanProductCreditAllocationRule createRule(CreditAllocationTransactionType transactionType, - List allocationTypeList) { + List allocationTypeList) { return new LoanProductCreditAllocationRule(null, transactionType, allocationTypeList); } diff --git a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductPaymentAllocationRuleMergerTest.java b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductPaymentAllocationRuleMergerTest.java index 325654cfed9..da7a1f97129 100644 --- a/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductPaymentAllocationRuleMergerTest.java +++ b/fineract-progressive-loan/src/test/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductPaymentAllocationRuleMergerTest.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import static org.apache.fineract.portfolio.loanproduct.domain.PaymentAllocationType.PAST_DUE_FEE; import java.util.List; + import org.apache.fineract.portfolio.loanproduct.domain.FutureInstallmentAllocationRule; import org.apache.fineract.portfolio.loanproduct.domain.LoanProduct; import org.apache.fineract.portfolio.loanproduct.domain.LoanProductPaymentAllocationRule; @@ -129,7 +130,7 @@ public void testMergeOneOriginalOneAdded() { } public LoanProductPaymentAllocationRule createRule(PaymentAllocationTransactionType transactionType, - FutureInstallmentAllocationRule futureInstallmentAllocationRule, List allocationTypeList) { + FutureInstallmentAllocationRule futureInstallmentAllocationRule, List allocationTypeList) { return new LoanProductPaymentAllocationRule(null, transactionType, allocationTypeList, futureInstallmentAllocationRule); } diff --git a/fineract-provider/build.gradle b/fineract-provider/build.gradle index 576b921210b..669a7e6f769 100644 --- a/fineract-provider/build.gradle +++ b/fineract-provider/build.gradle @@ -29,6 +29,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'se.thinkcode.cucumber-runner' apply plugin: 'com.docktape.swagger-brake' + swaggerBrake { newApi = findProperty('apiNew') ?:"${project.buildDir}/resources/main/static/fineract.json" oldApi = findProperty('apiBaseline') ?: "${projectDir}/config/swagger/fineract-baseline.json" @@ -131,13 +132,13 @@ dependencies { apply from: 'dependencies.gradle' -// Configuration for the modernizer plugin +// Configuration for the modernizer plugins // https://github.com/andygoossens/gradle-modernizer-plugin modernizer { ignoreClassNamePatterns = [ - '.*AbstractPersistableCustom', - '.*EntityTables', - '.*domain.*' + '.*AbstractPersistableCustom', + '.*EntityTables', + '.*domain.*' ] } @@ -149,7 +150,7 @@ if (project.hasProperty('env') && project.getProperty('env') == 'eclipse') { eclipse { project { - buildCommand([ LaunchConfigHandle: "/.externalToolBuilders/OpenJPA Enhance Builder.launch" ], 'org.eclipse.ui.externaltools.ExternalToolBuilder') + buildCommand([LaunchConfigHandle: "/.externalToolBuilders/OpenJPA Enhance Builder.launch"], 'org.eclipse.ui.externaltools.ExternalToolBuilder') } } @@ -167,10 +168,10 @@ if (!(project.hasProperty('env') && project.getProperty('env') == 'dev')) { // https://docs.groovy-lang.org/latest/html/api/groovy/sql/Sql.html import groovy.sql.Sql -project.ext.mysqlUser='root' -project.ext.mysqlPassword='mysql' -project.ext.pgUser='root' -project.ext.pgPassword='postgres' +project.ext.mysqlUser = 'root' +project.ext.mysqlPassword = 'mysql' +project.ext.pgUser = 'root' +project.ext.pgPassword = 'postgres' configurations { driver @@ -182,7 +183,7 @@ dependencies { } URLClassLoader loader = GroovyObject.class.classLoader -configurations.driver.each {File file -> +configurations.driver.each { File file -> loader.addURL(file.toURL()) } @@ -271,7 +272,7 @@ jib { image = 'azul/zulu-openjdk-alpine:21' platforms { platform { - architecture = System.getProperty("os.arch").equals("aarch64")?"arm64":"amd64" + architecture = System.getProperty("os.arch").equals("aarch64") ? "arm64" : "amd64" os = 'linux' } } @@ -280,8 +281,8 @@ jib { to { image = 'fineract' tags = [ - "${project.version}", - 'latest' + "${project.version}", + 'latest' ] } @@ -290,10 +291,10 @@ jib { mainClass = 'org.apache.fineract.ServerApplication' extraClasspath = ['/app/plugins/*'] args = [ - '-Duser.home=/tmp', - '-Dfile.encoding=UTF-8', - '-Duser.timezone=UTC', - '-Djava.security.egd=file:/dev/./urandom' + '-Duser.home=/tmp', + '-Dfile.encoding=UTF-8', + '-Duser.timezone=UTC', + '-Djava.security.egd=file:/dev/./urandom' ] ports = ['8080/tcp', '8443/tcp'] labels = [maintainer: 'Aleksandar Vidakovic '] @@ -333,10 +334,10 @@ cucumber { main = 'io.cucumber.core.cli.Main' shorten = 'argfile' plugin = [ - 'pretty', - 'html:build/reports/cucumber/report.html', - 'json:build/reports/cucumber/report.json', - 'junit:build/reports/cucumber/report.xml' + 'pretty', + 'html:build/reports/cucumber/report.html', + 'json:build/reports/cucumber/report.json', + 'junit:build/reports/cucumber/report.xml' ] } diff --git a/fineract-provider/dependencies.gradle b/fineract-provider/dependencies.gradle index cd3ffc448a6..504fa0e7d07 100644 --- a/fineract-provider/dependencies.gradle +++ b/fineract-provider/dependencies.gradle @@ -56,7 +56,7 @@ dependencies { // implementation( project(path: ':fineract-avro-schemas') - ) + ) implementation( 'org.springframework.boot:spring-boot-starter-web', 'org.springframework.boot:spring-boot-starter-validation', @@ -126,13 +126,13 @@ dependencies { 'io.github.resilience4j:resilience4j-spring-boot3', 'org.reflections:reflections', - ) + ) implementation 'software.amazon.msk:aws-msk-iam-auth' implementation 'io.swagger.core.v3:swagger-jaxrs2-jakarta' - implementation ('org.apache.commons:commons-email') { + implementation('org.apache.commons:commons-email') { exclude group: 'com.sun.mail', module: 'javax.mail' exclude group: 'javax.activation', module: 'activation' } @@ -146,35 +146,35 @@ dependencies { implementation('org.dom4j:dom4j') { exclude group: 'javax.xml.bind' } - implementation ('jakarta.xml.bind:jakarta.xml.bind-api') { + implementation('jakarta.xml.bind:jakarta.xml.bind-api') { exclude group: 'jakarta.activation' } - implementation ('org.apache.activemq:activemq-client') { + implementation('org.apache.activemq:activemq-client') { exclude group: 'org.apache.geronimo.specs' exclude group: 'javax.annotation', module: 'javax.annotation-api' } - implementation ('org.springframework.boot:spring-boot-starter-data-jpa') { + implementation('org.springframework.boot:spring-boot-starter-data-jpa') { exclude group: 'org.hibernate' } implementation('org.eclipse.persistence:org.eclipse.persistence.jpa') { exclude group: 'org.eclipse.persistence', module: 'jakarta.persistence' } - implementation ('org.quartz-scheduler:quartz') { + implementation('org.quartz-scheduler:quartz') { exclude group: 'com.zaxxer', module: 'HikariCP-java7' } - implementation('org.apache.commons:commons-csv'){} - implementation ('software.amazon.awssdk:s3') { + implementation('org.apache.commons:commons-csv') {} + implementation('software.amazon.awssdk:s3') { } - implementation ('software.amazon.awssdk:auth') { + implementation('software.amazon.awssdk:auth') { } - implementation ('org.mnode.ical4j:ical4j') { + implementation('org.mnode.ical4j:ical4j') { exclude group: 'commons-logging' exclude group: 'javax.activation' exclude group: 'com.sun.mail', module: 'javax.mail' } - implementation ('org.ehcache:ehcache') { + implementation('org.ehcache:ehcache') { exclude group: 'com.sun.activation' } @@ -197,7 +197,7 @@ dependencies { // Although fineract (at the time of writing) doesn't have any compile time dep. on httpclient, // it's useful to have this for the Spring Boot TestRestTemplate http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-rest-templates-test-utility 'org.apache.httpcomponents:httpclient' - ) + ) compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' @@ -215,19 +215,19 @@ dependencies { // testCompile dependencies are ONLY used in src/test, not src/main. // Do NOT repeat dependencies which are ALREADY in implementation or runtimeOnly! // - testImplementation( 'io.cucumber:cucumber-spring', + testImplementation('io.cucumber:cucumber-spring', 'io.github.classgraph:classgraph', 'io.cucumber:cucumber-core', 'io.cucumber:cucumber-java', 'io.cucumber:cucumber-java8', 'io.cucumber:cucumber-junit-platform-engine', - ) - testImplementation ('org.springframework.boot:spring-boot-starter-test') { + ) + testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'com.jayway.jsonpath', module: 'json-path' exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' exclude group: 'jakarta.activation' exclude group: 'javax.activation' exclude group: 'org.skyscreamer' } - testImplementation ('org.mockito:mockito-inline') + testImplementation('org.mockito:mockito-inline') } diff --git a/fineract-provider/src/main/java/org/apache/fineract/ServerApplication.java b/fineract-provider/src/main/java/org/apache/fineract/ServerApplication.java index f95ad1c23c5..3c18e8a7bc6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/ServerApplication.java +++ b/fineract-provider/src/main/java/org/apache/fineract/ServerApplication.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract; import java.io.IOException; + import org.apache.fineract.infrastructure.core.boot.FineractLiquibaseOnlyApplicationConfiguration; import org.apache.fineract.infrastructure.core.boot.FineractWebApplicationConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; @@ -41,8 +42,9 @@ public class ServerApplication extends SpringBootServletInitializer { - @Import({ FineractWebApplicationConfiguration.class, FineractLiquibaseOnlyApplicationConfiguration.class }) - private static final class Configuration {} + @Import({FineractWebApplicationConfiguration.class, FineractLiquibaseOnlyApplicationConfiguration.class}) + private static final class Configuration { + } @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/service/AccrualAccountingWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/service/AccrualAccountingWritePlatformServiceImpl.java index b5bdbe082a8..889aca5b0f4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/service/AccrualAccountingWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/service/AccrualAccountingWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.accrual.serialization.AccrualAccountingDataValidator; import org.apache.fineract.infrastructure.core.api.JsonCommand; diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/starter/AccountingAccrualConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/starter/AccountingAccrualConfiguration.java index 4a5094aada6..70d6f95418e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/starter/AccountingAccrualConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/accrual/starter/AccountingAccrualConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/common/AccountingDropdownReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/common/AccountingDropdownReadPlatformServiceImpl.java index 474db55fe3a..4866aa29a10 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/common/AccountingDropdownReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/common/AccountingDropdownReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.glaccount.data.GLAccountData; import org.apache.fineract.accounting.glaccount.domain.GLAccountType; @@ -102,7 +103,7 @@ public List retrieveAssetAccountOptions() { } private Map> retrieveAccountMappingOptions(boolean includeAssetAccounts, boolean includeIncomeAccounts, - boolean includeExpenseAccounts, boolean includeLiabilityAccounts, boolean includeEquityAccounts) { + boolean includeExpenseAccounts, boolean includeLiabilityAccounts, boolean includeEquityAccounts) { final Map> accountOptions = new HashMap<>(); if (includeAssetAccounts) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/jobs/accountrunningbalanceupdate/AccountRunningBalanceUpdateConfig.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/jobs/accountrunningbalanceupdate/AccountRunningBalanceUpdateConfig.java index 030138be2af..3c393ff5257 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/jobs/accountrunningbalanceupdate/AccountRunningBalanceUpdateConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/jobs/accountrunningbalanceupdate/AccountRunningBalanceUpdateConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/jobs/accountrunningbalanceupdate/AccountRunningBalanceUpdateTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/jobs/accountrunningbalanceupdate/AccountRunningBalanceUpdateTasklet.java index b5708c07363..abf55b114c6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/jobs/accountrunningbalanceupdate/AccountRunningBalanceUpdateTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/jobs/accountrunningbalanceupdate/AccountRunningBalanceUpdateTasklet.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResourceSwagger.java index d31c1dafe6c..9058f1090e3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/api/JournalEntriesApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.accounting.journalentry.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; + import org.apache.fineract.portfolio.note.data.NoteData; import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData; @@ -30,7 +32,8 @@ */ final class JournalEntriesApiResourceSwagger { - private JournalEntriesApiResourceSwagger() {} + private JournalEntriesApiResourceSwagger() { + } @Schema(description = "PostJournalEntriesResponse") public static final class PostJournalEntriesResponse { @@ -70,7 +73,8 @@ private PostJournalEntriesTransactionIdResponse() { public static final class CurrencyItem { - private CurrencyItem() {} + private CurrencyItem() { + } @Schema(example = "USD") public String code; @@ -90,7 +94,8 @@ private CurrencyItem() {} static final class EnumOptionType { - private EnumOptionType() {} + private EnumOptionType() { + } @Schema(example = "2") public Long id; @@ -102,11 +107,13 @@ private EnumOptionType() {} static final class JournalEntryTransactionItem { - private JournalEntryTransactionItem() {} + private JournalEntryTransactionItem() { + } static final class PaymentDetailData { - private PaymentDetailData() {} + private PaymentDetailData() { + } @Schema(example = "62") public Long id; @@ -125,7 +132,8 @@ private PaymentDetailData() {} static final class TransactionDetails { - private TransactionDetails() {} + private TransactionDetails() { + } @Schema(example = "2") public Long transactionId; @@ -190,7 +198,8 @@ private TransactionDetails() {} @Schema(description = "GetJournalEntriesTransactionIdResponse") public static final class GetJournalEntriesTransactionIdResponse { - private GetJournalEntriesTransactionIdResponse() {} + private GetJournalEntriesTransactionIdResponse() { + } @Schema(example = "2") public Long totalFilteredRecords; diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/ChargePaymentDTO.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/ChargePaymentDTO.java index 124da74b2d2..91be3af003d 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/ChargePaymentDTO.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/ChargePaymentDTO.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.journalentry.data; import java.math.BigDecimal; + import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/ClientChargePaymentDTO.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/ClientChargePaymentDTO.java index c1fbb493b71..5077a185b08 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/ClientChargePaymentDTO.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/ClientChargePaymentDTO.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.journalentry.data; import java.math.BigDecimal; + import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/ClientTransactionDTO.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/ClientTransactionDTO.java index d80ca2d1196..11732331aec 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/ClientTransactionDTO.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/ClientTransactionDTO.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/GLAccountBalanceHolder.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/GLAccountBalanceHolder.java index 81c0736b918..63e08e09ab2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/GLAccountBalanceHolder.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/GLAccountBalanceHolder.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.accounting.journalentry.data; import jakarta.validation.constraints.NotNull; + import java.math.BigDecimal; import java.util.LinkedHashMap; import java.util.Map; + import lombok.Data; import org.apache.fineract.accounting.glaccount.domain.GLAccount; @@ -41,7 +43,7 @@ public void addToDebit(@NotNull GLAccount debitAccount, @NotNull BigDecimal amou } private void addToProperBalance(@NotNull Map balanceMap, @NotNull @NotNull GLAccount account, - @NotNull BigDecimal amount) { + @NotNull BigDecimal amount) { glAccountMap.putIfAbsent(account.getId(), account); if (balanceMap.containsKey(account.getId())) { BigDecimal totalAmount = balanceMap.get(account.getId()).add(amount); diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/LoanDTO.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/LoanDTO.java index 45a45f92d11..4127d6bf85c 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/LoanDTO.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/LoanDTO.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.journalentry.data; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/LoanTransactionDTO.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/LoanTransactionDTO.java index 07defb666bd..f8138e54299 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/LoanTransactionDTO.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/LoanTransactionDTO.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/SavingsDTO.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/SavingsDTO.java index 66028d83d05..f419ca12be1 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/SavingsDTO.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/SavingsDTO.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.journalentry.data; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/SavingsTransactionDTO.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/SavingsTransactionDTO.java index acbcb164c03..b497885bf0f 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/SavingsTransactionDTO.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/SavingsTransactionDTO.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.portfolio.savings.data.SavingsAccountTransactionEnumData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/SharesDTO.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/SharesDTO.java index 4c513e78a00..c4c0ee28289 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/SharesDTO.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/SharesDTO.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.journalentry.data; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/SharesTransactionDTO.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/SharesTransactionDTO.java index fa571a3b8bb..19c48ce4082 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/SharesTransactionDTO.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/SharesTransactionDTO.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.portfolio.shareaccounts.data.ShareAccountTransactionEnumData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/TaxPaymentDTO.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/TaxPaymentDTO.java index 36270147fb0..b0ce983cd80 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/TaxPaymentDTO.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/data/TaxPaymentDTO.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.journalentry.data; import java.math.BigDecimal; + import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/handler/CreateJournalEntryCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/handler/CreateJournalEntryCommandHandler.java index edcfabda46f..d5db81aa01e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/handler/CreateJournalEntryCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/handler/CreateJournalEntryCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/handler/DefineOpeningBalanceCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/handler/DefineOpeningBalanceCommandHandler.java index f423658a781..ac75c2bdd9e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/handler/DefineOpeningBalanceCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/handler/DefineOpeningBalanceCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/handler/ReverseJournalEntryCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/handler/ReverseJournalEntryCommandHandler.java index 41a950fb84d..3f9ca2f00c5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/handler/ReverseJournalEntryCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/handler/ReverseJournalEntryCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/handler/UpdateRunningBalanceCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/handler/UpdateRunningBalanceCommandHandler.java index 00fbd8b65e2..c6cc665d3ab 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/handler/UpdateRunningBalanceCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/handler/UpdateRunningBalanceCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForClientTransactions.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForClientTransactions.java index 1683eeab023..0ea3cd4555e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForClientTransactions.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForClientTransactions.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForLoan.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForLoan.java index dc1ecc06b48..db667fa8308 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForLoan.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForLoan.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForLoanFactory.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForLoanFactory.java index fe09b4777f7..e92f2074a54 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForLoanFactory.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForLoanFactory.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForSavings.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForSavings.java index 8816d58f050..ad7c0aff857 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForSavings.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForSavings.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForSavingsFactory.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForSavingsFactory.java index 5bccce4e264..aa9ac2d1845 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForSavingsFactory.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForSavingsFactory.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForShares.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForShares.java index a8f5e83ab03..6c533774486 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForShares.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForShares.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForSharesFactory.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForSharesFactory.java index ef7240b0f27..8d3df75c494 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForSharesFactory.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorForSharesFactory.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorHelper.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorHelper.java index 21e81186b53..a129069caf1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccountingProcessorHelper.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.accounting.closure.domain.GLClosure; @@ -178,17 +179,17 @@ public LoanDTO populateLoanDtoFromDTO( } public ProductToGLAccountMapping getChargeOffMappingByCodeValue(Long loanProductId, PortfolioProductType productType, - Long chargeOffReasonId) { + Long chargeOffReasonId) { return accountMappingRepository.findChargeOffReasonMapping(loanProductId, productType.getValue(), chargeOffReasonId); } public ProductToGLAccountMapping getWriteOffMappingByCodeValue(Long loanProductId, PortfolioProductType productType, - Long writeOffReasonId) { + Long writeOffReasonId) { return accountMappingRepository.findWriteOffReasonMapping(loanProductId, productType.getValue(), writeOffReasonId); } public ProductToGLAccountMapping getClassificationMappingByCodeValue(Long loanProductId, PortfolioProductType productType, - final Long classificationId, final String classificationType) { + final Long classificationId, final String classificationType) { if (LoanProductAccountingParams.BUYDOWN_FEE_CLASSIFICATION_TO_INCOME_ACCOUNT_MAPPINGS.getValue().equals(classificationType)) { return accountMappingRepository.findBuydownFeeClassificationMapping(loanProductId, productType.getValue(), classificationId); } else { @@ -198,7 +199,7 @@ public ProductToGLAccountMapping getClassificationMappingByCodeValue(Long loanPr } public SavingsDTO populateSavingsDtoFromMap(final Map accountingBridgeData, final boolean cashBasedAccountingEnabled, - final boolean accrualBasedAccountingEnabled) { + final boolean accrualBasedAccountingEnabled) { final Long loanId = (Long) accountingBridgeData.get("savingsId"); final Long loanProductId = (Long) accountingBridgeData.get("savingsProductId"); final Long officeId = (Long) accountingBridgeData.get("officeId"); @@ -206,8 +207,7 @@ public SavingsDTO populateSavingsDtoFromMap(final Map accounting final List newSavingsTransactions = new ArrayList<>(); boolean isAccountTransfer = (Boolean) accountingBridgeData.get("isAccountTransfer"); - @SuppressWarnings("unchecked") - final List> newTransactionsMap = (List>) accountingBridgeData.get("newSavingsTransactions"); + @SuppressWarnings("unchecked") final List> newTransactionsMap = (List>) accountingBridgeData.get("newSavingsTransactions"); for (final Map map : newTransactionsMap) { final Long transactionOfficeId = (Long) map.get("officeId"); @@ -223,8 +223,7 @@ public SavingsDTO populateSavingsDtoFromMap(final Map accounting final List penaltyPayments = new ArrayList<>(); // extract charge payment details (if exists) if (map.containsKey("savingsChargesPaid")) { - @SuppressWarnings("unchecked") - final List> savingsChargesPaidData = (List>) map.get("savingsChargesPaid"); + @SuppressWarnings("unchecked") final List> savingsChargesPaidData = (List>) map.get("savingsChargesPaid"); for (final Map loanChargePaid : savingsChargesPaidData) { final Long chargeId = (Long) loanChargePaid.get("chargeId"); final Long loanChargeId = (Long) loanChargePaid.get("savingsChargeId"); @@ -241,8 +240,7 @@ public SavingsDTO populateSavingsDtoFromMap(final Map accounting final List taxPayments = new ArrayList<>(); if (map.containsKey("taxDetails")) { - @SuppressWarnings("unchecked") - final List> taxDataList = (List>) map.get("taxDetails"); + @SuppressWarnings("unchecked") final List> taxDataList = (List>) map.get("taxDetails"); for (final Map taxData : taxDataList) { final BigDecimal taxAmount = (BigDecimal) taxData.get("amount"); final Long creditAccountId = (Long) taxData.get("creditAccountId"); @@ -268,15 +266,14 @@ public SavingsDTO populateSavingsDtoFromMap(final Map accounting } public SharesDTO populateSharesDtoFromMap(final Map accountingBridgeData, final boolean cashBasedAccountingEnabled, - final boolean accrualBasedAccountingEnabled) { + final boolean accrualBasedAccountingEnabled) { final Long shareAccountId = (Long) accountingBridgeData.get("shareAccountId"); final Long shareProductId = (Long) accountingBridgeData.get("shareProductId"); final Long officeId = (Long) accountingBridgeData.get("officeId"); final String currencyCode = (String) accountingBridgeData.get("currencyCode"); final List newTransactions = new ArrayList<>(); - @SuppressWarnings("unchecked") - final List> newTransactionsMap = (List>) accountingBridgeData.get("newTransactions"); + @SuppressWarnings("unchecked") final List> newTransactionsMap = (List>) accountingBridgeData.get("newTransactions"); for (final Map map : newTransactionsMap) { final Long transactionOfficeId = (Long) map.get("officeId"); @@ -291,8 +288,7 @@ public SharesDTO populateSharesDtoFromMap(final Map accountingBr final List feePayments = new ArrayList<>(); // extract charge payment details (if exists) if (map.containsKey("chargesPaid")) { - @SuppressWarnings("unchecked") - final List> chargesPaidData = (List>) map.get("chargesPaid"); + @SuppressWarnings("unchecked") final List> chargesPaidData = (List>) map.get("chargesPaid"); for (final Map chargePaid : chargesPaidData) { final Long chargeId = (Long) chargePaid.get("chargeId"); final Long loanChargeId = (Long) chargePaid.get("sharesChargeId"); @@ -328,8 +324,7 @@ public ClientTransactionDTO populateClientTransactionDtoFromMap(final Map clientChargePaymentDTOs = new ArrayList<>(); // extract client charge payment details (if exists) if (accountingBridgeData.containsKey("clientChargesPaid")) { - @SuppressWarnings("unchecked") - final List> clientChargesPaidData = (List>) accountingBridgeData + @SuppressWarnings("unchecked") final List> clientChargesPaidData = (List>) accountingBridgeData .get("clientChargesPaid"); for (final Map clientChargePaid : clientChargesPaidData) { final Long chargeId = (Long) clientChargePaid.get("chargeId"); @@ -375,8 +370,8 @@ public ClientTransactionDTO populateClientTransactionDtoFromMap(final Map chargePaymentDTOs) { + final Integer accountTypeToBeCredited, final Long loanProductId, final Long loanId, final String transactionId, + final LocalDate transactionDate, final BigDecimal totalAmount, final List chargePaymentDTOs) { final Map creditDetailsMap = new LinkedHashMap<>(); final Map debitDetailsMap = new LinkedHashMap<>(); @@ -450,9 +445,9 @@ public void createJournalEntriesForLoanCharges(final Office office, final String * @param isReversal */ public void createCashBasedJournalEntriesAndReversalsForSavings(final Office office, final String currencyCode, - final Integer accountTypeToBeDebited, final Integer accountTypeToBeCredited, final Long savingsProductId, - final Long paymentTypeId, final Long loanId, final String transactionId, final LocalDate transactionDate, - final BigDecimal amount, final Boolean isReversal) { + final Integer accountTypeToBeDebited, final Integer accountTypeToBeCredited, final Long savingsProductId, + final Long paymentTypeId, final Long loanId, final String transactionId, final LocalDate transactionDate, + final BigDecimal amount, final Boolean isReversal) { int accountTypeToDebitId = accountTypeToBeDebited; int accountTypeToCreditId = accountTypeToBeCredited; // reverse debits and credits for reversals @@ -482,8 +477,8 @@ public void createCashBasedJournalEntriesAndReversalsForSavings(final Office off * @param amount */ public void createJournalEntriesForLoan(final Office office, final String currencyCode, final Integer accountTypeToBeDebited, - final Integer accountTypeToBeCredited, final Long loanProductId, final Long paymentTypeId, final Long loanId, - final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { + final Integer accountTypeToBeCredited, final Long loanProductId, final Long paymentTypeId, final Long loanId, + final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { int accountTypeToDebitId = accountTypeToBeDebited; int accountTypeToCreditId = accountTypeToBeCredited; createJournalEntriesForLoan(office, currencyCode, accountTypeToDebitId, accountTypeToCreditId, loanProductId, paymentTypeId, loanId, @@ -491,16 +486,16 @@ public void createJournalEntriesForLoan(final Office office, final String curren } public void createJournalEntriesForLoan(final Office office, final String currencyCode, final Integer accountTypeToBeDebited, - final GLAccount accountToBeCredited, final Long loanProductId, final Long paymentTypeId, final Long loanId, - final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { + final GLAccount accountToBeCredited, final Long loanProductId, final Long paymentTypeId, final Long loanId, + final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { int accountTypeToDebitId = accountTypeToBeDebited; createJournalEntriesForLoan(office, currencyCode, accountTypeToDebitId, accountToBeCredited, loanProductId, paymentTypeId, loanId, transactionId, transactionDate, amount); } public void createSplitJournalEntriesForLoan(Office office, String currencyCode, List splitAccountsHolder, - JournalAmountHolder totalAccountHolder, Long loanProductId, Long paymentTypeId, Long loanId, String transactionId, - LocalDate transactionDate) { + JournalAmountHolder totalAccountHolder, Long loanProductId, Long paymentTypeId, Long loanId, String transactionId, + LocalDate transactionDate) { splitAccountsHolder.forEach(journalItemHolder -> { if (MathUtil.isGreaterThanZero(journalItemHolder.getAmount())) { final GLAccount account = getLinkedGLAccountForLoanProduct(loanProductId, journalItemHolder.getAccountType(), @@ -518,16 +513,16 @@ public void createSplitJournalEntriesForLoan(Office office, String currencyCode, } public void createCreditJournalEntryForLoan(final Office office, final String currencyCode, - final CashAccountsForLoan accountMappingType, final Long loanProductId, final Long paymentTypeId, final Long loanId, - final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { + final CashAccountsForLoan accountMappingType, final Long loanProductId, final Long paymentTypeId, final Long loanId, + final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { final int accountMappingTypeId = accountMappingType.getValue(); createCreditJournalEntryForLoan(office, currencyCode, accountMappingTypeId, loanProductId, paymentTypeId, loanId, transactionId, transactionDate, amount); } public void createCreditJournalEntryForLoan(final Office office, final String currencyCode, - final AccrualAccountsForLoan accountMappingType, final Long loanProductId, final Long paymentTypeId, final Long loanId, - final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { + final AccrualAccountsForLoan accountMappingType, final Long loanProductId, final Long paymentTypeId, final Long loanId, + final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { final int accountMappingTypeId = accountMappingType.getValue(); createCreditJournalEntryForLoan(office, currencyCode, accountMappingTypeId, loanProductId, paymentTypeId, loanId, transactionId, transactionDate, amount); @@ -552,8 +547,8 @@ public GLClosure getLatestClosureByBranch(final long officeId) { } private void createJournalEntriesForLoan(final Office office, final String currencyCode, final int accountTypeToDebitId, - final int accountTypeToCreditId, final Long loanProductId, final Long paymentTypeId, final Long loanId, - final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { + final int accountTypeToCreditId, final Long loanProductId, final Long paymentTypeId, final Long loanId, + final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { final GLAccount debitAccount = getLinkedGLAccountForLoanProduct(loanProductId, accountTypeToDebitId, paymentTypeId); final GLAccount creditAccount = getLinkedGLAccountForLoanProduct(loanProductId, accountTypeToCreditId, paymentTypeId); createDebitJournalEntryForLoan(office, currencyCode, debitAccount, loanId, transactionId, transactionDate, amount); @@ -561,16 +556,16 @@ private void createJournalEntriesForLoan(final Office office, final String curre } private void createJournalEntriesForLoan(final Office office, final String currencyCode, final int accountTypeToDebitId, - final GLAccount creditAccount, final Long loanProductId, final Long paymentTypeId, final Long loanId, - final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { + final GLAccount creditAccount, final Long loanProductId, final Long paymentTypeId, final Long loanId, + final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { final GLAccount debitAccount = getLinkedGLAccountForLoanProduct(loanProductId, accountTypeToDebitId, paymentTypeId); createDebitJournalEntryForLoan(office, currencyCode, debitAccount, loanId, transactionId, transactionDate, amount); createCreditJournalEntryForLoan(office, currencyCode, creditAccount, loanId, transactionId, transactionDate, amount); } private void createJournalEntriesForSavings(final Office office, final String currencyCode, final int accountTypeToDebitId, - final int accountTypeToCreditId, final Long savingsProductId, final Long paymentTypeId, final Long savingsId, - final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { + final int accountTypeToCreditId, final Long savingsProductId, final Long paymentTypeId, final Long savingsId, + final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { final GLAccount debitAccount = getLinkedGLAccountForSavingsProduct(savingsProductId, accountTypeToDebitId, paymentTypeId); final GLAccount creditAccount = getLinkedGLAccountForSavingsProduct(savingsProductId, accountTypeToCreditId, paymentTypeId); createDebitJournalEntryForSavings(office, currencyCode, debitAccount, savingsId, transactionId, transactionDate, amount); @@ -598,9 +593,9 @@ private void createJournalEntriesForSavings(final Office office, final String cu * @param taxDetails */ public void createCashBasedJournalEntriesAndReversalsForSavingsTax(final Office office, final String currencyCode, - final CashAccountsForSavings accountTypeToBeDebited, final CashAccountsForSavings accountTypeToBeCredited, - final Long savingsProductId, final Long paymentTypeId, final Long savingsId, final String transactionId, - final LocalDate transactionDate, final BigDecimal amount, final Boolean isReversal, final List taxDetails) { + final CashAccountsForSavings accountTypeToBeDebited, final CashAccountsForSavings accountTypeToBeCredited, + final Long savingsProductId, final Long paymentTypeId, final Long savingsId, final String transactionId, + final LocalDate transactionDate, final BigDecimal amount, final Boolean isReversal, final List taxDetails) { for (TaxPaymentDTO taxPaymentDTO : taxDetails) { if (taxPaymentDTO.getAmount() != null) { @@ -619,10 +614,10 @@ public void createCashBasedJournalEntriesAndReversalsForSavingsTax(final Office } public void createAccrualBasedJournalEntriesAndReversalsForSavingsTax(final Office office, final String currencyCode, - final AccountingConstants.AccrualAccountsForSavings accountTypeToBeDebited, - final AccountingConstants.AccrualAccountsForSavings accountTypeToBeCredited, final Long savingsProductId, - final Long paymentTypeId, final Long savingsId, final String transactionId, final LocalDate transactionDate, - final BigDecimal amount, final Boolean isReversal, final List taxDetails) { + final AccountingConstants.AccrualAccountsForSavings accountTypeToBeDebited, + final AccountingConstants.AccrualAccountsForSavings accountTypeToBeCredited, final Long savingsProductId, + final Long paymentTypeId, final Long savingsId, final String transactionId, final LocalDate transactionDate, + final BigDecimal amount, final Boolean isReversal, final List taxDetails) { for (TaxPaymentDTO taxPaymentDTO : taxDetails) { if (taxPaymentDTO.getAmount() != null) { if (taxPaymentDTO.getCreditAccountId() == null) { @@ -641,8 +636,8 @@ public void createAccrualBasedJournalEntriesAndReversalsForSavingsTax(final Offi } public void createCashBasedDebitJournalEntriesAndReversalsForSavings(final Office office, final String currencyCode, - final Integer accountTypeToBeDebited, final Long savingsProductId, final Long paymentTypeId, final Long savingsId, - final String transactionId, final LocalDate transactionDate, final BigDecimal amount, final Boolean isReversal) { + final Integer accountTypeToBeDebited, final Long savingsProductId, final Long paymentTypeId, final Long savingsId, + final String transactionId, final LocalDate transactionDate, final BigDecimal amount, final Boolean isReversal) { // reverse debits and credits for reversals if (isReversal) { createCreditJournalEntriesForSavings(office, currencyCode, accountTypeToBeDebited, savingsProductId, paymentTypeId, savingsId, @@ -654,8 +649,8 @@ public void createCashBasedDebitJournalEntriesAndReversalsForSavings(final Offic } public void createCashBasedCreditJournalEntriesAndReversalsForSavings(final Office office, final String currencyCode, - final Integer accountTypeToBeCredited, final Long savingsProductId, final Long paymentTypeId, final Long savingsId, - final String transactionId, final LocalDate transactionDate, final BigDecimal amount, final Boolean isReversal) { + final Integer accountTypeToBeCredited, final Long savingsProductId, final Long paymentTypeId, final Long savingsId, + final String transactionId, final LocalDate transactionDate, final BigDecimal amount, final Boolean isReversal) { // reverse debits and credits for reversals if (isReversal) { createDebitJournalEntriesForSavings(office, currencyCode, accountTypeToBeCredited, savingsProductId, paymentTypeId, savingsId, @@ -667,8 +662,8 @@ public void createCashBasedCreditJournalEntriesAndReversalsForSavings(final Offi } public void createCashBasedCreditJournalEntriesAndReversalsForSavings(final Office office, final String currencyCode, - final Long creditAccountId, final Long savingsId, final String transactionId, final LocalDate transactionDate, - final BigDecimal amount, final Boolean isReversal) { + final Long creditAccountId, final Long savingsId, final String transactionId, final LocalDate transactionDate, + final BigDecimal amount, final Boolean isReversal) { // reverse debits and credits for reversals final GLAccount creditAccount = getGLAccountById(creditAccountId); if (isReversal) { @@ -679,8 +674,8 @@ public void createCashBasedCreditJournalEntriesAndReversalsForSavings(final Offi } public void createAccrualBasedDebitJournalEntriesAndReversalsForSavings(final Office office, final String currencyCode, - final Integer accountTypeToBeDebited, final Long savingsProductId, final Long paymentTypeId, final Long savingsId, - final String transactionId, final LocalDate transactionDate, final BigDecimal amount, final Boolean isReversal) { + final Integer accountTypeToBeDebited, final Long savingsProductId, final Long paymentTypeId, final Long savingsId, + final String transactionId, final LocalDate transactionDate, final BigDecimal amount, final Boolean isReversal) { // reverse debits and credits for reversals if (isReversal) { createCreditJournalEntriesForSavings(office, currencyCode, accountTypeToBeDebited, savingsProductId, paymentTypeId, savingsId, @@ -692,8 +687,8 @@ public void createAccrualBasedDebitJournalEntriesAndReversalsForSavings(final Of } public void createAccrualBasedCreditJournalEntriesAndReversalsForSavings(final Office office, final String currencyCode, - final Integer accountTypeToBeCredited, final Long savingsProductId, final Long paymentTypeId, final Long savingsId, - final String transactionId, final LocalDate transactionDate, final BigDecimal amount, final Boolean isReversal) { + final Integer accountTypeToBeCredited, final Long savingsProductId, final Long paymentTypeId, final Long savingsId, + final String transactionId, final LocalDate transactionDate, final BigDecimal amount, final Boolean isReversal) { // reverse debits and credits for reversals if (isReversal) { createDebitJournalEntriesForSavings(office, currencyCode, accountTypeToBeCredited, savingsProductId, paymentTypeId, savingsId, @@ -705,8 +700,8 @@ public void createAccrualBasedCreditJournalEntriesAndReversalsForSavings(final O } public void createAccrualBasedBasedCreditJournalEntriesAndReversalsForSavings(final Office office, final String currencyCode, - final Long creditAccountId, final Long savingsId, final String transactionId, final LocalDate transactionDate, - final BigDecimal amount, final Boolean isReversal) { + final Long creditAccountId, final Long savingsId, final String transactionId, final LocalDate transactionDate, + final BigDecimal amount, final Boolean isReversal) { // reverse debits and credits for reversals final GLAccount creditAccount = getGLAccountById(creditAccountId); if (isReversal) { @@ -717,48 +712,48 @@ public void createAccrualBasedBasedCreditJournalEntriesAndReversalsForSavings(fi } private void createDebitJournalEntriesForSavings(final Office office, final String currencyCode, final int accountTypeToDebitId, - final Long savingsProductId, final Long paymentTypeId, final Long savingsId, final String transactionId, - final LocalDate transactionDate, final BigDecimal amount) { + final Long savingsProductId, final Long paymentTypeId, final Long savingsId, final String transactionId, + final LocalDate transactionDate, final BigDecimal amount) { final GLAccount debitAccount = getLinkedGLAccountForSavingsProduct(savingsProductId, accountTypeToDebitId, paymentTypeId); createDebitJournalEntryForSavings(office, currencyCode, debitAccount, savingsId, transactionId, transactionDate, amount); } private void createCreditJournalEntriesForSavings(final Office office, final String currencyCode, final int accountTypeToCreditId, - final Long savingsProductId, final Long paymentTypeId, final Long savingsId, final String transactionId, - final LocalDate transactionDate, final BigDecimal amount) { + final Long savingsProductId, final Long paymentTypeId, final Long savingsId, final String transactionId, + final LocalDate transactionDate, final BigDecimal amount) { final GLAccount creditAccount = getLinkedGLAccountForSavingsProduct(savingsProductId, accountTypeToCreditId, paymentTypeId); createCreditJournalEntryForSavings(office, currencyCode, creditAccount, savingsId, transactionId, transactionDate, amount); } public void createDebitJournalEntryForLoan(final Office office, final String currencyCode, final int accountMappingTypeId, - final Long loanProductId, final Long paymentTypeId, final Long loanId, final String transactionId, - final LocalDate transactionDate, final BigDecimal amount) { + final Long loanProductId, final Long paymentTypeId, final Long loanId, final String transactionId, + final LocalDate transactionDate, final BigDecimal amount) { final GLAccount account = getLinkedGLAccountForLoanProduct(loanProductId, accountMappingTypeId, paymentTypeId); createDebitJournalEntryForLoan(office, currencyCode, account, loanId, transactionId, transactionDate, amount); } public void createDebitJournalEntryForLoan(final Office office, final String currencyCode, final Long loanId, - final String transactionId, final LocalDate transactionDate, final BigDecimal amount, final GLAccount account) { + final String transactionId, final LocalDate transactionDate, final BigDecimal amount, final GLAccount account) { createDebitJournalEntryForLoan(office, currencyCode, account, loanId, transactionId, transactionDate, amount); } public void createDebitJournalEntryForLoanCharges(final Office office, final String currencyCode, final int accountMappingTypeId, - final Long loanProductId, final Long chargeId, final Long loanId, final String transactionId, final LocalDate transactionDate, - final BigDecimal amount) { + final Long loanProductId, final Long chargeId, final Long loanId, final String transactionId, final LocalDate transactionDate, + final BigDecimal amount) { final GLAccount account = getLinkedGLAccountForLoanCharges(loanProductId, accountMappingTypeId, chargeId); createDebitJournalEntryForLoan(office, currencyCode, account, loanId, transactionId, transactionDate, amount); } public void createCreditJournalEntryForLoanCharges(final Office office, final String currencyCode, final int accountMappingTypeId, - final Long loanProductId, final Long loanId, final String transactionId, final LocalDate transactionDate, - final BigDecimal totalAmount, final List chargePaymentDTOs) { + final Long loanProductId, final Long loanId, final String transactionId, final LocalDate transactionDate, + final BigDecimal totalAmount, final List chargePaymentDTOs) { createJournalEntriesForLoanChargesInternal(office, currencyCode, accountMappingTypeId, loanProductId, loanId, transactionId, transactionDate, totalAmount, chargePaymentDTOs, true); } public void createDebitJournalEntryForLoanCharges(final Office office, final String currencyCode, final int accountMappingTypeId, - final Long loanProductId, final Long loanId, final String transactionId, final LocalDate transactionDate, - final BigDecimal totalAmount, final List chargePaymentDTOs) { + final Long loanProductId, final Long loanId, final String transactionId, final LocalDate transactionDate, + final BigDecimal totalAmount, final List chargePaymentDTOs) { createJournalEntriesForLoanChargesInternal(office, currencyCode, accountMappingTypeId, loanProductId, loanId, transactionId, transactionDate, totalAmount, chargePaymentDTOs, false); } @@ -794,10 +789,10 @@ public void createDebitJournalEntryForLoanCharges(final Office office, final Str * chargePaymentDTOs */ public void createCashBasedJournalEntriesAndReversalsForSavingsCharges(final Office office, final String currencyCode, - final CashAccountsForSavings accountTypeToBeDebited, CashAccountsForSavings accountTypeToBeCredited, - final Long savingsProductId, final Long paymentTypeId, final Long loanId, final String transactionId, - final LocalDate transactionDate, final BigDecimal totalAmount, final Boolean isReversal, - final List chargePaymentDTOs) { + final CashAccountsForSavings accountTypeToBeDebited, CashAccountsForSavings accountTypeToBeCredited, + final Long savingsProductId, final Long paymentTypeId, final Long loanId, final String transactionId, + final LocalDate transactionDate, final BigDecimal totalAmount, final Boolean isReversal, + final List chargePaymentDTOs) { // TODO Vishwas: Remove this validation, as and when appropriate Junit // tests are written for accounting /** @@ -829,10 +824,10 @@ public void createCashBasedJournalEntriesAndReversalsForSavingsCharges(final Off } public void createAccrualBasedJournalEntriesAndReversalsForSavingsCharges(final Office office, final String currencyCode, - final AccountingConstants.AccrualAccountsForSavings accountTypeToBeDebited, - final AccountingConstants.AccrualAccountsForSavings accountTypeToBeCredited, final Long savingsProductId, - final Long paymentTypeId, final Long loanId, final String transactionId, final LocalDate transactionDate, - final BigDecimal totalAmount, final Boolean isReversal, final List chargePaymentDTOs) { + final AccountingConstants.AccrualAccountsForSavings accountTypeToBeDebited, + final AccountingConstants.AccrualAccountsForSavings accountTypeToBeCredited, final Long savingsProductId, + final Long paymentTypeId, final Long loanId, final String transactionId, final LocalDate transactionDate, + final BigDecimal totalAmount, final Boolean isReversal, final List chargePaymentDTOs) { // TODO Vishwas: Remove this validation, as and when appropriate Junit // tests are written for accounting /** @@ -868,19 +863,19 @@ public Office getOfficeById(final long officeId) { } public void createCreditJournalEntryForLoan(final Office office, final String currencyCode, final int accountMappingTypeId, - final Long loanProductId, final Long paymentTypeId, final Long loanId, final String transactionId, - final LocalDate transactionDate, final BigDecimal amount) { + final Long loanProductId, final Long paymentTypeId, final Long loanId, final String transactionId, + final LocalDate transactionDate, final BigDecimal amount) { final GLAccount account = getLinkedGLAccountForLoanProduct(loanProductId, accountMappingTypeId, paymentTypeId); createCreditJournalEntryForLoan(office, currencyCode, loanId, transactionId, transactionDate, amount, account); } public void createCreditJournalEntryForLoan(final Office office, final String currencyCode, final Long loanId, - final String transactionId, final LocalDate transactionDate, final BigDecimal amount, final GLAccount account) { + final String transactionId, final LocalDate transactionDate, final BigDecimal amount, final GLAccount account) { createCreditJournalEntryForLoan(office, currencyCode, account, loanId, transactionId, transactionDate, amount); } private void createCreditJournalEntryForClientPayments(final Office office, final String currencyCode, final GLAccount account, - final Long clientId, final Long transactionId, final LocalDate transactionDate, final BigDecimal amount) { + final Long clientId, final Long transactionId, final LocalDate transactionDate, final BigDecimal amount) { final boolean manualEntry = false; String modifiedTransactionId = CLIENT_TRANSACTION_IDENTIFIER + transactionId; @@ -891,7 +886,7 @@ private void createCreditJournalEntryForClientPayments(final Office office, fina } private void createCreditJournalEntryForSavings(final Office office, final String currencyCode, final GLAccount account, - final Long savingsId, final String transactionId, final LocalDate transactionDate, final BigDecimal amount) + final Long savingsId, final String transactionId, final LocalDate transactionDate, final BigDecimal amount) throws DataAccessException { final boolean manualEntry = false; Long savingsAccountTransactionId = null; @@ -908,7 +903,7 @@ private void createCreditJournalEntryForSavings(final Office office, final Strin } private void createCreditJournalEntryForLoan(final Office office, final String currencyCode, final GLAccount account, final Long loanId, - final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { + final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { final boolean manualEntry = false; Long loanTransactionId = null; String modifiedTransactionId = transactionId; @@ -923,7 +918,7 @@ private void createCreditJournalEntryForLoan(final Office office, final String c } public void createProvisioningDebitJournalEntry(LocalDate transactionDate, Long provisioningEntryId, Office office, String currencyCode, - GLAccount account, BigDecimal amount) { + GLAccount account, BigDecimal amount) { final boolean manualEntry = false; String modifiedTransactionId = PROVISIONING_TRANSACTION_IDENTIFIER + provisioningEntryId; final JournalEntry journalEntry = JournalEntry.createNew(office, null, account, currencyCode, modifiedTransactionId, manualEntry, @@ -933,7 +928,7 @@ public void createProvisioningDebitJournalEntry(LocalDate transactionDate, Long } public void createProvisioningCreditJournalEntry(LocalDate transactionDate, Long provisioningEntryId, Office office, - String currencyCode, GLAccount account, BigDecimal amount) { + String currencyCode, GLAccount account, BigDecimal amount) { final boolean manualEntry = false; String modifiedTransactionId = PROVISIONING_TRANSACTION_IDENTIFIER + provisioningEntryId; final JournalEntry journalEntry = JournalEntry.createNew(office, null, account, currencyCode, modifiedTransactionId, manualEntry, @@ -943,7 +938,7 @@ public void createProvisioningCreditJournalEntry(LocalDate transactionDate, Long } public void createDebitJournalEntryForLoan(final Office office, final String currencyCode, final GLAccount account, final Long loanId, - final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { + final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { final boolean manualEntry = false; Long loanTransactionId = null; String modifiedTransactionId = transactionId; @@ -958,7 +953,7 @@ public void createDebitJournalEntryForLoan(final Office office, final String cur } private void createDebitJournalEntryForSavings(final Office office, final String currencyCode, final GLAccount account, - final Long savingsId, final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { + final Long savingsId, final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { final boolean manualEntry = false; Long savingsAccountTransactionId = null; String modifiedTransactionId = transactionId; @@ -974,7 +969,7 @@ private void createDebitJournalEntryForSavings(final Office office, final String } private void createDebitJournalEntryForClientPayments(final Office office, final String currencyCode, final GLAccount account, - final Long clientId, final Long transactionId, final LocalDate transactionDate, final BigDecimal amount) { + final Long clientId, final Long transactionId, final LocalDate transactionDate, final BigDecimal amount) { final boolean manualEntry = false; String modifiedTransactionId = CLIENT_TRANSACTION_IDENTIFIER + transactionId; final JournalEntry journalEntry = JournalEntry.createNew(office, null, account, currencyCode, modifiedTransactionId, manualEntry, @@ -984,8 +979,8 @@ private void createDebitJournalEntryForClientPayments(final Office office, final } public void createJournalEntriesForShares(final Office office, final String currencyCode, final int accountTypeToDebitId, - final int accountTypeToCreditId, final Long shareProductId, final Long paymentTypeId, final Long shareAccountId, - final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { + final int accountTypeToCreditId, final Long shareProductId, final Long paymentTypeId, final Long shareAccountId, + final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { createDebitJournalEntryForShares(office, currencyCode, accountTypeToDebitId, shareProductId, paymentTypeId, shareAccountId, transactionId, transactionDate, amount); createCreditJournalEntryForShares(office, currencyCode, accountTypeToCreditId, shareProductId, paymentTypeId, shareAccountId, @@ -993,23 +988,23 @@ public void createJournalEntriesForShares(final Office office, final String curr } public void createDebitJournalEntryForShares(final Office office, final String currencyCode, final int accountTypeToDebitId, - final Long shareProductId, final Long paymentTypeId, final Long shareAccountId, final String transactionId, - final LocalDate transactionDate, final BigDecimal amount) { + final Long shareProductId, final Long paymentTypeId, final Long shareAccountId, final String transactionId, + final LocalDate transactionDate, final BigDecimal amount) { final GLAccount debitAccount = getLinkedGLAccountForShareProduct(shareProductId, accountTypeToDebitId, paymentTypeId); createDebitJournalEntryForShares(office, currencyCode, debitAccount, shareAccountId, transactionId, transactionDate, amount); } public void createCreditJournalEntryForShares(final Office office, final String currencyCode, final int accountTypeToCreditId, - final Long shareProductId, final Long paymentTypeId, final Long shareAccountId, final String transactionId, - final LocalDate transactionDate, final BigDecimal amount) { + final Long shareProductId, final Long paymentTypeId, final Long shareAccountId, final String transactionId, + final LocalDate transactionDate, final BigDecimal amount) { final GLAccount creditAccount = getLinkedGLAccountForShareProduct(shareProductId, accountTypeToCreditId, paymentTypeId); createCreditJournalEntryForShares(office, currencyCode, creditAccount, shareAccountId, transactionId, transactionDate, amount); } public void createCashBasedJournalEntriesForSharesCharges(final Office office, final String currencyCode, - final CashAccountsForShares accountTypeToBeDebited, final CashAccountsForShares accountTypeToBeCredited, - final Long shareProductId, final Long paymentTypeId, final Long shareAccountId, final String transactionId, - final LocalDate transactionDate, final BigDecimal totalAmount, final List chargePaymentDTOs) { + final CashAccountsForShares accountTypeToBeDebited, final CashAccountsForShares accountTypeToBeCredited, + final Long shareProductId, final Long paymentTypeId, final Long shareAccountId, final String transactionId, + final LocalDate transactionDate, final BigDecimal totalAmount, final List chargePaymentDTOs) { createDebitJournalEntryForShares(office, currencyCode, accountTypeToBeDebited.getValue(), shareProductId, paymentTypeId, shareAccountId, transactionId, transactionDate, totalAmount); @@ -1018,9 +1013,9 @@ public void createCashBasedJournalEntriesForSharesCharges(final Office office, f } public void createCashBasedJournalEntryForSharesCharges(final Office office, final String currencyCode, - final CashAccountsForShares accountTypeToBeCredited, final Long shareProductId, final Long shareAccountId, - final String transactionId, final LocalDate transactionDate, final BigDecimal totalAmount, - final List chargePaymentDTOs) { + final CashAccountsForShares accountTypeToBeCredited, final Long shareProductId, final Long shareAccountId, + final String transactionId, final LocalDate transactionDate, final BigDecimal totalAmount, + final List chargePaymentDTOs) { final Map creditDetailsMap = new LinkedHashMap<>(); for (final ChargePaymentDTO chargePaymentDTO : chargePaymentDTOs) { final GLAccount chargeSpecificAccount = getLinkedGLAccountForShareCharges(shareProductId, accountTypeToBeCredited.getValue(), @@ -1050,9 +1045,9 @@ public void createCashBasedJournalEntryForSharesCharges(final Office office, fin } public void revertCashBasedJournalEntryForSharesCharges(final Office office, final String currencyCode, - final CashAccountsForShares accountTypeToBeCredited, final Long shareProductId, final Long shareAccountId, - final String transactionId, final LocalDate transactionDate, final BigDecimal totalAmount, - final List chargePaymentDTOs) { + final CashAccountsForShares accountTypeToBeCredited, final Long shareProductId, final Long shareAccountId, + final String transactionId, final LocalDate transactionDate, final BigDecimal totalAmount, + final List chargePaymentDTOs) { final Map creditDetailsMap = new LinkedHashMap<>(); for (final ChargePaymentDTO chargePaymentDTO : chargePaymentDTOs) { final GLAccount chargeSpecificAccount = getLinkedGLAccountForShareCharges(shareProductId, accountTypeToBeCredited.getValue(), @@ -1082,7 +1077,7 @@ public void revertCashBasedJournalEntryForSharesCharges(final Office office, fin } private void createDebitJournalEntryForShares(final Office office, final String currencyCode, final GLAccount account, - final Long shareAccountId, final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { + final Long shareAccountId, final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { final boolean manualEntry = false; Long shareTransactionId = null; String modifiedTransactionId = transactionId; @@ -1097,7 +1092,7 @@ private void createDebitJournalEntryForShares(final Office office, final String } private void createCreditJournalEntryForShares(final Office office, final String currencyCode, final GLAccount account, - final Long shareAccountId, final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { + final Long shareAccountId, final String transactionId, final LocalDate transactionDate, final BigDecimal amount) { final boolean manualEntry = false; Long shareTransactionId = null; String modifiedTransactionId = transactionId; @@ -1167,7 +1162,7 @@ private GLAccount getLinkedGLAccountForLoanCharges(final Long loanProductId, fin } private GLAccount getLinkedGLAccountForSavingsCharges(final Long savingsProductId, final int accountMappingTypeId, - final Long chargeId) { + final Long chargeId) { ProductToGLAccountMapping accountMapping = this.accountMappingRepository.findCoreProductToFinAccountMapping(savingsProductId, PortfolioProductType.SAVING.getValue(), accountMappingTypeId); @@ -1198,7 +1193,7 @@ private GLAccount getLinkedGLAccountForSavingsCharges(final Long savingsProductI } private GLAccount getLinkedGLAccountForSavingsProduct(final Long savingsProductId, final int accountMappingTypeId, - final Long paymentTypeId) { + final Long paymentTypeId) { GLAccount glAccount; if (isOrganizationAccount(accountMappingTypeId)) { FinancialActivityAccount financialActivityAccount = this.financialActivityAccountRepository @@ -1225,7 +1220,7 @@ private GLAccount getLinkedGLAccountForSavingsProduct(final Long savingsProductI } private GLAccount getLinkedGLAccountForShareProduct(final Long shareProductId, final int accountMappingTypeId, - final Long paymentTypeId) { + final Long paymentTypeId) { GLAccount glAccount; if (isOrganizationAccount(accountMappingTypeId)) { FinancialActivityAccount financialActivityAccount = this.financialActivityAccountRepository @@ -1271,8 +1266,8 @@ private boolean isOrganizationAccount(final int accountMappingTypeId) { } public BigDecimal createCreditJournalEntryOrReversalForClientPayments(final Office office, final String currencyCode, - final Long clientId, final Long transactionId, final LocalDate transactionDate, final Boolean isReversal, - final List clientChargePaymentDTOs) { + final Long clientId, final Long transactionId, final LocalDate transactionDate, final Boolean isReversal, + final List clientChargePaymentDTOs) { /*** * Map to track each account affected and the net credit to be made for a particular account ***/ @@ -1307,8 +1302,8 @@ public BigDecimal createCreditJournalEntryOrReversalForClientPayments(final Offi } public void createDebitJournalEntryOrReversalForClientChargePayments(final Office office, final String currencyCode, - final Long clientId, final Long transactionId, final LocalDate transactionDate, final BigDecimal amount, - final Boolean isReversal) { + final Long clientId, final Long transactionId, final LocalDate transactionDate, final BigDecimal amount, + final Boolean isReversal) { final GLAccount account = financialActivityAccountRepository .findByFinancialActivityTypeWithNotFoundDetection(FinancialActivity.ASSET_FUND_SOURCE.getValue()).getGlAccount(); if (isReversal) { @@ -1350,8 +1345,8 @@ public JournalEntry persistJournalEntry(JournalEntry journalEntry) { } private void createJournalEntriesForLoanChargesInternal(final Office office, final String currencyCode, final int accountMappingTypeId, - final Long loanProductId, final Long loanId, final String transactionId, final LocalDate transactionDate, - final BigDecimal totalAmount, final List chargePaymentDTOs, final boolean isCredit) { + final Long loanProductId, final Long loanId, final String transactionId, final LocalDate transactionDate, + final BigDecimal totalAmount, final List chargePaymentDTOs, final boolean isCredit) { final Map creditDetailsMap = new LinkedHashMap<>(); for (final ChargePaymentDTO chargePaymentDTO : chargePaymentDTOs) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForLoan.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForLoan.java index 8216d59bd1e..ad30f16a21b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForLoan.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForLoan.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.closure.domain.GLClosure; import org.apache.fineract.accounting.common.AccountingConstants.AccrualAccountsForLoan; @@ -160,7 +161,7 @@ else if (transactionType.isInterestPaymentWaiver() || transactionType.isInterest } private void createJournalEntriesForCapitalizedIncome(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office) { + final Office office) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); final Long loanId = loanDTO.getLoanId(); @@ -197,7 +198,7 @@ private void createJournalEntriesForCapitalizedIncome(final LoanDTO loanDTO, fin } private void createJournalEntriesForCapitalizedIncomeAdjustment(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office) { + final Office office) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); final Long loanId = loanDTO.getLoanId(); @@ -273,7 +274,7 @@ private void createJournalEntriesForCapitalizedIncomeAdjustment(final LoanDTO lo } private void createJournalEntriesForCapitalizedIncomeAmortization(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office) { + final Office office) { final boolean isMarkedAsChargeOff = loanDTO.isMarkedAsChargeOff(); if (isMarkedAsChargeOff) { createJournalEntriesForChargeOffLoanCapitalizedIncomeAmortization(loanDTO, loanTransactionDTO, office); @@ -283,7 +284,7 @@ private void createJournalEntriesForCapitalizedIncomeAmortization(final LoanDTO } private void createJournalEntriesForLoanCapitalizedIncomeAmortization(final LoanDTO loanDTO, - final LoanTransactionDTO loanTransactionDTO, final Office office) { + final LoanTransactionDTO loanTransactionDTO, final Office office) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); final Long loanId = loanDTO.getLoanId(); @@ -396,12 +397,12 @@ private void createJournalEntriesForLoanCapitalizedIncomeAmortization(final Loan } private ProductToGLAccountMapping fetchAdvanceAccountingMappingForCodeValue(final Long loanProductId, final Long codeValueId, - final String codeName) { + final String codeName) { return helper.getClassificationMappingByCodeValue(loanProductId, PortfolioProductType.LOAN, codeValueId, codeName); } private void createJournalEntriesForChargeOffLoanCapitalizedIncomeAmortization(final LoanDTO loanDTO, - final LoanTransactionDTO loanTransactionDTO, final Office office) { + final LoanTransactionDTO loanTransactionDTO, final Office office) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); final boolean isMarkedFraud = loanDTO.isMarkedAsFraud(); @@ -468,7 +469,7 @@ private void createJournalEntriesForChargeOffLoanCapitalizedIncomeAmortization(f } private void createJournalEntriesForCapitalizedIncomeAmortizationAdjustment(final LoanDTO loanDTO, - final LoanTransactionDTO loanTransactionDTO, final Office office) { + final LoanTransactionDTO loanTransactionDTO, final Office office) { GLAccountBalanceHolder glAccountBalanceHolder = new GLAccountBalanceHolder(); if (MathUtil.isGreaterThanZero(loanTransactionDTO.getAmount())) { populateCreditDebitMaps(loanDTO.getLoanProductId(), loanTransactionDTO.getAmount(), loanTransactionDTO.getPaymentTypeId(), @@ -495,7 +496,7 @@ private void createJournalEntriesForCapitalizedIncomeAmortizationAdjustment(fina } private void createJournalEntriesForBuyDownFee(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office) { + final Office office) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); final Long loanId = loanDTO.getLoanId(); @@ -517,7 +518,7 @@ private void createJournalEntriesForBuyDownFee(final LoanDTO loanDTO, final Loan } private void createJournalEntriesForBuyDownFeeAdjustment(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office) { + final Office office) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); final Long loanId = loanDTO.getLoanId(); @@ -541,7 +542,7 @@ private void createJournalEntriesForBuyDownFeeAdjustment(final LoanDTO loanDTO, } private void createJournalEntriesForBuyDownFeeAmortization(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office) { + final Office office) { final boolean isMarkedAsChargeOff = loanDTO.isMarkedAsChargeOff(); if (isMarkedAsChargeOff) { createJournalEntriesForChargeOffLoanBuyDownFeeAmortization(loanDTO, loanTransactionDTO, office); @@ -551,7 +552,7 @@ private void createJournalEntriesForBuyDownFeeAmortization(final LoanDTO loanDTO } private void createJournalEntriesForLoanBuyDownFeeAmortization(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office) { + final Office office) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); final Long loanId = loanDTO.getLoanId(); @@ -664,7 +665,7 @@ private void createJournalEntriesForLoanBuyDownFeeAmortization(final LoanDTO loa } private void createJournalEntriesForChargeOffLoanBuyDownFeeAmortization(final LoanDTO loanDTO, - final LoanTransactionDTO loanTransactionDTO, final Office office) { + final LoanTransactionDTO loanTransactionDTO, final Office office) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); final boolean isMarkedFraud = loanDTO.isMarkedAsFraud(); @@ -731,7 +732,7 @@ private void createJournalEntriesForChargeOffLoanBuyDownFeeAmortization(final Lo } private void createJournalEntriesForBuyDownFeeAmortizationAdjustment(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office) { + final Office office) { GLAccountBalanceHolder glAccountBalanceHolder = new GLAccountBalanceHolder(); if (MathUtil.isGreaterThanZero(loanTransactionDTO.getAmount())) { populateCreditDebitMaps(loanDTO.getLoanProductId(), loanTransactionDTO.getAmount(), loanTransactionDTO.getPaymentTypeId(), @@ -758,7 +759,7 @@ private void createJournalEntriesForBuyDownFeeAmortizationAdjustment(final LoanD } private void createJournalEntriesForInterestPaymentWaiverOrInterestRefund(LoanDTO loanDTO, LoanTransactionDTO loanTransactionDTO, - Office office) { + Office office) { final Long loanProductId = loanDTO.getLoanProductId(); final Long loanId = loanDTO.getLoanId(); final String currencyCode = loanDTO.getCurrencyCode(); @@ -928,7 +929,7 @@ private void createJournalEntriesForChargeOff(LoanDTO loanDTO, LoanTransactionDT } private void populateCreditDebitMaps(Long loanProductId, BigDecimal transactionPartAmount, Long paymentTypeId, - Integer creditAccountType, Integer debitAccountType, GLAccountBalanceHolder glAccountBalanceHolder) { + Integer creditAccountType, Integer debitAccountType, GLAccountBalanceHolder glAccountBalanceHolder) { if (MathUtil.isGreaterThanZero(transactionPartAmount)) { // Resolve Credit GLAccount accountCredit = this.helper.getLinkedGLAccountForLoanProduct(loanProductId, creditAccountType, paymentTypeId); @@ -940,7 +941,7 @@ private void populateCreditDebitMaps(Long loanProductId, BigDecimal transactionP } private void populateCreditDebitMaps(Long loanProductId, BigDecimal transactionPartAmount, Long paymentTypeId, GLAccount accountCredit, - Integer debitAccountType, GLAccountBalanceHolder glAccountBalanceHolder) { + Integer debitAccountType, GLAccountBalanceHolder glAccountBalanceHolder) { if (MathUtil.isGreaterThanZero(transactionPartAmount)) { // Resolve Credit glAccountBalanceHolder.addToCredit(accountCredit, transactionPartAmount); @@ -951,7 +952,7 @@ private void populateCreditDebitMaps(Long loanProductId, BigDecimal transactionP } private void populateCreditDebitMaps(final Long loanProductId, final BigDecimal transactionPartAmount, final Long paymentTypeId, - final Integer creditAccountType, final GLAccount accountDebit, final GLAccountBalanceHolder glAccountBalanceHolder) { + final Integer creditAccountType, final GLAccount accountDebit, final GLAccountBalanceHolder glAccountBalanceHolder) { if (MathUtil.isGreaterThanZero(transactionPartAmount)) { // Resolve Credit final GLAccount accountCredit = this.helper.getLinkedGLAccountForLoanProduct(loanProductId, creditAccountType, paymentTypeId); @@ -971,7 +972,7 @@ private void createJournalEntriesForChargeAdjustment(LoanDTO loanDTO, LoanTransa } private void createJournalEntriesForChargeOffLoanChargeAdjustment(LoanDTO loanDTO, LoanTransactionDTO loanTransactionDTO, - Office office) { + Office office) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); final Long loanId = loanDTO.getLoanId(); @@ -1274,7 +1275,7 @@ private Integer getPrincipalAccount(LoanDTO loanDTO) { * @param office */ private void createJournalEntriesForDisbursements(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office) { + final Office office) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); @@ -1334,7 +1335,7 @@ private void createJournalEntriesForDisbursements(final LoanDTO loanDTO, final L * @param office */ private void createJournalEntriesForRepayments(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, final Office office, - final boolean isIncomeFromFee) { + final boolean isIncomeFromFee) { final boolean isMarkedChargeOff = loanDTO.isMarkedAsChargeOff(); if (isMarkedChargeOff) { createJournalEntriesForRepaymentWhenLoanIsChargedOff(loanDTO, loanTransactionDTO, office, isIncomeFromFee); @@ -1353,7 +1354,7 @@ private void createJournalEntriesForWriteOffs(final LoanDTO loanDTO, final LoanT } private void createJournalEntriesForRepaymentWhenLoanIsChargedOff(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office, final boolean isIncomeFromFee) { + final Office office, final boolean isIncomeFromFee) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); final Long loanId = loanDTO.getLoanId(); @@ -1581,7 +1582,7 @@ private void createJournalEntriesForRepaymentWhenLoanIsChargedOff(final LoanDTO } private void createJournalEntriesForWriteOffsWhenLoanIsChargedOff(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office) { + final Office office) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); final Long loanId = loanDTO.getLoanId(); @@ -1660,7 +1661,7 @@ private void createJournalEntriesForWriteOffsWhenLoanIsChargedOff(final LoanDTO } private void createJournalEntriesForLoanRepayments(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office, final boolean isIncomeFromFee) { + final Office office, final boolean isIncomeFromFee) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); final Long loanId = loanDTO.getLoanId(); @@ -1823,7 +1824,7 @@ private void createJournalEntriesForLoanRepayments(final LoanDTO loanDTO, final } private void createJournalEntriesForLoanWriteOffs(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office) { + final Office office) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); final Long loanId = loanDTO.getLoanId(); @@ -1916,9 +1917,9 @@ private void createJournalEntriesForLoanWriteOffs(final LoanDTO loanDTO, final L final AdvancedMappingtDTO writeAdvancedMappingtDTO = loanDTO.getWriteOffReasonAdvancedMappingData(); final ProductToGLAccountMapping mapping = (writeAdvancedMappingtDTO != null && writeAdvancedMappingtDTO.getReferenceValueId() != null) - ? helper.getWriteOffMappingByCodeValue(loanProductId, PortfolioProductType.LOAN, - writeAdvancedMappingtDTO.getReferenceValueId()) - : null; + ? helper.getWriteOffMappingByCodeValue(loanProductId, PortfolioProductType.LOAN, + writeAdvancedMappingtDTO.getReferenceValueId()) + : null; if (mapping == null) { this.helper.createDebitJournalEntryForLoan(office, currencyCode, AccrualAccountsForLoan.LOSSES_WRITTEN_OFF.getValue(), @@ -1931,7 +1932,7 @@ private void createJournalEntriesForLoanWriteOffs(final LoanDTO loanDTO, final L } private void populateDebitAccountEntry(Long loanProductId, BigDecimal transactionPartAmount, Integer debitAccountType, - Map accountMapForDebit, Long paymentTypeId) { + Map accountMapForDebit, Long paymentTypeId) { Integer accountDebit = returnExistingDebitAccountInMapMatchingGLAccount(loanProductId, paymentTypeId, debitAccountType, accountMapForDebit); if (accountMapForDebit.containsKey(accountDebit)) { @@ -1943,10 +1944,10 @@ private void populateDebitAccountEntry(Long loanProductId, BigDecimal transactio } private Integer returnExistingDebitAccountInMapMatchingGLAccount(Long loanProductId, Long paymentTypeId, Integer accountType, - Map accountMap) { + Map accountMap) { GLAccount glAccount = this.helper.getLinkedGLAccountForLoanProduct(loanProductId, accountType, paymentTypeId); Integer accountEntry = accountMap.entrySet().stream().filter(account -> this.helper - .getLinkedGLAccountForLoanProduct(loanProductId, account.getKey(), paymentTypeId).getGlCode().equals(glAccount.getGlCode())) + .getLinkedGLAccountForLoanProduct(loanProductId, account.getKey(), paymentTypeId).getGlCode().equals(glAccount.getGlCode())) .map(Map.Entry::getKey).findFirst().orElse(accountType); return accountEntry; } @@ -1955,7 +1956,7 @@ private Integer returnExistingDebitAccountInMapMatchingGLAccount(Long loanProduc * Create a single Debit to fund source and a single credit to "Income from Recovery" */ private void createJournalEntriesForRecoveryRepayments(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office) { + final Office office) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); final Long loanId = loanDTO.getLoanId(); @@ -2065,13 +2066,13 @@ private void createJournalEntriesForRefund(final LoanDTO loanDTO, final LoanTran } private void createJournalEntriesForCreditBalanceRefund(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office) { + final Office office) { final boolean isMarkedChargeOff = loanDTO.isMarkedAsChargeOff(); createJournalEntriesForLoanCreditBalanceRefund(loanDTO, loanTransactionDTO, office, isMarkedChargeOff); } private void createJournalEntriesForLoanCreditBalanceRefund(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office, boolean isMarkedChargeOff) { + final Office office, boolean isMarkedChargeOff) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); final Long loanId = loanDTO.getLoanId(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForSavings.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForSavings.java index e0b737073ad..1ad3df8e210 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForSavings.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/AccrualBasedAccountingProcessorForSavings.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.closure.domain.GLClosure; import org.apache.fineract.accounting.common.AccountingConstants.AccrualAccountsForSavings; @@ -82,9 +83,7 @@ public void createJournalEntriesForSavings(final SavingsDTO savingsDTO) { transactionId, transactionDate, amount.subtract(overdraftAmount), isReversal); } } - } - - else if (savingsTransactionDTO.getTransactionType().isDeposit() && savingsTransactionDTO.isOverdraftTransaction()) { + } else if (savingsTransactionDTO.getTransactionType().isDeposit() && savingsTransactionDTO.isOverdraftTransaction()) { boolean isPositive = amount.subtract(overdraftAmount).compareTo(BigDecimal.ZERO) > 0; if (savingsTransactionDTO.isAccountTransfer()) { this.helper.createCashBasedJournalEntriesAndReversalsForSavings(office, currencyCode, @@ -142,9 +141,7 @@ else if (savingsTransactionDTO.getTransactionType().isWithdrawal()) { AccrualAccountsForSavings.SAVINGS_CONTROL.getValue(), AccrualAccountsForSavings.SAVINGS_REFERENCE.getValue(), savingsProductId, paymentTypeId, savingsId, transactionId, transactionDate, amount, isReversal); } - } - - else if (savingsTransactionDTO.getTransactionType().isEscheat()) { + } else if (savingsTransactionDTO.getTransactionType().isEscheat()) { this.helper.createCashBasedJournalEntriesAndReversalsForSavings(office, currencyCode, AccrualAccountsForSavings.SAVINGS_CONTROL.getValue(), AccrualAccountsForSavings.ESCHEAT_LIABILITY.getValue(), savingsProductId, paymentTypeId, savingsId, transactionId, transactionDate, amount, isReversal); @@ -168,9 +165,7 @@ else if (savingsTransactionDTO.getTransactionType().isInterestPosting() && savin transactionId, transactionDate, amount.subtract(overdraftAmount), isReversal); } } - } - - else if (savingsTransactionDTO.getTransactionType().isInterestPosting()) { + } else if (savingsTransactionDTO.getTransactionType().isInterestPosting()) { // Post journal entry if earned interest amount is greater than // zero if (savingsTransactionDTO.getAmount().compareTo(BigDecimal.ZERO) > 0) { @@ -178,9 +173,7 @@ else if (savingsTransactionDTO.getTransactionType().isInterestPosting()) { AccrualAccountsForSavings.INTEREST_PAYABLE.getValue(), AccrualAccountsForSavings.SAVINGS_CONTROL.getValue(), savingsProductId, paymentTypeId, savingsId, transactionId, transactionDate, amount, isReversal); } - } - - else if (savingsTransactionDTO.getTransactionType().isAccrual()) { + } else if (savingsTransactionDTO.getTransactionType().isAccrual()) { // Post journal entry for Accrual Recognition if (savingsTransactionDTO.getAmount().compareTo(BigDecimal.ZERO) > 0) { if (MathUtil.isGreaterThanZero(overdraftAmount)) { @@ -199,9 +192,7 @@ else if (savingsTransactionDTO.getTransactionType().isAccrual()) { transactionId, transactionDate, amount, isReversal); } } - } - - else if (savingsTransactionDTO.getTransactionType().isWithholdTax()) { + } else if (savingsTransactionDTO.getTransactionType().isWithholdTax()) { this.helper.createAccrualBasedJournalEntriesAndReversalsForSavingsTax(office, currencyCode, AccrualAccountsForSavings.SAVINGS_CONTROL, AccrualAccountsForSavings.SAVINGS_REFERENCE, savingsProductId, paymentTypeId, savingsId, transactionId, transactionDate, amount, isReversal, @@ -235,9 +226,7 @@ else if (savingsTransactionDTO.getTransactionType().isFeeDeduction() && savingsT feePayments); } } - } - - else if (savingsTransactionDTO.getTransactionType().isFeeDeduction()) { + } else if (savingsTransactionDTO.getTransactionType().isFeeDeduction()) { // Is the Charge a penalty? if (penaltyPayments.size() > 0) { this.helper.createAccrualBasedJournalEntriesAndReversalsForSavingsCharges(office, currencyCode, diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForClientTransactions.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForClientTransactions.java index 0fd47aa4916..6e5f7c3a928 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForClientTransactions.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForClientTransactions.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.closure.domain.GLClosure; import org.apache.fineract.accounting.journalentry.data.ClientTransactionDTO; diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForLoan.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForLoan.java index 6081ab9e039..342559bd465 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForLoan.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForLoan.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.closure.domain.GLClosure; import org.apache.fineract.accounting.common.AccountingConstants.CashAccountsForLoan; @@ -190,7 +191,7 @@ private void createJournalEntriesForChargeOff(LoanDTO loanDTO, LoanTransactionDT } private void populateCreditDebitMaps(Long loanProductId, BigDecimal transactionPartAmount, Long paymentTypeId, - Integer creditAccountType, Integer debitAccountType, GLAccountBalanceHolder glAccountBalanceHolder) { + Integer creditAccountType, Integer debitAccountType, GLAccountBalanceHolder glAccountBalanceHolder) { // Resolve Credit GLAccount accountCredit = this.helper.getLinkedGLAccountForLoanProduct(loanProductId, creditAccountType, paymentTypeId); glAccountBalanceHolder.addToCredit(accountCredit, transactionPartAmount); @@ -200,10 +201,10 @@ private void populateCreditDebitMaps(Long loanProductId, BigDecimal transactionP } private Integer returnExistingDebitAccountInMapMatchingGLAccount(Long loanProductId, Long paymentTypeId, Integer accountType, - Map accountMap) { + Map accountMap) { GLAccount glAccount = this.helper.getLinkedGLAccountForLoanProduct(loanProductId, accountType, paymentTypeId); Integer accountEntry = accountMap.entrySet().stream().filter(account -> this.helper - .getLinkedGLAccountForLoanProduct(loanProductId, account.getKey(), paymentTypeId).getGlCode().equals(glAccount.getGlCode())) + .getLinkedGLAccountForLoanProduct(loanProductId, account.getKey(), paymentTypeId).getGlCode().equals(glAccount.getGlCode())) .map(Map.Entry::getKey).findFirst().orElse(accountType); return accountEntry; } @@ -219,7 +220,7 @@ private void createJournalEntriesForChargeAdjustment(LoanDTO loanDTO, LoanTransa } private void createJournalEntriesForChargeOffLoanChargeAdjustment(LoanDTO loanDTO, LoanTransactionDTO loanTransactionDTO, - Office office) { + Office office) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); final Long loanId = loanDTO.getLoanId(); @@ -446,7 +447,7 @@ private void createJournalEntriesForChargeback(LoanDTO loanDTO, LoanTransactionD * @param office */ private void createJournalEntriesForDisbursements(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office) { + final Office office) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); final Long loanId = loanDTO.getLoanId(); @@ -517,7 +518,7 @@ private void createJournalEntriesForRefund(final LoanDTO loanDTO, final LoanTran * penalty payment) */ private void createJournalEntriesForRepayments(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office) { + final Office office) { final boolean isMarkedChargeOff = loanDTO.isMarkedAsChargeOff(); if (isMarkedChargeOff) { @@ -833,7 +834,7 @@ private void createJournalEntriesForLoanRepayments(LoanDTO loanDTO, LoanTransact } private void populateDebitAccountEntry(Long loanProductId, BigDecimal transactionPartAmount, Integer debitAccountType, - Map accountMapForDebit, Long paymentTypeId) { + Map accountMapForDebit, Long paymentTypeId) { Integer accountDebit = returnExistingDebitAccountInMapMatchingGLAccount(loanProductId, paymentTypeId, debitAccountType, accountMapForDebit); if (accountMapForDebit.containsKey(accountDebit)) { @@ -848,7 +849,7 @@ private void populateDebitAccountEntry(Long loanProductId, BigDecimal transactio * Create a single Debit to fund source and a single credit to "Income from Recovery" */ private void createJournalEntriesForRecoveryRepayments(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office) { + final Office office) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); final Long loanId = loanDTO.getLoanId(); @@ -901,7 +902,7 @@ private void createJournalEntriesForTransfers(final LoanDTO loanDTO, final LoanT } private void createJournalEntriesForCreditBalanceRefund(final LoanDTO loanDTO, final LoanTransactionDTO loanTransactionDTO, - final Office office) { + final Office office) { // loan properties final Long loanProductId = loanDTO.getLoanProductId(); final Long loanId = loanDTO.getLoanId(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForSavings.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForSavings.java index 6b5f7f52e40..e3ad72b249d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForSavings.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForSavings.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.closure.domain.GLClosure; import org.apache.fineract.accounting.common.AccountingConstants.CashAccountsForSavings; @@ -136,9 +137,7 @@ else if (savingsTransactionDTO.getTransactionType().isWithdrawal()) { CashAccountsForSavings.SAVINGS_CONTROL.getValue(), CashAccountsForSavings.SAVINGS_REFERENCE.getValue(), savingsProductId, paymentTypeId, savingsId, transactionId, transactionDate, amount, isReversal); } - } - - else if (savingsTransactionDTO.getTransactionType().isEscheat()) { + } else if (savingsTransactionDTO.getTransactionType().isEscheat()) { this.helper.createCashBasedJournalEntriesAndReversalsForSavings(office, currencyCode, CashAccountsForSavings.SAVINGS_CONTROL.getValue(), CashAccountsForSavings.ESCHEAT_LIABILITY.getValue(), savingsProductId, paymentTypeId, savingsId, transactionId, transactionDate, amount, isReversal); @@ -162,9 +161,7 @@ else if (savingsTransactionDTO.getTransactionType().isInterestPosting() && savin amount.subtract(overdraftAmount), isReversal); } } - } - - else if (savingsTransactionDTO.getTransactionType().isInterestPosting()) { + } else if (savingsTransactionDTO.getTransactionType().isInterestPosting()) { // Post journal entry if earned interest amount is greater than // zero if (savingsTransactionDTO.getAmount().compareTo(BigDecimal.ZERO) > 0) { @@ -172,9 +169,7 @@ else if (savingsTransactionDTO.getTransactionType().isInterestPosting()) { CashAccountsForSavings.INTEREST_ON_SAVINGS.getValue(), CashAccountsForSavings.SAVINGS_CONTROL.getValue(), savingsProductId, paymentTypeId, savingsId, transactionId, transactionDate, amount, isReversal); } - } - - else if (savingsTransactionDTO.getTransactionType().isWithholdTax()) { + } else if (savingsTransactionDTO.getTransactionType().isWithholdTax()) { this.helper.createCashBasedJournalEntriesAndReversalsForSavingsTax(office, currencyCode, CashAccountsForSavings.SAVINGS_CONTROL, CashAccountsForSavings.SAVINGS_REFERENCE, savingsProductId, paymentTypeId, savingsId, transactionId, transactionDate, amount, isReversal, savingsTransactionDTO.getTaxPayments()); @@ -206,9 +201,7 @@ else if (savingsTransactionDTO.getTransactionType().isFeeDeduction() && savingsT feePayments); } } - } - - else if (savingsTransactionDTO.getTransactionType().isFeeDeduction()) { + } else if (savingsTransactionDTO.getTransactionType().isFeeDeduction()) { // Is the Charge a penalty? if (penaltyPayments.size() > 0) { this.helper.createCashBasedJournalEntriesAndReversalsForSavingsCharges(office, currencyCode, diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForShares.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForShares.java index c521b5e5033..ca00050e4d2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForShares.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/CashBasedAccountingProcessorForShares.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.closure.domain.GLClosure; import org.apache.fineract.accounting.common.AccountingConstants.CashAccountsForShares; @@ -70,8 +71,8 @@ public void createJournalEntriesForShares(SharesDTO sharesDTO) { } public void createJournalEntriesForRedeem(final Long shareAccountId, final Long shareProductId, final String currencyCode, - final LocalDate transactionDate, final String transactionId, final Office office, final Long paymentTypeId, - final BigDecimal amount, final BigDecimal chargeAmount, final List feePayments) { + final LocalDate transactionDate, final String transactionId, final Office office, final Long paymentTypeId, + final BigDecimal amount, final BigDecimal chargeAmount, final List feePayments) { if (chargeAmount == null || chargeAmount.compareTo(BigDecimal.ZERO) <= 0) { this.helper.createJournalEntriesForShares(office, currencyCode, CashAccountsForShares.SHARES_EQUITY.getValue(), CashAccountsForShares.SHARES_REFERENCE.getValue(), shareProductId, paymentTypeId, shareAccountId, transactionId, @@ -87,8 +88,8 @@ public void createJournalEntriesForRedeem(final Long shareAccountId, final Long } public void createJournalEntriesForPurchase(final Long shareAccountId, final Long shareProductId, final String currencyCode, - SharesTransactionDTO transactionDTO, final LocalDate transactionDate, final String transactionId, final Office office, - final Long paymentTypeId, final BigDecimal amount, final BigDecimal chargeAmount, final List feePayments) { + SharesTransactionDTO transactionDTO, final LocalDate transactionDate, final String transactionId, final Office office, + final Long paymentTypeId, final BigDecimal amount, final BigDecimal chargeAmount, final List feePayments) { if (transactionDTO.getTransactionStatus().isApplied()) { if (chargeAmount == null || chargeAmount.compareTo(BigDecimal.ZERO) <= 0) { this.helper.createJournalEntriesForShares(office, currencyCode, CashAccountsForShares.SHARES_REFERENCE.getValue(), diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryReadPlatformServiceImpl.java index 1833fad3920..43e321ae565 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import java.util.Arrays; import java.util.List; import java.util.Objects; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.accounting.common.AccountingEnumerations; @@ -237,9 +238,9 @@ public JournalEntryData mapRow(final ResultSet rs, @SuppressWarnings("unused") f @Override public Page retrieveAll(final SearchParameters searchParameters, final Long glAccountId, - final Boolean onlyManualEntries, final LocalDate fromDate, final LocalDate toDate, final LocalDate submittedOnDateFrom, - final LocalDate submittedOnDateTo, final String transactionId, final Integer entityType, - final JournalEntryAssociationParametersData associationParametersData) { + final Boolean onlyManualEntries, final LocalDate fromDate, final LocalDate toDate, final LocalDate submittedOnDateFrom, + final LocalDate submittedOnDateTo, final String transactionId, final Integer entityType, + final JournalEntryAssociationParametersData associationParametersData) { GLJournalEntryMapper rm = getGlJournalEntryMapper(associationParametersData); final StringBuilder sqlBuilder = new StringBuilder(200); sqlBuilder.append("select ").append(sqlGenerator.calcFoundRows()).append(" "); @@ -388,7 +389,7 @@ protected GLJournalEntryMapper getGlJournalEntryMapper(JournalEntryAssociationPa @Override public JournalEntryData retrieveGLJournalEntryById(final long glJournalEntryId, - JournalEntryAssociationParametersData associationParametersData) { + JournalEntryAssociationParametersData associationParametersData) { try { final GLJournalEntryMapper rm = getGlJournalEntryMapper(associationParametersData); @@ -459,7 +460,7 @@ public OfficeOpeningBalancesData retrieveOfficeOpeningBalances(final Long office } private List populateOpeningBalances(final List existingOpeningBalanceTransactions, - final List allOpeningTransactions) { + final List allOpeningTransactions) { final List allOpeningBalanceTransactions = new ArrayList<>(allOpeningTransactions.size()); for (final JournalEntryData newOpeningBalanceTransaction : allOpeningTransactions) { boolean isNewTransactionAddedToCollection = false; @@ -491,7 +492,7 @@ private List populateAllTransactionsFromGLAccounts(final Long } private List retrieveOfficeBalanceTransactions(final Long officeId, final String transactionId, - final String currencyCode) { + final String currencyCode) { final Long contraId = null; return retrieveContraTransactions(officeId, contraId, transactionId, currencyCode).getPageItems(); } @@ -508,7 +509,7 @@ private String retrieveContraAccountTransactionId(final Long officeId, final Lon } private Page retrieveContraTransactions(final Long officeId, final Long contraId, final String transactionId, - final String currencyCode) { + final String currencyCode) { final Integer entityType = null; final Boolean onlyManualEntries = null; final LocalDate fromDate = null; @@ -532,7 +533,7 @@ public Page retrieveJournalEntriesByEntityId(String transactio final GLJournalEntryMapper rm = getGlJournalEntryMapper(associationParametersData); final String sql = "select " + rm.schema() + " where journalEntry.transaction_id = ? and journalEntry.entity_id = ? and journalEntry.entity_type_enum = ?"; - Object[] data = { transactionId, entityId, entityType }; + Object[] data = {transactionId, entityId, entityType}; return this.paginationHelper.fetchPage(this.jdbcTemplate, sql, data, rm); } catch (final EmptyResultDataAccessException e) { throw new JournalEntriesNotFoundException(entityId, e); diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryRunningBalanceUpdateServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryRunningBalanceUpdateServiceImpl.java index a8d6dc53bac..077e8a1e551 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryRunningBalanceUpdateServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryRunningBalanceUpdateServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.accounting.common.AccountingEnumerations; @@ -117,15 +118,15 @@ private void updateOrganizationRunningBalance(LocalDate entityDate) { for (Map entries : list) { Long accountId = Long.parseLong(entries.get("accountId").toString()); // Drizzle - // is - // returning - // Big - // Integer - // where - // as - // MySQL - // returns - // Long. + // is + // returning + // Big + // Integer + // where + // as + // MySQL + // returns + // Long. if (!runningBalanceMap.containsKey(accountId)) { runningBalanceMap.put(accountId, (BigDecimal) entries.get("runningBalance")); } @@ -174,8 +175,8 @@ private void updateOrganizationRunningBalance(LocalDate entityDate) { BigDecimal officeRunningBalance = calculateRunningBalance(entryData, officeRunningBalanceMap); BigDecimal runningBalance = calculateRunningBalance(entryData, runningBalanceMap); - params.add(new Object[] { Boolean.TRUE, runningBalance, officeRunningBalance, - platformSecurityContext.authenticatedUser().getId(), DateUtils.getAuditOffsetDateTime(), entryData.getId() }); + params.add(new Object[]{Boolean.TRUE, runningBalance, officeRunningBalance, + platformSecurityContext.authenticatedUser().getId(), DateUtils.getAuditOffsetDateTime(), entryData.getId()}); batchIndex++; if (batchIndex == batchUpdateSize || index == entryDataList.size() - 1) { this.jdbcTemplate.batchUpdate(sql, params); @@ -211,8 +212,8 @@ private void updateRunningBalance(Long officeId, LocalDate entityDate) { String sql = "UPDATE acc_gl_journal_entry SET office_running_balance=?, last_modified_by=?, last_modified_on_utc=? WHERE id=?"; for (JournalEntryData entryData : entryDataList) { BigDecimal runningBalance = calculateRunningBalance(entryData, runningBalanceMap); - params.add(new Object[] { runningBalance, platformSecurityContext.authenticatedUser().getId(), - DateUtils.getAuditOffsetDateTime(), entryData.getId() }); + params.add(new Object[]{runningBalance, platformSecurityContext.authenticatedUser().getId(), + DateUtils.getAuditOffsetDateTime(), entryData.getId()}); } this.jdbcTemplate.batchUpdate(sql, params); } @@ -231,14 +232,14 @@ private BigDecimal calculateRunningBalance(JournalEntryData entry, Map * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.Map; + import org.apache.fineract.accounting.provisioning.domain.ProvisioningEntry; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; @@ -77,6 +78,6 @@ public interface JournalEntryWritePlatformService { * the previous owner (can be null for initial transfers) */ void createJournalEntriesForExternalOwnerTransfer(Loan loan, ExternalAssetOwnerTransfer externalAssetOwnerTransfer, - ExternalAssetOwner previousOwner); + ExternalAssetOwner previousOwner); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryWritePlatformServiceJpaRepositoryImpl.java index 4558ba09221..6a5302ea016 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/service/JournalEntryWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -244,7 +245,7 @@ public CommandProcessingResult createJournalEntry(final JsonCommand command) { } private void validateDebitOrCreditArrayForExistingGLAccount(final GLAccount glaccount, - final SingleDebitOrCreditEntryCommand[] creditOrDebits) { + final SingleDebitOrCreditEntryCommand[] creditOrDebits) { /** * If a glaccount is assigned for a rule the credits or debits array should have only one entry and it must be * same as existing account @@ -261,7 +262,7 @@ private void validateDebitOrCreditArrayForExistingGLAccount(final GLAccount glac @SuppressWarnings("null") private void checkDebitOrCreditAccountsAreValid(final AccountingRule accountingRule, final SingleDebitOrCreditEntryCommand[] credits, - final SingleDebitOrCreditEntryCommand[] debits) { + final SingleDebitOrCreditEntryCommand[] debits) { // Validate the debit and credit arrays are appropriate accounts List allowedCreditGLAccounts; List allowedDebitGLAccounts; @@ -300,7 +301,7 @@ private void checkDebitOrCreditAccountsAreValid(final AccountingRule accountingR } private void checkDebitAndCreditAmounts(final SingleDebitOrCreditEntryCommand[] credits, - final SingleDebitOrCreditEntryCommand[] debits) { + final SingleDebitOrCreditEntryCommand[] debits) { // sum of all debits must be = sum of all credits BigDecimal creditsSum = BigDecimal.ZERO; BigDecimal debitsSum = BigDecimal.ZERO; @@ -353,7 +354,7 @@ public CommandProcessingResult revertJournalEntry(final JsonCommand command) { @Override public void createJournalEntryForReversedLoanTransaction(final LocalDate transactionDate, final String loanTransactionId, - final Long officeId) { + final Long officeId) { final GLClosure latestGLClosure = this.helper.getLatestClosureByBranch(officeId); this.helper.checkForBranchClosures(latestGLClosure, transactionDate); final String transactionId = AccountingProcessorHelper.LOAN_TRANSACTION_IDENTIFIER + loanTransactionId; @@ -507,7 +508,7 @@ public String createProvisioningJournalEntries(ProvisioningEntry provisioningEnt } private void createJournalEntry(LocalDate transactionDate, Long entryId, Office office, String currencyCode, - Map liabilityMap, Map expenseMap) { + Map liabilityMap, Map expenseMap) { for (Map.Entry entry : liabilityMap.entrySet()) { this.helper.createProvisioningCreditJournalEntry(transactionDate, entryId, office, currencyCode, entry.getKey(), entry.getValue()); @@ -648,9 +649,9 @@ private void validateBusinessRulesForJournalEntries(final JournalEntryCommand co } private void saveAllDebitOrCreditEntries(final JournalEntryCommand command, final Office office, final PaymentDetail paymentDetail, - final String currencyCode, final LocalDate transactionDate, - final SingleDebitOrCreditEntryCommand[] singleDebitOrCreditEntryCommands, final String transactionId, - final JournalEntryType type, final String referenceNumber, final ExternalAssetOwner externalAssetOwner) { + final String currencyCode, final LocalDate transactionDate, + final SingleDebitOrCreditEntryCommand[] singleDebitOrCreditEntryCommands, final String transactionId, + final JournalEntryType type, final String referenceNumber, final ExternalAssetOwner externalAssetOwner) { final boolean manualEntry = true; /** Validate current code is appropriate **/ @@ -688,7 +689,7 @@ private String generateTransactionId(final Long officeId) { } private PlatformDataIntegrityException handleJournalEntryDataIntegrityIssues(final Throwable realCause, - final NonTransientDataAccessException dve) { + final NonTransientDataAccessException dve) { log.error("Error occurred.", dve); throw ErrorHandler.getMappable(dve, "error.msg.glJournalEntry.unknown.data.integrity.issue", "Unknown data integrity issue with resource Journal Entry: " + realCause.getMessage()); @@ -753,9 +754,9 @@ public CommandProcessingResult defineOpeningBalance(final JsonCommand command) { } private void saveAllDebitOrCreditOpeningBalanceEntries(final JournalEntryCommand command, final Office office, - final String currencyCode, final LocalDate transactionDate, - final SingleDebitOrCreditEntryCommand[] singleDebitOrCreditEntryCommands, final String transactionId, - final JournalEntryType type, final Long contraAccountId) { + final String currencyCode, final LocalDate transactionDate, + final SingleDebitOrCreditEntryCommand[] singleDebitOrCreditEntryCommands, final String transactionId, + final JournalEntryType type, final Long contraAccountId) { final boolean manualEntry = true; final GLAccount contraAccount = this.glAccountRepository.findById(contraAccountId) @@ -820,7 +821,7 @@ public void createJournalEntriesForClientTransactions(Map accoun @Transactional @Override public void createJournalEntriesForLoanTransaction(final LoanTransaction loanTransaction, final boolean isAccountTransfer, - final boolean isLoanToLoanTransfer) { + final boolean isLoanToLoanTransfer) { final Loan loan = loanTransaction.getLoan(); // Check if accounting is enabled for this loan @@ -842,7 +843,7 @@ public void createJournalEntriesForLoanTransaction(final LoanTransaction loanTra @Transactional @Override public void createJournalEntriesForExternalOwnerTransfer(final Loan loan, final ExternalAssetOwnerTransfer externalAssetOwnerTransfer, - final ExternalAssetOwner previousOwner) { + final ExternalAssetOwner previousOwner) { final boolean isBuyback = externalAssetOwnerTransfer.getStatus().name().contains("BUYBACK"); if (isBuyback) { @@ -857,7 +858,7 @@ public void createJournalEntriesForExternalOwnerTransfer(final Loan loan, final * expected by existing journal entry logic */ private AccountingBridgeDataDTO createAccountingBridgeDataForSingleTransaction(final LoanTransaction loanTransaction, - final boolean isAccountTransfer) { + final boolean isAccountTransfer) { final Loan loan = loanTransaction.getLoan(); final String currencyCode = loan.getCurrencyCode(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/starter/AccountingJournalEntryConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/starter/AccountingJournalEntryConfiguration.java index 57c1a1f2a0f..76337b5f199 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/starter/AccountingJournalEntryConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/journalentry/starter/AccountingJournalEntryConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -63,11 +63,11 @@ public class AccountingJournalEntryConfiguration { @Bean @ConditionalOnMissingBean(AccountingProcessorHelper.class) public AccountingProcessorHelper accountingProcessorHelper(JournalEntryRepository glJournalEntryRepository, - ProductToGLAccountMappingRepository accountMappingRepository, - FinancialActivityAccountRepositoryWrapper financialActivityAccountRepository, GLClosureRepository closureRepository, - GLAccountRepository glAccountRepository, OfficeRepository officeRepository, - AccountTransfersReadPlatformService accountTransfersReadPlatformService, ChargeRepositoryWrapper chargeRepositoryWrapper, - BusinessEventNotifierService businessEventNotifierService) { + ProductToGLAccountMappingRepository accountMappingRepository, + FinancialActivityAccountRepositoryWrapper financialActivityAccountRepository, GLClosureRepository closureRepository, + GLAccountRepository glAccountRepository, OfficeRepository officeRepository, + AccountTransfersReadPlatformService accountTransfersReadPlatformService, ChargeRepositoryWrapper chargeRepositoryWrapper, + BusinessEventNotifierService businessEventNotifierService) { return new AccountingProcessorHelper(glJournalEntryRepository, accountMappingRepository, financialActivityAccountRepository, closureRepository, glAccountRepository, officeRepository, accountTransfersReadPlatformService, chargeRepositoryWrapper, businessEventNotifierService); @@ -76,9 +76,9 @@ public AccountingProcessorHelper accountingProcessorHelper(JournalEntryRepositor @Bean @ConditionalOnMissingBean(JournalEntryReadPlatformService.class) public JournalEntryReadPlatformService journalEntryReadPlatformService(JdbcTemplate jdbcTemplate, - GLAccountReadPlatformService glAccountReadPlatformService, OfficeReadPlatformService officeReadPlatformService, - ColumnValidator columnValidator, FinancialActivityAccountRepositoryWrapper financialActivityAccountRepositoryWrapper, - PaginationHelper paginationHelper, DatabaseSpecificSQLGenerator sqlGenerator) { + GLAccountReadPlatformService glAccountReadPlatformService, OfficeReadPlatformService officeReadPlatformService, + ColumnValidator columnValidator, FinancialActivityAccountRepositoryWrapper financialActivityAccountRepositoryWrapper, + PaginationHelper paginationHelper, DatabaseSpecificSQLGenerator sqlGenerator) { return new JournalEntryReadPlatformServiceImpl(jdbcTemplate, glAccountReadPlatformService, officeReadPlatformService, columnValidator, financialActivityAccountRepositoryWrapper, paginationHelper, sqlGenerator); } @@ -86,19 +86,19 @@ public JournalEntryReadPlatformService journalEntryReadPlatformService(JdbcTempl @Bean @ConditionalOnMissingBean(JournalEntryWritePlatformService.class) public JournalEntryWritePlatformService journalEntryWritePlatformService(GLClosureRepository glClosureRepository, - GLAccountRepository glAccountRepository, JournalEntryRepository glJournalEntryRepository, - OfficeRepositoryWrapper officeRepositoryWrapper, AccountingProcessorForLoanFactory accountingProcessorForLoanFactory, - AccountingProcessorForSavingsFactory accountingProcessorForSavingsFactory, - AccountingProcessorForSharesFactory accountingProcessorForSharesFactory, AccountingProcessorHelper helper, - JournalEntryCommandFromApiJsonDeserializer fromApiJsonDeserializer, AccountingRuleRepository accountingRuleRepository, - GLAccountReadPlatformService glAccountReadPlatformService, OrganisationCurrencyRepositoryWrapper organisationCurrencyRepository, - PlatformSecurityContext context, PaymentDetailWritePlatformService paymentDetailWritePlatformService, - FinancialActivityAccountRepositoryWrapper financialActivityAccountRepositoryWrapper, - CashBasedAccountingProcessorForClientTransactions accountingProcessorForClientTransactions, - ConfigurationReadPlatformService configurationReadPlatformService, AccountingService accountingService, - ExternalAssetOwnerRepository externalAssetOwnerRepository, - LoanAmortizationAllocationMappingRepository loanAmortizationAllocationMappingRepository, - LoanTransactionRepository loanTransactionRepository) { + GLAccountRepository glAccountRepository, JournalEntryRepository glJournalEntryRepository, + OfficeRepositoryWrapper officeRepositoryWrapper, AccountingProcessorForLoanFactory accountingProcessorForLoanFactory, + AccountingProcessorForSavingsFactory accountingProcessorForSavingsFactory, + AccountingProcessorForSharesFactory accountingProcessorForSharesFactory, AccountingProcessorHelper helper, + JournalEntryCommandFromApiJsonDeserializer fromApiJsonDeserializer, AccountingRuleRepository accountingRuleRepository, + GLAccountReadPlatformService glAccountReadPlatformService, OrganisationCurrencyRepositoryWrapper organisationCurrencyRepository, + PlatformSecurityContext context, PaymentDetailWritePlatformService paymentDetailWritePlatformService, + FinancialActivityAccountRepositoryWrapper financialActivityAccountRepositoryWrapper, + CashBasedAccountingProcessorForClientTransactions accountingProcessorForClientTransactions, + ConfigurationReadPlatformService configurationReadPlatformService, AccountingService accountingService, + ExternalAssetOwnerRepository externalAssetOwnerRepository, + LoanAmortizationAllocationMappingRepository loanAmortizationAllocationMappingRepository, + LoanTransactionRepository loanTransactionRepository) { return new JournalEntryWritePlatformServiceJpaRepositoryImpl(glClosureRepository, glAccountRepository, glJournalEntryRepository, officeRepositoryWrapper, accountingProcessorForLoanFactory, accountingProcessorForSavingsFactory, accountingProcessorForSharesFactory, helper, fromApiJsonDeserializer, accountingRuleRepository, diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/productaccountmapping/service/ProductToGLAccountMappingWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/productaccountmapping/service/ProductToGLAccountMappingWritePlatformServiceImpl.java index 5e29e5ca165..692f9b56220 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/productaccountmapping/service/ProductToGLAccountMappingWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/productaccountmapping/service/ProductToGLAccountMappingWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,9 +22,11 @@ import static org.apache.fineract.portfolio.savings.SavingsApiConstants.isDormancyTrackingActiveParamName; import com.google.gson.JsonElement; + import java.util.HashMap; import java.util.Locale; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.common.AccountingConstants.AccrualAccountsForLoan; import org.apache.fineract.accounting.common.AccountingConstants.AccrualAccountsForSavings; @@ -73,7 +75,7 @@ public void createLoanProductToGLAccountMapping(final Long loanProductId, final switch (accountingRuleType) { case NONE: - break; + break; case CASH_BASED: // asset or liability this.loanProductToGLAccountMappingHelper.saveLoanToAssetOrLiabilityAccountMapping(element, @@ -145,7 +147,7 @@ public void createLoanProductToGLAccountMapping(final Long loanProductId, final loanProductId, null); this.loanProductToGLAccountMappingHelper.saveCapitalizedIncomeClassificationToIncomeAccountMappings(command, element, loanProductId, null); - break; + break; case ACCRUAL_UPFRONT: // Fall Through case ACCRUAL_PERIODIC: @@ -243,12 +245,12 @@ public void createLoanProductToGLAccountMapping(final Long loanProductId, final loanProductId, null); this.loanProductToGLAccountMappingHelper.saveCapitalizedIncomeClassificationToIncomeAccountMappings(command, element, loanProductId, null); - break; + break; } } private void saveSavingsBaseAccountMapping(final Long savingProductId, final DepositAccountType accountType, final JsonCommand command, - final JsonElement element) { + final JsonElement element) { // asset this.savingsProductToGLAccountMappingHelper.saveSavingsToAssetAccountMapping(element, SavingProductAccountingParams.SAVINGS_REFERENCE.getValue(), savingProductId, @@ -309,7 +311,7 @@ private void saveSavingsBaseAccountMapping(final Long savingProductId, final Dep @Override @Transactional public void createSavingProductToGLAccountMapping(final Long savingProductId, final JsonCommand command, - DepositAccountType accountType) { + DepositAccountType accountType) { final JsonElement element = this.fromApiJsonHelper.parse(command.json()); final Integer accountingRuleTypeId = this.fromApiJsonHelper.extractIntegerNamed(accountingRuleParamName, element, Locale.getDefault()); @@ -317,10 +319,10 @@ public void createSavingProductToGLAccountMapping(final Long savingProductId, fi final AccountingRuleType accountingRuleType = AccountingRuleType.fromInt(accountingRuleTypeId); switch (accountingRuleType) { case NONE: - break; + break; case CASH_BASED: saveSavingsBaseAccountMapping(savingProductId, accountType, command, element); - break; + break; case ACCRUAL_PERIODIC: saveSavingsBaseAccountMapping(savingProductId, accountType, command, element); @@ -341,9 +343,9 @@ public void createSavingProductToGLAccountMapping(final Long savingProductId, fi this.savingsProductToGLAccountMappingHelper.saveSavingsToLiabilityAccountMapping(element, SavingProductAccountingParams.INTEREST_PAYABLE.getValue(), savingProductId, AccrualAccountsForSavings.INTEREST_PAYABLE.getValue()); - break; + break; default: - break; + break; } } @@ -360,7 +362,7 @@ public void createShareProductToGLAccountMapping(final Long shareProductId, fina switch (accountingRuleType) { case NONE: - break; + break; case CASH_BASED: // asset this.shareProductToGLAccountMappingHelper.saveSharesToAssetAccountMapping(element, @@ -385,9 +387,9 @@ public void createShareProductToGLAccountMapping(final Long shareProductId, fina // advanced accounting mappings this.savingsProductToGLAccountMappingHelper.savePaymentChannelToFundSourceMappings(command, element, shareProductId, null); this.savingsProductToGLAccountMappingHelper.saveChargesToIncomeAccountMappings(command, element, shareProductId, null); - break; + break; default: - break; + break; } } @@ -395,8 +397,8 @@ public void createShareProductToGLAccountMapping(final Long shareProductId, fina @Override @Transactional public Map updateLoanProductToGLAccountMapping(final Long loanProductId, final JsonCommand command, - final boolean accountingRuleChanged, final AccountingRuleType accountingRuleType, final boolean enableIncomeCapitalization, - final boolean enableBuyDownFee, final boolean merchantBuyDownFee) { + final boolean accountingRuleChanged, final AccountingRuleType accountingRuleType, final boolean enableIncomeCapitalization, + final boolean enableBuyDownFee, final boolean merchantBuyDownFee) { /*** * Variable tracks all accounting mapping properties that have been updated ***/ @@ -434,7 +436,7 @@ public Map updateLoanProductToGLAccountMapping(final Long loanPr @Override @Transactional public Map updateSavingsProductToGLAccountMapping(final Long savingsProductId, final JsonCommand command, - final boolean accountingRuleChanged, final int accountingRuleTypeId, final DepositAccountType accountType) { + final boolean accountingRuleChanged, final int accountingRuleTypeId, final DepositAccountType accountType) { /*** * Variable tracks all accounting mapping properties that have been updated ***/ @@ -466,7 +468,7 @@ public Map updateSavingsProductToGLAccountMapping(final Long sav @Override @Transactional public Map updateShareProductToGLAccountMapping(final Long shareProductId, final JsonCommand command, - final boolean accountingRuleChanged, final int accountingRuleTypeId) { + final boolean accountingRuleChanged, final int accountingRuleTypeId) { /*** * Variable tracks all accounting mapping properties that have been updated ***/ diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/domain/LoanProductProvisioningEntry.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/domain/LoanProductProvisioningEntry.java index 2315b13ee52..77220dc01cd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/domain/LoanProductProvisioningEntry.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/domain/LoanProductProvisioningEntry.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.util.Objects; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/domain/ProvisioningEntry.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/domain/ProvisioningEntry.java index 10084c941d2..660923a864c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/domain/ProvisioningEntry.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/domain/ProvisioningEntry.java @@ -6,9 +6,9 @@ * 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 @@ -26,10 +26,12 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.OneToOne; import jakarta.persistence.Table; + import java.time.LocalDate; import java.util.Collection; import java.util.HashSet; import java.util.Set; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/domain/ProvisioningEntryRepository.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/domain/ProvisioningEntryRepository.java index 760b93f586c..aa12f4df351 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/domain/ProvisioningEntryRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/domain/ProvisioningEntryRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.provisioning.domain; import java.time.LocalDate; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/handler/CreateProvisioningEntriesRequestCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/handler/CreateProvisioningEntriesRequestCommandHandler.java index 75d521dc9fd..aede7445ded 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/handler/CreateProvisioningEntriesRequestCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/handler/CreateProvisioningEntriesRequestCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/handler/CreateProvisioningJournalEntriesRequestCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/handler/CreateProvisioningJournalEntriesRequestCommandHandler.java index 96c5922ec08..b8a311e8942 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/handler/CreateProvisioningJournalEntriesRequestCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/handler/CreateProvisioningJournalEntriesRequestCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/handler/ReCreateProvisioningEntryRequestCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/handler/ReCreateProvisioningEntryRequestCommandHandler.java index d1c25137030..21b23200fd3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/handler/ReCreateProvisioningEntryRequestCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/handler/ReCreateProvisioningEntryRequestCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesWritePlatformService.java index 5bbede309ab..6823092c76a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/service/ProvisioningEntriesWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.accounting.provisioning.service; import java.time.LocalDate; + import org.apache.fineract.accounting.provisioning.domain.ProvisioningEntry; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; diff --git a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/starter/AccountingProvisioningConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/starter/AccountingProvisioningConfiguration.java index 513c4dee578..9a7a5f21c66 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/starter/AccountingProvisioningConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/accounting/provisioning/starter/AccountingProvisioningConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -45,8 +45,8 @@ public class AccountingProvisioningConfiguration { @Bean @ConditionalOnMissingBean(ProvisioningEntriesReadPlatformService.class) public ProvisioningEntriesReadPlatformService provisioningEntriesReadPlatformService(JdbcTemplate jdbcTemplate, - PaginationHelper loanProductProvisioningEntryDataPaginationHelper, PaginationHelper provisioningEntryDataPaginationHelper, - DatabaseSpecificSQLGenerator sqlGenerator) { + PaginationHelper loanProductProvisioningEntryDataPaginationHelper, PaginationHelper provisioningEntryDataPaginationHelper, + DatabaseSpecificSQLGenerator sqlGenerator) { return new ProvisioningEntriesReadPlatformServiceImpl(jdbcTemplate, loanProductProvisioningEntryDataPaginationHelper, provisioningEntryDataPaginationHelper, sqlGenerator); } @@ -63,7 +63,8 @@ public ProvisioningEntriesWritePlatformService provisioningEntriesWritePlatformS return new ProvisioningEntriesWritePlatformServiceJpaRepositoryImpl(provisioningEntriesReadPlatformService, provisioningCriteriaReadPlatformService, loanProductRepository, glAccountRepository, officeRepository, provisioningCategoryRepository, platformSecurityContext, provisioningEntryRepository, journalEntryWritePlatformService, - fromApiJsonDeserializer, fromApiJsonHelper) {}; + fromApiJsonDeserializer, fromApiJsonHelper) { + }; } } 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..c1055d690a2 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 @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/data/AdHocData.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/data/AdHocData.java index c8139ed4912..e791056e92c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/data/AdHocData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/data/AdHocData.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.adhocquery.data; import com.fasterxml.jackson.annotation.JsonProperty; + import java.time.ZonedDateTime; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/data/AdHocRequest.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/data/AdHocRequest.java index c19097a2b6f..1a36e6496cf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/data/AdHocRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/data/AdHocRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/domain/AdHoc.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/domain/AdHoc.java index 3ca1ba19b54..73f6ea7d8b0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/domain/AdHoc.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/domain/AdHoc.java @@ -6,9 +6,9 @@ * 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 @@ -21,8 +21,10 @@ import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Table; + import java.util.LinkedHashMap; import java.util.Map; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/domain/AdHocRepository.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/domain/AdHocRepository.java index fc31eb7e3ac..7416058be78 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/domain/AdHocRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/domain/AdHocRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/domain/ReportRunFrequency.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/domain/ReportRunFrequency.java index ba6f0310b33..cc6c64e2f89 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/domain/ReportRunFrequency.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/domain/ReportRunFrequency.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/exception/AdHocNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/exception/AdHocNotFoundException.java index 50de8b40ce1..32e4290ac66 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/exception/AdHocNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/exception/AdHocNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/handler/CreateAdHocCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/handler/CreateAdHocCommandHandler.java index 1d7ec8a4f8c..5b883d58e58 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/handler/CreateAdHocCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/handler/CreateAdHocCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/handler/DeleteAdHocCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/handler/DeleteAdHocCommandHandler.java index 161d4f31ca7..de626d15504 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/handler/DeleteAdHocCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/handler/DeleteAdHocCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/handler/UpdateAdHocCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/handler/UpdateAdHocCommandHandler.java index 841725d06a4..472973d2d01 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/handler/UpdateAdHocCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/handler/UpdateAdHocCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocDataValidator.java index 84a3e83bb16..b49d03796e6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -27,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.adhocquery.domain.ReportRunFrequency; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -65,7 +67,8 @@ public void validateForCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, supportedParameters); final List dataValidationErrors = new ArrayList<>(); @@ -107,7 +110,8 @@ public void validateForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, supportedParameters); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocReadPlatformService.java index 1ff6ca6542d..2d75433ed4a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.adhocquery.service; import java.util.List; + import org.apache.fineract.adhocquery.data.AdHocData; public interface AdHocReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocReadPlatformServiceImpl.java index fa5f8e0a45b..6ff2f1c12ac 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.sql.SQLException; import java.time.ZonedDateTime; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.adhocquery.data.AdHocData; import org.apache.fineract.adhocquery.exception.AdHocNotFoundException; @@ -56,7 +57,7 @@ public List retrieveAllActiveAdHocQuery() { public AdHocData retrieveOne(final Long id) { try { final String sql = "select " + this.adHocRowMapper.schema() + " where r.id=?"; - return this.jdbcTemplate.queryForObject(sql, this.adHocRowMapper, new Object[] { id }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, this.adHocRowMapper, new Object[]{id}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new AdHocNotFoundException(id, e); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocWritePlatformService.java index 0d25666114d..aeb26804fb4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocWritePlatformServiceJpaRepositoryImpl.java index 39b7330ab78..0fbd8e3f5b7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/service/AdHocWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.adhocquery.service; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.adhocquery.api.AdHocJsonInputParams; @@ -79,7 +80,7 @@ public CommandProcessingResult createAdHocQuery(final JsonCommand command) { * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(final JsonCommand command, final Throwable realCause, - final NonTransientDataAccessException dve) { + final NonTransientDataAccessException dve) { if (realCause.getMessage().contains("unq_name")) { final String name = command.stringValueOfParameterNamed("name"); throw new PlatformDataIntegrityException("error.msg.adhocquery.duplicate.name", diff --git a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/starter/AdhocQueryConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/starter/AdhocQueryConfiguration.java index d7bbae6d030..f52c77dca84 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/adhocquery/starter/AdhocQueryConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/adhocquery/starter/AdhocQueryConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -43,7 +43,7 @@ public AdHocReadPlatformServiceImpl.AdHocMapper adHocRowMapper(DatabaseSpecificS @Bean @ConditionalOnMissingBean(AdHocReadPlatformService.class) public AdHocReadPlatformService adHocReadPlatformService(JdbcTemplate jdbcTemplate, DatabaseSpecificSQLGenerator sqlGenerator, - AdHocReadPlatformServiceImpl.AdHocMapper adHocRowMapper) { + AdHocReadPlatformServiceImpl.AdHocMapper adHocRowMapper) { return new AdHocReadPlatformServiceImpl(jdbcTemplate, sqlGenerator, adHocRowMapper) { }; @@ -52,7 +52,7 @@ public AdHocReadPlatformService adHocReadPlatformService(JdbcTemplate jdbcTempla @Bean @ConditionalOnMissingBean(AdHocWritePlatformService.class) public AdHocWritePlatformService adHocWritePlatformService(PlatformSecurityContext context, AdHocRepository adHocRepository, - AdHocDataValidator adHocCommandFromApiJsonDeserializer, SqlValidator sqlValidator) { + AdHocDataValidator adHocCommandFromApiJsonDeserializer, SqlValidator sqlValidator) { return new AdHocWritePlatformServiceJpaRepositoryImpl(context, adHocRepository, adHocCommandFromApiJsonDeserializer, sqlValidator) { }; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ActivateClientCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ActivateClientCommandStrategy.java index 70c8bd08853..81ac5f407e7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ActivateClientCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ActivateClientCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/AdjustChargeByChargeExternalIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/AdjustChargeByChargeExternalIdCommandStrategy.java index 02d81563410..a7b0e499b7b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/AdjustChargeByChargeExternalIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/AdjustChargeByChargeExternalIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,9 +22,11 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/AdjustChargeCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/AdjustChargeCommandStrategy.java index 8d2e42b93a2..aa27ae4f420 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/AdjustChargeCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/AdjustChargeCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,9 +22,11 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/AdjustLoanTransactionByExternalIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/AdjustLoanTransactionByExternalIdCommandStrategy.java index e66d59d2d75..11040ac1ed4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/AdjustLoanTransactionByExternalIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/AdjustLoanTransactionByExternalIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,10 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.command.CommandStrategyUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/AdjustLoanTransactionCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/AdjustLoanTransactionCommandStrategy.java index b2e1447c161..cc67b43ebe4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/AdjustLoanTransactionCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/AdjustLoanTransactionCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,10 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.command.CommandStrategyUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApplyLoanCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApplyLoanCommandStrategy.java index 70f4d696c37..a5dd339a120 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApplyLoanCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApplyLoanCommandStrategy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApplySavingsCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApplySavingsCommandStrategy.java index a8676ec4214..abf9dc0f07b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApplySavingsCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApplySavingsCommandStrategy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApproveLoanCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApproveLoanCommandStrategy.java index 6ffc0fed44f..2b5dcb38967 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApproveLoanCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApproveLoanCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApproveLoanRescheduleCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApproveLoanRescheduleCommandStrategy.java index 9ddcc2f42c5..f98e8d0eaa4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApproveLoanRescheduleCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ApproveLoanRescheduleCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CollectChargesByLoanExternalIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CollectChargesByLoanExternalIdCommandStrategy.java index da2f3dd6622..02d26000a62 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CollectChargesByLoanExternalIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CollectChargesByLoanExternalIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,10 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.command.CommandStrategyUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CollectChargesCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CollectChargesCommandStrategy.java index d7a79c9d816..7f76586b0ce 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CollectChargesCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CollectChargesCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateChargeByLoanExternalIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateChargeByLoanExternalIdCommandStrategy.java index d93eaf910fb..22c01ea7910 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateChargeByLoanExternalIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateChargeByLoanExternalIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,10 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.command.CommandStrategyUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateChargeCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateChargeCommandStrategy.java index 365f3798dd1..d4b2ca7406e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateChargeCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateChargeCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateClientCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateClientCommandStrategy.java index 78f12821025..7ced0a1d019 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateClientCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateClientCommandStrategy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateDatatableEntryCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateDatatableEntryCommandStrategy.java index b37c7d749b0..ff0ee495e12 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateDatatableEntryCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateDatatableEntryCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateLoanInterestPauseByExternalIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateLoanInterestPauseByExternalIdCommandStrategy.java index 7c2e225e71a..c987266c376 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateLoanInterestPauseByExternalIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateLoanInterestPauseByExternalIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateLoanInterestPauseByLoanIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateLoanInterestPauseByLoanIdCommandStrategy.java index b66dffcd5bd..866af2f7204 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateLoanInterestPauseByLoanIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateLoanInterestPauseByLoanIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateLoanRescheduleRequestCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateLoanRescheduleRequestCommandStrategy.java index ab559421141..697041ec3d3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateLoanRescheduleRequestCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateLoanRescheduleRequestCommandStrategy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateSavingsAccountChargeCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateSavingsAccountChargeCommandStrategy.java index fc8b49170d0..3cea0a30d02 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateSavingsAccountChargeCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateSavingsAccountChargeCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateTransactionByLoanExternalIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateTransactionByLoanExternalIdCommandStrategy.java index 9fa511bafd2..55101eeae6c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateTransactionByLoanExternalIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateTransactionByLoanExternalIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,9 +22,11 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateTransactionLoanCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateTransactionLoanCommandStrategy.java index 8a085612dbe..34a58845c17 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateTransactionLoanCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/CreateTransactionLoanCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,9 +22,11 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/DeleteDatatableEntryOneToManyCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/DeleteDatatableEntryOneToManyCommandStrategy.java index 9b0a504b327..78315a45325 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/DeleteDatatableEntryOneToManyCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/DeleteDatatableEntryOneToManyCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/DeleteDatatableEntryOneToOneCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/DeleteDatatableEntryOneToOneCommandStrategy.java index 8a43fd6bf40..ac617ac7e2d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/DeleteDatatableEntryOneToOneCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/DeleteDatatableEntryOneToOneCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/DisburseLoanCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/DisburseLoanCommandStrategy.java index 86e4adc98e4..ed2cc563a89 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/DisburseLoanCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/DisburseLoanCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetChargeByChargeExternalIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetChargeByChargeExternalIdCommandStrategy.java index 8e46d7d36e4..a28d7c7070a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetChargeByChargeExternalIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetChargeByChargeExternalIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,10 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.batch.command.CommandStrategy; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetChargeByIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetChargeByIdCommandStrategy.java index 309fdf3e32a..3512528b5f1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetChargeByIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetChargeByIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,10 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.batch.command.CommandStrategy; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetDatatableEntryByAppTableIdAndDataTableIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetDatatableEntryByAppTableIdAndDataTableIdCommandStrategy.java index 44817d1d341..52d35f48df6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetDatatableEntryByAppTableIdAndDataTableIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetDatatableEntryByAppTableIdAndDataTableIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import static org.apache.fineract.batch.command.CommandStrategyUtils.relativeUrlWithoutVersion; import jakarta.ws.rs.core.UriInfo; + import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.batch.command.CommandStrategy; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetDatatableEntryByAppTableIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetDatatableEntryByAppTableIdCommandStrategy.java index 9fe6cdd6ff4..fbcc89b2e24 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetDatatableEntryByAppTableIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetDatatableEntryByAppTableIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import static org.apache.fineract.batch.command.CommandStrategyUtils.relativeUrlWithoutVersion; import jakarta.ws.rs.core.UriInfo; + import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.batch.command.CommandStrategy; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetDatatableEntryByQueryCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetDatatableEntryByQueryCommandStrategy.java index 4bb42c1e851..158b74400f1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetDatatableEntryByQueryCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetDatatableEntryByQueryCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import static org.apache.fineract.batch.command.CommandStrategyUtils.relativeUrlWithoutVersion; import jakarta.ws.rs.core.UriInfo; + import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanByExternalIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanByExternalIdCommandStrategy.java index a211ab781d5..5190f701c04 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanByExternalIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanByExternalIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,9 +22,11 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanByIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanByIdCommandStrategy.java index a9173d18d4c..ac30ad5e7db 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanByIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanByIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -21,8 +21,10 @@ import static org.apache.fineract.batch.command.CommandStrategyUtils.relativeUrlWithoutVersion; import jakarta.ws.rs.core.UriInfo; + import java.util.HashMap; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.batch.command.CommandStrategy; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanInterestPausesByExternalIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanInterestPausesByExternalIdCommandStrategy.java index fabf42ab51e..347a306ac01 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanInterestPausesByExternalIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanInterestPausesByExternalIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanInterestPausesByLoanIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanInterestPausesByLoanIdCommandStrategy.java index a96ce713145..a4cee557f8d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanInterestPausesByLoanIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanInterestPausesByLoanIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanTransactionByExternalIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanTransactionByExternalIdCommandStrategy.java index 0d643198570..4b91df579ca 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanTransactionByExternalIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanTransactionByExternalIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,9 +22,11 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.batch.command.CommandStrategy; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanTransactionByIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanTransactionByIdCommandStrategy.java index b31a2c040ce..5b8ff1f4ee3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanTransactionByIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetLoanTransactionByIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,9 +22,11 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.batch.command.CommandStrategy; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetReagePreviewByLoanExternalIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetReagePreviewByLoanExternalIdCommandStrategy.java index eddb703f79b..7eec82f8570 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetReagePreviewByLoanExternalIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetReagePreviewByLoanExternalIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,9 +22,11 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.command.CommandStrategyUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetReagePreviewByLoanIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetReagePreviewByLoanIdCommandStrategy.java index 01d1f7b344d..a3c94faf2f7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetReagePreviewByLoanIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetReagePreviewByLoanIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,9 +22,11 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.command.CommandStrategyUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetSavingsAccountByIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetSavingsAccountByIdCommandStrategy.java index c191feef76c..61447d0a677 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetSavingsAccountByIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/GetSavingsAccountByIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -21,8 +21,10 @@ import static org.apache.fineract.batch.command.CommandStrategyUtils.relativeUrlWithoutVersion; import jakarta.ws.rs.core.UriInfo; + import java.util.HashMap; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.batch.command.CommandStrategy; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/LoanStateTransistionsByExternalIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/LoanStateTransistionsByExternalIdCommandStrategy.java index ef2483073a2..f53f44e875c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/LoanStateTransistionsByExternalIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/LoanStateTransistionsByExternalIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,9 +22,11 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.batch.command.CommandStrategy; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ModifyLoanApplicationByExternalIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ModifyLoanApplicationByExternalIdCommandStrategy.java index 246e8b29dd1..e9fafbeffd4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ModifyLoanApplicationByExternalIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ModifyLoanApplicationByExternalIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,10 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.batch.command.CommandStrategy; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ModifyLoanApplicationCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ModifyLoanApplicationCommandStrategy.java index 40e6e09a4a8..1b42f270488 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ModifyLoanApplicationCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/ModifyLoanApplicationCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,10 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.command.CommandStrategyUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/SavingsAccountAdjustTransactionCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/SavingsAccountAdjustTransactionCommandStrategy.java index 3c62f14a127..a95ef65dc76 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/SavingsAccountAdjustTransactionCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/SavingsAccountAdjustTransactionCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,10 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.batch.command.CommandStrategy; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/SavingsAccountTransactionCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/SavingsAccountTransactionCommandStrategy.java index 5040ba10ff6..4436f7a93f6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/SavingsAccountTransactionCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/SavingsAccountTransactionCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,10 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.command.CommandStrategyUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateClientCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateClientCommandStrategy.java index b841820f789..96085336be9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateClientCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateClientCommandStrategy.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateDatatableEntryOneToManyCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateDatatableEntryOneToManyCommandStrategy.java index 63080d1aeba..c0dbc30618c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateDatatableEntryOneToManyCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateDatatableEntryOneToManyCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateDatatableEntryOneToOneCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateDatatableEntryOneToOneCommandStrategy.java index fb07d61a7bc..655f0f397d4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateDatatableEntryOneToOneCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateDatatableEntryOneToOneCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateLoanInterestPauseByExternalIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateLoanInterestPauseByExternalIdCommandStrategy.java index 47daab06806..cfdf2eb162f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateLoanInterestPauseByExternalIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateLoanInterestPauseByExternalIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateLoanInterestPauseByLoanIdCommandStrategy.java b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateLoanInterestPauseByLoanIdCommandStrategy.java index 64f3f085058..d32866dc193 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateLoanInterestPauseByLoanIdCommandStrategy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/batch/command/internal/UpdateLoanInterestPauseByLoanIdCommandStrategy.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import jakarta.ws.rs.core.UriInfo; + import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.batch.command.CommandStrategy; import org.apache.fineract.batch.domain.BatchRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/api/COBCatchUpExecutorHelper.java b/fineract-provider/src/main/java/org/apache/fineract/cob/api/COBCatchUpExecutorHelper.java index 0605c112bec..91a983338d6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/api/COBCatchUpExecutorHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/api/COBCatchUpExecutorHelper.java @@ -6,9 +6,9 @@ * 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 @@ -24,7 +24,8 @@ public final class COBCatchUpExecutorHelper { - private COBCatchUpExecutorHelper() {} + private COBCatchUpExecutorHelper() { + } public static Response executeLoanCOBCatchUp(COBCatchUpService loanCOBCatchUpService) { if (loanCOBCatchUpService.isCatchUpRunning().isCatchUpRunning()) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/api/InternalLoanAccountLockApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/cob/api/InternalLoanAccountLockApiResource.java index c61696e1562..7a4a6d00071 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/api/InternalLoanAccountLockApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/api/InternalLoanAccountLockApiResource.java @@ -6,9 +6,9 @@ * 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 @@ -66,11 +66,11 @@ public void afterPropertiesSet() throws Exception { @POST @Path("{loanId}/place-lock/{lockOwner}") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) @SuppressFBWarnings("SLF4J_SIGN_ONLY_FORMAT") public Response placeLockOnLoanAccount(@Context final UriInfo uriInfo, @PathParam("loanId") Long loanId, - @PathParam("lockOwner") String lockOwner, @RequestBody(required = false) LockRequest request) { + @PathParam("lockOwner") String lockOwner, @RequestBody(required = false) LockRequest request) { log.warn("------------------------------------------------------------"); log.warn(" "); log.warn("Placing lock on loan: {}", loanId); diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/api/LoanCOBCatchUpApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/cob/api/LoanCOBCatchUpApiResourceSwagger.java index d4706e4dc49..44dfa823882 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/api/LoanCOBCatchUpApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/api/LoanCOBCatchUpApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; import java.util.List; @@ -31,7 +32,8 @@ private LoanCOBCatchUpApiResourceSwagger() { @Schema(description = "GetOldestCOBProcessedLoanResponse") public static final class GetOldestCOBProcessedLoanResponse { - private GetOldestCOBProcessedLoanResponse() {} + private GetOldestCOBProcessedLoanResponse() { + } public List loanIds; @Schema(example = "[2022, 9, 18]") @@ -43,7 +45,8 @@ private GetOldestCOBProcessedLoanResponse() {} @Schema(description = "IsCatchUpRunningResponse") public static final class IsCatchUpRunningResponse { - private IsCatchUpRunningResponse() {} + private IsCatchUpRunningResponse() { + } @Schema(example = "true") public boolean isCatchUpRunning; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/api/LockRequest.java b/fineract-provider/src/main/java/org/apache/fineract/cob/api/LockRequest.java index 0b33c0acb64..972194effae 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/api/LockRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/api/LockRequest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/common/InitialisationTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/cob/common/InitialisationTasklet.java index a642756795e..86e10660438 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/common/InitialisationTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/common/InitialisationTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.format.DateTimeFormatter; import java.util.HashMap; import java.util.Objects; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.cob.loan.LoanCOBConstant; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/conditions/LoanCOBEnabledCondition.java b/fineract-provider/src/main/java/org/apache/fineract/cob/conditions/LoanCOBEnabledCondition.java index 205a301d8f4..d797495dc04 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/conditions/LoanCOBEnabledCondition.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/conditions/LoanCOBEnabledCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/data/LoanAccountLockResponseDTO.java b/fineract-provider/src/main/java/org/apache/fineract/cob/data/LoanAccountLockResponseDTO.java index 3d63f6a84f8..ced6864946b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/data/LoanAccountLockResponseDTO.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/data/LoanAccountLockResponseDTO.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/data/LoanAccountStayedLockedData.java b/fineract-provider/src/main/java/org/apache/fineract/cob/data/LoanAccountStayedLockedData.java index c37ac5647d1..43b09bf6776 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/data/LoanAccountStayedLockedData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/data/LoanAccountStayedLockedData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/data/LoanAccountsStayedLockedData.java b/fineract-provider/src/main/java/org/apache/fineract/cob/data/LoanAccountsStayedLockedData.java index 9b171663cdf..781e70b7d2a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/data/LoanAccountsStayedLockedData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/data/LoanAccountsStayedLockedData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.data; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/data/LoanIdsResponseDTO.java b/fineract-provider/src/main/java/org/apache/fineract/cob/data/LoanIdsResponseDTO.java index 76d45c4ebb2..465e16c3a8f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/data/LoanIdsResponseDTO.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/data/LoanIdsResponseDTO.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.data; import java.util.List; + import lombok.Data; @Data diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/data/request/BusinessStepRequest.java b/fineract-provider/src/main/java/org/apache/fineract/cob/data/request/BusinessStepRequest.java index a145028c500..d8e6890fd9a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/data/request/BusinessStepRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/data/request/BusinessStepRequest.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.util.List; + import org.apache.fineract.cob.data.BusinessStep; public record BusinessStepRequest(List businessSteps) implements Serializable { diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/domain/CustomLoanAccountLockRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/cob/domain/CustomLoanAccountLockRepositoryImpl.java index 9453e59e86c..7bbd035a9f6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/domain/CustomLoanAccountLockRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/domain/CustomLoanAccountLockRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -38,16 +38,16 @@ public void updateLoanFromAccountLocks() { String sql = "UPDATE m_loan SET last_closed_business_date = (select " + databaseSpecificSQLGenerator.subDate("lck.lock_placed_on_cob_business_date", "1", "DAY") + """ - from m_loan_account_locks lck - where lck.loan_id = id - and lck.lock_placed_on_cob_business_date is not null - and lck.error is not null - and lck.lock_owner in ('LOAN_COB_CHUNK_PROCESSING','LOAN_INLINE_COB_PROCESSING')) - where last_closed_business_date is null and exists (select lck.loan_id - from m_loan_account_locks lck where lck.loan_id = id - and lck.lock_placed_on_cob_business_date is not null and lck.error is not null - and lck.lock_owner in ('LOAN_COB_CHUNK_PROCESSING','LOAN_INLINE_COB_PROCESSING')) - """; + from m_loan_account_locks lck + where lck.loan_id = id + and lck.lock_placed_on_cob_business_date is not null + and lck.error is not null + and lck.lock_owner in ('LOAN_COB_CHUNK_PROCESSING','LOAN_INLINE_COB_PROCESSING')) + where last_closed_business_date is null and exists (select lck.loan_id + from m_loan_account_locks lck where lck.loan_id = id + and lck.lock_placed_on_cob_business_date is not null and lck.error is not null + and lck.lock_owner in ('LOAN_COB_CHUNK_PROCESSING','LOAN_INLINE_COB_PROCESSING')) + """; entityManager.createNativeQuery(sql).executeUpdate(); entityManager.flush(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/domain/LoanAccountLock.java b/fineract-provider/src/main/java/org/apache/fineract/cob/domain/LoanAccountLock.java index 41faf7ef1ea..390509c7eb5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/domain/LoanAccountLock.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/domain/LoanAccountLock.java @@ -6,9 +6,9 @@ * 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 @@ -20,7 +20,9 @@ import jakarta.persistence.Entity; import jakarta.persistence.Table; + import java.time.LocalDate; + import lombok.NoArgsConstructor; @Entity diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/domain/LoanAccountLockRepository.java b/fineract-provider/src/main/java/org/apache/fineract/cob/domain/LoanAccountLockRepository.java index 3724185c46f..51bf75a1e1a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/domain/LoanAccountLockRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/domain/LoanAccountLockRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Optional; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.stereotype.Repository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/exceptions/LoanAccountWasAlreadyLockedOrProcessed.java b/fineract-provider/src/main/java/org/apache/fineract/cob/exceptions/LoanAccountWasAlreadyLockedOrProcessed.java index 8580567e841..490ad42a6bf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/exceptions/LoanAccountWasAlreadyLockedOrProcessed.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/exceptions/LoanAccountWasAlreadyLockedOrProcessed.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/listener/ChunkProcessingLoanItemListener.java b/fineract-provider/src/main/java/org/apache/fineract/cob/listener/ChunkProcessingLoanItemListener.java index a5cbe3f2ca4..2a87a8dd424 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/listener/ChunkProcessingLoanItemListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/listener/ChunkProcessingLoanItemListener.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/listener/InlineCOBLoanItemListener.java b/fineract-provider/src/main/java/org/apache/fineract/cob/listener/InlineCOBLoanItemListener.java index 7ad279804f1..32534662901 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/listener/InlineCOBLoanItemListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/listener/InlineCOBLoanItemListener.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/listener/WorkingCapitalChunkProcessingLoanItemListener.java b/fineract-provider/src/main/java/org/apache/fineract/cob/listener/WorkingCapitalChunkProcessingLoanItemListener.java index 00bcbb70ed2..61ef8ffdb16 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/listener/WorkingCapitalChunkProcessingLoanItemListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/listener/WorkingCapitalChunkProcessingLoanItemListener.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/AbstractLoanItemProcessor.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/AbstractLoanItemProcessor.java index 8a5ae95ec44..19546f18517 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/AbstractLoanItemProcessor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/AbstractLoanItemProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -30,7 +30,7 @@ public abstract class AbstractLoanItemProcessor extends AbstractItemProcessor * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.loan; import java.util.concurrent.LinkedBlockingQueue; + import lombok.AccessLevel; import lombok.RequiredArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/AbstractLoanItemWriter.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/AbstractLoanItemWriter.java index 9518ffef960..675d9b17dd3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/AbstractLoanItemWriter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/AbstractLoanItemWriter.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.loan; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.cob.domain.LoanAccountLock; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/AccrualActivityPostingBusinessStep.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/AccrualActivityPostingBusinessStep.java index f4192206438..c726a4757bc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/AccrualActivityPostingBusinessStep.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/AccrualActivityPostingBusinessStep.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.loan; import java.time.LocalDate; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.service.DateUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/AddPeriodicAccrualEntriesBusinessStep.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/AddPeriodicAccrualEntriesBusinessStep.java index 58eb63398a9..4ef0747f194 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/AddPeriodicAccrualEntriesBusinessStep.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/AddPeriodicAccrualEntriesBusinessStep.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/ApplyChargeToOverdueLoansBusinessStep.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/ApplyChargeToOverdueLoansBusinessStep.java index 7d157a49fc7..e4887d4360a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/ApplyChargeToOverdueLoansBusinessStep.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/ApplyChargeToOverdueLoansBusinessStep.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.loan; import java.util.Collection; + import lombok.RequiredArgsConstructor; import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.loanschedule.data.OverdueLoanScheduleData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/ApplyLoanLockTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/ApplyLoanLockTasklet.java index 01daf033532..2cdc9301f38 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/ApplyLoanLockTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/ApplyLoanLockTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -32,7 +32,7 @@ public class ApplyLoanLockTasklet extends ApplyCommonLockTasklet { public ApplyLoanLockTasklet(FineractProperties fineractProperties, LockingService loanLockingService, - RetrieveIdService retrieveIdService, TransactionTemplate transactionTemplate) { + RetrieveIdService retrieveIdService, TransactionTemplate transactionTemplate) { super(fineractProperties, loanLockingService, retrieveIdService, transactionTemplate); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/BuyDownFeeAmortizationBusinessStep.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/BuyDownFeeAmortizationBusinessStep.java index 1f511c94a10..4e1e024c980 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/BuyDownFeeAmortizationBusinessStep.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/BuyDownFeeAmortizationBusinessStep.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.cob.loan; import jakarta.transaction.Transactional; + import java.time.LocalDate; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.service.DateUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CapitalizedIncomeAmortizationBusinessStep.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CapitalizedIncomeAmortizationBusinessStep.java index 2e7be7055c0..78e662ed68e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CapitalizedIncomeAmortizationBusinessStep.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CapitalizedIncomeAmortizationBusinessStep.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.cob.loan; import jakarta.transaction.Transactional; + import java.time.LocalDate; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.service.DateUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CheckDueInstallmentsBusinessStep.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CheckDueInstallmentsBusinessStep.java index b1f55b2dd06..1a07003fde4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CheckDueInstallmentsBusinessStep.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CheckDueInstallmentsBusinessStep.java @@ -6,9 +6,9 @@ * 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 @@ -21,8 +21,10 @@ import static org.apache.fineract.infrastructure.core.diagnostics.performance.MeasuringUtil.measure; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.time.LocalDate; import java.util.Optional; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.domain.ActionContext; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CheckLoanRepaymentDueBusinessStep.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CheckLoanRepaymentDueBusinessStep.java index 8f6d45e3cfe..20b4834eac5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CheckLoanRepaymentDueBusinessStep.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CheckLoanRepaymentDueBusinessStep.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.LocalDate; import java.util.Arrays; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; @@ -77,7 +78,7 @@ public String getHumanReadableName() { } private static boolean isDueEventNeededToBeSent(Loan loan, Long numberOfDaysBeforeDueDateToRaiseEvent, LocalDate currentDate, - LoanRepaymentScheduleInstallment repaymentScheduleInstallment, LocalDate repaymentDate, List nonDisbursedStatuses) { + LoanRepaymentScheduleInstallment repaymentScheduleInstallment, LocalDate repaymentDate, List nonDisbursedStatuses) { return repaymentDate.minusDays(numberOfDaysBeforeDueDateToRaiseEvent).equals(currentDate) && !nonDisbursedStatuses.contains(loan.getStatus()) && loan.getSummary().getTotalOutstanding().compareTo(BigDecimal.ZERO) > 0 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CheckLoanRepaymentOverdueBusinessStep.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CheckLoanRepaymentOverdueBusinessStep.java index d3714a381b2..4528959eeeb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CheckLoanRepaymentOverdueBusinessStep.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/CheckLoanRepaymentOverdueBusinessStep.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.LocalDate; import java.util.Arrays; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; @@ -81,7 +82,7 @@ public String getHumanReadableName() { } private static boolean isOverDueEventNeededToBeSent(Loan loan, Long numberOfDaysBeforeDueDateToRaiseEvent, LocalDate currentDate, - LoanRepaymentScheduleInstallment repaymentScheduleInstallment, LocalDate repaymentDate) { + LoanRepaymentScheduleInstallment repaymentScheduleInstallment, LocalDate repaymentDate) { return repaymentDate.plusDays(numberOfDaysBeforeDueDateToRaiseEvent).equals(currentDate) && repaymentScheduleInstallment.getTotalOutstanding(loan.getCurrency()).isGreaterThanZero(); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/InlineCOBLoanItemProcessor.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/InlineCOBLoanItemProcessor.java index 4326d84d98e..34e77ccea41 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/InlineCOBLoanItemProcessor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/InlineCOBLoanItemProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -26,7 +26,7 @@ public class InlineCOBLoanItemProcessor extends AbstractLoanItemProcessor { public InlineCOBLoanItemProcessor(COBBusinessStepService cobBusinessStepService, - ProgressiveLoanModelProcessingService progressiveLoanModelProcessingService) { + ProgressiveLoanModelProcessingService progressiveLoanModelProcessingService) { super(cobBusinessStepService, progressiveLoanModelProcessingService); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/InlineCOBLoanItemReader.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/InlineCOBLoanItemReader.java index fc33af0c439..1250c960e56 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/InlineCOBLoanItemReader.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/InlineCOBLoanItemReader.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.concurrent.LinkedBlockingQueue; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.domain.LoanRepository; import org.springframework.batch.core.StepExecution; @@ -34,7 +35,7 @@ public InlineCOBLoanItemReader(LoanRepository loanRepository) { } @BeforeStep - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings({"unchecked"}) public void beforeStep(@NonNull StepExecution stepExecution) { ExecutionContext executionContext = stepExecution.getJobExecution().getExecutionContext(); List loanIds = (List) executionContext.get(LoanCOBConstant.COB_PARAMETER); diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/InlineCOBLoanItemWriter.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/InlineCOBLoanItemWriter.java index 07b8acb84c6..fc2eaacbabc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/InlineCOBLoanItemWriter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/InlineCOBLoanItemWriter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/InlineLoanCOBBuildExecutionContextTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/InlineLoanCOBBuildExecutionContextTasklet.java index 3e7f7f2193f..fc1f0a9d6db 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/InlineLoanCOBBuildExecutionContextTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/InlineLoanCOBBuildExecutionContextTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.common.reflect.TypeToken; import com.google.gson.Gson; + import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.ArrayList; @@ -27,6 +28,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.cob.COBBusinessStep; @@ -88,7 +90,8 @@ private String getBusinessDateFromJobParameters(ChunkContext chunkContext) { CustomJobParameter customJobParameter = customJobParameterRepository.findById(customJobParameterId) .orElseThrow(() -> new LoanNotFoundException(customJobParameterId)); String parameterJson = customJobParameter.getParameterJson(); - Set jobParameters = gson.fromJson(parameterJson, new TypeToken>() {}.getType()); + Set jobParameters = gson.fromJson(parameterJson, new TypeToken>() { + }.getType()); JobParameterDTO businessDateParameter = jobParameters.stream() .filter(jobParameterDTO -> jobParameterDTO.getParameterName().equals(COBConstant.BUSINESS_DATE_PARAMETER_NAME)).findFirst() .orElseThrow(() -> new CustomJobParameterNotFoundException(COBConstant.BUSINESS_DATE_PARAMETER_NAME)); @@ -102,6 +105,7 @@ private List getLoanIdsFromJobParameters(ChunkContext chunkContext) { JobParameterDTO loanIdsParameter = jobParameters.stream() .filter(jobParameterDTO -> jobParameterDTO.getParameterName().equals(COBConstant.INLINE_IDS_PARAMETER_NAME)).findFirst() .orElseThrow(() -> new CustomJobParameterNotFoundException(COBConstant.INLINE_IDS_PARAMETER_NAME)); - return gson.fromJson(loanIdsParameter.getParameterValue(), new TypeToken>() {}.getType()); + return gson.fromJson(loanIdsParameter.getParameterValue(), new TypeToken>() { + }.getType()); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanAccountsStayedLockedBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanAccountsStayedLockedBusinessEvent.java index d14038c6b27..d9139f43ae6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanAccountsStayedLockedBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanAccountsStayedLockedBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanCOBConstant.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanCOBConstant.java index 1d4868bb54c..696d1eccc75 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanCOBConstant.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanCOBConstant.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanCOBManagerConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanCOBManagerConfiguration.java index c81e92a44e5..8e690b958e8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanCOBManagerConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanCOBManagerConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -127,7 +127,7 @@ public Job loanCOBJob(LoanCOBPartitioner partitioner) { @Bean public ExecutionContextPromotionListener customJobParametersPromotionListener() { ExecutionContextPromotionListener listener = new ExecutionContextPromotionListener(); - listener.setKeys(new String[] { LoanCOBConstant.BUSINESS_DATE_PARAMETER_NAME, LoanCOBConstant.IS_CATCH_UP_PARAMETER_NAME }); + listener.setKeys(new String[]{LoanCOBConstant.BUSINESS_DATE_PARAMETER_NAME, LoanCOBConstant.IS_CATCH_UP_PARAMETER_NAME}); return listener; } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanCOBPartitioner.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanCOBPartitioner.java index 9bd2559f348..fd90e8f1fe8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanCOBPartitioner.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanCOBPartitioner.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Map; import java.util.Set; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.cob.COBBusinessStepService; import org.apache.fineract.cob.common.CommonPartitioner; @@ -39,7 +40,7 @@ public class LoanCOBPartitioner extends CommonPartitioner implements Partitioner private final COBBusinessStepService cobBusinessStepService; public LoanCOBPartitioner(PropertyService propertyService, COBBusinessStepService cobBusinessStepService, - RetrieveIdService retrieveIdService, JobOperator jobOperator, StepExecution stepExecution, Long numberOfDaysBehind) { + RetrieveIdService retrieveIdService, JobOperator jobOperator, StepExecution stepExecution, Long numberOfDaysBehind) { super(jobOperator, stepExecution, numberOfDaysBehind, retrieveIdService); this.propertyService = propertyService; this.cobBusinessStepService = cobBusinessStepService; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanCOBWorkerConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanCOBWorkerConfiguration.java index b84b8001593..757dc7459a6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanCOBWorkerConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanCOBWorkerConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanInlineCOBConfig.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanInlineCOBConfig.java index 98aa5603c27..960a9019a34 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanInlineCOBConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanInlineCOBConfig.java @@ -6,9 +6,9 @@ * 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 @@ -138,8 +138,8 @@ public ResetContextTasklet inlineCOBResetContext() { @Bean public ExecutionContextPromotionListener inlineCobPromotionListener() { ExecutionContextPromotionListener listener = new ExecutionContextPromotionListener(); - listener.setKeys(new String[] { LoanCOBConstant.COB_PARAMETER, LoanCOBConstant.BUSINESS_STEPS, - LoanCOBConstant.BUSINESS_DATE_PARAMETER_NAME }); + listener.setKeys(new String[]{LoanCOBConstant.COB_PARAMETER, LoanCOBConstant.BUSINESS_STEPS, + LoanCOBConstant.BUSINESS_DATE_PARAMETER_NAME}); return listener; } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanInterestRecalculationCOBBusinessStep.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanInterestRecalculationCOBBusinessStep.java index 188098635e1..91e8968c332 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanInterestRecalculationCOBBusinessStep.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanInterestRecalculationCOBBusinessStep.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanItemProcessor.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanItemProcessor.java index 4e7c340d5c0..e570ef312bc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanItemProcessor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanItemProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -26,7 +26,7 @@ public class LoanItemProcessor extends AbstractLoanItemProcessor { public LoanItemProcessor(COBBusinessStepService cobBusinessStepService, - ProgressiveLoanModelProcessingService progressiveLoanModelProcessingService) { + ProgressiveLoanModelProcessingService progressiveLoanModelProcessingService) { super(cobBusinessStepService, progressiveLoanModelProcessingService); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanItemReader.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanItemReader.java index 0305897ea50..3c657091b8c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanItemReader.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanItemReader.java @@ -6,9 +6,9 @@ * 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 @@ -33,7 +33,7 @@ public class LoanItemReader extends AbstractLoanItemReader { private final BeforeStepLockingItemReaderHelper beforeStepLockingItemReaderHelper; public LoanItemReader(LoanRepository loanRepository, - BeforeStepLockingItemReaderHelper beforeStepLockingItemReaderHelper) { + BeforeStepLockingItemReaderHelper beforeStepLockingItemReaderHelper) { super(loanRepository); this.beforeStepLockingItemReaderHelper = beforeStepLockingItemReaderHelper; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanItemWriter.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanItemWriter.java index 28c83148e13..bc2d381cd3e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanItemWriter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanItemWriter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanLockingConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanLockingConfiguration.java index 91dae8c06d8..8e822941e4e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanLockingConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanLockingConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanLockingServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanLockingServiceImpl.java index 18a47a547c1..e84dd046f71 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanLockingServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanLockingServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -37,7 +37,7 @@ INSERT INTO m_loan_account_locks (loan_id, version, lock_owner, lock_placed_on, """; public LoanLockingServiceImpl(JdbcTemplate jdbcTemplate, FineractProperties fineractProperties, - LoanAccountLockRepository loanAccountLockRepository) { + LoanAccountLockRepository loanAccountLockRepository) { super(jdbcTemplate, fineractProperties, loanAccountLockRepository); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/ResolveLoanCOBCustomJobParametersTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/ResolveLoanCOBCustomJobParametersTasklet.java index 62d3a339f84..c9b4a439ff7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/ResolveLoanCOBCustomJobParametersTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/ResolveLoanCOBCustomJobParametersTasklet.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/RetrieveAllNonClosedIdServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/RetrieveAllNonClosedIdServiceImpl.java index 8fa29493dfc..2cdb5b673b6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/RetrieveAllNonClosedIdServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/RetrieveAllNonClosedIdServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.cob.data.COBIdAndExternalIdAndAccountNo; import org.apache.fineract.cob.data.COBIdAndLastClosedBusinessDate; @@ -92,7 +93,7 @@ public List retrieveLoanIdsOldestCobProcessed(Lo @Override public List retrieveAllNonClosedLoansByLastClosedBusinessDateAndMinAndMaxLoanId(COBParameter loanCOBParameter, - boolean isCatchUp) { + boolean isCatchUp) { if (isCatchUp) { return loanRepository.findAllLoansByLastClosedBusinessDateNotNullAndMinAndMaxLoanIdAndStatuses( loanCOBParameter.getMinAccountId(), loanCOBParameter.getMaxAccountId(), ThreadLocalContextUtil diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/RetrieveLoanIdConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/RetrieveLoanIdConfiguration.java index 1c18aa52412..471c2173deb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/RetrieveLoanIdConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/RetrieveLoanIdConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/SetLoanDelinquencyTagsBusinessStep.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/SetLoanDelinquencyTagsBusinessStep.java index 9c9904f195f..5bf3e86516e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/SetLoanDelinquencyTagsBusinessStep.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/SetLoanDelinquencyTagsBusinessStep.java @@ -6,9 +6,9 @@ * 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 @@ -21,9 +21,11 @@ import static org.apache.fineract.infrastructure.core.diagnostics.performance.MeasuringUtil.measure; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.time.LocalDate; import java.util.List; import java.util.Optional; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.domain.ActionContext; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/StayedLockedLoansTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/StayedLockedLoansTasklet.java index b23e58148f6..a959560d57d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/StayedLockedLoansTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/StayedLockedLoansTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.cob.data.COBIdAndExternalIdAndAccountNo; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/UpdateLoanArrearsAgingBusinessStep.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/UpdateLoanArrearsAgingBusinessStep.java index 47b05c39612..92f1fbbd562 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/UpdateLoanArrearsAgingBusinessStep.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/UpdateLoanArrearsAgingBusinessStep.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.loan; import java.util.Arrays; + import lombok.RequiredArgsConstructor; import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.jobs.updateloanarrearsageing.LoanArrearsAgeingUpdateHandler; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/WorkingCapitalInlineCOBLoanItemReader.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/WorkingCapitalInlineCOBLoanItemReader.java index cea82913a1d..f3186f26905 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/WorkingCapitalInlineCOBLoanItemReader.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/WorkingCapitalInlineCOBLoanItemReader.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.concurrent.LinkedBlockingQueue; + import org.apache.fineract.cob.COBConstant; import org.apache.fineract.portfolio.workingcapitalloan.domain.WorkingCapitalLoan; import org.apache.fineract.portfolio.workingcapitalloan.repository.WorkingCapitalLoanRepository; @@ -35,7 +36,7 @@ public WorkingCapitalInlineCOBLoanItemReader(WorkingCapitalLoanRepository loanRe } @BeforeStep - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings({"unchecked"}) public void beforeStep(@NonNull StepExecution stepExecution) { ExecutionContext executionContext = stepExecution.getJobExecution().getExecutionContext(); List loanIds = (List) executionContext.get(COBConstant.COB_PARAMETER); diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/WorkingCapitalLoanInlineCOBConfig.java b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/WorkingCapitalLoanInlineCOBConfig.java index 06d4f6aa97f..8cd0a737421 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/loan/WorkingCapitalLoanInlineCOBConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/loan/WorkingCapitalLoanInlineCOBConfig.java @@ -6,9 +6,9 @@ * 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 @@ -85,9 +85,9 @@ protected Step inlineWorkingCapitalLoanCOBBuildExecutionContextStep( @Bean public Step inlineWorkingCapitalLoanCOBStep(WorkingCapitalInlineCOBLoanItemReader inlineWorkingCapitalLoanCobWorkerItemReader, - WorkingCapitalLoanInlineCOBWorkerItemProcessor inlineWorkingCapitalLoanCobWorkerItemProcessor, - InlineWorkingCapitalLoanCOBWorkerItemWriter inlineWorkingCapitalLoanCobWorkerItemWriter, - InlineWorkingCapitalLoanCOBWorkerItemListener inlineWorkingCapitalLoanCobLoanItemListener) { + WorkingCapitalLoanInlineCOBWorkerItemProcessor inlineWorkingCapitalLoanCobWorkerItemProcessor, + InlineWorkingCapitalLoanCOBWorkerItemWriter inlineWorkingCapitalLoanCobWorkerItemWriter, + InlineWorkingCapitalLoanCOBWorkerItemListener inlineWorkingCapitalLoanCobLoanItemListener) { return new StepBuilder("Inline Working Capital Loan COB Step", jobRepository) .chunk(propertyService.getChunkSize(JobName.WORKING_CAPITAL_LOAN_COB_JOB.name()), transactionManager) @@ -97,7 +97,7 @@ public Step inlineWorkingCapitalLoanCOBStep(WorkingCapitalInlineCOBLoanItemReade @Bean(name = "inlineWorkingCapitalLoanCOBJob") public Job inlineWorkingCapitalLoanCOBJob(Step inlineWorkingCapitalLoanCOBBuildExecutionContextStep, - Step inlineWorkingCapitalLoanCOBStep, Step inlineWorkingCapitalLoanCOBResetContextStep) { + Step inlineWorkingCapitalLoanCOBStep, Step inlineWorkingCapitalLoanCOBResetContextStep) { return new JobBuilder(WorkingCapitalLoanCOBConstant.INLINE_WORKING_CAPITAL_LOAN_COB_JOB_NAME, jobRepository) // .start(inlineWorkingCapitalLoanCOBBuildExecutionContextStep).next(inlineWorkingCapitalLoanCOBStep) .next(inlineWorkingCapitalLoanCOBResetContextStep) // @@ -141,7 +141,7 @@ public ResetContextTasklet inlineWorkingCapitalLoanCOBResetContext() { @Bean public ExecutionContextPromotionListener inlineWorkingCapitalLoanCobPromotionListener() { ExecutionContextPromotionListener listener = new ExecutionContextPromotionListener(); - listener.setKeys(new String[] { COBConstant.COB_PARAMETER, COBConstant.BUSINESS_STEPS, COBConstant.BUSINESS_DATE_PARAMETER_NAME }); + listener.setKeys(new String[]{COBConstant.COB_PARAMETER, COBConstant.BUSINESS_STEPS, COBConstant.BUSINESS_DATE_PARAMETER_NAME}); return listener; } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/savings/RetrieveSavingsIdServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/cob/savings/RetrieveSavingsIdServiceImpl.java index ba81701380a..6527523fe73 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/savings/RetrieveSavingsIdServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/savings/RetrieveSavingsIdServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.cob.data.COBIdAndExternalIdAndAccountNo; import org.apache.fineract.cob.data.COBIdAndLastClosedBusinessDate; @@ -52,7 +53,7 @@ public class RetrieveSavingsIdServiceImpl implements RetrieveSavingsIdService { @Override public List retrieveSavingsCOBPartitions(Long numberOfDays, LocalDate businessDate, boolean isCatchUp, - int partitionSize) { + int partitionSize) { String sql = """ select min(id) as min, max(id) as max, page, count(id) as count from (select floor(((row_number() over(order by id))-1) / :pageSize) as page, t.* from @@ -93,7 +94,7 @@ public List retrieveSavingsIdsOldestCobProcessed @Override public List retrieveAllNonClosedSavingsByLastClosedBusinessDateAndMinAndMaxSavingsId(COBParameter savingsCOBParameter, - boolean isCatchUp) { + boolean isCatchUp) { LocalDate cobBusinessDate = ThreadLocalContextUtil.getBusinessDateByType(BusinessDateType.COB_DATE) .minusDays(SavingsCOBConstant.NUMBER_OF_DAYS_BEHIND); diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncCOBExecutorService.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncCOBExecutorService.java index fd149cd9cd3..b50371e3eb0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncCOBExecutorService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncCOBExecutorService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncCommonCOBExecutorService.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncCommonCOBExecutorService.java index b9897d72099..5475e6fb7cb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncCommonCOBExecutorService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncCommonCOBExecutorService.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.cob.COBConstant; @@ -77,7 +78,7 @@ public void executeLoanCOBCatchUpAsync(FineractContext context) { // Throwing an error here is useless as it will be swallowed hence it is async method log.error("Job not found: {}", getJobName(), new JobNotFoundException(getJobName(), e)); } catch (JobInstanceAlreadyCompleteException | JobRestartException | JobParametersInvalidException - | JobExecutionAlreadyRunningException | JobExecutionException e) { + | JobExecutionAlreadyRunningException | JobExecutionException e) { // Throwing an error here is useless as it will be swallowed hence it is async method log.error("Error executing job", e); } finally { diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncLoanCOBExecutorService.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncLoanCOBExecutorService.java index ca82d3ce6cf..729a3b4a24b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncLoanCOBExecutorService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncLoanCOBExecutorService.java @@ -6,9 +6,9 @@ * 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 @@ -18,4 +18,5 @@ */ package org.apache.fineract.cob.service; -public interface AsyncLoanCOBExecutorService extends AsyncCOBExecutorService {} +public interface AsyncLoanCOBExecutorService extends AsyncCOBExecutorService { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncLoanCOBExecutorServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncLoanCOBExecutorServiceImpl.java index 9d53e73d80f..5487a844ab5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncLoanCOBExecutorServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncLoanCOBExecutorServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -36,7 +36,7 @@ public class AsyncLoanCOBExecutorServiceImpl extends AsyncCommonCOBExecutorService implements AsyncLoanCOBExecutorService { public AsyncLoanCOBExecutorServiceImpl(JobLocator jobLocator, ScheduledJobDetailRepository scheduledJobDetailRepository, - JobStarter jobStarter, RetrieveLoanIdService retrieveIdService) { + JobStarter jobStarter, RetrieveLoanIdService retrieveIdService) { super(jobLocator, scheduledJobDetailRepository, jobStarter, retrieveIdService); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncWorkingCapitalLoanCOBExecutorService.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncWorkingCapitalLoanCOBExecutorService.java index 0be3f76579c..be365321c56 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncWorkingCapitalLoanCOBExecutorService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncWorkingCapitalLoanCOBExecutorService.java @@ -6,9 +6,9 @@ * 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 @@ -18,4 +18,5 @@ */ package org.apache.fineract.cob.service; -public interface AsyncWorkingCapitalLoanCOBExecutorService extends AsyncCOBExecutorService {} +public interface AsyncWorkingCapitalLoanCOBExecutorService extends AsyncCOBExecutorService { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncWorkingCapitalLoanCOBExecutorServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncWorkingCapitalLoanCOBExecutorServiceImpl.java index 4564712a900..be92a37b0d7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncWorkingCapitalLoanCOBExecutorServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/AsyncWorkingCapitalLoanCOBExecutorServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -39,7 +39,7 @@ public class AsyncWorkingCapitalLoanCOBExecutorServiceImpl extends AsyncCommonCO implements AsyncWorkingCapitalLoanCOBExecutorService { public AsyncWorkingCapitalLoanCOBExecutorServiceImpl(JobLocator jobLocator, ScheduledJobDetailRepository scheduledJobDetailRepository, - JobStarter jobStarter, WorkingCapitalLoanRetrieveIdService retrieveIdService) { + JobStarter jobStarter, WorkingCapitalLoanRetrieveIdService retrieveIdService) { super(jobLocator, scheduledJobDetailRepository, jobStarter, retrieveIdService); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/COBCatchUpService.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/COBCatchUpService.java index 5d793ab9013..92beea57879 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/COBCatchUpService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/COBCatchUpService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/CommonCOBCatchUpService.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/CommonCOBCatchUpService.java index de102e0bbee..cdd73865b9c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/CommonCOBCatchUpService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/CommonCOBCatchUpService.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.cob.COBConstant; import org.apache.fineract.cob.data.COBIdAndLastClosedBusinessDate; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/InlineCommonLockableCOBExecutorService.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/InlineCommonLockableCOBExecutorService.java index 902e04a41a2..8717521b014 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/InlineCommonLockableCOBExecutorService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/InlineCommonLockableCOBExecutorService.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import com.google.common.collect.Lists; import com.google.gson.Gson; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.ArrayList; @@ -33,6 +34,7 @@ import java.util.Map; import java.util.Optional; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -159,7 +161,7 @@ private void execute(List loanIds, String jobName, LocalDate businessDate) private LocalDate getOldestCOBBusinessDate(List loans) { COBIdAndLastClosedBusinessDate oldestLoan = loans.stream().min(Comparator - .comparing(COBIdAndLastClosedBusinessDate::getLastClosedBusinessDate, Comparator.nullsLast(Comparator.naturalOrder()))) + .comparing(COBIdAndLastClosedBusinessDate::getLastClosedBusinessDate, Comparator.nullsLast(Comparator.naturalOrder()))) .orElse(null); return oldestLoan != null && oldestLoan.getLastClosedBusinessDate() != null ? oldestLoan.getLastClosedBusinessDate() : ThreadLocalContextUtil.getBusinessDateByType(BusinessDateType.COB_DATE).minusDays(1); diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/InlineLoanCOBExecutionDataParser.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/InlineLoanCOBExecutionDataParser.java index 17c4afd324c..5f93796137a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/InlineLoanCOBExecutionDataParser.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/InlineLoanCOBExecutionDataParser.java @@ -6,9 +6,9 @@ * 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 @@ -20,8 +20,10 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.util.Arrays; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/InlineLoanCOBExecutorServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/InlineLoanCOBExecutorServiceImpl.java index fd601a122b6..18ad23b93da 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/InlineLoanCOBExecutorServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/InlineLoanCOBExecutorServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.service; import java.time.LocalDate; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.cob.conditions.LoanCOBEnabledCondition; import org.apache.fineract.cob.domain.LoanAccountLock; @@ -40,9 +41,9 @@ public class InlineLoanCOBExecutorServiceImpl extends InlineCommonLockableCOBExecutorService { public InlineLoanCOBExecutorServiceImpl(LoanAccountLockRepository loanAccountLockRepository, - InlineLoanCOBExecutionDataParser dataParser, JobLauncher jobLauncher, JobLocator jobLocator, JobExplorer jobExplorer, - TransactionTemplate transactionTemplate, CustomJobParameterRepository customJobParameterRepository, - PlatformSecurityContext context, RetrieveLoanIdService retrieveIdService, FineractProperties fineractProperties) { + InlineLoanCOBExecutionDataParser dataParser, JobLauncher jobLauncher, JobLocator jobLocator, JobExplorer jobExplorer, + TransactionTemplate transactionTemplate, CustomJobParameterRepository customJobParameterRepository, + PlatformSecurityContext context, RetrieveLoanIdService retrieveIdService, FineractProperties fineractProperties) { super(loanAccountLockRepository, dataParser, jobLauncher, jobLocator, jobExplorer, transactionTemplate, customJobParameterRepository, context, retrieveIdService, fineractProperties); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/InlineWorkingCapitalLoanCOBExecutorServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/InlineWorkingCapitalLoanCOBExecutorServiceImpl.java index d7f08085387..dad7b5f5dcf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/InlineWorkingCapitalLoanCOBExecutorServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/InlineWorkingCapitalLoanCOBExecutorServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.service; import java.time.LocalDate; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.cob.conditions.LoanCOBEnabledCondition; import org.apache.fineract.cob.domain.LockOwner; @@ -41,9 +42,9 @@ public class InlineWorkingCapitalLoanCOBExecutorServiceImpl extends InlineCommonLockableCOBExecutorService { public InlineWorkingCapitalLoanCOBExecutorServiceImpl(WorkingCapitalAccountLockRepository loanAccountLockRepository, - InlineLoanCOBExecutionDataParser dataParser, JobLauncher jobLauncher, JobLocator jobLocator, JobExplorer jobExplorer, - TransactionTemplate transactionTemplate, CustomJobParameterRepository customJobParameterRepository, - PlatformSecurityContext context, WorkingCapitalLoanRetrieveIdService retrieveIdService, FineractProperties fineractProperties) { + InlineLoanCOBExecutionDataParser dataParser, JobLauncher jobLauncher, JobLocator jobLocator, JobExplorer jobExplorer, + TransactionTemplate transactionTemplate, CustomJobParameterRepository customJobParameterRepository, + PlatformSecurityContext context, WorkingCapitalLoanRetrieveIdService retrieveIdService, FineractProperties fineractProperties) { super(loanAccountLockRepository, dataParser, jobLauncher, jobLocator, jobExplorer, transactionTemplate, customJobParameterRepository, context, retrieveIdService, fineractProperties); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanAccountLockService.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanAccountLockService.java index 1e89ee8e402..1728e92252d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanAccountLockService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanAccountLockService.java @@ -6,9 +6,9 @@ * 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 @@ -27,7 +27,7 @@ public class LoanAccountLockService extends AbstractAccountLockService { public LoanAccountLockService(AccountLockRepository loanAccountLockRepository, - CustomLoanAccountLockRepository customLoanAccountLockRepository) { + CustomLoanAccountLockRepository customLoanAccountLockRepository) { super(loanAccountLockRepository, customLoanAccountLockRepository); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanBusinessStepCategoryServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanBusinessStepCategoryServiceImpl.java index d4308f8b952..aaed0a257a3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanBusinessStepCategoryServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanBusinessStepCategoryServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.cob.service; import java.util.Map; + import org.apache.fineract.cob.COBBusinessStep; import org.apache.fineract.cob.loan.LoanCOBBusinessStep; import org.springframework.stereotype.Service; diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanCOBCatchUpService.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanCOBCatchUpService.java index 11591ef61ea..b611e139432 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanCOBCatchUpService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanCOBCatchUpService.java @@ -6,9 +6,9 @@ * 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 @@ -19,4 +19,5 @@ package org.apache.fineract.cob.service; -public interface LoanCOBCatchUpService extends COBCatchUpService {} +public interface LoanCOBCatchUpService extends COBCatchUpService { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanCOBCatchUpServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanCOBCatchUpServiceImpl.java index 247565de09b..b2b5978abe2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanCOBCatchUpServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanCOBCatchUpServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -30,7 +30,7 @@ public class LoanCOBCatchUpServiceImpl extends CommonCOBCatchUpService implements LoanCOBCatchUpService { public LoanCOBCatchUpServiceImpl(AsyncLoanCOBExecutorService asyncLoanCOBExecutorService, JobExecutionRepository jobExecutionRepository, - RetrieveLoanIdService retrieveIdService, LoanAccountLockService accountLockService) { + RetrieveLoanIdService retrieveIdService, LoanAccountLockService accountLockService) { super(asyncLoanCOBExecutorService, jobExecutionRepository, retrieveIdService, accountLockService); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanReloadService.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanReloadService.java index ddff5dd0122..cea6daf0473 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanReloadService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/LoanReloadService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/WorkingCapitalLoanCOBCatchUpService.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/WorkingCapitalLoanCOBCatchUpService.java index 828648243ad..eddef9fe3a6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/WorkingCapitalLoanCOBCatchUpService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/WorkingCapitalLoanCOBCatchUpService.java @@ -6,9 +6,9 @@ * 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 @@ -19,4 +19,5 @@ package org.apache.fineract.cob.service; -public interface WorkingCapitalLoanCOBCatchUpService extends COBCatchUpService {} +public interface WorkingCapitalLoanCOBCatchUpService extends COBCatchUpService { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/cob/service/WorkingCapitalLoanCOBCatchUpServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/cob/service/WorkingCapitalLoanCOBCatchUpServiceImpl.java index f0188b2a85a..0c5545fa771 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/cob/service/WorkingCapitalLoanCOBCatchUpServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/cob/service/WorkingCapitalLoanCOBCatchUpServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -33,8 +33,8 @@ public class WorkingCapitalLoanCOBCatchUpServiceImpl extends CommonCOBCatchUpSer implements WorkingCapitalLoanCOBCatchUpService { public WorkingCapitalLoanCOBCatchUpServiceImpl(AsyncWorkingCapitalLoanCOBExecutorService asyncLoanCOBExecutorService, - JobExecutionRepository jobExecutionRepository, WorkingCapitalLoanRetrieveIdService retrieveIdService, - AccountLockService accountLockService) { + JobExecutionRepository jobExecutionRepository, WorkingCapitalLoanRetrieveIdService retrieveIdService, + AccountLockService accountLockService) { super(asyncLoanCOBExecutorService, jobExecutionRepository, retrieveIdService, accountLockService); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/api/MakercheckersApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/commands/api/MakercheckersApiResourceSwagger.java index 07f523e016c..aa49824eaa3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/api/MakercheckersApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/api/MakercheckersApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/data/AuditData.java b/fineract-provider/src/main/java/org/apache/fineract/commands/data/AuditData.java index 6a415676e82..fe4a3fe1e0b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/data/AuditData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/data/AuditData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.time.ZonedDateTime; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/data/AuditSearchData.java b/fineract-provider/src/main/java/org/apache/fineract/commands/data/AuditSearchData.java index 373a27563df..9c85349e880 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/data/AuditSearchData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/data/AuditSearchData.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.io.Serializable; import java.util.Collection; import java.util.List; + import org.apache.fineract.useradministration.data.AppUserData; /** @@ -29,7 +30,7 @@ */ public record AuditSearchData(Collection appUsers, List actionNames, List entityNames, - Collection statuses) implements Serializable { + Collection statuses) implements Serializable { @Serial private static final long serialVersionUID = 1L; diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/data/ProcessingResultLookup.java b/fineract-provider/src/main/java/org/apache/fineract/commands/data/ProcessingResultLookup.java index 55e3fe8c3b1..f0c7757982f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/data/ProcessingResultLookup.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/data/ProcessingResultLookup.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/data/request/AuditRequest.java b/fineract-provider/src/main/java/org/apache/fineract/commands/data/request/AuditRequest.java index 0d5475017f7..89408477086 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/data/request/AuditRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/data/request/AuditRequest.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.commands.data.request; import jakarta.ws.rs.QueryParam; + import java.io.Serial; import java.io.Serializable; import java.time.LocalDateTime; import java.time.LocalTime; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/data/request/MakerCheckerRequest.java b/fineract-provider/src/main/java/org/apache/fineract/commands/data/request/MakerCheckerRequest.java index 4d8bbe0c613..9aa5712693a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/data/request/MakerCheckerRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/data/request/MakerCheckerRequest.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.commands.data.request; import jakarta.ws.rs.QueryParam; + import java.io.Serial; import java.io.Serializable; import java.time.ZonedDateTime; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/service/AuditReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/commands/service/AuditReadPlatformService.java index 059f40d24a1..477232b6afc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/service/AuditReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/service/AuditReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.commands.service; import java.util.List; + import org.apache.fineract.commands.data.AuditData; import org.apache.fineract.commands.data.AuditSearchData; import org.apache.fineract.infrastructure.core.data.PaginationParameters; diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/service/AuditReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/commands/service/AuditReadPlatformServiceImpl.java index 066d2c21ad0..6fe6429475b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/service/AuditReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/service/AuditReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import com.google.common.reflect.TypeToken; import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.lang.reflect.Type; import java.sql.ResultSet; import java.sql.SQLException; @@ -32,6 +33,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -178,7 +180,7 @@ public List retrieveAuditEntries(final SQLBuilder extraCriteria, fina @Override public Page retrievePaginatedAuditEntries(final SQLBuilder extraCriteria, final boolean includeJson, - final PaginationParameters parameters) { + final PaginationParameters parameters) { sqlValidator.validate(parameters.getOrderBy()); sqlValidator.validate(parameters.getSortOrder()); @@ -215,7 +217,7 @@ public List retrieveAllEntriesToBeChecked(final SQLBuilder extraCrite } private List retrieveEntries(final String useType, final SQLBuilder extraCriteria, final String groupAndOrderBySQL, - final boolean includeJson) { + final boolean includeJson) { if ((!useType.equals("audit") && !useType.equals("makerchecker"))) { throw new PlatformDataIntegrityException("error.msg.invalid.auditSearchTemplate.useType", @@ -266,7 +268,8 @@ private AuditData replaceIdsOnAuditData(final AuditData auditResult) { final String auditAsJson = auditResult.getCommandAsJson(); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final Map commandAsJsonMap = this.fromApiJsonHelper.extractObjectMap(typeOfMap, auditAsJson); final JsonElement auditJsonFragment = this.fromApiJsonHelper.parse(auditAsJson); @@ -364,8 +367,8 @@ private void updateEnumerations(Map commandAsJsonMap, JsonObject if (entityName.equalsIgnoreCase("LOAN") || entityName.equalsIgnoreCase("LOANPRODUCT")) { - final String[] enumTypes = { "loanTermFrequencyType", "termFrequencyType", "repaymentFrequencyType", "amortizationType", - "interestType", "interestCalculationPeriodType", "interestRateFrequencyType", "accountingRule" }; + final String[] enumTypes = {"loanTermFrequencyType", "termFrequencyType", "repaymentFrequencyType", "amortizationType", + "interestType", "interestCalculationPeriodType", "interestRateFrequencyType", "accountingRule"}; for (final String typeName : enumTypes) { if (commandAsJsonMap.containsKey(typeName)) { @@ -383,10 +386,10 @@ private void updateEnumerations(Map commandAsJsonMap, JsonObject || entityName.equalsIgnoreCase("RECURRINGDEPOSITPRODUCT") || entityName.equalsIgnoreCase("RECURRINGDEPOSITACCOUNT") || entityName.equalsIgnoreCase("FIXEDDEPOSITPRODUCT") || entityName.equalsIgnoreCase("FIXEDDEPOSITACCOUNT")) { - final String[] enumTypes = { "interestCompoundingPeriodType", "interestPostingPeriodType", "interestCalculationType", + final String[] enumTypes = {"interestCompoundingPeriodType", "interestPostingPeriodType", "interestCalculationType", "lockinPeriodFrequencyType", "minDepositTermTypeId", "maxDepositTermTypeId", "inMultiplesOfDepositTermTypeId", "depositPeriodFrequencyId", "accountingRule", "interestCalculationDaysInYearType", "preClosurePenalInterestOnTypeId", - "recurringFrequencyType" }; + "recurringFrequencyType"}; for (final String typeName : enumTypes) { if (commandAsJsonMap.containsKey(typeName)) { @@ -403,7 +406,7 @@ private void updateEnumerations(Map commandAsJsonMap, JsonObject } private void replaceStaffIdWithStaffName(final String staffIdStr, final String staffNameParamName, - Map commandAsJsonMap) { + Map commandAsJsonMap) { Long staffId = null; if (StringUtils.isNotBlank(staffIdStr)) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/commands/starter/CommandsConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/commands/starter/CommandsConfiguration.java index 7f949f66c90..e9901191625 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/commands/starter/CommandsConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/commands/starter/CommandsConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -45,14 +45,14 @@ public class CommandsConfiguration { @Bean @ConditionalOnMissingBean(AuditReadPlatformService.class) public AuditReadPlatformService auditReadPlatformService(JdbcTemplate jdbcTemplate, PlatformSecurityContext context, - FromJsonHelper fromApiJsonHelper, AppUserReadPlatformService appUserReadPlatformService, - OfficeReadPlatformService officeReadPlatformService, ClientReadPlatformService clientReadPlatformService, - LoanProductReadPlatformService loanProductReadPlatformService, StaffReadService staffReadPlatformService, - PaginationHelper paginationHelper, DatabaseSpecificSQLGenerator sqlGenerator, - PaginationParametersDataValidator paginationParametersDataValidator, - SavingsProductReadPlatformService savingsProductReadPlatformService, - DepositProductReadPlatformService depositProductReadPlatformService, ColumnValidator columnValidator, - SqlValidator sqlValidator) { + FromJsonHelper fromApiJsonHelper, AppUserReadPlatformService appUserReadPlatformService, + OfficeReadPlatformService officeReadPlatformService, ClientReadPlatformService clientReadPlatformService, + LoanProductReadPlatformService loanProductReadPlatformService, StaffReadService staffReadPlatformService, + PaginationHelper paginationHelper, DatabaseSpecificSQLGenerator sqlGenerator, + PaginationParametersDataValidator paginationParametersDataValidator, + SavingsProductReadPlatformService savingsProductReadPlatformService, + DepositProductReadPlatformService depositProductReadPlatformService, ColumnValidator columnValidator, + SqlValidator sqlValidator) { return new AuditReadPlatformServiceImpl(jdbcTemplate, context, fromApiJsonHelper, appUserReadPlatformService, officeReadPlatformService, clientReadPlatformService, loanProductReadPlatformService, staffReadPlatformService, paginationHelper, sqlGenerator, paginationParametersDataValidator, savingsProductReadPlatformService, diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/api/AccountNumberFormatsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/api/AccountNumberFormatsApiResourceSwagger.java index d1dfaeca33f..41d0999cbb2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/api/AccountNumberFormatsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/api/AccountNumberFormatsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.accountnumberformat.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; /** diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/data/AccountNumberFormatDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/data/AccountNumberFormatDataValidator.java index 39ad1022847..e3b43bc6a9c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/data/AccountNumberFormatDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/data/AccountNumberFormatDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -28,6 +29,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.accountnumberformat.domain.AccountNumberFormatEnumerations; import org.apache.fineract.infrastructure.accountnumberformat.domain.AccountNumberFormatEnumerations.AccountNumberPrefixType; @@ -66,7 +68,8 @@ public void validateForCreate(final String json) { if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ACCOUNT_NUMBER_FORMAT_CREATE_REQUEST_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); final List dataValidationErrors = new ArrayList<>(); @@ -121,29 +124,29 @@ public Set determineValidAccountNumberPrefixes(EntityAccountType entity switch (entityAccountType) { case CLIENT: validAccountNumberPrefixes = AccountNumberFormatEnumerations.accountNumberPrefixesForClientAccounts; - break; + break; case LOAN: validAccountNumberPrefixes = AccountNumberFormatEnumerations.accountNumberPrefixesForLoanAccounts; - break; + break; case SAVINGS: validAccountNumberPrefixes = AccountNumberFormatEnumerations.accountNumberPrefixesForSavingsAccounts; - break; + break; case CENTER: validAccountNumberPrefixes = AccountNumberFormatEnumerations.accountNumberPrefixesForCenters; - break; + break; case GROUP: validAccountNumberPrefixes = AccountNumberFormatEnumerations.accountNumberPrefixesForGroups; - break; + break; case SHARES: validAccountNumberPrefixes = Collections.emptySet(); - break; + break; case WORKING_CAPITAL_LOAN: validAccountNumberPrefixes = AccountNumberFormatEnumerations.accountNumberPrefixesForWorkingCapitalLoanAccounts; - break; + break; } Set validAccountNumberPrefixValues = new HashSet<>(); @@ -158,7 +161,8 @@ public void validateForUpdate(final String json, EntityAccountType entityAccount throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ACCOUNT_NUMBER_FORMAT_UPDATE_REQUEST_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormatRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormatRepositoryWrapper.java index 8bbc6423808..3b8464669c4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormatRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/domain/AccountNumberFormatRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/exception/AccountNumberFormatNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/exception/AccountNumberFormatNotFoundException.java index b9f7c9ab666..4c439cfc2db 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/exception/AccountNumberFormatNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/exception/AccountNumberFormatNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/CreateAccountNumberFormatCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/CreateAccountNumberFormatCommandHandler.java index a6731d87f32..425126e36b7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/CreateAccountNumberFormatCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/CreateAccountNumberFormatCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/DeleteAccountNumberFormatCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/DeleteAccountNumberFormatCommandHandler.java index 8852952fcce..3f5ff77d643 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/DeleteAccountNumberFormatCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/DeleteAccountNumberFormatCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/UpdateAccountNumberFormatCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/UpdateAccountNumberFormatCommandHandler.java index 6fb394c6ed2..2196541617c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/UpdateAccountNumberFormatCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/handler/UpdateAccountNumberFormatCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatReadPlatformService.java index 42f4b083b8b..cd7c43cc356 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.accountnumberformat.service; import java.util.List; + import org.apache.fineract.infrastructure.accountnumberformat.data.AccountNumberFormatData; import org.apache.fineract.infrastructure.accountnumberformat.domain.EntityAccountType; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatReadPlatformServiceImpl.java index 194bb3b7020..3c186235b1b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.accountnumberformat.data.AccountNumberFormatData; import org.apache.fineract.infrastructure.accountnumberformat.domain.AccountNumberFormatEnumerations; @@ -58,7 +59,8 @@ private static final class AccountNumberFormatMapper implements RowMapper> accountNumberPrefixTypeOptions, - EntityAccountType entityAccountType) { + EntityAccountType entityAccountType) { Set accountNumberPrefixTypesSet = new HashSet<>(); switch (entityAccountType) { case CLIENT: accountNumberPrefixTypesSet = AccountNumberFormatEnumerations.accountNumberPrefixesForClientAccounts; - break; + break; case LOAN: accountNumberPrefixTypesSet = AccountNumberFormatEnumerations.accountNumberPrefixesForLoanAccounts; - break; + break; case SAVINGS: accountNumberPrefixTypesSet = AccountNumberFormatEnumerations.accountNumberPrefixesForSavingsAccounts; - break; + break; case CENTER: accountNumberPrefixTypesSet = AccountNumberFormatEnumerations.accountNumberPrefixesForCenters; - break; + break; case GROUP: accountNumberPrefixTypesSet = AccountNumberFormatEnumerations.accountNumberPrefixesForGroups; - break; + break; case SHARES: - // SHARES has no prefix - break; + // SHARES has no prefix + break; case WORKING_CAPITAL_LOAN: accountNumberPrefixTypesSet = AccountNumberFormatEnumerations.accountNumberPrefixesForWorkingCapitalLoanAccounts; - break; + break; } Object[] array = accountNumberPrefixTypesSet.toArray(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatWritePlatformService.java index 444bba6f927..9468bf5672e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatWritePlatformServiceJpaRepositoryImpl.java index a8fc22c88b8..61c59d4b006 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/accountnumberformat/service/AccountNumberFormatWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.accountnumberformat.service; import jakarta.persistence.PersistenceException; + import java.util.LinkedHashMap; import java.util.Map; + import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.fineract.infrastructure.accountnumberformat.data.AccountNumberFormatDataValidator; import org.apache.fineract.infrastructure.accountnumberformat.domain.AccountNumberFormat; @@ -49,7 +51,7 @@ public class AccountNumberFormatWritePlatformServiceJpaRepositoryImpl implements @Autowired AccountNumberFormatWritePlatformServiceJpaRepositoryImpl(final AccountNumberFormatRepositoryWrapper accountNumberFormatRepository, - final AccountNumberFormatDataValidator accountNumberFormatDataValidator) { + final AccountNumberFormatDataValidator accountNumberFormatDataValidator) { this.accountNumberFormatRepository = accountNumberFormatRepository; this.accountNumberFormatDataValidator = accountNumberFormatDataValidator; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/CenterConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/CenterConstants.java index 962954ec977..9d524a8ca3c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/CenterConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/CenterConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ChargeConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ChargeConstants.java index 584bef0ddf9..39d13f33324 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ChargeConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ChargeConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ChartOfAccountsConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ChartOfAccountsConstants.java index e6bd21f52f4..5b82de12dd5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ChartOfAccountsConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ChartOfAccountsConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ClientEntityConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ClientEntityConstants.java index a06eac907f5..34e37c6c29a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ClientEntityConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ClientEntityConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ClientPersonConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ClientPersonConstants.java index ed4a6fb7bd4..cbf0cab7932 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ClientPersonConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/ClientPersonConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/FixedDepositConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/FixedDepositConstants.java index 274811052b6..a44d3fcc9ab 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/FixedDepositConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/FixedDepositConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/GroupConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/GroupConstants.java index 8042e5027d8..4d9d8d1717b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/GroupConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/GroupConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/GuarantorConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/GuarantorConstants.java index dfae5af3649..8a695b7fd2e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/GuarantorConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/GuarantorConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/JournalEntryConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/JournalEntryConstants.java index 9f8ebe17e0f..03885a36f01 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/JournalEntryConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/JournalEntryConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/LoanConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/LoanConstants.java index 7d9fa3ce803..778ac5d9be4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/LoanConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/LoanConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/LoanRepaymentConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/LoanRepaymentConstants.java index b0a41278e6b..afea8e3ad80 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/LoanRepaymentConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/LoanRepaymentConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/OfficeConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/OfficeConstants.java index 8284a50bae0..29c0805a233 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/OfficeConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/OfficeConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/RecurringDepositConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/RecurringDepositConstants.java index 3cb51e12305..d85fa4f1cc9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/RecurringDepositConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/RecurringDepositConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/SavingsConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/SavingsConstants.java index d80107b6104..f13a9d58a4a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/SavingsConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/SavingsConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/SharedAccountsConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/SharedAccountsConstants.java index 833eab261a2..0e69c7862ae 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/SharedAccountsConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/SharedAccountsConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/StaffConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/StaffConstants.java index 4db6907dbf2..7168a0dfd68 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/StaffConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/StaffConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/TemplatePopulateImportConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/TemplatePopulateImportConstants.java index c7226e1c771..9b20cb9ec5a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/TemplatePopulateImportConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/TemplatePopulateImportConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/TransactionConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/TransactionConstants.java index d5e20bd5f32..41f4f14a5e5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/TransactionConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/TransactionConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/UserConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/UserConstants.java index f0f3184b4d0..c261409f800 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/UserConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/constants/UserConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/BulkImportEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/BulkImportEvent.java index 1d115148d39..e60d657cf2c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/BulkImportEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/BulkImportEvent.java @@ -6,9 +6,9 @@ * 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 @@ -42,7 +42,7 @@ public final class BulkImportEvent extends FineractEvent { private final Long entityId; public BulkImportEvent(final Object source, final Workbook workbook, final String fileName, String fileType, - final ImportDocument importDocument, final String locale, final String dateFormat, FineractContext context, Long entityId) { + final ImportDocument importDocument, final String locale, final String dateFormat, FineractContext context, Long entityId) { super(source, context); this.workbook = workbook; this.fileName = fileName; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/Count.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/Count.java index 696b6feb360..3c065b255fa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/Count.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/Count.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/ImportFormatType.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/ImportFormatType.java index f5533c88485..85bcc1aaffd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/ImportFormatType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/data/ImportFormatType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/domain/ImportDocument.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/domain/ImportDocument.java index 48e75cd00d6..9216d74185c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/domain/ImportDocument.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/domain/ImportDocument.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.time.LocalDateTime; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -69,7 +71,7 @@ public final class ImportDocument extends AbstractPersistableCustom { private Integer failureCount; public static ImportDocument instance(final Long documentId, final LocalDateTime importTime, final Integer entityType, - final AppUser createdBy, final Integer totalRecords) { + final AppUser createdBy, final Integer totalRecords) { final Boolean completed = Boolean.FALSE; final Integer successCount = 0; @@ -81,8 +83,8 @@ public static ImportDocument instance(final Long documentId, final LocalDateTime } private ImportDocument(final Long documentId, final LocalDateTime importTime, final LocalDateTime endTime, Boolean completed, - final Integer entityType, final AppUser createdBy, final Integer totalRecords, final Integer successCount, - final Integer failureCount) { + final Integer entityType, final AppUser createdBy, final Integer totalRecords, final Integer successCount, + final Integer failureCount) { this.documentId = documentId; this.importTime = importTime; this.endTime = endTime; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/domain/ImportDocumentRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/domain/ImportDocumentRepository.java index 55a770a7516..787598f5f6e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/domain/ImportDocumentRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/domain/ImportDocumentRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/exceptions/ImportTypeNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/exceptions/ImportTypeNotFoundException.java index 5144b8d6808..fb4ba15cb66 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/exceptions/ImportTypeNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/exceptions/ImportTypeNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/ImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/ImportHandler.java index cbd551150f1..04d616db47d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/ImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/ImportHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/ImportHandlerUtils.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/ImportHandlerUtils.java index 0d592c7f30e..11fa14917ac 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/ImportHandlerUtils.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/ImportHandlerUtils.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.bulkimport.importhandler; import com.google.common.base.Splitter; + import java.time.LocalDate; import java.util.List; + import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/center/CenterImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/center/CenterImportHandler.java index d6a49f81a08..b95b11f49e7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/center/CenterImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/center/CenterImportHandler.java @@ -6,9 +6,9 @@ * 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 @@ -20,12 +20,14 @@ import com.google.common.reflect.TypeToken; import com.google.gson.GsonBuilder; + import java.lang.reflect.Type; import java.time.LocalDate; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Objects; + import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.IdempotencyKeyGenerator; @@ -64,7 +66,7 @@ public class CenterImportHandler implements ImportHandler { @Autowired public CenterImportHandler(final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService, - IdempotencyKeyGenerator idempotencyKeyGenerator) { + IdempotencyKeyGenerator idempotencyKeyGenerator) { this.commandsSourceWritePlatformService = commandsSourceWritePlatformService; this.idempotencyKeyGenerator = idempotencyKeyGenerator; } @@ -79,7 +81,7 @@ public Count process(final Workbook workbook, final String locale, final String } private void readExcelFile(final Workbook workbook, final List centers, final List meetings, - final List statuses, final String locale, final String dateFormat) { + final List statuses, final String locale, final String dateFormat) { Sheet centersSheet = workbook.getSheet(TemplatePopulateImportConstants.CENTER_SHEET_NAME); Integer noOfEntries = ImportHandlerUtils.getNumberOfRows(centersSheet, TemplatePopulateImportConstants.FIRST_COLUMN_INDEX); @@ -115,7 +117,7 @@ private CalendarData readMeeting(final Row row, final String locale, final Strin } private CenterData readCenter(final Workbook workbook, final List statuses, final Row row, final String locale, - final String dateFormat) { + final String dateFormat) { String status = ImportHandlerUtils.readAsString(CenterConstants.STATUS_COL, row); String officeName = ImportHandlerUtils.readAsString(CenterConstants.OFFICE_NAME_COL, row); Long officeId = ImportHandlerUtils.getIdByName(workbook.getSheet(TemplatePopulateImportConstants.OFFICE_SHEET_NAME), officeName); @@ -163,7 +165,7 @@ private boolean containsGroupId(List groupMembers, Long groupI } private Count importEntity(final Workbook workbook, final List centers, final List meetings, - final List statuses, final String dateFormat) { + final List statuses, final String dateFormat) { Sheet centerSheet = workbook.getSheet(TemplatePopulateImportConstants.CENTER_SHEET_NAME); int progressLevel = 0; String centerId = EMPTY_STR; @@ -185,7 +187,7 @@ private Count importEntity(final Workbook workbook, final List cente progressLevel = 1; } else { centerId = Objects.requireNonNull( - ImportHandlerUtils.readAsInt(CenterConstants.CENTER_ID_COL, centerSheet.getRow(centers.get(i).getRowIndex()))) + ImportHandlerUtils.readAsInt(CenterConstants.CENTER_ID_COL, centerSheet.getRow(centers.get(i).getRowIndex()))) .toString(); } @@ -207,7 +209,7 @@ private Count importEntity(final Workbook workbook, final List cente } private void writeCenterErrorMessage(final Workbook workbook, final String centerId, final String errorMessage, final int progressLevel, - final Cell statusCell, final Cell errorReportCell, final Row row) { + final Cell statusCell, final Cell errorReportCell, final Row row) { String status = EMPTY_STR; if (progressLevel == 0) { status = TemplatePopulateImportConstants.STATUS_CREATION_FAILED; @@ -258,7 +260,7 @@ private void setReportHeaders(final Sheet sheet) { } private Integer importCenterMeeting(final List meetings, final CommandProcessingResult result, final int rowIndex, - final String dateFormat) { + final String dateFormat) { CalendarData calendarData = meetings.get(rowIndex); calendarData.setTitle("centers_" + result.getGroupId().toString() + "_CollectionMeeting"); GsonBuilder gsonBuilder = GoogleGsonSerializerHelper.createGsonBuilder(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/chartofaccounts/ChartOfAccountsImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/chartofaccounts/ChartOfAccountsImportHandler.java index 98eae53cea7..df6f0a1f859 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/chartofaccounts/ChartOfAccountsImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/chartofaccounts/ChartOfAccountsImportHandler.java @@ -6,9 +6,9 @@ * 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 @@ -19,11 +19,13 @@ package org.apache.fineract.infrastructure.bulkimport.importhandler.chartofaccounts; import com.google.gson.GsonBuilder; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; import java.util.Objects; + import org.apache.fineract.accounting.glaccount.data.GLAccountData; import org.apache.fineract.accounting.glaccount.domain.GLAccount; import org.apache.fineract.accounting.glaccount.domain.GLAccountRepositoryWrapper; @@ -69,7 +71,7 @@ public class ChartOfAccountsImportHandler implements ImportHandler { @Autowired public ChartOfAccountsImportHandler(final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService, - GLAccountRepositoryWrapper glAccountRepository) { + GLAccountRepositoryWrapper glAccountRepository) { this.commandsSourceWritePlatformService = commandsSourceWritePlatformService; this.glAccountRepository = glAccountRepository; } @@ -141,8 +143,8 @@ private GLAccountData readGlAccounts(final Row row) { } private Count importEntity(final Workbook workbook, final List glAccounts, final List glTransactions, - final List credits, final List debits, final boolean flagForOpBal, final String locale, - final String dateFormat) { + final List credits, final List debits, final boolean flagForOpBal, final String locale, + final String dateFormat) { Sheet chartOfAccountsSheet = workbook.getSheet(TemplatePopulateImportConstants.CHART_OF_ACCOUNTS_SHEET_NAME); GsonBuilder gsonBuilder = GoogleGsonSerializerHelper.createGsonBuilder(); @@ -212,7 +214,7 @@ private Count importEntity(final Workbook workbook, final List gl // for opening balance private void readExcelFileForOpBal(final Workbook workbook, final List glTransactions, - final List credits, final List debits, final String locale, final String dateFormat) { + final List credits, final List debits, final String locale, final String dateFormat) { Sheet chartOfAccountsSheet = workbook.getSheet(TemplatePopulateImportConstants.CHART_OF_ACCOUNTS_SHEET_NAME); Integer noOfEntries = ImportHandlerUtils.getNumberOfRows(chartOfAccountsSheet, TemplatePopulateImportConstants.FIRST_COLUMN_INDEX); @@ -230,7 +232,7 @@ private void readExcelFileForOpBal(final Workbook workbook, final List credits, final List debits, - final String locale, String dateFormat) { + final String locale, String dateFormat) { LocalDate transactionDate = DateUtils.getBusinessLocalDate(); Long officeId = ImportHandlerUtils.readAsLong(ChartOfAccountsConstants.OFFICE_COL_ID, row); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/client/ClientEntityImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/client/ClientEntityImportHandler.java index 9b08efaa04a..a1bcce7ac76 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/client/ClientEntityImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/client/ClientEntityImportHandler.java @@ -6,9 +6,9 @@ * 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 @@ -20,11 +20,13 @@ import com.google.common.base.Splitter; import com.google.gson.GsonBuilder; + import java.time.LocalDate; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Objects; + import lombok.AllArgsConstructor; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/client/ClientPersonImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/client/ClientPersonImportHandler.java index e35027a192c..c7c47e192bd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/client/ClientPersonImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/client/ClientPersonImportHandler.java @@ -6,9 +6,9 @@ * 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 @@ -20,11 +20,13 @@ import com.google.common.base.Splitter; import com.google.gson.GsonBuilder; + import java.time.LocalDate; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Objects; + import lombok.AllArgsConstructor; import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/fixeddeposits/FixedDepositImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/fixeddeposits/FixedDepositImportHandler.java index 8c2bbac9d47..c8af2db2ca4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/fixeddeposits/FixedDepositImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/fixeddeposits/FixedDepositImportHandler.java @@ -6,9 +6,9 @@ * 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 @@ -22,10 +22,12 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -79,8 +81,8 @@ public Count process(final Workbook workbook, final String locale, final String } private void readExcelFile(final Workbook workbook, final List savings, - final List approvalDates, final List activationDates, - final List closedOnDate, final List statuses, final String locale, final String dateFormat) { + final List approvalDates, final List activationDates, + final List closedOnDate, final List statuses, final String locale, final String dateFormat) { Sheet savingsSheet = workbook.getSheet(TemplatePopulateImportConstants.FIXED_DEPOSIT_SHEET_NAME); Integer noOfEntries = ImportHandlerUtils.getNumberOfRows(savingsSheet, TemplatePopulateImportConstants.FIRST_COLUMN_INDEX); for (int rowIndex = 1; rowIndex <= noOfEntries; rowIndex++) { @@ -127,7 +129,7 @@ private SavingsApproval readSavingsApproval(Row row, String locale, String dateF } private FixedDepositAccountData readSavings(final Workbook workbook, final List statuses, final Row row, final String locale, - final String dateFormat) { + final String dateFormat) { String productName = ImportHandlerUtils.readAsString(FixedDepositConstants.PRODUCT_COL, row); Long productId = ImportHandlerUtils.getIdByName(workbook.getSheet(TemplatePopulateImportConstants.PRODUCT_SHEET_NAME), productName); @@ -270,8 +272,8 @@ private FixedDepositAccountData readSavings(final Workbook workbook, final List< } private Count importEntity(final Workbook workbook, final List savings, - final List approvalDates, final List activationDates, - final List closedOnDates, final List statuses, String dateFormat) { + final List approvalDates, final List activationDates, + final List closedOnDates, final List statuses, String dateFormat) { Sheet savingsSheet = workbook.getSheet(TemplatePopulateImportConstants.FIXED_DEPOSIT_SHEET_NAME); int successCount = 0; int errorCount = 0; @@ -323,7 +325,7 @@ private Count importEntity(final Workbook workbook, final List closedOnDates, final Long savingsId, final int i, - final String dateFormat) { + final String dateFormat) { if (closedOnDates.get(i) != null) { GsonBuilder gsonBuilder = GoogleGsonSerializerHelper.createGsonBuilder(); gsonBuilder.registerTypeAdapter(LocalDate.class, new DateSerializer(dateFormat, closedOnDates.get(i).getLocale())); @@ -380,7 +382,7 @@ private CommandProcessingResult importSavings(List savi } private int importSavingsApproval(final List approvalDates, final Long savingsId, final int i, - final String dateFormat) { + final String dateFormat) { if (approvalDates.get(i) != null) { GsonBuilder gsonBuilder = GoogleGsonSerializerHelper.createGsonBuilder(); gsonBuilder.registerTypeAdapter(LocalDate.class, new DateSerializer(dateFormat, approvalDates.get(i).getLocale())); @@ -395,7 +397,7 @@ private int importSavingsApproval(final List approvalDates, fin } private int importSavingsActivation(final List activationDates, final Long savingsId, final int i, - final String dateFormat) { + final String dateFormat) { if (activationDates.get(i) != null) { GsonBuilder gsonBuilder = GoogleGsonSerializerHelper.createGsonBuilder(); gsonBuilder.registerTypeAdapter(LocalDate.class, new DateSerializer(dateFormat, activationDates.get(i).getLocale())); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/fixeddeposits/FixedDepositTransactionImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/fixeddeposits/FixedDepositTransactionImportHandler.java index 1a56ab944c6..fdb37dfa547 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/fixeddeposits/FixedDepositTransactionImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/fixeddeposits/FixedDepositTransactionImportHandler.java @@ -6,9 +6,9 @@ * 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 @@ -20,10 +20,12 @@ import com.google.gson.GsonBuilder; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -85,7 +87,7 @@ public List readExcelFile(final Workbook workbook } private SavingsAccountTransactionData readSavingsTransaction(final Workbook workbook, final Row row, Long savingsAccountId, - final String locale, final String dateFormat) { + final String locale, final String dateFormat) { Long newSavingsAccountId = ImportHandlerUtils.readAsLong(TransactionConstants.SAVINGS_ACCOUNT_NO_COL, row); if (newSavingsAccountId != null) { @@ -117,7 +119,7 @@ private SavingsAccountTransactionData readSavingsTransaction(final Workbook work } public Count importEntity(final Workbook workbook, final List savingsTransactions, - final String dateFormat, final String locale) { + final String dateFormat, final String locale) { Sheet savingsTransactionSheet = workbook.getSheet(TemplatePopulateImportConstants.FIXED_DEPOSIT_TRANSACTION_SHEET_NAME); int successCount = 0; int errorCount = 0; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/group/GroupImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/group/GroupImportHandler.java index 227da531c7a..d343c9e307e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/group/GroupImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/group/GroupImportHandler.java @@ -6,9 +6,9 @@ * 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 @@ -20,12 +20,14 @@ import com.google.common.reflect.TypeToken; import com.google.gson.GsonBuilder; + import java.lang.reflect.Type; import java.time.LocalDate; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Objects; + import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.IdempotencyKeyGenerator; @@ -64,7 +66,7 @@ public class GroupImportHandler implements ImportHandler { @Autowired public GroupImportHandler(final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService, - IdempotencyKeyGenerator idempotencyKeyGenerator) { + IdempotencyKeyGenerator idempotencyKeyGenerator) { this.commandsSourceWritePlatformService = commandsSourceWritePlatformService; this.idempotencyKeyGenerator = idempotencyKeyGenerator; } @@ -80,7 +82,7 @@ public Count process(final Workbook workbook, final String locale, final String } private void readExcelFile(final Workbook workbook, final List groups, final List meetings, - final List statuses, final String locale, final String dateFormat) { + final List statuses, final String locale, final String dateFormat) { Sheet groupsSheet = workbook.getSheet(TemplatePopulateImportConstants.GROUP_SHEET_NAME); Integer noOfEntries = ImportHandlerUtils.getNumberOfRows(groupsSheet, TemplatePopulateImportConstants.FIRST_COLUMN_INDEX); for (int rowIndex = 1; rowIndex <= noOfEntries; rowIndex++) { @@ -115,7 +117,7 @@ private CalendarData readMeeting(Row row, String locale, String dateFormat) { } private GroupGeneralData readGroup(final Workbook workbook, final Row row, final List statuses, final String locale, - final String dateFormat) { + final String dateFormat) { String status = ImportHandlerUtils.readAsString(GroupConstants.STATUS_COL, row); String officeName = ImportHandlerUtils.readAsString(GroupConstants.OFFICE_NAME_COL, row); Long officeId = ImportHandlerUtils.getIdByName(workbook.getSheet(TemplatePopulateImportConstants.OFFICE_SHEET_NAME), officeName); @@ -167,7 +169,7 @@ private boolean containsClientId(List clientMembers, Long clientId) } private Count importEntity(final Workbook workbook, final List groups, final List meetings, - final List statuses, final String dateFormat) { + final List statuses, final String dateFormat) { Sheet groupSheet = workbook.getSheet(TemplatePopulateImportConstants.GROUP_SHEET_NAME); int successCount = 0; int errorCount = 0; @@ -189,7 +191,7 @@ private Count importEntity(final Workbook workbook, final List progressLevel = 1; } else { groupId = Objects.requireNonNull( - ImportHandlerUtils.readAsInt(GroupConstants.GROUP_ID_COL, groupSheet.getRow(groups.get(i).getRowIndex()))) + ImportHandlerUtils.readAsInt(GroupConstants.GROUP_ID_COL, groupSheet.getRow(groups.get(i).getRowIndex()))) .toString(); } @@ -212,7 +214,7 @@ private Count importEntity(final Workbook workbook, final List } private void writeGroupErrorMessage(final Workbook workbook, final String groupId, final String errorMessage, final int progressLevel, - final Cell statusCell, final Cell errorReportCell, final Row row) { + final Cell statusCell, final Cell errorReportCell, final Row row) { String status = ""; if (progressLevel == 0) { status = TemplatePopulateImportConstants.STATUS_CREATION_FAILED; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/guarantor/GuarantorImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/guarantor/GuarantorImportHandler.java index c51be9c6382..69af4e02411 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/guarantor/GuarantorImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/guarantor/GuarantorImportHandler.java @@ -6,9 +6,9 @@ * 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 @@ -21,10 +21,12 @@ import com.google.common.base.Splitter; import com.google.gson.GsonBuilder; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -80,7 +82,7 @@ private List readExcelFile(final Workbook workbook, final String } private GuarantorData readGuarantor(final Workbook workbook, final Row row, Long loanAccountId, final String locale, - final String dateFormat) { + final String dateFormat) { String loanaccountInfo = ImportHandlerUtils.readAsString(GuarantorConstants.LOAN_ACCOUNT_NO_COL, row); if (loanaccountInfo != null) { List loanAccountAr = Splitter.on(SEPARATOR).splitToList(loanaccountInfo); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/ClientIdSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/ClientIdSerializer.java index 28aab755637..3b5d0779b31 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/ClientIdSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/ClientIdSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; + import java.lang.reflect.Type; import java.util.Collection; + import org.apache.fineract.portfolio.client.data.ClientData; public class ClientIdSerializer implements JsonSerializer> { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/CodeValueDataIdSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/CodeValueDataIdSerializer.java index 97bb215edfa..a04b750341d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/CodeValueDataIdSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/CodeValueDataIdSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; + import java.lang.reflect.Type; + import org.apache.fineract.infrastructure.codes.data.CodeValueData; public class CodeValueDataIdSerializer implements JsonSerializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/CurrencyDateCodeSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/CurrencyDateCodeSerializer.java index 6c4fc28bd23..409b25f095c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/CurrencyDateCodeSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/CurrencyDateCodeSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; + import java.lang.reflect.Type; + import org.apache.fineract.organisation.monetary.data.CurrencyData; public class CurrencyDateCodeSerializer implements JsonSerializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/DateSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/DateSerializer.java index bf83256b2e7..63dadd579c8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/DateSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/DateSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -22,10 +22,12 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; + import java.lang.reflect.Type; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.Locale; + import org.apache.commons.lang3.StringUtils; public class DateSerializer implements JsonSerializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/EnumOptionDataIdSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/EnumOptionDataIdSerializer.java index 07c0ec409fd..d0679aa7aaa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/EnumOptionDataIdSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/EnumOptionDataIdSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; + import java.lang.reflect.Type; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; public class EnumOptionDataIdSerializer implements JsonSerializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/EnumOptionDataValueSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/EnumOptionDataValueSerializer.java index 69b30dce7af..3496f40c50f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/EnumOptionDataValueSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/EnumOptionDataValueSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; + import java.lang.reflect.Type; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; public class EnumOptionDataValueSerializer implements JsonSerializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/GroupIdSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/GroupIdSerializer.java index 9faaf411392..7f324901388 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/GroupIdSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/GroupIdSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; + import java.lang.reflect.Type; import java.util.Collection; + import org.apache.fineract.portfolio.group.data.GroupGeneralData; public class GroupIdSerializer implements JsonSerializer> { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/SavingsAccountTransactionEnumValueSerialiser.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/SavingsAccountTransactionEnumValueSerialiser.java index 0b457690f18..600908de455 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/SavingsAccountTransactionEnumValueSerialiser.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/helper/SavingsAccountTransactionEnumValueSerialiser.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.gson.JsonPrimitive; import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializer; + import java.lang.reflect.Type; + import org.apache.fineract.portfolio.savings.data.SavingsAccountTransactionEnumData; public class SavingsAccountTransactionEnumValueSerialiser implements JsonSerializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/journalentry/JournalEntriesImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/journalentry/JournalEntriesImportHandler.java index 1f326ca412c..db0c2dca0db 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/journalentry/JournalEntriesImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/journalentry/JournalEntriesImportHandler.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.infrastructure.bulkimport.importhandler.journalentry; import com.google.gson.GsonBuilder; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.accounting.journalentry.data.CreditDebit; import org.apache.fineract.accounting.journalentry.data.JournalEntryData; import org.apache.fineract.commands.domain.CommandWrapper; @@ -127,7 +129,7 @@ private List readExcelFile(final Workbook workbook, final Stri } private JournalEntryData readAddJournalEntries(final Workbook workbook, final Row row, LocalDate transactionDate, final String locale, - final String dateFormat) { + final String dateFormat) { LocalDate transactionDateCheck = ImportHandlerUtils.readAsDate(JournalEntryConstants.TRANSACION_ON_DATE_COL, row); if (transactionDateCheck != null) { transactionDate = transactionDateCheck; @@ -186,7 +188,7 @@ private JournalEntryData readAddJournalEntries(final Workbook workbook, final Ro } private Count importEntity(final Workbook workbook, final List glTransactions, String dateFormat, - final String locale) { + final String locale) { Sheet addJournalEntriesSheet = workbook.getSheet(TemplatePopulateImportConstants.JOURNAL_ENTRY_SHEET_NAME); int successCount = 0; int errorCount = 0; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/loan/LoanImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/loan/LoanImportHandler.java index ec811858a92..e1e24ea8db8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/loan/LoanImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/loan/LoanImportHandler.java @@ -6,9 +6,9 @@ * 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 @@ -22,12 +22,14 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Objects; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.commands.domain.CommandWrapper; @@ -84,8 +86,8 @@ public Count process(final Workbook workbook, final String locale, final String } private void readExcelFile(final Workbook workbook, final List loans, final List approvalDates, - final List loanRepayments, final List disbursalDates, List statuses, - final String locale, final String dateFormat) { + final List loanRepayments, final List disbursalDates, List statuses, + final String locale, final String dateFormat) { Sheet loanSheet = workbook.getSheet(TemplatePopulateImportConstants.LOANS_SHEET_NAME); Integer noOfEntries = ImportHandlerUtils.getNumberOfRows(loanSheet, TemplatePopulateImportConstants.FIRST_COLUMN_INDEX); for (int rowIndex = 1; rowIndex <= noOfEntries; rowIndex++) { @@ -140,7 +142,7 @@ private LoanApprovalData readLoanApproval(final Row row, final String locale, fi } private LoanAccountData readLoan(final Workbook workbook, final Row row, final List statuses, final String locale, - final String dateFormat) { + final String dateFormat) { ExternalId externalId = ExternalIdFactory.produce(ImportHandlerUtils.readAsString(LoanConstants.EXTERNAL_ID_COL, row)); String status = ImportHandlerUtils.readAsString(LoanConstants.STATUS_COL, row); String productName = ImportHandlerUtils.readAsString(LoanConstants.PRODUCT_COL, row); @@ -375,8 +377,8 @@ private LoanAccountData readLoan(final Workbook workbook, final Row row, final L } private Count importEntity(final Workbook workbook, final List loans, final List approvalDates, - final List loanRepayments, final List disbursalDates, final List statuses, - final String dateFormat) { + final List loanRepayments, final List disbursalDates, final List statuses, + final String dateFormat) { Sheet loanSheet = workbook.getSheet(TemplatePopulateImportConstants.LOANS_SHEET_NAME); int successCount = 0; int errorCount = 0; @@ -429,7 +431,7 @@ private Count importEntity(final Workbook workbook, final List } private void writeLoanErrorMessage(final Workbook workbook, final String loanId, final String errorMessage, final int progressLevel, - final Cell statusCell, final Cell errorReportCell, final Row row) { + final Cell statusCell, final Cell errorReportCell, final Row row) { String status = EMPTY_STR; if (progressLevel == 0) { status = TemplatePopulateImportConstants.STATUS_CREATION_FAILED; @@ -458,7 +460,7 @@ private void setReportHeaders(Sheet sheet) { } private Integer importLoanRepayment(final List loanRepayments, final CommandProcessingResult result, - final int rowIndex, final String dateFormat) { + final int rowIndex, final String dateFormat) { GsonBuilder gsonBuilder = GoogleGsonSerializerHelper.createGsonBuilder(); gsonBuilder.registerTypeAdapter(LocalDate.class, new DateSerializer(dateFormat, loanRepayments.get(rowIndex).getLocale())); JsonObject loanRepaymentJsonob = gsonBuilder.create().toJsonTree(loanRepayments.get(rowIndex)).getAsJsonObject(); @@ -476,7 +478,7 @@ private Integer importLoanRepayment(final List loanRepaymen } private Integer importDisbursalData(final List approvalDates, final List disbursalDates, - final CommandProcessingResult result, final int rowIndex, final String dateFormat) { + final CommandProcessingResult result, final int rowIndex, final String dateFormat) { if (approvalDates.get(rowIndex) != null && disbursalDates.get(rowIndex) != null) { DisbursementData disbusalData = disbursalDates.get(rowIndex); @@ -504,7 +506,7 @@ private Integer importDisbursalData(final List approvalDates, } private Integer importLoanApproval(final List approvalDates, final CommandProcessingResult result, final int rowIndex, - final String dateFormat) { + final String dateFormat) { if (approvalDates.get(rowIndex) != null) { GsonBuilder gsonBuilder = GoogleGsonSerializerHelper.createGsonBuilder(); gsonBuilder.registerTypeAdapter(LocalDate.class, new DateSerializer(dateFormat, approvalDates.get(rowIndex).getLocale())); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/loanrepayment/LoanRepaymentImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/loanrepayment/LoanRepaymentImportHandler.java index 72f90c4c7be..3637d37510f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/loanrepayment/LoanRepaymentImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/loanrepayment/LoanRepaymentImportHandler.java @@ -6,9 +6,9 @@ * 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 @@ -21,10 +21,12 @@ import com.google.common.base.Splitter; import com.google.gson.GsonBuilder; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -59,7 +61,7 @@ public class LoanRepaymentImportHandler implements ImportHandler { @Autowired public LoanRepaymentImportHandler(final PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService, - final LoanReadPlatformService loanReadPlatformService) { + final LoanReadPlatformService loanReadPlatformService) { this.commandsSourceWritePlatformService = commandsSourceWritePlatformService; this.loanReadPlatformService = loanReadPlatformService; } @@ -87,7 +89,7 @@ private List readExcelFile(final Workbook workbook, final S } private LoanTransactionData readLoanRepayment(final Workbook workbook, Long loanAccountId, final Row row, final String locale, - final String dateFormat) { + final String dateFormat) { String loanaccountInfo = ImportHandlerUtils.readAsString(LoanRepaymentConstants.LOAN_ACCOUNT_NO_COL, row); if (loanaccountInfo != null) { List loanAccountAr = Splitter.on(SEPARATOR).splitToList(loanaccountInfo); @@ -111,7 +113,7 @@ private LoanTransactionData readLoanRepayment(final Workbook workbook, Long loan } private Count importEntity(final Workbook workbook, final List loanRepayments, final String dateFormat, - final String locale) { + final String locale) { Sheet loanRepaymentSheet = workbook.getSheet(TemplatePopulateImportConstants.LOAN_REPAYMENT_SHEET_NAME); int successCount = 0; int errorCount = 0; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/office/OfficeImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/office/OfficeImportHandler.java index 1f0c3838d23..be2eae04a3d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/office/OfficeImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/office/OfficeImportHandler.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.infrastructure.bulkimport.importhandler.office; import com.google.gson.GsonBuilder; + import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/recurringdeposit/RecurringDepositImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/recurringdeposit/RecurringDepositImportHandler.java index e84cf3f329e..93e83fbb3c2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/recurringdeposit/RecurringDepositImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/recurringdeposit/RecurringDepositImportHandler.java @@ -6,9 +6,9 @@ * 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 @@ -20,10 +20,12 @@ import com.google.gson.GsonBuilder; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -77,8 +79,8 @@ public Count process(final Workbook workbook, final String locale, final String } private void readExcelFile(final Workbook workbook, final List savings, - final List approvalDates, final List activationDates, final List statuses, - final String locale, final String dateFormat) { + final List approvalDates, final List activationDates, final List statuses, + final String locale, final String dateFormat) { Sheet savingsSheet = workbook.getSheet(TemplatePopulateImportConstants.RECURRING_DEPOSIT_SHEET_NAME); Integer noOfEntries = ImportHandlerUtils.getNumberOfRows(savingsSheet, TemplatePopulateImportConstants.ROWHEADER_INDEX); for (int rowIndex = 1; rowIndex <= noOfEntries; rowIndex++) { @@ -112,7 +114,7 @@ private SavingsApproval readSavingsApproval(final Row row, final String locale, } private RecurringDepositAccountData readSavings(final Workbook workbook, final Row row, final List statuses, - final String locale, final String dateFormat) { + final String locale, final String dateFormat) { String productName = ImportHandlerUtils.readAsString(RecurringDepositConstants.PRODUCT_COL, row); Long productId = ImportHandlerUtils.getIdByName(workbook.getSheet(TemplatePopulateImportConstants.PRODUCT_SHEET_NAME), productName); @@ -272,8 +274,8 @@ private RecurringDepositAccountData readSavings(final Workbook workbook, final R } private Count importEntity(final Workbook workbook, final List savings, - final List approvalDates, final List activationDates, final List statuses, - final String dateFormat) { + final List approvalDates, final List activationDates, final List statuses, + final String dateFormat) { Sheet savingsSheet = workbook.getSheet(TemplatePopulateImportConstants.RECURRING_DEPOSIT_SHEET_NAME); int successCount = 0; int errorCount = 0; @@ -319,7 +321,7 @@ private Count importEntity(final Workbook workbook, final List activationDates, final Long savingsId, final int i, - final String dateFormat) { + final String dateFormat) { if (activationDates.get(i) != null) { GsonBuilder gsonBuilder = GoogleGsonSerializerHelper.createGsonBuilder(); gsonBuilder.registerTypeAdapter(LocalDate.class, new DateSerializer(dateFormat)); @@ -362,7 +364,7 @@ private int importSavingsActivation(final List activationDate } private int importSavingsApproval(final List approvalDates, final Long savingsId, final int i, - final String dateFormat) { + final String dateFormat) { if (approvalDates.get(i) != null) { GsonBuilder gsonBuilder = GoogleGsonSerializerHelper.createGsonBuilder(); gsonBuilder.registerTypeAdapter(LocalDate.class, new DateSerializer(dateFormat)); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/recurringdeposit/RecurringDepositTransactionImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/recurringdeposit/RecurringDepositTransactionImportHandler.java index e4c01756d97..24fcdc2bd1c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/recurringdeposit/RecurringDepositTransactionImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/recurringdeposit/RecurringDepositTransactionImportHandler.java @@ -6,9 +6,9 @@ * 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 @@ -20,10 +20,12 @@ import com.google.gson.GsonBuilder; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -82,7 +84,7 @@ public List readExcelFile(final Workbook workbook } private SavingsAccountTransactionData readSavingsTransaction(final Workbook workbook, final Row row, Long savingsAccountId, - final String locale, final String dateFormat) { + final String locale, final String dateFormat) { Long internalSavingsAccountId = ImportHandlerUtils.readAsLong(TransactionConstants.SAVINGS_ACCOUNT_NO_COL, row); if (internalSavingsAccountId != null) { @@ -113,7 +115,7 @@ private SavingsAccountTransactionData readSavingsTransaction(final Workbook work } public Count importEntity(final Workbook workbook, final List savingsTransactions, - final String dateFormat, final String locale) { + final String dateFormat, final String locale) { Sheet savingsTransactionSheet = workbook.getSheet(TemplatePopulateImportConstants.SAVINGS_TRANSACTION_SHEET_NAME); int successCount = 0; int errorCount = 0; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/savings/SavingsImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/savings/SavingsImportHandler.java index d3cc0b5d3ea..dadc3fa7b31 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/savings/SavingsImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/savings/SavingsImportHandler.java @@ -6,9 +6,9 @@ * 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 @@ -20,11 +20,13 @@ import com.google.gson.GsonBuilder; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; import java.util.Locale; + import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -81,7 +83,7 @@ public Count process(final Workbook workbook, final String locale, final String } public void readExcelFile(final Workbook workbook, final List savings, final List approvalDates, - final List activationDates, final List statuses, final String locale, final String dateFormat) { + final List activationDates, final List statuses, final String locale, final String dateFormat) { Sheet savingsSheet = workbook.getSheet(TemplatePopulateImportConstants.SAVINGS_ACCOUNTS_SHEET_NAME); Integer noOfEntries = ImportHandlerUtils.getNumberOfRows(savingsSheet, TemplatePopulateImportConstants.FIRST_COLUMN_INDEX); for (int rowIndex = 1; rowIndex <= noOfEntries; rowIndex++) { @@ -114,7 +116,7 @@ private SavingsApproval readSavingsApproval(Row row, String locale, String dateF } private SavingsAccountData readSavings(final Workbook workbook, final Row row, final List statuses, final String locale, - final String dateFormat) { + final String dateFormat) { String productName = ImportHandlerUtils.readAsString(SavingsConstants.PRODUCT_COL, row); Long productId = ImportHandlerUtils.getIdByName(workbook.getSheet(TemplatePopulateImportConstants.PRODUCT_SHEET_NAME), productName); String fieldOfficerName = ImportHandlerUtils.readAsString(SavingsConstants.FIELD_OFFICER_NAME_COL, row); @@ -269,7 +271,7 @@ private SavingsAccountData readSavings(final Workbook workbook, final Row row, f } public Count importEntity(final Workbook workbook, final List savings, final List approvalDates, - final List activationDates, final List statuses, final String dateFormat) { + final List activationDates, final List statuses, final String dateFormat) { Sheet savingsSheet = workbook.getSheet(TemplatePopulateImportConstants.SAVINGS_ACCOUNTS_SHEET_NAME); int successCount = 0; int errorCount = 0; @@ -315,7 +317,7 @@ public Count importEntity(final Workbook workbook, final List activationDates, final Long savingsId, final int i, - final String dateFormat) { + final String dateFormat) { if (activationDates.get(i) != null) { GsonBuilder gsonBuilder = GoogleGsonSerializerHelper.createGsonBuilder(); gsonBuilder.registerTypeAdapter(LocalDate.class, new DateSerializer(dateFormat, activationDates.get(i).getLocale())); @@ -361,7 +363,7 @@ private int importSavingsActivation(final List activationDate } private int importSavingsApproval(final List approvalDates, final Long savingsId, final int i, - final String dateFormat) { + final String dateFormat) { if (approvalDates.get(i) != null) { GsonBuilder gsonBuilder = GoogleGsonSerializerHelper.createGsonBuilder(); gsonBuilder.registerTypeAdapter(LocalDate.class, new DateSerializer(dateFormat, approvalDates.get(i).getLocale())); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/savings/SavingsTransactionImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/savings/SavingsTransactionImportHandler.java index 49c9534ce85..49ebc5805f5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/savings/SavingsTransactionImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/savings/SavingsTransactionImportHandler.java @@ -6,9 +6,9 @@ * 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 @@ -20,10 +20,12 @@ import com.google.gson.GsonBuilder; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -85,7 +87,7 @@ private List readExcelFile(final Workbook workboo } private SavingsAccountTransactionData readSavingsTransaction(final Workbook workbook, final Row row, Long savingsAccountId, - final String locale, final String dateFormat) { + final String locale, final String dateFormat) { Long savingsAccountIdCheck = ImportHandlerUtils.readAsLong(TransactionConstants.SAVINGS_ACCOUNT_NO_COL, row); if (savingsAccountIdCheck != null) { @@ -116,7 +118,7 @@ private SavingsAccountTransactionData readSavingsTransaction(final Workbook work } private Count importEntity(final Workbook workbook, final List savingsTransactions, - final String dateFormat, final String locale) { + final String dateFormat, final String locale) { Sheet savingsTransactionSheet = workbook.getSheet(TemplatePopulateImportConstants.SAVINGS_TRANSACTION_SHEET_NAME); int successCount = 0; int errorCount = 0; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/sharedaccount/SharedAccountImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/sharedaccount/SharedAccountImportHandler.java index 03aea468094..13077e0b2b9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/sharedaccount/SharedAccountImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/sharedaccount/SharedAccountImportHandler.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.infrastructure.bulkimport.importhandler.sharedaccount; import com.google.gson.GsonBuilder; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; @@ -68,7 +70,7 @@ public Count process(final Workbook workbook, final String locale, final String } private void readExcelFile(final Workbook workbook, final List shareAccountDataList, final List statuses, - final String locale, String dateFormat) { + final String locale, String dateFormat) { Sheet sharedAccountsSheet = workbook.getSheet(TemplatePopulateImportConstants.SHARED_ACCOUNTS_SHEET_NAME); Integer noOfEntries = ImportHandlerUtils.getNumberOfRows(sharedAccountsSheet, TemplatePopulateImportConstants.FIRST_COLUMN_INDEX); for (int rowIndex = 1; rowIndex <= noOfEntries; rowIndex++) { @@ -81,7 +83,7 @@ private void readExcelFile(final Workbook workbook, final List } private ShareAccountData readSharedAccount(final Workbook workbook, final Row row, final List statuses, final String locale, - final String dateFormat) { + final String dateFormat) { String clientName = ImportHandlerUtils.readAsString(SharedAccountsConstants.CLIENT_NAME_COL, row); Long clientId = ImportHandlerUtils.getIdByName(workbook.getSheet(TemplatePopulateImportConstants.CLIENT_SHEET_NAME), clientName); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/staff/StaffImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/staff/StaffImportHandler.java index 7849e3d6c7b..842e2722bc6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/staff/StaffImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/staff/StaffImportHandler.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.infrastructure.bulkimport.importhandler.staff; import com.google.gson.GsonBuilder; + import java.time.LocalDate; import java.util.ArrayList; import java.util.List; import java.util.function.Supplier; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.command.core.CommandDispatcher; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/users/UserImportHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/users/UserImportHandler.java index f7cb1ec5149..2cab2d068a8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/users/UserImportHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/importhandler/users/UserImportHandler.java @@ -6,9 +6,9 @@ * 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 @@ -20,8 +20,10 @@ import com.google.gson.GsonBuilder; import com.google.gson.JsonObject; + import java.util.ArrayList; import java.util.List; + import org.apache.fineract.commands.domain.CommandWrapper; import org.apache.fineract.commands.service.CommandWrapperBuilder; import org.apache.fineract.commands.service.PortfolioCommandSourceWritePlatformService; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/mapping/ImportDocumentMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/mapping/ImportDocumentMapper.java index 6c79d076e4a..c36405c0b31 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/mapping/ImportDocumentMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/mapping/ImportDocumentMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/AbstractWorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/AbstractWorkbookPopulator.java index 8f7779b32fc..a940fdc94b8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/AbstractWorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/AbstractWorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.time.format.DateTimeParseException; import java.util.List; import java.util.regex.Pattern; + import org.apache.fineract.organisation.office.data.OfficeData; import org.apache.fineract.portfolio.client.data.ClientData; import org.apache.fineract.portfolio.group.data.GroupGeneralData; @@ -91,7 +92,7 @@ protected void writeBigDecimal(int colIndex, Row row, BigDecimal value) { } protected void setOfficeDateLookupTable(Sheet sheet, List offices, int officeNameCol, int activationDateCol, - String dateFormat) { + String dateFormat) { if (offices != null) { Workbook workbook = sheet.getWorkbook(); CellStyle dateCellStyle = workbook.createCellStyle(); @@ -108,7 +109,7 @@ protected void setOfficeDateLookupTable(Sheet sheet, List offices, i } protected void setClientAndGroupDateLookupTable(Sheet sheet, List clients, List groups, int nameCol, - int activationDateCol, boolean containsClientExtId, String dateFormat) { + int activationDateCol, boolean containsClientExtId, String dateFormat) { Workbook workbook = sheet.getWorkbook(); CellStyle dateCellStyle = workbook.createCellStyle(); short df = workbook.createDataFormat().getFormat(dateFormat); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/CenterSheetPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/CenterSheetPopulator.java index d3dad4e89b7..ab2bda6bab9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/CenterSheetPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/CenterSheetPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.organisation.office.data.OfficeData; import org.apache.fineract.portfolio.group.data.CenterData; @@ -83,9 +84,9 @@ private void populateCentersByOfficeName(Sheet centerSheet) { writeLong(CENTER_ID_COL, row, centerNameToCenterId.get(centerName)); row = centerSheet.createRow(++rowIndex); } - officeNameToBeginEndIndexesOfCenters.put(officeIndex++, new Integer[] { startIndex, rowIndex }); + officeNameToBeginEndIndexesOfCenters.put(officeIndex++, new Integer[]{startIndex, rowIndex}); } else { - officeNameToBeginEndIndexesOfCenters.put(officeIndex++, new Integer[] { startIndex, rowIndex + 1 }); + officeNameToBeginEndIndexesOfCenters.put(officeIndex++, new Integer[]{startIndex, rowIndex + 1}); } } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/ChargeSheetPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/ChargeSheetPopulator.java index f3ef2164c0f..647f09f6b7b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/ChargeSheetPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/ChargeSheetPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.ChargeConstants; import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.portfolio.charge.data.ChargeData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/ClientSheetPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/ClientSheetPopulator.java index 0fd74fe2702..73c402570c8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/ClientSheetPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/ClientSheetPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.organisation.office.data.OfficeData; import org.apache.fineract.portfolio.client.data.ClientData; @@ -123,7 +124,7 @@ private void populateClientsByOfficeName(Sheet clientSheet) { writeLong(CLIENT_ID_COL, row, clientNameToClientId.get(clientName)); row = clientSheet.createRow(++rowIndex); } - officeNameToBeginEndIndexesOfClients.put(officeIndex++, new Integer[] { startIndex, rowIndex }); + officeNameToBeginEndIndexesOfClients.put(officeIndex++, new Integer[]{startIndex, rowIndex}); } else { officeIndex++; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/ExtrasSheetPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/ExtrasSheetPopulator.java index 7c930d709aa..29e0d7a429d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/ExtrasSheetPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/ExtrasSheetPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.portfolio.fund.data.FundData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/FixedDepositProductSheetPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/FixedDepositProductSheetPopulator.java index 17db4422ca9..58c1825750d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/FixedDepositProductSheetPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/FixedDepositProductSheetPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.portfolio.savings.data.FixedDepositProductData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/GlAccountSheetPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/GlAccountSheetPopulator.java index decb499c8f0..1d242f3b321 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/GlAccountSheetPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/GlAccountSheetPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator; import java.util.List; + import org.apache.fineract.accounting.glaccount.data.GLAccountData; import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.poi.ss.usermodel.Row; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/GroupSheetPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/GroupSheetPopulator.java index f3fb1a85ee6..3abc3f161ac 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/GroupSheetPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/GroupSheetPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.organisation.office.data.OfficeData; import org.apache.fineract.portfolio.group.data.GroupGeneralData; @@ -106,9 +107,9 @@ private void populateGroupsByOfficeName(Sheet groupSheet) { writeLong(GROUP_ID_COL, row, groupNameToGroupId.get(groupName)); row = groupSheet.createRow(++rowIndex); } - officeNameToBeginEndIndexesOfGroups.put(officeIndex++, new Integer[] { startIndex, rowIndex }); + officeNameToBeginEndIndexesOfGroups.put(officeIndex++, new Integer[]{startIndex, rowIndex}); } else { - officeNameToBeginEndIndexesOfGroups.put(officeIndex++, new Integer[] { startIndex, rowIndex + 1 }); + officeNameToBeginEndIndexesOfGroups.put(officeIndex++, new Integer[]{startIndex, rowIndex + 1}); } } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/LoanProductSheetPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/LoanProductSheetPopulator.java index 465fb29828a..911520b6103 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/LoanProductSheetPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/LoanProductSheetPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.portfolio.loanproduct.data.LoanProductData; import org.apache.poi.ss.usermodel.CellStyle; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/OfficeSheetPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/OfficeSheetPopulator.java index c0a979c830a..719ed1b3cb0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/OfficeSheetPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/OfficeSheetPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.organisation.office.data.OfficeData; import org.apache.poi.ss.usermodel.Row; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/PersonnelSheetPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/PersonnelSheetPopulator.java index 8c19deca146..d986d58a683 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/PersonnelSheetPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/PersonnelSheetPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.organisation.office.data.OfficeData; import org.apache.fineract.organisation.staff.data.StaffData; @@ -88,7 +89,7 @@ private void populateStaffByOfficeName(Sheet staffSheet) { writeLong(STAFF_ID_COL, row, staff.getId()); row = staffSheet.createRow(++rowIndex); } - officeNameToBeginEndIndexesOfStaff.put(officeIndex++, new Integer[] { startIndex, rowIndex }); + officeNameToBeginEndIndexesOfStaff.put(officeIndex++, new Integer[]{startIndex, rowIndex}); } } else { officeIndex++; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/RecurringDepositProductSheetPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/RecurringDepositProductSheetPopulator.java index 26da0b63c92..d94d2764977 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/RecurringDepositProductSheetPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/RecurringDepositProductSheetPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.portfolio.savings.data.RecurringDepositProductData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/RoleSheetPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/RoleSheetPopulator.java index 112c222dc4d..5713239face 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/RoleSheetPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/RoleSheetPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.useradministration.data.RoleData; import org.apache.poi.ss.usermodel.Row; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/SavingsAccountSheetPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/SavingsAccountSheetPopulator.java index f33bdc3008c..1a54782a90b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/SavingsAccountSheetPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/SavingsAccountSheetPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.portfolio.savings.data.SavingsAccountData; import org.apache.poi.ss.usermodel.Row; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/SavingsProductSheetPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/SavingsProductSheetPopulator.java index c428b9e1a14..753e85f4e85 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/SavingsProductSheetPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/SavingsProductSheetPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.portfolio.savings.data.SavingsProductData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/SharedProductsSheetPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/SharedProductsSheetPopulator.java index 2807875e762..b3ce46f886d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/SharedProductsSheetPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/SharedProductsSheetPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.portfolio.charge.data.ChargeData; @@ -89,7 +90,7 @@ private void populateSheet(Sheet sharedProductsSheet) { endIndexCharges++; } } - productToBeginEndIndexesofCharges.put(productData.getId(), new Integer[] { startIndexCharges, endIndexCharges }); + productToBeginEndIndexesofCharges.put(productData.getId(), new Integer[]{startIndexCharges, endIndexCharges}); startIndexCharges = endIndexCharges + 1; } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/WorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/WorkbookPopulator.java index d67bdf2a281..38389131384 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/WorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/WorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/centers/CentersWorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/centers/CentersWorkbookPopulator.java index 22be567199e..f99d9c54820 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/centers/CentersWorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/centers/CentersWorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator.centers; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.CenterConstants; import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.bulkimport.populator.AbstractWorkbookPopulator; @@ -45,7 +46,7 @@ public class CentersWorkbookPopulator extends AbstractWorkbookPopulator { private final GroupSheetPopulator groupSheetPopulator; public CentersWorkbookPopulator(OfficeSheetPopulator officeSheetPopulator, PersonnelSheetPopulator personnelSheetPopulator, - GroupSheetPopulator groupSheetPopulator) { + GroupSheetPopulator groupSheetPopulator) { this.officeSheetPopulator = officeSheetPopulator; this.personnelSheetPopulator = personnelSheetPopulator; this.groupSheetPopulator = groupSheetPopulator; @@ -122,9 +123,9 @@ private void setLookupTable(Sheet centerSheet, String dateFormat) { writeInt(CenterConstants.LOOKUP_REPEAT_NORMAL_COL, centerSheet.getRow(rowIndex), rowIndex); } - String[] days = new String[] { TemplatePopulateImportConstants.MONDAY, TemplatePopulateImportConstants.TUESDAY, + String[] days = new String[]{TemplatePopulateImportConstants.MONDAY, TemplatePopulateImportConstants.TUESDAY, TemplatePopulateImportConstants.WEDNESDAY, TemplatePopulateImportConstants.THURSDAY, TemplatePopulateImportConstants.FRIDAY, - TemplatePopulateImportConstants.SATURDAY, TemplatePopulateImportConstants.SUNDAY }; + TemplatePopulateImportConstants.SATURDAY, TemplatePopulateImportConstants.SUNDAY}; for (rowIndex = 1; rowIndex <= 7; rowIndex++) { writeString(CenterConstants.LOOKUP_IF_REPEAT_WEEKLY_COL, centerSheet.getRow(rowIndex), days[rowIndex - 1]); @@ -164,14 +165,14 @@ private void setRules(Sheet worksheet, String dateFormat) { DataValidationConstraint activationDateConstraint = validationHelper.createDateConstraint( DataValidationConstraint.OperatorType.BETWEEN, "=VLOOKUP($B1,$IR$2:$IS" + (offices.size() + 1) + ",2,FALSE)", "=TODAY()", dateFormat); - DataValidationConstraint booleanConstraint = validationHelper.createExplicitListConstraint(new String[] { "True", "False" }); + DataValidationConstraint booleanConstraint = validationHelper.createExplicitListConstraint(new String[]{"True", "False"}); DataValidationConstraint submittedOnDateConstraint = validationHelper .createDateConstraint(DataValidationConstraint.OperatorType.LESS_OR_EQUAL, "=$F1", null, dateFormat); DataValidationConstraint meetingStartDateConstraint = validationHelper .createDateConstraint(DataValidationConstraint.OperatorType.BETWEEN, "=$F1", "=TODAY()", dateFormat); DataValidationConstraint repeatsConstraint = validationHelper.createExplicitListConstraint( - new String[] { TemplatePopulateImportConstants.FREQUENCY_DAILY, TemplatePopulateImportConstants.FREQUENCY_WEEKLY, - TemplatePopulateImportConstants.FREQUENCY_MONTHLY, TemplatePopulateImportConstants.FREQUENCY_YEARLY }); + new String[]{TemplatePopulateImportConstants.FREQUENCY_DAILY, TemplatePopulateImportConstants.FREQUENCY_WEEKLY, + TemplatePopulateImportConstants.FREQUENCY_MONTHLY, TemplatePopulateImportConstants.FREQUENCY_YEARLY}); DataValidationConstraint repeatsEveryConstraint = validationHelper.createFormulaListConstraint("INDIRECT($J1)"); DataValidationConstraint repeatsOnConstraint = validationHelper.createFormulaListConstraint("INDIRECT(CONCATENATE($J1,\"_DAYS\"))"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/charge/ChargeWorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/charge/ChargeWorkbookPopulator.java index 9316dcc2331..65cd7ef3bfb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/charge/ChargeWorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/charge/ChargeWorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/chartofaccounts/ChartOfAccountsWorkbook.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/chartofaccounts/ChartOfAccountsWorkbook.java index 38a2ca2cd5f..07bf6221dcf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/chartofaccounts/ChartOfAccountsWorkbook.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/chartofaccounts/ChartOfAccountsWorkbook.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.infrastructure.bulkimport.populator.chartofaccounts; import com.google.common.base.Splitter; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.accounting.glaccount.data.GLAccountData; import org.apache.fineract.accounting.glaccount.domain.GLAccountType; import org.apache.fineract.accounting.glaccount.domain.GLAccountUsage; @@ -114,22 +116,22 @@ private void setRules(Sheet chartOfAccountsSheet) { ChartOfAccountsConstants.TAG_COL, ChartOfAccountsConstants.TAG_COL); CellRangeAddressList officeNameRange = new CellRangeAddressList(1, SpreadsheetVersion.EXCEL97.getLastRowIndex(), ChartOfAccountsConstants.OFFICE_COL, ChartOfAccountsConstants.OFFICE_COL); // validation for opening bal - // office column + // office column CellRangeAddressList currencyCodeRange = new CellRangeAddressList(1, SpreadsheetVersion.EXCEL97.getLastRowIndex(), ChartOfAccountsConstants.CURRENCY_CODE, ChartOfAccountsConstants.CURRENCY_CODE);// validation for - // currency - // code for opening - // balance + // currency + // code for opening + // balance DataValidationHelper validationHelper = new HSSFDataValidationHelper((HSSFSheet) chartOfAccountsSheet); setNames(chartOfAccountsSheet, accountTypesNoDuplicatesList, offices); DataValidationConstraint accountTypeConstraint = validationHelper - .createExplicitListConstraint(new String[] { GLAccountType.ASSET.toString(), GLAccountType.LIABILITY.toString(), - GLAccountType.EQUITY.toString(), GLAccountType.INCOME.toString(), GLAccountType.EXPENSE.toString() }); + .createExplicitListConstraint(new String[]{GLAccountType.ASSET.toString(), GLAccountType.LIABILITY.toString(), + GLAccountType.EQUITY.toString(), GLAccountType.INCOME.toString(), GLAccountType.EXPENSE.toString()}); DataValidationConstraint accountUsageConstraint = validationHelper - .createExplicitListConstraint(new String[] { GLAccountUsage.DETAIL.toString(), GLAccountUsage.HEADER.toString() }); - DataValidationConstraint booleanConstraint = validationHelper.createExplicitListConstraint(new String[] { "True", "False" }); + .createExplicitListConstraint(new String[]{GLAccountUsage.DETAIL.toString(), GLAccountUsage.HEADER.toString()}); + DataValidationConstraint booleanConstraint = validationHelper.createExplicitListConstraint(new String[]{"True", "False"}); DataValidationConstraint parentConstraint = validationHelper .createFormulaListConstraint("INDIRECT(CONCATENATE(\"AccountName_\",$A1))"); DataValidationConstraint tagConstraint = validationHelper.createFormulaListConstraint("INDIRECT(CONCATENATE(\"Tags_\",$A1))"); @@ -247,7 +249,7 @@ private void setLookupTable(Sheet chartOfAccountsSheet) { rowIndex++; } } - accountTypeToBeginEndIndexesofAccountNames.put(accountTypeIndex++, new Integer[] { startIndex, rowIndex }); + accountTypeToBeginEndIndexesofAccountNames.put(accountTypeIndex++, new Integer[]{startIndex, rowIndex}); } else { accountTypeIndex++; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/client/ClientEntityWorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/client/ClientEntityWorkbookPopulator.java index 985d209f89b..259f79dc864 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/client/ClientEntityWorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/client/ClientEntityWorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator.client; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.ClientEntityConstants; import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.bulkimport.populator.AbstractWorkbookPopulator; @@ -54,9 +55,9 @@ public class ClientEntityWorkbookPopulator extends AbstractWorkbookPopulator { private final List mainBusinesslineCodeValues; public ClientEntityWorkbookPopulator(OfficeSheetPopulator officeSheetPopulator, PersonnelSheetPopulator personnelSheetPopulator, - List clientTypeCodeValues, List constitutionCodeValues, List mainBusinessline, - List clientClassification, List addressTypesCodeValues, - List stateProvinceCodeValues, List countryCodeValues) { + List clientTypeCodeValues, List constitutionCodeValues, List mainBusinessline, + List clientClassification, List addressTypesCodeValues, + List stateProvinceCodeValues, List countryCodeValues) { this.officeSheetPopulator = officeSheetPopulator; this.personnelSheetPopulator = personnelSheetPopulator; this.clientTypeCodeValues = clientTypeCodeValues; @@ -300,16 +301,16 @@ private void setRules(Sheet worksheet, String dateFormat) { .createDateConstraint(DataValidationConstraint.OperatorType.LESS_OR_EQUAL, "=TODAY()", null, dateFormat); DataValidationConstraint activationDateConstraint = validationHelper .createDateConstraint(DataValidationConstraint.OperatorType.GREATER_OR_EQUAL, "=$O1", null, dateFormat); - DataValidationConstraint activeConstraint = validationHelper.createExplicitListConstraint(new String[] { "True", "False" }); + DataValidationConstraint activeConstraint = validationHelper.createExplicitListConstraint(new String[]{"True", "False"}); DataValidationConstraint clientTypesConstraint = validationHelper.createFormulaListConstraint("ClientTypes"); DataValidationConstraint constitutionConstraint = validationHelper.createFormulaListConstraint("Constitution"); DataValidationConstraint mainBusinessLineConstraint = validationHelper.createFormulaListConstraint("MainBusinessLine"); DataValidationConstraint clientClassificationConstraint = validationHelper.createFormulaListConstraint("ClientClassification"); - DataValidationConstraint enabledAddressConstraint = validationHelper.createExplicitListConstraint(new String[] { "True", "False" }); + DataValidationConstraint enabledAddressConstraint = validationHelper.createExplicitListConstraint(new String[]{"True", "False"}); DataValidationConstraint addressTypeConstraint = validationHelper.createFormulaListConstraint("AddressType"); DataValidationConstraint stateProvinceConstraint = validationHelper.createFormulaListConstraint("StateProvince"); DataValidationConstraint countryConstraint = validationHelper.createFormulaListConstraint("Country"); - DataValidationConstraint activeAddressConstraint = validationHelper.createExplicitListConstraint(new String[] { "True", "False" }); + DataValidationConstraint activeAddressConstraint = validationHelper.createExplicitListConstraint(new String[]{"True", "False"}); DataValidationConstraint incorpDateConstraint = validationHelper .createDateConstraint(DataValidationConstraint.OperatorType.LESS_OR_EQUAL, "=TODAY()", null, dateFormat); DataValidationConstraint incorpDateTillConstraint = validationHelper diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/client/ClientPersonWorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/client/ClientPersonWorkbookPopulator.java index d3d43f45642..cf2de5affce 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/client/ClientPersonWorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/client/ClientPersonWorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator.client; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.ClientPersonConstants; import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.bulkimport.populator.AbstractWorkbookPopulator; @@ -53,9 +54,9 @@ public class ClientPersonWorkbookPopulator extends AbstractWorkbookPopulator { private final List countryCodeValues; public ClientPersonWorkbookPopulator(OfficeSheetPopulator officeSheetPopulator, PersonnelSheetPopulator personnelSheetPopulator, - List clientTypeCodeValues, List genderCodeValues, List clientClassification, - List addressTypesCodeValues, List stateProvinceCodeValues, - List countryCodeValues) { + List clientTypeCodeValues, List genderCodeValues, List clientClassification, + List addressTypesCodeValues, List stateProvinceCodeValues, + List countryCodeValues) { this.officeSheetPopulator = officeSheetPopulator; this.personnelSheetPopulator = personnelSheetPopulator; this.clientTypeCodeValues = clientTypeCodeValues; @@ -282,16 +283,16 @@ private void setRules(Sheet worksheet, String dateformat) { .createDateConstraint(DataValidationConstraint.OperatorType.GREATER_OR_EQUAL, "=$H1", null, dateformat); DataValidationConstraint dobDateConstraint = validationHelper .createDateConstraint(DataValidationConstraint.OperatorType.LESS_OR_EQUAL, "=TODAY()", null, dateformat); - DataValidationConstraint activeConstraint = validationHelper.createExplicitListConstraint(new String[] { "True", "False" }); + DataValidationConstraint activeConstraint = validationHelper.createExplicitListConstraint(new String[]{"True", "False"}); DataValidationConstraint clientTypesConstraint = validationHelper.createFormulaListConstraint("ClientTypes"); - DataValidationConstraint isStaffConstraint = validationHelper.createExplicitListConstraint(new String[] { "True", "False" }); + DataValidationConstraint isStaffConstraint = validationHelper.createExplicitListConstraint(new String[]{"True", "False"}); DataValidationConstraint genderConstraint = validationHelper.createFormulaListConstraint("Gender"); DataValidationConstraint clientClassificationConstraint = validationHelper.createFormulaListConstraint("ClientClassification"); - DataValidationConstraint enabledAddressConstraint = validationHelper.createExplicitListConstraint(new String[] { "True", "False" }); + DataValidationConstraint enabledAddressConstraint = validationHelper.createExplicitListConstraint(new String[]{"True", "False"}); DataValidationConstraint addressTypeConstraint = validationHelper.createFormulaListConstraint("AddressType"); DataValidationConstraint stateProvinceConstraint = validationHelper.createFormulaListConstraint("StateProvince"); DataValidationConstraint countryConstraint = validationHelper.createFormulaListConstraint("Country"); - DataValidationConstraint activeAddressConstraint = validationHelper.createExplicitListConstraint(new String[] { "True", "False" }); + DataValidationConstraint activeAddressConstraint = validationHelper.createExplicitListConstraint(new String[]{"True", "False"}); DataValidation officeValidation = validationHelper.createValidation(officeNameConstraint, officeNameRange); DataValidation staffValidation = validationHelper.createValidation(staffNameConstraint, staffNameRange); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/comparator/LoanComparatorByStatusActive.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/comparator/LoanComparatorByStatusActive.java index 4a29c916b56..a3d229f9701 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/comparator/LoanComparatorByStatusActive.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/comparator/LoanComparatorByStatusActive.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.util.Comparator; + import org.apache.fineract.portfolio.loanaccount.data.LoanAccountData; /** diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/fixeddeposits/FixedDepositTransactionWorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/fixeddeposits/FixedDepositTransactionWorkbookPopulator.java index 32946749f20..2332ff5b0a9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/fixeddeposits/FixedDepositTransactionWorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/fixeddeposits/FixedDepositTransactionWorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.bulkimport.constants.TransactionConstants; import org.apache.fineract.infrastructure.bulkimport.populator.AbstractWorkbookPopulator; @@ -54,7 +55,7 @@ public class FixedDepositTransactionWorkbookPopulator extends AbstractWorkbookPo private final List savingsAccounts; public FixedDepositTransactionWorkbookPopulator(OfficeSheetPopulator officeSheetPopulator, ClientSheetPopulator clientSheetPopulator, - ExtrasSheetPopulator extrasSheetPopulator, List savingsAccounts) { + ExtrasSheetPopulator extrasSheetPopulator, List savingsAccounts) { this.officeSheetPopulator = officeSheetPopulator; this.clientSheetPopulator = clientSheetPopulator; this.extrasSheetPopulator = extrasSheetPopulator; @@ -135,7 +136,7 @@ private void setRules(Sheet worksheet, String dateFormat) { DataValidationConstraint accountNumberConstraint = validationHelper.createFormulaListConstraint( "INDIRECT(CONCATENATE(\"Account_\",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($B1,\" \",\"_\"),\"(\",\"_\"),\")\",\"_\")))"); DataValidationConstraint transactionTypeConstraint = validationHelper - .createExplicitListConstraint(new String[] { "Withdrawal", "Deposit" }); + .createExplicitListConstraint(new String[]{"Withdrawal", "Deposit"}); DataValidationConstraint paymentTypeConstraint = validationHelper.createFormulaListConstraint("PaymentTypes"); DataValidationConstraint transactionDateConstraint = validationHelper.createDateConstraint( DataValidationConstraint.OperatorType.BETWEEN, @@ -188,7 +189,7 @@ private void setNames(Sheet worksheet) { for (int i = 0; i < savingsAccounts.size(); i++) { if (!clientName.equals(savingsAccounts.get(i).getClientName())) { endIndex = i + 1; - clientNameToBeginEndIndexes.put(clientName, new Integer[] { startIndex, endIndex }); + clientNameToBeginEndIndexes.put(clientName, new Integer[]{startIndex, endIndex}); startIndex = i + 2; clientName = savingsAccounts.get(i).getClientName(); clientId = savingsAccounts.get(i).getClientId(); @@ -197,7 +198,7 @@ private void setNames(Sheet worksheet) { } if (i == savingsAccounts.size() - 1) { endIndex = i + 2; - clientNameToBeginEndIndexes.put(clientName, new Integer[] { startIndex, endIndex }); + clientNameToBeginEndIndexes.put(clientName, new Integer[]{startIndex, endIndex}); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/fixeddeposits/FixedDepositWorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/fixeddeposits/FixedDepositWorkbookPopulator.java index 10d81e85cdf..d5a6ff96bf3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/fixeddeposits/FixedDepositWorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/fixeddeposits/FixedDepositWorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator.fixeddeposits; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.FixedDepositConstants; import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.bulkimport.populator.AbstractWorkbookPopulator; @@ -51,7 +52,7 @@ public class FixedDepositWorkbookPopulator extends AbstractWorkbookPopulator { private final FixedDepositProductSheetPopulator productSheetPopulator; public FixedDepositWorkbookPopulator(OfficeSheetPopulator officeSheetPopulator, ClientSheetPopulator clientSheetPopulator, - PersonnelSheetPopulator personnelSheetPopulator, FixedDepositProductSheetPopulator fixedDepositProductSheetPopulator) { + PersonnelSheetPopulator personnelSheetPopulator, FixedDepositProductSheetPopulator fixedDepositProductSheetPopulator) { this.officeSheetPopulator = officeSheetPopulator; this.clientSheetPopulator = clientSheetPopulator; this.personnelSheetPopulator = personnelSheetPopulator; @@ -121,24 +122,24 @@ private void setRules(Sheet worksheet, String dateFormat) { DataValidationConstraint activationDateConstraint = validationHelper .createDateConstraint(DataValidationConstraint.OperatorType.BETWEEN, "=$F1", "=TODAY()", dateFormat); DataValidationConstraint interestCompudingPeriodConstraint = validationHelper - .createExplicitListConstraint(new String[] { TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_DAILY, + .createExplicitListConstraint(new String[]{TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_DAILY, TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_MONTHLY, TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_QUARTERLY, TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_SEMI_ANNUALLY, - TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_ANNUALLY }); + TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_ANNUALLY}); DataValidationConstraint interestPostingPeriodConstraint = validationHelper - .createExplicitListConstraint(new String[] { TemplatePopulateImportConstants.INTEREST_POSTING_PERIOD_MONTHLY, + .createExplicitListConstraint(new String[]{TemplatePopulateImportConstants.INTEREST_POSTING_PERIOD_MONTHLY, TemplatePopulateImportConstants.INTEREST_POSTING_PERIOD_QUARTERLY, TemplatePopulateImportConstants.INTEREST_POSTING_PERIOD_BIANUALLY, - TemplatePopulateImportConstants.INTEREST_POSTING_PERIOD_ANNUALLY }); - DataValidationConstraint interestCalculationConstraint = validationHelper.createExplicitListConstraint(new String[] { - TemplatePopulateImportConstants.INTEREST_CAL_DAILY_BALANCE, TemplatePopulateImportConstants.INTEREST_CAL_AVG_BALANCE }); + TemplatePopulateImportConstants.INTEREST_POSTING_PERIOD_ANNUALLY}); + DataValidationConstraint interestCalculationConstraint = validationHelper.createExplicitListConstraint(new String[]{ + TemplatePopulateImportConstants.INTEREST_CAL_DAILY_BALANCE, TemplatePopulateImportConstants.INTEREST_CAL_AVG_BALANCE}); DataValidationConstraint interestCalculationDaysInYearConstraint = validationHelper - .createExplicitListConstraint(new String[] { TemplatePopulateImportConstants.INTEREST_CAL_DAYS_IN_YEAR_360, - TemplatePopulateImportConstants.INTEREST_CAL_DAYS_IN_YEAR_365 }); + .createExplicitListConstraint(new String[]{TemplatePopulateImportConstants.INTEREST_CAL_DAYS_IN_YEAR_360, + TemplatePopulateImportConstants.INTEREST_CAL_DAYS_IN_YEAR_365}); DataValidationConstraint frequency = validationHelper.createExplicitListConstraint( - new String[] { TemplatePopulateImportConstants.FREQUENCY_DAYS, TemplatePopulateImportConstants.FREQUENCY_WEEKS, - TemplatePopulateImportConstants.FREQUENCY_MONTHS, TemplatePopulateImportConstants.FREQUENCY_YEARS }); + new String[]{TemplatePopulateImportConstants.FREQUENCY_DAYS, TemplatePopulateImportConstants.FREQUENCY_WEEKS, + TemplatePopulateImportConstants.FREQUENCY_MONTHS, TemplatePopulateImportConstants.FREQUENCY_YEARS}); DataValidationConstraint depositConstraint = validationHelper.createDecimalConstraint( DataValidationConstraint.OperatorType.GREATER_OR_EQUAL, "=INDIRECT(CONCATENATE(\"Min_Deposit_\",$C1))", null); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/group/GroupsWorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/group/GroupsWorkbookPopulator.java index b8ea7b87111..79244afc76a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/group/GroupsWorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/group/GroupsWorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator.group; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.GroupConstants; import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.bulkimport.populator.AbstractWorkbookPopulator; @@ -50,7 +51,7 @@ public class GroupsWorkbookPopulator extends AbstractWorkbookPopulator { private final ClientSheetPopulator clientSheetPopulator; public GroupsWorkbookPopulator(OfficeSheetPopulator officeSheetPopulator, PersonnelSheetPopulator personnelSheetPopulator, - CenterSheetPopulator centerSheetPopulator, ClientSheetPopulator clientSheetPopulator) { + CenterSheetPopulator centerSheetPopulator, ClientSheetPopulator clientSheetPopulator) { this.officeSheetPopulator = officeSheetPopulator; this.personnelSheetPopulator = personnelSheetPopulator; this.centerSheetPopulator = centerSheetPopulator; @@ -159,9 +160,9 @@ private void setLookupTable(Sheet groupSheet, String dateFormat) { for (rowIndex = 1; rowIndex <= 3; rowIndex++) { writeInt(GroupConstants.LOOKUP_REPEAT_NORMAL_COL, groupSheet.getRow(rowIndex), rowIndex); } - String[] days = new String[] { TemplatePopulateImportConstants.MONDAY, TemplatePopulateImportConstants.TUESDAY, + String[] days = new String[]{TemplatePopulateImportConstants.MONDAY, TemplatePopulateImportConstants.TUESDAY, TemplatePopulateImportConstants.WEDNESDAY, TemplatePopulateImportConstants.THURSDAY, TemplatePopulateImportConstants.FRIDAY, - TemplatePopulateImportConstants.SATURDAY, TemplatePopulateImportConstants.SUNDAY }; + TemplatePopulateImportConstants.SATURDAY, TemplatePopulateImportConstants.SUNDAY}; for (rowIndex = 1; rowIndex <= 7; rowIndex++) { writeString(GroupConstants.LOOKUP_IF_REPEAT_WEEKLY_COL, groupSheet.getRow(rowIndex), days[rowIndex - 1]); } @@ -200,7 +201,7 @@ private void setRules(Sheet worksheet, String dateFormat) { DataValidationConstraint officeNameConstraint = validationHelper.createFormulaListConstraint("Office"); DataValidationConstraint staffNameConstraint = validationHelper .createFormulaListConstraint("INDIRECT(CONCATENATE(\"Staff_\",$B1))"); - DataValidationConstraint booleanConstraint = validationHelper.createExplicitListConstraint(new String[] { "True", "False" }); + DataValidationConstraint booleanConstraint = validationHelper.createExplicitListConstraint(new String[]{"True", "False"}); DataValidationConstraint activationDateConstraint = validationHelper .createDateConstraint(DataValidationConstraint.OperatorType.GREATER_OR_EQUAL, "=$G1", null, dateFormat); @@ -209,8 +210,8 @@ private void setRules(Sheet worksheet, String dateFormat) { DataValidationConstraint meetingStartDateConstraint = validationHelper .createDateConstraint(DataValidationConstraint.OperatorType.BETWEEN, "=$H1", "=TODAY()", dateFormat); DataValidationConstraint repeatsConstraint = validationHelper.createExplicitListConstraint( - new String[] { TemplatePopulateImportConstants.FREQUENCY_DAILY, TemplatePopulateImportConstants.FREQUENCY_WEEKLY, - TemplatePopulateImportConstants.FREQUENCY_MONTHLY, TemplatePopulateImportConstants.FREQUENCY_YEARLY }); + new String[]{TemplatePopulateImportConstants.FREQUENCY_DAILY, TemplatePopulateImportConstants.FREQUENCY_WEEKLY, + TemplatePopulateImportConstants.FREQUENCY_MONTHLY, TemplatePopulateImportConstants.FREQUENCY_YEARLY}); DataValidationConstraint repeatsEveryConstraint = validationHelper.createFormulaListConstraint("INDIRECT($K1)"); DataValidationConstraint repeatsOnConstraint = validationHelper.createFormulaListConstraint("INDIRECT(CONCATENATE($K1,\"_DAYS\"))"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/guarantor/GuarantorWorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/guarantor/GuarantorWorkbookPopulator.java index ab9326b68a1..933d40cca02 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/guarantor/GuarantorWorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/guarantor/GuarantorWorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.GuarantorConstants; import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.bulkimport.populator.AbstractWorkbookPopulator; @@ -52,7 +53,7 @@ public class GuarantorWorkbookPopulator extends AbstractWorkbookPopulator { private final List guarantorRelationshipTypes; public GuarantorWorkbookPopulator(OfficeSheetPopulator officeSheetPopulator, ClientSheetPopulator clientSheetPopulator, - List loans, List savings, List guarantorRelationshipTypes) { + List loans, List savings, List guarantorRelationshipTypes) { this.officeSheetPopulator = officeSheetPopulator; this.clientSheetPopulator = clientSheetPopulator; this.loans = loans; @@ -210,8 +211,8 @@ private void setRules(Sheet worksheet) { DataValidationConstraint savingsaccountNumberConstraint = validationHelper.createFormulaListConstraint( "INDIRECT(CONCATENATE(\"SavingsAccount_\",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($G1,\" \",\"_\"),\"(\",\"_\"),\")\",\"_\")))"); DataValidationConstraint guranterTypeConstraint = validationHelper - .createExplicitListConstraint(new String[] { TemplatePopulateImportConstants.GUARANTOR_INTERNAL, - TemplatePopulateImportConstants.GUARANTOR_EXTERNAL, TemplatePopulateImportConstants.GUARANTOR_GROUP }); + .createExplicitListConstraint(new String[]{TemplatePopulateImportConstants.GUARANTOR_INTERNAL, + TemplatePopulateImportConstants.GUARANTOR_EXTERNAL, TemplatePopulateImportConstants.GUARANTOR_GROUP}); DataValidationConstraint guarantorRelationshipConstraint = validationHelper.createFormulaListConstraint("GuarantorRelationship"); DataValidationConstraint entityofficeNameConstraint = validationHelper.createFormulaListConstraint("Office"); DataValidationConstraint entityclientNameConstraint = validationHelper @@ -277,7 +278,7 @@ private void setNames(Sheet worksheet) { for (int i = 0; i < loans.size(); i++) { if (!clientName.equals(loans.get(i).getClientName())) { endIndex = i + 1; - clientNameToBeginEndIndexes.put(clientName, new Integer[] { startIndex, endIndex }); + clientNameToBeginEndIndexes.put(clientName, new Integer[]{startIndex, endIndex}); startIndex = i + 2; clientName = loans.get(i).getClientName(); clientId = loans.get(i).getClientId().toString(); @@ -286,7 +287,7 @@ private void setNames(Sheet worksheet) { } if (i == loans.size() - 1) { endIndex = i + 2; - clientNameToBeginEndIndexes.put(clientName, new Integer[] { startIndex, endIndex }); + clientNameToBeginEndIndexes.put(clientName, new Integer[]{startIndex, endIndex}); } } @@ -308,7 +309,7 @@ private void setNames(Sheet worksheet) { for (int i = 0; i < savings.size(); i++) { if (!clientName.equals(savings.get(i).getClientName())) { endIndex = i + 1; - clientNameToBeginEndIndexes.put(clientName, new Integer[] { startIndex, endIndex }); + clientNameToBeginEndIndexes.put(clientName, new Integer[]{startIndex, endIndex}); startIndex = i + 2; clientName = savings.get(i).getClientName(); clientId = savings.get(i).getClientId().toString(); @@ -317,7 +318,7 @@ private void setNames(Sheet worksheet) { } if (i == savings.size() - 1) { endIndex = i + 2; - clientNameToBeginEndIndexes.put(clientName, new Integer[] { startIndex, endIndex }); + clientNameToBeginEndIndexes.put(clientName, new Integer[]{startIndex, endIndex}); } } // Account Number Named after Clients diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/journalentry/JournalEntriesWorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/journalentry/JournalEntriesWorkbookPopulator.java index 4a17189746d..c81a41bc4bb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/journalentry/JournalEntriesWorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/journalentry/JournalEntriesWorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator.journalentry; import java.util.ArrayList; + import org.apache.fineract.infrastructure.bulkimport.constants.JournalEntryConstants; import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.bulkimport.populator.AbstractWorkbookPopulator; @@ -44,7 +45,7 @@ public class JournalEntriesWorkbookPopulator extends AbstractWorkbookPopulator { private final ExtrasSheetPopulator extrasSheetPopulator; public JournalEntriesWorkbookPopulator(OfficeSheetPopulator officeSheetPopulator, GlAccountSheetPopulator glAccountSheetPopulator, - ExtrasSheetPopulator extrasSheetPopulator) { + ExtrasSheetPopulator extrasSheetPopulator) { this.officeSheetPopulator = officeSheetPopulator; this.glAccountSheetPopulator = glAccountSheetPopulator; this.extrasSheetPopulator = extrasSheetPopulator; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/loan/LoanWorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/loan/LoanWorkbookPopulator.java index 540d37f8726..fcc0bce1db7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/loan/LoanWorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/loan/LoanWorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator.loan; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.LoanConstants; import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.bulkimport.populator.AbstractWorkbookPopulator; @@ -57,9 +58,9 @@ public class LoanWorkbookPopulator extends AbstractWorkbookPopulator { private ExtrasSheetPopulator extrasSheetPopulator; public LoanWorkbookPopulator(OfficeSheetPopulator officeSheetPopulator, ClientSheetPopulator clientSheetPopulator, - GroupSheetPopulator groupSheetPopulator, PersonnelSheetPopulator personnelSheetPopulator, - LoanProductSheetPopulator productSheetPopulator, ChargeSheetPopulator chargeSheetPopulator, - ExtrasSheetPopulator extrasSheetPopulator) { + GroupSheetPopulator groupSheetPopulator, PersonnelSheetPopulator personnelSheetPopulator, + LoanProductSheetPopulator productSheetPopulator, ChargeSheetPopulator chargeSheetPopulator, + ExtrasSheetPopulator extrasSheetPopulator) { this.officeSheetPopulator = officeSheetPopulator; this.clientSheetPopulator = clientSheetPopulator; this.groupSheetPopulator = groupSheetPopulator; @@ -158,7 +159,7 @@ private void setRules(Sheet worksheet, String dateFormat) { DataValidationConstraint officeNameConstraint = validationHelper.createFormulaListConstraint("Office"); DataValidationConstraint loanTypeConstraint = validationHelper.createExplicitListConstraint( - new String[] { LoanConstants.LOAN_TYPE_INDIVIDUAL, LoanConstants.LOAN_TYPE_GROUP, LoanConstants.LOAN_TYPE_JLG }); + new String[]{LoanConstants.LOAN_TYPE_INDIVIDUAL, LoanConstants.LOAN_TYPE_GROUP, LoanConstants.LOAN_TYPE_JLG}); DataValidationConstraint clientNameConstraint = validationHelper.createFormulaListConstraint( "IF($B1=\"Group\",INDIRECT(CONCATENATE(\"Group_\",$A1)),INDIRECT(CONCATENATE(\"Client_\",$A1)))"); DataValidationConstraint productNameConstraint = validationHelper.createFormulaListConstraint("Products"); @@ -184,9 +185,9 @@ private void setRules(Sheet worksheet, String dateFormat) { DataValidationConstraint.OperatorType.BETWEEN, "=INDIRECT(CONCATENATE(\"MIN_REPAYMENT_\",$E1))", "=INDIRECT(CONCATENATE(\"MAX_REPAYMENT_\",$E1))"); DataValidationConstraint frequencyConstraint = validationHelper - .createExplicitListConstraint(new String[] { "Days", "Weeks", "Months", "Semi Month" }); + .createExplicitListConstraint(new String[]{"Days", "Weeks", "Months", "Semi Month"}); DataValidationConstraint loanTermFrequencyConstraint = validationHelper - .createExplicitListConstraint(new String[] { "Days", "Weeks", "Months" }); + .createExplicitListConstraint(new String[]{"Days", "Weeks", "Months"}); DataValidationConstraint loanTermConstraint = validationHelper .createIntegerConstraint(DataValidationConstraint.OperatorType.GREATER_OR_EQUAL, "=$M1/$N1", "=$M1*$N1"); DataValidationConstraint interestFrequencyConstraint = validationHelper @@ -195,14 +196,14 @@ private void setRules(Sheet worksheet, String dateFormat) { DataValidationConstraint.OperatorType.BETWEEN, "=INDIRECT(CONCATENATE(\"MIN_INTEREST_\",$E1))", "=INDIRECT(CONCATENATE(\"MAX_INTEREST_\",$E1))"); DataValidationConstraint amortizationConstraint = validationHelper - .createExplicitListConstraint(new String[] { "Equal principal payments", "Equal installments" }); + .createExplicitListConstraint(new String[]{"Equal principal payments", "Equal installments"}); DataValidationConstraint interestMethodConstraint = validationHelper - .createExplicitListConstraint(new String[] { "Flat", "Declining Balance" }); + .createExplicitListConstraint(new String[]{"Flat", "Declining Balance"}); DataValidationConstraint interestCalculationPeriodConstraint = validationHelper - .createExplicitListConstraint(new String[] { "Daily", "Same as repayment period" }); - DataValidationConstraint repaymentStrategyConstraint = validationHelper.createExplicitListConstraint(new String[] { + .createExplicitListConstraint(new String[]{"Daily", "Same as repayment period"}); + DataValidationConstraint repaymentStrategyConstraint = validationHelper.createExplicitListConstraint(new String[]{ "Penalties, Fees, Interest, Principal order", "HeavensFamily Unique", "Creocore Unique", "Overdue/Due Fee/Int,Principal", - "Principal, Interest, Penalties, Fees Order", "Interest, Principal, Penalties, Fees Order", "Early Repayment Strategy" }); + "Principal, Interest, Penalties, Fees Order", "Interest, Principal, Penalties, Fees Order", "Early Repayment Strategy"}); DataValidationConstraint arrearsToleranceConstraint = validationHelper .createIntegerConstraint(DataValidationConstraint.OperatorType.GREATER_OR_EQUAL, "0", null); DataValidationConstraint graceOnPrincipalPaymentConstraint = validationHelper @@ -216,11 +217,11 @@ private void setRules(Sheet worksheet, String dateFormat) { DataValidationConstraint chargeOneNameConstraint = validationHelper.createFormulaListConstraint("Charges"); DataValidationConstraint chargeOneAmountTypeConstraint = validationHelper - .createExplicitListConstraint(new String[] { "Flat", "% Amount" }); + .createExplicitListConstraint(new String[]{"Flat", "% Amount"}); DataValidationConstraint chargeTwoNameConstraint = validationHelper.createFormulaListConstraint("Charges"); DataValidationConstraint chargeTwoAmountTypeConstraint = validationHelper - .createExplicitListConstraint(new String[] { "Flat", "% Amount" }); + .createExplicitListConstraint(new String[]{"Flat", "% Amount"}); DataValidation officeValidation = validationHelper.createValidation(officeNameConstraint, officeNameRange); DataValidation loanTypeValidation = validationHelper.createValidation(loanTypeConstraint, loanTypeRange); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/loanrepayment/LoanRepaymentWorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/loanrepayment/LoanRepaymentWorkbookPopulator.java index 1b0306fc86a..a312ac668fc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/loanrepayment/LoanRepaymentWorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/loanrepayment/LoanRepaymentWorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; + import org.apache.fineract.infrastructure.bulkimport.constants.LoanRepaymentConstants; import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.bulkimport.populator.AbstractWorkbookPopulator; @@ -57,7 +58,7 @@ public class LoanRepaymentWorkbookPopulator extends AbstractWorkbookPopulator { private Map clientIdToClientExternalId; public LoanRepaymentWorkbookPopulator(List loans, OfficeSheetPopulator officeSheetPopulator, - ClientSheetPopulator clientSheetPopulator, ExtrasSheetPopulator extrasSheetPopulator) { + ClientSheetPopulator clientSheetPopulator, ExtrasSheetPopulator extrasSheetPopulator) { this.allloans = loans; this.officeSheetPopulator = officeSheetPopulator; this.clientSheetPopulator = clientSheetPopulator; @@ -188,7 +189,7 @@ private void setNames(Sheet worksheet) { for (int i = 0; i < allloans.size(); i++) { if (!Objects.equals(clientName, allloans.get(i).getClientName())) { endIndex = i + 1; - clientNameToBeginEndIndexes.put(clientName, new Integer[] { startIndex, endIndex }); + clientNameToBeginEndIndexes.put(clientName, new Integer[]{startIndex, endIndex}); startIndex = i + 2; clientName = allloans.get(i).getClientName(); clientId = String.valueOf(allloans.get(i).getClientId()); @@ -199,7 +200,7 @@ private void setNames(Sheet worksheet) { } if (i == allloans.size() - 1) { endIndex = i + 2; - clientNameToBeginEndIndexes.put(clientName, new Integer[] { startIndex, endIndex }); + clientNameToBeginEndIndexes.put(clientName, new Integer[]{startIndex, endIndex}); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/office/OfficeWorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/office/OfficeWorkbookPopulator.java index 4e60593e13e..241c45a2444 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/office/OfficeWorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/office/OfficeWorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator.office; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.OfficeConstants; import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.bulkimport.populator.AbstractWorkbookPopulator; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/recurringdeposit/RecurringDepositTransactionWorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/recurringdeposit/RecurringDepositTransactionWorkbookPopulator.java index 659b2603be4..9a8d6d374b2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/recurringdeposit/RecurringDepositTransactionWorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/recurringdeposit/RecurringDepositTransactionWorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.bulkimport.constants.TransactionConstants; import org.apache.fineract.infrastructure.bulkimport.populator.AbstractWorkbookPopulator; @@ -54,8 +55,8 @@ public class RecurringDepositTransactionWorkbookPopulator extends AbstractWorkbo private final List savingsAccounts; public RecurringDepositTransactionWorkbookPopulator(OfficeSheetPopulator officeSheetPopulator, - ClientSheetPopulator clientSheetPopulator, ExtrasSheetPopulator extrasSheetPopulator, - List savingsAccounts) { + ClientSheetPopulator clientSheetPopulator, ExtrasSheetPopulator extrasSheetPopulator, + List savingsAccounts) { this.officeSheetPopulator = officeSheetPopulator; this.clientSheetPopulator = clientSheetPopulator; this.extrasSheetPopulator = extrasSheetPopulator; @@ -136,7 +137,7 @@ private void setRules(Sheet worksheet, String dateFormat) { DataValidationConstraint accountNumberConstraint = validationHelper.createFormulaListConstraint( "INDIRECT(CONCATENATE(\"Account_\",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($B1,\" \",\"_\"),\"(\",\"_\"),\")\",\"_\")))"); DataValidationConstraint transactionTypeConstraint = validationHelper - .createExplicitListConstraint(new String[] { "Withdrawal", "Deposit" }); + .createExplicitListConstraint(new String[]{"Withdrawal", "Deposit"}); DataValidationConstraint paymentTypeConstraint = validationHelper.createFormulaListConstraint("PaymentTypes"); DataValidationConstraint transactionDateConstraint = validationHelper.createDateConstraint( DataValidationConstraint.OperatorType.BETWEEN, @@ -189,7 +190,7 @@ private void setNames(Sheet worksheet) { for (int i = 0; i < savingsAccounts.size(); i++) { if (!clientName.equals(savingsAccounts.get(i).getClientName())) { endIndex = i + 1; - clientNameToBeginEndIndexes.put(clientName, new Integer[] { startIndex, endIndex }); + clientNameToBeginEndIndexes.put(clientName, new Integer[]{startIndex, endIndex}); startIndex = i + 2; clientName = savingsAccounts.get(i).getClientName(); clientId = savingsAccounts.get(i).getClientId(); @@ -198,7 +199,7 @@ private void setNames(Sheet worksheet) { } if (i == savingsAccounts.size() - 1) { endIndex = i + 2; - clientNameToBeginEndIndexes.put(clientName, new Integer[] { startIndex, endIndex }); + clientNameToBeginEndIndexes.put(clientName, new Integer[]{startIndex, endIndex}); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/recurringdeposit/RecurringDepositWorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/recurringdeposit/RecurringDepositWorkbookPopulator.java index f340c408a0b..6643ee0ada3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/recurringdeposit/RecurringDepositWorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/recurringdeposit/RecurringDepositWorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator.recurringdeposit; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.RecurringDepositConstants; import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.bulkimport.populator.AbstractWorkbookPopulator; @@ -48,7 +49,7 @@ public class RecurringDepositWorkbookPopulator extends AbstractWorkbookPopulator private final RecurringDepositProductSheetPopulator productSheetPopulator; public RecurringDepositWorkbookPopulator(OfficeSheetPopulator officeSheetPopulator, ClientSheetPopulator clientSheetPopulator, - PersonnelSheetPopulator personnelSheetPopulator, RecurringDepositProductSheetPopulator recurringDepositProductSheetPopulator) { + PersonnelSheetPopulator personnelSheetPopulator, RecurringDepositProductSheetPopulator recurringDepositProductSheetPopulator) { this.officeSheetPopulator = officeSheetPopulator; this.clientSheetPopulator = clientSheetPopulator; @@ -245,28 +246,28 @@ private void setRules(Sheet worksheet, String dateFormat) { DataValidationConstraint activationDateConstraint = validationHelper .createDateConstraint(DataValidationConstraint.OperatorType.BETWEEN, "=$F1", "=TODAY()", dateFormat); DataValidationConstraint interestCompudingPeriodConstraint = validationHelper - .createExplicitListConstraint(new String[] { TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_DAILY, + .createExplicitListConstraint(new String[]{TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_DAILY, TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_MONTHLY, TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_QUARTERLY, TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_SEMI_ANNUALLY, - TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_ANNUALLY }); + TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_ANNUALLY}); DataValidationConstraint interestPostingPeriodConstraint = validationHelper - .createExplicitListConstraint(new String[] { TemplatePopulateImportConstants.INTEREST_POSTING_PERIOD_MONTHLY, + .createExplicitListConstraint(new String[]{TemplatePopulateImportConstants.INTEREST_POSTING_PERIOD_MONTHLY, TemplatePopulateImportConstants.INTEREST_POSTING_PERIOD_QUARTERLY, TemplatePopulateImportConstants.INTEREST_POSTING_PERIOD_BIANUALLY, - TemplatePopulateImportConstants.INTEREST_POSTING_PERIOD_ANNUALLY }); - DataValidationConstraint interestCalculationConstraint = validationHelper.createExplicitListConstraint(new String[] { - TemplatePopulateImportConstants.INTEREST_CAL_DAILY_BALANCE, TemplatePopulateImportConstants.INTEREST_CAL_AVG_BALANCE }); + TemplatePopulateImportConstants.INTEREST_POSTING_PERIOD_ANNUALLY}); + DataValidationConstraint interestCalculationConstraint = validationHelper.createExplicitListConstraint(new String[]{ + TemplatePopulateImportConstants.INTEREST_CAL_DAILY_BALANCE, TemplatePopulateImportConstants.INTEREST_CAL_AVG_BALANCE}); DataValidationConstraint interestCalculationDaysInYearConstraint = validationHelper - .createExplicitListConstraint(new String[] { TemplatePopulateImportConstants.INTEREST_CAL_DAYS_IN_YEAR_360, - TemplatePopulateImportConstants.INTEREST_CAL_DAYS_IN_YEAR_365 }); + .createExplicitListConstraint(new String[]{TemplatePopulateImportConstants.INTEREST_CAL_DAYS_IN_YEAR_360, + TemplatePopulateImportConstants.INTEREST_CAL_DAYS_IN_YEAR_365}); DataValidationConstraint frequency = validationHelper.createExplicitListConstraint( - new String[] { TemplatePopulateImportConstants.FREQUENCY_DAYS, TemplatePopulateImportConstants.FREQUENCY_WEEKS, - TemplatePopulateImportConstants.FREQUENCY_MONTHS, TemplatePopulateImportConstants.FREQUENCY_YEARS }); + new String[]{TemplatePopulateImportConstants.FREQUENCY_DAYS, TemplatePopulateImportConstants.FREQUENCY_WEEKS, + TemplatePopulateImportConstants.FREQUENCY_MONTHS, TemplatePopulateImportConstants.FREQUENCY_YEARS}); DataValidationConstraint depositConstraint = validationHelper.createDecimalConstraint( DataValidationConstraint.OperatorType.GREATER_OR_EQUAL, "=INDIRECT(CONCATENATE(\"Min_Deposit_\",$C1))", null); - DataValidationConstraint booleanConstraint = validationHelper.createExplicitListConstraint(new String[] { "True", "False" }); + DataValidationConstraint booleanConstraint = validationHelper.createExplicitListConstraint(new String[]{"True", "False"}); DataValidationConstraint depositStartDateConstraint = validationHelper .createDateConstraint(DataValidationConstraint.OperatorType.BETWEEN, "=$G1", "=TODAY()", "dd/mm/yy"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/savings/SavingsTransactionsWorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/savings/SavingsTransactionsWorkbookPopulator.java index e1366e37fa6..ffc5684eb89 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/savings/SavingsTransactionsWorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/savings/SavingsTransactionsWorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.bulkimport.constants.TransactionConstants; import org.apache.fineract.infrastructure.bulkimport.populator.AbstractWorkbookPopulator; @@ -54,7 +55,7 @@ public class SavingsTransactionsWorkbookPopulator extends AbstractWorkbookPopula private final List savingsAccounts; public SavingsTransactionsWorkbookPopulator(OfficeSheetPopulator officeSheetPopulator, ClientSheetPopulator clientSheetPopulator, - ExtrasSheetPopulator extrasSheetPopulator, List savingsAccounts) { + ExtrasSheetPopulator extrasSheetPopulator, List savingsAccounts) { this.officeSheetPopulator = officeSheetPopulator; this.clientSheetPopulator = clientSheetPopulator; this.extrasSheetPopulator = extrasSheetPopulator; @@ -135,7 +136,7 @@ private void setRules(Sheet worksheet, String dateFormat) { DataValidationConstraint accountNumberConstraint = validationHelper.createFormulaListConstraint( "INDIRECT(CONCATENATE(\"Account_\",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE($B1,\" \",\"_\"),\"(\",\"_\"),\")\",\"_\")))"); DataValidationConstraint transactionTypeConstraint = validationHelper - .createExplicitListConstraint(new String[] { "Withdrawal", "Deposit" }); + .createExplicitListConstraint(new String[]{"Withdrawal", "Deposit"}); DataValidationConstraint paymentTypeConstraint = validationHelper.createFormulaListConstraint("PaymentTypes"); DataValidationConstraint transactionDateConstraint = validationHelper.createDateConstraint( DataValidationConstraint.OperatorType.BETWEEN, @@ -188,7 +189,7 @@ private void setNames(Sheet worksheet) { for (int i = 0; i < savingsAccounts.size(); i++) { if (!clientName.equals(savingsAccounts.get(i).getClientName())) { endIndex = i + 1; - clientNameToBeginEndIndexes.put(clientName, new Integer[] { startIndex, endIndex }); + clientNameToBeginEndIndexes.put(clientName, new Integer[]{startIndex, endIndex}); startIndex = i + 2; clientName = savingsAccounts.get(i).getClientName(); clientId = savingsAccounts.get(i).getClientId(); @@ -197,7 +198,7 @@ private void setNames(Sheet worksheet) { } if (i == savingsAccounts.size() - 1) { endIndex = i + 2; - clientNameToBeginEndIndexes.put(clientName, new Integer[] { startIndex, endIndex }); + clientNameToBeginEndIndexes.put(clientName, new Integer[]{startIndex, endIndex}); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/savings/SavingsWorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/savings/SavingsWorkbookPopulator.java index 9607177f06d..61addae5089 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/savings/SavingsWorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/savings/SavingsWorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator.savings; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.SavingsConstants; import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.bulkimport.populator.AbstractWorkbookPopulator; @@ -51,8 +52,8 @@ public class SavingsWorkbookPopulator extends AbstractWorkbookPopulator { private final SavingsProductSheetPopulator productSheetPopulator; public SavingsWorkbookPopulator(OfficeSheetPopulator officeSheetPopulator, ClientSheetPopulator clientSheetPopulator, - GroupSheetPopulator groupSheetPopulator, PersonnelSheetPopulator personnelSheetPopulator, - SavingsProductSheetPopulator savingsProductSheetPopulator) { + GroupSheetPopulator groupSheetPopulator, PersonnelSheetPopulator personnelSheetPopulator, + SavingsProductSheetPopulator savingsProductSheetPopulator) { this.officeSheetPopulator = officeSheetPopulator; this.clientSheetPopulator = clientSheetPopulator; this.groupSheetPopulator = groupSheetPopulator; @@ -242,7 +243,7 @@ private void setRules(Sheet worksheet, String dateFormat) { DataValidationConstraint officeNameConstraint = validationHelper.createFormulaListConstraint("Office"); DataValidationConstraint savingsTypeConstraint = validationHelper - .createExplicitListConstraint(new String[] { "Individual", "Group" }); + .createExplicitListConstraint(new String[]{"Individual", "Group"}); DataValidationConstraint clientNameConstraint = validationHelper.createFormulaListConstraint( "IF($B1=\"Individual\",INDIRECT(CONCATENATE(\"Client_\",$A1)),INDIRECT(CONCATENATE(\"Group_\",$A1)))"); DataValidationConstraint productNameConstraint = validationHelper.createFormulaListConstraint("Products"); @@ -257,27 +258,27 @@ private void setRules(Sheet worksheet, String dateFormat) { DataValidationConstraint activationDateConstraint = validationHelper .createDateConstraint(DataValidationConstraint.OperatorType.BETWEEN, "=$G1", "=TODAY()", dateFormat); DataValidationConstraint interestCompudingPeriodConstraint = validationHelper - .createExplicitListConstraint(new String[] { TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_DAILY, + .createExplicitListConstraint(new String[]{TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_DAILY, TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_MONTHLY, TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_QUARTERLY, TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_SEMI_ANNUALLY, - TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_ANNUALLY }); + TemplatePopulateImportConstants.INTEREST_COMPOUNDING_PERIOD_ANNUALLY}); DataValidationConstraint interestPostingPeriodConstraint = validationHelper - .createExplicitListConstraint(new String[] { TemplatePopulateImportConstants.INTEREST_POSTING_PERIOD_MONTHLY, + .createExplicitListConstraint(new String[]{TemplatePopulateImportConstants.INTEREST_POSTING_PERIOD_MONTHLY, TemplatePopulateImportConstants.INTEREST_POSTING_PERIOD_QUARTERLY, TemplatePopulateImportConstants.INTEREST_POSTING_PERIOD_BIANUALLY, - TemplatePopulateImportConstants.INTEREST_POSTING_PERIOD_ANNUALLY }); - DataValidationConstraint interestCalculationConstraint = validationHelper.createExplicitListConstraint(new String[] { - TemplatePopulateImportConstants.INTEREST_CAL_DAILY_BALANCE, TemplatePopulateImportConstants.INTEREST_CAL_AVG_BALANCE }); + TemplatePopulateImportConstants.INTEREST_POSTING_PERIOD_ANNUALLY}); + DataValidationConstraint interestCalculationConstraint = validationHelper.createExplicitListConstraint(new String[]{ + TemplatePopulateImportConstants.INTEREST_CAL_DAILY_BALANCE, TemplatePopulateImportConstants.INTEREST_CAL_AVG_BALANCE}); DataValidationConstraint interestCalculationDaysInYearConstraint = validationHelper - .createExplicitListConstraint(new String[] { TemplatePopulateImportConstants.INTEREST_CAL_DAYS_IN_YEAR_360, - TemplatePopulateImportConstants.INTEREST_CAL_DAYS_IN_YEAR_365 }); + .createExplicitListConstraint(new String[]{TemplatePopulateImportConstants.INTEREST_CAL_DAYS_IN_YEAR_360, + TemplatePopulateImportConstants.INTEREST_CAL_DAYS_IN_YEAR_365}); DataValidationConstraint lockinPeriodFrequencyConstraint = validationHelper.createExplicitListConstraint( - new String[] { TemplatePopulateImportConstants.FREQUENCY_DAYS, TemplatePopulateImportConstants.FREQUENCY_WEEKS, - TemplatePopulateImportConstants.FREQUENCY_MONTHS, TemplatePopulateImportConstants.FREQUENCY_YEARS }); + new String[]{TemplatePopulateImportConstants.FREQUENCY_DAYS, TemplatePopulateImportConstants.FREQUENCY_WEEKS, + TemplatePopulateImportConstants.FREQUENCY_MONTHS, TemplatePopulateImportConstants.FREQUENCY_YEARS}); DataValidationConstraint applyWithdrawalFeeForTransferConstraint = validationHelper - .createExplicitListConstraint(new String[] { "True", "False" }); - DataValidationConstraint allowOverdraftConstraint = validationHelper.createExplicitListConstraint(new String[] { "True", "False" }); + .createExplicitListConstraint(new String[]{"True", "False"}); + DataValidationConstraint allowOverdraftConstraint = validationHelper.createExplicitListConstraint(new String[]{"True", "False"}); DataValidation officeValidation = validationHelper.createValidation(officeNameConstraint, officeNameRange); DataValidation savingsTypeValidation = validationHelper.createValidation(savingsTypeConstraint, savingsTypeRange); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/shareaccount/SharedAccountWorkBookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/shareaccount/SharedAccountWorkBookPopulator.java index 16a32f02254..2d77226b059 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/shareaccount/SharedAccountWorkBookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/shareaccount/SharedAccountWorkBookPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator.shareaccount; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.SharedAccountsConstants; import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.bulkimport.populator.AbstractWorkbookPopulator; @@ -46,7 +47,7 @@ public class SharedAccountWorkBookPopulator extends AbstractWorkbookPopulator { private final SavingsAccountSheetPopulator savingsAccountSheetPopulator; public SharedAccountWorkBookPopulator(SharedProductsSheetPopulator sharedProductsSheetPopulator, - ClientSheetPopulator clientSheetPopulator, SavingsAccountSheetPopulator savingsAccountSheetPopulator) { + ClientSheetPopulator clientSheetPopulator, SavingsAccountSheetPopulator savingsAccountSheetPopulator) { this.sharedProductsSheetPopulator = sharedProductsSheetPopulator; this.clientSheetPopulator = clientSheetPopulator; this.savingsAccountSheetPopulator = savingsAccountSheetPopulator; @@ -107,9 +108,9 @@ private void setRules(Sheet sharedAccountSheet, String dateFormat) { DataValidationConstraint dateConstraint = validationHelper.createDateConstraint(DataValidationConstraint.OperatorType.LESS_OR_EQUAL, "=TODAY()", null, dateFormat); DataValidationConstraint frequencyConstraint = validationHelper.createExplicitListConstraint( - new String[] { TemplatePopulateImportConstants.FREQUENCY_DAYS, TemplatePopulateImportConstants.FREQUENCY_WEEKS, - TemplatePopulateImportConstants.FREQUENCY_MONTHS, TemplatePopulateImportConstants.FREQUENCY_YEARS }); - DataValidationConstraint booleanConstraint = validationHelper.createExplicitListConstraint(new String[] { "True", "False" }); + new String[]{TemplatePopulateImportConstants.FREQUENCY_DAYS, TemplatePopulateImportConstants.FREQUENCY_WEEKS, + TemplatePopulateImportConstants.FREQUENCY_MONTHS, TemplatePopulateImportConstants.FREQUENCY_YEARS}); + DataValidationConstraint booleanConstraint = validationHelper.createExplicitListConstraint(new String[]{"True", "False"}); DataValidation clientValidation = validationHelper.createValidation(clientNameConstraint, clientNameRange); DataValidation productValidation = validationHelper.createValidation(productNameConstraint, productRange); DataValidation submittedOnValidation = validationHelper.createValidation(dateConstraint, submittedDateRange); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/staff/StaffWorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/staff/StaffWorkbookPopulator.java index 1aad781c4e8..95a9e208c21 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/staff/StaffWorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/staff/StaffWorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator.staff; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.StaffConstants; import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.bulkimport.populator.AbstractWorkbookPopulator; @@ -68,10 +69,10 @@ private void setRules(Sheet staffSheet, String dateFormat) { setNames(staffSheet, offices); DataValidationConstraint officeNameConstraint = validationHelper.createFormulaListConstraint("Office"); - DataValidationConstraint isLoanOfficerConstraint = validationHelper.createExplicitListConstraint(new String[] { "True", "False" }); + DataValidationConstraint isLoanOfficerConstraint = validationHelper.createExplicitListConstraint(new String[]{"True", "False"}); DataValidationConstraint joinedOnConstraint = validationHelper .createDateConstraint(DataValidationConstraint.OperatorType.LESS_OR_EQUAL, "=TODAY()", null, dateFormat); - DataValidationConstraint isActiveConstraint = validationHelper.createExplicitListConstraint(new String[] { "True", "False" }); + DataValidationConstraint isActiveConstraint = validationHelper.createExplicitListConstraint(new String[]{"True", "False"}); DataValidation officeValidation = validationHelper.createValidation(officeNameConstraint, officeNameRange); DataValidation isLoanOfficerValidation = validationHelper.createValidation(isLoanOfficerConstraint, isLoanOfficerNameRange); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/users/UserWorkbookPopulator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/users/UserWorkbookPopulator.java index b26346a4943..87296507efc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/users/UserWorkbookPopulator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/populator/users/UserWorkbookPopulator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.populator.users; import java.util.List; + import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; import org.apache.fineract.infrastructure.bulkimport.constants.UserConstants; import org.apache.fineract.infrastructure.bulkimport.populator.AbstractWorkbookPopulator; @@ -45,7 +46,7 @@ public class UserWorkbookPopulator extends AbstractWorkbookPopulator { private final RoleSheetPopulator roleSheetPopulator; public UserWorkbookPopulator(OfficeSheetPopulator officeSheetPopulator, PersonnelSheetPopulator personnelSheetPopulator, - RoleSheetPopulator roleSheetPopulator) { + RoleSheetPopulator roleSheetPopulator) { this.officeSheetPopulator = officeSheetPopulator; this.personnelSheetPopulator = personnelSheetPopulator; this.roleSheetPopulator = roleSheetPopulator; @@ -78,7 +79,7 @@ private void setRules(Sheet usersheet) { DataValidationConstraint officeNameConstraint = validationHelper.createFormulaListConstraint("Office"); DataValidationConstraint staffNameConstraint = validationHelper .createFormulaListConstraint("INDIRECT(CONCATENATE(\"Staff_\",$A1))"); - DataValidationConstraint booleanConstraint = validationHelper.createExplicitListConstraint(new String[] { "True", "False" }); + DataValidationConstraint booleanConstraint = validationHelper.createExplicitListConstraint(new String[]{"True", "False"}); DataValidation officeValidation = validationHelper.createValidation(officeNameConstraint, officeNameRange); DataValidation staffValidation = validationHelper.createValidation(staffNameConstraint, staffNameRange); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportEventListener.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportEventListener.java index c27896705f9..fce9430d098 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportEventListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportEventListener.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.bulkimport.service; import java.util.function.Supplier; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.command.core.CommandDispatcher; @@ -57,27 +58,36 @@ public void onApplicationEvent(final BulkImportEvent event) { final ImportHandler importHandler = switch (entityType) { case OFFICES -> this.applicationContext.getBean("officeImportHandler", ImportHandler.class); case CENTERS -> this.applicationContext.getBean("centerImportHandler", ImportHandler.class); - case CHART_OF_ACCOUNTS -> this.applicationContext.getBean("chartOfAccountsImportHandler", ImportHandler.class); - case CLIENTS_ENTITY -> this.applicationContext.getBean("clientEntityImportHandler", ImportHandler.class); - case CLIENTS_PERSON -> this.applicationContext.getBean("clientPersonImportHandler", ImportHandler.class); - case FIXED_DEPOSIT_ACCOUNTS -> this.applicationContext.getBean("fixedDepositImportHandler", ImportHandler.class); + case CHART_OF_ACCOUNTS -> + this.applicationContext.getBean("chartOfAccountsImportHandler", ImportHandler.class); + case CLIENTS_ENTITY -> + this.applicationContext.getBean("clientEntityImportHandler", ImportHandler.class); + case CLIENTS_PERSON -> + this.applicationContext.getBean("clientPersonImportHandler", ImportHandler.class); + case FIXED_DEPOSIT_ACCOUNTS -> + this.applicationContext.getBean("fixedDepositImportHandler", ImportHandler.class); case FIXED_DEPOSIT_TRANSACTIONS -> - this.applicationContext.getBean("fixedDepositTransactionImportHandler", ImportHandler.class); + this.applicationContext.getBean("fixedDepositTransactionImportHandler", ImportHandler.class); case GROUPS -> this.applicationContext.getBean("groupImportHandler", ImportHandler.class); case GUARANTORS -> this.applicationContext.getBean("guarantorImportHandler", ImportHandler.class); - case GL_JOURNAL_ENTRIES -> this.applicationContext.getBean("journalEntriesImportHandler", ImportHandler.class); + case GL_JOURNAL_ENTRIES -> + this.applicationContext.getBean("journalEntriesImportHandler", ImportHandler.class); case LOANS -> this.applicationContext.getBean("loanImportHandler", ImportHandler.class); - case LOAN_TRANSACTIONS -> this.applicationContext.getBean("loanRepaymentImportHandler", ImportHandler.class); - case RECURRING_DEPOSIT_ACCOUNTS -> this.applicationContext.getBean("recurringDepositImportHandler", ImportHandler.class); + case LOAN_TRANSACTIONS -> + this.applicationContext.getBean("loanRepaymentImportHandler", ImportHandler.class); + case RECURRING_DEPOSIT_ACCOUNTS -> + this.applicationContext.getBean("recurringDepositImportHandler", ImportHandler.class); case RECURRING_DEPOSIT_ACCOUNTS_TRANSACTIONS -> - this.applicationContext.getBean("recurringDepositTransactionImportHandler", ImportHandler.class); + this.applicationContext.getBean("recurringDepositTransactionImportHandler", ImportHandler.class); case SAVINGS_ACCOUNT -> this.applicationContext.getBean("savingsImportHandler", ImportHandler.class); - case SAVINGS_TRANSACTIONS -> this.applicationContext.getBean("savingsTransactionImportHandler", ImportHandler.class); - case SHARE_ACCOUNTS -> this.applicationContext.getBean("sharedAccountImportHandler", ImportHandler.class); + case SAVINGS_TRANSACTIONS -> + this.applicationContext.getBean("savingsTransactionImportHandler", ImportHandler.class); + case SHARE_ACCOUNTS -> + this.applicationContext.getBean("sharedAccountImportHandler", ImportHandler.class); case STAFF -> this.applicationContext.getBean("staffImportHandler", ImportHandler.class); case USERS -> this.applicationContext.getBean("userImportHandler", ImportHandler.class); default -> - throw new GeneralPlatformDomainRuleException("error.msg.unable.to.find.resource", "Unable to find requested resource"); + throw new GeneralPlatformDomainRuleException("error.msg.unable.to.find.resource", "Unable to find requested resource"); }; final var count = importHandler.process(event.getWorkbook(), event.getLocale(), event.getDateFormat()); 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 0d245b6aa0a..7a73c5db254 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 @@ -6,9 +6,9 @@ * 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 @@ -20,10 +20,12 @@ import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.Response.ResponseBuilder; + import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.accounting.glaccount.data.GLAccountData; import org.apache.fineract.accounting.glaccount.service.GLAccountReadPlatformService; import org.apache.fineract.infrastructure.bulkimport.constants.TemplatePopulateImportConstants; @@ -139,20 +141,20 @@ public class BulkImportWorkbookPopulatorServiceImpl implements BulkImportWorkboo @Autowired public BulkImportWorkbookPopulatorServiceImpl(final PlatformSecurityContext context, - final OfficeReadPlatformService officeReadPlatformService, final StaffReadService staffReadPlatformService, - final ClientReadPlatformService clientReadPlatformService, final CenterReadPlatformService centerReadPlatformService, - final GroupReadPlatformService groupReadPlatformService, final FundReadPlatformService fundReadPlatformService, - final PaymentTypeReadService paymentTypeReadPlatformService, - final LoanProductReadPlatformService loanProductReadPlatformService, - final CurrencyReadPlatformService currencyReadPlatformService, final LoanReadPlatformService loanReadPlatformService, - final GLAccountReadPlatformService glAccountReadPlatformService, - final SavingsAccountReadPlatformService savingsAccountReadPlatformService, - final CodeValueReadPlatformService codeValueReadPlatformService, - final SavingsProductReadPlatformService savingsProductReadPlatformService, - final ShareProductReadPlatformService shareProductReadPlatformService, - final ChargeReadPlatformService chargeReadPlatformService, - final DepositProductReadPlatformService depositProductReadPlatformService, - final RoleReadPlatformService roleReadPlatformService) { + final OfficeReadPlatformService officeReadPlatformService, final StaffReadService staffReadPlatformService, + final ClientReadPlatformService clientReadPlatformService, final CenterReadPlatformService centerReadPlatformService, + final GroupReadPlatformService groupReadPlatformService, final FundReadPlatformService fundReadPlatformService, + final PaymentTypeReadService paymentTypeReadPlatformService, + final LoanProductReadPlatformService loanProductReadPlatformService, + final CurrencyReadPlatformService currencyReadPlatformService, final LoanReadPlatformService loanReadPlatformService, + final GLAccountReadPlatformService glAccountReadPlatformService, + final SavingsAccountReadPlatformService savingsAccountReadPlatformService, + final CodeValueReadPlatformService codeValueReadPlatformService, + final SavingsProductReadPlatformService savingsProductReadPlatformService, + final ShareProductReadPlatformService shareProductReadPlatformService, + final ChargeReadPlatformService chargeReadPlatformService, + final DepositProductReadPlatformService depositProductReadPlatformService, + final RoleReadPlatformService roleReadPlatformService) { this.officeReadPlatformService = officeReadPlatformService; this.staffReadPlatformService = staffReadPlatformService; this.context = context; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookServiceImpl.java index fdcf1ff6b2a..4be4cc21c2c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/bulkimport/service/BulkImportWorkbookServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import java.sql.SQLException; import java.time.LocalDate; import java.util.Collection; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; @@ -71,7 +72,7 @@ public class BulkImportWorkbookServiceImpl implements BulkImportWorkbookService @Override public Long importWorkbook(String entity, InputStream inputStream, FormDataContentDisposition fileDetail, final String locale, - final String dateFormat) { + final String dateFormat) { try { if (entity != null && inputStream != null && fileDetail != null && locale != null && dateFormat != null) { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); @@ -167,7 +168,7 @@ public Long importWorkbook(String entity, InputStream inputStream, FormDataConte } private DocumentCreateResponse createDocument(final Workbook workbook, final FormDataContentDisposition fileDetail, - final String fileType) { + final String fileType) { final var pipedInputStream = pipe.pipe(output -> { workbook.write(output); }); @@ -181,7 +182,7 @@ private DocumentCreateResponse createDocument(final Workbook workbook, final For } private Long publishEvent(final Integer primaryColumn, final FormDataContentDisposition fileDetail, final String fileType, - final GlobalEntityType entityType, final Workbook workbook, final String locale, final String dateFormat) { + final GlobalEntityType entityType, final Workbook workbook, final String locale, final String dateFormat) { final var importDocument = ImportDocument.instance(null, DateUtils.getLocalDateTimeOfTenant(), entityType.getValue(), securityContext.authenticatedUser(), ImportHandlerUtils.getNumberOfRows(workbook.getSheetAt(0), primaryColumn)); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/constants/CampaignType.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/constants/CampaignType.java index bf23c80db9b..6d26ea64e48 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/constants/CampaignType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/constants/CampaignType.java @@ -6,9 +6,9 @@ * 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 @@ -68,13 +68,13 @@ public static EnumOptionData campaignType(final CampaignType campaignType) { switch (campaignType) { case INVALID: optionData = new EnumOptionData(INVALID.getValue().longValue(), INVALID.getCode(), "Invalid"); - break; + break; case SMS: optionData = new EnumOptionData(SMS.getValue().longValue(), SMS.getCode(), "SMS"); - break; + break; case NOTIFICATION: optionData = new EnumOptionData(NOTIFICATION.getValue().longValue(), NOTIFICATION.getCode(), "NOTIFICATION"); - break; + break; } return optionData; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/EmailApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/EmailApiConstants.java index bf8b4f2fd67..46227574e06 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/EmailApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/EmailApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/ScheduledEmailConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/ScheduledEmailConstants.java index e7a6f474b24..64efa0b9970 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/ScheduledEmailConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/ScheduledEmailConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailBusinessRulesData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailBusinessRulesData.java index d4611e79ffd..6e44e85c297 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailBusinessRulesData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailBusinessRulesData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.campaigns.email.data; import java.util.Map; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; @@ -47,7 +48,7 @@ public class EmailBusinessRulesData { private Map reportParamName; public static EmailBusinessRulesData instance(final Long reportId, final String reportName, final String reportType, - final Map reportParamName, final String reportSubType, final String reportDescription) { + final Map reportParamName, final String reportSubType, final String reportDescription) { return new EmailBusinessRulesData().setReportId(reportId).setReportName(reportName).setReportType(reportType) .setReportParamName(reportParamName).setReportSubType(reportSubType).setReportDescription(reportDescription); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailCampaignData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailCampaignData.java index b46c4502b13..f0fb5794d0f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailCampaignData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailCampaignData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.time.ZonedDateTime; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; @@ -65,10 +66,10 @@ public final class EmailCampaignData { private String recurrence; public static EmailCampaignData instance(final Long id, final String campaignName, final Integer campaignType, - final Long businessRuleId, final String paramValue, final EnumOptionData campaignStatus, final String emailSubject, - final String message, final String emailAttachmentFileFormat, final Long stretchyReportId, final String stretchyReportParamMap, - final ZonedDateTime nextTriggerDate, final LocalDate lastTriggerDate, final EmailCampaignTimeLine emailCampaignTimeLine, - final ZonedDateTime recurrenceStartDate, final String recurrence) { + final Long businessRuleId, final String paramValue, final EnumOptionData campaignStatus, final String emailSubject, + final String message, final String emailAttachmentFileFormat, final Long stretchyReportId, final String stretchyReportParamMap, + final ZonedDateTime nextTriggerDate, final LocalDate lastTriggerDate, final EmailCampaignTimeLine emailCampaignTimeLine, + final ZonedDateTime recurrenceStartDate, final String recurrence) { return new EmailCampaignData().setId(id).setCampaignName(campaignName).setCampaignType(campaignType) .setBusinessRuleId(businessRuleId).setParamValue(paramValue).setCampaignStatus(campaignStatus).setEmailSubject(emailSubject) .setEmailMessage(message).setEmailAttachmentFileFormat(emailAttachmentFileFormat).setStretchyReportId(stretchyReportId) diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailCampaignTimeLine.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailCampaignTimeLine.java index 3f2ed8f850d..0917085211a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailCampaignTimeLine.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailCampaignTimeLine.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.campaigns.email.data; import java.time.LocalDate; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailCampaignValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailCampaignValidator.java index acbcca26121..986cb4c5520 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailCampaignValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailCampaignValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.time.LocalDate; import java.util.ArrayList; @@ -28,6 +29,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.campaigns.email.domain.EmailCampaignType; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -90,7 +92,8 @@ public void validateCreate(String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, EmailCampaignValidator.supportedParams); final JsonElement element = this.fromApiJsonHelper.parse(json); @@ -142,7 +145,8 @@ public void validateForUpdate(String json) { if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, EmailCampaignValidator.supportedParamsForUpdate); final JsonElement element = this.fromApiJsonHelper.parse(json); @@ -184,7 +188,8 @@ public void validatePreviewMessage(String json) { if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, EmailCampaignValidator.PREVIEW_REQUEST_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); @@ -208,7 +213,8 @@ public void validateClosedDate(String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, EmailCampaignValidator.CLOSE_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList(); @@ -228,7 +234,8 @@ public void validateActivation(String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, EmailCampaignValidator.ACTIVATION_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList(); @@ -249,7 +256,8 @@ public void validateClosure(String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, EmailCampaignValidator.CLOSE_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailConfigurationData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailConfigurationData.java index 05d6b22aea1..93a13f7b69d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailConfigurationData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailConfigurationData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailConfigurationValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailConfigurationValidator.java index b00f920d5d7..e1e2638cd91 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailConfigurationValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailConfigurationValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -29,6 +30,7 @@ import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.campaigns.email.EmailApiConstants; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -61,7 +63,8 @@ public void validateUpdateConfiguration(String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, EmailConfigurationValidator.supportedParams); final JsonElement element = this.fromApiJsonHelper.parse(json); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailData.java index 00d3061035c..bd8bb0a3793 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; @@ -53,10 +54,10 @@ public final class EmailData { private String errorMessage; public static EmailData instance(final Long id, final Long groupId, final Long clientId, final Long staffId, - final EnumOptionData status, final String emailAddress, final String emailSubject, final String message, - final EnumOptionData emailAttachmentFileFormat, final ReportData stretchyReport, final String stretchyReportParamMap, - final List emailAttachmentFileFormatOptions, final List stretchyReportParamDateOptions, - final String campaignName, final LocalDate sentDate, final String errorMessage) { + final EnumOptionData status, final String emailAddress, final String emailSubject, final String message, + final EnumOptionData emailAttachmentFileFormat, final ReportData stretchyReport, final String stretchyReportParamMap, + final List emailAttachmentFileFormatOptions, final List stretchyReportParamDateOptions, + final String campaignName, final LocalDate sentDate, final String errorMessage) { return new EmailData().setId(id).setGroupId(groupId).setClientId(clientId).setStaffId(staffId).setStatus(status) .setEmailAddress(emailAddress).setEmailSubject(emailSubject).setEmailMessage(message) .setEmailAttachmentFileFormat(emailAttachmentFileFormat).setStretchyReport(stretchyReport) diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailDataValidator.java index d598811027f..46375d4794a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import com.google.common.base.Splitter; import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; @@ -34,6 +35,7 @@ import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.campaigns.email.ScheduledEmailConstants; import org.apache.fineract.infrastructure.campaigns.email.domain.ScheduledEmailAttachmentFileFormat; @@ -73,7 +75,8 @@ public void validateCreateRequest(final JsonCommand jsonCommand) { throw new InvalidJsonException(); } - final Type typeToken = new TypeToken>() {}.getType(); + final Type typeToken = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeToken, jsonString, ScheduledEmailConstants.CREATE_REQUEST_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -130,9 +133,7 @@ public void validateCreateRequest(final JsonCommand jsonCommand) { // try to parse the date time string LocalDateTime.parse(startDateTime, dateTimeFormatter); - } - - catch (IllegalArgumentException ex) { + } catch (IllegalArgumentException ex) { dataValidatorBuilder.reset().parameter(ScheduledEmailConstants.DATE_FORMAT_PARAM_NAME).value(dateFormat) .failWithCode("invalid.date.format"); } @@ -156,7 +157,8 @@ public void validateUpdateRequest(final JsonCommand jsonCommand) { throw new InvalidJsonException(); } - final Type typeToken = new TypeToken>() {}.getType(); + final Type typeToken = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeToken, jsonString, ScheduledEmailConstants.UPDATE_REQUEST_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -228,9 +230,7 @@ public void validateUpdateRequest(final JsonCommand jsonCommand) { // try to parse the date time string LocalDateTime.parse(startDateTime, dateTimeFormatter); - } - - catch (IllegalArgumentException ex) { + } catch (IllegalArgumentException ex) { dataValidatorBuilder.reset().parameter(ScheduledEmailConstants.DATE_FORMAT_PARAM_NAME).value(dateFormat) .failWithCode("invalid.date.format"); } @@ -303,10 +303,9 @@ public HashMap validateStretchyReportParamMap(String stretchyRep if (!StringUtils.isEmpty(stretchyReportParamMap)) { try { stretchyReportParamHashMap = new ObjectMapper().readValue(stretchyReportParamMap, - new TypeReference>() {}); - } - - catch (Exception e) { + new TypeReference>() { + }); + } catch (Exception e) { stretchyReportParamHashMap = null; } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailMessageWithAttachmentData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailMessageWithAttachmentData.java index 091c2314ae4..e66328e19da 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailMessageWithAttachmentData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/EmailMessageWithAttachmentData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.File; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; @@ -35,7 +36,7 @@ public final class EmailMessageWithAttachmentData { private List attachments; public static EmailMessageWithAttachmentData createNew(final String to, final String text, final String subject, - final List attachments) { + final List attachments) { return new EmailMessageWithAttachmentData().setTo(to).setText(text).setSubject(subject).setAttachments(attachments); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/PreviewCampaignMessage.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/PreviewCampaignMessage.java index 7d4a1392eeb..bac6e20c3b5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/PreviewCampaignMessage.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/PreviewCampaignMessage.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/ScheduledEmailEnumerations.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/ScheduledEmailEnumerations.java index 27a4a62864d..1ae9738f742 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/ScheduledEmailEnumerations.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/data/ScheduledEmailEnumerations.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaign.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaign.java index b17d509981e..ae10f509a0f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaign.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaign.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.time.LocalDate; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; @@ -31,6 +32,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -133,7 +135,7 @@ public class EmailCampaign extends AbstractPersistableCustom { private String previousRunErrorMessage; public static EmailCampaign instance(final AppUser submittedBy, final Report businessRuleId, final Report stretchyReport, - final JsonCommand command) { + final JsonCommand command) { final String campaignName = command.stringValueOfParameterNamed(EmailCampaignValidator.campaignName); final Long campaignType = command.longValueOfParameterNamed(EmailCampaignValidator.campaignType); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaignRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaignRepository.java index 8a0eec2945f..bad65a59e41 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaignRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaignRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.campaigns.email.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaignStatus.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaignStatus.java index 9e281e70304..fb3880e5ab2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaignStatus.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaignStatus.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaignStatusEnumerations.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaignStatusEnumerations.java index 2862b44679b..22eb9117df1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaignStatusEnumerations.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaignStatusEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -37,19 +37,19 @@ public static EnumOptionData status(final EmailCampaignStatus status) { case INVALID: optionData = new EnumOptionData(EmailCampaignStatus.INVALID.getValue().longValue(), EmailCampaignStatus.INVALID.getCode(), "Invalid"); - break; + break; case PENDING: optionData = new EnumOptionData(EmailCampaignStatus.PENDING.getValue().longValue(), EmailCampaignStatus.PENDING.getCode(), "Pending"); - break; + break; case ACTIVE: optionData = new EnumOptionData(EmailCampaignStatus.ACTIVE.getValue().longValue(), EmailCampaignStatus.ACTIVE.getCode(), "active"); - break; + break; case CLOSED: optionData = new EnumOptionData(EmailCampaignStatus.CLOSED.getValue().longValue(), EmailCampaignStatus.CLOSED.getCode(), "closed"); - break; + break; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaignType.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaignType.java index dada1b32e11..c7b8299e56f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaignType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailCampaignType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailConfiguration.java index d40ff9a0452..1b7e2f3f713 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailConfigurationRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailConfigurationRepository.java index 23db88177a9..44e8449c3c4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailConfigurationRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailConfigurationRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessage.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessage.java index 32d6db4a02b..8d241310237 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessage.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessage.java @@ -6,9 +6,9 @@ * 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 @@ -23,9 +23,11 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.time.LocalDate; import java.util.LinkedHashMap; import java.util.Map; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -84,15 +86,15 @@ public class EmailMessage extends AbstractPersistableCustom { private String errorMessage; public static EmailMessage pendingEmail(final Group group, final Client client, final Staff staff, final EmailCampaign emailCampaign, - final String emailSubject, final String message, final String emailAddress, final String campaignName) { + final String emailSubject, final String message, final String emailAddress, final String campaignName) { return new EmailMessage().setGroup(group).setClient(client).setStaff(staff).setEmailCampaign(emailCampaign) .setStatusType(emailCampaign.getStatus()).setEmailSubject(emailSubject).setMessage(message).setEmailAddress(emailAddress) .setCampaignName(campaignName); } public static EmailMessage instance(final Group group, final Client client, final Staff staff, final EmailCampaign emailCampaign, - final EmailMessageStatusType statusType, final String emailSubject, final String message, final String sourceAddress, - final String emailAddress, final String campaignName) { + final EmailMessageStatusType statusType, final String emailSubject, final String message, final String sourceAddress, + final String emailAddress, final String campaignName) { return new EmailMessage().setGroup(group).setClient(client).setStaff(staff).setEmailCampaign(emailCampaign) .setEmailSubject(emailSubject).setMessage(message).setEmailAddress(emailAddress).setCampaignName(campaignName) .setStatusType(statusType.getValue()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessageAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessageAssembler.java index 932ac9646cb..2995872ba27 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessageAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessageAssembler.java @@ -6,9 +6,9 @@ * 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 @@ -43,8 +43,8 @@ public class EmailMessageAssembler { @Autowired public EmailMessageAssembler(final EmailMessageRepository emailMessageRepository, final GroupRepositoryWrapper groupRepositoryWrapper, - final ClientRepositoryWrapper clientRepository, final StaffRepositoryWrapper staffRepository, - final FromJsonHelper fromApiJsonHelper) { + final ClientRepositoryWrapper clientRepository, final StaffRepositoryWrapper staffRepository, + final FromJsonHelper fromApiJsonHelper) { this.emailMessageRepository = emailMessageRepository; this.groupRepository = groupRepositoryWrapper; this.clientRepository = clientRepository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessageEnumerations.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessageEnumerations.java index 9fdff4e79de..b96cf03e6e8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessageEnumerations.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessageEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -37,23 +37,23 @@ public static EnumOptionData status(final EmailMessageStatusType status) { case INVALID: optionData = new EnumOptionData(EmailMessageStatusType.INVALID.getValue().longValue(), EmailMessageStatusType.INVALID.getCode(), "Invalid"); - break; + break; case PENDING: optionData = new EnumOptionData(EmailMessageStatusType.PENDING.getValue().longValue(), EmailMessageStatusType.PENDING.getCode(), "Pending"); - break; + break; case SENT: optionData = new EnumOptionData(EmailMessageStatusType.SENT.getValue().longValue(), EmailMessageStatusType.SENT.getCode(), "Sent"); - break; + break; case DELIVERED: optionData = new EnumOptionData(EmailMessageStatusType.DELIVERED.getValue().longValue(), EmailMessageStatusType.DELIVERED.getCode(), "Delivered"); - break; + break; case FAILED: optionData = new EnumOptionData(EmailMessageStatusType.FAILED.getValue().longValue(), EmailMessageStatusType.FAILED.getCode(), "Failed"); - break; + break; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessageRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessageRepository.java index ab605597e48..9a6da35fb78 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessageRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessageRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.campaigns.email.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessageStatusType.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessageStatusType.java index ca2aac8474c..94c2bf6944d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessageStatusType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/EmailMessageStatusType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/ScheduledEmailAttachmentFileFormat.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/ScheduledEmailAttachmentFileFormat.java index 64c48f94c51..5109f164529 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/ScheduledEmailAttachmentFileFormat.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/ScheduledEmailAttachmentFileFormat.java @@ -6,9 +6,9 @@ * 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 @@ -41,18 +41,18 @@ public static ScheduledEmailAttachmentFileFormat instance(final String value) { switch (value) { case "xls": emailAttachmentFileFormat = XLS; - break; + break; case "pdf": emailAttachmentFileFormat = PDF; - break; + break; case "csv": emailAttachmentFileFormat = CSV; - break; + break; default: - break; + break; } return emailAttachmentFileFormat; @@ -64,18 +64,18 @@ public static ScheduledEmailAttachmentFileFormat instance(final Integer id) { switch (id) { case 1: emailAttachmentFileFormat = XLS; - break; + break; case 2: emailAttachmentFileFormat = PDF; - break; + break; case 3: emailAttachmentFileFormat = CSV; - break; + break; default: - break; + break; } return emailAttachmentFileFormat; @@ -106,6 +106,6 @@ public Integer getId() { * @return list of valid ScheduledEmailAttachmentFileFormat ids **/ public static Object[] validValues() { - return new Object[] { XLS.getId(), PDF.getId(), CSV.getId() }; + return new Object[]{XLS.getId(), PDF.getId(), CSV.getId()}; } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/ScheduledEmailStretchyReportParamDateOption.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/ScheduledEmailStretchyReportParamDateOption.java index fe824879172..74b5d3e781b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/ScheduledEmailStretchyReportParamDateOption.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/domain/ScheduledEmailStretchyReportParamDateOption.java @@ -6,9 +6,9 @@ * 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 @@ -50,7 +50,7 @@ public static ScheduledEmailStretchyReportParamDateOption instance(final String switch (value) { case "today": scheduledEmailStretchyReportParamDateOption = TODAY; - break; + break; // case "yesterday": // scheduledEmailStretchyReportParamDateOption = YESTERDAY; @@ -58,7 +58,7 @@ public static ScheduledEmailStretchyReportParamDateOption instance(final String case "tomorrow": scheduledEmailStretchyReportParamDateOption = TOMORROW; - break; + break; } return scheduledEmailStretchyReportParamDateOption; @@ -74,7 +74,7 @@ public static ScheduledEmailStretchyReportParamDateOption instance(final Integer switch (id) { case 1: scheduledEmailStretchyReportParamDateOption = TODAY; - break; + break; // case 2: // scheduledEmailStretchyReportParamDateOption = YESTERDAY; @@ -82,7 +82,7 @@ public static ScheduledEmailStretchyReportParamDateOption instance(final Integer case 3: scheduledEmailStretchyReportParamDateOption = TOMORROW; - break; + break; } return scheduledEmailStretchyReportParamDateOption; @@ -113,6 +113,6 @@ public Integer getId() { * @return list of valid ScheduledEmailAttachmentFileFormat values **/ public static Object[] validValues() { - return new Object[] { TODAY.value, TOMORROW.value }; + return new Object[]{TODAY.value, TOMORROW.value}; } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailBusinessRuleNotFound.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailBusinessRuleNotFound.java index dae6f5e13e6..ece4e16ffc9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailBusinessRuleNotFound.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailBusinessRuleNotFound.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailCampaignMustBeClosedToBeDeletedException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailCampaignMustBeClosedToBeDeletedException.java index c533a2ed97c..fd791dcc4d1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailCampaignMustBeClosedToBeDeletedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailCampaignMustBeClosedToBeDeletedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailCampaignMustBeClosedToEditException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailCampaignMustBeClosedToEditException.java index 2b7eee113ee..611d5f152d0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailCampaignMustBeClosedToEditException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailCampaignMustBeClosedToEditException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailCampaignNotFound.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailCampaignNotFound.java index f8ceeaced44..962618128b2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailCampaignNotFound.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailCampaignNotFound.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailConfigurationNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailConfigurationNotFoundException.java index 899bc9c0da7..f0a23f4568d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailConfigurationNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailConfigurationNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailConfigurationSMTPUsernameNotValid.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailConfigurationSMTPUsernameNotValid.java index aa36c911168..eade3a49223 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailConfigurationSMTPUsernameNotValid.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailConfigurationSMTPUsernameNotValid.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailNotFoundException.java index 5506da775f4..2763992aa62 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/exception/EmailNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/ActivateEmailCampaignCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/ActivateEmailCampaignCommandHandler.java index d775ef168ce..0c20ad8ee99 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/ActivateEmailCampaignCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/ActivateEmailCampaignCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/CloseEmailCampaignCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/CloseEmailCampaignCommandHandler.java index 0f25e94ba02..a0072aa4c58 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/CloseEmailCampaignCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/CloseEmailCampaignCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/CreateEmailCampaignCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/CreateEmailCampaignCommandHandler.java index c8fe5fd774b..88af302cbc6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/CreateEmailCampaignCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/CreateEmailCampaignCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/CreateEmailCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/CreateEmailCommandHandler.java index 652572fb51e..f5bf9b4ef74 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/CreateEmailCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/CreateEmailCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/DeleteEmailCampaignCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/DeleteEmailCampaignCommandHandler.java index 5477a1f641b..3a34a778237 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/DeleteEmailCampaignCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/DeleteEmailCampaignCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/DeleteEmailCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/DeleteEmailCommandHandler.java index b97a5cce1f1..c337db35159 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/DeleteEmailCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/DeleteEmailCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/ReactivateEmailCampaignCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/ReactivateEmailCampaignCommandHandler.java index 65507028473..57969558552 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/ReactivateEmailCampaignCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/ReactivateEmailCampaignCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/UpdateEmailCampaignCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/UpdateEmailCampaignCommandHandler.java index 18afe4175ee..8e92c2ab5c2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/UpdateEmailCampaignCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/UpdateEmailCampaignCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/UpdateEmailConfigurationCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/UpdateEmailConfigurationCommandHandler.java index 882fc0324f6..bc6d61f7592 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/UpdateEmailConfigurationCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/handler/UpdateEmailConfigurationCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignDomainService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignDomainService.java index c02d697a9bc..ca915a4c631 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignDomainService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignDomainService.java @@ -6,9 +6,9 @@ * 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 @@ -18,4 +18,5 @@ */ package org.apache.fineract.infrastructure.campaigns.email.service; -public interface EmailCampaignDomainService {} +public interface EmailCampaignDomainService { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignDomainServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignDomainServiceImpl.java index 4b098de2570..56b78889484 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignDomainServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignDomainServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,9 +21,11 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import jakarta.annotation.PostConstruct; + import java.io.IOException; import java.util.HashMap; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.campaigns.email.domain.EmailCampaign; @@ -98,7 +100,8 @@ private void notifyLoanOwner(LoanTransaction loanTransaction, String paramValue) List campaigns = this.retrieveEmailCampaigns(paramValue); for (EmailCampaign emailCampaign : campaigns) { HashMap campaignParams = new ObjectMapper().readValue(emailCampaign.getParamValue(), - new TypeReference>() {}); + new TypeReference>() { + }); campaignParams.put("loanId", loanTransaction.getLoan().getId().toString()); campaignParams.put("loanTransactionId", loanTransaction.getId().toString()); this.emailCampaignWritePlatformService.insertDirectCampaignIntoEmailOutboundTable(loanTransaction.getLoan(), emailCampaign, @@ -110,7 +113,8 @@ private void notifyLoanOwner(Loan loan, String paramValue) throws IOException { List campaigns = this.retrieveEmailCampaigns(paramValue); for (EmailCampaign emailCampaign : campaigns) { HashMap campaignParams = new ObjectMapper().readValue(emailCampaign.getParamValue(), - new TypeReference>() {}); + new TypeReference>() { + }); campaignParams.put("loanId", loan.getId().toString()); this.emailCampaignWritePlatformService.insertDirectCampaignIntoEmailOutboundTable(loan, emailCampaign, campaignParams); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignReadPlatformService.java index 54049f76931..3fa42c85474 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.campaigns.email.service; import java.util.Collection; + import org.apache.fineract.infrastructure.campaigns.email.data.EmailBusinessRulesData; import org.apache.fineract.infrastructure.campaigns.email.data.EmailCampaignData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignReadPlatformServiceImpl.java index 8067ea08acd..bc8e143bcff 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.campaigns.email.data.EmailBusinessRulesData; import org.apache.fineract.infrastructure.campaigns.email.data.EmailCampaignData; import org.apache.fineract.infrastructure.campaigns.email.data.EmailCampaignTimeLine; @@ -94,7 +95,8 @@ private static final class EmailCampaignMapper implements RowMapper retrieveOne = this.jdbcTemplate.query(sql, this.businessRuleMapper, // NOSONAR - new Object[] { searchType, resourceId }); + new Object[]{searchType, resourceId}); try { EmailBusinessRulesData emailBusinessRulesData = retrieveOne.get(0); return emailBusinessRulesData; @@ -231,7 +234,7 @@ public EmailCampaignData retrieveOne(Long resourceId) { final boolean isVisible = true; try { final String sql = "select " + this.emailCampaignMapper.schema() + " where ec.id = ? and ec.is_visible = ?"; - return this.jdbcTemplate.queryForObject(sql, this.emailCampaignMapper, new Object[] { resourceId, isVisible }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, this.emailCampaignMapper, new Object[]{resourceId, isVisible}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new EmailCampaignNotFound(resourceId, e); } @@ -251,7 +254,7 @@ public Collection retrieveAllScheduleActiveCampaign() { final boolean visible = true; final String sql = "select " + this.emailCampaignMapper.schema() + " where ec.status_enum = ? and ec.campaign_type = ? and ec.is_visible = ?"; - return this.jdbcTemplate.query(sql, this.emailCampaignMapper, new Object[] { statusEnum, scheduleCampaignType, visible }); // NOSONAR + return this.jdbcTemplate.query(sql, this.emailCampaignMapper, new Object[]{statusEnum, scheduleCampaignType, visible}); // NOSONAR } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignWritePlatformCommandHandlerImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignWritePlatformCommandHandlerImpl.java index dad30bdd368..69ed97afbf7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignWritePlatformCommandHandlerImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignWritePlatformCommandHandlerImpl.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import com.google.gson.Gson; import jakarta.mail.internet.AddressException; import jakarta.mail.internet.InternetAddress; + import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; @@ -40,6 +41,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.campaigns.email.data.EmailCampaignValidator; @@ -195,7 +197,7 @@ public CommandProcessingResult delete(final Long resourceId) { @Override public void insertDirectCampaignIntoEmailOutboundTable(final Loan loan, final EmailCampaign emailCampaign, - HashMap campaignParams) { + HashMap campaignParams) { try { List> runReportObject = this.getRunReportByServiceImpl(campaignParams.get("reportName"), campaignParams); @@ -220,13 +222,15 @@ public void insertDirectCampaignIntoEmailOutboundTable(final Loan loan, final Em } private void insertDirectCampaignIntoEmailOutboundTable(final String emailParams, final String emailSubject, - final String messageTemplate, final String campaignName, final Long campaignId) { + final String messageTemplate, final String campaignName, final Long campaignId) { try { HashMap campaignParams = new ObjectMapper().readValue(emailParams, - new TypeReference>() {}); + new TypeReference>() { + }); HashMap queryParamForRunReport = new ObjectMapper().readValue(emailParams, - new TypeReference>() {}); + new TypeReference>() { + }); List> runReportObject = this.getRunReportByServiceImpl(campaignParams.get("reportName"), queryParamForRunReport); @@ -341,7 +345,7 @@ public CommandProcessingResult closeEmailCampaign(Long campaignId, JsonCommand c } private String compileEmailTemplate(final String textMessageTemplate, final String campaignName, - final Map emailParams) { + final Map emailParams) { final MustacheFactory mf = new DefaultMustacheFactory(); final Mustache mustache = mf.compile(new StringReader(textMessageTemplate), campaignName); @@ -351,7 +355,7 @@ private String compileEmailTemplate(final String textMessageTemplate, final Stri return stringWriter.toString(); } - @SuppressWarnings({ "unused", "rawtypes" }) + @SuppressWarnings({"unused", "rawtypes"}) @Override public List> getRunReportByServiceImpl(final String reportName, final Map queryParams) throws IOException { @@ -361,11 +365,12 @@ public List> getRunReportByServiceImpl(final String repo final GenericResultsetData results = this.readReportingService.retrieveGenericResultSetForSmsEmailCampaign(reportName, reportType, queryParams); final String response = this.genericDataService.generateJsonFromGenericResultsetData(results); - resultList = new ObjectMapper().readValue(response, new TypeReference<>() {}); + resultList = new ObjectMapper().readValue(response, new TypeReference<>() { + }); // loop changes array date to string date - for (Iterator> it = resultList.iterator(); it.hasNext();) { + for (Iterator> it = resultList.iterator(); it.hasNext(); ) { HashMap entry = it.next(); - for (Iterator> iter = entry.entrySet().iterator(); iter.hasNext();) { + for (Iterator> iter = entry.entrySet().iterator(); iter.hasNext(); ) { Map.Entry map = iter.next(); String key = map.getKey(); Object ob = map.getValue(); @@ -389,10 +394,12 @@ public PreviewCampaignMessage previewMessage(final JsonQuery query) { try { HashMap campaignParams = new ObjectMapper().readValue(emailParams, - new TypeReference>() {}); + new TypeReference>() { + }); HashMap queryParamForRunReport = new ObjectMapper().readValue(emailParams, - new TypeReference>() {}); + new TypeReference>() { + }); List> runReportObject = this.getRunReportByServiceImpl(campaignParams.get("reportName"), queryParamForRunReport); @@ -459,7 +466,7 @@ public CommandProcessingResult reactivateEmailCampaign(final Long campaignId, Js } private void handleDataIntegrityIssues(@SuppressWarnings("unused") final JsonCommand command, final Throwable realCause, - final NonTransientDataAccessException dve) { + final NonTransientDataAccessException dve) { throw ErrorHandler.getMappable(dve, "error.msg.email.campaign.unknown.data.integrity.issue", "Unknown data integrity issue with resource: " + realCause.getMessage()); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignWritePlatformService.java index 14ad6559e96..4e28828f46a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailCampaignWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.campaigns.email.data.PreviewCampaignMessage; import org.apache.fineract.infrastructure.campaigns.email.domain.EmailCampaign; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -43,7 +44,7 @@ public interface EmailCampaignWritePlatformService { CommandProcessingResult reactivateEmailCampaign(Long campaignId, JsonCommand command); - @SuppressWarnings({ "unused", "rawtypes" }) + @SuppressWarnings({"unused", "rawtypes"}) List> getRunReportByServiceImpl(String reportName, Map queryParams) throws IOException; PreviewCampaignMessage previewMessage(JsonQuery query); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailConfigurationReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailConfigurationReadPlatformService.java index 30329acd2bc..f8e627fad18 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailConfigurationReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailConfigurationReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.campaigns.email.service; import java.util.Collection; + import org.apache.fineract.infrastructure.campaigns.email.data.EmailConfigurationData; public interface EmailConfigurationReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailConfigurationReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailConfigurationReadPlatformServiceImpl.java index 4b30d7eaa9a..856d3639caa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailConfigurationReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailConfigurationReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.campaigns.email.data.EmailConfigurationData; import org.apache.fineract.infrastructure.campaigns.email.exception.EmailConfigurationNotFoundException; @@ -52,7 +53,8 @@ private static final class EmailConfigurationRowMapper implements RowMapper * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailConfigurationWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailConfigurationWritePlatformServiceImpl.java index 74dc24a1b97..e10b312ada6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailConfigurationWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailConfigurationWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.campaigns.email.data.EmailConfigurationValidator; import org.apache.fineract.infrastructure.campaigns.email.domain.EmailConfiguration; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailMessageJobEmailService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailMessageJobEmailService.java index b8c150623cf..12eae35a3d6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailMessageJobEmailService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailMessageJobEmailService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailMessageJobEmailServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailMessageJobEmailServiceImpl.java index 45e38efefb5..5bbeb6b19ed 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailMessageJobEmailServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailMessageJobEmailServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,9 +20,11 @@ import jakarta.mail.MessagingException; import jakarta.mail.internet.MimeMessage; + import java.io.File; import java.util.List; import java.util.Properties; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.campaigns.email.data.EmailMessageWithAttachmentData; import org.apache.fineract.infrastructure.configuration.data.SMTPCredentialsData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailReadPlatformService.java index 945ad49ee58..68d2f14636a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.Collection; import java.util.List; + import org.apache.fineract.infrastructure.campaigns.email.data.EmailData; import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.infrastructure.core.service.SearchParameters; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailReadPlatformServiceImpl.java index e52bc00b454..62c16ca56f8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.campaigns.email.data.EmailData; import org.apache.fineract.infrastructure.campaigns.email.domain.EmailMessageEnumerations; @@ -66,7 +67,8 @@ private static final class EmailMapper implements RowMapper { emo.error_message as errorMessage from scheduled_email_messages_outbound emo\s"""; - EmailMapper() {} + EmailMapper() { + } public String schema() { return EMAIL_SCHEMA; @@ -110,7 +112,7 @@ public Collection retrieveAll() { public EmailData retrieveOne(final Long resourceId) { try { final String sql = "select " + this.emailRowMapper.schema() + " where emo.id = ?"; - return this.jdbcTemplate.queryForObject(sql, this.emailRowMapper, new Object[] { resourceId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, this.emailRowMapper, new Object[]{resourceId}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new EmailNotFoundException(resourceId, e); } @@ -146,7 +148,7 @@ public Collection retrieveAllFailed(final SearchParameters searchPara @Override public Page retrieveEmailByStatus(final Integer limit, final Integer status, final LocalDate dateFrom, - final LocalDate dateTo) { + final LocalDate dateTo) { final StringBuilder sqlBuilder = new StringBuilder(200); sqlBuilder.append("select " + sqlGenerator.calcFoundRows() + " "); sqlBuilder.append(this.emailRowMapper.schema()); @@ -165,7 +167,7 @@ public Page retrieveEmailByStatus(final Integer limit, final Integer sqlBuilder.append(sqlPlusLimit); } return this.paginationHelper.fetchPage(this.jdbcTemplate, sqlBuilder.toString(), - new Object[] { status, fromDateString, toDateString }, this.emailRowMapper); + new Object[]{status, fromDateString, toDateString}, this.emailRowMapper); } private Collection retrieveEmailByStatus(final Integer status, final Integer limit) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailWritePlatformService.java index 4930518dcf7..0583054b031 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailWritePlatformServiceJpaRepositoryImpl.java index 8c1110567f9..723b3c603c4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/email/service/EmailWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.campaigns.email.service; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.campaigns.email.data.EmailDataValidator; import org.apache.fineract.infrastructure.campaigns.email.domain.EmailMessage; @@ -121,7 +122,7 @@ public CommandProcessingResult delete(final Long resourceId) { * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(@SuppressWarnings("unused") final JsonCommand command, final Throwable realCause, - final NonTransientDataAccessException dve) { + final NonTransientDataAccessException dve) { if (realCause.getMessage().contains("email_address")) { throw new PlatformDataIntegrityException("error.msg.email.no.email.address.exists", "The group, client or staff provided has no email address.", "id"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/helper/SmsConfigUtils.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/helper/SmsConfigUtils.java index beab7ca0c22..9328b6e06b7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/helper/SmsConfigUtils.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/helper/SmsConfigUtils.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.infrastructure.campaigns.helper; import jakarta.ws.rs.core.UriBuilder; + import java.net.URI; import java.util.HashMap; import java.util.Map; + import org.apache.fineract.infrastructure.campaigns.sms.constants.SmsCampaignConstants; import org.apache.fineract.infrastructure.campaigns.sms.data.MessageGatewayConfigurationData; import org.apache.fineract.infrastructure.configuration.service.ExternalServicesPropertiesReadPlatformService; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/executeemail/ExecuteEmailConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/executeemail/ExecuteEmailConfig.java index 576813881e6..f9c188b03b5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/executeemail/ExecuteEmailConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/executeemail/ExecuteEmailConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/executeemail/ExecuteEmailTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/executeemail/ExecuteEmailTasklet.java index dfe405e0896..4d7ae4f19a1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/executeemail/ExecuteEmailTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/executeemail/ExecuteEmailTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import jakarta.mail.internet.AddressException; import jakarta.mail.internet.InternetAddress; + import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileOutputStream; @@ -29,6 +30,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.campaigns.email.data.EmailMessageWithAttachmentData; @@ -173,7 +175,7 @@ public static boolean isValidEmail(String email) { } private HashMap replaceStretchyParamsWithActualClientParams(final HashMap stretchyParams, - final Client client) { + final Client client) { HashMap actualParams = new HashMap<>(); for (Map.Entry entry : stretchyParams.entrySet()) { switch (entry.getKey()) { @@ -183,16 +185,16 @@ private HashMap replaceStretchyParamsWithActualClientParams(fina } else { actualParams.put(entry.getKey(), client.getOffice().getId().toString()); } - break; + break; case "selectClient": actualParams.put(entry.getKey(), client.getId().toString()); - break; + break; case "selectLoanofficer": actualParams.put(entry.getKey(), client.getStaff().getId().toString()); - break; + break; case "environementUrl": actualParams.put(entry.getKey(), entry.getKey()); - break; + break; default: log.warn("Query parameter could not be mapped: {}", entry.getKey()); } @@ -201,7 +203,7 @@ private HashMap replaceStretchyParamsWithActualClientParams(fina } private File generateAttachments(final EmailCampaign emailCampaign, final ScheduledEmailAttachmentFileFormat emailAttachmentFileFormat, - final Map reportParams, final String reportName, final StringBuilder errorLog) { + final Map reportParams, final String reportName, final StringBuilder errorLog) { if (reportName == null) { return null; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/executereportmailingjobs/ExecuteReportMailingJobsConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/executereportmailingjobs/ExecuteReportMailingJobsConfig.java index 82121d0a59a..e1236d8e7fc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/executereportmailingjobs/ExecuteReportMailingJobsConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/executereportmailingjobs/ExecuteReportMailingJobsConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/executereportmailingjobs/ExecuteReportMailingJobsTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/executereportmailingjobs/ExecuteReportMailingJobsTasklet.java index 015652188fe..75d049abbb4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/executereportmailingjobs/ExecuteReportMailingJobsTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/executereportmailingjobs/ExecuteReportMailingJobsTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import jakarta.ws.rs.core.MultivaluedMap; import jakarta.ws.rs.core.Response; + import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileOutputStream; @@ -31,6 +32,7 @@ import java.util.Collection; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -121,8 +123,8 @@ public RepeatStatus execute(StepContribution contribution, ChunkContext chunkCon } private void generateReportOutputStream(final ReportMailingJob reportMailingJob, - final ReportMailingJobEmailAttachmentFileFormat emailAttachmentFileFormat, final MultivaluedMap reportParams, - final String reportName, final StringBuilder errorLog) { + final ReportMailingJobEmailAttachmentFileFormat emailAttachmentFileFormat, final MultivaluedMap reportParams, + final String reportName, final StringBuilder errorLog) { try { final String reportType = readReportingService.getReportType(reportName, false); final ReportingProcessService reportingProcessService = reportingProcessServiceProvider.findReportingProcessService(reportType); @@ -160,7 +162,7 @@ private void generateReportOutputStream(final ReportMailingJob reportMailingJob, } private void updateReportMailingJobAfterJobExecution(final ReportMailingJob reportMailingJob, final StringBuilder errorLog, - final LocalDateTime jobStartDateTime) { + final LocalDateTime jobStartDateTime) { final String recurrence = reportMailingJob.getRecurrence(); final LocalDateTime nextRunDateTime = reportMailingJob.getNextRunDateTime(); ReportMailingJobPreviousRunStatus reportMailingJobPreviousRunStatus = ReportMailingJobPreviousRunStatus.SUCCESS; @@ -193,7 +195,7 @@ private void updateReportMailingJobAfterJobExecution(final ReportMailingJob repo } private void sendReportFileToEmailRecipients(final ReportMailingJob reportMailingJob, final String fileName, - final ByteArrayOutputStream byteArrayOutputStream, final StringBuilder errorLog) { + final ByteArrayOutputStream byteArrayOutputStream, final StringBuilder errorLog) { final Set emailRecipients = this.reportMailingJobValidator.validateEmailRecipients(reportMailingJob.getEmailRecipients()); try { @@ -234,7 +236,7 @@ private LocalDateTime createNextRecurringDateTime(final String recurrencePattern } private void createReportMailingJobRunHistroryAfterJobExecution(final ReportMailingJob reportMailingJob, final StringBuilder errorLog, - final LocalDateTime jobStartDateTime, final String jobRunStatus) { + final LocalDateTime jobStartDateTime, final String jobRunStatus) { final LocalDateTime jobEndDateTime = DateUtils.getLocalDateTimeOfTenant(); final String errorLogToString = (errorLog != null) ? errorLog.toString() : null; final ReportMailingJobRunHistory reportMailingJobRunHistory = ReportMailingJobRunHistory.newInstance(reportMailingJob, diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/getdeliveryreportsfromsmsgateway/GetDeliveryReportsFromSmsGatewayConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/getdeliveryreportsfromsmsgateway/GetDeliveryReportsFromSmsGatewayConfig.java index b7352783f04..e7f504e038d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/getdeliveryreportsfromsmsgateway/GetDeliveryReportsFromSmsGatewayConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/getdeliveryreportsfromsmsgateway/GetDeliveryReportsFromSmsGatewayConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/getdeliveryreportsfromsmsgateway/GetDeliveryReportsFromSmsGatewayTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/getdeliveryreportsfromsmsgateway/GetDeliveryReportsFromSmsGatewayTasklet.java index 1a23d474e31..82e4fc29cc7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/getdeliveryreportsfromsmsgateway/GetDeliveryReportsFromSmsGatewayTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/getdeliveryreportsfromsmsgateway/GetDeliveryReportsFromSmsGatewayTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.infrastructure.campaigns.jobs.getdeliveryreportsfromsmsgateway; import com.google.gson.Gson; + import java.net.URI; import java.util.Collection; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; @@ -65,7 +67,8 @@ public RepeatStatus execute(StepContribution contribution, ChunkContext chunkCon URI uri = (URI) hostConfig.get("uri"); HttpEntity entity = (HttpEntity) hostConfig.get("entity"); ResponseEntity> responseOne = restTemplate.exchange(uri, HttpMethod.POST, - entity, new ParameterizedTypeReference<>() {}); + entity, new ParameterizedTypeReference<>() { + }); Collection smsMessageDeliveryReportDataCollection = responseOne.getBody(); if (!CollectionUtils.isEmpty(smsMessageDeliveryReportDataCollection)) { @@ -99,9 +102,7 @@ public RepeatStatus execute(StepContribution contribution, ChunkContext chunkCon smsMessageDeliveryReportDataCollection.size()); } } - } - - catch (Exception e) { + } catch (Exception e) { log.error("Error occurred.", e); } page++; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/sendmessagetosmsgateway/SendMessageToSmsGatewayConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/sendmessagetosmsgateway/SendMessageToSmsGatewayConfig.java index 5fff6f6b38d..c67b41d13a1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/sendmessagetosmsgateway/SendMessageToSmsGatewayConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/sendmessagetosmsgateway/SendMessageToSmsGatewayConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/sendmessagetosmsgateway/SendMessageToSmsGatewayTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/sendmessagetosmsgateway/SendMessageToSmsGatewayTasklet.java index 4ef12fcf7af..b76e4bb2191 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/sendmessagetosmsgateway/SendMessageToSmsGatewayTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/sendmessagetosmsgateway/SendMessageToSmsGatewayTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -19,12 +19,14 @@ package org.apache.fineract.infrastructure.campaigns.jobs.sendmessagetosmsgateway; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.net.URI; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; @@ -140,7 +142,8 @@ private void connectAndSendToIntermediateServer(Collection entity = (HttpEntity) hostConfig.get("entity"); - ResponseEntity responseOne = restTemplate.exchange(uri, HttpMethod.POST, entity, new ParameterizedTypeReference<>() {}); + ResponseEntity responseOne = restTemplate.exchange(uri, HttpMethod.POST, entity, new ParameterizedTypeReference<>() { + }); if (!responseOne.getStatusCode().equals(HttpStatus.ACCEPTED)) { log.debug("{}", responseOne.getStatusCode().value()); throw new ConnectionFailureException(SmsCampaignConstants.SMS); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updateemailoutboundwithcampaignmessage/EmailParamMappingException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updateemailoutboundwithcampaignmessage/EmailParamMappingException.java index 86419af6ef8..95f28c22bb3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updateemailoutboundwithcampaignmessage/EmailParamMappingException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updateemailoutboundwithcampaignmessage/EmailParamMappingException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updateemailoutboundwithcampaignmessage/UpdateEmailOutboundWithCampaignMessageConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updateemailoutboundwithcampaignmessage/UpdateEmailOutboundWithCampaignMessageConfig.java index fa73c7051c9..29933f8027f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updateemailoutboundwithcampaignmessage/UpdateEmailOutboundWithCampaignMessageConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updateemailoutboundwithcampaignmessage/UpdateEmailOutboundWithCampaignMessageConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updateemailoutboundwithcampaignmessage/UpdateEmailOutboundWithCampaignMessageTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updateemailoutboundwithcampaignmessage/UpdateEmailOutboundWithCampaignMessageTasklet.java index 2a3f6964730..fb99001fb27 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updateemailoutboundwithcampaignmessage/UpdateEmailOutboundWithCampaignMessageTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updateemailoutboundwithcampaignmessage/UpdateEmailOutboundWithCampaignMessageTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import com.github.mustachejava.MustacheFactory; import jakarta.mail.internet.AddressException; import jakarta.mail.internet.InternetAddress; + import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; @@ -33,6 +34,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.campaigns.email.data.EmailCampaignData; @@ -83,10 +85,12 @@ public RepeatStatus execute(StepContribution contribution, ChunkContext chunkCon } private void insertDirectCampaignIntoEmailOutboundTable(final String emailParams, final String emailSubject, - final String messageTemplate, final String campaignName, final Long campaignId) { + final String messageTemplate, final String campaignName, final Long campaignId) { try { - HashMap campaignParams = new ObjectMapper().readValue(emailParams, new TypeReference<>() {}); - HashMap queryParamForRunReport = new ObjectMapper().readValue(emailParams, new TypeReference<>() {}); + HashMap campaignParams = new ObjectMapper().readValue(emailParams, new TypeReference<>() { + }); + HashMap queryParamForRunReport = new ObjectMapper().readValue(emailParams, new TypeReference<>() { + }); List> runReportObject = emailCampaignWritePlatformService .getRunReportByServiceImpl(campaignParams.get("reportName"), queryParamForRunReport); if (runReportObject != null) { @@ -125,7 +129,7 @@ private void updateTriggerDates(Long campaignId) { } private String compileEmailTemplate(final String textMessageTemplate, final String campaignName, - final Map emailParams) { + final Map emailParams) { final MustacheFactory mf = new DefaultMustacheFactory(); final Mustache mustache = mf.compile(new StringReader(textMessageTemplate), campaignName); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updatesmsoutboundwithcampaignmessage/UpdateSmsOutboundWithCampaignMessageConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updatesmsoutboundwithcampaignmessage/UpdateSmsOutboundWithCampaignMessageConfig.java index 0ac5215602f..baeea5935a1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updatesmsoutboundwithcampaignmessage/UpdateSmsOutboundWithCampaignMessageConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updatesmsoutboundwithcampaignmessage/UpdateSmsOutboundWithCampaignMessageConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updatesmsoutboundwithcampaignmessage/UpdateSmsOutboundWithCampaignMessageTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updatesmsoutboundwithcampaignmessage/UpdateSmsOutboundWithCampaignMessageTasklet.java index e24a42fb729..ae02e1b2e73 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updatesmsoutboundwithcampaignmessage/UpdateSmsOutboundWithCampaignMessageTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/jobs/updatesmsoutboundwithcampaignmessage/UpdateSmsOutboundWithCampaignMessageTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDateTime; import java.util.Collection; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignConstants.java index 964beda3057..40fe35c6e79 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignEnumerations.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignEnumerations.java index 58210ed615d..438af03cf67 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignEnumerations.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.Month; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.campaigns.constants.CampaignType; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType; @@ -36,19 +37,19 @@ public static EnumOptionData smscampaignTriggerType(final SmsCampaignTriggerType SmsCampaignTriggerType.INVALID.getCode(), "Invalid"); switch (type) { case INVALID: - break; + break; case DIRECT: optionData = new EnumOptionData(SmsCampaignTriggerType.DIRECT.getValue().longValue(), SmsCampaignTriggerType.DIRECT.getCode(), "Direct"); - break; + break; case SCHEDULE: optionData = new EnumOptionData(SmsCampaignTriggerType.SCHEDULE.getValue().longValue(), SmsCampaignTriggerType.SCHEDULE.getCode(), "Scheduled"); - break; + break; case TRIGGERED: optionData = new EnumOptionData(SmsCampaignTriggerType.TRIGGERED.getValue().longValue(), SmsCampaignTriggerType.TRIGGERED.getCode(), "Triggered"); - break; + break; } return optionData; } @@ -58,14 +59,14 @@ public static EnumOptionData smscampaignType(final CampaignType type) { "Invalid"); switch (type) { case INVALID: - break; + break; case SMS: optionData = new EnumOptionData(CampaignType.SMS.getValue().longValue(), CampaignType.SMS.getCode(), "SMS"); - break; + break; case NOTIFICATION: optionData = new EnumOptionData(CampaignType.NOTIFICATION.getValue().longValue(), CampaignType.NOTIFICATION.getCode(), "NOTIFICATION"); - break; + break; } return optionData; } @@ -79,9 +80,9 @@ public static List calendarMonthType() { final List optionDatas = new ArrayList<>(); for (final Month monthType : Month.values()) { if (Month.DECEMBER.compareTo(monthType) != 0) { // We are removing - // December because - // we are adding - // yearly frequency + // December because + // we are adding + // yearly frequency optionDatas.add(calendarMonthType(monthType)); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignStatus.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignStatus.java index 64231c9190f..fb0d601690d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignStatus.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignStatus.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignTriggerType.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignTriggerType.java index 7462efd6a0e..5b3db1e1d03 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignTriggerType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/constants/SmsCampaignTriggerType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/CampaignPreviewData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/CampaignPreviewData.java index d3e8e5022b1..bbb43a32e7c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/CampaignPreviewData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/CampaignPreviewData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/MessageGatewayConfigurationData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/MessageGatewayConfigurationData.java index 7ebef15af89..5245c95ee43 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/MessageGatewayConfigurationData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/MessageGatewayConfigurationData.java @@ -6,9 +6,9 @@ * 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 @@ -18,7 +18,9 @@ */ package org.apache.fineract.infrastructure.campaigns.sms.data; -public record MessageGatewayConfigurationData(Long id, String connectionName, String hostName, int portNumber, String endPoint, - String userName, String password, boolean sslEnabled, String tenantAppKey) { +public record MessageGatewayConfigurationData(Long id, String connectionName, String hostName, int portNumber, + String endPoint, + String userName, String password, boolean sslEnabled, + String tenantAppKey) { } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/SmsBusinessRulesData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/SmsBusinessRulesData.java index 1f6130f4ad6..58d5fabf4c4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/SmsBusinessRulesData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/SmsBusinessRulesData.java @@ -6,9 +6,9 @@ * 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 @@ -21,10 +21,10 @@ import java.util.Map; public record SmsBusinessRulesData(Long reportId, String reportName, String reportType, String reportSubType, - Map reportParamName, String reportDescription) { + Map reportParamName, String reportDescription) { public static SmsBusinessRulesData instance(final Long reportId, final String reportName, final String reportType, - final String reportSubType, final Map reportParamName, final String reportDescription) { + final String reportSubType, final Map reportParamName, final String reportDescription) { return new SmsBusinessRulesData(reportId, reportName, reportType, reportSubType, reportParamName, reportDescription); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/SmsCampaignData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/SmsCampaignData.java index 04e5941e2d3..ab57866414e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/SmsCampaignData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/SmsCampaignData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.time.ZonedDateTime; import java.util.Collection; + import lombok.Builder; import lombok.Getter; import org.apache.fineract.infrastructure.core.data.EnumOptionData; @@ -57,10 +58,10 @@ public final class SmsCampaignData { private final Collection periodFrequencyOptions; public static SmsCampaignData instance(final Long id, final String campaignName, final EnumOptionData campaignType, - final EnumOptionData triggerType, final Long runReportId, final String reportName, final String paramValue, - final EnumOptionData campaignStatus, final String message, final ZonedDateTime nextTriggerDate, final LocalDate lastTriggerDate, - final SmsCampaignTimeLine smsCampaignTimeLine, final ZonedDateTime recurrenceStartDate, final String recurrence, - final Long providerId, final boolean isNotification) { + final EnumOptionData triggerType, final Long runReportId, final String reportName, final String paramValue, + final EnumOptionData campaignStatus, final String message, final ZonedDateTime nextTriggerDate, final LocalDate lastTriggerDate, + final SmsCampaignTimeLine smsCampaignTimeLine, final ZonedDateTime recurrenceStartDate, final String recurrence, + final Long providerId, final boolean isNotification) { return SmsCampaignData.builder().id(id).campaignName(campaignName).campaignType(campaignType).triggerType(triggerType) .runReportId(runReportId).reportName(reportName).paramValue(paramValue).campaignStatus(campaignStatus) @@ -70,10 +71,10 @@ public static SmsCampaignData instance(final Long id, final String campaignName, } public static SmsCampaignData template(final Collection smsProviderOptions, - final Collection campaignTypeOptions, final Collection businessRulesOptions, - final Collection triggerTypeOptions, final Collection months, - final Collection weekDays, final Collection frequencyTypeOptions, - final Collection periodFrequencyOptions) { + final Collection campaignTypeOptions, final Collection businessRulesOptions, + final Collection triggerTypeOptions, final Collection months, + final Collection weekDays, final Collection frequencyTypeOptions, + final Collection periodFrequencyOptions) { return SmsCampaignData.builder().smsProviderOptions(smsProviderOptions).businessRulesOptions(businessRulesOptions) .campaignTypeOptions(campaignTypeOptions).triggerTypeOptions(triggerTypeOptions).months(months).weekDays(weekDays) .frequencyTypeOptions(frequencyTypeOptions).periodFrequencyOptions(periodFrequencyOptions).build(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/SmsCampaignTimeLine.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/SmsCampaignTimeLine.java index 586094485d1..980aa4674dd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/SmsCampaignTimeLine.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/SmsCampaignTimeLine.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,6 @@ @SuppressWarnings("unused") public record SmsCampaignTimeLine(LocalDate submittedOnDate, String submittedByUsername, LocalDate activatedOnDate, - String activatedByUsername, LocalDate closedOnDate, String closedByUsername) { + String activatedByUsername, LocalDate closedOnDate, String closedByUsername) { } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/SmsProviderData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/SmsProviderData.java index 91c2b5179f7..0bd7e5c52a5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/SmsProviderData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/SmsProviderData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignCreationDto.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignCreationDto.java index 2ec71e3a70d..6e78ccdba68 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignCreationDto.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignCreationDto.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignDto.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignDto.java index 970bd13d275..caea7ba2e20 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignDto.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignDto.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.campaigns.sms.data.dto; import com.fasterxml.jackson.annotation.JsonInclude; + import java.io.Serial; import java.io.Serializable; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignHandlerDto.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignHandlerDto.java index 22fc8ade4ce..e94ea616006 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignHandlerDto.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignHandlerDto.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.campaigns.sms.data.dto; import com.fasterxml.jackson.annotation.JsonInclude; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignParamReq.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignParamReq.java index 47ce9328f4e..4419f6c8d2f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignParamReq.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignParamReq.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignPreviewDto.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignPreviewDto.java index 9fc1e21a87a..3e31db2909f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignPreviewDto.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignPreviewDto.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignUpdateDto.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignUpdateDto.java index 98d19fcfcc8..a23df8a1e67 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignUpdateDto.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/data/dto/SmsCampaignUpdateDto.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/domain/SmsCampaign.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/domain/SmsCampaign.java index d04ec7b5f1c..84287c3a6cd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/domain/SmsCampaign.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/domain/SmsCampaign.java @@ -6,9 +6,9 @@ * 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 @@ -31,6 +31,7 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.time.LocalDate; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; @@ -39,6 +40,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.campaigns.constants.CampaignType; import org.apache.fineract.infrastructure.campaigns.sms.constants.SmsCampaignStatus; @@ -55,7 +57,7 @@ import org.apache.fineract.useradministration.domain.AppUser; @Entity -@Table(name = "sms_campaign", uniqueConstraints = { @UniqueConstraint(columnNames = { "campaign_name" }, name = "campaign_name_UNIQUE") }) +@Table(name = "sms_campaign", uniqueConstraints = {@UniqueConstraint(columnNames = {"campaign_name"}, name = "campaign_name_UNIQUE")}) public class SmsCampaign extends AbstractPersistableCustom { @Column(name = "campaign_name", nullable = false) @@ -122,11 +124,12 @@ public class SmsCampaign extends AbstractPersistableCustom { @Column(name = "is_notification", nullable = true) private boolean isNotification; - public SmsCampaign() {} + public SmsCampaign() { + } private SmsCampaign(final String campaignName, final Integer campaignType, final Integer triggerType, final Report businessRuleId, - final Long providerId, final String paramValue, final String message, final LocalDate submittedOnDate, - final AppUser submittedBy, final String recurrence, final LocalDateTime recurrenceStartDate, final boolean isNotification) { + final Long providerId, final String paramValue, final String message, final LocalDate submittedOnDate, + final AppUser submittedBy, final String recurrence, final LocalDateTime recurrenceStartDate, final boolean isNotification) { this.campaignName = campaignName; this.campaignType = campaignType; this.triggerType = SmsCampaignTriggerType.fromInt(triggerType).getValue(); @@ -519,7 +522,7 @@ private static String constructRecurrence(final JsonCommand command) { } private static String constructRecurrence(final CalendarFrequencyType frequencyType, final Integer interval, - final Integer repeatsOnDay) { + final Integer repeatsOnDay) { final StringBuilder recurrenceBuilder = new StringBuilder(200); recurrenceBuilder.append("FREQ="); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/domain/SmsCampaignRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/domain/SmsCampaignRepository.java index 6c06210b83b..6817ea1869b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/domain/SmsCampaignRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/domain/SmsCampaignRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/domain/SmsCampaignStatusEnumerations.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/domain/SmsCampaignStatusEnumerations.java index 3e4e6f6b001..a9879f3e198 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/domain/SmsCampaignStatusEnumerations.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/domain/SmsCampaignStatusEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -36,13 +36,13 @@ public static EnumOptionData status(final SmsCampaignStatus status) { return switch (status) { case INVALID -> - new EnumOptionData(SmsCampaignStatus.INVALID.getValue().longValue(), SmsCampaignStatus.INVALID.getCode(), "Invalid"); + new EnumOptionData(SmsCampaignStatus.INVALID.getValue().longValue(), SmsCampaignStatus.INVALID.getCode(), "Invalid"); case PENDING -> - new EnumOptionData(SmsCampaignStatus.PENDING.getValue().longValue(), SmsCampaignStatus.PENDING.getCode(), "Pending"); + new EnumOptionData(SmsCampaignStatus.PENDING.getValue().longValue(), SmsCampaignStatus.PENDING.getCode(), "Pending"); case ACTIVE -> - new EnumOptionData(SmsCampaignStatus.ACTIVE.getValue().longValue(), SmsCampaignStatus.ACTIVE.getCode(), "active"); + new EnumOptionData(SmsCampaignStatus.ACTIVE.getValue().longValue(), SmsCampaignStatus.ACTIVE.getCode(), "active"); case CLOSED -> - new EnumOptionData(SmsCampaignStatus.CLOSED.getValue().longValue(), SmsCampaignStatus.CLOSED.getCode(), "closed"); + new EnumOptionData(SmsCampaignStatus.CLOSED.getValue().longValue(), SmsCampaignStatus.CLOSED.getCode(), "closed"); }; } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/ConnectionFailureException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/ConnectionFailureException.java index 5e6217a2ebb..4ca8abf4907 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/ConnectionFailureException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/ConnectionFailureException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/GatewayConnectionConfigurationNotFound.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/GatewayConnectionConfigurationNotFound.java index cf9a31a24c1..99225911a51 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/GatewayConnectionConfigurationNotFound.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/GatewayConnectionConfigurationNotFound.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsCampaignMustBeClosedToBeDeletedException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsCampaignMustBeClosedToBeDeletedException.java index 7e0b926ff0c..44e1dd60304 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsCampaignMustBeClosedToBeDeletedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsCampaignMustBeClosedToBeDeletedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsCampaignMustBeClosedToEditException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsCampaignMustBeClosedToEditException.java index 5798d8f7e96..605507112e7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsCampaignMustBeClosedToEditException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsCampaignMustBeClosedToEditException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsCampaignNameAlreadyExistsException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsCampaignNameAlreadyExistsException.java index 6bc7e40dbcf..2926817f8e6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsCampaignNameAlreadyExistsException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsCampaignNameAlreadyExistsException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsCampaignNotFound.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsCampaignNotFound.java index 539488d4b47..143d1106e82 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsCampaignNotFound.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsCampaignNotFound.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsRuntimeException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsRuntimeException.java index 7ae714b675d..5800ae99a2a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsRuntimeException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/exception/SmsRuntimeException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/ActivateSmsCampaignCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/ActivateSmsCampaignCommandHandler.java index f2abaab93f8..bec3416e0c0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/ActivateSmsCampaignCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/ActivateSmsCampaignCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/CloseSmsCampaignCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/CloseSmsCampaignCommandHandler.java index c26ef90e4b5..402e738c609 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/CloseSmsCampaignCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/CloseSmsCampaignCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/CreateSmsCampaignCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/CreateSmsCampaignCommandHandler.java index aa9fd41e468..94163acfa6f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/CreateSmsCampaignCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/CreateSmsCampaignCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/DeleteSmsCampaignCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/DeleteSmsCampaignCommandHandler.java index 83b8d259226..8786b9f7bbc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/DeleteSmsCampaignCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/DeleteSmsCampaignCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/ReactivateSmsCampaignCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/ReactivateSmsCampaignCommandHandler.java index 074c9e5e4a4..212a05f0bc5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/ReactivateSmsCampaignCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/ReactivateSmsCampaignCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/UpdateSmsCampaignCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/UpdateSmsCampaignCommandHandler.java index aad0a43c80b..66805f49618 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/UpdateSmsCampaignCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/handler/UpdateSmsCampaignCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/mapper/BusinessRuleMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/mapper/BusinessRuleMapper.java index 84c49111086..f54df14f645 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/mapper/BusinessRuleMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/mapper/BusinessRuleMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,12 +19,14 @@ package org.apache.fineract.infrastructure.campaigns.sms.mapper; import jakarta.annotation.PostConstruct; + import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.campaigns.sms.data.SmsBusinessRulesData; import org.apache.fineract.infrastructure.core.service.database.DatabaseSpecificSQLGenerator; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/mapper/SmsCampaignMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/mapper/SmsCampaignMapper.java index e6bff53053c..41e46e71a56 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/mapper/SmsCampaignMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/mapper/SmsCampaignMapper.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.sql.SQLException; import java.time.LocalDate; import java.time.ZonedDateTime; + import lombok.Setter; import org.apache.fineract.infrastructure.campaigns.constants.CampaignType; import org.apache.fineract.infrastructure.campaigns.sms.constants.SmsCampaignTriggerType; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/serialization/SmsCampaignValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/serialization/SmsCampaignValidator.java index 6aab22e61a8..e0cb70a3195 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/serialization/SmsCampaignValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/serialization/SmsCampaignValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.time.LocalDate; import java.util.ArrayList; @@ -28,6 +29,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.campaigns.sms.constants.SmsCampaignTriggerType; import org.apache.fineract.infrastructure.campaigns.sms.domain.SmsCampaign; @@ -98,7 +100,8 @@ public void validateCreate(String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SmsCampaignValidator.supportedParams); final JsonElement element = this.fromApiJsonHelper.parse(json); @@ -172,7 +175,8 @@ public void validateForUpdate(String json) { if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SmsCampaignValidator.supportedParamsForUpdate); final JsonElement element = this.fromApiJsonHelper.parse(json); @@ -234,7 +238,8 @@ public void validatePreviewMessage(String json) { if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SmsCampaignValidator.PREVIEW_REQUEST_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); @@ -263,7 +268,8 @@ public void validateClosedDate(String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SmsCampaignValidator.CLOSE_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -283,7 +289,8 @@ public void validateActivation(String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SmsCampaignValidator.ACTIVATION_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -304,7 +311,8 @@ public void validateClosure(String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SmsCampaignValidator.CLOSE_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDomainService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDomainService.java index f2f3aca478c..ccfb43d9869 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDomainService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDomainService.java @@ -6,9 +6,9 @@ * 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 @@ -21,4 +21,5 @@ /** * Created by Stefan on 4-7-2016. */ -public interface SmsCampaignDomainService {} +public interface SmsCampaignDomainService { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDomainServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDomainServiceImpl.java index ec8aa53abdd..810dd3d957f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDomainServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDomainServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import jakarta.annotation.PostConstruct; + import java.io.IOException; import java.security.InvalidParameterException; import java.time.OffsetDateTime; @@ -34,6 +35,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.campaigns.sms.constants.SmsCampaignTriggerType; @@ -344,7 +346,7 @@ private HashMap processRepaymentDataForSms(final LoanTransaction } private HashMap processSavingsTransactionDataForSms(final SavingsAccountTransaction savingsAccountTransaction, - Client client) { + Client client) { // {{savingsId}} {{id}} {{firstname}} {{middlename}} {{lastname}} // {{FullName}} {{mobileNo}} {{savingsAccountId}} {{depositAmount}} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDropdownReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDropdownReadPlatformService.java index 267d58eac11..974cbc4294c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDropdownReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDropdownReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.campaigns.sms.service; import java.util.Collection; + import org.apache.fineract.infrastructure.campaigns.sms.data.SmsProviderData; import org.apache.fineract.infrastructure.core.data.EnumOptionData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDropdownReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDropdownReadPlatformServiceImpl.java index c333a4203da..48351d88297 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDropdownReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignDropdownReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.Collection; import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.campaigns.constants.CampaignType; import org.apache.fineract.infrastructure.campaigns.helper.SmsConfigUtils; import org.apache.fineract.infrastructure.campaigns.sms.constants.SmsCampaignEnumerations; @@ -79,7 +80,8 @@ public Collection retrieveSmsProviders() { ResponseEntity> responseOne = null; try { - responseOne = restTemplate.exchange(uri, HttpMethod.GET, entity, new ParameterizedTypeReference<>() {}); + responseOne = restTemplate.exchange(uri, HttpMethod.GET, entity, new ParameterizedTypeReference<>() { + }); } catch (ResourceAccessException ex) { LOG.debug("Mobile service provider {} not available", uri, ex); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignReadPlatformService.java index 22946c4cb1f..4b58829e8ae 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignReadPlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignReadPlatformServiceImpl.java index 0994fa0d397..80a7b2e98c0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.campaigns.sms.service; import java.util.Collection; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.campaigns.sms.data.SmsBusinessRulesData; @@ -75,7 +76,7 @@ public Page retrieveAll(final SearchParameters searchParameters sqlBuilder.append(sqlGenerator.limit(searchParameters.getLimit())); } } - return this.paginationHelper.fetchPage(jdbcTemplate, sqlBuilder.toString(), new Object[] { visible }, this.smsCampaignMapper); + return this.paginationHelper.fetchPage(jdbcTemplate, sqlBuilder.toString(), new Object[]{visible}, this.smsCampaignMapper); } @Override diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignWritePlatformService.java index a1b8b0b70f7..c866c81fa1a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.campaigns.sms.service; import java.util.Map; + import org.apache.fineract.infrastructure.campaigns.sms.data.CampaignPreviewData; import org.apache.fineract.infrastructure.campaigns.sms.domain.SmsCampaign; import org.apache.fineract.infrastructure.core.api.JsonCommand; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignWritePlatformServiceJpaImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignWritePlatformServiceJpaImpl.java index 695466680bb..824b6374983 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignWritePlatformServiceJpaImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignWritePlatformServiceJpaImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import com.github.mustachejava.Mustache; import com.github.mustachejava.MustacheFactory; import com.google.gson.JsonElement; + import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; @@ -40,6 +41,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.campaigns.sms.data.CampaignPreviewData; @@ -206,10 +208,12 @@ public CommandProcessingResult delete(final Long resourceId) { @Override public void insertDirectCampaignIntoSmsOutboundTable(SmsCampaign smsCampaign) { try { - HashMap campaignParams = new ObjectMapper().readValue(smsCampaign.getParamValue(), new TypeReference<>() {}); + HashMap campaignParams = new ObjectMapper().readValue(smsCampaign.getParamValue(), new TypeReference<>() { + }); HashMap queryParamForRunReport = new ObjectMapper().readValue(smsCampaign.getParamValue(), - new TypeReference<>() {}); + new TypeReference<>() { + }); List> runReportObject = getRunReportByServiceImpl(campaignParams.get("reportName"), queryParamForRunReport); @@ -248,11 +252,13 @@ public void insertDirectCampaignIntoSmsOutboundTable(final Loan loan, final SmsC Set clientSet = new HashSet<>(); HashMap campaignParams = new ObjectMapper().readValue(smsCampaign.getParamValue(), - new TypeReference>() {}); + new TypeReference>() { + }); campaignParams.put("loanId", loan.getId().toString()); HashMap queryParamForRunReport = new ObjectMapper().readValue(smsCampaign.getParamValue(), - new TypeReference>() {}); + new TypeReference>() { + }); queryParamForRunReport.put("loanId", loan.getId().toString()); if (loan.isGroupLoan()) { @@ -303,10 +309,12 @@ public void insertDirectCampaignIntoSmsOutboundTable(final Loan loan, final SmsC public void insertDirectCampaignIntoSmsOutboundTable(final Client client, final SmsCampaign smsCampaign) { try { HashMap campaignParams = new ObjectMapper().readValue(smsCampaign.getParamValue(), - new TypeReference>() {}); + new TypeReference>() { + }); campaignParams.put("clientId", client.getId().toString()); HashMap queryParamForRunReport = new ObjectMapper().readValue(smsCampaign.getParamValue(), - new TypeReference>() {}); + new TypeReference>() { + }); campaignParams.put("clientId", client.getId().toString()); queryParamForRunReport.put("clientId", client.getId().toString()); @@ -345,10 +353,12 @@ public void insertDirectCampaignIntoSmsOutboundTable(final Client client, final public void insertDirectCampaignIntoSmsOutboundTable(final SavingsAccount savingsAccount, final SmsCampaign smsCampaign) { try { HashMap campaignParams = new ObjectMapper().readValue(smsCampaign.getParamValue(), - new TypeReference>() {}); + new TypeReference>() { + }); campaignParams.put("savingsId", savingsAccount.getId().toString()); HashMap queryParamForRunReport = new ObjectMapper().readValue(smsCampaign.getParamValue(), - new TypeReference>() {}); + new TypeReference>() { + }); queryParamForRunReport.put("savingsId", savingsAccount.getId().toString()); Client client = savingsAccount.getClient(); @@ -473,15 +483,16 @@ private List> getRunReportByServiceImpl(final String rep try { final String response = this.genericDataService.generateJsonFromGenericResultsetData(results); - resultList = new ObjectMapper().readValue(response, new TypeReference>>() {}); + resultList = new ObjectMapper().readValue(response, new TypeReference>>() { + }); } catch (JsonParseException e) { log.warn("Conversion of report query results to JSON failed", e); return resultList; } // loop changes array date to string date - for (Iterator> iter = resultList.iterator(); iter.hasNext();) { + for (Iterator> iter = resultList.iterator(); iter.hasNext(); ) { HashMap entry = iter.next(); - for (Iterator> it = entry.entrySet().iterator(); it.hasNext();) { + for (Iterator> it = entry.entrySet().iterator(); it.hasNext(); ) { Map.Entry map = it.next(); String key = map.getKey(); Object ob = map.getValue(); @@ -506,8 +517,10 @@ public CampaignPreviewData previewMessage(final JsonQuery query) { final String textMessageTemplate = this.fromJsonHelper.extractStringNamed("message", query.parsedJson()); try { - HashMap campaignParams = new ObjectMapper().readValue(smsParams, new TypeReference<>() {}); - HashMap queryParamForRunReport = new ObjectMapper().readValue(smsParams, new TypeReference<>() {}); + HashMap campaignParams = new ObjectMapper().readValue(smsParams, new TypeReference<>() { + }); + HashMap queryParamForRunReport = new ObjectMapper().readValue(smsParams, new TypeReference<>() { + }); List> runReportObject = this.getRunReportByServiceImpl(campaignParams.get("reportName"), queryParamForRunReport); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/CreateCodeCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/CreateCodeCommandHandler.java index 8f783a766e0..abb4745c52a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/CreateCodeCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/CreateCodeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/CreateCodeValueCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/CreateCodeValueCommandHandler.java index ab3f60a17ae..493044f718b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/CreateCodeValueCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/CreateCodeValueCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/DeleteCodeCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/DeleteCodeCommandHandler.java index 718231470a9..6bd833b90be 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/DeleteCodeCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/DeleteCodeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/DeleteCodeValueCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/DeleteCodeValueCommandHandler.java index 910b76156cb..09aec6ab2f8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/DeleteCodeValueCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/DeleteCodeValueCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/UpdateCodeCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/UpdateCodeCommandHandler.java index def7a818f0f..a2b232a4e57 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/UpdateCodeCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/UpdateCodeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/UpdateCodeValueCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/UpdateCodeValueCommandHandler.java index 8ba6da8d63e..13a3e519561 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/UpdateCodeValueCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/handler/UpdateCodeValueCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/serialization/CodeCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/serialization/CodeCommandFromApiJsonDeserializer.java index ebc2e4ff023..29d773c141b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/serialization/CodeCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/serialization/CodeCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,12 +20,14 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -57,7 +59,8 @@ public void validateForCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -76,7 +79,8 @@ public void validateForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/serialization/CodeValueCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/serialization/CodeValueCommandFromApiJsonDeserializer.java index 1f8a771c927..48baf659516 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/serialization/CodeValueCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/serialization/CodeValueCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,11 +20,13 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.codes.CodeConstants.CodevalueJSONinputParams; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -57,7 +59,8 @@ public void validateForCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -92,7 +95,8 @@ public void validateForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeReadPlatformServiceImpl.java index 5f9970f2b4b..fdbeec94c34 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; + import org.apache.fineract.infrastructure.codes.data.CodeData; import org.apache.fineract.infrastructure.codes.exception.CodeNotFoundException; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; @@ -79,7 +80,7 @@ public CodeData retrieveCode(final Long codeId) { final CodeMapper rm = new CodeMapper(); final String sql = "select " + rm.schema() + " where c.id = ?"; - return this.jdbcTemplate.queryForObject(sql, rm, new Object[] { codeId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, rm, new Object[]{codeId}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new CodeNotFoundException(codeId, e); } @@ -93,7 +94,7 @@ public CodeData retrieveCode(final String codeName) { final CodeMapper rm = new CodeMapper(); final String sql = "select " + rm.schema() + " where c.code_name = ?"; - return this.jdbcTemplate.queryForObject(sql, rm, new Object[] { codeName }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, rm, new Object[]{codeName}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new CodeNotFoundException(codeName, e); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueReadPlatformServiceImpl.java index f4f8957c020..3c33c24c9eb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.sql.SQLException; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.codes.domain.CodeValueRepository; @@ -73,7 +74,7 @@ public List retrieveCodeValuesByCode(final String code) { final CodeValueDataMapper rm = new CodeValueDataMapper(); final String sql = "select " + rm.schema() + "where c.code_name like ? and cv.is_active = true order by position"; - return this.jdbcTemplate.query(sql, rm, new Object[] { code }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{code}); // NOSONAR } @Override @@ -85,7 +86,7 @@ public Collection retrieveAllCodeValues(final Long codeId) { final CodeValueDataMapper rm = new CodeValueDataMapper(); final String sql = "select " + rm.schema() + "where cv.code_id = ? order by position"; - return this.jdbcTemplate.query(sql, rm, new Object[] { codeId }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{codeId}); // NOSONAR } @Override @@ -98,7 +99,7 @@ public CodeValueData retrieveCodeValue(final Long codeValueId) { final CodeValueDataMapper rm = new CodeValueDataMapper(); final String sql = "select " + rm.schema() + " where cv.id = ? order by position"; - return this.jdbcTemplate.queryForObject(sql, rm, new Object[] { codeValueId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, rm, new Object[]{codeValueId}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new CodeValueNotFoundException(codeValueId, e); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueWritePlatformService.java index 829ba9cbdc1..f50aed3e116 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueWritePlatformServiceJpaRepositoryImpl.java index 96e584a31a8..cbcea3a29e9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeValueWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.codes.service; import java.util.Map; + import org.apache.fineract.infrastructure.codes.domain.Code; import org.apache.fineract.infrastructure.codes.domain.CodeRepository; import org.apache.fineract.infrastructure.codes.domain.CodeValue; @@ -55,8 +56,8 @@ public class CodeValueWritePlatformServiceJpaRepositoryImpl implements CodeValue @Autowired public CodeValueWritePlatformServiceJpaRepositoryImpl(final PlatformSecurityContext context, final CodeRepository codeRepository, - final CodeValueRepositoryWrapper codeValueRepositoryWrapper, final CodeValueRepository codeValueRepository, - final CodeValueCommandFromApiJsonDeserializer fromApiJsonDeserializer) { + final CodeValueRepositoryWrapper codeValueRepositoryWrapper, final CodeValueRepository codeValueRepository, + final CodeValueCommandFromApiJsonDeserializer fromApiJsonDeserializer) { this.context = context; this.codeRepository = codeRepository; this.codeValueRepositoryWrapper = codeValueRepositoryWrapper; @@ -97,7 +98,7 @@ public CommandProcessingResult createCodeValue(final JsonCommand command) { * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleCodeValueDataIntegrityIssues(final JsonCommand command, final Throwable realCause, - final NonTransientDataAccessException dve) { + final NonTransientDataAccessException dve) { if (realCause.getMessage().contains("code_value")) { final String name = command.stringValueOfParameterNamed("name"); throw new PlatformDataIntegrityException("error.msg.code.value.duplicate.label", diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeWritePlatformService.java index c9d287ec890..2142ce89972 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeWritePlatformServiceJpaRepositoryImpl.java index 5e59b6ecac6..f2bc5d3fb69 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/codes/service/CodeWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.infrastructure.codes.service; import jakarta.persistence.PersistenceException; + import java.util.Map; + import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.fineract.infrastructure.codes.domain.Code; import org.apache.fineract.infrastructure.codes.domain.CodeRepository; @@ -52,7 +54,7 @@ public class CodeWritePlatformServiceJpaRepositoryImpl implements CodeWritePlatf @Autowired public CodeWritePlatformServiceJpaRepositoryImpl(final PlatformSecurityContext context, final CodeRepository codeRepository, - final CodeCommandFromApiJsonDeserializer fromApiJsonDeserializer) { + final CodeCommandFromApiJsonDeserializer fromApiJsonDeserializer) { this.context = context; this.codeRepository = codeRepository; this.fromApiJsonDeserializer = fromApiJsonDeserializer; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServiceConfigurationApiConstant.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServiceConfigurationApiConstant.java index 39b85fc72d9..0895f55cd5f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServiceConfigurationApiConstant.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServiceConfigurationApiConstant.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServicesConfigurationApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServicesConfigurationApiResourceSwagger.java index 60b4fc76403..a0cdd3215e6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServicesConfigurationApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/ExternalServicesConfigurationApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiResourceSwagger.java index 3c4db1bba12..36ae8cbea1c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/GlobalConfigurationApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.infrastructure.configuration.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.List; + import org.apache.fineract.infrastructure.configuration.data.GlobalConfigurationPropertyData; /** @@ -34,7 +36,8 @@ private GlobalConfigurationApiResourceSwagger() { @Schema(description = "GetGlobalConfigurationsResponse") public static final class GetGlobalConfigurationsResponse { - private GetGlobalConfigurationsResponse() {} + private GetGlobalConfigurationsResponse() { + } public List globalConfiguration; } @@ -42,7 +45,8 @@ private GetGlobalConfigurationsResponse() {} @Schema(description = "PutGlobalConfigurationsRequest") public static final class PutGlobalConfigurationsRequest { - private PutGlobalConfigurationsRequest() {} + private PutGlobalConfigurationsRequest() { + } @Schema(example = "true") public boolean enabled; @@ -61,11 +65,13 @@ private PutGlobalConfigurationsRequest() {} @Schema(description = "PutGlobalConfigurationsResponse") public static final class PutGlobalConfigurationsResponse { - private PutGlobalConfigurationsResponse() {} + private PutGlobalConfigurationsResponse() { + } static final class PutGlobalConfigurationsResponsechangesSwagger { - private PutGlobalConfigurationsResponsechangesSwagger() {} + private PutGlobalConfigurationsResponsechangesSwagger() { + } @Schema(example = "true") public boolean enabled; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/InternalConfigurationsApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/InternalConfigurationsApiResource.java index bd1ca019765..897a16ee945 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/InternalConfigurationsApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/api/InternalConfigurationsApiResource.java @@ -6,9 +6,9 @@ * 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 @@ -64,8 +64,8 @@ public void afterPropertiesSet() throws Exception { @PUT @Path("name/{configName}/value/{configValue}") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) @Operation(summary = "Update internal global configuration", operationId = "updateInternalGlobalConfiguration") @SuppressFBWarnings("SLF4J_SIGN_ONLY_FORMAT") public Response updateGlobalConfiguration(@PathParam("configName") String configName, @PathParam("configValue") Long configValue) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/async/CustomAsyncExceptionHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/async/CustomAsyncExceptionHandler.java index 9a40289f987..09c10c4063f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/async/CustomAsyncExceptionHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/async/CustomAsyncExceptionHandler.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.configuration.async; import java.lang.reflect.Method; + import lombok.extern.slf4j.Slf4j; import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/async/SpringAsyncConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/async/SpringAsyncConfig.java index 3493b3e90c3..f35203163aa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/async/SpringAsyncConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/async/SpringAsyncConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/command/UpdateGlobalConfigurationCommand.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/command/UpdateGlobalConfigurationCommand.java index 7e190e0e9af..87bda397189 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/command/UpdateGlobalConfigurationCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/command/UpdateGlobalConfigurationCommand.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/ExternalServicesData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/ExternalServicesData.java index a95d7c968f8..2e369e048c3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/ExternalServicesData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/ExternalServicesData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/ExternalServicesPropertiesData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/ExternalServicesPropertiesData.java index ba88e8284df..9919a6acc14 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/ExternalServicesPropertiesData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/ExternalServicesPropertiesData.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.infrastructure.configuration.data; import com.fasterxml.jackson.databind.annotation.JsonSerialize; + import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/S3CredentialsData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/S3CredentialsData.java index b6c5db41d30..b8d44668071 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/S3CredentialsData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/S3CredentialsData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/SMTPCredentialsData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/SMTPCredentialsData.java index d8fb0718d72..48c8ed3375e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/SMTPCredentialsData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/data/SMTPCredentialsData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainServiceJpa.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainServiceJpa.java index afb6aa28659..06f66b90215 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainServiceJpa.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainServiceJpa.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.configuration.domain; import jakarta.validation.constraints.NotNull; + import java.time.LocalDate; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ExternalService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ExternalService.java index 6ca584596fe..290e2a179dc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ExternalService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ExternalService.java @@ -6,9 +6,9 @@ * 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 @@ -30,7 +30,7 @@ import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @Entity -@Table(name = "c_external_service", uniqueConstraints = { @UniqueConstraint(columnNames = { "name" }, name = "name_UNIQUE") }) +@Table(name = "c_external_service", uniqueConstraints = {@UniqueConstraint(columnNames = {"name"}, name = "name_UNIQUE")}) @Getter @Setter @NoArgsConstructor diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ExternalServicePropertiesPK.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ExternalServicePropertiesPK.java index 20e042f1146..6b27346ed31 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ExternalServicePropertiesPK.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ExternalServicePropertiesPK.java @@ -6,9 +6,9 @@ * 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 @@ -20,7 +20,9 @@ import jakarta.persistence.Column; import jakarta.persistence.Embeddable; + import java.io.Serializable; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ExternalServicesProperties.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ExternalServicesProperties.java index e8c6c2aae4a..e33f135e083 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ExternalServicesProperties.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ExternalServicesProperties.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,10 @@ import jakarta.persistence.EmbeddedId; import jakarta.persistence.Entity; import jakarta.persistence.Table; + import java.util.LinkedHashMap; import java.util.Map; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ExternalServicesPropertiesRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ExternalServicesPropertiesRepository.java index fe82a2a90fc..a87a3688cc9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ExternalServicesPropertiesRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ExternalServicesPropertiesRepository.java @@ -6,9 +6,9 @@ * 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 @@ -28,5 +28,5 @@ public interface ExternalServicesPropertiesRepository extends JpaRepository * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/exception/ExternalServiceConfigurationNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/exception/ExternalServiceConfigurationNotFoundException.java index bd91eae6f18..519d384c563 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/exception/ExternalServiceConfigurationNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/exception/ExternalServiceConfigurationNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/exception/GlobalConfigurationPropertyCannotBeModfied.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/exception/GlobalConfigurationPropertyCannotBeModfied.java index cbffa51453e..0b74cf4c3d3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/exception/GlobalConfigurationPropertyCannotBeModfied.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/exception/GlobalConfigurationPropertyCannotBeModfied.java @@ -6,9 +6,9 @@ * 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 @@ -24,7 +24,7 @@ public class GlobalConfigurationPropertyCannotBeModfied extends AbstractPlatform public GlobalConfigurationPropertyCannotBeModfied(final Long configId) { super("error.msg.configuration.id.not.modifiable", "Configuration identifier `" + configId + "` cannot be modified", - new Object[] { configId }); + new Object[]{configId}); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/handler/UpdateExternalServiceConfigurationCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/handler/UpdateExternalServiceConfigurationCommandHandler.java index a61d5121570..d26bbce06e6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/handler/UpdateExternalServiceConfigurationCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/handler/UpdateExternalServiceConfigurationCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/handler/UpdateGlobalConfigurationCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/handler/UpdateGlobalConfigurationCommandHandler.java index 561508e1775..ad2bbb01b58 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/handler/UpdateGlobalConfigurationCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/handler/UpdateGlobalConfigurationCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/serialization/ExternalServicesPropertiesCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/serialization/ExternalServicesPropertiesCommandFromApiJsonDeserializer.java index 2ce038e1518..1c4f9b09625 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/serialization/ExternalServicesPropertiesCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/serialization/ExternalServicesPropertiesCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.infrastructure.configuration.serialization; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.configuration.exception.ExternalServiceConfigurationNotFoundException; import org.apache.fineract.infrastructure.configuration.service.ExternalServicesConstants.NotificationJSONinputParams; @@ -57,9 +59,12 @@ public void validateForUpdate(final String json, final String externalServiceNam }.getType(); switch (externalServiceName) { case "S3" -> this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, S3_SUPPORTED_PARAMETERS); - case "SMTP" -> this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SMTP_SUPPORTED_PARAMETERS); - case "SMS" -> this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SMS_SUPPORTED_PARAMETERS); - case "NOTIFICATION" -> this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, NOTIFICATION_SUPPORTED_PARAMETERS); + case "SMTP" -> + this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SMTP_SUPPORTED_PARAMETERS); + case "SMS" -> + this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SMS_SUPPORTED_PARAMETERS); + case "NOTIFICATION" -> + this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, NOTIFICATION_SUPPORTED_PARAMETERS); default -> throw new ExternalServiceConfigurationNotFoundException(externalServiceName); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/serialization/GlobalConfigurationCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/serialization/GlobalConfigurationCommandFromApiJsonDeserializer.java index 948e571a5a2..e6156dc6d1c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/serialization/GlobalConfigurationCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/serialization/GlobalConfigurationCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -19,11 +19,13 @@ package org.apache.fineract.infrastructure.configuration.serialization; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.configuration.command.UpdateGlobalConfigurationCommand; import org.apache.fineract.infrastructure.core.exception.InvalidJsonException; @@ -58,7 +60,8 @@ public UpdateGlobalConfigurationCommand commandFromApiJson(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); return this.fromApiJsonHelper.fromJson(json, UpdateGlobalConfigurationCommand.class); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ConfigurationReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ConfigurationReadPlatformServiceImpl.java index 7e11c5c12c8..915b0bae892 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ConfigurationReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ConfigurationReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.sql.SQLException; import java.time.LocalDate; import java.util.List; + import org.apache.fineract.infrastructure.configuration.data.GlobalConfigurationData; import org.apache.fineract.infrastructure.configuration.data.GlobalConfigurationPropertyData; import org.apache.fineract.infrastructure.configuration.domain.GlobalConfigurationProperty; @@ -44,7 +45,7 @@ public class ConfigurationReadPlatformServiceImpl implements ConfigurationReadPl @Autowired public ConfigurationReadPlatformServiceImpl(final PlatformSecurityContext context, final JdbcTemplate jdbcTemplate, - final GlobalConfigurationRepositoryWrapper configurationRepositoryWrapper) { + final GlobalConfigurationRepositoryWrapper configurationRepositoryWrapper) { this.context = context; this.jdbcTemplate = jdbcTemplate; this.configurationRepositoryWrapper = configurationRepositoryWrapper; @@ -67,7 +68,7 @@ public GlobalConfigurationData retrieveGlobalConfiguration(final boolean survey) sql += " order by c.id"; final List globalConfiguration = this.jdbcTemplate.query(sql, this.rm, - survey ? new Object[] { DataTableApiConstant.CATEGORY_PPI } : new Object[] {}); + survey ? new Object[]{DataTableApiConstant.CATEGORY_PPI} : new Object[]{}); return new GlobalConfigurationData().setGlobalConfiguration(globalConfiguration); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServiceWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServiceWritePlatformService.java index aa491fba053..d524bd6b90c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServiceWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServiceWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServiceWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServiceWritePlatformServiceJpaRepositoryImpl.java index 8f7ace22f76..4c79d6f3d8e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServiceWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServiceWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.configuration.data.ExternalServicesData; import org.apache.fineract.infrastructure.configuration.domain.ExternalServicesProperties; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesConstants.java index 672fbd891d7..4c3b07bd7b0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesPropertiesReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesPropertiesReadPlatformService.java index 1faa7551a5a..9e6121d8960 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesPropertiesReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesPropertiesReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.configuration.service; import java.util.Collection; + import org.apache.fineract.infrastructure.campaigns.sms.data.MessageGatewayConfigurationData; import org.apache.fineract.infrastructure.configuration.data.ExternalServicesPropertiesData; import org.apache.fineract.infrastructure.configuration.data.S3CredentialsData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesPropertiesReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesPropertiesReadPlatformServiceImpl.java index 1d2d89a04aa..8b7521cceda 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesPropertiesReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesPropertiesReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.campaigns.sms.data.MessageGatewayConfigurationData; import org.apache.fineract.infrastructure.configuration.data.ExternalServicesPropertiesData; @@ -152,7 +153,7 @@ public S3CredentialsData getS3Credentials() { final ResultSetExtractor resultSetExtractor = new S3CredentialsDataExtractor(); final String sql = "SELECT esp.name, esp.value FROM c_external_service_properties esp inner join c_external_service es on esp.external_service_id = es.id where es.name = '" + ExternalServicesConstants.S3_SERVICE_NAME + "'"; - final S3CredentialsData s3CredentialsData = this.jdbcTemplate.query(sql, resultSetExtractor, new Object[] {}); + final S3CredentialsData s3CredentialsData = this.jdbcTemplate.query(sql, resultSetExtractor, new Object[]{}); return s3CredentialsData; } @@ -162,7 +163,7 @@ public SMTPCredentialsData getSMTPCredentials() { final ResultSetExtractor resultSetExtractor = new SMTPCredentialsDataExtractor(); final String sql = "SELECT esp.name, esp.value FROM c_external_service_properties esp inner join c_external_service es on esp.external_service_id = es.id where es.name = '" + ExternalServicesConstants.SMTP_SERVICE_NAME + "'"; - final SMTPCredentialsData smtpCredentialsData = this.jdbcTemplate.query(sql, resultSetExtractor, new Object[] {}); + final SMTPCredentialsData smtpCredentialsData = this.jdbcTemplate.query(sql, resultSetExtractor, new Object[]{}); return smtpCredentialsData; } @@ -172,7 +173,7 @@ public MessageGatewayConfigurationData getSMSGateway() { final String sql = "SELECT esp.name, esp.value FROM c_external_service_properties esp inner join c_external_service es on esp.external_service_id = es.id where es.name = '" + ExternalServicesConstants.SMS_SERVICE_NAME + "'"; final MessageGatewayConfigurationData messageGatewayConfigurationData = this.jdbcTemplate.query(sql, resultSetExtractor, - new Object[] {}); + new Object[]{}); return messageGatewayConfigurationData; } @@ -182,19 +183,19 @@ public Collection retrieveOne(String serviceName switch (serviceName) { case "S3": serviceNameToUse = ExternalServicesConstants.S3_SERVICE_NAME; - break; + break; case "SMTP": serviceNameToUse = ExternalServicesConstants.SMTP_SERVICE_NAME; - break; + break; case "SMS": serviceNameToUse = ExternalServicesConstants.SMS_SERVICE_NAME; - break; + break; case "NOTIFICATION": serviceNameToUse = ExternalServicesConstants.NOTIFICATION_SERVICE_NAME; - break; + break; default: throw new ExternalServiceConfigurationNotFoundException(serviceName); @@ -232,7 +233,7 @@ public NotificationConfigurationData getNotificationConfiguration() { final String sql = "SELECT esp.name, esp.value FROM c_external_service_properties esp inner join c_external_service es on esp.external_service_id = es.id where es.name = '" + ExternalServicesConstants.NOTIFICATION_SERVICE_NAME + "'"; final NotificationConfigurationData notificationConfigurationData = this.jdbcTemplate.query(sql, resultSetExtractor, - new Object[] {}); + new Object[]{}); return notificationConfigurationData; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesReadPlatformService.java index 4ff816c3895..c98a679fb20 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesReadPlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesReadPlatformServiceImpl.java index d806ada93d8..aee5fb05407 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/ExternalServicesReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.sql.ResultSet; import java.sql.SQLException; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.configuration.data.ExternalServicesData; import org.apache.fineract.infrastructure.configuration.exception.ExternalServiceConfigurationNotFoundException; @@ -42,19 +43,19 @@ public ExternalServicesData getExternalServiceDetailsByServiceName(String servic switch (serviceName) { case "S3": serviceNameToUse = ExternalServicesConstants.S3_SERVICE_NAME; - break; + break; case "SMTP": serviceNameToUse = ExternalServicesConstants.SMTP_SERVICE_NAME; - break; + break; case "SMS": serviceNameToUse = ExternalServicesConstants.SMS_SERVICE_NAME; - break; + break; case "NOTIFICATION": serviceNameToUse = ExternalServicesConstants.NOTIFICATION_SERVICE_NAME; - break; + break; default: throw new ExternalServiceConfigurationNotFoundException(serviceName); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationPropertyUpdateService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationPropertyUpdateService.java index c55f5f6435f..1f0f4652f17 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationPropertyUpdateService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationPropertyUpdateService.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.LinkedHashMap; import java.util.Map; + import lombok.AllArgsConstructor; import org.apache.commons.lang3.BooleanUtils; import org.apache.fineract.infrastructure.configuration.api.GlobalConfigurationConstants; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationWritePlatformService.java index 4d673c45da6..fe51aa19405 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationWritePlatformServiceJpaRepositoryImpl.java index 6c182fd32d2..bf7417e856d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/service/GlobalConfigurationWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.configuration.service; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.configuration.data.GlobalConfigurationDataValidator; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/auditing/CustomAuditingHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/auditing/CustomAuditingHandler.java index 141ff4ed00b..230e0ec1907 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/auditing/CustomAuditingHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/auditing/CustomAuditingHandler.java @@ -6,9 +6,9 @@ * 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 @@ -54,7 +54,7 @@ public CustomAuditingHandler(PersistentEntities entities) { * @deprecated use {@link AuditingHandler(PersistentEntities)} instead. */ public CustomAuditingHandler(MappingContext, ? extends PersistentProperty> mappingContext, - AuditorAware auditorAware) { + AuditorAware auditorAware) { this(PersistentEntities.of(mappingContext)); setAuditorAware(auditorAware); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/auditing/CustomDateTimeProvider.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/auditing/CustomDateTimeProvider.java index a7c14ba4eec..65e36176811 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/auditing/CustomDateTimeProvider.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/auditing/CustomDateTimeProvider.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.core.auditing; import jakarta.validation.constraints.NotNull; + import java.time.temporal.TemporalAccessor; import java.util.Optional; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.springframework.data.auditing.DateTimeProvider; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/auditing/JpaAuditingHandlerRegistrar.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/auditing/JpaAuditingHandlerRegistrar.java index 687efa35b05..1b6f157cc0b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/auditing/JpaAuditingHandlerRegistrar.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/auditing/JpaAuditingHandlerRegistrar.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/FineractLiquibaseOnlyApplicationConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/FineractLiquibaseOnlyApplicationConfiguration.java index 78f5e7d45a4..8860437a939 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/FineractLiquibaseOnlyApplicationConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/FineractLiquibaseOnlyApplicationConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -32,10 +32,10 @@ @Conditional(FineractLiquibaseOnlyApplicationCondition.class) @Slf4j -@EnableConfigurationProperties({ FineractProperties.class, LiquibaseProperties.class }) -@Import({ HikariCpConfig.class, JdbcConfig.class }) -@ComponentScan(basePackages = { "org.apache.fineract.infrastructure.core.service.migration", - "org.apache.fineract.infrastructure.core.service.database", "org.apache.fineract.infrastructure.core.service.tenant" }) +@EnableConfigurationProperties({FineractProperties.class, LiquibaseProperties.class}) +@Import({HikariCpConfig.class, JdbcConfig.class}) +@ComponentScan(basePackages = {"org.apache.fineract.infrastructure.core.service.migration", + "org.apache.fineract.infrastructure.core.service.database", "org.apache.fineract.infrastructure.core.service.tenant"}) public class FineractLiquibaseOnlyApplicationConfiguration implements InitializingBean { @Override diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/FineractWebApplicationConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/FineractWebApplicationConfiguration.java index 73ec21230b7..b2cd6a27e21 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/FineractWebApplicationConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/boot/FineractWebApplicationConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -43,12 +43,12 @@ */ @Configuration -@EnableAutoConfiguration(exclude = { DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class, +@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class, DataSourceTransactionManagerAutoConfiguration.class, GsonAutoConfiguration.class, JdbcTemplateAutoConfiguration.class, - LiquibaseAutoConfiguration.class }) + LiquibaseAutoConfiguration.class}) @EnableTransactionManagement @EnableWebSecurity -@EnableConfigurationProperties({ FineractProperties.class, LiquibaseProperties.class }) +@EnableConfigurationProperties({FineractProperties.class, LiquibaseProperties.class}) @ComponentScan(basePackages = "org.apache.fineract.**") @IntegrationComponentScan(basePackages = "org.apache.fineract.**") @Conditional(FineractWebApplicationCondition.class) diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/CompatibilityConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/CompatibilityConfig.java index 11811517e61..d74a2fec3b2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/CompatibilityConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/CompatibilityConfig.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import com.zaxxer.hikari.HikariDataSource; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import jakarta.annotation.PostConstruct; + import java.util.Properties; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/ContentS3Config.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/ContentS3Config.java index f9640afb090..e6854c14ab2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/ContentS3Config.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/ContentS3Config.java @@ -6,9 +6,9 @@ * 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 @@ -20,7 +20,9 @@ package org.apache.fineract.infrastructure.core.config; import com.google.common.base.Strings; + import java.net.URI; + import lombok.extern.slf4j.Slf4j; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/FineractStartupValidationConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/FineractStartupValidationConfig.java index 816c46da7d6..73278c288c4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/FineractStartupValidationConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/FineractStartupValidationConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/HikariCpConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/HikariCpConfig.java index 31ef0332705..253cfa0832e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/HikariCpConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/HikariCpConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/JdbcConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/JdbcConfig.java index 4ae4a633979..d03615924a8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/JdbcConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/JdbcConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/MetricsConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/MetricsConfig.java index 4b4729a369a..6f6fa223044 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/MetricsConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/MetricsConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/OkHttp3Config.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/OkHttp3Config.java index cfae68f3558..4c423d67685 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/OkHttp3Config.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/OkHttp3Config.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import okhttp3.OkHttpClient; @@ -51,19 +52,21 @@ public OkHttpClient okHttpClient() throws Exception { final X509TrustManager insecureX509TrustManager = new X509TrustManager() { @Override - public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {}// NOSONAR + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { + }// NOSONAR @Override - public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {}// NOSONAR + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { + }// NOSONAR @Override public X509Certificate[] getAcceptedIssuers() { - return new X509Certificate[] {}; + return new X509Certificate[]{}; } }; SSLContext insecureSSLContext = SSLContext.getInstance("TLS"); - insecureSSLContext.init(null, new TrustManager[] { insecureX509TrustManager }, new SecureRandom()); + insecureSSLContext.init(null, new TrustManager[]{insecureX509TrustManager}, new SecureRandom()); okBuilder.sslSocketFactory(insecureSSLContext.getSocketFactory(), insecureX509TrustManager); HostnameVerifier insecureHostnameVerifier = (hostname, session) -> true;// NOSONAR diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/SecurityValidationConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/SecurityValidationConfig.java index 24c5a507d2f..d06c6ba08b1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/SecurityValidationConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/SecurityValidationConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/SpringConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/SpringConfig.java index 7f0db741bcd..b57860066e9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/SpringConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/SpringConfig.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ package org.apache.fineract.infrastructure.core.config; import java.util.concurrent.ThreadPoolExecutor; + import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.config.MethodInvokingFactoryBean; @@ -41,9 +42,9 @@ public class SpringConfig { @Bean(name = "fineractEventExecutor") public ThreadPoolTaskExecutor fineractEventExecutor(ThreadPoolTaskExecutorBuilder builder, - @Value("${spring.task.execution.pool.core-size:-1}") int configuredCore, - @Value("${spring.task.execution.pool.max-size:-1}") int configuredMax, - @Value("${spring.task.execution.pool.queue-capacity:-1}") int configuredQueueCapacity) { + @Value("${spring.task.execution.pool.core-size:-1}") int configuredCore, + @Value("${spring.task.execution.pool.max-size:-1}") int configuredMax, + @Value("${spring.task.execution.pool.queue-capacity:-1}") int configuredQueueCapacity) { int cpus = Runtime.getRuntime().availableProcessors(); int smartCore = cpus * 2; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/TaskExecutorConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/TaskExecutorConfig.java index 9a1b1cdc0b9..67a891a8f75 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/TaskExecutorConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/TaskExecutorConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/TaskExecutorConstant.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/TaskExecutorConstant.java index 1aeeddb2510..78ff1110ba9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/TaskExecutorConstant.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/TaskExecutorConstant.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/cache/CacheConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/cache/CacheConfig.java index b9196a3d956..5e7ce95802b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/cache/CacheConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/cache/CacheConfig.java @@ -6,9 +6,9 @@ * 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 @@ -30,6 +30,7 @@ import javax.cache.CacheManager; import javax.cache.Caching; import javax.cache.spi.CachingProvider; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.config.FineractProperties; import org.ehcache.config.builders.CacheConfigurationBuilder; @@ -115,8 +116,8 @@ private CacheManager getInternalEhCacheManager() { } private javax.cache.configuration.Configuration generateCustomCacheConfiguration(String cacheIdentifier, - javax.cache.configuration.Configuration defaultTemplate, Duration defaultTimeToLive, - Integer defaultMaxEntries) { + javax.cache.configuration.Configuration defaultTemplate, Duration defaultTimeToLive, + Integer defaultMaxEntries) { javax.cache.configuration.Configuration configurationTemplate = defaultTemplate; if (fineractProperties.getCache().getCustomTemplates().containsKey(cacheIdentifier)) { Duration timeToLiveExpiration = Objects.requireNonNullElse( @@ -129,7 +130,7 @@ private javax.cache.configuration.Configuration generateCustomCa } private static javax.cache.configuration.Configuration generateCacheConfiguration(Integer defaultMaxEntries, - Duration defaultTimeToLive) { + Duration defaultTimeToLive) { return Eh107Configuration.fromEhcacheCacheConfiguration(CacheConfigurationBuilder .newCacheConfigurationBuilder(Object.class, Object.class, ResourcePoolsBuilder.heap(defaultMaxEntries)) .withExpiry(ExpiryPolicyBuilder.timeToLiveExpiration(defaultTimeToLive)).build()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/cache/SpecifiedCacheSupportingCacheManager.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/cache/SpecifiedCacheSupportingCacheManager.java index 2baf7c0b7ec..c09dccfc275 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/cache/SpecifiedCacheSupportingCacheManager.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/cache/SpecifiedCacheSupportingCacheManager.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.LinkedHashSet; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.InitializingBean; import org.springframework.cache.Cache; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/cache/TransactionBoundCacheManager.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/cache/TransactionBoundCacheManager.java index 713903bd859..883a756bc99 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/cache/TransactionBoundCacheManager.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/cache/TransactionBoundCacheManager.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.config.cache; import java.util.Collection; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.persistence.TransactionLifecycleCallback; import org.springframework.cache.Cache; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/jpa/EntityManagerFactoryCustomizer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/jpa/EntityManagerFactoryCustomizer.java index e2a77c95953..463ebc1a841 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/jpa/EntityManagerFactoryCustomizer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/jpa/EntityManagerFactoryCustomizer.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Collections; import java.util.Map; import java.util.Set; + import org.springframework.orm.jpa.persistenceunit.PersistenceUnitPostProcessor; /** diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/jpa/JPAConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/jpa/JPAConfig.java index 9a4f64e3e10..7c2320cb61e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/jpa/JPAConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/config/jpa/JPAConfig.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.Map; import java.util.Set; import javax.sql.DataSource; + import org.apache.fineract.infrastructure.core.auditing.JpaAuditingHandlerRegistrar; import org.apache.fineract.infrastructure.core.domain.AuditorAwareImpl; import org.apache.fineract.infrastructure.core.persistence.DatabaseSelectingPersistenceUnitPostProcessor; @@ -58,7 +59,7 @@ @Configuration @EnableJpaAuditing -@EnableJpaRepositories(basePackages = { "org.apache.fineract.**.domain", "org.apache.fineract.**.repository" }) +@EnableJpaRepositories(basePackages = {"org.apache.fineract.**.domain", "org.apache.fineract.**.repository"}) @EnableConfigurationProperties(JpaProperties.class) @Import(JpaAuditingHandlerRegistrar.class) public class JPAConfig extends JpaBaseConfiguration { @@ -67,7 +68,7 @@ public class JPAConfig extends JpaBaseConfiguration { private final Collection emFactoryCustomizers; public JPAConfig(RoutingDataSource dataSource, JpaProperties properties, ObjectProvider jtaTransactionManager, - DatabaseTypeResolver databaseTypeResolver, Collection customizers) { + DatabaseTypeResolver databaseTypeResolver, Collection customizers) { super(dataSource, properties, jtaTransactionManager); this.databaseTypeResolver = databaseTypeResolver; this.emFactoryCustomizers = customizers; @@ -78,7 +79,7 @@ public JPAConfig(RoutingDataSource dataSource, JpaProperties properties, ObjectP @Primary @DependsOn("tenantDatabaseUpgradeService") public LocalContainerEntityManagerFactoryBean entityManagerFactory(EntityManagerFactoryBuilder factoryBuilder, - PersistenceManagedTypes persistenceManagedTypes) { + PersistenceManagedTypes persistenceManagedTypes) { Map vendorProperties = getVendorProperties(getDataSource()); String[] packagesToScan = getPackagesToScan(); return factoryBuilder.dataSource(getDataSource()).properties(vendorProperties).persistenceUnit("jpa-pu").packages(packagesToScan) @@ -104,8 +105,8 @@ protected String[] getPackagesToScan() { @Override public EntityManagerFactoryBuilder entityManagerFactoryBuilder(JpaVendorAdapter jpaVendorAdapter, - ObjectProvider persistenceUnitManager, - ObjectProvider customizers) { + ObjectProvider persistenceUnitManager, + ObjectProvider customizers) { EntityManagerFactoryBuilder builder = super.entityManagerFactoryBuilder(jpaVendorAdapter, persistenceUnitManager, customizers); builder.setPersistenceUnitPostProcessors(getPersistenceUnitPostProcessors()); return builder; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/debug/EchoHeadersApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/debug/EchoHeadersApiResource.java index ac60f156608..092deef3c1e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/debug/EchoHeadersApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/debug/EchoHeadersApiResource.java @@ -6,9 +6,9 @@ * 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 @@ -42,8 +42,8 @@ public class EchoHeadersApiResource { @GET - @Consumes({ MediaType.WILDCARD }) - @Produces({ MediaType.TEXT_PLAIN }) + @Consumes({MediaType.WILDCARD}) + @Produces({MediaType.TEXT_PLAIN}) public String get(@Context HttpHeaders headers) { StringBuilder sb = new StringBuilder("Request Headers:\n"); headers.getRequestHeaders().forEach((k, v) -> sb.append(k).append(" : ").append(v.get(0)).append("\n")); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/jpa/DiagnosticsEntityManager.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/jpa/DiagnosticsEntityManager.java index 8975730f254..d03a5045f49 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/jpa/DiagnosticsEntityManager.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/jpa/DiagnosticsEntityManager.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/jpa/StatementLoggingCustomizer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/jpa/StatementLoggingCustomizer.java index ca35f7ae3e0..3fd459adf32 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/jpa/StatementLoggingCustomizer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/jpa/StatementLoggingCustomizer.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.diagnostics.jpa; import java.util.Map; + import org.apache.fineract.infrastructure.core.config.jpa.EntityManagerFactoryCustomizer; import org.eclipse.persistence.config.PersistenceUnitProperties; import org.eclipse.persistence.logging.SessionLog; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/jpa/StatementLoggingCustomizerCondition.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/jpa/StatementLoggingCustomizerCondition.java index e4514f1e0c6..6e3ebc6a778 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/jpa/StatementLoggingCustomizerCondition.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/jpa/StatementLoggingCustomizerCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/AbstractSamplingService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/AbstractSamplingService.java index 91b87c4d89f..72d67c3cdbd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/AbstractSamplingService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/AbstractSamplingService.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static org.apache.fineract.infrastructure.core.diagnostics.performance.MeasuringUtil.measure; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.time.Duration; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; @@ -70,7 +71,8 @@ public void reset() { /** * Subclasses can override this to do specific cleanup. */ - protected void doReset() {} + protected void doReset() { + } protected abstract void takeSample(String key, Duration duration); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/InMemorySamplingService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/InMemorySamplingService.java index 71f58f9e36f..30a6cc70335 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/InMemorySamplingService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/InMemorySamplingService.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.CopyOnWriteArrayList; + import lombok.extern.slf4j.Slf4j; @Slf4j diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/NoopSamplingService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/NoopSamplingService.java index 2a23dac1d7d..be4159cb28c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/NoopSamplingService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/NoopSamplingService.java @@ -6,9 +6,9 @@ * 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 @@ -24,7 +24,8 @@ public class NoopSamplingService implements SamplingService { - public NoopSamplingService() {} + public NoopSamplingService() { + } @Override public void sample(String key, Runnable r) { @@ -37,7 +38,8 @@ public T sample(String key, Supplier s) { } @Override - public void reset() {} + public void reset() { + } @Override public SamplingData getSamplingData() { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/SamplingConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/SamplingConfiguration.java index d439e5d76d4..b1bc296f4be 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/SamplingConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/SamplingConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.infrastructure.core.diagnostics.performance.sampling.core; import com.google.common.base.Splitter; + import java.time.Duration; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.config.FineractProperties; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/SamplingData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/SamplingData.java index aaf8b15a211..23ae6cf5538 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/SamplingData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/SamplingData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.Duration; import java.util.List; import java.util.Map; + import lombok.Getter; @Getter diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/SamplingService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/SamplingService.java index 687615a54a1..f4a93c991c7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/SamplingService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/SamplingService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/SamplingServiceFactory.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/SamplingServiceFactory.java index cd48aace839..58f1e262f6c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/SamplingServiceFactory.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/core/SamplingServiceFactory.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Consumer; + import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/output/SamplingDataPrinter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/output/SamplingDataPrinter.java index 1b4345d37c9..86b17978dd3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/output/SamplingDataPrinter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/output/SamplingDataPrinter.java @@ -6,9 +6,9 @@ * 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 @@ -21,12 +21,14 @@ import static java.lang.System.lineSeparator; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.time.Duration; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; + import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; @@ -38,7 +40,7 @@ @Slf4j public class SamplingDataPrinter { - @SuppressFBWarnings({ "SLF4J_FORMAT_SHOULD_BE_CONST" }) + @SuppressFBWarnings({"SLF4J_FORMAT_SHOULD_BE_CONST"}) public void print(Map, SamplingData> data) { if (log.isInfoEnabled()) { if (MapUtils.isNotEmpty(data)) { @@ -53,13 +55,13 @@ public void print(Map, SamplingData> data) { } } - @SuppressFBWarnings({ "VA_FORMAT_STRING_USES_NEWLINE" }) + @SuppressFBWarnings({"VA_FORMAT_STRING_USES_NEWLINE"}) private String getFormattedSamplingData(Class clazz, SamplingData samplingData) { if (clazz != null && samplingData != null) { Map> timings = samplingData.getTimings(); if (!timings.isEmpty()) { return """ - + Sampling data for %s ------------- %s diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/output/SamplingScheduler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/output/SamplingScheduler.java index 4e5c1645f34..d8da18757dd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/output/SamplingScheduler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/output/SamplingScheduler.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.Duration; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.diagnostics.performance.sampling.core.SamplingConfiguration; @@ -46,7 +47,7 @@ public class SamplingScheduler implements InitializingBean { private final TaskScheduler taskScheduler; private final SamplingConfiguration samplingConfiguration; - @SuppressWarnings({ "FutureReturnValueIgnored" }) + @SuppressWarnings({"FutureReturnValueIgnored"}) @Override public void afterPropertiesSet() throws Exception { long resetPeriodInSec = samplingConfiguration.getResetPeriod().toSeconds(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/support/SamplingBeanPostProcessor.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/support/SamplingBeanPostProcessor.java index f16a61d182a..049cded1d9a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/support/SamplingBeanPostProcessor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/support/SamplingBeanPostProcessor.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/support/SamplingEnabledCondition.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/support/SamplingEnabledCondition.java index 05a5b9fdfb3..b82f87c392e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/support/SamplingEnabledCondition.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/support/SamplingEnabledCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/support/SamplingMethodInterceptor.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/support/SamplingMethodInterceptor.java index 8c8ea05b554..97f3a917f1a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/support/SamplingMethodInterceptor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/performance/sampling/support/SamplingMethodInterceptor.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.diagnostics.performance.sampling.support; import java.util.StringJoiner; + import lombok.RequiredArgsConstructor; import org.aopalliance.intercept.MethodInterceptor; import org.aopalliance.intercept.MethodInvocation; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/security/SecurityFilterChainDiagnostics.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/security/SecurityFilterChainDiagnostics.java index 4180f841f14..f382b2a6d9f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/security/SecurityFilterChainDiagnostics.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/diagnostics/security/SecurityFilterChainDiagnostics.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static java.lang.System.lineSeparator; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.boot.FineractProfiles; @@ -54,7 +55,7 @@ private void printFilterChain(SecurityFilterChain filterChain) { private void printDefaultFilterChain(DefaultSecurityFilterChain filterChain) { log.info(""" - + Filter chain matcher: {} Filters in order: {} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/AuditorAwareImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/AuditorAwareImpl.java index fc93b7f6ce6..f269479c9a9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/AuditorAwareImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/AuditorAwareImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static org.apache.fineract.useradministration.service.AppUserConstants.ADMIN_USER_ID; import java.util.Optional; + import org.apache.fineract.useradministration.domain.AppUser; import org.springframework.data.domain.AuditorAware; import org.springframework.security.core.Authentication; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/DefaultPlatformPasswordEncoder.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/DefaultPlatformPasswordEncoder.java index 9ff42b378d7..a38dace7c2e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/DefaultPlatformPasswordEncoder.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/DefaultPlatformPasswordEncoder.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/EmailDetail.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/EmailDetail.java index f25fa6c1f50..902df3d5168 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/EmailDetail.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/EmailDetail.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/ExternalIdConverter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/ExternalIdConverter.java index 7da57eb04c5..75ee63cda43 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/ExternalIdConverter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/domain/ExternalIdConverter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/http/BodyCachingHttpServletRequestWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/http/BodyCachingHttpServletRequestWrapper.java index 23a9ad9b03a..986611c9e36 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/http/BodyCachingHttpServletRequestWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/http/BodyCachingHttpServletRequestWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -25,11 +25,13 @@ import jakarta.servlet.ServletInputStream; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletRequestWrapper; + import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; + import org.apache.commons.io.IOUtils; public class BodyCachingHttpServletRequestWrapper extends HttpServletRequestWrapper { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyConfig.java index 0bb82fa9506..1fd3f1255d9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyJacksonConverterConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyJacksonConverterConfig.java index 5e52e4dcc1a..f386c8a8f40 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyJacksonConverterConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyJacksonConverterConfig.java @@ -6,9 +6,9 @@ * 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 @@ -24,8 +24,10 @@ import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.MapperFeature; import com.fasterxml.jackson.databind.ObjectMapper; + import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.jersey.converter.JsonConverter; import org.apache.fineract.infrastructure.core.jersey.serializer.JacksonDeserializerAdapter; import org.apache.fineract.infrastructure.core.jersey.serializer.JacksonSerializerAdapter; @@ -39,7 +41,7 @@ public class JerseyJacksonConverterConfig { @Bean public ObjectMapper objectMapper(List> serializers, List> deserializers, - List> jsonConverters) { + List> jsonConverters) { // Merge JsonConverters with serializers and deserializers List> mergedSerializers = new ArrayList<>(serializers); mergedSerializers.addAll(jsonConverters.stream().map(JacksonSerializerAdapter::new).toList()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyJacksonObjectArgumentHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyJacksonObjectArgumentHandler.java index d922789a64e..b30983fa6db 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyJacksonObjectArgumentHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/JerseyJacksonObjectArgumentHandler.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import jakarta.ws.rs.ext.MessageBodyReader; import jakarta.ws.rs.ext.MessageBodyWriter; import jakarta.ws.rs.ext.Provider; + import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; @@ -34,6 +35,7 @@ import java.lang.annotation.Annotation; import java.lang.reflect.Type; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.commons.io.IOUtils; import org.springframework.http.HttpHeaders; @@ -57,9 +59,9 @@ public boolean isReadable(Class type, Type genericType, Annotation[] annotati } @Override - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings({"unchecked"}) public T readFrom(Class type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, - MultivaluedMap httpHeaders, InputStream entityStream) throws IOException, WebApplicationException { + MultivaluedMap httpHeaders, InputStream entityStream) throws IOException, WebApplicationException { if (String.class == genericType) { // If the request type is String, keep it that way. StringWriter writer = new StringWriter(); @@ -81,7 +83,7 @@ public boolean isWriteable(Class type, Type genericType, Annotation[] annotat @Override public void writeTo(T t, Class type, Type genericType, Annotation[] annotations, jakarta.ws.rs.core.MediaType mediaType, - MultivaluedMap httpHeaders, OutputStream entityStream) throws IOException, WebApplicationException { + MultivaluedMap httpHeaders, OutputStream entityStream) throws IOException, WebApplicationException { if (String.class == genericType) { // If the response type is String, keep it that way. IOUtils.write((String) t, entityStream, UTF_8); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/SimpleHttpOutputMessage.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/SimpleHttpOutputMessage.java index fe3b08c4c39..ee3ed015c80 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/SimpleHttpOutputMessage.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/SimpleHttpOutputMessage.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.IOException; import java.io.OutputStream; + import lombok.RequiredArgsConstructor; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpOutputMessage; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/DateJsonConverter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/DateJsonConverter.java index 080905ea209..4d6e9537e1a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/DateJsonConverter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/DateJsonConverter.java @@ -6,9 +6,9 @@ * 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 @@ -21,10 +21,12 @@ import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; + import java.io.IOException; import java.time.Instant; import java.time.format.DateTimeFormatter; import java.util.Date; + import org.springframework.stereotype.Component; @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/ExternalIdJsonConverter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/ExternalIdJsonConverter.java index 054715163f0..1d4b7b7d5dd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/ExternalIdJsonConverter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/ExternalIdJsonConverter.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; + import java.io.IOException; + import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.springframework.stereotype.Component; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/JsonConverter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/JsonConverter.java index daad86f0093..cb141840c0b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/JsonConverter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/JsonConverter.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; + import java.io.IOException; public interface JsonConverter { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/LocalDateJsonConverter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/LocalDateJsonConverter.java index 08e9ac02620..ee0996607ef 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/LocalDateJsonConverter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/LocalDateJsonConverter.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; + import java.io.IOException; import java.time.LocalDate; import java.time.format.DateTimeFormatter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/LocalDateTimeJsonConverter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/LocalDateTimeJsonConverter.java index 6c9f2a2846e..45052502b1c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/LocalDateTimeJsonConverter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/LocalDateTimeJsonConverter.java @@ -6,9 +6,9 @@ * 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 @@ -21,9 +21,11 @@ import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; + import java.io.IOException; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; + import org.springframework.stereotype.Component; @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/LocalTimeJsonConverter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/LocalTimeJsonConverter.java index 20b57480062..088821801e3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/LocalTimeJsonConverter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/LocalTimeJsonConverter.java @@ -6,9 +6,9 @@ * 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 @@ -21,9 +21,11 @@ import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; + import java.io.IOException; import java.time.LocalTime; import java.time.format.DateTimeFormatter; + import org.springframework.stereotype.Component; @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/OffsetDateTimeJsonConverter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/OffsetDateTimeJsonConverter.java index 19b0a905960..6cc478b28d2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/OffsetDateTimeJsonConverter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/converter/OffsetDateTimeJsonConverter.java @@ -6,9 +6,9 @@ * 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 @@ -21,9 +21,11 @@ import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonToken; + import java.io.IOException; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; + import org.springframework.stereotype.Component; @Component diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/JacksonDeserializerAdapter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/JacksonDeserializerAdapter.java index 18ef095ae4a..07cbe2efbe9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/JacksonDeserializerAdapter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/JacksonDeserializerAdapter.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonDeserializer; + import java.io.IOException; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.jersey.converter.JsonConverter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/JacksonLocalDateBeanSerializerModifier.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/JacksonLocalDateBeanSerializerModifier.java index d530769a206..46bbbdfd3bb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/JacksonLocalDateBeanSerializerModifier.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/JacksonLocalDateBeanSerializerModifier.java @@ -6,9 +6,9 @@ * 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 @@ -24,13 +24,15 @@ import com.fasterxml.jackson.databind.ser.BeanPropertyWriter; import com.fasterxml.jackson.databind.ser.BeanSerializerModifier; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.time.LocalDate; import java.util.List; + import org.apache.fineract.infrastructure.core.jersey.converter.LocalDateJsonConverter; import org.apache.fineract.infrastructure.core.jersey.serializer.legacy.JacksonLocalDateArraySerializer; import org.apache.fineract.infrastructure.core.jersey.serializer.legacy.JsonLocalDateArrayFormat; -@SuppressFBWarnings({ "SE_BAD_FIELD", "SE_BAD_FIELD_STORE" }) +@SuppressFBWarnings({"SE_BAD_FIELD", "SE_BAD_FIELD_STORE"}) public class JacksonLocalDateBeanSerializerModifier extends BeanSerializerModifier { private final JsonSerializer localDateSerializer = new JacksonSerializerAdapter<>(new LocalDateJsonConverter()); @@ -39,7 +41,7 @@ public class JacksonLocalDateBeanSerializerModifier extends BeanSerializerModifi @Override @SuppressWarnings("unchecked") public List changeProperties(SerializationConfig config, BeanDescription beanDesc, - List beanProperties) { + List beanProperties) { if (beanDesc.getBeanClass().isAnnotationPresent(JsonLocalDateArrayFormat.class)) { assignLocalDateSerializer(beanProperties, (JsonSerializer) localDateArraySerializer); } else { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/JacksonSerializerAdapter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/JacksonSerializerAdapter.java index 951a0872eb2..25c0974fe2f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/JacksonSerializerAdapter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/JacksonSerializerAdapter.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; + import java.io.IOException; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.jersey.converter.JsonConverter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/MaskedValueSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/MaskedValueSerializer.java index 62a23675fde..0402221f5cf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/MaskedValueSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/MaskedValueSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; + import java.io.IOException; + import org.apache.fineract.infrastructure.core.service.StringUtil; public class MaskedValueSerializer extends JsonSerializer { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/legacy/JacksonLocalDateArrayModule.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/legacy/JacksonLocalDateArrayModule.java index b0f641a5bf4..5eba0e2a4a4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/legacy/JacksonLocalDateArrayModule.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/legacy/JacksonLocalDateArrayModule.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/legacy/JacksonLocalDateArraySerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/legacy/JacksonLocalDateArraySerializer.java index 1b7b812532a..d98ab69b103 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/legacy/JacksonLocalDateArraySerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/jersey/serializer/legacy/JacksonLocalDateArraySerializer.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; + import java.io.IOException; import java.time.LocalDate; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/messaging/jms/ActiveMQMessageFactory.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/messaging/jms/ActiveMQMessageFactory.java index 26b786e0c1b..278ae91d1fc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/messaging/jms/ActiveMQMessageFactory.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/messaging/jms/ActiveMQMessageFactory.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/messaging/jms/MessageFactory.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/messaging/jms/MessageFactory.java index f736de48eb0..7b76ed02bff 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/messaging/jms/MessageFactory.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/messaging/jms/MessageFactory.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/AbstractFromCommandJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/AbstractFromCommandJsonDeserializer.java index c74abbf075e..0864c2c20b0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/AbstractFromCommandJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/AbstractFromCommandJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromCommandJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromCommandJsonDeserializer.java index 1215a0032c7..32a660975ff 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromCommandJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/serialization/FromCommandJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/AbandonedConnectionCleanupShutdownListener.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/AbandonedConnectionCleanupShutdownListener.java index a592c929a09..c2bb3838e45 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/AbandonedConnectionCleanupShutdownListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/AbandonedConnectionCleanupShutdownListener.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.Driver; import java.sql.DriverManager; import java.util.Enumeration; + import org.apache.fineract.infrastructure.jobs.service.JobRegisterServiceImpl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/GmailBackedPlatformEmailService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/GmailBackedPlatformEmailService.java index 54db42e16f3..7fe7e029934 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/GmailBackedPlatformEmailService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/GmailBackedPlatformEmailService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.service; import java.util.Properties; + import org.apache.fineract.infrastructure.configuration.data.SMTPCredentialsData; import org.apache.fineract.infrastructure.configuration.service.ExternalServicesPropertiesReadPlatformService; import org.apache.fineract.infrastructure.core.domain.EmailDetail; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/HashingService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/HashingService.java index 148ad79800d..b838cc18855 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/HashingService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/HashingService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/PlatformEmailSendException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/PlatformEmailSendException.java index 09b8ec7d65f..c1c694d084d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/PlatformEmailSendException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/PlatformEmailSendException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/PlatformEmailService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/PlatformEmailService.java index ad30f2ec66d..dcff5f5799f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/PlatformEmailService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/PlatformEmailService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/DatabaseAwareMigrationContextProvider.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/DatabaseAwareMigrationContextProvider.java index 89357b79f3b..047f1c3c9e7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/DatabaseAwareMigrationContextProvider.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/DatabaseAwareMigrationContextProvider.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.service.migration; import java.util.Map; + import org.apache.fineract.infrastructure.core.service.database.DatabaseType; import org.apache.fineract.infrastructure.core.service.database.DatabaseTypeResolver; import org.springframework.beans.factory.annotation.Autowired; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/ExtendedSpringLiquibase.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/ExtendedSpringLiquibase.java index c9230296443..d9dd33aedbc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/ExtendedSpringLiquibase.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/ExtendedSpringLiquibase.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.service.migration; import java.sql.SQLException; + import liquibase.Liquibase; import liquibase.exception.DatabaseException; import liquibase.exception.LiquibaseException; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/ExtendedSpringLiquibaseBuilder.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/ExtendedSpringLiquibaseBuilder.java index 3c9486275c4..a1d467f3745 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/ExtendedSpringLiquibaseBuilder.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/ExtendedSpringLiquibaseBuilder.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; import com.google.common.base.Joiner; + import java.io.File; import java.util.ArrayList; import java.util.Arrays; @@ -29,6 +30,7 @@ import java.util.List; import java.util.Map; import javax.sql.DataSource; + import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; import org.springframework.core.io.ResourceLoader; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/ExtendedSpringLiquibaseFactory.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/ExtendedSpringLiquibaseFactory.java index 85de2b3c655..ace13476e1b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/ExtendedSpringLiquibaseFactory.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/ExtendedSpringLiquibaseFactory.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.core.service.migration; import javax.sql.DataSource; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties; import org.springframework.core.env.Environment; @@ -35,7 +36,7 @@ public class ExtendedSpringLiquibaseFactory { @Autowired public ExtendedSpringLiquibaseFactory(LiquibaseProperties liquibaseProperties, ResourceLoader resourceLoader, Environment environment, - DatabaseAwareMigrationContextProvider databaseAwareMigrationContextProvider) { + DatabaseAwareMigrationContextProvider databaseAwareMigrationContextProvider) { this.liquibaseProperties = liquibaseProperties; this.resourceLoader = resourceLoader; this.environment = environment; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/SchemaUpgradeNeededException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/SchemaUpgradeNeededException.java index df1708f0821..fcaee4a4bfd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/SchemaUpgradeNeededException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/SchemaUpgradeNeededException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantDatabaseStateVerifier.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantDatabaseStateVerifier.java index 6ef80b9d0fb..e34a1560851 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantDatabaseStateVerifier.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantDatabaseStateVerifier.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Map; import java.util.Objects; import javax.sql.DataSource; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.database.DatabaseIndependentQueryService; import org.apache.fineract.infrastructure.core.service.database.DatabaseTypeResolver; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantDatabaseUpgradeService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantDatabaseUpgradeService.java index 9f4e810333c..5f96cf66bc7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantDatabaseUpgradeService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantDatabaseUpgradeService.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import static org.apache.commons.lang3.StringUtils.isNotBlank; import com.zaxxer.hikari.HikariDataSource; + import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -29,6 +30,7 @@ import java.util.concurrent.Future; import java.util.function.Function; import javax.sql.DataSource; + import liquibase.Scope; import liquibase.ThreadLocalScopeManager; import liquibase.change.custom.CustomTaskChange; @@ -213,7 +215,7 @@ private void upgradeIndividualTenant(FineractPlatformTenant tenant) throws Liqui } private void applyInitialLiquibase(DataSource dataSource, ExtendedSpringLiquibase liquibase, String id, - Function isUpgradableFn) throws LiquibaseException { + Function isUpgradableFn) throws LiquibaseException { if (databaseStateVerifier.isFlywayPresent(dataSource)) { if (isUpgradableFn.apply(dataSource)) { log.error("Cannot proceed with upgrading database {}", id); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantModuleRootFilter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantModuleRootFilter.java index 9a71322c7cc..d9176d8c5dd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantModuleRootFilter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantModuleRootFilter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantPasswordEncryptionTask.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantPasswordEncryptionTask.java index 63822ce3a73..2b413b15f30 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantPasswordEncryptionTask.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantPasswordEncryptionTask.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.infrastructure.core.service.migration; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.sql.ResultSet; import java.sql.Statement; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; + import liquibase.change.custom.CustomTaskChange; import liquibase.database.Database; import liquibase.database.jvm.JdbcConnection; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantReadOnlyPasswordEncryptionTask.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantReadOnlyPasswordEncryptionTask.java index a3537ae9fe9..d00b8ca330f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantReadOnlyPasswordEncryptionTask.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/core/service/migration/TenantReadOnlyPasswordEncryptionTask.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.infrastructure.core.service.migration; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.sql.ResultSet; import java.sql.Statement; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; + import liquibase.change.custom.CustomTaskChange; import liquibase.database.Database; import liquibase.database.jvm.JdbcConnection; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauConfigurationData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauConfigurationData.java index aafb60a62fc..482bbcb750e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauConfigurationData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauConfigurationData.java @@ -6,9 +6,9 @@ * 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 @@ -38,7 +38,7 @@ public final class CreditBureauConfigurationData { private String description; public static CreditBureauConfigurationData instance(final long creditBureauConfigurationId, final String configurationKey, - final String value, final long organizationCreditBureauId, final String description) { + final String value, final long organizationCreditBureauId, final String description) { return new CreditBureauConfigurationData().setCreditBureauConfigurationId(creditBureauConfigurationId) .setConfigurationKey(configurationKey).setValue(value).setOrganizationCreditBureauId(organizationCreditBureauId) .setDescription(description); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauConfigurations.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauConfigurations.java index cae79884897..f7ae3788794 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauConfigurations.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauConfigurations.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauData.java index 7c1cd9cc3c5..c2b732bb42f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauData.java @@ -6,9 +6,9 @@ * 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 @@ -40,7 +40,7 @@ public final class CreditBureauData { private long implementationKey; public static CreditBureauData instance(final long creditBureauId, final String creditBureauName, final String country, - final String productName, final String creditBureauSummary, final long implementationKey) { + final String productName, final String creditBureauSummary, final long implementationKey) { return new CreditBureauData().setCreditBureauId(creditBureauId).setCreditBureauName(creditBureauName).setCountry(country) .setProductName(productName).setCreditBureauSummary(creditBureauSummary).setImplementationKey(implementationKey); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauLoanProductMappingData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauLoanProductMappingData.java index 1399b9b59a5..4930dfb34da 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauLoanProductMappingData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauLoanProductMappingData.java @@ -6,9 +6,9 @@ * 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 @@ -48,9 +48,9 @@ public final class CreditBureauLoanProductMappingData { private boolean active; public static CreditBureauLoanProductMappingData instance(final long creditbureauLoanProductMappingId, - final long organisationCreditBureauId, final String alias, final String creditbureauSummary, final String loanProductName, - final long loanProductId, final boolean isCreditCheckMandatory, final boolean skipCrediCheckInFailure, final long stalePeriod, - final boolean active) { + final long organisationCreditBureauId, final String alias, final String creditbureauSummary, final String loanProductName, + final long loanProductId, final boolean isCreditCheckMandatory, final boolean skipCrediCheckInFailure, final long stalePeriod, + final boolean active) { return new CreditBureauLoanProductMappingData().setCreditbureauLoanProductMappingId(creditbureauLoanProductMappingId) .setOrganisationCreditBureauId(organisationCreditBureauId).setAlias(alias).setCreditbureauSummary(creditbureauSummary) .setLoanProductName(loanProductName).setLoanProductId(loanProductId).setCreditCheckMandatory(isCreditCheckMandatory) diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauMasterData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauMasterData.java index 95440e62a0c..1649eabb238 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauMasterData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauMasterData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauProduct.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauProduct.java index 54608e35dfd..1bfa6ecc91d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauProduct.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauProduct.java @@ -6,9 +6,9 @@ * 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 @@ -34,7 +34,7 @@ public final class CreditBureauProduct { private long creditBureauMasterId; public static CreditBureauProduct instance(final long creditBureauProductId, final String creditBureauProductName, - final long creditBureauMasterId) { + final long creditBureauMasterId) { return new CreditBureauProduct().setCreditBureauProductId(creditBureauProductId).setCreditBureauProductName(creditBureauProductName) .setCreditBureauMasterId(creditBureauMasterId); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauReportData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauReportData.java index d674aed97d2..a23f9ae3704 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauReportData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditBureauReportData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ package org.apache.fineract.infrastructure.creditbureau.data; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; @@ -46,7 +47,7 @@ public final class CreditBureauReportData implements Serializable { private String[] closedAccounts; public static CreditBureauReportData instance(final String name, final String gender, final String address, final String creditScore, - final String borrowerInfo, final String[] openAccounts, final String[] closedAccounts) { + final String borrowerInfo, final String[] openAccounts, final String[] closedAccounts) { return new CreditBureauReportData().setName(name).setGender(gender).setAddress(address).setCreditScore(creditScore) .setBorrowerInfo(borrowerInfo).setOpenAccounts(openAccounts).setClosedAccounts(closedAccounts); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditReportData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditReportData.java index b13e5b4239a..e46f2e2f19c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditReportData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditReportData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.creditbureau.data; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditReportReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditReportReadPlatformServiceImpl.java index 0c5c95f7178..ed848b2a68f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditReportReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/CreditReportReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; + import org.apache.fineract.infrastructure.creditbureau.service.CreditReportReadPlatformService; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.springframework.beans.factory.annotation.Autowired; @@ -66,7 +67,7 @@ public Collection retrieveCreditReportDetails(Long creditBurea final CreditReportDataMapper rm = new CreditReportDataMapper(); final String sql = " select " + rm.schema() + " where c.creditBureauId = ? "; - return this.jdbcTemplate.query(sql, rm, new Object[] { creditBureauId }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{creditBureauId}); // NOSONAR } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/OrganisationCreditBureauData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/OrganisationCreditBureauData.java index a3252e0ede5..101d1240a2d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/OrganisationCreditBureauData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/data/OrganisationCreditBureauData.java @@ -6,9 +6,9 @@ * 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 @@ -44,8 +44,8 @@ public final class OrganisationCreditBureauData { private boolean active; public static OrganisationCreditBureauData instance(final long organisationCreditBureauId, final String alias, - final long creditBureauId, final String creditBureauName, final String creditBureauProduct, final String creditBureauCountry, - final String creditBureauSummary, final boolean active) { + final long creditBureauId, final String creditBureauName, final String creditBureauProduct, final String creditBureauCountry, + final String creditBureauSummary, final boolean active) { return new OrganisationCreditBureauData().setOrganisationCreditBureauId(organisationCreditBureauId).setAlias(alias) .setCreditBureauId(creditBureauId).setCreditBureauName(creditBureauName).setCreditBureauProduct(creditBureauProduct) .setCreditBureauCountry(creditBureauCountry).setCreditBureauSummary(creditBureauSummary).setActive(active); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureau.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureau.java index 347da14e2e6..50faf48c9e3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureau.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureau.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauConfiguration.java index 260cb07b954..e54b81ad01f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.util.LinkedHashMap; import java.util.Map; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauConfigurationRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauConfigurationRepository.java index 8227ada5704..fa05b518966 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauConfigurationRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauConfigurationRepository.java @@ -6,9 +6,9 @@ * 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 @@ -28,7 +28,7 @@ public interface CreditBureauConfigurationRepository @Query("SELECT creditBureauConfig from CreditBureauConfiguration creditBureauConfig where creditBureauConfig.organisationCreditbureau.id = :creditBureauID and creditBureauConfig.configurationKey = :configurationKey ") CreditBureauConfiguration getCreditBureauConfigData(@Param("creditBureauID") Integer creditBureauID, - @Param("configurationKey") String parameterName); + @Param("configurationKey") String parameterName); @Query("SELECT creditBureauConfig from CreditBureauConfiguration creditBureauConfig where creditBureauConfig.organisationCreditbureau.id = :creditBureauID") CreditBureauConfiguration getCreditBureauConfigurationData(@Param("creditBureauID") Integer creditBureauID); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauConfigurationRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauConfigurationRepositoryWrapper.java index 80d974962fb..ca484363ef0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauConfigurationRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauConfigurationRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauLoanProductMapping.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauLoanProductMapping.java index c2d2cc088cd..c5e52ddc8f0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauLoanProductMapping.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauLoanProductMapping.java @@ -6,9 +6,9 @@ * 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 @@ -32,7 +32,7 @@ import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.portfolio.loanproduct.domain.LoanProduct; -@SuppressWarnings({ "MemberName" }) +@SuppressWarnings({"MemberName"}) @Entity @Table(name = "m_creditbureau_loanproduct_mapping") @Getter @@ -61,7 +61,7 @@ public class CreditBureauLoanProductMapping extends AbstractPersistableCustom * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauRepository.java index 1b0c93fcb88..31b109c4a6e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauToken.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauToken.java index ba536c027f3..59d17d130f5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauToken.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditBureauToken.java @@ -6,9 +6,9 @@ * 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 @@ -22,9 +22,11 @@ import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Table; + import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditReport.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditReport.java index 521084008f4..cc34805bce2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditReport.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditReport.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditReportRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditReportRepository.java index c6ae0c40724..77d13933e1b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditReportRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/CreditReportRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/OrganisationCreditBureau.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/OrganisationCreditBureau.java index 4c29203da86..e07a5e73d67 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/OrganisationCreditBureau.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/OrganisationCreditBureau.java @@ -6,9 +6,9 @@ * 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 @@ -25,8 +25,10 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.OneToOne; import jakarta.persistence.Table; + import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @@ -47,7 +49,7 @@ public class OrganisationCreditBureau extends AbstractPersistableCustom { private List creditBureauLoanProductMapping = new ArrayList<>(); public OrganisationCreditBureau(String alias, CreditBureau creditbureau, boolean isActive, - List creditBureauLoanProductMapping) { + List creditBureauLoanProductMapping) { this.alias = alias; this.creditbureau = creditbureau; this.isActive = isActive; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/OrganisationCreditBureauRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/OrganisationCreditBureauRepository.java index 881d552394b..149aea22788 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/OrganisationCreditBureauRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/OrganisationCreditBureauRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/TokenRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/TokenRepository.java index 491ec81f8f5..8486b79eaae 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/TokenRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/TokenRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/TokenRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/TokenRepositoryWrapper.java index 28f437fa4b1..89da68ccc5d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/TokenRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/domain/TokenRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/exception/CreditReportNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/exception/CreditReportNotFoundException.java index 9db8ce42d4e..313a9f812b6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/exception/CreditReportNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/exception/CreditReportNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/AddCreditBureauConfigurationDataCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/AddCreditBureauConfigurationDataCommandHandler.java index 7efafa10c27..754060dc72e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/AddCreditBureauConfigurationDataCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/AddCreditBureauConfigurationDataCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/AddOrganisationCreditBureauCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/AddOrganisationCreditBureauCommandHandler.java index dbd953e1d1a..bd8863ec42a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/AddOrganisationCreditBureauCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/AddOrganisationCreditBureauCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/CreateCreditBureauLoanProductMappingCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/CreateCreditBureauLoanProductMappingCommandHandler.java index bac7cb99849..f9c29ed3725 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/CreateCreditBureauLoanProductMappingCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/CreateCreditBureauLoanProductMappingCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/DeleteCreditReportCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/DeleteCreditReportCommandHandler.java index 7f552d28b10..2c58bc13bd4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/DeleteCreditReportCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/DeleteCreditReportCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/GetCreditReportCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/GetCreditReportCommandHandler.java index f117c6620d3..24a3f04087c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/GetCreditReportCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/GetCreditReportCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/SaveCreditReportCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/SaveCreditReportCommandHandler.java index 69164fe04cd..cab1da8bd67 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/SaveCreditReportCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/SaveCreditReportCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/UpdateCreditBureauCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/UpdateCreditBureauCommandHandler.java index acefb839c71..8e35b331a58 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/UpdateCreditBureauCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/UpdateCreditBureauCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/UpdateCreditBureauConfigurationDataCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/UpdateCreditBureauConfigurationDataCommandHandler.java index 5db001cbf5e..cb1ff1afbb6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/UpdateCreditBureauConfigurationDataCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/UpdateCreditBureauConfigurationDataCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/UpdateCreditBureauLoanProductMappingCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/UpdateCreditBureauLoanProductMappingCommandHandler.java index b708ac2b848..822d65956f2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/UpdateCreditBureauLoanProductMappingCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/handler/UpdateCreditBureauLoanProductMappingCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/serialization/CreditBureauCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/serialization/CreditBureauCommandFromApiJsonDeserializer.java index 37ead7e6d61..5610104aaf3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/serialization/CreditBureauCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/serialization/CreditBureauCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -27,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -56,7 +58,8 @@ public void validateForCreate(final String json, final Long creditBureauId) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -83,7 +86,8 @@ public void validateForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/serialization/CreditBureauConfigurationCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/serialization/CreditBureauConfigurationCommandFromApiJsonDeserializer.java index 5f95c5952ea..2008e4dc4e1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/serialization/CreditBureauConfigurationCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/serialization/CreditBureauConfigurationCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -27,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -55,7 +57,8 @@ public void validateForCreate(final String json, final Long creditBureauId) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -85,7 +88,8 @@ public void validateForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/serialization/CreditBureauLoanProductCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/serialization/CreditBureauLoanProductCommandFromApiJsonDeserializer.java index 102da35ba3f..974540c7466 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/serialization/CreditBureauLoanProductCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/serialization/CreditBureauLoanProductCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -27,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -61,7 +63,8 @@ public void validateForCreate(final String json, final Long cb_id) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -123,7 +126,8 @@ public void validateForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/serialization/CreditBureauTokenCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/serialization/CreditBureauTokenCommandFromApiJsonDeserializer.java index 52c8e2d73dc..81a5d2538f8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/serialization/CreditBureauTokenCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/serialization/CreditBureauTokenCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -28,6 +29,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauConfigurationWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauConfigurationWritePlatformService.java index a41a8220709..631cb118a23 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauConfigurationWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauConfigurationWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauConfigurationWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauConfigurationWritePlatformServiceImpl.java index a2d80c6a121..41c6ad21795 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauConfigurationWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauConfigurationWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.creditbureau.service; import java.util.Map; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.infrastructure.core.data.CommandProcessingResultBuilder; @@ -49,9 +50,9 @@ public class CreditBureauConfigurationWritePlatformServiceImpl implements Credit @Autowired public CreditBureauConfigurationWritePlatformServiceImpl(final PlatformSecurityContext context, - final CreditBureauConfigurationCommandFromApiJsonDeserializer fromApiJsonDeserializer, - final CreditBureauConfigurationRepository creditBureauConfigurationRepository, - OrganisationCreditBureauRepository organisationCreditBureauRepository) { + final CreditBureauConfigurationCommandFromApiJsonDeserializer fromApiJsonDeserializer, + final CreditBureauConfigurationRepository creditBureauConfigurationRepository, + OrganisationCreditBureauRepository organisationCreditBureauRepository) { this.context = context; this.fromApiJsonDeserializer = fromApiJsonDeserializer; this.creditBureauConfigurationRepository = creditBureauConfigurationRepository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauLoanProductMappingReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauLoanProductMappingReadPlatformService.java index 6836a4579f8..3b607d2f930 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauLoanProductMappingReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauLoanProductMappingReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.creditbureau.service; import java.util.Collection; + import org.apache.fineract.infrastructure.creditbureau.data.CreditBureauLoanProductMappingData; public interface CreditBureauLoanProductMappingReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauLoanProductMappingReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauLoanProductMappingReadPlatformServiceImpl.java index b261548712b..7e2abfdfdbd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauLoanProductMappingReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauLoanProductMappingReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; + import org.apache.fineract.infrastructure.creditbureau.data.CreditBureauLoanProductMappingData; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.springframework.beans.factory.annotation.Autowired; @@ -104,7 +105,7 @@ public CreditBureauLoanProductMappingData readMappingByLoanId(long loanProductId final CreditBureauLoanProductMapper rm = new CreditBureauLoanProductMapper(); final String sql = "select " + rm.schema() + " and cblp.loan_product_id=?"; - return this.jdbcTemplate.queryForObject(sql, rm, new Object[] { loanProductId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, rm, new Object[]{loanProductId}); // NOSONAR } @Override diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauLoanProductMappingWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauLoanProductMappingWritePlatformService.java index 458dc17c431..07a479bf99e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauLoanProductMappingWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauLoanProductMappingWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauLoanProductMappingWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauLoanProductMappingWritePlatformServiceImpl.java index 2b36084a123..6463390ea22 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauLoanProductMappingWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauLoanProductMappingWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -48,9 +48,9 @@ public class CreditBureauLoanProductMappingWritePlatformServiceImpl implements C @Autowired public CreditBureauLoanProductMappingWritePlatformServiceImpl(final PlatformSecurityContext context, - final CreditBureauLoanProductMappingRepository creditBureauLoanProductMappingRepository, - final OrganisationCreditBureauRepository organisationCreditBureauRepository, LoanProductRepository loanProductRepository, - final CreditBureauLoanProductCommandFromApiJsonDeserializer fromApiJsonDeserializer) { + final CreditBureauLoanProductMappingRepository creditBureauLoanProductMappingRepository, + final OrganisationCreditBureauRepository organisationCreditBureauRepository, LoanProductRepository loanProductRepository, + final CreditBureauLoanProductCommandFromApiJsonDeserializer fromApiJsonDeserializer) { this.context = context; this.creditBureauLoanProductMappingRepository = creditBureauLoanProductMappingRepository; this.organisationCreditBureauRepository = organisationCreditBureauRepository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauMasterReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauMasterReadPlatformService.java index 3979f4efa95..7981084714b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauMasterReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauMasterReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.creditbureau.service; import java.util.Collection; + import org.apache.fineract.infrastructure.creditbureau.data.CreditBureauMasterData; public interface CreditBureauMasterReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReadConfigurationService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReadConfigurationService.java index 86dd195c3dc..c2b03b32f69 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReadConfigurationService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReadConfigurationService.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Collection; import java.util.Map; + import org.apache.fineract.infrastructure.creditbureau.data.CreditBureauConfigurationData; public interface CreditBureauReadConfigurationService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReadConfigurationServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReadConfigurationServiceImpl.java index 2f619703724..c54a36bc0fc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReadConfigurationServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReadConfigurationServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.creditbureau.data.CreditBureauConfigurationData; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.springframework.beans.factory.annotation.Autowired; @@ -73,7 +74,7 @@ public Collection readConfigurationByOrganisation final CbConfigMapper rm = new CbConfigMapper(); final String sql = "select " + rm.schema() + " where cbconfig.organisation_creditbureau_id=?"; - return this.jdbcTemplate.query(sql, rm, new Object[] { id }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{id}); // NOSONAR } @@ -84,7 +85,7 @@ public Map retrieveConfigMap(long id) { final CbConfigMapper rm = new CbConfigMapper(); final String sql = "select " + rm.schema() + " where cbconfig.organisation_creditbureau_id= ?"; - List config = this.jdbcTemplate.query(sql, rm, new Object[] { id }); // NOSONAR + List config = this.jdbcTemplate.query(sql, rm, new Object[]{id}); // NOSONAR Map configuration = new HashMap(); for (CreditBureauConfigurationData data : config) { configuration.put(data.getConfigurationKey(), data.getValue()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReadPlatformService.java index 32e9dceef59..de3aec14f79 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.creditbureau.service; import java.util.Collection; + import org.apache.fineract.infrastructure.creditbureau.data.CreditBureauData; public interface CreditBureauReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReadPlatformServiceImpl.java index 152736a69d6..9a89551a1ca 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditBureauReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; + import org.apache.fineract.infrastructure.creditbureau.data.CreditBureauData; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.springframework.beans.factory.annotation.Autowired; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditReportReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditReportReadPlatformService.java index c5233120c02..d152562822c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditReportReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditReportReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.creditbureau.service; import java.util.Collection; + import org.apache.fineract.infrastructure.creditbureau.data.CreditReportData; public interface CreditReportReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditReportWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditReportWritePlatformService.java index 5f6dda6490c..4210b9f0f7a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditReportWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/CreditReportWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.creditbureau.service; import java.io.File; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.glassfish.jersey.media.multipart.FormDataContentDisposition; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/ExternalCreditBureauIntegrationWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/ExternalCreditBureauIntegrationWritePlatformService.java index a176f983557..adaf298a272 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/ExternalCreditBureauIntegrationWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/ExternalCreditBureauIntegrationWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.creditbureau.service; import java.io.File; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.creditbureau.data.CreditBureauReportData; import org.apache.fineract.infrastructure.creditbureau.domain.CreditBureauToken; @@ -31,7 +32,7 @@ public interface ExternalCreditBureauIntegrationWritePlatformService { Long extractUniqueId(String jsonResult); String okHttpConnectionMethod(String userName, String password, String subscriptionKey, String subscriptionId, String url, String token, - File report, FormDataContentDisposition fileDetail, Long uniqueId, String nrcId, String process); + File report, FormDataContentDisposition fileDetail, Long uniqueId, String nrcId, String process); CreditBureauReportData getCreditReportFromExternalCredit(JsonCommand command); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/ExternalCreditBureauIntegrationWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/ExternalCreditBureauIntegrationWritePlatformServiceImpl.java index 64c52a7248c..76c17bf46e6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/ExternalCreditBureauIntegrationWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/ExternalCreditBureauIntegrationWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import com.google.gson.JsonObject; import com.google.gson.JsonParser; import jakarta.annotation.Nullable; + import java.io.File; import java.io.IOException; import java.net.HttpURLConnection; @@ -38,6 +39,7 @@ import java.util.function.BiFunction; import java.util.function.Function; import java.util.function.Supplier; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import okhttp3.HttpUrl; @@ -88,7 +90,7 @@ public class ExternalCreditBureauIntegrationWritePlatformServiceImpl implements @Transactional @Override public String okHttpConnectionMethod(String userName, String password, String subscriptionKey, String subscriptionId, String url, - String token, File file, FormDataContentDisposition fileData, Long uniqueId, String nrcId, @NonNull String process) { + String token, File file, FormDataContentDisposition fileData, Long uniqueId, String nrcId, @NonNull String process) { String responseMessage = null; if (StringUtils.isBlank(url)) { @@ -103,10 +105,10 @@ public String okHttpConnectionMethod(String userName, String password, String su Request.Builder baseRequestBuilder = createRequestBuilder(subscriptionKey, subscriptionId, token, okHttpUrl); switch (process) { case UPLOAD_CREDIT_REPORT -> - request = createRequest(baseRequestBuilder, () -> new MultipartBody.Builder().setType(MultipartBody.FORM) - .addFormDataPart("file", fileData.getFileName(), RequestBody.create(file, MediaType.parse("multipart/form-data"))) - .addFormDataPart("BODY", "formdata").addFormDataPart("userName", userName).build(), - (requestBody, builder) -> builder.header(CONTENT_TYPE, MULTIPART_FORM_DATA).post(requestBody).build()); + request = createRequest(baseRequestBuilder, () -> new MultipartBody.Builder().setType(MultipartBody.FORM) + .addFormDataPart("file", fileData.getFileName(), RequestBody.create(file, MediaType.parse("multipart/form-data"))) + .addFormDataPart("BODY", "formdata").addFormDataPart("userName", userName).build(), + (requestBody, builder) -> builder.header(CONTENT_TYPE, MULTIPART_FORM_DATA).post(requestBody).build()); case "CreditReport" -> request = createRequest(baseRequestBuilder, builder -> builder.header(CONTENT_TYPE, APPLICATION_FORM_URLENCODED).get().build()); case "token" -> request = createRequest(baseRequestBuilder, @@ -169,7 +171,7 @@ private Request createRequest(Request.Builder builder, Function requestBodySupplier, - BiFunction requestBuilder) { + BiFunction requestBuilder) { return requestBuilder.apply(requestBodySupplier.get(), builder); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/OrganisationCreditBureauReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/OrganisationCreditBureauReadPlatformService.java index 04246a93720..2571677c3f6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/OrganisationCreditBureauReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/OrganisationCreditBureauReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.creditbureau.service; import java.util.Collection; + import org.apache.fineract.infrastructure.creditbureau.data.OrganisationCreditBureauData; public interface OrganisationCreditBureauReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/OrganisationCreditBureauReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/OrganisationCreditBureauReadPlatformServiceImpl.java index 9bb302a6960..e07cf735758 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/OrganisationCreditBureauReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/OrganisationCreditBureauReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; + import org.apache.fineract.infrastructure.creditbureau.data.OrganisationCreditBureauData; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.springframework.beans.factory.annotation.Autowired; @@ -84,7 +85,7 @@ public OrganisationCreditBureauData retrieveOrgCreditBureauById(long orgCbId) { final OrganisationCreditBureauMapper rm = new OrganisationCreditBureauMapper(); final String sql = "select " + rm.schema() + " and ocb.id=?"; - return this.jdbcTemplate.queryForObject(sql, rm, new Object[] { orgCbId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, rm, new Object[]{orgCbId}); // NOSONAR } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/OrganisationCreditBureauWritePlatflormService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/OrganisationCreditBureauWritePlatflormService.java index de46057cf62..e43e3102315 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/OrganisationCreditBureauWritePlatflormService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/OrganisationCreditBureauWritePlatflormService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/OrganisationCreditBureauWritePlatflormServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/OrganisationCreditBureauWritePlatflormServiceImpl.java index c7650661c72..4cad582e982 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/OrganisationCreditBureauWritePlatflormServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/creditbureau/service/OrganisationCreditBureauWritePlatflormServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -44,8 +44,8 @@ public class OrganisationCreditBureauWritePlatflormServiceImpl implements Organi @Autowired public OrganisationCreditBureauWritePlatflormServiceImpl(final PlatformSecurityContext context, - final OrganisationCreditBureauRepository organisationCreditBureauRepository, - final CreditBureauRepository creditBureauRepository, final CreditBureauCommandFromApiJsonDeserializer fromApiJsonDeserializer) { + final OrganisationCreditBureauRepository organisationCreditBureauRepository, + final CreditBureauRepository creditBureauRepository, final CreditBureauCommandFromApiJsonDeserializer fromApiJsonDeserializer) { this.context = context; this.organisationCreditBureauRepository = organisationCreditBureauRepository; this.creditBureauRepository = creditBureauRepository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DatatablesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DatatablesApiResourceSwagger.java index a0fd0b9246d..b33e82231ef 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DatatablesApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/DatatablesApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,15 +19,17 @@ package org.apache.fineract.infrastructure.dataqueries.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.dataqueries.data.ResultsetColumnHeaderData; import org.apache.fineract.infrastructure.dataqueries.data.ResultsetRowData; /** * Created by sanyam on 31/7/17. */ -@SuppressWarnings({ "MemberName" }) +@SuppressWarnings({"MemberName"}) final class DatatablesApiResourceSwagger { private DatatablesApiResourceSwagger() { @@ -51,11 +53,13 @@ private GetDataTablesResponse() { @Schema(description = "PostDataTablesRequest") public static final class PostDataTablesRequest { - private PostDataTablesRequest() {} + private PostDataTablesRequest() { + } static final class PostColumnHeaderData { - private PostColumnHeaderData() {} + private PostColumnHeaderData() { + } @Schema(required = true, example = "DOB") public String name; @@ -105,7 +109,8 @@ private PutDataTablesRequest() { static final class PutDataTablesRequestDropColumns { - private PutDataTablesRequestDropColumns() {} + private PutDataTablesRequestDropColumns() { + } @Schema(example = "Gender_cd_Question") public String name; @@ -113,7 +118,8 @@ private PutDataTablesRequestDropColumns() {} static final class PutDataTablesRequestAddColumns { - private PutDataTablesRequestAddColumns() {} + private PutDataTablesRequestAddColumns() { + } @Schema(example = "Question") public String name; @@ -131,7 +137,8 @@ private PutDataTablesRequestAddColumns() {} static final class PutDataTablesRequestChangeColumns { - private PutDataTablesRequestChangeColumns() {} + private PutDataTablesRequestChangeColumns() { + } @Schema(example = "Question") public String name; @@ -181,7 +188,8 @@ private DeleteDataTablesResponse() { @Schema(description = "PostDataTablesRegisterDatatableAppTable") public static final class PostDataTablesRegisterDatatableAppTable { - private PostDataTablesRegisterDatatableAppTable() {} + private PostDataTablesRegisterDatatableAppTable() { + } } @Schema(description = "PostDataTablesAppTableIdRequest") diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/EntityDatatableChecksApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/EntityDatatableChecksApiResourceSwagger.java index 00eb785d1e4..517cf6c345b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/EntityDatatableChecksApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/EntityDatatableChecksApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.dataqueries.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.Collection; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.dataqueries.data.DatatableCheckStatusData; import org.apache.fineract.infrastructure.dataqueries.data.DatatableChecksData; @@ -39,7 +41,8 @@ private EntityDatatableChecksApiResourceSwagger() { @Schema(description = "GetEntityDatatableChecksResponse") public static final class GetEntityDatatableChecksResponse { - private GetEntityDatatableChecksResponse() {} + private GetEntityDatatableChecksResponse() { + } public long id; public String entity; @@ -54,7 +57,8 @@ private GetEntityDatatableChecksResponse() {} @Schema(description = "GetEntityDatatableChecksTemplateResponse") public static final class GetEntityDatatableChecksTemplateResponse { - private GetEntityDatatableChecksTemplateResponse() {} + private GetEntityDatatableChecksTemplateResponse() { + } public List entities; public List statusClient; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/ReportsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/ReportsApiResourceSwagger.java index 5b60662bbbc..2b24b89456d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/ReportsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/ReportsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.dataqueries.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.Collection; import java.util.List; + import org.apache.fineract.infrastructure.dataqueries.data.ReportParameterData; /** diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/RunreportsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/RunreportsApiResourceSwagger.java index 712ef97bcee..365222c93d5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/RunreportsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/api/RunreportsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.infrastructure.dataqueries.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.List; + import org.apache.fineract.infrastructure.dataqueries.data.ResultsetColumnHeaderData; import org.apache.fineract.infrastructure.dataqueries.data.ResultsetRowData; @@ -28,12 +30,14 @@ */ final class RunreportsApiResourceSwagger { - private RunreportsApiResourceSwagger() {} + private RunreportsApiResourceSwagger() { + } @Schema public static final class RunReportsResponse { - private RunReportsResponse() {} + private RunReportsResponse() { + } public List columnHeaders; public List data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/EntityDataTableChecksTemplateData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/EntityDataTableChecksTemplateData.java index 79145be8b0c..22f42f7145d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/EntityDataTableChecksTemplateData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/EntityDataTableChecksTemplateData.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.Collection; import java.util.List; import java.util.Objects; + import org.apache.commons.collections4.CollectionUtils; import org.apache.fineract.portfolio.loanproduct.data.LoanProductData; import org.apache.fineract.portfolio.savings.data.SavingsProductData; @@ -41,9 +42,9 @@ public class EntityDataTableChecksTemplateData implements Serializable { private final Collection savingsProductDatas; public EntityDataTableChecksTemplateData(final List entities, List statusClient, - List statusGroup, List statusSavings, - List statusLoans, List datatables, Collection loanProductDatas, - Collection savingsProductDatas) { + List statusGroup, List statusSavings, + List statusLoans, List datatables, Collection loanProductDatas, + Collection savingsProductDatas) { this.entities = entities; this.statusClient = statusClient; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportParameters.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportParameters.java index 52da04edd05..f6be95bee80 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportParameters.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/data/ReportParameters.java @@ -6,9 +6,9 @@ * 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 @@ -78,7 +78,7 @@ private ReportParameters() { + "The exact parameters required depend on the specific report being executed.\n" + "Some reports may accept additional parameters not listed here."; - @Parameters({ @Parameter(name = EXPORT_CSV, description = "Optional - Set to true to export results as CSV", example = "true"), + @Parameters({@Parameter(name = EXPORT_CSV, description = "Optional - Set to true to export results as CSV", example = "true"), @Parameter(name = PARAMETER_TYPE, description = "Optional - Indicates if this is a parameter type request", example = "false"), @Parameter(name = OUTPUT_TYPE, description = "Optional - Output format type (HTML, XLS, CSV, PDF)", example = "HTML"), @Parameter(name = ENABLE_BUSINESS_DATE, description = "Optional - Enable business date filtering", example = "true"), @@ -115,7 +115,7 @@ private ReportParameters() { @Parameter(name = "SavingsAccountSubStatus", description = "Optional - Savings account sub-status", example = "active"), @Parameter(name = "SelectLoanType", description = "Optional - Loan type selection", example = "individual"), - @Parameter(name = "R_*", description = "Optional - Additional report-specific parameters prefixed with 'R_'") }) + @Parameter(name = "R_*", description = "Optional - Additional report-specific parameters prefixed with 'R_'")}) public static void getOpenApiParameters() { @@ -153,10 +153,10 @@ public static String getFullDescription() { return FULL_DESCRIPTION; } - @Parameters({ @Parameter(name = EXPORT_CSV, description = "Optional - Set to true to export results as CSV", example = "true"), + @Parameters({@Parameter(name = EXPORT_CSV, description = "Optional - Set to true to export results as CSV", example = "true"), @Parameter(name = PARAMETER_TYPE, description = "Optional - Indicates if this is a parameter type request", example = "false"), @Parameter(name = OUTPUT_TYPE, description = "Optional - Output format type (HTML, XLS, CSV, PDF)", example = "HTML"), - @Parameter(name = "R_*", description = "Optional - Report-specific parameters prefixed with 'R_'") }) + @Parameter(name = "R_*", description = "Optional - Report-specific parameters prefixed with 'R_'")}) public static void getMinimalOpenApiParameters() { } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/EntityDatatableChecks.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/EntityDatatableChecks.java index 6129dff9c81..43702974ebe 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/EntityDatatableChecks.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/EntityDatatableChecks.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/EntityDatatableChecksRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/EntityDatatableChecksRepository.java index 28b4b4c8729..54804c7a202 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/EntityDatatableChecksRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/EntityDatatableChecksRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.dataqueries.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; @@ -38,11 +39,11 @@ public interface EntityDatatableChecksRepository AND rdt.subtype = :subtype """) List findByEntityAndStatusAndSubtype(@Param("entity") String entity, @Param("status") Integer status, - @Param("subtype") String subtype); + @Param("subtype") String subtype); @Query("select t from EntityDatatableChecks t WHERE t.status =:status and t.entity=:entity and t.productId = :productId ") List findByEntityStatusAndProduct(@Param("entity") String entity, @Param("status") Integer status, - @Param("productId") Long productId); + @Param("productId") Long productId); @Query("select t from EntityDatatableChecks t WHERE t.status =:status and t.entity=:entity and t.productId IS NULL ") List findByEntityStatusAndNoProduct(@Param("entity") String entity, @Param("status") Integer status); @@ -50,11 +51,11 @@ List findByEntityStatusAndProduct(@Param("entity") String @Query("select t from EntityDatatableChecks t WHERE t.status =:status " + "and t.entity=:entity and t.datatableName = :datatableName AND t.productId = :productId") List findByEntityStatusAndDatatableIdAndProductId(@Param("entity") String entityName, - @Param("status") Integer status, @Param("datatableName") String datatableName, @Param("productId") Long productId); + @Param("status") Integer status, @Param("datatableName") String datatableName, @Param("productId") Long productId); @Query("select t from EntityDatatableChecks t WHERE t.status =:status and t.entity=:entity " + " and t.datatableName = :datatableName AND t.productId IS NULL") List findByEntityStatusAndDatatableIdAndNoProduct(@Param("entity") String entityName, - @Param("status") Integer status, @Param("datatableName") String datatableName); + @Param("status") Integer status, @Param("datatableName") String datatableName); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/RegisteredDatatable.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/RegisteredDatatable.java index d75590e30d7..950dd72e583 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/RegisteredDatatable.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/RegisteredDatatable.java @@ -6,9 +6,9 @@ * 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 @@ -45,5 +45,6 @@ public class RegisteredDatatable extends AbstractPersistableCustom { @Column(name = "category", nullable = false) private int category; - public RegisteredDatatable() {} + public RegisteredDatatable() { + } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/RegisteredDatatableRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/RegisteredDatatableRepository.java index 44d0a17f258..f2029e0c001 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/RegisteredDatatableRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/RegisteredDatatableRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/Report.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/Report.java index b11ecdb4709..b2631c45818 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/Report.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/Report.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; @@ -33,6 +34,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -42,7 +44,7 @@ import org.apache.fineract.infrastructure.core.exception.PlatformDataIntegrityException; @Entity -@Table(name = "stretchy_report", uniqueConstraints = { @UniqueConstraint(columnNames = { "report_name" }, name = "unq_report_name") }) +@Table(name = "stretchy_report", uniqueConstraints = {@UniqueConstraint(columnNames = {"report_name"}, name = "unq_report_name")}) public final class Report extends AbstractPersistableCustom { @Column(name = "report_name", nullable = false, unique = true) @@ -113,7 +115,7 @@ public static Report fromJson(final JsonCommand command, final Collection reportTypes) { + final String description, final boolean useReport, final String reportSql, final Collection reportTypes) { this.reportName = reportName; this.reportType = reportType; this.reportSubType = reportSubType; @@ -226,7 +228,7 @@ private void validate(final Collection reportTypes) { if (this.reportType.equals("Chart")) { baseDataValidator.reset().parameter("reportSubType").value(this.reportSubType) .cantBeBlankWhenParameterProvidedIs("reportType", this.reportType) - .isOneOfTheseValues(new Object[] { "Bar", "Pie" }); + .isOneOfTheseValues(new Object[]{"Bar", "Pie"}); } else { baseDataValidator.reset().parameter("reportSubType").value(this.reportSubType) .mustBeBlankWhenParameterProvidedIs("reportType", this.reportType); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameter.java index b89b9e49fb4..9b4857fc0f2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameterRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameterRepository.java index 6e937453f4b..c38c21b161a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameterRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameterRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameterUsage.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameterUsage.java index 3ef8076e68d..b555bd2fb64 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameterUsage.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameterUsage.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameterUsageRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameterUsageRepository.java index b74923a930e..ffbbd54e413 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameterUsageRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportParameterUsageRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.dataqueries.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportRepository.java index 42454c86df9..cc42e77aec3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportRepositoryWrapper.java index ef22cb23c4b..df5aa5376f8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/domain/ReportRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/EntityDatatableCheckAlreadyExistsException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/EntityDatatableCheckAlreadyExistsException.java index 7b13866728c..95aa6eb5ef2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/EntityDatatableCheckAlreadyExistsException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/EntityDatatableCheckAlreadyExistsException.java @@ -6,9 +6,9 @@ * 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 @@ -27,7 +27,7 @@ public class EntityDatatableCheckAlreadyExistsException extends AbstractPlatform public EntityDatatableCheckAlreadyExistsException(final String entityName, final Integer status, final String datatable) { super("error.msg.entityDatatableCheck.duplicate.entry", "the entity datatable check for status: '" + status - + "' and datatable name '" + datatable + "' on entity '" + entityName + "' already exist", "status", "datatable", "entity", + + "' and datatable name '" + datatable + "' on entity '" + entityName + "' already exist", "status", "datatable", "entity", status, datatable, entityName); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/EntityDatatableCheckNotAllowException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/EntityDatatableCheckNotAllowException.java index 134211b5b40..b00b66d00e2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/EntityDatatableCheckNotAllowException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/EntityDatatableCheckNotAllowException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/EntityDatatableCheckNotSupportedException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/EntityDatatableCheckNotSupportedException.java index b9d35fa95c1..56f65f473a2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/EntityDatatableCheckNotSupportedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/EntityDatatableCheckNotSupportedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/EntityDatatableChecksNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/EntityDatatableChecksNotFoundException.java index a75f54226d3..b6fb89d5ed7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/EntityDatatableChecksNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/EntityDatatableChecksNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/ReportNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/ReportNotFoundException.java index 76ca485f2b4..75c92a3714f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/ReportNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/ReportNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/ReportParameterNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/ReportParameterNotFoundException.java index 302bdee474c..db9a704329e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/ReportParameterNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/exception/ReportParameterNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/CreateDatatableCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/CreateDatatableCommandHandler.java index 95c8fdcc46f..77bbbdbe2e3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/CreateDatatableCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/CreateDatatableCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/CreateDatatableEntryCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/CreateDatatableEntryCommandHandler.java index bb7db6e03f0..94308c29252 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/CreateDatatableEntryCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/CreateDatatableEntryCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/CreateEntityDatatableChecksCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/CreateEntityDatatableChecksCommandHandler.java index bde202ad79e..739fe2d874b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/CreateEntityDatatableChecksCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/CreateEntityDatatableChecksCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/CreateReportCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/CreateReportCommandHandler.java index b1a64d90976..7ddcdad50a4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/CreateReportCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/CreateReportCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteDatatableCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteDatatableCommandHandler.java index 53ede654d90..31d7de9782e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteDatatableCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteDatatableCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteEntityDatatableChecksCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteEntityDatatableChecksCommandHandler.java index 5d5c2f6a3c2..72946a36d9a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteEntityDatatableChecksCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteEntityDatatableChecksCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteOneToManyDatatableEntryCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteOneToManyDatatableEntryCommandHandler.java index c4cc0935954..5984dd06c78 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteOneToManyDatatableEntryCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteOneToManyDatatableEntryCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteOneToOneDatatableEntryCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteOneToOneDatatableEntryCommandHandler.java index 1a06db77ad2..b8d6810de79 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteOneToOneDatatableEntryCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteOneToOneDatatableEntryCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteReportCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteReportCommandHandler.java index b3935288da0..218e1fe854e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteReportCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/DeleteReportCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/RegisterDatatableCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/RegisterDatatableCommandHandler.java index f69a90dd40c..ca7c871b6cf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/RegisterDatatableCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/RegisterDatatableCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/UpdateDatatableCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/UpdateDatatableCommandHandler.java index caeb9257107..869af5eb26a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/UpdateDatatableCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/UpdateDatatableCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/UpdateOneToManyDatatableEntryCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/UpdateOneToManyDatatableEntryCommandHandler.java index cc8ef6ccd7f..f951d8218d3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/UpdateOneToManyDatatableEntryCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/UpdateOneToManyDatatableEntryCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/UpdateOneToOneDatatableEntryCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/UpdateOneToOneDatatableEntryCommandHandler.java index 45198a08149..c8fd9ea0494 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/UpdateOneToOneDatatableEntryCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/UpdateOneToOneDatatableEntryCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/UpdateReportCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/UpdateReportCommandHandler.java index 6a873eff219..85ab1a926a7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/UpdateReportCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/handler/UpdateReportCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/serialization/ReportCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/serialization/ReportCommandFromApiJsonDeserializer.java index c9fdf00f0c0..470153ce1a5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/serialization/ReportCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/serialization/ReportCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -19,11 +19,13 @@ package org.apache.fineract.infrastructure.dataqueries.serialization; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.Arrays; import java.util.HashSet; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.exception.InvalidJsonException; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; @@ -51,7 +53,8 @@ public void validate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableExportTargetParameter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableExportTargetParameter.java index c21aa03f8eb..3f49d3b1485 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableExportTargetParameter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableExportTargetParameter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableReadServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableReadServiceImpl.java index bb6b9c521d6..7023a42b2c4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableReadServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableReadServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,10 +23,12 @@ import com.google.common.base.Splitter; import com.google.gson.JsonObject; + import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.service.PagedLocalRequest; @@ -77,9 +79,9 @@ public List retrieveDatatableNames(final String appTable) { Object[] params; if (appTable != null) { sql = sql + " and application_table_name like ? "; - params = new Object[] { this.context.authenticatedUser().getId(), appTable }; + params = new Object[]{this.context.authenticatedUser().getId(), appTable}; } else { - params = new Object[] { this.context.authenticatedUser().getId() }; + params = new Object[]{this.context.authenticatedUser().getId()}; } sql = sql + " order by application_table_name, registered_table_name"; @@ -111,7 +113,7 @@ public DatatableData retrieveDatatable(final String datatable) { DatatableData datatableData = null; - final SqlRowSet rowSet = jdbcTemplate.queryForRowSet(sql, new Object[] { this.context.authenticatedUser().getId(), datatable }); // NOSONAR + final SqlRowSet rowSet = jdbcTemplate.queryForRowSet(sql, new Object[]{this.context.authenticatedUser().getId(), datatable}); // NOSONAR if (rowSet.next()) { final String appTableName = rowSet.getString(APPLICATION_TABLE_NAME); final String registeredDatatableName = rowSet.getString("registered_table_name"); @@ -127,7 +129,7 @@ public DatatableData retrieveDatatable(final String datatable) { @Override public List queryDataTable(@NonNull String datatable, @NonNull String columnName, String columnValueString, - @NonNull String resultColumnsString) { + @NonNull String resultColumnsString) { datatable = datatableUtil.validateDatatableRegistered(datatable); Map headersByName = searchUtil .mapHeadersToName(genericDataService.fillResultsetColumnHeaders(datatable)); @@ -220,8 +222,8 @@ public Page queryDataTableAdvanced(@NonNull String datatable, @NonNu @Override public boolean buildDataQueryEmbedded(@NonNull EntityTables entityTable, @NonNull String datatable, @NonNull AdvancedQueryData request, - @NonNull List selectColumns, @NonNull StringBuilder select, @NonNull StringBuilder from, @NonNull StringBuilder where, - @NonNull List params, String mainAlias, String alias, String dateFormat, String dateTimeFormat, Locale locale) { + @NonNull List selectColumns, @NonNull StringBuilder select, @NonNull StringBuilder from, @NonNull StringBuilder where, + @NonNull List params, String mainAlias, String alias, String dateFormat, String dateTimeFormat, Locale locale) { List resultColumns = request.getResultColumns(); List columnFilters = request.getColumnFilters(); if ((resultColumns == null || resultColumns.isEmpty()) && (columnFilters == null || columnFilters.isEmpty())) { @@ -254,7 +256,7 @@ public boolean buildDataQueryEmbedded(@NonNull EntityTables entityTable, @NonNul @Override @Transactional(readOnly = true) public GenericResultsetData retrieveDataTableGenericResultSet(final String dataTableName, final Long appTableId, final String order, - final Long id) { + final Long id) { final EntityTables entityTable = datatableUtil.queryForApplicationEntity(dataTableName); datatableUtil.checkMainResourceExistsWithinScope(entityTable, appTableId); return datatableUtil.retrieveDataTableGenericResultSet(entityTable, dataTableName, appTableId, order, id); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableRejectionCleanupService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableRejectionCleanupService.java index c49fc6f2666..690354a8b26 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableRejectionCleanupService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableRejectionCleanupService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableReportingProcessService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableReportingProcessService.java index e71f8ddb5ab..7e4d49ee035 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableReportingProcessService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableReportingProcessService.java @@ -6,9 +6,9 @@ * 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 @@ -20,10 +20,12 @@ import jakarta.ws.rs.core.MultivaluedMap; import jakarta.ws.rs.core.Response; + import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.Optional; + import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.ApiParameterHelper; @@ -38,7 +40,7 @@ import org.springframework.stereotype.Service; @Service -@ReportService(type = { "Table", "Chart", "SMS" }) +@ReportService(type = {"Table", "Chart", "SMS"}) @Slf4j public class DatatableReportingProcessService extends AbstractReportingProcessService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableUtil.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableUtil.java index 6577513d3e4..2b6126dd21d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableUtil.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableUtil.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -233,7 +234,7 @@ public String getClientOfficeJoinCondition(String appTableAlias) { } public GenericResultsetData retrieveDataTableGenericResultSet(final EntityTables entityTable, final String dataTableName, - final Long appTableId, final String order, final Long id) { + final Long appTableId, final String order, final Long id) { final List columnHeaders = genericDataService.fillResultsetColumnHeaders(dataTableName); final boolean multiRow = isMultirowDatatable(columnHeaders); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableWriteServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableWriteServiceImpl.java index c9905794c32..cc99f6fd1b2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableWriteServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/DatatableWriteServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -54,6 +54,7 @@ import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; import jakarta.persistence.PersistenceException; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.sql.PreparedStatement; @@ -67,6 +68,7 @@ import java.util.Objects; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Stream; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -187,8 +189,8 @@ public void registerDatatable(final JsonCommand command, final String permission @Override public void deregisterDatatable(final String datatable) { datatableUtil.validateDatatableRegistered(datatable); - final Object[] permissionCodes = { "CREATE_" + datatable, "CREATE_" + datatable + "_CHECKER", "READ_" + datatable, - "UPDATE_" + datatable, "UPDATE_" + datatable + "_CHECKER", "DELETE_" + datatable, "DELETE_" + datatable + "_CHECKER" }; + final Object[] permissionCodes = {"CREATE_" + datatable, "CREATE_" + datatable + "_CHECKER", "READ_" + datatable, + "UPDATE_" + datatable, "UPDATE_" + datatable + "_CHECKER", "DELETE_" + datatable, "DELETE_" + datatable + "_CHECKER"}; final String placeholders = "(?, ?, ?, ?, ?, ?, ?)"; this.jdbcTemplate @@ -340,7 +342,7 @@ public void updateDatatable(final String datatableName, final JsonCommand comman if (!StringUtils.isBlank(entitySubType)) { jdbcTemplate.update("update x_registered_table SET entity_subtype=? WHERE registered_table_name = ?", // NOSONAR - new Object[] { entitySubType, datatableName }); + new Object[]{entitySubType, datatableName}); } if (!StringUtils.isBlank(entityName)) { @@ -575,14 +577,14 @@ public CommandProcessingResult createPPIEntry(final String dataTableName, final @Transactional @Override public CommandProcessingResult updateDatatableEntryOneToOne(final String dataTableName, final Long appTableId, - final JsonCommand command) { + final JsonCommand command) { return updateDatatableEntry(dataTableName, appTableId, null, command); } @Transactional @Override public CommandProcessingResult updateDatatableEntryOneToMany(final String dataTableName, final Long appTableId, final Long datatableId, - final JsonCommand command) { + final JsonCommand command) { return updateDatatableEntry(dataTableName, appTableId, datatableId, command); } @@ -595,12 +597,12 @@ public CommandProcessingResult deleteDatatableEntries(final String dataTableName @Transactional @Override public CommandProcessingResult deleteDatatableEntry(final String dataTableName, final Long appTableId, final Long datatableId, - JsonCommand command) { + JsonCommand command) { return deleteDatatableEntries(dataTableName, appTableId, datatableId, command); } private void registerDataTable(final String entityName, final String dataTableName, final String entitySubType, - final Integer category) { + final Integer category) { datatableUtil.resolveEntity(entityName); datatableUtil.validateDatatableName(dataTableName); validateDataTableExists(dataTableName); @@ -637,13 +639,13 @@ private void registerPermissions(final String dataTableName, final boolean canMa .map(sqlGenerator::escape).toList(); final String columns = String.join(", ", escapedColumns); final String sql = "INSERT INTO m_permission (" + columns + ") VALUES ('datatable', ?, ?, ?, ?)"; - final Object[][] permissions = { { "CREATE_" + dataTableName, "CREATE", dataTableName, canMakerChecker }, - { "CREATE_" + dataTableName + "_CHECKER", "CREATE", dataTableName, false }, - { "READ_" + dataTableName, "READ", dataTableName, false }, - { "UPDATE_" + dataTableName, "UPDATE", dataTableName, canMakerChecker }, - { "UPDATE_" + dataTableName + "_CHECKER", "UPDATE", dataTableName, false }, - { "DELETE_" + dataTableName, "DELETE", dataTableName, canMakerChecker }, - { "DELETE_" + dataTableName + "_CHECKER", "DELETE", dataTableName, false }, }; + final Object[][] permissions = {{"CREATE_" + dataTableName, "CREATE", dataTableName, canMakerChecker}, + {"CREATE_" + dataTableName + "_CHECKER", "CREATE", dataTableName, false}, + {"READ_" + dataTableName, "READ", dataTableName, false}, + {"UPDATE_" + dataTableName, "UPDATE", dataTableName, canMakerChecker}, + {"UPDATE_" + dataTableName + "_CHECKER", "UPDATE", dataTableName, false}, + {"DELETE_" + dataTableName, "DELETE", dataTableName, canMakerChecker}, + {"DELETE_" + dataTableName + "_CHECKER", "DELETE", dataTableName, false},}; for (Object[] params : permissions) { this.jdbcTemplate.update(sql, params); } @@ -655,7 +657,7 @@ private Integer getCategory(final JsonCommand command) { } private JsonElement addColumn(final String name, final JdbcJavaType dataType, final boolean isMandatory, final Integer length, - final boolean isUnique, final boolean isIndexed) { + final boolean isUnique, final boolean isIndexed) { JsonObject column = new JsonObject(); column.addProperty(API_FIELD_NAME, name); column.addProperty(API_FIELD_TYPE, dataType.formatSql(databaseTypeResolver.databaseType())); @@ -669,8 +671,8 @@ private JsonElement addColumn(final String name, final JdbcJavaType dataType, fi } private void parseDatatableColumnObjectForCreate(final JsonObject column, StringBuilder sqlBuilder, - final StringBuilder constrainBuilder, final String dataTableNameAlias, final Map codeMappings, - final boolean isConstraintApproach) { + final StringBuilder constrainBuilder, final String dataTableNameAlias, final Map codeMappings, + final boolean isConstraintApproach) { String name = column.has(API_FIELD_NAME) ? column.get(API_FIELD_NAME).getAsString() : null; final String type = column.has(API_FIELD_TYPE) ? column.get(API_FIELD_TYPE).getAsString().toLowerCase() : null; final Integer length = column.has(API_FIELD_LENGTH) ? column.get(API_FIELD_LENGTH).getAsInt() : null; @@ -731,7 +733,7 @@ private void createIndexForColumn(String datatableName, JsonObject column) { } private void parseDatatableColumnForAdd(final JsonObject column, StringBuilder sqlBuilder, final String dataTableNameAlias, - final StringBuilder constrainBuilder, final Map codeMappings, final boolean isConstraintApproach) { + final StringBuilder constrainBuilder, final Map codeMappings, final boolean isConstraintApproach) { String name = column.has(API_FIELD_NAME) ? column.get(API_FIELD_NAME).getAsString() : null; final String type = column.has(API_FIELD_TYPE) ? column.get(API_FIELD_TYPE).getAsString().toLowerCase() : null; @@ -772,9 +774,9 @@ private void parseDatatableColumnForAdd(final JsonObject column, StringBuilder s } private void parseDatatableColumnForUpdate(final JsonObject column, - final Map mapColumnNameDefinition, final String datatableName, StringBuilder renameBuilder, - StringBuilder changeBuilder, final StringBuilder constrainBuilder, final Map codeMappings, - final List removeMappings, final boolean isConstraintApproach) { + final Map mapColumnNameDefinition, final String datatableName, StringBuilder renameBuilder, + StringBuilder changeBuilder, final StringBuilder constrainBuilder, final Map codeMappings, + final List removeMappings, final boolean isConstraintApproach) { String oldName = column.has(API_FIELD_NAME) ? column.get(API_FIELD_NAME).getAsString() : null; if (!mapColumnNameDefinition.containsKey(oldName)) { throw new PlatformDataIntegrityException(ERROR_MSG_DATATABLE_COLUMN_MISSING_UPDATE_PARSE, @@ -875,7 +877,7 @@ private void parseDatatableColumnForUpdate(final JsonObject column, } private void parseDatatableColumnForDrop(final JsonObject column, StringBuilder sqlBuilder, final String datatableName, - final StringBuilder constrainBuilder, final List codeMappings) { + final StringBuilder constrainBuilder, final List codeMappings) { final String datatableAlias = datatableName.toLowerCase().replaceAll("\\s", "_"); final String name = column.has(API_FIELD_NAME) ? column.get(API_FIELD_NAME).getAsString() : null; if (name == null) { @@ -938,7 +940,7 @@ private int getCodeIdForColumn(final String dataTableNameAlias, final String nam * @see MIFOSX-1145 **/ private void removeNullValuesFromStringColumn(final String datatableName, final JsonObject column, - final Map mapColumnNameDefinition) { + final Map mapColumnNameDefinition) { final boolean mandatory = column.has(API_FIELD_MANDATORY) && column.get(API_FIELD_MANDATORY).getAsBoolean(); final String name = column.has(API_FIELD_NAME) ? column.get(API_FIELD_NAME).getAsString() : ""; final JdbcJavaType type = mapColumnNameDefinition.containsKey(name) ? mapColumnNameDefinition.get(name).getColumnType() : null; @@ -951,7 +953,7 @@ private void removeNullValuesFromStringColumn(final String datatableName, final } private void updateUniqueConstraintsForTable(String datatableName, JsonArray changeColumns, - Map mapColumnNameDefinition) { + Map mapColumnNameDefinition) { for (final JsonElement column : changeColumns) { String name = column.getAsJsonObject().has(API_FIELD_NAME) ? column.getAsJsonObject().get(API_FIELD_NAME).getAsString() : null; @@ -1020,7 +1022,7 @@ private void dropUniqueConstraint(String datatableName, String uniqueKeyName) { } private void updateIndexesForTable(String datatableName, JsonArray changeColumns, - Map mapColumnNameDefinition) { + Map mapColumnNameDefinition) { for (final JsonElement column : changeColumns) { String name = column.getAsJsonObject().has(API_FIELD_NAME) ? column.getAsJsonObject().get(API_FIELD_NAME).getAsString() : null; if (!mapColumnNameDefinition.containsKey(name)) { @@ -1095,14 +1097,15 @@ private void dropIndex(String datatableName, String uniqueIndexName) { } private CommandProcessingResult createNewDatatableEntry(final String dataTableName, final Long appTableId, final String json, - boolean addScore) { + boolean addScore) { final EntityTables entityTable = datatableUtil.queryForApplicationEntity(dataTableName); CommandProcessingResult commandProcessingResult = datatableUtil.checkMainResourceExistsWithinScope(entityTable, appTableId); List columnHeaders = genericDataService.fillResultsetColumnHeaders(dataTableName); Map headersByName = searchUtil.mapHeadersToName(columnHeaders); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final Map dataParams = fromJsonHelper.extractDataMap(typeOfMap, json); final String dateFormat = dataParams.get(API_PARAM_DATE_FORMAT); @@ -1195,9 +1198,9 @@ private static boolean isUserInsertable(@NonNull EntityTables entityTable, @NonN && !entityTable.getForeignKeyColumnNameOnDatatable().equals(columnName); } - @SuppressWarnings({ "WhitespaceAround" }) + @SuppressWarnings({"WhitespaceAround"}) private CommandProcessingResult updateDatatableEntry(final String dataTableName, final Long appTableId, final Long datatableId, - final JsonCommand command) { + final JsonCommand command) { final EntityTables entityTable = datatableUtil.queryForApplicationEntity(dataTableName); CommandProcessingResult commandProcessingResult = datatableUtil.checkMainResourceExistsWithinScope(entityTable, appTableId); @@ -1219,9 +1222,11 @@ private CommandProcessingResult updateDatatableEntry(final String dataTableName, Map headersByName = searchUtil.mapHeadersToName(columnHeaders); final List existingValues = existingRows.getData().get(0).getRow(); HashMap valuesByHeader = columnHeaders.stream().collect(HashMap::new, - (map, e) -> map.put(e, existingValues.get(map.size())), (map, map2) -> {}); + (map, e) -> map.put(e, existingValues.get(map.size())), (map, map2) -> { + }); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final Map dataParams = fromJsonHelper.extractDataMap(typeOfMap, command.json()); final Map dataObjectParams = new HashMap(); @@ -1295,7 +1300,7 @@ private static boolean isUserUpdatable(@NonNull EntityTables entityTable, @NonNu } private CommandProcessingResult deleteDatatableEntries(final String dataTableName, final Long appTableId, final Long datatableId, - JsonCommand command) { + JsonCommand command) { datatableUtil.validateDatatableName(dataTableName); if (isDatatableAttachedToEntityDatatableCheck(dataTableName)) { throw new DatatableEntryRequiredException(dataTableName, appTableId); @@ -1410,11 +1415,11 @@ private void handleDataIntegrityIssues(String dataTableName, Long appTableId, fi param = API_PARAM_DATATABLE_NAME; if (appTableId == null) { msg = "Datatable `" + dataTableName + "` is already registered against an application table."; - msgArgs = new Object[] { dataTableName, e }; + msgArgs = new Object[]{dataTableName, e}; } else { msg = "An entry already exists for datatable `" + dataTableName + "` and application table with identifier `" + appTableId + "`."; - msgArgs = new Object[] { dataTableName, appTableId, e }; + msgArgs = new Object[]{dataTableName, appTableId, e}; } } else if ((realCause != null && realCause.getMessage().contains("doesn't have a default value")) || (cause != null && cause.getMessage().contains("doesn't have a default value"))) { @@ -1422,10 +1427,10 @@ private void handleDataIntegrityIssues(String dataTableName, Long appTableId, fi msg = "No values provided for the datatable `" + dataTableName + "` and application table with identifier `" + appTableId + "`."; param = API_PARAM_DATATABLE_NAME; - msgArgs = new Object[] { dataTableName, appTableId, e }; + msgArgs = new Object[]{dataTableName, appTableId, e}; } else { msgCode += ".unknown.data.integrity.issue"; - msgArgs = new Object[] { dataTableName, e }; + msgArgs = new Object[]{dataTableName, e}; } log.error("Error occured.", e); throw ErrorHandler.getMappable(e, msgCode, msg, param, msgArgs); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksDataValidator.java index abed6d81715..73d3c12ec2e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -29,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksReadPlatformServiceImpl.java index f3ac77f6a07..8a40d94c4ea 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.infrastructure.core.service.Page; @@ -63,9 +64,9 @@ public class EntityDatatableChecksReadPlatformServiceImpl implements EntityDatat private final PaginationHelper paginationHelper; public EntityDatatableChecksReadPlatformServiceImpl(final JdbcTemplate jdbcTemplate, final DatabaseSpecificSQLGenerator sqlGenerator, - final EntityDatatableChecksRepository entityDatatableChecksRepository, final DatatableReadService datatableReadService, - final LoanProductReadPlatformService loanProductReadPlatformService, - final SavingsProductReadPlatformService savingsProductReadPlatformService, final PaginationHelper paginationHelper) { + final EntityDatatableChecksRepository entityDatatableChecksRepository, final DatatableReadService datatableReadService, + final LoanProductReadPlatformService loanProductReadPlatformService, + final SavingsProductReadPlatformService savingsProductReadPlatformService, final PaginationHelper paginationHelper) { this.jdbcTemplate = jdbcTemplate; this.sqlGenerator = sqlGenerator; this.entityDatatableChecksRepository = entityDatatableChecksRepository; @@ -79,7 +80,7 @@ public EntityDatatableChecksReadPlatformServiceImpl(final JdbcTemplate jdbcTempl @Override public Page retrieveAll(@NonNull SearchParameters searchParameters, final Integer status, - final String entity, final Long productId) { + final String entity, final Long productId) { final StringBuilder sqlBuilder = new StringBuilder(200); sqlBuilder.append("select ").append(sqlGenerator.calcFoundRows()).append(" ").append(this.entityDataTableChecksMapper.schema()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksReadService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksReadService.java index 89b604e75f8..06fd576b14a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksReadService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksReadService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.dataqueries.service; import java.util.List; + import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.infrastructure.core.service.SearchParameters; import org.apache.fineract.infrastructure.dataqueries.data.DatatableData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksWritePlatformService.java index d690214c753..94e83199a70 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksWritePlatformServiceImpl.java index 1c419aa3f1c..8ddd0b66959 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/EntityDatatableChecksWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,10 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import jakarta.persistence.PersistenceException; + import java.util.ArrayList; import java.util.List; + import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; @@ -141,7 +143,7 @@ public CommandProcessingResult createCheck(final JsonCommand command) { @Override public void runTheCheck(final Long entityId, final String entityName, final Integer status, String foreignKeyColumn, - final String entitySubtype) { + final String entitySubtype) { List tableRequiredBeforeClientActivation; if (entitySubtype == null) { tableRequiredBeforeClientActivation = entityDatatableChecksRepository.findByEntityAndStatus(entityName, status); @@ -171,7 +173,7 @@ public void runTheCheck(final Long entityId, final String entityName, final Inte @Transactional(readOnly = true) @Override public void runTheCheckForProduct(final Long entityId, final String entityName, final Integer status, String foreignKeyColumn, - long productId) { + long productId) { List tableRequiredBeforAction = entityDatatableChecksRepository.findByEntityStatusAndProduct(entityName, status, productId); @@ -199,7 +201,7 @@ public void runTheCheckForProduct(final Long entityId, final String entityName, @Transactional @Override public boolean saveDatatables(final Integer status, final String entity, final Long entityId, final Long productId, - final JsonArray datatableDatas) { + final JsonArray datatableDatas) { final AppUser user = this.context.authenticatedUser(); boolean isMakerCheckerEnabled = false; if (datatableDatas != null && datatableDatas.size() > 0) { @@ -260,7 +262,7 @@ private void handleReportDataIntegrityIssues(final JsonCommand command, final Th msgCode += ".foreign.key.constraint"; msg = "Datatable with name '" + datatableName + "' does not exist"; param = "datatableName"; - msgArgs = new Object[] { datatableName, dae }; + msgArgs = new Object[]{datatableName, dae}; } else if (checkEx.getMessage().contains("unique_entity_check")) { final String datatableName = command.stringValueOfParameterNamed("datatableName"); final Integer status = command.integerValueSansLocaleOfParameterNamed("status"); @@ -269,7 +271,7 @@ private void handleReportDataIntegrityIssues(final JsonCommand command, final Th throw new EntityDatatableCheckAlreadyExistsException(entity, status, datatableName, productId); } else { msgCode += ".unknown.data.integrity.issue"; - msgArgs = new Object[] { dae }; + msgArgs = new Object[]{dae}; } log.error("Error occured.", dae); throw ErrorHandler.getMappable(dae, msgCode, msg, param, msgArgs); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataServiceImpl.java index 9849ec0b146..a3d51f64430 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/GenericDataServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -34,6 +34,7 @@ import java.time.LocalTime; import java.util.ArrayList; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.exception.ErrorHandler; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadReportingService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadReportingService.java index 4a2c51391bc..4d7a5a9ab87 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadReportingService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadReportingService.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.infrastructure.dataqueries.service; import jakarta.ws.rs.core.StreamingOutput; + import java.io.ByteArrayOutputStream; import java.util.Collection; import java.util.Locale; import java.util.Map; + import org.apache.fineract.infrastructure.dataqueries.data.GenericResultsetData; import org.apache.fineract.infrastructure.dataqueries.data.ReportData; import org.apache.fineract.infrastructure.dataqueries.data.ReportParameterData; @@ -52,5 +54,5 @@ public interface ReadReportingService { // TODO kill this when tackling https://issues.apache.org/jira/browse/FINERACT-1264 ByteArrayOutputStream generatePentahoReportAsOutputStream(String reportName, String outputTypeParam, Map queryParams, - Locale locale, AppUser runReportAsUser, StringBuilder errorLog); + Locale locale, AppUser runReportAsUser, StringBuilder errorLog); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadReportingServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadReportingServiceImpl.java index 27d340c0a9d..f0bd47d60ee 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadReportingServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReadReportingServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.dataqueries.service; import jakarta.ws.rs.core.StreamingOutput; + import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileOutputStream; @@ -35,6 +36,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.csv.CSVFormat; @@ -312,7 +314,7 @@ private Collection retrieveReports(final Long id) { final String sql = rm.schema(id); final Collection rpJoins = this.jdbcTemplate.query(sql, rm, - id != null ? new Object[] { id } : new Object[] {}); + id != null ? new Object[]{id} : new Object[]{}); final Collection reportList = new ArrayList<>(); if (rpJoins == null || rpJoins.size() == 0) { @@ -495,7 +497,7 @@ private String sqlToRunForSmsEmailCampaign(final String name, final String type, @Override public ByteArrayOutputStream generatePentahoReportAsOutputStream(final String reportName, final String outputTypeParam, - final Map queryParams, final Locale locale, final AppUser runReportAsUser, final StringBuilder errorLog) { + final Map queryParams, final Locale locale, final AppUser runReportAsUser, final StringBuilder errorLog) { // This complete implementation should be moved to Pentaho Report // Service /* diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReportWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReportWritePlatformService.java index d1485c49569..acd7fa6f7eb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReportWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReportWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReportWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReportWritePlatformServiceImpl.java index 6e42ffb4879..a4ad6d89365 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReportWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/ReportWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,9 +21,11 @@ import com.google.gson.JsonArray; import com.google.gson.JsonObject; import jakarta.persistence.PersistenceException; + import java.util.HashSet; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -68,9 +70,9 @@ public class ReportWritePlatformServiceImpl implements ReportWritePlatformServic @Autowired public ReportWritePlatformServiceImpl(final PlatformSecurityContext context, - final ReportCommandFromApiJsonDeserializer fromApiJsonDeserializer, final ReportRepository reportRepository, - final ReportParameterRepository reportParameterRepository, final ReportParameterUsageRepository reportParameterUsageRepository, - final PermissionRepository permissionRepository, final ReportingProcessServiceProvider reportingProcessServiceProvider) { + final ReportCommandFromApiJsonDeserializer fromApiJsonDeserializer, final ReportRepository reportRepository, + final ReportParameterRepository reportParameterRepository, final ReportParameterUsageRepository reportParameterUsageRepository, + final PermissionRepository permissionRepository, final ReportingProcessServiceProvider reportingProcessServiceProvider) { this.context = context; this.fromApiJsonDeserializer = fromApiJsonDeserializer; this.reportRepository = reportRepository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/CsvDatatableReportExportServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/CsvDatatableReportExportServiceImpl.java index 869b5a57e02..40823cbcc49 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/CsvDatatableReportExportServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/CsvDatatableReportExportServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import jakarta.ws.rs.core.MultivaluedMap; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.StreamingOutput; + import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.dataqueries.service.DatatableExportTargetParameter; import org.apache.fineract.infrastructure.dataqueries.service.ReadReportingService; @@ -35,7 +37,7 @@ public class CsvDatatableReportExportServiceImpl implements DatatableReportExpor @Override public ResponseHolder export(String reportName, MultivaluedMap queryParams, Map reportParams, - String parameterTypeValue) { + String parameterTypeValue) { final StreamingOutput result = this.readExtraDataAndReportingService.retrieveReportCSV(reportName, parameterTypeValue, reportParams); return new ResponseHolder(Response.Status.OK).contentType("text/csv") diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/DatatableExportUtil.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/DatatableExportUtil.java index 3b333a9a473..d9519d6b81b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/DatatableExportUtil.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/DatatableExportUtil.java @@ -6,9 +6,9 @@ * 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 @@ -21,13 +21,15 @@ import java.time.format.DateTimeFormatter; import java.util.Map; import java.util.stream.Collectors; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.springframework.lang.NonNull; public final class DatatableExportUtil { - private DatatableExportUtil() {} + private DatatableExportUtil() { + } public static String normalizeFolderName(String folderName) { if (StringUtils.isBlank(folderName)) { @@ -56,7 +58,7 @@ private static void exportBasicValidation(String extension, String reportName) { } public static String generateS3DatatableExportFileName(int maxLength, String folder, String extension, String reportName, - Map reportParams) { + Map reportParams) { exportBasicValidation(extension, reportName); if (maxLength < 30) { throw new IllegalArgumentException("The maximum length must be greater than 30"); @@ -72,7 +74,7 @@ public static String generateS3DatatableExportFileName(int maxLength, String fol @NonNull private static String generateReportFileName(int maxLength, String folder, String extension, String reportName, - Map reportParams) { + Map reportParams) { String extensionWithDot = extension.startsWith(".") ? extension : "." + extension; String timestamp = "_" + DateUtils.getOffsetDateTimeOfTenant().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/DatatableReportExportService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/DatatableReportExportService.java index 47d1b13a365..408ad1d5c34 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/DatatableReportExportService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/DatatableReportExportService.java @@ -6,9 +6,9 @@ * 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 @@ -19,13 +19,15 @@ package org.apache.fineract.infrastructure.dataqueries.service.export; import jakarta.ws.rs.core.MultivaluedMap; + import java.util.Map; + import org.apache.fineract.infrastructure.dataqueries.service.DatatableExportTargetParameter; public interface DatatableReportExportService { ResponseHolder export(String reportName, MultivaluedMap queryParams, Map reportParams, - String parameterTypeValue); + String parameterTypeValue); boolean supports(DatatableExportTargetParameter exportType); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/Header.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/Header.java index 40032c9336c..4587da748b5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/Header.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/Header.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/JsonDatatableReportExportService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/JsonDatatableReportExportService.java index f2c10131a8e..95b779501e1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/JsonDatatableReportExportService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/JsonDatatableReportExportService.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.MultivaluedMap; import jakarta.ws.rs.core.Response; + import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.ApiParameterHelper; import org.apache.fineract.infrastructure.core.serialization.ToApiJsonSerializer; @@ -42,7 +44,7 @@ public class JsonDatatableReportExportService implements DatatableReportExportSe @Override public ResponseHolder export(String reportName, MultivaluedMap queryParams, Map reportParams, - String parameterTypeValue) { + String parameterTypeValue) { final GenericResultsetData result = this.readExtraDataAndReportingService.retrieveGenericResultset(reportName, parameterTypeValue, reportParams); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/PdfDatatableReportExportService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/PdfDatatableReportExportService.java index 5bd75f052ca..bdf07efc0d6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/PdfDatatableReportExportService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/PdfDatatableReportExportService.java @@ -6,9 +6,9 @@ * 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 @@ -20,8 +20,10 @@ import jakarta.ws.rs.core.MultivaluedMap; import jakarta.ws.rs.core.Response; + import java.io.File; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.dataqueries.service.DatatableExportTargetParameter; import org.apache.fineract.infrastructure.dataqueries.service.ReadReportingService; @@ -35,7 +37,7 @@ public class PdfDatatableReportExportService implements DatatableReportExportSer @Override public ResponseHolder export(String reportName, MultivaluedMap queryParams, Map reportParams, - String parameterTypeValue) { + String parameterTypeValue) { final String pdfFileName = this.readExtraDataAndReportingService.retrieveReportPDF(reportName, parameterTypeValue, reportParams); final File file = new File(pdfFileName); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/ResponseHolder.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/ResponseHolder.java index c75d032fe22..94162ba7edf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/ResponseHolder.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/ResponseHolder.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.dataqueries.service.export; import jakarta.ws.rs.core.Response; + import java.util.ArrayList; import java.util.List; + import lombok.Data; import lombok.RequiredArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/S3DatatableReportExportServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/S3DatatableReportExportServiceImpl.java index ff3b45621cc..14cc9840608 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/S3DatatableReportExportServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/service/export/S3DatatableReportExportServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,9 +21,11 @@ import jakarta.ws.rs.core.MultivaluedMap; import jakarta.ws.rs.core.Response; import jakarta.ws.rs.core.StreamingOutput; + import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; import org.apache.fineract.infrastructure.core.config.FineractProperties; @@ -45,7 +47,7 @@ public class S3DatatableReportExportServiceImpl implements DatatableReportExport @Override public ResponseHolder export(String reportName, MultivaluedMap queryParams, Map reportParams, - String parameterTypeValue) { + String parameterTypeValue) { try { StreamingOutput output = this.readExtraDataAndReportingService.retrieveReportCSV(reportName, parameterTypeValue, reportParams); try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/starter/DataQueriesAutoConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/starter/DataQueriesAutoConfiguration.java index 40a21b4eda4..f41639ccedd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/starter/DataQueriesAutoConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/dataqueries/starter/DataQueriesAutoConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -48,8 +48,8 @@ public class DataQueriesAutoConfiguration { @Bean @ConditionalOnMissingBean public DatatableReadService datatableReadService(final JdbcTemplate jdbcTemplate, final DatabaseSpecificSQLGenerator sqlGenerator, - final PlatformSecurityContext context, final GenericDataService genericDataService, final DataTableValidator dataTableValidator, - final SqlValidator sqlValidator, final SearchUtil searchUtil, final DatatableUtil datatableUtil) { + final PlatformSecurityContext context, final GenericDataService genericDataService, final DataTableValidator dataTableValidator, + final SqlValidator sqlValidator, final SearchUtil searchUtil, final DatatableUtil datatableUtil) { return new DatatableReadServiceImpl(jdbcTemplate, sqlGenerator, context, genericDataService, dataTableValidator, sqlValidator, searchUtil, datatableUtil); } @@ -57,13 +57,13 @@ public DatatableReadService datatableReadService(final JdbcTemplate jdbcTemplate @Bean @ConditionalOnMissingBean public DatatableWriteService datatableWriteService(final JdbcTemplate jdbcTemplate, final DatabaseTypeResolver databaseTypeResolver, - final DatabaseSpecificSQLGenerator sqlGenerator, final PlatformSecurityContext context, final FromJsonHelper fromJsonHelper, - final GenericDataService genericDataService, final DatatableCommandFromApiJsonDeserializer fromApiJsonDeserializer, - final ConfigurationDomainService configurationDomainService, final CodeReadPlatformService codeReadPlatformService, - final DataTableValidator dataTableValidator, final NamedParameterJdbcTemplate namedParameterJdbcTemplate, - final DatatableKeywordGenerator datatableKeywordGenerator, final SearchUtil searchUtil, - final BusinessEventNotifierService businessEventNotifierService, final DatatableReadService datatableReadService, - final DatatableUtil datatableUtil) { + final DatabaseSpecificSQLGenerator sqlGenerator, final PlatformSecurityContext context, final FromJsonHelper fromJsonHelper, + final GenericDataService genericDataService, final DatatableCommandFromApiJsonDeserializer fromApiJsonDeserializer, + final ConfigurationDomainService configurationDomainService, final CodeReadPlatformService codeReadPlatformService, + final DataTableValidator dataTableValidator, final NamedParameterJdbcTemplate namedParameterJdbcTemplate, + final DatatableKeywordGenerator datatableKeywordGenerator, final SearchUtil searchUtil, + final BusinessEventNotifierService businessEventNotifierService, final DatatableReadService datatableReadService, + final DatatableUtil datatableUtil) { return new DatatableWriteServiceImpl(jdbcTemplate, databaseTypeResolver, sqlGenerator, context, fromJsonHelper, genericDataService, fromApiJsonDeserializer, configurationDomainService, codeReadPlatformService, dataTableValidator, namedParameterJdbcTemplate, datatableKeywordGenerator, searchUtil, businessEventNotifierService, datatableReadService, diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/FineractEntityAccessConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/FineractEntityAccessConstants.java index 21859cd6eb0..57169c8ae9e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/FineractEntityAccessConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/FineractEntityAccessConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/api/FineractEntityApiResourceConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/api/FineractEntityApiResourceConstants.java index 7e7df1a8266..c47f03ba429 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/api/FineractEntityApiResourceConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/api/FineractEntityApiResourceConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityAccessData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityAccessData.java index 1d79dde554f..58a19b47e03 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityAccessData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityAccessData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityDataValidator.java index f1638a23e34..7834edae832 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.time.LocalDate; import java.util.ArrayList; @@ -28,6 +29,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -68,8 +70,8 @@ public class FineractEntityDataValidator { @Autowired public FineractEntityDataValidator(final FromJsonHelper fromApiJsonHelper, final OfficeRepositoryWrapper officeRepositoryWrapper, - final LoanProductRepository loanProductRepository, final SavingsProductRepository savingsProductRepository, - final ChargeRepositoryWrapper chargeRepositoryWrapper, final RoleRepository roleRepository) { + final LoanProductRepository loanProductRepository, final SavingsProductRepository savingsProductRepository, + final ChargeRepositoryWrapper chargeRepositoryWrapper, final RoleRepository roleRepository) { this.fromApiJsonHelper = fromApiJsonHelper; this.officeRepositoryWrapper = officeRepositoryWrapper; this.loanProductRepository = loanProductRepository; @@ -84,7 +86,8 @@ public void validateForCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, CREATE_ENTITY_MAPPING_REQUEST_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); @@ -131,23 +134,23 @@ public void checkForEntity(String relId, Long fromId, Long toId) { case "1": checkForOffice(fromId); checkForLoanProducts(toId); - break; + break; case "2": checkForOffice(fromId); checkForSavingsProducts(toId); - break; + break; case "3": checkForOffice(fromId); checkForCharges(toId); - break; + break; case "4": checkForRoles(fromId); checkForLoanProducts(toId); - break; + break; case "5": checkForRoles(fromId); checkForSavingsProducts(toId); - break; + break; } @@ -179,7 +182,8 @@ public void validateForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, UPDATE_ENTITY_MAPPING_REQUEST_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityRelationData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityRelationData.java index 76d7eba35ff..f811cca598e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityRelationData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityRelationData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.entityaccess.data; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityToEntityMappingData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityToEntityMappingData.java index 8ca02c5ce8b..6d715832fb5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityToEntityMappingData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/data/FineractEntityToEntityMappingData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.time.LocalDate; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; @@ -55,7 +56,7 @@ public class FineractEntityToEntityMappingData implements Serializable { private String toEntity; public static FineractEntityToEntityMappingData getRelatedEntities(final Long mapId, final Long relationId, final Long fromId, - final Long toId, final LocalDate startDate, final LocalDate endDate, final String fromEntity, final String toEntity) { + final Long toId, final LocalDate startDate, final LocalDate endDate, final String fromEntity, final String toEntity) { return new FineractEntityToEntityMappingData().setMapId(mapId).setRelationId(relationId).setFromId(fromId).setToId(toId) .setStartDate(startDate).setEndDate(endDate).setFromEntity(fromEntity).setToEntity(toEntity); @@ -63,7 +64,7 @@ public static FineractEntityToEntityMappingData getRelatedEntities(final Long ma } public static FineractEntityToEntityMappingData getRelatedEntities(final Long relationId, final Long fromId, final Long toId, - final LocalDate startDate, final LocalDate endDate) { + final LocalDate startDate, final LocalDate endDate) { final Long mapId = null; final String fromEntity = null; final String toEntity = null; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntity.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntity.java index 38253158245..61311c6618f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntity.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntity.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccess.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccess.java index f3184a71cdb..345ec5544b2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccess.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccess.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.util.LinkedHashMap; import java.util.Map; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -59,7 +61,7 @@ public class FineractEntityAccess extends AbstractPersistableCustom { private Long secondEntityId; public static FineractEntityAccess createNew(final String entityType, final Long entityId, final CodeValue accessType, - final String secondEntityType, final Long secondEntityId) { + final String secondEntityType, final Long secondEntityId) { return new FineractEntityAccess().setEntityType(entityType).setEntityId(entityId).setAccessType(accessType) .setSecondEntityType(secondEntityType).setSecondEntityId(secondEntityId); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccessRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccessRepository.java index 77701d46fe0..88eb3955259 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccessRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccessRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccessRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccessRepositoryWrapper.java index f0010ef075e..519166dcffa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccessRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccessRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccessType.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccessType.java index 0721790532e..f10bd41c16d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccessType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityAccessType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityRelation.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityRelation.java index 2c4d07eb586..f730c93d017 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityRelation.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityRelation.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import jakarta.persistence.Entity; import jakarta.persistence.OneToMany; import jakarta.persistence.Table; + import java.util.HashSet; import java.util.Set; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityRelationRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityRelationRepository.java index 14693f227f6..e1d458846b2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityRelationRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityRelationRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityRelationRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityRelationRepositoryWrapper.java index e4d3d8a136a..d66b809c3a3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityRelationRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityRelationRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityToEntityMapping.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityToEntityMapping.java index 382ed09c334..61f4326e7f7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityToEntityMapping.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityToEntityMapping.java @@ -6,9 +6,9 @@ * 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 @@ -24,9 +24,11 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.time.LocalDate; import java.util.LinkedHashMap; import java.util.Map; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -38,7 +40,7 @@ import org.apache.fineract.infrastructure.entityaccess.exception.FineractEntityToEntityMappingDateException; @Entity -@Table(name = "m_entity_to_entity_mapping", uniqueConstraints = { @UniqueConstraint(columnNames = { "rel_id", "from_id", "to_id" }) }) +@Table(name = "m_entity_to_entity_mapping", uniqueConstraints = {@UniqueConstraint(columnNames = {"rel_id", "from_id", "to_id"})}) @Getter @Setter @NoArgsConstructor @@ -62,7 +64,7 @@ public class FineractEntityToEntityMapping extends AbstractPersistableCustom * 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 @@ -26,5 +26,5 @@ public interface FineractEntityToEntityMappingRepository extends JpaRepository * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityType.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityType.java index 9aca1f2ab49..870dfbc0a85 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/domain/FineractEntityType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityAccessConfigurationException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityAccessConfigurationException.java index 0b30725c7c4..7c397e2bc36 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityAccessConfigurationException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityAccessConfigurationException.java @@ -6,9 +6,9 @@ * 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 @@ -25,7 +25,7 @@ public class FineractEntityAccessConfigurationException extends AbstractPlatformDomainRuleException { public FineractEntityAccessConfigurationException(final Long firstEntityId, final FineractEntityType entityType1, - final FineractEntityAccessType accessType, final FineractEntityType entityType2) { + final FineractEntityAccessType accessType, final FineractEntityType entityType2) { super("error.msg.entityaccess.config", "Error while getting entity access configuration for " + entityType1.getType() + ":" + firstEntityId + " with type " + accessType.getStr() + " against " + entityType2.getType()); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityAccessNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityAccessNotFoundException.java index fae40cf4e72..4f11bf82223 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityAccessNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityAccessNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityMappingConfigurationException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityMappingConfigurationException.java index cf57e47a19b..a7a82e51659 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityMappingConfigurationException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityMappingConfigurationException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityToEntityMappingDateException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityToEntityMappingDateException.java index c4c84d683d0..9de9ecf44cd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityToEntityMappingDateException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityToEntityMappingDateException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityToEntityMappingNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityToEntityMappingNotFoundException.java index f50d930f137..e75579ac21a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityToEntityMappingNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/FineractEntityToEntityMappingNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/NotOfficeSpecificProductException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/NotOfficeSpecificProductException.java index 164eecfd806..d29ac352aad 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/NotOfficeSpecificProductException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/exception/NotOfficeSpecificProductException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/CreateEntityToEntityMappingCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/CreateEntityToEntityMappingCommandHandler.java index 91e06eef7cc..b5a080190a1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/CreateEntityToEntityMappingCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/CreateEntityToEntityMappingCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/DeleteEntityToEntityMappingCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/DeleteEntityToEntityMappingCommandHandler.java index 4fdcf0df19d..047c67cd98e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/DeleteEntityToEntityMappingCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/DeleteEntityToEntityMappingCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/UpdateEntityToEntityMappingCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/UpdateEntityToEntityMappingCommandHandler.java index 8fd82d479cb..4be4b638cbb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/UpdateEntityToEntityMappingCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/handler/UpdateEntityToEntityMappingCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessReadService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessReadService.java index 41f2ae4c9e6..7e5f13a3c1b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessReadService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessReadService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.entityaccess.service; import java.util.Collection; + import org.apache.fineract.infrastructure.entityaccess.data.FineractEntityRelationData; import org.apache.fineract.infrastructure.entityaccess.data.FineractEntityToEntityMappingData; import org.apache.fineract.infrastructure.entityaccess.domain.FineractEntityType; @@ -26,10 +27,10 @@ public interface FineractEntityAccessReadService { Collection retrieveEntityAccessFor(FineractEntityType firstEntityType, Long relId, Long fromEntityId, - boolean includeAllSubOffices); + boolean includeAllSubOffices); String getSQLQueryInClause_WithListOfIDsForEntityAccess(FineractEntityType firstEntityType, Long relId, Long fromEntityId, - boolean includeAllOffices); + boolean includeAllOffices); String getSQLQueryInClauseIDList_ForLoanProductsForOffice(Long loanProductId, boolean includeAllOffices); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessReadServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessReadServiceImpl.java index 767a768e2f1..3a4b82418ff 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessReadServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessReadServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,11 +19,13 @@ package org.apache.fineract.infrastructure.entityaccess.service; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.sql.Date; import java.sql.ResultSet; import java.sql.SQLException; import java.time.LocalDate; import java.util.Collection; + import org.apache.fineract.infrastructure.entityaccess.data.FineractEntityRelationData; import org.apache.fineract.infrastructure.entityaccess.data.FineractEntityToEntityMappingData; import org.apache.fineract.infrastructure.entityaccess.domain.FineractEntityAccessType; @@ -50,7 +52,7 @@ public class FineractEntityAccessReadServiceImpl implements FineractEntityAccess @Autowired public FineractEntityAccessReadServiceImpl(final PlatformSecurityContext context, final JdbcTemplate jdbcTemplate, - final FineractEntityRelationRepositoryWrapper fineractEntityRelationRepository) { + final FineractEntityRelationRepositoryWrapper fineractEntityRelationRepository) { this.context = context; this.jdbcTemplate = jdbcTemplate; this.fineractEntityRelationRepository = fineractEntityRelationRepository; @@ -70,7 +72,7 @@ public FineractEntityAccessReadServiceImpl(final PlatformSecurityContext context */ @Override public String getSQLQueryInClause_WithListOfIDsForEntityAccess(FineractEntityType firstEntityType, final Long relId, - final Long fromEntityId, boolean includeAllOffices) { + final Long fromEntityId, boolean includeAllOffices) { Collection accesslist = retrieveEntityAccessFor(firstEntityType, relId, fromEntityId, includeAllOffices); String returnIdListStr = null; @@ -97,7 +99,7 @@ public String getSQLQueryInClause_WithListOfIDsForEntityAccess(FineractEntityTyp accessListCSVStrBuf = new StringBuilder(); accessListCSVStrBuf.append("false"); // Append false so that no rows - // will be returned + // will be returned } if (accessListCSVStrBuf != null) { returnIdListStr = accessListCSVStrBuf.toString(); @@ -108,7 +110,7 @@ public String getSQLQueryInClause_WithListOfIDsForEntityAccess(FineractEntityTyp @Override public Collection retrieveEntityAccessFor(FineractEntityType firstEntityType, final Long relId, - final Long fromEntityId, boolean includeAllSubOffices) { + final Long fromEntityId, boolean includeAllSubOffices) { final AppUser currentUser = this.context.authenticatedUser(); final String hierarchy = currentUser.getOffice().getHierarchy(); @@ -125,9 +127,9 @@ public Collection retrieveEntityAccessFor(Fin if (includeAllSubOffices && firstEntityType.getTableName().equals("m_office")) { sql += " where firstentity.hierarchy like ? order by firstEntity.hierarchy"; - entityAccessData = this.jdbcTemplate.query(sql, mapper, new Object[] { fromEntityId, fromEntityId, hierarchySearchString }); + entityAccessData = this.jdbcTemplate.query(sql, mapper, new Object[]{fromEntityId, fromEntityId, hierarchySearchString}); } else { - entityAccessData = this.jdbcTemplate.query(sql, mapper, new Object[] { relId, fromEntityId }); + entityAccessData = this.jdbcTemplate.query(sql, mapper, new Object[]{relId, fromEntityId}); } return entityAccessData; @@ -181,7 +183,7 @@ public String getSQLQueryInClauseIDList_ForChargesForOffice(Long officeId, boole public Collection retrieveAllSupportedMappingTypes() { EntityRelationMapper entityMapper = new EntityRelationMapper(); final String sql = entityMapper.schema(); - final Collection mapTypes = this.jdbcTemplate.query(sql, entityMapper, new Object[] {}); + final Collection mapTypes = this.jdbcTemplate.query(sql, entityMapper, new Object[]{}); return mapTypes; } @@ -207,7 +209,7 @@ public Collection retrieveEntityToEntityMappi EntityToEntityMapper entityToEntityMapper = new EntityToEntityMapper(); String sql = entityToEntityMapper.schema(); final Collection mapTypes = this.jdbcTemplate.query(sql, entityToEntityMapper, - new Object[] { mapId, fromId, fromId, toId, toId }); + new Object[]{mapId, fromId, fromId, toId, toId}); return mapTypes; } @@ -216,7 +218,7 @@ public Collection retrieveEntityToEntityMappi public Collection retrieveOneMapping(Long mapId) { GetOneEntityMapper entityMapper = new GetOneEntityMapper(); String sql = entityMapper.schema(); - final Collection mapTypes = this.jdbcTemplate.query(sql, entityMapper, new Object[] { mapId }); + final Collection mapTypes = this.jdbcTemplate.query(sql, entityMapper, new Object[]{mapId}); return mapTypes; } @@ -228,7 +230,8 @@ private static final class GetOneEntityMapper implements RowMapper * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.entityaccess.service; import java.time.LocalDate; + import org.apache.fineract.infrastructure.codes.domain.CodeValueRepositoryWrapper; import org.apache.fineract.infrastructure.codes.service.CodeValueReadPlatformService; import org.apache.fineract.infrastructure.configuration.api.GlobalConfigurationConstants; @@ -50,12 +51,12 @@ public class FineractEntityAccessUtil { @Autowired public FineractEntityAccessUtil(final PlatformSecurityContext context, - final GlobalConfigurationRepositoryWrapper globalConfigurationRepository, - final FineractEntityAccessWriteService fineractEntityAccessWriteService, - final CodeValueReadPlatformService codeValueReadPlatformService, final CodeValueRepositoryWrapper codeValueRepository, - final FineractEntityAccessReadService fineractEntityAccessReadService, - final FineractEntityRelationRepositoryWrapper fineractEntityRelationRepositoryWrapper, - final FineractEntityToEntityMappingRepository fineractEntityToEntityMappingRepository) { + final GlobalConfigurationRepositoryWrapper globalConfigurationRepository, + final FineractEntityAccessWriteService fineractEntityAccessWriteService, + final CodeValueReadPlatformService codeValueReadPlatformService, final CodeValueRepositoryWrapper codeValueRepository, + final FineractEntityAccessReadService fineractEntityAccessReadService, + final FineractEntityRelationRepositoryWrapper fineractEntityRelationRepositoryWrapper, + final FineractEntityToEntityMappingRepository fineractEntityToEntityMappingRepository) { this.context = context; this.globalConfigurationRepository = globalConfigurationRepository; this.fineractEntityAccessWriteService = fineractEntityAccessWriteService; @@ -68,7 +69,7 @@ public FineractEntityAccessUtil(final PlatformSecurityContext context, @Transactional public void checkConfigurationAndAddProductResrictionsForUserOffice(final FineractEntityAccessType fineractEntityAccessType, - final Long productOrChargeId) { + final Long productOrChargeId) { AppUser thisUser = this.context.authenticatedUser(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessWriteService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessWriteService.java index 25afdb9a864..f5150230f8d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessWriteService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessWriteService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessWriteServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessWriteServiceImpl.java index d5a2ab64582..19bb6cff839 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessWriteServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/entityaccess/service/FineractEntityAccessWriteServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.entityaccess.service; import jakarta.persistence.PersistenceException; + import java.time.LocalDate; import java.util.Map; + import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.fineract.infrastructure.codes.domain.CodeValue; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -59,10 +61,10 @@ public class FineractEntityAccessWriteServiceImpl implements FineractEntityAcces @Autowired public FineractEntityAccessWriteServiceImpl(final FineractEntityAccessRepository entityAccessRepository, - final FineractEntityRelationRepositoryWrapper fineractEntityRelationRepositoryWrapper, - final FineractEntityToEntityMappingRepository fineractEntityToEntityMappingRepository, - final FineractEntityToEntityMappingRepositoryWrapper fineractEntityToEntityMappingRepositoryWrapper, - FineractEntityDataValidator fromApiJsonDeserializer) { + final FineractEntityRelationRepositoryWrapper fineractEntityRelationRepositoryWrapper, + final FineractEntityToEntityMappingRepository fineractEntityToEntityMappingRepository, + final FineractEntityToEntityMappingRepositoryWrapper fineractEntityToEntityMappingRepositoryWrapper, + FineractEntityDataValidator fromApiJsonDeserializer) { this.entityAccessRepository = entityAccessRepository; this.fineractEntityToEntityMappingRepository = fineractEntityToEntityMappingRepository; this.fromApiJsonDeserializer = fromApiJsonDeserializer; @@ -79,7 +81,7 @@ public CommandProcessingResult createEntityAccess(@SuppressWarnings("unused") Js @Override @Transactional public void addNewEntityAccess(final String entityType, final Long entityId, final CodeValue accessType, final String secondEntityType, - final Long secondEntityId) { + final Long secondEntityId) { FineractEntityAccess entityAccess = FineractEntityAccess.createNew(entityType, entityId, accessType, secondEntityType, secondEntityId); entityAccessRepository.save(entityAccess); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientActivateBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientActivateBusinessEvent.java index 1f288d33c5e..59b8d099ba9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientActivateBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientActivateBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientBusinessEvent.java index cbe497a3a0c..5a58695cf90 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientCreateBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientCreateBusinessEvent.java index db69f02cca3..5d00eefe954 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientCreateBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientCreateBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientRejectBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientRejectBusinessEvent.java index 463cc07477a..20b841b3656 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientRejectBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/client/ClientRejectBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/deposit/FixedDepositAccountBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/deposit/FixedDepositAccountBusinessEvent.java index 770ccb86f17..5e33707fd9d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/deposit/FixedDepositAccountBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/deposit/FixedDepositAccountBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/deposit/FixedDepositAccountCreateBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/deposit/FixedDepositAccountCreateBusinessEvent.java index b99ee35e9ae..214cdd342b1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/deposit/FixedDepositAccountCreateBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/deposit/FixedDepositAccountCreateBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/deposit/RecurringDepositAccountBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/deposit/RecurringDepositAccountBusinessEvent.java index d2c57ea59f6..34d36cc271f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/deposit/RecurringDepositAccountBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/deposit/RecurringDepositAccountBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/deposit/RecurringDepositAccountCreateBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/deposit/RecurringDepositAccountCreateBusinessEvent.java index 251e897335f..38367a4ab0f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/deposit/RecurringDepositAccountCreateBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/deposit/RecurringDepositAccountCreateBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/group/CentersCreateBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/group/CentersCreateBusinessEvent.java index 0329494690f..90bed956c02 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/group/CentersCreateBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/group/CentersCreateBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/group/GroupsBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/group/GroupsBusinessEvent.java index 70172f48d53..784574bca54 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/group/GroupsBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/group/GroupsBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/group/GroupsCreateBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/group/GroupsCreateBusinessEvent.java index d81a3520360..89575244ae5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/group/GroupsCreateBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/group/GroupsCreateBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/product/LoanProductBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/product/LoanProductBusinessEvent.java index 46f2d7071ab..48e511dd223 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/product/LoanProductBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/product/LoanProductBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/product/LoanProductCreateBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/product/LoanProductCreateBusinessEvent.java index 3c4e24db73f..3c0432dfba0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/product/LoanProductCreateBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/loan/product/LoanProductCreateBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsAccountBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsAccountBusinessEvent.java index 6cc16da4184..fda46dd631b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsAccountBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsAccountBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsActivateBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsActivateBusinessEvent.java index 96db651519a..6b8586c61ab 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsActivateBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsActivateBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsApproveBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsApproveBusinessEvent.java index 0745a30769f..d8045c6941a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsApproveBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsApproveBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsCloseBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsCloseBusinessEvent.java index 9cbc2391d8f..f0abfa26b0b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsCloseBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsCloseBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsCreateBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsCreateBusinessEvent.java index dfa0c6cb950..8ed9a6ca7d1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsCreateBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsCreateBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsPostInterestBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsPostInterestBusinessEvent.java index a952421acd4..e1f094c6ba9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsPostInterestBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsPostInterestBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsRejectBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsRejectBusinessEvent.java index e20fce4c25e..4fd635d2c3e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsRejectBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/SavingsRejectBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/transaction/SavingsAccountForceWithdrawalBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/transaction/SavingsAccountForceWithdrawalBusinessEvent.java index f7d2e5c9c9e..51c7242b250 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/transaction/SavingsAccountForceWithdrawalBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/transaction/SavingsAccountForceWithdrawalBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/transaction/SavingsAccountTransactionBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/transaction/SavingsAccountTransactionBusinessEvent.java index 5b92a41d845..36fd89e1a80 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/transaction/SavingsAccountTransactionBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/transaction/SavingsAccountTransactionBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/transaction/SavingsDepositBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/transaction/SavingsDepositBusinessEvent.java index 627540e565b..2d75d6ade49 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/transaction/SavingsDepositBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/transaction/SavingsDepositBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/transaction/SavingsWithdrawalBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/transaction/SavingsWithdrawalBusinessEvent.java index 1f904852e6a..2a5e7638eff 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/transaction/SavingsWithdrawalBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/savings/transaction/SavingsWithdrawalBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/share/ShareAccountApproveBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/share/ShareAccountApproveBusinessEvent.java index 8ffa072fa5b..42775e3abb1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/share/ShareAccountApproveBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/share/ShareAccountApproveBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/share/ShareAccountBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/share/ShareAccountBusinessEvent.java index da524deb9a0..d7500cd4bd9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/share/ShareAccountBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/share/ShareAccountBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/share/ShareAccountCreateBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/share/ShareAccountCreateBusinessEvent.java index e10c96053a1..1d8935d19b1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/share/ShareAccountCreateBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/share/ShareAccountCreateBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/share/ShareProductDividentsCreateBusinessEvent.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/share/ShareProductDividentsCreateBusinessEvent.java index f790d4dae0e..1b246ab5d74 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/share/ShareProductDividentsCreateBusinessEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/business/domain/share/ShareProductDividentsCreateBusinessEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/config/ExternalEventJMSConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/config/ExternalEventJMSConfiguration.java index 5ec6b5b59f3..29f00731cbc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/config/ExternalEventJMSConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/config/ExternalEventJMSConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/config/ExternalEventKafkaConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/config/ExternalEventKafkaConfiguration.java index 32453cbabf2..400ccd2c107 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/config/ExternalEventKafkaConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/config/ExternalEventKafkaConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.HashMap; import java.util.Map; + import org.apache.fineract.infrastructure.core.config.FineractProperties; import org.apache.kafka.common.serialization.ByteArraySerializer; import org.apache.kafka.common.serialization.LongSerializer; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/config/ExternalEventsKafkaTopicAutoCreateCondition.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/config/ExternalEventsKafkaTopicAutoCreateCondition.java index 98e942fe8e1..d827e7abcca 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/config/ExternalEventsKafkaTopicAutoCreateCondition.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/config/ExternalEventsKafkaTopicAutoCreateCondition.java @@ -6,9 +6,9 @@ * 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 @@ -28,9 +28,11 @@ public ExternalEventsKafkaTopicAutoCreateCondition() { } @ConditionalOnProperty(value = "fineract.events.external.producer.kafka.enabled", havingValue = "true") - static class ExternalEventsKafkaCondition {} + static class ExternalEventsKafkaCondition { + } @ConditionalOnProperty(value = "fineract.events.external.producer.kafka.topic.auto-create", havingValue = "true") - static class TopicAutoCreateCondition {} + static class TopicAutoCreateCondition { + } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/config/KafkaExternalEventTopicConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/config/KafkaExternalEventTopicConfig.java index 72e4cc7d8fb..0abcc169b71 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/config/KafkaExternalEventTopicConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/config/KafkaExternalEventTopicConfig.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.Map; + import org.apache.fineract.infrastructure.core.config.FineractProperties; import org.apache.kafka.clients.admin.NewTopic; import org.springframework.beans.factory.annotation.Autowired; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/producer/jms/JMSMultiExternalEventProducer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/producer/jms/JMSMultiExternalEventProducer.java index f6fbb112334..0c4c1b7d865 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/producer/jms/JMSMultiExternalEventProducer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/producer/jms/JMSMultiExternalEventProducer.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import jakarta.jms.JMSException; import jakarta.jms.MessageProducer; import jakarta.jms.Session; + import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; @@ -33,6 +34,7 @@ import java.util.Map; import java.util.concurrent.Future; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.tuple.ImmutablePair; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/producer/kafka/KafkaExternalEventProducer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/producer/kafka/KafkaExternalEventProducer.java index 952a7b552ab..328e385e249 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/producer/kafka/KafkaExternalEventProducer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/producer/kafka/KafkaExternalEventProducer.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import java.util.Set; import java.util.concurrent.CompletableFuture; import java.util.concurrent.TimeUnit; + import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.config.FineractProperties; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/client/ClientDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/client/ClientDataMapper.java index c3be145aa3d..3bc2f7fd0c1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/client/ClientDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/client/ClientDataMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/document/DocumentDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/document/DocumentDataMapper.java index 04a8093bdcc..6f44e5416ad 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/document/DocumentDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/document/DocumentDataMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/fixeddeposit/FixedDepositAccountDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/fixeddeposit/FixedDepositAccountDataMapper.java index 430f02bbf61..47d07e4d77f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/fixeddeposit/FixedDepositAccountDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/fixeddeposit/FixedDepositAccountDataMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanAccountDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanAccountDataMapper.java index 9e2b3480a0b..93174f82b83 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanAccountDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanAccountDataMapper.java @@ -6,9 +6,9 @@ * 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 @@ -24,8 +24,8 @@ import org.mapstruct.Mapper; import org.mapstruct.Mapping; -@Mapper(config = AvroMapperConfig.class, uses = { LoanTransactionDataMapper.class, LoanChargeDataMapper.class, - LoanDelinquencyPausePeriodMapper.class }) +@Mapper(config = AvroMapperConfig.class, uses = {LoanTransactionDataMapper.class, LoanChargeDataMapper.class, + LoanDelinquencyPausePeriodMapper.class}) public interface LoanAccountDataMapper { // TODO: avoid prefix "is" in class attributes; I would recommend to fix this also in the Avro structures diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanAccountsStayedLockedDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanAccountsStayedLockedDataMapper.java index d030632f907..c4a91b56753 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanAccountsStayedLockedDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanAccountsStayedLockedDataMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanChargeDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanChargeDataMapper.java index 2406a34dbc8..ff50295f17f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanChargeDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanChargeDataMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanDelinquencyPausePeriodMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanDelinquencyPausePeriodMapper.java index c4b99d34e88..23ea4afaed4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanDelinquencyPausePeriodMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanDelinquencyPausePeriodMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanDelinquencyRangeDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanDelinquencyRangeDataMapper.java index e87b3db7c73..4f369b92bb0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanDelinquencyRangeDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanDelinquencyRangeDataMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanProductDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanProductDataMapper.java index 72e0f3c25ad..3987708e765 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanProductDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanProductDataMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanRepaymentPastDueDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanRepaymentPastDueDataMapper.java index d8af82dda37..e6e4bcb5d9c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanRepaymentPastDueDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanRepaymentPastDueDataMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanTransactionDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanTransactionDataMapper.java index f3f55d41930..f113745c13a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanTransactionDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/LoanTransactionDataMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/UnpaidChargeDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/UnpaidChargeDataMapper.java index 69905d34b4a..d571be2607e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/UnpaidChargeDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/loan/UnpaidChargeDataMapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.service.serialization.mapper.loan; import java.util.List; + import org.apache.fineract.avro.loan.v1.UnpaidChargeDataV1; import org.apache.fineract.infrastructure.event.external.service.serialization.mapper.support.AvroMapperConfig; import org.apache.fineract.portfolio.loanaccount.data.UnpaidChargeData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/recurringdeposit/RecurringDepositAccountDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/recurringdeposit/RecurringDepositAccountDataMapper.java index 6d1f5077537..fbe180282ab 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/recurringdeposit/RecurringDepositAccountDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/recurringdeposit/RecurringDepositAccountDataMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/savings/SavingsAccountDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/savings/SavingsAccountDataMapper.java index cc2e786ab80..d8a303c8eea 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/savings/SavingsAccountDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/savings/SavingsAccountDataMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/savings/SavingsAccountTransactionDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/savings/SavingsAccountTransactionDataMapper.java index a0cf86658b6..5227ae05864 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/savings/SavingsAccountTransactionDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/savings/SavingsAccountTransactionDataMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/savings/SavingsAccountsStayedLockedDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/savings/SavingsAccountsStayedLockedDataMapper.java index fa8388f86ee..6e20f6677a5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/savings/SavingsAccountsStayedLockedDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/savings/SavingsAccountsStayedLockedDataMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/share/ShareAccountDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/share/ShareAccountDataMapper.java index 6dc7b82df94..a5cfb4a6672 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/share/ShareAccountDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/share/ShareAccountDataMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/share/ShareProductDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/share/ShareProductDataMapper.java index d2e2374b495..e66ad77a10d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/share/ShareProductDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/mapper/share/ShareProductDataMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/client/ClientBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/client/ClientBusinessEventSerializer.java index 87ca3058e4e..f815e9bbd1e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/client/ClientBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/client/ClientBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/document/DocumentBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/document/DocumentBusinessEventSerializer.java index 3326b571ba5..2d9d28da8dd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/document/DocumentBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/document/DocumentBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/fixeddeposit/FixedDepositAccountBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/fixeddeposit/FixedDepositAccountBusinessEventSerializer.java index c1e0f8fb108..86780edb123 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/fixeddeposit/FixedDepositAccountBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/fixeddeposit/FixedDepositAccountBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/group/GroupsBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/group/GroupsBusinessEventSerializer.java index 3d36fc3a8bb..ef4bc361b5c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/group/GroupsBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/group/GroupsBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanAccountsStayedLockedBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanAccountsStayedLockedBusinessEventSerializer.java index b233504b53a..7d8b9a1ad23 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanAccountsStayedLockedBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanAccountsStayedLockedBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanAdjustTransactionBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanAdjustTransactionBusinessEventSerializer.java index adec3eb6a4d..b35184db793 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanAdjustTransactionBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanAdjustTransactionBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.service.serialization.serializer.loan; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.avro.generic.GenericContainer; import org.apache.fineract.avro.generator.ByteBufferSerializable; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanBusinessEventSerializer.java index 52b1c0a9772..450b3de51ce 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.avro.generic.GenericContainer; import org.apache.commons.collections4.CollectionUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanChargeBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanChargeBusinessEventSerializer.java index 72345015b59..8a32a2d35a7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanChargeBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanChargeBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.service.serialization.serializer.loan; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.avro.generic.GenericContainer; import org.apache.fineract.avro.generator.ByteBufferSerializable; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanChargeDeletedBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanChargeDeletedBusinessEventSerializer.java index 4ba8bc172e7..d6947137552 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanChargeDeletedBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanChargeDeletedBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanChargeOffBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanChargeOffBusinessEventSerializer.java index c4aaa6dff81..e41eb8d4f81 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanChargeOffBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanChargeOffBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.service.serialization.serializer.loan; import java.util.List; + import org.apache.fineract.avro.generator.ByteBufferSerializable; import org.apache.fineract.avro.loan.v1.LoanTransactionDataV1; import org.apache.fineract.infrastructure.event.business.domain.BusinessEvent; @@ -43,9 +44,9 @@ public class LoanChargeOffBusinessEventSerializer extends LoanTransactionBusines private final LoanTransactionRepository loanTransactionRepository; public LoanChargeOffBusinessEventSerializer(LoanReadPlatformService loanReadPlatformService, - LoanTransactionDataMapper loanTransactionMapper, LoanChargePaidByReadService loanChargePaidByReadService, - UnpaidChargeDataMapper unpaidChargeDataMapper, LoanTransactionRepository loanTransactionRepository, - List> externalEventCustomDataSerializers) { + LoanTransactionDataMapper loanTransactionMapper, LoanChargePaidByReadService loanChargePaidByReadService, + UnpaidChargeDataMapper unpaidChargeDataMapper, LoanTransactionRepository loanTransactionRepository, + List> externalEventCustomDataSerializers) { super(loanReadPlatformService, loanTransactionMapper, loanChargePaidByReadService, externalEventCustomDataSerializers); this.unpaidChargeDataMapper = unpaidChargeDataMapper; this.loanTransactionRepository = loanTransactionRepository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanDelinquencyRangeChangeBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanDelinquencyRangeChangeBusinessEventSerializer.java index def36a44e2f..6b59f1bed51 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanDelinquencyRangeChangeBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanDelinquencyRangeChangeBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.util.List; import java.util.function.BiFunction; + import lombok.RequiredArgsConstructor; import org.apache.avro.generic.GenericContainer; import org.apache.fineract.avro.generator.ByteBufferSerializable; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanInstallmentLevelDelinquencyEventProducer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanInstallmentLevelDelinquencyEventProducer.java index 59d41753a85..412132a3e7a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanInstallmentLevelDelinquencyEventProducer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanInstallmentLevelDelinquencyEventProducer.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import org.apache.fineract.avro.loan.v1.DelinquencyRangeDataV1; import org.apache.fineract.avro.loan.v1.LoanAmountDataV1; @@ -85,12 +86,12 @@ public List calculateInstallmentLevelDel // get list of charges for installments in same range List chargesForInstallmentsInSameRange = loan.getLoanCharges().stream().filter(loanCharge -> !loanCharge - .isPaid() - && delinquentInstallmentsInSameRange.stream().anyMatch(installmentForCharge -> (DateUtils + .isPaid() + && delinquentInstallmentsInSameRange.stream().anyMatch(installmentForCharge -> (DateUtils .isAfter(loanCharge.getEffectiveDueDate(), installmentForCharge.getFromDate()) || DateUtils.isEqual(loanCharge.getEffectiveDueDate(), installmentForCharge.getFromDate())) && (DateUtils.isBefore(loanCharge.getEffectiveDueDate(), installmentForCharge.getDueDate()) - || DateUtils.isEqual(loanCharge.getEffectiveDueDate(), installmentForCharge.getDueDate())))) + || DateUtils.isEqual(loanCharge.getEffectiveDueDate(), installmentForCharge.getDueDate())))) .toList(); List charges = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanProductBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanProductBusinessEventSerializer.java index fc70978f93c..8febf17c400 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanProductBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanProductBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.service.serialization.serializer.loan; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.avro.generic.GenericContainer; import org.apache.fineract.avro.generator.ByteBufferSerializable; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanRepaymentBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanRepaymentBusinessEventSerializer.java index ae8a14ea131..85869946569 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanRepaymentBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanRepaymentBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.avro.generic.GenericContainer; import org.apache.fineract.avro.generator.ByteBufferSerializable; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanTransactionBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanTransactionBusinessEventSerializer.java index e6c4ddd8e27..56ef7b797f4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanTransactionBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/loan/LoanTransactionBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.event.external.service.serialization.serializer.loan; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.avro.generic.GenericContainer; import org.apache.fineract.avro.generator.ByteBufferSerializable; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/recurringdeposit/RecurringDepositAccountBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/recurringdeposit/RecurringDepositAccountBusinessEventSerializer.java index 69ea5de45ed..3404d26d1d5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/recurringdeposit/RecurringDepositAccountBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/recurringdeposit/RecurringDepositAccountBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/savings/SavingsAccountBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/savings/SavingsAccountBusinessEventSerializer.java index 2b349b36f7b..bd2fc6cbc92 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/savings/SavingsAccountBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/savings/SavingsAccountBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/savings/SavingsAccountTransactionBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/savings/SavingsAccountTransactionBusinessEventSerializer.java index 864f86c0e80..9a37b970e7c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/savings/SavingsAccountTransactionBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/savings/SavingsAccountTransactionBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/savings/SavingsAccountsStayedLockedBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/savings/SavingsAccountsStayedLockedBusinessEventSerializer.java index 2908b2253db..6d98bb3845a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/savings/SavingsAccountsStayedLockedBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/savings/SavingsAccountsStayedLockedBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/share/ShareAccountBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/share/ShareAccountBusinessEventSerializer.java index 61873f89e51..67ee3a604c3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/share/ShareAccountBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/share/ShareAccountBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/share/ShareProductDividentsCreateBusinessEventSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/share/ShareProductDividentsCreateBusinessEventSerializer.java index b8e154c1ea3..10a7c207aaa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/share/ShareProductDividentsCreateBusinessEventSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/event/external/service/serialization/serializer/share/ShareProductDividentsCreateBusinessEventSerializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/GcmConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/GcmConstants.java index 3b37ea6fb20..48b5a87ada6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/GcmConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/GcmConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Message.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Message.java index 62e37536faf..e3963c18bf1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Message.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Message.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.Collections; import java.util.LinkedHashMap; import java.util.Map; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; @@ -171,10 +172,10 @@ public Builder priority(Priority value) { switch (value) { case NORMAL: priority = GcmConstants.MESSAGE_PRIORITY_NORMAL; - break; + break; case HIGH: priority = GcmConstants.MESSAGE_PRIORITY_HIGH; - break; + break; } return this; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/MulticastResult.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/MulticastResult.java index 7cd2e41fc7f..19678fa0f8f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/MulticastResult.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/MulticastResult.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Notification.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Notification.java index e8569091ab4..1d1a61ac896 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Notification.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Notification.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serializable; import java.util.Collections; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/NotificationConfigurationData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/NotificationConfigurationData.java index 1f415e4777a..ead4676e9ec 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/NotificationConfigurationData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/NotificationConfigurationData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Result.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Result.java index bf52237ee29..49764ca2213 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Result.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Result.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Sender.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Sender.java index a2e8592a431..fc4b56025d2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Sender.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/domain/Sender.java @@ -6,9 +6,9 @@ * 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 @@ -56,6 +56,7 @@ import com.google.gson.JsonObject; import com.google.gson.JsonParser; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.io.BufferedReader; import java.io.Closeable; import java.io.IOException; @@ -70,6 +71,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.gcm.GcmConstants; import org.apache.fineract.infrastructure.gcm.exception.InvalidRequestException; import org.slf4j.Logger; @@ -171,7 +173,7 @@ public final void setReadTimeout(int readTimeout) { */ @SuppressFBWarnings(value = { - "DMI_RANDOM_USED_ONLY_ONCE" }, justification = "False positive for random object created and used only once") + "DMI_RANDOM_USED_ONLY_ONCE"}, justification = "False positive for random object created and used only once") public Result send(Message message, String to, int retries) throws IOException { int attempt = 0; Result result; @@ -321,7 +323,7 @@ public Result sendNoRetry(Message message, String to) throws IOException { * if message could not be sent. */ @SuppressFBWarnings(value = { - "DMI_RANDOM_USED_ONLY_ONCE" }, justification = "False positive for random object created and used only once") + "DMI_RANDOM_USED_ONLY_ONCE"}, justification = "False positive for random object created and used only once") public MulticastResult send(Message message, List regIds, int retries) throws IOException { int attempt = 0; MulticastResult multicastResult; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/exception/InvalidRequestException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/exception/InvalidRequestException.java index 99a175d470d..78fab82470e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/exception/InvalidRequestException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/exception/InvalidRequestException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/service/NotificationSenderService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/service/NotificationSenderService.java index 4aa832e2144..43931a8ad71 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/service/NotificationSenderService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/gcm/service/NotificationSenderService.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.configuration.service.ExternalServicesPropertiesReadPlatformService; import org.apache.fineract.infrastructure.core.service.DateUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiConstants.java index b1dcfe7db68..e41726f81a4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiConstants.java @@ -6,9 +6,9 @@ * 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 @@ -24,7 +24,8 @@ public final class HookApiConstants { - private HookApiConstants() {} + private HookApiConstants() { + } public static final String HOOK_RESOURCE_NAME = "HOOK"; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiResourceSwagger.java index 99f37e2d480..9c07aaf88eb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/api/HookApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.hooks.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; import java.util.List; + import org.apache.fineract.infrastructure.hooks.data.Event; import org.apache.fineract.infrastructure.hooks.data.Field; import org.apache.fineract.infrastructure.hooks.data.Grouping; @@ -143,7 +145,8 @@ private PutHookResponse() { static final class PutHookResponseChangesSwagger { - private PutHookResponseChangesSwagger() {} + private PutHookResponseChangesSwagger() { + } @Schema(example = "Kremlin") public String displayName; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/Entity.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/Entity.java index de555551070..144c6ad262d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/Entity.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/Entity.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/Event.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/Event.java index 7f754ef5236..b0d6ffebb4e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/Event.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/Event.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.hooks.data; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/EventResultSetExtractor.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/EventResultSetExtractor.java index c91acfc2618..81cb61a6d62 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/EventResultSetExtractor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/EventResultSetExtractor.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import org.springframework.dao.DataAccessException; import org.springframework.jdbc.core.ResultSetExtractor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/Field.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/Field.java index 36ff8dc6027..6a408070c58 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/Field.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/Field.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.hooks.data; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/Grouping.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/Grouping.java index 5bbfbaf05dd..9820bace2ea 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/Grouping.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/Grouping.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/HookData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/HookData.java index 056602d3d23..88150ce0cff 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/HookData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/HookData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serializable; import java.time.LocalDate; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; @@ -49,8 +50,8 @@ public final class HookData implements Serializable { private List groupings; public static HookData instance(final Long id, final String name, final String displayName, final boolean isActive, - final LocalDate createdAt, final LocalDate updatedAt, final Long templateId, final List registeredEvents, - final List config, final String templateName) { + final LocalDate createdAt, final LocalDate updatedAt, final Long templateId, final List registeredEvents, + final List config, final String templateName) { return new HookData().setId(id).setName(name).setDisplayName(displayName).setIsActive(isActive).setCreatedAt(createdAt) .setUpdatedAt(updatedAt).setTemplateId(templateId).setTemplateName(templateName).setEvents(registeredEvents) .setConfig(config); @@ -61,7 +62,7 @@ public static HookData template(final List templates, final Li } public static HookData templateExisting(final HookData hookData, final List templates, - final List groupings) { + final List groupings) { return new HookData().setId(hookData.id).setName(hookData.name).setDisplayName(hookData.displayName).setIsActive(hookData.isActive) .setCreatedAt(hookData.createdAt).setUpdatedAt(hookData.updatedAt).setTemplateId(hookData.templateId) .setTemplateName(hookData.templateName).setEvents(hookData.events).setConfig(hookData.config).setTemplates(templates) diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/HookTemplateData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/HookTemplateData.java index 5589c24f9eb..f5dc66c1d6b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/HookTemplateData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/data/HookTemplateData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/Hook.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/Hook.java index 01015939a95..fc2ca55840d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/Hook.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/Hook.java @@ -6,9 +6,9 @@ * 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 @@ -34,10 +34,12 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToMany; import jakarta.persistence.Table; + import java.util.HashSet; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -77,7 +79,7 @@ public final class Hook extends AbstractAuditableCustom { private Template ugdTemplate; public static Hook fromJson(final JsonCommand command, final HookTemplate template, final Set config, - final Set events, final Template ugdTemplate) { + final Set events, final Template ugdTemplate) { final String displayName = command.stringValueOfParameterNamed(displayNameParamName); Boolean isActive = command.booleanObjectValueOfParameterNamed(isActiveParamName); if (isActive == null) { @@ -87,7 +89,7 @@ public static Hook fromJson(final JsonCommand command, final HookTemplate templa } private Hook(final HookTemplate template, final String displayName, final Boolean isActive, final Set config, - final Set events, final Template ugdTemplate) { + final Set events, final Template ugdTemplate) { this.template = template; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookConfiguration.java index 013a5966194..a080479a8e6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookConfigurationRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookConfigurationRepository.java index c9a031d8873..8118bc67b5a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookConfigurationRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookConfigurationRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookRepository.java index c6ac200c745..3d468b70ca6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.hooks.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookResource.java index c9074112f1b..978e4587601 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookResource.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookTemplate.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookTemplate.java index ced92767943..f9bbaf4bae4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookTemplate.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookTemplate.java @@ -6,9 +6,9 @@ * 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 @@ -26,8 +26,10 @@ import jakarta.persistence.FetchType; import jakarta.persistence.OneToMany; import jakarta.persistence.Table; + import java.util.HashSet; import java.util.Set; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookTemplateRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookTemplateRepository.java index 125d5bebc91..fc09546794b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookTemplateRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/HookTemplateRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/Schema.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/Schema.java index c2c3ee98f65..778070d1565 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/Schema.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/domain/Schema.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/exception/HookNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/exception/HookNotFoundException.java index 7d01e12f3b2..1ae0c2fc62c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/exception/HookNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/exception/HookNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/exception/HookTemplateNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/exception/HookTemplateNotFoundException.java index 9d580c41e8f..2a358ac2c21 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/exception/HookTemplateNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/exception/HookTemplateNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/handler/CreateHookCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/handler/CreateHookCommandHandler.java index 79613ce6b68..a26aca8856c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/handler/CreateHookCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/handler/CreateHookCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/handler/DeleteHookCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/handler/DeleteHookCommandHandler.java index c0768e5f800..4f2d8cab85e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/handler/DeleteHookCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/handler/DeleteHookCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/handler/UpdateHookCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/handler/UpdateHookCommandHandler.java index 652c82c78be..50741c69144 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/handler/UpdateHookCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/handler/UpdateHookCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/listener/FineractHookListener.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/listener/FineractHookListener.java index 2cfda6434fa..0ed0b17a871 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/listener/FineractHookListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/listener/FineractHookListener.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.hooks.listener; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.domain.FineractContext; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/listener/HookListener.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/listener/HookListener.java index ef4bac25934..c1578291f1f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/listener/HookListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/listener/HookListener.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/ElasticSearchHookProcessor.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/ElasticSearchHookProcessor.java index 548340b345f..454fc92d875 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/ElasticSearchHookProcessor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/ElasticSearchHookProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -23,9 +23,11 @@ import com.google.gson.Gson; import com.google.gson.JsonObject; + import java.util.HashMap; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.FineractContext; import org.apache.fineract.infrastructure.hooks.domain.Hook; @@ -41,7 +43,7 @@ public class ElasticSearchHookProcessor implements HookProcessor { @Override public void process(final Hook hook, final String payload, final String entityName, final String actionName, - final FineractContext context) { + final FineractContext context) { final Set config = hook.getConfig(); @@ -64,13 +66,12 @@ public void process(final Hook hook, final String payload, final String entityNa @SuppressWarnings("unchecked") private void sendRequest(final String url, final String contentType, final String payload, final String entityName, - final String actionName, final FineractContext context) { + final String actionName, final FineractContext context) { final String fineractEndpointUrl = System.getProperty("baseUrl"); final WebHookService service = processorHelper.createWebHookService(url); - @SuppressWarnings("rawtypes") - final Callback callback = processorHelper.createCallback(url, payload); + @SuppressWarnings("rawtypes") final Callback callback = processorHelper.createCallback(url, payload); if (contentType.equalsIgnoreCase("json") || contentType.contains("json")) { final JsonObject json = new Gson().fromJson(payload, JsonObject.class); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/HookProcessor.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/HookProcessor.java index e885a5d9bfb..0d6b9c73709 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/HookProcessor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/HookProcessor.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/HookProcessorProvider.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/HookProcessorProvider.java index 891f07420f1..6be4db6454c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/HookProcessorProvider.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/HookProcessorProvider.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/MessageGatewayHookProcessor.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/MessageGatewayHookProcessor.java index 47cd66c9b80..3a60ebe50ad 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/MessageGatewayHookProcessor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/MessageGatewayHookProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -22,12 +22,14 @@ import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; + import java.io.IOException; import java.lang.reflect.Type; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.domain.FineractContext; @@ -58,7 +60,7 @@ public class MessageGatewayHookProcessor implements HookProcessor { @Override public void process(final Hook hook, final String payload, final String entityName, final String actionName, - final FineractContext context) throws IOException { + final FineractContext context) throws IOException { final Set config = hook.getConfig(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/ProcessorHelper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/ProcessorHelper.java index a716a634c7d..00bc950151b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/ProcessorHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/ProcessorHelper.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import javax.net.ssl.SSLContext; import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; + import okhttp3.OkHttpClient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -48,14 +49,16 @@ public final class ProcessorHelper { private static final X509TrustManager insecureX509TrustManager = new X509TrustManager() { @Override - public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {}// NOSONAR + public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException { + }// NOSONAR @Override - public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {}// NOSONAR + public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException { + }// NOSONAR @Override public X509Certificate[] getAcceptedIssuers() { - return new X509Certificate[] {}; + return new X509Certificate[]{}; } }; @@ -92,7 +95,7 @@ private void configureInsecureClient(final OkHttpClient.Builder okBuilder) { private SSLContext createInsecureSSLContext() throws NoSuchAlgorithmException, KeyManagementException { SSLContext insecureSSLContext = SSLContext.getInstance("TLS"); // TODO "TLS" or "SSL" as in // FineractClient.Builder? - insecureSSLContext.init(null, new TrustManager[] { insecureX509TrustManager }, new SecureRandom()); + insecureSSLContext.init(null, new TrustManager[]{insecureX509TrustManager}, new SecureRandom()); return insecureSSLContext; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/TwilioHookProcessor.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/TwilioHookProcessor.java index 36ccaa2ff36..72cccf28fbf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/TwilioHookProcessor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/TwilioHookProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -26,9 +26,11 @@ import com.google.gson.Gson; import com.google.gson.JsonObject; import com.google.gson.JsonParser; + import java.io.IOException; import java.util.HashMap; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.FineractContext; import org.apache.fineract.infrastructure.hooks.domain.Hook; @@ -52,7 +54,7 @@ public class TwilioHookProcessor implements HookProcessor { @Override public void process(final Hook hook, final String payload, final String entityName, final String actionName, - final FineractContext context) throws IOException { + final FineractContext context) throws IOException { final SmsProviderData smsProviderData = new SmsProviderData(hook.getConfig()); @@ -61,12 +63,11 @@ public void process(final Hook hook, final String payload, final String entityNa @SuppressWarnings("unchecked") private void sendRequest(final SmsProviderData smsProviderData, final String payload, String entityName, String actionName, - final Hook hook, final FineractContext context) throws IOException { + final Hook hook, final FineractContext context) throws IOException { final WebHookService service = processorHelper.createWebHookService(smsProviderData.getUrl()); - @SuppressWarnings("rawtypes") - final Callback callback = processorHelper.createCallback(smsProviderData.getUrl()); + @SuppressWarnings("rawtypes") final Callback callback = processorHelper.createCallback(smsProviderData.getUrl()); String apiKey = this.hookConfigurationRepository.findOneByHookIdAndFieldName(hook.getId(), apiKeyName); if (apiKey == null) { @@ -98,8 +99,7 @@ private void sendRequest(final SmsProviderData smsProviderData, final String pay private JsonObject processUgdTemplate(final String payload, final Hook hook) throws IOException { JsonObject json = null; - @SuppressWarnings("unchecked") - final HashMap map = new ObjectMapper().readValue(payload, HashMap.class); + @SuppressWarnings("unchecked") final HashMap map = new ObjectMapper().readValue(payload, HashMap.class); map.put("BASE_URI", System.getProperty("baseUrl")); if (map.containsKey("clientId")) { final Long clientId = Long.valueOf(Integer.toString((int) map.get("clientId"))); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/WebHookProcessor.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/WebHookProcessor.java index 1c3808216e5..4081119dadf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/WebHookProcessor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/WebHookProcessor.java @@ -6,9 +6,9 @@ * 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 @@ -24,9 +24,11 @@ import com.google.gson.Gson; import com.google.gson.JsonObject; import com.google.gson.JsonParser; + import java.util.HashMap; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.FineractContext; import org.apache.fineract.infrastructure.hooks.domain.Hook; @@ -42,7 +44,7 @@ public class WebHookProcessor implements HookProcessor { @Override public void process(final Hook hook, final String payload, final String entityName, final String actionName, - final FineractContext context) { + final FineractContext context) { final Set config = hook.getConfig(); @@ -64,13 +66,12 @@ public void process(final Hook hook, final String payload, final String entityNa @SuppressWarnings("unchecked") private void sendRequest(final String url, final String contentType, final String payload, final String entityName, - final String actionName, final FineractContext context) { + final String actionName, final FineractContext context) { final String fineractEndpointUrl = System.getProperty("baseUrl"); final WebHookService service = processorHelper.createWebHookService(url); - @SuppressWarnings("rawtypes") - final Callback callback = processorHelper.createCallback(url); + @SuppressWarnings("rawtypes") final Callback callback = processorHelper.createCallback(url); if (contentType.equalsIgnoreCase("json") || contentType.contains("json")) { final JsonObject json = JsonParser.parseString(payload).getAsJsonObject(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/WebHookService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/WebHookService.java index 9419a476591..408f6ac1da3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/WebHookService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/WebHookService.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.infrastructure.hooks.processor; import com.google.gson.JsonObject; + import java.util.Map; + import org.apache.fineract.infrastructure.hooks.processor.data.SmsProviderData; import retrofit2.Call; import retrofit2.http.Body; @@ -44,18 +46,18 @@ public interface WebHookService { // Template - Web @POST(".") Call sendJsonRequest(@Header(ENTITY_HEADER) String entityHeader, @Header(ACTION_HEADER) String actionHeader, - @Header(TENANT_HEADER) String tenantHeader, @Header(ENDPOINT_HEADER) String endpointHeader, @Body JsonObject result); + @Header(TENANT_HEADER) String tenantHeader, @Header(ENDPOINT_HEADER) String endpointHeader, @Body JsonObject result); @FormUrlEncoded @POST(".") Call sendFormRequest(@Header(ENTITY_HEADER) String entityHeader, @Header(ACTION_HEADER) String actionHeader, - @Header(TENANT_HEADER) String tenantHeader, @Header(ENDPOINT_HEADER) String endpointHeader, - @FieldMap Map params); + @Header(TENANT_HEADER) String tenantHeader, @Header(ENDPOINT_HEADER) String endpointHeader, + @FieldMap Map params); // Template - SMS Bridge @POST(".") Call sendSmsBridgeRequest(@Header(ENTITY_HEADER) String entityHeader, @Header(ACTION_HEADER) String actionHeader, - @Header(TENANT_HEADER) String tenantHeader, @Header(API_KEY_HEADER) String apiKeyHeader, @Body JsonObject result); + @Header(TENANT_HEADER) String tenantHeader, @Header(API_KEY_HEADER) String apiKeyHeader, @Body JsonObject result); @POST("/configuration") Call sendSmsBridgeConfigRequest(@Body SmsProviderData config); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/data/SmsProviderData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/data/SmsProviderData.java index 21b31d28ba1..5a247164c3b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/data/SmsProviderData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/processor/data/SmsProviderData.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import static org.apache.fineract.infrastructure.hooks.api.HookApiConstants.smsProviderTokenIdName; import java.util.Set; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.infrastructure.hooks.domain.HookConfiguration; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/serialization/HookCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/serialization/HookCommandFromApiJsonDeserializer.java index 758a242cad3..9446ef937eb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/serialization/HookCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/serialization/HookCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -27,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -53,7 +55,8 @@ public void validateForCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, this.supportedParameters); final List dataValidationErrors = new ArrayList<>(); @@ -77,7 +80,8 @@ public void validateForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, this.supportedParameters); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookReadPlatformService.java index 33c80dbef41..9341088007d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.List; + import org.apache.fineract.infrastructure.hooks.data.HookData; import org.apache.fineract.infrastructure.hooks.domain.Hook; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookReadPlatformServiceImpl.java index 43b44babe7f..0d40d7b0ded 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.LocalDate; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.infrastructure.hooks.data.Event; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookWritePlatformService.java index 56d8f409641..4a16245d0bd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookWritePlatformServiceJpaRepositoryImpl.java index fa28a0f6693..71bb3d7000f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/hooks/service/HookWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -31,12 +31,14 @@ import com.google.gson.JsonArray; import com.google.gson.JsonObject; import jakarta.persistence.PersistenceException; + import java.io.IOException; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/instancemode/api/InstanceModeApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/instancemode/api/InstanceModeApiResource.java index 764beec934b..c6e8dbbe9fe 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/instancemode/api/InstanceModeApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/instancemode/api/InstanceModeApiResource.java @@ -6,9 +6,9 @@ * 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 @@ -61,7 +61,7 @@ public void afterPropertiesSet() throws Exception { } @PUT - @Consumes({ MediaType.APPLICATION_JSON }) + @Consumes({MediaType.APPLICATION_JSON}) @Operation(summary = "Changes the Fineract instance mode", description = "") @RequestBody(required = true, content = @Content(schema = @Schema(implementation = InstanceModeApiResourceSwagger.ChangeInstanceModeRequest.class))) @ApiResponse(responseCode = "200", description = "OK") diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/instancemode/api/InstanceModeApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/instancemode/api/InstanceModeApiResourceSwagger.java index cdfc1ee0d95..d048fc31afe 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/instancemode/api/InstanceModeApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/instancemode/api/InstanceModeApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/ScheduledJobRunnerConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/ScheduledJobRunnerConfig.java index 2276cfad2d1..89a7fd90e92 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/ScheduledJobRunnerConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/ScheduledJobRunnerConfig.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.jobs; import java.util.List; + import org.apache.fineract.infrastructure.core.persistence.ExtendedJpaTransactionManager; import org.apache.fineract.infrastructure.core.persistence.TransactionLifecycleCallback; import org.apache.fineract.infrastructure.core.service.database.RoutingDataSource; @@ -43,7 +44,7 @@ public class ScheduledJobRunnerConfig { @Bean public PlatformTransactionManager transactionManager(ObjectProvider transactionManagerCustomizers, - List callbacks) { + List callbacks) { ExtendedJpaTransactionManager transactionManager = new ExtendedJpaTransactionManager(); transactionManager.setLifecycleCallbacks(callbacks); transactionManager.setValidateExistingTransaction(true); @@ -65,7 +66,7 @@ public DataFieldMaxValueIncrementerFactory incrementerFactory(RoutingDataSource @Bean public JobRepository jobRepository(RoutingDataSource routingDataSource, PlatformTransactionManager transactionManager, - Jackson2ExecutionContextStringSerializer executionContextSerializer, DataFieldMaxValueIncrementerFactory incrementerFactory) + Jackson2ExecutionContextStringSerializer executionContextSerializer, DataFieldMaxValueIncrementerFactory incrementerFactory) throws Exception { JobRepositoryFactoryBean factory = new JobRepositoryFactoryBean(); factory.setDataSource(routingDataSource); @@ -79,7 +80,7 @@ public JobRepository jobRepository(RoutingDataSource routingDataSource, Platform @Bean public JobExplorer jobExplorer(RoutingDataSource routingDataSource, PlatformTransactionManager transactionManager, - Jackson2ExecutionContextStringSerializer executionContextSerializer) throws Exception { + Jackson2ExecutionContextStringSerializer executionContextSerializer) throws Exception { JobExplorerFactoryBean jobExplorerFactoryBean = new JobExplorerFactoryBean(); jobExplorerFactoryBean.setDataSource(routingDataSource); jobExplorerFactoryBean.setTransactionManager(transactionManager); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/InlineJobApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/InlineJobApiResource.java index 3d8eb335bee..e7578e23d62 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/InlineJobApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/InlineJobApiResource.java @@ -6,9 +6,9 @@ * 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 @@ -51,14 +51,14 @@ public class InlineJobApiResource { @POST @Path("{jobName}/inline") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) @Operation(summary = "Starts an inline Job", description = "Starts an inline Job") @RequestBody(content = @Content(schema = @Schema(implementation = InlineJobResourceSwagger.InlineJobRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InlineJobResourceSwagger.InlineJobResponse.class))) @ApiResponse(responseCode = "400", description = "Request body item size validation error") public String executeInlineJob(@PathParam("jobName") @Parameter(description = "jobName") final String jobName, - @Parameter(hidden = true) final String jsonRequestBody) { + @Parameter(hidden = true) final String jsonRequestBody) { final CommandWrapper commandRequest = new CommandWrapperBuilder().executeInlineJob(jobName).withJson(jsonRequestBody).build(); CommandProcessingResult result = commandWritePlatformService.logCommandSource(commandRequest); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/InlineJobResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/InlineJobResourceSwagger.java index 5eccec61e32..49f7074b7d8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/InlineJobResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/InlineJobResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,16 +19,19 @@ package org.apache.fineract.infrastructure.jobs.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.List; final class InlineJobResourceSwagger { - private InlineJobResourceSwagger() {} + private InlineJobResourceSwagger() { + } @Schema(description = "InlineJobRequest") public static final class InlineJobRequest { - private InlineJobRequest() {} + private InlineJobRequest() { + } public List loanIds; } @@ -36,7 +39,8 @@ private InlineJobRequest() {} @Schema(description = "InlineJobResponse") public static final class InlineJobResponse { - private InlineJobResponse() {} + private InlineJobResponse() { + } public List loanIds; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerApiResourceSwagger.java index 1d9960fac65..0032267e2a4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiConstants.java index cf4487aaa0f..e58d24a9bf9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiResourceSwagger.java index a981a410909..c5a96019ee6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/api/SchedulerJobApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.jobs.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.Date; import java.util.List; + import org.apache.fineract.infrastructure.jobs.data.JobDetailHistoryData; import org.apache.fineract.infrastructure.jobs.data.JobParameterDTO; @@ -84,7 +86,8 @@ private GetJobsJobIDJobRunHistoryResponse() { static final class JobDetailHistoryDataSwagger { - private JobDetailHistoryDataSwagger() {} + private JobDetailHistoryDataSwagger() { + } @Schema(example = "1") public Long version; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/config/FineractDataFieldMaxValueIncrementerFactory.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/config/FineractDataFieldMaxValueIncrementerFactory.java index 8efe5476a37..110d05b760c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/config/FineractDataFieldMaxValueIncrementerFactory.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/config/FineractDataFieldMaxValueIncrementerFactory.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.List; import javax.sql.DataSource; + import lombok.RequiredArgsConstructor; import org.springframework.batch.item.database.support.DataFieldMaxValueIncrementerFactory; import org.springframework.batch.support.DatabaseType; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/config/JobNameProviderConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/config/JobNameProviderConfig.java index a43bc54c38a..d7d56a3d9d7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/config/JobNameProviderConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/config/JobNameProviderConfig.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.List; + import org.apache.fineract.infrastructure.jobs.service.JobName; import org.apache.fineract.infrastructure.jobs.service.jobname.JobNameData; import org.apache.fineract.infrastructure.jobs.service.jobname.JobNameProvider; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobDetailDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobDetailDataValidator.java index 90682c06973..a84dabd8b51 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobDetailDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/data/JobDetailDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -27,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -56,7 +58,8 @@ public void validateForUpdate(final String json) { } boolean atLeastOneParameterPassedForUpdate = false; - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, JOB_UPDATE_REQUEST_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/data/SchedulerDetailData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/data/SchedulerDetailData.java index 2c641c79b8a..c56fd6ff6c0 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/data/SchedulerDetailData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/data/SchedulerDetailData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/data/partitionedjobs/PartitionedJob.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/data/partitionedjobs/PartitionedJob.java index 4e476b0bca7..5bf0c71810c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/data/partitionedjobs/PartitionedJob.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/data/partitionedjobs/PartitionedJob.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/JobExecutionRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/JobExecutionRepository.java index 6acd195b6d0..f5d56059057 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/JobExecutionRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/JobExecutionRepository.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import java.time.LocalDate; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.config.FineractProperties; import org.apache.fineract.infrastructure.core.service.database.DatabaseTypeResolver; @@ -155,36 +156,36 @@ public void updateJobStatusToFailed(Long stuckJobId, String partitionerStepName) } public LocalDate getBusinessDateOfRunningJobByExecutionParameter(String jobName, String jobCustomParamKeyName, String parameterKeyName, - String parameterValue, String dateParameterName) { + String parameterValue, String dateParameterName) { try { if (databaseTypeResolver.isPostgreSQL()) { return namedParameterJdbcTemplate.queryForObject(""" - SELECT - J2->>'parameterValue' - FROM - BATCH_JOB_INSTANCE BJI - INNER JOIN BATCH_JOB_EXECUTION BJE ON BJI.JOB_INSTANCE_ID = BJE.JOB_INSTANCE_ID - INNER JOIN BATCH_JOB_EXECUTION_PARAMS BJEP ON BJE.JOB_EXECUTION_ID = BJEP.JOB_EXECUTION_ID - inner join batch_custom_job_parameters CJP ON cast(BJEP.parameter_value as bigint) = CJP.id - AND BJEP.parameter_name = :jobCustomParamKeyName - CROSS JOIN LATERAL json_array_elements(CJP.parameter_json) J - CROSS JOIN LATERAL json_array_elements(CJP.parameter_json) J2 - WHERE - J ->> 'parameterName' = :filterParameterName - AND J ->> 'parameterValue' = :filterParameterValue - AND J2 ->> 'parameterName' = :dateParameterName - AND BJE.STATUS IN (:statuses) - AND BJI.JOB_NAME = :jobName - AND BJE.JOB_INSTANCE_ID NOT IN ( - SELECT - IBJE.JOB_INSTANCE_ID - FROM - BATCH_JOB_INSTANCE IBJI - INNER JOIN BATCH_JOB_EXECUTION IBJE ON IBJI.JOB_INSTANCE_ID = IBJE.JOB_INSTANCE_ID - WHERE - IBJE.STATUS = :completedStatus - AND IBJI.JOB_NAME = :jobName) - """, + SELECT + J2->>'parameterValue' + FROM + BATCH_JOB_INSTANCE BJI + INNER JOIN BATCH_JOB_EXECUTION BJE ON BJI.JOB_INSTANCE_ID = BJE.JOB_INSTANCE_ID + INNER JOIN BATCH_JOB_EXECUTION_PARAMS BJEP ON BJE.JOB_EXECUTION_ID = BJEP.JOB_EXECUTION_ID + inner join batch_custom_job_parameters CJP ON cast(BJEP.parameter_value as bigint) = CJP.id + AND BJEP.parameter_name = :jobCustomParamKeyName + CROSS JOIN LATERAL json_array_elements(CJP.parameter_json) J + CROSS JOIN LATERAL json_array_elements(CJP.parameter_json) J2 + WHERE + J ->> 'parameterName' = :filterParameterName + AND J ->> 'parameterValue' = :filterParameterValue + AND J2 ->> 'parameterName' = :dateParameterName + AND BJE.STATUS IN (:statuses) + AND BJI.JOB_NAME = :jobName + AND BJE.JOB_INSTANCE_ID NOT IN ( + SELECT + IBJE.JOB_INSTANCE_ID + FROM + BATCH_JOB_INSTANCE IBJI + INNER JOIN BATCH_JOB_EXECUTION IBJE ON IBJI.JOB_INSTANCE_ID = IBJE.JOB_INSTANCE_ID + WHERE + IBJE.STATUS = :completedStatus + AND IBJI.JOB_NAME = :jobName) + """, Map.of("jobCustomParamKeyName", jobCustomParamKeyName, "filterParameterName", parameterKeyName, "filterParameterValue", parameterValue, "statuses", List.of(STARTED.name(), STARTING.name()), "completedStatus", COMPLETED.name(), "jobName", jobName, "dateParameterName", dateParameterName), diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/JobParameter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/JobParameter.java index ebd806a3373..b3dd2eb4440 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/JobParameter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/JobParameter.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Table; + import java.util.Objects; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/JobParameterRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/JobParameterRepository.java index dc61e2c2a77..bb579fc03f7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/JobParameterRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/JobParameterRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.jobs.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/RunningJobWithCustomParameters.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/RunningJobWithCustomParameters.java index 3ab15c4d23a..0511ab230d1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/RunningJobWithCustomParameters.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/RunningJobWithCustomParameters.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/ScheduledJobDetail.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/ScheduledJobDetail.java index a5b2d8d5a03..36ce74262f1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/ScheduledJobDetail.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/ScheduledJobDetail.java @@ -6,9 +6,9 @@ * 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 @@ -24,9 +24,11 @@ import jakarta.persistence.Temporal; import jakarta.persistence.TemporalType; import jakarta.persistence.UniqueConstraint; + import java.util.Date; import java.util.LinkedHashMap; import java.util.Map; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -37,7 +39,7 @@ import org.apache.fineract.infrastructure.jobs.api.SchedulerJobApiConstants; @Entity -@Table(name = "job", uniqueConstraints = { @UniqueConstraint(columnNames = { "short_name" }, name = "job_short_name_key") }) +@Table(name = "job", uniqueConstraints = {@UniqueConstraint(columnNames = {"short_name"}, name = "job_short_name_key")}) @Getter @Setter @NoArgsConstructor diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/ScheduledJobDetailRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/ScheduledJobDetailRepository.java index be3d4cc4b7d..16eee78da4b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/ScheduledJobDetailRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/ScheduledJobDetailRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.jobs.domain; import jakarta.persistence.LockModeType; + import java.util.List; import java.util.Optional; + import org.apache.fineract.infrastructure.jobs.data.JobDetailData; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/ScheduledJobRunHistory.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/ScheduledJobRunHistory.java index bad0867f89b..f7089793cb1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/ScheduledJobRunHistory.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/ScheduledJobRunHistory.java @@ -6,9 +6,9 @@ * 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 @@ -25,7 +25,9 @@ import jakarta.persistence.Table; import jakarta.persistence.Temporal; import jakarta.persistence.TemporalType; + import java.util.Date; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -68,7 +70,7 @@ public class ScheduledJobRunHistory extends AbstractPersistableCustom { private String errorLog; public ScheduledJobRunHistory(final ScheduledJobDetail scheduledJobDetail, final Long version, final Date startTime, final Date endTime, - final String status, final String errorMessage, final String triggerType, final String errorLog) { + final String status, final String errorMessage, final String triggerType, final String errorLog) { this.scheduledJobDetail = scheduledJobDetail; this.version = version; this.startTime = startTime; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/ScheduledJobRunHistoryRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/ScheduledJobRunHistoryRepository.java index 8fbeee043bf..b7a7daad44e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/ScheduledJobRunHistoryRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/ScheduledJobRunHistoryRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/SchedulerDetail.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/SchedulerDetail.java index fcd3f41ca5b..e9a9b26328f 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/SchedulerDetail.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/SchedulerDetail.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/SchedulerDetailRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/SchedulerDetailRepository.java index a9ae63fefef..128f2372680 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/SchedulerDetailRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/domain/SchedulerDetailRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/exception/JobInProcessExecution.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/exception/JobInProcessExecution.java index 367cca2097d..d6b24928f7a 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/exception/JobInProcessExecution.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/exception/JobInProcessExecution.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/exception/JobNodeIdMismatchingException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/exception/JobNodeIdMismatchingException.java index 1bb5c6dc782..32a317b3dfb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/exception/JobNodeIdMismatchingException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/exception/JobNodeIdMismatchingException.java @@ -6,9 +6,9 @@ * 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 @@ -25,7 +25,7 @@ public class JobNodeIdMismatchingException extends AbstractPlatformDomainRuleExc public JobNodeIdMismatchingException(final String nodeId, final String nodeIdProvided) { super("error.msg.job.cannot.execute.on.node." + nodeIdProvided, - "The node id provided `" + nodeIdProvided + "`" + "` does not match with the configured nodeId.", new Object[] { nodeId }); + "The node id provided `" + nodeIdProvided + "`" + "` does not match with the configured nodeId.", new Object[]{nodeId}); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/exception/JobNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/exception/JobNotFoundException.java index 95c9b493e99..4b3e3bf5ed2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/exception/JobNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/exception/JobNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/exception/OperationNotAllowedException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/exception/OperationNotAllowedException.java index 1e35a08ec6c..299ba2b0608 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/exception/OperationNotAllowedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/exception/OperationNotAllowedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/COBApiFilter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/COBApiFilter.java index 567aab8f883..3f8c0dea7d6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/COBApiFilter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/COBApiFilter.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,10 @@ import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; + import java.io.IOException; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.ApiGlobalErrorResponse; import org.apache.fineract.infrastructure.core.http.BodyCachingHttpServletRequestWrapper; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/COBFilterApiMatcher.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/COBFilterApiMatcher.java index d837252626d..845f25e64c4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/COBFilterApiMatcher.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/COBFilterApiMatcher.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,10 @@ import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; + import java.io.IOException; import java.util.List; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.batch.domain.BatchRequest; import org.apache.fineract.infrastructure.core.http.BodyCachingHttpServletRequestWrapper; @@ -62,7 +64,8 @@ protected boolean isBatchApi(String pathInfo) { } protected List getBatchRequests(BodyCachingHttpServletRequestWrapper request) throws IOException { - List batchRequests = objectMapper.readValue(request.getInputStream(), new TypeReference<>() {}); + List batchRequests = objectMapper.readValue(request.getInputStream(), new TypeReference<>() { + }); // since we read body, we have to reset so the upcoming readings are successful request.resetStream(); for (BatchRequest batchRequest : batchRequests) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/COBFilterHelper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/COBFilterHelper.java index 1df77663fed..87d08ab4659 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/COBFilterHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/COBFilterHelper.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.IOException; import java.util.List; + import org.apache.fineract.infrastructure.core.http.BodyCachingHttpServletRequestWrapper; public interface COBFilterHelper { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/LoanCOBApiFilter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/LoanCOBApiFilter.java index 82a3240bb5d..abdc0878899 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/LoanCOBApiFilter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/LoanCOBApiFilter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/LoanCOBFilterHelper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/LoanCOBFilterHelper.java index 4d0b7248755..bb4c6026644 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/LoanCOBFilterHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/LoanCOBFilterHelper.java @@ -6,9 +6,9 @@ * 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 @@ -18,4 +18,5 @@ */ package org.apache.fineract.infrastructure.jobs.filter; -public interface LoanCOBFilterHelper extends COBFilterHelper {} +public interface LoanCOBFilterHelper extends COBFilterHelper { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/LoanCOBFilterHelperImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/LoanCOBFilterHelperImpl.java index c6dfc2998c1..4711c3d9df2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/LoanCOBFilterHelperImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/LoanCOBFilterHelperImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import com.fasterxml.jackson.core.json.JsonReadFeature; import com.fasterxml.jackson.databind.JsonNode; import com.google.common.collect.Lists; + import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; @@ -31,6 +32,7 @@ import java.util.List; import java.util.function.Predicate; import java.util.regex.Pattern; + import lombok.RequiredArgsConstructor; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/ProgressiveLoanModelCheckerFilter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/ProgressiveLoanModelCheckerFilter.java index a47a7ae4c5f..195766d26de 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/ProgressiveLoanModelCheckerFilter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/ProgressiveLoanModelCheckerFilter.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,10 @@ import jakarta.servlet.ServletException; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; + import java.io.IOException; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.http.BodyCachingHttpServletRequestWrapper; import org.apache.fineract.portfolio.loanaccount.domain.LoanRepository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/ProgressiveLoanModelCheckerHelper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/ProgressiveLoanModelCheckerHelper.java index 221cb7080a5..a1eb1601b51 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/ProgressiveLoanModelCheckerHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/ProgressiveLoanModelCheckerHelper.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.fasterxml.jackson.core.json.JsonReadFeature; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; + import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; @@ -29,6 +30,7 @@ import java.util.List; import java.util.function.Predicate; import java.util.regex.Pattern; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.NotImplementedException; import org.apache.commons.lang3.StringUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/WorkingCapitalLoanCOBApiFilter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/WorkingCapitalLoanCOBApiFilter.java index d30c970ee10..b6539ea929f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/WorkingCapitalLoanCOBApiFilter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/WorkingCapitalLoanCOBApiFilter.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/WorkingCapitalLoanCOBFilterHelper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/WorkingCapitalLoanCOBFilterHelper.java index f03f8aebdf9..bac230dba26 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/WorkingCapitalLoanCOBFilterHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/WorkingCapitalLoanCOBFilterHelper.java @@ -6,9 +6,9 @@ * 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 @@ -19,4 +19,5 @@ package org.apache.fineract.infrastructure.jobs.filter; -public interface WorkingCapitalLoanCOBFilterHelper extends COBFilterHelper {} +public interface WorkingCapitalLoanCOBFilterHelper extends COBFilterHelper { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/WorkingCapitalLoanCOBFilterHelperImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/WorkingCapitalLoanCOBFilterHelperImpl.java index b391d1997ab..2513a07ffcb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/WorkingCapitalLoanCOBFilterHelperImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/filter/WorkingCapitalLoanCOBFilterHelperImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.Lists; + import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; @@ -31,6 +32,7 @@ import java.util.List; import java.util.function.Predicate; import java.util.regex.Pattern; + import lombok.RequiredArgsConstructor; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/handler/ExecuteJobCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/handler/ExecuteJobCommandHandler.java index 83afa584db2..e369221058d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/handler/ExecuteJobCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/handler/ExecuteJobCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/handler/UpdateJobDetailCommandhandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/handler/UpdateJobDetailCommandhandler.java index 9cc9af8c95f..6a29c250daa 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/handler/UpdateJobDetailCommandhandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/handler/UpdateJobDetailCommandhandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/InlineExecutorService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/InlineExecutorService.java index ced0ae577f2..ba219e925fc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/InlineExecutorService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/InlineExecutorService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collections; import java.util.List; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/InlineJobExecuteHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/InlineJobExecuteHandler.java index c6f9e6647b6..ee340a5b76d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/InlineJobExecuteHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/InlineJobExecuteHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/InlineJobType.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/InlineJobType.java index 3b1ed4217f3..e9178f68ae2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/InlineJobType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/InlineJobType.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.Optional; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.cob.service.InlineLoanCOBExecutorServiceImpl; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobParameterDataParser.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobParameterDataParser.java index a26426242fc..796d7d432a3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobParameterDataParser.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobParameterDataParser.java @@ -6,9 +6,9 @@ * 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 @@ -22,10 +22,12 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; + import java.util.Collections; import java.util.HashSet; import java.util.Objects; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterService.java index 71810c7146b..c653f09a865 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java index a832c7311be..eb8d8c24f2d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobRegisterServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.common.base.Splitter; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.text.ParseException; import java.util.Collections; import java.util.HashMap; @@ -27,6 +28,7 @@ import java.util.Properties; import java.util.Set; import java.util.TimeZone; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.config.FineractProperties; import org.apache.fineract.infrastructure.core.domain.FineractPlatformTenant; @@ -320,7 +322,7 @@ private Scheduler createScheduler(final String name, final int noOfThreads, JobL final SchedulerFactoryBean schedulerFactoryBean = new SchedulerFactoryBean(); schedulerFactoryBean.setSchedulerName(name); schedulerFactoryBean.setGlobalJobListeners(jobListeners); - final TriggerListener[] globalTriggerListeners = { globalSchedulerTriggerListener }; + final TriggerListener[] globalTriggerListeners = {globalSchedulerTriggerListener}; schedulerFactoryBean.setGlobalTriggerListeners(globalTriggerListeners); final Properties quartzProperties = new Properties(); quartzProperties.put(SchedulerFactoryBean.PROP_THREAD_COUNT, Integer.toString(noOfThreads)); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobSchedulerServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobSchedulerServiceImpl.java index adb90ec41dd..d609a841259 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobSchedulerServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobSchedulerServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.infrastructure.jobs.service; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.time.LocalDate; import java.util.HashMap; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.businessdate.domain.BusinessDateType; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobStarter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobStarter.java index df917536588..14ce19fe4f5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobStarter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobStarter.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.businessdate.domain.BusinessDateType; @@ -76,7 +77,7 @@ public class JobStarter { BatchStatus.STOPPING, BatchStatus.UNKNOWN); public JobExecution run(Job job, ScheduledJobDetail scheduledJobDetail, Set jobParameterDTOSet, - String tenantIdentifier) throws JobInstanceAlreadyCompleteException, JobExecutionAlreadyRunningException, + String tenantIdentifier) throws JobInstanceAlreadyCompleteException, JobExecutionAlreadyRunningException, JobParametersInvalidException, JobRestartException, JobExecutionException { boolean contextInitialized = false; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedularWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedularWritePlatformService.java index 388b778188d..3297d214ec9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedularWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedularWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.jobs.service; import java.util.List; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.infrastructure.jobs.domain.ScheduledJobDetail; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedularWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedularWritePlatformServiceJpaRepositoryImpl.java index 5ffc473a5b0..e17bbc02659 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedularWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedularWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.infrastructure.jobs.service; import io.github.resilience4j.retry.annotation.Retry; + import java.util.Date; import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.infrastructure.core.data.CommandProcessingResultBuilder; @@ -50,8 +52,8 @@ public class SchedularWritePlatformServiceJpaRepositoryImpl implements Schedular @Autowired public SchedularWritePlatformServiceJpaRepositoryImpl(final ScheduledJobDetailRepository scheduledJobDetailsRepository, - final ScheduledJobRunHistoryRepository scheduledJobRunHistoryRepository, final JobDetailDataValidator dataValidator, - final SchedulerDetailRepository schedulerDetailRepository) { + final ScheduledJobRunHistoryRepository scheduledJobRunHistoryRepository, final JobDetailDataValidator dataValidator, + final SchedulerDetailRepository schedulerDetailRepository) { this.scheduledJobDetailsRepository = scheduledJobDetailsRepository; this.scheduledJobRunHistoryRepository = scheduledJobRunHistoryRepository; this.schedulerDetailRepository = schedulerDetailRepository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobListener.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobListener.java index a87fc122fb7..b5762377710 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobListener.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.jobs.service; import java.util.Date; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.FineractPlatformTenant; import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil; @@ -50,10 +51,12 @@ public String getName() { } @Override - public void jobToBeExecuted(@SuppressWarnings("unused") final JobExecutionContext context) {} + public void jobToBeExecuted(@SuppressWarnings("unused") final JobExecutionContext context) { + } @Override - public void jobExecutionVetoed(@SuppressWarnings("unused") final JobExecutionContext context) {} + public void jobExecutionVetoed(@SuppressWarnings("unused") final JobExecutionContext context) { + } @Override public void jobWasExecuted(final JobExecutionContext context, final JobExecutionException jobException) { @@ -120,8 +123,8 @@ public void jobWasExecuted(final JobExecutionContext context, final JobExecution private Throwable getCauseFromException(final Throwable exception) { if (this.stackTraceLevel <= SchedulerServiceConstants.STACK_TRACE_LEVEL && exception.getCause() != null && (exception.getCause().toString().contains(SchedulerServiceConstants.SCHEDULER_EXCEPTION) - || exception.getCause().toString().contains(SchedulerServiceConstants.JOB_EXECUTION_EXCEPTION) - || exception.getCause().toString().contains(SchedulerServiceConstants.JOB_METHOD_INVOCATION_FAILED_EXCEPTION))) { + || exception.getCause().toString().contains(SchedulerServiceConstants.JOB_EXECUTION_EXCEPTION) + || exception.getCause().toString().contains(SchedulerServiceConstants.JOB_METHOD_INVOCATION_FAILED_EXCEPTION))) { this.stackTraceLevel++; return getCauseFromException(exception.getCause()); } else if (exception.getCause() != null) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobRunnerReadServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobRunnerReadServiceImpl.java index 40a5c283957..374ccbde6fa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobRunnerReadServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerJobRunnerReadServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.sql.SQLException; import java.util.Date; import java.util.List; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.api.IdTypeResolver; import org.apache.fineract.infrastructure.core.service.Page; @@ -55,8 +56,8 @@ public class SchedulerJobRunnerReadServiceImpl implements SchedulerJobRunnerRead @Autowired public SchedulerJobRunnerReadServiceImpl(final JdbcTemplate jdbcTemplate, final ColumnValidator columnValidator, - DatabaseSpecificSQLGenerator sqlGenerator, ScheduledJobDetailRepository jobDetailRepository, - PaginationHelper paginationHelper) { + DatabaseSpecificSQLGenerator sqlGenerator, ScheduledJobDetailRepository jobDetailRepository, + PaginationHelper paginationHelper) { this.jdbcTemplate = jdbcTemplate; this.columnValidator = columnValidator; this.sqlGenerator = sqlGenerator; @@ -85,7 +86,7 @@ public JobDetailData retrieveOne(@NonNull IdTypeResolver.IdType idType, String i @Override public Page retrieveJobHistory(@NonNull IdTypeResolver.IdType idType, String identifier, - SearchParameters searchParameters) { + SearchParameters searchParameters) { if (!isJobExist(idType, identifier)) { throw new JobNotFoundException(idType, identifier); } @@ -123,7 +124,7 @@ public Page retrieveJobHistory(@NonNull IdTypeResolver.IdT } } - return this.paginationHelper.fetchPage(this.jdbcTemplate, sqlBuilder.toString(), new Object[] { idParam }, jobHistoryMapper); + return this.paginationHelper.fetchPage(this.jdbcTemplate, sqlBuilder.toString(), new Object[]{idParam}, jobHistoryMapper); } @Override @@ -132,7 +133,7 @@ public Long retrieveId(@NonNull IdTypeResolver.IdType idType, String identifier) return switch (idType) { case ID -> Long.valueOf(identifier); case SHORT_NAME -> - jobDetailRepository.findIdByShortName(identifier).orElseThrow(() -> new JobNotFoundException(idType, identifier)); + jobDetailRepository.findIdByShortName(identifier).orElseThrow(() -> new JobNotFoundException(idType, identifier)); default -> throw new JobNotFoundException(idType, identifier); }; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerServiceConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerServiceConstants.java index 9588af2db4e..784b1ba38bd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerServiceConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerServiceConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerStopListener.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerStopListener.java index c4488e99564..65aad4164c9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerStopListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerStopListener.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerTriggerListener.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerTriggerListener.java index c889bbd9490..992fff90f52 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerTriggerListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerTriggerListener.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerVetoer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerVetoer.java index 2481d9f4bed..7e8050777b6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerVetoer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/SchedulerVetoer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.HashMap; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.businessdate.domain.BusinessDateType; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/StuckJobExecutorService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/StuckJobExecutorService.java index 8fe2c33466b..efc955e3987 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/StuckJobExecutorService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/StuckJobExecutorService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/StuckJobExecutorServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/StuckJobExecutorServiceImpl.java index 5f46c88f763..826d5ec567b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/StuckJobExecutorServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/StuckJobExecutorServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static org.springframework.transaction.TransactionDefinition.PROPAGATION_REQUIRES_NEW; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.jobs.data.partitionedjobs.PartitionedJob; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/StuckJobListener.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/StuckJobListener.java index c705a5582c3..a811a139356 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/StuckJobListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/StuckJobListener.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.HashMap; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.businessdate.domain.BusinessDateType; import org.apache.fineract.infrastructure.businessdate.service.BusinessDateReadPlatformService; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobConfiguration.java index b664c9fb6c7..6a12acbf890 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobConstant.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobConstant.java index 71c1fcfa5f9..4ce32cad0de 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobConstant.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobConstant.java @@ -6,9 +6,9 @@ * 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 @@ -30,5 +30,6 @@ public final class JournalEntryAggregationJobConstant { public static final String AGGREGATED_ON_DATE_TO = "aggregatedOnDateTo"; public static final String LAST_AGGREGATED_ON_DATE = "lastAggregatedOnDate"; - private JournalEntryAggregationJobConstant() {} + private JournalEntryAggregationJobConstant() { + } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobExecutionDecider.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobExecutionDecider.java index e0615bbd28a..bc27200fcf6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobExecutionDecider.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobExecutionDecider.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.Objects; + import lombok.extern.slf4j.Slf4j; import org.springframework.batch.core.ExitStatus; import org.springframework.batch.core.JobExecution; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobReader.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobReader.java index 3b6d18e976e..16555251be8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobReader.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobReader.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.domain.FineractPlatformTenant; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil; @@ -97,7 +98,7 @@ private String buildAggregationQuery() { FROM acc_gl_account JOIN acc_gl_journal_entry ON acc_gl_account.id = acc_gl_journal_entry.account_id - + -- entity_type_enum = 1 → LOAN LEFT JOIN m_loan loan ON loan.id = acc_gl_journal_entry.entity_id @@ -105,7 +106,7 @@ private String buildAggregationQuery() { LEFT JOIN m_product_loan loan_product ON loan_product.id = loan.product_id AND acc_gl_journal_entry.entity_type_enum = 1 - + -- entity_type_enum = 2 → SAVING LEFT JOIN m_savings_account savings ON savings.id = acc_gl_journal_entry.entity_id @@ -113,7 +114,7 @@ private String buildAggregationQuery() { LEFT JOIN m_savings_product savings_product ON savings_product.id = savings.product_id AND acc_gl_journal_entry.entity_type_enum = 2 - + -- entity_type_enum = 3 → PROVISIONING LEFT JOIN m_provisioning_history prov ON prov.id = acc_gl_journal_entry.entity_id @@ -124,7 +125,7 @@ private String buildAggregationQuery() { LEFT JOIN m_product_loan prov_product ON prov_product.id = prov_entry.product_id AND acc_gl_journal_entry.entity_type_enum = 3 - + -- entity_type_enum = 4 → SHARED LEFT JOIN m_share_account share ON share.id = acc_gl_journal_entry.entity_id @@ -132,14 +133,14 @@ private String buildAggregationQuery() { LEFT JOIN m_share_product share_product ON share_product.id = share.product_id AND acc_gl_journal_entry.entity_type_enum = 4 - + -- external owner LEFT JOIN m_external_asset_owner_journal_entry_mapping aw ON aw.journal_entry_id = acc_gl_journal_entry.id - + WHERE acc_gl_journal_entry.submitted_on_date > ? AND acc_gl_journal_entry.submitted_on_date <= ? - + GROUP BY productId, glAccountId, diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobWriter.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobWriter.java index e9fd4ad722f..c036bea4ffb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobWriter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/JournalEntryAggregationJobWriter.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.jobs.service.aggregationjob; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.jobs.service.aggregationjob.data.JournalEntryAggregationSummaryData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/data/JournalEntryAggregationSummaryData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/data/JournalEntryAggregationSummaryData.java index c81845734b6..4ea97013c53 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/data/JournalEntryAggregationSummaryData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/data/JournalEntryAggregationSummaryData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Builder; import lombok.Getter; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/data/JournalEntryAggregationTrackingData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/data/JournalEntryAggregationTrackingData.java index 3f191aa18fe..d1dbd50a0f8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/data/JournalEntryAggregationTrackingData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/data/JournalEntryAggregationTrackingData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.jobs.service.aggregationjob.data; import java.time.LocalDate; + import lombok.Builder; import lombok.Getter; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/domain/JournalEntryAggregationTracking.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/domain/JournalEntryAggregationTracking.java index d6b9535c7e1..ef2d24eae95 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/domain/JournalEntryAggregationTracking.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/domain/JournalEntryAggregationTracking.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Table; + import java.time.LocalDate; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/domain/JournalEntryAggregationTrackingRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/domain/JournalEntryAggregationTrackingRepository.java index 26bad413a1a..8545cfb90d6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/domain/JournalEntryAggregationTrackingRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/domain/JournalEntryAggregationTrackingRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.jobs.service.aggregationjob.domain; import java.time.LocalDate; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Modifying; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/domain/JournalEntrySummary.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/domain/JournalEntrySummary.java index 4927a8b22dc..7b3583c2c5b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/domain/JournalEntrySummary.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/domain/JournalEntrySummary.java @@ -6,9 +6,9 @@ * 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 @@ -21,8 +21,10 @@ import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/domain/JournalEntrySummaryRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/domain/JournalEntrySummaryRepository.java index e01d0424115..56be590c13e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/domain/JournalEntrySummaryRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/domain/JournalEntrySummaryRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/listener/JournalEntryAggregationJobListener.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/listener/JournalEntryAggregationJobListener.java index 0d3dfc30973..9e4df7cc727 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/listener/JournalEntryAggregationJobListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/listener/JournalEntryAggregationJobListener.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.time.ZoneOffset; import java.time.temporal.ChronoUnit; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.businessdate.domain.BusinessDateType; @@ -61,7 +62,7 @@ public void beforeJob(final JobExecution jobExecution) { final LocalDate aggregatedOnDate = providedAggregatedOnDate != null // ? providedAggregatedOnDate.minusDays(fineractProperties.getJob().getJournalEntryAggregation().getExcludeRecentNDays()) // : ThreadLocalContextUtil.getBusinessDateByType(BusinessDateType.BUSINESS_DATE) - .minusDays(fineractProperties.getJob().getJournalEntryAggregation().getExcludeRecentNDays()); // + .minusDays(fineractProperties.getJob().getJournalEntryAggregation().getExcludeRecentNDays()); // // get last or most recent aggregatedOnDate from tacking table. final LocalDate lastAggregatedOnDate = journalEntryAggregationTrackingRepository.findLatestAggregatedOnDate(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/services/JournalEntryAggregationWriterService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/services/JournalEntryAggregationWriterService.java index d28da2342bd..813e2c0e973 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/services/JournalEntryAggregationWriterService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/services/JournalEntryAggregationWriterService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.jobs.service.aggregationjob.services; import java.util.List; + import org.apache.fineract.infrastructure.jobs.service.aggregationjob.data.JournalEntryAggregationSummaryData; import org.apache.fineract.infrastructure.jobs.service.aggregationjob.data.JournalEntryAggregationTrackingData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/services/JournalEntryAggregationWriterServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/services/JournalEntryAggregationWriterServiceImpl.java index c078c29590e..fb13875c3b3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/services/JournalEntryAggregationWriterServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/services/JournalEntryAggregationWriterServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.jobs.service.aggregationjob.services; import java.util.List; + import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.jobs.service.aggregationjob.data.JournalEntryAggregationSummaryData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/tasklet/JournalEntryAggregationTrackingTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/tasklet/JournalEntryAggregationTrackingTasklet.java index bd8ba1e2b37..4626bab70d5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/tasklet/JournalEntryAggregationTrackingTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/aggregationjob/tasklet/JournalEntryAggregationTrackingTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.Optional; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/executealldirtyjobs/ExecuteAllDirtyJobsConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/executealldirtyjobs/ExecuteAllDirtyJobsConfig.java index d33bba8f7f1..c6db47a3d6f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/executealldirtyjobs/ExecuteAllDirtyJobsConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/executealldirtyjobs/ExecuteAllDirtyJobsConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/executealldirtyjobs/ExecuteAllDirtyJobsTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/executealldirtyjobs/ExecuteAllDirtyJobsTasklet.java index 53c87824513..be7ddf1a091 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/executealldirtyjobs/ExecuteAllDirtyJobsTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/executealldirtyjobs/ExecuteAllDirtyJobsTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.jobs.service.executealldirtyjobs; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.config.FineractProperties; import org.apache.fineract.infrastructure.jobs.domain.ScheduledJobDetail; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/increasedateby1day/increasebusinessdateby1day/IncreaseBusinessDateBy1DayConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/increasedateby1day/increasebusinessdateby1day/IncreaseBusinessDateBy1DayConfig.java index fbd7d47327a..68931ddb16c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/increasedateby1day/increasebusinessdateby1day/IncreaseBusinessDateBy1DayConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/increasedateby1day/increasebusinessdateby1day/IncreaseBusinessDateBy1DayConfig.java @@ -6,9 +6,9 @@ * 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 @@ -41,9 +41,9 @@ public IncreaseBusinessDateBy1DayTasklet increaseBusinessDateBy1DayTasklet( @Bean public Job increaseBusinessDateBy1DayJob(PlatformTransactionManager transactionManager, JobRepository jobRepository, - IncreaseBusinessDateBy1DayTasklet tasklet) { + IncreaseBusinessDateBy1DayTasklet tasklet) { return new JobBuilder(JobName.INCREASE_BUSINESS_DATE_BY_1_DAY.name(), jobRepository).start( - new StepBuilder(JobName.INCREASE_BUSINESS_DATE_BY_1_DAY.name(), jobRepository).tasklet(tasklet, transactionManager).build()) + new StepBuilder(JobName.INCREASE_BUSINESS_DATE_BY_1_DAY.name(), jobRepository).tasklet(tasklet, transactionManager).build()) .incrementer(new RunIdIncrementer()).build(); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/increasedateby1day/increasebusinessdateby1day/IncreaseBusinessDateBy1DayTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/increasedateby1day/increasebusinessdateby1day/IncreaseBusinessDateBy1DayTasklet.java index c22bf2060a9..3ec10518019 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/increasedateby1day/increasebusinessdateby1day/IncreaseBusinessDateBy1DayTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/increasedateby1day/increasebusinessdateby1day/IncreaseBusinessDateBy1DayTasklet.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/increasedateby1day/increasecobdateby1day/IncreaseCobDateBy1DayConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/increasedateby1day/increasecobdateby1day/IncreaseCobDateBy1DayConfig.java index 7d356682a22..1b647d0c9f6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/increasedateby1day/increasecobdateby1day/IncreaseCobDateBy1DayConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/increasedateby1day/increasecobdateby1day/IncreaseCobDateBy1DayConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/increasedateby1day/increasecobdateby1day/IncreaseCobDateBy1DayTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/increasedateby1day/increasecobdateby1day/IncreaseCobDateBy1DayTasklet.java index 94c4145c531..d33b1190f01 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/increasedateby1day/increasecobdateby1day/IncreaseCobDateBy1DayTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/increasedateby1day/increasecobdateby1day/IncreaseCobDateBy1DayTasklet.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobname/JobNameData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobname/JobNameData.java index dda3062144d..1cf46127d6e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobname/JobNameData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobname/JobNameData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobname/JobNameProvider.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobname/JobNameProvider.java index 9f1a17db7c7..76f19dba5b2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobname/JobNameProvider.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobname/JobNameProvider.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobname/JobNameService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobname/JobNameService.java index b0feb804de5..2a3ee258623 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobname/JobNameService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobname/JobNameService.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.Collection; import java.util.Optional; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobname/SimpleJobNameProvider.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobname/SimpleJobNameProvider.java index 7c03d00627f..d48805c507d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobname/SimpleJobNameProvider.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobname/SimpleJobNameProvider.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobparameterprovider/AbstractJobParameterProvider.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobparameterprovider/AbstractJobParameterProvider.java index ec1013d04f3..44319cb9e27 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobparameterprovider/AbstractJobParameterProvider.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobparameterprovider/AbstractJobParameterProvider.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobparameterprovider/JobParameterProvider.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobparameterprovider/JobParameterProvider.java index a4e12e5a026..ccf48c708ee 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobparameterprovider/JobParameterProvider.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobparameterprovider/JobParameterProvider.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Map; import java.util.Set; + import org.apache.fineract.infrastructure.jobs.data.JobParameterDTO; import org.springframework.batch.core.JobParameter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobparameterprovider/LoanCOBJobParameterProvider.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobparameterprovider/LoanCOBJobParameterProvider.java index 554f4a8837a..3d7a358fa07 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobparameterprovider/LoanCOBJobParameterProvider.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/jobparameterprovider/LoanCOBJobParameterProvider.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.Map; import java.util.Optional; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.cob.loan.LoanCOBConstant; import org.apache.fineract.infrastructure.businessdate.domain.BusinessDateType; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/updatenpa/UpdateNpaConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/updatenpa/UpdateNpaConfig.java index 80d2766c9e2..f30522eeef0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/updatenpa/UpdateNpaConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/updatenpa/UpdateNpaConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/updatenpa/UpdateNpaTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/updatenpa/UpdateNpaTasklet.java index 55b664e4862..0fab774ff54 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/updatenpa/UpdateNpaTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/updatenpa/UpdateNpaTasklet.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/ReportMailingJobConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/ReportMailingJobConstants.java index 6c9f1e14764..daebb75f347 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/ReportMailingJobConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/ReportMailingJobConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobApiResourceSwagger.java index 0e7a4457753..97cc9e0b591 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.reportmailingjob.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.ZonedDateTime; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.dataqueries.data.ReportData; import org.apache.fineract.infrastructure.reportmailingjob.data.ReportMailingJobTimelineData; @@ -156,7 +158,8 @@ private PutReportMailingJobsResponse() { static final class PutReportMailingJobsResponseChanges { - private PutReportMailingJobsResponseChanges() {} + private PutReportMailingJobsResponseChanges() { + } @Schema(example = "10-08-2016 23:30:00") public ZonedDateTime startDateTime; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobRunHistoryApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobRunHistoryApiResourceSwagger.java index 6d09414f432..505c8c97e4b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobRunHistoryApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/api/ReportMailingJobRunHistoryApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.reportmailingjob.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.ZonedDateTime; /** diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobConfigurationData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobConfigurationData.java index d33e387f589..c2f7ecd86be 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobConfigurationData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobConfigurationData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobData.java index 6e79a737928..2fca8e81c51 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.ZonedDateTime; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; @@ -61,12 +62,12 @@ public final class ReportMailingJobData { * @return an instance of the ReportMailingJobData class **/ public static ReportMailingJobData newInstance(final Long id, final String name, final String description, - final ZonedDateTime startDateTime, final String recurrence, final ReportMailingJobTimelineData timeline, - final String emailRecipients, final String emailSubject, final String emailMessage, - final EnumOptionData emailAttachmentFileFormat, final ReportData stretchyReport, final String stretchyReportParamMap, - final ZonedDateTime previousRunDateTime, final ZonedDateTime nextRunDateTime, final String previousRunStatus, - final String previousRunErrorLog, final String previousRunErrorMessage, final Integer numberOfRuns, final boolean isActive, - final Long runAsUserId) { + final ZonedDateTime startDateTime, final String recurrence, final ReportMailingJobTimelineData timeline, + final String emailRecipients, final String emailSubject, final String emailMessage, + final EnumOptionData emailAttachmentFileFormat, final ReportData stretchyReport, final String stretchyReportParamMap, + final ZonedDateTime previousRunDateTime, final ZonedDateTime nextRunDateTime, final String previousRunStatus, + final String previousRunErrorLog, final String previousRunErrorMessage, final Integer numberOfRuns, final boolean isActive, + final Long runAsUserId) { return new ReportMailingJobData().setId(id).setName(name).setDescription(description).setStartDateTime(startDateTime) .setRecurrence(recurrence).setTimeline(timeline).setEmailRecipients(emailRecipients).setEmailSubject(emailSubject) .setEmailMessage(emailMessage).setEmailAttachmentFileFormat(emailAttachmentFileFormat).setStretchyReport(stretchyReport) @@ -80,7 +81,7 @@ public static ReportMailingJobData newInstance(final Long id, final String name, * @return an instance of the ReportMailingJobData class **/ public static ReportMailingJobData newInstance(final List emailAttachmentFileFormatOptions, - final List stretchyReportParamDateOptions) { + final List stretchyReportParamDateOptions) { return new ReportMailingJobData().setEmailAttachmentFileFormatOptions(emailAttachmentFileFormatOptions) .setStretchyReportParamDateOptions(stretchyReportParamDateOptions); } @@ -89,7 +90,7 @@ public static ReportMailingJobData newInstance(final List emailA * @return an instance of the ReportMailingJobData class **/ public static ReportMailingJobData newInstance(final ReportMailingJobData dataWithoutEnumOptions, - final ReportMailingJobData dataWithEnumOptions) { + final ReportMailingJobData dataWithEnumOptions) { return new ReportMailingJobData().setId(dataWithoutEnumOptions.id).setName(dataWithoutEnumOptions.name) .setDescription(dataWithoutEnumOptions.description).setStartDateTime(dataWithoutEnumOptions.startDateTime) .setRecurrence(dataWithoutEnumOptions.recurrence).setTimeline(dataWithoutEnumOptions.timeline) diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobEmailAttachmentFileFormat.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobEmailAttachmentFileFormat.java index ebec12a3942..f7256e704e6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobEmailAttachmentFileFormat.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobEmailAttachmentFileFormat.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.EnumOptionData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobEmailData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobEmailData.java index 1ae1af02da3..751282584fb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobEmailData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobEmailData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.reportmailingjob.data; import java.io.File; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobPreviousRunStatus.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobPreviousRunStatus.java index 5cabd7a6828..5c705c0d894 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobPreviousRunStatus.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobPreviousRunStatus.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobRunHistoryData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobRunHistoryData.java index fd978e4f4be..6e545b20973 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobRunHistoryData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobRunHistoryData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.reportmailingjob.data; import java.time.ZonedDateTime; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; @@ -45,7 +46,7 @@ public final class ReportMailingJobRunHistoryData { * @return ReportMailingJobRunHistoryData object **/ public static ReportMailingJobRunHistoryData newInstance(Long id, Long reportMailingJobId, ZonedDateTime startDateTime, - ZonedDateTime endDateTime, String status, String errorMessage, String errorLog) { + ZonedDateTime endDateTime, String status, String errorMessage, String errorLog) { return new ReportMailingJobRunHistoryData().setId(id).setReportMailingJobId(reportMailingJobId).setStartDateTime(startDateTime) .setEndDateTime(endDateTime).setStatus(status).setErrorMessage(errorMessage).setErrorLog(errorLog); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobStretchyReportParamDateOption.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobStretchyReportParamDateOption.java index 05c48ac9af8..b27362def04 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobStretchyReportParamDateOption.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobStretchyReportParamDateOption.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.EnumOptionData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobTimelineData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobTimelineData.java index d240dfd912d..431d32ee46d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobTimelineData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/data/ReportMailingJobTimelineData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.reportmailingjob.data; import java.time.LocalDate; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJob.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJob.java index 83d07f917ea..de512f79ea1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJob.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJob.java @@ -6,9 +6,9 @@ * 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 @@ -24,10 +24,12 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.LinkedHashMap; import java.util.Map; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -42,7 +44,7 @@ import org.apache.fineract.useradministration.domain.AppUser; @Entity -@Table(name = "m_report_mailing_job", uniqueConstraints = { @UniqueConstraint(columnNames = { "name" }, name = "unique_name") }) +@Table(name = "m_report_mailing_job", uniqueConstraints = {@UniqueConstraint(columnNames = {"name"}, name = "unique_name")}) @Getter @Setter @NoArgsConstructor @@ -116,9 +118,9 @@ public class ReportMailingJob extends AbstractAuditableCustom { * @return ReportMailingJob object **/ public static ReportMailingJob newInstance(final String name, final String description, final LocalDateTime startDateTime, - final String recurrence, final String emailRecipients, final String emailSubject, final String emailMessage, - final ReportMailingJobEmailAttachmentFileFormat emailAttachmentFileFormat, final Report stretchyReport, - final String stretchyReportParamMap, final boolean isActive, final AppUser runAsUser) { + final String recurrence, final String emailRecipients, final String emailSubject, final String emailMessage, + final ReportMailingJobEmailAttachmentFileFormat emailAttachmentFileFormat, final Report stretchyReport, + final String stretchyReportParamMap, final boolean isActive, final AppUser runAsUser) { return new ReportMailingJob().setName(name).setDescription(description).setStartDateTime(startDateTime).setRecurrence(recurrence) .setEmailRecipients(emailRecipients).setEmailSubject(emailSubject).setEmailMessage(emailMessage) .setEmailAttachmentFileFormat(emailAttachmentFileFormat.getValue()).setStretchyReport(stretchyReport) diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobConfiguration.java index 59296ee33d6..8624771dfa7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -30,7 +30,7 @@ @Entity @Table(name = "m_report_mailing_job_configuration", uniqueConstraints = { - @UniqueConstraint(columnNames = { "name" }, name = "unique_name") }) + @UniqueConstraint(columnNames = {"name"}, name = "unique_name")}) @Getter @Setter @NoArgsConstructor diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobConfigurationRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobConfigurationRepository.java index 7d42c8882cb..bec95b7cd61 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobConfigurationRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobConfigurationRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobEmailAttachmentFileFormat.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobEmailAttachmentFileFormat.java index 5819e951766..f12abf56d6b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobEmailAttachmentFileFormat.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobEmailAttachmentFileFormat.java @@ -6,9 +6,9 @@ * 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 @@ -41,18 +41,18 @@ public static ReportMailingJobEmailAttachmentFileFormat instance(final String va switch (value) { case "xls": emailAttachmentFileFormat = XLS; - break; + break; case "pdf": emailAttachmentFileFormat = PDF; - break; + break; case "csv": emailAttachmentFileFormat = CSV; - break; + break; default: - break; + break; } return emailAttachmentFileFormat; @@ -64,18 +64,18 @@ public static ReportMailingJobEmailAttachmentFileFormat instance(final Integer i switch (id) { case 1: emailAttachmentFileFormat = XLS; - break; + break; case 2: emailAttachmentFileFormat = PDF; - break; + break; case 3: emailAttachmentFileFormat = CSV; - break; + break; default: - break; + break; } return emailAttachmentFileFormat; @@ -106,6 +106,6 @@ public Integer getId() { * @return list of valid ReportMailingJobEmailAttachmentFileFormat ids **/ public static Object[] validValues() { - return new Object[] { XLS.getId(), PDF.getId(), CSV.getId() }; + return new Object[]{XLS.getId(), PDF.getId(), CSV.getId()}; } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRepository.java index a07cb88e25b..09b133db650 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.reportmailingjob.domain; import java.util.Collection; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRepositoryWrapper.java index 2a4077a2532..44ff18aeaf2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRunHistory.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRunHistory.java index dd0598a19d5..a53bb877dd6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRunHistory.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRunHistory.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.time.LocalDateTime; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -65,7 +67,7 @@ public class ReportMailingJobRunHistory extends AbstractPersistableCustom * @return ReportMailingJobRunHistory object **/ public static ReportMailingJobRunHistory newInstance(final ReportMailingJob reportMailingJob, final LocalDateTime startDateTime, - final LocalDateTime endDateTime, final String status, final String errorMessage, final String errorLog) { + final LocalDateTime endDateTime, final String status, final String errorMessage, final String errorLog) { return new ReportMailingJobRunHistory().setReportMailingJob(reportMailingJob).setStartDateTime(startDateTime) .setEndDateTime(endDateTime).setStatus(status).setErrorMessage(errorMessage).setErrorLog(errorLog); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRunHistoryRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRunHistoryRepository.java index 0906de6a652..4bba50ce5b3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRunHistoryRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/domain/ReportMailingJobRunHistoryRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobConfigurationNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobConfigurationNotFoundException.java index ae0652d7302..112dd1a1f54 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobConfigurationNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobConfigurationNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobNotFoundException.java index 03da097c9e6..5ba86b264f4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobRunHistoryNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobRunHistoryNotFoundException.java index b413e109629..18f179a9f3b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobRunHistoryNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/exception/ReportMailingJobRunHistoryNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/handler/CreateReportMailingJobCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/handler/CreateReportMailingJobCommandHandler.java index d77af5004fc..e1727ae1b23 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/handler/CreateReportMailingJobCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/handler/CreateReportMailingJobCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/handler/DeleteReportMailingJobCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/handler/DeleteReportMailingJobCommandHandler.java index 1ed85004674..132087d0ce5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/handler/DeleteReportMailingJobCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/handler/DeleteReportMailingJobCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/handler/UpdateReportMailingJobCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/handler/UpdateReportMailingJobCommandHandler.java index 72e03535623..8816c01be53 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/handler/UpdateReportMailingJobCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/handler/UpdateReportMailingJobCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/helper/IPv4Helper.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/helper/IPv4Helper.java index dda23c330a5..41c5c5320de 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/helper/IPv4Helper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/helper/IPv4Helper.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.infrastructure.reportmailingjob.helper; import com.google.common.base.Splitter; + import java.net.InetAddress; import java.util.List; + import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -142,9 +144,7 @@ public static boolean applicationIsRunningOnLocalMachine() { isRunningOnLocalMachine = ipAddressIsInRange(hostAddress, startOfIpAddressRange, endOfIpAddressRange); } } - } - - catch (Exception exception) { + } catch (Exception exception) { LOG.error("Problem occurred in applicationIsRunningOnLocalMachine function", exception); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobConfigurationReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobConfigurationReadPlatformService.java index 5215d7570e8..3837ce40cfd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobConfigurationReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobConfigurationReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.reportmailingjob.service; import java.util.Collection; + import org.apache.fineract.infrastructure.reportmailingjob.data.ReportMailingJobConfigurationData; public interface ReportMailingJobConfigurationReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobConfigurationReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobConfigurationReadPlatformServiceImpl.java index 8fd7d971faa..b80e9ba77e4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobConfigurationReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobConfigurationReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; + import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.infrastructure.reportmailingjob.data.ReportMailingJobConfigurationData; import org.apache.fineract.infrastructure.reportmailingjob.exception.ReportMailingJobConfigurationNotFoundException; @@ -57,10 +58,8 @@ public ReportMailingJobConfigurationData retrieveReportMailingJobConfiguration(S final ReportMailingJobConfigurationMapper mapper = new ReportMailingJobConfigurationMapper(); final String sql = "select " + mapper.reportMailingJobConfigurationSchema() + " where rmjc.name = ?"; - return this.jdbcTemplate.queryForObject(sql, mapper, new Object[] { name }); // NOSONAR - } - - catch (final EmptyResultDataAccessException ex) { + return this.jdbcTemplate.queryForObject(sql, mapper, new Object[]{name}); // NOSONAR + } catch (final EmptyResultDataAccessException ex) { throw new ReportMailingJobConfigurationNotFoundException(name, ex); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobEmailService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobEmailService.java index d4531bd12c9..e374101525e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobEmailService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobEmailService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobEmailServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobEmailServiceImpl.java index 374a614ccfa..c2e0edc6624 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobEmailServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobEmailServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,8 +20,10 @@ import jakarta.mail.MessagingException; import jakarta.mail.internet.MimeMessage; + import java.util.Collection; import java.util.Properties; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.reportmailingjob.ReportMailingJobConstants; import org.apache.fineract.infrastructure.reportmailingjob.data.ReportMailingJobConfigurationData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobReadPlatformService.java index 3285ece2ad6..91489e14a73 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.reportmailingjob.service; import java.util.Collection; + import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.infrastructure.core.service.SearchParameters; import org.apache.fineract.infrastructure.reportmailingjob.data.ReportMailingJobData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobReadPlatformServiceImpl.java index d6dc95e519c..45567de3ee2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.infrastructure.core.service.Page; @@ -54,7 +55,7 @@ public class ReportMailingJobReadPlatformServiceImpl implements ReportMailingJob @Autowired public ReportMailingJobReadPlatformServiceImpl(final JdbcTemplate jdbcTemplate, final ColumnValidator columnValidator, - DatabaseSpecificSQLGenerator sqlGenerator, PaginationHelper paginationHelper) { + DatabaseSpecificSQLGenerator sqlGenerator, PaginationHelper paginationHelper) { this.jdbcTemplate = jdbcTemplate; this.columnValidator = columnValidator; this.sqlGenerator = sqlGenerator; @@ -109,10 +110,8 @@ public ReportMailingJobData retrieveReportMailingJob(final Long reportMailingJob final ReportMailingJobMapper mapper = new ReportMailingJobMapper(); final String sql = "select " + mapper.reportMailingJobSchema() + " where rmj.id = ? and rmj.is_deleted = false"; - return this.jdbcTemplate.queryForObject(sql, mapper, new Object[] { reportMailingJobId }); // NOSONAR - } - - catch (final EmptyResultDataAccessException ex) { + return this.jdbcTemplate.queryForObject(sql, mapper, new Object[]{reportMailingJobId}); // NOSONAR + } catch (final EmptyResultDataAccessException ex) { throw new ReportMailingJobNotFoundException(reportMailingJobId, ex); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobRunHistoryReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobRunHistoryReadPlatformService.java index 081da7871a6..2e14be8d66a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobRunHistoryReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobRunHistoryReadPlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobRunHistoryReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobRunHistoryReadPlatformServiceImpl.java index 81b2194ab82..b96d6d3d5c8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobRunHistoryReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobRunHistoryReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.ZonedDateTime; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.infrastructure.core.service.PaginationHelper; @@ -46,7 +47,7 @@ public class ReportMailingJobRunHistoryReadPlatformServiceImpl implements Report @Autowired public ReportMailingJobRunHistoryReadPlatformServiceImpl(final JdbcTemplate jdbcTemplate, final ColumnValidator columnValidator, - DatabaseSpecificSQLGenerator sqlGenerator, PaginationHelper paginationHelper) { + DatabaseSpecificSQLGenerator sqlGenerator, PaginationHelper paginationHelper) { this.jdbcTemplate = jdbcTemplate; this.sqlGenerator = sqlGenerator; this.reportMailingJobRunHistoryMapper = new ReportMailingJobRunHistoryMapper(); @@ -56,7 +57,7 @@ public ReportMailingJobRunHistoryReadPlatformServiceImpl(final JdbcTemplate jdbc @Override public Page retrieveRunHistoryByJobId(final Long reportMailingJobId, - final SearchParameters searchParameters) { + final SearchParameters searchParameters) { final StringBuilder sqlStringBuilder = new StringBuilder(200); final List queryParameters = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobWritePlatformService.java index a2ff9db16f5..4b3fd3d0494 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobWritePlatformServiceImpl.java index 25b3f032747..439a21ae079 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/service/ReportMailingJobWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.Duration; import java.time.LocalDateTime; import java.util.Map; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; @@ -59,9 +60,9 @@ public class ReportMailingJobWritePlatformServiceImpl implements ReportMailingJo @Autowired public ReportMailingJobWritePlatformServiceImpl(final ReportRepositoryWrapper reportRepositoryWrapper, - final ReportMailingJobValidator reportMailingJobValidator, - final ReportMailingJobRepositoryWrapper reportMailingJobRepositoryWrapper, - final PlatformSecurityContext platformSecurityContext) { + final ReportMailingJobValidator reportMailingJobValidator, + final ReportMailingJobRepositoryWrapper reportMailingJobRepositoryWrapper, + final PlatformSecurityContext platformSecurityContext) { this.reportRepositoryWrapper = reportRepositoryWrapper; this.reportMailingJobValidator = reportMailingJobValidator; this.reportMailingJobRepositoryWrapper = reportMailingJobRepositoryWrapper; @@ -243,7 +244,7 @@ private LocalDateTime createNextRecurringDateTime(final String recurrencePattern * **/ private void handleDataIntegrityIssues(final JsonCommand jsonCommand, final Throwable realCause, - final NonTransientDataAccessException dve) { + final NonTransientDataAccessException dve) { if (realCause.getMessage().contains(ReportMailingJobConstants.NAME_PARAM_NAME)) { final String name = jsonCommand.stringValueOfParameterNamed(ReportMailingJobConstants.NAME_PARAM_NAME); throw new PlatformDataIntegrityException("error.msg.report.mailing.job.duplicate.name", diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/util/ReportMailingJobDateUtil.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/util/ReportMailingJobDateUtil.java index bc6f8d16a42..db75842214c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/util/ReportMailingJobDateUtil.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/util/ReportMailingJobDateUtil.java @@ -6,9 +6,9 @@ * 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 @@ -63,18 +63,18 @@ public static String getDateAsString( switch (reportMailingJobStretchyReportParamDateOption) { case TODAY: dateAsString = getTodayDateAsString(); - break; + break; case YESTERDAY: dateAsString = getYesterdayDateAsString(); - break; + break; case TOMORROW: dateAsString = getTomorrowDateAsString(); - break; + break; default: - break; + break; } return dateAsString; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/validation/ReportMailingJobValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/validation/ReportMailingJobValidator.java index 92608f51020..59f961177dd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/validation/ReportMailingJobValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/reportmailingjob/validation/ReportMailingJobValidator.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import com.google.common.base.Splitter; import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; @@ -34,6 +35,7 @@ import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -73,7 +75,8 @@ public void validateCreateRequest(final JsonCommand jsonCommand) { throw new InvalidJsonException(); } - final Type typeToken = new TypeToken>() {}.getType(); + final Type typeToken = new TypeToken>() { + }.getType(); this.fromJsonHelper.checkForUnsupportedParameters(typeToken, jsonString, ReportMailingJobConstants.CREATE_REQUEST_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -128,9 +131,7 @@ public void validateCreateRequest(final JsonCommand jsonCommand) { // try to parse the date time string LocalDateTime.parse(startDateTime, dateTimeFormatter); - } - - catch (IllegalArgumentException ex) { + } catch (IllegalArgumentException ex) { dataValidatorBuilder.reset().parameter(ReportMailingJobConstants.DATE_FORMAT_PARAM_NAME).value(dateFormat) .failWithCode("invalid.date.format"); } @@ -154,7 +155,8 @@ public void validateUpdateRequest(final JsonCommand jsonCommand) { throw new InvalidJsonException(); } - final Type typeToken = new TypeToken>() {}.getType(); + final Type typeToken = new TypeToken>() { + }.getType(); this.fromJsonHelper.checkForUnsupportedParameters(typeToken, jsonString, ReportMailingJobConstants.UPDATE_REQUEST_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -226,9 +228,7 @@ public void validateUpdateRequest(final JsonCommand jsonCommand) { // try to parse the date time string LocalDateTime.parse(startDateTime, dateTimeFormatter); - } - - catch (IllegalArgumentException ex) { + } catch (IllegalArgumentException ex) { dataValidatorBuilder.reset().parameter(ReportMailingJobConstants.DATE_FORMAT_PARAM_NAME).value(dateFormat) .failWithCode("invalid.date.format"); } @@ -305,10 +305,9 @@ public HashMap validateStretchyReportParamMap(String stretchyRep if (!StringUtils.isEmpty(stretchyReportParamMap)) { try { stretchyReportParamHashMap = new ObjectMapper().readValue(stretchyReportParamMap, - new TypeReference>() {}); - } - - catch (Exception e) { + new TypeReference>() { + }); + } catch (Exception e) { stretchyReportParamHashMap = null; } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/s3/AmazonS3Config.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/s3/AmazonS3Config.java index 1458c93915e..7fcdeaa7135 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/s3/AmazonS3Config.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/s3/AmazonS3Config.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.s3; import java.util.List; + import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; import org.apache.fineract.infrastructure.core.config.FineractProperties; import org.apache.fineract.infrastructure.dataqueries.service.ReadReportingService; @@ -49,7 +50,7 @@ public AwsRegionProvider awsRegionProvider() { @Bean("s3Client") public S3Client s3Client(DefaultCredentialsProvider awsCredentialsProvider, AwsRegionProvider awsRegionProvider, - List customizers) { + List customizers) { S3ClientBuilder builder = S3Client.builder().credentialsProvider(awsCredentialsProvider).region(awsRegionProvider.getRegion()); customizers.forEach(customizer -> customizer.customize(builder)); return builder.build(); @@ -58,7 +59,7 @@ public S3Client s3Client(DefaultCredentialsProvider awsCredentialsProvider, AwsR @Bean @ConditionalOnBean(S3Client.class) public S3DatatableReportExportServiceImpl s3DatatableReportExportServiceImpl(ReadReportingService reportServiceImpl, - ConfigurationDomainService configurationDomainService, S3Client s3Client, FineractProperties fineractProperties) { + ConfigurationDomainService configurationDomainService, S3Client s3Client, FineractProperties fineractProperties) { return new S3DatatableReportExportServiceImpl(reportServiceImpl, configurationDomainService, s3Client, fineractProperties); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/s3/AmazonS3ConfigCondition.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/s3/AmazonS3ConfigCondition.java index b9c336ff031..b7543bdafcf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/s3/AmazonS3ConfigCondition.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/s3/AmazonS3ConfigCondition.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/s3/LocalstackS3ClientCustomizer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/s3/LocalstackS3ClientCustomizer.java index 4e7d10853c9..4801b32e0c3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/s3/LocalstackS3ClientCustomizer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/s3/LocalstackS3ClientCustomizer.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.s3; import java.net.URI; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.boot.FineractProfiles; import org.apache.poi.util.StringUtil; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/s3/S3ClientCustomizer.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/s3/S3ClientCustomizer.java index 14821aa2368..c30001eb5ad 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/s3/S3ClientCustomizer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/s3/S3ClientCustomizer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/config/AuthorizationServerConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/config/AuthorizationServerConfig.java index db59825d206..f0e48ea13d2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/config/AuthorizationServerConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/config/AuthorizationServerConfig.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.infrastructure.security.config; import jakarta.servlet.http.HttpServletRequest; + import java.util.List; import java.util.Objects; import java.util.UUID; import java.util.stream.Collectors; + import org.apache.fineract.infrastructure.businessdate.service.BusinessDateReadPlatformService; import org.apache.fineract.infrastructure.core.config.FineractProperties; import org.apache.fineract.infrastructure.core.domain.FineractRequestContextHolder; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/LoginAttemptEventListener.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/LoginAttemptEventListener.java index 8fef98d16d0..d04b5e66886 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/LoginAttemptEventListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/LoginAttemptEventListener.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformUserDetailsChecker.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformUserDetailsChecker.java index f840da55f74..b25ef93e011 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformUserDetailsChecker.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/PlatformUserDetailsChecker.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/TwoFactorConfigurationServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/TwoFactorConfigurationServiceImpl.java index 1ff0c008d43..1c996a45672 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/TwoFactorConfigurationServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/TwoFactorConfigurationServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import com.github.mustachejava.DefaultMustacheFactory; import com.github.mustachejava.Mustache; import com.github.mustachejava.MustacheFactory; + import java.io.StringReader; import java.io.StringWriter; import java.time.LocalDateTime; @@ -28,6 +29,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.math.NumberUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/TwoFactorServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/TwoFactorServiceImpl.java index eceac182492..9d904721f5f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/TwoFactorServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/security/service/TwoFactorServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.domain.EmailDetail; @@ -61,9 +62,9 @@ public class TwoFactorServiceImpl implements TwoFactorService { @Autowired public TwoFactorServiceImpl(AccessTokenGenerationService accessTokenGenerationService, PlatformEmailService emailService, - SmsMessageScheduledJobService smsMessageScheduledJobService, OTPRequestRepository otpRequestRepository, - TFAccessTokenRepository tfAccessTokenRepository, SmsMessageRepository smsMessageRepository, - TwoFactorConfigurationService configurationService) { + SmsMessageScheduledJobService smsMessageScheduledJobService, OTPRequestRepository otpRequestRepository, + TFAccessTokenRepository tfAccessTokenRepository, SmsMessageRepository smsMessageRepository, + TwoFactorConfigurationService configurationService) { this.accessTokenGenerationService = accessTokenGenerationService; this.emailService = emailService; this.smsMessageScheduledJobService = smsMessageScheduledJobService; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/SmsApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/SmsApiConstants.java index ffab914975f..4a700ebed4c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/SmsApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/SmsApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsData.java index 2e38daacdbf..28b2291acbd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsData.java @@ -6,9 +6,9 @@ * 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 @@ -43,7 +43,7 @@ public final class SmsData { private String campaignName; public static SmsData instance(final Long id, final Long groupId, final Long clientId, final Long staffId, final EnumOptionData status, - final String mobileNo, final String message, final Long providerId, final String camapignName) { + final String mobileNo, final String message, final Long providerId, final String camapignName) { return new SmsData().setId(id).setGroupId(groupId).setClientId(clientId).setStaffId(staffId).setStatus(status).setMobileNo(mobileNo) .setMessage(message).setProviderId(providerId).setCampaignName(camapignName); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsDataValidator.java index aaa82a56dd9..ff33dfb85cd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -27,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -59,7 +61,8 @@ public void validateForCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, CREATE_REQUEST_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); @@ -125,7 +128,8 @@ public void validateForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, UPDATE_REQUEST_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiQueueResourceData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiQueueResourceData.java index bc15df048ee..d0aad07b741 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiQueueResourceData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiQueueResourceData.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.infrastructure.sms.data; import com.google.gson.Gson; + import java.util.Collection; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; @@ -44,7 +46,7 @@ public class SmsMessageApiQueueResourceData { * @return a new instance of the SmsMessageApiQueueResourceData class **/ public static final SmsMessageApiQueueResourceData instance(Long internalId, String mifosTenantIdentifier, String createdOnDate, - String sourceAddress, String mobileNumber, String message, Long providerId) { + String sourceAddress, String mobileNumber, String message, Long providerId) { return new SmsMessageApiQueueResourceData().setInternalId(internalId).setTenantId(mifosTenantIdentifier) .setCreatedOnDate(createdOnDate).setSourceAddress(sourceAddress).setMobileNumber(mobileNumber).setMessage(message) diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiReportResourceData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiReportResourceData.java index acd6416351b..917ac5a45cb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiReportResourceData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiReportResourceData.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.infrastructure.sms.data; import com.google.gson.Gson; + import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiResponseData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiResponseData.java index 7fab0616803..c035e17f1ab 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiResponseData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageApiResponseData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.sms.data; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageDeliveryReportData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageDeliveryReportData.java index 10c01761166..7210d3316c4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageDeliveryReportData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/SmsMessageDeliveryReportData.java @@ -6,9 +6,9 @@ * 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 @@ -42,7 +42,7 @@ public class SmsMessageDeliveryReportData { * @return an instance of the SmsMessageDeliveryReportData class **/ public static SmsMessageDeliveryReportData getInstance(Long id, String externalId, String addedOnDate, String deliveredOnDate, - Integer deliveryStatus, Boolean hasError, String errorMessage) { + Integer deliveryStatus, Boolean hasError, String errorMessage) { return new SmsMessageDeliveryReportData().setId(id).setExternalId(externalId).setAddedOnDate(addedOnDate) .setDeliveredOnDate(deliveredOnDate).setDeliveryStatus(deliveryStatus).setHasError(hasError).setErrorMessage(errorMessage); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/request/SmsCreationRequest.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/request/SmsCreationRequest.java index afea759c8ba..0309a67731f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/request/SmsCreationRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/request/SmsCreationRequest.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,8 @@ import java.io.Serial; import java.io.Serializable; -public record SmsCreationRequest(Long groupId, Long clientId, Long staffId, String message, Long campaignId) implements Serializable { +public record SmsCreationRequest(Long groupId, Long clientId, Long staffId, String message, + Long campaignId) implements Serializable { @Serial private static final long serialVersionUID = 1L; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/request/SmsUpdateRequest.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/request/SmsUpdateRequest.java index c44f9311208..3ba482fda4c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/request/SmsUpdateRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/data/request/SmsUpdateRequest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessage.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessage.java index 6e0ed867adf..b2040dd7760 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessage.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessage.java @@ -6,9 +6,9 @@ * 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 @@ -23,10 +23,12 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.time.LocalDate; import java.time.LocalDateTime; import java.util.LinkedHashMap; import java.util.Map; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; @@ -87,22 +89,22 @@ public class SmsMessage extends AbstractPersistableCustom { private boolean isNotification; public static SmsMessage pendingSms(final String externalId, final Group group, final Client client, final Staff staff, - final String message, final String mobileNo, final SmsCampaign smsCampaign, final boolean isNotification) { + final String message, final String mobileNo, final SmsCampaign smsCampaign, final boolean isNotification) { return new SmsMessage().setExternalId(externalId).setGroup(group).setClient(client).setStaff(staff) .setStatusType(SmsMessageStatusType.PENDING.getValue()).setMessage(message).setMobileNo(mobileNo) .setSmsCampaign(smsCampaign).setNotification(isNotification).setSubmittedOnDate(DateUtils.getBusinessLocalDate()); } public static SmsMessage sentSms(final String externalId, final Group group, final Client client, final Staff staff, - final String message, final String mobileNo, final SmsCampaign smsCampaign, final boolean isNotification) { + final String message, final String mobileNo, final SmsCampaign smsCampaign, final boolean isNotification) { return new SmsMessage().setExternalId(externalId).setGroup(group).setClient(client).setStaff(staff) .setStatusType(SmsMessageStatusType.WAITING_FOR_DELIVERY_REPORT.getValue()).setMessage(message).setMobileNo(mobileNo) .setSmsCampaign(smsCampaign).setNotification(isNotification).setSubmittedOnDate(DateUtils.getBusinessLocalDate()); } public static SmsMessage instance(String externalId, final Group group, final Client client, final Staff staff, - final SmsMessageStatusType statusType, final String message, final String mobileNo, final SmsCampaign smsCampaign, - final boolean isNotification) { + final SmsMessageStatusType statusType, final String message, final String mobileNo, final SmsCampaign smsCampaign, + final boolean isNotification) { return new SmsMessage().setExternalId(externalId).setGroup(group).setClient(client).setStaff(staff) .setStatusType(statusType.getValue()).setMessage(message).setMobileNo(mobileNo).setSmsCampaign(smsCampaign) diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessageAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessageAssembler.java index 34a0c631067..f78b88682be 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessageAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessageAssembler.java @@ -6,9 +6,9 @@ * 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 @@ -47,8 +47,8 @@ public class SmsMessageAssembler { @Autowired public SmsMessageAssembler(final SmsMessageRepository smsMessageRepository, final GroupRepositoryWrapper groupRepositoryWrapper, - final ClientRepositoryWrapper clientRepository, final StaffRepositoryWrapper staffRepository, - final FromJsonHelper fromApiJsonHelper, final SmsCampaignRepository smsCampaignRepository) { + final ClientRepositoryWrapper clientRepository, final StaffRepositoryWrapper staffRepository, + final FromJsonHelper fromApiJsonHelper, final SmsCampaignRepository smsCampaignRepository) { this.smsMessageRepository = smsMessageRepository; this.groupRepository = groupRepositoryWrapper; this.clientRepository = clientRepository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessageEnumerations.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessageEnumerations.java index ef4214fee91..ef8e9d16200 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessageEnumerations.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessageEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,8 @@ public final class SmsMessageEnumerations { - private SmsMessageEnumerations() {} + private SmsMessageEnumerations() { + } public static EnumOptionData status(final Integer statusId) { return status(SmsMessageStatusType.fromInt(statusId)); @@ -35,27 +36,27 @@ public static EnumOptionData status(final SmsMessageStatusType status) { case INVALID: optionData = new EnumOptionData(SmsMessageStatusType.INVALID.getValue().longValue(), SmsMessageStatusType.INVALID.getCode(), "Invalid"); - break; + break; case PENDING: optionData = new EnumOptionData(SmsMessageStatusType.PENDING.getValue().longValue(), SmsMessageStatusType.PENDING.getCode(), "Pending"); - break; + break; case WAITING_FOR_DELIVERY_REPORT: optionData = new EnumOptionData(SmsMessageStatusType.WAITING_FOR_DELIVERY_REPORT.getValue().longValue(), SmsMessageStatusType.WAITING_FOR_DELIVERY_REPORT.getCode(), "Waiting"); - break; + break; case SENT: optionData = new EnumOptionData(SmsMessageStatusType.SENT.getValue().longValue(), SmsMessageStatusType.SENT.getCode(), "Sent"); - break; + break; case DELIVERED: optionData = new EnumOptionData(SmsMessageStatusType.DELIVERED.getValue().longValue(), SmsMessageStatusType.DELIVERED.getCode(), "Delivered"); - break; + break; case FAILED: optionData = new EnumOptionData(SmsMessageStatusType.FAILED.getValue().longValue(), SmsMessageStatusType.FAILED.getCode(), "Failed"); - break; + break; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessageRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessageRepository.java index f8fd7f42fd8..c1ad579bfba 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessageRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessageRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessageStatusType.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessageStatusType.java index e7793369ac8..fdef665a9cd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessageStatusType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/domain/SmsMessageStatusType.java @@ -6,9 +6,9 @@ * 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 @@ -36,19 +36,19 @@ public static SmsMessageStatusType fromInt(final Integer statusValue) { switch (statusValue) { case 100: enumeration = SmsMessageStatusType.PENDING; - break; + break; case 150: enumeration = SmsMessageStatusType.WAITING_FOR_DELIVERY_REPORT; - break; + break; case 200: enumeration = SmsMessageStatusType.SENT; - break; + break; case 300: enumeration = SmsMessageStatusType.DELIVERED; - break; + break; case 400: enumeration = SmsMessageStatusType.FAILED; - break; + break; } return enumeration; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/exception/SmsCountryCodeNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/exception/SmsCountryCodeNotFoundException.java index bfdbaadb44e..844c3efa45f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/exception/SmsCountryCodeNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/exception/SmsCountryCodeNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/exception/SmsNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/exception/SmsNotFoundException.java index c51b764c72c..3e8ad673a7e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/exception/SmsNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/exception/SmsNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/handler/CreateSmsCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/handler/CreateSmsCommandHandler.java index 978d003060d..9641403d5d3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/handler/CreateSmsCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/handler/CreateSmsCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/handler/DeleteSmsCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/handler/DeleteSmsCommandHandler.java index de45dfa4ad0..6fb09fc5c57 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/handler/DeleteSmsCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/handler/DeleteSmsCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/handler/UpdateSmsCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/handler/UpdateSmsCommandHandler.java index 3ea77b7a084..a408e5611aa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/handler/UpdateSmsCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/handler/UpdateSmsCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/param/SmsRequestParam.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/param/SmsRequestParam.java index f5cf7c8da92..8e884abd1af 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/param/SmsRequestParam.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/param/SmsRequestParam.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobService.java index 3baade53f1d..8356bbf6891 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.Map; + import org.apache.fineract.infrastructure.campaigns.sms.domain.SmsCampaign; import org.apache.fineract.infrastructure.sms.domain.SmsMessage; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobServiceImpl.java index 733601a7121..22d6916c1c5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/scheduler/SmsMessageScheduledJobServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,11 +19,13 @@ package org.apache.fineract.infrastructure.sms.scheduler; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + import java.net.URI; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.campaigns.helper.SmsConfigUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsReadPlatformService.java index 33354760c03..e0d88d9654f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.infrastructure.core.service.SearchParameters; import org.apache.fineract.infrastructure.sms.data.SmsData; @@ -39,7 +40,7 @@ public interface SmsReadPlatformService { List retrieveAllFailed(Integer limit); Page retrieveSmsByStatus(Long campaignId, SearchParameters searchParameters, Integer status, LocalDate dateFrom, - LocalDate dateTo); + LocalDate dateTo); List retrieveExternalIdsOfAllSent(Integer limit); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsReadPlatformServiceImpl.java index 57ad8ba6c9d..f864de11a78 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,12 +19,14 @@ package org.apache.fineract.infrastructure.sms.service; import jakarta.annotation.PostConstruct; + import java.sql.ResultSet; import java.sql.SQLException; import java.time.LocalDate; import java.util.ArrayList; import java.util.Arrays; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; @@ -75,7 +77,8 @@ private static final class SmsMapper implements RowMapper { from sms_messages_outbound smo join sms_campaign smc on smc.id = smo.campaign_id\s"""; - SmsMapper() {} + SmsMapper() { + } public String schema() { return SMS_SCHEMA; @@ -119,7 +122,7 @@ public List retrieveAll() { public SmsData retrieveOne(final Long resourceId) { try { final String sql = "select " + this.smsRowMapper.schema() + " where smo.id = ?"; - return this.jdbcTemplate.queryForObject(sql, this.smsRowMapper, new Object[] { resourceId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, this.smsRowMapper, new Object[]{resourceId}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new SmsNotFoundException(resourceId, e); } @@ -198,7 +201,7 @@ public List retrieveAllFailed(final Integer limit) { @Override public Page retrieveSmsByStatus(final Long campaignId, final SearchParameters searchParameters, final Integer status, - final LocalDate dateFrom, final LocalDate dateTo) { + final LocalDate dateFrom, final LocalDate dateTo) { sqlValidator.validate(searchParameters.getOrderBy()); sqlValidator.validate(searchParameters.getSortOrder()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsWritePlatformService.java index e44367bfc37..a75edc2c4ac 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsWritePlatformServiceJpaRepositoryImpl.java index 9d24e779950..ef58bc23ba2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/sms/service/SmsWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.sms.service; import java.util.Map; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.infrastructure.core.data.CommandProcessingResultBuilder; @@ -48,7 +49,7 @@ public class SmsWritePlatformServiceJpaRepositoryImpl implements SmsWritePlatfor @Autowired public SmsWritePlatformServiceJpaRepositoryImpl(final SmsMessageAssembler assembler, final SmsMessageRepository repository, - final SmsDataValidator validator) { + final SmsDataValidator validator) { this.assembler = assembler; this.repository = repository; this.validator = validator; @@ -128,7 +129,7 @@ public CommandProcessingResult delete(final Long resourceId) { * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleDataIntegrityIssues(@SuppressWarnings("unused") final JsonCommand command, final Throwable realCause, - final NonTransientDataAccessException dve) { + final NonTransientDataAccessException dve) { if (realCause.getMessage().contains("mobile_no")) { throw new PlatformDataIntegrityException("error.msg.sms.no.mobile.no.exists", "The group, client or staff provided has no mobile no.", "id"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/ContextualMessage.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/ContextualMessage.java index 0cb1988e0c8..840eab8e0c7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/ContextualMessage.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/ContextualMessage.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.springbatch; import java.io.Serializable; + import lombok.Data; import org.apache.fineract.infrastructure.core.domain.FineractContext; import org.springframework.batch.integration.partition.StepExecutionRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/InputChannelInterceptor.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/InputChannelInterceptor.java index 271ef26fa1d..463d39e847a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/InputChannelInterceptor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/InputChannelInterceptor.java @@ -6,9 +6,9 @@ * 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 @@ -38,13 +38,13 @@ public class InputChannelInterceptor implements ExecutorChannelInterceptor { @Override public Message beforeHandle(@NonNull final Message message, @NonNull final MessageChannel channel, - @NonNull final MessageHandler handler) { + @NonNull final MessageHandler handler) { return beforeHandleMessage(message); } @Override public void afterMessageHandled(@NonNull final Message message, @NonNull final MessageChannel channel, - @NonNull final MessageHandler handler, final Exception ex) { + @NonNull final MessageHandler handler, final Exception ex) { afterHandleMessage(); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/ManagerConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/ManagerConfig.java index f25f69f0ad5..4f705566458 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/ManagerConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/ManagerConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/OutputChannelInterceptor.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/OutputChannelInterceptor.java index fb8166e9e8c..258a330370b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/OutputChannelInterceptor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/OutputChannelInterceptor.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/PropertyServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/PropertyServiceImpl.java index 553df428d1c..4dc3d6abfda 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/PropertyServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/PropertyServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.function.Function; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.config.FineractProperties; import org.springframework.stereotype.Service; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/WorkerConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/WorkerConfig.java index 4ffaf36e364..55919c2ba35 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/WorkerConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/WorkerConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/MessageHandlerConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/MessageHandlerConfig.java index 741a2d947f2..55ec2eaa324 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/MessageHandlerConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/MessageHandlerConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/StepExecutionRequestHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/StepExecutionRequestHandler.java index 126039fd0ce..f1464d2575d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/StepExecutionRequestHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/StepExecutionRequestHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/jms/JmsManagerCondition.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/jms/JmsManagerCondition.java index 2b7b27cc529..45588064ff6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/jms/JmsManagerCondition.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/jms/JmsManagerCondition.java @@ -6,9 +6,9 @@ * 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 @@ -28,8 +28,10 @@ public JmsManagerCondition() { } @ConditionalOnProperty(value = "fineract.mode.batch-manager-enabled", havingValue = "true") - static class ManagerCondition {} + static class ManagerCondition { + } @ConditionalOnProperty(value = "fineract.remote-job-message-handler.jms.enabled", havingValue = "true") - static class JmsCondition {} + static class JmsCondition { + } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/jms/JmsWorkerCondition.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/jms/JmsWorkerCondition.java index 44c98103f1b..845a354508f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/jms/JmsWorkerCondition.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/jms/JmsWorkerCondition.java @@ -6,9 +6,9 @@ * 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 @@ -28,8 +28,10 @@ public JmsWorkerCondition() { } @ConditionalOnProperty(value = "fineract.mode.batch-worker-enabled", havingValue = "true") - public static class WorkerCondition {} + public static class WorkerCondition { + } @ConditionalOnProperty(value = "fineract.remote-job-message-handler.jms.enabled", havingValue = "true") - public static class JmsCondition {} + public static class JmsCondition { + } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/kafka/KafkaManagerCondition.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/kafka/KafkaManagerCondition.java index 112fefed5c8..b9f491cceee 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/kafka/KafkaManagerCondition.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/kafka/KafkaManagerCondition.java @@ -6,9 +6,9 @@ * 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 @@ -28,8 +28,10 @@ public KafkaManagerCondition() { } @ConditionalOnProperty(value = "fineract.mode.batch-manager-enabled", havingValue = "true") - static class ManagerCondition {} + static class ManagerCondition { + } @ConditionalOnProperty(value = "fineract.remote-job-message-handler.kafka.enabled", havingValue = "true") - static class KafkaCondition {} + static class KafkaCondition { + } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/kafka/KafkaRemoteJobTopicAutoCreateCondition.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/kafka/KafkaRemoteJobTopicAutoCreateCondition.java index 56325c9684a..3593122af31 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/kafka/KafkaRemoteJobTopicAutoCreateCondition.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/kafka/KafkaRemoteJobTopicAutoCreateCondition.java @@ -6,9 +6,9 @@ * 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 @@ -28,12 +28,15 @@ public KafkaRemoteJobTopicAutoCreateCondition() { } @ConditionalOnProperty(value = "fineract.mode.batch-manager-enabled", havingValue = "true") - static class ManagerCondition {} + static class ManagerCondition { + } @ConditionalOnProperty(value = "fineract.remote-job-message-handler.kafka.enabled", havingValue = "true") - static class KafkaRemoteJobMessageHandlerEnabled {} + static class KafkaRemoteJobMessageHandlerEnabled { + } @ConditionalOnProperty(value = "fineract.remote-job-message-handler.kafka.topic.auto-create", havingValue = "true") - static class TopicAutoCreateCondition {} + static class TopicAutoCreateCondition { + } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/kafka/KafkaWorkerCondition.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/kafka/KafkaWorkerCondition.java index 54d9bfc7a42..cd11660b3ad 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/kafka/KafkaWorkerCondition.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/kafka/KafkaWorkerCondition.java @@ -6,9 +6,9 @@ * 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 @@ -28,8 +28,10 @@ public KafkaWorkerCondition() { } @ConditionalOnProperty(value = "fineract.mode.batch-worker-enabled", havingValue = "true") - static class WorkerCondition {} + static class WorkerCondition { + } @ConditionalOnProperty(value = "fineract.remote-job-message-handler.kafka.enabled", havingValue = "true") - static class KafkaCondition {} + static class KafkaCondition { + } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/spring/SpringEventManagerCondition.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/spring/SpringEventManagerCondition.java index 3a4e39d7a1f..a31d591eade 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/spring/SpringEventManagerCondition.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/spring/SpringEventManagerCondition.java @@ -6,9 +6,9 @@ * 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 @@ -28,8 +28,10 @@ public SpringEventManagerCondition() { } @ConditionalOnProperty(value = "fineract.mode.batch-manager-enabled", havingValue = "true") - static class ManagerCondition {} + static class ManagerCondition { + } @ConditionalOnProperty(value = "fineract.remote-job-message-handler.spring-events.enabled", havingValue = "true") - static class SpringEventCondition {} + static class SpringEventCondition { + } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/spring/SpringEventWorkerCondition.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/spring/SpringEventWorkerCondition.java index 741e9c495d9..a180f63f1b7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/spring/SpringEventWorkerCondition.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/conditions/spring/SpringEventWorkerCondition.java @@ -6,9 +6,9 @@ * 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 @@ -28,8 +28,10 @@ public SpringEventWorkerCondition() { } @ConditionalOnProperty(value = "fineract.mode.batch-worker-enabled", havingValue = "true") - static class WorkerCondition {} + static class WorkerCondition { + } @ConditionalOnProperty(value = "fineract.remote-job-message-handler.spring-events.enabled", havingValue = "true") - static class SpringEventCondition {} + static class SpringEventCondition { + } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/jms/JmsBatchWorkerMessageListener.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/jms/JmsBatchWorkerMessageListener.java index 430a9aa7b86..c5d23cfcdff 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/jms/JmsBatchWorkerMessageListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/jms/JmsBatchWorkerMessageListener.java @@ -6,9 +6,9 @@ * 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 @@ -49,7 +49,7 @@ public void afterPropertiesSet() throws Exception { } @Override - @SuppressWarnings({ "unchecked" }) + @SuppressWarnings({"unchecked"}) public void onMessage(jakarta.jms.Message message) { try { Message msg = (Message) converter.fromMessage(message); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/jms/JmsBrokerConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/jms/JmsBrokerConfiguration.java index f229001189c..278abf2264c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/jms/JmsBrokerConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/jms/JmsBrokerConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/jms/JmsManagerConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/jms/JmsManagerConfig.java index a2621c82ddb..94116cdbdcc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/jms/JmsManagerConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/jms/JmsManagerConfig.java @@ -6,9 +6,9 @@ * 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 @@ -36,7 +36,7 @@ @Configuration @EnableBatchIntegration @Conditional(JmsManagerCondition.class) -@Import(value = { JmsBrokerConfiguration.class }) +@Import(value = {JmsBrokerConfiguration.class}) public class JmsManagerConfig { @Autowired diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/jms/JmsWorkerConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/jms/JmsWorkerConfig.java index 7ea30440239..389d6c4592a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/jms/JmsWorkerConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/jms/JmsWorkerConfig.java @@ -6,9 +6,9 @@ * 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 @@ -34,7 +34,7 @@ @Configuration(proxyBeanMethods = false) @Conditional(JmsWorkerCondition.class) -@Import(value = { JmsBrokerConfiguration.class }) +@Import(value = {JmsBrokerConfiguration.class}) public class JmsWorkerConfig { @Autowired diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/kafka/KafkaJobTopicConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/kafka/KafkaJobTopicConfig.java index a32d66dd5da..1dee8e2ef6a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/kafka/KafkaJobTopicConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/kafka/KafkaJobTopicConfig.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.Map; + import org.apache.fineract.infrastructure.core.config.FineractProperties; import org.apache.fineract.infrastructure.springbatch.messagehandler.conditions.kafka.KafkaRemoteJobTopicAutoCreateCondition; import org.apache.kafka.clients.admin.NewTopic; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/kafka/KafkaManagerConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/kafka/KafkaManagerConfig.java index 3e39d0ad392..719325a1213 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/kafka/KafkaManagerConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/kafka/KafkaManagerConfig.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.HashMap; import java.util.Map; + import org.apache.fineract.infrastructure.core.config.FineractProperties; import org.apache.fineract.infrastructure.springbatch.ContextualMessage; import org.apache.fineract.infrastructure.springbatch.OutputChannelInterceptor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/kafka/KafkaRemoteMessageListener.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/kafka/KafkaRemoteMessageListener.java index 24a6513a00b..4ed3b2d0491 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/kafka/KafkaRemoteMessageListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/kafka/KafkaRemoteMessageListener.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/kafka/KafkaWorkerConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/kafka/KafkaWorkerConfig.java index babc7f54962..2f332f7741f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/kafka/KafkaWorkerConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/kafka/KafkaWorkerConfig.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import java.util.HashMap; import java.util.Map; + import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.config.FineractProperties; import org.apache.fineract.infrastructure.core.config.FineractProperties.FineractRemoteJobMessageHandlerKafkaProperties; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/spring/SpringEventManagerConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/spring/SpringEventManagerConfig.java index b17476f64bc..8259f977d74 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/spring/SpringEventManagerConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/spring/SpringEventManagerConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/spring/SpringEventWorkerConfig.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/spring/SpringEventWorkerConfig.java index f1ba77320aa..73bcc89e4c9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/spring/SpringEventWorkerConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/springbatch/messagehandler/spring/SpringEventWorkerConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/LikelihoodApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/LikelihoodApiConstants.java index a51441c6de3..814255912cb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/LikelihoodApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/LikelihoodApiConstants.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.HashSet; import java.util.Set; + import org.apache.fineract.infrastructure.survey.data.LikelihoodStatus; public final class LikelihoodApiConstants { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/PovertyLineApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/PovertyLineApiConstants.java index c04fd080a33..c0c217cb4ab 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/PovertyLineApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/PovertyLineApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiConstants.java index 5ffb354b4aa..da846d6ddd9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiResourceSwagger.java index 4cd6ba662d8..1aeb0ea3bed 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/api/SurveyApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,14 +19,16 @@ package org.apache.fineract.infrastructure.survey.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.ZonedDateTime; import java.util.List; + import org.apache.fineract.infrastructure.dataqueries.data.ResultsetColumnHeaderData; /** * Created by sanyam on 13/8/17. */ -@SuppressWarnings({ "MemberName" }) +@SuppressWarnings({"MemberName"}) final class SurveyApiResourceSwagger { private SurveyApiResourceSwagger() { diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/ClientScoresOverview.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/ClientScoresOverview.java index 9b24b702268..f301b8c8946 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/ClientScoresOverview.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/ClientScoresOverview.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.survey.data; import java.time.LocalDate; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikeliHoodPovertyLineData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikeliHoodPovertyLineData.java index 3df16ab986f..74e717763b3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikeliHoodPovertyLineData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikeliHoodPovertyLineData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.survey.data; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikelihoodData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikelihoodData.java index 19800521c5f..3aba84578b9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikelihoodData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikelihoodData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikelihoodDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikelihoodDataValidator.java index 61f3f0dee02..60bbbb4d28d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikelihoodDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikelihoodDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -27,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -59,7 +61,8 @@ public void validateForUpdate(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, UPDATE_LIKELIHOOD_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikelihoodStatus.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikelihoodStatus.java index 05590934806..e339f038a6f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikelihoodStatus.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/LikelihoodStatus.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/PovertyLineData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/PovertyLineData.java index da8534ffedf..5a5602233ff 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/PovertyLineData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/PovertyLineData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/PpiPovertyLineData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/PpiPovertyLineData.java index da69b2a2420..53b5833d25e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/PpiPovertyLineData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/PpiPovertyLineData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.survey.data; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/SurveyData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/SurveyData.java index f628279839a..8855f540224 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/SurveyData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/SurveyData.java @@ -6,9 +6,9 @@ * 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 @@ -21,4 +21,5 @@ /** * Created by Cieyou on 2/27/14. */ -public class SurveyData {} +public class SurveyData { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/SurveyDataTableData.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/SurveyDataTableData.java index b3d5247e336..1944c053045 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/SurveyDataTableData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/data/SurveyDataTableData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/domain/Likelihood.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/domain/Likelihood.java index 360e48aa9de..1c15f6d3c2a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/domain/Likelihood.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/domain/Likelihood.java @@ -6,9 +6,9 @@ * 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 @@ -21,8 +21,10 @@ import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Table; + import java.util.LinkedHashMap; import java.util.Map; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/domain/LikelihoodRepository.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/domain/LikelihoodRepository.java index 3de8f689cdd..e0eedd272ee 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/domain/LikelihoodRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/domain/LikelihoodRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.survey.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/handler/FullFilSurveyCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/handler/FullFilSurveyCommandHandler.java index 895e0477ddd..cd47c9a8782 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/handler/FullFilSurveyCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/handler/FullFilSurveyCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/handler/RegisterSurveyCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/handler/RegisterSurveyCommandHandler.java index 2dfcf921ebf..b9094351804 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/handler/RegisterSurveyCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/handler/RegisterSurveyCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/handler/UpdateLikelihoodCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/handler/UpdateLikelihoodCommandHandler.java index 8b4a5cdf791..726bea2c241 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/handler/UpdateLikelihoodCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/handler/UpdateLikelihoodCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/PovertyLineService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/PovertyLineService.java index bca83167ca0..9dd338cba11 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/PovertyLineService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/PovertyLineService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/PovertyLineServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/PovertyLineServiceImpl.java index e5cd9d5d545..13d0c442abb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/PovertyLineServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/PovertyLineServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.survey.data.LikeliHoodPovertyLineData; import org.apache.fineract.infrastructure.survey.data.PovertyLineData; import org.apache.fineract.infrastructure.survey.data.PpiPovertyLineData; @@ -120,7 +121,7 @@ private SqlRowSet getPovertyLines(final String ppiName) { + " JOIN ppi_likelihoods_ppi lkp on lkp.id = pl.likelihood_ppi_id " + " JOIN ppi_scores sc on sc.id = pl.score_id " + " WHERE lkp.ppi_name = ? "; - return this.jdbcTemplate.queryForRowSet(sql, new Object[] { ppiName }); + return this.jdbcTemplate.queryForRowSet(sql, new Object[]{ppiName}); } @@ -130,7 +131,7 @@ private SqlRowSet getPovertyLines(final Long likelihoodId) { + " JOIN ppi_likelihoods lkh on lkh.id = lkp.likelihood_id " + " JOIN ppi_scores sc on sc.id = pl.score_id " + " WHERE pl.likelihood_ppi_id = ? "; - return this.jdbcTemplate.queryForRowSet(sql, new Object[] { likelihoodId }); + return this.jdbcTemplate.queryForRowSet(sql, new Object[]{likelihoodId}); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/ReadLikelihoodService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/ReadLikelihoodService.java index 35763accbd3..9ddfe287a1c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/ReadLikelihoodService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/ReadLikelihoodService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.survey.service; import java.util.List; + import org.apache.fineract.infrastructure.survey.data.LikelihoodData; /** diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/ReadLikelihoodServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/ReadLikelihoodServiceImpl.java index fa1ecec8b85..30b43c6e50c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/ReadLikelihoodServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/ReadLikelihoodServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.survey.data.LikelihoodData; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; @@ -56,7 +57,7 @@ private SqlRowSet getLikelihood(final String ppiName) { + " JOIN ppi_likelihoods lkh on lkp.likelihood_id = lkh.id " + " WHERE lkp.ppi_name = ? " + " GROUP BY pl.likelihood_ppi_id "; - return this.jdbcTemplate.queryForRowSet(sql, new Object[] { ppiName }); + return this.jdbcTemplate.queryForRowSet(sql, new Object[]{ppiName}); } @@ -75,7 +76,7 @@ private SqlRowSet getLikelihood(final Long likelihoodId) { String sql = "SELECT lkp.id, lkh.code , lkh.name, lkp.enabled " + " FROM ppi_likelihoods lkh " + " JOIN ppi_likelihoods_ppi lkp on lkp.likelihood_id = lkh.id " + " WHERE lkp.id = ? "; - return this.jdbcTemplate.queryForRowSet(sql, new Object[] { likelihoodId }); + return this.jdbcTemplate.queryForRowSet(sql, new Object[]{likelihoodId}); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/ReadSurveyService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/ReadSurveyService.java index 27e74210df0..8cddae0b563 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/ReadSurveyService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/ReadSurveyService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.survey.service; import java.util.List; + import org.apache.fineract.infrastructure.dataqueries.data.GenericResultsetData; import org.apache.fineract.infrastructure.survey.data.ClientScoresOverview; import org.apache.fineract.infrastructure.survey.data.SurveyDataTableData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/ReadSurveyServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/ReadSurveyServiceImpl.java index 2b8c45d947c..78da342b01e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/ReadSurveyServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/ReadSurveyServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.dataqueries.api.DataTableApiConstant; @@ -96,7 +97,7 @@ public SurveyDataTableData retrieveSurvey(String surveyName) { SurveyDataTableData datatableData = null; - final SqlRowSet rs = this.jdbcTemplate.queryForRowSet(sql, new Object[] { this.context.authenticatedUser().getId(), surveyName }); // NOSONAR + final SqlRowSet rs = this.jdbcTemplate.queryForRowSet(sql, new Object[]{this.context.authenticatedUser().getId(), surveyName}); // NOSONAR if (rs.next()) { final String appTableName = rs.getString("application_table_name"); final String registeredDatatableName = rs.getString("registered_table_name"); @@ -122,7 +123,7 @@ public List retrieveClientSurveyScoreOverview(String surve + " JOIN ppi_likelihoods lkh on lkh.id = lkp.likelihood_id " + " WHERE client_id = ? "; final SqlRowSet rs = this.jdbcTemplate.queryForRowSet(sql, - new Object[] { surveyName, surveyName, LikelihoodStatus.ENABLED, clientId }); + new Object[]{surveyName, surveyName, LikelihoodStatus.ENABLED, clientId}); List scoresOverviews = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteLikelihoodService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteLikelihoodService.java index e8f75df7d18..715fbb70900 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteLikelihoodService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteLikelihoodService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteLikelihoodServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteLikelihoodServiceImpl.java index 095247fdf56..b8baa50b2b5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteLikelihoodServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteLikelihoodServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.infrastructure.survey.service; import java.util.List; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.infrastructure.core.data.CommandProcessingResultBuilder; @@ -49,7 +50,7 @@ public class WriteLikelihoodServiceImpl implements WriteLikelihoodService { @Autowired WriteLikelihoodServiceImpl(final PlatformSecurityContext context, final LikelihoodDataValidator likelihoodDataValidator, - final LikelihoodRepository repository) { + final LikelihoodRepository repository) { this.context = context; this.likelihoodDataValidator = likelihoodDataValidator; this.repository = repository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteSurveyService.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteSurveyService.java index 2e98ccb6e23..ff35889e554 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteSurveyService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteSurveyService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteSurveyServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteSurveyServiceImpl.java index a8552f3b8cb..28cdd3bea4c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteSurveyServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/survey/service/WriteSurveyServiceImpl.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/api/InteropWrapperBuilder.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/api/InteropWrapperBuilder.java index dac41655ed2..7281bc5e0ae 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/api/InteropWrapperBuilder.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/api/InteropWrapperBuilder.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/ExtensionData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/ExtensionData.java index f461d94acc2..27a687cf678 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/ExtensionData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/ExtensionData.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import com.google.gson.JsonObject; import jakarta.validation.constraints.NotNull; + import java.util.Arrays; import java.util.List; + import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/GeoCodeData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/GeoCodeData.java index 0bb2824fcd0..74eb4685f1e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/GeoCodeData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/GeoCodeData.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import com.google.gson.JsonObject; import jakarta.validation.constraints.NotNull; + import java.util.Arrays; import java.util.List; + import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/IdDocument.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/IdDocument.java index 5d7063308cb..cc275f66bb0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/IdDocument.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/IdDocument.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropIdentifierAccountResponseData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropIdentifierAccountResponseData.java index 0f68fec37da..59c0ca97ea7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropIdentifierAccountResponseData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropIdentifierAccountResponseData.java @@ -6,9 +6,9 @@ * 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 @@ -20,7 +20,9 @@ import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; + import java.util.Map; + import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; public class InteropIdentifierAccountResponseData extends CommandProcessingResult { @@ -29,13 +31,13 @@ public class InteropIdentifierAccountResponseData extends CommandProcessingResul private String accountId; protected InteropIdentifierAccountResponseData(Long resourceId, Long officeId, Long commandId, Map changesOnly, - @NotNull String accountId) { + @NotNull String accountId) { super(resourceId, officeId, commandId, changesOnly); this.accountId = accountId; } protected static InteropIdentifierAccountResponseData build(Long resourceId, Long officeId, Long commandId, - Map changesOnly, @NotNull String accountId) { + Map changesOnly, @NotNull String accountId) { return new InteropIdentifierAccountResponseData(resourceId, officeId, commandId, changesOnly, accountId); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropIdentifierRequestData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropIdentifierRequestData.java index 6a7d2415757..c07c8e39375 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropIdentifierRequestData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropIdentifierRequestData.java @@ -6,9 +6,9 @@ * 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 @@ -23,14 +23,16 @@ import com.google.gson.JsonObject; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.NotNull; + import java.util.Arrays; + import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; import org.apache.fineract.interoperation.domain.InteropIdentifierType; public class InteropIdentifierRequestData { - static final String[] PARAMS = { PARAM_ACCOUNT_ID }; + static final String[] PARAMS = {PARAM_ACCOUNT_ID}; @NotEmpty private final InteropIdentifierType idType; @@ -43,7 +45,7 @@ public class InteropIdentifierRequestData { private final String accountId; public InteropIdentifierRequestData(@NotNull InteropIdentifierType idType, @NotNull String idValue, String subIdOrType, - String accountId) { + String accountId) { this.idType = idType; this.idValue = idValue; this.subIdOrType = subIdOrType; @@ -67,8 +69,8 @@ public String getAccountId() { } public static InteropIdentifierRequestData validateAndParse(final DataValidatorBuilder dataValidator, - @NotNull InteropIdentifierType idType, @NotNull String idValue, String subIdOrType, JsonObject element, - FromJsonHelper jsonHelper) { + @NotNull InteropIdentifierType idType, @NotNull String idValue, String subIdOrType, JsonObject element, + FromJsonHelper jsonHelper) { if (element == null) { return null; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropIdentifiersResponseData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropIdentifiersResponseData.java index 9e9add2969c..e068b16e4fe 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropIdentifiersResponseData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropIdentifiersResponseData.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.interoperation.data; import jakarta.validation.constraints.NotNull; + import java.util.ArrayList; import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.interoperation.domain.InteropIdentifier; import org.apache.fineract.portfolio.savings.domain.SavingsAccount; @@ -32,7 +34,7 @@ public class InteropIdentifiersResponseData extends CommandProcessingResult { private List identifiers; protected InteropIdentifiersResponseData(Long resourceId, Long officeId, Long commandId, Map changesOnly, - @NotNull List identifiers) { + @NotNull List identifiers) { super(resourceId, officeId, commandId, changesOnly); this.identifiers = identifiers; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropKycData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropKycData.java index a385f933ab6..561d27f5e4a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropKycData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropKycData.java @@ -6,9 +6,9 @@ * 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 @@ -42,8 +42,8 @@ public class InteropKycData implements Serializable { private String displayName; public InteropKycData(String nationality, String dateOfBirth, String contactPhone, String gender, String email, String idType, - String idNo, String description, String country, String addressLine1, String addressLine2, String city, String stateProvince, - String postalCode, String firstName, String middleName, String lastName, String displayName) { + String idNo, String description, String country, String addressLine1, String addressLine2, String city, String stateProvince, + String postalCode, String firstName, String middleName, String lastName, String displayName) { this.nationality = nationality; this.dateOfBirth = dateOfBirth; this.contactPhone = contactPhone; @@ -65,8 +65,8 @@ public InteropKycData(String nationality, String dateOfBirth, String contactPhon } public static InteropKycData instance(String nationality, String dateOfBirth, String contactPhone, String gender, String email, - String idType, String idNo, String description, String country, String address_line_1, String address_line_2, String city, - String stateProvince, String postalCode, String firstName, String middleName, String lastName, String displayName) { + String idType, String idNo, String description, String country, String address_line_1, String address_line_2, String city, + String stateProvince, String postalCode, String firstName, String middleName, String lastName, String displayName) { return new InteropKycData(nationality, dateOfBirth, contactPhone, gender, email, idType, idNo, description, country, address_line_1, address_line_2, city, stateProvince, postalCode, firstName, middleName, lastName, displayName); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropKycResponseData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropKycResponseData.java index 309af31361c..6214480b860 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropKycResponseData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropKycResponseData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.interoperation.data; import java.util.Map; + import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; public class InteropKycResponseData extends CommandProcessingResult { @@ -38,8 +39,8 @@ public class InteropKycResponseData extends CommandProcessingResult { private String birthCountry; public InteropKycResponseData(Long resourceId, Long officeId, Long commandId, Map changesOnly, String nationality, - String dateOfBirth, String contactPhone, String gender, IdDocument[] idDocument, PostalAddress postalAddress, - SubjectName subjectName, String emailAddress, String birthCountry) { + String dateOfBirth, String contactPhone, String gender, IdDocument[] idDocument, PostalAddress postalAddress, + SubjectName subjectName, String emailAddress, String birthCountry) { super(resourceId, officeId, commandId, changesOnly); this.nationality = nationality; this.dateOfBirth = dateOfBirth; @@ -53,7 +54,7 @@ public InteropKycResponseData(Long resourceId, Long officeId, Long commandId, Ma } public InteropKycResponseData(String nationality, String dateOfBirth, String contactPhone, String gender, IdDocument[] idDocument, - PostalAddress postalAddress, SubjectName subjectName, String emailAddress, String birthCountry) { + PostalAddress postalAddress, SubjectName subjectName, String emailAddress, String birthCountry) { this(null, null, null, null, nationality, dateOfBirth, contactPhone, gender, idDocument, postalAddress, subjectName, emailAddress, birthCountry); } @@ -68,7 +69,7 @@ public static InteropKycResponseData build(InteropKycData accountKyc) { accountKyc.getDisplayName()); return new InteropKycResponseData(accountKyc.getNationality(), accountKyc.getDateOfBirth(), accountKyc.getContactPhone(), - accountKyc.getGender(), new IdDocument[] { idDocument }, postalAddress, subjectName, accountKyc.getEmail(), + accountKyc.getGender(), new IdDocument[]{idDocument}, postalAddress, subjectName, accountKyc.getEmail(), accountKyc.getCountry()); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropQuoteRequestData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropQuoteRequestData.java index 0594dfcf9ab..1bae85d8c29 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropQuoteRequestData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropQuoteRequestData.java @@ -6,9 +6,9 @@ * 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 @@ -36,9 +36,11 @@ import com.google.gson.JsonObject; import jakarta.validation.constraints.NotNull; + import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; + import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; import org.apache.fineract.interoperation.domain.InteropAmountType; @@ -47,21 +49,21 @@ public class InteropQuoteRequestData extends InteropRequestData { - static final String[] PARAMS = { PARAM_TRANSACTION_CODE, PARAM_REQUEST_CODE, PARAM_ACCOUNT_ID, PARAM_AMOUNT, PARAM_TRANSACTION_TYPE, + static final String[] PARAMS = {PARAM_TRANSACTION_CODE, PARAM_REQUEST_CODE, PARAM_ACCOUNT_ID, PARAM_AMOUNT, PARAM_TRANSACTION_TYPE, PARAM_TRANSACTION_ROLE, PARAM_NOTE, PARAM_GEO_CODE, PARAM_EXPIRATION, PARAM_EXTENSION_LIST, PARAM_QUOTE_CODE, PARAM_AMOUNT_TYPE, - PARAM_FEES, PARAM_LOCALE, PARAM_DATE_FORMAT }; + PARAM_FEES, PARAM_LOCALE, PARAM_DATE_FORMAT}; @NotNull private final String quoteCode; @NotNull private final InteropAmountType amountType; private final MoneyData fees; // only for disclosed Payer fees on the Payee - // side + // side public InteropQuoteRequestData(@NotNull String transactionCode, String requestCode, @NotNull String accountId, - @NotNull MoneyData amount, @NotNull InteropTransactionRole transactionRole, @NotNull InteropTransactionTypeData transactionType, - String note, GeoCodeData geoCode, LocalDateTime expiration, List extensionList, @NotNull String quoteCode, - @NotNull InteropAmountType amountType, MoneyData fees) { + @NotNull MoneyData amount, @NotNull InteropTransactionRole transactionRole, @NotNull InteropTransactionTypeData transactionType, + String note, GeoCodeData geoCode, LocalDateTime expiration, List extensionList, @NotNull String quoteCode, + @NotNull InteropAmountType amountType, MoneyData fees) { super(transactionCode, requestCode, accountId, amount, transactionRole, transactionType, note, geoCode, expiration, extensionList); this.quoteCode = quoteCode; this.amountType = amountType; @@ -69,14 +71,14 @@ public InteropQuoteRequestData(@NotNull String transactionCode, String requestCo } public InteropQuoteRequestData(@NotNull String transactionCode, @NotNull String accountId, @NotNull InteropAmountType amountType, - @NotNull MoneyData amount, @NotNull InteropTransactionRole transactionRole, @NotNull InteropTransactionTypeData transactionType, - @NotNull String quoteCode) { + @NotNull MoneyData amount, @NotNull InteropTransactionRole transactionRole, @NotNull InteropTransactionTypeData transactionType, + @NotNull String quoteCode) { this(transactionCode, null, accountId, amount, transactionRole, transactionType, null, null, null, null, quoteCode, amountType, null); } private InteropQuoteRequestData(@NotNull InteropRequestData other, @NotNull String quoteCode, @NotNull InteropAmountType amountType, - MoneyData fees) { + MoneyData fees) { this(other.getTransactionCode(), other.getRequestCode(), other.getAccountId(), other.getAmount(), other.getTransactionRole(), other.getTransactionType(), other.getNote(), other.getGeoCode(), other.getExpiration(), other.getExtensionList(), quoteCode, amountType, fees); @@ -103,7 +105,7 @@ public void normalizeAmounts(@NotNull MonetaryCurrency currency) { } public static InteropQuoteRequestData validateAndParse(final DataValidatorBuilder dataValidator, JsonObject element, - FromJsonHelper jsonHelper) { + FromJsonHelper jsonHelper) { if (element == null) { return null; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropQuoteResponseData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropQuoteResponseData.java index 0fca4e14671..f39f5b3c5bb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropQuoteResponseData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropQuoteResponseData.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.interoperation.data; import jakarta.validation.constraints.NotNull; + import java.time.LocalDateTime; import java.util.List; import java.util.Map; + import org.apache.fineract.interoperation.domain.InteropActionState; public final class InteropQuoteResponseData extends InteropResponseData { @@ -34,8 +36,8 @@ public final class InteropQuoteResponseData extends InteropResponseData { private MoneyData fspCommission; private InteropQuoteResponseData(Long resourceId, Long officeId, Long commandId, Map changesOnly, - @NotNull String transactionCode, @NotNull InteropActionState state, LocalDateTime expiration, List extensionList, - @NotNull String quoteCode, MoneyData fspFee, MoneyData fspCommission) { + @NotNull String transactionCode, @NotNull InteropActionState state, LocalDateTime expiration, List extensionList, + @NotNull String quoteCode, MoneyData fspFee, MoneyData fspCommission) { super(resourceId, officeId, commandId, changesOnly, transactionCode, state, expiration, extensionList); this.quoteCode = quoteCode; this.fspFee = fspFee; @@ -43,25 +45,25 @@ private InteropQuoteResponseData(Long resourceId, Long officeId, Long commandId, } public static InteropQuoteResponseData build(Long commandId, @NotNull String transactionCode, @NotNull InteropActionState state, - LocalDateTime expiration, List extensionList, @NotNull String quoteCode, MoneyData fspFee, - MoneyData fspCommission) { + LocalDateTime expiration, List extensionList, @NotNull String quoteCode, MoneyData fspFee, + MoneyData fspCommission) { return new InteropQuoteResponseData(null, null, commandId, null, transactionCode, state, expiration, extensionList, quoteCode, fspFee, fspCommission); } public static InteropQuoteResponseData build(@NotNull String transactionCode, @NotNull InteropActionState state, - LocalDateTime expiration, List extensionList, @NotNull String quoteCode, MoneyData fspFee, - MoneyData fspCommission) { + LocalDateTime expiration, List extensionList, @NotNull String quoteCode, MoneyData fspFee, + MoneyData fspCommission) { return build(null, transactionCode, state, expiration, extensionList, quoteCode, fspFee, fspCommission); } public static InteropQuoteResponseData build(Long commandId, @NotNull String transactionCode, @NotNull InteropActionState state, - @NotNull String quoteCode) { + @NotNull String quoteCode) { return build(commandId, transactionCode, state, null, null, quoteCode, null, null); } public static InteropQuoteResponseData build(@NotNull String transactionCode, @NotNull InteropActionState state, - @NotNull String quoteCode) { + @NotNull String quoteCode) { return build(null, transactionCode, state, quoteCode); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropRefundData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropRefundData.java index 9ef7f0ef017..80d3f6e4a3c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropRefundData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropRefundData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropRequestData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropRequestData.java index c905961e6d3..9c6ba0752d4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropRequestData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropRequestData.java @@ -6,9 +6,9 @@ * 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 @@ -38,10 +38,12 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import jakarta.validation.constraints.NotNull; + import java.time.LocalDate; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; import org.apache.fineract.interoperation.domain.InteropTransactionRole; @@ -72,8 +74,8 @@ public class InteropRequestData { private List extensionList; protected InteropRequestData(@NotNull String transactionCode, String requestCode, @NotNull String accountId, @NotNull MoneyData amount, - @NotNull InteropTransactionRole transactionRole, InteropTransactionTypeData transactionType, String note, GeoCodeData geoCode, - LocalDateTime expiration, List extensionList) { + @NotNull InteropTransactionRole transactionRole, InteropTransactionTypeData transactionType, String note, GeoCodeData geoCode, + LocalDateTime expiration, List extensionList) { this.transactionCode = transactionCode; this.requestCode = requestCode; this.accountId = accountId; @@ -87,7 +89,7 @@ protected InteropRequestData(@NotNull String transactionCode, String requestCode } protected InteropRequestData(@NotNull String transactionCode, @NotNull String accountId, @NotNull MoneyData amount, - @NotNull InteropTransactionRole transactionRole) { + @NotNull InteropTransactionRole transactionRole) { this(transactionCode, null, accountId, amount, transactionRole, null, null, null, null, null); } @@ -160,7 +162,7 @@ public void normalizeAmounts(@NotNull MonetaryCurrency currency) { } public static InteropRequestData validateAndParse(final DataValidatorBuilder dataValidator, JsonObject element, - FromJsonHelper jsonHelper) { + FromJsonHelper jsonHelper) { if (element == null) { return null; } @@ -213,6 +215,6 @@ public static InteropRequestData validateAndParse(final DataValidatorBuilder dat return dataValidator.hasError() ? null : new InteropRequestData(transactionCode, requestCode, accountId, amount, transactionRole, transactionType, note, geoCode, - expiration, extensionList); + expiration, extensionList); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropResponseData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropResponseData.java index baeed58e948..45b373ded64 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropResponseData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropResponseData.java @@ -6,9 +6,9 @@ * 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 @@ -19,12 +19,14 @@ package org.apache.fineract.interoperation.data; import jakarta.validation.constraints.NotNull; + import java.beans.Transient; import java.time.LocalDateTime; import java.time.ZonedDateTime; import java.time.format.DateTimeFormatter; import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.interoperation.domain.InteropActionState; @@ -47,8 +49,8 @@ public class InteropResponseData extends CommandProcessingResult { private final List extensionList; protected InteropResponseData(Long resourceId, Long officeId, Long commandId, Map changesOnly, - @NotNull String transactionCode, @NotNull InteropActionState state, LocalDateTime expiration, - List extensionList) { + @NotNull String transactionCode, @NotNull InteropActionState state, LocalDateTime expiration, + List extensionList) { super(resourceId, officeId, commandId, changesOnly); this.transactionCode = transactionCode; this.state = state; @@ -57,12 +59,12 @@ protected InteropResponseData(Long resourceId, Long officeId, Long commandId, Ma } protected static InteropResponseData build(Long commandId, @NotNull String transactionCode, @NotNull InteropActionState state, - LocalDateTime expiration, List extensionList) { + LocalDateTime expiration, List extensionList) { return new InteropResponseData(null, null, commandId, null, transactionCode, state, expiration, extensionList); } public static InteropResponseData build(@NotNull String transactionCode, @NotNull InteropActionState state, LocalDateTime expiration, - List extensionList) { + List extensionList) { return build(null, transactionCode, state, expiration, extensionList); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionData.java index 4822098a9ee..2451c5db845 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionData.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.interoperation.data; import jakarta.validation.constraints.NotNull; + import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.infrastructure.core.service.MathUtil; @@ -55,8 +57,8 @@ public class InteropTransactionData extends CommandProcessingResult { private String note; public InteropTransactionData(Long entityId, String accountId, String transactionId, SavingsAccountTransactionType transactionType, - BigDecimal amount, BigDecimal chargeAmount, String currency, BigDecimal accountBalance, LocalDate bookingDateTime, - LocalDate valueDateTime, String note) { + BigDecimal amount, BigDecimal chargeAmount, String currency, BigDecimal accountBalance, LocalDate bookingDateTime, + LocalDate valueDateTime, String note) { super(entityId); this.accountId = accountId; this.savingTransactionId = transactionId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionRequestData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionRequestData.java index 23e1fed1135..2f689511ec4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionRequestData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionRequestData.java @@ -6,9 +6,9 @@ * 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 @@ -33,27 +33,29 @@ import com.google.gson.JsonObject; import jakarta.validation.constraints.NotNull; + import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; + import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; import org.apache.fineract.interoperation.domain.InteropTransactionRole; public class InteropTransactionRequestData extends InteropRequestData { - static final String[] PARAMS = { PARAM_TRANSACTION_CODE, PARAM_REQUEST_CODE, PARAM_ACCOUNT_ID, PARAM_AMOUNT, PARAM_TRANSACTION_ROLE, - PARAM_TRANSACTION_TYPE, PARAM_NOTE, PARAM_GEO_CODE, PARAM_EXPIRATION, PARAM_EXTENSION_LIST, PARAM_LOCALE, PARAM_DATE_FORMAT }; + static final String[] PARAMS = {PARAM_TRANSACTION_CODE, PARAM_REQUEST_CODE, PARAM_ACCOUNT_ID, PARAM_AMOUNT, PARAM_TRANSACTION_ROLE, + PARAM_TRANSACTION_TYPE, PARAM_NOTE, PARAM_GEO_CODE, PARAM_EXPIRATION, PARAM_EXTENSION_LIST, PARAM_LOCALE, PARAM_DATE_FORMAT}; public InteropTransactionRequestData(@NotNull String transactionCode, @NotNull String requestCode, @NotNull String accountId, - @NotNull MoneyData amount, @NotNull InteropTransactionTypeData transactionType, String note, GeoCodeData geoCode, - LocalDateTime expiration, List extensionList) { + @NotNull MoneyData amount, @NotNull InteropTransactionTypeData transactionType, String note, GeoCodeData geoCode, + LocalDateTime expiration, List extensionList) { super(transactionCode, requestCode, accountId, amount, InteropTransactionRole.PAYER, transactionType, note, geoCode, expiration, extensionList); } public InteropTransactionRequestData(@NotNull String transactionCode, @NotNull String requestCode, @NotNull String accountId, - @NotNull MoneyData amount, @NotNull InteropTransactionTypeData transactionType) { + @NotNull MoneyData amount, @NotNull InteropTransactionTypeData transactionType) { this(transactionCode, requestCode, accountId, amount, transactionType, null, null, null, null); } @@ -63,7 +65,7 @@ private InteropTransactionRequestData(InteropRequestData other) { } public static InteropTransactionRequestData validateAndParse(final DataValidatorBuilder dataValidator, JsonObject element, - FromJsonHelper jsonHelper) { + FromJsonHelper jsonHelper) { if (element == null) { return null; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionRequestResponseData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionRequestResponseData.java index 09683ab78de..1e7c382837e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionRequestResponseData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionRequestResponseData.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.interoperation.data; import jakarta.validation.constraints.NotNull; + import java.time.LocalDateTime; import java.util.List; import java.util.Map; + import org.apache.fineract.interoperation.domain.InteropActionState; public final class InteropTransactionRequestResponseData extends InteropResponseData { @@ -30,30 +32,30 @@ public final class InteropTransactionRequestResponseData extends InteropResponse private final String requestCode; private InteropTransactionRequestResponseData(Long resourceId, Long officeId, Long commandId, Map changesOnly, - @NotNull String transactionCode, @NotNull InteropActionState state, LocalDateTime expiration, List extensionList, - @NotNull String requestCode) { + @NotNull String transactionCode, @NotNull InteropActionState state, LocalDateTime expiration, List extensionList, + @NotNull String requestCode) { super(resourceId, officeId, commandId, changesOnly, transactionCode, state, expiration, extensionList); this.requestCode = requestCode; } public static InteropTransactionRequestResponseData build(Long commandId, @NotNull String transactionCode, - @NotNull InteropActionState state, LocalDateTime expiration, List extensionList, @NotNull String requestCode) { + @NotNull InteropActionState state, LocalDateTime expiration, List extensionList, @NotNull String requestCode) { return new InteropTransactionRequestResponseData(null, null, commandId, null, transactionCode, state, expiration, extensionList, requestCode); } public static InteropTransactionRequestResponseData build(@NotNull String transactionCode, @NotNull InteropActionState state, - LocalDateTime expiration, List extensionList, @NotNull String requestCode) { + LocalDateTime expiration, List extensionList, @NotNull String requestCode) { return build(null, transactionCode, state, expiration, extensionList, requestCode); } public static InteropTransactionRequestResponseData build(Long commandId, @NotNull String transactionCode, - @NotNull InteropActionState state, @NotNull String requestCode) { + @NotNull InteropActionState state, @NotNull String requestCode) { return build(commandId, transactionCode, state, null, null, requestCode); } public static InteropTransactionRequestResponseData build(@NotNull String transactionCode, @NotNull InteropActionState state, - @NotNull String requestCode) { + @NotNull String requestCode) { return build(null, transactionCode, state, requestCode); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionTypeData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionTypeData.java index 853f902799e..d35231b4318 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionTypeData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionTypeData.java @@ -6,9 +6,9 @@ * 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 @@ -28,8 +28,10 @@ import com.google.gson.JsonObject; import jakarta.validation.Valid; import jakarta.validation.constraints.NotNull; + import java.util.Arrays; import java.util.List; + import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; import org.apache.fineract.interoperation.domain.InteropInitiatorType; @@ -54,10 +56,10 @@ public class InteropTransactionTypeData { private InteropRefundData refundInfo; private String balanceOfPayments; // 3 digits number, see - // https://www.imf.org/external/np/sta/bopcode/ + // https://www.imf.org/external/np/sta/bopcode/ InteropTransactionTypeData(InteropTransactionScenario scenario, String subScenario, InteropTransactionRole initiator, - InteropInitiatorType initiatorType, InteropRefundData refundInfo, String balanceOfPayments) { + InteropInitiatorType initiatorType, InteropRefundData refundInfo, String balanceOfPayments) { this.scenario = scenario; this.subScenario = subScenario; this.initiator = initiator; @@ -67,7 +69,7 @@ public class InteropTransactionTypeData { } private InteropTransactionTypeData(InteropTransactionScenario scenario, String subScenario, InteropTransactionRole initiator, - InteropInitiatorType initiatorType) { + InteropInitiatorType initiatorType) { this(scenario, subScenario, initiator, initiatorType, null, null); } @@ -88,7 +90,7 @@ public InteropInitiatorType getInitiatorType() { } public static InteropTransactionTypeData validateAndParse(DataValidatorBuilder dataValidator, JsonObject element, - FromJsonHelper jsonHelper) { + FromJsonHelper jsonHelper) { if (element == null) { return null; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionsData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionsData.java index f3d13e4b082..305094fa4bc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionsData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransactionsData.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.interoperation.data; import jakarta.validation.constraints.NotNull; + import java.util.List; import java.util.function.Predicate; import java.util.stream.Collectors; + import lombok.Getter; import lombok.Setter; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransferRequestData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransferRequestData.java index 5fdab722008..159b79bc4c6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransferRequestData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransferRequestData.java @@ -6,9 +6,9 @@ * 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 @@ -34,9 +34,11 @@ import com.google.gson.JsonObject; import jakarta.validation.constraints.NotNull; + import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; + import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; import org.apache.fineract.interoperation.domain.InteropTransactionRole; @@ -44,9 +46,9 @@ public class InteropTransferRequestData extends InteropRequestData { - static final String[] PARAMS = { PARAM_TRANSACTION_CODE, PARAM_ACCOUNT_ID, PARAM_AMOUNT, PARAM_TRANSACTION_ROLE, PARAM_TRANSACTION_TYPE, + static final String[] PARAMS = {PARAM_TRANSACTION_CODE, PARAM_ACCOUNT_ID, PARAM_AMOUNT, PARAM_TRANSACTION_ROLE, PARAM_TRANSACTION_TYPE, PARAM_NOTE, PARAM_EXPIRATION, PARAM_EXTENSION_LIST, PARAM_TRANSFER_CODE, PARAM_FSP_FEE, PARAM_FSP_COMMISSION, PARAM_LOCALE, - PARAM_DATE_FORMAT }; + PARAM_DATE_FORMAT}; @NotNull private final String transferCode; @@ -57,9 +59,9 @@ public class InteropTransferRequestData extends InteropRequestData { private MoneyData fspCommission; public InteropTransferRequestData(@NotNull String transactionCode, @NotNull String accountId, @NotNull MoneyData amount, - @NotNull InteropTransactionRole transactionRole, InteropTransactionTypeData transactionType, String note, - LocalDateTime expiration, List extensionList, @NotNull String transferCode, MoneyData fspFee, - MoneyData fspCommission) { + @NotNull InteropTransactionRole transactionRole, InteropTransactionTypeData transactionType, String note, + LocalDateTime expiration, List extensionList, @NotNull String transferCode, MoneyData fspFee, + MoneyData fspCommission) { super(transactionCode, null, accountId, amount, transactionRole, transactionType, note, null, expiration, extensionList); this.transferCode = transferCode; this.fspFee = fspFee; @@ -67,7 +69,7 @@ public InteropTransferRequestData(@NotNull String transactionCode, @NotNull Stri } public InteropTransferRequestData(@NotNull String transactionCode, @NotNull String transferCode, @NotNull String accountId, - @NotNull MoneyData amount, @NotNull InteropTransactionRole transactionRole) { + @NotNull MoneyData amount, @NotNull InteropTransactionRole transactionRole) { this(transactionCode, accountId, amount, transactionRole, null, null, null, null, transferCode, null, null); } @@ -97,7 +99,7 @@ public void normalizeAmounts(@NotNull MonetaryCurrency currency) { } public static InteropTransferRequestData validateAndParse(final DataValidatorBuilder dataValidator, JsonObject element, - FromJsonHelper jsonHelper) { + FromJsonHelper jsonHelper) { if (element == null) { return null; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransferResponseData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransferResponseData.java index 6317a93f029..dd47a0e2811 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransferResponseData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/InteropTransferResponseData.java @@ -6,9 +6,9 @@ * 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 @@ -19,11 +19,13 @@ package org.apache.fineract.interoperation.data; import jakarta.validation.constraints.NotNull; + import java.beans.Transient; import java.text.ParseException; import java.time.LocalDateTime; import java.util.List; import java.util.Map; + import org.apache.fineract.interoperation.domain.InteropActionState; public final class InteropTransferResponseData extends InteropResponseData { @@ -34,31 +36,31 @@ public final class InteropTransferResponseData extends InteropResponseData { private String completedTimestamp; private InteropTransferResponseData(Long resourceId, Long officeId, Long commandId, Map changesOnly, - @NotNull String transactionCode, @NotNull InteropActionState state, LocalDateTime expiration, List extensionList, - @NotNull String transferCode, LocalDateTime completedTimestamp) { + @NotNull String transactionCode, @NotNull InteropActionState state, LocalDateTime expiration, List extensionList, + @NotNull String transferCode, LocalDateTime completedTimestamp) { super(resourceId, officeId, commandId, changesOnly, transactionCode, state, expiration, extensionList); this.transferCode = transferCode; this.completedTimestamp = format(completedTimestamp); } public static InteropTransferResponseData build(Long commandId, @NotNull String transactionCode, @NotNull InteropActionState state, - LocalDateTime expiration, List extensionList, @NotNull String transferCode, LocalDateTime completedTimestamp) { + LocalDateTime expiration, List extensionList, @NotNull String transferCode, LocalDateTime completedTimestamp) { return new InteropTransferResponseData(null, null, commandId, null, transactionCode, state, expiration, extensionList, transferCode, completedTimestamp); } public static InteropTransferResponseData build(@NotNull String transactionCode, @NotNull InteropActionState state, - List extensionList, @NotNull String transferCode, LocalDateTime completedTimestamp) { + List extensionList, @NotNull String transferCode, LocalDateTime completedTimestamp) { return build(null, transactionCode, state, null, extensionList, transferCode, completedTimestamp); } public static InteropTransferResponseData build(Long commandId, @NotNull String transactionCode, @NotNull InteropActionState state, - @NotNull String transferCode) { + @NotNull String transferCode) { return build(commandId, transactionCode, state, null, null, transferCode, null); } public static InteropTransferResponseData build(@NotNull String transactionCode, @NotNull InteropActionState state, - @NotNull String transferCode) { + @NotNull String transferCode) { return build(null, transactionCode, state, transferCode); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/MoneyData.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/MoneyData.java index 6262097edc8..3492c2d5d3e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/MoneyData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/MoneyData.java @@ -6,9 +6,9 @@ * 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 @@ -25,9 +25,11 @@ import com.google.gson.JsonObject; import jakarta.validation.constraints.NotNull; + import java.math.BigDecimal; import java.util.Arrays; import java.util.List; + import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; import org.apache.fineract.infrastructure.core.service.MathUtil; diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/PostalAddress.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/PostalAddress.java index 0c8f9909f95..e205365b43d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/PostalAddress.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/PostalAddress.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/SubjectName.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/SubjectName.java index 3c67caa6381..590dfc27d15 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/SubjectName.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/data/SubjectName.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/domain/InteropIdentifierRepository.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/domain/InteropIdentifierRepository.java index a2b59f18ca9..f2b3d7775c6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/domain/InteropIdentifierRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/domain/InteropIdentifierRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropAccountNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropAccountNotFoundException.java index 1822626ffa7..76ff3bf4ecd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropAccountNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropAccountNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropAccountTransactionNotAllowedException.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropAccountTransactionNotAllowedException.java index ee0dd3a65a1..549a525d83f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropAccountTransactionNotAllowedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropAccountTransactionNotAllowedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropKycDataNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropKycDataNotFoundException.java index 044793204fc..1bddd629ec8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropKycDataNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropKycDataNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropTransferAlreadyCommittedException.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropTransferAlreadyCommittedException.java index e143c7a51ae..2dca97a6ba1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropTransferAlreadyCommittedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropTransferAlreadyCommittedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropTransferAlreadyOnHoldException.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropTransferAlreadyOnHoldException.java index 155b9f44560..8e7c62fb998 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropTransferAlreadyOnHoldException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropTransferAlreadyOnHoldException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropTransferMissingException.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropTransferMissingException.java index 0145c37289b..bdd590524c8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropTransferMissingException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/exception/InteropTransferMissingException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/CommitInteropTransferHandler.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/CommitInteropTransferHandler.java index e6735f6507f..bf658fca898 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/CommitInteropTransferHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/CommitInteropTransferHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/CreateInteropIdentifierHandler.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/CreateInteropIdentifierHandler.java index 16b2e5b3df7..197ef56f586 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/CreateInteropIdentifierHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/CreateInteropIdentifierHandler.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import com.google.common.base.Strings; + import java.util.List; + import org.apache.fineract.commands.annotation.CommandType; import org.apache.fineract.commands.handler.NewCommandSourceHandler; import org.apache.fineract.infrastructure.core.api.JsonCommand; diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/CreateInteropQuoteHandler.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/CreateInteropQuoteHandler.java index 443ed70b03c..15cfa1904ce 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/CreateInteropQuoteHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/CreateInteropQuoteHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/CreateInteropRequestHandler.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/CreateInteropRequestHandler.java index c7224b6eacc..cf89e9b0c8a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/CreateInteropRequestHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/CreateInteropRequestHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/DeleteInteropIdentifierHandler.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/DeleteInteropIdentifierHandler.java index 38240011c6f..3549a0b3da0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/DeleteInteropIdentifierHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/DeleteInteropIdentifierHandler.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import com.google.common.base.Splitter; import com.google.common.base.Strings; + import java.util.List; + import org.apache.fineract.commands.annotation.CommandType; import org.apache.fineract.commands.handler.NewCommandSourceHandler; import org.apache.fineract.infrastructure.core.api.JsonCommand; diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/PrepareInteropTransferHandler.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/PrepareInteropTransferHandler.java index 59de9dda368..45f14744727 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/PrepareInteropTransferHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/PrepareInteropTransferHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/ReleaseInteropTransferHandler.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/ReleaseInteropTransferHandler.java index 4c1dad39980..b6fd1b25b1c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/ReleaseInteropTransferHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/handler/ReleaseInteropTransferHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/serialization/InteropDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/serialization/InteropDataValidator.java index 068b8625579..aeb5608d57a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/serialization/InteropDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/serialization/InteropDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import jakarta.validation.constraints.NotNull; + import java.util.ArrayList; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -57,7 +59,7 @@ public InteropTransferRequestData validateAndParseTransferRequest(JsonCommand co } public InteropIdentifierRequestData validateAndParseCreateIdentifier(@NotNull InteropIdentifierType idType, @NotNull String idValue, - String subIdOrType, JsonCommand command) { + String subIdOrType, JsonCommand command) { final DataValidatorBuilder dataValidator = new DataValidatorBuilder(new ArrayList<>()).resource("interoperation.identifier"); JsonObject element = extractJsonObject(command); diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/service/InteropService.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/service/InteropService.java index a2e79a5ddfc..7d2f12c7a88 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/service/InteropService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/service/InteropService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.interoperation.service; import java.time.LocalDateTime; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.interoperation.data.InteropAccountData; import org.apache.fineract.interoperation.data.InteropIdentifierAccountResponseData; @@ -41,19 +42,19 @@ public interface InteropService { @NonNull InteropTransactionsData getAccountTransactions(@NonNull String accountId, boolean debit, boolean credit, LocalDateTime transactionsFrom, - LocalDateTime transactionsTo); + LocalDateTime transactionsTo); @NonNull InteropIdentifierAccountResponseData getAccountByIdentifier(@NonNull InteropIdentifierType idType, @NonNull String idValue, - String subIdOrType); + String subIdOrType); @NonNull InteropIdentifierAccountResponseData registerAccountIdentifier(@NonNull InteropIdentifierType idType, @NonNull String idValue, - String subIdOrType, @NonNull JsonCommand command); + String subIdOrType, @NonNull JsonCommand command); @NonNull InteropIdentifierAccountResponseData deleteAccountIdentifier(@NonNull InteropIdentifierType idType, @NonNull String idValue, - String subIdOrType); + String subIdOrType); InteropTransactionRequestResponseData getTransactionRequest(@NonNull String transactionCode, @NonNull String requestCode); diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/service/InteropServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/service/InteropServiceImpl.java index a8414585e63..5a5f83dd223 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/service/InteropServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/service/InteropServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import static org.apache.fineract.portfolio.savings.domain.SavingsAccountTransaction.releaseAmount; import jakarta.persistence.PersistenceException; + import java.math.BigDecimal; import java.sql.ResultSet; import java.sql.SQLException; @@ -37,6 +38,7 @@ import java.util.List; import java.util.Locale; import java.util.function.Predicate; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -204,7 +206,7 @@ public InteropAccountData getAccountDetails(@NonNull String accountId) { @Override @Transactional public InteropTransactionsData getAccountTransactions(@NonNull String accountId, boolean debit, boolean credit, - java.time.LocalDateTime transactionsFrom, java.time.LocalDateTime transactionsTo) { + java.time.LocalDateTime transactionsFrom, java.time.LocalDateTime transactionsTo) { SavingsAccount savingsAccount = validateAndGetSavingAccount(accountId); Predicate transFilter = t -> { @@ -256,7 +258,7 @@ public InteropIdentifiersResponseData getAccountIdentifiers(@NonNull String acco @Transactional @Override public InteropIdentifierAccountResponseData getAccountByIdentifier(@NonNull InteropIdentifierType idType, @NonNull String idValue, - String subIdOrType) { + String subIdOrType) { InteropIdentifier identifier = findIdentifier(idType, idValue, subIdOrType); if (identifier == null) { throw new InteropAccountNotFoundException(idType, idValue, subIdOrType); @@ -269,7 +271,7 @@ public InteropIdentifierAccountResponseData getAccountByIdentifier(@NonNull Inte @Transactional @Override public InteropIdentifierAccountResponseData registerAccountIdentifier(@NonNull InteropIdentifierType idType, @NonNull String idValue, - String subIdOrType, @NonNull JsonCommand command) { + String subIdOrType, @NonNull JsonCommand command) { InteropIdentifierRequestData request = dataValidator.validateAndParseCreateIdentifier(idType, idValue, subIdOrType, command); // TODO: error handling SavingsAccount savingsAccount = validateAndGetSavingAccount(request.getAccountId()); @@ -297,7 +299,7 @@ public InteropIdentifierAccountResponseData registerAccountIdentifier(@NonNull I @Transactional @Override public InteropIdentifierAccountResponseData deleteAccountIdentifier(@NonNull InteropIdentifierType idType, @NonNull String idValue, - String subIdOrType) { + String subIdOrType) { InteropIdentifier identifier = findIdentifier(idType, idValue, subIdOrType); if (identifier == null) { throw new InteropAccountNotFoundException(idType, idValue, subIdOrType); @@ -515,7 +517,7 @@ public InteropTransferResponseData commitTransfer(@NonNull JsonCommand command) final InteropServiceImpl.KycMapper rm = new InteropServiceImpl.KycMapper(sqlGenerator); final String sql = "select " + rm.schema() + " where c.id = ?"; - final InteropKycData accountKyc = this.jdbcTemplate.queryForObject(sql, rm, new Object[] { clientId }); // NOSONAR + final InteropKycData accountKyc = this.jdbcTemplate.queryForObject(sql, rm, new Object[]{clientId}); // NOSONAR return InteropKycResponseData.build(accountKyc); } catch (final EmptyResultDataAccessException e) { @@ -647,7 +649,7 @@ public InteropIdentifier findIdentifier(@NonNull InteropIdentifierType idType, @ * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleInteropDataIntegrityIssues(InteropIdentifierType idType, String accountId, final Throwable realCause, - final Exception dve) { + final Exception dve) { if (realCause.getMessage().contains("uk_interop_identifier_account")) { throw new PlatformDataIntegrityException("error.msg.interop.duplicate.account.identifier", "Account identifier of type `" + idType.name() + "' already exists for account with externalId `" + accountId + "`", diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/starter/InteroperationConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/starter/InteroperationConfiguration.java index 69ca7dfefdd..9b4fe418526 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/starter/InteroperationConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/starter/InteroperationConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -48,14 +48,14 @@ public class InteroperationConfiguration { @Bean @ConditionalOnMissingBean(InteropService.class) public InteropService interopService(PlatformSecurityContext securityContext, InteropDataValidator interopDataValidator, - SavingsAccountRepository savingsAccountRepository, SavingsAccountTransactionRepository savingsAccountTransactionRepository, - ApplicationCurrencyRepository applicationCurrencyRepository, NoteRepository noteRepository, - PaymentTypeRepository paymentTypeRepository, InteropIdentifierRepository identifierRepository, - LoanRepositoryWrapper loanRepositoryWrapper, SavingsHelper savingsHelper, - SavingsAccountTransactionSummaryWrapper savingsAccountTransactionSummaryWrapper, - SavingsAccountDomainService savingsAccountService, ConfigurationDomainService configurationDomainService, - JdbcTemplate jdbcTemplate, PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService, - DefaultToApiJsonSerializer toApiJsonSerializer, DatabaseSpecificSQLGenerator sqlGenerator) { + SavingsAccountRepository savingsAccountRepository, SavingsAccountTransactionRepository savingsAccountTransactionRepository, + ApplicationCurrencyRepository applicationCurrencyRepository, NoteRepository noteRepository, + PaymentTypeRepository paymentTypeRepository, InteropIdentifierRepository identifierRepository, + LoanRepositoryWrapper loanRepositoryWrapper, SavingsHelper savingsHelper, + SavingsAccountTransactionSummaryWrapper savingsAccountTransactionSummaryWrapper, + SavingsAccountDomainService savingsAccountService, ConfigurationDomainService configurationDomainService, + JdbcTemplate jdbcTemplate, PortfolioCommandSourceWritePlatformService commandsSourceWritePlatformService, + DefaultToApiJsonSerializer toApiJsonSerializer, DatabaseSpecificSQLGenerator sqlGenerator) { return new InteropServiceImpl(securityContext, interopDataValidator, savingsAccountRepository, savingsAccountTransactionRepository, applicationCurrencyRepository, noteRepository, paymentTypeRepository, identifierRepository, loanRepositoryWrapper, savingsHelper, savingsAccountTransactionSummaryWrapper, savingsAccountService, configurationDomainService, jdbcTemplate, diff --git a/fineract-provider/src/main/java/org/apache/fineract/interoperation/util/InteropUtil.java b/fineract-provider/src/main/java/org/apache/fineract/interoperation/util/InteropUtil.java index e120ac7b538..da304023189 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/interoperation/util/InteropUtil.java +++ b/fineract-provider/src/main/java/org/apache/fineract/interoperation/util/InteropUtil.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/api/NotificationApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/notification/api/NotificationApiResourceSwagger.java index 1036e0257c5..29ad883ec9b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/api/NotificationApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/api/NotificationApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,20 +19,24 @@ package org.apache.fineract.notification.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.List; final class NotificationApiResourceSwagger { - private NotificationApiResourceSwagger() {} + private NotificationApiResourceSwagger() { + } @Schema(description = "GetNotificationsResponse") public static final class GetNotificationsResponse { - private GetNotificationsResponse() {} + private GetNotificationsResponse() { + } static final class GetNotification { - private GetNotification() {} + private GetNotification() { + } @Schema(example = "1") public Long id; diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/cache/CacheNotificationResponseHeader.java b/fineract-provider/src/main/java/org/apache/fineract/notification/cache/CacheNotificationResponseHeader.java index 5f2d50c197a..1f2500f62c5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/cache/CacheNotificationResponseHeader.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/cache/CacheNotificationResponseHeader.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,8 @@ public class CacheNotificationResponseHeader { private boolean hasNotifications; private Long lastFetch; - public CacheNotificationResponseHeader() {} + public CacheNotificationResponseHeader() { + } public CacheNotificationResponseHeader(boolean hasNotifications, Long lastFetch) { this.hasNotifications = hasNotifications; diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/config/MessagingConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/notification/config/MessagingConfiguration.java index f4ea19d2f65..26d642d763f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/config/MessagingConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/config/MessagingConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/data/NotificationMapperData.java b/fineract-provider/src/main/java/org/apache/fineract/notification/data/NotificationMapperData.java index c85155f2193..d8bef368dd5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/data/NotificationMapperData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/data/NotificationMapperData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/domain/Notification.java b/fineract-provider/src/main/java/org/apache/fineract/notification/domain/Notification.java index 05888d1e20d..193b9108e4a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/domain/Notification.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/domain/Notification.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Table; + import java.time.LocalDateTime; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/domain/NotificationMapper.java b/fineract-provider/src/main/java/org/apache/fineract/notification/domain/NotificationMapper.java index a5137f19963..8079aced486 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/domain/NotificationMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/domain/NotificationMapper.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.time.LocalDateTime; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/domain/NotificationMapperRepository.java b/fineract-provider/src/main/java/org/apache/fineract/notification/domain/NotificationMapperRepository.java index 5caabf1cd93..f26e80cdc43 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/domain/NotificationMapperRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/domain/NotificationMapperRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,4 +20,5 @@ import org.springframework.data.jpa.repository.JpaRepository; -public interface NotificationMapperRepository extends JpaRepository {} +public interface NotificationMapperRepository extends JpaRepository { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/domain/NotificationRepository.java b/fineract-provider/src/main/java/org/apache/fineract/notification/domain/NotificationRepository.java index 6b9160ffd4e..b2c3c1c1cda 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/domain/NotificationRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/domain/NotificationRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,4 +20,5 @@ import org.springframework.data.jpa.repository.JpaRepository; -public interface NotificationRepository extends JpaRepository {} +public interface NotificationRepository extends JpaRepository { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/ActiveMQNotificationEventListener.java b/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/ActiveMQNotificationEventListener.java index 3bda17338cc..d1059da0ced 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/ActiveMQNotificationEventListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/ActiveMQNotificationEventListener.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/ActiveMQNotificationEventPublisher.java b/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/ActiveMQNotificationEventPublisher.java index 809b51b77fd..b6c5c34a4cc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/ActiveMQNotificationEventPublisher.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/ActiveMQNotificationEventPublisher.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/NotificationEvent.java b/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/NotificationEvent.java index 65172e0e7c8..71f58d7fca2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/NotificationEvent.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/NotificationEvent.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/NotificationEventListener.java b/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/NotificationEventListener.java index 75eb78f5805..a76c991e3c4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/NotificationEventListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/NotificationEventListener.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/NotificationEventPublisher.java b/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/NotificationEventPublisher.java index 7a2af40cb86..0aeb6483c48 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/NotificationEventPublisher.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/NotificationEventPublisher.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/SpringNotificationEventListener.java b/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/SpringNotificationEventListener.java index b01903eabae..e5880f9829b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/SpringNotificationEventListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/SpringNotificationEventListener.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/SpringNotificationEventPublisher.java b/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/SpringNotificationEventPublisher.java index 9198538b289..5d2c7365dd7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/SpringNotificationEventPublisher.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/eventandlistener/SpringNotificationEventPublisher.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationDomainService.java b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationDomainService.java index 7044aa90e69..c37b622d2f4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationDomainService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationDomainService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationDomainServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationDomainServiceImpl.java index c10f8717f9c..bc86bc06aac 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationDomainServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationDomainServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -314,7 +314,7 @@ public void onBusinessEvent(ShareAccountApproveBusinessEvent event) { } private void buildNotification(String permission, String objectType, Long objectIdentifier, String notificationContent, - String eventType, Long appUserId, Long officeId) { + String eventType, Long appUserId, Long officeId) { userNotificationService.notifyUsers(permission, objectType, objectIdentifier, notificationContent, eventType, appUserId, officeId); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationGeneratorReadRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationGeneratorReadRepositoryWrapper.java index 67cbf3f5281..db985aa228a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationGeneratorReadRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationGeneratorReadRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.notification.service; import java.util.List; + import org.apache.fineract.notification.domain.Notification; public interface NotificationGeneratorReadRepositoryWrapper { diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationGeneratorReadRepositoryWrapperImpl.java b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationGeneratorReadRepositoryWrapperImpl.java index fcec6503cb8..e6305950866 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationGeneratorReadRepositoryWrapperImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationGeneratorReadRepositoryWrapperImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.notification.service; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.notification.domain.Notification; import org.apache.fineract.notification.domain.NotificationRepository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationGeneratorWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationGeneratorWritePlatformService.java index 94feb917d13..5301109eec1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationGeneratorWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationGeneratorWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationGeneratorWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationGeneratorWritePlatformServiceImpl.java index 8824e6be3a0..51bd2bcef72 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationGeneratorWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationGeneratorWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationMapperReadRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationMapperReadRepositoryWrapper.java index 6abc64b236d..48a31252f8c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationMapperReadRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationMapperReadRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.notification.service; import java.util.List; + import org.apache.fineract.notification.domain.NotificationMapper; public interface NotificationMapperReadRepositoryWrapper { diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationMapperReadRepositoryWrapperImpl.java b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationMapperReadRepositoryWrapperImpl.java index a332a45a327..2d566e1fdca 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationMapperReadRepositoryWrapperImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationMapperReadRepositoryWrapperImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.notification.service; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.notification.domain.NotificationMapper; import org.apache.fineract.notification.domain.NotificationMapperRepository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationMapperWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationMapperWritePlatformService.java index fe8b13aba4c..e6859948047 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationMapperWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationMapperWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationMapperWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationMapperWritePlatformServiceImpl.java index c2b95b5f813..57f88873d4a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationMapperWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationMapperWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationReadPlatformService.java index fd631f7038d..be039bbe5f3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationReadPlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationReadPlatformServiceImpl.java index 67e945fc833..91200cd3320 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.sql.SQLException; import java.util.HashMap; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.infrastructure.core.service.PaginationHelper; @@ -80,7 +81,7 @@ private boolean initializeTenantNotificationResponseHeaderCache(Long tenantId, L } private boolean createUpdateCacheValue(Long appUserId, Long now, - HashMap notificationResponseHeaderCache) { + HashMap notificationResponseHeaderCache) { boolean hasNotifications; Long tenantId = ThreadLocalContextUtil.getTenant().getId(); CacheNotificationResponseHeader cacheNotificationResponseHeader; @@ -153,7 +154,7 @@ private Page getNotificationDataPage(SearchParameters searchPa } } - Object[] params = new Object[] { appUserId }; + Object[] params = new Object[]{appUserId}; return this.paginationHelper.fetchPage(this.jdbcTemplate, sqlBuilder.toString(), params, this.notificationDataRow); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationWritePlatformService.java index 65a38804c32..4b5ea11a442 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -23,5 +23,5 @@ public interface NotificationWritePlatformService { Long notify(Collection userIds, String objectType, Long objectId, String action, Long actorId, String notificationContent, - boolean isSystemGenerated); + boolean isSystemGenerated); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationWritePlatformServiceImpl.java index ef5f2399cb7..f1dc1404fd3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/service/NotificationWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.notification.domain.Notification; @@ -39,7 +40,7 @@ public class NotificationWritePlatformServiceImpl implements NotificationWritePl private final NotificationMapperWritePlatformService notificationMapperWritePlatformService; private Long insertIntoNotificationGenerator(String objectType, Long objectIdentifier, String action, Long actorId, - String notificationContent, boolean isSystemGenerated) { + String notificationContent, boolean isSystemGenerated) { Notification notification = new Notification().setObjectType(objectType).setObjectIdentifier(objectIdentifier).setAction(action) .setActorId(actorId).setSystemGenerated(isSystemGenerated).setNotificationContent(notificationContent) @@ -50,7 +51,7 @@ private Long insertIntoNotificationGenerator(String objectType, Long objectIdent @Override public Long notify(Collection userIds, String objectType, Long objectId, String action, Long actorId, String notificationContent, - boolean isSystemGenerated) { + boolean isSystemGenerated) { Long generatedNotificationId = insertIntoNotificationGenerator(objectType, objectId, action, actorId, notificationContent, isSystemGenerated); diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/service/UserNotificationServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/notification/service/UserNotificationServiceImpl.java index 5f06f89869a..6a2c6166752 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/service/UserNotificationServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/service/UserNotificationServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.List; import java.util.Objects; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.config.FineractProperties; @@ -46,7 +47,7 @@ public class UserNotificationServiceImpl implements UserNotificationService { @Override public void notifyUsers(String permission, String objectType, Long objectIdentifier, String notificationContent, String eventType, - Long appUserId, Long officeId) { + Long appUserId, Long officeId) { if (userNotificationSystemIsEnabled()) { String tenantIdentifier = ThreadLocalContextUtil.getTenant().getTenantIdentifier(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/notification/starter/NotificationConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/notification/starter/NotificationConfiguration.java index 4c8766c3838..20f29e877dd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/notification/starter/NotificationConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/notification/starter/NotificationConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -48,14 +48,14 @@ public class NotificationConfiguration { @Bean @ConditionalOnMissingBean(NotificationDomainService.class) public NotificationDomainService notificationDomainService(BusinessEventNotifierService businessEventNotifierService, - PlatformSecurityContext context, UserNotificationService userNotificationService) { + PlatformSecurityContext context, UserNotificationService userNotificationService) { return new NotificationDomainServiceImpl(businessEventNotifierService, context, userNotificationService); } @Bean @ConditionalOnMissingBean(NotificationReadPlatformService.class) public NotificationReadPlatformService notificationReadPlatformService(JdbcTemplate jdbcTemplate, PlatformSecurityContext context, - ColumnValidator columnValidator, PaginationHelper paginationHelper, DatabaseSpecificSQLGenerator sqlGenerator) { + ColumnValidator columnValidator, PaginationHelper paginationHelper, DatabaseSpecificSQLGenerator sqlGenerator) { return new NotificationReadPlatformServiceImpl(jdbcTemplate, context, columnValidator, paginationHelper, sqlGenerator); } @@ -72,9 +72,9 @@ public NotificationWritePlatformService notificationWritePlatformService( @Bean @ConditionalOnMissingBean(UserNotificationService.class) public UserNotificationService userNotificationService(NotificationEventPublisher notificationEventPublisher, - AppUserRepository appUserRepository, FineractProperties fineractProperties, - NotificationReadPlatformService notificationReadPlatformService, - NotificationWritePlatformService notificationWritePlatformService) { + AppUserRepository appUserRepository, FineractProperties fineractProperties, + NotificationReadPlatformService notificationReadPlatformService, + NotificationWritePlatformService notificationWritePlatformService) { return new UserNotificationServiceImpl(notificationEventPublisher, appUserRepository, fineractProperties, notificationReadPlatformService, notificationWritePlatformService); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/api/HolidaysApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/api/HolidaysApiResourceSwagger.java index ca59385e628..6164b2266c5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/api/HolidaysApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/api/HolidaysApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.organisation.holiday.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; /** @@ -140,7 +142,8 @@ private PutHolidaysHolidayIdResponse() { static final class PutHolidaysHolidayIdResponseChanges { - private PutHolidaysHolidayIdResponseChanges() {} + private PutHolidaysHolidayIdResponseChanges() { + } @Schema(example = "Independence day") public String name; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/data/HolidayData.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/data/HolidayData.java index 566446668ed..c5a986565c4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/data/HolidayData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/data/HolidayData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.organisation.holiday.data; import java.time.LocalDate; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/data/HolidayDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/data/HolidayDataValidator.java index 90f43ae5f7c..8c1e80ff5d7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/data/HolidayDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/data/HolidayDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.time.LocalDate; import java.util.ArrayList; @@ -31,6 +32,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -63,7 +65,8 @@ public void validateForCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, HOLIDAY_CREATE_OR_UPDATE_REQUEST_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); @@ -120,7 +123,8 @@ public void validateForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, HOLIDAY_CREATE_OR_UPDATE_REQUEST_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/domain/HolidayRepository.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/domain/HolidayRepository.java index 04bda3706b1..36efdef15d1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/domain/HolidayRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/domain/HolidayRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; @@ -29,7 +30,7 @@ public interface HolidayRepository extends JpaRepository, JpaSpec @Query("select holiday from Holiday holiday, IN(holiday.offices) office where (holiday.fromDate >= :date OR :date <= holiday.toDate) and holiday.status = :status and office.id = :officeId") List findByOfficeIdAndGreaterThanDate(@Param("officeId") Long officeId, @Param("date") LocalDate date, - @Param("status") Integer status); + @Param("status") Integer status); @Query("select holiday from Holiday holiday where holiday.processed = false and holiday.status = :status") List findUnprocessed(@Param("status") Integer status); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/domain/HolidayRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/domain/HolidayRepositoryWrapper.java index ec1956c2870..92bb5d36f99 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/domain/HolidayRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/domain/HolidayRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import org.apache.fineract.organisation.holiday.exception.HolidayNotFoundException; import org.apache.fineract.organisation.holiday.service.HolidayUtil; import org.springframework.beans.factory.annotation.Autowired; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/exception/HolidayDateException.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/exception/HolidayDateException.java index 16349ec960e..5ea9a34be12 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/exception/HolidayDateException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/exception/HolidayDateException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/exception/HolidayNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/exception/HolidayNotFoundException.java index f13b022181b..14a42fcb7b8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/exception/HolidayNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/exception/HolidayNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/handler/ActivateHolidayCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/handler/ActivateHolidayCommandHandler.java index 62df041e505..f391daef7f0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/handler/ActivateHolidayCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/handler/ActivateHolidayCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/handler/CreateHolidayCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/handler/CreateHolidayCommandHandler.java index 02cc70baab2..91beeebc650 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/handler/CreateHolidayCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/handler/CreateHolidayCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/handler/DeleteHolidayCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/handler/DeleteHolidayCommandHandler.java index 10a36a6d20c..938da925f0b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/handler/DeleteHolidayCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/handler/DeleteHolidayCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/handler/UpdateHolidayCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/handler/UpdateHolidayCommandHandler.java index 114973021e9..8b7c7b2136d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/handler/UpdateHolidayCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/handler/UpdateHolidayCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayEnumerations.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayEnumerations.java index 76c6b48db52..807ecfbdab8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayEnumerations.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -38,19 +38,19 @@ public static EnumOptionData holidayStatusType(final HolidayStatusType type) { case INVALID: optionData = new EnumOptionData(HolidayStatusType.INVALID.getValue().longValue(), HolidayStatusType.INVALID.getCode(), "Invalid"); - break; + break; case PENDING_FOR_ACTIVATION: optionData = new EnumOptionData(HolidayStatusType.PENDING_FOR_ACTIVATION.getValue().longValue(), HolidayStatusType.PENDING_FOR_ACTIVATION.getCode(), "Pending for activation"); - break; + break; case ACTIVE: optionData = new EnumOptionData(HolidayStatusType.ACTIVE.getValue().longValue(), HolidayStatusType.ACTIVE.getCode(), "Active"); - break; + break; case DELETED: optionData = new EnumOptionData(HolidayStatusType.DELETED.getValue().longValue(), HolidayStatusType.DELETED.getCode(), "Deleted"); - break; + break; } return optionData; } @@ -65,15 +65,15 @@ public static EnumOptionData rescheduleType(final RescheduleType type) { case RESCHEDULETONEXTREPAYMENTDATE: optionData = new EnumOptionData(RescheduleType.RESCHEDULETONEXTREPAYMENTDATE.getValue().longValue(), RescheduleType.RESCHEDULETONEXTREPAYMENTDATE.getCode(), "Reschedule to next repayment date"); - break; + break; case RESCHEDULETOSPECIFICDATE: optionData = new EnumOptionData(RescheduleType.RESCHEDULETOSPECIFICDATE.getValue().longValue(), RescheduleType.RESCHEDULETOSPECIFICDATE.getCode(), "Reschedule to specified date"); - break; + break; default: optionData = new EnumOptionData(RescheduleType.INVALID.getValue().longValue(), RescheduleType.INVALID.getCode(), "Invalid"); - break; + break; } return optionData; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayReadPlatformService.java index 356b6b1bc27..d234e93d539 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.Collection; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.organisation.holiday.data.HolidayData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayReadPlatformServiceImpl.java index 94f9e7b058c..f9b4dc88c14 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; @@ -80,7 +81,7 @@ public HolidayData mapRow(final ResultSet rs, @SuppressWarnings("unused") final @Override public Collection retrieveAllHolidaysBySearchParamerters(final Long officeId, final LocalDate fromDate, - final LocalDate toDate) { + final LocalDate toDate) { this.context.authenticatedUser(); final DateTimeFormatter df = DateUtils.DEFAULT_DATE_FORMATTER; @@ -124,7 +125,7 @@ public HolidayData retrieveHoliday(Long holidayId) { final String sql = " select " + rm.schema() + " where h.id = ?"; - return this.jdbcTemplate.queryForObject(sql, rm, new Object[] { holidayId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, rm, new Object[]{holidayId}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new HolidayNotFoundException(holidayId, e); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayWritePlatformService.java index 44927c67e3e..ba9985b1741 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/holiday/service/HolidayWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/service/CurrencyWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/service/CurrencyWritePlatformServiceJpaRepositoryImpl.java index 20d7f300f12..d08f665cbe1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/service/CurrencyWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/service/CurrencyWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.organisation.monetary.data.CurrencyUpdateRequest; import org.apache.fineract.organisation.monetary.data.CurrencyUpdateResponse; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/starter/OrganisationMonetaryConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/starter/OrganisationMonetaryConfiguration.java index 0db76dd7b7a..546f9cbba72 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/starter/OrganisationMonetaryConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/monetary/starter/OrganisationMonetaryConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -46,8 +46,8 @@ public CurrencyReadPlatformService currencyReadPlatformService(JdbcTemplate jdbc @Bean @ConditionalOnMissingBean(CurrencyWritePlatformService.class) public CurrencyWritePlatformService currencyWritePlatformService(ApplicationCurrencyRepositoryWrapper applicationCurrencyRepository, - OrganisationCurrencyRepository organisationCurrencyRepository, LoanProductReadPlatformService loanProductService, - SavingsProductReadPlatformService savingsProductService, ChargeReadPlatformService chargeService) { + OrganisationCurrencyRepository organisationCurrencyRepository, LoanProductReadPlatformService loanProductService, + SavingsProductReadPlatformService savingsProductService, ChargeReadPlatformService chargeService) { return new CurrencyWritePlatformServiceJpaRepositoryImpl(applicationCurrencyRepository, organisationCurrencyRepository, loanProductService, savingsProductService, chargeService); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficeSwaggerMapper.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficeSwaggerMapper.java index 93a80caebe0..44023fe7b29 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficeSwaggerMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficeSwaggerMapper.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Map; import java.util.Optional; + import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.organisation.office.data.OfficeData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResourceSwagger.java index ce5c2f0d240..5444924ca5a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/api/OfficesApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.organisation.office.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; import java.util.Collection; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/domain/OfficeTransaction.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/domain/OfficeTransaction.java index c4e456eb48e..bead3471e06 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/domain/OfficeTransaction.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/domain/OfficeTransaction.java @@ -6,9 +6,9 @@ * 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 @@ -25,8 +25,10 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; @@ -57,7 +59,7 @@ public class OfficeTransaction extends AbstractPersistableCustom { private String description; public static OfficeTransaction fromJson(final Office fromOffice, final Office toOffice, final Money amount, - final JsonCommand command) { + final JsonCommand command) { final LocalDate transactionLocalDate = command.localDateValueOfParameterNamed("transactionDate"); final String description = command.stringValueOfParameterNamed("description"); @@ -70,7 +72,7 @@ protected OfficeTransaction() { } private OfficeTransaction(final Office fromOffice, final Office toOffice, final LocalDate transactionLocalDate, final Money amount, - final String description) { + final String description) { this.from = fromOffice; this.to = toOffice; if (transactionLocalDate != null) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/domain/OfficeTransactionRepository.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/domain/OfficeTransactionRepository.java index 3497d97bc5a..ad31986630f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/domain/OfficeTransactionRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/domain/OfficeTransactionRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/exception/InvalidOfficeException.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/exception/InvalidOfficeException.java index 4a4c989d089..1390f6617a4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/exception/InvalidOfficeException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/exception/InvalidOfficeException.java @@ -6,9 +6,9 @@ * 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 @@ -26,7 +26,7 @@ public class InvalidOfficeException extends AbstractPlatformDomainRuleException { public InvalidOfficeException(final String entity, final String postFix, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg." + entity + "." + postFix + ".invalid.office", defaultUserMessage, defaultUserMessageArgs); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/exception/OfficeTransactionNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/exception/OfficeTransactionNotFoundException.java index 85d4941f5ef..0a770d4124d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/exception/OfficeTransactionNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/exception/OfficeTransactionNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/handler/CreateOfficeCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/handler/CreateOfficeCommandHandler.java index 2823039444c..e70a381f473 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/handler/CreateOfficeCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/handler/CreateOfficeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/handler/CreateOfficeTransactionCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/handler/CreateOfficeTransactionCommandHandler.java index 87782022160..b9a2dcd0263 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/handler/CreateOfficeTransactionCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/handler/CreateOfficeTransactionCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/handler/DeleteOfficeTransactionCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/handler/DeleteOfficeTransactionCommandHandler.java index 4a2c55333ee..a2c55246fbe 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/handler/DeleteOfficeTransactionCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/handler/DeleteOfficeTransactionCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/handler/UpdateOfficeCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/handler/UpdateOfficeCommandHandler.java index b505455ef32..51bee6f28c5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/handler/UpdateOfficeCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/handler/UpdateOfficeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/serialization/OfficeCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/serialization/OfficeCommandFromApiJsonDeserializer.java index 4e6f7ea15dc..f6717dd3d6f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/serialization/OfficeCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/serialization/OfficeCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.time.LocalDate; import java.util.ArrayList; @@ -28,6 +29,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -67,7 +69,8 @@ public void validateForCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -106,7 +109,8 @@ public void validateForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/serialization/OfficeTransactionCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/serialization/OfficeTransactionCommandFromApiJsonDeserializer.java index 8029c28e0ca..11dea0c34cb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/serialization/OfficeTransactionCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/serialization/OfficeTransactionCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -29,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/service/OfficeReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/service/OfficeReadPlatformServiceImpl.java index d7b3a735b7f..dd731a2bbee 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/service/OfficeReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/service/OfficeReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.Collection; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; @@ -171,7 +172,7 @@ public Collection retrieveAllOffices(final boolean includeAllOffices } } - return this.jdbcTemplate.query(sqlBuilder.toString(), rm, new Object[] { hierarchySearchString }); // NOSONAR + return this.jdbcTemplate.query(sqlBuilder.toString(), rm, new Object[]{hierarchySearchString}); // NOSONAR } @Override @@ -185,7 +186,7 @@ public Collection retrieveAllOfficesForDropdown() { final OfficeDropdownMapper rm = new OfficeDropdownMapper(); final String sql = "select " + rm.schema() + "where o.hierarchy like ? order by o.hierarchy"; - return this.jdbcTemplate.query(sql, rm, new Object[] { hierarchySearchString }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{hierarchySearchString}); // NOSONAR } @Override @@ -198,7 +199,7 @@ public OfficeData retrieveOffice(final Long officeId) { final OfficeMapper rm = new OfficeMapper(); final String sql = "select " + rm.officeSchema() + " where o.id = ?"; - final OfficeData selectedOffice = this.jdbcTemplate.queryForObject(sql, rm, new Object[] { officeId }); // NOSONAR + final OfficeData selectedOffice = this.jdbcTemplate.queryForObject(sql, rm, new Object[]{officeId}); // NOSONAR return selectedOffice; } catch (final EmptyResultDataAccessException e) { @@ -256,7 +257,7 @@ public Collection retrieveAllOfficeTransactions() { final String sql = "select " + rm.schema() + " where (fromoff.hierarchy like ? or tooff.hierarchy like ?) order by ot.transaction_date, ot.id"; - return this.jdbcTemplate.query(sql, rm, new Object[] { hierarchySearchString, hierarchySearchString }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{hierarchySearchString, hierarchySearchString}); // NOSONAR } @Override diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/service/OfficeWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/service/OfficeWritePlatformService.java index 5cf0fbd8a5a..409e3da96ad 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/service/OfficeWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/service/OfficeWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/service/OfficeWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/service/OfficeWritePlatformServiceJpaRepositoryImpl.java index edc4180c109..94525bf9f96 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/service/OfficeWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/service/OfficeWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.organisation.office.service; import jakarta.persistence.PersistenceException; + import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; @@ -62,7 +64,7 @@ public class OfficeWritePlatformServiceJpaRepositoryImpl implements OfficeWriteP @Override @Caching(evict = { @CacheEvict(value = "offices", key = "T(org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil).getTenant().getTenantIdentifier().concat(#root.target.context.authenticatedUser().getOffice().getHierarchy()+'of')"), - @CacheEvict(value = "officesForDropdown", key = "T(org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil).getTenant().getTenantIdentifier().concat(#root.target.context.authenticatedUser().getOffice().getHierarchy()+'ofd')") }) + @CacheEvict(value = "officesForDropdown", key = "T(org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil).getTenant().getTenantIdentifier().concat(#root.target.context.authenticatedUser().getOffice().getHierarchy()+'ofd')")}) public CommandProcessingResult createOffice(final JsonCommand command) { try { @@ -105,7 +107,7 @@ public CommandProcessingResult createOffice(final JsonCommand command) { @Caching(evict = { @CacheEvict(value = "offices", key = "T(org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil).getTenant().getTenantIdentifier().concat(#root.target.context.authenticatedUser().getOffice().getHierarchy()+'of')"), @CacheEvict(value = "officesForDropdown", key = "T(org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil).getTenant().getTenantIdentifier().concat(#root.target.context.authenticatedUser().getOffice().getHierarchy()+'ofd')"), - @CacheEvict(value = "officesById", key = "T(org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil).getTenant().getTenantIdentifier().concat(#officeId)") }) + @CacheEvict(value = "officesById", key = "T(org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil).getTenant().getTenantIdentifier().concat(#officeId)")}) public CommandProcessingResult updateOffice(final Long officeId, final JsonCommand command) { try { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/starter/OrganisationOfficeConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/starter/OrganisationOfficeConfiguration.java index e07746e6c90..e92a3f41deb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/office/starter/OrganisationOfficeConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/office/starter/OrganisationOfficeConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -44,8 +44,8 @@ public class OrganisationOfficeConfiguration { @Bean @ConditionalOnMissingBean(OfficeReadPlatformService.class) public OfficeReadPlatformService officeReadPlatformService(JdbcTemplate jdbcTemplate, DatabaseSpecificSQLGenerator sqlGenerator, - PlatformSecurityContext context, CurrencyReadPlatformService currencyReadPlatformService, ColumnValidator columnValidator, - OfficeRepository officeRepository, OfficeDataMapper officeDataMapper) { + PlatformSecurityContext context, CurrencyReadPlatformService currencyReadPlatformService, ColumnValidator columnValidator, + OfficeRepository officeRepository, OfficeDataMapper officeDataMapper) { return new OfficeReadPlatformServiceImpl(jdbcTemplate, sqlGenerator, context, currencyReadPlatformService, columnValidator, officeRepository, officeDataMapper); } @@ -53,10 +53,10 @@ public OfficeReadPlatformService officeReadPlatformService(JdbcTemplate jdbcTemp @Bean @ConditionalOnMissingBean(OfficeWritePlatformService.class) public OfficeWritePlatformService officeWritePlatformService(PlatformSecurityContext context, - OfficeCommandFromApiJsonDeserializer fromApiJsonDeserializer, - OfficeTransactionCommandFromApiJsonDeserializer moneyTransferCommandFromApiJsonDeserializer, - OfficeRepositoryWrapper officeRepositoryWrapper, OfficeTransactionRepository officeTransactionRepository, - ApplicationCurrencyRepositoryWrapper applicationCurrencyRepository) { + OfficeCommandFromApiJsonDeserializer fromApiJsonDeserializer, + OfficeTransactionCommandFromApiJsonDeserializer moneyTransferCommandFromApiJsonDeserializer, + OfficeRepositoryWrapper officeRepositoryWrapper, OfficeTransactionRepository officeTransactionRepository, + ApplicationCurrencyRepositoryWrapper applicationCurrencyRepository) { return new OfficeWritePlatformServiceJpaRepositoryImpl(context, fromApiJsonDeserializer, moneyTransferCommandFromApiJsonDeserializer, officeRepositoryWrapper, officeTransactionRepository, applicationCurrencyRepository); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCriteriaApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCriteriaApiResourceSwagger.java index afe7f739ddb..1f0d00b2340 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCriteriaApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/api/ProvisioningCriteriaApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.organisation.provisioning.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.Collection; + import org.apache.fineract.organisation.provisioning.data.ProvisioningCriteriaDefinitionData; import org.apache.fineract.portfolio.loanproduct.data.LoanProductData; @@ -110,7 +112,8 @@ private PutProvisioningCriteriaResponse() { static final class PutProvisioningCriteriaResponseChanges { - private PutProvisioningCriteriaResponseChanges() {} + private PutProvisioningCriteriaResponseChanges() { + } @Schema(example = "High Risk Products Criteria") public String criteriaName; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/constants/ProvisioningCriteriaConstants.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/constants/ProvisioningCriteriaConstants.java index d9ebd5496c9..771804bd564 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/constants/ProvisioningCriteriaConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/constants/ProvisioningCriteriaConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/data/ProvisioningCriteriaData.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/data/ProvisioningCriteriaData.java index a091f673ff5..f8f58049900 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/data/ProvisioningCriteriaData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/data/ProvisioningCriteriaData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serializable; import java.util.Collection; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; @@ -44,7 +45,7 @@ public final class ProvisioningCriteriaData implements Comparable glAccounts; private ProvisioningCriteriaData(final Long criteriaId, final String criteriaName, final Collection loanProducts, - Collection definitions, Collection glAccounts, final String createdBy) { + Collection definitions, Collection glAccounts, final String createdBy) { this.criteriaId = criteriaId; this.criteriaName = criteriaName; this.loanProducts = loanProducts; @@ -54,7 +55,7 @@ private ProvisioningCriteriaData(final Long criteriaId, final String criteriaNam } private ProvisioningCriteriaData(ProvisioningCriteriaData data, final Collection loanProducts, - Collection glAccounts) { + Collection glAccounts) { this.criteriaId = data.criteriaId; this.criteriaName = data.criteriaName; this.selectedLoanProducts = data.loanProducts; @@ -66,7 +67,7 @@ private ProvisioningCriteriaData(ProvisioningCriteriaData data, final Collection } public static ProvisioningCriteriaData toLookup(final Long criteriaId, final String criteriaName, - final Collection loanProducts, final List definitions) { + final Collection loanProducts, final List definitions) { Collection glAccounts = null; String createdBy = null; return new ProvisioningCriteriaData().setCriteriaId(criteriaId).setCriteriaName(criteriaName).setLoanProducts(loanProducts) @@ -82,7 +83,7 @@ public static ProvisioningCriteriaData toLookup(final Long criteriaId, final Str } public static ProvisioningCriteriaData toTemplate(final Collection definitions, - final Collection loanProducts, final Collection glAccounts) { + final Collection loanProducts, final Collection glAccounts) { Long criteriaId = null; String criteriaName = null; String createdBy = null; @@ -91,8 +92,8 @@ public static ProvisioningCriteriaData toTemplate(final Collection definitions, final Collection loanProducts, - final Collection glAccounts) { + final Collection definitions, final Collection loanProducts, + final Collection glAccounts) { return new ProvisioningCriteriaData(data, loanProducts, glAccounts); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/data/ProvisioningCriteriaDefinitionData.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/data/ProvisioningCriteriaDefinitionData.java index cbf5a6af41d..3029ac4379a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/data/ProvisioningCriteriaDefinitionData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/data/ProvisioningCriteriaDefinitionData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.math.BigDecimal; + import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/LoanProductProvisionCriteria.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/LoanProductProvisionCriteria.java index 14f4acf9950..d8602d1001f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/LoanProductProvisionCriteria.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/LoanProductProvisionCriteria.java @@ -6,9 +6,9 @@ * 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 @@ -28,7 +28,7 @@ @Entity @Table(name = "m_loanproduct_provisioning_mapping", uniqueConstraints = { - @UniqueConstraint(columnNames = { "product_id" }, name = "product_id") }) + @UniqueConstraint(columnNames = {"product_id"}, name = "product_id")}) public class LoanProductProvisionCriteria extends AbstractPersistableCustom { @ManyToOne(optional = false) diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCategory.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCategory.java index 8e2ad1f519c..2a732a4c1a6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCategory.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCategory.java @@ -6,9 +6,9 @@ * 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 @@ -22,13 +22,15 @@ import jakarta.persistence.Entity; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.util.LinkedHashMap; import java.util.Map; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @Entity -@Table(name = "m_provision_category", uniqueConstraints = { @UniqueConstraint(columnNames = { "category_name" }, name = "category_name") }) +@Table(name = "m_provision_category", uniqueConstraints = {@UniqueConstraint(columnNames = {"category_name"}, name = "category_name")}) public class ProvisioningCategory extends AbstractPersistableCustom { @Column(name = "category_name", nullable = false, unique = true) diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCategoryRepository.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCategoryRepository.java index bea02b65699..910e4ebe2a8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCategoryRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCategoryRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteria.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteria.java index d01ffc90aef..4b0f893e827 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteria.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteria.java @@ -6,9 +6,9 @@ * 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 @@ -25,12 +25,14 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.time.LocalDateTime; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.fineract.accounting.glaccount.domain.GLAccount; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.domain.AbstractAuditableCustom; @@ -41,7 +43,7 @@ @Entity @Table(name = "m_provisioning_criteria", uniqueConstraints = { - @UniqueConstraint(columnNames = { "criteria_name" }, name = "criteria_name") }) + @UniqueConstraint(columnNames = {"criteria_name"}, name = "criteria_name")}) public class ProvisioningCriteria extends AbstractAuditableCustom { @Column(name = "criteria_name", nullable = false) @@ -66,7 +68,7 @@ protected ProvisioningCriteria() { } public ProvisioningCriteria(String criteriaName, AppUser createdBy, LocalDateTime createdDate, AppUser lastModifiedBy, - LocalDateTime lastModifiedDate) { + LocalDateTime lastModifiedDate) { this.criteriaName = criteriaName; setCreatedBy(createdBy.getId()); setCreatedDate(createdDate); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteriaDefinition.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteriaDefinition.java index de5c3ac14c5..6e3c74509fb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteriaDefinition.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteriaDefinition.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; + import org.apache.fineract.accounting.glaccount.domain.GLAccount; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @@ -61,7 +63,7 @@ protected ProvisioningCriteriaDefinition() { } private ProvisioningCriteriaDefinition(ProvisioningCriteria criteria, ProvisioningCategory provisioningCategory, Long minimumAge, - Long maximumAge, BigDecimal provisioningPercentage, GLAccount liabilityAccount, GLAccount expenseAccount) { + Long maximumAge, BigDecimal provisioningPercentage, GLAccount liabilityAccount, GLAccount expenseAccount) { this.criteria = criteria; this.provisioningCategory = provisioningCategory; this.minimumAge = minimumAge; @@ -72,8 +74,8 @@ private ProvisioningCriteriaDefinition(ProvisioningCriteria criteria, Provisioni } public static ProvisioningCriteriaDefinition newPrivisioningCriteria(ProvisioningCriteria criteria, - ProvisioningCategory provisioningCategory, Long minimumAge, Long maximumAge, BigDecimal provisioningPercentage, - GLAccount liabilityAccount, GLAccount expenseAccount) { + ProvisioningCategory provisioningCategory, Long minimumAge, Long maximumAge, BigDecimal provisioningPercentage, + GLAccount liabilityAccount, GLAccount expenseAccount) { return new ProvisioningCriteriaDefinition(criteria, provisioningCategory, minimumAge, maximumAge, provisioningPercentage, liabilityAccount, expenseAccount); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteriaDefinitionRepository.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteriaDefinitionRepository.java index 22089d5c660..384255293f9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteriaDefinitionRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteriaDefinitionRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteriaRepository.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteriaRepository.java index 6592a222d68..109b350c0c5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteriaRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/domain/ProvisioningCriteriaRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCategoryCannotBeDeletedException.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCategoryCannotBeDeletedException.java index cbf21d236b9..373dc670115 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCategoryCannotBeDeletedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCategoryCannotBeDeletedException.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,7 @@ public class ProvisioningCategoryCannotBeDeletedException extends AbstractPlatformDomainRuleException { public ProvisioningCategoryCannotBeDeletedException(final String globalisationMessageCode, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super(globalisationMessageCode, defaultUserMessage, defaultUserMessageArgs); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCategoryNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCategoryNotFoundException.java index d83758fdb82..a1d116aaa6b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCategoryNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCategoryNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCriteriaCannotBeDeletedException.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCriteriaCannotBeDeletedException.java index 87444439913..33146ed5618 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCriteriaCannotBeDeletedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCriteriaCannotBeDeletedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCriteriaOverlappingDefinitionException.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCriteriaOverlappingDefinitionException.java index a9a0b39006b..8293479064f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCriteriaOverlappingDefinitionException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/exception/ProvisioningCriteriaOverlappingDefinitionException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/CreateProvisioningCategoryRequestCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/CreateProvisioningCategoryRequestCommandHandler.java index 4df2a01782f..d6c757d897e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/CreateProvisioningCategoryRequestCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/CreateProvisioningCategoryRequestCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/CreateProvisioningCriteriaRequestCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/CreateProvisioningCriteriaRequestCommandHandler.java index 8ae8af25a75..3bb08fa434f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/CreateProvisioningCriteriaRequestCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/CreateProvisioningCriteriaRequestCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/DeleteProvisioningCategoryRequestCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/DeleteProvisioningCategoryRequestCommandHandler.java index 1fb41a5d143..e647a2ce6da 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/DeleteProvisioningCategoryRequestCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/DeleteProvisioningCategoryRequestCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/DeleteProvisioningCriteriaRequestCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/DeleteProvisioningCriteriaRequestCommandHandler.java index 9dfb476d45c..07c54d9cab2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/DeleteProvisioningCriteriaRequestCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/DeleteProvisioningCriteriaRequestCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/UpdateProvisioningCategoryRequestCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/UpdateProvisioningCategoryRequestCommandHandler.java index 325b22ec3e7..e9fa37ecb68 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/UpdateProvisioningCategoryRequestCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/UpdateProvisioningCategoryRequestCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/UpdateProvisioningCriteriaRequestCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/UpdateProvisioningCriteriaRequestCommandHandler.java index d62763ea261..43ac8be83a8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/UpdateProvisioningCriteriaRequestCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/handler/UpdateProvisioningCriteriaRequestCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/serialization/ProvisioningCategoryDefinitionJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/serialization/ProvisioningCategoryDefinitionJsonDeserializer.java index 96b0d2b91e1..e5f27103a69 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/serialization/ProvisioningCategoryDefinitionJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/serialization/ProvisioningCategoryDefinitionJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -27,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/serialization/ProvisioningCriteriaDefinitionJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/serialization/ProvisioningCriteriaDefinitionJsonDeserializer.java index 4b2d43b9672..e14f1fcae9a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/serialization/ProvisioningCriteriaDefinitionJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/serialization/ProvisioningCriteriaDefinitionJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.util.ArrayList; @@ -31,6 +32,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -70,7 +72,8 @@ public void validateForCreate(final String json) { "criterianame, loanproducts[], provisioningcriteria[] params are missing in the request"); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, supportedParametersForCreate); final List dataValidationErrors = new ArrayList<>(); @@ -157,7 +160,8 @@ public void validateForUpdate(final String json) { "update params are missing in the request"); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, supportedParametersForUpdate); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryReadPlatformServiceImpl.java index 95c7b4e644e..b6a341c47c7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.organisation.provisioning.data.ProvisioningCategoryData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryWritePlatformServiceJpaRepositoryImpl.java index bd2c9dd8980..6265559b456 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCategoryWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.organisation.provisioning.service; import jakarta.persistence.PersistenceException; + import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; @@ -109,7 +111,7 @@ public CommandProcessingResult updateProvisioningCategory(final Long categoryId, private boolean isAnyLoanProductsAssociateWithThisProvisioningCategory(final Long categoryID) { final String sql = "select (CASE WHEN (exists (select 1 from m_loanproduct_provisioning_details lpd where lpd.category_id = ?)) = 1 THEN 'true' ELSE 'false' END)"; - final String isLoansUsingCharge = this.jdbcTemplate.queryForObject(sql, String.class, new Object[] { categoryID }); + final String isLoansUsingCharge = this.jdbcTemplate.queryForObject(sql, String.class, new Object[]{categoryID}); return Boolean.valueOf(isLoansUsingCharge); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaReadPlatformService.java index 5a7974bbff1..cd6a66a0fdf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.organisation.provisioning.service; import java.util.List; + import org.apache.fineract.organisation.provisioning.data.ProvisioningCriteriaData; public interface ProvisioningCriteriaReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaReadPlatformServiceImpl.java index a75d5576d2a..629878b6bc5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.glaccount.data.GLAccountData; import org.apache.fineract.accounting.glaccount.service.GLAccountReadPlatformService; @@ -116,7 +117,7 @@ public ProvisioningCriteriaData retrieveProvisioningCriteria(Long criteriaId) { private List retrieveProvisioningDefinitions(Long criteriaId) { ProvisioningCriteriaDefinitionRowMapper rowMapper = new ProvisioningCriteriaDefinitionRowMapper(); final String sql = "select " + rowMapper.schema() + " where pc.criteria_id = ?"; - return this.jdbcTemplate.query(sql, rowMapper, new Object[] { criteriaId }); // NOSONAR + return this.jdbcTemplate.query(sql, rowMapper, new Object[]{criteriaId}); // NOSONAR } private static final class ProvisioningCriteriaDefinitionRowMapper implements RowMapper { @@ -160,7 +161,7 @@ public String schema() { private String retrieveCriteriaName(Long criteriaId) { ProvisioningCriteriaNameRowMapper rowMapper = new ProvisioningCriteriaNameRowMapper(); final String sql = "select " + rowMapper.schema() + " from m_provisioning_criteria pc where pc.id = ?"; - return this.jdbcTemplate.queryForObject(sql, rowMapper, new Object[] { criteriaId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, rowMapper, new Object[]{criteriaId}); // NOSONAR } private static final class ProvisioningCriteriaNameRowMapper implements RowMapper { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaWritePlatformServiceJpaRepositoryImpl.java index a3438a5c2ed..af69802ae90 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/service/ProvisioningCriteriaWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,10 +22,12 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import jakarta.persistence.PersistenceException; + import java.math.BigDecimal; import java.util.List; import java.util.Locale; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/starter/OrganisationProvisioningConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/starter/OrganisationProvisioningConfiguration.java index aaa6de8a515..f634d4b3084 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/starter/OrganisationProvisioningConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/provisioning/starter/OrganisationProvisioningConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -64,8 +64,8 @@ public ProvisioningCategoryWritePlatformService provisioningCategoryWritePlatfor @Bean @ConditionalOnMissingBean(ProvisioningCriteriaAssembler.class) public ProvisioningCriteriaAssembler provisioningCriteriaAssembler(FromJsonHelper fromApiJsonHelper, - ProvisioningCategoryRepository provisioningCategoryRepository, LoanProductRepository loanProductRepository, - GLAccountRepository glAccountRepository, PlatformSecurityContext platformSecurityContext) { + ProvisioningCategoryRepository provisioningCategoryRepository, LoanProductRepository loanProductRepository, + GLAccountRepository glAccountRepository, PlatformSecurityContext platformSecurityContext) { return new ProvisioningCriteriaAssembler(fromApiJsonHelper, provisioningCategoryRepository, loanProductRepository, glAccountRepository, platformSecurityContext); } @@ -73,9 +73,9 @@ public ProvisioningCriteriaAssembler provisioningCriteriaAssembler(FromJsonHelpe @Bean @ConditionalOnMissingBean(ProvisioningCriteriaReadPlatformService.class) public ProvisioningCriteriaReadPlatformService provisioningCriteriaReadPlatformService(JdbcTemplate jdbcTemplate, - ProvisioningCategoryReadPlatformService provisioningCategoryReadPlatformService, - LoanProductReadPlatformService loanProductReadPlatformService, GLAccountReadPlatformService glAccountReadPlatformService, - LoanProductReadPlatformService loanProductReaPlatformService) { + ProvisioningCategoryReadPlatformService provisioningCategoryReadPlatformService, + LoanProductReadPlatformService loanProductReadPlatformService, GLAccountReadPlatformService glAccountReadPlatformService, + LoanProductReadPlatformService loanProductReaPlatformService) { return new ProvisioningCriteriaReadPlatformServiceImpl(jdbcTemplate, provisioningCategoryReadPlatformService, loanProductReadPlatformService, glAccountReadPlatformService, loanProductReaPlatformService); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/adapter/StaffImageIdAdapter.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/adapter/StaffImageIdAdapter.java index 768c4701247..8c4dc1502e2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/adapter/StaffImageIdAdapter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/adapter/StaffImageIdAdapter.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static java.util.Objects.nonNull; import java.util.Optional; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.documentmanagement.adapter.EntityImageIdAdapter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/command/StaffCreateCommand.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/command/StaffCreateCommand.java index be114d1164d..fcbadb7b78d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/command/StaffCreateCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/command/StaffCreateCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class StaffCreateCommand extends Command {} +public class StaffCreateCommand extends Command { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/command/StaffUpdateCommand.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/command/StaffUpdateCommand.java index 62cb6557753..9c17735906f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/command/StaffUpdateCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/command/StaffUpdateCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class StaffUpdateCommand extends Command {} +public class StaffUpdateCommand extends Command { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/command/StaffUploadCommand.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/command/StaffUploadCommand.java index 20ce42e06e2..0788eeeb4fe 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/command/StaffUploadCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/command/StaffUploadCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class StaffUploadCommand extends Command {} +public class StaffUploadCommand extends Command { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffCreateRequest.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffCreateRequest.java index c526a605f8c..2cdc0e5165f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffCreateRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffCreateRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,8 +20,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import jakarta.validation.constraints.NotNull; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffCreateResponse.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffCreateResponse.java index a511ea08975..4aae851c09f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffCreateResponse.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffCreateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffUpdateRequest.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffUpdateRequest.java index e8d5b41f7e9..57e58ea614b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffUpdateRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffUpdateRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,8 +20,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.v3.oas.annotations.Hidden; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffUpdateResponse.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffUpdateResponse.java index a3f94bd1a90..6cf33e5def1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffUpdateResponse.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffUpdateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.util.Map; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffUploadRequest.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffUploadRequest.java index 01861988211..f65b47c81b0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffUploadRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffUploadRequest.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.organisation.staff.data; import io.swagger.v3.oas.annotations.media.Schema; + import java.io.File; import java.io.InputStream; import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffUploadResponse.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffUploadResponse.java index e77f594a08b..b4b01a44f9d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffUploadResponse.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/data/StaffUploadResponse.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/domain/StaffRepository.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/domain/StaffRepository.java index 95b665aa5b5..b15a12de565 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/domain/StaffRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/domain/StaffRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.organisation.staff.domain; import java.util.Optional; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Modifying; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/domain/StaffRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/domain/StaffRepositoryWrapper.java index 01ce2949efa..e3ae6c7bf16 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/domain/StaffRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/domain/StaffRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/exception/StaffRoleException.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/exception/StaffRoleException.java index e5a14f95ee8..3086d915804 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/exception/StaffRoleException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/exception/StaffRoleException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/handler/StaffCreateCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/handler/StaffCreateCommandHandler.java index 0d24783f207..4b7249dbfda 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/handler/StaffCreateCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/handler/StaffCreateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/handler/StaffUpdateCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/handler/StaffUpdateCommandHandler.java index c8e4b74bb1d..947cb659c23 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/handler/StaffUpdateCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/handler/StaffUpdateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/handler/StaffUploadCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/handler/StaffUploadCommandHandler.java index f9a546349d2..bcb6dfc6806 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/handler/StaffUploadCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/handler/StaffUploadCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/mapper/StaffCreateRequestMapper.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/mapper/StaffCreateRequestMapper.java index 51665ffc45a..0e5daf1b478 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/mapper/StaffCreateRequestMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/mapper/StaffCreateRequestMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/mapper/StaffDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/mapper/StaffDataMapper.java index e4e6b6ea146..c2cab069a6b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/mapper/StaffDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/mapper/StaffDataMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/mapper/StaffDateMapper.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/mapper/StaffDateMapper.java index eb7b6fc0395..4861305a86d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/mapper/StaffDateMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/mapper/StaffDateMapper.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.Optional; + import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Component; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffReadService.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffReadService.java index 2f97b26e475..256e3aebcac 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffReadService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffReadService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.organisation.staff.service; import java.util.List; + import org.apache.fineract.organisation.staff.data.StaffData; public interface StaffReadService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffReadServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffReadServiceImpl.java index c661c8128c3..10387acc188 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffReadServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffReadServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.infrastructure.core.exception.UnrecognizedQueryParamException; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffWriteService.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffWriteService.java index aff55b90605..b296a192618 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffWriteService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffWriteService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffWriteServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffWriteServiceImpl.java index 5e4e3f08745..9a8640bc707 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffWriteServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/service/StaffWriteServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.organisation.staff.service; import jakarta.persistence.PersistenceException; + import java.util.HashMap; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -139,7 +141,7 @@ public StaffUpdateResponse updateStaff(final StaffUpdateRequest request) { } private RuntimeException handleStaffDataIntegrityIssues(String externalId, String firstname, String lastname, final Throwable realCause, - final Exception dve) { + final Exception dve) { if (realCause.getMessage().contains("external_id")) { return new PlatformDataIntegrityException("error.msg.staff.duplicate.externalId", "Staff with externalId `" + externalId + "` already exists", "externalId", externalId); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/starter/StaffConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/starter/StaffConfiguration.java index 36b5670245d..a3c8857b692 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/starter/StaffConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/starter/StaffConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -43,7 +43,7 @@ StaffReadService staffReadService(PlatformSecurityContext context, JdbcTemplate @Bean @ConditionalOnMissingBean(StaffWriteService.class) StaffWriteService staffWriteService(StaffRepository staffRepository, OfficeRepository officeRepository, - StaffCreateRequestMapper staffCreateRequestMapper) { + StaffCreateRequestMapper staffCreateRequestMapper) { return new StaffWriteServiceImpl(staffRepository, officeRepository, staffCreateRequestMapper); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/validation/StaffForceStatus.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/validation/StaffForceStatus.java index 21d63d57d7d..df2dd4adf27 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/validation/StaffForceStatus.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/validation/StaffForceStatus.java @@ -6,9 +6,9 @@ * 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 @@ -19,12 +19,13 @@ package org.apache.fineract.organisation.staff.validation; import jakarta.validation.Constraint; + import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -@Target({ ElementType.TYPE }) +@Target({ElementType.TYPE}) @Retention(RetentionPolicy.RUNTIME) @Constraint(validatedBy = StaffForceStatusValidator.class) public @interface StaffForceStatus { diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/validation/StaffForceStatusValidator.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/validation/StaffForceStatusValidator.java index 8ba81d861a4..4af16a39749 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/validation/StaffForceStatusValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/staff/validation/StaffForceStatusValidator.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerManagementReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerManagementReadPlatformServiceImpl.java index 678626243a1..59df66d26c6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerManagementReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerManagementReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.time.OffsetDateTime; import java.util.Collection; import java.util.Iterator; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.infrastructure.core.service.Page; @@ -122,7 +123,7 @@ public TellerData findTeller(final Long tellerId) { final TellerMapper tm = new TellerMapper(); final String sql = "select " + tm.schema() + " where t.id = ?"; - return this.jdbcTemplate.queryForObject(sql, tm, new Object[] { tellerId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, tm, new Object[]{tellerId}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new StaffNotFoundException(tellerId, e); } @@ -151,7 +152,7 @@ public CashierData findCashier(Long cashierId) { final CashierMapper cm = new CashierMapper(); final String sql = "select " + cm.schema() + " where c.id = ?"; - return this.jdbcTemplate.queryForObject(sql, cm, new Object[] { cashierId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, cm, new Object[]{cashierId}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new StaffNotFoundException(cashierId, e); } @@ -200,7 +201,7 @@ public Collection retrieveAllTellers(final boolean includeAllTellers final TellerMapper tm = new TellerMapper(); final String sql = "select " + tm.schema() + "where o.hierarchy like ? order by o.hierarchy"; - return this.jdbcTemplate.query(sql, tm, new Object[] { hierarchySearchString }); // NOSONAR + return this.jdbcTemplate.query(sql, tm, new Object[]{hierarchySearchString}); // NOSONAR } @Override @@ -268,7 +269,7 @@ public CashierTransactionData retrieveCashierTxnTemplate(Long cashierId) { @Override public CashierTransactionsWithSummaryData retrieveCashierTransactionsWithSummary(final Long cashierId, final boolean includeAllTellers, - final LocalDate fromDate, final LocalDate toDate, final String currencyCode, final SearchParameters searchParameters) { + final LocalDate fromDate, final LocalDate toDate, final String currencyCode, final SearchParameters searchParameters) { sqlValidator.validate(searchParameters.getOrderBy()); sqlValidator.validate(searchParameters.getSortOrder()); @@ -277,7 +278,7 @@ public CashierTransactionsWithSummaryData retrieveCashierTransactionsWithSummary final CashierTransactionSummaryMapper ctsm = new CashierTransactionSummaryMapper(); final String sql = "SELECT " + ctsm.cashierTxnSummarySchema(nextDay) + " LIMIT 1000"; Collection cashierTxnTypeTotals = this.jdbcTemplate.query(sql, ctsm, // NOSONAR - new Object[] { cashierId, currencyCode, cashierId, currencyCode, cashierId, currencyCode, cashierId, currencyCode }); + new Object[]{cashierId, currencyCode, cashierId, currencyCode, cashierId, currencyCode, cashierId, currencyCode}); Iterator itr = cashierTxnTypeTotals.iterator(); BigDecimal allocAmount = new BigDecimal(0); @@ -313,7 +314,7 @@ public CashierTransactionsWithSummaryData retrieveCashierTransactionsWithSummary @Override public Page retrieveCashierTransactions(final Long cashierId, final boolean includeAllTellers, - final LocalDate fromDate, final LocalDate toDate, final String currencyCode, final SearchParameters searchParameters) { + final LocalDate fromDate, final LocalDate toDate, final String currencyCode, final SearchParameters searchParameters) { sqlValidator.validate(searchParameters.getOrderBy()); sqlValidator.validate(searchParameters.getSortOrder()); @@ -349,8 +350,8 @@ public Page retrieveCashierTransactions(final Long cashi // hierarchySearchString, cashierId, currencyCode, // hierarchySearchString, cashierId, currencyCode, hierarchySearchString // }); - Object[] params = new Object[] { cashierId, currencyCode, cashierId, currencyCode, cashierId, currencyCode, cashierId, - currencyCode, }; + Object[] params = new Object[]{cashierId, currencyCode, cashierId, currencyCode, cashierId, currencyCode, cashierId, + currencyCode,}; return this.paginationHelper.fetchPage(this.jdbcTemplate, sql, params, ctm); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerWritePlatformServiceJpaImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerWritePlatformServiceJpaImpl.java index b00b5c98ba1..1ba83f62255 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerWritePlatformServiceJpaImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/service/TellerWritePlatformServiceJpaImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.organisation.teller.service; import jakarta.persistence.PersistenceException; + import java.util.Map; import java.util.Set; + import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; @@ -329,10 +331,10 @@ public CommandProcessingResult deleteCashierAllocation(Long tellerId, Long cashi @Override public CommandProcessingResult allocateCashToCashier(final Long cashierId, JsonCommand command) { return doTransactionForCashier(cashierId, CashierTxnType.ALLOCATE, command); // For - // fund - // allocation - // to - // cashier + // fund + // allocation + // to + // cashier } @Override @@ -341,10 +343,10 @@ public CommandProcessingResult settleCashFromCashier(final Long cashierId, JsonC this.cashierTransactionDataValidator.validateSettleCashAndCashOutTransactions(cashierId, command); return doTransactionForCashier(cashierId, CashierTxnType.SETTLE, command); // For - // fund - // settlement - // from - // cashier + // fund + // settlement + // from + // cashier } private CommandProcessingResult doTransactionForCashier(final Long cashierId, final CashierTxnType txnType, JsonCommand command) { @@ -407,28 +409,28 @@ private CommandProcessingResult doTransactionForCashier(final Long cashierId, fi final String transactionId = Long.toHexString(Long.parseLong(uniqueVal)); final JournalEntry debitJournalEntry = JournalEntry.createNew(cashierOffice, null, // payment - // detail + // detail debitAccount, cashierTxn.getCurrencyCode(), transactionId, false, // manual entry cashierTxn.getTxnDate(), JournalEntryType.DEBIT, cashierTxn.getTxnAmount(), cashierTxn.getTxnNote(), // Description null, null, null, // entity Type, entityId, reference number null, null, null, null); // Loan - // and - // Savings - // Txn + // and + // Savings + // Txn final JournalEntry creditJournalEntry = JournalEntry.createNew(cashierOffice, null, // payment - // detail + // detail creditAccount, cashierTxn.getCurrencyCode(), transactionId, false, // manual entry cashierTxn.getTxnDate(), JournalEntryType.CREDIT, cashierTxn.getTxnAmount(), cashierTxn.getTxnNote(), // Description null, null, null, // entity Type, entityId, reference number null, null, null, null); // Loan - // and - // Savings - // Txn + // and + // Savings + // Txn this.glJournalEntryRepository.saveAndFlush(debitJournalEntry); this.glJournalEntryRepository.saveAndFlush(creditJournalEntry); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/starter/OrganisationTellerConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/starter/OrganisationTellerConfiguration.java index e71a0739b35..a839ba9bc41 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/starter/OrganisationTellerConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/teller/starter/OrganisationTellerConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -49,9 +49,9 @@ public class OrganisationTellerConfiguration { @Bean @ConditionalOnMissingBean(TellerManagementReadPlatformService.class) public TellerManagementReadPlatformService tellerManagementReadPlatformService(JdbcTemplate jdbcTemplate, - PlatformSecurityContext context, OfficeReadPlatformService officeReadPlatformService, StaffReadService staffReadPlatformService, - CurrencyReadPlatformService currencyReadPlatformService, DatabaseSpecificSQLGenerator sqlGenerator, - PaginationHelper paginationHelper, SqlValidator sqlValidator) { + PlatformSecurityContext context, OfficeReadPlatformService officeReadPlatformService, StaffReadService staffReadPlatformService, + CurrencyReadPlatformService currencyReadPlatformService, DatabaseSpecificSQLGenerator sqlGenerator, + PaginationHelper paginationHelper, SqlValidator sqlValidator) { return new TellerManagementReadPlatformServiceImpl(jdbcTemplate, context, officeReadPlatformService, staffReadPlatformService, currencyReadPlatformService, sqlGenerator, paginationHelper, sqlValidator); } @@ -59,11 +59,11 @@ public TellerManagementReadPlatformService tellerManagementReadPlatformService(J @Bean @ConditionalOnMissingBean(TellerWritePlatformService.class) public TellerWritePlatformService tellerWritePlatformService(PlatformSecurityContext context, - TellerCommandFromApiJsonDeserializer fromApiJsonDeserializer, TellerRepositoryWrapper tellerRepositoryWrapper, - OfficeRepositoryWrapper officeRepositoryWrapper, StaffRepository staffRepository, CashierRepository cashierRepository, - CashierTransactionRepository cashierTxnRepository, JournalEntryRepository glJournalEntryRepository, - FinancialActivityAccountRepositoryWrapper financialActivityAccountRepositoryWrapper, - CashierTransactionDataValidator cashierTransactionDataValidator) { + TellerCommandFromApiJsonDeserializer fromApiJsonDeserializer, TellerRepositoryWrapper tellerRepositoryWrapper, + OfficeRepositoryWrapper officeRepositoryWrapper, StaffRepository staffRepository, CashierRepository cashierRepository, + CashierTransactionRepository cashierTxnRepository, JournalEntryRepository glJournalEntryRepository, + FinancialActivityAccountRepositoryWrapper financialActivityAccountRepositoryWrapper, + CashierTransactionDataValidator cashierTransactionDataValidator) { return new TellerWritePlatformServiceJpaImpl(context, fromApiJsonDeserializer, tellerRepositoryWrapper, officeRepositoryWrapper, staffRepository, cashierRepository, cashierTxnRepository, glJournalEntryRepository, financialActivityAccountRepositoryWrapper, cashierTransactionDataValidator); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiResourceSwagger.java index 1da807591e9..c1200a1d2fe 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/api/WorkingDaysApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.organisation.workingdays.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.Collection; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; /** diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/command/WorkingDaysUpdateCommand.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/command/WorkingDaysUpdateCommand.java index d9fb6693165..10c8589becf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/command/WorkingDaysUpdateCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/command/WorkingDaysUpdateCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class WorkingDaysUpdateCommand extends Command {} +public class WorkingDaysUpdateCommand extends Command { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDayValidator.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDayValidator.java index 97416f3806a..e5c4838964d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDayValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDayValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -27,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -57,7 +59,8 @@ public void validateForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, WORKING_DAYS_CREATE_OR_UPDATE_REQUEST_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDaysData.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDaysData.java index 24d778779e8..8d53d948c31 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDaysData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDaysData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.util.Collection; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDaysUpdateRequest.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDaysUpdateRequest.java index 8eebb989b71..61a500d8733 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDaysUpdateRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDaysUpdateRequest.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.organisation.workingdays.data; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDaysUpdateRequestValidator.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDaysUpdateRequestValidator.java index b0a83178344..86c08d4d3bc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDaysUpdateRequestValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDaysUpdateRequestValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDaysUpdateResponse.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDaysUpdateResponse.java index 725c3e9e77a..dae6fd2a331 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDaysUpdateResponse.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/data/WorkingDaysUpdateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.util.Map; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysRepository.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysRepository.java index ce9511d5bb9..8bb21049c53 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysRepositoryWrapper.java index 9d79d5f827e..81fdd839ae3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/domain/WorkingDaysRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import org.apache.fineract.organisation.workingdays.exception.WorkingDaysNotFoundException; import org.apache.fineract.organisation.workingdays.service.WorkingDaysUtil; import org.springframework.beans.factory.annotation.Autowired; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/exception/WorkingDaysNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/exception/WorkingDaysNotFoundException.java index 8fe92c6c4c3..fe0ef6dcb65 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/exception/WorkingDaysNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/exception/WorkingDaysNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/handler/UpdateWorkingDaysCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/handler/UpdateWorkingDaysCommandHandler.java index 2528d818f8e..cf39e69b899 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/handler/UpdateWorkingDaysCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/handler/UpdateWorkingDaysCommandHandler.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collections; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.command.core.Command; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysReadPlatformService.java index 55898ea0baa..4ff80ddec4e 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysReadPlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysReadPlatformServiceImpl.java index 1b4ecbafc29..c028e406cf3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.sql.SQLException; import java.util.Arrays; import java.util.Collection; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysWritePlatformService.java index 411991cd65f..1062ab3c164 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.organisation.workingdays.service; import java.util.Map; + import org.apache.fineract.organisation.workingdays.data.WorkingDaysUpdateRequest; import org.springframework.transaction.annotation.Transactional; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysWritePlatformServiceJpaRepositoryImpl.java index c7e866bd6f7..23adce78288 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/service/WorkingDaysWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; + import lombok.RequiredArgsConstructor; import net.fortuna.ical4j.model.property.RRule; import net.fortuna.ical4j.validate.ValidationException; diff --git a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/starter/OrganisationWorkingDaysConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/starter/OrganisationWorkingDaysConfiguration.java index 14f0e5c096d..ee3ba0b9526 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/starter/OrganisationWorkingDaysConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/organisation/workingdays/starter/OrganisationWorkingDaysConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -41,7 +41,7 @@ public WorkingDaysReadPlatformService workingDaysReadPlatformService(JdbcTemplat @Bean @ConditionalOnMissingBean(WorkingDaysWritePlatformService.class) public WorkingDaysWritePlatformService workingDaysWritePlatformService(WorkingDaysRepositoryWrapper daysRepositoryWrapper, - WorkingDaysUpdateRequestValidator validator) { + WorkingDaysUpdateRequestValidator validator) { return new WorkingDaysWritePlatformServiceJpaRepositoryImpl(daysRepositoryWrapper, validator); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/AccountDetailConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/AccountDetailConstants.java index fe1109e5080..d13e70f6107 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/AccountDetailConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/AccountDetailConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiConstants.java index 6df9241e8b6..98f11b2eab6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiConstants.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.HashSet; import java.util.Set; + import org.apache.fineract.portfolio.account.AccountDetailConstants; import org.apache.fineract.portfolio.account.data.AccountTransferData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResourceSwagger.java index 8e34eff52a9..f07a8bdd046 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/AccountTransfersApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.account.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; import java.util.Set; @@ -27,16 +28,19 @@ */ final class AccountTransfersApiResourceSwagger { - private AccountTransfersApiResourceSwagger() {} + private AccountTransfersApiResourceSwagger() { + } @Schema(description = "GetAccountTransfersTemplateResponse") public static final class GetAccountTransfersTemplateResponse { - private GetAccountTransfersTemplateResponse() {} + private GetAccountTransfersTemplateResponse() { + } static final class GetAccountTransfersFromOffice { - private GetAccountTransfersFromOffice() {} + private GetAccountTransfersFromOffice() { + } @Schema(example = "1") public Long id; @@ -54,7 +58,8 @@ private GetAccountTransfersFromOffice() {} static final class GetAccountTransfersFromAccountType { - private GetAccountTransfersFromAccountType() {} + private GetAccountTransfersFromAccountType() { + } @Schema(example = "2") public Long id; @@ -66,7 +71,8 @@ private GetAccountTransfersFromAccountType() {} static final class GetAccountTransfersFromOfficeOptions { - private GetAccountTransfersFromOfficeOptions() {} + private GetAccountTransfersFromOfficeOptions() { + } @Schema(example = "1") public Long id; @@ -78,7 +84,8 @@ private GetAccountTransfersFromOfficeOptions() {} static final class GetAccountTransfersFromClientOptions { - private GetAccountTransfersFromClientOptions() {} + private GetAccountTransfersFromClientOptions() { + } @Schema(example = "1") public Long id; @@ -92,7 +99,8 @@ private GetAccountTransfersFromClientOptions() {} static final class GetAccountTransfersFromAccountTypeOptions { - private GetAccountTransfersFromAccountTypeOptions() {} + private GetAccountTransfersFromAccountTypeOptions() { + } @Schema(example = "2") public Long id; @@ -104,7 +112,8 @@ private GetAccountTransfersFromAccountTypeOptions() {} static final class GetAccountTransfersToOfficeOptions { - private GetAccountTransfersToOfficeOptions() {} + private GetAccountTransfersToOfficeOptions() { + } @Schema(example = "1") public Long id; @@ -116,7 +125,8 @@ private GetAccountTransfersToOfficeOptions() {} static final class GetAccountTransfersToAccountTypeOptions { - private GetAccountTransfersToAccountTypeOptions() {} + private GetAccountTransfersToAccountTypeOptions() { + } @Schema(example = "2") public Long id; @@ -142,7 +152,8 @@ private GetAccountTransfersToAccountTypeOptions() {} @Schema(description = "PostAccountTransfersRequest") public static final class PostAccountTransfersRequest { - private PostAccountTransfersRequest() {} + private PostAccountTransfersRequest() { + } @Schema(example = "1") public Long fromOfficeId; @@ -175,7 +186,8 @@ private PostAccountTransfersRequest() {} @Schema(description = "PostAccountTransfersResponse") public static final class PostAccountTransfersResponse { - private PostAccountTransfersResponse() {} + private PostAccountTransfersResponse() { + } @Schema(example = "1") public Long savingsId; @@ -186,15 +198,18 @@ private PostAccountTransfersResponse() {} @Schema(description = "GetAccountTransfersResponse") public static final class GetAccountTransfersResponse { - private GetAccountTransfersResponse() {} + private GetAccountTransfersResponse() { + } static final class GetAccountTransfersPageItems { - private GetAccountTransfersPageItems() {} + private GetAccountTransfersPageItems() { + } static final class GetAccountTransfersPageItemsCurrency { - private GetAccountTransfersPageItemsCurrency() {} + private GetAccountTransfersPageItemsCurrency() { + } @Schema(example = "USD") public String code; @@ -212,7 +227,8 @@ private GetAccountTransfersPageItemsCurrency() {} static final class GetAccountTransfersPageItemsFromOffice { - private GetAccountTransfersPageItemsFromOffice() {} + private GetAccountTransfersPageItemsFromOffice() { + } @Schema(example = "1") public Long id; @@ -222,7 +238,8 @@ private GetAccountTransfersPageItemsFromOffice() {} static final class GetAccountTransfersPageItemsFromAccount { - private GetAccountTransfersPageItemsFromAccount() {} + private GetAccountTransfersPageItemsFromAccount() { + } @Schema(example = "1") public Long id; @@ -232,7 +249,8 @@ private GetAccountTransfersPageItemsFromAccount() {} static final class GetAccountTransfersPageItemsToAccountType { - private GetAccountTransfersPageItemsToAccountType() {} + private GetAccountTransfersPageItemsToAccountType() { + } @Schema(example = "1") public Long id; @@ -271,11 +289,13 @@ private GetAccountTransfersPageItemsToAccountType() {} @Schema(description = "GetAccountTransfersTemplateRefundByTransferResponse") public static final class GetAccountTransfersTemplateRefundByTransferResponse { - private GetAccountTransfersTemplateRefundByTransferResponse() {} + private GetAccountTransfersTemplateRefundByTransferResponse() { + } static final class GetAccountTransfersTemplateRefundByTransferCurrency { - private GetAccountTransfersTemplateRefundByTransferCurrency() {} + private GetAccountTransfersTemplateRefundByTransferCurrency() { + } @Schema(example = "USD") public String code; @@ -295,7 +315,8 @@ private GetAccountTransfersTemplateRefundByTransferCurrency() {} static final class GetAccountTransfersTemplateRefundByTransferFromOffice { - private GetAccountTransfersTemplateRefundByTransferFromOffice() {} + private GetAccountTransfersTemplateRefundByTransferFromOffice() { + } @Schema(example = "1") public Long id; @@ -313,11 +334,13 @@ private GetAccountTransfersTemplateRefundByTransferFromOffice() {} static final class GetAccountTransfersTemplateRefundByTransferFromClient { - private GetAccountTransfersTemplateRefundByTransferFromClient() {} + private GetAccountTransfersTemplateRefundByTransferFromClient() { + } static final class GetAccountTransfersStatus { - private GetAccountTransfersStatus() {} + private GetAccountTransfersStatus() { + } @Schema(example = "300") public Long id; @@ -329,22 +352,26 @@ private GetAccountTransfersStatus() {} static final class GetAccountTransfersGender { - private GetAccountTransfersGender() {} + private GetAccountTransfersGender() { + } } static final class GetAccountTransfersClientType { - private GetAccountTransfersClientType() {} + private GetAccountTransfersClientType() { + } } static final class GetAccountTransfersClientClassification { - private GetAccountTransfersClientClassification() {} + private GetAccountTransfersClientClassification() { + } } static final class GetAccountTransfersTimeline { - private GetAccountTransfersTimeline() {} + private GetAccountTransfersTimeline() { + } @Schema(example = "[2012, 2, 1]") public LocalDate submittedOnDate; @@ -366,7 +393,8 @@ private GetAccountTransfersTimeline() {} static final class GetAccountTransfersGroups { - private GetAccountTransfersGroups() {} + private GetAccountTransfersGroups() { + } } @Schema(example = "1") @@ -397,7 +425,8 @@ private GetAccountTransfersGroups() {} static final class GetAccountTransfersTemplateRefundByTransferFromAccount { - private GetAccountTransfersTemplateRefundByTransferFromAccount() {} + private GetAccountTransfersTemplateRefundByTransferFromAccount() { + } @Schema(example = "2") public Long id; @@ -420,7 +449,8 @@ private GetAccountTransfersTemplateRefundByTransferFromAccount() {} static final class GetAccountTransfersTemplateRefundByTransferToClient { - private GetAccountTransfersTemplateRefundByTransferToClient() {} + private GetAccountTransfersTemplateRefundByTransferToClient() { + } @Schema(example = "1") public Long id; @@ -434,7 +464,8 @@ private GetAccountTransfersTemplateRefundByTransferToClient() {} static final class GetAccountTransfersTemplateRefundByTransferToAccount { - private GetAccountTransfersTemplateRefundByTransferToAccount() {} + private GetAccountTransfersTemplateRefundByTransferToAccount() { + } @Schema(example = "1") public Long id; @@ -455,7 +486,8 @@ private GetAccountTransfersTemplateRefundByTransferToAccount() {} static final class GetAccountTransfersTemplateRefundByTransferFromOfficeOptions { - private GetAccountTransfersTemplateRefundByTransferFromOfficeOptions() {} + private GetAccountTransfersTemplateRefundByTransferFromOfficeOptions() { + } @Schema(example = "1") public Long id; @@ -467,7 +499,8 @@ private GetAccountTransfersTemplateRefundByTransferFromOfficeOptions() {} static final class GetAccountTransfersTemplateRefundByTransferFromClientOptions { - private GetAccountTransfersTemplateRefundByTransferFromClientOptions() {} + private GetAccountTransfersTemplateRefundByTransferFromClientOptions() { + } @Schema(example = "1") public Long id; @@ -481,7 +514,8 @@ private GetAccountTransfersTemplateRefundByTransferFromClientOptions() {} static final class GetAccountTransfersTemplateRefundByTransferFromAccountOptions { - private GetAccountTransfersTemplateRefundByTransferFromAccountOptions() {} + private GetAccountTransfersTemplateRefundByTransferFromAccountOptions() { + } @Schema(example = "2") public Long id; @@ -526,7 +560,8 @@ private GetAccountTransfersTemplateRefundByTransferFromAccountOptions() {} @Schema(description = "PostAccountTransfersRefundByTransferRequest") public static final class PostAccountTransfersRefundByTransferRequest { - private PostAccountTransfersRefundByTransferRequest() {} + private PostAccountTransfersRefundByTransferRequest() { + } @Schema(example = "2") public Long fromAccountId; @@ -559,7 +594,8 @@ private PostAccountTransfersRefundByTransferRequest() {} @Schema(description = "PostAccountTransfersRefundByTransferResponse") public static final class PostAccountTransfersRefundByTransferResponse { - private PostAccountTransfersRefundByTransferResponse() {} + private PostAccountTransfersRefundByTransferResponse() { + } @Schema(example = "1") public Long savingsId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiConstants.java index 50fce06b097..270ea97f660 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResourceSwagger.java index 60649d0cf9b..d8104e86ae6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.account.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; import java.util.Set; @@ -34,11 +35,13 @@ private StandingInstructionApiResourceSwagger() { @Schema(description = "GetStandingInstructionsTemplateResponse") public static final class GetStandingInstructionsTemplateResponse { - private GetStandingInstructionsTemplateResponse() {} + private GetStandingInstructionsTemplateResponse() { + } static final class GetFromOfficeResponseStandingInstructionSwagger { - private GetFromOfficeResponseStandingInstructionSwagger() {} + private GetFromOfficeResponseStandingInstructionSwagger() { + } @Schema(example = "1") public Long id; @@ -56,7 +59,8 @@ private GetFromOfficeResponseStandingInstructionSwagger() {} static final class GetFromAccountTypeResponseStandingInstructionSwagger { - private GetFromAccountTypeResponseStandingInstructionSwagger() {} + private GetFromAccountTypeResponseStandingInstructionSwagger() { + } @Schema(example = "2") public Long id; @@ -68,7 +72,8 @@ private GetFromAccountTypeResponseStandingInstructionSwagger() {} static final class GetFromOfficeOptionsResponseStandingInstructionSwagger { - private GetFromOfficeOptionsResponseStandingInstructionSwagger() {} + private GetFromOfficeOptionsResponseStandingInstructionSwagger() { + } @Schema(example = "1") public Long id; @@ -80,7 +85,8 @@ private GetFromOfficeOptionsResponseStandingInstructionSwagger() {} static final class GetFromClientOptionsResponseStandingInstructionSwagger { - private GetFromClientOptionsResponseStandingInstructionSwagger() {} + private GetFromClientOptionsResponseStandingInstructionSwagger() { + } @Schema(example = "1") public Long id; @@ -94,7 +100,8 @@ private GetFromClientOptionsResponseStandingInstructionSwagger() {} static final class GetFromAccountTypeOptionsResponseStandingInstructionSwagger { - private GetFromAccountTypeOptionsResponseStandingInstructionSwagger() {} + private GetFromAccountTypeOptionsResponseStandingInstructionSwagger() { + } @Schema(example = "2") public Long id; @@ -106,7 +113,8 @@ private GetFromAccountTypeOptionsResponseStandingInstructionSwagger() {} static final class GetToOfficeOptionsResponseStandingInstructionSwagger { - private GetToOfficeOptionsResponseStandingInstructionSwagger() {} + private GetToOfficeOptionsResponseStandingInstructionSwagger() { + } @Schema(example = "1") public Integer id; @@ -118,7 +126,8 @@ private GetToOfficeOptionsResponseStandingInstructionSwagger() {} static final class GetToAccountTypeOptionsResponseStandingInstructionSwagger { - private GetToAccountTypeOptionsResponseStandingInstructionSwagger() {} + private GetToAccountTypeOptionsResponseStandingInstructionSwagger() { + } @Schema(example = "1") public Integer id; @@ -130,7 +139,8 @@ private GetToAccountTypeOptionsResponseStandingInstructionSwagger() {} static final class GetTransferTypeOptionsResponseStandingInstructionSwagger { - private GetTransferTypeOptionsResponseStandingInstructionSwagger() {} + private GetTransferTypeOptionsResponseStandingInstructionSwagger() { + } @Schema(example = "1") public Integer id; @@ -142,7 +152,8 @@ private GetTransferTypeOptionsResponseStandingInstructionSwagger() {} static final class GetStatusOptionsResponseStandingInstructionSwagger { - private GetStatusOptionsResponseStandingInstructionSwagger() {} + private GetStatusOptionsResponseStandingInstructionSwagger() { + } @Schema(example = "1") public Integer id; @@ -154,7 +165,8 @@ private GetStatusOptionsResponseStandingInstructionSwagger() {} static final class GetInstructionTypeOptionsResponseStandingInstructionSwagger { - private GetInstructionTypeOptionsResponseStandingInstructionSwagger() {} + private GetInstructionTypeOptionsResponseStandingInstructionSwagger() { + } @Schema(example = "1") public Integer id; @@ -166,7 +178,8 @@ private GetInstructionTypeOptionsResponseStandingInstructionSwagger() {} static final class GetPriorityOptionsResponseStandingInstructionSwagger { - private GetPriorityOptionsResponseStandingInstructionSwagger() {} + private GetPriorityOptionsResponseStandingInstructionSwagger() { + } @Schema(example = "1") public Integer id; @@ -178,7 +191,8 @@ private GetPriorityOptionsResponseStandingInstructionSwagger() {} static final class GetRecurrenceTypeOptionsResponseStandingInstructionSwagger { - private GetRecurrenceTypeOptionsResponseStandingInstructionSwagger() {} + private GetRecurrenceTypeOptionsResponseStandingInstructionSwagger() { + } @Schema(example = "1") public Integer id; @@ -190,7 +204,8 @@ private GetRecurrenceTypeOptionsResponseStandingInstructionSwagger() {} static final class GetRecurrenceFrequencyOptionsResponseStandingInstructionSwagger { - private GetRecurrenceFrequencyOptionsResponseStandingInstructionSwagger() {} + private GetRecurrenceFrequencyOptionsResponseStandingInstructionSwagger() { + } @Schema(example = "0") public Integer id; @@ -218,7 +233,8 @@ private GetRecurrenceFrequencyOptionsResponseStandingInstructionSwagger() {} @Schema(description = "PostStandingInstructionsResponse") public static final class PostStandingInstructionsResponse { - private PostStandingInstructionsResponse() {} + private PostStandingInstructionsResponse() { + } @Schema(example = "1") public Long clientId; @@ -229,13 +245,15 @@ private PostStandingInstructionsResponse() {} @Schema(description = "GetStandingInstructionsResponse") public static final class GetStandingInstructionsResponse { - private GetStandingInstructionsResponse() {} + private GetStandingInstructionsResponse() { + } static final class GetPageItemsStandingInstructionSwagger { static final class GetFromOfficeStandingInstructionSwagger { - private GetFromOfficeStandingInstructionSwagger() {} + private GetFromOfficeStandingInstructionSwagger() { + } @Schema(example = "1") public Long id; @@ -245,7 +263,8 @@ private GetFromOfficeStandingInstructionSwagger() {} static final class GetFromClientStandingInstructionSwagger { - private GetFromClientStandingInstructionSwagger() {} + private GetFromClientStandingInstructionSwagger() { + } @Schema(example = "1") public Long id; @@ -259,7 +278,8 @@ private GetFromClientStandingInstructionSwagger() {} static final class GetFromAccountTypeStandingInstructionSwagger { - private GetFromAccountTypeStandingInstructionSwagger() {} + private GetFromAccountTypeStandingInstructionSwagger() { + } @Schema(example = "2") public Integer id; @@ -271,7 +291,8 @@ private GetFromAccountTypeStandingInstructionSwagger() {} static final class GetFromAccountStandingInstructionSwagger { - private GetFromAccountStandingInstructionSwagger() {} + private GetFromAccountStandingInstructionSwagger() { + } @Schema(example = "14") public Long id; @@ -285,7 +306,8 @@ private GetFromAccountStandingInstructionSwagger() {} static final class GetToOfficeStandingInstructionSwagger { - private GetToOfficeStandingInstructionSwagger() {} + private GetToOfficeStandingInstructionSwagger() { + } @Schema(example = "1") public Long id; @@ -295,7 +317,8 @@ private GetToOfficeStandingInstructionSwagger() {} static final class GetToClientStandingInstructionSwagger { - private GetToClientStandingInstructionSwagger() {} + private GetToClientStandingInstructionSwagger() { + } @Schema(example = "1") public Long id; @@ -309,7 +332,8 @@ private GetToClientStandingInstructionSwagger() {} static final class GetToAccountTypeStandingInstructionSwagger { - private GetToAccountTypeStandingInstructionSwagger() {} + private GetToAccountTypeStandingInstructionSwagger() { + } @Schema(example = "2") public Integer id; @@ -321,7 +345,8 @@ private GetToAccountTypeStandingInstructionSwagger() {} static final class GetToAccountStandingInstructionSwagger { - private GetToAccountStandingInstructionSwagger() {} + private GetToAccountStandingInstructionSwagger() { + } @Schema(example = "3") public Long id; @@ -335,7 +360,8 @@ private GetToAccountStandingInstructionSwagger() {} static final class GetTransferTypeStandingInstructionSwagger { - private GetTransferTypeStandingInstructionSwagger() {} + private GetTransferTypeStandingInstructionSwagger() { + } @Schema(example = "1") public Integer id; @@ -347,7 +373,8 @@ private GetTransferTypeStandingInstructionSwagger() {} static final class GetPriorityStandingInstructionSwagger { - private GetPriorityStandingInstructionSwagger() {} + private GetPriorityStandingInstructionSwagger() { + } @Schema(example = "3") public Integer id; @@ -359,7 +386,8 @@ private GetPriorityStandingInstructionSwagger() {} static final class GetInstructionTypeStandingInstructionSwagger { - private GetInstructionTypeStandingInstructionSwagger() {} + private GetInstructionTypeStandingInstructionSwagger() { + } @Schema(example = "1") public Integer id; @@ -371,7 +399,8 @@ private GetInstructionTypeStandingInstructionSwagger() {} static final class GetStatusStandingInstructionSwagger { - private GetStatusStandingInstructionSwagger() {} + private GetStatusStandingInstructionSwagger() { + } @Schema(example = "1") public Integer id; @@ -383,7 +412,8 @@ private GetStatusStandingInstructionSwagger() {} static final class GetRecurrenceTypeStandingInstructionSwagger { - private GetRecurrenceTypeStandingInstructionSwagger() {} + private GetRecurrenceTypeStandingInstructionSwagger() { + } @Schema(example = "1") public Integer id; @@ -395,7 +425,8 @@ private GetRecurrenceTypeStandingInstructionSwagger() {} static final class GetRecurrenceFrequencyStandingInstructionSwagger { - private GetRecurrenceFrequencyStandingInstructionSwagger() {} + private GetRecurrenceFrequencyStandingInstructionSwagger() { + } @Schema(example = "2") public Integer id; @@ -443,7 +474,8 @@ private GetRecurrenceFrequencyStandingInstructionSwagger() {} @Schema(description = "PostStandingInstructionsRequest") public static final class PostStandingInstructionsRequest { - private PostStandingInstructionsRequest() {} + private PostStandingInstructionsRequest() { + } @Schema(example = "1") public Long fromOfficeId; @@ -494,7 +526,8 @@ private PostStandingInstructionsRequest() {} @Schema(description = "GetStandingInstructionsStandingInstructionIdResponse") public static final class GetStandingInstructionsStandingInstructionIdResponse { - private GetStandingInstructionsStandingInstructionIdResponse() {} + private GetStandingInstructionsStandingInstructionIdResponse() { + } @Schema(example = "1") public Long id; @@ -529,7 +562,8 @@ private GetStandingInstructionsStandingInstructionIdResponse() {} @Schema(description = "PutStandingInstructionsStandingInstructionIdResponse") public static final class PutStandingInstructionsStandingInstructionIdResponse { - private PutStandingInstructionsStandingInstructionIdResponse() {} + private PutStandingInstructionsStandingInstructionIdResponse() { + } static final class PutUpdateStandingInstructionChanges { @@ -545,7 +579,8 @@ static final class PutUpdateStandingInstructionChanges { @Schema(description = "PutStandingInstructionsStandingInstructionIdRequest") public static final class PutStandingInstructionsStandingInstructionIdRequest { - private PutStandingInstructionsStandingInstructionIdRequest() {} + private PutStandingInstructionsStandingInstructionIdRequest() { + } @Schema(example = "2") public Integer recurrenceInterval; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResourceSwagger.java index 1aa4056891f..e91323bbcc9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/api/StandingInstructionHistoryApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.account.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; import java.util.Set; @@ -27,18 +28,21 @@ */ final class StandingInstructionHistoryApiResourceSwagger { - private StandingInstructionHistoryApiResourceSwagger() {} + private StandingInstructionHistoryApiResourceSwagger() { + } @Schema(description = "GetStandingInstructionRunHistoryResponse") public static final class GetStandingInstructionRunHistoryResponse { - private GetStandingInstructionRunHistoryResponse() {} + private GetStandingInstructionRunHistoryResponse() { + } static final class GetStandingInstructionHistoryPageItemsResponse { static final class GetStandingInstructionHistoryPageItemsFromClient { - private GetStandingInstructionHistoryPageItemsFromClient() {} + private GetStandingInstructionHistoryPageItemsFromClient() { + } @Schema(example = "1") public Long id; @@ -52,7 +56,8 @@ private GetStandingInstructionHistoryPageItemsFromClient() {} static final class GetStandingInstructionHistoryFromAccount { - private GetStandingInstructionHistoryFromAccount() {} + private GetStandingInstructionHistoryFromAccount() { + } @Schema(example = "2") public Long id; @@ -66,7 +71,8 @@ private GetStandingInstructionHistoryFromAccount() {} static final class GetStandingInstructionHistoryToAccount { - private GetStandingInstructionHistoryToAccount() {} + private GetStandingInstructionHistoryToAccount() { + } @Schema(example = "1") public Long id; @@ -80,7 +86,8 @@ private GetStandingInstructionHistoryToAccount() {} static final class GetStandingInstructionHistoryToClient { - private GetStandingInstructionHistoryToClient() {} + private GetStandingInstructionHistoryToClient() { + } @Schema(example = "1") public Long id; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/AccountAssociationsData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/AccountAssociationsData.java index bd0d8ce74d7..34b16d40ad6 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/AccountAssociationsData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/AccountAssociationsData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/AccountTransferDTO.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/AccountTransferDTO.java index 2d46ba2be1e..2ed0a625670 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/AccountTransferDTO.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/AccountTransferDTO.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.Locale; + import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.apache.fineract.portfolio.account.PortfolioAccountType; import org.apache.fineract.portfolio.account.domain.AccountTransferDetails; @@ -58,12 +59,12 @@ public class AccountTransferDTO { private final Boolean isExceptionForBalanceCheck; public AccountTransferDTO(final LocalDate transactionDate, final BigDecimal transactionAmount, - final PortfolioAccountType fromAccountType, final PortfolioAccountType toAccountType, final Long fromAccountId, - final Long toAccountId, final String description, final Locale locale, final DateTimeFormatter fmt, - final PaymentDetail paymentDetail, final Integer fromTransferType, final Integer toTransferType, final Long chargeId, - Integer loanInstallmentNumber, Integer transferType, final AccountTransferDetails accountTransferDetails, final String noteText, - final ExternalId txnExternalId, final Loan loan, SavingsAccount toSavingsAccount, final SavingsAccount fromSavingsAccount, - final Boolean isRegularTransaction, Boolean isExceptionForBalanceCheck) { + final PortfolioAccountType fromAccountType, final PortfolioAccountType toAccountType, final Long fromAccountId, + final Long toAccountId, final String description, final Locale locale, final DateTimeFormatter fmt, + final PaymentDetail paymentDetail, final Integer fromTransferType, final Integer toTransferType, final Long chargeId, + Integer loanInstallmentNumber, Integer transferType, final AccountTransferDetails accountTransferDetails, final String noteText, + final ExternalId txnExternalId, final Loan loan, SavingsAccount toSavingsAccount, final SavingsAccount fromSavingsAccount, + final Boolean isRegularTransaction, Boolean isExceptionForBalanceCheck) { this.transactionDate = transactionDate; this.transactionAmount = transactionAmount; this.fromAccountType = fromAccountType; @@ -92,10 +93,10 @@ public AccountTransferDTO(final LocalDate transactionDate, final BigDecimal tran } public AccountTransferDTO(final LocalDate transactionDate, final BigDecimal transactionAmount, - final PortfolioAccountType fromAccountType, final PortfolioAccountType toAccountType, final Long fromAccountId, - final Long toAccountId, final String description, final Locale locale, final DateTimeFormatter fmt, - final Integer fromTransferType, final Integer toTransferType, final ExternalId txnExternalId, final Loan fromLoan, - final Loan toLoan) { + final PortfolioAccountType fromAccountType, final PortfolioAccountType toAccountType, final Long fromAccountId, + final Long toAccountId, final String description, final Locale locale, final DateTimeFormatter fmt, + final Integer fromTransferType, final Integer toTransferType, final ExternalId txnExternalId, final Loan fromLoan, + final Loan toLoan) { this.transactionDate = transactionDate; this.transactionAmount = transactionAmount; this.fromAccountType = fromAccountType; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/AccountTransfersDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/AccountTransfersDataValidator.java index 61ab78ad4bf..f3ba7b70386 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/AccountTransfersDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/AccountTransfersDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -29,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -56,7 +58,7 @@ public class AccountTransfersDataValidator { @Autowired public AccountTransfersDataValidator(final FromJsonHelper fromApiJsonHelper, - final AccountTransfersDetailDataValidator accountTransfersDetailDataValidator) { + final AccountTransfersDetailDataValidator accountTransfersDetailDataValidator) { this.fromApiJsonHelper = fromApiJsonHelper; this.accountTransfersDetailDataValidator = accountTransfersDetailDataValidator; } @@ -69,7 +71,8 @@ public void validate(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/AccountTransfersDetailDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/AccountTransfersDetailDataValidator.java index 8c7f876baa0..d7a75bd9792 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/AccountTransfersDetailDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/AccountTransfersDetailDataValidator.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/PortfolioAccountDTO.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/PortfolioAccountDTO.java index a402173a9d6..4a77da397a4 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/PortfolioAccountDTO.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/PortfolioAccountDTO.java @@ -6,9 +6,9 @@ * 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 @@ -29,7 +29,7 @@ public class PortfolioAccountDTO { private final boolean excludeOverDraftAccounts; public PortfolioAccountDTO(final Integer accountTypeId, final Long clientId, final String currencyCode, final long[] accountStatus, - final Integer depositType, final boolean excludeOverDraftAccounts) { + final Integer depositType, final boolean excludeOverDraftAccounts) { this.accountTypeId = accountTypeId; this.clientId = clientId; this.currencyCode = currencyCode; @@ -48,7 +48,7 @@ public PortfolioAccountDTO(final Integer accountTypeId, final Long clientId, fin } public PortfolioAccountDTO(final Integer accountTypeId, final Long clientId, final String currencyCode, final long[] accountStatus, - final Integer depositType) { + final Integer depositType) { this.accountTypeId = accountTypeId; this.clientId = clientId; this.currencyCode = currencyCode; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionDTO.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionDTO.java index 53317e62198..28fcd96a24c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionDTO.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionDTO.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.account.data; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.service.SearchParameters; public class StandingInstructionDTO { @@ -33,8 +34,8 @@ public class StandingInstructionDTO { final LocalDate endDateRange; public StandingInstructionDTO(final SearchParameters searchParameters, final Integer transferType, final String clientName, - final Long clientId, final Long fromAccount, final Integer fromAccountType, final LocalDate startDateRange, - final LocalDate endDateRange) { + final Long clientId, final Long fromAccount, final Integer fromAccountType, final LocalDate startDateRange, + final LocalDate endDateRange) { this.searchParameters = searchParameters; this.transferType = transferType; this.clientName = clientName; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionData.java index 09b61c6b96a..dc5ce938aad 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionData.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.time.temporal.ChronoField; import java.util.Collection; import java.util.Optional; + import lombok.Getter; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.service.Page; @@ -93,13 +94,13 @@ public final class StandingInstructionData { private final Collection recurrenceFrequencyOptions; public static StandingInstructionData template(final Collection fromOfficeOptions, - final Collection fromClientOptions, final Collection fromAccountTypeOptions, - final Collection fromAccountOptions, final Collection toOfficeOptions, - final Collection toClientOptions, final Collection toAccountTypeOptions, - final Collection toAccountOptions, final Collection transferTypeOptions, - final Collection statusOptions, final Collection instructionTypeOptions, - final Collection priorityOptions, final Collection recurrenceTypeOptions, - final Collection recurrenceFrequencyOptions) { + final Collection fromClientOptions, final Collection fromAccountTypeOptions, + final Collection fromAccountOptions, final Collection toOfficeOptions, + final Collection toClientOptions, final Collection toAccountTypeOptions, + final Collection toAccountOptions, final Collection transferTypeOptions, + final Collection statusOptions, final Collection instructionTypeOptions, + final Collection priorityOptions, final Collection recurrenceTypeOptions, + final Collection recurrenceFrequencyOptions) { final Long id = null; final Long accountDetailId = null; @@ -134,12 +135,12 @@ public static StandingInstructionData template(final Collection from } public static StandingInstructionData instance(final Long id, final Long accountDetailId, final String name, - final OfficeData fromOffice, final OfficeData toOffice, final ClientData fromClient, final ClientData toClient, - final EnumOptionData fromAccountType, final PortfolioAccountData fromAccount, final EnumOptionData toAccountType, - final PortfolioAccountData toAccount, final EnumOptionData transferType, final EnumOptionData priority, - final EnumOptionData instructionType, final EnumOptionData status, final BigDecimal amount, final LocalDate validFrom, - final LocalDate validTill, final EnumOptionData recurrenceType, final EnumOptionData recurrenceFrequency, - final Integer recurrenceInterval, final MonthDay recurrenceOnMonthDay) { + final OfficeData fromOffice, final OfficeData toOffice, final ClientData fromClient, final ClientData toClient, + final EnumOptionData fromAccountType, final PortfolioAccountData fromAccount, final EnumOptionData toAccountType, + final PortfolioAccountData toAccount, final EnumOptionData transferType, final EnumOptionData priority, + final EnumOptionData instructionType, final EnumOptionData status, final BigDecimal amount, final LocalDate validFrom, + final LocalDate validTill, final EnumOptionData recurrenceType, final EnumOptionData recurrenceFrequency, + final Integer recurrenceInterval, final MonthDay recurrenceOnMonthDay) { final Page transactions = null; final Collection fromOfficeOptions = null; final Collection fromClientOptions = null; @@ -179,19 +180,19 @@ public static StandingInstructionData withTemplateData(StandingInstructionData i } private StandingInstructionData(final Long id, final Long accountDetailId, final String name, final OfficeData fromOffice, - final ClientData fromClient, final EnumOptionData fromAccountType, final PortfolioAccountData fromAccount, - final OfficeData toOffice, final ClientData toClient, final EnumOptionData toAccountType, final PortfolioAccountData toAccount, - final EnumOptionData transferType, final EnumOptionData priority, final EnumOptionData instructionType, - final EnumOptionData status, final BigDecimal amount, final LocalDate validFrom, LocalDate validTill, - final EnumOptionData recurrenceType, final EnumOptionData recurrenceFrequency, final Integer recurrenceInterval, - final MonthDay recurrenceOnMonthDay, final Page transactions, - final Collection fromOfficeOptions, final Collection fromClientOptions, - final Collection fromAccountTypeOptions, final Collection fromAccountOptions, - final Collection toOfficeOptions, final Collection toClientOptions, - final Collection toAccountTypeOptions, final Collection toAccountOptions, - final Collection transferTypeOptions, final Collection statusOptions, - final Collection instructionTypeOptions, final Collection priorityOptions, - final Collection recurrenceTypeOptions, final Collection recurrenceFrequencyOptions) { + final ClientData fromClient, final EnumOptionData fromAccountType, final PortfolioAccountData fromAccount, + final OfficeData toOffice, final ClientData toClient, final EnumOptionData toAccountType, final PortfolioAccountData toAccount, + final EnumOptionData transferType, final EnumOptionData priority, final EnumOptionData instructionType, + final EnumOptionData status, final BigDecimal amount, final LocalDate validFrom, LocalDate validTill, + final EnumOptionData recurrenceType, final EnumOptionData recurrenceFrequency, final Integer recurrenceInterval, + final MonthDay recurrenceOnMonthDay, final Page transactions, + final Collection fromOfficeOptions, final Collection fromClientOptions, + final Collection fromAccountTypeOptions, final Collection fromAccountOptions, + final Collection toOfficeOptions, final Collection toClientOptions, + final Collection toAccountTypeOptions, final Collection toAccountOptions, + final Collection transferTypeOptions, final Collection statusOptions, + final Collection instructionTypeOptions, final Collection priorityOptions, + final Collection recurrenceTypeOptions, final Collection recurrenceFrequencyOptions) { this.id = id; this.accountDetailId = accountDetailId; this.name = name; @@ -234,15 +235,15 @@ private StandingInstructionData(final Long id, final Long accountDetailId, final } public static StandingInstructionData template(OfficeData fromOffice, ClientData fromClient, EnumOptionData fromAccountType, - PortfolioAccountData fromAccount, LocalDate transferDate, OfficeData toOffice, ClientData toClient, - EnumOptionData toAccountType, PortfolioAccountData toAccount, final Collection fromOfficeOptions, - final Collection fromClientOptions, final Collection fromAccountTypeOptions, - final Collection fromAccountOptions, final Collection toOfficeOptions, - final Collection toClientOptions, final Collection toAccountTypeOptions, - final Collection toAccountOptions, final Collection transferTypeOptions, - final Collection statusOptions, final Collection instructionTypeOptions, - final Collection priorityOptions, final Collection recurrenceTypeOptions, - final Collection recurrenceFrequencyOptions) { + PortfolioAccountData fromAccount, LocalDate transferDate, OfficeData toOffice, ClientData toClient, + EnumOptionData toAccountType, PortfolioAccountData toAccount, final Collection fromOfficeOptions, + final Collection fromClientOptions, final Collection fromAccountTypeOptions, + final Collection fromAccountOptions, final Collection toOfficeOptions, + final Collection toClientOptions, final Collection toAccountTypeOptions, + final Collection toAccountOptions, final Collection transferTypeOptions, + final Collection statusOptions, final Collection instructionTypeOptions, + final Collection priorityOptions, final Collection recurrenceTypeOptions, + final Collection recurrenceFrequencyOptions) { final Long id = null; final Long accountDetailId = null; final String name = null; @@ -268,7 +269,7 @@ public static StandingInstructionData template(OfficeData fromOffice, ClientData } public static StandingInstructionData withTransferData(StandingInstructionData instructionData, - final Page transactions) { + final Page transactions) { return new StandingInstructionData(instructionData.id, instructionData.accountDetailId, instructionData.name, instructionData.fromOffice, instructionData.fromClient, instructionData.fromAccountType, instructionData.fromAccount, instructionData.toOffice, instructionData.toClient, instructionData.toAccountType, instructionData.toAccount, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionDataValidator.java index 36fbe302c18..731f417ffc7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -35,6 +36,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -80,7 +82,7 @@ public class StandingInstructionDataValidator { @Autowired public StandingInstructionDataValidator(final FromJsonHelper fromApiJsonHelper, - final AccountTransfersDetailDataValidator accountTransfersDetailDataValidator) { + final AccountTransfersDetailDataValidator accountTransfersDetailDataValidator) { this.fromApiJsonHelper = fromApiJsonHelper; this.accountTransfersDetailDataValidator = accountTransfersDetailDataValidator; } @@ -92,7 +94,8 @@ public void validateForCreate(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, CREATE_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -210,7 +213,8 @@ public void validateForUpdate(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, UPDATE_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionDuesData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionDuesData.java index 55d8c35d895..69060de4842 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionDuesData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionDuesData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionHistoryData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionHistoryData.java index 101677aca3c..e0b0a37b992 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionHistoryData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/StandingInstructionHistoryData.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/AccountTransSearchParam.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/AccountTransSearchParam.java index b802e72de67..d4a90ef42e6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/AccountTransSearchParam.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/AccountTransSearchParam.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.portfolio.account.data.request; import jakarta.ws.rs.QueryParam; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/AccountTransferRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/AccountTransferRequest.java index 39f1b5f0141..3f153720ccd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/AccountTransferRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/AccountTransferRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/StandingInstructionCreationRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/StandingInstructionCreationRequest.java index b917a8f890a..191a984ddb1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/StandingInstructionCreationRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/StandingInstructionCreationRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/StandingInstructionSearchParam.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/StandingInstructionSearchParam.java index 324e2776074..f8b14068ecc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/StandingInstructionSearchParam.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/StandingInstructionSearchParam.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.portfolio.account.data.request; import jakarta.ws.rs.QueryParam; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; import lombok.Getter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/StandingInstructionUpdatesRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/StandingInstructionUpdatesRequest.java index 26d78ac7ead..77eed668f5b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/StandingInstructionUpdatesRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/data/request/StandingInstructionUpdatesRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; 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..09e36f1a1f4 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 @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountAssociations.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountAssociations.java index 15e83161d4e..f74850a62ce 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountAssociations.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountAssociations.java @@ -6,9 +6,9 @@ * 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 @@ -53,10 +53,11 @@ public class AccountAssociations extends AbstractPersistableCustom { @Column(name = "is_active", nullable = false) private boolean active = true; - protected AccountAssociations() {} + protected AccountAssociations() { + } private AccountAssociations(final Loan loanAccount, final SavingsAccount savingsAccount, final Loan linkedLoanAccount, - final SavingsAccount linkedSavingsAccount, final Integer associationType, boolean active) { + final SavingsAccount linkedSavingsAccount, final Integer associationType, boolean active) { this.loanAccount = loanAccount; this.savingsAccount = savingsAccount; this.linkedLoanAccount = linkedLoanAccount; @@ -66,12 +67,12 @@ private AccountAssociations(final Loan loanAccount, final SavingsAccount savings } public static AccountAssociations associateSavingsAccount(final Loan loan, final SavingsAccount savingsAccount, - final Integer associationType, boolean isActive) { + final Integer associationType, boolean isActive) { return new AccountAssociations(loan, null, null, savingsAccount, associationType, isActive); } public static AccountAssociations associateSavingsAccount(final SavingsAccount savingsAccount, - final SavingsAccount linkedSavingsAccount, final Integer associationType, boolean isActive) { + final SavingsAccount linkedSavingsAccount, final Integer associationType, boolean isActive) { return new AccountAssociations(null, savingsAccount, null, linkedSavingsAccount, associationType, isActive); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountAssociationsRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountAssociationsRepository.java index 8c87a7e0c1a..737e69901d2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountAssociationsRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountAssociationsRepository.java @@ -6,9 +6,9 @@ * 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 @@ -31,5 +31,5 @@ public interface AccountAssociationsRepository @Query("select aa from AccountAssociations aa where aa.savingsAccount.id= :savingsId and aa.associationType = :associationType") AccountAssociations findBySavingsIdAndType(@Param("savingsId") Long savingsId, - @Param("associationType") Integer accountAssociationType); + @Param("associationType") Integer accountAssociationType); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferAssembler.java index 48445373e8e..e8ab9aac053 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferAssembler.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.organisation.monetary.domain.Money; import org.apache.fineract.portfolio.account.data.AccountTransferDTO; @@ -45,7 +46,7 @@ public AccountTransferAssembler(final AccountTransferDetailAssembler accountTran } public AccountTransferDetails assembleSavingsToSavingsTransfer(final JsonCommand command, final SavingsAccount fromSavingsAccount, - final SavingsAccount toSavingsAccount, final SavingsAccountTransaction withdrawal, final SavingsAccountTransaction deposit) { + final SavingsAccount toSavingsAccount, final SavingsAccountTransaction withdrawal, final SavingsAccountTransaction deposit) { final AccountTransferDetails accountTransferDetails = this.accountTransferDetailAssembler.assembleSavingsToSavingsTransfer(command, fromSavingsAccount, toSavingsAccount); @@ -62,7 +63,7 @@ public AccountTransferDetails assembleSavingsToSavingsTransfer(final JsonCommand } public AccountTransferDetails assembleSavingsToLoanTransfer(final JsonCommand command, final SavingsAccount fromSavingsAccount, - final Loan toLoanAccount, final SavingsAccountTransaction withdrawal, final LoanTransaction loanRepaymentTransaction) { + final Loan toLoanAccount, final SavingsAccountTransaction withdrawal, final LoanTransaction loanRepaymentTransaction) { final AccountTransferDetails accountTransferDetails = this.accountTransferDetailAssembler.assembleSavingsToLoanTransfer(command, fromSavingsAccount, toLoanAccount); @@ -79,7 +80,7 @@ public AccountTransferDetails assembleSavingsToLoanTransfer(final JsonCommand co } public AccountTransferDetails assembleLoanToSavingsTransfer(final JsonCommand command, final Loan fromLoanAccount, - final SavingsAccount toSavingsAccount, final SavingsAccountTransaction deposit, final LoanTransaction loanRefundTransaction) { + final SavingsAccount toSavingsAccount, final SavingsAccountTransaction deposit, final LoanTransaction loanRefundTransaction) { final AccountTransferDetails accountTransferDetails = this.accountTransferDetailAssembler.assembleLoanToSavingsTransfer(command, fromLoanAccount, toSavingsAccount); @@ -97,8 +98,8 @@ public AccountTransferDetails assembleLoanToSavingsTransfer(final JsonCommand co } public AccountTransferDetails assembleSavingsToLoanTransfer(final AccountTransferDTO accountTransferDTO, - final SavingsAccount fromSavingsAccount, final Loan toLoanAccount, final SavingsAccountTransaction savingsAccountTransaction, - final LoanTransaction loanTransaction) { + final SavingsAccount fromSavingsAccount, final Loan toLoanAccount, final SavingsAccountTransaction savingsAccountTransaction, + final LoanTransaction loanTransaction) { final Money transactionMonetaryAmount = Money.of(fromSavingsAccount.getCurrency(), accountTransferDTO.getTransactionAmount()); AccountTransferDetails accountTransferDetails = accountTransferDTO.getAccountTransferDetails(); if (accountTransferDetails == null) { @@ -113,8 +114,8 @@ public AccountTransferDetails assembleSavingsToLoanTransfer(final AccountTransfe } public AccountTransferDetails assembleSavingsToSavingsTransfer(final AccountTransferDTO accountTransferDTO, - final SavingsAccount fromSavingsAccount, final SavingsAccount toSavingsAccount, final SavingsAccountTransaction withdrawal, - final SavingsAccountTransaction deposit) { + final SavingsAccount fromSavingsAccount, final SavingsAccount toSavingsAccount, final SavingsAccountTransaction withdrawal, + final SavingsAccountTransaction deposit) { final Money transactionMonetaryAmount = Money.of(fromSavingsAccount.getCurrency(), accountTransferDTO.getTransactionAmount()); AccountTransferDetails accountTransferDetails = accountTransferDTO.getAccountTransferDetails(); if (accountTransferDetails == null) { @@ -130,7 +131,7 @@ public AccountTransferDetails assembleSavingsToSavingsTransfer(final AccountTran } public AccountTransferDetails assembleLoanToSavingsTransfer(final AccountTransferDTO accountTransferDTO, final Loan fromLoanAccount, - final SavingsAccount toSavingsAccount, final SavingsAccountTransaction deposit, final LoanTransaction loanRefundTransaction) { + final SavingsAccount toSavingsAccount, final SavingsAccountTransaction deposit, final LoanTransaction loanRefundTransaction) { final Money transactionMonetaryAmount = Money.of(fromLoanAccount.getCurrency(), accountTransferDTO.getTransactionAmount()); AccountTransferDetails accountTransferDetails = accountTransferDTO.getAccountTransferDetails(); if (accountTransferDetails == null) { @@ -145,7 +146,7 @@ public AccountTransferDetails assembleLoanToSavingsTransfer(final AccountTransfe } public AccountTransferDetails assembleLoanToLoanTransfer(final AccountTransferDTO accountTransferDTO, final Loan fromLoanAccount, - final Loan toLoanAccount, final LoanTransaction disburseTransaction, final LoanTransaction repaymentTransaction) { + final Loan toLoanAccount, final LoanTransaction disburseTransaction, final LoanTransaction repaymentTransaction) { final Money transactionMonetaryAmount = Money.of(fromLoanAccount.getCurrency(), accountTransferDTO.getTransactionAmount()); AccountTransferDetails accountTransferDetails = accountTransferDTO.getAccountTransferDetails(); if (accountTransferDetails == null) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferDetailAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferDetailAssembler.java index a8fe76f2a13..3c87988d563 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferDetailAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferDetailAssembler.java @@ -6,9 +6,9 @@ * 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 @@ -27,7 +27,9 @@ import static org.apache.fineract.portfolio.account.AccountDetailConstants.transferTypeParamName; import com.google.gson.JsonElement; + import java.util.Locale; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; import org.apache.fineract.organisation.office.domain.Office; @@ -52,8 +54,8 @@ public class AccountTransferDetailAssembler { @Autowired public AccountTransferDetailAssembler(final ClientRepositoryWrapper clientRepository, - final OfficeRepositoryWrapper officeRepositoryWrapper, final SavingsAccountAssembler savingsAccountAssembler, - final FromJsonHelper fromApiJsonHelper, final LoanAssembler loanAccountAssembler) { + final OfficeRepositoryWrapper officeRepositoryWrapper, final SavingsAccountAssembler savingsAccountAssembler, + final FromJsonHelper fromApiJsonHelper, final LoanAssembler loanAccountAssembler) { this.clientRepository = clientRepository; this.officeRepositoryWrapper = officeRepositoryWrapper; this.savingsAccountAssembler = savingsAccountAssembler; @@ -99,7 +101,7 @@ public AccountTransferDetails assembleLoanToSavingsTransfer(final JsonCommand co } public AccountTransferDetails assembleSavingsToSavingsTransfer(final JsonCommand command, final SavingsAccount fromSavingsAccount, - final SavingsAccount toSavingsAccount) { + final SavingsAccount toSavingsAccount) { final JsonElement element = command.parsedJson(); @@ -123,7 +125,7 @@ public AccountTransferDetails assembleSavingsToSavingsTransfer(final JsonCommand } public AccountTransferDetails assembleSavingsToLoanTransfer(final JsonCommand command, final SavingsAccount fromSavingsAccount, - final Loan toLoanAccount) { + final Loan toLoanAccount) { final JsonElement element = command.parsedJson(); @@ -147,7 +149,7 @@ public AccountTransferDetails assembleSavingsToLoanTransfer(final JsonCommand co } public AccountTransferDetails assembleLoanToSavingsTransfer(final JsonCommand command, final Loan fromLoanAccount, - final SavingsAccount toSavingsAccount) { + final SavingsAccount toSavingsAccount) { final JsonElement element = command.parsedJson(); @@ -169,7 +171,7 @@ public AccountTransferDetails assembleLoanToSavingsTransfer(final JsonCommand co } public AccountTransferDetails assembleSavingsToLoanTransfer(final SavingsAccount fromSavingsAccount, final Loan toLoanAccount, - Integer transferType) { + Integer transferType) { final Office fromOffice = fromSavingsAccount.office(); final Client fromClient = fromSavingsAccount.getClient(); final Office toOffice = toLoanAccount.getOffice(); @@ -181,7 +183,7 @@ public AccountTransferDetails assembleSavingsToLoanTransfer(final SavingsAccount } public AccountTransferDetails assembleSavingsToSavingsTransfer(final SavingsAccount fromSavingsAccount, - final SavingsAccount toSavingsAccount, Integer transferType) { + final SavingsAccount toSavingsAccount, Integer transferType) { final Office fromOffice = fromSavingsAccount.office(); final Client fromClient = fromSavingsAccount.getClient(); final Office toOffice = toSavingsAccount.office(); @@ -192,7 +194,7 @@ public AccountTransferDetails assembleSavingsToSavingsTransfer(final SavingsAcco } public AccountTransferDetails assembleLoanToSavingsTransfer(final Loan fromLoanAccount, final SavingsAccount toSavingsAccount, - Integer transferType) { + Integer transferType) { final Office fromOffice = fromLoanAccount.getOffice(); final Client fromClient = fromLoanAccount.client(); final Office toOffice = toSavingsAccount.office(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferDetailRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferDetailRepository.java index b5abbb609dc..35eb1174cfd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferDetailRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferDetailRepository.java @@ -6,9 +6,9 @@ * 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 @@ -22,4 +22,5 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor; public interface AccountTransferDetailRepository - extends JpaRepository, JpaSpecificationExecutor {} + extends JpaRepository, JpaSpecificationExecutor { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferDetails.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferDetails.java index ff9b535a282..12404205a25 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferDetails.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferDetails.java @@ -6,9 +6,9 @@ * 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 @@ -27,8 +27,10 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.OneToOne; import jakarta.persistence.Table; + import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.organisation.office.domain.Office; import org.apache.fineract.portfolio.client.domain.Client; @@ -81,22 +83,22 @@ public class AccountTransferDetails extends AbstractPersistableCustom { private AccountTransferStandingInstruction accountTransferStandingInstruction; public static AccountTransferDetails savingsToSavingsTransfer(final Office fromOffice, final Client fromClient, - final SavingsAccount fromSavingsAccount, final Office toOffice, final Client toClient, final SavingsAccount toSavingsAccount, - Integer transferType) { + final SavingsAccount fromSavingsAccount, final Office toOffice, final Client toClient, final SavingsAccount toSavingsAccount, + Integer transferType) { return new AccountTransferDetails(fromOffice, fromClient, fromSavingsAccount, null, toOffice, toClient, toSavingsAccount, null, transferType, null); } public static AccountTransferDetails savingsToLoanTransfer(final Office fromOffice, final Client fromClient, - final SavingsAccount fromSavingsAccount, final Office toOffice, final Client toClient, final Loan toLoanAccount, - Integer transferType) { + final SavingsAccount fromSavingsAccount, final Office toOffice, final Client toClient, final Loan toLoanAccount, + Integer transferType) { return new AccountTransferDetails(fromOffice, fromClient, fromSavingsAccount, null, toOffice, toClient, null, toLoanAccount, transferType, null); } public static AccountTransferDetails loanTosavingsTransfer(final Office fromOffice, final Client fromClient, final Loan fromLoanAccount, - final Office toOffice, final Client toClient, final SavingsAccount toSavingsAccount, Integer transferType) { + final Office toOffice, final Client toClient, final SavingsAccount toSavingsAccount, Integer transferType) { return new AccountTransferDetails(fromOffice, fromClient, null, fromLoanAccount, toOffice, toClient, toSavingsAccount, null, transferType, null); } @@ -106,9 +108,9 @@ protected AccountTransferDetails() { } private AccountTransferDetails(final Office fromOffice, final Client fromClient, final SavingsAccount fromSavingsAccount, - final Loan fromLoanAccount, final Office toOffice, final Client toClient, final SavingsAccount toSavingsAccount, - final Loan toLoanAccount, final Integer transferType, - final AccountTransferStandingInstruction accountTransferStandingInstruction) { + final Loan fromLoanAccount, final Office toOffice, final Client toClient, final SavingsAccount toSavingsAccount, + final Loan toLoanAccount, final Integer transferType, + final AccountTransferStandingInstruction accountTransferStandingInstruction) { this.fromOffice = fromOffice; this.fromClient = fromClient; this.fromSavingsAccount = fromSavingsAccount; @@ -154,7 +156,7 @@ public AccountTransferType transferType() { } public static AccountTransferDetails loanToLoanTransfer(Office fromOffice, Client fromClient, Loan fromLoanAccount, Office toOffice, - Client toClient, Loan toLoanAccount, Integer transferType) { + Client toClient, Loan toLoanAccount, Integer transferType) { return new AccountTransferDetails(fromOffice, fromClient, null, fromLoanAccount, toOffice, toClient, null, toLoanAccount, transferType, null); } 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..4029ca6a625 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 @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferRepository.java index 7e395b20311..411a3af954a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferStandingInstruction.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferStandingInstruction.java index fb437308707..0fdcb871707 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferStandingInstruction.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferStandingInstruction.java @@ -6,9 +6,9 @@ * 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 @@ -37,6 +37,7 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.math.BigDecimal; import java.time.LocalDate; import java.time.MonthDay; @@ -44,6 +45,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -53,7 +55,7 @@ @Entity @Table(name = "m_account_transfer_standing_instructions", uniqueConstraints = { - @UniqueConstraint(columnNames = { "name" }, name = "name") }) + @UniqueConstraint(columnNames = {"name"}, name = "name")}) public class AccountTransferStandingInstruction extends AbstractPersistableCustom { @ManyToOne @@ -104,9 +106,9 @@ protected AccountTransferStandingInstruction() { } public static AccountTransferStandingInstruction create(final AccountTransferDetails accountTransferDetails, final String name, - final Integer priority, final Integer instructionType, final Integer status, final BigDecimal amount, final LocalDate validFrom, - final LocalDate validTill, final Integer recurrenceType, final Integer recurrenceFrequency, final Integer recurrenceInterval, - final MonthDay recurrenceOnMonthDay) { + final Integer priority, final Integer instructionType, final Integer status, final BigDecimal amount, final LocalDate validFrom, + final LocalDate validTill, final Integer recurrenceType, final Integer recurrenceFrequency, final Integer recurrenceInterval, + final MonthDay recurrenceOnMonthDay) { Integer recurrenceOnDay = null; Integer recurrenceOnMonth = null; if (recurrenceOnMonthDay != null) { @@ -118,9 +120,9 @@ public static AccountTransferStandingInstruction create(final AccountTransferDet } private AccountTransferStandingInstruction(final AccountTransferDetails accountTransferDetails, final String name, - final Integer priority, final Integer instructionType, final Integer status, final BigDecimal amount, final LocalDate validFrom, - final LocalDate validTill, final Integer recurrenceType, final Integer recurrenceFrequency, final Integer recurrenceInterval, - final Integer recurrenceOnDay, final Integer recurrenceOnMonth) { + final Integer priority, final Integer instructionType, final Integer status, final BigDecimal amount, final LocalDate validFrom, + final LocalDate validTill, final Integer recurrenceType, final Integer recurrenceFrequency, final Integer recurrenceInterval, + final Integer recurrenceOnDay, final Integer recurrenceOnMonth) { this.accountTransferDetails = accountTransferDetails; this.name = name; this.priority = priority; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferTransaction.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferTransaction.java index 6b0cf155381..207a409e02d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferTransaction.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/AccountTransferTransaction.java @@ -6,9 +6,9 @@ * 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 @@ -24,8 +24,10 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; @@ -74,23 +76,23 @@ public class AccountTransferTransaction extends AbstractPersistableCustom private String description; public static AccountTransferTransaction savingsToSavingsTransfer(final AccountTransferDetails accountTransferDetails, - final SavingsAccountTransaction withdrawal, final SavingsAccountTransaction deposit, final LocalDate transactionDate, - final Money transactionAmount, final String description) { + final SavingsAccountTransaction withdrawal, final SavingsAccountTransaction deposit, final LocalDate transactionDate, + final Money transactionAmount, final String description) { return new AccountTransferTransaction(accountTransferDetails, withdrawal, deposit, null, null, transactionDate, transactionAmount, description); } public static AccountTransferTransaction savingsToLoanTransfer(final AccountTransferDetails accountTransferDetails, - final SavingsAccountTransaction withdrawal, final LoanTransaction loanRepaymentTransaction, final LocalDate transactionDate, - final Money transactionAmount, final String description) { + final SavingsAccountTransaction withdrawal, final LoanTransaction loanRepaymentTransaction, final LocalDate transactionDate, + final Money transactionAmount, final String description) { return new AccountTransferTransaction(accountTransferDetails, withdrawal, null, loanRepaymentTransaction, null, transactionDate, transactionAmount, description); } public static AccountTransferTransaction loanTosavingsTransfer(final AccountTransferDetails accountTransferDetails, - final SavingsAccountTransaction deposit, final LoanTransaction loanRefundTransaction, final LocalDate transactionDate, - final Money transactionAmount, final String description) { + final SavingsAccountTransaction deposit, final LoanTransaction loanRefundTransaction, final LocalDate transactionDate, + final Money transactionAmount, final String description) { return new AccountTransferTransaction(accountTransferDetails, null, deposit, null, loanRefundTransaction, transactionDate, transactionAmount, description); } @@ -100,9 +102,9 @@ protected AccountTransferTransaction() { } private AccountTransferTransaction(final AccountTransferDetails accountTransferDetails, final SavingsAccountTransaction withdrawal, - final SavingsAccountTransaction deposit, final LoanTransaction loanRepaymentTransaction, - final LoanTransaction loanRefundTransaction, final LocalDate transactionDate, final Money transactionAmount, - final String description) { + final SavingsAccountTransaction deposit, final LoanTransaction loanRepaymentTransaction, + final LoanTransaction loanRefundTransaction, final LocalDate transactionDate, final Money transactionAmount, + final String description) { this.accountTransferDetails = accountTransferDetails; this.fromLoanTransaction = loanRefundTransaction; this.fromSavingsTransaction = withdrawal; @@ -143,8 +145,8 @@ public AccountTransferDetails accountTransferDetails() { } public static AccountTransferTransaction loanToLoanTransfer(AccountTransferDetails accountTransferDetails, - LoanTransaction disburseTransaction, LoanTransaction repaymentTransaction, LocalDate transactionDate, - Money transactionMonetaryAmount, String description) { + LoanTransaction disburseTransaction, LoanTransaction repaymentTransaction, LocalDate transactionDate, + Money transactionMonetaryAmount, String description) { return new AccountTransferTransaction(accountTransferDetails, null, null, repaymentTransaction, disburseTransaction, transactionDate, transactionMonetaryAmount, description); } 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..3e473a8cbcd 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 @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionAssembler.java index 079bda7387b..67600400d19 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionAssembler.java @@ -6,9 +6,9 @@ * 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 @@ -33,6 +33,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.time.MonthDay; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.organisation.monetary.domain.Money; import org.springframework.beans.factory.annotation.Autowired; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionPriority.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionPriority.java index 10929ac9e44..ca99729aaaa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionPriority.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionPriority.java @@ -6,9 +6,9 @@ * 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 @@ -38,16 +38,16 @@ public static StandingInstructionPriority fromInt(final Integer statusValue) { switch (statusValue) { case 1: enumeration = StandingInstructionPriority.URGENT; - break; + break; case 2: enumeration = StandingInstructionPriority.HIGH; - break; + break; case 3: enumeration = StandingInstructionPriority.MEDIUM; - break; + break; case 4: enumeration = StandingInstructionPriority.LOW; - break; + break; } return enumeration; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionRepository.java index b229abc1d56..3f0a55d1370 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.account.domain; import java.util.Collection; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.savings.domain.SavingsAccount; import org.springframework.data.jpa.repository.JpaRepository; @@ -46,5 +47,5 @@ public interface StandingInstructionRepository @Query(FIND_BY_SAVINGS_AND_STATUS_QUERY) Collection findBySavingsAccountAndStatus(@Param("savingsAccount") SavingsAccount savingsAccount, - @Param("status") Integer status); + @Param("status") Integer status); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionStatus.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionStatus.java index 218453901df..0a10ee4e660 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionStatus.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionStatus.java @@ -6,9 +6,9 @@ * 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 @@ -37,13 +37,13 @@ public static StandingInstructionStatus fromInt(final Integer statusValue) { switch (statusValue) { case 1: enumeration = StandingInstructionStatus.ACTIVE; - break; + break; case 2: enumeration = StandingInstructionStatus.DISABLED; - break; + break; case 3: enumeration = StandingInstructionStatus.DELETED; - break; + break; } return enumeration; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionType.java index f7509af5811..f31ddc19e09 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/domain/StandingInstructionType.java @@ -6,9 +6,9 @@ * 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 @@ -36,10 +36,10 @@ public static StandingInstructionType fromInt(final Integer statusValue) { switch (statusValue) { case 1: enumeration = StandingInstructionType.FIXED; - break; + break; case 2: enumeration = StandingInstructionType.DUES; - break; + break; } return enumeration; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/exception/AccountTransferNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/exception/AccountTransferNotFoundException.java index f4428f3ce48..46770519609 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/exception/AccountTransferNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/exception/AccountTransferNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/exception/DifferentCurrenciesException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/exception/DifferentCurrenciesException.java index 7514b32f2e0..fa97efe0423 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/exception/DifferentCurrenciesException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/exception/DifferentCurrenciesException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/exception/StandingInstructionNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/exception/StandingInstructionNotFoundException.java index 07f2102aa8a..57b561873f6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/exception/StandingInstructionNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/exception/StandingInstructionNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/CreateAccountTransferCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/CreateAccountTransferCommandHandler.java index fef99250f1c..1a26f5bb35d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/CreateAccountTransferCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/CreateAccountTransferCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/CreateStandingInstructionCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/CreateStandingInstructionCommandHandler.java index 2d57044c5bd..09bdb175874 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/CreateStandingInstructionCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/CreateStandingInstructionCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/DeleteStandingInstructionCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/DeleteStandingInstructionCommandHandler.java index 10c9210b884..68b49944538 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/DeleteStandingInstructionCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/DeleteStandingInstructionCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/RefundByTransferCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/RefundByTransferCommandHandler.java index 669a101358e..efe4af508dd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/RefundByTransferCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/RefundByTransferCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/UpdateStandingInstructionCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/UpdateStandingInstructionCommandHandler.java index 5637fbcc575..dfcff819f25 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/UpdateStandingInstructionCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/handler/UpdateStandingInstructionCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/jobs/executestandinginstructions/ExecuteStandingInstructionsConfig.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/jobs/executestandinginstructions/ExecuteStandingInstructionsConfig.java index 69fecbdb4c4..cf9dff2381e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/jobs/executestandinginstructions/ExecuteStandingInstructionsConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/jobs/executestandinginstructions/ExecuteStandingInstructionsConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/jobs/executestandinginstructions/ExecuteStandingInstructionsTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/jobs/executestandinginstructions/ExecuteStandingInstructionsTasklet.java index bb99a47ae0f..efb4fa82d32 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/jobs/executestandinginstructions/ExecuteStandingInstructionsTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/jobs/executestandinginstructions/ExecuteStandingInstructionsTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.domain.ExternalId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/mapper/AccountTransfersMapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/mapper/AccountTransfersMapper.java index 2f241819d46..0a2b79acf91 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/mapper/AccountTransfersMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/mapper/AccountTransfersMapper.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.organisation.monetary.data.CurrencyData; @@ -73,7 +74,8 @@ public final class AccountTransfersMapper implements RowMapper * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.account.service; import java.util.Collection; + import org.apache.fineract.portfolio.account.data.AccountAssociationsData; import org.apache.fineract.portfolio.account.data.PortfolioAccountData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountAssociationsReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountAssociationsReadPlatformServiceImpl.java index 874462dd9a6..36a625c81a4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountAssociationsReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountAssociationsReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.Collection; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; @@ -63,7 +64,7 @@ public Collection retriveLoanAssociations(final Long lo final AccountAssociationsMapper mapper = new AccountAssociationsMapper(); final String sql = "select " + mapper.schema() + " where aa.loan_account_id = ? and aa.association_type_enum = ?"; try { - return this.jdbcTemplate.query(sql, mapper, new Object[] { loanId, associationType }); // NOSONAR + return this.jdbcTemplate.query(sql, mapper, new Object[]{loanId, associationType}); // NOSONAR } catch (final EmptyResultDataAccessException e) { return null; } @@ -77,7 +78,7 @@ public PortfolioAccountData retriveSavingsLinkedAssociation(final Long savingsId final String sql = "select " + mapper.schema() + " where aa.savings_account_id = ? and aa.association_type_enum = ?"; try { final AccountAssociationsData accountAssociationsData = this.jdbcTemplate.queryForObject(sql, mapper, // NOSONAR - new Object[] { savingsId, AccountAssociationType.LINKED_ACCOUNT_ASSOCIATION.getValue() }); + new Object[]{savingsId, AccountAssociationType.LINKED_ACCOUNT_ASSOCIATION.getValue()}); if (accountAssociationsData != null) { linkedAccount = accountAssociationsData.linkedAccount(); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountNumberGenerator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountNumberGenerator.java index 85397b62cf9..22273e341bf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountNumberGenerator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountNumberGenerator.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigInteger; import java.util.HashMap; import java.util.Map; + import lombok.AllArgsConstructor; import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.StringUtils; @@ -125,7 +126,7 @@ public String generate(EntityAccountType type, Object entity, AccountNumberForma case SHARES -> generate((ShareAccount) entity, format); case WORKING_CAPITAL_LOAN -> generate((WorkingCapitalLoan) entity, format); case CENTER, GROUP -> - throw new UnsupportedOperationException("Use generateCenterAccountNumber / generateGroupAccountNumber for " + type); + throw new UnsupportedOperationException("Use generateCenterAccountNumber / generateGroupAccountNumber for " + type); }; } @@ -158,24 +159,24 @@ private String generateAccountNumber(Map propertyMap, AccountNum switch (accountNumberPrefixType) { case CLIENT_TYPE: prefix = propertyMap.get(CLIENT_TYPE); - break; + break; case OFFICE_NAME: prefix = propertyMap.get(OFFICE_NAME); - break; + break; case LOAN_PRODUCT_SHORT_NAME: prefix = propertyMap.get(LOAN_PRODUCT_SHORT_NAME); - break; + break; case SAVINGS_PRODUCT_SHORT_NAME: prefix = propertyMap.get(SAVINGS_PRODUCT_SHORT_NAME); - break; + break; case PREFIX_SHORT_NAME: generatePrefix(propertyMap, propertyMap.get(ID), accountMaxLength, accountNumberFormat); prefix = propertyMap.get(PREFIX_SHORT_NAME); - break; + break; } // FINERACT-590 @@ -222,7 +223,7 @@ private String randomNumberGenerator(int accountMaxLength, Map p } public Boolean checkAccountNumberConflict(Map propertyMap, AccountNumberFormat accountNumberFormat, - String accountNumber) { + String accountNumber) { String entityType = propertyMap.get(ENTITY_TYPE); if (entityType == null) { // No entityType in map -> cannot check for conflicts. @@ -237,37 +238,37 @@ public Boolean checkAccountNumberConflict(Map propertyMap, Accou if (client != null) { randomNumberConflict = true; } - break; + break; case "loan": Loan loan = this.loanRepository.findLoanAccountByAccountNumber(accountNumber); if (loan != null) { randomNumberConflict = true; } - break; + break; case "savingsAccount": SavingsAccount savingsAccount = this.savingsAccountRepository.findSavingsAccountByAccountNumber(accountNumber); if (savingsAccount != null) { randomNumberConflict = true; } - break; + break; case "workingCapitalLoan": if (this.workingCapitalLoanRepository.existsByAccountNumber(accountNumber)) { randomNumberConflict = true; } - break; + break; default: - break; + break; } return randomNumberConflict; } private Map generatePrefix(Map propertyMap, String accountNumber, Integer accountMaxLength, - AccountNumberFormat accountNumberFormat) { + AccountNumberFormat accountNumberFormat) { String prefix = accountNumberFormat.getPrefixCharacter(); Integer prefixLength = prefix.length(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransferEnumerations.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransferEnumerations.java index 99185797075..9854e0e8afd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransferEnumerations.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransferEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -43,15 +43,15 @@ public static EnumOptionData accountType(final PortfolioAccountType type) { if (type != null) { switch (type) { case INVALID: - break; + break; case LOAN: optionData = new EnumOptionData(PortfolioAccountType.LOAN.getValue().longValue(), PortfolioAccountType.LOAN.getCode(), "Loan Account"); - break; + break; case SAVINGS: optionData = new EnumOptionData(PortfolioAccountType.SAVINGS.getValue().longValue(), PortfolioAccountType.SAVINGS.getCode(), "Savings Account"); - break; + break; } } @@ -67,15 +67,15 @@ public static EnumOptionData recurrenceType(final AccountTransferRecurrenceType if (type != null) { switch (type) { case INVALID: - break; + break; case PERIODIC: optionData = new EnumOptionData(AccountTransferRecurrenceType.PERIODIC.getValue().longValue(), AccountTransferRecurrenceType.PERIODIC.getCode(), "Periodic Recurrence"); - break; + break; case AS_PER_DUES: optionData = new EnumOptionData(AccountTransferRecurrenceType.AS_PER_DUES.getValue().longValue(), AccountTransferRecurrenceType.AS_PER_DUES.getCode(), "As Per Dues Recurrence"); - break; + break; } } return optionData; @@ -90,27 +90,27 @@ public static EnumOptionData transferType(final AccountTransferType type) { if (type != null) { switch (type) { case INVALID: - break; + break; case ACCOUNT_TRANSFER: optionData = new EnumOptionData(AccountTransferType.ACCOUNT_TRANSFER.getValue().longValue(), AccountTransferType.ACCOUNT_TRANSFER.getCode(), "Account Transfer"); - break; + break; case LOAN_REPAYMENT: optionData = new EnumOptionData(AccountTransferType.LOAN_REPAYMENT.getValue().longValue(), AccountTransferType.LOAN_REPAYMENT.getCode(), "Loan Repayment"); - break; + break; case CHARGE_PAYMENT: optionData = new EnumOptionData(AccountTransferType.CHARGE_PAYMENT.getValue().longValue(), AccountTransferType.CHARGE_PAYMENT.getCode(), "Charge Payment"); - break; + break; case INTEREST_TRANSFER: optionData = new EnumOptionData(AccountTransferType.INTEREST_TRANSFER.getValue().longValue(), AccountTransferType.INTEREST_TRANSFER.getCode(), "Interest Transfer"); - break; + break; case LOAN_DOWN_PAYMENT: optionData = new EnumOptionData(AccountTransferType.LOAN_DOWN_PAYMENT.getValue().longValue(), AccountTransferType.LOAN_DOWN_PAYMENT.getCode(), "Loan Down Payment"); - break; + break; } } @@ -126,23 +126,23 @@ public static EnumOptionData standingInstructionPriority(final StandingInstructi if (type != null) { switch (type) { case INVALID: - break; + break; case HIGH: optionData = new EnumOptionData(StandingInstructionPriority.HIGH.getValue().longValue(), StandingInstructionPriority.HIGH.getCode(), "High Priority"); - break; + break; case LOW: optionData = new EnumOptionData(StandingInstructionPriority.LOW.getValue().longValue(), StandingInstructionPriority.LOW.getCode(), "Low Priority"); - break; + break; case MEDIUM: optionData = new EnumOptionData(StandingInstructionPriority.MEDIUM.getValue().longValue(), StandingInstructionPriority.MEDIUM.getCode(), "Medium Priority"); - break; + break; case URGENT: optionData = new EnumOptionData(StandingInstructionPriority.URGENT.getValue().longValue(), StandingInstructionPriority.URGENT.getCode(), "Urgent Priority"); - break; + break; } } return optionData; @@ -157,19 +157,19 @@ public static EnumOptionData standingInstructionStatus(final StandingInstruction if (type != null) { switch (type) { case INVALID: - break; + break; case ACTIVE: optionData = new EnumOptionData(StandingInstructionStatus.ACTIVE.getValue().longValue(), StandingInstructionStatus.ACTIVE.getCode(), "Active"); - break; + break; case DELETED: optionData = new EnumOptionData(StandingInstructionStatus.DELETED.getValue().longValue(), StandingInstructionStatus.DELETED.getCode(), "Deleted"); - break; + break; case DISABLED: optionData = new EnumOptionData(StandingInstructionStatus.DISABLED.getValue().longValue(), StandingInstructionStatus.DISABLED.getCode(), "Disabled"); - break; + break; } } return optionData; @@ -184,15 +184,15 @@ public static EnumOptionData standingInstructionType(final StandingInstructionTy if (type != null) { switch (type) { case INVALID: - break; + break; case DUES: optionData = new EnumOptionData(StandingInstructionType.DUES.getValue().longValue(), StandingInstructionType.DUES.getCode(), "Dues"); - break; + break; case FIXED: optionData = new EnumOptionData(StandingInstructionType.FIXED.getValue().longValue(), StandingInstructionType.FIXED.getCode(), "Fixed"); - break; + break; } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransfersReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransfersReadPlatformServiceImpl.java index 91e04a2bba5..c812d919a4c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransfersReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransfersReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.stream.Stream; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -67,8 +68,8 @@ public class AccountTransfersReadPlatformServiceImpl implements AccountTransfers @Override public AccountTransferData retrieveTemplate(final Long fromOfficeId, final Long fromClientId, final Long fromAccountId, - final Integer fromAccountType, final Long toOfficeId, final Long toClientId, final Long toAccountId, - final Integer toAccountType) { + final Integer fromAccountType, final Long toOfficeId, final Long toClientId, final Long toAccountId, + final Integer toAccountType) { final EnumOptionData loanAccountType = AccountTransferEnumerations.accountType(PortfolioAccountType.LOAN); final EnumOptionData savingsAccountType = AccountTransferEnumerations.accountType(PortfolioAccountType.SAVINGS); @@ -124,7 +125,7 @@ public AccountTransferData retrieveTemplate(final Long fromOfficeId, final Long mostRelevantFromOfficeId = fromClient.getOfficeId(); long[] loanStatus = null; if (mostRelevantFromAccountType == 1) { - loanStatus = new long[] { 300, 700 }; + loanStatus = new long[]{300, 700}; } PortfolioAccountDTO portfolioAccountDTO = new PortfolioAccountDTO(mostRelevantFromAccountType, mostRelevantFromClientId, loanStatus); @@ -177,7 +178,7 @@ public AccountTransferData retrieveTemplate(final Long fromOfficeId, final Long } private Collection retrieveToAccounts(final PortfolioAccountData excludeThisAccountFromOptions, - final Integer toAccountType, final Long toClientId) { + final Integer toAccountType, final Long toClientId) { final String currencyCode = excludeThisAccountFromOptions != null ? excludeThisAccountFromOptions.getCurrencyCodeFromCurrency() : null; @@ -204,7 +205,7 @@ public Page retrieveAll(final SearchParameters searchParame Object[] finalObjectArray = {}; if (accountDetailId != null) { sqlBuilder.append(" where att.account_transfer_details_id=?"); - finalObjectArray = new Object[] { accountDetailId }; + finalObjectArray = new Object[]{accountDetailId}; } if (searchParameters.hasOrderBy()) { @@ -232,7 +233,7 @@ public AccountTransferData retrieveOne(final Long transferId) { try { final String sql = "select " + this.accountTransfersMapper.schema() + " where att.id = ?"; - return this.jdbcTemplate.queryForObject(sql, this.accountTransfersMapper, new Object[] { transferId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, this.accountTransfersMapper, new Object[]{transferId}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new AccountTransferNotFoundException(transferId, e); } @@ -295,14 +296,14 @@ public Page retrieveByStandingInstruction(final Long id, fi } } - final Object[] finalObjectArray = { id }; + final Object[] finalObjectArray = {id}; return this.paginationHelper.fetchPage(this.jdbcTemplate, sqlBuilder.toString(), finalObjectArray, this.accountTransfersMapper); } @Override public AccountTransferData retrieveRefundByTransferTemplate(final Long fromOfficeId, final Long fromClientId, final Long fromAccountId, - final Integer fromAccountType, final Long toOfficeId, final Long toClientId, final Long toAccountId, - final Integer toAccountType) { + final Integer fromAccountType, final Long toOfficeId, final Long toClientId, final Long toAccountId, + final Integer toAccountType) { // TODO Auto-generated method stub final EnumOptionData loanAccountType = AccountTransferEnumerations.accountType(PortfolioAccountType.LOAN); final EnumOptionData savingsAccountType = AccountTransferEnumerations.accountType(PortfolioAccountType.SAVINGS); @@ -358,7 +359,7 @@ public AccountTransferData retrieveRefundByTransferTemplate(final Long fromOffic mostRelevantFromOfficeId = fromClient.getOfficeId(); long[] loanStatus = null; if (mostRelevantFromAccountType == 1) { - loanStatus = new long[] { 300, 700 }; + loanStatus = new long[]{300, 700}; } PortfolioAccountDTO portfolioAccountDTO = new PortfolioAccountDTO(mostRelevantFromAccountType, mostRelevantFromClientId, loanStatus); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransfersWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransfersWritePlatformService.java index 20210dd767c..01e555aeb78 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransfersWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransfersWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.account.service; import java.util.Collection; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.portfolio.account.PortfolioAccountType; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransfersWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransfersWritePlatformServiceImpl.java index cba901ba57f..62dccd27769 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransfersWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/AccountTransfersWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import static org.apache.fineract.portfolio.account.api.AccountTransfersApiConstants.transferDateParamName; import com.google.common.collect.Lists; + import java.math.BigDecimal; import java.time.LocalDate; import java.time.format.DateTimeFormatter; @@ -33,6 +34,7 @@ import java.util.Collection; import java.util.List; import java.util.Locale; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -225,7 +227,7 @@ public void reverseTransfersWithFromAccountType(final Long accountNumber, final @Override @Transactional public void reverseTransfersWithFromAccountTransactions(final Collection fromTransactionIds, - final PortfolioAccountType accountTypeId) { + final PortfolioAccountType accountTypeId) { List accountTransfers = new ArrayList<>(); if (PortfolioAccountType.LOAN.equals(accountTypeId)) { List> partitions = Lists.partition(fromTransactionIds.stream().toList(), @@ -502,7 +504,7 @@ private boolean isSavingsToLoanAccountTransfer(final PortfolioAccountType fromAc } private boolean isSavingsToSavingsAccountTransfer(final PortfolioAccountType fromAccountType, - final PortfolioAccountType toAccountType) { + final PortfolioAccountType toAccountType) { return PortfolioAccountType.SAVINGS.equals(fromAccountType) && PortfolioAccountType.SAVINGS.equals(toAccountType); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/LoanAccountTransfersServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/LoanAccountTransfersServiceImpl.java index 1e3531423e5..d35e9ecb3aa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/LoanAccountTransfersServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/LoanAccountTransfersServiceImpl.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/PortfolioAccountReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/PortfolioAccountReadPlatformService.java index ce542e41bb8..58e3298ff06 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/PortfolioAccountReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/PortfolioAccountReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.account.service; import java.util.Collection; + import org.apache.fineract.portfolio.account.data.PortfolioAccountDTO; import org.apache.fineract.portfolio.account.data.PortfolioAccountData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/PortfolioAccountReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/PortfolioAccountReadPlatformServiceImpl.java index 61d5beb0fbb..1450e45cebd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/PortfolioAccountReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/PortfolioAccountReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.infrastructure.core.service.database.DatabaseSpecificSQLGenerator; import org.apache.fineract.organisation.monetary.data.CurrencyData; @@ -59,33 +60,33 @@ public PortfolioAccountData retrieveOne(final Long accountId, final Integer acco @Override public PortfolioAccountData retrieveOne(final Long accountId, final Integer accountTypeId, final String currencyCode) { - Object[] sqlParams = new Object[] { accountId }; + Object[] sqlParams = new Object[]{accountId}; PortfolioAccountData accountData = null; try { String sql = null; final PortfolioAccountType accountType = PortfolioAccountType.fromInt(accountTypeId); switch (accountType) { case INVALID: - break; + break; case LOAN: sql = "select " + this.loanAccountMapper.schema() + " where la.id = ?"; if (currencyCode != null) { sql += " and la.currency_code = ?"; - sqlParams = new Object[] { accountId, currencyCode }; + sqlParams = new Object[]{accountId, currencyCode}; } accountData = this.jdbcTemplate.queryForObject(sql, this.loanAccountMapper, sqlParams); - break; + break; case SAVINGS: sql = "select " + this.savingsAccountMapper.schema() + " where sa.id = ?"; if (currencyCode != null) { sql += " and sa.currency_code = ?"; - sqlParams = new Object[] { accountId, currencyCode }; + sqlParams = new Object[]{accountId, currencyCode}; } accountData = this.jdbcTemplate.queryForObject(sql, this.savingsAccountMapper, sqlParams); - break; + break; } } catch (final EmptyResultDataAccessException e) { throw new AccountTransferNotFoundException(accountId, e); @@ -108,7 +109,7 @@ public Collection retrieveAllForLookup(final PortfolioAcco final PortfolioAccountType accountType = PortfolioAccountType.fromInt(portfolioAccountDTO.getAccountTypeId()); switch (accountType) { case INVALID: - break; + break; case LOAN: sql = "select " + this.loanAccountMapper.schema() + " where "; if (portfolioAccountDTO.getClientId() != null) { @@ -125,7 +126,7 @@ public Collection retrieveAllForLookup(final PortfolioAcco } accounts = this.jdbcTemplate.query(sql, this.loanAccountMapper, sqlParams.toArray()); // NOSONAR - break; + break; case SAVINGS: sql = "select " + this.savingsAccountMapper.schema() + " where "; if (portfolioAccountDTO.getClientId() != null) { @@ -156,7 +157,7 @@ public Collection retrieveAllForLookup(final PortfolioAcco } accounts = this.jdbcTemplate.query(sql, this.savingsAccountMapper, sqlParams.toArray()); // NOSONAR - break; + break; } return accounts; @@ -371,7 +372,7 @@ public PortfolioAccountData mapRow(final ResultSet rs, @SuppressWarnings("unused @Override public PortfolioAccountData retrieveOneByPaidInAdvance(Long accountId, Integer accountTypeId) { // TODO Auto-generated method stub - Object[] sqlParams = new Object[] { accountId, accountId }; + Object[] sqlParams = new Object[]{accountId, accountId}; PortfolioAccountData accountData = null; // String currencyCode = null; try { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionHistoryReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionHistoryReadPlatformService.java index 7bedc6d7780..03ac196e27a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionHistoryReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionHistoryReadPlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionHistoryReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionHistoryReadPlatformServiceImpl.java index 122ace18b2c..0f673498201 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionHistoryReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionHistoryReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -56,7 +57,7 @@ public class StandingInstructionHistoryReadPlatformServiceImpl implements Standi private final PaginationHelper paginationHelper; public StandingInstructionHistoryReadPlatformServiceImpl(final JdbcTemplate jdbcTemplate, final ColumnValidator columnValidator, - DatabaseSpecificSQLGenerator sqlGenerator, PaginationHelper paginationHelper) { + DatabaseSpecificSQLGenerator sqlGenerator, PaginationHelper paginationHelper) { this.jdbcTemplate = jdbcTemplate; this.sqlGenerator = sqlGenerator; this.standingInstructionHistoryMapper = new StandingInstructionHistoryMapper(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionReadPlatformService.java index ab328ce7931..54120e5eae5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.account.service; import java.util.Collection; + import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.portfolio.account.data.StandingInstructionDTO; import org.apache.fineract.portfolio.account.data.StandingInstructionData; @@ -27,7 +28,7 @@ public interface StandingInstructionReadPlatformService { StandingInstructionData retrieveTemplate(Long fromOfficeId, Long fromClientId, Long fromAccountId, Integer fromAccountType, - Long toOfficeId, Long toClientId, Long toAccountId, Integer toAccountType, Integer transferType); + Long toOfficeId, Long toClientId, Long toAccountId, Integer toAccountType, Integer transferType); Page retrieveAll(StandingInstructionDTO standingInstructionDTO); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionReadPlatformServiceImpl.java index 9a947c029ca..c020b28c519 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -34,6 +34,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -82,10 +83,10 @@ public class StandingInstructionReadPlatformServiceImpl implements StandingInstr private final PaginationHelper paginationHelper; public StandingInstructionReadPlatformServiceImpl(final JdbcTemplate jdbcTemplate, - final ClientReadPlatformService clientReadPlatformService, final OfficeReadPlatformService officeReadPlatformService, - final PortfolioAccountReadPlatformService portfolioAccountReadPlatformService, - final DropdownReadPlatformService dropdownReadPlatformService, final ColumnValidator columnValidator, - DatabaseSpecificSQLGenerator sqlGenerator, PaginationHelper paginationHelper) { + final ClientReadPlatformService clientReadPlatformService, final OfficeReadPlatformService officeReadPlatformService, + final PortfolioAccountReadPlatformService portfolioAccountReadPlatformService, + final DropdownReadPlatformService dropdownReadPlatformService, final ColumnValidator columnValidator, + DatabaseSpecificSQLGenerator sqlGenerator, PaginationHelper paginationHelper) { this.jdbcTemplate = jdbcTemplate; this.clientReadPlatformService = clientReadPlatformService; this.officeReadPlatformService = officeReadPlatformService; @@ -99,8 +100,8 @@ public StandingInstructionReadPlatformServiceImpl(final JdbcTemplate jdbcTemplat @Override public StandingInstructionData retrieveTemplate(final Long fromOfficeId, final Long fromClientId, final Long fromAccountId, - final Integer fromAccountType, final Long toOfficeId, final Long toClientId, final Long toAccountId, - final Integer toAccountType, Integer transferType) { + final Integer fromAccountType, final Long toOfficeId, final Long toClientId, final Long toAccountId, + final Integer toAccountType, Integer transferType) { AccountTransferType accountTransferType = AccountTransferType.INVALID; if (transferType != null) { @@ -166,7 +167,7 @@ public StandingInstructionData retrieveTemplate(final Long fromOfficeId, final L mostRelevantFromOfficeId = fromClient.getOfficeId(); long[] loanStatus = null; if (mostRelevantFromAccountType == 1) { - loanStatus = new long[] { 300, 700 }; + loanStatus = new long[]{300, 700}; } PortfolioAccountDTO portfolioAccountDTO = new PortfolioAccountDTO(mostRelevantFromAccountType, mostRelevantFromClientId, loanStatus); @@ -216,8 +217,8 @@ public StandingInstructionData retrieveTemplate(final Long fromOfficeId, final L final Collection transferTypeOptions = Arrays.asList(transferType(AccountTransferType.ACCOUNT_TRANSFER), transferType( AccountTransferType.LOAN_REPAYMENT)/* - * , transferType( AccountTransferType . CHARGE_PAYMENT ) - */); + * , transferType( AccountTransferType . CHARGE_PAYMENT ) + */); final Collection statusOptions = Arrays.asList(standingInstructionStatus(StandingInstructionStatus.ACTIVE), standingInstructionStatus(StandingInstructionStatus.DISABLED)); final Collection instructionTypeOptions = Arrays.asList(standingInstructionType(StandingInstructionType.FIXED), @@ -237,7 +238,7 @@ public StandingInstructionData retrieveTemplate(final Long fromOfficeId, final L } private Collection retrieveToAccounts(final PortfolioAccountData excludeThisAccountFromOptions, - final Integer toAccountType, final Long toClientId) { + final Integer toAccountType, final Long toClientId) { final String currencyCode = excludeThisAccountFromOptions != null ? excludeThisAccountFromOptions.getCurrencyCodeFromCurrency() : null; @@ -348,7 +349,7 @@ public StandingInstructionData retrieveOne(final Long instructionId) { try { final String sql = "select " + this.standingInstructionMapper.schema() + " where atsi.id = ?"; - return this.jdbcTemplate.queryForObject(sql, this.standingInstructionMapper, new Object[] { instructionId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, this.standingInstructionMapper, new Object[]{instructionId}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new AccountTransferNotFoundException(instructionId, e); } @@ -359,7 +360,7 @@ public StandingInstructionDuesData retriveLoanDuesData(final Long loanId) { final StandingInstructionLoanDuesMapper rm = new StandingInstructionLoanDuesMapper(); final String sql = "select " + rm.schema() + " where ml.id= ? and ls.duedate <= " + sqlGenerator.currentBusinessDate() + " and ls.completed_derived <> 1"; - return this.jdbcTemplate.queryForObject(sql, rm, new Object[] { loanId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, rm, new Object[]{loanId}); // NOSONAR } private static final class StandingInstructionMapper implements RowMapper { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionWritePlatformService.java index 60d6847796c..3b200f70179 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionWritePlatformServiceImpl.java index 52699095fe6..4e7386bf41b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/service/StandingInstructionWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.HashMap; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -119,7 +120,7 @@ private boolean isSavingsToLoanAccountTransfer(final PortfolioAccountType fromAc } private boolean isSavingsToSavingsAccountTransfer(final PortfolioAccountType fromAccountType, - final PortfolioAccountType toAccountType) { + final PortfolioAccountType toAccountType) { return PortfolioAccountType.SAVINGS.equals(fromAccountType) && PortfolioAccountType.SAVINGS.equals(toAccountType); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/starter/AccountConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/starter/AccountConfiguration.java index 412b78faa33..16a812d1a1c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/starter/AccountConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/account/starter/AccountConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -74,10 +74,10 @@ public AccountAssociationsReadPlatformService accountAssociationsReadPlatformSer @Bean @ConditionalOnMissingBean(AccountTransfersReadPlatformService.class) public AccountTransfersReadPlatformService accountTransfersReadPlatformService(JdbcTemplate jdbcTemplate, - ClientReadPlatformService clientReadPlatformService, OfficeReadPlatformService officeReadPlatformService, - PortfolioAccountReadPlatformService portfolioAccountReadPlatformService, ColumnValidator columnValidator, - DatabaseSpecificSQLGenerator sqlGenerator, AccountTransfersMapper accountTransfersMapper, PaginationHelper paginationHelper, - SqlValidator sqlValidator) { + ClientReadPlatformService clientReadPlatformService, OfficeReadPlatformService officeReadPlatformService, + PortfolioAccountReadPlatformService portfolioAccountReadPlatformService, ColumnValidator columnValidator, + DatabaseSpecificSQLGenerator sqlGenerator, AccountTransfersMapper accountTransfersMapper, PaginationHelper paginationHelper, + SqlValidator sqlValidator) { return new AccountTransfersReadPlatformServiceImpl(jdbcTemplate, clientReadPlatformService, officeReadPlatformService, portfolioAccountReadPlatformService, columnValidator, sqlGenerator, accountTransfersMapper, paginationHelper, sqlValidator); } @@ -101,24 +101,24 @@ public AccountTransfersWritePlatformService accountTransfersWritePlatformService @Bean @ConditionalOnMissingBean(PortfolioAccountReadPlatformService.class) public PortfolioAccountReadPlatformService portfolioAccountReadPlatformService(JdbcTemplate jdbcTemplate, - DatabaseSpecificSQLGenerator sqlGenerator) { + DatabaseSpecificSQLGenerator sqlGenerator) { return new PortfolioAccountReadPlatformServiceImpl(jdbcTemplate, sqlGenerator); } @Bean @ConditionalOnMissingBean(StandingInstructionHistoryReadPlatformService.class) public StandingInstructionHistoryReadPlatformService standingInstructionHistoryReadPlatformService(JdbcTemplate jdbcTemplate, - ColumnValidator columnValidator, DatabaseSpecificSQLGenerator sqlGenerator, PaginationHelper paginationHelper) { + ColumnValidator columnValidator, DatabaseSpecificSQLGenerator sqlGenerator, PaginationHelper paginationHelper) { return new StandingInstructionHistoryReadPlatformServiceImpl(jdbcTemplate, columnValidator, sqlGenerator, paginationHelper); } @Bean @ConditionalOnMissingBean(StandingInstructionReadPlatformService.class) public StandingInstructionReadPlatformService standingInstructionReadPlatformService(JdbcTemplate jdbcTemplate, - ClientReadPlatformService clientReadPlatformService, OfficeReadPlatformService officeReadPlatformService, - PortfolioAccountReadPlatformService portfolioAccountReadPlatformService, - DropdownReadPlatformService dropdownReadPlatformService, ColumnValidator columnValidator, - DatabaseSpecificSQLGenerator sqlGenerator, PaginationHelper paginationHelper) { + ClientReadPlatformService clientReadPlatformService, OfficeReadPlatformService officeReadPlatformService, + PortfolioAccountReadPlatformService portfolioAccountReadPlatformService, + DropdownReadPlatformService dropdownReadPlatformService, ColumnValidator columnValidator, + DatabaseSpecificSQLGenerator sqlGenerator, PaginationHelper paginationHelper) { return new StandingInstructionReadPlatformServiceImpl(jdbcTemplate, clientReadPlatformService, officeReadPlatformService, portfolioAccountReadPlatformService, dropdownReadPlatformService, columnValidator, sqlGenerator, paginationHelper); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/AccountSummaryCollectionData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/AccountSummaryCollectionData.java index bb8c8b75ce4..34b10745f10 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/AccountSummaryCollectionData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/AccountSummaryCollectionData.java @@ -6,9 +6,9 @@ * 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 @@ -41,10 +41,10 @@ public class AccountSummaryCollectionData { * METHOD SIGNATURE CHANGE NOTICE: Method's signature was changed for GLIM & GSIM implementation */ public AccountSummaryCollectionData(final Collection loanAccounts, - final Collection groupLoanIndividualMonitoringAccounts, - final Collection savingsAccounts, final Collection shareAccounts, - final Collection guarantorAccounts, - final Collection workingCapitalLoanAccounts) { + final Collection groupLoanIndividualMonitoringAccounts, + final Collection savingsAccounts, final Collection shareAccounts, + final Collection guarantorAccounts, + final Collection workingCapitalLoanAccounts) { this.loanAccounts = defaultLoanAccountsIfEmpty(loanAccounts); this.groupLoanIndividualMonitoringAccounts = groupLoanIndividualMonitoringAccounts; @@ -58,10 +58,10 @@ public AccountSummaryCollectionData(final Collection loa } public AccountSummaryCollectionData(final Collection loanAccounts, - final Collection groupLoanIndividualMonitoringAccounts, - final Collection savingsAccounts, final Collection guarantorAccounts, - final Collection memberLoanAccounts, final Collection memberSavingsAccounts, - final Collection memberGuarantorAccounts) { + final Collection groupLoanIndividualMonitoringAccounts, + final Collection savingsAccounts, final Collection guarantorAccounts, + final Collection memberLoanAccounts, final Collection memberSavingsAccounts, + final Collection memberGuarantorAccounts) { /* Note to Self: GSIM not passed in */ this.loanAccounts = defaultLoanAccountsIfEmpty(loanAccounts); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/GuarantorAccountSummaryData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/GuarantorAccountSummaryData.java index 914b9b263e1..7e451dad464 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/GuarantorAccountSummaryData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/GuarantorAccountSummaryData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.accountdetails.data; import java.math.BigDecimal; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.loanaccount.data.LoanStatusEnumData; @@ -46,10 +47,10 @@ public class GuarantorAccountSummaryData { private final BigDecimal onHoldAmount; public GuarantorAccountSummaryData(final Long id, final String accountNo, final String externalId, final Long productId, - final String loanProductName, final String shortLoanProductName, final LoanStatusEnumData loanStatus, - final EnumOptionData loanType, final Integer loanCycle, final Boolean inArrears, final BigDecimal originalLoan, - final BigDecimal loanBalance, final BigDecimal amountPaid, final Boolean isActive, final String relationship, - final BigDecimal onHoldAmount) { + final String loanProductName, final String shortLoanProductName, final LoanStatusEnumData loanStatus, + final EnumOptionData loanType, final Integer loanCycle, final Boolean inArrears, final BigDecimal originalLoan, + final BigDecimal loanBalance, final BigDecimal amountPaid, final Boolean isActive, final String relationship, + final BigDecimal onHoldAmount) { this.id = id; this.accountNo = accountNo; this.externalId = externalId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/ShareAccountSummaryData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/ShareAccountSummaryData.java index 49ec56260a7..0ad9793fdc1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/ShareAccountSummaryData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/data/ShareAccountSummaryData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.accountdetails.data; import java.io.Serializable; + import lombok.Getter; import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.portfolio.shareaccounts.data.ShareAccountApplicationTimelineData; @@ -40,8 +41,8 @@ public class ShareAccountSummaryData implements Serializable { private final ShareAccountApplicationTimelineData timeline; public ShareAccountSummaryData(final Long id, final String accountNo, final String externalId, final Long productId, - final String productName, final String shortProductName, final ShareAccountStatusEnumData status, final CurrencyData currency, - final Long approvedShares, final Long pendingForApprovalShares, final ShareAccountApplicationTimelineData timeline) { + final String productName, final String shortProductName, final ShareAccountStatusEnumData status, final CurrencyData currency, + final Long approvedShares, final Long pendingForApprovalShares, final ShareAccountApplicationTimelineData timeline) { this.id = id; this.accountNo = accountNo; this.externalId = externalId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountDetailsReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountDetailsReadPlatformService.java index adb530bb904..77f6057c41f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountDetailsReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountDetailsReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.List; + import org.apache.fineract.portfolio.accountdetails.data.AccountSummaryCollectionData; import org.apache.fineract.portfolio.accountdetails.data.LoanAccountSummaryData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountDetailsReadPlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountDetailsReadPlatformServiceJpaRepositoryImpl.java index 7b4cba280ac..d373454cafa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountDetailsReadPlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accountdetails/service/AccountDetailsReadPlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.time.LocalDate; import java.util.Collection; import java.util.List; + import lombok.AllArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; @@ -76,14 +77,14 @@ public AccountSummaryCollectionData retrieveClientAccountDetails(final Long clie final String guarantorWhereClause = " where g.entity_id = ? and g.is_active = true order by l.account_no ASC"; - final List glimAccounts = retrieveLoanAccountDetails(glimLoanClause, new Object[] { clientId }); - final List loanAccounts = retrieveLoanAccountDetails(loanwhereClause, new Object[] { clientId }); + final List glimAccounts = retrieveLoanAccountDetails(glimLoanClause, new Object[]{clientId}); + final List loanAccounts = retrieveLoanAccountDetails(loanwhereClause, new Object[]{clientId}); final List workingCapitalLoanAccounts = workingCapitalLoanApplicationReadPlatformService .retrieveLoanSummaryData(clientId); - final List savingsAccounts = retrieveAccountDetails(savingswhereClause, new Object[] { clientId }); + final List savingsAccounts = retrieveAccountDetails(savingswhereClause, new Object[]{clientId}); final List shareAccounts = retrieveShareAccountDetails(clientId); final List guarantorloanAccounts = retrieveGuarantorLoanAccountDetails(guarantorWhereClause, - new Object[] { clientId }); + new Object[]{clientId}); return new AccountSummaryCollectionData(loanAccounts, glimAccounts, savingsAccounts, shareAccounts, guarantorloanAccounts, workingCapitalLoanAccounts); } @@ -101,21 +102,21 @@ public AccountSummaryCollectionData retrieveGroupAccountDetails(final Long group final String guarantorWhereClauseForGroup = " where l.group_id = ? and l.client_id is null and g.is_active = true order by l.account_no ASC"; final String guarantorWhereClauseForMembers = " where l.group_id = ? and l.client_id is not null and g.is_active = true order by l.account_no ASC"; final List glimAccounts = retrieveLoanAccountDetails(loanWhereClauseForGroupAndLoanType, - new Object[] { groupId }); + new Object[]{groupId}); final List groupLoanAccounts = retrieveLoanAccountDetails(loanWhereClauseForGroup, - new Object[] { groupId }); + new Object[]{groupId}); final List groupSavingsAccounts = retrieveAccountDetails(savingswhereClauseForGroup, - new Object[] { groupId }); + new Object[]{groupId}); final List groupGuarantorloanAccounts = retrieveGuarantorLoanAccountDetails( - guarantorWhereClauseForGroup, new Object[] { groupId }); + guarantorWhereClauseForGroup, new Object[]{groupId}); final List memberLoanAccounts = retrieveLoanAccountDetails(loanWhereClauseForMembers, - new Object[] { groupId }); + new Object[]{groupId}); final List memberSavingsAccounts = retrieveAccountDetails(savingswhereClauseForMembers, - new Object[] { groupId }); + new Object[]{groupId}); final List memberGuarantorloanAccounts = retrieveGuarantorLoanAccountDetails( - guarantorWhereClauseForMembers, new Object[] { groupId }); + guarantorWhereClauseForMembers, new Object[]{groupId}); return new AccountSummaryCollectionData(groupLoanAccounts, glimAccounts, groupSavingsAccounts, groupGuarantorloanAccounts, memberLoanAccounts, memberSavingsAccounts, memberGuarantorloanAccounts); @@ -132,15 +133,15 @@ public AccountSummaryCollectionData retrieveGroupAccountDetails(final Long group final String savingswhereClauseForMembers = " where sa.group_id = ? and sa.client_id is not null order by sa.status_enum ASC, sa.account_no ASC"; final List glimAccounts = retrieveLoanAccountDetails(loanWhereClauseForGroupAndLoanType, - new Object[] { groupId }); + new Object[]{groupId}); final List groupLoanAccounts = retrieveLoanAccountDetails(loanWhereClauseForGroup, - new Object[] { groupId }); + new Object[]{groupId}); final List gsimSavingsAccounts = retrieveAccountDetails(savingswhereClauseForGroup, - new Object[] { groupId, gsimId }); + new Object[]{groupId, gsimId}); final List memberLoanAccounts = retrieveLoanAccountDetails(loanWhereClauseForMembers, - new Object[] { groupId }); + new Object[]{groupId}); final List memberSavingsAccounts = retrieveAccountDetails(savingswhereClauseForMembers, - new Object[] { groupId }); + new Object[]{groupId}); return new AccountSummaryCollectionData(groupLoanAccounts, glimAccounts, gsimSavingsAccounts, null, memberLoanAccounts, memberSavingsAccounts, null); } @@ -150,7 +151,7 @@ public Collection retrieveClientLoanAccountsByLoanOffice // Check if client exists this.clientReadPlatformService.retrieveOne(clientId); final String loanWhereClause = " where l.client_id = ? and l.loan_officer_id = ?"; - return retrieveLoanAccountDetails(loanWhereClause, new Object[] { clientId, loanOfficerId }); + return retrieveLoanAccountDetails(loanWhereClause, new Object[]{clientId, loanOfficerId}); } @Override @@ -158,28 +159,28 @@ public Collection retrieveGroupLoanAccountsByLoanOfficer // Check if group exists this.groupReadPlatformService.retrieveOne(groupId); final String loanWhereClause = " where l.group_id = ? and l.client_id is null and l.loan_officer_id = ?"; - return retrieveLoanAccountDetails(loanWhereClause, new Object[] { groupId, loanOfficerId }); + return retrieveLoanAccountDetails(loanWhereClause, new Object[]{groupId, loanOfficerId}); } @Override public Collection retrieveClientActiveLoanAccountSummary(final Long clientId) { final String loanWhereClause = " where l.client_id = ? and l.loan_status_id = 300 "; - return retrieveLoanAccountDetails(loanWhereClause, new Object[] { clientId }); + return retrieveLoanAccountDetails(loanWhereClause, new Object[]{clientId}); } @Override public List retrieveLoanAccountDetailsByGroupIdAndGlimAccountNumber(final Long groupId, - final String glimAccount) { + final String glimAccount) { final LoanAccountSummaryDataMapper rm = new LoanAccountSummaryDataMapper(); final String loanWhereClauseForGroupAndLoanType = " where l.group_id =? and glim.account_number=? and l.loan_type_enum=4"; final String sql = "select " + rm.loanAccountSummarySchema() + loanWhereClauseForGroupAndLoanType; - return this.jdbcTemplate.query(sql, rm, new Object[] { groupId, glimAccount }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{groupId, glimAccount}); // NOSONAR } @Override public Collection retrieveGroupActiveLoanAccountSummary(final Long groupId) { final String loanWhereClause = " where l.group_id = ? and l.loan_status_id = 300 and l.client_id is null"; - return retrieveLoanAccountDetails(loanWhereClause, new Object[] { groupId }); + return retrieveLoanAccountDetails(loanWhereClause, new Object[]{groupId}); } private List retrieveLoanAccountDetails(final String loanwhereClause, final Object[] inputs) { @@ -203,7 +204,7 @@ private List retrieveAccountDetails(final String savi private List retrieveShareAccountDetails(final Long clientId) { final ShareAccountSummaryDataMapper mapper = new ShareAccountSummaryDataMapper(); final String query = "select " + mapper.schema() + " where sa.client_id = ?"; - return this.jdbcTemplate.query(query, mapper, new Object[] { clientId }); // NOSONAR + return this.jdbcTemplate.query(query, mapper, new Object[]{clientId}); // NOSONAR } private List retrieveGuarantorLoanAccountDetails(final String loanwhereClause, final Object[] inputs) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/api/AccountsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/api/AccountsApiResourceSwagger.java index 049f2191059..91e08820f18 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/api/AccountsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/api/AccountsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.accounts.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; import java.util.List; import java.util.Set; @@ -28,16 +29,19 @@ */ final class AccountsApiResourceSwagger { - private AccountsApiResourceSwagger() {} + private AccountsApiResourceSwagger() { + } @Schema(description = "GetAccountsTypeTemplateResponse") public static final class GetAccountsTypeTemplateResponse { - private GetAccountsTypeTemplateResponse() {} + private GetAccountsTypeTemplateResponse() { + } static final class GetAccountsTypeProductOptions { - private GetAccountsTypeProductOptions() {} + private GetAccountsTypeProductOptions() { + } @Schema(example = "1") public Long id; @@ -59,11 +63,13 @@ private GetAccountsTypeProductOptions() {} @Schema(description = "GetAccountsTypeAccountIdResponse") public static final class GetAccountsTypeAccountIdResponse { - private GetAccountsTypeAccountIdResponse() {} + private GetAccountsTypeAccountIdResponse() { + } static final class GetAccountsStatus { - private GetAccountsStatus() {} + private GetAccountsStatus() { + } @Schema(example = "300") public Long id; @@ -85,7 +91,8 @@ private GetAccountsStatus() {} static final class GetAccountsTimeline { - private GetAccountsTimeline() {} + private GetAccountsTimeline() { + } @Schema(example = "[2016, 4, 1]") public LocalDate submittedOnDate; @@ -109,7 +116,8 @@ private GetAccountsTimeline() {} static final class GetAccountsCurrency { - private GetAccountsCurrency() {} + private GetAccountsCurrency() { + } @Schema(example = "USD") public String code; @@ -129,7 +137,8 @@ private GetAccountsCurrency() {} static final class GetAccountsSummary { - private GetAccountsSummary() {} + private GetAccountsSummary() { + } @Schema(example = "2") public Long id; @@ -150,11 +159,13 @@ private GetAccountsSummary() {} static final class GetAccountsPurchasedShares { - private GetAccountsPurchasedShares() {} + private GetAccountsPurchasedShares() { + } static final class GetAccountsPurchasedSharesStatus { - private GetAccountsPurchasedSharesStatus() {} + private GetAccountsPurchasedSharesStatus() { + } @Schema(example = "300") public Long id; @@ -166,7 +177,8 @@ private GetAccountsPurchasedSharesStatus() {} static final class GetAccountsPurchasedSharesType { - private GetAccountsPurchasedSharesType() {} + private GetAccountsPurchasedSharesType() { + } @Schema(example = "500") public Long id; @@ -198,7 +210,8 @@ private GetAccountsPurchasedSharesType() {} static final class GetAccountsLockPeriodTypeEnum { - private GetAccountsLockPeriodTypeEnum() {} + private GetAccountsLockPeriodTypeEnum() { + } @Schema(example = "0") public Long id; @@ -210,11 +223,13 @@ private GetAccountsLockPeriodTypeEnum() {} static final class GetAccountsCharges { - private GetAccountsCharges() {} + private GetAccountsCharges() { + } static final class GetAccountsChargeTimeType { - private GetAccountsChargeTimeType() {} + private GetAccountsChargeTimeType() { + } @Schema(example = "13") public Long id; @@ -226,7 +241,8 @@ private GetAccountsChargeTimeType() {} static final class GetAccountsChargeCalculationType { - private GetAccountsChargeCalculationType() {} + private GetAccountsChargeCalculationType() { + } @Schema(example = "1") public Long id; @@ -238,7 +254,8 @@ private GetAccountsChargeCalculationType() {} static final class GetAccountsChargesCurrency { - private GetAccountsChargesCurrency() {} + private GetAccountsChargesCurrency() { + } @Schema(example = "USD") public String code; @@ -324,15 +341,18 @@ private GetAccountsChargesCurrency() {} @Schema(description = "GetAccountsTypeResponse") public static final class GetAccountsTypeResponse { - private GetAccountsTypeResponse() {} + private GetAccountsTypeResponse() { + } static final class GetAccountsPageItems { - private GetAccountsPageItems() {} + private GetAccountsPageItems() { + } static final class GetAccountsTypeStatus { - private GetAccountsTypeStatus() {} + private GetAccountsTypeStatus() { + } @Schema(example = "100") public Long id; @@ -354,7 +374,8 @@ private GetAccountsTypeStatus() {} static final class GetAccountsTypeTimeline { - private GetAccountsTypeTimeline() {} + private GetAccountsTypeTimeline() { + } @Schema(example = "[2013, 3, 1]") public LocalDate submittedOnDate; @@ -362,7 +383,8 @@ private GetAccountsTypeTimeline() {} static final class GetAccountsTypePurchasedShares { - private GetAccountsTypePurchasedShares() {} + private GetAccountsTypePurchasedShares() { + } @Schema(example = "1") public Long id; @@ -376,7 +398,8 @@ private GetAccountsTypePurchasedShares() {} static final class GetAccountsTypeSummary { - private GetAccountsTypeSummary() {} + private GetAccountsTypeSummary() { + } public GetAccountsTypeAccountIdResponse.GetAccountsCharges.GetAccountsChargesCurrency currency; } @@ -408,11 +431,13 @@ private GetAccountsTypeSummary() {} @Schema(description = "PostAccountsTypeRequest") public static final class PostAccountsTypeRequest { - private PostAccountsTypeRequest() {} + private PostAccountsTypeRequest() { + } static final class PostAccountsCharges { - private PostAccountsCharges() {} + private PostAccountsCharges() { + } @Schema(example = "20") public Long chargeId; @@ -454,7 +479,8 @@ private PostAccountsCharges() {} @Schema(description = "PostAccountsTypeResponse") public static final class PostAccountsTypeResponse { - private PostAccountsTypeResponse() {} + private PostAccountsTypeResponse() { + } @Schema(example = "1") public Long resourceId; @@ -463,11 +489,13 @@ private PostAccountsTypeResponse() {} @Schema(description = "PostAccountsTypeAccountIdRequest") public static final class PostAccountsTypeAccountIdRequest { - private PostAccountsTypeAccountIdRequest() {} + private PostAccountsTypeAccountIdRequest() { + } static final class PostAccountsRequestedShares { - private PostAccountsRequestedShares() {} + private PostAccountsRequestedShares() { + } @Schema(example = "35") public Long id; @@ -479,7 +507,8 @@ private PostAccountsRequestedShares() {} @Schema(description = "PostAccountsTypeAccountIdResponse") public static final class PostAccountsTypeAccountIdResponse { - private PostAccountsTypeAccountIdResponse() {} + private PostAccountsTypeAccountIdResponse() { + } @Schema(example = "5") public Long resourceId; @@ -488,7 +517,8 @@ private PostAccountsTypeAccountIdResponse() {} @Schema(description = "PutAccountsTypeAccountIdRequest") public static final class PutAccountsTypeAccountIdRequest { - private PutAccountsTypeAccountIdRequest() {} + private PutAccountsTypeAccountIdRequest() { + } @Schema(example = "en") public String locale; @@ -503,11 +533,13 @@ private PutAccountsTypeAccountIdRequest() {} @Schema(description = "PutAccountsTypeAccountIdResponse") public static final class PutAccountsTypeAccountIdResponse { - private PutAccountsTypeAccountIdResponse() {} + private PutAccountsTypeAccountIdResponse() { + } static final class PutAccountsChanges { - private PutAccountsChanges() {} + private PutAccountsChanges() { + } @Schema(example = "dd MMMM yyyy") public String dateFormat; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/constants/AccountsApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/constants/AccountsApiConstants.java index e4b06d2e7d4..6f2c3497eb2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/constants/AccountsApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/constants/AccountsApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/constants/ShareAccountApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/constants/ShareAccountApiConstants.java index 6abef1d2925..629a13506d0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/constants/ShareAccountApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/constants/ShareAccountApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/data/AccountData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/data/AccountData.java index 18e0c8b2e17..3557a4d720a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/data/AccountData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/data/AccountData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/data/request/AccountChargesRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/data/request/AccountChargesRequest.java index b9d59512209..5542742aa92 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/data/request/AccountChargesRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/data/request/AccountChargesRequest.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.math.BigDecimal; + import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/data/request/AccountRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/data/request/AccountRequest.java index 7181f7dc8b2..81abae63fa3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/data/request/AccountRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/data/request/AccountRequest.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.io.Serializable; import java.math.BigDecimal; import java.util.List; + import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/exceptions/ShareAccountNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/exceptions/ShareAccountNotFoundException.java index 6c32d9c231e..06b525246c8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/exceptions/ShareAccountNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/exceptions/ShareAccountNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/service/AccountReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/service/AccountReadPlatformService.java index 4ee29f1bd54..417a06bf2ce 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/service/AccountReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/service/AccountReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.accounts.service; import java.util.Set; + import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.portfolio.accounts.data.AccountData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/service/AccountsCommandsService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/service/AccountsCommandsService.java index 941ff227eaa..2b2c9e95769 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/service/AccountsCommandsService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/accounts/service/AccountsCommandsService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/data/ClientAddressData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/data/ClientAddressData.java index 5d8834898a1..3f52a2b0e5c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/data/ClientAddressData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/data/ClientAddressData.java @@ -6,9 +6,9 @@ * 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 @@ -31,7 +31,7 @@ public final class ClientAddressData { private final boolean isActive; private ClientAddressData(final long clientAddressID, final long client_id, final long address_id, final long address_type_id, - final boolean isActive) { + final boolean isActive) { this.clientAddressID = clientAddressID; this.clientID = client_id; this.addressID = address_id; @@ -40,7 +40,7 @@ private ClientAddressData(final long clientAddressID, final long client_id, fina } public static ClientAddressData instance(final long clientAddressID, final long client_id, final long address_id, - final long address_type_id, final boolean isActive) { + final long address_type_id, final boolean isActive) { return new ClientAddressData(clientAddressID, client_id, address_id, address_type_id, isActive); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/data/FieldConfigurationData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/data/FieldConfigurationData.java index 0d8b4dc3e1c..37257fa235c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/data/FieldConfigurationData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/data/FieldConfigurationData.java @@ -6,9 +6,9 @@ * 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 @@ -21,8 +21,9 @@ import java.io.Serial; import java.io.Serializable; -public record FieldConfigurationData(Long fieldConfigurationId, String entity, String subentity, String field, boolean isEnabled, - boolean isMandatory, String validationRegex) implements Serializable { +public record FieldConfigurationData(Long fieldConfigurationId, String entity, String subentity, String field, + boolean isEnabled, + boolean isMandatory, String validationRegex) implements Serializable { @Serial private static final long serialVersionUID = 1L; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/Address.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/Address.java index a3a3026fc41..a0ebda9e43e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/Address.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/Address.java @@ -6,9 +6,9 @@ * 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 @@ -26,10 +26,12 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToMany; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.Set; + import org.apache.fineract.infrastructure.codes.domain.CodeValue; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @@ -98,9 +100,9 @@ public class Address extends AbstractPersistableCustom { private LocalDate updatedOn; private Address(final String street, final String addressLine1, final String addressLine2, final String addressLine3, - final String townVillage, final String city, final String countyDistrict, final CodeValue stateProvince, - final CodeValue country, final String postalCode, final BigDecimal latitude, final BigDecimal longitude, final String createdBy, - final LocalDate createdOn, final String updatedBy, final LocalDate updatedOn) { + final String townVillage, final String city, final String countyDistrict, final CodeValue stateProvince, + final CodeValue country, final String postalCode, final BigDecimal latitude, final BigDecimal longitude, final String createdBy, + final LocalDate createdOn, final String updatedBy, final LocalDate updatedOn) { this.street = street; this.addressLine1 = addressLine1; this.addressLine2 = addressLine2; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/AddressRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/AddressRepository.java index 40870020f1c..0900a0e773e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/AddressRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/AddressRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/FieldConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/FieldConfiguration.java index 30c01c0b6ab..798928bcf50 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/FieldConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/FieldConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/FieldConfigurationRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/FieldConfigurationRepository.java index ce0c3de7c04..1c1af2821ca 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/FieldConfigurationRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/domain/FieldConfigurationRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/exception/AddressNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/exception/AddressNotFoundException.java index 88484feefd1..26cbf8a8e54 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/exception/AddressNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/exception/AddressNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/filter/ClientAddressSearchParam.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/filter/ClientAddressSearchParam.java index 5fb39908381..66925e5d25c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/filter/ClientAddressSearchParam.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/filter/ClientAddressSearchParam.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/serialization/AddressCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/serialization/AddressCommandFromApiJsonDeserializer.java index f332cf7bfa1..0b358606d4d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/serialization/AddressCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/serialization/AddressCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,12 +20,14 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -57,7 +59,8 @@ public void validate(final String json, final boolean fromNewClient) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final List dataValidationErrors = new ArrayList<>(); final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors).resource("Address"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressReadPlatformService.java index 49cf27eabc7..8123b8895d9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.address.service; import java.util.List; + import org.apache.fineract.portfolio.address.data.AddressData; import org.apache.fineract.portfolio.address.filter.ClientAddressSearchParam; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressReadPlatformServiceImpl.java index 249d60c1cc6..28941578c48 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.sql.SQLException; import java.time.LocalDate; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.codes.service.CodeValueReadPlatformService; @@ -177,7 +178,7 @@ public List retrieveAddressFields(final long clientid) { final AddFieldsMapper rm = new AddFieldsMapper(); final String sql = "select " + rm.schema() + " where client.id=?"; - return this.jdbcTemplate.query(sql, rm, new Object[] { clientid }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{clientid}); // NOSONAR } @Override @@ -185,7 +186,7 @@ public List retrieveAllClientAddress(final long clientid) { this.context.authenticatedUser(); final AddMapper rm = new AddMapper(); final String sql = "select " + rm.schema() + " and ca.client_id=?"; - return this.jdbcTemplate.query(sql, rm, new Object[] { clientid }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{clientid}); // NOSONAR } @Override @@ -195,7 +196,7 @@ public List retrieveAddressbyType(final long clientid, final long t final AddMapper rm = new AddMapper(); final String sql = "select " + rm.schema() + " and ca.client_id=? and ca.address_type_id=?"; - return this.jdbcTemplate.query(sql, rm, new Object[] { clientid, typeid }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{clientid, typeid}); // NOSONAR } @Override @@ -206,7 +207,7 @@ public List retrieveAddressbyTypeAndStatus(final long clientid, fin final AddMapper rm = new AddMapper(); final String sql = "select " + rm.schema() + " and ca.client_id=? and ca.address_type_id=? and ca.is_active=?"; - return this.jdbcTemplate.query(sql, rm, new Object[] { clientid, typeid, temp }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{clientid, typeid, temp}); // NOSONAR } @Override @@ -217,7 +218,7 @@ public List retrieveAddressbyStatus(final long clientid, final Stri final AddMapper rm = new AddMapper(); final String sql = "select " + rm.schema() + " and ca.client_id=? and ca.is_active=?"; - return this.jdbcTemplate.query(sql, rm, new Object[] { clientid, temp }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{clientid, temp}); // NOSONAR } @Override diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressWritePlatformService.java index 9c5f4d4a197..e2d609db612 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressWritePlatformServiceImpl.java index 420691f2024..0ca047cdd86 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/AddressWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,8 +20,10 @@ import com.google.gson.JsonArray; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.time.LocalDate; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.domain.CodeValue; import org.apache.fineract.infrastructure.codes.domain.CodeValueRepository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/FieldConfigurationReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/FieldConfigurationReadPlatformService.java index 33b96e7bb82..fb7fe25b766 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/FieldConfigurationReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/FieldConfigurationReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.address.service; import java.util.List; + import org.apache.fineract.portfolio.address.data.FieldConfigurationData; public interface FieldConfigurationReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/FieldConfigurationReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/FieldConfigurationReadPlatformServiceImpl.java index 521f647da7b..bda2aff9142 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/FieldConfigurationReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/address/service/FieldConfigurationReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; + import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.address.data.FieldConfigurationData; import org.springframework.beans.factory.annotation.Autowired; @@ -69,7 +70,7 @@ public List retrieveFieldConfiguration(final String enti final FieldMapper rm = new FieldMapper(); final String sql = "select " + rm.schema() + " where fld.entity=?"; - return this.jdbcTemplate.query(sql, rm, new Object[] { entity }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{entity}); // NOSONAR } @Override 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..0d3b8ec32f0 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 @@ -6,9 +6,9 @@ * 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 @@ -48,8 +48,8 @@ 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 Integer remindById, final Integer firstReminder, final Integer secondReminder) { + 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; this.location = location; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarHistoryRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarHistoryRepository.java index e6ef431ed94..c2ebafab553 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarHistoryRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarHistoryRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstanceRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstanceRepository.java index 1250c7509ba..733b7d733c8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstanceRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstanceRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.List; + import org.apache.fineract.portfolio.client.domain.Client; import org.apache.fineract.portfolio.group.domain.Group; import org.apache.fineract.portfolio.loanaccount.domain.Loan; @@ -67,7 +68,7 @@ public interface CalendarInstanceRepository extends JpaRepository findCalendarInstancesForLoansByGroupIdAndClientIdAndStatuses(@Param("groupId") Long groupId, - @Param("clientId") Long clientId, @Param("loanStatuses") Collection loanStatuses); + @Param("clientId") Long clientId, @Param("loanStatuses") Collection loanStatuses); /** * EntityType = 3 is for loan @@ -75,7 +76,7 @@ List findCalendarInstancesForLoansByGroupIdAndClientIdAndStatu @Cacheable(key = "'countLoans_calendarId_' + #calendarId + '_statuses_' + T(org.springframework.util.StringUtils).collectionToCommaDelimitedString(#loanStatuses)") @Query("SELECT COUNT(ci.id) FROM CalendarInstance ci, Loan loan WHERE loan.id = ci.entityId AND ci.entityTypeId = 3 AND ci.calendar.id = :calendarId AND loan.loanStatus IN :loanStatuses ") Integer countOfLoansSyncedWithCalendar(@Param("calendarId") Long calendarId, - @Param("loanStatuses") Collection loanStatuses); + @Param("loanStatuses") Collection loanStatuses); // Override JpaRepository methods to add cache eviction @Override diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstanceRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstanceRepositoryWrapper.java index 23c9d56604b..e923fdb8674 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstanceRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarInstanceRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarRepository.java index c773787a885..e746543cce6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarRepositoryWrapper.java index d49d8dd5c35..6f4f2788038 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/domain/CalendarRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarEntityTypeNotSupportedException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarEntityTypeNotSupportedException.java index 884e609ab4d..e14325e12f9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarEntityTypeNotSupportedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarEntityTypeNotSupportedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarInstanceNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarInstanceNotFoundException.java index dc380d91792..1499040908e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarInstanceNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarInstanceNotFoundException.java @@ -6,9 +6,9 @@ * 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 @@ -30,7 +30,7 @@ public CalendarInstanceNotFoundException(final Long id) { } public CalendarInstanceNotFoundException(final String postFix, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg.calendar.instance." + postFix, defaultUserMessage, defaultUserMessageArgs); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarNotFoundException.java index 6597de15baf..e7de94609b6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/CalendarNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/MeetingFrequencyMismatchException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/MeetingFrequencyMismatchException.java index 11f57781b4f..6717af931a7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/MeetingFrequencyMismatchException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/exception/MeetingFrequencyMismatchException.java @@ -6,9 +6,9 @@ * 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 @@ -26,7 +26,7 @@ public class MeetingFrequencyMismatchException extends AbstractPlatformDomainRuleException { public MeetingFrequencyMismatchException(final String postFix, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg.calendar." + postFix + ".not.the.same.as.meeting.frequency", defaultUserMessage, defaultUserMessageArgs); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/handler/CreateCalendarCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/handler/CreateCalendarCommandHandler.java index 10a074c025a..64fce145f32 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/handler/CreateCalendarCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/handler/CreateCalendarCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/handler/DeleteCalendarCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/handler/DeleteCalendarCommandHandler.java index 079ed6c128e..0d533d263cf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/handler/DeleteCalendarCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/handler/DeleteCalendarCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/handler/UpdateCalendarCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/handler/UpdateCalendarCommandHandler.java index 12c680ba2fd..96614488243 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/handler/UpdateCalendarCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/handler/UpdateCalendarCommandHandler.java @@ -6,9 +6,9 @@ * 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 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..f697eb43b1d 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 @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.time.LocalDate; import java.time.LocalTime; @@ -27,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -65,7 +67,8 @@ public CalendarCommand commandFromApiJson(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); @@ -99,7 +102,8 @@ public void validateForCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); @@ -219,7 +223,8 @@ public void validateForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarDropdownReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarDropdownReadPlatformService.java index 78570b3b704..2f475867c71 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarDropdownReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarDropdownReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.calendar.service; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; public interface CalendarDropdownReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarDropdownReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarDropdownReadPlatformServiceImpl.java index 5e2b9e0ce3a..34881422576 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarDropdownReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarDropdownReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.calendar.service; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.calendar.domain.CalendarEntityType; import org.apache.fineract.portfolio.calendar.domain.CalendarFrequencyType; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarReadPlatformService.java index c6ba6a1e7cf..6e4f38e916f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.Collection; import java.util.List; + import org.apache.fineract.portfolio.calendar.data.CalendarData; import org.apache.fineract.portfolio.meeting.data.MeetingData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarReadPlatformServiceImpl.java index cf3553d24ed..10c53b46641 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; import org.apache.fineract.infrastructure.core.data.EnumOptionData; @@ -122,7 +123,7 @@ public CalendarData retrieveCalendar(final Long calendarId, final Long entityId, final String sql = rm.schema() + " and c.id = ? and ci.entity_id = ? and ci.entity_type_enum = ? "; - return this.jdbcTemplate.queryForObject(sql, rm, new Object[] { calendarId, entityId, entityTypeId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, rm, new Object[]{calendarId, entityId, entityTypeId}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new CalendarNotFoundException(calendarId, e); } @@ -130,7 +131,7 @@ public CalendarData retrieveCalendar(final Long calendarId, final Long entityId, @Override public Collection retrieveCalendarsByEntity(final Long entityId, final Integer entityTypeId, - final List calendarTypeOptions) { + final List calendarTypeOptions) { final CalendarDataMapper rm = new CalendarDataMapper(); Collection result = null; @@ -139,12 +140,12 @@ public Collection retrieveCalendarsByEntity(final Long entityId, f if (calendarTypeOptions == null || calendarTypeOptions.isEmpty()) { sql = rm.schema() + " and ci.entity_id = ? and ci.entity_type_enum = ? order by c.start_date "; - result = this.jdbcTemplate.query(sql, rm, new Object[] { entityId, entityTypeId }); + result = this.jdbcTemplate.query(sql, rm, new Object[]{entityId, entityTypeId}); } else if (!calendarTypeOptions.isEmpty()) { final String sqlCalendarTypeOptions = CalendarUtils.getSqlCalendarTypeOptionsInString(calendarTypeOptions); sql = rm.schema() + " and ci.entity_id = ? and ci.entity_type_enum = ? and c.calendar_type_enum in ( " + sqlCalendarTypeOptions + " ) order by c.start_date "; - result = this.jdbcTemplate.query(sql, rm, new Object[] { entityId, entityTypeId }); + result = this.jdbcTemplate.query(sql, rm, new Object[]{entityId, entityTypeId}); } return result; } @@ -156,7 +157,7 @@ public CalendarData retrieveCollctionCalendarByEntity(final Long entityId, final final String sql = rm.schema() + " and ci.entity_id = ? and ci.entity_type_enum = ? and calendar_type_enum = ? order by c.start_date "; final List result = this.jdbcTemplate.query(sql, rm, // NOSONAR - new Object[] { entityId, entityTypeId, CalendarType.COLLECTION.getValue() }); + new Object[]{entityId, entityTypeId, CalendarType.COLLECTION.getValue()}); if (!result.isEmpty() && result.size() > 0) { return result.get(0); @@ -167,7 +168,7 @@ public CalendarData retrieveCollctionCalendarByEntity(final Long entityId, final @Override public Collection retrieveParentCalendarsByEntity(final Long entityId, final Integer entityTypeId, - final List calendarTypeOptions) { + final List calendarTypeOptions) { final CalendarDataMapper rm = new CalendarDataMapper(); Collection result = null; @@ -179,12 +180,12 @@ public Collection retrieveParentCalendarsByEntity(final Long entit // support more parent entity types. if (calendarTypeOptions == null || calendarTypeOptions.isEmpty()) { sql = rm.schema() + " " + parentHeirarchyCondition + " and ci.entity_type_enum = ? order by c.start_date "; - result = this.jdbcTemplate.query(sql, rm, new Object[] { entityId, CalendarEntityType.CENTERS.getValue() }); + result = this.jdbcTemplate.query(sql, rm, new Object[]{entityId, CalendarEntityType.CENTERS.getValue()}); } else { final String sqlCalendarTypeOptions = CalendarUtils.getSqlCalendarTypeOptionsInString(calendarTypeOptions); sql = rm.schema() + " " + parentHeirarchyCondition + " and ci.entity_type_enum = ? and c.calendar_type_enum in (" + sqlCalendarTypeOptions + ") order by c.start_date "; - result = this.jdbcTemplate.query(sql, rm, new Object[] { entityId, CalendarEntityType.CENTERS.getValue() }); + result = this.jdbcTemplate.query(sql, rm, new Object[]{entityId, CalendarEntityType.CENTERS.getValue()}); } return result; } @@ -206,7 +207,7 @@ public CalendarData retrieveNewCalendarDetails() { @Override public Collection generateRecurringDates(final CalendarData calendarData, final boolean withHistory, - final LocalDate tillDate) { + final LocalDate tillDate) { final LocalDate fromDate = null; Collection recurringDates = generateRecurringDate(calendarData, fromDate, tillDate, -1); @@ -227,7 +228,7 @@ public Collection generateNextTenRecurringDates(CalendarData calendar } private Collection generateRecurringDate(final CalendarData calendarData, final LocalDate fromDate, final LocalDate tillDate, - final int maxCount) { + final int maxCount) { if (!calendarData.isRepeating()) { return null; @@ -378,7 +379,7 @@ public CalendarData retrieveLoanCalendar(final Long loanId) { final String sql = rm.schema() + " and ci.entity_id = ? and ci.entity_type_enum = ? order by c.start_date "; CalendarData calendarData = null; final Collection calendars = this.jdbcTemplate.query(sql, rm, // NOSONAR - new Object[] { loanId, CalendarEntityType.LOANS.getValue() }); + new Object[]{loanId, CalendarEntityType.LOANS.getValue()}); if (!CollectionUtils.isEmpty(calendars)) { for (final CalendarData calendar : calendars) { @@ -399,20 +400,20 @@ public static String getParentHierarchyCondition(final CalendarEntityType calend // hierarchy? conditionSql = " and ci.entity_id in (select gc.group_id from m_client c join m_group_client gc " + " on c.id=gc.client_id where c.id = ? ) "; - break; + break; case GROUPS: // TODO : AA: add parent hierarchy for groups conditionSql = " and ci.entity_id in (select g.parent_id from m_group g where g.id = ? ) "; - break; + break; case LOANS: // TODO : AA: do we need parent hierarchy calendars for loans? conditionSql = " and ci.entity_id = ? "; - break; + break; default: - break; + break; } return conditionSql; @@ -437,7 +438,7 @@ private Collection retrieveCalendarsFromHistory(Long calendarId) { final String sql = rm.schema() + " where c.calendar_id = ? "; - final Collection calendars = this.jdbcTemplate.query(sql, rm, new Object[] { calendarId }); // NOSONAR + final Collection calendars = this.jdbcTemplate.query(sql, rm, new Object[]{calendarId}); // NOSONAR return calendars; } catch (final EmptyResultDataAccessException e) { return null; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarWritePlatformService.java index b286c251735..35d5ca394f1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarWritePlatformServiceJpaRepositoryImpl.java index cfc3a0198f4..a118350f3e0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/service/CalendarWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; import org.apache.fineract.infrastructure.core.api.JsonCommand; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/starter/CalendarConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/starter/CalendarConfiguration.java index 1661a22b7ba..c0d1813ee36 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/starter/CalendarConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/calendar/starter/CalendarConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -50,17 +50,17 @@ public CalendarDropdownReadPlatformService calendarDropdownReadPlatformService() @Bean @ConditionalOnMissingBean(CalendarReadPlatformService.class) public CalendarReadPlatformService calendarReadPlatformService(JdbcTemplate jdbcTemplate, - ConfigurationDomainService configurationDomainService) { + ConfigurationDomainService configurationDomainService) { return new CalendarReadPlatformServiceImpl(jdbcTemplate, configurationDomainService); } @Bean @ConditionalOnMissingBean(CalendarWritePlatformService.class) public CalendarWritePlatformService calendarWritePlatformService(CalendarRepository calendarRepository, - CalendarHistoryRepository calendarHistoryRepository, CalendarCommandFromApiJsonDeserializer fromApiJsonDeserializer, - CalendarInstanceRepository calendarInstanceRepository, LoanWritePlatformService loanWritePlatformService, - ConfigurationDomainService configurationDomainService, GroupRepositoryWrapper groupRepository, - LoanRepositoryWrapper loanRepositoryWrapper, ClientRepositoryWrapper clientRepository) { + CalendarHistoryRepository calendarHistoryRepository, CalendarCommandFromApiJsonDeserializer fromApiJsonDeserializer, + CalendarInstanceRepository calendarInstanceRepository, LoanWritePlatformService loanWritePlatformService, + ConfigurationDomainService configurationDomainService, GroupRepositoryWrapper groupRepository, + LoanRepositoryWrapper loanRepositoryWrapper, ClientRepositoryWrapper clientRepository) { return new CalendarWritePlatformServiceJpaRepositoryImpl(calendarRepository, calendarHistoryRepository, fromApiJsonDeserializer, calendarInstanceRepository, loanWritePlatformService, configurationDomainService, groupRepository, loanRepositoryWrapper, clientRepository); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeReadPlatformServiceImpl.java index a5ef2101f01..3eda137f273 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.common.AccountingDropdownReadPlatformService; import org.apache.fineract.accounting.glaccount.data.GLAccountData; @@ -92,7 +93,7 @@ public List retrieveAllChargesForCurrency(String currencyCode) { sql += addInClauseToSQL_toLimitChargesMappedToOffice_ifOfficeSpecificProductsEnabled(); sql += " order by c.name "; - return this.jdbcTemplate.query(sql, rm, new Object[] { currencyCode }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{currencyCode}); // NOSONAR } @Override @@ -105,7 +106,7 @@ public ChargeData retrieveCharge(final Long chargeId) { sql += addInClauseToSQL_toLimitChargesMappedToOffice_ifOfficeSpecificProductsEnabled(); sql = sql + " ;"; - return this.jdbcTemplate.queryForObject(sql, rm, new Object[] { chargeId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, rm, new Object[]{chargeId}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new ChargeNotFoundException(chargeId, e); } @@ -162,7 +163,7 @@ public List retrieveLoanProductCharges(final Long loanProductId) { sql += addInClauseToSQL_toLimitChargesMappedToOffice_ifOfficeSpecificProductsEnabled(); - return this.jdbcTemplate.query(sql, rm, new Object[] { loanProductId }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{loanProductId}); // NOSONAR } @Override @@ -174,13 +175,13 @@ public List retrieveLoanProductCharges(final Long loanProductId, fin + " where c.is_deleted=false and c.is_active=true and plc.product_loan_id=? and c.charge_time_enum=? "; sql += addInClauseToSQL_toLimitChargesMappedToOffice_ifOfficeSpecificProductsEnabled(); - return this.jdbcTemplate.query(sql, rm, new Object[] { loanProductId, chargeTime.getValue() }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{loanProductId, chargeTime.getValue()}); // NOSONAR } @Override public List retrieveLoanApplicableFees() { final ChargeMapper rm = new ChargeMapper(); - Object[] params = new Object[] { ChargeAppliesTo.LOAN.getValue() }; + Object[] params = new Object[]{ChargeAppliesTo.LOAN.getValue()}; String sql = "select " + rm.chargeSchema() + " where c.is_deleted=false and c.is_active=true and c.is_penalty=false and c.charge_applies_to_enum=? "; sql += addInClauseToSQL_toLimitChargesMappedToOffice_ifOfficeSpecificProductsEnabled(); @@ -249,7 +250,7 @@ public List retrieveLoanApplicablePenalties() { + " where c.is_deleted=false and c.is_active=true and c.is_penalty=true and c.charge_applies_to_enum=? "; sql += addInClauseToSQL_toLimitChargesMappedToOffice_ifOfficeSpecificProductsEnabled(); sql += " order by c.name "; - return this.jdbcTemplate.query(sql, rm, new Object[] { ChargeAppliesTo.LOAN.getValue() }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{ChargeAppliesTo.LOAN.getValue()}); // NOSONAR } private String addInClauseToSQL_toLimitChargesMappedToOffice_ifOfficeSpecificProductsEnabled() { @@ -397,7 +398,7 @@ public List retrieveSavingsProductApplicableCharges(final boolean fe sql += addInClauseToSQL_toLimitChargesMappedToOffice_ifOfficeSpecificProductsEnabled(); sql += " order by c.name "; - return this.jdbcTemplate.query(sql, rm, new Object[] { ChargeAppliesTo.SAVINGS.getValue() }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{ChargeAppliesTo.SAVINGS.getValue()}); // NOSONAR } @Override @@ -408,7 +409,7 @@ public List retrieveSavingsApplicablePenalties() { + " where c.is_deleted=false and c.is_active=true and c.is_penalty=true and c.charge_applies_to_enum=? "; sql += addInClauseToSQL_toLimitChargesMappedToOffice_ifOfficeSpecificProductsEnabled(); sql += " order by c.name "; - return this.jdbcTemplate.query(sql, rm, new Object[] { ChargeAppliesTo.SAVINGS.getValue() }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{ChargeAppliesTo.SAVINGS.getValue()}); // NOSONAR } @Override @@ -419,7 +420,7 @@ public List retrieveSavingsProductCharges(final Long savingsProductI + " where c.is_deleted=false and c.is_active=true and spc.savings_product_id=? "; sql += addInClauseToSQL_toLimitChargesMappedToOffice_ifOfficeSpecificProductsEnabled(); - return this.jdbcTemplate.query(sql, rm, new Object[] { savingsProductId }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{savingsProductId}); // NOSONAR } @Override @@ -429,7 +430,7 @@ public List retrieveShareProductCharges(final Long shareProductId) { String sql = "select " + rm.shareProductChargeSchema() + " where c.is_deleted=false and c.is_active=true and mspc.product_id=? "; sql += addInClauseToSQL_toLimitChargesMappedToOffice_ifOfficeSpecificProductsEnabled(); - return this.jdbcTemplate.query(sql, rm, new Object[] { shareProductId }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{shareProductId}); // NOSONAR } @Override @@ -441,7 +442,7 @@ public List retrieveSavingsAccountApplicableCharges(Long savingsAcco + " where c.is_deleted=false and c.is_active=true and c.charge_applies_to_enum=? " + " and sa.id = ?"; sql += addInClauseToSQL_toLimitChargesMappedToOffice_ifOfficeSpecificProductsEnabled(); - return this.jdbcTemplate.query(sql, rm, new Object[] { ChargeAppliesTo.SAVINGS.getValue(), savingsAccountId }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{ChargeAppliesTo.SAVINGS.getValue(), savingsAccountId}); // NOSONAR } @@ -452,7 +453,7 @@ public List retrieveAllChargesApplicableToClients() { sql += addInClauseToSQL_toLimitChargesMappedToOffice_ifOfficeSpecificProductsEnabled(); sql += " order by c.name "; - return this.jdbcTemplate.query(sql, rm, new Object[] { ChargeAppliesTo.CLIENT.getValue() }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{ChargeAppliesTo.CLIENT.getValue()}); // NOSONAR } @Override @@ -462,6 +463,6 @@ public List retrieveSharesApplicableCharges() { sql += addInClauseToSQL_toLimitChargesMappedToOffice_ifOfficeSpecificProductsEnabled(); sql += " order by c.name "; - return this.jdbcTemplate.query(sql, rm, new Object[] { ChargeAppliesTo.SHARES.getValue() }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{ChargeAppliesTo.SHARES.getValue()}); // NOSONAR } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeWritePlatformServiceJpaRepositoryImpl.java index 251bf27d945..c093c289977 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/service/ChargeWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.portfolio.charge.service; import jakarta.persistence.PersistenceException; + import java.util.Collection; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; @@ -260,25 +262,25 @@ private void handleDataIntegrityIssues(final JsonCommand command, final Throwabl private boolean isAnyLoansAssociateWithThisCharge(final Long chargeId) { final String sql = "select (CASE WHEN exists (select 1 from m_loan_charge lc where lc.charge_id = ? and lc.is_active = true) THEN 'true' ELSE 'false' END)"; - final String isLoansUsingCharge = this.jdbcTemplate.queryForObject(sql, String.class, new Object[] { chargeId }); + final String isLoansUsingCharge = this.jdbcTemplate.queryForObject(sql, String.class, new Object[]{chargeId}); return Boolean.valueOf(isLoansUsingCharge); } private boolean isAnySavingsAssociateWithThisCharge(final Long chargeId) { final String sql = "select (CASE WHEN exists (select 1 from m_savings_account_charge sc where sc.charge_id = ? and sc.is_active = true) THEN 'true' ELSE 'false' END)"; - final String isSavingsUsingCharge = this.jdbcTemplate.queryForObject(sql, String.class, new Object[] { chargeId }); + final String isSavingsUsingCharge = this.jdbcTemplate.queryForObject(sql, String.class, new Object[]{chargeId}); return Boolean.valueOf(isSavingsUsingCharge); } private boolean isAnyLoanProductsAssociateWithThisCharge(final Long chargeId) { final String sql = "select (CASE WHEN exists (select 1 from m_product_loan_charge lc where lc.charge_id = ?) THEN 'true' ELSE 'false' END)"; - final String isLoansUsingCharge = this.jdbcTemplate.queryForObject(sql, String.class, new Object[] { chargeId }); + final String isLoansUsingCharge = this.jdbcTemplate.queryForObject(sql, String.class, new Object[]{chargeId}); return Boolean.valueOf(isLoansUsingCharge); } private boolean isAnySavingsProductsAssociateWithThisCharge(final Long chargeId) { final String sql = "select (CASE WHEN (exists (select 1 from m_savings_product_charge sc where sc.charge_id = ?)) = 1 THEN 'true' ELSE 'false' END)"; - final String isSavingsUsingCharge = this.jdbcTemplate.queryForObject(sql, String.class, new Object[] { chargeId }); + final String isSavingsUsingCharge = this.jdbcTemplate.queryForObject(sql, String.class, new Object[]{chargeId}); return Boolean.valueOf(isSavingsUsingCharge); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/starter/ChargeConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/starter/ChargeConfiguration.java index ca1185f2cf9..cf8fdd8ca58 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/starter/ChargeConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/starter/ChargeConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -55,10 +55,10 @@ public ChargeDropdownReadPlatformService chargeDropdownReadPlatformService() { @Bean @ConditionalOnMissingBean(ChargeReadPlatformService.class) public ChargeReadPlatformService chargeReadPlatformService(CurrencyReadPlatformService currencyReadPlatformService, - ChargeDropdownReadPlatformService chargeDropdownReadPlatformService, JdbcTemplate jdbcTemplate, - DropdownReadPlatformService dropdownReadPlatformService, FineractEntityAccessUtil fineractEntityAccessUtil, - AccountingDropdownReadPlatformService accountingDropdownReadPlatformService, TaxReadPlatformService taxReadPlatformService, - ConfigurationDomainServiceJpa configurationDomainServiceJpa, NamedParameterJdbcTemplate namedParameterJdbcTemplate) { + ChargeDropdownReadPlatformService chargeDropdownReadPlatformService, JdbcTemplate jdbcTemplate, + DropdownReadPlatformService dropdownReadPlatformService, FineractEntityAccessUtil fineractEntityAccessUtil, + AccountingDropdownReadPlatformService accountingDropdownReadPlatformService, TaxReadPlatformService taxReadPlatformService, + ConfigurationDomainServiceJpa configurationDomainServiceJpa, NamedParameterJdbcTemplate namedParameterJdbcTemplate) { return new ChargeReadPlatformServiceImpl(currencyReadPlatformService, chargeDropdownReadPlatformService, jdbcTemplate, dropdownReadPlatformService, fineractEntityAccessUtil, accountingDropdownReadPlatformService, taxReadPlatformService, configurationDomainServiceJpa, namedParameterJdbcTemplate); @@ -67,10 +67,10 @@ public ChargeReadPlatformService chargeReadPlatformService(CurrencyReadPlatformS @Bean @ConditionalOnMissingBean(ChargeWritePlatformService.class) public ChargeWritePlatformService chargeWritePlatformService(PlatformSecurityContext context, - ChargeDefinitionCommandFromApiJsonDeserializer fromApiJsonDeserializer, ChargeRepository chargeRepository, - LoanProductRepository loanProductRepository, JdbcTemplate jdbcTemplate, FineractEntityAccessUtil fineractEntityAccessUtil, - GLAccountRepositoryWrapper glAccountRepository, TaxGroupRepositoryWrapper taxGroupRepository, - PaymentTypeRepositoryWrapper paymentTyperepositoryWrapper) { + ChargeDefinitionCommandFromApiJsonDeserializer fromApiJsonDeserializer, ChargeRepository chargeRepository, + LoanProductRepository loanProductRepository, JdbcTemplate jdbcTemplate, FineractEntityAccessUtil fineractEntityAccessUtil, + GLAccountRepositoryWrapper glAccountRepository, TaxGroupRepositoryWrapper taxGroupRepository, + PaymentTypeRepositoryWrapper paymentTyperepositoryWrapper) { return new ChargeWritePlatformServiceJpaRepositoryImpl(context, fromApiJsonDeserializer, chargeRepository, loanProductRepository, jdbcTemplate, fineractEntityAccessUtil, glAccountRepository, taxGroupRepository, paymentTyperepositoryWrapper); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/util/ConvertChargeDataToSpecificChargeData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/util/ConvertChargeDataToSpecificChargeData.java index ac2a6c2aa84..f5868d9899a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/util/ConvertChargeDataToSpecificChargeData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/charge/util/ConvertChargeDataToSpecificChargeData.java @@ -6,9 +6,9 @@ * 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 @@ -21,13 +21,15 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.Collection; + import org.apache.fineract.portfolio.charge.data.ChargeData; import org.apache.fineract.portfolio.savings.data.SavingsAccountChargeData; import org.apache.fineract.portfolio.shareaccounts.data.ShareAccountChargeData; public final class ConvertChargeDataToSpecificChargeData { - private ConvertChargeDataToSpecificChargeData() {} + private ConvertChargeDataToSpecificChargeData() { + } public static SavingsAccountChargeData toSavingsAccountChargeData(final ChargeData chargeData) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResourcesSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResourcesSwagger.java index 2bb2d1832af..9b88d11e855 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResourcesSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientAddressApiResourcesSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -23,15 +23,17 @@ /** * Created by Chirag Gupta on 01/12/18. */ -@SuppressWarnings({ "MemberName" }) +@SuppressWarnings({"MemberName"}) final class ClientAddressApiResourcesSwagger { - private ClientAddressApiResourcesSwagger() {} + private ClientAddressApiResourcesSwagger() { + } @Schema(description = "PostClientClientIdAddressesResponse") public static final class PostClientClientIdAddressesResponse { - private PostClientClientIdAddressesResponse() {} + private PostClientClientIdAddressesResponse() { + } @Schema(example = "15") public Long resourceId; @@ -40,7 +42,8 @@ private PostClientClientIdAddressesResponse() {} @Schema(description = "PutClientClientIdAddressesResponse") public static final class PutClientClientIdAddressesResponse { - private PutClientClientIdAddressesResponse() {} + private PutClientClientIdAddressesResponse() { + } @Schema(example = "67") public Long resourceId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResourceSwagger.java index a2d8d57c6e4..7dad80f381f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientChargesApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.client.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.Set; @@ -28,20 +29,24 @@ */ final class ClientChargesApiResourceSwagger { - private ClientChargesApiResourceSwagger() {} + private ClientChargesApiResourceSwagger() { + } @Schema(description = "GetClientsClientIdChargesResponse") public static final class GetClientsClientIdChargesResponse { - private GetClientsClientIdChargesResponse() {} + private GetClientsClientIdChargesResponse() { + } static final class GetClientsChargesPageItems { - private GetClientsChargesPageItems() {} + private GetClientsChargesPageItems() { + } static final class GetClientChargeTimeType { - private GetClientChargeTimeType() {} + private GetClientChargeTimeType() { + } @Schema(example = "2") public Integer id; @@ -53,7 +58,8 @@ private GetClientChargeTimeType() {} static final class GetClientChargeCalculationType { - private GetClientChargeCalculationType() {} + private GetClientChargeCalculationType() { + } @Schema(example = "1") public Integer id; @@ -65,7 +71,8 @@ private GetClientChargeCalculationType() {} static final class GetClientChargeCurrency { - private GetClientChargeCurrency() {} + private GetClientChargeCurrency() { + } @Schema(example = "USD") public String code; @@ -122,7 +129,8 @@ private GetClientChargeCurrency() {} @Schema(description = "PostClientsClientIdChargesRequest") public static final class PostClientsClientIdChargesRequest { - private PostClientsClientIdChargesRequest() {} + private PostClientsClientIdChargesRequest() { + } @Schema(example = "100") public Integer amount; @@ -139,7 +147,8 @@ private PostClientsClientIdChargesRequest() {} @Schema(description = "PostClientsClientIdChargesResponse") public static final class PostClientsClientIdChargesResponse { - private PostClientsClientIdChargesResponse() {} + private PostClientsClientIdChargesResponse() { + } @Schema(example = "1") public Long officeId; @@ -152,7 +161,8 @@ private PostClientsClientIdChargesResponse() {} @Schema(description = "PostClientsClientIdChargesChargeIdRequest") public static final class PostClientsClientIdChargesChargeIdRequest { - private PostClientsClientIdChargesChargeIdRequest() {} + private PostClientsClientIdChargesChargeIdRequest() { + } @Schema(example = "200") public Integer amount; @@ -169,7 +179,8 @@ private PostClientsClientIdChargesChargeIdRequest() {} @Schema(description = "PostClientsClientIdChargesChargeIdResponse") public static final class PostClientsClientIdChargesChargeIdResponse { - private PostClientsClientIdChargesChargeIdResponse() {} + private PostClientsClientIdChargesChargeIdResponse() { + } @Schema(example = "1") public Long officeId; @@ -184,7 +195,8 @@ private PostClientsClientIdChargesChargeIdResponse() {} @Schema(description = "DeleteClientsClientIdChargesChargeIdResponse") public static final class DeleteClientsClientIdChargesChargeIdResponse { - private DeleteClientsClientIdChargesChargeIdResponse() {} + private DeleteClientsClientIdChargesChargeIdResponse() { + } @Schema(example = "1") public Long officeId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResourceSwagger.java index eab09490e71..4c7e167500d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientIdentifiersApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -26,16 +26,19 @@ */ final class ClientIdentifiersApiResourceSwagger { - private ClientIdentifiersApiResourceSwagger() {} + private ClientIdentifiersApiResourceSwagger() { + } @Schema(description = "GetClientsClientIdIdentifiersResponse") public static final class GetClientsClientIdIdentifiersResponse { - private GetClientsClientIdIdentifiersResponse() {} + private GetClientsClientIdIdentifiersResponse() { + } static final class GetClientsDocumentType { - private GetClientsDocumentType() {} + private GetClientsDocumentType() { + } @Schema(example = "3") public Long id; @@ -57,7 +60,8 @@ private GetClientsDocumentType() {} @Schema(description = "PostClientsClientIdIdentifiersRequest") public static final class PostClientsClientIdIdentifiersRequest { - private PostClientsClientIdIdentifiersRequest() {} + private PostClientsClientIdIdentifiersRequest() { + } @Schema(example = "1") public Long documentTypeId; @@ -72,7 +76,8 @@ private PostClientsClientIdIdentifiersRequest() {} @Schema(description = "PutClientsClientIdIdentifiersIdentifierIdResponse") public static final class PutClientsClientIdIdentifiersIdentifierIdResponse { - private PutClientsClientIdIdentifiersIdentifierIdResponse() {} + private PutClientsClientIdIdentifiersIdentifierIdResponse() { + } @Schema(example = "1") public Long officeId; @@ -86,7 +91,8 @@ private PutClientsClientIdIdentifiersIdentifierIdResponse() {} @Schema(description = "PostClientsClientIdIdentifiersResponse") public static final class PostClientsClientIdIdentifiersResponse { - private PostClientsClientIdIdentifiersResponse() {} + private PostClientsClientIdIdentifiersResponse() { + } @Schema(example = "1") public Long officeId; @@ -99,7 +105,8 @@ private PostClientsClientIdIdentifiersResponse() {} @Schema(description = "DeleteClientsClientIdIdentifiersIdentifierIdResponse") public static final class DeleteClientsClientIdIdentifiersIdentifierIdResponse { - private DeleteClientsClientIdIdentifiersIdentifierIdResponse() {} + private DeleteClientsClientIdIdentifiersIdentifierIdResponse() { + } @Schema(example = "1") public Long officeId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResourceSwagger.java index 9864f7215c9..e0e0fc425d0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientTransactionsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.client.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.Set; @@ -28,20 +29,24 @@ */ final class ClientTransactionsApiResourceSwagger { - private ClientTransactionsApiResourceSwagger() {} + private ClientTransactionsApiResourceSwagger() { + } @Schema(description = "GetClientsClientIdTransactionsResponse") public static final class GetClientsClientIdTransactionsResponse { - private GetClientsClientIdTransactionsResponse() {} + private GetClientsClientIdTransactionsResponse() { + } static final class GetClientsPageItems { - private GetClientsPageItems() {} + private GetClientsPageItems() { + } static final class GetClientsClientIdTransactionsType { - private GetClientsClientIdTransactionsType() {} + private GetClientsClientIdTransactionsType() { + } @Schema(example = "1") public Long id; @@ -53,7 +58,8 @@ private GetClientsClientIdTransactionsType() {} static final class GetClientTransactionsCurrency { - private GetClientTransactionsCurrency() {} + private GetClientTransactionsCurrency() { + } @Schema(example = "USD") public String code; @@ -95,7 +101,8 @@ private GetClientTransactionsCurrency() {} @Schema(description = "GetClientsClientIdTransactionsTransactionIdResponse") public static final class GetClientsClientIdTransactionsTransactionIdResponse { - private GetClientsClientIdTransactionsTransactionIdResponse() {} + private GetClientsClientIdTransactionsTransactionIdResponse() { + } @Schema(example = "1") public Long id; @@ -118,7 +125,8 @@ private GetClientsClientIdTransactionsTransactionIdResponse() {} @Schema(description = "PostClientsClientIdTransactionsTransactionIdResponse") public static final class PostClientsClientIdTransactionsTransactionIdResponse { - private PostClientsClientIdTransactionsTransactionIdResponse() {} + private PostClientsClientIdTransactionsTransactionIdResponse() { + } @Schema(example = "1") public Long officeId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResourceSwagger.java index dd4690db756..66dbdd05df5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/ClientsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.portfolio.client.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; import java.util.HashMap; import java.util.List; import java.util.Set; + import org.apache.fineract.portfolio.client.data.ClientAddressRequest; /** @@ -30,16 +32,19 @@ */ final class ClientsApiResourceSwagger { - private ClientsApiResourceSwagger() {} + private ClientsApiResourceSwagger() { + } @Schema(description = "GetClientsTemplateResponse") public static final class GetClientsTemplateResponse { - private GetClientsTemplateResponse() {} + private GetClientsTemplateResponse() { + } static final class GetClientsOfficeOptions { - private GetClientsOfficeOptions() {} + private GetClientsOfficeOptions() { + } @Schema(example = "1") public Long id; @@ -51,7 +56,8 @@ private GetClientsOfficeOptions() {} static final class GetClientsStaffOptions { - private GetClientsStaffOptions() {} + private GetClientsStaffOptions() { + } @Schema(example = "1") public Long id; @@ -73,7 +79,8 @@ private GetClientsStaffOptions() {} static final class GetClientsSavingProductOptions { - private GetClientsSavingProductOptions() {} + private GetClientsSavingProductOptions() { + } @Schema(example = "4") public Long id; @@ -87,11 +94,13 @@ private GetClientsSavingProductOptions() {} static final class GetClientsDataTables { - private GetClientsDataTables() {} + private GetClientsDataTables() { + } static final class GetClientsColumnHeaderData { - private GetClientsColumnHeaderData() {} + private GetClientsColumnHeaderData() { + } @Schema(example = "client_id") public String columnName; @@ -129,15 +138,18 @@ private GetClientsColumnHeaderData() {} @Schema(description = "GetClientsResponse") public static final class GetClientsResponse { - private GetClientsResponse() {} + private GetClientsResponse() { + } static final class GetClientsPageItemsResponse { - private GetClientsPageItemsResponse() {} + private GetClientsPageItemsResponse() { + } static final class GetClientStatus { - private GetClientStatus() {} + private GetClientStatus() { + } @Schema(example = "100") public Long id; @@ -174,11 +186,13 @@ private GetClientStatus() {} @Schema(description = "GetClientsClientIdResponse") public static final class GetClientsClientIdResponse { - private GetClientsClientIdResponse() {} + private GetClientsClientIdResponse() { + } static final class GetClientsClientIdStatus { - private GetClientsClientIdStatus() {} + private GetClientsClientIdStatus() { + } @Schema(example = "300") public Long id; @@ -190,7 +204,8 @@ private GetClientsClientIdStatus() {} static final class GetClientsTimeline { - private GetClientsTimeline() {} + private GetClientsTimeline() { + } @Schema(example = "[2013, 1, 1]") public LocalDate submittedOnDate; @@ -213,7 +228,8 @@ private GetClientsTimeline() {} static final class GetClientsGroups { - private GetClientsGroups() {} + private GetClientsGroups() { + } @Schema(example = "000000001") public Long id; @@ -260,11 +276,13 @@ private GetClientsGroups() {} @Schema(description = "PostClientsRequest") public static final class PostClientsRequest { - private PostClientsRequest() {} + private PostClientsRequest() { + } static final class PostClientsDatatable { - private PostClientsDatatable() {} + private PostClientsDatatable() { + } @Schema(example = "Client Beneficiary information") public String registeredTableName; @@ -336,7 +354,8 @@ static final class PostClientsAddressRequest { @Schema(description = "PostClientsResponse") public static final class PostClientsResponse { - private PostClientsResponse() {} + private PostClientsResponse() { + } @Schema(example = "1") public Long officeId; @@ -353,7 +372,8 @@ private PostClientsResponse() {} @Schema(description = "PutClientsClientIdRequest") public static final class PutClientsClientIdRequest { - private PutClientsClientIdRequest() {} + private PutClientsClientIdRequest() { + } @Schema(example = "786444UUUYYH7") public String externalId; @@ -364,7 +384,8 @@ private PutClientsClientIdRequest() {} @Schema(description = "PutClientsClientIdResponse") public static final class PutClientsClientIdResponse { - private PutClientsClientIdResponse() {} + private PutClientsClientIdResponse() { + } @Schema(example = "1") public Long officeId; @@ -380,13 +401,15 @@ private PutClientsClientIdResponse() {} @Schema(description = "DeleteClientsClientIdRequest") public static final class DeleteClientsClientIdRequest { - private DeleteClientsClientIdRequest() {} + private DeleteClientsClientIdRequest() { + } } @Schema(description = "DeleteClientsClientIdResponse") public static final class DeleteClientsClientIdResponse { - private DeleteClientsClientIdResponse() {} + private DeleteClientsClientIdResponse() { + } @Schema(example = "1") public Long officeId; @@ -401,7 +424,8 @@ private DeleteClientsClientIdResponse() {} @Schema(description = "PostClientsClientIdRequest") public static final class PostClientsClientIdRequest { - private PostClientsClientIdRequest() {} + private PostClientsClientIdRequest() { + } @Schema(example = "03 August 2021") public String activationDate; @@ -424,7 +448,8 @@ private PostClientsClientIdRequest() {} @Schema(description = "PostClientsClientIdResponse") public static final class PostClientsClientIdResponse { - private PostClientsClientIdResponse() {} + private PostClientsClientIdResponse() { + } @Schema(example = "2") public Long officeId; @@ -448,7 +473,8 @@ public static final class GetClientObligeeDetailsResponse { static final class GetObligeeData { - private GetObligeeData() {} + private GetObligeeData() { + } @Schema(example = "John") public String firstName; @@ -475,15 +501,18 @@ private GetObligeeData() {} @Schema(description = "GetClientsClientIdAccountsResponse") public static final class GetClientsClientIdAccountsResponse { - private GetClientsClientIdAccountsResponse() {} + private GetClientsClientIdAccountsResponse() { + } static final class GetClientsLoanAccounts { - private GetClientsLoanAccounts() {} + private GetClientsLoanAccounts() { + } static final class GetClientsLoansAccountsCurrency { - private GetClientsLoansAccountsCurrency() {} + private GetClientsLoansAccountsCurrency() { + } @Schema(example = "USD") public String code; @@ -501,7 +530,8 @@ private GetClientsLoansAccountsCurrency() {} static final class GetClientsLoanAccountsStatus { - private GetClientsLoanAccountsStatus() {} + private GetClientsLoanAccountsStatus() { + } @Schema(example = "300") public Long id; @@ -529,7 +559,8 @@ private GetClientsLoanAccountsStatus() {} static final class GetClientsLoanAccountsType { - private GetClientsLoanAccountsType() {} + private GetClientsLoanAccountsType() { + } @Schema(example = "1") public Long id; @@ -558,11 +589,13 @@ private GetClientsLoanAccountsType() {} static final class GetClientsSavingsAccounts { - private GetClientsSavingsAccounts() {} + private GetClientsSavingsAccounts() { + } static final class GetClientsSavingsAccountsCurrency { - private GetClientsSavingsAccountsCurrency() {} + private GetClientsSavingsAccountsCurrency() { + } @Schema(example = "USD") public String code; @@ -580,7 +613,8 @@ private GetClientsSavingsAccountsCurrency() {} static final class GetClientsSavingsAccountsStatus { - private GetClientsSavingsAccountsStatus() {} + private GetClientsSavingsAccountsStatus() { + } @Schema(example = "100") public Long id; @@ -612,7 +646,8 @@ private GetClientsSavingsAccountsStatus() {} static final class GetClientsSavingsAccountsDepositType { - private GetClientsSavingsAccountsDepositType() {} + private GetClientsSavingsAccountsDepositType() { + } @Schema(example = "100") public Long id; @@ -639,11 +674,13 @@ private GetClientsSavingsAccountsDepositType() {} static final class GetClientsWorkingCapitalLoanAccounts { - private GetClientsWorkingCapitalLoanAccounts() {} + private GetClientsWorkingCapitalLoanAccounts() { + } static final class GetClientsWorkingCapitalLoanAccountsStatus { - private GetClientsWorkingCapitalLoanAccountsStatus() {} + private GetClientsWorkingCapitalLoanAccountsStatus() { + } @Schema(example = "100") public Long id; @@ -655,7 +692,8 @@ private GetClientsWorkingCapitalLoanAccountsStatus() {} static final class GetClientsWorkingCapitalLoanAccountsCurrency { - private GetClientsWorkingCapitalLoanAccountsCurrency() {} + private GetClientsWorkingCapitalLoanAccountsCurrency() { + } @Schema(example = "USD") public String code; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/v2/search/ClientSearchV2Api.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/v2/search/ClientSearchV2Api.java index b45527c5395..d3af79d7f37 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/v2/search/ClientSearchV2Api.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/v2/search/ClientSearchV2Api.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/v2/search/ClientSearchV2ApiDelegate.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/v2/search/ClientSearchV2ApiDelegate.java index 780c1eb3577..830f41948eb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/v2/search/ClientSearchV2ApiDelegate.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/v2/search/ClientSearchV2ApiDelegate.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/v2/search/ClientSearchV2ApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/v2/search/ClientSearchV2ApiResource.java index 5a302e88dd8..a6105d23ea5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/v2/search/ClientSearchV2ApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/api/v2/search/ClientSearchV2ApiResource.java @@ -6,9 +6,9 @@ * 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 @@ -44,8 +44,8 @@ public class ClientSearchV2ApiResource implements ClientSearchV2Api { @Override @POST @Path("search") - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) @Operation(summary = "Search Clients by text", operationId = "searchClientsByText") public Page searchByText(@Parameter PagedRequest request) { return delegate.searchByText(request); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/command/ClientIdentifierCommand.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/command/ClientIdentifierCommand.java index 2bd7c72389a..7f46b833423 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/command/ClientIdentifierCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/command/ClientIdentifierCommand.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; @@ -35,7 +36,7 @@ public class ClientIdentifierCommand { private final String status; public ClientIdentifierCommand(final Long documentTypeId, final String documentKey, final String statusString, - final String description) { + final String description) { this.documentTypeId = documentTypeId; this.documentKey = documentKey; this.status = statusString; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/command/ClientNoteCommand.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/command/ClientNoteCommand.java index 7a61a410e13..5066973750b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/command/ClientNoteCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/command/ClientNoteCommand.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientAddressRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientAddressRequest.java index 5df556aa992..6fd9af7d0fb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientAddressRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientAddressRequest.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.math.BigDecimal; + import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientApiCollectionConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientApiCollectionConstants.java index 330afe3e637..b6dbca2aca1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientApiCollectionConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientApiCollectionConstants.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.HashSet; import java.util.Set; + import org.apache.fineract.portfolio.client.api.ClientApiConstants; public class ClientApiCollectionConstants extends ClientApiConstants { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientChargeData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientChargeData.java index db076486055..e05162704e9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientChargeData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientChargeData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.Collection; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.portfolio.charge.data.ChargeData; @@ -69,9 +70,9 @@ public final class ClientChargeData { private final Collection clientTransactionDatas; public static ClientChargeData instance(Long id, Long clientId, Long chargeId, String name, EnumOptionData chargeTimeType, - LocalDate dueDate, EnumOptionData chargeCalculationType, CurrencyData currency, BigDecimal amount, BigDecimal amountPaid, - BigDecimal amountWaived, BigDecimal amountWrittenOff, BigDecimal amountOutstanding, boolean penalty, Boolean isPaid, - Boolean isWaived, Boolean isActive, LocalDate inactivationDate, Collection chargeOptions) { + LocalDate dueDate, EnumOptionData chargeCalculationType, CurrencyData currency, BigDecimal amount, BigDecimal amountPaid, + BigDecimal amountWaived, BigDecimal amountWrittenOff, BigDecimal amountOutstanding, boolean penalty, Boolean isPaid, + Boolean isWaived, Boolean isActive, LocalDate inactivationDate, Collection chargeOptions) { Collection clientTransactionDatas = null; return new ClientChargeData(id, clientId, chargeId, name, chargeTimeType, dueDate, chargeCalculationType, currency, amount, amountPaid, amountWaived, amountWrittenOff, amountOutstanding, penalty, isPaid, isWaived, isActive, inactivationDate, @@ -79,7 +80,7 @@ public static ClientChargeData instance(Long id, Long clientId, Long chargeId, S } public static ClientChargeData addAssociations(ClientChargeData clientChargeData, - Collection clientTransactionDatas) { + Collection clientTransactionDatas) { return new ClientChargeData(clientChargeData.id, clientChargeData.clientId, clientChargeData.chargeId, clientChargeData.name, clientChargeData.chargeTimeType, clientChargeData.dueDate, clientChargeData.chargeCalculationType, clientChargeData.currency, clientChargeData.amount, clientChargeData.amountPaid, clientChargeData.amountWaived, @@ -115,9 +116,9 @@ public static ClientChargeData template(final Collection chargeOptio } private ClientChargeData(Long id, Long clientId, Long chargeId, String name, EnumOptionData chargeTimeType, LocalDate dueDate, - EnumOptionData chargeCalculationType, CurrencyData currency, BigDecimal amount, BigDecimal amountPaid, BigDecimal amountWaived, - BigDecimal amountWrittenOff, BigDecimal amountOutstanding, boolean penalty, Boolean isPaid, Boolean isWaived, Boolean isActive, - LocalDate inactivationDate, Collection chargeOptions, Collection clientTransactionDatas) { + EnumOptionData chargeCalculationType, CurrencyData currency, BigDecimal amount, BigDecimal amountPaid, BigDecimal amountWaived, + BigDecimal amountWrittenOff, BigDecimal amountOutstanding, boolean penalty, Boolean isPaid, Boolean isWaived, Boolean isActive, + LocalDate inactivationDate, Collection chargeOptions, Collection clientTransactionDatas) { this.id = id; this.clientId = clientId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientChargeDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientChargeDataValidator.java index 8f3ebb3205d..6328db63527 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientChargeDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientChargeDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,12 +20,14 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; import java.util.Map; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -51,7 +53,8 @@ public void validateAdd(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.CLIENT_CHARGES_ADD_REQUEST_DATA_PARAMETERS); @@ -75,7 +78,8 @@ public void validateUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.CLIENT_CHARGES_ADD_REQUEST_DATA_PARAMETERS); @@ -102,7 +106,8 @@ public void validatePayCharge(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.CLIENT_CHARGES_PAY_CHARGE_REQUEST_DATA_PARAMETERS); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientDataValidator.java index ee9693ffaaf..e5fc5c036e7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.time.LocalDate; import java.util.ArrayList; @@ -30,6 +31,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.configuration.api.GlobalConfigurationConstants; import org.apache.fineract.infrastructure.configuration.service.ConfigurationReadPlatformService; @@ -53,7 +55,7 @@ public final class ClientDataValidator { @Autowired public ClientDataValidator(final FromJsonHelper fromApiJsonHelper, - final ConfigurationReadPlatformService configurationReadPlatformService) { + final ConfigurationReadPlatformService configurationReadPlatformService) { this.fromApiJsonHelper = fromApiJsonHelper; this.configurationReadPlatformService = configurationReadPlatformService; } @@ -64,7 +66,8 @@ public void validateForCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.CLIENT_CREATE_REQUEST_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); @@ -289,7 +292,7 @@ List getDataValidationErrorsForCreateOnClientNonPerson(JsonEl } private void validateIndividualNamePartsCannotBeUsedWithFullname(final JsonElement element, - final DataValidatorBuilder baseDataValidator) { + final DataValidatorBuilder baseDataValidator) { final String firstnameParam = this.fromApiJsonHelper.extractStringNamed(ClientApiConstants.firstnameParamName, element); if (StringUtils.isNotBlank(firstnameParam)) { final String fullnameParam = this.fromApiJsonHelper.extractStringNamed(ClientApiConstants.fullnameParamName, element); @@ -360,7 +363,8 @@ public void validateForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.CLIENT_UPDATE_REQUEST_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); @@ -605,7 +609,8 @@ public void validateActivation(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.ACTIVATION_REQUEST_DATA_PARAMETERS); @@ -649,7 +654,8 @@ public void validateForUnassignStaff(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final Set supportedParametersUnassignStaff = new HashSet<>(Arrays.asList(ClientApiConstants.staffIdParamName)); @@ -677,7 +683,8 @@ public void validateForAssignStaff(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final Set supportedParametersUnassignStaff = new HashSet<>(Arrays.asList(ClientApiConstants.staffIdParamName)); @@ -707,7 +714,8 @@ public void validateClose(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.CLIENT_CLOSE_REQUEST_DATA_PARAMETERS); @@ -733,7 +741,8 @@ public void validateForSavingsAccount(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final Set supportedParameters = new HashSet<>(Arrays.asList(ClientApiConstants.savingsAccountIdParamName)); @@ -763,7 +772,8 @@ public void validateRejection(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.CLIENT_REJECT_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -791,7 +801,8 @@ public void validateWithdrawn(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.CLIENT_WITHDRAW_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -819,7 +830,8 @@ public void validateReactivate(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.REACTIVATION_REQUEST_DATA_PARAMETERS); @@ -845,7 +857,8 @@ public void validateUndoRejection(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.UNDOREJECTION_REQUEST_DATA_PARAMETERS); @@ -871,7 +884,8 @@ public void validateUndoWithDrawn(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ClientApiCollectionConstants.UNDOWITHDRAWN_REQUEST_DATA_PARAMETERS); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientIdentifierData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientIdentifierData.java index ece9bd2fd17..f604df84fdd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientIdentifierData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientIdentifierData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.util.Collection; + import lombok.AllArgsConstructor; import lombok.Data; import org.apache.fineract.infrastructure.codes.data.CodeValueData; @@ -45,7 +46,7 @@ public class ClientIdentifierData implements Serializable { private final Collection allowedDocumentTypes; public static ClientIdentifierData singleItem(final Long id, final Long clientId, final CodeValueData documentType, - final String documentKey, final String status, final String description) { + final String documentKey, final String status, final String description) { return new ClientIdentifierData(id, clientId, documentType, documentKey, description, status, null); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientIdentifierRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientIdentifierRequest.java index c077c866f87..f214613ddf4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientIdentifierRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientIdentifierRequest.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.portfolio.client.data; import io.swagger.v3.oas.annotations.media.Schema; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientTransactionData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientTransactionData.java index 3107f48a945..54d60cbdb9e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientTransactionData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/data/ClientTransactionData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.Collection; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.portfolio.paymentdetail.data.PaymentDetailData; @@ -45,16 +46,16 @@ public final class ClientTransactionData { final Collection paymentTypeOptions; public static ClientTransactionData create(Long id, Long officeId, String officeName, EnumOptionData type, LocalDate date, - CurrencyData currency, PaymentDetailData paymentDetailData, BigDecimal amount, String externalId, LocalDate submittedOnDate, - boolean reversed) { + CurrencyData currency, PaymentDetailData paymentDetailData, BigDecimal amount, String externalId, LocalDate submittedOnDate, + boolean reversed) { final Collection paymentTypeOptions = null; return new ClientTransactionData(id, officeId, officeName, type, date, currency, paymentDetailData, amount, externalId, submittedOnDate, reversed, paymentTypeOptions); } private ClientTransactionData(Long id, Long officeId, String officeName, EnumOptionData type, LocalDate date, CurrencyData currency, - PaymentDetailData paymentDetailData, BigDecimal amount, String externalId, LocalDate submittedOnDate, boolean reversed, - Collection paymentTypeOptions) { + PaymentDetailData paymentDetailData, BigDecimal amount, String externalId, LocalDate submittedOnDate, boolean reversed, + Collection paymentTypeOptions) { this.id = id; this.officeId = officeId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientAddress.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientAddress.java index ceb905150a4..ea4d6697dfa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientAddress.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientAddress.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientAddressRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientAddressRepository.java index 5292bd2a96a..f06aef5e90b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientAddressRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientAddressRepository.java @@ -6,9 +6,9 @@ * 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 @@ -28,7 +28,7 @@ public interface ClientAddressRepository extends JpaRepository * 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 @@ -33,7 +33,7 @@ public ClientAddressRepositoryWrapper(final ClientAddressRepository clientAddres } public ClientAddress findOneByClientIdAndAddressTypeAndIsActive(final long clientId, final CodeValue addressType, - final boolean isActive) { + final boolean isActive) { return this.clientAddressRepository.findByClientIdAndAddressTypeAndIsActive(clientId, addressType, isActive); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientCharge.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientCharge.java index 237e094fcbe..e809909c854 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientCharge.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientCharge.java @@ -6,9 +6,9 @@ * 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 @@ -24,8 +24,10 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; import jakarta.persistence.Transient; + import java.math.BigDecimal; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; @@ -36,6 +38,8 @@ import org.apache.fineract.portfolio.charge.domain.ChargeTimeType; import org.apache.fineract.portfolio.client.api.ClientApiConstants; +import java.time.LocalDate; + @Entity @Table(name = "m_client_charge") public class ClientCharge extends AbstractPersistableCustom { @@ -170,16 +174,16 @@ private void populateDerivedFields(final BigDecimal amount) { this.amountOutstanding = BigDecimal.ZERO; this.amountWaived = null; this.amountWrittenOff = null; - break; + break; case FLAT: this.amount = amount; this.amountPaid = null; this.amountOutstanding = amount; this.amountWaived = null; this.amountWrittenOff = null; - break; + break; default: - break; + break; } } @@ -301,4 +305,9 @@ public Money getAmountOutstanding() { return Money.of(getCurrency(), this.amountOutstanding); } + public void inactivate() { + this.status = false; + this.inactivationDate = LocalDate.now(); + } + } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientChargePaidBy.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientChargePaidBy.java index 435d3730569..4890a8934bd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientChargePaidBy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientChargePaidBy.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @Entity @@ -46,7 +48,7 @@ protected ClientChargePaidBy() { } public static ClientChargePaidBy instance(final ClientTransaction clientTransaction, final ClientCharge clientCharge, - final BigDecimal amount) { + final BigDecimal amount) { return new ClientChargePaidBy(clientTransaction, clientCharge, amount); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientChargeRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientChargeRepository.java index e266e4c609c..91e57e0ef5a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientChargeRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientChargeRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientChargeRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientChargeRepositoryWrapper.java index 92e7a0486af..3d7941bf147 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientChargeRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientChargeRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -31,7 +31,7 @@ public class ClientChargeRepositoryWrapper { @Autowired public ClientChargeRepositoryWrapper(final ClientChargeRepository repository, - final OrganisationCurrencyRepositoryWrapper organisationCurrencyRepositoryWrapper) { + final OrganisationCurrencyRepositoryWrapper organisationCurrencyRepositoryWrapper) { this.repository = repository; this.organisationCurrencyRepository = organisationCurrencyRepositoryWrapper; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientEnumerations.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientEnumerations.java index 40963d6a8bd..c0a5b2bdaa2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientEnumerations.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; public final class ClientEnumerations { @@ -38,31 +39,31 @@ public static EnumOptionData status(final ClientStatus status) { switch (status) { case INVALID: optionData = new EnumOptionData(ClientStatus.INVALID.getValue().longValue(), ClientStatus.INVALID.getCode(), "Invalid"); - break; + break; case PENDING: optionData = new EnumOptionData(ClientStatus.PENDING.getValue().longValue(), ClientStatus.PENDING.getCode(), "Pending"); - break; + break; case ACTIVE: optionData = new EnumOptionData(ClientStatus.ACTIVE.getValue().longValue(), ClientStatus.ACTIVE.getCode(), "Active"); - break; + break; case CLOSED: optionData = new EnumOptionData(ClientStatus.CLOSED.getValue().longValue(), ClientStatus.CLOSED.getCode(), "Closed"); - break; + break; case REJECTED: optionData = new EnumOptionData(ClientStatus.REJECTED.getValue().longValue(), ClientStatus.REJECTED.getCode(), "Rejected"); - break; + break; case WITHDRAWN: optionData = new EnumOptionData(ClientStatus.WITHDRAWN.getValue().longValue(), ClientStatus.WITHDRAWN.getCode(), "Withdrawn"); - break; + break; case TRANSFER_IN_PROGRESS: optionData = new EnumOptionData(ClientStatus.TRANSFER_IN_PROGRESS.getValue().longValue(), ClientStatus.TRANSFER_IN_PROGRESS.getCode(), "Transfer in progress"); - break; + break; case TRANSFER_ON_HOLD: optionData = new EnumOptionData(ClientStatus.TRANSFER_ON_HOLD.getValue().longValue(), ClientStatus.TRANSFER_ON_HOLD.getCode(), "Transfer on hold"); - break; + break; } return optionData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientFamilyMembers.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientFamilyMembers.java index 5517b42a529..0d09f582055 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientFamilyMembers.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientFamilyMembers.java @@ -6,9 +6,9 @@ * 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 @@ -24,7 +24,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.time.LocalDate; + import org.apache.fineract.infrastructure.codes.domain.CodeValue; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @@ -77,8 +79,8 @@ public class ClientFamilyMembers extends AbstractPersistableCustom { private LocalDate dateOfBirth; private ClientFamilyMembers(final Client client, final String firstName, final String middleName, final String lastName, - final String qualification, final String mobileNumber, final Long age, final Boolean isDependent, final CodeValue relationship, - final CodeValue maritalStatus, final CodeValue gender, final LocalDate dateOfBirth, final CodeValue profession) { + final String qualification, final String mobileNumber, final Long age, final Boolean isDependent, final CodeValue relationship, + final CodeValue maritalStatus, final CodeValue gender, final LocalDate dateOfBirth, final CodeValue profession) { this.client = client; this.firstName = firstName; @@ -100,8 +102,8 @@ public ClientFamilyMembers() { } public static ClientFamilyMembers fromJson(final Client client, final String firstName, final String middleName, final String lastName, - final String qualification, final String mobileNumber, final Long age, final Boolean isDependent, final CodeValue relationship, - final CodeValue maritalStatus, final CodeValue gender, final LocalDate dateOfBirth, final CodeValue profession) { + final String qualification, final String mobileNumber, final Long age, final Boolean isDependent, final CodeValue relationship, + final CodeValue maritalStatus, final CodeValue gender, final LocalDate dateOfBirth, final CodeValue profession) { return new ClientFamilyMembers(client, firstName, middleName, lastName, qualification, mobileNumber, age, isDependent, relationship, maritalStatus, gender, dateOfBirth, profession); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientFamilyMembersRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientFamilyMembersRepository.java index 2e9dade0bfb..26615470ec7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientFamilyMembersRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientFamilyMembersRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPerson.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPerson.java index 7764219852d..7b6d28e3e0b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPerson.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPerson.java @@ -6,9 +6,9 @@ * 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 @@ -25,11 +25,13 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToOne; import jakarta.persistence.Table; + import java.time.LocalDate; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.codes.domain.CodeValue; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -65,7 +67,7 @@ public class ClientNonPerson extends AbstractPersistableCustom { private String remarks; public static ClientNonPerson createNew(final Client client, final CodeValue constitution, final CodeValue mainBusinessLine, - String incorpNumber, LocalDate incorpValidityTill, String remarks) { + String incorpNumber, LocalDate incorpValidityTill, String remarks) { return new ClientNonPerson(client, constitution, mainBusinessLine, incorpNumber, incorpValidityTill, remarks); } @@ -74,7 +76,7 @@ protected ClientNonPerson() { } private ClientNonPerson(final Client client, final CodeValue constitution, final CodeValue mainBusinessLine, final String incorpNumber, - final LocalDate incorpValidityTill, final String remarks) { + final LocalDate incorpValidityTill, final String remarks) { if (client != null) { this.client = client; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPersonRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPersonRepository.java index 72af64f612b..82727dba756 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPersonRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPersonRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPersonRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPersonRepositoryWrapper.java index ec360de8eac..55a6cd32b33 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPersonRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientNonPersonRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientRepositoryWrapper.java index ba8c23953c9..c5f0c803d26 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransaction.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransaction.java index d8828238d01..76c824872bc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransaction.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransaction.java @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import jakarta.persistence.Table; import jakarta.persistence.Transient; import jakarta.persistence.UniqueConstraint; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; @@ -36,6 +37,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.fineract.accounting.glaccount.domain.GLAccount; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom; @@ -48,7 +50,7 @@ import org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail; @Entity -@Table(name = "m_client_transaction", uniqueConstraints = { @UniqueConstraint(columnNames = { "external_id" }, name = "external_id") }) +@Table(name = "m_client_transaction", uniqueConstraints = {@UniqueConstraint(columnNames = {"external_id"}, name = "external_id")}) public class ClientTransaction extends AbstractAuditableWithUTCDateTimeCustom { @ManyToOne(optional = false) @@ -96,17 +98,18 @@ public class ClientTransaction extends AbstractAuditableWithUTCDateTimeCustom * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransactionRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransactionRepositoryWrapper.java index 01f8311939b..a8ca582eca4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransactionRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransactionRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransactionType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransactionType.java index 65c5a947415..14e061ecd32 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransactionType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransactionType.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.HashMap; import java.util.Map; + import lombok.Getter; public enum ClientTransactionType { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransferDetails.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransferDetails.java index f5c114429b9..87ed91429ee 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransferDetails.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransferDetails.java @@ -6,9 +6,9 @@ * 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 @@ -22,7 +22,9 @@ import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Table; + import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @SuppressWarnings("serial") @@ -51,10 +53,11 @@ public class ClientTransferDetails extends AbstractPersistableCustom { @Column(name = "submitted_by", nullable = false) private Long submittedBy; - protected ClientTransferDetails() {} + protected ClientTransferDetails() { + } private ClientTransferDetails(final Long clientId, final Long fromOfficeId, final Long toOfficeId, final LocalDate proposedTransferDate, - final Integer transferEventType, final LocalDate submittedOn, final Long submittedBy) { + final Integer transferEventType, final LocalDate submittedOn, final Long submittedBy) { this.clientId = clientId; this.fromOfficeId = fromOfficeId; this.toOfficeId = toOfficeId; @@ -65,7 +68,7 @@ private ClientTransferDetails(final Long clientId, final Long fromOfficeId, fina } public static ClientTransferDetails instance(final Long clientId, final Long fromOfficeId, final Long toOfficeId, - final LocalDate proposedTransferDate, final Integer transferEventType, final LocalDate submittedOn, final Long submittedBy) { + final LocalDate proposedTransferDate, final Integer transferEventType, final LocalDate submittedOn, final Long submittedBy) { return new ClientTransferDetails(clientId, fromOfficeId, toOfficeId, proposedTransferDate, transferEventType, submittedOn, submittedBy); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransferDetailsRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransferDetailsRepository.java index 3cd10164cf9..70bf96ccaee 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransferDetailsRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransferDetailsRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransferDetailsRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransferDetailsRepositoryWrapper.java index d454a532bba..ff153757248 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransferDetailsRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/domain/ClientTransferDetailsRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientActiveForUpdateException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientActiveForUpdateException.java index 2553695f207..c195101fb3e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientActiveForUpdateException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientActiveForUpdateException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientChargeNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientChargeNotFoundException.java index 5d920db25e2..898f5aa00c4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientChargeNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientChargeNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientHasBeenClosedException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientHasBeenClosedException.java index dde841a958a..d6c264037d4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientHasBeenClosedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientHasBeenClosedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientHasNoStaffException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientHasNoStaffException.java index 6273890dbc7..e7e01aa7854 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientHasNoStaffException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientHasNoStaffException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientIdentifierNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientIdentifierNotFoundException.java index e752c0876f5..7ec69f19b1e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientIdentifierNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientIdentifierNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientMustBePendingToBeDeletedException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientMustBePendingToBeDeletedException.java index 8113727007e..c08d5cddcd7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientMustBePendingToBeDeletedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientMustBePendingToBeDeletedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNonPersonNotFoundByClientIdException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNonPersonNotFoundByClientIdException.java index 872989425cf..ffb80f046ab 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNonPersonNotFoundByClientIdException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNonPersonNotFoundByClientIdException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNonPersonNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNonPersonNotFoundException.java index 99320ad1e3d..c457dd9f363 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNonPersonNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientNonPersonNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientTransactionCannotBeUndoneException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientTransactionCannotBeUndoneException.java index 6ad72e599d9..e3174b624c1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientTransactionCannotBeUndoneException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientTransactionCannotBeUndoneException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientTransactionNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientTransactionNotFoundException.java index 313b690d7f1..fd57ab9d24d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientTransactionNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ClientTransactionNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/DuplicateClientIdentifierException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/DuplicateClientIdentifierException.java index 41f3ba3b336..d1f1df89d2b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/DuplicateClientIdentifierException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/DuplicateClientIdentifierException.java @@ -6,9 +6,9 @@ * 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 @@ -47,7 +47,7 @@ public DuplicateClientIdentifierException(final Long documentTypeId, final Strin } public DuplicateClientIdentifierException(final String clientName, final String officeName, final String identifierType, - final String identifierKey) { + final String identifierKey) { super("error.msg.clientIdentifier.identityKey.duplicate", "Client " + clientName + "under " + officeName + " Branch already has a " + identifierType + " with unique key " + identifierKey, clientName, officeName, identifierType, identifierKey); this.identifierType = identifierType; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ImageNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ImageNotFoundException.java index 6f51e6b71df..6f6839141b7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ImageNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/ImageNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/InvalidClientSavingProductException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/InvalidClientSavingProductException.java index d0921161a07..61bd425781f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/InvalidClientSavingProductException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/InvalidClientSavingProductException.java @@ -6,9 +6,9 @@ * 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 @@ -27,7 +27,7 @@ public class InvalidClientSavingProductException extends AbstractPlatformDomainRuleException { public InvalidClientSavingProductException(final String action, final String postFix, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg.client." + action + "." + postFix, defaultUserMessage, defaultUserMessageArgs); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/InvalidClientStateTransitionException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/InvalidClientStateTransitionException.java index bfbe4610b36..6f39ce644d5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/InvalidClientStateTransitionException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/exception/InvalidClientStateTransitionException.java @@ -6,9 +6,9 @@ * 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 @@ -27,7 +27,7 @@ public class InvalidClientStateTransitionException extends AbstractPlatformDomainRuleException { public InvalidClientStateTransitionException(final String action, final String postFix, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg.client." + action + "." + postFix, defaultUserMessage, defaultUserMessageArgs); // TODO Auto-generated constructor stub } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/ActivateClientCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/ActivateClientCommandHandler.java index 8f71b76b552..7df0aa09a58 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/ActivateClientCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/ActivateClientCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/AddClientAddressCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/AddClientAddressCommandHandler.java index b79012ed5e2..7000e3f0a9c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/AddClientAddressCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/AddClientAddressCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/AddClientFamilyMemberCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/AddClientFamilyMemberCommandHandler.java index 78a5cdfc014..582ae676ae1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/AddClientFamilyMemberCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/AddClientFamilyMemberCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/AssignClientStaffCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/AssignClientStaffCommandHandler.java index 088abcf2d85..e042cee4db7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/AssignClientStaffCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/AssignClientStaffCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/CloseClientCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/CloseClientCommandHandler.java index cb413c8442d..a894bad1b16 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/CloseClientCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/CloseClientCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/CreateClientChargeCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/CreateClientChargeCommandHandler.java index 559d292ba7f..981fd7ae346 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/CreateClientChargeCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/CreateClientChargeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/CreateClientCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/CreateClientCommandHandler.java index 6ef8271115a..ddf47c51ee7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/CreateClientCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/CreateClientCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/CreateClientIdentifierCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/CreateClientIdentifierCommandHandler.java index 39b457ed159..4cfaba9ff60 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/CreateClientIdentifierCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/CreateClientIdentifierCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/DeleteClientChargeCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/DeleteClientChargeCommandHandler.java index 64b72580f23..d1eeea6d5b6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/DeleteClientChargeCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/DeleteClientChargeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/DeleteClientCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/DeleteClientCommandHandler.java index baedbe76ab9..1c722ab9483 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/DeleteClientCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/DeleteClientCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/DeleteClientFamilyMemberCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/DeleteClientFamilyMemberCommandHandler.java index efef73f3afb..cb77ecc965c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/DeleteClientFamilyMemberCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/DeleteClientFamilyMemberCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/DeleteClientIdentifierCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/DeleteClientIdentifierCommandHandler.java index b9b397db80e..9df0bf436ad 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/DeleteClientIdentifierCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/DeleteClientIdentifierCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/InactivateClientChargeCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/InactivateClientChargeCommandHandler.java new file mode 100644 index 00000000000..d00ece5da10 --- /dev/null +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/InactivateClientChargeCommandHandler.java @@ -0,0 +1,34 @@ +package org.apache.fineract.portfolio.client.handler; + +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.client.api.ClientApiConstants; +import org.apache.fineract.portfolio.client.service.ClientChargeWritePlatformService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +@Service +@CommandType(entity = ClientApiConstants.CLIENT_CHARGES_RESOURCE_NAME, + action = ClientApiConstants.CLIENT_CHARGE_ACTION_INACTIVATE) +public class InactivateClientChargeCommandHandler implements NewCommandSourceHandler { + + private final ClientChargeWritePlatformService writePlatformService; + + @Autowired + public InactivateClientChargeCommandHandler(final ClientChargeWritePlatformService writePlatformService) { + this.writePlatformService = writePlatformService; + } + + @Transactional + @Override + public CommandProcessingResult processCommand(final JsonCommand command) { + return this.writePlatformService.inactivateCharge( + command.getClientId(), + command.entityId(), + command + ); + } +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/PayClientChargeCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/PayClientChargeCommandHandler.java index 341d3ad0f84..8ba2bfc5d24 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/PayClientChargeCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/PayClientChargeCommandHandler.java @@ -6,9 +6,9 @@ * 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 @@ -46,3 +46,5 @@ public CommandProcessingResult processCommand(final JsonCommand command) { } } + + diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/ReActivateClientCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/ReActivateClientCommandHandler.java index 774926e2520..0b40115eff1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/ReActivateClientCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/ReActivateClientCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/RejectClientCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/RejectClientCommandHandler.java index cce47a1525f..45389d56070 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/RejectClientCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/RejectClientCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UnassignClientStaffCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UnassignClientStaffCommandHandler.java index 02aa30eae77..e7c712efad7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UnassignClientStaffCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UnassignClientStaffCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UndoClientTransactionCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UndoClientTransactionCommandHandler.java index 590ad00d685..ae4d8e2b86c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UndoClientTransactionCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UndoClientTransactionCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UndoRejectClientCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UndoRejectClientCommandHandler.java index 31a87a27080..5d02c305c29 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UndoRejectClientCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UndoRejectClientCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UndoWithdrawalCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UndoWithdrawalCommandHandler.java index 875909b1d9b..aa644318692 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UndoWithdrawalCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UndoWithdrawalCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientAddressCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientAddressCommandHandler.java index 3523bfecf70..b783d13cf51 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientAddressCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientAddressCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientCommandHandler.java index 2809ea5522d..ac4fb035383 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientFamilyMemberCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientFamilyMemberCommandHandler.java index 4fbee47f553..92fdc11c5c9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientFamilyMemberCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientFamilyMemberCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientIdentifierCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientIdentifierCommandHandler.java index 59b34904425..76dd0aa8114 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientIdentifierCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientIdentifierCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientSavingsAccountCommandHandler.java index 2ea830e6797..58713d08036 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/UpdateClientSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/WaiveClientChargeCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/WaiveClientChargeCommandHandler.java index 986c1b1ec40..fb11ae8dc7c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/WaiveClientChargeCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/WaiveClientChargeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/WithdrawClientCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/WithdrawClientCommandHandler.java index e3e2f9b7fe1..f150b70ff64 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/WithdrawClientCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/handler/WithdrawClientCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/mapper/ClientMapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/mapper/ClientMapper.java index f8849cfaf32..dfd0e45a8a9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/mapper/ClientMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/mapper/ClientMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/serialization/ClientFamilyMemberCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/serialization/ClientFamilyMemberCommandFromApiJsonDeserializer.java index af5c6c473bb..9ca41680247 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/serialization/ClientFamilyMemberCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/serialization/ClientFamilyMemberCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.time.LocalDate; import java.util.ArrayList; @@ -30,6 +31,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/serialization/ClientIdentifierCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/serialization/ClientIdentifierCommandFromApiJsonDeserializer.java index 698ff5495b4..e62ad3d2204 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/serialization/ClientIdentifierCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/serialization/ClientIdentifierCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,11 +20,13 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.Arrays; import java.util.HashSet; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.exception.InvalidJsonException; import org.apache.fineract.infrastructure.core.serialization.AbstractFromApiJsonDeserializer; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientAddressReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientAddressReadPlatformService.java index a8512c16fd2..b36d0bf82fb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientAddressReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientAddressReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.client.service; import java.util.Collection; + import org.apache.fineract.portfolio.address.data.ClientAddressData; public interface ClientAddressReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientAddressReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientAddressReadPlatformServiceImpl.java index 0ce164a69f0..be8d0a47688 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientAddressReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientAddressReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; + import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.address.data.ClientAddressData; import org.springframework.beans.factory.annotation.Autowired; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientChargeReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientChargeReadPlatformService.java index 89b39a5d896..f514a9b3a92 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientChargeReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientChargeReadPlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientChargeReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientChargeReadPlatformServiceImpl.java index 6b560a0ccd8..9428d5ec125 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientChargeReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientChargeReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.sql.SQLException; import java.time.LocalDate; import java.util.Collection; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.BooleanUtils; import org.apache.fineract.infrastructure.core.data.EnumOptionData; @@ -128,7 +129,7 @@ public ClientChargeData retrieveClientCharge(Long clientId, Long clientChargeId) @Override public Page retrieveClientCharges(Long clientId, String status, Boolean pendingPayment, - SearchParameters searchParameters) { + SearchParameters searchParameters) { final ClientChargeMapper rm = new ClientChargeMapper(); final StringBuilder sqlBuilder = new StringBuilder(); sqlBuilder.append("select " + sqlGenerator.calcFoundRows() + " ").append(rm.schema()).append(" where cc.client_id=? "); @@ -160,7 +161,7 @@ public Page retrieveClientCharges(Long clientId, String status } } - return this.paginationHelper.fetchPage(this.jdbcTemplate, sqlBuilder.toString(), new Object[] { clientId }, + return this.paginationHelper.fetchPage(this.jdbcTemplate, sqlBuilder.toString(), new Object[]{clientId}, this.clientChargeMapper); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersReadPlatformService.java index deeebd63fc5..499212340b0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ package org.apache.fineract.portfolio.client.service; import java.util.List; + import org.apache.fineract.portfolio.client.data.ClientFamilyMembersData; public interface ClientFamilyMembersReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersReadPlatformServiceImpl.java index bc4eab39e77..b35955fa822 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.codes.service.CodeValueReadPlatformService; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; @@ -42,7 +43,7 @@ public class ClientFamilyMembersReadPlatformServiceImpl implements ClientFamilyM @Autowired public ClientFamilyMembersReadPlatformServiceImpl(final PlatformSecurityContext context, final JdbcTemplate jdbcTemplate, - final CodeValueReadPlatformService codeValueReadPlatformService) { + final CodeValueReadPlatformService codeValueReadPlatformService) { this.context = context; this.jdbcTemplate = jdbcTemplate; this.codeValueReadPlatformService = codeValueReadPlatformService; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersWritePlatformService.java index 9b7dd7edbb3..71ca973fbc8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersWritePlatformServiceImpl.java index 77d3d1ad00b..c8688ef4d72 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientFamilyMembersWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,10 +22,12 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; import java.time.format.DateTimeParseException; + import org.apache.fineract.infrastructure.codes.domain.CodeValue; import org.apache.fineract.infrastructure.codes.domain.CodeValueRepository; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -54,8 +56,8 @@ public class ClientFamilyMembersWritePlatformServiceImpl implements ClientFamily @Autowired public ClientFamilyMembersWritePlatformServiceImpl(final PlatformSecurityContext context, final CodeValueRepository codeValueRepository, - final ClientFamilyMembersRepository clientFamilyRepository, final ClientRepositoryWrapper clientRepositoryWrapper, - final ClientFamilyMemberCommandFromApiJsonDeserializer apiJsonDeserializer) { + final ClientFamilyMembersRepository clientFamilyRepository, final ClientRepositoryWrapper clientRepositoryWrapper, + final ClientFamilyMemberCommandFromApiJsonDeserializer apiJsonDeserializer) { this.context = context; this.codeValueRepository = codeValueRepository; this.clientFamilyRepository = clientFamilyRepository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientIdentifierReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientIdentifierReadPlatformService.java index b68acf31f0d..2058ecfe752 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientIdentifierReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientIdentifierReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.client.service; import java.util.List; + import org.apache.fineract.portfolio.client.data.ClientIdentifierData; public interface ClientIdentifierReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientIdentifierReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientIdentifierReadPlatformServiceImpl.java index 4a608573ab1..192c378b518 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientIdentifierReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientIdentifierReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; @@ -82,7 +83,8 @@ public ClientIdentifierData retrieveClientIdentifier(final Long clientId, final private static final class ClientIdentityMapper implements RowMapper { - ClientIdentityMapper() {} + ClientIdentityMapper() { + } public String schema() { return "ci.id as id, ci.client_id as clientId, ci.document_type_id as documentTypeId, ci.status as status, ci.document_key as documentKey," diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientIdentifierWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientIdentifierWritePlatformService.java index 1e5d496676a..fd22fb43bc9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientIdentifierWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientIdentifierWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientIdentifierWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientIdentifierWritePlatformServiceJpaRepositoryImpl.java index 11d82bcf3df..76a6c718ccd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientIdentifierWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientIdentifierWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.portfolio.client.service; import jakarta.persistence.PersistenceException; + import java.util.Map; + import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.fineract.infrastructure.codes.domain.CodeValue; import org.apache.fineract.infrastructure.codes.domain.CodeValueRepositoryWrapper; @@ -58,9 +60,9 @@ public class ClientIdentifierWritePlatformServiceJpaRepositoryImpl implements Cl @Autowired public ClientIdentifierWritePlatformServiceJpaRepositoryImpl(final PlatformSecurityContext context, - final ClientRepositoryWrapper clientRepository, final ClientIdentifierRepository clientIdentifierRepository, - final CodeValueRepositoryWrapper codeValueRepository, - final ClientIdentifierCommandFromApiJsonDeserializer clientIdentifierCommandFromApiJsonDeserializer) { + final ClientRepositoryWrapper clientRepository, final ClientIdentifierRepository clientIdentifierRepository, + final CodeValueRepositoryWrapper codeValueRepository, + final ClientIdentifierCommandFromApiJsonDeserializer clientIdentifierCommandFromApiJsonDeserializer) { this.context = context; this.clientRepository = clientRepository; this.clientIdentifierRepository = clientIdentifierRepository; @@ -191,7 +193,7 @@ public CommandProcessingResult deleteClientIdentifier(final Long clientId, final } private void handleClientIdentifierDataIntegrityViolation(final String documentTypeLabel, final Long documentTypeId, - final String documentKey, final Throwable cause, final Exception dve) { + final String documentKey, final Throwable cause, final Exception dve) { if (cause.getMessage().contains("unique_active_client_identifier")) { throw new DuplicateClientIdentifierException(documentTypeLabel); } else if (cause.getMessage().contains("unique_identifier_key")) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java index 5d2faaccdf3..7436da84f6c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.codes.data.CodeValueData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTemplateReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTemplateReadPlatformService.java index b4ac660da73..90a118822db 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTemplateReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTemplateReadPlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTemplateReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTemplateReadPlatformServiceImpl.java index af7d8c7ea93..8bf01550fc0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTemplateReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTemplateReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.codes.service.CodeValueReadPlatformService; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTransactionReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTransactionReadPlatformService.java index 3eb72cc2cbd..9dc1300fb66 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTransactionReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTransactionReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.client.service; import java.util.Collection; + import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.infrastructure.core.service.SearchParameters; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTransactionReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTransactionReadPlatformServiceImpl.java index 377ffdecc09..0812413e71a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTransactionReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTransactionReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.sql.SQLException; import java.time.LocalDate; import java.util.Collection; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.ExternalId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTransactionWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTransactionWritePlatformService.java index 5d467d53018..214adbfc61b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTransactionWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTransactionWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTransactionWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTransactionWritePlatformServiceJpaRepositoryImpl.java index 97841807ea3..5bd769e93a1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTransactionWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientTransactionWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.journalentry.service.JournalEntryWritePlatformService; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientWritePlatformService.java index fb233489e81..4d6b80730e2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientWritePlatformServiceJpaRepositoryImpl.java index 59ea3118e64..74409f37d21 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/ClientWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,12 +20,14 @@ import com.google.gson.JsonElement; import jakarta.persistence.PersistenceException; + import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.LinkedHashMap; import java.util.List; import java.util.Locale; import java.util.Map; + import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/LoanStatusMapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/LoanStatusMapper.java index 1b9f8e66b72..ee653182987 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/LoanStatusMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/LoanStatusMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/search/ClientSearchService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/search/ClientSearchService.java index 2535bb3c537..30b1d355e97 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/search/ClientSearchService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/search/ClientSearchService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Objects; import java.util.Optional; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.PagedRequest; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/search/domain/ClientSearchData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/search/domain/ClientSearchData.java index 300d8d7e8ab..12fd4ea2da6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/search/domain/ClientSearchData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/search/domain/ClientSearchData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.time.OffsetDateTime; + import lombok.Data; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.ExternalId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/search/domain/ClientTextSearch.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/search/domain/ClientTextSearch.java index f6523aaffa6..d4705faa921 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/search/domain/ClientTextSearch.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/search/domain/ClientTextSearch.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/search/mapper/ClientSearchDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/search/mapper/ClientSearchDataMapper.java index 2085db8619e..7006a7c0dc5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/search/mapper/ClientSearchDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/client/service/search/mapper/ClientSearchDataMapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResourceSwagger.java index c9b25a59264..c907786161b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/api/CollateralsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -26,16 +26,19 @@ */ final class CollateralsApiResourceSwagger { - private CollateralsApiResourceSwagger() {} + private CollateralsApiResourceSwagger() { + } @Schema(description = "GetLoansLoanIdCollateralsResponse") public static final class GetLoansLoanIdCollateralsResponse { - private GetLoansLoanIdCollateralsResponse() {} + private GetLoansLoanIdCollateralsResponse() { + } static final class GetCollateralTypeResponse { - private GetCollateralTypeResponse() {} + private GetCollateralTypeResponse() { + } @Schema(example = "8") public Long id; @@ -45,7 +48,8 @@ private GetCollateralTypeResponse() {} static final class GetCollateralCurrencyResponse { - private GetCollateralCurrencyResponse() {} + private GetCollateralCurrencyResponse() { + } @Schema(example = "USD") public String code; @@ -74,7 +78,8 @@ private GetCollateralCurrencyResponse() {} @Schema(description = "PostLoansLoanIdCollateralsResponse") public static final class PostLoansLoanIdCollateralsResponse { - private PostLoansLoanIdCollateralsResponse() {} + private PostLoansLoanIdCollateralsResponse() { + } @Schema(example = "12") public Long resourceId; @@ -83,7 +88,8 @@ private PostLoansLoanIdCollateralsResponse() {} @Schema(description = "PutLoansLoanIdCollateralsCollateralIdResponse") public static final class PutLoansLoanIdCollateralsCollateralIdResponse { - private PutLoansLoanIdCollateralsCollateralIdResponse() {} + private PutLoansLoanIdCollateralsCollateralIdResponse() { + } @Schema(example = "1") public Long loanId; @@ -95,7 +101,8 @@ private PutLoansLoanIdCollateralsCollateralIdResponse() {} @Schema(description = "DeleteLoansLoanIdCollateralsCollateralIdResponse") public static final class DeleteLoansLoanIdCollateralsCollateralIdResponse { - private DeleteLoansLoanIdCollateralsCollateralIdResponse() {} + private DeleteLoansLoanIdCollateralsCollateralIdResponse() { + } @Schema(example = "1") public Long loanId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/command/CollateralCommand.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/command/CollateralCommand.java index f2036ee9ea4..8579c23e052 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/command/CollateralCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/command/CollateralCommand.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/data/LoansLoanIdCollateralsRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/data/LoansLoanIdCollateralsRequest.java index f1583ad0e7e..5e71d2c9ccf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/data/LoansLoanIdCollateralsRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/data/LoansLoanIdCollateralsRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/data/LoansLoandIdCollateralsCollateralIdRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/data/LoansLoandIdCollateralsCollateralIdRequest.java index 35f682053b2..8219d26c63d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/data/LoansLoandIdCollateralsCollateralIdRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/data/LoansLoandIdCollateralsCollateralIdRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/domain/LoanCollateralRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/domain/LoanCollateralRepository.java index d73c6c13da7..11a108a4540 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/domain/LoanCollateralRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/domain/LoanCollateralRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/exception/CollateralCannotBeCreatedException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/exception/CollateralCannotBeCreatedException.java index 59a7d67fba1..11f5a9ac0b8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/exception/CollateralCannotBeCreatedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/exception/CollateralCannotBeCreatedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/exception/CollateralCannotBeDeletedException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/exception/CollateralCannotBeDeletedException.java index 2b703df2561..4c59b0f7852 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/exception/CollateralCannotBeDeletedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/exception/CollateralCannotBeDeletedException.java @@ -6,9 +6,9 @@ * 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 @@ -43,7 +43,7 @@ public String errorCode() { } public CollateralCannotBeDeletedException(final LoanCollateralCannotBeDeletedReason reason, final Long loanId, - final Long loanCollateralId) { + final Long loanCollateralId) { super(reason.errorCode(), reason.errorMessage(), loanId, loanCollateralId); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/exception/CollateralCannotBeUpdatedException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/exception/CollateralCannotBeUpdatedException.java index 4d95787d60f..4de6f20bcd1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/exception/CollateralCannotBeUpdatedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/exception/CollateralCannotBeUpdatedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/exception/CollateralNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/exception/CollateralNotFoundException.java index 6df363f544e..36a3c11158f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/exception/CollateralNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/exception/CollateralNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/handler/CreateCollateralCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/handler/CreateCollateralCommandHandler.java index 663785ce993..63084f503c6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/handler/CreateCollateralCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/handler/CreateCollateralCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/handler/DeleteCollateralCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/handler/DeleteCollateralCommandHandler.java index b03b27a6ade..d6de58c6a73 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/handler/DeleteCollateralCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/handler/DeleteCollateralCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/handler/UpdateCollateralCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/handler/UpdateCollateralCommandHandler.java index a2b6b9d2b7a..e1418e9739f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/handler/UpdateCollateralCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/handler/UpdateCollateralCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/serialization/CollateralCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/serialization/CollateralCommandFromApiJsonDeserializer.java index 160a9aa39f5..676143112eb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/serialization/CollateralCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/serialization/CollateralCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -21,11 +21,13 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.util.Locale; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.exception.InvalidJsonException; import org.apache.fineract.infrastructure.core.serialization.AbstractFromApiJsonDeserializer; @@ -55,7 +57,8 @@ public CollateralCommand commandFromApiJson(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final Set supportedParameters = CollateralJSONinputParams.getAllValues(); supportedParameters.add("locale"); supportedParameters.add("dateFormat"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralReadPlatformService.java index 5ada18333dd..6e605ec4eb9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.collateral.service; import java.util.List; + import org.apache.fineract.portfolio.collateral.data.CollateralData; public interface CollateralReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralReadPlatformServiceImpl.java index 8a8a6e10ab1..a239bfcb958 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; @@ -88,7 +89,7 @@ public List retrieveCollaterals(final Long loanId) { final String sql = "select " + rm.schema() + " where lc.loan_id=? order by id ASC"; - return this.jdbcTemplate.query(sql, rm, new Object[] { loanId }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{loanId}); // NOSONAR } @Override @@ -97,7 +98,7 @@ public CollateralData retrieveCollateral(final Long loanId, final Long collatera final CollateralMapper rm = new CollateralMapper(); String sql = "select " + rm.schema(); sql += " where lc.loan_id=? and lc.id = ?"; - return this.jdbcTemplate.queryForObject(sql, rm, new Object[] { loanId, collateralId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, rm, new Object[]{loanId, collateralId}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new CollateralNotFoundException(loanId, collateralId, e); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralWritePlatformService.java index 903afad3cfa..e23f4377bda 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralWritePlatformServiceJpaRepositoryImpl.java index eb3b762726f..1f862238b96 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateral/service/CollateralWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.collateral.service; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.codes.domain.CodeValue; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/ClientCollateralManagementApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/ClientCollateralManagementApiResourceSwagger.java index 3c8d937586e..a73ed836091 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/ClientCollateralManagementApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/ClientCollateralManagementApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,17 +19,21 @@ package org.apache.fineract.portfolio.collateralmanagement.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.math.BigDecimal; + import org.apache.fineract.portfolio.collateralmanagement.data.UpdateClientCollateralRequest; final class ClientCollateralManagementApiResourceSwagger { - private ClientCollateralManagementApiResourceSwagger() {} + private ClientCollateralManagementApiResourceSwagger() { + } @Schema(description = "PostClientCollateralRequest") public static final class PostClientCollateralRequest { - private PostClientCollateralRequest() {} + private PostClientCollateralRequest() { + } @Schema(example = "10") public BigDecimal quantity; @@ -43,7 +47,8 @@ private PostClientCollateralRequest() {} @Schema(description = "PostClientCollateralResponse") public static final class PostClientCollateralResponse { - private PostClientCollateralResponse() {} + private PostClientCollateralResponse() { + } @Schema(example = "14") public Long resourceId; @@ -55,7 +60,8 @@ private PostClientCollateralResponse() {} @Schema(description = "PutClientCollateralResponse") public static final class PutClientCollateralResponse { - private PutClientCollateralResponse() {} + private PutClientCollateralResponse() { + } @Schema(example = "12") public Long resourceId; @@ -67,7 +73,8 @@ private PutClientCollateralResponse() {} @Schema(description = "DeleteClientCollateralResponse") public static final class DeleteClientCollateralResponse { - private DeleteClientCollateralResponse() {} + private DeleteClientCollateralResponse() { + } @Schema(example = "12") public Long resourceId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/CollateralManagementApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/CollateralManagementApiResourceSwagger.java index 3da0c89f236..cf102df8974 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/CollateralManagementApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/api/CollateralManagementApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -23,12 +23,14 @@ final class CollateralManagementApiResourceSwagger { - private CollateralManagementApiResourceSwagger() {} + private CollateralManagementApiResourceSwagger() { + } @Schema(description = "PostCollateralManagementProductResponse") public static final class PostCollateralManagementProductResponse { - private PostCollateralManagementProductResponse() {} + private PostCollateralManagementProductResponse() { + } @Schema(example = "14") public Long resourceId; @@ -37,7 +39,8 @@ private PostCollateralManagementProductResponse() {} @Schema(description = "PutCollateralProductResponse") public static final class PutCollateralProductResponse { - private PutCollateralProductResponse() {} + private PutCollateralProductResponse() { + } @Schema(example = "12") public Long resourceId; @@ -47,7 +50,8 @@ private PutCollateralProductResponse() {} @Schema(description = "DeleteCollateralProductResponse") public static final class DeleteCollateralProductResponse { - private DeleteCollateralProductResponse() {} + private DeleteCollateralProductResponse() { + } @Schema(example = "12") public Long resourceId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/ClientCollateralRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/ClientCollateralRequest.java index 3dcc239970b..e262e8f4fa9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/ClientCollateralRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/ClientCollateralRequest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/CollateralManagementData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/CollateralManagementData.java index c4642c37dcc..ad8b1a61ff0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/CollateralManagementData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/CollateralManagementData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.math.BigDecimal; + import lombok.Getter; import org.apache.fineract.portfolio.collateralmanagement.domain.CollateralManagementDomain; @@ -41,7 +42,7 @@ public final class CollateralManagementData implements Serializable { private Long id; private CollateralManagementData(final String quality, final BigDecimal basePrice, final String unitType, final BigDecimal pctToBase, - final String currency, final String name, final Long id) { + final String currency, final String name, final Long id) { this.basePrice = basePrice; this.pctToBase = pctToBase; this.quality = quality; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/CollateralManagementProductRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/CollateralManagementProductRequest.java index 29663057ffc..9097cbc2d3c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/CollateralManagementProductRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/CollateralManagementProductRequest.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,9 @@ import java.io.Serializable; import java.math.BigDecimal; -public record CollateralManagementProductRequest(String quality, BigDecimal basePrice, BigDecimal pctToBase, String unitType, String name, - String currency, String locale) implements Serializable { +public record CollateralManagementProductRequest(String quality, BigDecimal basePrice, BigDecimal pctToBase, + String unitType, String name, + String currency, String locale) implements Serializable { @Serial private static final long serialVersionUID = 1L; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/CollateralProductRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/CollateralProductRequest.java index 066ad0a5e49..2ff57b664de 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/CollateralProductRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/CollateralProductRequest.java @@ -6,9 +6,9 @@ * 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 @@ -22,8 +22,9 @@ import java.io.Serializable; import java.math.BigDecimal; -public record CollateralProductRequest(String quality, BigDecimal basePrice, BigDecimal pctToBase, String unitType, String name, - String currency) implements Serializable { +public record CollateralProductRequest(String quality, BigDecimal basePrice, BigDecimal pctToBase, String unitType, + String name, + String currency) implements Serializable { @Serial private static final long serialVersionUID = 1L; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/LoanCollateralResponseData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/LoanCollateralResponseData.java index 67b3047f8ef..c55b86bc2a5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/LoanCollateralResponseData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/LoanCollateralResponseData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.collateralmanagement.data; import java.math.BigDecimal; + import lombok.AllArgsConstructor; import lombok.Getter; import org.apache.fineract.portfolio.loanaccount.data.LoanCollateralManagementData; @@ -39,7 +40,7 @@ public final class LoanCollateralResponseData { private Long clientCollateralId; public static LoanCollateralResponseData instanceOf(final LoanCollateralManagement loanCollateralManagement, final BigDecimal total, - final BigDecimal totalCollateral) { + final BigDecimal totalCollateral) { return new LoanCollateralResponseData(loanCollateralManagement.getId(), loanCollateralManagement.getQuantity(), total, totalCollateral, loanCollateralManagement.getClientCollateralManagement().getId()); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/LoanCollateralTemplateData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/LoanCollateralTemplateData.java index d2647b36cec..f30852b4463 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/LoanCollateralTemplateData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/LoanCollateralTemplateData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.collateralmanagement.data; import java.math.BigDecimal; + import lombok.AllArgsConstructor; import lombok.Getter; import org.apache.fineract.portfolio.collateralmanagement.domain.ClientCollateralManagement; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/UpdateClientCollateralRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/UpdateClientCollateralRequest.java index 73bab14da10..e0ce2a73757 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/UpdateClientCollateralRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/data/UpdateClientCollateralRequest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/ClientCollateralManagementRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/ClientCollateralManagementRepository.java index 44cb416a396..cefc1ebe624 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/ClientCollateralManagementRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/ClientCollateralManagementRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.collateralmanagement.domain; import java.util.List; + import org.apache.fineract.portfolio.client.domain.Client; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/ClientCollateralManagementRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/ClientCollateralManagementRepositoryWrapper.java index 1eeef86592d..2b8e1cae2fc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/ClientCollateralManagementRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/ClientCollateralManagementRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.portfolio.client.domain.Client; import org.apache.fineract.portfolio.client.domain.ClientRepositoryWrapper; import org.apache.fineract.portfolio.collateralmanagement.data.ClientCollateralManagementData; @@ -40,7 +41,7 @@ public class ClientCollateralManagementRepositoryWrapper { @Autowired public ClientCollateralManagementRepositoryWrapper(final ClientCollateralManagementRepository clientCollateralManagementRepository, - final ClientRepositoryWrapper clientRepositoryWrapper, final LoanProductRepository loanProductRepository) { + final ClientRepositoryWrapper clientRepositoryWrapper, final LoanProductRepository loanProductRepository) { this.clientCollateralManagementRepository = clientCollateralManagementRepository; this.clientRepositoryWrapper = clientRepositoryWrapper; this.loanProductRepository = loanProductRepository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/CollateralManagementDomainRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/CollateralManagementDomainRepository.java index a0ca0f2534d..e645a7e3e67 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/CollateralManagementDomainRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/CollateralManagementDomainRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/CollateralManagementRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/CollateralManagementRepositoryWrapper.java index 7089ca117f3..996fd9c3edd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/CollateralManagementRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/domain/CollateralManagementRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.collateralmanagement.domain; import java.util.List; + import org.apache.fineract.portfolio.collateral.exception.CollateralNotFoundException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/ClientCollateralCannotBeDeletedException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/ClientCollateralCannotBeDeletedException.java index 03050f420d8..4916594cf9a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/ClientCollateralCannotBeDeletedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/ClientCollateralCannotBeDeletedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/ClientCollateralNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/ClientCollateralNotFoundException.java index 4eb41e08c80..8cf24c6edb6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/ClientCollateralNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/ClientCollateralNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/CollateralCannotBeDeletedException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/CollateralCannotBeDeletedException.java index 5b939f0af16..e6f6fdd489f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/CollateralCannotBeDeletedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/CollateralCannotBeDeletedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/CollateralNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/CollateralNotFoundException.java index 88f72bf7d50..86fc3bcf75d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/CollateralNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/CollateralNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/LoanCollateralAmountNotSufficientException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/LoanCollateralAmountNotSufficientException.java index aae670800bf..146fca2b150 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/LoanCollateralAmountNotSufficientException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/LoanCollateralAmountNotSufficientException.java @@ -6,9 +6,9 @@ * 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 @@ -19,13 +19,14 @@ package org.apache.fineract.portfolio.collateralmanagement.exception; import java.math.BigDecimal; + import org.apache.fineract.infrastructure.core.exception.AbstractPlatformDomainRuleException; public class LoanCollateralAmountNotSufficientException extends AbstractPlatformDomainRuleException { public LoanCollateralAmountNotSufficientException(final BigDecimal amount) { super("error.msg.loan.disbursement.amount.not.sufficient", - "The disbursement amount `" + amount + "`" + "` is invalid or insufficient to disburse the loan.", new Object[] { amount }); + "The disbursement amount `" + amount + "`" + "` is invalid or insufficient to disburse the loan.", new Object[]{amount}); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/LoanCollateralManagementNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/LoanCollateralManagementNotFoundException.java index 192de00700c..a48059ca23e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/LoanCollateralManagementNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/exception/LoanCollateralManagementNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/AddClientCollateralProductCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/AddClientCollateralProductCommandHandler.java index 72e3e7e71e2..db65b31d60f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/AddClientCollateralProductCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/AddClientCollateralProductCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/CreateCollateralProductCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/CreateCollateralProductCommandHandler.java index 1d151d8ba08..fed64d7b956 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/CreateCollateralProductCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/CreateCollateralProductCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/DeleteClientCollateralProductCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/DeleteClientCollateralProductCommandHandler.java index 5e45b36286b..f2b9655438f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/DeleteClientCollateralProductCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/DeleteClientCollateralProductCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/DeleteCollateralProductHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/DeleteCollateralProductHandler.java index f08befee0f5..a1a6ee0f7bf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/DeleteCollateralProductHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/DeleteCollateralProductHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/DeleteLoanCollateralManagement.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/DeleteLoanCollateralManagement.java index 3550115307d..a1aff02af4f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/DeleteLoanCollateralManagement.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/DeleteLoanCollateralManagement.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/UpdateClientCollateralProductCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/UpdateClientCollateralProductCommandHandler.java index a37013b34ca..53eae74faf0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/UpdateClientCollateralProductCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/UpdateClientCollateralProductCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/UpdateCollateralProductCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/UpdateCollateralProductCommandHandler.java index 90715d6b664..a29b1962a86 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/UpdateCollateralProductCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/handler/UpdateCollateralProductCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/serialization/CollateralManagementCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/serialization/CollateralManagementCommandFromApiJsonDeserializer.java index 2bf2cd42f12..e808f012def 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/serialization/CollateralManagementCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/serialization/CollateralManagementCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/ClientCollateralManagementReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/ClientCollateralManagementReadPlatformService.java index 4ab0d9fff34..78f688b555a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/ClientCollateralManagementReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/ClientCollateralManagementReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.collateralmanagement.service; import java.util.List; + import org.apache.fineract.portfolio.collateralmanagement.data.ClientCollateralManagementData; import org.apache.fineract.portfolio.collateralmanagement.data.LoanCollateralTemplateData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/ClientCollateralManagementReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/ClientCollateralManagementReadPlatformServiceImpl.java index 4e69494cf40..74c3ad1f374 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/ClientCollateralManagementReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/ClientCollateralManagementReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.Collection; import java.util.List; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.collateralmanagement.data.ClientCollateralManagementData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/ClientCollateralManagementWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/ClientCollateralManagementWritePlatformService.java index 67c36139440..5d9f35547ec 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/ClientCollateralManagementWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/ClientCollateralManagementWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/ClientCollateralManagementWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/ClientCollateralManagementWritePlatformServiceImpl.java index 4d1d8092dad..55de73064a7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/ClientCollateralManagementWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/ClientCollateralManagementWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.portfolio.collateralmanagement.service; import jakarta.transaction.Transactional; + import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/CollateralManagementReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/CollateralManagementReadPlatformService.java index 36532c9d2a5..c57d2e9562b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/CollateralManagementReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/CollateralManagementReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.collateralmanagement.service; import java.util.List; + import org.apache.fineract.portfolio.collateralmanagement.data.CollateralManagementData; public interface CollateralManagementReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/CollateralManagementReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/CollateralManagementReadPlatformServiceImpl.java index 47432cee6bb..fe6f8a2cf2b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/CollateralManagementReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/CollateralManagementReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.collateralmanagement.data.CollateralManagementData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/CollateralManagementWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/CollateralManagementWritePlatformService.java index ca55c622da9..4e0ff02fed5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/CollateralManagementWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/CollateralManagementWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/CollateralManagementWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/CollateralManagementWritePlatformServiceImpl.java index cc8467be6eb..d45c8c32599 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/CollateralManagementWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/CollateralManagementWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.portfolio.collateralmanagement.service; import com.google.gson.JsonElement; + import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralAssembler.java index 26bdeeb4872..619ab55de05 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralAssembler.java @@ -6,9 +6,9 @@ * 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 @@ -21,10 +21,12 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.util.HashSet; import java.util.Locale; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.domain.CodeValueRepositoryWrapper; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralManagementReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralManagementReadPlatformService.java index bd5da462ff1..eac516b501f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralManagementReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralManagementReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.collateralmanagement.service; import java.util.List; + import org.apache.fineract.portfolio.collateralmanagement.data.LoanCollateralResponseData; import org.apache.fineract.portfolio.loanaccount.domain.LoanCollateralManagement; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralManagementReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralManagementReadPlatformServiceImpl.java index 74dc7787dae..60c4169c44b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralManagementReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralManagementReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Set; + import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.collateralmanagement.data.LoanCollateralResponseData; import org.apache.fineract.portfolio.collateralmanagement.domain.CollateralManagementDomain; @@ -41,7 +42,7 @@ public class LoanCollateralManagementReadPlatformServiceImpl implements LoanColl private LoanRepository loanRepository; public LoanCollateralManagementReadPlatformServiceImpl(final PlatformSecurityContext context, - final LoanCollateralManagementRepository loanCollateralManagementRepository, final LoanRepository loanRepository) { + final LoanCollateralManagementRepository loanCollateralManagementRepository, final LoanRepository loanRepository) { this.context = context; this.loanCollateralManagementRepository = loanCollateralManagementRepository; this.loanRepository = loanRepository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralManagementWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralManagementWritePlatformService.java index ed5c0a65cbd..bcf009f0900 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralManagementWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralManagementWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralManagementWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralManagementWritePlatformServiceImpl.java index 36b9fdafb44..a1579af3fe8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralManagementWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/service/LoanCollateralManagementWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.collateralmanagement.service; import java.math.BigDecimal; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/starter/CollateralManagementConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/starter/CollateralManagementConfiguration.java index 4c30c398769..e710550a0b3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/starter/CollateralManagementConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collateralmanagement/starter/CollateralManagementConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -51,8 +51,8 @@ public class CollateralManagementConfiguration { @Bean @ConditionalOnMissingBean(ClientCollateralManagementReadPlatformService.class) public ClientCollateralManagementReadPlatformService clientCollateralManagementReadPlatformService(PlatformSecurityContext context, - ClientCollateralManagementRepositoryWrapper clientCollateralManagementRepositoryWrapper, - LoanTransactionRepository loanTransactionRepository) { + ClientCollateralManagementRepositoryWrapper clientCollateralManagementRepositoryWrapper, + LoanTransactionRepository loanTransactionRepository) { return new ClientCollateralManagementReadPlatformServiceImpl(context, clientCollateralManagementRepositoryWrapper, loanTransactionRepository); } @@ -69,7 +69,7 @@ public ClientCollateralManagementWritePlatformService clientCollateralManagement @Bean @ConditionalOnMissingBean(CollateralManagementReadPlatformService.class) public CollateralManagementReadPlatformService collateralManagementReadPlatformService(PlatformSecurityContext context, - CollateralManagementRepositoryWrapper collateralManagementRepositoryWrapper) { + CollateralManagementRepositoryWrapper collateralManagementRepositoryWrapper) { return new CollateralManagementReadPlatformServiceImpl(context, collateralManagementRepositoryWrapper); } @@ -85,8 +85,8 @@ public CollateralManagementWritePlatformService collateralManagementWritePlatfor @Bean @ConditionalOnMissingBean(LoanCollateralAssembler.class) public LoanCollateralAssembler loanCollateralAssembler(FromJsonHelper fromApiJsonHelper, CodeValueRepositoryWrapper codeValueRepository, - LoanCollateralManagementRepository loanCollateralRepository, - ClientCollateralManagementRepositoryWrapper clientCollateralManagementRepositoryWrapper) { + LoanCollateralManagementRepository loanCollateralRepository, + ClientCollateralManagementRepositoryWrapper clientCollateralManagementRepositoryWrapper) { return new LoanCollateralAssembler(fromApiJsonHelper, codeValueRepository, loanCollateralRepository, clientCollateralManagementRepositoryWrapper); } @@ -94,7 +94,7 @@ public LoanCollateralAssembler loanCollateralAssembler(FromJsonHelper fromApiJso @Bean @ConditionalOnMissingBean(LoanCollateralManagementReadPlatformService.class) public LoanCollateralManagementReadPlatformService loanCollateralManagementReadPlatformService(PlatformSecurityContext context, - LoanCollateralManagementRepository loanCollateralManagementRepository, LoanRepository loanRepository) { + LoanCollateralManagementRepository loanCollateralManagementRepository, LoanRepository loanRepository) { return new LoanCollateralManagementReadPlatformServiceImpl(context, loanCollateralManagementRepository, loanRepository); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResource.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResource.java index 78003256657..48c53134ba5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResource.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResource.java @@ -6,9 +6,9 @@ * 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 @@ -63,8 +63,8 @@ public class CollectionSheetApiResource { private final PlatformSecurityContext context; @POST - @Consumes({ MediaType.APPLICATION_JSON }) - @Produces({ MediaType.APPLICATION_JSON }) + @Consumes({MediaType.APPLICATION_JSON}) + @Produces({MediaType.APPLICATION_JSON}) @Operation(summary = "Generate Individual Collection Sheet | Save Collection Sheet", description = "Generate Individual Collection Sheet:\n\n" + "This Api retrieves repayment details of all individual loans under a office as on a specified meeting date.\n\n" + "Save Collection Sheet:\n\n" @@ -72,7 +72,7 @@ public class CollectionSheetApiResource { @RequestBody(required = true, content = @Content(schema = @Schema(implementation = CollectionSheetRequest.class))) @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = CollectionSheetApiResourceSwagger.PostCollectionSheetResponse.class))) public Response generateCollectionSheet(@QueryParam("command") @Parameter(description = "command") final String commandParam, - @Parameter(hidden = true) CollectionSheetRequest collectionSheetRequest) { + @Parameter(hidden = true) CollectionSheetRequest collectionSheetRequest) { final String payload = toApiJsonSerializer.serialize(collectionSheetRequest); final CommandWrapperBuilder builder = new CommandWrapperBuilder().withJson(payload); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResourceSwagger.java index 74b6f70bbf6..a57db013cdc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/api/CollectionSheetApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,24 +19,28 @@ package org.apache.fineract.portfolio.collectionsheet.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.List; /** * Created by Chirag Gupta on 12/17/17. */ -@SuppressWarnings({ "MemberName" }) +@SuppressWarnings({"MemberName"}) final class CollectionSheetApiResourceSwagger { - private CollectionSheetApiResourceSwagger() {} + private CollectionSheetApiResourceSwagger() { + } @Schema(description = "PostCollectionSheetRequest") public static final class PostCollectionSheetRequest { - private PostCollectionSheetRequest() {} + private PostCollectionSheetRequest() { + } static final class PostCollectionSheetBulkRepaymentTransactions { - private PostCollectionSheetBulkRepaymentTransactions() {} + private PostCollectionSheetBulkRepaymentTransactions() { + } @Schema(example = "10") public Long loanId; @@ -64,11 +68,13 @@ private PostCollectionSheetBulkRepaymentTransactions() {} @Schema(description = "PostCollectionSheetResponse") public static final class PostCollectionSheetResponse { - private PostCollectionSheetResponse() {} + private PostCollectionSheetResponse() { + } static final class PostCollectionSheetChanges { - private PostCollectionSheetChanges() {} + private PostCollectionSheetChanges() { + } @Schema(example = "en") public String locale; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/CollectionSheetRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/CollectionSheetRequest.java index a453d9377be..6fed00d0a7e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/CollectionSheetRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/CollectionSheetRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/CollectionSheetTransactionDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/CollectionSheetTransactionDataValidator.java index 31ed4ded4ca..72d0ffac114 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/CollectionSheetTransactionDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/CollectionSheetTransactionDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -32,6 +33,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -82,7 +84,8 @@ public void validateTransaction(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, COLLECTIONSHEET_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -122,7 +125,8 @@ public void validateIndividualCollectionSheet(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, INDIVIDUAL_COLLECTIONSHEET_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/DisbursementTransactionsRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/DisbursementTransactionsRequest.java index 15cb62c68bb..f23d27c1b55 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/DisbursementTransactionsRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/DisbursementTransactionsRequest.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualClientData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualClientData.java index 1585d84c400..790a9630f1b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualClientData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualClientData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualCollectionSheetData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualCollectionSheetData.java index 56ab0719124..15bd5c5d251 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualCollectionSheetData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualCollectionSheetData.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.io.Serializable; import java.time.LocalDate; import java.util.Collection; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualCollectionSheetLoanFlatData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualCollectionSheetLoanFlatData.java index b4731e49a03..92340ec91ce 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualCollectionSheetLoanFlatData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/IndividualCollectionSheetLoanFlatData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.collectionsheet.data; import java.math.BigDecimal; + import org.apache.fineract.organisation.monetary.data.CurrencyData; /** @@ -44,10 +45,10 @@ public class IndividualCollectionSheetLoanFlatData { private BigDecimal feePaid = BigDecimal.ZERO; public IndividualCollectionSheetLoanFlatData(final String clientName, final Long clientId, final Long loanId, final String accountId, - final Integer accountStatusId, final String productShortName, final Long productId, final CurrencyData currency, - final BigDecimal disbursementAmount, final BigDecimal principalDue, final BigDecimal principalPaid, - final BigDecimal interestDue, final BigDecimal interestPaid, final BigDecimal chargesDue, final BigDecimal feeDue, - final BigDecimal feePaid) { + final Integer accountStatusId, final String productShortName, final Long productId, final CurrencyData currency, + final BigDecimal disbursementAmount, final BigDecimal principalDue, final BigDecimal principalPaid, + final BigDecimal interestDue, final BigDecimal interestPaid, final BigDecimal chargesDue, final BigDecimal feeDue, + final BigDecimal feePaid) { this.clientName = clientName; this.clientId = clientId; this.loanId = loanId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGClientData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGClientData.java index fc7e3096ddf..5aa52f6a847 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGClientData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGClientData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.collectionsheet.data; import java.util.Collection; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; /** @@ -66,7 +67,7 @@ public static JLGClientData withAttendance(final Long clientId, final String cli * @param attendanceType */ private JLGClientData(Long clientId, String clientName, Collection loans, Collection savings, - EnumOptionData attendanceType) { + EnumOptionData attendanceType) { this.clientId = clientId; this.clientName = clientName; this.loans = loans; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGCollectionSheetData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGCollectionSheetData.java index 5e91612eca4..9109da157e4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGCollectionSheetData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGCollectionSheetData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.Collection; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.loanproduct.data.LoanProductData; import org.apache.fineract.portfolio.paymenttype.data.PaymentTypeData; @@ -40,21 +41,21 @@ public final class JLGCollectionSheetData { private final Collection paymentTypeOptions; public static JLGCollectionSheetData instance(final LocalDate date, final Collection loanProducts, - final Collection groups, final List attendanceTypeOptions, - final Collection paymentTypeOptions) { + final Collection groups, final List attendanceTypeOptions, + final Collection paymentTypeOptions) { return new JLGCollectionSheetData(date, loanProducts, null, groups, attendanceTypeOptions, paymentTypeOptions); } public static JLGCollectionSheetData withSavingsProducts(final JLGCollectionSheetData data, - final Collection savingsProducts) { + final Collection savingsProducts) { return new JLGCollectionSheetData(data.dueDate, data.loanProducts, savingsProducts, data.groups, data.attendanceTypeOptions, data.paymentTypeOptions); } private JLGCollectionSheetData(LocalDate dueDate, Collection loanProducts, - Collection savingsProducts, Collection groups, List attendanceTypeOptions, - final Collection paymentTypeOptions) { + Collection savingsProducts, Collection groups, List attendanceTypeOptions, + final Collection paymentTypeOptions) { this.dueDate = dueDate; this.loanProducts = loanProducts; this.savingsProducts = savingsProducts; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGCollectionSheetFlatData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGCollectionSheetFlatData.java index da9b86568da..c7bb1e064a8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGCollectionSheetFlatData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGCollectionSheetFlatData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.collectionsheet.data; import java.math.BigDecimal; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.organisation.monetary.data.CurrencyData; @@ -52,11 +53,11 @@ public class JLGCollectionSheetFlatData { private BigDecimal feePaid = BigDecimal.ZERO; public JLGCollectionSheetFlatData(final String groupName, final Long groupId, final Long staffId, final String staffName, - final Long levelId, final String levelName, final String clientName, final Long clientId, final Long loanId, - final String accountId, final Integer accountStatusId, final String productShortName, final Long productId, - final CurrencyData currency, final BigDecimal disbursementAmount, final BigDecimal principalDue, final BigDecimal principalPaid, - final BigDecimal interestDue, final BigDecimal interestPaid, final BigDecimal chargesDue, final EnumOptionData attendanceType, - final BigDecimal feeDue, final BigDecimal feePaid) { + final Long levelId, final String levelName, final String clientName, final Long clientId, final Long loanId, + final String accountId, final Integer accountStatusId, final String productShortName, final Long productId, + final CurrencyData currency, final BigDecimal disbursementAmount, final BigDecimal principalDue, final BigDecimal principalPaid, + final BigDecimal interestDue, final BigDecimal interestPaid, final BigDecimal chargesDue, final EnumOptionData attendanceType, + final BigDecimal feeDue, final BigDecimal feePaid) { this.groupName = groupName; this.groupId = groupId; this.staffId = staffId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGGroupData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGGroupData.java index e1e9779707c..dc06a6d1958 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGGroupData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/JLGGroupData.java @@ -6,9 +6,9 @@ * 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 @@ -34,7 +34,7 @@ public final class JLGGroupData { private Collection clients; public static JLGGroupData instance(final Long groupId, final String groupName, final Long staffId, final String staffName, - final Long levelId, final String levelName) { + final Long levelId, final String levelName) { return new JLGGroupData(groupId, groupName, staffId, staffName, levelId, levelName, null); } @@ -43,7 +43,7 @@ public static JLGGroupData withClients(final JLGGroupData group, Collection clients) { + final String levelName, final Collection clients) { this.groupId = groupId; this.groupName = groupName; this.staffId = staffId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/LoanDueData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/LoanDueData.java index da09280efdd..4dd9540c3ad 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/LoanDueData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/LoanDueData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.collectionsheet.data; import java.math.BigDecimal; + import org.apache.fineract.organisation.monetary.data.CurrencyData; /** @@ -43,9 +44,9 @@ public class LoanDueData { private BigDecimal feePaid = BigDecimal.ZERO; public LoanDueData(final Long loanId, final String accountId, final Integer accountStatusId, final String productShortName, - final Long productId, final CurrencyData currency, final BigDecimal disbursementAmount, final BigDecimal principalDue, - final BigDecimal principalPaid, final BigDecimal interestDue, final BigDecimal interestPaid, final BigDecimal chargesDue, - final BigDecimal feeDue, final BigDecimal feePaid) { + final Long productId, final CurrencyData currency, final BigDecimal disbursementAmount, final BigDecimal principalDue, + final BigDecimal principalPaid, final BigDecimal interestDue, final BigDecimal interestPaid, final BigDecimal chargesDue, + final BigDecimal feeDue, final BigDecimal feePaid) { this.loanId = loanId; this.accountId = accountId; this.accountStatusId = accountStatusId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/RepaymentTransactionRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/RepaymentTransactionRequest.java index a061c26ebb4..ce1b83fd602 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/RepaymentTransactionRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/RepaymentTransactionRequest.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.math.BigDecimal; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/SavingDueTransactionRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/SavingDueTransactionRequest.java index 2133709965f..fdd0f8db1aa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/SavingDueTransactionRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/SavingDueTransactionRequest.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.math.BigDecimal; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/SavingsDueData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/SavingsDueData.java index bcd2196bb79..2126e7fefee 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/SavingsDueData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/data/SavingsDueData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.collectionsheet.data; import java.math.BigDecimal; + import org.apache.fineract.organisation.monetary.data.CurrencyData; /** @@ -42,13 +43,13 @@ public final class SavingsDueData { private String depositAccountType; public static SavingsDueData instance(final Long savingsId, final String accountId, final Integer accountStatusId, - final String productName, final Long productId, final CurrencyData currency, final BigDecimal dueAmount, - final String depositAccountType) { + final String productName, final Long productId, final CurrencyData currency, final BigDecimal dueAmount, + final String depositAccountType) { return new SavingsDueData(savingsId, accountId, accountStatusId, productName, productId, currency, dueAmount, depositAccountType); } private SavingsDueData(final Long savingsId, final String accountId, final Integer accountStatusId, final String productName, - final Long productId, final CurrencyData currency, final BigDecimal dueAmount, final String depositAccountType) { + final Long productId, final CurrencyData currency, final BigDecimal dueAmount, final String depositAccountType) { this.savingsId = savingsId; this.accountId = accountId; this.accountStatusId = accountStatusId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/handler/SaveIndividualCollectionSheetCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/handler/SaveIndividualCollectionSheetCommandHandler.java index 94376127039..f4f140d2ce1 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/handler/SaveIndividualCollectionSheetCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/handler/SaveIndividualCollectionSheetCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/handler/UpdateCollectionSheetCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/handler/UpdateCollectionSheetCommandHandler.java index 171e804bd2a..60040ea302f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/handler/UpdateCollectionSheetCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/handler/UpdateCollectionSheetCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetBulkDisbursalCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetBulkDisbursalCommandFromApiJsonDeserializer.java index a591bf6ff52..21f048ab7fa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetBulkDisbursalCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetBulkDisbursalCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -21,9 +21,11 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.Locale; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.exception.InvalidJsonException; import org.apache.fineract.infrastructure.core.serialization.AbstractFromApiJsonDeserializer; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetBulkRepaymentCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetBulkRepaymentCommandFromApiJsonDeserializer.java index 1df7450b89e..5e757ac6ce7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetBulkRepaymentCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetBulkRepaymentCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -21,9 +21,11 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.Locale; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.apache.fineract.infrastructure.core.exception.InvalidJsonException; @@ -50,7 +52,7 @@ public final class CollectionSheetBulkRepaymentCommandFromApiJsonDeserializer @Autowired public CollectionSheetBulkRepaymentCommandFromApiJsonDeserializer(final FromJsonHelper fromApiJsonHelper, - final PaymentDetailAssembler paymentDetailAssembler) { + final PaymentDetailAssembler paymentDetailAssembler) { this.fromApiJsonHelper = fromApiJsonHelper; this.paymentDetailAssembler = paymentDetailAssembler; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetGenerateCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetGenerateCommandFromApiJsonDeserializer.java index bd134480e3f..3f34bf7d0d7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetGenerateCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/serialization/CollectionSheetGenerateCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.time.LocalDate; import java.util.ArrayList; @@ -35,6 +36,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetReadPlatformService.java index f5e85c6968b..2fca69e31fd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetReadPlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetWritePlatformService.java index 0ebe8b1d6ac..faf8e56b1f7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetWritePlatformServiceJpaRepositoryImpl.java index dd09183837e..5467bce0809 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/collectionsheet/service/CollectionSheetWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/DropdownReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/DropdownReadPlatformService.java index 61b3fb3eb62..73196df6e26 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/DropdownReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/DropdownReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.common.service; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; public interface DropdownReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/DropdownReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/DropdownReadPlatformServiceImpl.java index 5049a3bd134..12512476d3c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/DropdownReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/common/service/DropdownReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.Arrays; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.common.domain.ConditionType; import org.apache.fineract.portfolio.common.domain.DaysInMonthType; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/api/FundsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/api/FundsApiResourceSwagger.java index 746a65c35c5..f0abf905af0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/api/FundsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/api/FundsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -25,12 +25,14 @@ */ final class FundsApiResourceSwagger { - private FundsApiResourceSwagger() {} + private FundsApiResourceSwagger() { + } @Schema(description = "PostFundsResponse") public static final class PostFundsResponse { - private PostFundsResponse() {} + private PostFundsResponse() { + } @Schema(example = "1") public Long resourceId; @@ -39,7 +41,8 @@ private PostFundsResponse() {} @Schema(description = "PutFundsFundIdRequest") public static final class PutFundsFundIdRequest { - private PutFundsFundIdRequest() {} + private PutFundsFundIdRequest() { + } @Schema(example = "EU Agri Fund (2010-2020)") public String name; @@ -49,7 +52,8 @@ private PutFundsFundIdRequest() {} @Schema(description = "PutFundsFundIdResponse") public static final class PutFundsFundIdResponse { - private PutFundsFundIdResponse() {} + private PutFundsFundIdResponse() { + } @Schema(example = "1") public Long resourceId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/data/FundRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/data/FundRequest.java index 987ee7f3dd3..d205321c2aa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/data/FundRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/data/FundRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/handler/CreateFundCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/handler/CreateFundCommandHandler.java index 1cfed4c5165..b9635f5add5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/handler/CreateFundCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/handler/CreateFundCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/handler/UpdateFundCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/handler/UpdateFundCommandHandler.java index 63313d21738..4345059295b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/handler/UpdateFundCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/handler/UpdateFundCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/serialization/FundCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/serialization/FundCommandFromApiJsonDeserializer.java index fddf2834aea..274721a975e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/serialization/FundCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/serialization/FundCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -27,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -59,7 +61,8 @@ public void validateForCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -81,7 +84,8 @@ public void validateForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/service/FundReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/service/FundReadPlatformServiceImpl.java index 8b4051091e0..6e67eb1e3d6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/service/FundReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/service/FundReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.fund.data.FundData; @@ -74,7 +75,7 @@ public FundData retrieveFund(final Long fundId) { final FundMapper rm = new FundMapper(); final String sql = "select " + rm.schema() + " where f.id = ?"; - final FundData selectedFund = this.jdbcTemplate.queryForObject(sql, rm, new Object[] { fundId }); // NOSONAR + final FundData selectedFund = this.jdbcTemplate.queryForObject(sql, rm, new Object[]{fundId}); // NOSONAR return selectedFund; } catch (final EmptyResultDataAccessException e) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/service/FundWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/service/FundWritePlatformService.java index 3eeddd82b8d..b158876f105 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/service/FundWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/service/FundWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/service/FundWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/service/FundWritePlatformServiceJpaRepositoryImpl.java index 26e6b36ce7e..42ef5ff6588 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/service/FundWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/service/FundWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.portfolio.fund.service; import jakarta.persistence.PersistenceException; + import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/starter/FundConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/starter/FundConfiguration.java index dfc9dae3a38..9751df1e06a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/starter/FundConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/fund/starter/FundConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -42,7 +42,7 @@ public FundReadPlatformService fundReadPlatformService(JdbcTemplate jdbcTemplate @Bean @ConditionalOnMissingBean(FundWritePlatformService.class) public FundWritePlatformService fundWritePlatformService(PlatformSecurityContext context, - FundCommandFromApiJsonDeserializer fromApiJsonDeserializer, FundRepository fundRepository) { + FundCommandFromApiJsonDeserializer fromApiJsonDeserializer, FundRepository fundRepository) { return new FundWritePlatformServiceJpaRepositoryImpl(context, fromApiJsonDeserializer, fundRepository); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/CentersApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/CentersApiResourceSwagger.java index edfdb422193..f2d3985320e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/CentersApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/CentersApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.group.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; import java.util.Set; @@ -27,16 +28,19 @@ */ final class CentersApiResourceSwagger { - private CentersApiResourceSwagger() {} + private CentersApiResourceSwagger() { + } @Schema(description = "GetCentersTemplateResponse") public static final class GetCentersTemplateResponse { - private GetCentersTemplateResponse() {} + private GetCentersTemplateResponse() { + } static final class GetCentersOfficeOptions { - private GetCentersOfficeOptions() {} + private GetCentersOfficeOptions() { + } @Schema(example = "1") public Long id; @@ -48,7 +52,8 @@ private GetCentersOfficeOptions() {} static final class GetCentersStaffOptions { - private GetCentersStaffOptions() {} + private GetCentersStaffOptions() { + } @Schema(example = "2") public Long id; @@ -69,15 +74,18 @@ private GetCentersStaffOptions() {} @Schema(description = "GetCentersResponse") public static final class GetCentersResponse { - private GetCentersResponse() {} + private GetCentersResponse() { + } static final class GetCentersPageItems { - private GetCentersPageItems() {} + private GetCentersPageItems() { + } static final class GetCentersStatus { - private GetCentersStatus() {} + private GetCentersStatus() { + } @Schema(example = "100") public Long id; @@ -110,7 +118,8 @@ private GetCentersStatus() {} @Schema(description = "GetCentersCenterIdResponse") public static final class GetCentersCenterIdResponse { - private GetCentersCenterIdResponse() {} + private GetCentersCenterIdResponse() { + } @Schema(example = "8") public Long id; @@ -130,7 +139,8 @@ private GetCentersCenterIdResponse() {} @Schema(description = "PostCentersRequest") public static final class PostCentersRequest { - private PostCentersRequest() {} + private PostCentersRequest() { + } @Schema(example = "First Center (No groups)") public String name; @@ -143,7 +153,8 @@ private PostCentersRequest() {} @Schema(description = "PostCentersResponse") public static final class PostCentersResponse { - private PostCentersResponse() {} + private PostCentersResponse() { + } @Schema(example = "1") public Long officeId; @@ -156,7 +167,8 @@ private PostCentersResponse() {} @Schema(description = "PutCentersCenterIdRequest") public static final class PutCentersCenterIdRequest { - private PutCentersCenterIdRequest() {} + private PutCentersCenterIdRequest() { + } @Schema(example = "First Center (No groups)") public String name; @@ -165,11 +177,13 @@ private PutCentersCenterIdRequest() {} @Schema(description = "PutCentersCenterIdResponse") public static final class PutCentersCenterIdResponse { - private PutCentersCenterIdResponse() {} + private PutCentersCenterIdResponse() { + } static final class PutCentersChanges { - private PutCentersChanges() {} + private PutCentersChanges() { + } @Schema(example = "First Center (No groups) - modified") public String name; @@ -187,11 +201,13 @@ private PutCentersChanges() {} @Schema(description = "DeleteCentersCenterIdResponse") public static final class DeleteCentersCenterIdResponse { - private DeleteCentersCenterIdResponse() {} + private DeleteCentersCenterIdResponse() { + } static final class DeleteCentersChanges { - private DeleteCentersChanges() {} + private DeleteCentersChanges() { + } } @Schema(example = "1") @@ -202,7 +218,8 @@ private DeleteCentersChanges() {} @Schema(description = "PostCentersCenterIdRequest") public static final class PostCentersCenterIdRequest { - private PostCentersCenterIdRequest() {} + private PostCentersCenterIdRequest() { + } @Schema(example = "32") public Long closureReasonId; @@ -217,7 +234,8 @@ private PostCentersCenterIdRequest() {} @Schema(description = "PostCentersCenterIdResponse") public static final class PostCentersCenterIdResponse { - private PostCentersCenterIdResponse() {} + private PostCentersCenterIdResponse() { + } @Schema(example = "1") public Long resourceId; @@ -226,15 +244,18 @@ private PostCentersCenterIdResponse() {} @Schema(description = "GetCentersCenterIdAccountsResponse") public static final class GetCentersCenterIdAccountsResponse { - private GetCentersCenterIdAccountsResponse() {} + private GetCentersCenterIdAccountsResponse() { + } static final class GetCentersSavingsAccounts { - private GetCentersSavingsAccounts() {} + private GetCentersSavingsAccounts() { + } static final class GetCentersCenterIdStatus { - private GetCentersCenterIdStatus() {} + private GetCentersCenterIdStatus() { + } @Schema(example = "100") public Long id; @@ -264,7 +285,8 @@ private GetCentersCenterIdStatus() {} static final class GetCentersCenterIdCurrency { - private GetCentersCenterIdCurrency() {} + private GetCentersCenterIdCurrency() { + } @Schema(example = "USD") public String code; @@ -284,7 +306,8 @@ private GetCentersCenterIdCurrency() {} static final class GetCentersAccountType { - private GetCentersAccountType() {} + private GetCentersAccountType() { + } @Schema(example = "2") public Long id; @@ -296,7 +319,8 @@ private GetCentersAccountType() {} static final class GetCentersTimeline { - private GetCentersTimeline() {} + private GetCentersTimeline() { + } @Schema(example = "[2014, 5, 1]") public LocalDate submittedOnDate; @@ -310,7 +334,8 @@ private GetCentersTimeline() {} static final class GetCentersDepositType { - private GetCentersDepositType() {} + private GetCentersDepositType() { + } @Schema(example = "100") public Long id; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsApiResourceSwagger.java index a7805647e55..f6834382f7a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/api/GroupsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.group.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; import java.util.Set; @@ -27,16 +28,19 @@ */ final class GroupsApiResourceSwagger { - private GroupsApiResourceSwagger() {} + private GroupsApiResourceSwagger() { + } @Schema(description = "GetGroupsTemplateResponse") public static final class GetGroupsTemplateResponse { - private GetGroupsTemplateResponse() {} + private GetGroupsTemplateResponse() { + } static final class GetGroupsTemplateOfficeOptions { - private GetGroupsTemplateOfficeOptions() {} + private GetGroupsTemplateOfficeOptions() { + } @Schema(example = "1") public Long id; @@ -48,7 +52,8 @@ private GetGroupsTemplateOfficeOptions() {} static final class GetGroupsTemplateStaffOptions { - private GetGroupsTemplateStaffOptions() {} + private GetGroupsTemplateStaffOptions() { + } @Schema(example = "1") public Long id; @@ -58,7 +63,8 @@ private GetGroupsTemplateStaffOptions() {} static final class GetGroupsTemplateClientOptions { - private GetGroupsTemplateClientOptions() {} + private GetGroupsTemplateClientOptions() { + } @Schema(example = "1") public Long id; @@ -72,15 +78,18 @@ private GetGroupsTemplateClientOptions() {} static final class GetGroupsTemplateDatatables { - private GetGroupsTemplateDatatables() {} + private GetGroupsTemplateDatatables() { + } static final class GetGroupsTemplateColumnHeaderData { - private GetGroupsTemplateColumnHeaderData() {} + private GetGroupsTemplateColumnHeaderData() { + } static final class GetGroupsTemplateColumnValues { - private GetGroupsTemplateColumnValues() {} + private GetGroupsTemplateColumnValues() { + } } @Schema(example = "group_id") @@ -116,15 +125,18 @@ private GetGroupsTemplateColumnValues() {} @Schema(description = "GetGroupsResponse") public static final class GetGroupsResponse { - private GetGroupsResponse() {} + private GetGroupsResponse() { + } static final class GetGroupsPageItems { - private GetGroupsPageItems() {} + private GetGroupsPageItems() { + } static final class GetGroupsStatus { - private GetGroupsStatus() {} + private GetGroupsStatus() { + } @Schema(example = "100") public Long id; @@ -157,11 +169,13 @@ private GetGroupsStatus() {} @Schema(description = "GetGroupsGroupIdResponse") public static final class GetGroupsGroupIdResponse { - private GetGroupsGroupIdResponse() {} + private GetGroupsGroupIdResponse() { + } static final class GetGroupsGroupIdTimeline { - private GetGroupsGroupIdTimeline() {} + private GetGroupsGroupIdTimeline() { + } @Schema(example = "[2013, 11, 14]") public LocalDate activatedOnDate; @@ -191,7 +205,8 @@ private GetGroupsGroupIdTimeline() {} @Schema(description = "PostGroupsRequest") public static final class PostGroupsRequest { - private PostGroupsRequest() {} + private PostGroupsRequest() { + } @Schema(example = "1") public Long officeId; @@ -204,7 +219,8 @@ private PostGroupsRequest() {} @Schema(description = "PostGroupsResponse") public static final class PostGroupsResponse { - private PostGroupsResponse() {} + private PostGroupsResponse() { + } @Schema(example = "1") public Long officeId; @@ -217,7 +233,8 @@ private PostGroupsResponse() {} @Schema(description = "DeleteGroupsGroupIdResponse") public static final class DeleteGroupsGroupIdResponse { - private DeleteGroupsGroupIdResponse() {} + private DeleteGroupsGroupIdResponse() { + } @Schema(example = "1") public Long officeId; @@ -230,7 +247,8 @@ private DeleteGroupsGroupIdResponse() {} @Schema(description = "PostGroupsGroupIdCommandUnassignStaffRequest") public static final class PostGroupsGroupIdCommandUnassignStaffRequest { - private PostGroupsGroupIdCommandUnassignStaffRequest() {} + private PostGroupsGroupIdCommandUnassignStaffRequest() { + } @Schema(example = "1") public Long staffId; @@ -239,11 +257,13 @@ private PostGroupsGroupIdCommandUnassignStaffRequest() {} @Schema(description = "PostGroupsGroupIdCommandUnassignStaffResponse") public static final class PostGroupsGroupIdCommandUnassignStaffResponse { - private PostGroupsGroupIdCommandUnassignStaffResponse() {} + private PostGroupsGroupIdCommandUnassignStaffResponse() { + } static final class PostGroupsGroupIdCommandUnassignStaffChanges { - private PostGroupsGroupIdCommandUnassignStaffChanges() {} + private PostGroupsGroupIdCommandUnassignStaffChanges() { + } } @Schema(example = "1") @@ -258,7 +278,8 @@ private PostGroupsGroupIdCommandUnassignStaffChanges() {} @Schema(description = "PutGroupsGroupIdRequest") public static final class PutGroupsGroupIdRequest { - private PutGroupsGroupIdRequest() {} + private PutGroupsGroupIdRequest() { + } @Schema(example = "First Group (changed)") public String name; @@ -267,11 +288,13 @@ private PutGroupsGroupIdRequest() {} @Schema(description = "PutGroupsGroupIdResponse") public static final class PutGroupsGroupIdResponse { - private PutGroupsGroupIdResponse() {} + private PutGroupsGroupIdResponse() { + } static final class PutGroupsGroupIdChanges { - private PutGroupsGroupIdChanges() {} + private PutGroupsGroupIdChanges() { + } @Schema(example = "First Group (changed)") public String name; @@ -289,15 +312,18 @@ private PutGroupsGroupIdChanges() {} @Schema(description = "GetGroupsGroupIdAccountsResponse") public static final class GetGroupsGroupIdAccountsResponse { - private GetGroupsGroupIdAccountsResponse() {} + private GetGroupsGroupIdAccountsResponse() { + } static final class GetGroupsGroupIdAccountsLoanAccounts { - private GetGroupsGroupIdAccountsLoanAccounts() {} + private GetGroupsGroupIdAccountsLoanAccounts() { + } static final class GetGroupsGroupIdAccountsStatus { - private GetGroupsGroupIdAccountsStatus() {} + private GetGroupsGroupIdAccountsStatus() { + } @Schema(example = "100") public Long id; @@ -325,7 +351,8 @@ private GetGroupsGroupIdAccountsStatus() {} static final class GetGroupsGroupIdAccountsLoanType { - private GetGroupsGroupIdAccountsLoanType() {} + private GetGroupsGroupIdAccountsLoanType() { + } @Schema(example = "2") public Long id; @@ -349,11 +376,13 @@ private GetGroupsGroupIdAccountsLoanType() {} static final class GetGroupsGroupIdAccountsSavingAccounts { - private GetGroupsGroupIdAccountsSavingAccounts() {} + private GetGroupsGroupIdAccountsSavingAccounts() { + } static final class GetGroupsGroupIdAccountsSavingStatus { - private GetGroupsGroupIdAccountsSavingStatus() {} + private GetGroupsGroupIdAccountsSavingStatus() { + } @Schema(example = "100") public Long id; @@ -377,7 +406,8 @@ private GetGroupsGroupIdAccountsSavingStatus() {} static final class GetGroupsGroupIdAccountsSavingCurrency { - private GetGroupsGroupIdAccountsSavingCurrency() {} + private GetGroupsGroupIdAccountsSavingCurrency() { + } @Schema(example = "USD") public String code; @@ -395,7 +425,8 @@ private GetGroupsGroupIdAccountsSavingCurrency() {} static final class GetGroupsGroupIdAccountsSavingAccountType { - private GetGroupsGroupIdAccountsSavingAccountType() {} + private GetGroupsGroupIdAccountsSavingAccountType() { + } @Schema(example = "2") public Long id; @@ -428,11 +459,13 @@ private GetGroupsGroupIdAccountsSavingAccountType() {} static final class GetGroupsGroupIdAccountsMemberLoanAccounts { - private GetGroupsGroupIdAccountsMemberLoanAccounts() {} + private GetGroupsGroupIdAccountsMemberLoanAccounts() { + } static final class GetGroupsGroupIdAccountsMemberLoanStatus { - private GetGroupsGroupIdAccountsMemberLoanStatus() {} + private GetGroupsGroupIdAccountsMemberLoanStatus() { + } @Schema(example = "200") public Long id; @@ -460,7 +493,8 @@ private GetGroupsGroupIdAccountsMemberLoanStatus() {} static final class GetGroupsGroupIdAccountsMemberLoanType { - private GetGroupsGroupIdAccountsMemberLoanType() {} + private GetGroupsGroupIdAccountsMemberLoanType() { + } @Schema(example = "3") public Long id; @@ -484,7 +518,8 @@ private GetGroupsGroupIdAccountsMemberLoanType() {} static final class GetGroupsGroupIdAccountsMemberSavingsAccounts { - private GetGroupsGroupIdAccountsMemberSavingsAccounts() {} + private GetGroupsGroupIdAccountsMemberSavingsAccounts() { + } @Schema(example = "3") public Long id; @@ -508,11 +543,13 @@ private GetGroupsGroupIdAccountsMemberSavingsAccounts() {} @Schema(description = "PostGroupsGroupIdRequest") public static final class PostGroupsGroupIdRequest { - private PostGroupsGroupIdRequest() {} + private PostGroupsGroupIdRequest() { + } static final class PostGroupsGroupIdClients { - private PostGroupsGroupIdClients() {} + private PostGroupsGroupIdClients() { + } @Schema(example = "1") public Long id; @@ -526,7 +563,8 @@ private PostGroupsGroupIdClients() {} @Schema(description = "PostGroupsGroupIdResponse") public static final class PostGroupsGroupIdResponse { - private PostGroupsGroupIdResponse() {} + private PostGroupsGroupIdResponse() { + } @Schema(example = "1") public Long resourceId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/data/GroupLevelData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/data/GroupLevelData.java index 2dcfdae0115..b879a2267a3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/data/GroupLevelData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/data/GroupLevelData.java @@ -6,9 +6,9 @@ * 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 @@ -34,8 +34,8 @@ public class GroupLevelData { private final boolean canHaveClients; public GroupLevelData(final Long levelId, final String levelName, final Long parentLevelId, final String parentLevelName, - final Long childLevelId, final String childLevelName, final boolean superParent, final boolean recursable, - final boolean canHaveClients) { + final Long childLevelId, final String childLevelName, final boolean superParent, final boolean recursable, + final boolean canHaveClients) { this.levelId = levelId; this.levelName = levelName; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/data/StaffCenterData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/data/StaffCenterData.java index f2bcca9fd76..22be4ac4636 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/data/StaffCenterData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/data/StaffCenterData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupLevelRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupLevelRepository.java index 6157bfad695..9da0473291b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupLevelRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupLevelRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRepository.java index fdf6c5a6359..6f4d02339bc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.Collection; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRepositoryWrapper.java index e06899f17fb..d76c4997d40 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.group.domain; import java.time.LocalDate; + import org.apache.fineract.organisation.office.domain.Office; import org.apache.fineract.portfolio.group.exception.GroupNotFoundException; import org.springframework.beans.factory.annotation.Autowired; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRoleRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRoleRepository.java index 2202ad29df9..4f96e1a0e01 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRoleRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRoleRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRoleRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRoleRepositoryWrapper.java index a9f445751f1..9142fcf418f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRoleRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupRoleRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupTypes.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupTypes.java index 50a55214c8d..68903e31445 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupTypes.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/domain/GroupTypes.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/CenterNotActiveException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/CenterNotActiveException.java index e5d1146de66..0d971ba3a82 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/CenterNotActiveException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/CenterNotActiveException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/CenterNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/CenterNotFoundException.java index 594974671b4..0bbf2440d6d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/CenterNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/CenterNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupAccountExistsException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupAccountExistsException.java index 3eaae4dcff4..1c39e74040e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupAccountExistsException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupAccountExistsException.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,7 @@ public class GroupAccountExistsException extends AbstractPlatformDomainRuleException { public GroupAccountExistsException(final String action, final String postFix, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg.group." + action + "." + postFix, defaultUserMessage, defaultUserMessageArgs); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupHasNoStaffException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupHasNoStaffException.java index 8329ecc0e29..a0a4e5df39c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupHasNoStaffException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupHasNoStaffException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupLevelNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupLevelNotFoundException.java index 530ffe10a70..282319c5b53 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupLevelNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupLevelNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupMemberCountNotInPermissibleRangeException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupMemberCountNotInPermissibleRangeException.java index 30bf5861c9c..5191eea3448 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupMemberCountNotInPermissibleRangeException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupMemberCountNotInPermissibleRangeException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupMemberNotFoundInGSIMException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupMemberNotFoundInGSIMException.java index 23817fbad7f..4f17090c256 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupMemberNotFoundInGSIMException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupMemberNotFoundInGSIMException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupMustBePendingToBeDeletedException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupMustBePendingToBeDeletedException.java index 430f78459a1..e81f426f078 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupMustBePendingToBeDeletedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupMustBePendingToBeDeletedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupNotFoundException.java index e86d0fe4097..24d894e62bb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupRoleNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupRoleNotFoundException.java index 8541155b43e..61996a8d631 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupRoleNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/GroupRoleNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/InvalidGroupLevelException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/InvalidGroupLevelException.java index 27f4667bad5..f6f04f52c0c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/InvalidGroupLevelException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/exception/InvalidGroupLevelException.java @@ -6,9 +6,9 @@ * 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 @@ -27,7 +27,7 @@ public class InvalidGroupLevelException extends AbstractPlatformDomainRuleException { public InvalidGroupLevelException(final String action, final String postFix, final String defaultUserMessage, - final Object... defaultUserMessageArgs) { + final Object... defaultUserMessageArgs) { super("error.msg.group." + action + "." + postFix, defaultUserMessage, defaultUserMessageArgs); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/ActivateCenterCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/ActivateCenterCommandHandler.java index cb9dc5172cb..61a8e4e869c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/ActivateCenterCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/ActivateCenterCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/ActivateGroupCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/ActivateGroupCommandHandler.java index 975a82aa8ae..d99bc8681af 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/ActivateGroupCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/ActivateGroupCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/AssignGroupStaffCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/AssignGroupStaffCommandHandler.java index 34da7b2a7b9..3123631a7e3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/AssignGroupStaffCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/AssignGroupStaffCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/AssignRoleCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/AssignRoleCommandHandler.java index 494854dd503..1b070151b1d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/AssignRoleCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/AssignRoleCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/AssociateClientsToGroupCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/AssociateClientsToGroupCommandHandler.java index fe633fbfabe..bd4dbb2c054 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/AssociateClientsToGroupCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/AssociateClientsToGroupCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/AssociateGroupsToCenterCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/AssociateGroupsToCenterCommandHandler.java index 29a6cb86850..cf9319873f2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/AssociateGroupsToCenterCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/AssociateGroupsToCenterCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/CloseCenterCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/CloseCenterCommandHandler.java index b222c11089b..ca51477d222 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/CloseCenterCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/CloseCenterCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/CloseGroupCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/CloseGroupCommandHandler.java index ea12b3be551..e27cb620ce6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/CloseGroupCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/CloseGroupCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/CreateCenterCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/CreateCenterCommandHandler.java index e0c12b992ca..7c3c508fd6e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/CreateCenterCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/CreateCenterCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/CreateGroupCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/CreateGroupCommandHandler.java index 9cc8400fbbb..86d74e14950 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/CreateGroupCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/CreateGroupCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/DeleteCenterCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/DeleteCenterCommandHandler.java index 4d250ab7e95..7d53d5d41b5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/DeleteCenterCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/DeleteCenterCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/DeleteGroupCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/DeleteGroupCommandHandler.java index 1610021a252..25e8f276ef2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/DeleteGroupCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/DeleteGroupCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/DisassociateClientsFromGroupCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/DisassociateClientsFromGroupCommandHandler.java index ce690bd0d58..72bf07da88e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/DisassociateClientsFromGroupCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/DisassociateClientsFromGroupCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/DisassociateGroupsFromCenterCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/DisassociateGroupsFromCenterCommandHandler.java index 5ebeb83c136..10872ea3301 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/DisassociateGroupsFromCenterCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/DisassociateGroupsFromCenterCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/SaveCenterCollectionSheetCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/SaveCenterCollectionSheetCommandHandler.java index f134a8cfca9..62737430932 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/SaveCenterCollectionSheetCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/SaveCenterCollectionSheetCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/SaveGroupCollectionSheetCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/SaveGroupCollectionSheetCommandHandler.java index 3eca03069c3..038ceed323b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/SaveGroupCollectionSheetCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/SaveGroupCollectionSheetCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UnassignGroupStaffCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UnassignGroupStaffCommandHandler.java index 547e26bda82..b5f4c193d32 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UnassignGroupStaffCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UnassignGroupStaffCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UnassignRoleCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UnassignRoleCommandHandler.java index 920f0dbde21..8c0902cc309 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UnassignRoleCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UnassignRoleCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UnassignStaffFromCenterCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UnassignStaffFromCenterCommandHandler.java index 4823dfb08a5..a2fe65c9d7a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UnassignStaffFromCenterCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UnassignStaffFromCenterCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UpdateCenterCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UpdateCenterCommandHandler.java index 3036e8e3314..2ae6def50c0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UpdateCenterCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UpdateCenterCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UpdateGroupCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UpdateGroupCommandHandler.java index fee0f90f5ba..aa6024f3091 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UpdateGroupCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UpdateGroupCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UpdateGroupRoleCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UpdateGroupRoleCommandHandler.java index e109351aab2..03038d23e9e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UpdateGroupRoleCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/handler/UpdateGroupRoleCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/serialization/GroupRolesDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/serialization/GroupRolesDataValidator.java index 5c38b46ce9b..80b2338af57 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/serialization/GroupRolesDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/serialization/GroupRolesDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -27,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -64,7 +66,8 @@ public void validateForCreateGroupRole(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, GROUP_ROLES_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -90,7 +93,8 @@ public void validateForUpdateRole(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, GROUP_ROLES_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/serialization/GroupingTypesDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/serialization/GroupingTypesDataValidator.java index 25470d90cb8..6fc8e3122fe 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/serialization/GroupingTypesDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/serialization/GroupingTypesDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.time.LocalDate; import java.util.ArrayList; @@ -29,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -92,7 +94,8 @@ public void validateForCreateCenter(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, CENTER_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -159,7 +162,8 @@ public void validateForCreateCenterGroup(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, GROUP_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -229,7 +233,8 @@ public void validateForCreateGroup(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, GROUP_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -296,7 +301,8 @@ public void validateForUpdateCenter(final JsonCommand command, final Long center throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, CENTER_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -345,7 +351,8 @@ public void validateForUpdateGroup(final JsonCommand command, final Long groupId throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, GROUP_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -400,7 +407,8 @@ public void validateForActivation(final JsonCommand command, final String resour throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ACTIVATION_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -420,7 +428,8 @@ public void validateForUnassignStaff(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final Set supportedParametersUnassignStaff = new HashSet<>(Arrays.asList("staffId")); @@ -445,7 +454,8 @@ public void validateForAssignStaff(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final Set supportedParametersAssignStaff = new HashSet<>( Arrays.asList(GroupingTypesApiConstants.staffIdParamName, GroupingTypesApiConstants.inheritStaffForClientAccounts)); @@ -479,7 +489,8 @@ public void validateForAssociateClients(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final Set supportedParameters = new HashSet<>(Arrays.asList(GroupingTypesApiConstants.clientMembersParamName)); @@ -501,7 +512,8 @@ public void validateForDisassociateClients(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final Set supportedParameters = new HashSet<>(Arrays.asList(GroupingTypesApiConstants.clientMembersParamName)); @@ -524,7 +536,8 @@ public void validateForGroupClose(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, GROUP_CLOSE_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -551,7 +564,8 @@ public void validateForCenterClose(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, GROUP_CLOSE_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -576,7 +590,8 @@ public void validateForAssociateGroups(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final Set supportedParameters = new HashSet<>(Arrays.asList(GroupingTypesApiConstants.groupMembersParamName)); @@ -599,7 +614,8 @@ public void validateForDisassociateGroups(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); final Set supportedParameters = new HashSet<>(Arrays.asList(GroupingTypesApiConstants.groupMembersParamName)); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/AllGroupTypesDataMapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/AllGroupTypesDataMapper.java index 3a0ede7aca3..b12b33286bc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/AllGroupTypesDataMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/AllGroupTypesDataMapper.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.portfolio.client.domain.ClientEnumerations; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/CenterReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/CenterReadPlatformService.java index 2f0e9ce400d..763ba94fb7b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/CenterReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/CenterReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.Collection; + import org.apache.fineract.infrastructure.core.data.PaginationParameters; import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.infrastructure.core.service.SearchParameters; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/CenterReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/CenterReadPlatformServiceImpl.java index fff763625a4..272ce89ef61 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/CenterReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/CenterReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -29,6 +29,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.codes.service.CodeValueReadPlatformService; @@ -381,7 +382,7 @@ public Collection retrieveAllForDropdown(final Long officeId) { final String sql = "select " + this.centerMapper.schema() + " where g.office_id = ? and g.parent_id is null and g.level_Id = ? and o.hierarchy like ? order by g.hierarchy"; - return this.jdbcTemplate.query(sql, this.centerMapper, new Object[] { officeId, GroupTypes.CENTER.getId(), hierarchySearchString }); // NOSONAR + return this.jdbcTemplate.query(sql, this.centerMapper, new Object[]{officeId, GroupTypes.CENTER.getId(), hierarchySearchString}); // NOSONAR } @Override @@ -434,7 +435,7 @@ public CenterData retrieveOne(final Long centerId) { final String hierarchySearchString = hierarchy + "%"; final String sql = "select " + this.centerMapper.schema() + " where g.id = ? and o.hierarchy like ?"; - return this.jdbcTemplate.queryForObject(sql, this.centerMapper, new Object[] { centerId, hierarchySearchString }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, this.centerMapper, new Object[]{centerId, hierarchySearchString}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new CenterNotFoundException(centerId, e); @@ -477,7 +478,7 @@ public GroupGeneralData retrieveCenterGroupTemplate(final Long centerId) { @Override public Collection retrieveAssociatedGroups(final Long centerId) { final String sql = "select " + this.groupDataMapper.schema() + " where g.parent_id = ? order by g.id"; - return this.jdbcTemplate.query(sql, this.groupDataMapper, new Object[] { centerId }); // NOSONAR + return this.jdbcTemplate.query(sql, this.groupDataMapper, new Object[]{centerId}); // NOSONAR } @Override @@ -489,7 +490,7 @@ public CenterData retrieveCenterWithClosureReasons() { @Override public Collection retriveAllCentersByMeetingDate(final Long officeId, final LocalDate meetingDate, - final Long staffId) { + final Long staffId) { validateForGenerateCollectionSheet(staffId); final CenterCalendarDataMapper centerCalendarMapper = new CenterCalendarDataMapper(); String sql = centerCalendarMapper.schema(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupLevelReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupLevelReadPlatformService.java index fc5f78c0818..e3d15b475e8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupLevelReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupLevelReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.group.service; import java.util.List; + import org.apache.fineract.portfolio.group.data.GroupLevelData; public interface GroupLevelReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupLevelReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupLevelReadPlatformServiceImpl.java index 6d4263e12a8..2db3b131442 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupLevelReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupLevelReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupReadPlatformService.java index c8b3a08aa8c..acb2db06030 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.group.service; import java.util.Collection; + import org.apache.fineract.infrastructure.core.data.PaginationParameters; import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.infrastructure.core.service.SearchParameters; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupReadPlatformServiceImpl.java index 1ec1762d2ea..50a13933745 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.HashSet; import java.util.List; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.codes.service.CodeValueReadPlatformService; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupRolesReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupRolesReadPlatformService.java index 4d991d9d459..6f9d6a47fc0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupRolesReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupRolesReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.group.service; import java.util.Collection; + import org.apache.fineract.portfolio.group.data.GroupRoleData; public interface GroupRolesReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupRolesReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupRolesReadPlatformServiceImpl.java index eb86c8e1da3..46ae239661b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupRolesReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupRolesReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; @@ -42,7 +43,7 @@ public Collection retrieveGroupRoles(final Long groupId) { this.context.authenticatedUser(); final GroupRolesDataMapper mapper = new GroupRolesDataMapper(); final String sql = "Select " + mapper.schema() + " where role.group_id=?"; - return this.jdbcTemplate.query(sql, mapper, new Object[] { groupId }); // NOSONAR + return this.jdbcTemplate.query(sql, mapper, new Object[]{groupId}); // NOSONAR } @Override @@ -51,7 +52,7 @@ public GroupRoleData retrieveGroupRole(final Long groupId, final Long roleId) { this.context.authenticatedUser(); final GroupRolesDataMapper mapper = new GroupRolesDataMapper(); final String sql = "Select " + mapper.schema() + " where role.group_id=? and role.id=?"; - return this.jdbcTemplate.queryForObject(sql, mapper, new Object[] { groupId, roleId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, mapper, new Object[]{groupId, roleId}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new GroupRoleNotFoundException(roleId, e); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupRolesWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupRolesWritePlatformService.java index 21eb88a1da0..1d2801e7460 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupRolesWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupRolesWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupRolesWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupRolesWritePlatformServiceJpaRepositoryImpl.java index cb827fca39a..837396cc39d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupRolesWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupRolesWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.group.service; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.codes.domain.CodeValue; @@ -87,7 +88,7 @@ public CommandProcessingResult createRole(final JsonCommand command) { } private void handleGroupDataIntegrityIssues(final JsonCommand command, final Throwable realCause, - final NonTransientDataAccessException dve) { + final NonTransientDataAccessException dve) { if (realCause.getMessage().contains("UNIQUE_GROUP_ROLES")) { final String clientId = command.stringValueOfParameterNamed(GroupingTypesApiConstants.clientIdParamName); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupTypeEnumerations.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupTypeEnumerations.java index b801533508b..dc6f62a4a08 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupTypeEnumerations.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupTypeEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -36,13 +36,13 @@ public static EnumOptionData groupType(final GroupTypes type) { switch (type) { case CENTER: optionData = new EnumOptionData(type.getId().longValue(), type.getCode(), "Individual loan"); - break; + break; case GROUP: optionData = new EnumOptionData(type.getId().longValue(), type.getCode(), "Group loan"); - break; + break; default: optionData = new EnumOptionData(GroupTypes.INVALID.getId().longValue(), GroupTypes.INVALID.getCode(), "Invalid"); - break; + break; } return optionData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupingTypesWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupingTypesWritePlatformService.java index df8931f3e9e..7fcf091331b 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupingTypesWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupingTypesWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupingTypesWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupingTypesWritePlatformServiceJpaRepositoryImpl.java index 830412c52a6..7d4784306dd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupingTypesWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/service/GroupingTypesWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.group.service; import jakarta.persistence.PersistenceException; + import java.time.LocalDate; import java.util.Collection; import java.util.HashMap; @@ -27,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -728,17 +730,17 @@ private Set assembleSetOfChildGroups(final Long officeId, final JsonComma * Guaranteed to throw an exception no matter what the data integrity issue is. */ private void handleGroupDataIntegrityIssues(final JsonCommand command, final Throwable realCause, final Exception dve, - final GroupTypes groupLevel) { + final GroupTypes groupLevel) { String levelName = "Invalid"; switch (groupLevel) { case CENTER: levelName = "Center"; - break; + break; case GROUP: levelName = "Group"; - break; + break; case INVALID: - break; + break; } String errorMessageForUser = null; @@ -900,7 +902,7 @@ private void validateForJLGSavings(final Long groupId, final Set clientM } public void validateOfficeOpeningDateisAfterGroupOrCenterOpeningDate(final Office groupOffice, final GroupLevel groupLevel, - final LocalDate activationDate) { + final LocalDate activationDate) { if (activationDate != null && DateUtils.isAfter(groupOffice.getOpeningLocalDate(), activationDate)) { final String levelName = groupLevel.getLevelName(); final String errorMessage = levelName + " activation date should be greater than or equal to the parent Office's creation date " diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/starter/GroupConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/starter/GroupConfiguration.java index 4451c479744..289961be684 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/starter/GroupConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/group/starter/GroupConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -71,10 +71,10 @@ public class GroupConfiguration { @Bean @ConditionalOnMissingBean(CenterReadPlatformService.class) public CenterReadPlatformService centerReadPlatformService(JdbcTemplate jdbcTemplate, PlatformSecurityContext context, - ClientReadPlatformService clientReadPlatformService, OfficeReadPlatformService officeReadPlatformService, - StaffReadService staffReadPlatformService, CodeValueReadPlatformService codeValueReadPlatformService, - ConfigurationDomainService configurationDomainService, ColumnValidator columnValidator, PaginationHelper paginationHelper, - DatabaseSpecificSQLGenerator sqlGenerator, PaginationParametersDataValidator paginationParametersDataValidator) { + ClientReadPlatformService clientReadPlatformService, OfficeReadPlatformService officeReadPlatformService, + StaffReadService staffReadPlatformService, CodeValueReadPlatformService codeValueReadPlatformService, + ConfigurationDomainService configurationDomainService, ColumnValidator columnValidator, PaginationHelper paginationHelper, + DatabaseSpecificSQLGenerator sqlGenerator, PaginationParametersDataValidator paginationParametersDataValidator) { return new CenterReadPlatformServiceImpl(jdbcTemplate, context, clientReadPlatformService, officeReadPlatformService, staffReadPlatformService, codeValueReadPlatformService, configurationDomainService, columnValidator, paginationHelper, sqlGenerator, paginationParametersDataValidator); @@ -83,15 +83,15 @@ public CenterReadPlatformService centerReadPlatformService(JdbcTemplate jdbcTemp @Bean @ConditionalOnMissingBean(GroupingTypesWritePlatformService.class) public GroupingTypesWritePlatformService groupingTypesWritePlatformService(PlatformSecurityContext context, - GroupRepositoryWrapper groupRepository, ClientRepositoryWrapper clientRepositoryWrapper, - OfficeRepositoryWrapper officeRepositoryWrapper, StaffRepositoryWrapper staffRepository, NoteRepository noteRepository, - GroupLevelRepository groupLevelRepository, GroupingTypesDataValidator fromApiJsonDeserializer, - LoanRepositoryWrapper loanRepositoryWrapper, CodeValueRepositoryWrapper codeValueRepository, - CommandProcessingService commandProcessingService, CalendarInstanceRepository calendarInstanceRepository, - ConfigurationDomainService configurationDomainService, SavingsAccountRepositoryWrapper savingsAccountRepositoryWrapper, - AccountNumberFormatRepositoryWrapper accountNumberFormatRepository, AccountNumberGenerator accountNumberGenerator, - EntityDatatableChecksWritePlatformService entityDatatableChecksWritePlatformService, - BusinessEventNotifierService businessEventNotifierService, LoanOfficerService loanOfficerService + GroupRepositoryWrapper groupRepository, ClientRepositoryWrapper clientRepositoryWrapper, + OfficeRepositoryWrapper officeRepositoryWrapper, StaffRepositoryWrapper staffRepository, NoteRepository noteRepository, + GroupLevelRepository groupLevelRepository, GroupingTypesDataValidator fromApiJsonDeserializer, + LoanRepositoryWrapper loanRepositoryWrapper, CodeValueRepositoryWrapper codeValueRepository, + CommandProcessingService commandProcessingService, CalendarInstanceRepository calendarInstanceRepository, + ConfigurationDomainService configurationDomainService, SavingsAccountRepositoryWrapper savingsAccountRepositoryWrapper, + AccountNumberFormatRepositoryWrapper accountNumberFormatRepository, AccountNumberGenerator accountNumberGenerator, + EntityDatatableChecksWritePlatformService entityDatatableChecksWritePlatformService, + BusinessEventNotifierService businessEventNotifierService, LoanOfficerService loanOfficerService ) { return new GroupingTypesWritePlatformServiceJpaRepositoryImpl(context, groupRepository, clientRepositoryWrapper, @@ -112,11 +112,11 @@ public GroupLevelReadPlatformService groupLevelReadPlatformService(PlatformSecur @Bean @ConditionalOnMissingBean(GroupReadPlatformService.class) public GroupReadPlatformService groupReadPlatformService(JdbcTemplate jdbcTemplate, PlatformSecurityContext context, - OfficeReadPlatformService officeReadPlatformService, StaffReadService staffReadPlatformService, - CenterReadPlatformService centerReadPlatformService, CodeValueReadPlatformService codeValueReadPlatformService, - PaginationHelper paginationHelper, DatabaseSpecificSQLGenerator sqlGenerator, - PaginationParametersDataValidator paginationParametersDataValidator, ColumnValidator columnValidator, - ClientReadPlatformService clientReadPlatformService) { + OfficeReadPlatformService officeReadPlatformService, StaffReadService staffReadPlatformService, + CenterReadPlatformService centerReadPlatformService, CodeValueReadPlatformService codeValueReadPlatformService, + PaginationHelper paginationHelper, DatabaseSpecificSQLGenerator sqlGenerator, + PaginationParametersDataValidator paginationParametersDataValidator, ColumnValidator columnValidator, + ClientReadPlatformService clientReadPlatformService) { return new GroupReadPlatformServiceImpl(jdbcTemplate, context, officeReadPlatformService, staffReadPlatformService, centerReadPlatformService, codeValueReadPlatformService, paginationHelper, sqlGenerator, paginationParametersDataValidator, columnValidator, clientReadPlatformService); @@ -131,9 +131,9 @@ public GroupRolesReadPlatformService groupRolesReadPlatformService(JdbcTemplate @Bean @ConditionalOnMissingBean(GroupRolesWritePlatformService.class) public GroupRolesWritePlatformService groupRolesWritePlatformService(PlatformSecurityContext context, - GroupRepositoryWrapper groupRepository, GroupRolesDataValidator fromApiJsonDeserializer, - CodeValueRepositoryWrapper codeValueRepository, ClientRepositoryWrapper clientRepository, - GroupRoleRepositoryWrapper groupRoleRepository) { + GroupRepositoryWrapper groupRepository, GroupRolesDataValidator fromApiJsonDeserializer, + CodeValueRepositoryWrapper codeValueRepository, ClientRepositoryWrapper clientRepository, + GroupRoleRepositoryWrapper groupRoleRepository) { return new GroupRolesWritePlatformServiceJpaRepositoryImpl(context, groupRepository, fromApiJsonDeserializer, codeValueRepository, clientRepository, groupRoleRepository); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResourceSwagger.java index 49ff6740ce7..121518b35a2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/api/InterestRateChartsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,21 +19,25 @@ package org.apache.fineract.portfolio.interestratechart.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; import java.util.Set; final class InterestRateChartsApiResourceSwagger { - private InterestRateChartsApiResourceSwagger() {} + private InterestRateChartsApiResourceSwagger() { + } @Schema(description = "GetInterestRateChartsTemplateResponse") public static final class GetInterestRateChartsTemplateResponse { - private GetInterestRateChartsTemplateResponse() {} + private GetInterestRateChartsTemplateResponse() { + } static final class GetInterestRateChartsTemplatePeriodTypes { - private GetInterestRateChartsTemplatePeriodTypes() {} + private GetInterestRateChartsTemplatePeriodTypes() { + } @Schema(example = "0") public Integer id; @@ -49,11 +53,13 @@ private GetInterestRateChartsTemplatePeriodTypes() {} @Schema(description = "GetInterestRateChartsResponse") public static final class GetInterestRateChartsResponse { - private GetInterestRateChartsResponse() {} + private GetInterestRateChartsResponse() { + } static final class GetInterestRateChartsChartSlabs { - private GetInterestRateChartsChartSlabs() {} + private GetInterestRateChartsChartSlabs() { + } @Schema(example = "1") public Long id; @@ -67,7 +73,8 @@ private GetInterestRateChartsChartSlabs() {} static final class GetInterestRateChartsCurrency { - private GetInterestRateChartsCurrency() {} + private GetInterestRateChartsCurrency() { + } @Schema(example = "USD") public String code; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartCreateCommand.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartCreateCommand.java index a0a72c6168d..40a5a721d17 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartCreateCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartCreateCommand.java @@ -6,9 +6,9 @@ * 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 @@ -26,4 +26,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class InterestRateChartCreateCommand extends Command {} +public class InterestRateChartCreateCommand extends Command { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartDeleteCommand.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartDeleteCommand.java index 1486c0a6f84..0571ce98fc5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartDeleteCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartDeleteCommand.java @@ -6,9 +6,9 @@ * 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 @@ -26,4 +26,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class InterestRateChartDeleteCommand extends Command {} +public class InterestRateChartDeleteCommand extends Command { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartSlabsCreateCommand.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartSlabsCreateCommand.java index 5b3cdde0057..605930278b8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartSlabsCreateCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartSlabsCreateCommand.java @@ -6,9 +6,9 @@ * 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 @@ -26,4 +26,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class InterestRateChartSlabsCreateCommand extends Command {} +public class InterestRateChartSlabsCreateCommand extends Command { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartSlabsDeleteCommand.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartSlabsDeleteCommand.java index fb62d9f9c50..d1d9f1d576f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartSlabsDeleteCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartSlabsDeleteCommand.java @@ -6,9 +6,9 @@ * 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 @@ -26,4 +26,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class InterestRateChartSlabsDeleteCommand extends Command {} +public class InterestRateChartSlabsDeleteCommand extends Command { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartSlabsUpdateCommand.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartSlabsUpdateCommand.java index 5d4905b8684..5ef61ce0ed8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartSlabsUpdateCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartSlabsUpdateCommand.java @@ -6,9 +6,9 @@ * 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 @@ -26,4 +26,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class InterestRateChartSlabsUpdateCommand extends Command {} +public class InterestRateChartSlabsUpdateCommand extends Command { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartUpdateCommand.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartUpdateCommand.java index ceab67450b8..80b64f71a33 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartUpdateCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/command/InterestRateChartUpdateCommand.java @@ -6,9 +6,9 @@ * 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 @@ -26,4 +26,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class InterestRateChartUpdateCommand extends Command {} +public class InterestRateChartUpdateCommand extends Command { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestIncentiveDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestIncentiveDataValidator.java index ddeff959b7d..05e388668bc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestIncentiveDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestIncentiveDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -30,6 +30,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.util.ArrayList; @@ -39,6 +40,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -76,7 +78,8 @@ public void validateCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, INTERESTRATE_INCENTIVE_CREATE_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -121,7 +124,8 @@ public void validateUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, INTERESTRATE_INCENTIVE_UPDATE_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartCreateRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartCreateRequest.java index a28d768d581..b77578a60c6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartCreateRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartCreateRequest.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartCreateResponse.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartCreateResponse.java index 05f353039ab..8fef4f2fe47 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartCreateResponse.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartCreateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartDataValidator.java index cd30a0544ea..772d86f3a97 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -32,6 +32,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.time.LocalDate; import java.util.ArrayList; @@ -41,6 +42,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -68,7 +70,7 @@ public class InterestRateChartDataValidator { @Autowired public InterestRateChartDataValidator(final FromJsonHelper fromApiJsonHelper, - final InterestRateChartSlabDataValidator chartSlabDataValidator) { + final InterestRateChartSlabDataValidator chartSlabDataValidator) { this.fromApiJsonHelper = fromApiJsonHelper; this.chartSlabDataValidator = chartSlabDataValidator; } @@ -87,7 +89,8 @@ public void validateForCreate(final String json) { } public void validateForCreate(final String json, final DataValidatorBuilder baseDataValidator) { - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, INTERESTRATE_CHART_CREATE_REQUEST_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); @@ -140,7 +143,8 @@ public void validateUpdate(final String json) { } public void validateForUpdate(final String json, final DataValidatorBuilder baseDataValidator) { - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, INTERESTRATE_CHART_UPDATE_REQUEST_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartDeleteRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartDeleteRequest.java index 71d24d235e1..6518a4c8506 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartDeleteRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartDeleteRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,8 +20,10 @@ package org.apache.fineract.portfolio.interestratechart.data; import jakarta.validation.constraints.NotNull; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartDeleteResponse.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartDeleteResponse.java index 38f85f188df..fde39058c31 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartDeleteResponse.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartDeleteResponse.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabDataValidator.java index 0f8180b4920..3b31e07aa09 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -33,6 +33,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.util.ArrayList; @@ -42,6 +43,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -71,7 +73,7 @@ public class InterestRateChartSlabDataValidator { @Autowired public InterestRateChartSlabDataValidator(final FromJsonHelper fromApiJsonHelper, - final InterestIncentiveDataValidator interestIncentiveDataValidator) { + final InterestIncentiveDataValidator interestIncentiveDataValidator) { this.fromApiJsonHelper = fromApiJsonHelper; this.interestIncentiveDataValidator = interestIncentiveDataValidator; } @@ -81,7 +83,8 @@ public void validateCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, INTERESTRATE_CHART_SLAB_CREATE_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -102,7 +105,7 @@ public void validateCreate(final String json) { } public void validateChartSlabsCreate(final JsonElement element, final DataValidatorBuilder baseDataValidator, final Locale locale, - final Boolean isPrimaryGroupingByAmount) { + final Boolean isPrimaryGroupingByAmount) { if (this.fromApiJsonHelper.parameterExists(descriptionParamName, element)) { final String description = this.fromApiJsonHelper.extractStringNamed(descriptionParamName, element); @@ -170,7 +173,8 @@ public void validateUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, INTERESTRATE_CHART_SLAB_UPDATE_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -187,7 +191,7 @@ public void validateUpdate(final String json) { } public void validateChartSlabsUpdate(final JsonElement element, final DataValidatorBuilder baseDataValidator, final Locale locale, - final Boolean isPrimaryGroupingByAmount) { + final Boolean isPrimaryGroupingByAmount) { if (this.fromApiJsonHelper.parameterExists(descriptionParamName, element)) { final String description = this.fromApiJsonHelper.extractStringNamed(descriptionParamName, element); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsCreateRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsCreateRequest.java index 127959faa5a..8884e37d660 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsCreateRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsCreateRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,10 +20,12 @@ package org.apache.fineract.portfolio.interestratechart.data; import io.swagger.v3.oas.annotations.Hidden; + import java.io.Serial; import java.io.Serializable; import java.math.BigDecimal; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsCreateResponse.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsCreateResponse.java index 62c59bd3182..af21d5e78e0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsCreateResponse.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsCreateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsDeleteRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsDeleteRequest.java index e8f9e091efc..a729549a64d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsDeleteRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsDeleteRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,8 +20,10 @@ package org.apache.fineract.portfolio.interestratechart.data; import jakarta.validation.constraints.NotNull; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsDeleteResponse.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsDeleteResponse.java index b8f9da85ee7..200cb9333a0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsDeleteResponse.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsDeleteResponse.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsUpdateRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsUpdateRequest.java index c211c7e872d..ba63ab9e348 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsUpdateRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsUpdateRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,10 +20,12 @@ package org.apache.fineract.portfolio.interestratechart.data; import io.swagger.v3.oas.annotations.Hidden; + import java.io.Serial; import java.io.Serializable; import java.math.BigDecimal; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsUpdateResponse.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsUpdateResponse.java index 10ecaa4faa9..4378ca89b5b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsUpdateResponse.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartSlabsUpdateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartUpdateRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartUpdateRequest.java index 53b37587dca..b1ceb6c325f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartUpdateRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartUpdateRequest.java @@ -6,9 +6,9 @@ * 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 @@ -20,8 +20,10 @@ package org.apache.fineract.portfolio.interestratechart.data; import io.swagger.v3.oas.annotations.Hidden; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartUpdateResponse.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartUpdateResponse.java index 7ac93d63be1..498bea50c11 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartUpdateResponse.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/data/InterestRateChartUpdateResponse.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartCreateCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartCreateCommandHandler.java index 8555f12db51..8e02bb9a5d2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartCreateCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartCreateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartDeleteCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartDeleteCommandHandler.java index 530dc25064c..359c472c5dc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartDeleteCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartDeleteCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartSlabsCreateCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartSlabsCreateCommandHandler.java index 435ae43ecc8..1c786e7e22f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartSlabsCreateCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartSlabsCreateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartSlabsDeleteCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartSlabsDeleteCommandHandler.java index 9d1e29769b5..7ba74af66de 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartSlabsDeleteCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartSlabsDeleteCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartSlabsUpdateCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartSlabsUpdateCommandHandler.java index 3fb86de012d..1ea2a9359ef 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartSlabsUpdateCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartSlabsUpdateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartUpdateCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartUpdateCommandHandler.java index b9716a6aea0..ce8240eeb0b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartUpdateCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/handler/InterestRateChartUpdateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestIncentiveDropdownReadService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestIncentiveDropdownReadService.java index 69e67593020..08ef561c6a9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestIncentiveDropdownReadService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestIncentiveDropdownReadService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ package org.apache.fineract.portfolio.interestratechart.service; import java.util.Collection; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; public interface InterestIncentiveDropdownReadService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestIncentivesDropdownReadServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestIncentivesDropdownReadServiceImpl.java index 234f5de3fee..ca67cc66521 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestIncentivesDropdownReadServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestIncentivesDropdownReadServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ package org.apache.fineract.portfolio.interestratechart.service; import java.util.Collection; + import lombok.NoArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.common.domain.ConditionType; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestIncentivesEnumerations.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestIncentivesEnumerations.java index f6864d90e23..9d147bfcffa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestIncentivesEnumerations.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestIncentivesEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.interestratechart.incentive.InterestIncentiveAttributeName; import org.apache.fineract.portfolio.interestratechart.incentive.InterestIncentiveEntityType; @@ -42,23 +43,23 @@ public static EnumOptionData attributeName(final InterestIncentiveAttributeName switch (type) { case INVALID: - break; + break; case AGE: nameOptionData = new EnumOptionData(InterestIncentiveAttributeName.AGE.getValue().longValue(), InterestIncentiveAttributeName.AGE.getCode(), "age"); - break; + break; case GENDER: nameOptionData = new EnumOptionData(InterestIncentiveAttributeName.GENDER.getValue().longValue(), InterestIncentiveAttributeName.GENDER.getCode(), "Gender"); - break; + break; case CLIENT_TYPE: nameOptionData = new EnumOptionData(InterestIncentiveAttributeName.CLIENT_TYPE.getValue().longValue(), InterestIncentiveAttributeName.CLIENT_TYPE.getCode(), "Client Type"); - break; + break; case CLIENT_CLASSIFICATION: nameOptionData = new EnumOptionData(InterestIncentiveAttributeName.CLIENT_CLASSIFICATION.getValue().longValue(), InterestIncentiveAttributeName.CLIENT_CLASSIFICATION.getCode(), "Client Classification"); - break; + break; } return nameOptionData; @@ -84,15 +85,15 @@ public static EnumOptionData entityType(final InterestIncentiveEntityType type) switch (type) { case INVALID: - break; + break; case ACCOUNT: nameOptionData = new EnumOptionData(InterestIncentiveEntityType.ACCOUNT.getValue().longValue(), InterestIncentiveEntityType.ACCOUNT.getCode(), "account"); - break; + break; case CUSTOMER: nameOptionData = new EnumOptionData(InterestIncentiveEntityType.CUSTOMER.getValue().longValue(), InterestIncentiveEntityType.CUSTOMER.getCode(), "Customer"); - break; + break; } return nameOptionData; @@ -118,15 +119,15 @@ public static EnumOptionData incentiveType(final InterestIncentiveType type) { switch (type) { case INVALID: - break; + break; case FIXED: nameOptionData = new EnumOptionData(InterestIncentiveType.FIXED.getValue().longValue(), InterestIncentiveType.FIXED.getCode(), "Fixed"); - break; + break; case INCENTIVE: nameOptionData = new EnumOptionData(InterestIncentiveType.INCENTIVE.getValue().longValue(), InterestIncentiveType.INCENTIVE.getCode(), "Incentive"); - break; + break; } return nameOptionData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartDropdownReadService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartDropdownReadService.java index 54d2416d4bb..761c566bfc0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartDropdownReadService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartDropdownReadService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ package org.apache.fineract.portfolio.interestratechart.service; import java.util.Collection; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; public interface InterestRateChartDropdownReadService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartDropdownReadServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartDropdownReadServiceImpl.java index 8d582b0557f..8769f801fe7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartDropdownReadServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartDropdownReadServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ package org.apache.fineract.portfolio.interestratechart.service; import java.util.Collection; + import lombok.NoArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartEnumerations.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartEnumerations.java index fb6968e0d82..76977052c54 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartEnumerations.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.common.domain.PeriodFrequencyType; import org.slf4j.Logger; @@ -43,27 +44,27 @@ public static EnumOptionData periodType(final PeriodFrequencyType type) { switch (type) { case INVALID: - break; + break; case DAYS: optionData = new EnumOptionData(PeriodFrequencyType.DAYS.getValue().longValue(), PeriodFrequencyType.DAYS.getCode(), "Days"); - break; + break; case WEEKS: optionData = new EnumOptionData(PeriodFrequencyType.WEEKS.getValue().longValue(), PeriodFrequencyType.WEEKS.getCode(), "Weeks"); - break; + break; case MONTHS: optionData = new EnumOptionData(PeriodFrequencyType.MONTHS.getValue().longValue(), PeriodFrequencyType.MONTHS.getCode(), "Months"); - break; + break; case YEARS: optionData = new EnumOptionData(PeriodFrequencyType.YEARS.getValue().longValue(), PeriodFrequencyType.YEARS.getCode(), "Years"); - break; + break; case WHOLE_TERM: optionData = new EnumOptionData(PeriodFrequencyType.WHOLE_TERM.getValue().longValue(), PeriodFrequencyType.WHOLE_TERM.getCode(), "Whole Term"); - break; + break; } return optionData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartReadService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartReadService.java index 0b61eee3eed..d54181ccb8e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartReadService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartReadService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ package org.apache.fineract.portfolio.interestratechart.service; import java.util.Collection; + import org.apache.fineract.portfolio.interestratechart.data.InterestRateChartData; public interface InterestRateChartReadService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartReadServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartReadServiceImpl.java index faff7d80f95..df2095da618 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartReadServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartReadServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.codes.service.CodeValueReadPlatformService; @@ -105,7 +106,7 @@ public InterestRateChartData retrieveActiveChartWithTemplate(Long productId) { @Override public InterestRateChartData retrieveOneWithSlabs(Long chartId) { final String sql = "select " + chartExtractor.schema() + " where irc.id = ? order by ircd.id asc"; - Collection chartDatas = jdbcTemplate.query(sql, chartExtractor, new Object[] { chartId }); // NOSONAR + Collection chartDatas = jdbcTemplate.query(sql, chartExtractor, new Object[]{chartId}); // NOSONAR if (chartDatas == null || chartDatas.isEmpty()) { throw new InterestRateChartNotFoundException(chartId); } @@ -182,11 +183,11 @@ public InterestRateChartExtractor(DatabaseSpecificSQLGenerator sqlGenerator) { left join m_code_value code on \ """ + sqlGenerator.castChar("code.id") + """ - = iri.attribute_value \ - left join m_currency curr on ircd.currency_code= curr.code \ - left join m_deposit_product_interest_rate_chart dpirc on irc.id=dpirc.interest_rate_chart_id \ - left join m_savings_product sp on sp.id=dpirc.deposit_product_id \ - """; + = iri.attribute_value \ + left join m_currency curr on ircd.currency_code= curr.code \ + left join m_deposit_product_interest_rate_chart dpirc on irc.id=dpirc.interest_rate_chart_id \ + left join m_savings_product sp on sp.id=dpirc.deposit_product_id \ + """; } @Override @@ -280,9 +281,9 @@ private InterestRateChartSlabsMapper(DatabaseSpecificSQLGenerator sqlGenerator) left join m_code_value code on \ """ + sqlGenerator.castChar("code.id") + """ - = iri.attribute_value \ - left join m_currency curr on ircd.currency_code= curr.code \ - """; + = iri.attribute_value \ + left join m_currency curr on ircd.currency_code= curr.code \ + """; } @Override diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabsReadService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabsReadService.java index c21b5acfc8e..d5ba8183986 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabsReadService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabsReadService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ package org.apache.fineract.portfolio.interestratechart.service; import java.util.List; + import org.apache.fineract.portfolio.interestratechart.data.InterestRateChartSlabData; public interface InterestRateChartSlabsReadService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabsReadServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabsReadServiceImpl.java index 24c39ec975d..94a07fcc11f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabsReadServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabsReadServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.codes.service.CodeValueReadPlatformService; @@ -131,9 +132,9 @@ private InterestRateChartSlabsMapper(DatabaseSpecificSQLGenerator sqlGenerator) left join m_code_value code on \ """ + sqlGenerator.castChar("code.id") + """ - = iri.attribute_value \ - left join m_currency curr on ircd.currency_code= curr.code \ - """; + = iri.attribute_value \ + left join m_currency curr on ircd.currency_code= curr.code \ + """; } public String schema() { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabsWriteService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabsWriteService.java index 9e5f3ed18f2..c01315ff3e7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabsWriteService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabsWriteService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabsWriteServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabsWriteServiceImpl.java index 94c7b12d3bd..3b0a50d32cb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabsWriteServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartSlabsWriteServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.portfolio.interestratechart.data.InterestRateChartSlabsCreateRequest; import org.apache.fineract.portfolio.interestratechart.data.InterestRateChartSlabsCreateResponse; @@ -108,7 +109,7 @@ public InterestRateChartSlabsDeleteResponse deleteInterestRateChartSlab(Interest } private void assembleIncentives(List incentives, - InterestRateChartSlab interestRateChartSlab) { + InterestRateChartSlab interestRateChartSlab) { for (InterestRateChartSlabsCreateRequest.Incentive incentive : incentives) { final InterestIncentivesFields fields = InterestIncentivesFields.createNew(incentive.getEntityType(), incentive.getAttributeName(), incentive.getConditionType(), incentive.getAttributeValue(), incentive.getIncentiveType(), diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartWriteService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartWriteService.java index 3ed739eb7d2..1ba00c71b27 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartWriteService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartWriteService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartWriteServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartWriteServiceImpl.java index c9dbaf36d8c..7a53d61182a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartWriteServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/service/InterestRateChartWriteServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.Locale; + import lombok.RequiredArgsConstructor; import org.apache.fineract.portfolio.interestratechart.data.InterestRateChartCreateRequest; import org.apache.fineract.portfolio.interestratechart.data.InterestRateChartCreateResponse; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/starter/InterestRateChartConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/starter/InterestRateChartConfiguration.java index 0f7516fcc3f..a45a5db85c8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/starter/InterestRateChartConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/interestratechart/starter/InterestRateChartConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -56,14 +56,14 @@ public InterestIncentiveAssembler interestIncentiveAssembler(FromJsonHelper from @Bean @ConditionalOnMissingBean(InterestRateChartAssembler.class) public InterestRateChartAssembler interestRateChartAssembler(FromJsonHelper fromApiJsonHelper, - InterestRateChartRepositoryWrapper interestRateChartRepositoryWrapper, InterestRateChartSlabAssembler chartSlabAssembler) { + InterestRateChartRepositoryWrapper interestRateChartRepositoryWrapper, InterestRateChartSlabAssembler chartSlabAssembler) { return new InterestRateChartAssembler(fromApiJsonHelper, interestRateChartRepositoryWrapper, chartSlabAssembler); } @Bean @ConditionalOnMissingBean(InterestRateChartSlabAssembler.class) public InterestRateChartSlabAssembler interestRateChartSlabAssembler(FromJsonHelper fromApiJsonHelper, - InterestRateChartRepositoryWrapper interestRateChartRepositoryWrapper, InterestIncentiveAssembler incentiveAssembler) { + InterestRateChartRepositoryWrapper interestRateChartRepositoryWrapper, InterestIncentiveAssembler incentiveAssembler) { return new InterestRateChartSlabAssembler(fromApiJsonHelper, interestRateChartRepositoryWrapper, incentiveAssembler); } @@ -96,10 +96,10 @@ public InterestRateChartReadServiceImpl.InterestRateChartExtractor interestRateC @Bean @ConditionalOnMissingBean(InterestRateChartReadService.class) public InterestRateChartReadService interestRateChartReadService(JdbcTemplate jdbcTemplate, - InterestRateChartReadServiceImpl.InterestRateChartExtractor chartExtractor, - InterestRateChartDropdownReadService chartDropdownReadPlatformService, - InterestIncentiveDropdownReadService interestIncentiveDropdownReadService, - CodeValueReadPlatformService codeValueReadPlatformService) { + InterestRateChartReadServiceImpl.InterestRateChartExtractor chartExtractor, + InterestRateChartDropdownReadService chartDropdownReadPlatformService, + InterestIncentiveDropdownReadService interestIncentiveDropdownReadService, + CodeValueReadPlatformService codeValueReadPlatformService) { return new InterestRateChartReadServiceImpl(jdbcTemplate, chartExtractor, chartDropdownReadPlatformService, interestIncentiveDropdownReadService, codeValueReadPlatformService); } @@ -113,10 +113,10 @@ public InterestRateChartSlabsReadServiceImpl.InterestRateChartSlabExtractor inte @Bean @ConditionalOnMissingBean(InterestRateChartSlabsReadService.class) public InterestRateChartSlabsReadService interestRateChartSlabReadService(JdbcTemplate jdbcTemplate, - InterestRateChartSlabsReadServiceImpl.InterestRateChartSlabExtractor chartSlabExtractor, - InterestRateChartDropdownReadService chartDropdownReadPlatformService, - InterestIncentiveDropdownReadService interestIncentiveDropdownReadService, - CodeValueReadPlatformService codeValueReadPlatformService) { + InterestRateChartSlabsReadServiceImpl.InterestRateChartSlabExtractor chartSlabExtractor, + InterestRateChartDropdownReadService chartDropdownReadPlatformService, + InterestIncentiveDropdownReadService interestIncentiveDropdownReadService, + CodeValueReadPlatformService codeValueReadPlatformService) { return new InterestRateChartSlabsReadServiceImpl(jdbcTemplate, chartSlabExtractor, chartDropdownReadPlatformService, interestIncentiveDropdownReadService, codeValueReadPlatformService); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanDisbursementDetailApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanDisbursementDetailApiResourceSwagger.java index 6b49d4dafff..dde86258151 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanDisbursementDetailApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoanDisbursementDetailApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,17 +19,20 @@ package org.apache.fineract.portfolio.loanaccount.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.math.BigDecimal; import java.util.List; public final class LoanDisbursementDetailApiResourceSwagger { - private LoanDisbursementDetailApiResourceSwagger() {} + private LoanDisbursementDetailApiResourceSwagger() { + } @Schema(description = "PostAddAndDeleteDisbursementDetailRequest") public static final class PostAddAndDeleteDisbursementDetailRequest { - private PostAddAndDeleteDisbursementDetailRequest() {} + private PostAddAndDeleteDisbursementDetailRequest() { + } @Schema(example = "dd MMMM yyyy") public String dateFormat; @@ -44,7 +47,8 @@ private PostAddAndDeleteDisbursementDetailRequest() {} public static final class DisbursementDetail { - private DisbursementDetail() {} + private DisbursementDetail() { + } @Schema(example = "1") public Long id; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResourceSwagger.java index 723a9b25c0c..f283b34e4b5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,11 +19,13 @@ package org.apache.fineract.portfolio.loanaccount.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.data.StringEnumOptionData; import org.apache.fineract.portfolio.delinquency.data.DelinquencyRangeData; @@ -33,12 +35,14 @@ */ final class LoansApiResourceSwagger { - private LoansApiResourceSwagger() {} + private LoansApiResourceSwagger() { + } @Schema(description = "GetLoansApprovalTemplateResponse") public static final class GetLoansApprovalTemplateResponse { - private GetLoansApprovalTemplateResponse() {} + private GetLoansApprovalTemplateResponse() { + } @Schema(example = "[2012, 4, 3]") public LocalDate approvalDate; @@ -52,7 +56,8 @@ private GetLoansApprovalTemplateResponse() {} public static final class GetLoanCurrency { - private GetLoanCurrency() {} + private GetLoanCurrency() { + } @Schema(example = "UGX") public String code; @@ -71,11 +76,13 @@ private GetLoanCurrency() {} @Schema(description = "GetLoansTemplateResponse") public static final class GetLoansTemplateResponse { - private GetLoansTemplateResponse() {} + private GetLoansTemplateResponse() { + } static final class GetLoansTemplateTimeline { - private GetLoansTemplateTimeline() {} + private GetLoansTemplateTimeline() { + } @Schema(example = "[2013, 3, 8]") public LocalDate expectedDisbursementDate; @@ -83,7 +90,8 @@ private GetLoansTemplateTimeline() {} static final class GetLoansTemplateProductOptions { - private GetLoansTemplateProductOptions() {} + private GetLoansTemplateProductOptions() { + } @Schema(example = "1") public Long id; @@ -104,11 +112,13 @@ private GetLoansTemplateProductOptions() {} @Schema(description = "GetLoansLoanIdResponse") public static final class GetLoansLoanIdResponse { - private GetLoansLoanIdResponse() {} + private GetLoansLoanIdResponse() { + } static final class GetLoansLoanIdStatus { - private GetLoansLoanIdStatus() {} + private GetLoansLoanIdStatus() { + } @Schema(example = "300") public Long id; @@ -136,7 +146,8 @@ private GetLoansLoanIdStatus() {} static final class GetLoansLoanIdLoanType { - private GetLoansLoanIdLoanType() {} + private GetLoansLoanIdLoanType() { + } @Schema(example = "1") public Long id; @@ -148,7 +159,8 @@ private GetLoansLoanIdLoanType() {} static final class GetLoansLoanIdCurrency { - private GetLoansLoanIdCurrency() {} + private GetLoansLoanIdCurrency() { + } @Schema(example = "UGX") public String code; @@ -166,7 +178,8 @@ private GetLoansLoanIdCurrency() {} static final class GetLoansLoanIdTermPeriodFrequencyType { - private GetLoansLoanIdTermPeriodFrequencyType() {} + private GetLoansLoanIdTermPeriodFrequencyType() { + } @Schema(example = "2") public Long id; @@ -178,7 +191,8 @@ private GetLoansLoanIdTermPeriodFrequencyType() {} static final class GetLoansLoanIdRepaymentFrequencyType { - private GetLoansLoanIdRepaymentFrequencyType() {} + private GetLoansLoanIdRepaymentFrequencyType() { + } @Schema(example = "2") public Long id; @@ -190,7 +204,8 @@ private GetLoansLoanIdRepaymentFrequencyType() {} static final class GetLoansLoanIdInterestRateFrequencyType { - private GetLoansLoanIdInterestRateFrequencyType() {} + private GetLoansLoanIdInterestRateFrequencyType() { + } @Schema(example = "3") public Long id; @@ -202,7 +217,8 @@ private GetLoansLoanIdInterestRateFrequencyType() {} static final class GetLoansLoanIdAmortizationType { - private GetLoansLoanIdAmortizationType() {} + private GetLoansLoanIdAmortizationType() { + } @Schema(example = "1") public Long id; @@ -214,7 +230,8 @@ private GetLoansLoanIdAmortizationType() {} static final class GetLoansLoanIdInterestType { - private GetLoansLoanIdInterestType() {} + private GetLoansLoanIdInterestType() { + } @Schema(example = "1") public Long id; @@ -226,7 +243,8 @@ private GetLoansLoanIdInterestType() {} static final class GetLoansLoanIdInterestCalculationPeriodType { - private GetLoansLoanIdInterestCalculationPeriodType() {} + private GetLoansLoanIdInterestCalculationPeriodType() { + } @Schema(example = "1") public Long id; @@ -238,7 +256,8 @@ private GetLoansLoanIdInterestCalculationPeriodType() {} static final class GetLoansLoanIdTimeline { - private GetLoansLoanIdTimeline() {} + private GetLoansLoanIdTimeline() { + } @Schema(example = "[2012, 4, 3]") public LocalDate submittedOnDate; @@ -284,7 +303,8 @@ private GetLoansLoanIdTimeline() {} static final class GetLoansLoanIdRepaymentSchedule { - private GetLoansLoanIdRepaymentSchedule() {} + private GetLoansLoanIdRepaymentSchedule() { + } public GetLoansLoanIdCurrency currency; @Schema(example = "30") @@ -318,7 +338,8 @@ private GetLoansLoanIdRepaymentSchedule() {} static final class GetLoansLoanIdRepaymentPeriod { - private GetLoansLoanIdRepaymentPeriod() {} + private GetLoansLoanIdRepaymentPeriod() { + } @Schema(example = "1") public Integer period; @@ -404,7 +425,8 @@ private GetLoansLoanIdRepaymentPeriod() {} static final class GetLoansLoanIdDisbursementDetails { - private GetLoansLoanIdDisbursementDetails() {} + private GetLoansLoanIdDisbursementDetails() { + } @Schema(example = "71") public Long id; @@ -432,11 +454,13 @@ private GetLoansLoanIdDisbursementDetails() {} static final class GetLoansLoanIdSummary { - private GetLoansLoanIdSummary() {} + private GetLoansLoanIdSummary() { + } static final class GetLoansLoanIdLinkedAccount { - private GetLoansLoanIdLinkedAccount() {} + private GetLoansLoanIdLinkedAccount() { + } @Schema(example = "1") public Long id; @@ -446,11 +470,13 @@ private GetLoansLoanIdLinkedAccount() {} static final class GetLoansLoanIdOverdueCharges { - private GetLoansLoanIdOverdueCharges() {} + private GetLoansLoanIdOverdueCharges() { + } static final class GetLoansLoanIdChargeTimeType { - private GetLoansLoanIdChargeTimeType() {} + private GetLoansLoanIdChargeTimeType() { + } @Schema(example = "9") public Long id; @@ -462,7 +488,8 @@ private GetLoansLoanIdChargeTimeType() {} static final class GetLoansLoanIdChargeCalculationType { - private GetLoansLoanIdChargeCalculationType() {} + private GetLoansLoanIdChargeCalculationType() { + } @Schema(example = "2") public Long id; @@ -474,7 +501,8 @@ private GetLoansLoanIdChargeCalculationType() {} static final class GetLoansLoanIdChargePaymentMode { - private GetLoansLoanIdChargePaymentMode() {} + private GetLoansLoanIdChargePaymentMode() { + } @Schema(example = "0") public Long id; @@ -486,7 +514,8 @@ private GetLoansLoanIdChargePaymentMode() {} static final class GetLoansLoanIdFeeFrequency { - private GetLoansLoanIdFeeFrequency() {} + private GetLoansLoanIdFeeFrequency() { + } @Schema(example = "1") public Long id; @@ -658,7 +687,8 @@ private GetLoansLoanIdFeeFrequency() {} static final class GetLoansLoanIdPaymentType { - private GetLoansLoanIdPaymentType() {} + private GetLoansLoanIdPaymentType() { + } @Schema(example = "11") public Long id; @@ -674,11 +704,13 @@ private GetLoansLoanIdPaymentType() {} static final class GetLoansLoanIdTransactions { - private GetLoansLoanIdTransactions() {} + private GetLoansLoanIdTransactions() { + } static final class GetLoansLoanIdLoanTransactionEnumData { - private GetLoansLoanIdLoanTransactionEnumData() {} + private GetLoansLoanIdLoanTransactionEnumData() { + } @Schema(example = "1") public Long id; @@ -751,7 +783,8 @@ private GetLoansLoanIdLoanTransactionEnumData() {} static final class GetLoansLoanIdPaymentDetailData { - private GetLoansLoanIdPaymentDetailData() {} + private GetLoansLoanIdPaymentDetailData() { + } @Schema(example = "62") public Long id; @@ -770,7 +803,8 @@ private GetLoansLoanIdPaymentDetailData() {} static final class GetLoansLoanIdLoanChargePaidByData { - private GetLoansLoanIdLoanChargePaidByData() {} + private GetLoansLoanIdLoanChargePaidByData() { + } @Schema(example = "11") public Long id; @@ -788,7 +822,8 @@ private GetLoansLoanIdLoanChargePaidByData() {} static final class GetLoansLoanIdCodeValueData { - private GetLoansLoanIdCodeValueData() {} + private GetLoansLoanIdCodeValueData() { + } @Schema(example = "1") public Long id; @@ -806,7 +841,8 @@ private GetLoansLoanIdCodeValueData() {} static final class GetLoansLoanIdLoanRepaymentScheduleInstallmentData { - private GetLoansLoanIdLoanRepaymentScheduleInstallmentData() {} + private GetLoansLoanIdLoanRepaymentScheduleInstallmentData() { + } @Schema(example = "1") public Long id; @@ -820,7 +856,8 @@ private GetLoansLoanIdLoanRepaymentScheduleInstallmentData() {} static final class GetLoansLoanIdLoanTransactionRelation { - private GetLoansLoanIdLoanTransactionRelation() {} + private GetLoansLoanIdLoanTransactionRelation() { + } @Schema(example = "1") public Long fromLoanTransaction; @@ -922,11 +959,13 @@ private GetLoansLoanIdLoanTransactionRelation() {} static final class GetLoansLoanIdLoanChargeData { - private GetLoansLoanIdLoanChargeData() {} + private GetLoansLoanIdLoanChargeData() { + } static final class GetLoansLoanIdEnumOptionData { - private GetLoansLoanIdEnumOptionData() {} + private GetLoansLoanIdEnumOptionData() { + } @Schema(example = "2") public Long id; @@ -938,7 +977,8 @@ private GetLoansLoanIdEnumOptionData() {} static final class GetLoansLoanIdLoanInstallmentChargeData { - private GetLoansLoanIdLoanInstallmentChargeData() {} + private GetLoansLoanIdLoanInstallmentChargeData() { + } @Schema(example = "2") public Integer installmentNumber; @@ -1018,7 +1058,8 @@ private GetLoansLoanIdLoanInstallmentChargeData() {} static final class GetLoansLoanIdDelinquencySummary { - private GetLoansLoanIdDelinquencySummary() {} + private GetLoansLoanIdDelinquencySummary() { + } @Schema(example = "100.000000") public BigDecimal availableDisbursementAmount; @@ -1079,7 +1120,8 @@ static final class GetLoansLoanIdDelinquencyPausePeriod { static final class GetLoansLoanIdLoanInstallmentLevelDelinquency { - private GetLoansLoanIdLoanInstallmentLevelDelinquency() {} + private GetLoansLoanIdLoanInstallmentLevelDelinquency() { + } @Schema(example = "112") public Long rangeId; @@ -1100,11 +1142,13 @@ private GetLoansLoanIdLoanInstallmentLevelDelinquency() {} static final class GetLoansLoanIdLoanTermVariations { - private GetLoansLoanIdLoanTermVariations() {} + private GetLoansLoanIdLoanTermVariations() { + } static final class GetLoansLoanIdLoanTermEnumData { - private GetLoansLoanIdLoanTermEnumData() {} + private GetLoansLoanIdLoanTermEnumData() { + } @Schema(example = "1") public Long id; @@ -1133,7 +1177,8 @@ private GetLoansLoanIdLoanTermEnumData() {} @Schema(description = "Originator data associated with the loan") static final class GetLoansLoanIdOriginatorData { - private GetLoansLoanIdOriginatorData() {} + private GetLoansLoanIdOriginatorData() { + } @Schema(example = "1") public Long id; @@ -1295,7 +1340,8 @@ private GetLoansLoanIdOriginatorData() {} @Schema(description = "GetLoansResponse") public static final class GetLoansResponse { - private GetLoansResponse() {} + private GetLoansResponse() { + } @Schema(example = "1") public Integer totalFilteredRecords; @@ -1307,7 +1353,8 @@ public static final class PostLoansRequest { static final class PostLoansDisbursementData { - private PostLoansDisbursementData() {} + private PostLoansDisbursementData() { + } @Schema(example = "1 November 2023") public String expectedDisbursementDate; @@ -1317,7 +1364,8 @@ private PostLoansDisbursementData() {} static final class PostLoansDataTable { - private PostLoansDataTable() {} + private PostLoansDataTable() { + } @Schema(example = "m_loan") public String registeredTableName; @@ -1325,7 +1373,8 @@ private PostLoansDataTable() {} public Map data; } - private PostLoansRequest() {} + private PostLoansRequest() { + } @Schema(example = "1") public Long clientId; @@ -1421,7 +1470,7 @@ private PostLoansRequest() {} public String buyDownFeeCalculationType; @Schema(example = "EQUAL_AMORTIZATION", allowableValues = "EQUAL_AMORTIZATION") public String buyDownFeeStrategy; - @Schema(example = "FEE", allowableValues = { "FEE", "INTEREST" }) + @Schema(example = "FEE", allowableValues = {"FEE", "INTEREST"}) public String buyDownFeeIncomeType; @Schema(example = "List of PostLoansDataTable") public List datatables; @@ -1437,7 +1486,8 @@ private PostLoansRequest() {} static final class PostLoansRequestChargeData { - private PostLoansRequestChargeData() {} + private PostLoansRequestChargeData() { + } @Schema(example = "1") public Long chargeId; @@ -1449,7 +1499,8 @@ private PostLoansRequestChargeData() {} @Schema(description = "Originator data for loan creation request") public static final class PostLoansOriginatorData { - private PostLoansOriginatorData() {} + private PostLoansOriginatorData() { + } @Schema(description = "Originator internal ID (use this OR externalId, not both)", example = "1") public Long id; @@ -1471,11 +1522,13 @@ private PostLoansOriginatorData() {} @Schema(description = "PostLoansResponse") public static final class PostLoansResponse { - private PostLoansResponse() {} + private PostLoansResponse() { + } static final class PostLoansRepaymentSchedulePeriods { - private PostLoansRepaymentSchedulePeriods() {} + private PostLoansRepaymentSchedulePeriods() { + } @Schema(example = "0") public Integer period; @@ -1542,7 +1595,8 @@ private PostLoansRepaymentSchedulePeriods() {} @Schema(description = "PutLoansLoanIdRequest") public static final class PutLoansLoanIdRequest { - private PutLoansLoanIdRequest() {} + private PutLoansLoanIdRequest() { + } @Schema(example = "en") public String locale; @@ -1630,7 +1684,8 @@ private PutLoansLoanIdRequest() {} static final class PutLoansLoanIdChargeData { - private PutLoansLoanIdChargeData() {} + private PutLoansLoanIdChargeData() { + } @Schema(example = "dd MMMM yyyy") public String dateFormat; @@ -1654,7 +1709,8 @@ private PutLoansLoanIdChargeData() {} static final class PutLoansLoanIdCollateral { - private PutLoansLoanIdCollateral() {} + private PutLoansLoanIdCollateral() { + } @Schema(example = "1") public Long clientCollateralId; @@ -1664,7 +1720,8 @@ private PutLoansLoanIdCollateral() {} static final class PutLoansLoanIdDisbursementData { - private PutLoansLoanIdDisbursementData() {} + private PutLoansLoanIdDisbursementData() { + } @Schema(example = "dd MMMM yyyy") public String dateFormat; @@ -1686,11 +1743,13 @@ private PutLoansLoanIdDisbursementData() {} @Schema(description = "PutLoansLoanIdResponse") public static final class PutLoansLoanIdResponse { - private PutLoansLoanIdResponse() {} + private PutLoansLoanIdResponse() { + } static final class PutLoansLoanIdChanges { - private PutLoansLoanIdChanges() {} + private PutLoansLoanIdChanges() { + } @Schema(example = "5000") public Long principal; @@ -1716,7 +1775,8 @@ private PutLoansLoanIdChanges() {} @Schema(description = "DeleteLoansLoanIdResponse") public static final class DeleteLoansLoanIdResponse { - private DeleteLoansLoanIdResponse() {} + private DeleteLoansLoanIdResponse() { + } @Schema(example = "1") public Long officeId; @@ -1733,11 +1793,13 @@ private DeleteLoansLoanIdResponse() {} @Schema(description = "PostLoansLoanIdRequest") public static final class PostLoansLoanIdRequest { - private PostLoansLoanIdRequest() {} + private PostLoansLoanIdRequest() { + } static final class PostLoansLoanIdDisbursementData { - private PostLoansLoanIdDisbursementData() {} + private PostLoansLoanIdDisbursementData() { + } @Schema(example = "[2012, 4, 3]") public LocalDate expectedDisbursementDate; @@ -1789,11 +1851,13 @@ private PostLoansLoanIdDisbursementData() {} @Schema(description = "PostLoansLoanIdResponse") public static final class PostLoansLoanIdResponse { - private PostLoansLoanIdResponse() {} + private PostLoansLoanIdResponse() { + } static final class PostLoansLoanIdStatus { - private PostLoansLoanIdStatus() {} + private PostLoansLoanIdStatus() { + } @Schema(example = "300") public Long id; @@ -1821,7 +1885,8 @@ private PostLoansLoanIdStatus() {} static final class PostLoansLoanIdChanges { - private PostLoansLoanIdChanges() {} + private PostLoansLoanIdChanges() { + } @Schema(example = "en") public String locale; @@ -1856,7 +1921,8 @@ private PostLoansLoanIdChanges() {} @Schema(description = "PutLoansApprovedAmountRequest") public static final class PutLoansApprovedAmountRequest { - private PutLoansApprovedAmountRequest() {} + private PutLoansApprovedAmountRequest() { + } @Schema(example = "1000") public BigDecimal amount; @@ -1867,11 +1933,13 @@ private PutLoansApprovedAmountRequest() {} @Schema(description = "PutLoansApprovedAmountResponse") public static final class PutLoansApprovedAmountResponse { - private PutLoansApprovedAmountResponse() {} + private PutLoansApprovedAmountResponse() { + } static final class PutLoansApprovedAmountChanges { - private PutLoansApprovedAmountChanges() {} + private PutLoansApprovedAmountChanges() { + } @Schema(example = "1000") public BigDecimal oldApprovedAmount; @@ -1899,7 +1967,8 @@ private PutLoansApprovedAmountChanges() {} @Schema(description = "PutLoansAvailableDisbursementAmountRequest") public static final class PutLoansAvailableDisbursementAmountRequest { - private PutLoansAvailableDisbursementAmountRequest() {} + private PutLoansAvailableDisbursementAmountRequest() { + } @Schema(example = "1000") public BigDecimal amount; @@ -1910,11 +1979,13 @@ private PutLoansAvailableDisbursementAmountRequest() {} @Schema(description = "PutLoansAvailableDisbursementAmountResponse") public static final class PutLoansAvailableDisbursementAmountResponse { - private PutLoansAvailableDisbursementAmountResponse() {} + private PutLoansAvailableDisbursementAmountResponse() { + } static final class PutLoansAvailableDisbursementAmountChanges { - private PutLoansAvailableDisbursementAmountChanges() {} + private PutLoansAvailableDisbursementAmountChanges() { + } @Schema(example = "1000") public BigDecimal oldApprovedAmount; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/LoansPointInTimeApi.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/LoansPointInTimeApi.java index 15107cc6db7..fae03dfdb00 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/LoansPointInTimeApi.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/LoansPointInTimeApi.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.api.pointintime; import java.util.List; + import org.apache.fineract.infrastructure.core.api.DateParam; import org.apache.fineract.portfolio.loanaccount.api.pointintime.data.RetrieveLoansPointInTimeExternalIdsRequest; import org.apache.fineract.portfolio.loanaccount.api.pointintime.data.RetrieveLoansPointInTimeRequest; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/LoansPointInTimeApiDelegate.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/LoansPointInTimeApiDelegate.java index 07cf5fa8bce..d2c8593317c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/LoansPointInTimeApiDelegate.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/LoansPointInTimeApiDelegate.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.DateParam; @@ -52,7 +53,7 @@ public LoanPointInTimeData retrieveLoanPointInTime(Long loanId, DateParam datePa @Override public LoanPointInTimeData retrieveLoanPointInTimeByExternalId(String loanExternalIdStr, DateParam dateParam, String dateFormat, - String locale) { + String locale) { context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS); ExternalId loanExternalId = ExternalIdFactory.produce(loanExternalIdStr); Long resolvedLoanId = loanReadPlatformService.getResolvedLoanId(loanExternalId); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/data/RetrieveLoansPointInTimeExternalIdsRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/data/RetrieveLoansPointInTimeExternalIdsRequest.java index 54d54c16ef5..e0c41bbfb57 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/data/RetrieveLoansPointInTimeExternalIdsRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/data/RetrieveLoansPointInTimeExternalIdsRequest.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.api.pointintime.data; import java.util.List; + import lombok.Data; import org.apache.fineract.infrastructure.core.api.DateParam; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/data/RetrieveLoansPointInTimeRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/data/RetrieveLoansPointInTimeRequest.java index 1586bec75a4..e8291ee479e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/data/RetrieveLoansPointInTimeRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/pointintime/data/RetrieveLoansPointInTimeRequest.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.api.pointintime.data; import java.util.List; + import lombok.Data; import org.apache.fineract.infrastructure.core.api.DateParam; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/request/ReAgePreviewRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/request/ReAgePreviewRequest.java index 1813f8782db..57990cf6096 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/request/ReAgePreviewRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/request/ReAgePreviewRequest.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; import jakarta.ws.rs.QueryParam; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/request/ReAmortizationPreviewRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/request/ReAmortizationPreviewRequest.java index c97577f9c4a..967b5f1341c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/request/ReAmortizationPreviewRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/request/ReAmortizationPreviewRequest.java @@ -6,9 +6,9 @@ * 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 @@ -21,8 +21,10 @@ import io.swagger.v3.oas.annotations.Parameter; import jakarta.validation.constraints.NotBlank; import jakarta.ws.rs.QueryParam; + import java.io.Serial; import java.io.Serializable; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccrualBalances.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccrualBalances.java index 52b9e7cb01f..55f2e3c8dcb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccrualBalances.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/AccrualBalances.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.math.BigDecimal; + import lombok.Getter; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/BulkTransferLoanOfficerData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/BulkTransferLoanOfficerData.java index 4dec555a5f2..9d93b57c31d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/BulkTransferLoanOfficerData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/BulkTransferLoanOfficerData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.Collection; + import org.apache.fineract.organisation.office.data.OfficeData; import org.apache.fineract.organisation.staff.data.StaffData; @@ -44,15 +45,15 @@ public final class BulkTransferLoanOfficerData { private final StaffAccountSummaryCollectionData accountSummaryCollection; public static BulkTransferLoanOfficerData templateForBulk(final Long officeId, final Long fromLoanOfficerId, - final LocalDate assignmentDate, final Collection officeOptions, final Collection loanOfficerOptions, - final StaffAccountSummaryCollectionData accountSummaryCollection) { + final LocalDate assignmentDate, final Collection officeOptions, final Collection loanOfficerOptions, + final StaffAccountSummaryCollectionData accountSummaryCollection) { return new BulkTransferLoanOfficerData(officeId, fromLoanOfficerId, assignmentDate, officeOptions, loanOfficerOptions, accountSummaryCollection); } private BulkTransferLoanOfficerData(final Long officeId, final Long fromLoanOfficerId, final LocalDate assignmentDate, - final Collection officeOptions, final Collection loanOfficerOptions, - final StaffAccountSummaryCollectionData accountSummaryCollection) { + final Collection officeOptions, final Collection loanOfficerOptions, + final StaffAccountSummaryCollectionData accountSummaryCollection) { this.officeId = officeId; this.fromLoanOfficerId = fromLoanOfficerId; this.assignmentDate = assignmentDate; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanFeeData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanFeeData.java index a54ea209a68..4664ef6a3f4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanFeeData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanFeeData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.math.BigDecimal; + import lombok.Data; import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.portfolio.loanaccount.domain.LoanSummary; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanInterestData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanInterestData.java index 1021cc5faa2..f77987422e7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanInterestData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanInterestData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.math.BigDecimal; + import lombok.Data; import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.portfolio.loanaccount.domain.LoanSummary; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanPenaltyData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanPenaltyData.java index 07261b7caa5..0751d22a450 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanPenaltyData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanPenaltyData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.math.BigDecimal; + import lombok.Data; import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.portfolio.loanaccount.domain.LoanSummary; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanPointInTimeData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanPointInTimeData.java index f615edbe115..c3918568e16 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanPointInTimeData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanPointInTimeData.java @@ -6,9 +6,9 @@ * 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 @@ -55,9 +55,9 @@ public class LoanPointInTimeData { // Arrears data private LoanArrearsData arrears; - @org.mapstruct.Mapper(config = MapstructMapperConfig.class, uses = { LoanStatusEnumData.Mapper.class, CurrencyMapper.class, + @org.mapstruct.Mapper(config = MapstructMapperConfig.class, uses = {LoanStatusEnumData.Mapper.class, CurrencyMapper.class, LoanPrincipalData.Mapper.class, LoanInterestData.Mapper.class, LoanFeeData.Mapper.class, LoanPenaltyData.Mapper.class, - LoanTotalAmountData.Mapper.class }) + LoanTotalAmountData.Mapper.class}) public interface Mapper { @Mapping(source = "accountNumber", target = "accountNo") diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanPrincipalData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanPrincipalData.java index fc1c3f6c53d..8a74d619921 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanPrincipalData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanPrincipalData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.math.BigDecimal; + import lombok.Data; import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.portfolio.loanaccount.domain.LoanSummary; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanSchedulePeriodDataWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanSchedulePeriodDataWrapper.java index 28d7f2f1f6e..230e55b0673 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanSchedulePeriodDataWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanSchedulePeriodDataWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.time.LocalDate; + import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTotalAmountData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTotalAmountData.java index 0e2b84388c2..1e7249d77ef 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTotalAmountData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/LoanTotalAmountData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.data; import java.math.BigDecimal; + import lombok.Data; import org.apache.fineract.infrastructure.core.config.MapstructMapperConfig; import org.apache.fineract.portfolio.loanaccount.domain.LoanSummary; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/StaffAccountSummaryCollectionData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/StaffAccountSummaryCollectionData.java index cfd6a85ff0a..c5623b1b779 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/StaffAccountSummaryCollectionData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/data/StaffAccountSummaryCollectionData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.List; + import org.apache.fineract.portfolio.accountdetails.data.LoanAccountSummaryData; /** diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainServiceJpa.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainServiceJpa.java index 0b7814337c4..f96380eb7b8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainServiceJpa.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainServiceJpa.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.domain; import jakarta.annotation.Nullable; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; @@ -27,6 +28,7 @@ import java.util.Map; import java.util.Objects; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -164,9 +166,9 @@ public class LoanAccountDomainServiceJpa implements LoanAccountDomainService { @Transactional @Override public LoanTransaction makeRepayment(final LoanTransactionType repaymentTransactionType, final Loan loan, - final LocalDate transactionDate, final BigDecimal transactionAmount, final PaymentDetail paymentDetail, final String noteText, - final ExternalId txnExternalId, final boolean isRecoveryRepayment, final String chargeRefundChargeType, - boolean isAccountTransfer, HolidayDetailDTO holidayDetailDto, Boolean isHolidayValidationDone) { + final LocalDate transactionDate, final BigDecimal transactionAmount, final PaymentDetail paymentDetail, final String noteText, + final ExternalId txnExternalId, final boolean isRecoveryRepayment, final String chargeRefundChargeType, + boolean isAccountTransfer, HolidayDetailDTO holidayDetailDto, Boolean isHolidayValidationDone) { return makeRepayment(repaymentTransactionType, loan, transactionDate, transactionAmount, paymentDetail, noteText, txnExternalId, isRecoveryRepayment, chargeRefundChargeType, isAccountTransfer, holidayDetailDto, isHolidayValidationDone, false); } @@ -206,7 +208,7 @@ private LoanTransaction createInterestRefundLoanTransaction(Loan loan, LoanTrans @Override public LoanTransaction createManualInterestRefundWithAmount(final Loan loan, final LoanTransaction targetTransaction, - final BigDecimal interestRefundAmount, final PaymentDetail paymentDetail, final ExternalId txnExternalId) { + final BigDecimal interestRefundAmount, final PaymentDetail paymentDetail, final ExternalId txnExternalId) { businessEventNotifierService.notifyPreBusinessEvent(new LoanTransactionInterestRefundPreBusinessEvent(loan)); return LoanTransaction.interestRefund(loan, interestRefundAmount, targetTransaction.getDateOf(), paymentDetail, txnExternalId); } @@ -214,9 +216,9 @@ public LoanTransaction createManualInterestRefundWithAmount(final Loan loan, fin @Transactional @Override public LoanTransaction makeRepayment(final LoanTransactionType repaymentTransactionType, Loan loan, final LocalDate transactionDate, - final BigDecimal transactionAmount, final PaymentDetail paymentDetail, final String noteText, final ExternalId txnExternalId, - final boolean isRecoveryRepayment, final String chargeRefundChargeType, boolean isAccountTransfer, - HolidayDetailDTO holidayDetailDto, Boolean isHolidayValidationDone, final boolean isLoanToLoanTransfer) { + final BigDecimal transactionAmount, final PaymentDetail paymentDetail, final String noteText, final ExternalId txnExternalId, + final boolean isRecoveryRepayment, final String chargeRefundChargeType, boolean isAccountTransfer, + HolidayDetailDTO holidayDetailDto, Boolean isHolidayValidationDone, final boolean isLoanToLoanTransfer) { checkClientOrGroupActive(loan); loanTransactionValidator.validateLoanNotClosedOrOverpaidForTransactions(loan, repaymentTransactionType); @@ -332,7 +334,7 @@ public LoanTransaction makeRepayment(final LoanTransactionType repaymentTransact } private LoanBusinessEvent getLoanRepaymentTypeBusinessEvent(LoanTransactionType repaymentTransactionType, boolean isRecoveryRepayment, - Loan loan) { + Loan loan) { LoanBusinessEvent repaymentEvent = null; if (repaymentTransactionType.isRepayment()) { repaymentEvent = new LoanTransactionMakeRepaymentPreBusinessEvent(loan); @@ -357,7 +359,7 @@ private LoanBusinessEvent getLoanRepaymentTypeBusinessEvent(LoanTransactionType } private LoanTransactionBusinessEvent getTransactionRepaymentTypeBusinessEvent(LoanTransactionType repaymentTransactionType, - boolean isRecoveryRepayment, LoanTransaction transaction) { + boolean isRecoveryRepayment, LoanTransaction transaction) { LoanTransactionBusinessEvent repaymentEvent = null; if (repaymentTransactionType.isRepayment()) { repaymentEvent = new LoanTransactionMakeRepaymentPostBusinessEvent(transaction); @@ -384,8 +386,8 @@ private LoanTransactionBusinessEvent getTransactionRepaymentTypeBusinessEvent(Lo @Override @Transactional public LoanTransaction makeChargePayment(final Loan loan, final Long chargeId, final LocalDate transactionDate, - final BigDecimal transactionAmount, final PaymentDetail paymentDetail, final String noteText, final ExternalId txnExternalId, - final Integer transactionType, Integer installmentNumber) { + final BigDecimal transactionAmount, final PaymentDetail paymentDetail, final String noteText, final ExternalId txnExternalId, + final Integer transactionType, Integer installmentNumber) { checkClientOrGroupActive(loan); if (loan.isChargedOff() && DateUtils.isBefore(transactionDate, loan.getChargedOffOnDate())) { throw new GeneralPlatformDomainRuleException("error.msg.transaction.date.cannot.be.earlier.than.charge.off.date", "Loan: " @@ -473,8 +475,8 @@ private void checkClientOrGroupActive(final Loan loan) { @Override public LoanTransaction makeRefund(final Long accountId, final CommandProcessingResultBuilder builderResult, - final LocalDate transactionDate, final BigDecimal transactionAmount, final PaymentDetail paymentDetail, final String noteText, - final ExternalId txnExternalId) { + final LocalDate transactionDate, final BigDecimal transactionAmount, final PaymentDetail paymentDetail, final String noteText, + final ExternalId txnExternalId) { final Loan loan = this.loanAccountAssembler.assembleFrom(accountId); checkClientOrGroupActive(loan); if (loan.isChargedOff() && DateUtils.isBefore(transactionDate, loan.getChargedOffOnDate())) { @@ -521,14 +523,14 @@ public LoanTransaction makeRefund(final Long accountId, final CommandProcessingR @Transactional @Override public LoanTransaction makeDisburseTransaction(final Long loanId, final LocalDate transactionDate, final BigDecimal transactionAmount, - final PaymentDetail paymentDetail, final String noteText, final ExternalId txnExternalId) { + final PaymentDetail paymentDetail, final String noteText, final ExternalId txnExternalId) { return makeDisburseTransaction(loanId, transactionDate, transactionAmount, paymentDetail, noteText, txnExternalId, false); } @Transactional @Override public LoanTransaction makeDisburseTransaction(final Long loanId, final LocalDate transactionDate, final BigDecimal transactionAmount, - final PaymentDetail paymentDetail, final String noteText, final ExternalId txnExternalId, final boolean isLoanToLoanTransfer) { + final PaymentDetail paymentDetail, final String noteText, final ExternalId txnExternalId, final boolean isLoanToLoanTransfer) { final Loan loan = this.loanAccountAssembler.assembleFrom(loanId); checkClientOrGroupActive(loan); if (loan.isChargedOff() && DateUtils.isBefore(transactionDate, loan.getChargedOffOnDate())) { @@ -606,7 +608,7 @@ public void setLoanDelinquencyTag(Loan loan, LocalDate transactionDate, List changes) { + Map changes) { if (loan.isChargedOff() && DateUtils.isBefore(foreClosureDate, loan.getChargedOffOnDate())) { throw new GeneralPlatformDomainRuleException("error.msg.transaction.date.cannot.be.earlier.than.charge.off.date", "Loan: " @@ -808,16 +810,16 @@ public void updateAndSaveLoanCollateralTransactionsForIndividualAccounts(Loan lo @Override public Pair makeRefund(final Loan loan, final ScheduleGeneratorDTO scheduleGeneratorDTO, - final LoanTransactionType loanTransactionType, final LocalDate transactionDate, final BigDecimal transactionAmount, - final PaymentDetail paymentDetail, final ExternalId txnExternalId, final Boolean interestRefundCalculationOverride) { + final LoanTransactionType loanTransactionType, final LocalDate transactionDate, final BigDecimal transactionAmount, + final PaymentDetail paymentDetail, final ExternalId txnExternalId, final Boolean interestRefundCalculationOverride) { // Pre-processing business event switch (loanTransactionType) { case MERCHANT_ISSUED_REFUND -> - businessEventNotifierService.notifyPreBusinessEvent(new LoanTransactionMerchantIssuedRefundPreBusinessEvent(loan)); + businessEventNotifierService.notifyPreBusinessEvent(new LoanTransactionMerchantIssuedRefundPreBusinessEvent(loan)); case PAYOUT_REFUND -> - businessEventNotifierService.notifyPreBusinessEvent(new LoanTransactionPayoutRefundPreBusinessEvent(loan)); + businessEventNotifierService.notifyPreBusinessEvent(new LoanTransactionPayoutRefundPreBusinessEvent(loan)); default -> - throw new UnsupportedOperationException(String.format("Not configured loan transaction type: %s!", loanTransactionType)); + throw new UnsupportedOperationException(String.format("Not configured loan transaction type: %s!", loanTransactionType)); } LoanTransaction refundTransaction = LoanTransaction.refund(loan, loanTransactionType, transactionAmount, paymentDetail, transactionDate, txnExternalId); @@ -883,9 +885,9 @@ public Pair makeRefund(final Loan loan, final case MERCHANT_ISSUED_REFUND -> businessEventNotifierService .notifyPostBusinessEvent(new LoanTransactionMerchantIssuedRefundPostBusinessEvent(refundTransaction)); case PAYOUT_REFUND -> - businessEventNotifierService.notifyPostBusinessEvent(new LoanTransactionPayoutRefundPostBusinessEvent(refundTransaction)); + businessEventNotifierService.notifyPostBusinessEvent(new LoanTransactionPayoutRefundPostBusinessEvent(refundTransaction)); default -> - throw new UnsupportedOperationException(String.format("Not configured loan transaction type: %s!", loanTransactionType)); + throw new UnsupportedOperationException(String.format("Not configured loan transaction type: %s!", loanTransactionType)); } if (interestRefundTransaction != null) { @@ -1003,7 +1005,7 @@ private void updateInstallmentsPostDate(final Loan loan, final LocalDate transac if ((chargePaidBy.getLoanCharge().isDueDateCharge() && DateUtils.isBefore(transactionDate, chargePaidBy.getLoanCharge().getDueLocalDate())) || (chargePaidBy.getLoanCharge().isInstalmentFee() && chargePaidBy.getInstallmentNumber() != null - && chargePaidBy.getInstallmentNumber() > installmentNumber)) { + && chargePaidBy.getInstallmentNumber() > installmentNumber)) { loanChargeValidator.validateRepaymentTypeTransactionNotBeforeAChargeRefund(loanTransaction.getLoan(), loanTransaction, "reversed"); loanTransaction.reverse(); @@ -1016,13 +1018,13 @@ private void updateInstallmentsPostDate(final Loan loan, final LocalDate transac @SuppressWarnings("null") private void makeRepayment(final Loan loan, final LoanTransaction repaymentTransaction, - final ScheduleGeneratorDTO scheduleGeneratorDTO) { + final ScheduleGeneratorDTO scheduleGeneratorDTO) { loanChargeValidator.validateRepaymentTypeTransactionNotBeforeAChargeRefund(loan, repaymentTransaction, "created"); loanDownPaymentHandlerService.handleRepaymentOrRecoveryOrWaiverTransaction(loan, repaymentTransaction, null, scheduleGeneratorDTO); } private void handleForeClosureTransactions(final Loan loan, final LoanTransaction repaymentTransaction, - final ScheduleGeneratorDTO scheduleGeneratorDTO) { + final ScheduleGeneratorDTO scheduleGeneratorDTO) { loan.setLoanSubStatus(LoanSubStatus.FORECLOSED); loanDownPaymentHandlerService.handleRepaymentOrRecoveryOrWaiverTransaction(loan, repaymentTransaction, null, scheduleGeneratorDTO); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainServiceJpaHelper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainServiceJpaHelper.java index ff1be8aaf1a..1c7b9746f8c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainServiceJpaHelper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanAccountDomainServiceJpaHelper.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.domain; import java.time.LocalDate; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.domain.BatchRequestContextHolder; @@ -41,7 +42,7 @@ public class LoanAccountDomainServiceJpaHelper { @Transactional(propagation = Propagation.REQUIRES_NEW, readOnly = true) public LocalDate calculateRecalculateTillDate(Loan loan, LocalDate transactionDate, ScheduleGeneratorDTO scheduleGeneratorDTOForPrepay, - Money repaymentAmount) { + Money repaymentAmount) { LocalDate recalculateTill = null; try { if (FineractRequestContextHolder.isBatchRequest() && BatchRequestContextHolder.isEnclosingTransaction()) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorData.java index 0aa9a33bdb8..ce217530cf0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorData.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.LocalDate; import java.util.Collection; import java.util.List; + import lombok.Getter; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.core.data.EnumOptionData; @@ -84,15 +85,15 @@ public class GuarantorData implements IGuarantor { private String locale; public static GuarantorData importInstance(Integer guarantorTypeId, Integer clientRelationshipTypeId, Long entityId, String firstname, - String lastname, String addressLine1, String addressLine2, String city, LocalDate dob, String zip, Integer savingsId, - BigDecimal amount, Integer rowIndex, Long accountId, String locale, String dateFormat) { + String lastname, String addressLine1, String addressLine2, String city, LocalDate dob, String zip, Integer savingsId, + BigDecimal amount, Integer rowIndex, Long accountId, String locale, String dateFormat) { return new GuarantorData(guarantorTypeId, clientRelationshipTypeId, entityId, firstname, lastname, addressLine1, addressLine2, city, dob, zip, savingsId, amount, rowIndex, accountId, locale, dateFormat); } private GuarantorData(Integer guarantorTypeId, Integer clientRelationshipTypeId, Long entityId, String firstname, String lastname, - String addressLine1, String addressLine2, String city, LocalDate dob, String zip, Integer savingsId, BigDecimal amount, - Integer rowIndex, Long accountId, String locale, String dateFormat) { + String addressLine1, String addressLine2, String city, LocalDate dob, String zip, Integer savingsId, BigDecimal amount, + Integer rowIndex, Long accountId, String locale, String dateFormat) { this.rowIndex = rowIndex; this.firstname = firstname; this.lastname = lastname; @@ -129,7 +130,7 @@ private GuarantorData(Integer guarantorTypeId, Integer clientRelationshipTypeId, } public static GuarantorData template(final List guarantorTypeOptions, - final Collection allowedClientRelationshipTypes, Collection accountLinkingOptions) { + final Collection allowedClientRelationshipTypes, Collection accountLinkingOptions) { final Collection guarantorFundingDetails = null; final boolean status = false; return new GuarantorData(null, null, null, null, GuarantorEnumerations.guarantorType(GuarantorType.CUSTOMER), null, null, null, @@ -138,7 +139,7 @@ public static GuarantorData template(final List guarantorTypeOpt } public static GuarantorData templateOnTop(final GuarantorData guarantorData, final List guarantorTypeOptions, - final Collection allowedClientRelationshipTypes, Collection accountLinkingOptions) { + final Collection allowedClientRelationshipTypes, Collection accountLinkingOptions) { return new GuarantorData(guarantorData.id, guarantorData.loanId, guarantorData.clientRelationshipType, guarantorData.entityId, guarantorData.guarantorType, guarantorData.firstname, guarantorData.lastname, guarantorData.dob, guarantorData.addressLine1, guarantorData.addressLine2, guarantorData.city, guarantorData.state, guarantorData.zip, guarantorData.country, @@ -163,12 +164,12 @@ public static GuarantorData mergeStaffData(final StaffData staffData, final Guar } public GuarantorData(final Long id, final Long loanId, final CodeValueData clientRelationshipType, final Long entityId, - final EnumOptionData guarantorType, final String firstname, final String lastname, final LocalDate dob, - final String addressLine1, final String addressLine2, final String city, final String state, final String zip, - final String country, final String mobileNumber, final String housePhoneNumber, final String comment, final String officeName, - final LocalDate joinedDate, final String externalId, final boolean status, - Collection guarantorFundingDetails, final List guarantorTypeOptions, - final Collection allowedClientRelationshipTypes, final Collection accountLinkingOptions) { + final EnumOptionData guarantorType, final String firstname, final String lastname, final LocalDate dob, + final String addressLine1, final String addressLine2, final String city, final String state, final String zip, + final String country, final String mobileNumber, final String housePhoneNumber, final String comment, final String officeName, + final LocalDate joinedDate, final String externalId, final boolean status, + Collection guarantorFundingDetails, final List guarantorTypeOptions, + final Collection allowedClientRelationshipTypes, final Collection accountLinkingOptions) { this.id = id; this.loanId = loanId; this.clientRelationshipType = clientRelationshipType; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorFundingData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorFundingData.java index 9d5b5cc8fc4..2751015bb83 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorFundingData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorFundingData.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.io.Serializable; import java.math.BigDecimal; import java.util.Collection; + import lombok.Getter; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.account.data.PortfolioAccountData; @@ -50,8 +51,8 @@ public final class GuarantorFundingData implements Serializable { private final Collection guarantorTransactions; private GuarantorFundingData(final Long id, final EnumOptionData status, final PortfolioAccountData savingsAccount, - final BigDecimal amount, final BigDecimal amountReleased, final BigDecimal amountRemaining, final BigDecimal amountTransfered, - final Collection guarantorTransactions) { + final BigDecimal amount, final BigDecimal amountReleased, final BigDecimal amountRemaining, final BigDecimal amountTransfered, + final Collection guarantorTransactions) { this.id = id; this.status = status; this.savingsAccount = savingsAccount; @@ -63,8 +64,8 @@ private GuarantorFundingData(final Long id, final EnumOptionData status, final P } public static GuarantorFundingData instance(final Long id, final EnumOptionData status, final PortfolioAccountData savingsAccount, - final BigDecimal amount, final BigDecimal amountReleased, final BigDecimal amountRemaining, final BigDecimal amountTransfered, - final Collection guarantorTransactions) { + final BigDecimal amount, final BigDecimal amountReleased, final BigDecimal amountRemaining, final BigDecimal amountTransfered, + final Collection guarantorTransactions) { return new GuarantorFundingData(id, status, savingsAccount, amount, amountReleased, amountRemaining, amountTransfered, guarantorTransactions); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorTransactionData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorTransactionData.java index 5e4ede0bfb6..26088b85952 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorTransactionData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorTransactionData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serial; import java.io.Serializable; + import lombok.Getter; import org.apache.fineract.portfolio.loanaccount.data.LoanTransactionData; import org.apache.fineract.portfolio.savings.data.DepositAccountOnHoldTransactionData; @@ -40,7 +41,7 @@ public final class GuarantorTransactionData implements Serializable { private final boolean reversed; private GuarantorTransactionData(final Long id, final DepositAccountOnHoldTransactionData onHoldTransactionData, - final LoanTransactionData loanTransactionData, final boolean reversed) { + final LoanTransactionData loanTransactionData, final boolean reversed) { this.id = id; this.onHoldTransactionData = onHoldTransactionData; @@ -49,7 +50,7 @@ private GuarantorTransactionData(final Long id, final DepositAccountOnHoldTransa } public static GuarantorTransactionData instance(final Long id, final DepositAccountOnHoldTransactionData onHoldTransactionData, - final LoanTransactionData loanTransactionData, final boolean reversed) { + final LoanTransactionData loanTransactionData, final boolean reversed) { return new GuarantorTransactionData(id, onHoldTransactionData, loanTransactionData, reversed); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorsRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorsRequest.java index e0498f22028..344247ec1be 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorsRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/data/GuarantorsRequest.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.math.BigDecimal; + import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/Guarantor.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/Guarantor.java index e7cd28325aa..93e66a4f3ef 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/Guarantor.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/Guarantor.java @@ -6,9 +6,9 @@ * 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 @@ -26,11 +26,13 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToMany; import jakarta.persistence.Table; + import java.time.LocalDate; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; + import lombok.Getter; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.codes.domain.CodeValue; @@ -109,10 +111,10 @@ protected Guarantor() { } private Guarantor(final Loan loan, final CodeValue clientRelationshipType, final Integer gurantorType, final Long entityId, - final String firstname, final String lastname, final LocalDate dateOfBirth, final String addressLine1, - final String addressLine2, final String city, final String state, final String country, final String zip, - final String housePhoneNumber, final String mobilePhoneNumber, final String comment, final boolean active, - final List guarantorFundDetails) { + final String firstname, final String lastname, final LocalDate dateOfBirth, final String addressLine1, + final String addressLine2, final String city, final String state, final String country, final String zip, + final String housePhoneNumber, final String mobilePhoneNumber, final String comment, final boolean active, + final List guarantorFundDetails) { this.loan = loan; this.clientRelationshipType = clientRelationshipType; this.gurantorType = gurantorType; @@ -134,7 +136,7 @@ private Guarantor(final Loan loan, final CodeValue clientRelationshipType, final } public static Guarantor fromJson(final Loan loan, final CodeValue clientRelationshipType, final JsonCommand command, - final List fundingDetails) { + final List fundingDetails) { final Integer gurantorType = command.integerValueSansLocaleOfParameterNamed(GuarantorJSONinputParams.GUARANTOR_TYPE_ID.getValue()); final Long entityId = command.longValueOfParameterNamed(GuarantorJSONinputParams.ENTITY_ID.getValue()); final boolean active = true; @@ -203,7 +205,7 @@ public boolean isExternalGuarantor() { } private void handlePropertyUpdate(final JsonCommand command, final Map actualChanges, final String paramName, - Integer propertyToBeUpdated, final boolean sansLocale) { + Integer propertyToBeUpdated, final boolean sansLocale) { if (command.isChangeInIntegerParameterNamed(paramName, propertyToBeUpdated)) { Integer newValue = null; if (sansLocale) { @@ -221,7 +223,7 @@ private void handlePropertyUpdate(final JsonCommand command, final Map actualChanges, final String paramName, - String propertyToBeUpdated) { + String propertyToBeUpdated) { if (command.isChangeInStringParameterNamed(paramName, propertyToBeUpdated)) { final String newValue = command.stringValueOfParameterNamed(paramName); actualChanges.put(paramName, newValue); @@ -254,7 +256,7 @@ private void handlePropertyUpdate(final JsonCommand command, final Map actualChanges, final String paramName, - LocalDate propertyToBeUpdated) { + LocalDate propertyToBeUpdated) { if (command.isChangeInDateParameterNamed(paramName, propertyToBeUpdated)) { final LocalDate newValue = command.localDateValueOfParameterNamed(paramName); actualChanges.put(paramName, newValue); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundingDetails.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundingDetails.java index 9b026091795..0de2b816f2d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundingDetails.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundingDetails.java @@ -6,9 +6,9 @@ * 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 @@ -26,9 +26,11 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToMany; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.portfolio.account.domain.AccountAssociations; import org.apache.fineract.portfolio.loanaccount.domain.Loan; @@ -64,7 +66,8 @@ public class GuarantorFundingDetails extends AbstractPersistableCustom { @OneToMany(cascade = CascadeType.ALL, mappedBy = "guarantorFundingDetails", orphanRemoval = true, fetch = FetchType.EAGER) private List guarantorFundingTransactions = new ArrayList<>(); - protected GuarantorFundingDetails() {} + protected GuarantorFundingDetails() { + } public GuarantorFundingDetails(final AccountAssociations accountAssociations, final Integer status, final BigDecimal amount) { this.accountAssociations = accountAssociations; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundingRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundingRepository.java index 911f2a2aa71..210847c570d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundingRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundingRepository.java @@ -6,9 +6,9 @@ * 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 @@ -22,4 +22,5 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor; public interface GuarantorFundingRepository - extends JpaRepository, JpaSpecificationExecutor {} + extends JpaRepository, JpaSpecificationExecutor { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundingTransaction.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundingTransaction.java index d46aaf17e04..49c99b0f4f9 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundingTransaction.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundingTransaction.java @@ -6,9 +6,9 @@ * 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 @@ -24,7 +24,9 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction; import org.apache.fineract.portfolio.savings.domain.DepositAccountOnHoldTransaction; @@ -48,10 +50,11 @@ public class GuarantorFundingTransaction extends AbstractPersistableCustom @Column(name = "is_reversed", nullable = false) private boolean reversed; - protected GuarantorFundingTransaction() {} + protected GuarantorFundingTransaction() { + } public GuarantorFundingTransaction(final GuarantorFundingDetails guarantorFundingDetails, final LoanTransaction loanTransaction, - final DepositAccountOnHoldTransaction depositAccountOnHoldTransaction) { + final DepositAccountOnHoldTransaction depositAccountOnHoldTransaction) { this.depositAccountOnHoldTransaction = depositAccountOnHoldTransaction; this.guarantorFundingDetails = guarantorFundingDetails; this.loanTransaction = loanTransaction; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundingTransactionRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundingTransactionRepository.java index 525ecf12903..b3f298772af 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundingTransactionRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorFundingTransactionRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.guarantor.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorRepository.java index ec965fff428..df01f6eebd0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/domain/GuarantorRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.guarantor.domain; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorDomainService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorDomainService.java index fede808c5b5..110a760dc5d 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorDomainService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorDomainService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.guarantor.service; import java.time.LocalDate; + import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.guarantor.domain.GuarantorFundingDetails; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorDomainServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorDomainServiceImpl.java index 82d532ad75b..c060aa48a11 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorDomainServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorDomainServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.guarantor.service; import jakarta.annotation.PostConstruct; + import java.math.BigDecimal; import java.time.LocalDate; import java.time.format.DateTimeFormatter; @@ -28,6 +29,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -482,8 +484,8 @@ private void completeGuarantorFund(final LoanTransaction loanTransaction) { } private BigDecimal calculateAndRelaseGuarantorFunds(List guarantorList, BigDecimal totalGuaranteeAmount, - BigDecimal amountForRelease, LoanTransaction loanTransaction, - final List accountOnHoldTransactions) { + BigDecimal amountForRelease, LoanTransaction loanTransaction, + final List accountOnHoldTransactions) { BigDecimal amountLeft = amountForRelease; for (GuarantorFundingDetails fundingDetails : guarantorList) { BigDecimal guarantorAmount = amountForRelease.multiply(fundingDetails.getAmountRemaining()).divide(totalGuaranteeAmount, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorReadPlatformService.java index 054d3bc4bc5..0fd3ec7c221 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.guarantor.service; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.guarantor.data.GuarantorData; import org.apache.fineract.portfolio.loanaccount.guarantor.data.ObligeeData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorReadPlatformServiceImpl.java index 19f88a56c84..5bc329d4d27 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; @@ -60,7 +61,7 @@ public class GuarantorReadPlatformServiceImpl implements GuarantorReadPlatformSe @Autowired public GuarantorReadPlatformServiceImpl(final JdbcTemplate jdbcTemplate, final ClientReadPlatformService clientReadPlatformService, - final StaffReadService staffReadPlatformService, final LoanRepositoryWrapper loanRepositoryWrapper) { + final StaffReadService staffReadPlatformService, final LoanRepositoryWrapper loanRepositoryWrapper) { this.jdbcTemplate = jdbcTemplate; this.clientReadPlatformService = clientReadPlatformService; this.staffReadPlatformService = staffReadPlatformService; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorWritePlatformServiceJpaRepositoryIImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorWritePlatformServiceJpaRepositoryIImpl.java index d15dcebc1b5..2c1a9e837b4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorWritePlatformServiceJpaRepositoryIImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/guarantor/service/GuarantorWritePlatformServiceJpaRepositoryIImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.Collection; import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.codes.domain.CodeValue; import org.apache.fineract.infrastructure.codes.domain.CodeValueRepositoryWrapper; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -82,11 +83,11 @@ public class GuarantorWritePlatformServiceJpaRepositoryIImpl implements Guaranto @Autowired public GuarantorWritePlatformServiceJpaRepositoryIImpl(final LoanRepositoryWrapper loanRepositoryWrapper, - final GuarantorRepository guarantorRepository, final ClientRepositoryWrapper clientRepositoryWrapper, - final StaffRepositoryWrapper staffRepositoryWrapper, final GroupRepositoryWrapper groupRepositoryWrapper, - final GuarantorCommandFromApiJsonDeserializer fromApiJsonDeserializer, - final CodeValueRepositoryWrapper codeValueRepositoryWrapper, final SavingsAccountAssembler savingsAccountAssembler, - final AccountAssociationsRepository accountAssociationsRepository, final GuarantorDomainService guarantorDomainService) { + final GuarantorRepository guarantorRepository, final ClientRepositoryWrapper clientRepositoryWrapper, + final StaffRepositoryWrapper staffRepositoryWrapper, final GroupRepositoryWrapper groupRepositoryWrapper, + final GuarantorCommandFromApiJsonDeserializer fromApiJsonDeserializer, + final CodeValueRepositoryWrapper codeValueRepositoryWrapper, final SavingsAccountAssembler savingsAccountAssembler, + final AccountAssociationsRepository accountAssociationsRepository, final GuarantorDomainService guarantorDomainService) { this.loanRepositoryWrapper = loanRepositoryWrapper; this.clientRepositoryWrapper = clientRepositoryWrapper; this.groupRepositoryWrapper = groupRepositoryWrapper; @@ -109,7 +110,7 @@ public CommandProcessingResult createGuarantor(final Long loanId, final JsonComm } private CommandProcessingResult createGuarantor(final Loan loan, final JsonCommand command, final GuarantorCommand guarantorCommand, - final Collection existGuarantorList) { + final Collection existGuarantorList) { try { guarantorCommand.validateForCreate(); validateLoanStatus(loan); @@ -196,7 +197,7 @@ private CommandProcessingResult createGuarantor(final Loan loan, final JsonComma } private void validateGuarantorSavingsAccountActivationDateWithLoanSubmittedOnDate(final Loan loan, - final SavingsAccount savingsAccount) { + final SavingsAccount savingsAccount) { if (DateUtils.isBefore(loan.getSubmittedOnDate(), savingsAccount.getActivationDate())) { throw new GeneralPlatformDomainRuleException( "error.msg.guarantor.saving.account.activation.date.is.on.or.before.loan.submitted.on.date", @@ -327,7 +328,7 @@ private CommandProcessingResult removeGuarantor(final Guarantor guarantorForDele } private void removeguarantorFundDetails(final Guarantor guarantorForDelete, final DataValidatorBuilder baseDataValidator, - GuarantorFundingDetails guarantorFundingDetails) { + GuarantorFundingDetails guarantorFundingDetails) { if (!guarantorFundingDetails.getStatus().isActive()) { baseDataValidator.failWithCodeNoParameterAddedToErrorCode(GuarantorConstants.GUARANTOR_NOT_ACTIVE_ERROR); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanInterestPaymentWaiverCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanInterestPaymentWaiverCommandHandler.java index df4a23042b4..af6e301506a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanInterestPaymentWaiverCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/LoanInterestPaymentWaiverCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/contracttermination/LoanContractTerminationCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/contracttermination/LoanContractTerminationCommandHandler.java index 312c8045631..4e45d57e293 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/contracttermination/LoanContractTerminationCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/contracttermination/LoanContractTerminationCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/contracttermination/UndoLoanContractTerminationCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/contracttermination/UndoLoanContractTerminationCommandHandler.java index ee244598ff9..3fd3b16d69e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/contracttermination/UndoLoanContractTerminationCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/contracttermination/UndoLoanContractTerminationCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/reaging/LoanReAgingCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/reaging/LoanReAgingCommandHandler.java index bb5398cd19d..0ddd7e66fc3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/reaging/LoanReAgingCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/reaging/LoanReAgingCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/reaging/LoanUndoReAgingCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/reaging/LoanUndoReAgingCommandHandler.java index 4187c546617..ddeff530980 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/reaging/LoanUndoReAgingCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/reaging/LoanUndoReAgingCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/reamortization/LoanReAmortizationCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/reamortization/LoanReAmortizationCommandHandler.java index 83b0ee6f9eb..446e036cd79 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/reamortization/LoanReAmortizationCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/reamortization/LoanReAmortizationCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/reamortization/LoanUndoReAmortizationCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/reamortization/LoanUndoReAmortizationCommandHandler.java index d9d94c7ac08..1a2e43e63a4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/reamortization/LoanUndoReAmortizationCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/handler/loan/reamortization/LoanUndoReAmortizationCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/accrualactivityposting/AccrualActivityPostingConfig.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/accrualactivityposting/AccrualActivityPostingConfig.java index fdb9ae16407..74d18cb1741 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/accrualactivityposting/AccrualActivityPostingConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/accrualactivityposting/AccrualActivityPostingConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/accrualactivityposting/AccrualActivityPostingTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/accrualactivityposting/AccrualActivityPostingTasklet.java index 8b721deedc9..7a57b512ea5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/accrualactivityposting/AccrualActivityPostingTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/accrualactivityposting/AccrualActivityPostingTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.service.DateUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addaccrualentries/AddAccrualEntriesConfig.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addaccrualentries/AddAccrualEntriesConfig.java index 50902ad8f32..7dbce565a1d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addaccrualentries/AddAccrualEntriesConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addaccrualentries/AddAccrualEntriesConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addaccrualentries/AddAccrualEntriesTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addaccrualentries/AddAccrualEntriesTasklet.java index ef4b06310bc..37ce6731916 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addaccrualentries/AddAccrualEntriesTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addaccrualentries/AddAccrualEntriesTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.jobs.addaccrualentries; import java.time.LocalDate; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.exception.MultiException; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addperiodicaccrualentriesforloanswithincomepostedastransactions/AddPeriodicAccrualEntriesForLoansConfig.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addperiodicaccrualentriesforloanswithincomepostedastransactions/AddPeriodicAccrualEntriesForLoansConfig.java index 27fb15cdf99..b5297014b5d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addperiodicaccrualentriesforloanswithincomepostedastransactions/AddPeriodicAccrualEntriesForLoansConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addperiodicaccrualentriesforloanswithincomepostedastransactions/AddPeriodicAccrualEntriesForLoansConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addperiodicaccrualentriesforloanswithincomepostedastransactions/AddPeriodicAccrualEntriesForLoansTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addperiodicaccrualentriesforloanswithincomepostedastransactions/AddPeriodicAccrualEntriesForLoansTasklet.java index 68d3e5d799d..7fc5540f4c1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addperiodicaccrualentriesforloanswithincomepostedastransactions/AddPeriodicAccrualEntriesForLoansTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/addperiodicaccrualentriesforloanswithincomepostedastransactions/AddPeriodicAccrualEntriesForLoansTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/applychargetooverdueloaninstallment/ApplyChargeToOverdueLoanInstallmentConfig.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/applychargetooverdueloaninstallment/ApplyChargeToOverdueLoanInstallmentConfig.java index 056a2b76042..b3618fe5b82 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/applychargetooverdueloaninstallment/ApplyChargeToOverdueLoanInstallmentConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/applychargetooverdueloaninstallment/ApplyChargeToOverdueLoanInstallmentConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/applychargetooverdueloaninstallment/ApplyChargeToOverdueLoanInstallmentTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/applychargetooverdueloaninstallment/ApplyChargeToOverdueLoanInstallmentTasklet.java index 0477ab170ee..951c93a312a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/applychargetooverdueloaninstallment/ApplyChargeToOverdueLoanInstallmentTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/applychargetooverdueloaninstallment/ApplyChargeToOverdueLoanInstallmentTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/applyholidaystoloans/ApplyHolidaysToLoansConfig.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/applyholidaystoloans/ApplyHolidaysToLoansConfig.java index fe8c357e9bc..964855ec2d8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/applyholidaystoloans/ApplyHolidaysToLoansConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/applyholidaystoloans/ApplyHolidaysToLoansConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/applyholidaystoloans/ApplyHolidaysToLoansTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/applyholidaystoloans/ApplyHolidaysToLoansTasklet.java index ee14d9ce43a..16a59b94a5c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/applyholidaystoloans/ApplyHolidaysToLoansTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/applyholidaystoloans/ApplyHolidaysToLoansTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.Collection; import java.util.List; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; @@ -201,7 +202,7 @@ private LocalDate getNextRepaymentDate(Loan loan, Holiday holiday) { } private LocalDate doStandardMonthlyCheck(LocalDate adjustedRescheduleToDate, LocalDate rescheduleToDate, - LoanRepaymentScheduleInstallment loanRepaymentScheduleInstallment) { + LoanRepaymentScheduleInstallment loanRepaymentScheduleInstallment) { // Standard Monthly Loan Holiday check LocalDate dueDate = loanRepaymentScheduleInstallment.getDueDate(); if (DateUtils.isAfter(rescheduleToDate, dueDate) && DateUtils.isBefore(rescheduleToDate, dueDate.plusDays(30))) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/generateloanlossprovisioning/GenerateLoanlossProvisioningConfig.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/generateloanlossprovisioning/GenerateLoanlossProvisioningConfig.java index 564549fceae..df0c77a9252 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/generateloanlossprovisioning/GenerateLoanlossProvisioningConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/generateloanlossprovisioning/GenerateLoanlossProvisioningConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/generateloanlossprovisioning/GenerateLoanlossProvisioningTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/generateloanlossprovisioning/GenerateLoanlossProvisioningTasklet.java index a444c45429f..1c5d7fdebb7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/generateloanlossprovisioning/GenerateLoanlossProvisioningTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/generateloanlossprovisioning/GenerateLoanlossProvisioningTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.Collection; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/generateloanlossprovisioning/NoProvisioningCriteriaDefinitionFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/generateloanlossprovisioning/NoProvisioningCriteriaDefinitionFoundException.java index 3931cbd5cac..ad53f3fa5d4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/generateloanlossprovisioning/NoProvisioningCriteriaDefinitionFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/generateloanlossprovisioning/NoProvisioningCriteriaDefinitionFoundException.java @@ -6,9 +6,9 @@ * 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 @@ -18,4 +18,5 @@ */ package org.apache.fineract.portfolio.loanaccount.jobs.generateloanlossprovisioning; -public class NoProvisioningCriteriaDefinitionFoundException extends RuntimeException {} +public class NoProvisioningCriteriaDefinitionFoundException extends RuntimeException { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/recalculateinterestforloan/RecalculateInterestForLoanConfig.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/recalculateinterestforloan/RecalculateInterestForLoanConfig.java index b07942ad92d..a6e12b34bba 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/recalculateinterestforloan/RecalculateInterestForLoanConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/recalculateinterestforloan/RecalculateInterestForLoanConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/recalculateinterestforloan/RecalculateInterestForLoanTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/recalculateinterestforloan/RecalculateInterestForLoanTasklet.java index 844a6c0b10a..50f141ab7e6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/recalculateinterestforloan/RecalculateInterestForLoanTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/recalculateinterestforloan/RecalculateInterestForLoanTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/transferfeechargeforloans/TransferFeeChargeForLoansConfig.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/transferfeechargeforloans/TransferFeeChargeForLoansConfig.java index 76d3fc9cc8a..3af12c47389 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/transferfeechargeforloans/TransferFeeChargeForLoansConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/transferfeechargeforloans/TransferFeeChargeForLoansConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/transferfeechargeforloans/TransferFeeChargeForLoansTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/transferfeechargeforloans/TransferFeeChargeForLoansTasklet.java index a9bf92790d3..0b01575bddd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/transferfeechargeforloans/TransferFeeChargeForLoansTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/jobs/transferfeechargeforloans/TransferFeeChargeForLoansTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.domain.ExternalId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultLoanScheduleGeneratorFactory.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultLoanScheduleGeneratorFactory.java index 46ea6543ad7..be0f585772c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultLoanScheduleGeneratorFactory.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/domain/DefaultLoanScheduleGeneratorFactory.java @@ -6,9 +6,9 @@ * 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 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 6a32b2e8789..b4c4412ea82 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 @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; @@ -41,6 +42,7 @@ import java.util.Map; import java.util.Set; import java.util.TreeSet; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; @@ -568,7 +570,7 @@ private LoanApplicationTerms assembleLoanApplicationTermsFrom(final JsonElement } private CalendarInstance createCalendarForSameAsRepayment(final Integer repaymentEvery, - final PeriodFrequencyType repaymentPeriodFrequencyType, final LocalDate expectedDisbursementDate) { + final PeriodFrequencyType repaymentPeriodFrequencyType, final LocalDate expectedDisbursementDate) { final Integer recalculationFrequencyNthDay = null; final Integer repeatsOnDay = expectedDisbursementDate.get(ChronoField.DAY_OF_WEEK); CalendarInstance restCalendarInstance = createInterestRecalculationCalendarInstance(expectedDisbursementDate, repaymentEvery, @@ -577,22 +579,22 @@ private CalendarInstance createCalendarForSameAsRepayment(final Integer repaymen } private CalendarInstance createInterestRecalculationCalendarInstance(final LocalDate calendarStartDate, - final RecalculationFrequencyType recalculationFrequencyType, final Integer frequency, - final Integer recalculationFrequencyNthDay, final Integer repeatsOnDay) { + final RecalculationFrequencyType recalculationFrequencyType, final Integer frequency, + final Integer recalculationFrequencyNthDay, final Integer repeatsOnDay) { CalendarFrequencyType calendarFrequencyType = CalendarFrequencyType.INVALID; switch (recalculationFrequencyType) { case DAILY: calendarFrequencyType = CalendarFrequencyType.DAILY; - break; + break; case MONTHLY: calendarFrequencyType = CalendarFrequencyType.MONTHLY; - break; + break; case WEEKLY: calendarFrequencyType = CalendarFrequencyType.WEEKLY; - break; + break; default: - break; + break; } return createInterestRecalculationCalendarInstance(calendarStartDate, frequency, calendarFrequencyType, @@ -600,7 +602,7 @@ private CalendarInstance createInterestRecalculationCalendarInstance(final Local } private CalendarInstance createInterestRecalculationCalendarInstance(final LocalDate calendarStartDate, final Integer frequency, - CalendarFrequencyType calendarFrequencyType, final Integer recalculationFrequencyNthDay, final Integer repeatsOnDay) { + CalendarFrequencyType calendarFrequencyType, final Integer recalculationFrequencyNthDay, final Integer repeatsOnDay) { final String title = "loan_recalculation_detail"; final Calendar calendar = Calendar.createRepeatingCalendar(title, calendarStartDate, CalendarType.COLLECTION.getValue(), calendarFrequencyType, frequency, repeatsOnDay, recalculationFrequencyNthDay); @@ -608,7 +610,7 @@ private CalendarInstance createInterestRecalculationCalendarInstance(final Local } private Calendar createLoanCalendar(final LocalDate calendarStartDate, final Integer frequency, - CalendarFrequencyType calendarFrequencyType, final Integer repeatsOnDay, final Integer repeatsOnNthDayOfMonth) { + CalendarFrequencyType calendarFrequencyType, final Integer repeatsOnDay, final Integer repeatsOnNthDayOfMonth) { final String title = "loan_schedule"; final Calendar calendar = Calendar.createRepeatingCalendar(title, calendarStartDate, CalendarType.COLLECTION.getValue(), calendarFrequencyType, frequency, repeatsOnDay, repeatsOnNthDayOfMonth); @@ -641,7 +643,7 @@ private List fetchDisbursementData(final JsonObject command) { if (jsonObject.has(LoanApiConstants.disbursementNetDisbursalAmountParameterName) && jsonObject.get(LoanApiConstants.disbursementNetDisbursalAmountParameterName).isJsonPrimitive() && StringUtils.isNotBlank( - jsonObject.get(LoanApiConstants.disbursementNetDisbursalAmountParameterName).getAsString())) { + jsonObject.get(LoanApiConstants.disbursementNetDisbursalAmountParameterName).getAsString())) { netDisbursalAmount = jsonObject.getAsJsonPrimitive(LoanApiConstants.disbursementNetDisbursalAmountParameterName) .getAsBigDecimal(); } @@ -656,7 +658,7 @@ private List fetchDisbursementData(final JsonObject command) { } private void validateRepaymentsStartDateWithMeetingDates(final LocalDate repaymentsStartingFromDate, final Calendar calendar, - boolean isSkipRepaymentOnFirstDayOfMonth, final Integer numberOfDays) { + boolean isSkipRepaymentOnFirstDayOfMonth, final Integer numberOfDays) { if (repaymentsStartingFromDate != null && !CalendarUtils.isValidRecurringDate(calendar.getRecurrence(), calendar.getStartDateLocalDate(), repaymentsStartingFromDate, isSkipRepaymentOnFirstDayOfMonth, numberOfDays)) { final String errorMessage = "First repayment date '" + repaymentsStartingFromDate + "' do not fall on a meeting date"; @@ -666,7 +668,7 @@ private void validateRepaymentsStartDateWithMeetingDates(final LocalDate repayme } private void validateRepaymentFrequencyIsSameAsMeetingFrequency(final Integer meetingFrequency, final Integer repaymentFrequency, - final Integer meetingInterval, final Integer repaymentInterval) { + final Integer meetingInterval, final Integer repaymentInterval) { // meeting with daily frequency should allow loan products with any frequency. if (!PeriodFrequencyType.DAYS.getValue().equals(meetingFrequency)) { // repayment frequency must match with meeting frequency @@ -687,7 +689,7 @@ private void validateRepaymentFrequencyIsSameAsMeetingFrequency(final Integer me } public LoanProductRelatedDetail assembleLoanProductRelatedDetail(final LoanApplicationTerms loanApplicationTerms, - final JsonElement element) { + final JsonElement element) { LoanProductRelatedDetail loanProductRelatedDetail = loanApplicationTerms.toLoanProductRelatedDetail(); final String interestRateFrequencyTypeParamName = "interestRateFrequencyType"; if (this.fromApiJsonHelper.parameterExists(interestRateFrequencyTypeParamName, element)) { @@ -736,8 +738,8 @@ public LoanScheduleModel assembleLoanScheduleFrom(final JsonElement element) { } public LoanScheduleModel assembleLoanScheduleFrom(final LoanApplicationTerms loanApplicationTerms, final boolean isHolidayEnabled, - final List holidays, final WorkingDays workingDays, final JsonElement element, - List disbursementDetails) { + final List holidays, final WorkingDays workingDays, final JsonElement element, + List disbursementDetails) { Set loanCharges = this.loanChargeAssembler.fromParsedJson(element, disbursementDetails); final Set nonCompoundingCharges = validateDisbursementPercentageCharges(loanCharges); @@ -764,8 +766,8 @@ public LoanScheduleModel assembleLoanScheduleFrom(final LoanApplicationTerms loa } public LoanScheduleModel assembleForInterestRecalculation(final LoanApplicationTerms loanApplicationTerms, final Long officeId, - Loan loan, final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, - final LocalDate rescheduleFrom) { + Loan loan, final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor, + final LocalDate rescheduleFrom) { final MathContext mc = MoneyHelper.getMathContext(); final boolean isHolidayEnabled = this.configurationDomainService.isRescheduleRepaymentsOnHolidaysEnabled(); @@ -782,8 +784,8 @@ public LoanScheduleModel assembleForInterestRecalculation(final LoanApplicationT } public OutstandingAmountsDTO calculatePrepaymentAmount(MonetaryCurrency currency, LocalDate onDate, - LoanApplicationTerms loanApplicationTerms, Loan loan, final Long officeId, - final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor) { + LoanApplicationTerms loanApplicationTerms, Loan loan, final Long officeId, + final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor) { final LoanScheduleGenerator loanScheduleGenerator = this.loanScheduleFactory.create(loanApplicationTerms.getLoanScheduleType(), loanApplicationTerms.getInterestMethod()); @@ -870,7 +872,7 @@ public void assempleVariableScheduleFrom(final Loan loan, final String json) { baseDataValidator.reset().failWithCodeNoParameterAddedToErrorCode( "variable.schedule.insert.not.allowed.before.disbursement.date", "Loan schedule insert request invalid"); } - break; + break; case DELETE_INSTALLMENT: if (dueDates.contains(termVariations.fetchTermApplicaDate())) { dueDates.remove(termVariations.fetchTermApplicaDate()); @@ -882,7 +884,7 @@ public void assempleVariableScheduleFrom(final Loan loan, final String json) { baseDataValidator.reset().failWithCodeNoParameterAddedToErrorCode( "variable.schedule.delete.not.allowed.for.last.period.date", "Loan schedule remove request invalid"); } - break; + break; case DUE_DATE: if (dueDates.contains(termVariations.fetchTermApplicaDate())) { if (overlappings.contains(termVariations.fetchTermApplicaDate())) { @@ -906,7 +908,7 @@ public void assempleVariableScheduleFrom(final Loan loan, final String json) { if (DateUtils.isEqual(lastDate, termVariations.fetchTermApplicaDate())) { lastDate = termVariations.fetchDateValue(); } - break; + break; case PRINCIPAL_AMOUNT: case EMI_AMOUNT: if (!DateUtils.isBefore(graceApplicable, termVariations.fetchTermApplicaDate())) { @@ -921,10 +923,10 @@ public void assempleVariableScheduleFrom(final Loan loan, final String json) { baseDataValidator.reset().failWithCodeNoParameterAddedToErrorCode( "variable.schedule.amount.update.not.allowed.for.last.period", "Loan schedule modify request invalid"); } - break; + break; default: - break; + break; } @@ -979,7 +981,7 @@ public void assempleVariableScheduleFrom(final Loan loan, final String json) { } private List adjustExistingVariations(List variations, List newVariations, - final Map adjustDueDateVariations) { + final Map adjustDueDateVariations) { Map amountVariations = new HashMap<>(); Map dueDateVariations = new HashMap<>(); Map insertVariations = new HashMap<>(); @@ -989,20 +991,20 @@ private List adjustExistingVariations(List retainVariations = new ArrayList<>(); @@ -1027,7 +1029,7 @@ private List adjustExistingVariations(List adjustExistingVariations(List adjustExistingVariations(List loanTermVariations) { + final JsonArray modificationsArray, final boolean isInsertInstallment, final boolean isDeleteInstallment, + final List loanTermVariations) { for (int i = 1; i <= modificationsArray.size(); i++) { final JsonObject arrayElement = modificationsArray.get(i - 1).getAsJsonObject(); BigDecimal decimalValue = null; @@ -1152,7 +1154,7 @@ private void validateDisbursementDateIsOnNonWorkingDay(final LocalDate disbursem } private void validateDisbursementDateIsOnHoliday(final LocalDate disbursementDate, final boolean isHolidayEnabled, - final List holidays) { + final List holidays) { if (isHolidayEnabled) { if (HolidayUtil.isHoliday(disbursementDate, holidays)) { final String errorMessage = "The expected disbursement date cannot be on a holiday"; @@ -1162,9 +1164,9 @@ private void validateDisbursementDateIsOnHoliday(final LocalDate disbursementDat } private LocalDate deriveFirstRepaymentDate(final AccountType loanType, final Integer repaymentEvery, - final LocalDate expectedDisbursementDate, final PeriodFrequencyType repaymentPeriodFrequencyType, - final Integer minimumDaysBetweenDisbursalAndFirstRepayment, final Calendar calendar, final LocalDate submittedOnDate, - final RepaymentStartDateType repaymentStartDateType) { + final LocalDate expectedDisbursementDate, final PeriodFrequencyType repaymentPeriodFrequencyType, + final Integer minimumDaysBetweenDisbursalAndFirstRepayment, final Calendar calendar, final LocalDate submittedOnDate, + final RepaymentStartDateType repaymentStartDateType) { LocalDate derivedFirstRepayment = null; final LocalDate dateBasedOnMinimumDaysBetweenDisbursalAndFirstRepayment = expectedDisbursementDate @@ -1190,15 +1192,15 @@ private LocalDate deriveFirstRepaymentDate(final AccountType loanType, final Int } derivedFirstRepayment = DateUtils.isAfter(dateBasedOnRepaymentFrequency, dateBasedOnMinimumDaysBetweenDisbursalAndFirstRepayment) ? dateBasedOnRepaymentFrequency - : dateBasedOnMinimumDaysBetweenDisbursalAndFirstRepayment; + : dateBasedOnMinimumDaysBetweenDisbursalAndFirstRepayment; } return derivedFirstRepayment; } private LocalDate deriveFirstRepaymentDateForLoans(final Integer repaymentEvery, final LocalDate expectedDisbursementDate, - final LocalDate refernceDateForCalculatingFirstRepaymentDate, final PeriodFrequencyType repaymentPeriodFrequencyType, - final Integer minimumDaysBetweenDisbursalAndFirstRepayment, final Calendar calendar, final LocalDate submittedOnDate) { + final LocalDate refernceDateForCalculatingFirstRepaymentDate, final PeriodFrequencyType repaymentPeriodFrequencyType, + final Integer minimumDaysBetweenDisbursalAndFirstRepayment, final Calendar calendar, final LocalDate submittedOnDate) { boolean isMeetingSkipOnFirstDayOfMonth = configurationDomainService.isSkippingMeetingOnFirstDayOfMonthEnabled(); int numberOfDays = configurationDomainService.retreivePeriodInNumberOfDaysForSkipMeetingDate().intValue(); final String frequency = CalendarUtils.getMeetingFrequencyFromPeriodFrequencyType(repaymentPeriodFrequencyType); @@ -1207,11 +1209,11 @@ private LocalDate deriveFirstRepaymentDateForLoans(final Integer repaymentEvery, final LocalDate minimumFirstRepaymentDate = expectedDisbursementDate.plusDays(minimumDaysBetweenDisbursalAndFirstRepayment); return DateUtils.isBefore(minimumFirstRepaymentDate, derivedFirstRepayment) ? derivedFirstRepayment : deriveFirstRepaymentDateForLoans(repaymentEvery, expectedDisbursementDate, derivedFirstRepayment, - repaymentPeriodFrequencyType, minimumDaysBetweenDisbursalAndFirstRepayment, calendar, submittedOnDate); + repaymentPeriodFrequencyType, minimumDaysBetweenDisbursalAndFirstRepayment, calendar, submittedOnDate); } private void validateMinimumDaysBetweenDisbursalAndFirstRepayment(final LocalDate disbursalDate, final LocalDate firstRepaymentDate, - final Integer minimumDaysBetweenDisbursalAndFirstRepayment) { + final Integer minimumDaysBetweenDisbursalAndFirstRepayment) { final LocalDate minimumFirstRepaymentDate = disbursalDate.plusDays(minimumDaysBetweenDisbursalAndFirstRepayment); if (DateUtils.isBefore(firstRepaymentDate, minimumFirstRepaymentDate)) { throw new MinDaysBetweenDisbursalAndFirstRepaymentViolationException(disbursalDate, firstRepaymentDate, @@ -1574,7 +1576,7 @@ private Set validateDisbursementPercentageCharges(final Set periods, - final Set nonCompoundingCharges) { + final Set nonCompoundingCharges) { final BigDecimal totalInterest = periods.stream().filter(p -> p.isRepaymentPeriod()).map(LoanScheduleModelPeriod::interestDue) .reduce(BigDecimal.ZERO, BigDecimal::add); for (LoanScheduleModelPeriod loanScheduleModelPeriod : periods) { @@ -1592,7 +1594,7 @@ private void updateDisbursementWithCharges(final BigDecimal principal, final Col } private void updateInterestForEqualAmortization(final MathContext mc, final LoanApplicationTerms loanApplicationTerms, - final Set loanCharges, final HolidayDetailDTO detailDTO) { + final Set loanCharges, final HolidayDetailDTO detailDTO) { if (loanApplicationTerms.getInterestMethod().isDecliningBalance()) { final LoanScheduleGenerator decliningLoanScheduleGenerator = this.loanScheduleFactory .create(loanApplicationTerms.getLoanScheduleType(), InterestMethod.DECLINING_BALANCE); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleCalculationPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleCalculationPlatformServiceImpl.java index 1c4f21f69ae..48f255b09dd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleCalculationPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleCalculationPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.Collection; import java.util.Iterator; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonQuery; import org.apache.fineract.infrastructure.core.service.DateUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleHistoryWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleHistoryWritePlatformServiceImpl.java index d3628ae0c3d..a7e268eb6f2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleHistoryWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleHistoryWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; @@ -109,7 +110,7 @@ public List createLoanScheduleArchive( @Override public void createAndSaveLoanScheduleArchive(List repaymentScheduleInstallments, Loan loan, - LoanRescheduleRequest loanRescheduleRequest) { + LoanRescheduleRequest loanRescheduleRequest) { List loanRepaymentScheduleHistoryList = createLoanScheduleArchive(repaymentScheduleInstallments, loan, loanRescheduleRequest); this.loanRepaymentScheduleHistoryRepository.saveAll(loanRepaymentScheduleHistoryList); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleWritePlatformServiceImpl.java index 5cb2e645545..b65f81a951d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanReschedulePreviewPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanReschedulePreviewPlatformServiceImpl.java index 11c3fba424a..591f064328c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanReschedulePreviewPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanReschedulePreviewPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.organisation.monetary.domain.MoneyHelper; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/ExpectedDisbursementDateValidatorImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/ExpectedDisbursementDateValidatorImpl.java index 50df144881f..662b0e3f8b0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/ExpectedDisbursementDateValidatorImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/ExpectedDisbursementDateValidatorImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; import org.apache.fineract.organisation.holiday.domain.Holiday; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApplicationValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApplicationValidator.java index adf1e10eff0..c1d50bace80 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApplicationValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApplicationValidator.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -34,6 +35,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -711,7 +713,7 @@ private void validateForCreate(final JsonElement element) { } if (LoanScheduleProcessingType.VERTICAL.equals(LoanScheduleProcessingType.valueOf(loanScheduleProcessingType)) && !AdvancedPaymentScheduleTransactionProcessor.ADVANCED_PAYMENT_ALLOCATION_STRATEGY - .equals(transactionProcessingStrategy)) { + .equals(transactionProcessingStrategy)) { baseDataValidator.reset().parameter(LoanProductConstants.LOAN_SCHEDULE_PROCESSING_TYPE).failWithCode( "supported.only.with.advanced.payment.allocation.strategy", "Vertical repayment schedule processing is only available with `Advanced payment allocation` strategy"); @@ -721,7 +723,7 @@ private void validateForCreate(final JsonElement element) { if (LoanScheduleProcessingType.HORIZONTAL.name().equals(loanScheduleProcessingType) && AdvancedPaymentScheduleTransactionProcessor.ADVANCED_PAYMENT_ALLOCATION_STRATEGY - .equals(transactionProcessingStrategy)) { + .equals(transactionProcessingStrategy)) { advancedPaymentAllocationsValidator.checkGroupingOfAllocationRules(allocationRules); } @@ -828,7 +830,7 @@ private void fixedLengthValidations(final JsonElement element) { } private void validateBorrowerCycle(JsonElement element, LoanProduct loanProduct, Long clientId, Long groupId, - DataValidatorBuilder baseDataValidator) { + DataValidatorBuilder baseDataValidator) { if (loanProduct.isUseBorrowerCycle()) { Integer cycleNumber = 0; if (clientId != null) { @@ -1012,7 +1014,7 @@ public void validateForModify(final JsonCommand command, final Loan loan) { if (!AdvancedPaymentScheduleTransactionProcessor.ADVANCED_PAYMENT_ALLOCATION_STRATEGY .equals(loanProduct.getTransactionProcessingStrategyCode()) && AdvancedPaymentScheduleTransactionProcessor.ADVANCED_PAYMENT_ALLOCATION_STRATEGY - .equals(transactionProcessingStrategy)) { + .equals(transactionProcessingStrategy)) { baseDataValidator.reset().parameter(LoanApiConstants.transactionProcessingStrategyCodeParameterName).failWithCode( "strategy.cannot.be.advanced.payment.allocation.if.not.configured", "Loan transaction processing strategy cannot be Advanced Payment Allocation Strategy if it's not configured on loan product"); @@ -1452,7 +1454,7 @@ public void validateForModify(final JsonCommand command, final Loan loan) { } if (LoanScheduleProcessingType.VERTICAL.equals(LoanScheduleProcessingType.valueOf(loanScheduleProcessingType)) && !AdvancedPaymentScheduleTransactionProcessor.ADVANCED_PAYMENT_ALLOCATION_STRATEGY - .equals(transactionProcessingStrategy)) { + .equals(transactionProcessingStrategy)) { baseDataValidator.reset().parameter(LoanProductConstants.LOAN_SCHEDULE_PROCESSING_TYPE).failWithCode( "supported.only.with.advanced.payment.allocation.strategy", "Vertical repayment schedule processing is only available with `Advanced payment allocation` strategy"); @@ -1462,7 +1464,7 @@ public void validateForModify(final JsonCommand command, final Loan loan) { if (LoanScheduleProcessingType.HORIZONTAL.name().equals(loanScheduleProcessingType) && AdvancedPaymentScheduleTransactionProcessor.ADVANCED_PAYMENT_ALLOCATION_STRATEGY - .equals(transactionProcessingStrategy)) { + .equals(transactionProcessingStrategy)) { advancedPaymentAllocationsValidator.checkGroupingOfAllocationRules(allocationRules); } @@ -1597,7 +1599,7 @@ public void validateMinMaxConstraintValues(final JsonElement element, final Loan } private void validateLoanTermAndRepaidEveryValues(final Integer loanTermFrequency, final Integer loanTermFrequencyType, - final Integer numberOfRepayments, final Integer repaymentEvery, final Integer repaymentEveryType, final Loan loan) { + final Integer numberOfRepayments, final Integer repaymentEvery, final Integer repaymentEveryType, final Loan loan) { final List dataValidationErrors = new ArrayList<>(); this.loanScheduleValidator.validateSelectedPeriodFrequencyTypeIsTheSame(dataValidationErrors, loanTermFrequency, loanTermFrequencyType, numberOfRepayments, repaymentEvery, repaymentEveryType); @@ -1693,19 +1695,19 @@ private void validateDisbursementsAreDatewiseOrdered(JsonElement element, final } public void validateLoanMultiDisbursementDate(final JsonElement element, LocalDate expectedDisbursementDate, BigDecimal principal, - Loan loan) { + Loan loan) { Validator.validateOrThrow("loan", baseDataValidator -> { validateLoanMultiDisbursementDate(element, baseDataValidator, expectedDisbursementDate, principal, loan); }); } public void validateLoanMultiDisbursementDate(final JsonElement element, final DataValidatorBuilder baseDataValidator, - LocalDate expectedDisbursement, BigDecimal totalPrincipal) { + LocalDate expectedDisbursement, BigDecimal totalPrincipal) { validateLoanMultiDisbursementDate(element, baseDataValidator, expectedDisbursement, totalPrincipal, null); } public void validateLoanMultiDisbursementDate(final JsonElement element, final DataValidatorBuilder baseDataValidator, - LocalDate expectedDisbursement, BigDecimal totalPrincipal, Loan loan) { + LocalDate expectedDisbursement, BigDecimal totalPrincipal, Loan loan) { this.validateDisbursementsAreDatewiseOrdered(element, baseDataValidator); final JsonObject topLevelJsonElement = element.getAsJsonObject(); @@ -1787,7 +1789,7 @@ public void validateLoanForCollaterals(final Loan loan, final BigDecimal total) } private void validatePartialPeriodSupport(final Integer interestCalculationPeriodType, final DataValidatorBuilder baseDataValidator, - final JsonElement element, final LoanProduct loanProduct) { + final JsonElement element, final LoanProduct loanProduct) { if (interestCalculationPeriodType != null) { final InterestCalculationPeriodMethod interestCalculationPeriodMethod = InterestCalculationPeriodMethod .fromInt(interestCalculationPeriodType); @@ -1913,7 +1915,7 @@ private void checkForProductMixRestrictions(final List activeLoansLoanProd } private void validateSubmittedOnDate(final JsonElement element, LocalDate originalSubmittedOnDate, - LocalDate originalExpectedDisbursementDate, LoanProduct loanProduct) { + LocalDate originalExpectedDisbursementDate, LoanProduct loanProduct) { final LocalDate startDate = loanProduct.getStartDate(); final LocalDate closeDate = loanProduct.getCloseDate(); final LocalDate submittedOnDate = this.fromApiJsonHelper.parameterExists(LoanApiConstants.submittedOnDateParameterName, element) @@ -1923,8 +1925,8 @@ private void validateSubmittedOnDate(final JsonElement element, LocalDate origin final Long groupId = this.fromApiJsonHelper.extractLongNamed(LoanApiConstants.groupIdParameterName, element); final LocalDate expectedDisbursementDate = this.fromApiJsonHelper .parameterExists(LoanApiConstants.expectedDisbursementDateParameterName, element) - ? this.fromApiJsonHelper.extractLocalDateNamed(LoanApiConstants.expectedDisbursementDateParameterName, element) - : originalExpectedDisbursementDate; + ? this.fromApiJsonHelper.extractLocalDateNamed(LoanApiConstants.expectedDisbursementDateParameterName, element) + : originalExpectedDisbursementDate; if (DateUtils.isBefore(submittedOnDate, startDate)) { String defaultUserMessage = "submittedOnDate cannot be before the loan product startDate."; @@ -2030,7 +2032,8 @@ public void validateApproval(JsonCommand command, Long loanId) { LoanApiConstants.noteParameterName, LoanApiConstants.localeParameterName, LoanApiConstants.dateFormatParameterName, LoanApiConstants.disbursementDataParameterName, LoanApiConstants.expectedDisbursementDateParameterName)); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, disbursementParameters); Validator.validateOrThrow("loanapplication", baseDataValidator -> { @@ -2214,7 +2217,7 @@ public BigDecimal getOverAppliedMax(Loan loan) { * validate disbursement date should fall on a meeting date */ public void validateDisbursementDateWithMeetingDates(final LocalDate expectedDisbursementDate, final Calendar calendar, - Boolean isSkipRepaymentOnFirstMonth, Integer numberOfDays) { + Boolean isSkipRepaymentOnFirstMonth, Integer numberOfDays) { if (calendar != null && !calendar.isValidRecurringDate(expectedDisbursementDate, isSkipRepaymentOnFirstMonth, numberOfDays)) { final String errorMessage = "Expected disbursement date '" + expectedDisbursementDate + "' do not fall on a meeting date"; throw new LoanApplicationDateException("disbursement.date.do.not.match.meeting.date", errorMessage, expectedDisbursementDate); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApprovedAmountValidatorImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApprovedAmountValidatorImpl.java index 02dbb7a6f7d..14b62b1dbd5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApprovedAmountValidatorImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanApprovedAmountValidatorImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,12 +20,14 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.util.Arrays; import java.util.HashSet; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -63,7 +65,8 @@ public void validateLoanApprovedAmountModification(JsonCommand command) { Arrays.asList(LoanApiConstants.amountParameterName, LoanApiConstants.localeParameterName)); final JsonElement element = this.fromApiJsonHelper.parse(json); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, supportedParameters); final BigDecimal newApprovedAmount = this.fromApiJsonHelper.extractBigDecimalWithLocaleNamed(LoanApiConstants.amountParameterName, @@ -116,7 +119,8 @@ public void validateLoanAvailableDisbursementAmountModification(final JsonComman Arrays.asList(LoanApiConstants.amountParameterName, LoanApiConstants.localeParameterName)); final JsonElement element = this.fromApiJsonHelper.parse(json); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, supportedParameters); final BigDecimal newAvailableDisbursementAmount = this.fromApiJsonHelper diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanDisbursementValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanDisbursementValidator.java index df3f4558a75..7ef9e6da664 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanDisbursementValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanDisbursementValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.core.service.MathUtil; @@ -68,7 +69,7 @@ public void validateOverMaximumAmount(final Loan loan, final BigDecimal totalDis public void validateDisburseDate(final Loan loan, final LocalDate disbursedOn, final LocalDate expectedDate) { if (expectedDate != null && (DateUtils.isAfter(disbursedOn, loan.fetchRepaymentScheduleInstallment(1).getDueDate()) - || DateUtils.isAfter(disbursedOn, expectedDate)) + || DateUtils.isAfter(disbursedOn, expectedDate)) && DateUtils.isEqual(disbursedOn, loan.getActualDisbursementDate())) { final String errorMessage = "submittedOnDate cannot be after the loans expectedFirstRepaymentOnDate: " + expectedDate; throw new InvalidLoanStateTransitionException("disbursal", "cannot.be.after.expected.first.repayment.date", errorMessage, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanForeclosureValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanForeclosureValidator.java index 78a1377d9e4..6a706774d80 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanForeclosureValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanForeclosureValidator.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.serialization; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.exception.LoanForeclosureException; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanOfficerValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanOfficerValidator.java index eb0ca30419c..344accf74ff 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanOfficerValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanOfficerValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.Optional; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.domain.LoanOfficerAssignmentHistory; @@ -50,7 +51,7 @@ public void validateUnassignDate(final Loan loan, final LocalDate unassignDate) } public void validateReassignment(final Loan loan, final LocalDate assignmentDate, - final LoanOfficerAssignmentHistory lastAssignmentRecord) { + final LoanOfficerAssignmentHistory lastAssignmentRecord) { if (loan.isSubmittedOnDateAfter(assignmentDate)) { final String errorMessage = "The Loan Officer assignment date (" + assignmentDate.toString() + ") cannot be before loan submitted date (" + loan.getSubmittedOnDate().toString() + ")."; @@ -72,7 +73,7 @@ public void validateReassignment(final Loan loan, final LocalDate assignmentDate } public void validateAssignmentDateWithHistory(final Loan loan, final Optional latestHistoryRecord, - final LocalDate assignmentDate) { + final LocalDate assignmentDate) { if (latestHistoryRecord.isPresent() && latestHistoryRecord.get().isBeforeStartDate(assignmentDate)) { final String errorMessage = "Loan with identifier " + loan.getId() + " was already assigned before date " + assignmentDate; throw new LoanOfficerAssignmentDateException("is.before.last.assignment.date", errorMessage, loan.getId(), assignmentDate); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanScheduleValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanScheduleValidator.java index 344acdc7d6c..c3c0ef596ed 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanScheduleValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanScheduleValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -29,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.exception.GeneralPlatformDomainRuleException; @@ -90,7 +92,8 @@ public void validate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -140,8 +143,8 @@ public void validate(final String json) { } public void validateSelectedPeriodFrequencyTypeIsTheSame(final List dataValidationErrors, - final Integer loanTermFrequency, final Integer loanTermFrequencyType, final Integer numberOfRepayments, - final Integer repaymentEvery, final Integer repaymentEveryType) { + final Integer loanTermFrequency, final Integer loanTermFrequencyType, final Integer numberOfRepayments, + final Integer repaymentEvery, final Integer repaymentEveryType) { if (loanTermFrequencyType != null && !loanTermFrequencyType.equals(repaymentEveryType)) { final ApiParameterError error = ApiParameterError.parameterError( "validation.msg.loan.loanTermFrequencyType.not.the.same.as.repaymentFrequencyType", @@ -172,7 +175,7 @@ public void validateSelectedPeriodFrequencyTypeIsTheSame(final List dataValidationErrors, - final LocalDate expectedDisbursementDate, final LocalDate repaymentsStartingFromDate) { + final LocalDate expectedDisbursementDate, final LocalDate repaymentsStartingFromDate) { if (repaymentsStartingFromDate != null && DateUtils.isAfter(expectedDisbursementDate, repaymentsStartingFromDate)) { final ApiParameterError error = ApiParameterError.parameterError( "validation.msg.loan.expectedDisbursementDate.cannot.be.after.first.repayment.date", diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanTransactionValidatorImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanTransactionValidatorImpl.java index a2795e600fd..6cab204c60b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanTransactionValidatorImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/serialization/LoanTransactionValidatorImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -33,6 +34,7 @@ import java.util.Map; import java.util.Set; import java.util.stream.Collectors; + import lombok.AllArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.codes.domain.CodeValue; @@ -128,7 +130,8 @@ public void validateDisbursement(JsonCommand command, boolean isAccountTransfer, throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, getDisbursementParameters(isAccountTransfer)); Validator.validateOrThrow("loan.disbursement", baseDataValidator -> { @@ -276,7 +279,7 @@ protected void validateDisbursementWithPostDatedChecks(final String json, final final Integer installmentId = this.fromApiJsonHelper.extractIntegerNamed("installmentId", postDatedCheck, locale); final List installmentList = loanRepaymentScheduleInstallment.stream().filter( - repayment -> repayment.getInstallmentNumber().equals(installmentId) && repayment.getLoan().getId().equals(loanId)) + repayment -> repayment.getInstallmentNumber().equals(installmentId) && repayment.getLoan().getId().equals(loanId)) .collect(Collectors.toList()); if (installmentList.size() > 1) { throw new PlatformDataIntegrityException("error.repayment.redundancy", "Multiple installment data found", @@ -295,7 +298,7 @@ protected void validateDisbursementWithPostDatedChecks(final String json, final } protected void validateDisbursementDateWithMeetingDate(final LocalDate actualDisbursementDate, final CalendarInstance calendarInstance, - Boolean isSkipRepaymentOnFirstMonth, Integer numberOfDays) { + Boolean isSkipRepaymentOnFirstMonth, Integer numberOfDays) { if (null != calendarInstance) { final Calendar calendar = calendarInstance.getCalendar(); if (!calendar.isValidRecurringDate(actualDisbursementDate, isSkipRepaymentOnFirstMonth, numberOfDays)) { @@ -312,7 +315,8 @@ protected void validateDisbursementDateWithMeetingDate(final LocalDate actualDis public void validateUndoChargeOff(final String json) { if (!StringUtils.isBlank(json)) { final Set transactionParameters = new HashSet<>(Arrays.asList(LoanApiConstants.REVERSAL_EXTERNAL_ID_PARAMNAME)); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, transactionParameters); final List dataValidationErrors = new ArrayList<>(); @@ -339,7 +343,8 @@ public void validateTransaction(final String json) { final Set transactionParameters = getTransactionParametersForEdit(); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, transactionParameters); final List dataValidationErrors = new ArrayList<>(); @@ -381,7 +386,8 @@ public void validateChargebackTransaction(final String json) { LoanApiConstants.localeParameterName, LoanApiConstants.externalIdParameterName, LoanApiConstants.noteParameterName, LoanApiConstants.PAYMENT_TYPE_PARAMNAME)); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, transactionParameters); final List dataValidationErrors = new ArrayList<>(); @@ -414,7 +420,8 @@ public void validateTransactionWithNoAmount(final String json) { final Set disbursementParameters = getNoAmountTransactionParameters(); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, disbursementParameters); final List dataValidationErrors = new ArrayList<>(); @@ -446,7 +453,8 @@ public void validateChargeOffTransaction(final String json) { final Set chargeOffParameters = new HashSet<>( Arrays.asList("transactionDate", "note", "locale", "dateFormat", "chargeOffReasonId", "externalId")); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, chargeOffParameters); final List dataValidationErrors = new ArrayList<>(); @@ -477,7 +485,8 @@ public void validateUpdateOfLoanOfficer(final String json) { final Set disbursementParameters = new HashSet<>( Arrays.asList("assignmentDate", "fromLoanOfficerId", "toLoanOfficerId", "locale", "dateFormat")); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, disbursementParameters); final List dataValidationErrors = new ArrayList<>(); @@ -508,7 +517,8 @@ public void validateForBulkLoanReassignment(final String json) { final Set supportedParameters = new HashSet<>( Arrays.asList("assignmentDate", "fromLoanOfficerId", "toLoanOfficerId", "loans", "locale", "dateFormat")); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, supportedParameters); final List dataValidationErrors = new ArrayList<>(); @@ -535,7 +545,8 @@ public void validateMarkAsFraudLoan(final String json) { } Set transactionParameters = new HashSet<>(Arrays.asList(LoanApiConstants.FRAUD_ATTRIBUTE_NAME)); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, transactionParameters); final List dataValidationErrors = new ArrayList<>(); @@ -562,7 +573,8 @@ public void validateUpdateDisbursementDateAndAmount(final String json, LoanDisbu LoanApiConstants.updatedDisbursementDateParameterName, LoanApiConstants.updatedDisbursementPrincipalParameterName, LoanApiConstants.expectedDisbursementDateParameterName)); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, disbursementParameters); final List dataValidationErrors = new ArrayList<>(); @@ -600,7 +612,8 @@ public void validateNewRefundTransaction(final String json) { final Set transactionParameters = new HashSet<>(Arrays.asList("transactionDate", "transactionAmount", "externalId", "note", "locale", "dateFormat", "paymentTypeId", "accountNumber", "checkNumber", "routingCode", "receiptNumber", "bankNumber")); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, transactionParameters); final List dataValidationErrors = new ArrayList<>(); @@ -633,7 +646,8 @@ public void validateLoanForeclosure(final String json) { final Set foreclosureParameters = new HashSet<>( Arrays.asList("transactionDate", "note", "locale", "dateFormat", "externalId")); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, foreclosureParameters); final List dataValidationErrors = new ArrayList<>(); @@ -687,7 +701,7 @@ public void validateLoanNotClosedOrOverpaidForTransactions(Loan loan, LoanTransa } protected void validateLoanHasNoLaterChargeRefundTransactionToReverseOrCreateATransaction(Loan loan, LocalDate transactionDate, - String reversedOrCreated) { + String reversedOrCreated) { for (LoanTransaction txn : loan.getLoanTransactions()) { if (txn.isChargeRefund() && DateUtils.isBefore(transactionDate, txn.getTransactionDate())) { final String errorMessage = "loan.transaction.cant.be." + reversedOrCreated + ".because.later.charge.refund.exists"; @@ -770,7 +784,7 @@ public void validateActivityNotBeforeLastTransactionDate(final Loan loan, final @Override public void validateRepaymentDateIsOnNonWorkingDay(final LocalDate repaymentDate, final WorkingDays workingDays, - final boolean allowTransactionsOnNonWorkingDay) { + final boolean allowTransactionsOnNonWorkingDay) { if (!allowTransactionsOnNonWorkingDay && !WorkingDaysUtil.isWorkingDay(workingDays, repaymentDate)) { final String errorMessage = "Repayment date cannot be on a non working day"; throw new LoanApplicationDateException("repayment.date.on.non.working.day", errorMessage, repaymentDate); @@ -779,7 +793,7 @@ public void validateRepaymentDateIsOnNonWorkingDay(final LocalDate repaymentDate @Override public void validateRepaymentDateIsOnHoliday(final LocalDate repaymentDate, final boolean allowTransactionsOnHoliday, - final List holidays) { + final List holidays) { if (!allowTransactionsOnHoliday && HolidayUtil.isHoliday(repaymentDate, holidays)) { final String errorMessage = "Repayment date cannot be on a holiday"; throw new LoanApplicationDateException("repayment.date.on.holiday", errorMessage, repaymentDate); @@ -844,7 +858,7 @@ public void validateRefund(String json) { @Override public void validateRefund(final Loan loan, LoanTransactionType loanTransactionType, final LocalDate transactionDate, - ScheduleGeneratorDTO scheduleGeneratorDTO) { + ScheduleGeneratorDTO scheduleGeneratorDTO) { checkClientOrGroupActive(loan); validateLoanNotClosedOrOverpaidForTransactions(loan, loanTransactionType); loanDownPaymentTransactionValidator.validateLoanStatusIsActiveOrFullyPaidOrOverpaid(loan); @@ -860,7 +874,7 @@ public void validateRefund(final Loan loan, LoanTransactionType loanTransactionT } protected void validateRepaymentTypeTransactionNotBeforeAChargeRefund(final Loan loan, final LoanTransactionType loanTransactionType, - final LocalDate transactionDate) { + final LocalDate transactionDate) { if (loanTransactionType.isRepaymentType() && !loanTransactionType.isChargeRefund()) { for (LoanTransaction txn : loan.getLoanTransactions()) { if (txn.isChargeRefund() && DateUtils.isBefore(transactionDate, txn.getTransactionDate())) { @@ -983,7 +997,8 @@ private void validatePaymentTransaction(String json) { final Set transactionParameters = getRepaymentParameters(); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, transactionParameters); final List dataValidationErrors = new ArrayList<>(); @@ -1049,7 +1064,7 @@ private void validateActivityNotBeforeClientOrGroupTransferDate(final Loan loan, } private void validateTransactionNotBeforeLastTransactionDate(final Loan loan, LoanTransactionType loanTransactionType, - final LocalDate transactionDate) { + final LocalDate transactionDate) { if (!((LoanScheduleType.CUMULATIVE.equals(loan.getLoanProductRelatedDetail().getLoanScheduleType()) && loan.isInterestBearingAndInterestRecalculationEnabled()) || loan.getLoanProduct().isHoldGuaranteeFunds())) { return; @@ -1137,7 +1152,8 @@ public void validateManualInterestRefundTransaction(final String json) { Arrays.asList("transactionAmount", "externalId", "note", "locale", "dateFormat", "paymentTypeId", "accountNumber", "checkNumber", "routingCode", "receiptNumber", "bankNumber", "loanId", "numberOfRepayments")); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, transactionParameters); final List dataValidationErrors = new ArrayList<>(); @@ -1160,7 +1176,7 @@ public void validateManualInterestRefundTransaction(final String json) { @Override public void validateClassificationCodeValue(final String codeName, final Long transactionClassificationId, - DataValidatorBuilder baseDataValidator) { + DataValidatorBuilder baseDataValidator) { baseDataValidator.reset().parameter(LoanTransactionApiConstants.TRANSACTION_CLASSIFICATIONID_PARAMNAME) .value(transactionClassificationId).ignoreIfNull().positiveAmount(); if (transactionClassificationId != null) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BulkLoansReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BulkLoansReadPlatformService.java index b0cbbc21907..71328b94bbf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BulkLoansReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BulkLoansReadPlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BulkLoansReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BulkLoansReadPlatformServiceImpl.java index 8bfd845504c..a1f170487cd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BulkLoansReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/BulkLoansReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.sql.SQLException; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CommonLoanSummaryDataProvider.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CommonLoanSummaryDataProvider.java index 0df243289a2..fb3e66b97d9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CommonLoanSummaryDataProvider.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CommonLoanSummaryDataProvider.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.LocalDate; import java.util.Collection; import java.util.Optional; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.organisation.monetary.data.CurrencyData; import org.apache.fineract.portfolio.loanaccount.data.LoanSummaryData; @@ -35,7 +36,7 @@ public abstract class CommonLoanSummaryDataProvider implements LoanSummaryDataPr @Override public LoanSummaryData withTransactionAmountsSummary(Loan loan, LoanSummaryData defaultSummaryData, LoanScheduleData repaymentSchedule, - Collection loanTransactionBalances) { + Collection loanTransactionBalances) { final LocalDate businessDate = DateUtils.getBusinessLocalDate(); BigDecimal totalMerchantRefund = BigDecimal.ZERO; @@ -140,7 +141,7 @@ public LoanSummaryData withTransactionAmountsSummary(Loan loan, LoanSummaryData } private static BigDecimal fetchLoanTransactionBalanceByType(final Collection loanTransactionBalances, - final LoanTransactionType transactionType) { + final LoanTransactionType transactionType) { final Optional optLoanTransactionBalance = loanTransactionBalances.stream() .filter(balance -> balance.getTransactionType().equals(transactionType) && !balance.isReversed()).findFirst(); return optLoanTransactionBalance.isPresent() ? optLoanTransactionBalance.get().getAmount() : BigDecimal.ZERO; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CumulativeLoanSummaryDataProvider.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CumulativeLoanSummaryDataProvider.java index 8f32bfaccb6..989af36af0f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CumulativeLoanSummaryDataProvider.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/CumulativeLoanSummaryDataProvider.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.LocalDate; import java.util.Collection; import java.util.Optional; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.core.service.MathUtil; import org.apache.fineract.organisation.monetary.data.CurrencyData; @@ -45,13 +46,13 @@ public boolean accept(String loanProcessingStrategyCode) { @Override public BigDecimal computeTotalUnpaidPayableNotDueInterestAmountOnActualPeriod(final Loan loan, - final Collection periods, final LocalDate businessDate, final CurrencyData currency, - BigDecimal totalUnpaidPayableDueInterest) { + final Collection periods, final LocalDate businessDate, final CurrencyData currency, + BigDecimal totalUnpaidPayableDueInterest) { // Find the current Period (If exists one) based on the Business date final Optional optCurrentPeriod = periods.stream().filter(period -> !period.isDownPaymentPeriod() // - && period.getPeriod() != null // - && !businessDate.isBefore(period.getFromDate()) // - && businessDate.isBefore(period.getDueDate())) // + && period.getPeriod() != null // + && !businessDate.isBefore(period.getFromDate()) // + && businessDate.isBefore(period.getDueDate())) // .findFirst(); if (optCurrentPeriod.isPresent()) { @@ -68,13 +69,13 @@ public BigDecimal computeTotalUnpaidPayableNotDueInterestAmountOnActualPeriod(fi @Override @Transactional(readOnly = true) public LoanSummaryData withTransactionAmountsSummary(Long loanId, LoanSummaryData defaultSummaryData, - LoanScheduleData repaymentSchedule, Collection loanTransactionBalances) { + LoanScheduleData repaymentSchedule, Collection loanTransactionBalances) { Loan loan = null; return super.withTransactionAmountsSummary(loan, defaultSummaryData, repaymentSchedule, loanTransactionBalances); } private static BigDecimal computeAccruedInterestTillDay(final LoanSchedulePeriodData period, final long untilDay, - final CurrencyData currency) { + final CurrencyData currency) { Integer remainingDays = period.getDaysInPeriod(); BigDecimal totalAccruedInterest = BigDecimal.ZERO; while (remainingDays > untilDay) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/GLIMAccountInfoReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/GLIMAccountInfoReadPlatformServiceImpl.java index 82b630e9a72..1f90f0efffd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/GLIMAccountInfoReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/GLIMAccountInfoReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.accountdetails.data.LoanAccountSummaryData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestRefundServiceDelegate.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestRefundServiceDelegate.java index 7635b0a5956..48e2729af2d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestRefundServiceDelegate.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/InterestRefundServiceDelegate.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.springframework.context.annotation.Lazy; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccountServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccountServiceImpl.java index b0e6b2dd19e..74511e6f74d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccountServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccountServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualActivityProcessingServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualActivityProcessingServiceImpl.java index 474648b4f8d..6d47ed7b757 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualActivityProcessingServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualActivityProcessingServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -30,6 +30,7 @@ import java.util.Set; import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -127,8 +128,8 @@ public void recalculateAccrualActivityTransaction(final Loan loan, final Changed final LocalDate transactionDate = newLoanTransaction.getTransactionDate(); List targetInstallments = new ArrayList<>(installments.stream().filter(i -> i.getDueDate() - .isEqual(transactionDate) - || (DateUtils.isEqual(i.getObligationsMetOnDate(), transactionDate) && i.getDueDate().isAfter(transactionDate))) + .isEqual(transactionDate) + || (DateUtils.isEqual(i.getObligationsMetOnDate(), transactionDate) && i.getDueDate().isAfter(transactionDate))) .toList()); AtomicBoolean transactionShouldBeReplayed = new AtomicBoolean(false); @@ -166,7 +167,7 @@ public void recalculateAccrualActivityTransaction(final Loan loan, final Changed } protected void createNewTransaction(LoanTransaction loanTransaction, LoanTransaction newLoanTransaction, - ChangedTransactionDetail changedTransactionDetail) { + ChangedTransactionDetail changedTransactionDetail) { loanTransaction.reverse(); if (newLoanTransaction.isNotReversed()) { @@ -285,7 +286,7 @@ public void processAccrualActivityForLoanReopen(final @NonNull Loan loan) { } private void calculateAccrualActivity(LoanTransaction loanTransaction, MonetaryCurrency currency, - List targetInstallments, AtomicBoolean transactionShouldBeReplayed) { + List targetInstallments, AtomicBoolean transactionShouldBeReplayed) { if (targetInstallments.isEmpty()) { return; } @@ -294,7 +295,7 @@ private void calculateAccrualActivity(LoanTransaction loanTransaction, MonetaryC if (currentInstallment.isNotFullyPaidOff() && ((currentInstallment.getDueDate().isAfter(loanTransaction.getTransactionDate()) && !currentInstallment.getDueDate().isBefore(DateUtils.getBusinessLocalDate())) || (currentInstallment.getDueDate().isEqual(loanTransaction.getTransactionDate()) - && loanTransaction.getTransactionDate().equals(DateUtils.getBusinessLocalDate())))) { + && loanTransaction.getTransactionDate().equals(DateUtils.getBusinessLocalDate())))) { loanTransaction.reverse(); transactionShouldBeReplayed.set(false); } else { @@ -328,7 +329,7 @@ private void calculateAccrualActivity(LoanTransaction loanTransaction, MonetaryC } private Map> loadExistingAccrualActivitiesByDate(final @NonNull Loan loan, - final List installments) { + final List installments) { final Set dueDates = installments.stream().map(LoanRepaymentScheduleInstallment::getDueDate).collect(Collectors.toSet()); final List allActivities = loanTransactionRepository.findNonReversedLoanAndTypeAndDates(loan, @@ -338,7 +339,7 @@ private Map> loadExistingAccrualActivitiesByDat } private void makeOrReplayActivity(final @NonNull Loan loan, final @NonNull LoanRepaymentScheduleInstallment installment, - LoanTransaction existingActivity) { + LoanTransaction existingActivity) { LocalDate dueDate = installment.getDueDate(); if (existingActivity == null) { makeAccrualActivityTransaction(loan, installment, dueDate); @@ -348,7 +349,7 @@ private void makeOrReplayActivity(final @NonNull Loan loan, final @NonNull LoanR } private void reverseReplayAccrualActivityTransaction(final @NonNull Loan loan, final @NonNull LoanTransaction loanTransaction, - final @NonNull LoanRepaymentScheduleInstallment installment, final @NonNull LocalDate transactionDate) { + final @NonNull LoanRepaymentScheduleInstallment installment, final @NonNull LocalDate transactionDate) { if (validateActivityTransaction(installment, loanTransaction)) { return; } @@ -378,7 +379,7 @@ private void reverseReplayAccrualActivityTransaction(final @NonNull Loan loan, f } private boolean validateActivityTransaction(final @NonNull LoanRepaymentScheduleInstallment installment, - final @NonNull LoanTransaction transaction) { + final @NonNull LoanTransaction transaction) { return DateUtils.isEqual(installment.getDueDate(), transaction.getDateOf()) && MathUtil.isEqualTo(transaction.getInterestPortion(), installment.getInterestCharged()) && MathUtil.isEqualTo(transaction.getFeeChargesPortion(), installment.getFeeChargesCharged()) @@ -393,7 +394,7 @@ private void reverseAccrualActivityTransaction(final @NonNull LoanTransaction lo } private void makeAccrualActivityTransaction(final @NonNull Loan loan, final @NonNull LoanRepaymentScheduleInstallment installment, - final @NonNull LocalDate transactionDate) { + final @NonNull LocalDate transactionDate) { LoanTransaction newAccrualActivityTransaction = loanTransactionAssembler.assembleAccrualActivityTransaction(loan, installment, transactionDate); @@ -405,7 +406,7 @@ private void makeAccrualActivityTransaction(final @NonNull Loan loan, final @Non } private LoanTransaction makeAccrualActivityTransaction(final @NonNull Loan loan, - @NonNull LoanTransaction newAccrualActivityTransaction) { + @NonNull LoanTransaction newAccrualActivityTransaction) { businessEventNotifierService.notifyPreBusinessEvent(new LoanTransactionAccrualActivityPreBusinessEvent(loan)); LoanTransaction savedNewAccrualActivityTransaction = loanAccountService .saveLoanTransactionWithDataIntegrityViolationChecks(newAccrualActivityTransaction); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualEventService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualEventService.java index e17f5ee7620..cf71ca33652 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualEventService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualEventService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualsProcessingServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualsProcessingServiceImpl.java index 966e18fc7a9..648e37703bb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualsProcessingServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAccrualsProcessingServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -41,6 +41,7 @@ import java.util.concurrent.Future; import java.util.function.Predicate; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.accounting.common.AccountingRuleType; @@ -301,7 +302,7 @@ public void processAccrualsOnLoanClosure(@NonNull final Loan loan, final boolean */ @Override public void processAccrualsOnLoanForeClosure(@NonNull Loan loan, @NonNull LocalDate foreClosureDate, - @NonNull List newAccrualTransactions) { + @NonNull List newAccrualTransactions) { // TODO implement progressive accrual case if (loan.isPeriodicAccrualAccountingEnabledOnLoanProduct() && (loan.getAccruedTill() == null || !DateUtils.isEqual(foreClosureDate, loan.getAccruedTill()))) { @@ -326,7 +327,7 @@ public void processAccrualsOnLoanForeClosure(@NonNull Loan loan, @NonNull LocalD // PeriodicAccruals private void addAccruals(@NonNull final Loan loan, @NonNull LocalDate tillDate, final boolean periodic, final boolean isFinal, - final boolean addJournal, final boolean chargeOnDueDate) { + final boolean addJournal, final boolean chargeOnDueDate) { if ((!isFinal && !loan.isOpen()) || loan.isNpa() || loan.isChargedOff() || !loan.isPeriodicAccrualAccountingEnabledOnLoanProduct() || loan.isContractTermination()) { return; @@ -349,7 +350,7 @@ private void addAccruals(@NonNull final Loan loan, @NonNull LocalDate tillDate, final LocalDate businessDate = DateUtils.getBusinessLocalDate(); final LocalDate accrualDate = isFinal ? (progressiveAccrual ? (DateUtils.isBefore(lastDueDate, businessDate) ? lastDueDate : businessDate) - : getFinalAccrualTransactionDate(loan)) + : getFinalAccrualTransactionDate(loan)) : tillDate; if (progressiveAccrual && accruedTill != null && !DateUtils.isAfter(tillDate, accruedTill)) { if (isFinal) { @@ -439,7 +440,7 @@ private boolean hasNoActiveChargeOnDate(Loan loan, LocalDate accrualDate) { } private AccrualPeriodsData calculateAccrualAmounts(@NonNull final Loan loan, @NonNull final LocalDate tillDate, final boolean periodic, - final boolean isFinal, final boolean chargeOnDueDate) { + final boolean isFinal, final boolean chargeOnDueDate) { final LoanProductRelatedDetail productDetail = loan.getLoanProductRelatedDetail(); final MonetaryCurrency currency = productDetail.getCurrency(); final LoanScheduleGenerator scheduleGenerator = loanScheduleFactory.create(productDetail.getLoanScheduleType(), @@ -459,18 +460,18 @@ private AccrualPeriodsData calculateAccrualAmounts(@NonNull final Loan loan, @No @NonNull private List getInstallmentsToAccrue(@NonNull final Loan loan, @NonNull final LocalDate tillDate, - final boolean periodic, final boolean chargeOnDueDate) { + final boolean periodic, final boolean chargeOnDueDate) { final LocalDate organisationStartDate = this.configurationDomainService.retrieveOrganisationStartDate(); final int firstInstallmentNumber = fetchFirstNormalInstallmentNumber(loan.getRepaymentScheduleInstallments()); return loan.getRepaymentScheduleInstallments(i -> !i.isDownPayment() && (!chargeOnDueDate || (periodic ? !isBeforePeriod(tillDate, i, i.getInstallmentNumber().equals(firstInstallmentNumber)) - : isFullPeriod(tillDate, i))) + : isFullPeriod(tillDate, i))) && !isAfterPeriod(organisationStartDate, i)); } private void addInterestAccrual(@NonNull final Loan loan, @NonNull final LocalDate tillDate, - final LoanScheduleGenerator scheduleGenerator, @NonNull final LoanRepaymentScheduleInstallment installment, - @NonNull final AccrualPeriodsData accrualPeriods) { + final LoanScheduleGenerator scheduleGenerator, @NonNull final LoanRepaymentScheduleInstallment installment, + @NonNull final AccrualPeriodsData accrualPeriods) { // No interest, no need for calculations if (!loan.isInterestBearing()) { return; @@ -480,9 +481,9 @@ private void addInterestAccrual(@NonNull final Loan loan, @NonNull final LocalDa if (installment.isAdditional() || (installment.isReAged() && loanReAgeParameter != null && !(LoanReAgeInterestHandlingType.EQUAL_AMORTIZATION_FULL_INTEREST.equals(loanReAgeParameter.getInterestHandlingType()) - || LoanReAgeInterestHandlingType.EQUAL_AMORTIZATION_PAYABLE_INTEREST - .equals(loanReAgeParameter.getInterestHandlingType()) - || LoanReAgeInterestHandlingType.DEFAULT.equals(loanReAgeParameter.getInterestHandlingType())))) { + || LoanReAgeInterestHandlingType.EQUAL_AMORTIZATION_PAYABLE_INTEREST + .equals(loanReAgeParameter.getInterestHandlingType()) + || LoanReAgeInterestHandlingType.DEFAULT.equals(loanReAgeParameter.getInterestHandlingType())))) { return; } final AccrualPeriodData period = accrualPeriods.getPeriodByInstallmentNumber(installment.getInstallmentNumber()); @@ -526,7 +527,7 @@ private void addInterestAccrual(@NonNull final Loan loan, @NonNull final LocalDa @NonNull private BigDecimal calcInterestTransactionWaivedAmount(@NonNull LoanRepaymentScheduleInstallment installment, - @NonNull LocalDate tillDate) { + @NonNull LocalDate tillDate) { Predicate transactionPredicate = t -> !t.isReversed() && t.isInterestWaiver() && !DateUtils.isAfter(t.getTransactionDate(), tillDate); return installment.getLoanTransactionToRepaymentScheduleMappings().stream() @@ -536,7 +537,7 @@ private BigDecimal calcInterestTransactionWaivedAmount(@NonNull LoanRepaymentSch @NonNull private BigDecimal calcInterestUnrecognizedWaivedAmount(@NonNull LoanRepaymentScheduleInstallment installment, - @NonNull AccrualPeriodsData accrualPeriods, @NonNull LocalDate tillDate) { + @NonNull AccrualPeriodsData accrualPeriods, @NonNull LocalDate tillDate) { // unrecognized amount of the transaction is not mapped to installments LocalDate dueDate = installment.getDueDate(); LocalDate toDate = DateUtils.isBefore(dueDate, tillDate) ? dueDate : tillDate; @@ -552,7 +553,7 @@ private BigDecimal calcInterestUnrecognizedWaivedAmount(@NonNull LoanRepaymentSc @NonNull private BigDecimal calcInterestAccruedAmount(@NonNull LoanRepaymentScheduleInstallment installment, - @NonNull AccrualPeriodsData accrualPeriods, @NonNull LocalDate tillDate) { + @NonNull AccrualPeriodsData accrualPeriods, @NonNull LocalDate tillDate) { Loan loan = installment.getLoan(); if (isProgressiveAccrual(loan)) { BigDecimal totalAccrued = loanTransactionRepository.findTotalInterestAccruedAmount(loan); @@ -569,7 +570,7 @@ private BigDecimal calcInterestAccruedAmount(@NonNull LoanRepaymentScheduleInsta } private void addChargeAccrual(@NonNull final Loan loan, @NonNull final LocalDate tillDate, final boolean chargeOnDueDate, - @NonNull final LoanRepaymentScheduleInstallment installment, @NonNull final AccrualPeriodsData accrualPeriods) { + @NonNull final LoanRepaymentScheduleInstallment installment, @NonNull final AccrualPeriodsData accrualPeriods) { final AccrualPeriodData period = accrualPeriods.getPeriodByInstallmentNumber(installment.getInstallmentNumber()); final LocalDate dueDate = installment.getDueDate(); final Collection loanCharges = loan @@ -583,13 +584,13 @@ private void addChargeAccrual(@NonNull final Loan loan, @NonNull final LocalDate } private void addChargeAccrual(@NonNull final LoanCharge loanCharge, @NonNull final LocalDate tillDate, final boolean chargeOnDueDate, - @NonNull final LoanRepaymentScheduleInstallment installment, @NonNull final AccrualPeriodsData accrualPeriods) { + @NonNull final LoanRepaymentScheduleInstallment installment, @NonNull final AccrualPeriodsData accrualPeriods) { final MonetaryCurrency currency = accrualPeriods.getCurrency(); final Integer firstInstallmentNumber = accrualPeriods.getFirstInstallmentNumber(); final boolean installmentFee = loanCharge.isInstalmentFee(); final LoanRepaymentScheduleInstallment dueInstallment = (installmentFee || chargeOnDueDate) ? installment : loanCharge.getLoan().getRepaymentScheduleInstallment( - i -> isInPeriod(loanCharge.getDueDate(), i, i.getInstallmentNumber().equals(firstInstallmentNumber))); + i -> isInPeriod(loanCharge.getDueDate(), i, i.getInstallmentNumber().equals(firstInstallmentNumber))); final AccrualPeriodData duePeriod = accrualPeriods.getPeriodByInstallmentNumber(dueInstallment.getInstallmentNumber()); final boolean isFullPeriod = isFullPeriod(tillDate, dueInstallment); @@ -637,7 +638,7 @@ private void addChargeAccrual(@NonNull final LoanCharge loanCharge, @NonNull fin @NonNull private BigDecimal calcChargeWaivedAmount(@NonNull final Collection loanChargePaidBy, - @NonNull final LocalDate tillDate) { + @NonNull final LocalDate tillDate) { return loanChargePaidBy.stream().filter(pb -> { final LoanTransaction t = pb.getLoanTransaction(); return t != null && !t.isReversed() && t.isWaiveCharge() && !DateUtils.isAfter(t.getTransactionDate(), tillDate); @@ -645,7 +646,7 @@ private BigDecimal calcChargeWaivedAmount(@NonNull final Collection accrualTransactions, - final Money interest, final Money fee, final Money penalty, final boolean adjustment) { + final LocalDate transactionDate, final AccrualPeriodData accrualPeriod, final List accrualTransactions, + final Money interest, final Money fee, final Money penalty, final boolean adjustment) { if (transaction == null) { transaction = addAccrualTransaction(loan, transactionDate, accrualPeriod, interest, fee, penalty, adjustment); if (transaction != null) { @@ -669,7 +670,7 @@ private LoanTransaction createOrMergeAccrualTransaction(@NonNull final Loan loan } private LoanTransaction addAccrualTransaction(@NonNull Loan loan, @NonNull LocalDate transactionDate, AccrualPeriodData accrualPeriod, - Money interestPortion, Money feePortion, Money penaltyPortion, boolean adjustment) { + Money interestPortion, Money feePortion, Money penaltyPortion, boolean adjustment) { interestPortion = MathUtil.negativeToZero(interestPortion); BigDecimal interest = MathUtil.toBigDecimal(interestPortion); feePortion = MathUtil.negativeToZero(feePortion); @@ -692,7 +693,7 @@ private LoanTransaction addAccrualTransaction(@NonNull Loan loan, @NonNull Local } private void mergeAccrualTransaction(@NonNull final LoanTransaction transaction, final AccrualPeriodData accrualPeriod, - Money interestPortion, Money feePortion, Money penaltyPortion, final boolean adjustment) { + Money interestPortion, Money feePortion, Money penaltyPortion, final boolean adjustment) { interestPortion = MathUtil.negativeToZero(interestPortion); feePortion = MathUtil.negativeToZero(feePortion); penaltyPortion = MathUtil.negativeToZero(penaltyPortion); @@ -706,7 +707,7 @@ private void mergeAccrualTransaction(@NonNull final LoanTransaction transaction, } private void addTransactionMappings(@NonNull final LoanTransaction transaction, final AccrualPeriodData accrualPeriod, - final boolean adjustment) { + final boolean adjustment) { if (accrualPeriod == null) { return; } @@ -719,7 +720,7 @@ private void addTransactionMappings(@NonNull final LoanTransaction transaction, } private void addPaidByMappings(@NonNull final LoanTransaction transaction, final LoanRepaymentScheduleInstallment installment, - final AccrualPeriodData accrualPeriod, final boolean adjustment) { + final AccrualPeriodData accrualPeriod, final boolean adjustment) { final Loan loan = installment.getLoan(); final MonetaryCurrency currency = loan.getCurrency(); for (AccrualChargeData accrualCharge : accrualPeriod.getCharges()) { @@ -880,8 +881,8 @@ private void reprocessNonPeriodicAccruals(Loan loan, final List } private void checkAndUpdateAccrualsForInstallment(Loan loan, List accrualTransactions, - List installments, boolean isBasedOnSubmittedOnDate, - LoanRepaymentScheduleInstallment installment, final boolean addEvent) { + List installments, boolean isBasedOnSubmittedOnDate, + LoanRepaymentScheduleInstallment installment, final boolean addEvent) { MonetaryCurrency currency = loan.getCurrency(); Money zero = Money.zero(currency); Money interest = zero; @@ -912,13 +913,13 @@ private void checkAndUpdateAccrualsForInstallment(Loan loan, List extractInterestRecalcul } private void addUpdateIncomeAndAccrualTransaction(Loan loan, LoanInterestRecalcualtionAdditionalDetails compoundingDetail, - LocalDate lastCompoundingDate, boolean addEvent) { + LocalDate lastCompoundingDate, boolean addEvent) { BigDecimal interest = BigDecimal.ZERO; BigDecimal fee = BigDecimal.ZERO; BigDecimal penalties = BigDecimal.ZERO; @@ -978,7 +979,7 @@ private void addUpdateIncomeAndAccrualTransaction(Loan loan, LoanInterestRecalcu } private void createUpdateIncomePostingTransaction(Loan loan, LoanInterestRecalcualtionAdditionalDetails compoundingDetail, - BigDecimal interest, BigDecimal fee, BigDecimal penalties, ExternalId externalId) { + BigDecimal interest, BigDecimal fee, BigDecimal penalties, ExternalId externalId) { final Optional incomeTransaction = loanTransactionRepository.findNonReversedByLoanAndTypesAndDate(loan, Set.of(INCOME_POSTING), compoundingDetail.getEffectiveDate()); if (incomeTransaction.isEmpty()) { @@ -999,8 +1000,8 @@ private void createUpdateIncomePostingTransaction(Loan loan, LoanInterestRecalcu } private void createUpdateAccrualTransaction(Loan loan, LoanInterestRecalcualtionAdditionalDetails compoundingDetail, - BigDecimal interest, BigDecimal fee, BigDecimal penalties, HashMap feeDetails, ExternalId externalId, - boolean addEvent) { + BigDecimal interest, BigDecimal fee, BigDecimal penalties, HashMap feeDetails, ExternalId externalId, + boolean addEvent) { if (configurationDomainService.isExternalIdAutoGenerationEnabled()) { externalId = ExternalId.generate(); } @@ -1063,7 +1064,7 @@ private void processIncomeAndAccrualTransactionOnLoanClosure(Loan loan) { } private void determineCumulativeIncomeFromInstallments(final Loan loan, - final Map cumulativeIncomeFromInstallments) { + final Map cumulativeIncomeFromInstallments) { BigDecimal interest = BigDecimal.ZERO; BigDecimal fee = BigDecimal.ZERO; BigDecimal penalty = BigDecimal.ZERO; @@ -1079,7 +1080,7 @@ private void determineCumulativeIncomeFromInstallments(final Loan loan, } private void createIncomePostingAndAccrualTransactionOnLoanClosure(Loan loan, LocalDate closedDate, BigDecimal interestToPost, - BigDecimal feeToPost, BigDecimal penaltyToPost, BigDecimal amountToPost) { + BigDecimal feeToPost, BigDecimal penaltyToPost, BigDecimal amountToPost) { ExternalId externalId = ExternalId.empty(); boolean isExternalIdAutoGenerationEnabled = configurationDomainService.isExternalIdAutoGenerationEnabled(); @@ -1151,8 +1152,8 @@ private Map determineReceivableIncomeForeClosure(final Loan loan, } private void createAccrualTransactionAndUpdateChargesPaidBy(Loan loan, LocalDate foreClosureDate, - List newAccrualTransactions, MonetaryCurrency currency, Money interestPortion, Money feePortion, - Money penaltyPortion, Money total) { + List newAccrualTransactions, MonetaryCurrency currency, Money interestPortion, Money feePortion, + Money penaltyPortion, Money total) { ExternalId accrualExternalId = externalIdFactory.create(); LoanTransaction accrualTransaction = LoanTransaction.accrueTransaction(loan, loan.getOffice(), foreClosureDate, total.getAmount(), interestPortion.getAmount(), feePortion.getAmount(), penaltyPortion.getAmount(), accrualExternalId); @@ -1246,7 +1247,7 @@ private void determineFeeDetails(Loan loan, LocalDate fromDate, LocalDate toDate } private void updateLoanChargesPaidBy(Loan loan, LoanTransaction accrual, Map feeDetails, - LoanRepaymentScheduleInstallment installment) { + LoanRepaymentScheduleInstallment installment) { @SuppressWarnings("unchecked") List loanCharges = (List) feeDetails.get("loanCharges"); @SuppressWarnings("unchecked") @@ -1271,7 +1272,7 @@ private void updateLoanChargesPaidBy(Loan loan, LoanTransaction accrual, Map types, final LocalDate effectiveDate, - final boolean addEvent) { + final boolean addEvent) { loanTransactionRepository.findNonReversedByLoanAndTypesAndAfterDate(loan, types, effectiveDate) .forEach(transaction -> reverseAccrual(transaction, addEvent)); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAmortizationAllocationServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAmortizationAllocationServiceImpl.java index 739bf224a36..4f2fe8db0a1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAmortizationAllocationServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAmortizationAllocationServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.portfolio.loanaccount.data.AmortizationAllocationBaseTransactionDTO; import org.apache.fineract.portfolio.loanaccount.data.AmortizationAllocationMappingDTO; @@ -47,7 +48,7 @@ public class LoanAmortizationAllocationServiceImpl implements LoanAmortizationAl @Override public LoanAmortizationAllocationData retrieveLoanAmortizationAllocationsForBuyDownFeeTransaction(final Long loanTransactionId, - final Long loanId) { + final Long loanId) { final LoanTransaction loanTransaction = this.loanTransactionRepository.findByIdAndLoanId(loanTransactionId, loanId) .orElseThrow(() -> new LoanTransactionNotFoundException(loanTransactionId)); if (!LoanTransactionType.BUY_DOWN_FEE.equals(loanTransaction.getTypeOf())) { @@ -59,7 +60,7 @@ public LoanAmortizationAllocationData retrieveLoanAmortizationAllocationsForBuyD @Override public LoanAmortizationAllocationData retrieveLoanAmortizationAllocationsForCapitalizedIncomeTransaction(final Long loanTransactionId, - final Long loanId) { + final Long loanId) { final LoanTransaction loanTransaction = this.loanTransactionRepository.findByIdAndLoanId(loanTransactionId, loanId) .orElseThrow(() -> new LoanTransactionNotFoundException(loanTransactionId)); if (!LoanTransactionType.CAPITALIZED_INCOME.equals(loanTransaction.getTypeOf())) { @@ -75,7 +76,7 @@ public BigDecimal calculateAlreadyAmortizedAmount(final Long loanTransactionId, } private LoanAmortizationAllocationData retrieveLoanAmortizationAllocationData(final LoanTransaction loanTransaction, - final Long loanId) { + final Long loanId) { try { final Long loanTransactionId = loanTransaction.getId(); final AmortizationAllocationBaseTransactionDTO baseTransactionInfo = getBaseTransactionInfo(loanTransaction, loanId); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java index 6372116a65d..d2872b631ed 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanApplicationWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import jakarta.persistence.PersistenceException; + import java.math.BigDecimal; import java.time.LocalDate; import java.time.temporal.ChronoField; @@ -36,6 +37,7 @@ import java.util.Map; import java.util.Optional; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -238,15 +240,15 @@ private void createAndPersistCalendarInstanceForInterestRecalculation(final Loan } private void createCalendar(final Loan loan, LocalDate calendarStartDate, Integer recalculationFrequencyNthDay, - final Integer repeatsOnDay, final RecalculationFrequencyType recalculationFrequencyType, Integer frequency, - CalendarEntityType calendarEntityType, final String title) { + final Integer repeatsOnDay, final RecalculationFrequencyType recalculationFrequencyType, Integer frequency, + CalendarEntityType calendarEntityType, final String title) { Integer updatedRepeatsOnDay = repeatsOnDay; final CalendarFrequencyType calendarFrequencyType = switch (recalculationFrequencyType) { case DAILY -> CalendarFrequencyType.DAILY; case WEEKLY -> CalendarFrequencyType.WEEKLY; case MONTHLY -> CalendarFrequencyType.MONTHLY; case SAME_AS_REPAYMENT_PERIOD -> - CalendarFrequencyType.from(loan.getLoanProductRelatedDetail().getRepaymentPeriodFrequencyType()); + CalendarFrequencyType.from(loan.getLoanProductRelatedDetail().getRepaymentPeriodFrequencyType()); case INVALID -> CalendarFrequencyType.INVALID; }; @@ -344,7 +346,7 @@ private void modifyLinkedAccount(JsonCommand command, Map change } private void updateLinkedAccountAssociation(AccountAssociations accountAssociations, SavingsAccount savingsAccount, - Map changes) { + Map changes) { accountAssociations.updateLinkedSavingsAccount(savingsAccount); this.accountAssociationsRepository.save(accountAssociations); changes.put(LoanApiConstants.linkAccountIdParameterName, savingsAccount.getId()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAssemblerImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAssemblerImpl.java index a97a19e69fd..bc37f542f1f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAssemblerImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanAssemblerImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; + import java.math.BigDecimal; import java.time.LocalDate; import java.time.format.DateTimeFormatter; @@ -31,6 +32,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.accountnumberformat.domain.AccountNumberFormat; @@ -369,7 +371,7 @@ public void accountNumberGeneration(final JsonCommand command, final Loan loan) } private void createAndSetGLIMAccount(BigDecimal totalLoan, Loan loan, AccountNumberFormat accountNumberFormat, Group group, - BigDecimal applicationId) { + BigDecimal applicationId) { final String accountNumber = this.accountNumberGenerator.generate(loan, accountNumberFormat); loan.setAccountNumber(accountNumber + "1"); GroupLoanIndividualMonitoringAccount glimAccount = glimAccountInfoWritePlatformService.createGLIMAccount(accountNumber, group, @@ -423,7 +425,7 @@ public Staff findLoanOfficerByIdIfProvided(final Long loanOfficerId) { } private void copyAdvancedPaymentRulesIfApplicable(String transactionProcessingStrategyCode, LoanProduct loanProduct, - Loan loanApplication) { + Loan loanApplication) { if (transactionProcessingStrategyCode.equals(AdvancedPaymentScheduleTransactionProcessor.ADVANCED_PAYMENT_ALLOCATION_STRATEGY)) { List loanPaymentAllocationRules = loanProduct.getPaymentAllocationRules().stream() .map(r -> new LoanPaymentAllocationRule(loanApplication, r.getTransactionType(), r.getAllocationTypes(), diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanBuyDownFeeAmortizationEventService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanBuyDownFeeAmortizationEventService.java index 97930f5249d..65e6eaf422c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanBuyDownFeeAmortizationEventService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanBuyDownFeeAmortizationEventService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanBuyDownFeeAmortizationProcessingServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanBuyDownFeeAmortizationProcessingServiceImpl.java index 5fc4a098e6c..77741ebf139 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanBuyDownFeeAmortizationProcessingServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanBuyDownFeeAmortizationProcessingServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.ExternalId; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -117,9 +118,9 @@ public void processBuyDownFeeAmortizationTillDate(@NonNull Loan loan, @NonNull L if (!MathUtil.isZero(totalAmortizationAmount)) { LoanTransaction transaction = MathUtil.isGreaterThanZero(totalAmortizationAmount) ? LoanTransaction.buyDownFeeAmortization(loan, loan.getOffice(), tillDate, totalAmortizationAmount, - externalIdFactory.create()) + externalIdFactory.create()) : LoanTransaction.buyDownFeeAmortizationAdjustment(loan, - Money.of(loan.getCurrency(), MathUtil.negate(totalAmortizationAmount)), tillDate, externalIdFactory.create()); + Money.of(loan.getCurrency(), MathUtil.negate(totalAmortizationAmount)), tillDate, externalIdFactory.create()); loan.addLoanTransaction(transaction); transaction = loanTransactionRepository.saveAndFlush(transaction); @@ -162,7 +163,7 @@ public void processBuyDownFeeAmortizationOnLoanClosure(@NonNull final Loan loan, @Override @Transactional public void processBuyDownFeeAmortizationOnLoanChargeOff(@NonNull final Loan loan, - @NonNull final LoanTransaction chargeOffTransaction) { + @NonNull final LoanTransaction chargeOffTransaction) { LocalDate transactionDate = loan.getChargedOffOnDate(); if (transactionDate == null) { transactionDate = DateUtils.getBusinessLocalDate(); @@ -190,8 +191,8 @@ public void processBuyDownFeeAmortizationOnLoanUndoChargeOff(@NonNull final Loan loan.getLoanTransactions().stream().filter(LoanTransaction::isBuyDownFeeAmortization) .filter(transaction -> transaction.getTransactionDate().equals(loanTransaction.getTransactionDate()) && transaction.getLoanTransactionRelations().stream() - .anyMatch(rel -> LoanTransactionRelationTypeEnum.RELATED.equals(rel.getRelationType()) - && rel.getToTransaction().equals(loanTransaction))) + .anyMatch(rel -> LoanTransactionRelationTypeEnum.RELATED.equals(rel.getRelationType()) + && rel.getToTransaction().equals(loanTransaction))) .forEach(transaction -> { transaction.reverse(); journalEntryPoster.postJournalEntriesForLoanTransaction(transaction, false, false); @@ -206,7 +207,7 @@ public void processBuyDownFeeAmortizationOnLoanUndoChargeOff(@NonNull final Loan } private Optional createBuyDownFeeAmortizationTransaction(final Loan loan, final LocalDate transactionDate, - final boolean isChargeOff, final LoanTransaction chargeOffTransaction) { + final boolean isChargeOff, final LoanTransaction chargeOffTransaction) { final ExternalId externalId = externalIdFactory.create(); final List balances = loanBuyDownFeeBalanceRepository.findAllByLoanIdAndClosedFalse(loan.getId()); @@ -262,7 +263,7 @@ private Optional createBuyDownFeeAmortizationTransaction(final final LoanTransaction amortizationTransaction = MathUtil.isGreaterThanZero(totalUnrecognizedAmount) ? LoanTransaction.buyDownFeeAmortization(loan, loan.getOffice(), transactionDate, totalUnrecognizedAmount, externalId) : LoanTransaction.buyDownFeeAmortizationAdjustment(loan, - Money.of(loan.getCurrency(), MathUtil.negate(totalUnrecognizedAmount)), transactionDate, externalId); + Money.of(loan.getCurrency(), MathUtil.negate(totalUnrecognizedAmount)), transactionDate, externalId); if (isChargeOff) { amortizationTransaction.getLoanTransactionRelations().add(LoanTransactionRelation.linkToTransaction(amortizationTransaction, chargeOffTransaction, LoanTransactionRelationTypeEnum.RELATED)); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationEventService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationEventService.java index dcdbebcf6fc..528890eb090 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationEventService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationEventService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationProcessingServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationProcessingServiceImpl.java index a7377d97bc2..559cdd7ce7a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationProcessingServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanCapitalizedIncomeAmortizationProcessingServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; import org.apache.fineract.infrastructure.core.domain.ExternalId; @@ -84,7 +85,7 @@ public void processCapitalizedIncomeAmortizationOnLoanClosure(@NonNull final Loa @Override @Transactional public void processCapitalizedIncomeAmortizationOnLoanChargeOff(@NonNull final Loan loan, - @NonNull final LoanTransaction chargeOffTransaction) { + @NonNull final LoanTransaction chargeOffTransaction) { LocalDate transactionDate = loan.getChargedOffOnDate(); if (transactionDate == null) { transactionDate = DateUtils.getBusinessLocalDate(); @@ -105,7 +106,7 @@ public void processCapitalizedIncomeAmortizationOnLoanChargeOff(@NonNull final L } private Optional createCapitalizedIncomeAmortizationTransaction(final Loan loan, final LocalDate transactionDate, - final boolean isChargeOff, final LoanTransaction chargeOffTransaction) { + final boolean isChargeOff, final LoanTransaction chargeOffTransaction) { ExternalId externalId = ExternalId.empty(); if (configurationDomainService.isExternalIdAutoGenerationEnabled()) { @@ -166,9 +167,9 @@ private Optional createCapitalizedIncomeAmortizationTransaction final LoanTransaction amortizationTransaction = MathUtil.isGreaterThanZero(totalUnrecognizedAmount) ? LoanTransaction.capitalizedIncomeAmortization(loan, loan.getOffice(), transactionDate, totalUnrecognizedAmount, - externalId) + externalId) : LoanTransaction.capitalizedIncomeAmortizationAdjustment(loan, - Money.of(loan.getCurrency(), MathUtil.negate(totalUnrecognizedAmount)), transactionDate, externalId); + Money.of(loan.getCurrency(), MathUtil.negate(totalUnrecognizedAmount)), transactionDate, externalId); if (isChargeOff) { amortizationTransaction.getLoanTransactionRelations().add(LoanTransactionRelation.linkToTransaction(amortizationTransaction, chargeOffTransaction, LoanTransactionRelationTypeEnum.RELATED)); @@ -191,8 +192,8 @@ public void processCapitalizedIncomeAmortizationOnLoanUndoChargeOff(@NonNull fin loan.getLoanTransactions().stream().filter(LoanTransaction::isCapitalizedIncomeAmortization) .filter(transaction -> transaction.getTransactionDate().equals(loanTransaction.getTransactionDate()) && transaction.getLoanTransactionRelations().stream() - .anyMatch(rel -> LoanTransactionRelationTypeEnum.RELATED.equals(rel.getRelationType()) - && rel.getToTransaction().equals(loanTransaction))) + .anyMatch(rel -> LoanTransactionRelationTypeEnum.RELATED.equals(rel.getRelationType()) + && rel.getToTransaction().equals(loanTransaction))) .forEach(transaction -> { transaction.reverse(); final LoanAdjustTransactionBusinessEvent.Data data = new LoanAdjustTransactionBusinessEvent.Data(transaction); @@ -210,7 +211,7 @@ public void processCapitalizedIncomeAmortizationOnLoanUndoChargeOff(@NonNull fin @Override @Transactional public void processCapitalizedIncomeAmortizationTillDate(@NonNull final Loan loan, @NonNull final LocalDate tillDate, - final boolean addJournal) { + final boolean addJournal) { final List balances = loanCapitalizedIncomeBalanceRepository .findAllByLoanIdAndClosedFalse(loan.getId()); @@ -268,9 +269,9 @@ public void processCapitalizedIncomeAmortizationTillDate(@NonNull final Loan loa if (!MathUtil.isZero(totalAmortizationAmount)) { LoanTransaction transaction = MathUtil.isGreaterThanZero(totalAmortizationAmount) ? LoanTransaction.capitalizedIncomeAmortization(loan, loan.getOffice(), tillDate, totalAmortizationAmount, - externalIdFactory.create()) + externalIdFactory.create()) : LoanTransaction.capitalizedIncomeAmortizationAdjustment(loan, - Money.of(loan.getCurrency(), MathUtil.negate(totalAmortizationAmount)), tillDate, externalIdFactory.create()); + Money.of(loan.getCurrency(), MathUtil.negate(totalAmortizationAmount)), tillDate, externalIdFactory.create()); loan.addLoanTransaction(transaction); transaction = loanTransactionRepository.saveAndFlush(transaction); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeAssembler.java index 3031282854c..c2589bf4fb6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeAssembler.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; @@ -29,6 +30,7 @@ import java.util.List; import java.util.Locale; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.collections4.CollectionUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -256,7 +258,7 @@ public LoanCharge createNewFromJson(final Loan loan, final Charge chargeDefiniti } public LoanCharge createNewFromJson(final Loan loan, final Charge chargeDefinition, final JsonCommand command, - final LocalDate dueDate) { + final LocalDate dueDate) { final Locale locale = command.extractLocale(); final BigDecimal amount = command.bigDecimalValueOfParameterNamed("amount", locale); @@ -271,7 +273,7 @@ public LoanCharge createNewFromJson(final Loan loan, final Charge chargeDefiniti } else { amountPercentageAppliedTo = loan.getPrincipal().getAmount(); } - break; + break; case PERCENT_OF_AMOUNT_AND_INTEREST: if (command.hasParameter("principal") && command.hasParameter("interest")) { amountPercentageAppliedTo = command.bigDecimalValueOfParameterNamed("principal") @@ -279,16 +281,16 @@ public LoanCharge createNewFromJson(final Loan loan, final Charge chargeDefiniti } else { amountPercentageAppliedTo = loan.getPrincipal().getAmount().add(loan.getTotalInterest()); } - break; + break; case PERCENT_OF_INTEREST: if (command.hasParameter("interest")) { amountPercentageAppliedTo = command.bigDecimalValueOfParameterNamed("interest"); } else { amountPercentageAppliedTo = loan.getTotalInterest(); } - break; + break; default: - break; + break; } BigDecimal loanCharge = BigDecimal.ZERO; @@ -323,8 +325,8 @@ public LoanCharge createNewFromJson(final Loan loan, final Charge chargeDefiniti * loanPrincipal is required for charges that are percentage based */ public LoanCharge createNewWithoutLoan(final Charge chargeDefinition, final BigDecimal loanPrincipal, final BigDecimal amount, - final ChargeTimeType chargeTime, final ChargeCalculationType chargeCalculation, final LocalDate dueDate, - final ChargePaymentMode chargePaymentMode, final Integer numberOfRepayments, final ExternalId externalId) { + final ChargeTimeType chargeTime, final ChargeCalculationType chargeCalculation, final LocalDate dueDate, + final ChargePaymentMode chargePaymentMode, final Integer numberOfRepayments, final ExternalId externalId) { return loanChargeService.create(null, chargeDefinition, loanPrincipal, amount, chargeTime, chargeCalculation, dueDate, chargePaymentMode, numberOfRepayments, BigDecimal.ZERO, externalId); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeReadPlatformServiceImpl.java index efe69029951..7cf6f2f5eb5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.ExternalId; @@ -248,7 +249,7 @@ public LoanInstallmentChargeData mapRow(final ResultSet rs, @SuppressWarnings("u @Override public Collection retrieveOverdueInstallmentChargeFrequencyNumber(final Loan loan, final Charge charge, - final Integer periodNumber) { + final Integer periodNumber) { List frequencyNumbers = new ArrayList<>(); for (LoanCharge loanCharge : loan.getLoanCharges()) { @@ -263,7 +264,7 @@ public Collection retrieveOverdueInstallmentChargeFrequencyNumber(final @Override public Collection retrieveLoanChargesPaidBy(Long chargeId, final LoanTransactionType transactionType, - final Integer installmentNumber) { + final Integer installmentNumber) { LoanChargesPaidByMapper rm = new LoanChargesPaidByMapper(); StringBuilder sb = new StringBuilder(100); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeWritePlatformServiceImpl.java index d9523f2d00e..14fdb97157e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanChargeWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.time.LocalDate; import java.time.format.DateTimeFormatter; @@ -33,6 +34,7 @@ import java.util.Map; import java.util.Optional; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -606,7 +608,7 @@ public CommandProcessingResult deleteLoanCharge(final Long loanId, final Long lo @Transactional @Override public CommandProcessingResult payLoanCharge(final Long loanId, Long loanChargeId, final JsonCommand command, - final boolean isChargeIdIncludedInJson) { + final boolean isChargeIdIncludedInJson) { this.loanChargeApiJsonValidator.validateChargePaymentTransaction(command.json(), isChargeIdIncludedInJson); if (isChargeIdIncludedInJson) { @@ -864,7 +866,7 @@ public void applyOverdueChargesForLoan(final Long loanId, Collection changes, final Loan loan, final LoanTransaction loanTransaction, - final LoanChargePaidBy loanChargePaidBy) { + final LoanChargePaidBy loanChargePaidBy) { switch (loanChargePaidBy.getLoanCharge().getChargeTimeType()) { case SPECIFIED_DUE_DATE -> undoSpecifiedDueDateCharge(changes, loan, loanTransaction, loanChargePaidBy); case INSTALMENT_FEE -> undoInstalmentFee(changes, loan, loanTransaction, loanChargePaidBy); @@ -904,7 +906,7 @@ private void undoWaivedCharge(final Map changes, final Loan loan } private void undoInstalmentFee(Map changes, Loan loan, LoanTransaction loanTransaction, - LoanChargePaidBy loanChargePaidBy) { + LoanChargePaidBy loanChargePaidBy) { LoanCharge loanCharge = loanChargePaidBy.getLoanCharge(); final Integer installmentNumber = loanChargePaidBy.getInstallmentNumber(); LoanInstallmentCharge chargePerInstallment; @@ -957,7 +959,7 @@ private void undoInstalmentFee(Map changes, Loan loan, LoanTrans } private void undoSpecifiedDueDateCharge(final Map changes, final Loan loan, final LoanTransaction loanTransaction, - final LoanChargePaidBy loanChargePaidBy) { + final LoanChargePaidBy loanChargePaidBy) { LoanCharge loanCharge = loanChargePaidBy.getLoanCharge(); BigDecimal amountWaived = loanCharge.getAmountWaived(loan.getCurrency()).getAmount(); if (!loanCharge.isWaived() || amountWaived == null) { @@ -979,7 +981,7 @@ private void undoSpecifiedDueDateCharge(final Map changes, final } private void updateRepaymentInstalmentWithWaivedAmount(final LoanCharge loanCharge, final LoanRepaymentScheduleInstallment installment, - final BigDecimal amountWaived) { + final BigDecimal amountWaived) { if (loanCharge.isPenaltyCharge()) { // Get the penalty charges waived amount per installment BigDecimal penaltyChargesWaivedAmount = installment.getPenaltyChargesWaived(loanCharge.getLoan().getCurrency()).getAmount(); @@ -1081,7 +1083,7 @@ private boolean addCharge(final Loan loan, final Charge chargeDefinition, LoanCh } private LoanOverdueDTO applyChargeToOverdueLoanInstallment(final Loan loan, final Long loanChargeId, final Integer periodNumber, - final JsonCommand command) { + final JsonCommand command) { boolean runInterestRecalculation = false; final Charge chargeDefinition = this.chargeRepository.findOneWithNotFoundDetection(loanChargeId); @@ -1210,7 +1212,7 @@ private JsonCommand adaptLoanChargeRefundCommandForFurtherRepaymentProcessing(Js } private BigDecimal loanChargeValidateRefundAmount(LoanCharge loanCharge, LoanInstallmentCharge installmentChargeEntry, - BigDecimal transactionAmount) { + BigDecimal transactionAmount) { // if transactionAmount not provided return max refundable amount (amount paid minus previous refunds) BigDecimal chargeAmountPaid; BigDecimal chargeAmountRefunded = BigDecimal.ZERO; @@ -1374,8 +1376,8 @@ private void checkClientOrGroupActive(final Loan loan) { } public LoanTransaction waiveLoanCharge(final Loan loan, final LoanCharge loanCharge, final Map changes, - final Integer loanInstallmentNumber, final ScheduleGeneratorDTO scheduleGeneratorDTO, final Money accruedCharge, - final ExternalId externalId) { + final Integer loanInstallmentNumber, final ScheduleGeneratorDTO scheduleGeneratorDTO, final Money accruedCharge, + final ExternalId externalId) { final Money amountWaived = loanCharge.waive(loan.getCurrency(), loanInstallmentNumber); changes.put("amount", amountWaived.getAmount()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanDisbursementDetailsAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanDisbursementDetailsAssembler.java index 45a510b40bc..4f9d99896ce 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanDisbursementDetailsAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanDisbursementDetailsAssembler.java @@ -6,9 +6,9 @@ * 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 @@ -20,11 +20,13 @@ import com.google.gson.JsonArray; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; import java.util.Locale; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; import org.apache.fineract.portfolio.loanaccount.api.LoanApiConstants; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanDisbursementService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanDisbursementService.java index 66b40cd6797..ee9f036ae9b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanDisbursementService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanDisbursementService.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.Collection; @@ -35,6 +36,7 @@ import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -123,7 +125,7 @@ public void updateDisbursementDetails(final Loan loan, final JsonCommand jsonCom } public Money adjustDisburseAmount(final Loan loan, @NonNull final JsonCommand command, - @NonNull final LocalDate actualDisbursementDate) { + @NonNull final LocalDate actualDisbursementDate) { Money disburseAmount = loan.getLoanRepaymentScheduleDetail().getPrincipal().zero(); final BigDecimal principalDisbursed = command.bigDecimalValueOfParameterNamed(LoanApiConstants.principalDisbursedParameterName); if (loan.getActualDisbursementDate() == null || DateUtils.isBefore(actualDisbursementDate, loan.getActualDisbursementDate())) { @@ -283,7 +285,7 @@ public void handleDisbursementTransaction(final Loan loan, final LocalDate disbu } private void createOrUpdateDisbursementDetails(final Loan loan, final Long disbursementID, final Map actualChanges, - final LocalDate expectedDisbursementDate, final BigDecimal principal, final List existingDisbursementList) { + final LocalDate expectedDisbursementDate, final BigDecimal principal, final List existingDisbursementList) { if (disbursementID != null) { LoanDisbursementDetails loanDisbursementDetail = loan.fetchLoanDisbursementsById(disbursementID); existingDisbursementList.remove(disbursementID); @@ -322,7 +324,7 @@ private void createOrUpdateDisbursementDetails(final Loan loan, final Long disbu } private void removeDisbursementAndAssociatedCharges(final Loan loan, final Map actualChanges, - final List disbursementList, final List loanChargeIds, final int chargeIdLength, final boolean removeAllCharges) { + final List disbursementList, final List loanChargeIds, final int chargeIdLength, final boolean removeAllCharges) { if (removeAllCharges) { final LoanCharge[] tempCharges = new LoanCharge[loan.getCharges().size()]; loan.getCharges().toArray(tempCharges); @@ -424,7 +426,7 @@ private Map parseDisbursementDetails(final JsonObject jsonObject } private boolean hasMultipleOrPreDefinedDisbursementDetails(final Loan loan, - final Collection undisbursedDetails) { + final Collection undisbursedDetails) { Collection allDisbursementDetails = loan.getDisbursementDetails(); if (undisbursedDetails.size() > 1) { @@ -473,7 +475,7 @@ public static boolean hasMultipleTranchesOnSameDate(Collection disbursementDetails, - LocalDate actualDisbursementDate) { + LocalDate actualDisbursementDate) { if (disbursementDetails == null || disbursementDetails.size() <= 1 || actualDisbursementDate == null) { return false; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanJournalEntryPosterImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanJournalEntryPosterImpl.java index fc2a096e076..c339833a161 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanJournalEntryPosterImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanJournalEntryPosterImpl.java @@ -6,9 +6,9 @@ * 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 @@ -34,14 +34,14 @@ public class LoanJournalEntryPosterImpl implements LoanJournalEntryPoster { @Override public void postJournalEntriesForLoanTransaction(final LoanTransaction loanTransaction, final boolean isAccountTransfer, - final boolean isLoanToLoanTransfer) { + final boolean isLoanToLoanTransfer) { this.journalEntryWritePlatformService.createJournalEntriesForLoanTransaction(loanTransaction, isAccountTransfer, isLoanToLoanTransfer); } @Override public void postJournalEntriesForExternalOwnerTransfer(final Loan loan, final Object externalAssetOwnerTransfer, - final Object previousOwner) { + final Object previousOwner) { // Cast to proper types final ExternalAssetOwnerTransfer transfer = (ExternalAssetOwnerTransfer) externalAssetOwnerTransfer; final ExternalAssetOwner prevOwner = (ExternalAssetOwner) previousOwner; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanOfficerService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanOfficerService.java index bbd3f9fd29a..01130077aee 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanOfficerService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanOfficerService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.Optional; + import lombok.RequiredArgsConstructor; import org.apache.fineract.organisation.staff.domain.Staff; import org.apache.fineract.portfolio.loanaccount.domain.Loan; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanPointInTimeService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanPointInTimeService.java index acbd4ad9c63..74bcf725019 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanPointInTimeService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanPointInTimeService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import org.apache.fineract.portfolio.loanaccount.data.LoanPointInTimeData; public interface LoanPointInTimeService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanPointInTimeServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanPointInTimeServiceImpl.java index 94f383c3c12..86a840ff454 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanPointInTimeServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanPointInTimeServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,11 +20,13 @@ import jakarta.persistence.EntityManager; import jakarta.persistence.FlushModeType; + import java.time.LocalDate; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.businessdate.domain.BusinessDateType; import org.apache.fineract.infrastructure.core.data.ApiParameterError; 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..a7ffc3bd20c 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 @@ -6,9 +6,9 @@ * 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 @@ -20,12 +20,14 @@ import com.google.gson.JsonArray; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.accounting.common.AccountingRuleType; @@ -75,9 +77,9 @@ public class LoanProductAssembler { private final LoanProductGuaranteeDetailsAssembler guaranteeDetailsAssembler; public LoanProduct assembleFromJson(final Fund fund, final String loanTransactionProcessingStrategy, final List productCharges, - final JsonCommand command, final AprCalculator aprCalculator, FloatingRate floatingRate, final List productRates, - List loanProductPaymentAllocationRules, - List loanProductCreditAllocationRules) { + final JsonCommand command, final AprCalculator aprCalculator, FloatingRate floatingRate, final List productRates, + List loanProductPaymentAllocationRules, + List loanProductCreditAllocationRules) { final String name = command.stringValueOfParameterNamed("name"); final String shortName = command.stringValueOfParameterNamed(LoanProductConstants.SHORT_NAME); @@ -361,7 +363,7 @@ public LoanProduct assembleFromJson(final Fund fund, final String loanTransactio } private void populateBorrowerCycleVariations(final JsonCommand command, - final Set loanProductBorrowerCycleVariations) { + final Set loanProductBorrowerCycleVariations) { assemblePrincipalVariations(command, loanProductBorrowerCycleVariations); assembleRepaymentVariations(command, loanProductBorrowerCycleVariations); @@ -370,28 +372,28 @@ private void populateBorrowerCycleVariations(final JsonCommand command, } private void assembleInterestRateVariations(final JsonCommand command, - final Set loanProductBorrowerCycleVariations) { + final Set loanProductBorrowerCycleVariations) { assembleVariations(command, loanProductBorrowerCycleVariations, LoanProductParamType.INTERESTRATE.getValue(), LoanProductConstants.INTEREST_RATE_VARIATIONS_FOR_BORROWER_CYCLE_PARAMETER_NAME); } private void assembleRepaymentVariations(final JsonCommand command, - final Set loanProductBorrowerCycleVariations) { + final Set loanProductBorrowerCycleVariations) { assembleVariations(command, loanProductBorrowerCycleVariations, LoanProductParamType.REPAYMENT.getValue(), LoanProductConstants.NUMBER_OF_REPAYMENT_VARIATIONS_FOR_BORROWER_CYCLE_PARAMETER_NAME); } private void assemblePrincipalVariations(final JsonCommand command, - final Set loanProductBorrowerCycleVariations) { + final Set loanProductBorrowerCycleVariations) { assembleVariations(command, loanProductBorrowerCycleVariations, LoanProductParamType.PRINCIPAL.getValue(), LoanProductConstants.PRINCIPAL_VARIATIONS_FOR_BORROWER_CYCLE_PARAMETER_NAME); } private void assembleVariations(final JsonCommand command, - final Set loanProductBorrowerCycleVariations, Integer paramType, - String variationParameterName) { + final Set loanProductBorrowerCycleVariations, Integer paramType, + String variationParameterName) { if (command.parameterExists(variationParameterName)) { final JsonArray variationArray = command.arrayOfParameterNamed(variationParameterName); if (variationArray != null && variationArray.size() > 0) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductFloatingRatesUpdateUtil.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductFloatingRatesUpdateUtil.java index 7a62bbc6b99..367a71ddad1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductFloatingRatesUpdateUtil.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductFloatingRatesUpdateUtil.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.util.LinkedHashMap; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.portfolio.floatingrates.domain.FloatingRate; @@ -32,7 +33,7 @@ public class LoanProductFloatingRatesUpdateUtil { public Map update(LoanProductFloatingRates loanProductFloatingRates, JsonCommand command, - FloatingRate floatingRate) { + FloatingRate floatingRate) { final Map actualChanges = new LinkedHashMap<>(20); if (floatingRate != null) { final String floatingRatesId = "floatingRatesId"; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductGuaranteeDetailsAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductGuaranteeDetailsAssembler.java index 6a61f95d14d..4dc026e3918 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductGuaranteeDetailsAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductGuaranteeDetailsAssembler.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.math.BigDecimal; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.portfolio.loanproduct.LoanProductConstants; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductGuaranteeDetailsUpdateUtil.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductGuaranteeDetailsUpdateUtil.java index 1b0a57ef9b5..20f0fc8ba18 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductGuaranteeDetailsUpdateUtil.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductGuaranteeDetailsUpdateUtil.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.portfolio.loanproduct.LoanProductConstants; @@ -31,7 +32,7 @@ public class LoanProductGuaranteeDetailsUpdateUtil { public void update(final LoanProductGuaranteeDetails loanProductGuaranteeDetails, final JsonCommand command, - final Map actualChanges) { + final Map actualChanges) { if (command.isChangeInBigDecimalParameterNamed(LoanProductConstants.mandatoryGuaranteeParamName, loanProductGuaranteeDetails.getMandatoryGuarantee())) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductInterestRecalculationDetailsAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductInterestRecalculationDetailsAssembler.java index 732cedb4c11..0ac63675f34 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductInterestRecalculationDetailsAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductInterestRecalculationDetailsAssembler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductInterestRecalculationDetailsUpdateUtil.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductInterestRecalculationDetailsUpdateUtil.java index c02594d79ce..fc3994154d0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductInterestRecalculationDetailsUpdateUtil.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductInterestRecalculationDetailsUpdateUtil.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.portfolio.loanproduct.LoanProductConstants; @@ -34,7 +35,7 @@ public class LoanProductInterestRecalculationDetailsUpdateUtil { public void update(final LoanProductInterestRecalculationDetails loanProductInterestRecalculationDetails, final JsonCommand command, - final Map actualChanges, final String localeAsInput) { + final Map actualChanges, final String localeAsInput) { if (command.isChangeInIntegerParameterNamed(LoanProductConstants.interestRecalculationCompoundingMethodParameterName, loanProductInterestRecalculationDetails.getInterestRecalculationCompoundingMethod())) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductMinMaxConstraintsUpdateUtil.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductMinMaxConstraintsUpdateUtil.java index 08202d5030c..bc2eaa75f18 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductMinMaxConstraintsUpdateUtil.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductMinMaxConstraintsUpdateUtil.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.util.LinkedHashMap; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.portfolio.loanproduct.domain.LoanProductMinMaxConstraints; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductRelatedDetailUpdateUtil.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductRelatedDetailUpdateUtil.java index 3133bf0077b..33cf13a8bee 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductRelatedDetailUpdateUtil.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductRelatedDetailUpdateUtil.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.util.LinkedHashMap; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; @@ -47,7 +48,7 @@ public class LoanProductRelatedDetailUpdateUtil { public Map updateLoanRepaymentSchedule(final LoanProductRelatedDetail loanRepaymentScheduleDetail, - final JsonCommand command, final AprCalculator aprCalculator) { + final JsonCommand command, final AprCalculator aprCalculator) { final Map actualChanges = new LinkedHashMap<>(20); @@ -370,7 +371,7 @@ public Map updateLoanRepaymentSchedule(final LoanProductRelatedD } public void updateInterestRateDerivedFields(final LoanProductRelatedDetail loanRepaymentScheduleDetail, - final AprCalculator aprCalculator) { + final AprCalculator aprCalculator) { BigDecimal annualNominalInterestRate = aprCalculator.calculateFrom(loanRepaymentScheduleDetail.getInterestPeriodFrequencyType(), loanRepaymentScheduleDetail.getNominalInterestRatePerPeriod(), loanRepaymentScheduleDetail.getNumberOfRepayments(), loanRepaymentScheduleDetail.getRepayEvery(), loanRepaymentScheduleDetail.getRepaymentPeriodFrequencyType(), diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductTrancheDetailsUpdateUtil.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductTrancheDetailsUpdateUtil.java index 37f4dfd8c67..6f2a5aeed4d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductTrancheDetailsUpdateUtil.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductTrancheDetailsUpdateUtil.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.portfolio.loanproduct.LoanProductConstants; @@ -31,7 +32,7 @@ public class LoanProductTrancheDetailsUpdateUtil { public void update(final LoanProductTrancheDetails loanProductTrancheDetails, final JsonCommand command, - final Map actualChanges) { + final Map actualChanges) { if (command.isChangeInBooleanParameterNamed(LoanProductConstants.MULTI_DISBURSE_LOAN_PARAMETER_NAME, loanProductTrancheDetails.isMultiDisburseLoan())) { final boolean newValue = command.booleanPrimitiveValueOfParameterNamed(LoanProductConstants.MULTI_DISBURSE_LOAN_PARAMETER_NAME); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductUpdateUtil.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductUpdateUtil.java index ac28a3ea2fb..9c5f5112606 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductUpdateUtil.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductUpdateUtil.java @@ -6,9 +6,9 @@ * 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 @@ -20,11 +20,13 @@ import com.google.gson.JsonArray; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.accounting.common.AccountingRuleType; @@ -64,7 +66,7 @@ public class LoanProductUpdateUtil { private final LoanProductGuaranteeDetailsUpdateUtil guaranteeDetailsUpdateUtil; public Map update(final LoanProduct loanProduct, final JsonCommand command, final AprCalculator aprCalculator, - FloatingRate floatingRate) { + FloatingRate floatingRate) { final Map actualChanges = detailUpdateUtil.updateLoanRepaymentSchedule(loanProduct.getLoanProductRelatedDetail(), command, aprCalculator); actualChanges.putAll(minMaxConstraintsUpdateUtil.update(loanProduct.loanProductMinMaxConstraints(), command)); @@ -564,7 +566,7 @@ private List fetchAllVariationIds(LoanProduct loanProduct) { } private void updateBorrowerCycleVariations(final LoanProduct loanProduct, final JsonCommand command, Integer paramType, - String variationParameterName, final Map actualChanges, List variationIds) { + String variationParameterName, final Map actualChanges, List variationIds) { if (command.parameterExists(variationParameterName)) { final JsonArray variationArray = command.arrayOfParameterNamed(variationParameterName); if (variationArray != null && variationArray.size() > 0) { @@ -602,7 +604,7 @@ private void updateBorrowerCycleVariations(final LoanProduct loanProduct, final } if (jsonObject.has(LoanProductConstants.BORROWER_CYCLE_ID_PARAMETER_NAME) && jsonObject.get(LoanProductConstants.BORROWER_CYCLE_ID_PARAMETER_NAME).isJsonPrimitive() && StringUtils - .isNotBlank(jsonObject.get(LoanProductConstants.BORROWER_CYCLE_ID_PARAMETER_NAME).getAsString())) { + .isNotBlank(jsonObject.get(LoanProductConstants.BORROWER_CYCLE_ID_PARAMETER_NAME).getAsString())) { id = jsonObject.getAsJsonPrimitive(LoanProductConstants.BORROWER_CYCLE_ID_PARAMETER_NAME).getAsLong(); } LoanProductBorrowerCycleVariations borrowerCycleVariations = new LoanProductBorrowerCycleVariations(cycleNumber, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductVariableInstallmentConfigUpdateUtil.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductVariableInstallmentConfigUpdateUtil.java index 6744a6c8e2f..8041d82346c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductVariableInstallmentConfigUpdateUtil.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanProductVariableInstallmentConfigUpdateUtil.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.LinkedHashMap; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.portfolio.loanproduct.LoanProductConstants; 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 b889ad638b7..309e4c00f43 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 @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import jakarta.persistence.criteria.Join; import jakarta.persistence.criteria.Predicate; + import java.math.BigDecimal; import java.sql.ResultSet; import java.sql.SQLException; @@ -38,6 +39,7 @@ import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -275,9 +277,9 @@ public LoanAccountData fetchRepaymentScheduleData(LoanAccountData accountData) { @Override public LoanScheduleData retrieveRepaymentSchedule(final Long loanId, - final RepaymentScheduleRelatedLoanData repaymentScheduleRelatedLoanData, Collection disbursementData, - Collection capitalizedIncomeData, boolean isInterestRecalculationEnabled, - LoanScheduleType loanScheduleType) { + final RepaymentScheduleRelatedLoanData repaymentScheduleRelatedLoanData, Collection disbursementData, + Collection capitalizedIncomeData, boolean isInterestRecalculationEnabled, + LoanScheduleType loanScheduleType) { this.context.authenticatedUser(); return loanRepaymentScheduleService.findLoanScheduleData(loanId, repaymentScheduleRelatedLoanData, disbursementData, capitalizedIncomeData, isInterestRecalculationEnabled, loanScheduleType); @@ -309,7 +311,7 @@ public Collection retrieveLoanTransactions(final Long loanI .fetchLoanChargesPaidByDataTransactionId(loanIds); for (LoanTransactionData loanTransaction : loanTransactionData) { loanTransaction.setTransactionRelations(loanTransactionRelationDatas.stream().filter( - loanTransactionRelationData -> loanTransactionRelationData.getFromLoanTransaction().equals(loanTransaction.getId())) + loanTransactionRelationData -> loanTransactionRelationData.getFromLoanTransaction().equals(loanTransaction.getId())) .toList()); loanTransaction.setLoanChargePaidByList(loanChargePaidByDatas.stream() .filter(loanChargePaidByData -> loanChargePaidByData.getTransactionId().equals(loanTransaction.getId())).toList()); @@ -370,8 +372,8 @@ public Page retrieveAll(final SearchParameters searchParameters } if (StringUtils.isNotBlank(searchParameters.getAccountNo())) { - sqlBuilder.append(" and l.account_no = ?"); - extraCriterias.add(searchParameters.getAccountNo()); + sqlBuilder.append(" and l.account_no LIKE ?"); + extraCriterias.add("%" + searchParameters.getAccountNo() + "%"); arrayPos = arrayPos + 1; } @@ -477,7 +479,7 @@ private CurrencyData retriveLoanCurrencyData(final Long loanId) { @Override public LoanTransactionData retrieveLoanTransactionTemplate(final Long loanId, final LoanTransactionType transactionType, - final Long transactionId) { + final Long transactionId) { LoanTransactionData loanTransactionData = null; Collection paymentOptions = null; @@ -501,7 +503,7 @@ public LoanTransactionData retrieveLoanTransactionTemplate(final Long loanId, fi loanTransactionData = LoanTransactionData.loanTransactionDataForCreditTemplate( LoanEnumerations.transactionType(transactionType), DateUtils.getBusinessLocalDate(), transactionAmount, paymentOptions, retriveLoanCurrencyData(loanId), classificationOptions); - break; + break; case BUY_DOWN_FEE: paymentOptions = this.paymentTypeReadPlatformService.retrieveAllPaymentTypes(); classificationOptions = this.codeValueReadPlatformService @@ -509,18 +511,18 @@ public LoanTransactionData retrieveLoanTransactionTemplate(final Long loanId, fi loanTransactionData = LoanTransactionData.loanTransactionDataForCreditTemplate( LoanEnumerations.transactionType(transactionType), DateUtils.getBusinessLocalDate(), transactionAmount, paymentOptions, retriveLoanCurrencyData(loanId), classificationOptions); - break; + break; case CAPITALIZED_INCOME_ADJUSTMENT: final LoanCapitalizedIncomeBalance loanCapitalizedIncomeBalance = loanCapitalizedIncomeBalanceRepository .findByLoanIdAndLoanTransactionIdAndDeletedFalseAndClosedFalse(loanId, transactionId); transactionAmount = (loanCapitalizedIncomeBalance == null) ? BigDecimal.ZERO : loanCapitalizedIncomeBalance.getAmount() - .subtract(MathUtil.nullToZero(loanCapitalizedIncomeBalance.getAmountAdjustment())); + .subtract(MathUtil.nullToZero(loanCapitalizedIncomeBalance.getAmountAdjustment())); loanTransactionData = LoanTransactionData.loanTransactionDataForCreditTemplate( LoanEnumerations.transactionType(transactionType), DateUtils.getBusinessLocalDate(), transactionAmount, paymentOptions, retriveLoanCurrencyData(loanId), classificationOptions); - break; + break; case BUY_DOWN_FEE_ADJUSTMENT: final LoanBuyDownFeeBalance loanBuyDownFeeBalance = loanBuyDownFeeBalanceRepository .findByLoanIdAndLoanTransactionIdAndDeletedFalseAndClosedFalse(loanId, transactionId); @@ -530,11 +532,11 @@ public LoanTransactionData retrieveLoanTransactionTemplate(final Long loanId, fi loanTransactionData = LoanTransactionData.loanTransactionDataForCreditTemplate( LoanEnumerations.transactionType(transactionType), DateUtils.getBusinessLocalDate(), transactionAmount, paymentOptions, retriveLoanCurrencyData(loanId), classificationOptions); - break; + break; default: loanTransactionData = LoanTransactionData.templateOnTop(retrieveLoanTransactionTemplate(loanId), LoanEnumerations.transactionType(transactionType)); - break; + break; } return loanTransactionData; @@ -553,7 +555,7 @@ public LoanTransactionData retrieveLoanTransactionTemplate(final Long loanId) { @Override public LoanTransactionData retrieveLoanPrePaymentTemplate(final LoanTransactionType repaymentTransactionType, final Long loanId, - LocalDate onDate) { + LocalDate onDate) { this.context.authenticatedUser(); this.loanUtilService.validateRepaymentTransactionType(repaymentTransactionType); @@ -718,7 +720,7 @@ public org.springframework.data.domain.Page retrieveLoanTra final List excludedTransactionTypeValues = excludedTransactionTypes.stream().toList(); predicates.add(builder.not(root.get("typeOf").in(excludedTransactionTypeValues))); } - return builder.and(predicates.toArray(new Predicate[] {})); + return builder.and(predicates.toArray(new Predicate[]{})); }, pageable); return transactionPage.map(loanTransactionMapper::mapLoanTransaction); @@ -1489,10 +1491,10 @@ public LoanAccountData retrieveLoanProductDetailsTemplate(final Long productId, Collection chargeOptions = null; if (loanProduct.getMultiDisburseLoan()) { chargeOptions = this.chargeReadPlatformService.retrieveLoanProductApplicableCharges(productId, - new ChargeTimeType[] { ChargeTimeType.OVERDUE_INSTALLMENT }); + new ChargeTimeType[]{ChargeTimeType.OVERDUE_INSTALLMENT}); } else { chargeOptions = this.chargeReadPlatformService.retrieveLoanProductApplicableCharges(productId, - new ChargeTimeType[] { ChargeTimeType.OVERDUE_INSTALLMENT, ChargeTimeType.TRANCHE_DISBURSEMENT }); + new ChargeTimeType[]{ChargeTimeType.OVERDUE_INSTALLMENT, ChargeTimeType.TRANCHE_DISBURSEMENT}); } Integer loanCycleCounter = null; @@ -1566,7 +1568,7 @@ public Collection retrieveAllowedLoanOfficers(final Long selectedOffi @Override public Collection retrieveAllLoansWithOverdueInstallments(final Long penaltyWaitPeriod, - final Boolean backdatePenalties) { + final Boolean backdatePenalties) { final MusoniOverdueLoanScheduleMapper rm = new MusoniOverdueLoanScheduleMapper(); final StringBuilder sqlBuilder = new StringBuilder(400); @@ -1632,14 +1634,14 @@ public Collection retrieveAllOverdueInstallmentsForLoan @Override public Integer retriveLoanCounter(final Long groupId, final Integer loanType, Long productId) { final String sql = "Select MAX(l.loan_product_counter) from m_loan l where l.group_id = ? and l.loan_type_enum = ? and l.product_id=?"; - return this.jdbcTemplate.queryForObject(sql, new Object[] { groupId, loanType, productId }, Integer.class); + return this.jdbcTemplate.queryForObject(sql, new Object[]{groupId, loanType, productId}, Integer.class); } @SuppressWarnings("deprecation") @Override public Integer retriveLoanCounter(final Long clientId, Long productId) { final String sql = "Select MAX(l.loan_product_counter) from m_loan l where l.client_id = ? and l.product_id=?"; - return this.jdbcTemplate.queryForObject(sql, new Object[] { clientId, productId }, Integer.class); + return this.jdbcTemplate.queryForObject(sql, new Object[]{clientId, productId}, Integer.class); } @Override @@ -1984,8 +1986,8 @@ public LoanTransactionData retrieveCreditBalanceRefundTemplate(Long loanId) { } private LoanTransactionData retrieveRefundTemplate(Long loanId, LoanTransactionType loanTransactionType, - Collection paymentOptions, MonetaryCurrency currency, BigDecimal transactionAmount, BigDecimal netDisbursal, - ExternalId externalLoanId) { + Collection paymentOptions, MonetaryCurrency currency, BigDecimal transactionAmount, BigDecimal netDisbursal, + ExternalId externalLoanId) { final ApplicationCurrency applicationCurrency = this.applicationCurrencyRepository.findOneWithNotFoundDetection(currency); @@ -2059,7 +2061,7 @@ left join m_loan_transaction as trans on (trans.is_reversed <> true and trans.tr and adddet.effective_date is not null and trans.transaction_date is null and adddet.effective_date < ?\s"""; try { - return this.jdbcTemplate.queryForList(sql, Long.class, new Object[] { currentdate }); + return this.jdbcTemplate.queryForList(sql, Long.class, new Object[]{currentdate}); } catch (final EmptyResultDataAccessException e) { return null; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanRepaymentScheduleService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanRepaymentScheduleService.java index f5cfd228448..f7d79dd7f12 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanRepaymentScheduleService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanRepaymentScheduleService.java @@ -6,9 +6,9 @@ * 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 @@ -29,6 +29,7 @@ import java.util.Objects; import java.util.Set; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.organisation.monetary.data.CurrencyData; @@ -52,8 +53,8 @@ public class LoanRepaymentScheduleService { private final LoanRepaymentScheduleInstallmentRepository loanRepaymentScheduleInstallmentRepository; public LoanScheduleData findLoanScheduleData(final Long loanId, final RepaymentScheduleRelatedLoanData repaymentScheduleRelatedLoanData, - Collection disbursementData, Collection capitalizedIncomeData, - boolean isInterestRecalculationEnabled, LoanScheduleType loanScheduleType) { + Collection disbursementData, Collection capitalizedIncomeData, + boolean isInterestRecalculationEnabled, LoanScheduleType loanScheduleType) { final List installments = this.loanRepaymentScheduleInstallmentRepository.findByLoanId(loanId); return extractLoanScheduleData(installments, repaymentScheduleRelatedLoanData, disbursementData, capitalizedIncomeData, @@ -66,9 +67,9 @@ public Integer countInstallmentsByLoanIdWhereIsAdditionalFalseAndIsDownPaymentFa } public LoanScheduleData extractLoanScheduleData(final List installments, - final RepaymentScheduleRelatedLoanData repaymentScheduleRelatedLoanData, Collection disbursementData, - Collection capitalizedIncomeData, boolean isInterestRecalculationEnabled, - LoanScheduleType loanScheduleType) { + final RepaymentScheduleRelatedLoanData repaymentScheduleRelatedLoanData, Collection disbursementData, + Collection capitalizedIncomeData, boolean isInterestRecalculationEnabled, + LoanScheduleType loanScheduleType) { final CurrencyData currency = repaymentScheduleRelatedLoanData.getCurrency(); final DisbursementData disbursement = repaymentScheduleRelatedLoanData.disbursementData(); @@ -268,8 +269,8 @@ public LoanScheduleData extractLoanScheduleData(final List collectEligibleDisbursementData(LoanScheduleType loanScheduleType, - Collection disbursementData, LocalDate fromDate, LocalDate dueDate, Set disbursementPeriodIds, - DisbursementData mainDisbursement, boolean excludePastUnDisbursed) { + Collection disbursementData, LocalDate fromDate, LocalDate dueDate, Set disbursementPeriodIds, + DisbursementData mainDisbursement, boolean excludePastUnDisbursed) { List disbursementDataList = new ArrayList<>(); boolean hasMultipleTranchesOnSameDate = hasMultipleTranchesOnSameDate(disbursementData); @@ -357,8 +358,8 @@ private List collectEligibleCapitalizedIncomeData } private BigDecimal fillLoanSchedulePeriodData(List periods, - List combinedDataList, BigDecimal disbursementChargeAmount, BigDecimal waivedChargeAmount, - BigDecimal outstandingLoanPrincipalBalance) { + List combinedDataList, BigDecimal disbursementChargeAmount, BigDecimal waivedChargeAmount, + BigDecimal outstandingLoanPrincipalBalance) { // Process all collected data in chronological order for (LoanSchedulePeriodDataWrapper dataItem : combinedDataList) { LoanSchedulePeriodData periodData; @@ -405,7 +406,7 @@ private int sortPeriodDataHolders(LoanSchedulePeriodDataWrapper item1, LoanSched } private LoanSchedulePeriodData createLoanSchedulePeriodData(final DisbursementData data, BigDecimal disbursementChargeAmount, - BigDecimal waivedChargeAmount) { + BigDecimal waivedChargeAmount) { BigDecimal chargeAmount = data.getChargeAmount() == null ? disbursementChargeAmount : disbursementChargeAmount.add(data.getChargeAmount()).subtract(waivedChargeAmount); return LoanSchedulePeriodData.disbursementOnlyPeriod(data.disbursementDate(), data.getPrincipal(), chargeAmount, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanScheduleGeneratorServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanScheduleGeneratorServiceImpl.java index 8bb869a2be1..e19c0f79f1f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanScheduleGeneratorServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanScheduleGeneratorServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; + import lombok.RequiredArgsConstructor; import org.apache.fineract.organisation.monetary.domain.MoneyHelper; import org.apache.fineract.portfolio.loanaccount.domain.Loan; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionAssembler.java index d199848968b..f7f48a8ea07 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionAssembler.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -70,7 +71,7 @@ LoanTransaction assembleTransactionAndCalculateChanges(Loan loan, JsonCommand co } public LoanTransaction assembleAccrualActivityTransaction(@NonNull Loan loan, @NonNull LoanRepaymentScheduleInstallment installment, - @NonNull LocalDate transactionDate) { + @NonNull LocalDate transactionDate) { ExternalId externalId = externalIdFactory.create(); BigDecimal interestPortion = installment.getInterestCharged(); @@ -79,7 +80,7 @@ public LoanTransaction assembleAccrualActivityTransaction(@NonNull Loan loan, @N BigDecimal transactionAmount = MathUtil.add(interestPortion, feeChargesPortion, penaltyChargesPortion); return MathUtil.isGreaterThanZero(transactionAmount) ? new LoanTransaction(loan, loan.getOffice(), LoanTransactionType.ACCRUAL_ACTIVITY, transactionDate, transactionAmount, - null, interestPortion, feeChargesPortion, penaltyChargesPortion, null, false, null, externalId) + null, interestPortion, feeChargesPortion, penaltyChargesPortion, null, false, null, externalId) : null; } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionProcessingServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionProcessingServiceImpl.java index 40682138478..1f795ffbcf1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionProcessingServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanTransactionProcessingServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,11 +19,13 @@ package org.apache.fineract.portfolio.loanaccount.service; import jakarta.persistence.FlushModeType; + import java.math.MathContext; import java.time.LocalDate; import java.util.List; import java.util.Optional; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.tuple.Pair; import org.apache.fineract.infrastructure.core.annotation.WithFlushMode; @@ -68,7 +70,7 @@ public class LoanTransactionProcessingServiceImpl implements LoanTransactionProc @Override public boolean canProcessLatestTransactionOnly(Loan loan, LoanTransaction loanTransaction, - LoanRepaymentScheduleInstallment currentInstallment) { + LoanRepaymentScheduleInstallment currentInstallment) { if (!loan.isInterestBearingAndInterestRecalculationEnabled()) { return true; } @@ -82,7 +84,7 @@ public boolean canProcessLatestTransactionOnly(Loan loan, LoanTransaction loanTr if (interestRecalculationDetails != null && ((interestRecalculationDetails.getRestFrequencyType().isSameAsRepayment() && interestRecalculationDetails.getPreCloseInterestCalculationStrategy().calculateTillPreClosureDateEnabled()) || (interestRecalculationDetails.getRestFrequencyType().isDaily() - && interestRecalculationDetails.getPreCloseInterestCalculationStrategy().calculateTillRestFrequencyEnabled()))) { + && interestRecalculationDetails.getPreCloseInterestCalculationStrategy().calculateTillRestFrequencyEnabled()))) { return false; } if (loan.isProgressiveSchedule()) { @@ -94,7 +96,7 @@ public boolean canProcessLatestTransactionOnly(Loan loan, LoanTransaction loanTr @Override public ChangedTransactionDetail processLatestTransaction(String transactionProcessingStrategyCode, LoanTransaction loanTransaction, - TransactionCtx ctx) { + TransactionCtx ctx) { final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor = getTransactionProcessor( transactionProcessingStrategyCode); if (loanRepaymentScheduleTransactionProcessor instanceof AdvancedPaymentScheduleTransactionProcessor advancedProcessor @@ -106,8 +108,8 @@ public ChangedTransactionDetail processLatestTransaction(String transactionProce @Override public ChangedTransactionDetail reprocessLoanTransactions(String transactionProcessingStrategyCode, LocalDate disbursementDate, - List loanTransactions, MonetaryCurrency currency, List installments, - Set charges) { + List loanTransactions, MonetaryCurrency currency, List installments, + Set charges) { final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor = getTransactionProcessor( transactionProcessingStrategyCode); if (loanRepaymentScheduleTransactionProcessor instanceof AdvancedPaymentScheduleTransactionProcessor advancedProcessor) { @@ -189,7 +191,7 @@ private OutstandingAmountsDTO getTotalOutstandingOnLoan(Loan loan) { } private Loan getLoan(List loanTransactions, List installments, - Set charges) { + Set charges) { if (!ObjectUtils.isEmpty(loanTransactions)) { return loanTransactions.getFirst().getLoan(); } else if (!ObjectUtils.isEmpty(installments)) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanUtilService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanUtilService.java index 0ca766f0ae3..9be73bc1c32 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanUtilService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanUtilService.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.LocalDate; import java.util.List; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; import org.apache.fineract.infrastructure.core.exception.PlatformServiceUnavailableException; @@ -78,14 +79,14 @@ public ScheduleGeneratorDTO buildScheduleGeneratorDTO(final Loan loan, final Loc @Override public ScheduleGeneratorDTO buildScheduleGeneratorDTO(final Loan loan, final LocalDate recalculateFrom, - final LocalDate rescheduleTill) { + final LocalDate rescheduleTill) { final HolidayDetailDTO holidayDetailDTO = null; return buildScheduleGeneratorDTO(loan, recalculateFrom, rescheduleTill, holidayDetailDTO); } @Override public ScheduleGeneratorDTO buildScheduleGeneratorDTO(final Loan loan, final LocalDate recalculateFrom, final LocalDate recalculateTill, - final HolidayDetailDTO holidayDetailDTO) { + final HolidayDetailDTO holidayDetailDTO) { HolidayDetailDTO holidayDetails = holidayDetailDTO; if (holidayDetailDTO == null) { holidayDetails = constructHolidayDTO(loan); @@ -222,13 +223,13 @@ private FloatingRateDTO constructFloatingRateDTO(final Loan loan) { } private LocalDate getCalculatedRepaymentsStartingFromDate(final LocalDate actualDisbursementDate, final Loan loan, - final CalendarInstance calendarInstance, final CalendarHistoryDataWrapper calendarHistoryDataWrapper) { + final CalendarInstance calendarInstance, final CalendarHistoryDataWrapper calendarHistoryDataWrapper) { final Calendar calendar = calendarInstance == null ? null : calendarInstance.getCalendar(); return calculateRepaymentStartingFromDate(actualDisbursementDate, loan, calendar, calendarHistoryDataWrapper); } private LocalDate calculateRepaymentStartingFromDate(final LocalDate actualDisbursementDate, final Loan loan, final Calendar calendar, - final CalendarHistoryDataWrapper calendarHistoryDataWrapper) { + final CalendarHistoryDataWrapper calendarHistoryDataWrapper) { LocalDate calculatedRepaymentsStartingFromDate = loan.getExpectedFirstRepaymentOnDate(); if (calendar != null) { // sync repayments @@ -270,7 +271,7 @@ private LocalDate calculateRepaymentStartingFromDate(final LocalDate actualDisbu } private LocalDate generateCalculatedRepaymentStartDate(final CalendarHistoryDataWrapper calendarHistoryDataWrapper, - LocalDate actualDisbursementDate, Loan loan) { + LocalDate actualDisbursementDate, Loan loan) { final LoanProductRelatedDetail repaymentScheduleDetails = loan.getLoanProductRelatedDetail(); final WorkingDays workingDays = this.workingDaysRepository.findOne(); LocalDate calculatedRepaymentsStartingFromDate = null; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java index 50dc5a4c0c1..4d29463e65b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -31,6 +31,7 @@ import com.google.gson.JsonObject; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import io.github.resilience4j.retry.annotation.Retry; + import java.math.BigDecimal; import java.time.LocalDate; import java.time.format.DateTimeFormatter; @@ -47,6 +48,7 @@ import java.util.Objects; import java.util.Optional; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -321,7 +323,7 @@ public CommandProcessingResult disburseLoan(Long loanId, JsonCommand command, Bo @Transactional @Override public CommandProcessingResult disburseLoan(final Long loanId, final JsonCommand command, Boolean isAccountTransfer, - Boolean isWithoutAutoPayment) { + Boolean isWithoutAutoPayment) { loanTransactionValidator.validateDisbursement(command, isAccountTransfer, loanId); Loan loan = loanAssembler.assembleFrom(loanId); @@ -554,7 +556,7 @@ private void createNote(Loan loan, JsonCommand command, Map chan } private void disburseLoan(JsonCommand command, boolean isPaymentTypeApplicableForDisbursementCharge, PaymentDetail paymentDetail, - Loan loan, AppUser currentUser, Map changes, ScheduleGeneratorDTO scheduleGeneratorDTO) { + Loan loan, AppUser currentUser, Map changes, ScheduleGeneratorDTO scheduleGeneratorDTO) { final PaymentDetail paymentDetail1 = isPaymentTypeApplicableForDisbursementCharge ? paymentDetail : null; final LocalDate actualDisbursementDate1 = command.localDateValueOfParameterNamed(ACTUAL_DISBURSEMENT_DATE); @@ -735,7 +737,7 @@ private void saveLoanWithDataIntegrityViolationChecks(final Loan loan) { @Transactional @Override public Map bulkLoanDisbursal(final JsonCommand command, final CollectionSheetBulkDisbursalCommand bulkDisbursalCommand, - Boolean isAccountTransfer) { + Boolean isAccountTransfer) { final AppUser currentUser = getAppUserIfPresent(); final SingleDisbursalCommand[] disbursalCommand = bulkDisbursalCommand.getDisburseTransactions(); @@ -958,7 +960,7 @@ public CommandProcessingResult makeGLIMLoanRepayment(final Long loanId, final Js @Transactional @Override public CommandProcessingResult makeLoanRepayment(final LoanTransactionType repaymentTransactionType, final Long loanId, - final JsonCommand command, final boolean isRecoveryRepayment) { + final JsonCommand command, final boolean isRecoveryRepayment) { final String chargeRefundChargeType = null; return makeLoanRepaymentWithChargeRefundChargeType(repaymentTransactionType, loanId, command, isRecoveryRepayment, chargeRefundChargeType); @@ -982,7 +984,7 @@ private void recalculateLoanWithInterestPaymentWaiverTxn(Loan loan, LoanTransact boolean reprocess = true; if (!loan.isForeclosure() && isTransactionChronologicallyLatest && DateUtils.isEqualBusinessDate(transactionDate) && currentInstallment != null && currentInstallment.getTotalOutstanding(loan.getCurrency()) - .isEqualTo(newInterestPaymentWaiverTransaction.getAmount(loan.getCurrency()))) { + .isEqualTo(newInterestPaymentWaiverTransaction.getAmount(loan.getCurrency()))) { reprocess = false; } @@ -1017,7 +1019,7 @@ private void recalculateLoanWithInterestPaymentWaiverTxn(Loan loan, LoanTransact } private void reprocessChangedLoanTransactions(Loan loan, LoanTransaction newInterestPaymentWaiverTransaction, - ScheduleGeneratorDTO scheduleGeneratorDTO) { + ScheduleGeneratorDTO scheduleGeneratorDTO) { if (loan.isCumulativeSchedule() && loan.isInterestBearingAndInterestRecalculationEnabled()) { loanScheduleService.regenerateRepaymentScheduleWithInterestRecalculation(loan, scheduleGeneratorDTO); } else if (loan.isProgressiveSchedule()) { @@ -1097,7 +1099,7 @@ private void saveNote(String noteText, Loan loan, LoanTransaction loanTransactio @Transactional @Override public CommandProcessingResult makeLoanRepaymentWithChargeRefundChargeType(final LoanTransactionType repaymentTransactionType, - final Long loanId, final JsonCommand command, final boolean isRecoveryRepayment, final String chargeRefundChargeType) { + final Long loanId, final JsonCommand command, final boolean isRecoveryRepayment, final String chargeRefundChargeType) { this.loanUtilService.validateRepaymentTransactionType(repaymentTransactionType); this.loanTransactionValidator.validateNewRepaymentTransaction(command.json()); @@ -1290,7 +1292,7 @@ public CommandProcessingResult chargebackLoanTransaction(final Long loanId, fina if (!loanTransaction.isTypeAllowedForChargeback()) { throw new PlatformServiceUnavailableException( "error.msg.loan.chargeback.operation.not.allowed", "Loan transaction:" + transactionId - + " chargeback not allowed for loan transaction type, its type is " + loanTransaction.getTypeOf().getCode(), + + " chargeback not allowed for loan transaction type, its type is " + loanTransaction.getTypeOf().getCode(), transactionId); } @@ -1707,7 +1709,7 @@ private void disburseLoanToLoan(final Loan loan, final JsonCommand command, fina } protected Long disburseLoanToSavings(final Loan loan, final JsonCommand command, final Money amount, - final PaymentDetail paymentDetail) { + final PaymentDetail paymentDetail) { final LocalDate transactionDate = command.localDateValueOfParameterNamed("actualDisbursementDate"); final ExternalId txnExternalId = externalIdFactory.createFromCommand(command, LoanApiConstants.externalIdParameterName); @@ -1753,7 +1755,7 @@ public LoanTransaction initiateLoanTransfer(final Loan loan, final LocalDate tra @Transactional @Override public LoanTransaction acceptLoanTransfer(final Loan loan, final LocalDate transferDate, final Office acceptedInOffice, - final Staff loanOfficer) { + final Staff loanOfficer) { businessEventNotifierService.notifyPreBusinessEvent(new LoanAcceptTransferBusinessEvent(loan)); ExternalId externalId = externalIdFactory.create(); final LoanTransaction newTransferAcceptanceTransaction = LoanTransaction.approveTransfer(acceptedInOffice, loan, transferDate, @@ -1931,7 +1933,7 @@ public void applyMeetingDateChanges(final Calendar calendar, final Collection loanCalendarInstances, - final Boolean rescheduleBasedOnMeetingDates, final LocalDate presentMeetingDate, final LocalDate newMeetingDate) { + final Boolean rescheduleBasedOnMeetingDates, final LocalDate presentMeetingDate, final LocalDate newMeetingDate) { final boolean isHolidayEnabled = this.configurationDomainService.isRescheduleRepaymentsOnHolidaysEnabled(); final WorkingDays workingDays = this.workingDaysRepository.findOne(); @@ -2068,7 +2070,7 @@ private Integer getNewGroupLoanProductCounter(final Loan loan) { } private void updateLoanCounter(final Loan loan, final List loansToUpdateForLoanCounter, Integer newLoanCounter, - Integer newLoanProductCounter) { + Integer newLoanProductCounter) { final boolean includeInBorrowerCycle = loan.loanProduct().isIncludeInBorrowerCycle(); for (final Loan loanToUpdate : loansToUpdateForLoanCounter) { @@ -2200,7 +2202,7 @@ public CommandProcessingResult undoWriteOff(Long loanId) { } private void validateMultiDisbursementData(final JsonCommand command, LocalDate expectedDisbursementDate, - boolean isDisallowExpectedDisbursements, Loan loan) { + boolean isDisallowExpectedDisbursements, Loan loan) { final String json = command.json(); final JsonElement element = this.fromApiJsonHelper.parse(json); @@ -2295,7 +2297,7 @@ public CommandProcessingResult addAndDeleteLoanDisburseDetails(Long loanId, Json } private CommandProcessingResult processLoanDisbursementDetail(Loan loan, Long loanId, JsonCommand command, - LoanDisbursementDetails loanDisbursementDetails) { + LoanDisbursementDetails loanDisbursementDetails) { final Map changes = new LinkedHashMap<>(); LocalDate recalculateFrom = null; ScheduleGeneratorDTO scheduleGeneratorDTO = this.loanUtilService.buildScheduleGeneratorDTO(loan, recalculateFrom); @@ -2338,7 +2340,7 @@ private CommandProcessingResult processLoanDisbursementDetail(Loan loan, Long lo @Override @Transactional public CommandProcessingResult updateDisbursementDateAndAmountForTranche(final Long loanId, final Long disbursementId, - final JsonCommand command) { + final JsonCommand command) { final Loan loan = this.loanAssembler.assembleFrom(loanId); checkClientOrGroupActive(loan); @@ -2427,8 +2429,8 @@ private void createLoanScheduleArchive(final Loan loan, final ScheduleGeneratorD } private void regenerateScheduleOnDisbursement(final JsonCommand command, final Loan loan, final boolean recalculateSchedule, - final ScheduleGeneratorDTO scheduleGeneratorDTO, final LocalDate nextPossibleRepaymentDate, - final LocalDate rescheduledRepaymentDate) { + final ScheduleGeneratorDTO scheduleGeneratorDTO, final LocalDate nextPossibleRepaymentDate, + final LocalDate rescheduledRepaymentDate) { final LocalDate actualDisbursementDate = command.localDateValueOfParameterNamed("actualDisbursementDate"); BigDecimal emiAmount = command.bigDecimalValueOfParameterNamed(LoanApiConstants.fixedEmiAmountParameterName); @@ -3135,7 +3137,7 @@ private Map undoDisbursal(final Loan loan, final ScheduleGenerat final LoanStatus statusEnum = this.loanLifecycleStateMachine.dryTransition(LoanEvent.LOAN_DISBURSAL_UNDO, loan); if (!statusEnum.hasStateOf(currentStatus)) { this.loanLifecycleStateMachine.transition(LoanEvent.LOAN_DISBURSAL_UNDO, loan); // tis will update the loan - // status + // status actualChanges.put(PARAM_STATUS, LoanEnumerations.status(loan.getLoanStatus())); final LocalDate actualDisbursementDate = loan.getDisbursementDate(); @@ -3234,7 +3236,7 @@ private void reverseExistingTransactions(final Loan loan) { } private Optional closeAsWrittenOff(final Loan loan, final JsonCommand command, final Map changes, - final AppUser currentUser, final ScheduleGeneratorDTO scheduleGeneratorDTO) { + final AppUser currentUser, final ScheduleGeneratorDTO scheduleGeneratorDTO) { closeDisbursements(loan, scheduleGeneratorDTO); final LocalDate writtenOffOnLocalDate = command.localDateValueOfParameterNamed(TRANSACTION_DATE); @@ -3313,7 +3315,7 @@ private void closeDisbursements(final Loan loan, final ScheduleGeneratorDTO sche } private Optional close(final Loan loan, final JsonCommand command, final Map changes, - final ScheduleGeneratorDTO scheduleGeneratorDTO) { + final ScheduleGeneratorDTO scheduleGeneratorDTO) { final LocalDate closureDate = command.localDateValueOfParameterNamed(TRANSACTION_DATE); final String txnExternalId = command.stringValueOfParameterNamedAllowingNull(EXTERNAL_ID); @@ -3393,7 +3395,7 @@ private Optional close(final Loan loan, final JsonCommand comma } private void updateDisbursementDateAndAmountForTranche(final Loan loan, final LoanDisbursementDetails disbursementDetails, - final JsonCommand command, final Map actualChanges, final ScheduleGeneratorDTO scheduleGeneratorDTO) { + final JsonCommand command, final Map actualChanges, final ScheduleGeneratorDTO scheduleGeneratorDTO) { final Locale locale = command.extractLocale(); final BigDecimal principal = command.bigDecimalValueOfParameterNamed(LoanApiConstants.updatedDisbursementPrincipalParameterName, locale); @@ -3430,7 +3432,7 @@ private Map undoLastDisbursal(final ScheduleGeneratorDTO schedul for (final LoanTransaction previousTransaction : loanTransactions) { if (DateUtils.isBefore(lastTransactionDate, previousTransaction.getTransactionDate()) && (previousTransaction.isRepaymentLikeType() || previousTransaction.isWaiver() - || previousTransaction.isChargePayment())) { + || previousTransaction.isChargePayment())) { throw new UndoLastTrancheDisbursementException(previousTransaction.getId()); } if (previousTransaction.getId().compareTo(lastDisbursalTransaction.getId()) < 0) { @@ -3444,7 +3446,7 @@ private Map undoLastDisbursal(final ScheduleGeneratorDTO schedul .removeIf(loanTermVariations -> (loanTermVariations.getTermType().isDueDateVariation() && DateUtils.isAfter(loanTermVariations.fetchDateValue(), lastTransactionDate)) || (loanTermVariations.getTermType().isEMIAmountVariation() - && DateUtils.isEqual(loanTermVariations.getTermApplicableFrom(), lastTransactionDate)) + && DateUtils.isEqual(loanTermVariations.getTermApplicableFrom(), lastTransactionDate)) || DateUtils.isAfter(loanTermVariations.getTermApplicableFrom(), lastTransactionDate)); reverseExistingTransactionsTillLastDisbursal(loan, lastDisbursalTransaction); loanScheduleService.regenerateScheduleWithReprocessingTransactions(loan, scheduleGeneratorDTO); @@ -3456,7 +3458,7 @@ private Map undoLastDisbursal(final ScheduleGeneratorDTO schedul } private void waiveInterest(final Loan loan, final LoanTransaction waiveInterestTransaction, - final ScheduleGeneratorDTO scheduleGeneratorDTO) { + final ScheduleGeneratorDTO scheduleGeneratorDTO) { loanDownPaymentHandlerService.handleRepaymentOrRecoveryOrWaiverTransaction(loan, waiveInterestTransaction, null, scheduleGeneratorDTO); } @@ -3567,8 +3569,8 @@ private boolean canDisburse(final Loan loan) { } private void updateLoanRepaymentScheduleDates(final Loan loan, final LocalDate meetingStartDate, final String recuringRule, - final boolean isHolidayEnabled, final List holidays, final WorkingDays workingDays, - final boolean isSkipRepaymentonfirstdayofmonth, final Integer numberofDays) { + final boolean isHolidayEnabled, final List holidays, final WorkingDays workingDays, + final boolean isSkipRepaymentonfirstdayofmonth, final Integer numberofDays) { // first repayment's from date is same as disbursement date. LocalDate tmpFromDate = loan.getDisbursementDate(); final PeriodFrequencyType repaymentPeriodFrequencyType = loan.getLoanRepaymentScheduleDetail().getRepaymentPeriodFrequencyType(); @@ -3615,7 +3617,7 @@ private void updateLoanRepaymentScheduleDates(final Loan loan, final LocalDate m } private LocalDate getMaxDateLimitForNewRepayment(final PeriodFrequencyType periodFrequencyType, final Integer loanRepaymentInterval, - final LocalDate startDate) { + final LocalDate startDate) { LocalDate dueRepaymentPeriodDate = startDate; final int repaidEvery = 2 * loanRepaymentInterval; switch (periodFrequencyType) { @@ -3630,8 +3632,8 @@ private LocalDate getMaxDateLimitForNewRepayment(final PeriodFrequencyType perio } private void updateLoanRepaymentScheduleDates(final Loan loan, final String recurringRule, final boolean isHolidayEnabled, - final List holidays, final WorkingDays workingDays, final LocalDate presentMeetingDate, final LocalDate newMeetingDate, - final boolean isSkipRepaymentOnFirstDayOfMonth, final Integer numberOfDays) { + final List holidays, final WorkingDays workingDays, final LocalDate presentMeetingDate, final LocalDate newMeetingDate, + final boolean isSkipRepaymentOnFirstDayOfMonth, final Integer numberOfDays) { // first repayment's from date is same as disbursement date. // meetingStartDate is used as seedDate Capture the seedDate from user and use the seedDate as meetingStart date diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanInterestRefundServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanInterestRefundServiceImpl.java index c87a726740b..e717eca54f7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanInterestRefundServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanInterestRefundServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.List; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Stream; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.tuple.Pair; @@ -61,7 +62,7 @@ public class ProgressiveLoanInterestRefundServiceImpl implements InterestRefundS private final LoanTransactionProcessingService loanTransactionProcessingService; private static void simulateRepaymentForDisbursements(LoanTransaction lt, final AtomicReference refundFinal, - List collect) { + List collect) { LoanTransaction copy = new LoanTransaction(lt.getLoan(), lt.getLoan().getOffice(), lt.getTypeOf(), lt.getDateOf(), lt.getAmount(), BigDecimal.ZERO, BigDecimal.ZERO, BigDecimal.ZERO, BigDecimal.ZERO, BigDecimal.ZERO, false, null, null); if (LoanTransactionType.CHARGE_PAYMENT.equals(copy.getTypeOf()) @@ -89,7 +90,7 @@ private static void simulateRepaymentForDisbursements(LoanTransaction lt, final } private Money recalculateTotalInterest(AdvancedPaymentScheduleTransactionProcessor processor, Loan loan, - LocalDate relatedRefundTransactionDate, List transactionsToReprocess) { + LocalDate relatedRefundTransactionDate, List transactionsToReprocess) { final ScheduleGeneratorDTO scheduleGeneratorDTO = loanUtilService.buildScheduleGeneratorDTO(loan, null); loanScheduleService.regenerateRepaymentSchedule(loan, scheduleGeneratorDTO); @@ -120,8 +121,8 @@ private boolean isTransactionNeededForInterestRefundCalculations(LoanTransaction @Override @Transactional(readOnly = true, propagation = Propagation.REQUIRES_NEW) public Money totalInterestByTransactions(LoanRepaymentScheduleTransactionProcessor processor, final Long loanId, - LocalDate relatedRefundTransactionDate, List newTransactions, List oldTransactionIds, - List activeLoanTermVariations) { + LocalDate relatedRefundTransactionDate, List newTransactions, List oldTransactionIds, + List activeLoanTermVariations) { Loan loan = loanAssembler.assembleFrom(loanId); loan.setLoanTermVariations(activeLoanTermVariations); if (processor == null) { @@ -136,11 +137,11 @@ public Money totalInterestByTransactions(LoanRepaymentScheduleTransactionProcess List interestRefundTypes = loan.getSupportedInterestRefundTransactionTypes(); List transactions = Stream.concat(loan.getLoanTransactions().stream() // - .filter(lt -> isTransactionNeededForInterestRefundCalculations(lt) // - && oldTransactionIds.contains(lt.getId())), // - newTransactions.stream() // - .filter(this::isTransactionNeededForInterestRefundCalculations) // - .map(LoanTransaction::copyTransactionProperties)) // + .filter(lt -> isTransactionNeededForInterestRefundCalculations(lt) // + && oldTransactionIds.contains(lt.getId())), // + newTransactions.stream() // + .filter(this::isTransactionNeededForInterestRefundCalculations) // + .map(LoanTransaction::copyTransactionProperties)) // .toList(); final AtomicReference refundFinal = new AtomicReference<>( diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanSummaryDataProvider.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanSummaryDataProvider.java index 9532baa362b..dfbd23195b9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanSummaryDataProvider.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ProgressiveLoanSummaryDataProvider.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.LocalDate; import java.util.Collection; import java.util.Optional; + import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.service.MathUtil; @@ -56,14 +57,14 @@ public boolean accept(String loanProcessingStrategyCode) { @Override @Transactional(readOnly = true) public LoanSummaryData withTransactionAmountsSummary(Long loanId, LoanSummaryData defaultSummaryData, - LoanScheduleData repaymentSchedule, Collection loanTransactionBalances) { + LoanScheduleData repaymentSchedule, Collection loanTransactionBalances) { final Loan loan = loanRepository.findOneWithNotFoundDetection(loanId, true); return super.withTransactionAmountsSummary(loan, defaultSummaryData, repaymentSchedule, loanTransactionBalances); } @Override public LoanSummaryData withTransactionAmountsSummary(Loan loan, LoanSummaryData defaultSummaryData, LoanScheduleData repaymentSchedule, - Collection loanTransactionBalances) { + Collection loanTransactionBalances) { return super.withTransactionAmountsSummary(loan, defaultSummaryData, repaymentSchedule, loanTransactionBalances); } @@ -74,8 +75,8 @@ private Optional getRelatedRepaymentScheduleIn @Override public BigDecimal computeTotalUnpaidPayableNotDueInterestAmountOnActualPeriod(final Loan loan, - final Collection periods, final LocalDate businessDate, final CurrencyData currency, - BigDecimal totalUnpaidPayableDueInterest) { + final Collection periods, final LocalDate businessDate, final CurrencyData currency, + BigDecimal totalUnpaidPayableDueInterest) { if (loan.isMatured(businessDate) || !loan.isInterestBearing()) { return BigDecimal.ZERO; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ReprocessLoanTransactionsServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ReprocessLoanTransactionsServiceImpl.java index 07e1b34aef7..8840f0f1d1c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ReprocessLoanTransactionsServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/ReprocessLoanTransactionsServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.portfolio.loanaccount.service; import jakarta.persistence.FlushModeType; + import java.util.List; import java.util.Optional; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.annotation.WithFlushMode; import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil; @@ -156,7 +158,7 @@ private void handleChangedDetail(final ChangedTransactionDetail changedTransacti } private ChangedTransactionDetail reprocessTransactionsAndFetchChangedTransactions(final Loan loan, - final List loanTransactions) { + final List loanTransactions) { final ChangedTransactionDetail changedTransactionDetail = loanTransactionProcessingService.reprocessLoanTransactions( loan.getTransactionProcessingStrategyCode(), loan.getDisbursementDate(), loanTransactions, loan.getCurrency(), loan.getRepaymentScheduleInstallments(), loan.getActiveCharges()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/adjustment/LoanAdjustmentParameter.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/adjustment/LoanAdjustmentParameter.java index b6dca479ee7..030acc1c5f7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/adjustment/LoanAdjustmentParameter.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/adjustment/LoanAdjustmentParameter.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Builder; import lombok.Data; import org.apache.fineract.infrastructure.core.domain.ExternalId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/adjustment/LoanAdjustmentService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/adjustment/LoanAdjustmentService.java index 884b7a30165..ca5b65607be 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/adjustment/LoanAdjustmentService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/adjustment/LoanAdjustmentService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanaccount.service.adjustment; import java.util.Map; + import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction; @@ -26,5 +27,5 @@ public interface LoanAdjustmentService { CommandProcessingResult adjustLoanTransaction(Loan loan, LoanTransaction transactionToAdjust, LoanAdjustmentParameter parameter, - Long commandId, Map changes); + Long commandId, Map changes); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/adjustment/LoanAdjustmentServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/adjustment/LoanAdjustmentServiceImpl.java index c5cdf5b58eb..c80eaf2f082 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/adjustment/LoanAdjustmentServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/adjustment/LoanAdjustmentServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.Collection; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -105,7 +106,7 @@ public class LoanAdjustmentServiceImpl implements LoanAdjustmentService { @Override public CommandProcessingResult adjustLoanTransaction(Loan loan, LoanTransaction transactionToAdjust, LoanAdjustmentParameter parameter, - Long commandId, Map changes) { + Long commandId, Map changes) { LocalDate transactionDate = parameter.getTransactionDate(); BigDecimal transactionAmount = parameter.getTransactionAmount(); PaymentDetail paymentDetail = parameter.getPaymentDetail(); @@ -297,8 +298,8 @@ public CommandProcessingResult adjustLoanTransaction(Loan loan, LoanTransaction } public void adjustExistingTransaction(final Loan loan, final LoanTransaction newTransactionDetail, - final LoanTransaction transactionForAdjustment, final ScheduleGeneratorDTO scheduleGeneratorDTO, - final ExternalId reversalExternalId) { + final LoanTransaction transactionForAdjustment, final ScheduleGeneratorDTO scheduleGeneratorDTO, + final ExternalId reversalExternalId) { loanTransactionValidator.validateActivityNotBeforeClientOrGroupTransferDate(loan, LoanEvent.LOAN_REPAYMENT_OR_WAIVER, transactionForAdjustment.getTransactionDate()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/contracttermination/LoanContractTerminationServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/contracttermination/LoanContractTerminationServiceImpl.java index f9ae918b284..b0dc5f59372 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/contracttermination/LoanContractTerminationServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/contracttermination/LoanContractTerminationServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/reaging/LoanReAgingService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/reaging/LoanReAgingService.java index f374cdd3d2f..b04d851d4a3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/reaging/LoanReAgingService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/reaging/LoanReAgingService.java @@ -6,9 +6,9 @@ * 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 @@ -30,6 +30,7 @@ import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.domain.CodeValue; import org.apache.fineract.infrastructure.codes.domain.CodeValueRepository; @@ -206,9 +207,9 @@ public CommandProcessingResult undoReAge(Long loanId, JsonCommand command) { private void processReAgeTransaction(final Loan loan, final LoanTransaction reAgeTransaction, final boolean withPostTransactionChecks) { if (reAgeTransaction.getTransactionDate().isBefore(reAgeTransaction.getSubmittedOnDate()) || LoanReAgeInterestHandlingType.EQUAL_AMORTIZATION_FULL_INTEREST - .equals(reAgeTransaction.getLoanReAgeParameter().getInterestHandlingType()) + .equals(reAgeTransaction.getLoanReAgeParameter().getInterestHandlingType()) || LoanReAgeInterestHandlingType.EQUAL_AMORTIZATION_PAYABLE_INTEREST - .equals(reAgeTransaction.getLoanReAgeParameter().getInterestHandlingType())) { + .equals(reAgeTransaction.getLoanReAgeParameter().getInterestHandlingType())) { final ScheduleGeneratorDTO scheduleGeneratorDTO = loanUtilService.buildScheduleGeneratorDTO(loan, null); loanScheduleService.regenerateRepaymentSchedule(loan, scheduleGeneratorDTO); if (withPostTransactionChecks) { @@ -315,7 +316,7 @@ private LoanTransaction createReAgeTransactionFromPreviewRequest(final Loan loan } private LoanReAgeParameter createReAgeParameterFromPreviewRequest(final LoanTransaction reAgeTransaction, - final ReAgePreviewRequest reAgePreviewRequest) { + final ReAgePreviewRequest reAgePreviewRequest) { final PeriodFrequencyType periodFrequencyType = PeriodFrequencyType.valueOf(reAgePreviewRequest.getFrequencyType()); final Locale locale = Optional.ofNullable(reAgePreviewRequest.getLocale()).map(Locale::forLanguageTag).orElse(Locale.getDefault()); final LocalDate startDate = JsonParserHelper.convertFrom(reAgePreviewRequest.getStartDate(), LoanReAgingApiConstants.startDate, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/reaging/LoanReAgingValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/reaging/LoanReAgingValidator.java index 565e964039e..7247445b1db 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/reaging/LoanReAgingValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/reaging/LoanReAgingValidator.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import static org.apache.fineract.infrastructure.core.service.DateUtils.getBusinessLocalDate; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -30,6 +31,7 @@ import java.util.Locale; import java.util.Map; import java.util.Optional; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.codes.domain.CodeValue; @@ -89,7 +91,8 @@ private void validateJSONAndCheckForUnsupportedParams(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, reAgeSupportedParameters); } 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 224bc5e1dcf..b1702d18a64 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 @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.domain.CodeValue; import org.apache.fineract.infrastructure.codes.domain.CodeValueRepository; @@ -145,7 +146,7 @@ public CommandProcessingResult undoReAmortize(Long loanId, JsonCommand command) @Transactional(readOnly = true) public LoanScheduleData previewReAmortization(final Long loanId, final String loanExternalId, - final ReAmortizationPreviewRequest reAmortizationPreviewRequest) { + final ReAmortizationPreviewRequest reAmortizationPreviewRequest) { final Loan loan = loanId != null ? loanAssembler.assembleFrom(loanId) : loanAssembler.assembleFrom(ExternalIdFactory.produce(loanExternalId), false); return previewReAmortization(loan, reAmortizationPreviewRequest); @@ -199,7 +200,7 @@ private LoanTransaction createReAmortizeTransaction(Loan loan, JsonCommand comma } private LoanTransaction createReAmortizeTransactionFromPreviewRequest(final Loan loan, - final ReAmortizationPreviewRequest reAmortizationPreviewRequest) { + final ReAmortizationPreviewRequest reAmortizationPreviewRequest) { // re-amortization transaction date is always the current business date final LocalDate transactionDate = DateUtils.getBusinessLocalDate(); final Money txPrincipal = loan.getTotalPrincipalOutstandingUntil(transactionDate); @@ -232,14 +233,14 @@ private LoanReAmortizationParameter createReAmortizationParameter(LoanTransactio } private LoanReAmortizationParameter createReAmortizationParameterFromPreviewRequest(final LoanTransaction reAmortizationTransaction, - final ReAmortizationPreviewRequest reAmortizationPreviewRequest) { + final ReAmortizationPreviewRequest reAmortizationPreviewRequest) { final LoanReAmortizationInterestHandlingType reAmortizationInterestHandlingType = LoanReAmortizationInterestHandlingType .valueOf(reAmortizationPreviewRequest.getReAmortizationInterestHandling()); return new LoanReAmortizationParameter(reAmortizationTransaction, reAmortizationInterestHandlingType, null); } private void processReAmortizationTransaction(final Loan loan, final LoanTransaction reAmortizationTransaction, - final boolean withPostTransactionChecks) { + final boolean withPostTransactionChecks) { if (loan.isInterestBearingAndInterestRecalculationEnabled()) { loanScheduleService.regenerateRepaymentSchedule(loan); if (withPostTransactionChecks) { 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 b535721e6dc..1efe1533515 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 @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.domain.CodeValue; import org.apache.fineract.infrastructure.codes.domain.CodeValueRepository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/util/BuyDownFeeAmortizationUtil.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/util/BuyDownFeeAmortizationUtil.java index 37459b5f0a5..aebeaa9fa3f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/util/BuyDownFeeAmortizationUtil.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/util/BuyDownFeeAmortizationUtil.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.LocalDate; import java.util.Comparator; import java.util.List; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.core.service.MathUtil; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; @@ -33,19 +34,21 @@ public final class BuyDownFeeAmortizationUtil { - private BuyDownFeeAmortizationUtil() {} + private BuyDownFeeAmortizationUtil() { + } public static Money calculateTotalAmortizationTillDate(final LoanBuyDownFeeBalance buyDownFeeBalance, - final List adjustmentTransactions, final LocalDate maturityDate, - final LoanBuyDownFeeStrategy buyDownFeeStrategy, final LocalDate tillDate, final MonetaryCurrency currency) { + final List adjustmentTransactions, final LocalDate maturityDate, + final LoanBuyDownFeeStrategy buyDownFeeStrategy, final LocalDate tillDate, final MonetaryCurrency currency) { return switch (buyDownFeeStrategy) { - case EQUAL_AMORTIZATION -> calculateTotalAmortizationTillDateEqualAmortization(buyDownFeeBalance, adjustmentTransactions, - maturityDate, tillDate, currency); + case EQUAL_AMORTIZATION -> + calculateTotalAmortizationTillDateEqualAmortization(buyDownFeeBalance, adjustmentTransactions, + maturityDate, tillDate, currency); }; } private static Money calculateTotalAmortizationTillDateEqualAmortization(LoanBuyDownFeeBalance balance, - List adjustmentTransactions, LocalDate maturityDate, LocalDate tillDate, MonetaryCurrency currency) { + List adjustmentTransactions, LocalDate maturityDate, LocalDate tillDate, MonetaryCurrency currency) { BigDecimal unrecognizedAmount = balance.getAmount(); BigDecimal totalAmortizationAmount = BigDecimal.ZERO; @@ -59,7 +62,7 @@ private static Money calculateTotalAmortizationTillDateEqualAmortization(LoanBuy long daysOfPeriod = DateUtils.getDifferenceInDays(periodStart, adjustmentTransaction.getDateOf()); BigDecimal periodAmortization = daysUntilMaturity == 0L ? BigDecimal.ZERO : unrecognizedAmount.multiply(BigDecimal.valueOf(daysOfPeriod)).divide(BigDecimal.valueOf(daysUntilMaturity), - MoneyHelper.getMathContext()); + MoneyHelper.getMathContext()); totalAmortizationAmount = totalAmortizationAmount.add(periodAmortization); unrecognizedAmount = unrecognizedAmount.subtract(periodAmortization).subtract(adjustmentTransaction.getAmount()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/util/CapitalizedIncomeAmortizationUtil.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/util/CapitalizedIncomeAmortizationUtil.java index 8876fad0eac..06672b3aee1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/util/CapitalizedIncomeAmortizationUtil.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/util/CapitalizedIncomeAmortizationUtil.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.LocalDate; import java.util.Comparator; import java.util.List; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.core.service.MathUtil; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; @@ -33,19 +34,21 @@ public final class CapitalizedIncomeAmortizationUtil { - private CapitalizedIncomeAmortizationUtil() {} + private CapitalizedIncomeAmortizationUtil() { + } public static Money calculateTotalAmortizationTillDate(final LoanCapitalizedIncomeBalance capitalizedIncomeBalance, - final List adjustmentTransactions, final LocalDate maturityDate, - final LoanCapitalizedIncomeStrategy capitalizedIncomeStrategy, final LocalDate tillDate, final MonetaryCurrency currency) { + final List adjustmentTransactions, final LocalDate maturityDate, + final LoanCapitalizedIncomeStrategy capitalizedIncomeStrategy, final LocalDate tillDate, final MonetaryCurrency currency) { return switch (capitalizedIncomeStrategy) { - case EQUAL_AMORTIZATION -> calculateTotalAmortizationTillDateEqualAmortization(capitalizedIncomeBalance, adjustmentTransactions, - maturityDate, tillDate, currency); + case EQUAL_AMORTIZATION -> + calculateTotalAmortizationTillDateEqualAmortization(capitalizedIncomeBalance, adjustmentTransactions, + maturityDate, tillDate, currency); }; } private static Money calculateTotalAmortizationTillDateEqualAmortization(LoanCapitalizedIncomeBalance balance, - List adjustmentTransactions, LocalDate maturityDate, LocalDate tillDate, MonetaryCurrency currency) { + List adjustmentTransactions, LocalDate maturityDate, LocalDate tillDate, MonetaryCurrency currency) { BigDecimal unrecognizedAmount = balance.getAmount(); BigDecimal totalAmortizationAmount = BigDecimal.ZERO; @@ -59,7 +62,7 @@ private static Money calculateTotalAmortizationTillDateEqualAmortization(LoanCap long daysOfPeriod = DateUtils.getDifferenceInDays(periodStart, adjustmentTransaction.getDateOf()); BigDecimal periodAmortization = daysUntilMaturity == 0L ? BigDecimal.ZERO : unrecognizedAmount.multiply(BigDecimal.valueOf(daysOfPeriod)).divide(BigDecimal.valueOf(daysUntilMaturity), - MoneyHelper.getMathContext()); + MoneyHelper.getMathContext()); totalAmortizationAmount = totalAmortizationAmount.add(periodAmortization); unrecognizedAmount = unrecognizedAmount.subtract(periodAmortization).subtract(adjustmentTransaction.getAmount()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/data/ProductMixCreateResponse.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/data/ProductMixCreateResponse.java index ce3d7a1cb97..080d7be6df8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/data/ProductMixCreateResponse.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/data/ProductMixCreateResponse.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/data/ProductMixUpdateRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/data/ProductMixUpdateRequest.java index 70a4145bb3f..f55c01c7241 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/data/ProductMixUpdateRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/data/ProductMixUpdateRequest.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/domain/ProductMix.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/domain/ProductMix.java index 967f4350859..12946e7f8df 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/domain/ProductMix.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/domain/ProductMix.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/domain/ProductMixRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/domain/ProductMixRepository.java index f041cefdfaa..ca38ec808da 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/domain/ProductMixRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/domain/ProductMixRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanproduct.productmix.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Query; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/exception/ProductMixNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/exception/ProductMixNotFoundException.java index 2fc2bd47a40..a57a6ca8d6d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/exception/ProductMixNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/exception/ProductMixNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/service/ProductMixReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/service/ProductMixReadPlatformService.java index 2cb268cd06b..620e8050301 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/service/ProductMixReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/service/ProductMixReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.loanproduct.productmix.service; import java.util.Collection; + import org.apache.fineract.portfolio.loanproduct.productmix.data.ProductMixData; public interface ProductMixReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/service/ProductMixReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/service/ProductMixReadPlatformServiceImpl.java index ad6c90d11fe..2e0a113ae61 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/service/ProductMixReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/service/ProductMixReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; + import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.loanproduct.data.LoanProductData; import org.apache.fineract.portfolio.loanproduct.productmix.data.ProductMixData; @@ -44,7 +45,7 @@ public class ProductMixReadPlatformServiceImpl implements ProductMixReadPlatform @Autowired public ProductMixReadPlatformServiceImpl(final PlatformSecurityContext context, final JdbcTemplate jdbcTemplate, - final LoanProductReadPlatformService loanProductReadPlatformService) { + final LoanProductReadPlatformService loanProductReadPlatformService) { this.context = context; this.jdbcTemplate = jdbcTemplate; this.loanProductReadPlatformService = loanProductReadPlatformService; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/service/ProductMixWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/service/ProductMixWritePlatformService.java index d5b253339b0..f48e80b5d77 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/service/ProductMixWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/productmix/service/ProductMixWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/serialization/LoanProductDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/serialization/LoanProductDataValidator.java index 0f06e034316..042d7f12611 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/serialization/LoanProductDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/serialization/LoanProductDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.util.ArrayList; @@ -34,6 +35,7 @@ import java.util.Map; import java.util.Set; import java.util.function.BiConsumer; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.accounting.common.AccountingConstants.LoanProductAccountingParams; @@ -212,11 +214,11 @@ public final class LoanProductDataValidator { LoanProductConstants.ALLOW_FULL_TERM_FOR_TRANCHE_PARAM_NAME // )); - private static final String[] SUPPORTED_LOAN_CONFIGURABLE_ATTRIBUTES = { LoanProductConstants.amortizationTypeParamName, + private static final String[] SUPPORTED_LOAN_CONFIGURABLE_ATTRIBUTES = {LoanProductConstants.amortizationTypeParamName, LoanProductConstants.interestTypeParamName, LoanProductConstants.transactionProcessingStrategyCodeParamName, LoanProductConstants.interestCalculationPeriodTypeParamName, LoanProductConstants.inArrearsToleranceParamName, LoanProductConstants.repaymentEveryParamName, LoanProductConstants.graceOnPrincipalAndInterestPaymentParamName, - LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME }; + LoanProductConstants.GRACE_ON_ARREARS_AGEING_PARAMETER_NAME}; public static final String LOANPRODUCT = "loanproduct"; public static final String OVER_APPLIED_CALCULATION_TYPE = "overAppliedCalculationType"; public static final String OPENING_SQUARE_BRACKET = "["; @@ -235,7 +237,8 @@ public void validateForCreate(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -864,7 +867,7 @@ public void validateForCreate(final JsonCommand command) { if (LoanScheduleProcessingType.VERTICAL.equals(LoanScheduleProcessingType.valueOf(loanScheduleProcessingType)) && !AdvancedPaymentScheduleTransactionProcessor.ADVANCED_PAYMENT_ALLOCATION_STRATEGY - .equals(transactionProcessingStrategyCode)) { + .equals(transactionProcessingStrategyCode)) { baseDataValidator.reset().parameter(LoanProductConstants.LOAN_SCHEDULE_PROCESSING_TYPE).failWithCode( "supported.only.for.progressive.loan.schedule.handling", "Vertical repayment schedule processing is only available with `Advanced payment allocation` strategy"); @@ -913,7 +916,7 @@ public void validateForCreate(final JsonCommand command) { } private void validateAutoRepaymentForDownPayment(Boolean enableDownPayment, DataValidatorBuilder baseDataValidator, - JsonElement element) { + JsonElement element) { if (enableDownPayment) { if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.ENABLE_AUTO_REPAYMENT_DOWN_PAYMENT, element)) { final Boolean enableAutoRepaymentForDownPayment = this.fromApiJsonHelper @@ -1028,7 +1031,7 @@ private void validateLoanConfigurableAttributes(final DataValidatorBuilder baseD } private void validateMultiDisburseLoanData(final DataValidatorBuilder baseDataValidator, final JsonElement element, - final LoanProduct loanProduct) { + final LoanProduct loanProduct) { Boolean multiDisburseLoan = false; if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.MULTI_DISBURSE_LOAN_PARAMETER_NAME, element)) { multiDisburseLoan = this.fromApiJsonHelper.extractBooleanNamed(LoanProductConstants.MULTI_DISBURSE_LOAN_PARAMETER_NAME, @@ -1120,7 +1123,7 @@ private boolean isProgressive(JsonElement element, LoanProduct loanProduct) { } private void validateInterestRecalculationParams(final JsonElement element, final DataValidatorBuilder baseDataValidator, - final LoanProduct loanProduct) { + final LoanProduct loanProduct) { InterestRecalculationCompoundingMethod compoundingMethod = null; @@ -1277,9 +1280,9 @@ private void validateInterestRecalculationParams(final JsonElement element, fina } if (loanProduct == null || this.fromApiJsonHelper.parameterExists(LoanProductConstants.recalculationCompoundingFrequencyNthDayParamName, - element) + element) || this.fromApiJsonHelper.parameterExists(LoanProductConstants.recalculationCompoundingFrequencyWeekdayParamName, - element)) { + element)) { CalendarUtils.validateNthDayOfMonthFrequency(baseDataValidator, LoanProductConstants.recalculationCompoundingFrequencyNthDayParamName, LoanProductConstants.recalculationCompoundingFrequencyWeekdayParamName, element, this.fromApiJsonHelper); @@ -1336,7 +1339,8 @@ public void validateForUpdate(final JsonCommand command, final LoanProduct loanP throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -2012,12 +2016,12 @@ public void validateForUpdate(final JsonCommand command, final LoanProduct loanP if (LoanScheduleProcessingType.HORIZONTAL.name().equals(loanScheduleProcessingType) && AdvancedPaymentScheduleTransactionProcessor.ADVANCED_PAYMENT_ALLOCATION_STRATEGY - .equals(transactionProcessingStrategyCode)) { + .equals(transactionProcessingStrategyCode)) { advancedPaymentAllocationsValidator.checkGroupingOfAllocationRules(allocationRules); } if (LoanScheduleProcessingType.VERTICAL.equals(LoanScheduleProcessingType.valueOf(loanScheduleProcessingType)) && !AdvancedPaymentScheduleTransactionProcessor.ADVANCED_PAYMENT_ALLOCATION_STRATEGY - .equals(transactionProcessingStrategyCode)) { + .equals(transactionProcessingStrategyCode)) { baseDataValidator.reset().parameter(LoanProductConstants.LOAN_SCHEDULE_PROCESSING_TYPE).failWithCode( "supported.only.for.progressive.loan.schedule.handling", "Vertical repayment schedule processing is only available with `Advanced payment allocation` strategy"); @@ -2073,7 +2077,7 @@ private void validateChargeToIncomeAccountMappings(final DataValidatorBuilder ba } private void validateChargeToIncomeAccountMappings(final DataValidatorBuilder baseDataValidator, final JsonElement element, - final boolean isPenalty) { + final boolean isPenalty) { String parameterName; if (isPenalty) { parameterName = LoanProductAccountingParams.PENALTY_INCOME_ACCOUNT_MAPPING.getValue(); @@ -2120,14 +2124,14 @@ private void validateWriteOffToExpenseMappings(final DataValidatorBuilder baseDa } private void validateAdditionalAccountMappings(DataValidatorBuilder baseDataValidator, JsonElement element, String parameterName, - LoanProductAccountingParams reasonCodeValueIdParam, String failCode, - BiConsumer, List> additionalMappingValidator) { + LoanProductAccountingParams reasonCodeValueIdParam, String failCode, + BiConsumer, List> additionalMappingValidator) { if (this.fromApiJsonHelper.parameterExists(parameterName, element)) { final JsonArray reasonToExpenseMappingArray = this.fromApiJsonHelper.extractJsonArrayNamed(parameterName, element); if (reasonToExpenseMappingArray != null && !reasonToExpenseMappingArray.isEmpty()) { Map> reasonToAccounts = new HashMap<>(); List processedMappings = new ArrayList<>(); // Collect processed mappings - // for the new method + // for the new method int i = 0; do { @@ -2144,7 +2148,7 @@ private void validateAdditionalAccountMappings(DataValidatorBuilder baseDataVali + LoanProductAccountingParams.EXPENSE_GL_ACCOUNT_ID.getValue()) .value(expenseGlAccountIdString).notNull().longGreaterThanZero(); baseDataValidator.reset().parameter( - parameterName + OPENING_SQUARE_BRACKET + i + CLOSING_SQUARE_BRACKET + DOT + reasonCodeValueIdParam.getValue()) + parameterName + OPENING_SQUARE_BRACKET + i + CLOSING_SQUARE_BRACKET + DOT + reasonCodeValueIdParam.getValue()) .value(reasonCodeValueIdString).notNull().longGreaterThanZero(); final Long reasonCodeValueId = Long.valueOf(reasonCodeValueIdString); @@ -2184,7 +2188,7 @@ private void validateAdditionalAccountMappings(DataValidatorBuilder baseDataVali } private void validateClassificationToIncomeMappings(final DataValidatorBuilder baseDataValidator, final JsonElement element, - final LoanProductAccountingParams classificationParameter) { + final LoanProductAccountingParams classificationParameter) { String parameterName = classificationParameter.getValue(); if (this.fromApiJsonHelper.parameterExists(parameterName, element)) { @@ -2192,7 +2196,7 @@ private void validateClassificationToIncomeMappings(final DataValidatorBuilder b if (classificationToIncomeMappingArray != null && classificationToIncomeMappingArray.size() > 0) { Map> classificationToAccounts = new HashMap<>(); List processedMappings = new ArrayList<>(); // Collect processed mappings - // for the new method + // for the new method int i = 0; do { @@ -2236,22 +2240,22 @@ private void validateClassificationToIncomeMappings(final DataValidatorBuilder b // Call the new validation method for additional checks final String dataCodeName = classificationParameter .equals(LoanProductAccountingParams.CAPITALIZED_INCOME_CLASSIFICATION_TO_INCOME_ACCOUNT_MAPPINGS) - ? LoanTransactionApiConstants.CAPITALIZED_INCOME_CLASSIFICATION_CODE - : LoanTransactionApiConstants.BUY_DOWN_FEE_CLASSIFICATION_CODE; + ? LoanTransactionApiConstants.CAPITALIZED_INCOME_CLASSIFICATION_CODE + : LoanTransactionApiConstants.BUY_DOWN_FEE_CLASSIFICATION_CODE; productToGLAccountMappingHelper.validateClassificationMappingsInDatabase(processedMappings, dataCodeName); } } } public void validateMinMaxConstraints(final JsonElement element, final DataValidatorBuilder baseDataValidator, - final LoanProduct loanProduct) { + final LoanProduct loanProduct) { validatePrincipalMinMaxConstraint(element, loanProduct, baseDataValidator); validateNumberOfRepaymentsMinMaxConstraint(element, loanProduct, baseDataValidator); validateNominalInterestRatePerPeriodMinMaxConstraint(element, loanProduct, baseDataValidator); } public void validateMinMaxConstraints(final JsonElement element, final DataValidatorBuilder baseDataValidator, - final LoanProduct loanProduct, Integer cycleNumber) { + final LoanProduct loanProduct, Integer cycleNumber) { final Map minmaxValues = loanProduct.fetchBorrowerCycleVariationsForCycleNumber(cycleNumber); final String principalParameterName = PRINCIPAL; @@ -2328,7 +2332,7 @@ public void validateMinMaxConstraints(final JsonElement element, final DataValid } private void validatePrincipalMinMaxConstraint(final JsonElement element, final LoanProduct loanProduct, - final DataValidatorBuilder baseDataValidator) { + final DataValidatorBuilder baseDataValidator) { boolean principalUpdated = false; boolean minPrincipalUpdated = false; boolean maxPrincipalUpdated = false; @@ -2385,7 +2389,7 @@ private void validatePrincipalMinMaxConstraint(final JsonElement element, final } private void validateNumberOfRepaymentsMinMaxConstraint(final JsonElement element, final LoanProduct loanProduct, - final DataValidatorBuilder baseDataValidator) { + final DataValidatorBuilder baseDataValidator) { boolean numberOfRepaymentsUpdated = false; boolean minNumberOfRepaymentsUpdated = false; boolean maxNumberOfRepaymentsUpdated = false; @@ -2444,7 +2448,7 @@ private void validateNumberOfRepaymentsMinMaxConstraint(final JsonElement elemen } private void validateNominalInterestRatePerPeriodMinMaxConstraint(final JsonElement element, final LoanProduct loanProduct, - final DataValidatorBuilder baseDataValidator) { + final DataValidatorBuilder baseDataValidator) { if ((this.fromApiJsonHelper.parameterExists(IS_LINKED_TO_FLOATING_INTEREST_RATES, element) && this.fromApiJsonHelper.extractBooleanNamed(IS_LINKED_TO_FLOATING_INTEREST_RATES, element)) @@ -2552,8 +2556,8 @@ private void validateBorrowerCycleInterestVariations(final JsonElement element, } private void validateBorrowerCycleVariations(final JsonElement element, final DataValidatorBuilder baseDataValidator, - final String variationParameterName, final String defaultParameterName, final String minParameterName, - final String maxParameterName, final String valueUsageConditionParamName, final String cycleNumbersParamName) { + final String variationParameterName, final String defaultParameterName, final String minParameterName, + final String maxParameterName, final String valueUsageConditionParamName, final String cycleNumbersParamName) { final JsonObject topLevelJsonElement = element.getAsJsonObject(); final Locale locale = this.fromApiJsonHelper.extractLocaleParameter(topLevelJsonElement); int lastCycleNumber = 0; @@ -2637,7 +2641,7 @@ private void validateBorrowerCycleVariations(final JsonElement element, final Da } private void validateGuaranteeParams(final JsonElement element, final DataValidatorBuilder baseDataValidator, - final LoanProduct loanProduct) { + final LoanProduct loanProduct) { BigDecimal mandatoryGuarantee = BigDecimal.ZERO; BigDecimal minimumGuaranteeFromOwnFunds = BigDecimal.ZERO; BigDecimal minimumGuaranteeFromGuarantor = BigDecimal.ZERO; @@ -2682,7 +2686,7 @@ private void validateGuaranteeParams(final JsonElement element, final DataValida } private void validatePartialPeriodSupport(final Integer interestCalculationPeriodType, final DataValidatorBuilder baseDataValidator, - final JsonElement element, final LoanProduct loanProduct) { + final JsonElement element, final LoanProduct loanProduct) { if (interestCalculationPeriodType != null) { final InterestCalculationPeriodMethod interestCalculationPeriodMethod = InterestCalculationPeriodMethod .fromInt(interestCalculationPeriodType); @@ -2763,8 +2767,8 @@ private void validatePartialPeriodSupport(final Integer interestCalculationPerio } public void fixedLengthValidations(final String transactionProcessingStrategyCode, final boolean thereIsInterest, - final Integer numberOfRepayments, final Integer repayEvery, final JsonElement element, - final DataValidatorBuilder baseDataValidator) { + final Integer numberOfRepayments, final Integer repayEvery, final JsonElement element, + final DataValidatorBuilder baseDataValidator) { if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.FIXED_LENGTH, element)) { final JsonObject topLevelJsonElement = element.getAsJsonObject(); final Locale locale = this.fromApiJsonHelper.extractLocaleParameter(topLevelJsonElement); @@ -2798,7 +2802,7 @@ public void fixedLengthValidations(final String transactionProcessingStrategyCod } private void validateLoanScheduleType(final String transactionProcessingStrategyCode, final DataValidatorBuilder baseDataValidator, - final JsonElement element) { + final JsonElement element) { final String loanScheduleType = this.fromApiJsonHelper.extractStringNamed(LoanProductConstants.LOAN_SCHEDULE_TYPE, element); baseDataValidator.reset().parameter(LoanProductConstants.LOAN_SCHEDULE_TYPE).value(loanScheduleType).ignoreIfNull() .isOneOfEnumValues(LoanScheduleType.class); @@ -2809,7 +2813,7 @@ private void validateLoanScheduleType(final String transactionProcessingStrategy if (!LoanScheduleType.PROGRESSIVE.equals(LoanScheduleType.valueOf(loanScheduleType)) && AdvancedPaymentScheduleTransactionProcessor.ADVANCED_PAYMENT_ALLOCATION_STRATEGY - .equals(transactionProcessingStrategyCode)) { + .equals(transactionProcessingStrategyCode)) { baseDataValidator.reset().parameter(LoanProductConstants.LOAN_SCHEDULE_PROCESSING_TYPE).failWithCode( "supported.only.for.progressive.loan.schedule.type", "Progressive repayment schedule processing is only available with `Advanced payment allocation` strategy"); @@ -2817,7 +2821,7 @@ private void validateLoanScheduleType(final String transactionProcessingStrategy if (LoanScheduleType.PROGRESSIVE.equals(LoanScheduleType.valueOf(loanScheduleType)) && !AdvancedPaymentScheduleTransactionProcessor.ADVANCED_PAYMENT_ALLOCATION_STRATEGY - .equals(transactionProcessingStrategyCode)) { + .equals(transactionProcessingStrategyCode)) { baseDataValidator.reset().parameter(LoanProductConstants.LOAN_SCHEDULE_TYPE).failWithCode( "supported.only.with.advanced.payment.allocation.strategy", loanScheduleType + " loan schedule type is not available with " + transactionProcessingStrategyCode + " strategy"); @@ -2825,8 +2829,8 @@ private void validateLoanScheduleType(final String transactionProcessingStrategy } public void validateRepaymentPeriodWithGraceSettings(final Integer numberOfRepayments, final Integer graceOnPrincipalPayment, - final Integer graceOnInterestPayment, final Integer graceOnInterestCharged, final Integer recurringMoratoriumOnPrincipalPeriods, - DataValidatorBuilder baseDataValidator) { + final Integer graceOnInterestPayment, final Integer graceOnInterestCharged, final Integer recurringMoratoriumOnPrincipalPeriods, + DataValidatorBuilder baseDataValidator) { if (numberOfRepayments != null) { if (numberOfRepayments <= defaultToZeroIfNull(graceOnPrincipalPayment)) { baseDataValidator.reset().parameter("graceOnPrincipalPayment").value(graceOnPrincipalPayment) @@ -2861,7 +2865,7 @@ public void validateRepaymentPeriodWithGraceSettings(final Integer numberOfRepay } private void validateIncomeCapitalization(String transactionProcessingStrategyCode, JsonElement element, - DataValidatorBuilder baseDataValidator, Integer accountingRuleType) { + DataValidatorBuilder baseDataValidator, Integer accountingRuleType) { if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.CAPITALIZED_INCOME_CALCULATION_TYPE_PARAM_NAME, element)) { final String capitalizedIncomeCalculationType = this.fromApiJsonHelper .extractStringNamed(LoanProductConstants.CAPITALIZED_INCOME_CALCULATION_TYPE_PARAM_NAME, element); @@ -2933,7 +2937,7 @@ private void validateIncomeCapitalization(String transactionProcessingStrategyCo } private void validateBuyDownFee(String transactionProcessingStrategyCode, JsonElement element, DataValidatorBuilder baseDataValidator, - Integer accountingRuleType) { + Integer accountingRuleType) { if (this.fromApiJsonHelper.parameterExists(LoanProductConstants.BUY_DOWN_FEE_CALCULATION_TYPE_PARAM_NAME, element)) { final String buyDownFeeCalculationType = this.fromApiJsonHelper .extractStringNamed(LoanProductConstants.BUY_DOWN_FEE_CALCULATION_TYPE_PARAM_NAME, element); 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 f80846604d7..f0ca7c402da 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 @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import java.util.Collection; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.common.AccountingEnumerations; import org.apache.fineract.infrastructure.core.api.ApiFacingEnum; @@ -232,9 +233,9 @@ private static final class LoanProductMapper implements RowMapper delinquencyBucketOptions; LoanProductMapper(final Collection charges, - final Collection borrowerCycleVariationDatas, final Collection rates, - final Collection delinquencyBucketOptions, Collection advancedPaymentData, - Collection creditAllocationData) { + final Collection borrowerCycleVariationDatas, final Collection rates, + final Collection delinquencyBucketOptions, Collection advancedPaymentData, + Collection creditAllocationData) { this.charges = charges; this.borrowerCycleVariationDatas = borrowerCycleVariationDatas; this.rates = rates; @@ -834,7 +835,8 @@ public LoanProductData retrieveLoanProductFloatingDetails(final Long loanProduct private static final class LoanProductFloatingRateMapper implements RowMapper { - LoanProductFloatingRateMapper() {} + LoanProductFloatingRateMapper() { + } public String schema() { return "lp.id as id, lp.name as name," + "lp.is_linked_to_floating_interest_rates as isLinkedToFloatingInterestRates, " diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductWritePlatformServiceJpaRepositoryImpl.java index 3b78f94d0af..e33e13f337f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/service/LoanProductWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,10 +21,12 @@ import com.google.gson.JsonArray; import com.google.gson.JsonObject; import jakarta.persistence.PersistenceException; + import java.time.LocalDate; import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; @@ -325,8 +327,8 @@ private boolean anyChangeInCriticalFloatingRateLinkedParams(JsonCommand command, product.isLinkedToFloatingInterestRate()); final boolean isChangeInCriticalFloatingRateParams = product.getFloatingRates() != null && (command.isChangeInLongParameterNamed("floatingRatesId", product.getFloatingRates().getFloatingRate().getId()) - || command.isChangeInBigDecimalParameterNamed("interestRateDifferential", - product.getFloatingRates().getInterestRateDifferential())); + || command.isChangeInBigDecimalParameterNamed("interestRateDifferential", + product.getFloatingRates().getInterestRateDifferential())); return isChangeFromFloatingToFlatOrViceVersa || isChangeInCriticalFloatingRateParams; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/starter/LoanProductConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/starter/LoanProductConfiguration.java index e5617d0c193..bff4275501d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/starter/LoanProductConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanproduct/starter/LoanProductConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -64,9 +64,9 @@ public LoanDropdownReadPlatformService loanDropdownReadPlatformService( @Bean @ConditionalOnMissingBean(LoanProductReadPlatformService.class) public LoanProductReadPlatformService loanProductReadPlatformService(PlatformSecurityContext context, JdbcTemplate jdbcTemplate, - ChargeReadPlatformService chargeReadPlatformService, RateReadService rateReadService, DatabaseSpecificSQLGenerator sqlGenerator, - FineractEntityAccessUtil fineractEntityAccessUtil, DelinquencyReadPlatformService delinquencyReadPlatformService, - LoanProductRepository loanProductRepository) { + ChargeReadPlatformService chargeReadPlatformService, RateReadService rateReadService, DatabaseSpecificSQLGenerator sqlGenerator, + FineractEntityAccessUtil fineractEntityAccessUtil, DelinquencyReadPlatformService delinquencyReadPlatformService, + LoanProductRepository loanProductRepository) { return new LoanProductReadPlatformServiceImpl(context, jdbcTemplate, chargeReadPlatformService, rateReadService, sqlGenerator, fineractEntityAccessUtil, delinquencyReadPlatformService, loanProductRepository); } @@ -74,15 +74,15 @@ public LoanProductReadPlatformService loanProductReadPlatformService(PlatformSec @Bean @ConditionalOnMissingBean(LoanProductWritePlatformService.class) public LoanProductWritePlatformService loanProductWritePlatformService(PlatformSecurityContext context, - LoanProductDataValidator fromApiJsonDeserializer, LoanProductRepository loanProductRepository, AprCalculator aprCalculator, - FundRepository fundRepository, ChargeRepositoryWrapper chargeRepository, RateRepositoryWrapper rateRepository, - ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService, - FineractEntityAccessUtil fineractEntityAccessUtil, FloatingRateRepositoryWrapper floatingRateRepository, - LoanRepositoryWrapper loanRepositoryWrapper, BusinessEventNotifierService businessEventNotifierService, - DelinquencyBucketRepository delinquencyBucketRepository, - LoanRepaymentScheduleTransactionProcessorFactory loanRepaymentScheduleTransactionProcessorFactory, - AdvancedPaymentAllocationsJsonParser advancedPaymentJsonParser, CreditAllocationsJsonParser creditAllocationsJsonParser, - LoanProductAssembler loanProductAssembler, LoanProductUpdateUtil loanProductUpdateUtil) { + LoanProductDataValidator fromApiJsonDeserializer, LoanProductRepository loanProductRepository, AprCalculator aprCalculator, + FundRepository fundRepository, ChargeRepositoryWrapper chargeRepository, RateRepositoryWrapper rateRepository, + ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService, + FineractEntityAccessUtil fineractEntityAccessUtil, FloatingRateRepositoryWrapper floatingRateRepository, + LoanRepositoryWrapper loanRepositoryWrapper, BusinessEventNotifierService businessEventNotifierService, + DelinquencyBucketRepository delinquencyBucketRepository, + LoanRepaymentScheduleTransactionProcessorFactory loanRepaymentScheduleTransactionProcessorFactory, + AdvancedPaymentAllocationsJsonParser advancedPaymentJsonParser, CreditAllocationsJsonParser creditAllocationsJsonParser, + LoanProductAssembler loanProductAssembler, LoanProductUpdateUtil loanProductUpdateUtil) { return new LoanProductWritePlatformServiceJpaRepositoryImpl(context, fromApiJsonDeserializer, loanProductRepository, aprCalculator, fundRepository, chargeRepository, rateRepository, accountMappingWritePlatformService, fineractEntityAccessUtil, floatingRateRepository, loanRepositoryWrapper, businessEventNotifierService, delinquencyBucketRepository, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/MeetingApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/MeetingApiConstants.java index 8cd3e009eb3..e62ab871ce3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/MeetingApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/MeetingApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/data/MeetingAttendanceType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/data/MeetingAttendanceType.java index 79d0a109c6b..75db4d18317 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/data/MeetingAttendanceType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/data/MeetingAttendanceType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/domain/MeetingAttendanceRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/domain/MeetingAttendanceRepository.java index ccc13f1940e..06fbfd2efd2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/domain/MeetingAttendanceRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/domain/MeetingAttendanceRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/domain/MeetingRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/domain/MeetingRepository.java index d547e45a9be..410c7951037 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/domain/MeetingRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/domain/MeetingRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.meeting.domain; import java.time.LocalDate; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/domain/MeetingRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/domain/MeetingRepositoryWrapper.java index f125037b572..672a6993012 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/domain/MeetingRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/domain/MeetingRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/exception/MeetingDateException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/exception/MeetingDateException.java index b9d80a1f987..5ecd49f6b1d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/exception/MeetingDateException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/exception/MeetingDateException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/exception/MeetingNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/exception/MeetingNotFoundException.java index 9f0ca4d0a0f..2ea510f4376 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/exception/MeetingNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/exception/MeetingNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/exception/MeetingNotSupportedResourceException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/exception/MeetingNotSupportedResourceException.java index 933aec1c6bd..534e4a17a5f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/exception/MeetingNotSupportedResourceException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/exception/MeetingNotSupportedResourceException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/service/MeetingAttendanceDropdownReadService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/service/MeetingAttendanceDropdownReadService.java index 5a0e01008a7..32e9eb9235e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/service/MeetingAttendanceDropdownReadService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/meeting/service/MeetingAttendanceDropdownReadService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.meeting.service; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; public interface MeetingAttendanceDropdownReadService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/command/NoteCreateCommand.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/command/NoteCreateCommand.java index 22061079144..da195d46cb5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/command/NoteCreateCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/command/NoteCreateCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class NoteCreateCommand extends Command {} +public class NoteCreateCommand extends Command { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/command/NoteDeleteCommand.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/command/NoteDeleteCommand.java index ba97ea2f6a4..ceb9636123a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/command/NoteDeleteCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/command/NoteDeleteCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class NoteDeleteCommand extends Command {} +public class NoteDeleteCommand extends Command { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/command/NoteUpdateCommand.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/command/NoteUpdateCommand.java index 2671bb2f92c..2c4b10deca0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/command/NoteUpdateCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/command/NoteUpdateCommand.java @@ -6,9 +6,9 @@ * 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 @@ -25,4 +25,5 @@ @Data @EqualsAndHashCode(callSuper = true) -public class NoteUpdateCommand extends Command {} +public class NoteUpdateCommand extends Command { +} diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/domain/Note.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/domain/Note.java index db71517173c..4ab0c0ba19c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/domain/Note.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/domain/Note.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.util.Map; + import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Strings; import org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom; @@ -94,7 +96,7 @@ public static Note savingNote(final SavingsAccount account, final String note) { } public static Note savingsTransactionNote(final SavingsAccount savingsAccount, final SavingsAccountTransaction savingsTransaction, - final String note) { + final String note) { return new Note(savingsAccount, savingsTransaction, note); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/domain/NoteRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/domain/NoteRepository.java index b7b0bb4c1c9..429f0decded 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/domain/NoteRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/domain/NoteRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.note.domain; import java.util.List; + import org.apache.fineract.portfolio.client.domain.Client; import org.apache.fineract.portfolio.group.domain.Group; import org.apache.fineract.portfolio.loanaccount.domain.Loan; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/exception/NoteNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/exception/NoteNotFoundException.java index 36a3a6a7c3b..edcf28d017c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/exception/NoteNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/exception/NoteNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/exception/NoteResourceNotSupportedException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/exception/NoteResourceNotSupportedException.java index 2fb986f99b4..fff7c57012d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/exception/NoteResourceNotSupportedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/exception/NoteResourceNotSupportedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/handler/NoteCreateCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/handler/NoteCreateCommandHandler.java index d5cd721a9d6..dc4b4d763cd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/handler/NoteCreateCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/handler/NoteCreateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/handler/NoteDeleteCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/handler/NoteDeleteCommandHandler.java index 7df6ecfb755..eb3f04268af 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/handler/NoteDeleteCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/handler/NoteDeleteCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/handler/NoteUpdateCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/handler/NoteUpdateCommandHandler.java index 009f7539b8d..25f4e4f3ec0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/handler/NoteUpdateCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/handler/NoteUpdateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/listener/NoteListener.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/listener/NoteListener.java index e3ac4f2eb6d..e26b96e2e15 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/listener/NoteListener.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/note/listener/NoteListener.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/api/ProductsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/api/ProductsApiResourceSwagger.java index 4dbe212eda6..3f499cdf366 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/api/ProductsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/api/ProductsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.products.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.Set; /** @@ -26,16 +27,19 @@ */ final class ProductsApiResourceSwagger { - private ProductsApiResourceSwagger() {} + private ProductsApiResourceSwagger() { + } @Schema(description = "GetProductsTypeProductIdResponse") public static final class GetProductsTypeProductIdResponse { - private GetProductsTypeProductIdResponse() {} + private GetProductsTypeProductIdResponse() { + } static final class GetProductsCurrency { - private GetProductsCurrency() {} + private GetProductsCurrency() { + } @Schema(example = "USD") public String code; @@ -55,7 +59,8 @@ private GetProductsCurrency() {} static final class GetProductsMarketPrice { - private GetProductsMarketPrice() {} + private GetProductsMarketPrice() { + } @Schema(example = "4") public Long id; @@ -67,11 +72,13 @@ private GetProductsMarketPrice() {} static final class GetProductsCharges { - private GetProductsCharges() {} + private GetProductsCharges() { + } static final class GetChargesCurrency { - private GetChargesCurrency() {} + private GetChargesCurrency() { + } @Schema(example = "USD") public String code; @@ -89,7 +96,8 @@ private GetChargesCurrency() {} static final class GetChargeTimeType { - private GetChargeTimeType() {} + private GetChargeTimeType() { + } @Schema(example = "13") public Long id; @@ -101,7 +109,8 @@ private GetChargeTimeType() {} static final class GetChargeAppliesTo { - private GetChargeAppliesTo() {} + private GetChargeAppliesTo() { + } @Schema(example = "4") public Long id; @@ -113,7 +122,8 @@ private GetChargeAppliesTo() {} static final class GetChargeCalculationType { - private GetChargeCalculationType() {} + private GetChargeCalculationType() { + } @Schema(example = "1") public Long id; @@ -125,7 +135,8 @@ private GetChargeCalculationType() {} static final class GetChargePaymentMode { - private GetChargePaymentMode() {} + private GetChargePaymentMode() { + } @Schema(example = "0") public Long id; @@ -154,7 +165,8 @@ private GetChargePaymentMode() {} static final class GetLockPeriodTypeEnum { - private GetLockPeriodTypeEnum() {} + private GetLockPeriodTypeEnum() { + } @Schema(example = "0") public Long id; @@ -164,7 +176,8 @@ private GetLockPeriodTypeEnum() {} static final class GetProductsAccountingRule { - private GetProductsAccountingRule() {} + private GetProductsAccountingRule() { + } @Schema(example = "2") public Long id; @@ -176,11 +189,13 @@ private GetProductsAccountingRule() {} static final class GetProductsAccountingMappings { - private GetProductsAccountingMappings() {} + private GetProductsAccountingMappings() { + } static final class GetShareReferenceId { - private GetShareReferenceId() {} + private GetShareReferenceId() { + } @Schema(example = "1") public Long id; @@ -192,7 +207,8 @@ private GetShareReferenceId() {} static final class GetIncomeFromFeeAccountId { - private GetIncomeFromFeeAccountId() {} + private GetIncomeFromFeeAccountId() { + } @Schema(example = "14") public Long id; @@ -204,7 +220,8 @@ private GetIncomeFromFeeAccountId() {} static final class GetShareEquityId { - private GetShareEquityId() {} + private GetShareEquityId() { + } @Schema(example = "66") public Long id; @@ -216,7 +233,8 @@ private GetShareEquityId() {} static final class GetShareSuspenseId { - private GetShareSuspenseId() {} + private GetShareSuspenseId() { + } @Schema(example = "8") public Long id; @@ -234,7 +252,8 @@ private GetShareSuspenseId() {} static final class GetProductsMinimumActivePeriodFrequencyTypeOptions { - private GetProductsMinimumActivePeriodFrequencyTypeOptions() {} + private GetProductsMinimumActivePeriodFrequencyTypeOptions() { + } @Schema(example = "0") public Long id; @@ -246,15 +265,18 @@ private GetProductsMinimumActivePeriodFrequencyTypeOptions() {} static final class GetProductsAccountingMappingOptions { - private GetProductsAccountingMappingOptions() {} + private GetProductsAccountingMappingOptions() { + } static final class GetProductsLiabilityAccountOptions { - private GetProductsLiabilityAccountOptions() {} + private GetProductsLiabilityAccountOptions() { + } static final class GetProductsLiabilityType { - private GetProductsLiabilityType() {} + private GetProductsLiabilityType() { + } @Schema(example = "2") public Long id; @@ -266,7 +288,8 @@ private GetProductsLiabilityType() {} static final class GetProductsLiabilityUsage { - private GetProductsLiabilityUsage() {} + private GetProductsLiabilityUsage() { + } @Schema(example = "1") public Long id; @@ -278,7 +301,8 @@ private GetProductsLiabilityUsage() {} static final class GetProductsTagId { - private GetProductsTagId() {} + private GetProductsTagId() { + } @Schema(example = "0") public Long id; @@ -307,11 +331,13 @@ private GetProductsTagId() {} static final class GetProductsAssetAccountOptions { - private GetProductsAssetAccountOptions() {} + private GetProductsAssetAccountOptions() { + } static final class GetAssetType { - private GetAssetType() {} + private GetAssetType() { + } @Schema(example = "1") public Long id; @@ -342,11 +368,13 @@ private GetAssetType() {} static final class GetProductsIncomeAccountOptions { - private GetProductsIncomeAccountOptions() {} + private GetProductsIncomeAccountOptions() { + } static final class GetIncomeType { - private GetIncomeType() {} + private GetIncomeType() { + } @Schema(example = "1") public Long id; @@ -377,11 +405,13 @@ private GetIncomeType() {} static final class GetProductsEquityAccountOptions { - private GetProductsEquityAccountOptions() {} + private GetProductsEquityAccountOptions() { + } static final class GetEquityType { - private GetEquityType() {} + private GetEquityType() { + } @Schema(example = "3") public Long id; @@ -459,11 +489,13 @@ private GetEquityType() {} @Schema(description = "GetProductsTypeResponse") public static final class GetProductsTypeResponse { - private GetProductsTypeResponse() {} + private GetProductsTypeResponse() { + } static final class GetProductsPageItems { - private GetProductsPageItems() {} + private GetProductsPageItems() { + } @Schema(example = "1") public Long id; @@ -483,11 +515,13 @@ private GetProductsPageItems() {} @Schema(description = "PostProductsTypeRequest") public static final class PostProductsTypeRequest { - private PostProductsTypeRequest() {} + private PostProductsTypeRequest() { + } static final class PostProductsMarketPricePeriods { - private PostProductsMarketPricePeriods() {} + private PostProductsMarketPricePeriods() { + } @Schema(example = "en") public String locale; @@ -501,7 +535,8 @@ private PostProductsMarketPricePeriods() {} static final class PostProductsChargesSelected { - private PostProductsChargesSelected() {} + private PostProductsChargesSelected() { + } @Schema(example = "20") public Long id; @@ -552,7 +587,8 @@ private PostProductsChargesSelected() {} @Schema(description = "PostProductsTypeResponse") public static final class PostProductsTypeResponse { - private PostProductsTypeResponse() {} + private PostProductsTypeResponse() { + } @Schema(example = "1") public Long resourceId; @@ -561,7 +597,8 @@ private PostProductsTypeResponse() {} @Schema(description = "PutProductsTypeProductIdRequest") public static final class PutProductsTypeProductIdRequest { - private PutProductsTypeProductIdRequest() {} + private PutProductsTypeProductIdRequest() { + } @Schema(example = "Share Product Description.") public String description; @@ -574,11 +611,13 @@ private PutProductsTypeProductIdRequest() {} @Schema(description = "PutProductsTypeProductIdResponse") public static final class PutProductsTypeProductIdResponse { - private PutProductsTypeProductIdResponse() {} + private PutProductsTypeProductIdResponse() { + } static final class PutProductsChanges { - private PutProductsChanges() {} + private PutProductsChanges() { + } @Schema(example = "Share Product Description.") public String description; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/constants/ProductsApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/constants/ProductsApiConstants.java index 2d90dc80ed6..963ec6dcbe5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/constants/ProductsApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/constants/ProductsApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/data/ProductData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/data/ProductData.java index d3147558113..9e1192cf81f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/data/ProductData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/data/ProductData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/exception/ProductNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/exception/ProductNotFoundException.java index 0bfaf634ec2..6af26405dd4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/exception/ProductNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/exception/ProductNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/service/ProductCommandsService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/service/ProductCommandsService.java index d93735759d7..aaaa03a96eb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/service/ProductCommandsService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/service/ProductCommandsService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/service/ShareProductReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/service/ShareProductReadPlatformService.java index 9c9d15ee28c..0223a855bdb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/service/ShareProductReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/products/service/ShareProductReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.Set; + import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.portfolio.products.data.ProductData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/api/RateApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/api/RateApiConstants.java index e77e1a04557..0d31d8db19b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/api/RateApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/api/RateApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/api/RateRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/api/RateRequest.java index 9b5a827695b..c95196870f2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/api/RateRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/api/RateRequest.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serial; import java.io.Serializable; import java.math.BigDecimal; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/domain/RateRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/domain/RateRepository.java index 6abe50295b8..3285caac4b0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/domain/RateRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/domain/RateRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.rate.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/domain/RateRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/domain/RateRepositoryWrapper.java index 4bed457f1f5..9cfcd205b97 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/domain/RateRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/domain/RateRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Objects; + import org.apache.fineract.portfolio.rate.exception.RateNotFoundException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/exception/RateAlreadyExistException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/exception/RateAlreadyExistException.java index 6f9e473af1a..21e922ee2f8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/exception/RateAlreadyExistException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/exception/RateAlreadyExistException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/exception/RateNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/exception/RateNotFoundException.java index 625e0d1be1c..81e4b0e7a08 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/exception/RateNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/exception/RateNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/handler/CreateRateCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/handler/CreateRateCommandHandler.java index 489955ee1a9..1f63c665815 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/handler/CreateRateCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/handler/CreateRateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/handler/UpdateRateCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/handler/UpdateRateCommandHandler.java index f1ed8e1ab63..0a9cc2f7c26 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/handler/UpdateRateCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/handler/UpdateRateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/serialization/RateDefinitionCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/serialization/RateDefinitionCommandFromApiJsonDeserializer.java index e341e225696..e79b5dd5a32 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/serialization/RateDefinitionCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/serialization/RateDefinitionCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.util.ArrayList; @@ -28,6 +29,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -59,7 +61,8 @@ public void validateForCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); @@ -86,7 +89,8 @@ public void validateForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateAssembler.java index 9150a9d4c7f..83a0d40644a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateAssembler.java @@ -6,9 +6,9 @@ * 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 @@ -21,8 +21,10 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.util.ArrayList; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; import org.apache.fineract.portfolio.loanproduct.LoanProductConstants; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateEnumerations.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateEnumerations.java index 041fcc7ae35..0eef4a6b145 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateEnumerations.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -37,10 +37,10 @@ public static EnumOptionData rateAppliesTo(final RateAppliesTo type) { switch (type) { case LOAN: optionData = new EnumOptionData(RateAppliesTo.LOAN.getValue().longValue(), RateAppliesTo.LOAN.getCode(), "Loan"); - break; + break; default: optionData = new EnumOptionData(RateAppliesTo.INVALID.getValue().longValue(), RateAppliesTo.INVALID.getCode(), "Invalid"); - break; + break; } return optionData; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateReadService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateReadService.java index 7f624f914e1..2973529350a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateReadService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateReadService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.rate.service; import java.util.List; + import org.apache.fineract.portfolio.rate.data.RateData; /** diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateReadServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateReadServiceImpl.java index 9643621a9f1..3eb95f53dc3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateReadServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateReadServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; @@ -56,7 +57,7 @@ public RateData retrieveOne(Long rateId) { this.context.authenticatedUser(); final RateMapper rm = new RateMapper(); final String sql = "select " + rm.rateSchema() + " where r.id = ?"; - final RateData selectedRate = this.jdbcTemplate.queryForObject(sql, rm, new Object[] { rateId }); // NOSONAR + final RateData selectedRate = this.jdbcTemplate.queryForObject(sql, rm, new Object[]{rateId}); // NOSONAR return selectedRate; } catch (final EmptyResultDataAccessException e) { @@ -70,7 +71,7 @@ public RateData retrieveByName(String name) { this.context.authenticatedUser(); final RateMapper rm = new RateMapper(); final String sql = "select " + rm.rateSchema() + " where r.name = ?"; - final RateData selectedRate = this.jdbcTemplate.queryForObject(sql, rm, new Object[] { name }); // NOSONAR + final RateData selectedRate = this.jdbcTemplate.queryForObject(sql, rm, new Object[]{name}); // NOSONAR return selectedRate; } catch (final EmptyResultDataAccessException e) { @@ -83,21 +84,21 @@ public List retrieveLoanApplicableRates() { this.context.authenticatedUser(); final RateMapper rm = new RateMapper(); final String sql = "select " + rm.rateSchema() + " where r.active = ? and product_apply=?"; - return this.jdbcTemplate.query(sql, rm, new Object[] { true, RateAppliesTo.LOAN.getValue() }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{true, RateAppliesTo.LOAN.getValue()}); // NOSONAR } @Override public List retrieveLoanRates(Long loanId) { final RateMapper rm = new RateMapper(); final String sql = "select " + rm.loanRateSchema() + " where lr.loan_id = ?"; - return this.jdbcTemplate.query(sql, rm, new Object[] { loanId }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{loanId}); // NOSONAR } @Override public List retrieveProductLoanRates(Long loanId) { final RateMapper rm = new RateMapper(); final String sql = "select " + rm.productLoanRateSchema() + " where lr.product_loan_id = ?"; - return this.jdbcTemplate.query(sql, rm, new Object[] { loanId }); // NOSONAR + return this.jdbcTemplate.query(sql, rm, new Object[]{loanId}); // NOSONAR } private static final class RateMapper implements RowMapper { @@ -115,7 +116,8 @@ public String productLoanRateSchema() { return rateSchema() + " join m_product_loan_rate lr on lr.rate_id = r.id"; } - RateMapper() {} + RateMapper() { + } @Override public RateData mapRow(ResultSet resultSet, int i) throws SQLException { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateWriteService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateWriteService.java index 16bc92ac7fb..3ef05e8c87b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateWriteService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateWriteService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateWriteServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateWriteServiceImpl.java index 5851065929b..fc1bbb36d9e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateWriteServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/service/RateWriteServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import static org.apache.fineract.portfolio.rate.api.RateApiConstants.approveUserIdParamName; import jakarta.persistence.PersistenceException; + import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/starter/RateConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/starter/RateConfiguration.java index 87002355d26..8f6b859a4df 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/starter/RateConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/rate/starter/RateConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -52,7 +52,7 @@ public RateReadService rateReadService(JdbcTemplate jdbcTemplate, PlatformSecuri @Bean @ConditionalOnMissingBean(RateWriteService.class) public RateWriteService rateWriteService(RateRepository rateRepository, AppUserRepository appUserRepository, - PlatformSecurityContext context, RateDefinitionCommandFromApiJsonDeserializer fromApiJsonDeserializer) { + PlatformSecurityContext context, RateDefinitionCommandFromApiJsonDeserializer fromApiJsonDeserializer) { return new RateWriteServiceImpl(rateRepository, appUserRepository, context, fromApiJsonDeserializer); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/api/PostDatedChecksApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/api/PostDatedChecksApiResourceSwagger.java index 9799009ba4a..58e8a975b8d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/api/PostDatedChecksApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/api/PostDatedChecksApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,17 +19,20 @@ package org.apache.fineract.portfolio.repaymentwithpostdatedchecks.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.math.BigDecimal; import java.time.LocalDate; final class PostDatedChecksApiResourceSwagger { - private PostDatedChecksApiResourceSwagger() {} + private PostDatedChecksApiResourceSwagger() { + } @Schema(description = "GetPostDatedChecks") public static final class GetPostDatedChecks { - private GetPostDatedChecks() {} + private GetPostDatedChecks() { + } @Schema(example = "1") public Long id; @@ -49,7 +52,8 @@ private GetPostDatedChecks() {} @Schema(description = "UpdatePostDatedCheckRequest") public static final class UpdatePostDatedCheckRequest { - private UpdatePostDatedCheckRequest() {} + private UpdatePostDatedCheckRequest() { + } @Schema(example = "en") public String locale; @@ -70,7 +74,8 @@ private UpdatePostDatedCheckRequest() {} @Schema(description = "UpdatePostDatedCheckResponse") public static final class UpdatePostDatedCheckResponse { - private UpdatePostDatedCheckResponse() {} + private UpdatePostDatedCheckResponse() { + } @Schema(example = "12") public Long resourceId; @@ -78,7 +83,8 @@ private UpdatePostDatedCheckResponse() {} static final class UpdateChangesResponse { - private UpdateChangesResponse() {} + private UpdateChangesResponse() { + } @Schema(example = "10000") public BigDecimal amount; @@ -94,7 +100,8 @@ private UpdateChangesResponse() {} @Schema(description = "DeletePostDatedCheck") public static final class DeletePostDatedCheck { - private DeletePostDatedCheck() {} + private DeletePostDatedCheck() { + } @Schema(example = "1") public Long loanId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/data/PostDatedChecksData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/data/PostDatedChecksData.java index 19caf3bbb73..d6d1b5ce2bb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/data/PostDatedChecksData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/data/PostDatedChecksData.java @@ -6,9 +6,9 @@ * 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 @@ -40,7 +40,7 @@ public final class PostDatedChecksData { private final Integer status; private PostDatedChecksData(final LocalDate installmentDate, final Long id, final Integer installmentId, final Long accountNo, - final BigDecimal amount, final String name, final Long checkNo, final Integer status) { + final BigDecimal amount, final String name, final Long checkNo, final Integer status) { this.accountNo = accountNo; this.amount = amount; this.name = name; @@ -52,7 +52,7 @@ private PostDatedChecksData(final LocalDate installmentDate, final Long id, fina } public static PostDatedChecksData from(final LocalDate installmentDate, final Long id, final Integer installmentId, - final Long accountNo, final BigDecimal amount, final String name, final Long checkNo, final Integer status) { + final Long accountNo, final BigDecimal amount, final String name, final Long checkNo, final Integer status) { return new PostDatedChecksData(installmentDate, id, installmentId, accountNo, amount, name, checkNo, status); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/data/PostDatedChecksStatus.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/data/PostDatedChecksStatus.java index ed66d0f0684..dd903256ed4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/data/PostDatedChecksStatus.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/data/PostDatedChecksStatus.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/domain/PostDatedChecksRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/domain/PostDatedChecksRepository.java index 4cf74ebe813..d5098f454d3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/domain/PostDatedChecksRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/domain/PostDatedChecksRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/exception/PostDatedCheckBouncedCheckInvalid.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/exception/PostDatedCheckBouncedCheckInvalid.java index 0460631dbba..1079bfa15ef 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/exception/PostDatedCheckBouncedCheckInvalid.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/exception/PostDatedCheckBouncedCheckInvalid.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/exception/PostDatedCheckNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/exception/PostDatedCheckNotFoundException.java index 1860fb62f8a..fa88b13aa81 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/exception/PostDatedCheckNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/exception/PostDatedCheckNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/handler/BouncePostDatedCheckHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/handler/BouncePostDatedCheckHandler.java index c2a7ede414c..b6e792d0a6c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/handler/BouncePostDatedCheckHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/handler/BouncePostDatedCheckHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/handler/DeletePostDatedChecksHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/handler/DeletePostDatedChecksHandler.java index 25bc5d451af..b0b295fdc49 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/handler/DeletePostDatedChecksHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/handler/DeletePostDatedChecksHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/handler/EditPostDatedChecksHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/handler/EditPostDatedChecksHandler.java index ca05b0c154d..0c7983e95c3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/handler/EditPostDatedChecksHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/handler/EditPostDatedChecksHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksAssembler.java index 002e21c8c48..2130133d082 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksAssembler.java @@ -6,9 +6,9 @@ * 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 @@ -21,12 +21,14 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.util.HashSet; import java.util.List; import java.util.Locale; import java.util.Set; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; import org.apache.fineract.portfolio.loanaccount.domain.Loan; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksReadPlatformService.java index 36656181503..4dba124b002 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.repaymentwithpostdatedchecks.service; import java.util.List; + import org.apache.fineract.portfolio.repaymentwithpostdatedchecks.data.PostDatedChecksData; public interface RepaymentWithPostDatedChecksReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksReadPlatformServiceImpl.java index e2995f6005d..767899be83b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import org.apache.fineract.portfolio.loanaccount.domain.Loan; import org.apache.fineract.portfolio.loanaccount.domain.LoanRepaymentScheduleInstallmentRepository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksWritePlatformService.java index f0b50e2dcb2..bf2acb4fc18 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksWritePlatformServiceImpl.java index 35970e26c20..5fecb970a7c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/service/RepaymentWithPostDatedChecksWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.util.ArrayList; @@ -30,6 +31,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/starter/RepaymentWithPostDatedChecksConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/starter/RepaymentWithPostDatedChecksConfiguration.java index de3594c4d0f..82dd0fcbbba 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/starter/RepaymentWithPostDatedChecksConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/repaymentwithpostdatedchecks/starter/RepaymentWithPostDatedChecksConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResourceSwagger.java index 74a130cac3a..525e621a411 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.savings.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.Set; @@ -28,16 +29,19 @@ */ final class FixedDepositAccountsApiResourceSwagger { - private FixedDepositAccountsApiResourceSwagger() {} + private FixedDepositAccountsApiResourceSwagger() { + } @Schema(description = "GetFixedDepositAccountsTemplateResponse") public static final class GetFixedDepositAccountsTemplateResponse { - private GetFixedDepositAccountsTemplateResponse() {} + private GetFixedDepositAccountsTemplateResponse() { + } static final class GetFixedDepositAccountsProductOptions { - private GetFixedDepositAccountsProductOptions() {} + private GetFixedDepositAccountsProductOptions() { + } @Schema(example = "1") public Long id; @@ -55,11 +59,13 @@ private GetFixedDepositAccountsProductOptions() {} @Schema(description = "GetFixedDepositAccountsResponse") public static final class GetFixedDepositAccountsResponse { - private GetFixedDepositAccountsResponse() {} + private GetFixedDepositAccountsResponse() { + } static final class GetFixedDepositAccountsStatus { - private GetFixedDepositAccountsStatus() {} + private GetFixedDepositAccountsStatus() { + } @Schema(example = "100") public Long id; @@ -89,7 +95,8 @@ private GetFixedDepositAccountsStatus() {} static final class GetFixedDepositAccountsTimeline { - private GetFixedDepositAccountsTimeline() {} + private GetFixedDepositAccountsTimeline() { + } @Schema(example = "[2014, 3, 1]") public LocalDate submittedOnDate; @@ -103,7 +110,8 @@ private GetFixedDepositAccountsTimeline() {} static final class GetFixedDepositAccountsCurrency { - private GetFixedDepositAccountsCurrency() {} + private GetFixedDepositAccountsCurrency() { + } @Schema(example = "USD") public String code; @@ -123,7 +131,8 @@ private GetFixedDepositAccountsCurrency() {} static final class GetFixedDepositAccountsInterestCompoundingPeriodType { - private GetFixedDepositAccountsInterestCompoundingPeriodType() {} + private GetFixedDepositAccountsInterestCompoundingPeriodType() { + } @Schema(example = "4") public Long id; @@ -135,7 +144,8 @@ private GetFixedDepositAccountsInterestCompoundingPeriodType() {} static final class GetFixedDepositAccountsInterestPostingPeriodType { - private GetFixedDepositAccountsInterestPostingPeriodType() {} + private GetFixedDepositAccountsInterestPostingPeriodType() { + } @Schema(example = "4") public Long id; @@ -147,7 +157,8 @@ private GetFixedDepositAccountsInterestPostingPeriodType() {} static final class GetFixedDepositAccountsInterestCalculationType { - private GetFixedDepositAccountsInterestCalculationType() {} + private GetFixedDepositAccountsInterestCalculationType() { + } @Schema(example = "1") public Long id; @@ -159,7 +170,8 @@ private GetFixedDepositAccountsInterestCalculationType() {} static final class GetFixedDepositAccountsInterestCalculationDaysInYearType { - private GetFixedDepositAccountsInterestCalculationDaysInYearType() {} + private GetFixedDepositAccountsInterestCalculationDaysInYearType() { + } @Schema(example = "365") public Long id; @@ -171,7 +183,8 @@ private GetFixedDepositAccountsInterestCalculationDaysInYearType() {} static final class GetFixedDepositAccountsSummary { - private GetFixedDepositAccountsSummary() {} + private GetFixedDepositAccountsSummary() { + } public GetFixedDepositAccountsCurrency currency; @Schema(example = "0") @@ -180,7 +193,8 @@ private GetFixedDepositAccountsSummary() {} static final class GetFixedDepositAccountsMinDepositTermType { - private GetFixedDepositAccountsMinDepositTermType() {} + private GetFixedDepositAccountsMinDepositTermType() { + } @Schema(example = "2") public Long id; @@ -192,7 +206,8 @@ private GetFixedDepositAccountsMinDepositTermType() {} static final class GetFixedDepositAccountsMaxDepositTermType { - private GetFixedDepositAccountsMaxDepositTermType() {} + private GetFixedDepositAccountsMaxDepositTermType() { + } @Schema(example = "3") public Long id; @@ -204,7 +219,8 @@ private GetFixedDepositAccountsMaxDepositTermType() {} static final class GetFixedDepositAccountsDepositPeriodFrequency { - private GetFixedDepositAccountsDepositPeriodFrequency() {} + private GetFixedDepositAccountsDepositPeriodFrequency() { + } @Schema(example = "2") public Long id; @@ -260,7 +276,8 @@ private GetFixedDepositAccountsDepositPeriodFrequency() {} @Schema(description = "CalculateFixedDepositInterestRequest") public static final class CalculateFixedDepositInterestRequest { - private CalculateFixedDepositInterestRequest() {} + private CalculateFixedDepositInterestRequest() { + } @Schema(example = "10000") public BigDecimal principalAmount; @@ -278,7 +295,8 @@ private CalculateFixedDepositInterestRequest() {} @Schema(description = "CalculateFixedDepositInterestResponse") public static final class CalculateFixedDepositInterestResponse { - private CalculateFixedDepositInterestResponse() {} + private CalculateFixedDepositInterestResponse() { + } @Schema(example = "10511.61") public BigDecimal maturityAmount; @@ -290,7 +308,8 @@ private CalculateFixedDepositInterestResponse() {} @Schema(description = "PostFixedDepositAccountsRequest") public static final class PostFixedDepositAccountsRequest { - private PostFixedDepositAccountsRequest() {} + private PostFixedDepositAccountsRequest() { + } @Schema(example = "1") public Long clientId; @@ -313,7 +332,8 @@ private PostFixedDepositAccountsRequest() {} @Schema(description = "PostFixedDepositAccountsResponse") public static final class PostFixedDepositAccountsResponse { - private PostFixedDepositAccountsResponse() {} + private PostFixedDepositAccountsResponse() { + } @Schema(example = "2") public Long officeId; @@ -328,19 +348,23 @@ private PostFixedDepositAccountsResponse() {} @Schema(description = "GetFixedDepositAccountsAccountIdResponse") public static final class GetFixedDepositAccountsAccountIdResponse { - private GetFixedDepositAccountsAccountIdResponse() {} + private GetFixedDepositAccountsAccountIdResponse() { + } static final class GetFixedDepositAccountsAccountChart { - private GetFixedDepositAccountsAccountChart() {} + private GetFixedDepositAccountsAccountChart() { + } static final class GetFixedDepositAccountsChartSlabs { - private GetFixedDepositAccountsChartSlabs() {} + private GetFixedDepositAccountsChartSlabs() { + } static final class GetFixedDepositAccountsPeriodType { - private GetFixedDepositAccountsPeriodType() {} + private GetFixedDepositAccountsPeriodType() { + } @Schema(example = "0") public Long id; @@ -352,7 +376,8 @@ private GetFixedDepositAccountsPeriodType() {} static final class GetFixedDepositAccountsAccountChartCurrency { - private GetFixedDepositAccountsAccountChartCurrency() {} + private GetFixedDepositAccountsAccountChartCurrency() { + } @Schema(example = "USD") public String code; @@ -382,7 +407,8 @@ private GetFixedDepositAccountsAccountChartCurrency() {} static final class GetFixedDepositAccountsPeriodTypes { - private GetFixedDepositAccountsPeriodTypes() {} + private GetFixedDepositAccountsPeriodTypes() { + } @Schema(example = "0") public Long id; @@ -406,7 +432,8 @@ private GetFixedDepositAccountsPeriodTypes() {} static final class GetFixedDepositAccountsAccountIdCurrency { - private GetFixedDepositAccountsAccountIdCurrency() {} + private GetFixedDepositAccountsAccountIdCurrency() { + } @Schema(example = "USD") public String code; @@ -426,7 +453,8 @@ private GetFixedDepositAccountsAccountIdCurrency() {} static final class GetFixedDepositAccountsAccountIdSummary { - private GetFixedDepositAccountsAccountIdSummary() {} + private GetFixedDepositAccountsAccountIdSummary() { + } public GetFixedDepositAccountsAccountIdCurrency currency; @Schema(example = "0") @@ -482,7 +510,8 @@ private GetFixedDepositAccountsAccountIdSummary() {} @Schema(description = "PutFixedDepositAccountsAccountIdRequest") public static final class PutFixedDepositAccountsAccountIdRequest { - private PutFixedDepositAccountsAccountIdRequest() {} + private PutFixedDepositAccountsAccountIdRequest() { + } @Schema(example = "en") public String locale; @@ -493,11 +522,13 @@ private PutFixedDepositAccountsAccountIdRequest() {} @Schema(description = "PutFixedDepositAccountsAccountIdResponse") public static final class PutFixedDepositAccountsAccountIdResponse { - private PutFixedDepositAccountsAccountIdResponse() {} + private PutFixedDepositAccountsAccountIdResponse() { + } static final class PutFixedDepositAccountsChanges { - private PutFixedDepositAccountsChanges() {} + private PutFixedDepositAccountsChanges() { + } @Schema(example = "6000") public Float depositAmount; @@ -519,13 +550,15 @@ private PutFixedDepositAccountsChanges() {} @Schema(description = "PostFixedDepositAccountsAccountIdRequest") public static final class PostFixedDepositAccountsAccountIdRequest { - private PostFixedDepositAccountsAccountIdRequest() {} + private PostFixedDepositAccountsAccountIdRequest() { + } } @Schema(description = "PostFixedDepositAccountsAccountIdResponse") public static final class PostFixedDepositAccountsAccountIdResponse { - private PostFixedDepositAccountsAccountIdResponse() {} + private PostFixedDepositAccountsAccountIdResponse() { + } @Schema(example = "1") public Long officeId; @@ -540,7 +573,8 @@ private PostFixedDepositAccountsAccountIdResponse() {} @Schema(description = "DeleteFixedDepositAccountsAccountIdResponse") public static final class DeleteFixedDepositAccountsAccountIdResponse { - private DeleteFixedDepositAccountsAccountIdResponse() {} + private DeleteFixedDepositAccountsAccountIdResponse() { + } @Schema(example = "1") public Long officeId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResourceSwagger.java index 7b0f058d0b2..a1899f749e5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositProductsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.savings.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; import java.util.Set; @@ -27,20 +28,24 @@ */ final class FixedDepositProductsApiResourceSwagger { - private FixedDepositProductsApiResourceSwagger() {} + private FixedDepositProductsApiResourceSwagger() { + } @Schema(description = "PostFixedDepositProductsRequest") public static final class PostFixedDepositProductsRequest { - private PostFixedDepositProductsRequest() {} + private PostFixedDepositProductsRequest() { + } static final class PostFixedDepositProductsCharts { - private PostFixedDepositProductsCharts() {} + private PostFixedDepositProductsCharts() { + } static final class PostFixedDepositProductsChartSlabs { - private PostFixedDepositProductsChartSlabs() {} + private PostFixedDepositProductsChartSlabs() { + } @Schema(example = "from 0 to 90 days") public String description; @@ -107,7 +112,8 @@ private PostFixedDepositProductsChartSlabs() {} @Schema(description = "PostFixedDepositProductsResponse") public static final class PostFixedDepositProductsResponse { - private PostFixedDepositProductsResponse() {} + private PostFixedDepositProductsResponse() { + } @Schema(example = "1") public Long resourceId; @@ -116,7 +122,8 @@ private PostFixedDepositProductsResponse() {} @Schema(description = "PutFixedDepositProductsProductIdRequest") public static final class PutFixedDepositProductsProductIdRequest { - private PutFixedDepositProductsProductIdRequest() {} + private PutFixedDepositProductsProductIdRequest() { + } @Schema(example = "Fixed deposit product new offerings") public String description; @@ -131,11 +138,13 @@ private PutFixedDepositProductsProductIdRequest() {} @Schema(description = "PutFixedDepositProductsProductIdResponse") public static final class PutFixedDepositProductsProductIdResponse { - private PutFixedDepositProductsProductIdResponse() {} + private PutFixedDepositProductsProductIdResponse() { + } static final class PutFixedDepositProductsChanges { - private PutFixedDepositProductsChanges() {} + private PutFixedDepositProductsChanges() { + } @Schema(example = "Fixed deposit product new offerings") public String description; @@ -151,11 +160,13 @@ private PutFixedDepositProductsChanges() {} @Schema(description = "GetFixedDepositProductsResponse") public static final class GetFixedDepositProductsResponse { - private GetFixedDepositProductsResponse() {} + private GetFixedDepositProductsResponse() { + } static final class GetFixedDepositProductsCurrency { - private GetFixedDepositProductsCurrency() {} + private GetFixedDepositProductsCurrency() { + } @Schema(example = "USD") public String code; @@ -175,7 +186,8 @@ private GetFixedDepositProductsCurrency() {} static final class GetFixedDepositProductsMinDepositTermType { - private GetFixedDepositProductsMinDepositTermType() {} + private GetFixedDepositProductsMinDepositTermType() { + } @Schema(example = "2") public Long id; @@ -187,7 +199,8 @@ private GetFixedDepositProductsMinDepositTermType() {} static final class GetFixedDepositProductsMaxDepositTermType { - private GetFixedDepositProductsMaxDepositTermType() {} + private GetFixedDepositProductsMaxDepositTermType() { + } @Schema(example = "3") public Long id; @@ -199,7 +212,8 @@ private GetFixedDepositProductsMaxDepositTermType() {} static final class GetFixedDepositProductsInterestCompoundingPeriodType { - private GetFixedDepositProductsInterestCompoundingPeriodType() {} + private GetFixedDepositProductsInterestCompoundingPeriodType() { + } @Schema(example = "4") public Long id; @@ -211,7 +225,8 @@ private GetFixedDepositProductsInterestCompoundingPeriodType() {} static final class GetFixedDepositProductsInterestPostingPeriodType { - private GetFixedDepositProductsInterestPostingPeriodType() {} + private GetFixedDepositProductsInterestPostingPeriodType() { + } @Schema(example = "4") public Long id; @@ -223,7 +238,8 @@ private GetFixedDepositProductsInterestPostingPeriodType() {} static final class GetFixedDepositProductsInterestCalculationType { - private GetFixedDepositProductsInterestCalculationType() {} + private GetFixedDepositProductsInterestCalculationType() { + } @Schema(example = "1") public Long id; @@ -235,7 +251,8 @@ private GetFixedDepositProductsInterestCalculationType() {} static final class GetFixedDepositProductsInterestCalculationDaysInYearType { - private GetFixedDepositProductsInterestCalculationDaysInYearType() {} + private GetFixedDepositProductsInterestCalculationDaysInYearType() { + } @Schema(example = "365") public Long id; @@ -247,7 +264,8 @@ private GetFixedDepositProductsInterestCalculationDaysInYearType() {} static final class GetFixedDepositProductsAccountingRule { - private GetFixedDepositProductsAccountingRule() {} + private GetFixedDepositProductsAccountingRule() { + } @Schema(example = "1") public Long id; @@ -286,11 +304,13 @@ private GetFixedDepositProductsAccountingRule() {} @Schema(description = "GetFixedDepositProductsProductIdResponse") public static final class GetFixedDepositProductsProductIdResponse { - private GetFixedDepositProductsProductIdResponse() {} + private GetFixedDepositProductsProductIdResponse() { + } static final class GetFixedDepositProductsProductIdCurrency { - private GetFixedDepositProductsProductIdCurrency() {} + private GetFixedDepositProductsProductIdCurrency() { + } @Schema(example = "USD") public String code; @@ -308,7 +328,8 @@ private GetFixedDepositProductsProductIdCurrency() {} static final class GetFixedDepositProductsProductIdInterestCompoundingPeriodType { - private GetFixedDepositProductsProductIdInterestCompoundingPeriodType() {} + private GetFixedDepositProductsProductIdInterestCompoundingPeriodType() { + } @Schema(example = "1") public Long id; @@ -320,7 +341,8 @@ private GetFixedDepositProductsProductIdInterestCompoundingPeriodType() {} static final class GetFixedDepositProductsGlAccount { - private GetFixedDepositProductsGlAccount() {} + private GetFixedDepositProductsGlAccount() { + } @Schema(example = "12") public Long id; @@ -332,7 +354,8 @@ private GetFixedDepositProductsGlAccount() {} static final class GetFixedDepositProductsProductIdAccountingMappings { - private GetFixedDepositProductsProductIdAccountingMappings() {} + private GetFixedDepositProductsProductIdAccountingMappings() { + } public GetFixedDepositProductsGlAccount savingsReferenceAccount; public GetFixedDepositProductsGlAccount feeReceivableAccount; @@ -347,11 +370,13 @@ private GetFixedDepositProductsProductIdAccountingMappings() {} static final class GetFixedDepositProductsProductIdFeeToIncomeAccountMappings { - private GetFixedDepositProductsProductIdFeeToIncomeAccountMappings() {} + private GetFixedDepositProductsProductIdFeeToIncomeAccountMappings() { + } static final class GetFixedDepositProductsProductIdFeeToIncomeAccountMappingsCharge { - private GetFixedDepositProductsProductIdFeeToIncomeAccountMappingsCharge() {} + private GetFixedDepositProductsProductIdFeeToIncomeAccountMappingsCharge() { + } @Schema(example = "11") public Long id; @@ -365,7 +390,8 @@ private GetFixedDepositProductsProductIdFeeToIncomeAccountMappingsCharge() {} static final class GetFixedDepositProductsProductIdFeeToIncomeAccountMappingsIncomeAccount { - private GetFixedDepositProductsProductIdFeeToIncomeAccountMappingsIncomeAccount() {} + private GetFixedDepositProductsProductIdFeeToIncomeAccountMappingsIncomeAccount() { + } @Schema(example = "16") public Long id; @@ -381,11 +407,13 @@ private GetFixedDepositProductsProductIdFeeToIncomeAccountMappingsIncomeAccount( static final class GetFixedDepositProductsProductIdPenaltyToIncomeAccountMappings { - private GetFixedDepositProductsProductIdPenaltyToIncomeAccountMappings() {} + private GetFixedDepositProductsProductIdPenaltyToIncomeAccountMappings() { + } static final class GetFixedDepositProductsProductIdPenaltyToIncomeAccountMappingsCharge { - private GetFixedDepositProductsProductIdPenaltyToIncomeAccountMappingsCharge() {} + private GetFixedDepositProductsProductIdPenaltyToIncomeAccountMappingsCharge() { + } @Schema(example = "12") public Long id; @@ -403,7 +431,8 @@ private GetFixedDepositProductsProductIdPenaltyToIncomeAccountMappingsCharge() { static final class GetFixedDepositProductsProductIdPreClosurePenalInterestOnType { - private GetFixedDepositProductsProductIdPreClosurePenalInterestOnType() {} + private GetFixedDepositProductsProductIdPreClosurePenalInterestOnType() { + } @Schema(example = "1") public Long id; @@ -415,7 +444,8 @@ private GetFixedDepositProductsProductIdPreClosurePenalInterestOnType() {} static final class GetFixedDepositProductsProductIdMinDepositTermType { - private GetFixedDepositProductsProductIdMinDepositTermType() {} + private GetFixedDepositProductsProductIdMinDepositTermType() { + } @Schema(example = "1") public Long id; @@ -427,7 +457,8 @@ private GetFixedDepositProductsProductIdMinDepositTermType() {} static final class GetFixedDepositProductsProductIdMaxDepositTermType { - private GetFixedDepositProductsProductIdMaxDepositTermType() {} + private GetFixedDepositProductsProductIdMaxDepositTermType() { + } @Schema(example = "3") public Long id; @@ -439,15 +470,18 @@ private GetFixedDepositProductsProductIdMaxDepositTermType() {} static final class GetFixedDepositProductsProductIdActiveChart { - private GetFixedDepositProductsProductIdActiveChart() {} + private GetFixedDepositProductsProductIdActiveChart() { + } static final class GetFixedDepositProductsProductIdChartSlabs { - private GetFixedDepositProductsProductIdChartSlabs() {} + private GetFixedDepositProductsProductIdChartSlabs() { + } static final class GetFixedDepositProductsProductIdPeriodType { - private GetFixedDepositProductsProductIdPeriodType() {} + private GetFixedDepositProductsProductIdPeriodType() { + } @Schema(example = "1") public Long id; @@ -516,7 +550,8 @@ private GetFixedDepositProductsProductIdPeriodType() {} @Schema(description = "DeleteFixedDepositProductsProductIdResponse") public static final class DeleteFixedDepositProductsProductIdResponse { - private DeleteFixedDepositProductsProductIdResponse() {} + private DeleteFixedDepositProductsProductIdResponse() { + } @Schema(example = "1") public Long resourceId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResourceSwagger.java index 83f52ae2005..481b05d9122 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountTransactionsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.savings.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; @@ -28,16 +29,19 @@ */ final class RecurringDepositAccountTransactionsApiResourceSwagger { - private RecurringDepositAccountTransactionsApiResourceSwagger() {} + private RecurringDepositAccountTransactionsApiResourceSwagger() { + } @Schema(description = "GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTemplateResponse") public static final class GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTemplateResponse { - private GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTemplateResponse() {} + private GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTemplateResponse() { + } static final class GetRecurringTransactionType { - private GetRecurringTransactionType() {} + private GetRecurringTransactionType() { + } @Schema(example = "1") public Long id; @@ -71,7 +75,8 @@ private GetRecurringTransactionType() {} static final class GetRecurringCurrency { - private GetRecurringCurrency() {} + private GetRecurringCurrency() { + } @Schema(example = "USD") public String code; @@ -110,11 +115,13 @@ private GetRecurringCurrency() {} @Schema(description = "GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse") public static final class GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse { - private GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse() {} + private GetRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse() { + } static final class GetRecurringTransactionsCurrency { - private GetRecurringTransactionsCurrency() {} + private GetRecurringTransactionsCurrency() { + } @Schema(example = "USD") public String code; @@ -134,7 +141,8 @@ private GetRecurringTransactionsCurrency() {} static final class GetRecurringTransactionsTransactionType { - private GetRecurringTransactionsTransactionType() {} + private GetRecurringTransactionsTransactionType() { + } @Schema(example = "2") public Long id; @@ -154,11 +162,13 @@ private GetRecurringTransactionsTransactionType() {} static final class GetRecurringPaymentDetailData { - private GetRecurringPaymentDetailData() {} + private GetRecurringPaymentDetailData() { + } static final class GetRecurringPaymentType { - private GetRecurringPaymentType() {} + private GetRecurringPaymentType() { + } @Schema(example = "11") public Long id; @@ -203,7 +213,8 @@ private GetRecurringPaymentType() {} @Schema(description = "PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsRequest") public static final class PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsRequest { - private PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsRequest() {} + private PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsRequest() { + } @Schema(example = "en") public String locale; @@ -230,11 +241,13 @@ private PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsRequest @Schema(description = "PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsResponse") public static final class PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsResponse { - private PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsResponse() {} + private PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsResponse() { + } static final class PostRecurringChanges { - private PostRecurringChanges() {} + private PostRecurringChanges() { + } @Schema(example = "acc123") public String accountNumber; @@ -262,7 +275,8 @@ private PostRecurringChanges() {} @Schema(description = "PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse") public static final class PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse { - private PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse() {} + private PostRecurringDepositAccountsRecurringDepositAccountIdTransactionsTransactionIdResponse() { + } @Schema(example = "1") public Long officeId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountsApiResourceSwagger.java index e435b6d6de3..8a03a709825 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositAccountsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.savings.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; import java.util.Set; @@ -27,16 +28,19 @@ */ final class RecurringDepositAccountsApiResourceSwagger { - private RecurringDepositAccountsApiResourceSwagger() {} + private RecurringDepositAccountsApiResourceSwagger() { + } @Schema(description = "GetRecurringDepositAccountsTemplateResponse") public static final class GetRecurringDepositAccountsTemplateResponse { - private GetRecurringDepositAccountsTemplateResponse() {} + private GetRecurringDepositAccountsTemplateResponse() { + } static final class GetRecurringProductOptions { - private GetRecurringProductOptions() {} + private GetRecurringProductOptions() { + } @Schema(example = "1") public Long id; @@ -54,11 +58,13 @@ private GetRecurringProductOptions() {} @Schema(description = "GetRecurringDepositAccountsResponse") public static final class GetRecurringDepositAccountsResponse { - private GetRecurringDepositAccountsResponse() {} + private GetRecurringDepositAccountsResponse() { + } static final class GetRecurringDepositAccountsStatus { - private GetRecurringDepositAccountsStatus() {} + private GetRecurringDepositAccountsStatus() { + } @Schema(example = "100") public Long id; @@ -88,7 +94,8 @@ private GetRecurringDepositAccountsStatus() {} static final class GetRecurringDepositAccountsTimeline { - private GetRecurringDepositAccountsTimeline() {} + private GetRecurringDepositAccountsTimeline() { + } @Schema(example = "[2014, 3, 1]") public LocalDate submittedOnDate; @@ -102,7 +109,8 @@ private GetRecurringDepositAccountsTimeline() {} static final class GetRecurringDepositAccountsCurrency { - private GetRecurringDepositAccountsCurrency() {} + private GetRecurringDepositAccountsCurrency() { + } @Schema(example = "USD") public String code; @@ -122,7 +130,8 @@ private GetRecurringDepositAccountsCurrency() {} static final class GetRecurringDepositAccountsInterestCompoundingPeriodType { - private GetRecurringDepositAccountsInterestCompoundingPeriodType() {} + private GetRecurringDepositAccountsInterestCompoundingPeriodType() { + } @Schema(example = "4") public Long id; @@ -134,7 +143,8 @@ private GetRecurringDepositAccountsInterestCompoundingPeriodType() {} static final class GetRecurringDepositAccountsInterestPostingPeriodType { - private GetRecurringDepositAccountsInterestPostingPeriodType() {} + private GetRecurringDepositAccountsInterestPostingPeriodType() { + } @Schema(example = "4") public Long id; @@ -146,7 +156,8 @@ private GetRecurringDepositAccountsInterestPostingPeriodType() {} static final class GetRecurringDepositAccountsInterestCalculationType { - private GetRecurringDepositAccountsInterestCalculationType() {} + private GetRecurringDepositAccountsInterestCalculationType() { + } @Schema(example = "1") public Long id; @@ -158,7 +169,8 @@ private GetRecurringDepositAccountsInterestCalculationType() {} static final class GetRecurringDepositAccountsInterestCalculationDaysInYearType { - private GetRecurringDepositAccountsInterestCalculationDaysInYearType() {} + private GetRecurringDepositAccountsInterestCalculationDaysInYearType() { + } @Schema(example = "365") public Long id; @@ -170,7 +182,8 @@ private GetRecurringDepositAccountsInterestCalculationDaysInYearType() {} static final class GetRecurringDepositAccountsSummary { - private GetRecurringDepositAccountsSummary() {} + private GetRecurringDepositAccountsSummary() { + } public GetRecurringDepositAccountsCurrency currency; @Schema(example = "0") @@ -179,7 +192,8 @@ private GetRecurringDepositAccountsSummary() {} static final class GetRecurringDepositAccountsMinDepositTermType { - private GetRecurringDepositAccountsMinDepositTermType() {} + private GetRecurringDepositAccountsMinDepositTermType() { + } @Schema(example = "2") public Long id; @@ -191,7 +205,8 @@ private GetRecurringDepositAccountsMinDepositTermType() {} static final class GetRecurringDepositAccountsMaxDepositTermType { - private GetRecurringDepositAccountsMaxDepositTermType() {} + private GetRecurringDepositAccountsMaxDepositTermType() { + } @Schema(example = "3") public Long id; @@ -203,7 +218,8 @@ private GetRecurringDepositAccountsMaxDepositTermType() {} static final class GetRecurringDepositAccountsDepositPeriodFrequency { - private GetRecurringDepositAccountsDepositPeriodFrequency() {} + private GetRecurringDepositAccountsDepositPeriodFrequency() { + } @Schema(example = "2") public Long id; @@ -215,7 +231,8 @@ private GetRecurringDepositAccountsDepositPeriodFrequency() {} static final class GetRecurringDepositAccountsRecurringDepositFrequencyType { - private GetRecurringDepositAccountsRecurringDepositFrequencyType() {} + private GetRecurringDepositAccountsRecurringDepositFrequencyType() { + } @Schema(example = "2") public Long id; @@ -274,7 +291,8 @@ private GetRecurringDepositAccountsRecurringDepositFrequencyType() {} @Schema(description = "PostRecurringDepositAccountsRequest") public static final class PostRecurringDepositAccountsRequest { - private PostRecurringDepositAccountsRequest() {} + private PostRecurringDepositAccountsRequest() { + } @Schema(example = "1") public Long clientId; @@ -305,7 +323,8 @@ private PostRecurringDepositAccountsRequest() {} @Schema(description = "PostRecurringDepositAccountsResponse") public static final class PostRecurringDepositAccountsResponse { - private PostRecurringDepositAccountsResponse() {} + private PostRecurringDepositAccountsResponse() { + } @Schema(example = "2") public Long officeId; @@ -320,19 +339,23 @@ private PostRecurringDepositAccountsResponse() {} @Schema(description = "GetRecurringDepositAccountsAccountIdResponse") public static final class GetRecurringDepositAccountsAccountIdResponse { - private GetRecurringDepositAccountsAccountIdResponse() {} + private GetRecurringDepositAccountsAccountIdResponse() { + } static final class GetRecurringDepositAccountsAccountChart { - private GetRecurringDepositAccountsAccountChart() {} + private GetRecurringDepositAccountsAccountChart() { + } static final class GetRecurringDepositAccountsChartSlabs { - private GetRecurringDepositAccountsChartSlabs() {} + private GetRecurringDepositAccountsChartSlabs() { + } static final class GetRecurringDepositAccountsPeriodType { - private GetRecurringDepositAccountsPeriodType() {} + private GetRecurringDepositAccountsPeriodType() { + } @Schema(example = "0") public Long id; @@ -344,7 +367,8 @@ private GetRecurringDepositAccountsPeriodType() {} static final class GetRecurringDepositAccountsAccountChartCurrency { - private GetRecurringDepositAccountsAccountChartCurrency() {} + private GetRecurringDepositAccountsAccountChartCurrency() { + } @Schema(example = "USD") public String code; @@ -374,7 +398,8 @@ private GetRecurringDepositAccountsAccountChartCurrency() {} static final class GetRecurringDepositAccountsPeriodTypes { - private GetRecurringDepositAccountsPeriodTypes() {} + private GetRecurringDepositAccountsPeriodTypes() { + } @Schema(example = "0") public Long id; @@ -444,7 +469,8 @@ private GetRecurringDepositAccountsPeriodTypes() {} @Schema(description = "PutRecurringDepositAccountsAccountIdRequest") public static final class PutRecurringDepositAccountsAccountIdRequest { - private PutRecurringDepositAccountsAccountIdRequest() {} + private PutRecurringDepositAccountsAccountIdRequest() { + } @Schema(example = "en") public String locale; @@ -455,11 +481,13 @@ private PutRecurringDepositAccountsAccountIdRequest() {} @Schema(description = "PutRecurringDepositAccountsAccountIdResponse") public static final class PutRecurringDepositAccountsAccountIdResponse { - private PutRecurringDepositAccountsAccountIdResponse() {} + private PutRecurringDepositAccountsAccountIdResponse() { + } static final class PutRecurringDepositAccountsChanges { - private PutRecurringDepositAccountsChanges() {} + private PutRecurringDepositAccountsChanges() { + } @Schema(example = "6000") public Integer depositAmount; @@ -481,13 +509,15 @@ private PutRecurringDepositAccountsChanges() {} @Schema(description = "PostRecurringDepositAccountsAccountIdRequest") public static final class PostRecurringDepositAccountsAccountIdRequest { - private PostRecurringDepositAccountsAccountIdRequest() {} + private PostRecurringDepositAccountsAccountIdRequest() { + } } @Schema(description = "PostRecurringDepositAccountsAccountIdResponse") public static final class PostRecurringDepositAccountsAccountIdResponse { - private PostRecurringDepositAccountsAccountIdResponse() {} + private PostRecurringDepositAccountsAccountIdResponse() { + } @Schema(example = "1") public Long officeId; @@ -502,7 +532,8 @@ private PostRecurringDepositAccountsAccountIdResponse() {} @Schema(description = "DeleteRecurringDepositAccountsResponse") public static final class DeleteRecurringDepositAccountsResponse { - private DeleteRecurringDepositAccountsResponse() {} + private DeleteRecurringDepositAccountsResponse() { + } @Schema(example = "1") public Long officeId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositProductsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositProductsApiResourceSwagger.java index 4dc13ceb0e9..4723bcd215a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositProductsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/RecurringDepositProductsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.savings.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; import java.util.Set; @@ -27,20 +28,24 @@ */ final class RecurringDepositProductsApiResourceSwagger { - private RecurringDepositProductsApiResourceSwagger() {} + private RecurringDepositProductsApiResourceSwagger() { + } @Schema(description = "PostRecurringDepositProductsRequest") public static final class PostRecurringDepositProductsRequest { - private PostRecurringDepositProductsRequest() {} + private PostRecurringDepositProductsRequest() { + } static final class PostRecurringDepositProductsCharts { - private PostRecurringDepositProductsCharts() {} + private PostRecurringDepositProductsCharts() { + } static final class PostRecurringDepositProductsChartSlabs { - private PostRecurringDepositProductsChartSlabs() {} + private PostRecurringDepositProductsChartSlabs() { + } @Schema(example = "from 0 to 90 days") public String description; @@ -113,7 +118,8 @@ private PostRecurringDepositProductsChartSlabs() {} @Schema(description = "PostRecurringDepositProductsResponse") public static final class PostRecurringDepositProductsResponse { - private PostRecurringDepositProductsResponse() {} + private PostRecurringDepositProductsResponse() { + } @Schema(example = "1") public Long resourceId; @@ -122,7 +128,8 @@ private PostRecurringDepositProductsResponse() {} @Schema(description = "PutRecurringDepositProductsRequest") public static final class PutRecurringDepositProductsRequest { - private PutRecurringDepositProductsRequest() {} + private PutRecurringDepositProductsRequest() { + } @Schema(example = "Recurring deposit product new offerings") public String description; @@ -137,11 +144,13 @@ private PutRecurringDepositProductsRequest() {} @Schema(description = "PutRecurringDepositProductsResponse") public static final class PutRecurringDepositProductsResponse { - private PutRecurringDepositProductsResponse() {} + private PutRecurringDepositProductsResponse() { + } static final class PutRecurringDepositProductsChanges { - private PutRecurringDepositProductsChanges() {} + private PutRecurringDepositProductsChanges() { + } @Schema(example = "Recurring deposit product new offerings") public String description; @@ -157,11 +166,13 @@ private PutRecurringDepositProductsChanges() {} @Schema(description = "GetRecurringDepositProductsResponse") public static final class GetRecurringDepositProductsResponse { - private GetRecurringDepositProductsResponse() {} + private GetRecurringDepositProductsResponse() { + } static final class GetRecurringDepositProductsCurrency { - private GetRecurringDepositProductsCurrency() {} + private GetRecurringDepositProductsCurrency() { + } @Schema(example = "USD") public String code; @@ -181,7 +192,8 @@ private GetRecurringDepositProductsCurrency() {} static final class GetRecurringDepositProductsMinDepositTermType { - private GetRecurringDepositProductsMinDepositTermType() {} + private GetRecurringDepositProductsMinDepositTermType() { + } @Schema(example = "2") public Integer id; @@ -193,7 +205,8 @@ private GetRecurringDepositProductsMinDepositTermType() {} static final class GetRecurringDepositProductsMaxDepositTermType { - private GetRecurringDepositProductsMaxDepositTermType() {} + private GetRecurringDepositProductsMaxDepositTermType() { + } @Schema(example = "3") public Integer id; @@ -205,7 +218,8 @@ private GetRecurringDepositProductsMaxDepositTermType() {} static final class GetRecurringDepositProductsInterestCompoundingPeriodType { - private GetRecurringDepositProductsInterestCompoundingPeriodType() {} + private GetRecurringDepositProductsInterestCompoundingPeriodType() { + } @Schema(example = "4") public Integer id; @@ -217,7 +231,8 @@ private GetRecurringDepositProductsInterestCompoundingPeriodType() {} static final class GetRecurringDepositProductsInterestPostingPeriodType { - private GetRecurringDepositProductsInterestPostingPeriodType() {} + private GetRecurringDepositProductsInterestPostingPeriodType() { + } @Schema(example = "4") public Integer id; @@ -229,7 +244,8 @@ private GetRecurringDepositProductsInterestPostingPeriodType() {} static final class GetRecurringDepositProductsInterestCalculationType { - private GetRecurringDepositProductsInterestCalculationType() {} + private GetRecurringDepositProductsInterestCalculationType() { + } @Schema(example = "1") public Integer id; @@ -241,7 +257,8 @@ private GetRecurringDepositProductsInterestCalculationType() {} static final class GetRecurringDepositProductsInterestCalculationDaysInYearType { - private GetRecurringDepositProductsInterestCalculationDaysInYearType() {} + private GetRecurringDepositProductsInterestCalculationDaysInYearType() { + } @Schema(example = "365") public Integer id; @@ -253,7 +270,8 @@ private GetRecurringDepositProductsInterestCalculationDaysInYearType() {} static final class GetRecurringDepositProductsAccountingRule { - private GetRecurringDepositProductsAccountingRule() {} + private GetRecurringDepositProductsAccountingRule() { + } @Schema(example = "1") public Integer id; @@ -265,7 +283,8 @@ private GetRecurringDepositProductsAccountingRule() {} static final class GetRecurringDepositProductsRecurringDepositFrequencyType { - private GetRecurringDepositProductsRecurringDepositFrequencyType() {} + private GetRecurringDepositProductsRecurringDepositFrequencyType() { + } @Schema(example = "1") public Integer id; @@ -307,11 +326,13 @@ private GetRecurringDepositProductsRecurringDepositFrequencyType() {} @Schema(description = "GetRecurringDepositProductsProductIdResponse") public static final class GetRecurringDepositProductsProductIdResponse { - private GetRecurringDepositProductsProductIdResponse() {} + private GetRecurringDepositProductsProductIdResponse() { + } static final class GetRecurringDepositProductsProductIdCurrency { - private GetRecurringDepositProductsProductIdCurrency() {} + private GetRecurringDepositProductsProductIdCurrency() { + } @Schema(example = "USD") public String code; @@ -329,7 +350,8 @@ private GetRecurringDepositProductsProductIdCurrency() {} static final class GetRecurringDepositProductsProductIdInterestCompoundingPeriodType { - private GetRecurringDepositProductsProductIdInterestCompoundingPeriodType() {} + private GetRecurringDepositProductsProductIdInterestCompoundingPeriodType() { + } @Schema(example = "1") public Integer id; @@ -341,7 +363,8 @@ private GetRecurringDepositProductsProductIdInterestCompoundingPeriodType() {} static final class GetRecurringDepositProductsGlAccount { - private GetRecurringDepositProductsGlAccount() {} + private GetRecurringDepositProductsGlAccount() { + } @Schema(example = "12") public Long id; @@ -353,7 +376,8 @@ private GetRecurringDepositProductsGlAccount() {} static final class GetRecurringDepositProductsProductIdAccountingMappings { - private GetRecurringDepositProductsProductIdAccountingMappings() {} + private GetRecurringDepositProductsProductIdAccountingMappings() { + } public GetRecurringDepositProductsGlAccount incomeFromFeeAccount; public GetRecurringDepositProductsGlAccount incomeFromPenaltyAccount; @@ -367,11 +391,13 @@ private GetRecurringDepositProductsProductIdAccountingMappings() {} static final class GetRecurringDepositProductsProductIdFeeToIncomeAccountMappings { - private GetRecurringDepositProductsProductIdFeeToIncomeAccountMappings() {} + private GetRecurringDepositProductsProductIdFeeToIncomeAccountMappings() { + } static final class GetRecurringDepositProductsProductIdFeeToIncomeAccountMappingsCharge { - private GetRecurringDepositProductsProductIdFeeToIncomeAccountMappingsCharge() {} + private GetRecurringDepositProductsProductIdFeeToIncomeAccountMappingsCharge() { + } @Schema(example = "11") public Long id; @@ -385,7 +411,8 @@ private GetRecurringDepositProductsProductIdFeeToIncomeAccountMappingsCharge() { static final class GetRecurringDepositProductsProductIdFeeToIncomeAccountMappingsIncomeAccount { - private GetRecurringDepositProductsProductIdFeeToIncomeAccountMappingsIncomeAccount() {} + private GetRecurringDepositProductsProductIdFeeToIncomeAccountMappingsIncomeAccount() { + } @Schema(example = "16") public Long id; @@ -401,11 +428,13 @@ private GetRecurringDepositProductsProductIdFeeToIncomeAccountMappingsIncomeAcco static final class GetRecurringDepositProductsProductIdPenaltyToIncomeAccountMappings { - private GetRecurringDepositProductsProductIdPenaltyToIncomeAccountMappings() {} + private GetRecurringDepositProductsProductIdPenaltyToIncomeAccountMappings() { + } static final class GetRecurringDepositProductsProductIdPenaltyToIncomeAccountMappingsCharge { - private GetRecurringDepositProductsProductIdPenaltyToIncomeAccountMappingsCharge() {} + private GetRecurringDepositProductsProductIdPenaltyToIncomeAccountMappingsCharge() { + } @Schema(example = "12") public Long id; @@ -423,7 +452,8 @@ private GetRecurringDepositProductsProductIdPenaltyToIncomeAccountMappingsCharge static final class GetRecurringDepositProductsProductIdPreClosurePenalInterestOnType { - private GetRecurringDepositProductsProductIdPreClosurePenalInterestOnType() {} + private GetRecurringDepositProductsProductIdPreClosurePenalInterestOnType() { + } @Schema(example = "1") public Long id; @@ -435,7 +465,8 @@ private GetRecurringDepositProductsProductIdPreClosurePenalInterestOnType() {} static final class GetRecurringDepositProductsProductIdMinDepositTermType { - private GetRecurringDepositProductsProductIdMinDepositTermType() {} + private GetRecurringDepositProductsProductIdMinDepositTermType() { + } @Schema(example = "1") public Long id; @@ -447,7 +478,8 @@ private GetRecurringDepositProductsProductIdMinDepositTermType() {} static final class GetRecurringDepositProductsProductIdMaxDepositTermType { - private GetRecurringDepositProductsProductIdMaxDepositTermType() {} + private GetRecurringDepositProductsProductIdMaxDepositTermType() { + } @Schema(example = "3") public Long id; @@ -459,15 +491,18 @@ private GetRecurringDepositProductsProductIdMaxDepositTermType() {} static final class GetRecurringDepositProductsProductIdActiveChart { - private GetRecurringDepositProductsProductIdActiveChart() {} + private GetRecurringDepositProductsProductIdActiveChart() { + } static final class GetRecurringDepositProductsProductIdChartSlabs { - private GetRecurringDepositProductsProductIdChartSlabs() {} + private GetRecurringDepositProductsProductIdChartSlabs() { + } static final class GetRecurringDepositProductsProductIdPeriodType { - private GetRecurringDepositProductsProductIdPeriodType() {} + private GetRecurringDepositProductsProductIdPeriodType() { + } @Schema(example = "1") public Long id; @@ -539,7 +574,8 @@ private GetRecurringDepositProductsProductIdPeriodType() {} @Schema(description = "DeleteRecurringDepositProductsProductIdResponse") public static final class DeleteRecurringDepositProductsProductIdResponse { - private DeleteRecurringDepositProductsProductIdResponse() {} + private DeleteRecurringDepositProductsProductIdResponse() { + } @Schema(example = "1") public Long resourceId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountChargesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountChargesApiResourceSwagger.java index d1f45a01ba8..39a7ad6edb5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountChargesApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountChargesApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.savings.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.Set; /** @@ -26,12 +27,14 @@ */ final class SavingsAccountChargesApiResourceSwagger { - private SavingsAccountChargesApiResourceSwagger() {} + private SavingsAccountChargesApiResourceSwagger() { + } @Schema(description = "GetSavingsAccountsSavingsAccountIdChargesResponse") public static final class GetSavingsAccountsSavingsAccountIdChargesResponse { - private GetSavingsAccountsSavingsAccountIdChargesResponse() {} + private GetSavingsAccountsSavingsAccountIdChargesResponse() { + } static final class GetChargesCurrencyResponse { @@ -51,7 +54,8 @@ static final class GetChargesCurrencyResponse { static final class GetChargesChargeCalculationType { - private GetChargesChargeCalculationType() {} + private GetChargesChargeCalculationType() { + } @Schema(example = "1") public Integer id; @@ -63,7 +67,8 @@ private GetChargesChargeCalculationType() {} static final class GetChargesChargeTimeType { - private GetChargesChargeTimeType() {} + private GetChargesChargeTimeType() { + } @Schema(example = "1") public Integer id; @@ -107,15 +112,18 @@ private GetChargesChargeTimeType() {} @Schema(description = "GetSavingsAccountsSavingsAccountIdChargesTemplateResponse") public static final class GetSavingsAccountsSavingsAccountIdChargesTemplateResponse { - private GetSavingsAccountsSavingsAccountIdChargesTemplateResponse() {} + private GetSavingsAccountsSavingsAccountIdChargesTemplateResponse() { + } static final class GetSavingsChargesOptions { - private GetSavingsChargesOptions() {} + private GetSavingsChargesOptions() { + } static final class GetSavingsChargesChargeTimeType { - private GetSavingsChargesChargeTimeType() {} + private GetSavingsChargesChargeTimeType() { + } @Schema(example = "2") public Integer id; @@ -127,7 +135,8 @@ private GetSavingsChargesChargeTimeType() {} static final class GetChargesAppliesTo { - private GetChargesAppliesTo() {} + private GetChargesAppliesTo() { + } @Schema(example = "1") public Integer id; @@ -167,7 +176,8 @@ private GetChargesAppliesTo() {} @Schema(description = "GetSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse") public static final class GetSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse { - private GetSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse() {} + private GetSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse() { + } @Schema(example = "1") public Long id; @@ -201,7 +211,8 @@ private GetSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse( @Schema(description = "PostSavingsAccountsSavingsAccountIdChargesRequest") public static final class PostSavingsAccountsSavingsAccountIdChargesRequest { - private PostSavingsAccountsSavingsAccountIdChargesRequest() {} + private PostSavingsAccountsSavingsAccountIdChargesRequest() { + } @Schema(example = "2") public Long chargeId; @@ -218,7 +229,8 @@ private PostSavingsAccountsSavingsAccountIdChargesRequest() {} @Schema(description = "PostSavingsAccountsSavingsAccountIdChargesResponse") public static final class PostSavingsAccountsSavingsAccountIdChargesResponse { - private PostSavingsAccountsSavingsAccountIdChargesResponse() {} + private PostSavingsAccountsSavingsAccountIdChargesResponse() { + } @Schema(example = "1") public Long officeId; @@ -233,7 +245,8 @@ private PostSavingsAccountsSavingsAccountIdChargesResponse() {} @Schema(description = "PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest") public static final class PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest { - private PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest() {} + private PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest() { + } @Schema(example = "dd MMMM yyyy") public String dateFormat; @@ -248,11 +261,13 @@ private PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest() @Schema(description = "PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse") public static final class PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse { - private PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse() {} + private PutSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse() { + } static final class PutSavingsChanges { - private PutSavingsChanges() {} + private PutSavingsChanges() { + } @Schema(example = "27 March 2013") public String dueDate; @@ -278,7 +293,8 @@ private PutSavingsChanges() {} @Schema(description = "PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest") public static final class PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest { - private PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest() {} + private PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest() { + } @Schema(example = "dd MMMM yyyy") public String dateFormat; @@ -293,7 +309,8 @@ private PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdRequest( @Schema(description = "PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse") public static final class PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse { - private PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse() {} + private PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse() { + } @Schema(example = "1") public Long officeId; @@ -308,7 +325,8 @@ private PostSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse @Schema(description = "DeleteSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse") public static final class DeleteSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse { - private DeleteSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse() {} + private DeleteSavingsAccountsSavingsAccountIdChargesSavingsAccountChargeIdResponse() { + } @Schema(example = "1") public Long officeId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountTransactionsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountTransactionsApiResourceSwagger.java index 3b06298dadc..cd8d01f623b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountTransactionsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountTransactionsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,28 +19,34 @@ package org.apache.fineract.portfolio.savings.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.HashSet; import java.util.Set; + import org.apache.fineract.portfolio.TransactionEntryType; final class SavingsAccountTransactionsApiResourceSwagger { - private SavingsAccountTransactionsApiResourceSwagger() {} + private SavingsAccountTransactionsApiResourceSwagger() { + } @Schema(description = "SavingsAccountTransactionsSearchResponse") public static final class SavingsAccountTransactionsSearchResponse { - private SavingsAccountTransactionsSearchResponse() {} + private SavingsAccountTransactionsSearchResponse() { + } static final class GetSavingsAccountTransactionsPageItem { - private GetSavingsAccountTransactionsPageItem() {} + private GetSavingsAccountTransactionsPageItem() { + } static final class GetTranscationEnumData { - private GetTranscationEnumData() {} + private GetTranscationEnumData() { + } @Schema(example = "1") public Long id; @@ -85,7 +91,8 @@ private GetTranscationEnumData() {} static final class GetTransactionsCurrency { - private GetTransactionsCurrency() {} + private GetTransactionsCurrency() { + } @Schema(example = "USD") public String code; @@ -105,11 +112,13 @@ private GetTransactionsCurrency() {} static final class GetTransactionsPaymentDetailData { - private GetTransactionsPaymentDetailData() {} + private GetTransactionsPaymentDetailData() { + } static final class GetPaymentTypeData { - private GetPaymentTypeData() {} + private GetPaymentTypeData() { + } @Schema(example = "1") public Long id; @@ -137,7 +146,8 @@ private GetPaymentTypeData() {} static final class GetSavingsAccountChargesPaidByData { - private GetSavingsAccountChargesPaidByData() {} + private GetSavingsAccountChargesPaidByData() { + } @Schema(example = "1") public Long chargeId; @@ -192,7 +202,8 @@ private GetSavingsAccountChargesPaidByData() {} @Schema(description = "PostSavingsAccountTransactionsRequest") public static final class PostSavingsAccountTransactionsRequest { - private PostSavingsAccountTransactionsRequest() {} + private PostSavingsAccountTransactionsRequest() { + } @Schema(example = "27 March 2022") public String transactionDate; @@ -213,7 +224,8 @@ private PostSavingsAccountTransactionsRequest() {} @Schema(description = "PostSavingsAccountTransactionsResponse") public static final class PostSavingsAccountTransactionsResponse { - private PostSavingsAccountTransactionsResponse() {} + private PostSavingsAccountTransactionsResponse() { + } @Schema(example = "1") public Long officeId; @@ -228,7 +240,8 @@ private PostSavingsAccountTransactionsResponse() {} @Schema(description = "PostSavingsAccountBulkReversalTransactionsRequest") public static final class PostSavingsAccountBulkReversalTransactionsRequest { - private PostSavingsAccountBulkReversalTransactionsRequest() {} + private PostSavingsAccountBulkReversalTransactionsRequest() { + } @Schema(example = "true") public String isBulk; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResourceSwagger.java index 75fea1d2497..a571dd85756 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsAccountsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.savings.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.Set; @@ -28,16 +29,19 @@ */ final class SavingsAccountsApiResourceSwagger { - private SavingsAccountsApiResourceSwagger() {} + private SavingsAccountsApiResourceSwagger() { + } @Schema(description = "GetSavingsAccountsTemplateResponse") public static final class GetSavingsAccountsTemplateResponse { - private GetSavingsAccountsTemplateResponse() {} + private GetSavingsAccountsTemplateResponse() { + } static final class GetSavingsProductOptions { - private GetSavingsProductOptions() {} + private GetSavingsProductOptions() { + } @Schema(example = "1") public Integer id; @@ -55,15 +59,18 @@ private GetSavingsProductOptions() {} @Schema(description = "GetSavingsAccountsResponse") public static final class GetSavingsAccountsResponse { - private GetSavingsAccountsResponse() {} + private GetSavingsAccountsResponse() { + } static final class GetSavingsPageItems { - private GetSavingsPageItems() {} + private GetSavingsPageItems() { + } static final class GetSavingsStatus { - private GetSavingsStatus() {} + private GetSavingsStatus() { + } @Schema(example = "100") public Integer id; @@ -88,7 +95,8 @@ private GetSavingsStatus() {} static final class GetSavingsTimeline { - private GetSavingsTimeline() {} + private GetSavingsTimeline() { + } @Schema(example = "[2013, 3, 1]") public LocalDate submittedOnDate; @@ -112,7 +120,8 @@ private GetSavingsTimeline() {} static final class GetSavingsCurrency { - private GetSavingsCurrency() {} + private GetSavingsCurrency() { + } @Schema(example = "USD") public String code; @@ -130,7 +139,8 @@ private GetSavingsCurrency() {} static final class GetSavingsInterestCompoundingPeriodType { - private GetSavingsInterestCompoundingPeriodType() {} + private GetSavingsInterestCompoundingPeriodType() { + } @Schema(example = "1") public Integer id; @@ -142,7 +152,8 @@ private GetSavingsInterestCompoundingPeriodType() {} static final class GetSavingsInterestPostingPeriodType { - private GetSavingsInterestPostingPeriodType() {} + private GetSavingsInterestPostingPeriodType() { + } @Schema(example = "4") public Integer id; @@ -154,7 +165,8 @@ private GetSavingsInterestPostingPeriodType() {} static final class GetSavingsInterestCalculationType { - private GetSavingsInterestCalculationType() {} + private GetSavingsInterestCalculationType() { + } @Schema(example = "1") public Integer id; @@ -166,7 +178,8 @@ private GetSavingsInterestCalculationType() {} static final class GetSavingsInterestCalculationDaysInYearType { - private GetSavingsInterestCalculationDaysInYearType() {} + private GetSavingsInterestCalculationDaysInYearType() { + } @Schema(example = "365") public Integer id; @@ -178,7 +191,8 @@ private GetSavingsInterestCalculationDaysInYearType() {} static final class GetSavingsSummary { - private GetSavingsSummary() {} + private GetSavingsSummary() { + } public GetSavingsCurrency currency; @Schema(example = "0") @@ -219,7 +233,8 @@ private GetSavingsSummary() {} @Schema(description = "PostSavingsAccountsRequest") public static final class PostSavingsAccountsRequest { - private PostSavingsAccountsRequest() {} + private PostSavingsAccountsRequest() { + } @Schema(example = "1") public Long clientId; @@ -238,7 +253,8 @@ private PostSavingsAccountsRequest() {} @Schema(description = "PostSavingsAccountsResponse") public static final class PostSavingsAccountsResponse { - private PostSavingsAccountsResponse() {} + private PostSavingsAccountsResponse() { + } @Schema(example = "2") public Long officeId; @@ -253,11 +269,13 @@ private PostSavingsAccountsResponse() {} @Schema(description = "GetSavingsAccountsAccountIdResponse") public static final class GetSavingsAccountsAccountIdResponse { - private GetSavingsAccountsAccountIdResponse() {} + private GetSavingsAccountsAccountIdResponse() { + } static final class GetSavingsAccountsSummary { - private GetSavingsAccountsSummary() {} + private GetSavingsAccountsSummary() { + } public GetSavingsAccountsResponse.GetSavingsPageItems.GetSavingsCurrency currency; @Schema(example = "0") @@ -295,7 +313,8 @@ private GetSavingsAccountsSummary() {} @Schema(description = "PutSavingsAccountsAccountIdRequest") public static final class PutSavingsAccountsAccountIdRequest { - private PutSavingsAccountsAccountIdRequest() {} + private PutSavingsAccountsAccountIdRequest() { + } @Schema(example = "en") public String locale; @@ -306,11 +325,13 @@ private PutSavingsAccountsAccountIdRequest() {} @Schema(description = "PutSavingsAccountsAccountIdResponse") public static final class PutSavingsAccountsAccountIdResponse { - private PutSavingsAccountsAccountIdResponse() {} + private PutSavingsAccountsAccountIdResponse() { + } static final class PutSavingsAccountsChanges { - private PutSavingsAccountsChanges() {} + private PutSavingsAccountsChanges() { + } @Schema(example = "5.9999999999") public Double nominalAnnualInterestRate; @@ -332,7 +353,8 @@ private PutSavingsAccountsChanges() {} @Schema(description = "PostSavingsAccountsAccountIdRequest") public static final class PostSavingsAccountsAccountIdRequest { - private PostSavingsAccountsAccountIdRequest() {} + private PostSavingsAccountsAccountIdRequest() { + } @Schema(example = "dd MMMM yyyy") public String dateFormat; @@ -351,11 +373,13 @@ private PostSavingsAccountsAccountIdRequest() {} @Schema(description = "PostSavingsAccountsAccountIdResponse") public static final class PostSavingsAccountsAccountIdResponse { - private PostSavingsAccountsAccountIdResponse() {} + private PostSavingsAccountsAccountIdResponse() { + } static final class PostSavingsAccountsAccountIdChanges { - private PostSavingsAccountsAccountIdChanges() {} + private PostSavingsAccountsAccountIdChanges() { + } } @Schema(example = "2") @@ -370,7 +394,8 @@ private PostSavingsAccountsAccountIdChanges() {} @Schema(description = "DeleteSavingsAccountsAccountIdResponse") public static final class DeleteSavingsAccountsAccountIdResponse { - private DeleteSavingsAccountsAccountIdResponse() {} + private DeleteSavingsAccountsAccountIdResponse() { + } @Schema(example = "1") public Long officeId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsProductsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsProductsApiResourceSwagger.java index f06965742b3..facc83b8a47 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsProductsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsProductsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.savings.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.math.BigDecimal; import java.util.List; import java.util.Set; @@ -28,16 +29,19 @@ */ final class SavingsProductsApiResourceSwagger { - private SavingsProductsApiResourceSwagger() {} + private SavingsProductsApiResourceSwagger() { + } @Schema(description = "PostSavingsProductsRequest") public static final class PostSavingsProductsRequest { - private PostSavingsProductsRequest() {} + private PostSavingsProductsRequest() { + } static final class PostSavingsCharges { - private PostSavingsCharges() {} + private PostSavingsCharges() { + } @Schema(example = "1") public Long id; @@ -87,7 +91,8 @@ private PostSavingsCharges() {} @Schema(description = "PostSavingsProductsResponse") public static final class PostSavingsProductsResponse { - private PostSavingsProductsResponse() {} + private PostSavingsProductsResponse() { + } @Schema(example = "1") public Long resourceId; @@ -96,7 +101,8 @@ private PostSavingsProductsResponse() {} @Schema(description = "PutSavingsProductsProductIdRequest") public static final class PutSavingsProductsProductIdRequest { - private PutSavingsProductsProductIdRequest() {} + private PutSavingsProductsProductIdRequest() { + } @Schema(example = "Passbook Savings Lite.") public String description; @@ -109,11 +115,13 @@ private PutSavingsProductsProductIdRequest() {} @Schema(description = "PutSavingsProductsProductIdResponse") public static final class PutSavingsProductsProductIdResponse { - private PutSavingsProductsProductIdResponse() {} + private PutSavingsProductsProductIdResponse() { + } static final class PutSavingsChanges { - private PutSavingsChanges() {} + private PutSavingsChanges() { + } @Schema(example = "Passbook Savings Lite.") public String description; @@ -131,11 +139,13 @@ private PutSavingsChanges() {} @Schema(description = "GetSavingsProductsResponse") public static final class GetSavingsProductsResponse { - private GetSavingsProductsResponse() {} + private GetSavingsProductsResponse() { + } static final class GetSavingsCurrency { - private GetSavingsCurrency() {} + private GetSavingsCurrency() { + } @Schema(example = "USD") public String code; @@ -153,7 +163,8 @@ private GetSavingsCurrency() {} static final class GetSavingsProductsInterestCompoundingPeriodType { - private GetSavingsProductsInterestCompoundingPeriodType() {} + private GetSavingsProductsInterestCompoundingPeriodType() { + } @Schema(example = "1") public Integer id; @@ -165,7 +176,8 @@ private GetSavingsProductsInterestCompoundingPeriodType() {} static final class GetSavingsProductsInterestPostingPeriodType { - private GetSavingsProductsInterestPostingPeriodType() {} + private GetSavingsProductsInterestPostingPeriodType() { + } @Schema(example = "4") public Integer id; @@ -177,7 +189,8 @@ private GetSavingsProductsInterestPostingPeriodType() {} static final class GetSavingsProductsInterestCalculationType { - private GetSavingsProductsInterestCalculationType() {} + private GetSavingsProductsInterestCalculationType() { + } @Schema(example = "1") public Integer id; @@ -189,7 +202,8 @@ private GetSavingsProductsInterestCalculationType() {} static final class GetSavingsProductsInterestCalculationDaysInYearType { - private GetSavingsProductsInterestCalculationDaysInYearType() {} + private GetSavingsProductsInterestCalculationDaysInYearType() { + } @Schema(example = "365") public Integer id; @@ -201,7 +215,8 @@ private GetSavingsProductsInterestCalculationDaysInYearType() {} static final class GetSavingsProductsAccountingRule { - private GetSavingsProductsAccountingRule() {} + private GetSavingsProductsAccountingRule() { + } @Schema(example = "2") public Integer id; @@ -234,11 +249,13 @@ private GetSavingsProductsAccountingRule() {} @Schema(description = "GetSavingsProductsProductIdResponse") public static final class GetSavingsProductsProductIdResponse { - private GetSavingsProductsProductIdResponse() {} + private GetSavingsProductsProductIdResponse() { + } static final class GetSavingsProductsGlAccount { - private GetSavingsProductsGlAccount() {} + private GetSavingsProductsGlAccount() { + } @Schema(example = "12") public Long id; @@ -250,7 +267,8 @@ private GetSavingsProductsGlAccount() {} static final class GetSavingsProductsAccountingMappings { - private GetSavingsProductsAccountingMappings() {} + private GetSavingsProductsAccountingMappings() { + } public GetSavingsProductsGlAccount savingsReferenceAccount; public GetSavingsProductsGlAccount overdraftPortfolioControl; @@ -269,11 +287,13 @@ private GetSavingsProductsAccountingMappings() {} static final class GetSavingsProductsPaymentChannelToFundSourceMappings { - private GetSavingsProductsPaymentChannelToFundSourceMappings() {} + private GetSavingsProductsPaymentChannelToFundSourceMappings() { + } static final class GetSavingsProductsPaymentType { - private GetSavingsProductsPaymentType() {} + private GetSavingsProductsPaymentType() { + } @Schema(example = "10") public Long id; @@ -283,7 +303,8 @@ private GetSavingsProductsPaymentType() {} static final class GetSavingsProductsFundSourceAccount { - private GetSavingsProductsFundSourceAccount() {} + private GetSavingsProductsFundSourceAccount() { + } @Schema(example = "12") public Long id; @@ -299,11 +320,13 @@ private GetSavingsProductsFundSourceAccount() {} static final class GetSavingsProductsFeeToIncomeAccountMappings { - private GetSavingsProductsFeeToIncomeAccountMappings() {} + private GetSavingsProductsFeeToIncomeAccountMappings() { + } static final class GetSavingsProductsFeeToIncomeAccountMappingsCharge { - private GetSavingsProductsFeeToIncomeAccountMappingsCharge() {} + private GetSavingsProductsFeeToIncomeAccountMappingsCharge() { + } @Schema(example = "11") public Long id; @@ -317,7 +340,8 @@ private GetSavingsProductsFeeToIncomeAccountMappingsCharge() {} static final class GetSavingsProductsFeeToIncomeAccountMappingsIncomeAccount { - private GetSavingsProductsFeeToIncomeAccountMappingsIncomeAccount() {} + private GetSavingsProductsFeeToIncomeAccountMappingsIncomeAccount() { + } @Schema(example = "16") public Long id; @@ -333,11 +357,13 @@ private GetSavingsProductsFeeToIncomeAccountMappingsIncomeAccount() {} static final class GetSavingsProductsPenaltyToIncomeAccountMappings { - private GetSavingsProductsPenaltyToIncomeAccountMappings() {} + private GetSavingsProductsPenaltyToIncomeAccountMappings() { + } static final class GetSavingsProductsPenaltyToIncomeAccountMappingsCharge { - private GetSavingsProductsPenaltyToIncomeAccountMappingsCharge() {} + private GetSavingsProductsPenaltyToIncomeAccountMappingsCharge() { + } @Schema(example = "12") public Long id; @@ -382,11 +408,13 @@ private GetSavingsProductsPenaltyToIncomeAccountMappingsCharge() {} @Schema(description = "GetSavingsProductsTemplateResponse") public static final class GetSavingsProductsTemplateResponse { - private GetSavingsProductsTemplateResponse() {} + private GetSavingsProductsTemplateResponse() { + } static final class GetSavingsProductsTemplateAccountingRule { - private GetSavingsProductsTemplateAccountingRule() {} + private GetSavingsProductsTemplateAccountingRule() { + } @Schema(example = "1") public Integer id; @@ -398,7 +426,8 @@ private GetSavingsProductsTemplateAccountingRule() {} static final class GetSavingsProductsLockinPeriodFrequencyTypeOptions { - private GetSavingsProductsLockinPeriodFrequencyTypeOptions() {} + private GetSavingsProductsLockinPeriodFrequencyTypeOptions() { + } @Schema(example = "0") public Integer id; @@ -410,7 +439,8 @@ private GetSavingsProductsLockinPeriodFrequencyTypeOptions() {} static final class GetSavingsProductsWithdrawalFeeTypeOptions { - private GetSavingsProductsWithdrawalFeeTypeOptions() {} + private GetSavingsProductsWithdrawalFeeTypeOptions() { + } @Schema(example = "1") public Integer id; @@ -422,7 +452,8 @@ private GetSavingsProductsWithdrawalFeeTypeOptions() {} static final class GetSavingsProductsPaymentTypeOptions { - private GetSavingsProductsPaymentTypeOptions() {} + private GetSavingsProductsPaymentTypeOptions() { + } @Schema(example = "14") public Integer id; @@ -438,15 +469,18 @@ private GetSavingsProductsPaymentTypeOptions() {} static final class GetSavingsProductsAccountingMappingOptions { - private GetSavingsProductsAccountingMappingOptions() {} + private GetSavingsProductsAccountingMappingOptions() { + } static final class GetSavingsProductsLiabilityAccountOptions { - private GetSavingsProductsLiabilityAccountOptions() {} + private GetSavingsProductsLiabilityAccountOptions() { + } static final class GetSavingsProductsLiabilityType { - private GetSavingsProductsLiabilityType() {} + private GetSavingsProductsLiabilityType() { + } @Schema(example = "2") public Integer id; @@ -458,7 +492,8 @@ private GetSavingsProductsLiabilityType() {} static final class GetSavingsProductsLiabilityUsage { - private GetSavingsProductsLiabilityUsage() {} + private GetSavingsProductsLiabilityUsage() { + } @Schema(example = "1") public Integer id; @@ -470,7 +505,8 @@ private GetSavingsProductsLiabilityUsage() {} static final class GetSavingsProductsLiabilityTagId { - private GetSavingsProductsLiabilityTagId() {} + private GetSavingsProductsLiabilityTagId() { + } @Schema(example = "0") public Long id; @@ -495,11 +531,13 @@ private GetSavingsProductsLiabilityTagId() {} static final class GetSavingsProductsAssetAccountOptions { - private GetSavingsProductsAssetAccountOptions() {} + private GetSavingsProductsAssetAccountOptions() { + } static final class GetSavingsAssetLiabilityType { - private GetSavingsAssetLiabilityType() {} + private GetSavingsAssetLiabilityType() { + } @Schema(example = "1") public Integer id; @@ -511,7 +549,8 @@ private GetSavingsAssetLiabilityType() {} static final class GetSavingsAssetTagId { - private GetSavingsAssetTagId() {} + private GetSavingsAssetTagId() { + } } @Schema(example = "2") @@ -531,11 +570,13 @@ private GetSavingsAssetTagId() {} static final class GetSavingsProductsExpenseAccountOptions { - private GetSavingsProductsExpenseAccountOptions() {} + private GetSavingsProductsExpenseAccountOptions() { + } static final class GetSavingsProductsExpenseType { - private GetSavingsProductsExpenseType() {} + private GetSavingsProductsExpenseType() { + } @Schema(example = "5") public Integer id; @@ -562,11 +603,13 @@ private GetSavingsProductsExpenseType() {} static final class GetSavingsProductsIncomeAccountOptions { - private GetSavingsProductsIncomeAccountOptions() {} + private GetSavingsProductsIncomeAccountOptions() { + } static final class GetSavingsProductsIncomeType { - private GetSavingsProductsIncomeType() {} + private GetSavingsProductsIncomeType() { + } @Schema(example = "4") public Integer id; @@ -600,11 +643,13 @@ private GetSavingsProductsIncomeType() {} static final class GetSavingsProductsChargeOptions { - private GetSavingsProductsChargeOptions() {} + private GetSavingsProductsChargeOptions() { + } static final class GetSavingsChargeTimeType { - private GetSavingsChargeTimeType() {} + private GetSavingsChargeTimeType() { + } @Schema(example = "chargeTimeType.specifiedDueDate") public String code; @@ -616,7 +661,8 @@ private GetSavingsChargeTimeType() {} static final class GetSavingsProductsChargeAppliesTo { - private GetSavingsProductsChargeAppliesTo() {} + private GetSavingsProductsChargeAppliesTo() { + } @Schema(example = "chargeAppliesTo.savings") public String code; @@ -628,7 +674,8 @@ private GetSavingsProductsChargeAppliesTo() {} static final class GetSavingsChargeCalculationType { - private GetSavingsChargeCalculationType() {} + private GetSavingsChargeCalculationType() { + } @Schema(example = "chargeCalculationType.flat") public String code; @@ -640,7 +687,8 @@ private GetSavingsChargeCalculationType() {} static final class GetSavingsChargePaymentMode { - private GetSavingsChargePaymentMode() {} + private GetSavingsChargePaymentMode() { + } @Schema(example = "chargepaymentmode.regular") public String code; @@ -691,7 +739,8 @@ private GetSavingsChargePaymentMode() {} @Schema(description = "DeleteSavingsProductsProductIdResponse") public static final class DeleteSavingsProductsProductIdResponse { - private DeleteSavingsProductsProductIdResponse() {} + private DeleteSavingsProductsProductIdResponse() { + } @Schema(example = "1") public Long resourceId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositAccountDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositAccountDataValidator.java index 9c690ac314a..722e10f8978 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositAccountDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositAccountDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -72,6 +72,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -80,6 +81,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -116,7 +118,8 @@ public void validateFixedDepositForSubmit(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, DepositsApiConstants.FIXED_DEPOSIT_ACCOUNT_REQUEST_DATA_PARAMETERS); @@ -139,7 +142,8 @@ public void validateFixedDepositForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, DepositsApiConstants.FIXED_DEPOSIT_ACCOUNT_REQUEST_DATA_PARAMETERS); @@ -162,7 +166,8 @@ public void validateRecurringDepositForSubmit(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, DepositsApiConstants.RECURRING_DEPOSIT_ACCOUNT_REQUEST_DATA_PARAMETERS); @@ -186,7 +191,8 @@ public void validateRecurringDepositForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, DepositsApiConstants.RECURRING_DEPOSIT_ACCOUNT_REQUEST_DATA_PARAMETERS); @@ -210,7 +216,8 @@ public void validateFixedDepositForInterestCalculation(final String json) { if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, DepositsApiConstants.FIXED_DEPOSIT_ACCOUNT_INTEREST_CALCULATION_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -524,7 +531,7 @@ private void validatePreClosureDetailForUpdate(final JsonElement element, final } private void validateDepositTermDeatilForSubmit(final JsonElement element, final DataValidatorBuilder baseDataValidator, - final DepositAccountType depositType) { + final DepositAccountType depositType) { Integer minTerm = null; if (fromApiJsonHelper.parameterExists(minDepositTermParamName, element)) { @@ -579,7 +586,7 @@ private void validateDepositTermDeatilForSubmit(final JsonElement element, final } private void validateDepositTermDeatilForUpdate(final JsonElement element, final DataValidatorBuilder baseDataValidator, - final DepositAccountType depositAccountType) { + final DepositAccountType depositAccountType) { this.productDataValidator.validateDepositTermDetailForUpdate(element, baseDataValidator); if (fromApiJsonHelper.parameterExists(depositAmountParamName, element)) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositAccountTransactionDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositAccountTransactionDataValidator.java index f3740f790e8..a1f8a417db5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositAccountTransactionDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositAccountTransactionDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -33,6 +33,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -42,6 +43,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -95,7 +97,8 @@ public void validate(final JsonCommand command, DepositAccountType depositAccoun throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, DEPOSIT_ACCOUNT_TRANSACTION_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -131,7 +134,8 @@ public void validateDepositAmountUpdate(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, DEPOSIT_ACCOUNT_RECOMMENDED_DEPOSIT_AMOUNT_UPDATE_REQUEST_DATA_PARAMETERS); @@ -159,7 +163,8 @@ public void validateActivation(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SavingsAccountConstant.SAVINGS_ACCOUNT_ACTIVATION_REQUEST_DATA_PARAMETERS); @@ -181,7 +186,8 @@ public void validatePreMatureAmountCalculation(final String json, final DepositA throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, DEPOSIT_ACCOUNT_PRE_MATURE_CALCULATION_REQUEST_DATA_PARAMETERS); @@ -204,7 +210,8 @@ public void validateClosing(final JsonCommand command, DepositAccountType deposi throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, DEPOSIT_ACCOUNT_CLOSE_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositProductDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositProductDataValidator.java index 33069eae69f..0a26aa113f4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositProductDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositProductDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -64,6 +64,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.MonthDay; @@ -71,6 +72,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.accounting.common.AccountingConstants.SavingProductAccountingParams; @@ -104,7 +106,8 @@ public void validateForFixedDepositCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, FIXED_DEPOSIT_PRODUCT_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -131,7 +134,8 @@ public void validateForFixedDepositUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, FIXED_DEPOSIT_PRODUCT_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -157,7 +161,8 @@ public void validateForRecurringDepositCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, RECURRING_DEPOSIT_PRODUCT_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -186,7 +191,8 @@ public void validateForRecurringDepositUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, RECURRING_DEPOSIT_PRODUCT_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -210,7 +216,7 @@ public void validateForRecurringDepositUpdate(final String json) { } private void validateDepositDetailForCreate(final JsonElement element, final FromJsonHelper fromApiJsonHelper, - final DataValidatorBuilder baseDataValidator, final DepositAccountType accountType) { + final DataValidatorBuilder baseDataValidator, final DepositAccountType accountType) { final String name = fromApiJsonHelper.extractStringNamed(nameParamName, element); baseDataValidator.reset().parameter(nameParamName).value(name).notBlank().notExceedingLengthOf(100); @@ -384,7 +390,7 @@ private void validateChartsData(JsonElement element, DataValidatorBuilder baseDa } public void validateDepositDetailForUpdate(final JsonElement element, final FromJsonHelper fromApiJsonHelper, - final DataValidatorBuilder baseDataValidator) { + final DataValidatorBuilder baseDataValidator) { if (fromApiJsonHelper.parameterExists(nameParamName, element)) { final String name = fromApiJsonHelper.extractStringNamed(nameParamName, element); baseDataValidator.reset().parameter(nameParamName).value(name).notBlank().notExceedingLengthOf(100); @@ -684,7 +690,7 @@ private void validateDepositAmountForUpdate(JsonElement element, DataValidatorBu } private void validateTaxWithHoldingParams(final DataValidatorBuilder baseDataValidator, final JsonElement element, - final boolean isCreate) { + final boolean isCreate) { if (this.fromApiJsonHelper.parameterExists(withHoldTaxParamName, element)) { final String withHoldTax = this.fromApiJsonHelper.extractStringNamed(withHoldTaxParamName, element); baseDataValidator.reset().parameter(withHoldTaxParamName).value(withHoldTax).ignoreIfNull().validateForBooleanValue(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionDataValidator.java index a53e5eceb17..2d1b8d32a0b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/SavingsAccountTransactionDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -34,6 +34,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -43,6 +44,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; @@ -96,7 +98,8 @@ public void validate(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SavingsAccountConstant.SAVINGS_ACCOUNT_TRANSACTION_REQUEST_DATA_PARAMETERS); @@ -127,7 +130,8 @@ public void validateActivation(final JsonCommand command) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SavingsAccountConstant.SAVINGS_ACCOUNT_ACTIVATION_REQUEST_DATA_PARAMETERS); @@ -150,7 +154,8 @@ public void validateClosing(final JsonCommand command, final SavingsAccount acco throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SavingsAccountConstant.SAVINGS_ACCOUNT_CLOSE_REQUEST_DATA_PARAMETERS); @@ -207,13 +212,14 @@ private void validatePaymentTypeDetails(final DataValidatorBuilder baseDataValid } public void validateHoldAndAssembleForm(final String json, final SavingsAccount account, final AppUser createdUser, - final boolean backdatedTxnsAllowedTill) { + final boolean backdatedTxnsAllowedTill) { if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SAVINGS_ACCOUNT_HOLD_AMOUNT_REQUEST_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountAssembler.java index 80af0549f00..ce7a514c25b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountAssembler.java @@ -6,9 +6,9 @@ * 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 @@ -56,6 +56,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.time.LocalDate; import java.time.format.DateTimeFormatter; @@ -64,6 +65,7 @@ import java.util.Collection; import java.util.Locale; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; import org.apache.fineract.infrastructure.core.api.JsonCommand; @@ -125,15 +127,15 @@ public class DepositAccountAssembler { @Autowired public DepositAccountAssembler(final SavingsAccountTransactionSummaryWrapper savingsAccountTransactionSummaryWrapper, - final ClientRepositoryWrapper clientRepository, final GroupRepositoryWrapper groupRepository, - final StaffRepositoryWrapper staffRepository, final FixedDepositProductRepository fixedDepositProductRepository, - final SavingsAccountRepositoryWrapper savingsAccountRepository, - final SavingsAccountChargeAssembler savingsAccountChargeAssembler, final FromJsonHelper fromApiJsonHelper, - final DepositProductAssembler depositProductAssembler, - final RecurringDepositProductRepository recurringDepositProductRepository, - final AccountTransfersReadPlatformService accountTransfersReadPlatformService, final PlatformSecurityContext context, - final PaymentDetailAssembler paymentDetailAssembler, ExternalIdFactory externalIdFactory, - final ConfigurationDomainService configurationDomainService) { + final ClientRepositoryWrapper clientRepository, final GroupRepositoryWrapper groupRepository, + final StaffRepositoryWrapper staffRepository, final FixedDepositProductRepository fixedDepositProductRepository, + final SavingsAccountRepositoryWrapper savingsAccountRepository, + final SavingsAccountChargeAssembler savingsAccountChargeAssembler, final FromJsonHelper fromApiJsonHelper, + final DepositProductAssembler depositProductAssembler, + final RecurringDepositProductRepository recurringDepositProductRepository, + final AccountTransfersReadPlatformService accountTransfersReadPlatformService, final PlatformSecurityContext context, + final PaymentDetailAssembler paymentDetailAssembler, ExternalIdFactory externalIdFactory, + final ConfigurationDomainService configurationDomainService) { this.savingsAccountTransactionSummaryWrapper = savingsAccountTransactionSummaryWrapper; this.clientRepository = clientRepository; @@ -185,13 +187,13 @@ public SavingsAccount assembleFrom(final JsonCommand command, final AppUser subm if (clientId != null) { final boolean isCalendarInherited = command.booleanPrimitiveValueOfParameterNamed(isCalendarInheritedParamName); client = this.clientRepository.findOneWithNotFoundDetection(clientId, isCalendarInherited); // we - // need - // group - // collection - // if - // isCalendarInherited - // is - // true + // need + // group + // collection + // if + // isCalendarInherited + // is + // true accountType = AccountType.INDIVIDUAL; if (client.isNotActive()) { throw new ClientNotActiveException(clientId); @@ -378,7 +380,7 @@ public void assignSavingAccountHelpers(final SavingsAccount savingsAccount) { } public DepositAccountTermAndPreClosure assembleAccountTermAndPreClosure(final JsonCommand command, - final DepositProductTermAndPreClosure productTermAndPreclosure) { + final DepositProductTermAndPreClosure productTermAndPreclosure) { final DepositPreClosureDetail productPreClosure = (productTermAndPreclosure == null) ? null : productTermAndPreclosure.depositPreClosureDetail(); final DepositTermDetail productTerm = (productTermAndPreclosure == null) ? null : productTermAndPreclosure.depositTermDetail(); @@ -397,7 +399,7 @@ public DepositAccountTermAndPreClosure assembleAccountTermAndPreClosure(final Js // calculate maturity amount final BigDecimal maturityAmount = null;// calculated and updated in - // account + // account final LocalDate maturityDate = null;// calculated and updated in account final Integer accountOnClosureTypeId = command.integerValueOfParameterNamed(maturityInstructionIdParamName); final DepositAccountOnClosureType accountOnClosureType = accountOnClosureTypeId != null @@ -410,7 +412,7 @@ public DepositAccountTermAndPreClosure assembleAccountTermAndPreClosure(final Js } public DepositAccountRecurringDetail assembleAccountRecurringDetail(final JsonCommand command, - final DepositRecurringDetail prodRecurringDetail) { + final DepositRecurringDetail prodRecurringDetail) { final BigDecimal recurringDepositAmount = command.bigDecimalValueOfParameterNamed(mandatoryRecommendedDepositAmountParamName); boolean isMandatoryDeposit; @@ -448,7 +450,7 @@ public DepositAccountRecurringDetail assembleAccountRecurringDetail(final JsonCo } public Collection assembleBulkMandatorySavingsAccountTransactionDTOs(final JsonCommand command, - final PaymentDetail paymentDetail) { + final PaymentDetail paymentDetail) { final String json = command.json(); if (StringUtils.isBlank(json)) { throw new InvalidJsonException(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountDomainService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountDomainService.java index 3b29b900c14..0e830f3c963 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountDomainService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountDomainService.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.Map; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.portfolio.paymentdetail.domain.PaymentDetail; import org.apache.fineract.useradministration.domain.AppUser; @@ -30,30 +31,30 @@ public interface DepositAccountDomainService { SavingsAccountTransaction handleWithdrawal(SavingsAccount account, DateTimeFormatter fmt, LocalDate transactionDate, - BigDecimal transactionAmount, PaymentDetail paymentDetail, boolean applyWithdrawFee, boolean isRegularTransaction); + BigDecimal transactionAmount, PaymentDetail paymentDetail, boolean applyWithdrawFee, boolean isRegularTransaction); SavingsAccountTransaction handleFDDeposit(FixedDepositAccount account, DateTimeFormatter fmt, LocalDate transactionDate, - BigDecimal transactionAmount, PaymentDetail paymentDetail); + BigDecimal transactionAmount, PaymentDetail paymentDetail); SavingsAccountTransaction handleRDDeposit(RecurringDepositAccount account, DateTimeFormatter fmt, LocalDate transactionDate, - BigDecimal transactionAmount, PaymentDetail paymentDetail, boolean isRegularTransaction); + BigDecimal transactionAmount, PaymentDetail paymentDetail, boolean isRegularTransaction); SavingsAccountTransaction handleSavingDeposit(SavingsAccount account, DateTimeFormatter fmt, LocalDate transactionDate, - BigDecimal transactionAmount, PaymentDetail paymentDetail, boolean isRegularTransaction); + BigDecimal transactionAmount, PaymentDetail paymentDetail, boolean isRegularTransaction); Long handleFDAccountClosure(FixedDepositAccount account, PaymentDetail paymentDetail, AppUser user, JsonCommand command, - Map changes); + Map changes); @Transactional Long handleFDAccountMaturityClosure(FixedDepositAccount account, PaymentDetail paymentDetail, AppUser user, DateTimeFormatter fmt, - LocalDate closedDate, Integer onAccountClosureId, Long toSavingsId, String transferDescription, Map changes); + LocalDate closedDate, Integer onAccountClosureId, Long toSavingsId, String transferDescription, Map changes); Long handleRDAccountClosure(RecurringDepositAccount account, PaymentDetail paymentDetail, AppUser user, JsonCommand command, - Map changes); + Map changes); Long handleFDAccountPreMatureClosure(FixedDepositAccount account, PaymentDetail paymentDetail, AppUser user, JsonCommand command, - Map changes); + Map changes); Long handleRDAccountPreMatureClosure(RecurringDepositAccount account, PaymentDetail paymentDetail, AppUser user, JsonCommand command, - Map changes); + Map changes); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountDomainServiceJpa.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountDomainServiceJpa.java index 3d658c8453b..5f1d2124e91 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountDomainServiceJpa.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountDomainServiceJpa.java @@ -6,9 +6,9 @@ * 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 @@ -31,6 +31,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.journalentry.service.JournalEntryWritePlatformService; import org.apache.fineract.infrastructure.accountnumberformat.domain.AccountNumberFormat; @@ -84,8 +85,8 @@ public class DepositAccountDomainServiceJpa implements DepositAccountDomainServi @Transactional @Override public SavingsAccountTransaction handleWithdrawal(final SavingsAccount account, final DateTimeFormatter fmt, - final LocalDate transactionDate, final BigDecimal transactionAmount, final PaymentDetail paymentDetail, - final boolean applyWithdrawFee, final boolean isRegularTransaction) { + final LocalDate transactionDate, final BigDecimal transactionAmount, final PaymentDetail paymentDetail, + final boolean applyWithdrawFee, final boolean isRegularTransaction) { boolean isAccountTransfer = false; boolean isInterestTransfer = false; boolean isWithdrawBalance = false; @@ -99,7 +100,7 @@ public SavingsAccountTransaction handleWithdrawal(final SavingsAccount account, @Transactional @Override public SavingsAccountTransaction handleFDDeposit(final FixedDepositAccount account, final DateTimeFormatter fmt, - final LocalDate transactionDate, final BigDecimal transactionAmount, final PaymentDetail paymentDetail) { + final LocalDate transactionDate, final BigDecimal transactionAmount, final PaymentDetail paymentDetail) { boolean isAccountTransfer = false; boolean isRegularTransaction = false; final boolean backdatedTxnsAllowedTill = false; @@ -110,8 +111,8 @@ public SavingsAccountTransaction handleFDDeposit(final FixedDepositAccount accou @Transactional @Override public SavingsAccountTransaction handleRDDeposit(final RecurringDepositAccount account, final DateTimeFormatter fmt, - final LocalDate transactionDate, final BigDecimal transactionAmount, final PaymentDetail paymentDetail, - final boolean isRegularTransaction) { + final LocalDate transactionDate, final BigDecimal transactionAmount, final PaymentDetail paymentDetail, + final boolean isRegularTransaction) { final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService .isSavingsInterestPostingAtCurrentPeriodEnd(); final Integer financialYearBeginningMonth = this.configurationDomainService.retrieveFinancialYearBeginningMonth(); @@ -143,8 +144,8 @@ public SavingsAccountTransaction handleRDDeposit(final RecurringDepositAccount a @Transactional @Override public SavingsAccountTransaction handleSavingDeposit(final SavingsAccount account, final DateTimeFormatter fmt, - final LocalDate transactionDate, final BigDecimal transactionAmount, final PaymentDetail paymentDetail, - final boolean isRegularTransaction) { + final LocalDate transactionDate, final BigDecimal transactionAmount, final PaymentDetail paymentDetail, + final boolean isRegularTransaction) { boolean isAccountTransfer = false; final boolean backdatedTxnsAllowedTill = false; final SavingsAccountTransaction deposit = this.savingsAccountDomainService.handleDeposit(account, fmt, transactionDate, @@ -169,7 +170,7 @@ private boolean isAnyActivationChargesDue(final RecurringDepositAccount account) @Transactional @Override public Long handleFDAccountClosure(final FixedDepositAccount account, final PaymentDetail paymentDetail, final AppUser user, - final JsonCommand command, final Map changes) { + final JsonCommand command, final Map changes) { final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService .isSavingsInterestPostingAtCurrentPeriodEnd(); final Integer financialYearBeginningMonth = this.configurationDomainService.retrieveFinancialYearBeginningMonth(); @@ -239,8 +240,8 @@ public Long handleFDAccountClosure(final FixedDepositAccount account, final Paym @Transactional @Override public Long handleFDAccountMaturityClosure(final FixedDepositAccount account, final PaymentDetail paymentDetail, final AppUser user, - final DateTimeFormatter fmt, final LocalDate closedDate, final Integer onAccountClosureId, final Long toSavingsId, - final String transferDescription, Map changes) { + final DateTimeFormatter fmt, final LocalDate closedDate, final Integer onAccountClosureId, final Long toSavingsId, + final String transferDescription, Map changes) { final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService .isSavingsInterestPostingAtCurrentPeriodEnd(); @@ -321,7 +322,7 @@ public Long handleFDAccountMaturityClosure(final FixedDepositAccount account, fi @Transactional @Override public Long handleRDAccountClosure(final RecurringDepositAccount account, final PaymentDetail paymentDetail, final AppUser user, - final JsonCommand command, final Map changes) { + final JsonCommand command, final Map changes) { final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService .isSavingsInterestPostingAtCurrentPeriodEnd(); @@ -435,7 +436,7 @@ private void autoGenerateAccountNumber(final SavingsAccount account) { @Transactional @Override public Long handleFDAccountPreMatureClosure(final FixedDepositAccount account, final PaymentDetail paymentDetail, final AppUser user, - final JsonCommand command, final Map changes) { + final JsonCommand command, final Map changes) { final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService .isSavingsInterestPostingAtCurrentPeriodEnd(); @@ -490,7 +491,7 @@ public Long handleFDAccountPreMatureClosure(final FixedDepositAccount account, f @Transactional @Override public Long handleRDAccountPreMatureClosure(final RecurringDepositAccount account, final PaymentDetail paymentDetail, - final AppUser user, final JsonCommand command, final Map changes) { + final AppUser user, final JsonCommand command, final Map changes) { final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService .isSavingsInterestPostingAtCurrentPeriodEnd(); @@ -542,13 +543,13 @@ public Long handleRDAccountPreMatureClosure(final RecurringDepositAccount accoun } private void updateExistingTransactionsDetails(SavingsAccount account, Set existingTransactionIds, - Set existingReversedTransactionIds) { + Set existingReversedTransactionIds) { existingTransactionIds.addAll(account.findExistingTransactionIds()); existingReversedTransactionIds.addAll(account.findExistingReversedTransactionIds()); } private void postJournalEntries(final SavingsAccount savingsAccount, final Set existingTransactionIds, - final Set existingReversedTransactionIds, boolean isAccountTransfer) { + final Set existingReversedTransactionIds, boolean isAccountTransfer) { final boolean backdatedTxnsAllowedTill = false; @@ -560,7 +561,7 @@ private void postJournalEntries(final SavingsAccount savingsAccount, final Set existingTransactionIds, final SavingsAccount savingsAccount) { List transactions = savingsAccount.getTransactions(); int size = transactions.size(); - for (int i = size - 1;; i--) { + for (int i = size - 1; ; i--) { SavingsAccountTransaction transaction = transactions.get(i); if (transaction.isWithdrawal() || transaction.isWithdrawalFee()) { existingTransactionIds.add(transaction.getId()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountOnHoldTransactionRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountOnHoldTransactionRepository.java index 7bc05d8a23a..88e34c040ef 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountOnHoldTransactionRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountOnHoldTransactionRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.savings.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountRecurringDetail.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountRecurringDetail.java index 6f659759d1d..34e9a671910 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountRecurringDetail.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/DepositAccountRecurringDetail.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.OneToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; @@ -33,6 +34,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @@ -73,7 +75,7 @@ public DepositAccountRecurringDetail() { } public static DepositAccountRecurringDetail createNew(final BigDecimal mandatoryRecommendedDepositAmount, - final DepositRecurringDetail recurringDetail, final SavingsAccount account, final boolean isCalendarInherited) { + final DepositRecurringDetail recurringDetail, final SavingsAccount account, final boolean isCalendarInherited) { final BigDecimal totalOverdueAmount = null; final Integer noOfOverdueInstallments = null; return new DepositAccountRecurringDetail(mandatoryRecommendedDepositAmount, totalOverdueAmount, noOfOverdueInstallments, @@ -88,8 +90,8 @@ public static DepositAccountRecurringDetail createNew(final BigDecimal mandatory * @param account */ protected DepositAccountRecurringDetail(final BigDecimal mandatoryRecommendedDepositAmount, final BigDecimal totalOverdueAmount, - final Integer noOfOverdueInstallments, final DepositRecurringDetail recurringDetail, final SavingsAccount account, - final boolean isCalendarInherited) { + final Integer noOfOverdueInstallments, final DepositRecurringDetail recurringDetail, final SavingsAccount account, + final boolean isCalendarInherited) { this.mandatoryRecommendedDepositAmount = mandatoryRecommendedDepositAmount; this.totalOverdueAmount = totalOverdueAmount; this.noOfOverdueInstallments = noOfOverdueInstallments; @@ -113,7 +115,7 @@ public Map update(final JsonCommand command) { } public Map updateMandatoryRecommendedDepositAmount(BigDecimal newMandatoryRecommendedDepositAmount, - LocalDate effectiveDate, Boolean isSavingsInterestPostingAtCurrentPeriodEnd, Integer financialYearBeginningMonth) { + LocalDate effectiveDate, Boolean isSavingsInterestPostingAtCurrentPeriodEnd, Integer financialYearBeginningMonth) { final Map actualChanges = new LinkedHashMap<>(10); actualChanges.put(mandatoryRecommendedDepositAmountParamName, newMandatoryRecommendedDepositAmount); this.mandatoryRecommendedDepositAmount = newMandatoryRecommendedDepositAmount; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositAccount.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositAccount.java index fd6bf69b4ae..77a1edfa5cc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositAccount.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositAccount.java @@ -6,9 +6,9 @@ * 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 @@ -29,6 +29,7 @@ import jakarta.persistence.FetchType; import jakarta.persistence.OneToOne; import jakarta.persistence.Transient; + import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; @@ -39,6 +40,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -89,15 +91,15 @@ protected FixedDepositAccount() { } public static FixedDepositAccount createNewApplicationForSubmittal(final Client client, final Group group, final SavingsProduct product, - final Staff fieldOfficer, final String accountNo, final ExternalId externalId, final AccountType accountType, - final LocalDate submittedOnDate, final AppUser submittedBy, final BigDecimal interestRate, - final SavingsCompoundingInterestPeriodType interestCompoundingPeriodType, - final SavingsPostingInterestPeriodType interestPostingPeriodType, final SavingsInterestCalculationType interestCalculationType, - final SavingsInterestCalculationDaysInYearType interestCalculationDaysInYearType, final BigDecimal minRequiredOpeningBalance, - final Integer lockinPeriodFrequency, final SavingsPeriodFrequencyType lockinPeriodFrequencyType, - final boolean withdrawalFeeApplicableForTransfer, final Set savingsAccountCharges, - final DepositAccountTermAndPreClosure accountTermAndPreClosure, final DepositAccountInterestRateChart chart, - boolean withHoldTax) { + final Staff fieldOfficer, final String accountNo, final ExternalId externalId, final AccountType accountType, + final LocalDate submittedOnDate, final AppUser submittedBy, final BigDecimal interestRate, + final SavingsCompoundingInterestPeriodType interestCompoundingPeriodType, + final SavingsPostingInterestPeriodType interestPostingPeriodType, final SavingsInterestCalculationType interestCalculationType, + final SavingsInterestCalculationDaysInYearType interestCalculationDaysInYearType, final BigDecimal minRequiredOpeningBalance, + final Integer lockinPeriodFrequency, final SavingsPeriodFrequencyType lockinPeriodFrequencyType, + final boolean withdrawalFeeApplicableForTransfer, final Set savingsAccountCharges, + final DepositAccountTermAndPreClosure accountTermAndPreClosure, final DepositAccountInterestRateChart chart, + boolean withHoldTax) { final SavingsAccountStatusType status = SavingsAccountStatusType.SUBMITTED_AND_PENDING_APPROVAL; final boolean allowOverdraft = false; @@ -112,15 +114,15 @@ public static FixedDepositAccount createNewApplicationForSubmittal(final Client } private FixedDepositAccount(final Client client, final Group group, final SavingsProduct product, final Staff fieldOfficer, - final String accountNo, final ExternalId externalId, final SavingsAccountStatusType status, final AccountType accountType, - final LocalDate submittedOnDate, final AppUser submittedBy, final BigDecimal nominalAnnualInterestRate, - final SavingsCompoundingInterestPeriodType interestCompoundingPeriodType, - final SavingsPostingInterestPeriodType interestPostingPeriodType, final SavingsInterestCalculationType interestCalculationType, - final SavingsInterestCalculationDaysInYearType interestCalculationDaysInYearType, final BigDecimal minRequiredOpeningBalance, - final Integer lockinPeriodFrequency, final SavingsPeriodFrequencyType lockinPeriodFrequencyType, - final boolean withdrawalFeeApplicableForTransfer, final Set savingsAccountCharges, - final DepositAccountTermAndPreClosure accountTermAndPreClosure, DepositAccountInterestRateChart chart, - final boolean allowOverdraft, final BigDecimal overdraftLimit, boolean withHoldTax) { + final String accountNo, final ExternalId externalId, final SavingsAccountStatusType status, final AccountType accountType, + final LocalDate submittedOnDate, final AppUser submittedBy, final BigDecimal nominalAnnualInterestRate, + final SavingsCompoundingInterestPeriodType interestCompoundingPeriodType, + final SavingsPostingInterestPeriodType interestPostingPeriodType, final SavingsInterestCalculationType interestCalculationType, + final SavingsInterestCalculationDaysInYearType interestCalculationDaysInYearType, final BigDecimal minRequiredOpeningBalance, + final Integer lockinPeriodFrequency, final SavingsPeriodFrequencyType lockinPeriodFrequencyType, + final boolean withdrawalFeeApplicableForTransfer, final Set savingsAccountCharges, + final DepositAccountTermAndPreClosure accountTermAndPreClosure, DepositAccountInterestRateChart chart, + final boolean allowOverdraft, final BigDecimal overdraftLimit, boolean withHoldTax) { super(client, group, product, fieldOfficer, accountNo, externalId, status, accountType, submittedOnDate, submittedBy, nominalAnnualInterestRate, interestCompoundingPeriodType, interestPostingPeriodType, interestCalculationType, @@ -156,7 +158,7 @@ protected BigDecimal getEffectiveInterestRateAsFraction(final MathContext mc, fi } protected BigDecimal getEffectiveInterestRateAsFraction(final MathContext mc, final LocalDate interestPostingUpToDate, - final boolean isPreMatureClosure) { + final boolean isPreMatureClosure) { // default it to nominalAnnualInterst rate. interest chart overrrides // this value. @@ -193,7 +195,7 @@ protected BigDecimal getEffectiveInterestRateAsFraction(final MathContext mc, fi } public void updateMaturityDateAndAmountBeforeAccountActivation(final MathContext mc, final boolean isPreMatureClosure, - final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth) { + final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth) { List allTransactions = new ArrayList<>(); String refNo = null; final Money transactionAmountMoney = Money.of(getCurrency(), this.accountTermAndPreClosure.depositAmount()); @@ -207,14 +209,14 @@ public void updateMaturityDateAndAmountBeforeAccountActivation(final MathContext } public void updateMaturityDateAndAmount(final MathContext mc, final boolean isPreMatureClosure, - final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth) { + final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth) { updateMaturityDateAndAmount(mc, retreiveOrderedNonInterestPostingTransactions(), isPreMatureClosure, isSavingsInterestPostingAtCurrentPeriodEnd, financialYearBeginningMonth); } public void updateMaturityDateAndAmount(final MathContext mc, final List transactions, - final boolean isPreMatureClosure, final boolean isSavingsInterestPostingAtCurrentPeriodEnd, - final Integer financialYearBeginningMonth) { + final boolean isPreMatureClosure, final boolean isSavingsInterestPostingAtCurrentPeriodEnd, + final Integer financialYearBeginningMonth) { final LocalDate maturityDate = calculateMaturityDate(); final LocalDate interestCalculationUpto = maturityDate.minusDays(1); @@ -266,26 +268,26 @@ public LocalDate calculateMaturityDate() { switch (this.accountTermAndPreClosure.depositPeriodFrequencyType()) { case DAYS: maturityDate = startDate.plusDays(depositPeriod); - break; + break; case WEEKS: maturityDate = startDate.plusWeeks(depositPeriod); - break; + break; case MONTHS: maturityDate = startDate.plusMonths(depositPeriod); - break; + break; case YEARS: maturityDate = startDate.plusYears(depositPeriod); - break; + break; case INVALID: - break; + break; } return maturityDate; } private List calculateInterestPayable(final MathContext mc, final LocalDate maturityDate, - final List transactions, final boolean isPreMatureClosure, - final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth) { + final List transactions, final boolean isPreMatureClosure, + final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth) { final SavingsPostingInterestPeriodType postingPeriodType = SavingsPostingInterestPeriodType.fromInt(this.interestPostingPeriodType); @@ -565,7 +567,7 @@ public void postMaturityInterest(final boolean isSavingsInterestPostingAtCurrent } public void postPreMaturityInterest(final LocalDate accountCloseDate, final boolean isPreMatureClosure, - final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth) { + final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth) { Money interestPostedToDate = totalInterestPosted(); // calculate interest before one day of closure date @@ -599,7 +601,7 @@ public void postPreMaturityInterest(final LocalDate accountCloseDate, final bool } public BigDecimal calculatePreMatureAmount(final LocalDate preMatureDate, final boolean isPreMatureClosure, - final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth) { + final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth) { final Money interestPostedToDate = totalInterestPosted().copy(); @@ -613,8 +615,8 @@ public BigDecimal calculatePreMatureAmount(final LocalDate preMatureDate, final } private Money calculatePreMatureInterest(final LocalDate preMatureDate, final List transactions, - final boolean isPreMatureClosure, final boolean isSavingsInterestPostingAtCurrentPeriodEnd, - final Integer financialYearBeginningMonth) { + final boolean isPreMatureClosure, final boolean isSavingsInterestPostingAtCurrentPeriodEnd, + final Integer financialYearBeginningMonth) { final MathContext mc = MathContext.DECIMAL64; final List postingPeriods = calculateInterestPayable(mc, preMatureDate, transactions, isPreMatureClosure, isSavingsInterestPostingAtCurrentPeriodEnd, financialYearBeginningMonth); @@ -630,8 +632,8 @@ private Money calculatePreMatureInterest(final LocalDate preMatureDate, final Li } public void postInterest(final MathContext mc, final LocalDate postingDate, boolean isInterestTransfer, - final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth, - final LocalDate postInterestOnDate, final boolean backdatedTxnsAllowedTill) { + final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth, + final LocalDate postInterestOnDate, final boolean backdatedTxnsAllowedTill) { final LocalDate interestPostingUpToDate = interestPostingUpToDate(postingDate); boolean postReversals = false; super.postInterest(mc, interestPostingUpToDate, isInterestTransfer, isSavingsInterestPostingAtCurrentPeriodEnd, @@ -640,8 +642,8 @@ public void postInterest(final MathContext mc, final LocalDate postingDate, bool @Override public List calculateInterestUsing(final MathContext mc, final LocalDate postingDate, boolean isInterestTransfer, - final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth, - final LocalDate postAsInterestOn, final boolean backdatedTxnsAllowedTill, final boolean postReversals) { + final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth, + final LocalDate postAsInterestOn, final boolean backdatedTxnsAllowedTill, final boolean postReversals) { final LocalDate interestPostingUpToDate = interestPostingUpToDate(postingDate); return super.calculateInterestUsing(mc, interestPostingUpToDate, isInterestTransfer, isSavingsInterestPostingAtCurrentPeriodEnd, financialYearBeginningMonth, postAsInterestOn, backdatedTxnsAllowedTill, postReversals); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositAccountRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositAccountRepository.java index a711fb79202..e88110fea97 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositAccountRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositAccountRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositProductRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositProductRepository.java index ecc8b884916..8a180a64908 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositProductRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/FixedDepositProductRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/RecurringDepositAccount.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/RecurringDepositAccount.java index 8d0b1647e6d..d5cecd38cab 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/RecurringDepositAccount.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/RecurringDepositAccount.java @@ -6,9 +6,9 @@ * 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 @@ -30,6 +30,7 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.OneToOne; import jakarta.persistence.OrderBy; + import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; @@ -42,6 +43,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -97,15 +99,15 @@ protected RecurringDepositAccount() { } public static RecurringDepositAccount createNewApplicationForSubmittal(final Client client, final Group group, - final SavingsProduct product, final Staff fieldOfficer, final String accountNo, final ExternalId externalId, - final AccountType accountType, final LocalDate submittedOnDate, final AppUser submittedBy, final BigDecimal interestRate, - final SavingsCompoundingInterestPeriodType interestCompoundingPeriodType, - final SavingsPostingInterestPeriodType interestPostingPeriodType, final SavingsInterestCalculationType interestCalculationType, - final SavingsInterestCalculationDaysInYearType interestCalculationDaysInYearType, final BigDecimal minRequiredOpeningBalance, - final Integer lockinPeriodFrequency, final SavingsPeriodFrequencyType lockinPeriodFrequencyType, - final boolean withdrawalFeeApplicableForTransfer, final Set savingsAccountCharges, - final DepositAccountTermAndPreClosure accountTermAndPreClosure, final DepositAccountRecurringDetail recurringDetail, - final DepositAccountInterestRateChart chart, final boolean withHoldTax) { + final SavingsProduct product, final Staff fieldOfficer, final String accountNo, final ExternalId externalId, + final AccountType accountType, final LocalDate submittedOnDate, final AppUser submittedBy, final BigDecimal interestRate, + final SavingsCompoundingInterestPeriodType interestCompoundingPeriodType, + final SavingsPostingInterestPeriodType interestPostingPeriodType, final SavingsInterestCalculationType interestCalculationType, + final SavingsInterestCalculationDaysInYearType interestCalculationDaysInYearType, final BigDecimal minRequiredOpeningBalance, + final Integer lockinPeriodFrequency, final SavingsPeriodFrequencyType lockinPeriodFrequencyType, + final boolean withdrawalFeeApplicableForTransfer, final Set savingsAccountCharges, + final DepositAccountTermAndPreClosure accountTermAndPreClosure, final DepositAccountRecurringDetail recurringDetail, + final DepositAccountInterestRateChart chart, final boolean withHoldTax) { final boolean allowOverdraft = false; final BigDecimal overdraftLimit = new BigDecimal(0); @@ -119,15 +121,15 @@ public static RecurringDepositAccount createNewApplicationForSubmittal(final Cli } public static RecurringDepositAccount createNewActivatedAccount(final Client client, final Group group, final SavingsProduct product, - final Staff fieldOfficer, final String accountNo, final ExternalId externalId, final AccountType accountType, - final LocalDate submittedOnDate, final AppUser submittedBy, final BigDecimal interestRate, - final SavingsCompoundingInterestPeriodType interestCompoundingPeriodType, - final SavingsPostingInterestPeriodType interestPostingPeriodType, final SavingsInterestCalculationType interestCalculationType, - final SavingsInterestCalculationDaysInYearType interestCalculationDaysInYearType, final BigDecimal minRequiredOpeningBalance, - final Integer lockinPeriodFrequency, final SavingsPeriodFrequencyType lockinPeriodFrequencyType, - final boolean withdrawalFeeApplicableForTransfer, final Set savingsAccountCharges, - final DepositAccountTermAndPreClosure accountTermAndPreClosure, final DepositAccountRecurringDetail recurringDetail, - final DepositAccountInterestRateChart chart, final boolean withHoldTax) { + final Staff fieldOfficer, final String accountNo, final ExternalId externalId, final AccountType accountType, + final LocalDate submittedOnDate, final AppUser submittedBy, final BigDecimal interestRate, + final SavingsCompoundingInterestPeriodType interestCompoundingPeriodType, + final SavingsPostingInterestPeriodType interestPostingPeriodType, final SavingsInterestCalculationType interestCalculationType, + final SavingsInterestCalculationDaysInYearType interestCalculationDaysInYearType, final BigDecimal minRequiredOpeningBalance, + final Integer lockinPeriodFrequency, final SavingsPeriodFrequencyType lockinPeriodFrequencyType, + final boolean withdrawalFeeApplicableForTransfer, final Set savingsAccountCharges, + final DepositAccountTermAndPreClosure accountTermAndPreClosure, final DepositAccountRecurringDetail recurringDetail, + final DepositAccountInterestRateChart chart, final boolean withHoldTax) { final boolean allowOverdraft = false; final BigDecimal overdraftLimit = new BigDecimal(0); @@ -141,16 +143,16 @@ public static RecurringDepositAccount createNewActivatedAccount(final Client cli } private RecurringDepositAccount(final Client client, final Group group, final SavingsProduct product, final Staff fieldOfficer, - final String accountNo, final ExternalId externalId, final SavingsAccountStatusType status, final AccountType accountType, - final LocalDate submittedOnDate, final AppUser submittedBy, final BigDecimal nominalAnnualInterestRate, - final SavingsCompoundingInterestPeriodType interestCompoundingPeriodType, - final SavingsPostingInterestPeriodType interestPostingPeriodType, final SavingsInterestCalculationType interestCalculationType, - final SavingsInterestCalculationDaysInYearType interestCalculationDaysInYearType, final BigDecimal minRequiredOpeningBalance, - final Integer lockinPeriodFrequency, final SavingsPeriodFrequencyType lockinPeriodFrequencyType, - final boolean withdrawalFeeApplicableForTransfer, final Set savingsAccountCharges, - final DepositAccountTermAndPreClosure accountTermAndPreClosure, final DepositAccountRecurringDetail recurringDetail, - final DepositAccountInterestRateChart chart, final boolean allowOverdraft, final BigDecimal overdraftLimit, - final boolean withHoldTax) { + final String accountNo, final ExternalId externalId, final SavingsAccountStatusType status, final AccountType accountType, + final LocalDate submittedOnDate, final AppUser submittedBy, final BigDecimal nominalAnnualInterestRate, + final SavingsCompoundingInterestPeriodType interestCompoundingPeriodType, + final SavingsPostingInterestPeriodType interestPostingPeriodType, final SavingsInterestCalculationType interestCalculationType, + final SavingsInterestCalculationDaysInYearType interestCalculationDaysInYearType, final BigDecimal minRequiredOpeningBalance, + final Integer lockinPeriodFrequency, final SavingsPeriodFrequencyType lockinPeriodFrequencyType, + final boolean withdrawalFeeApplicableForTransfer, final Set savingsAccountCharges, + final DepositAccountTermAndPreClosure accountTermAndPreClosure, final DepositAccountRecurringDetail recurringDetail, + final DepositAccountInterestRateChart chart, final boolean allowOverdraft, final BigDecimal overdraftLimit, + final boolean withHoldTax) { super(client, group, product, fieldOfficer, accountNo, externalId, status, accountType, submittedOnDate, submittedBy, nominalAnnualInterestRate, interestCompoundingPeriodType, interestPostingPeriodType, interestCalculationType, @@ -206,7 +208,7 @@ protected BigDecimal getEffectiveInterestRateAsFraction(final MathContext mc, fi } protected BigDecimal getEffectiveInterestRateAsFraction(final MathContext mc, final LocalDate interestPostingUpToDate, - final boolean isPreMatureClosure) { + final boolean isPreMatureClosure) { boolean applyPreMaturePenalty = false; BigDecimal penalInterest = BigDecimal.ZERO; @@ -244,7 +246,7 @@ protected BigDecimal getEffectiveInterestRateAsFraction(final MathContext mc, fi } public void updateMaturityDateAndAmount(final MathContext mc, final boolean isPreMatureClosure, - final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth) { + final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth) { final LocalDate maturityDate = calculateMaturityDate(); LocalDate interestCalculationUpto = null; List allTransactions = null; @@ -274,7 +276,7 @@ public void updateMaturityDateAndAmount(final MathContext mc, final boolean isPr } public void updateMaturityStatus(final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth, - final boolean postReversals) { + final boolean postReversals) { final List dataValidationErrors = new ArrayList<>(); final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors) .resource(RECURRING_DEPOSIT_ACCOUNT_RESOURCE_NAME + SavingsApiConstants.updateMaturityDetailsAction); @@ -305,26 +307,26 @@ public LocalDate calculateMaturityDate() { switch (this.accountTermAndPreClosure.depositPeriodFrequencyType()) { case DAYS: maturityDate = startDate.plusDays(depositPeriod); - break; + break; case WEEKS: maturityDate = startDate.plusWeeks(depositPeriod); - break; + break; case MONTHS: maturityDate = startDate.plusMonths(depositPeriod); - break; + break; case YEARS: maturityDate = startDate.plusYears(depositPeriod); - break; + break; case INVALID: - break; + break; } return maturityDate; } private List calculateInterestPayable(final MathContext mc, final LocalDate maturityDate, - final List transactions, final boolean isPreMatureClosure, - final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth) { + final List transactions, final boolean isPreMatureClosure, + final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth) { // 1. default to calculate interest based on entire history OR // 2. determine latest 'posting period' and find interest credited to @@ -538,7 +540,7 @@ public Money activateWithBalance() { } protected void processAccountUponActivation(final DateTimeFormatter fmt, final boolean postReversals, - final Long relaxingDaysConfigForPivotDate) { + final Long relaxingDaysConfigForPivotDate) { final Money minRequiredOpeningBalance = Money.of(this.currency, this.minRequiredOpeningBalance); final boolean backdatedTxnsAllowedTill = false; String refNo = null; @@ -632,7 +634,7 @@ public void close(final AppUser currentUser, final JsonCommand command, final Ma } public void postMaturityInterest(final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth, - final LocalDate closeDate, final boolean postReversals) { + final LocalDate closeDate, final boolean postReversals) { LocalDate interestPostingUpToDate = maturityDate(); if (interestPostingUpToDate == null) { interestPostingUpToDate = closeDate; @@ -687,7 +689,7 @@ public void postMaturityInterest(final boolean isSavingsInterestPostingAtCurrent } public void postPreMaturityInterest(final LocalDate accountCloseDate, final boolean isPreMatureClosure, - final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth, boolean postReversals) { + final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth, boolean postReversals) { final Money interestPostedToDate = totalInterestPosted(); // calculate interest before one day of closure date @@ -721,7 +723,7 @@ public void postPreMaturityInterest(final LocalDate accountCloseDate, final bool } public BigDecimal calculatePreMatureAmount(final LocalDate preMatureDate, final boolean isPreMatureClosure, - final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth) { + final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth) { final Money interestPostedToDate = totalInterestPosted().copy(); @@ -735,8 +737,8 @@ public BigDecimal calculatePreMatureAmount(final LocalDate preMatureDate, final } private Money calculatePreMatureInterest(final LocalDate preMatureDate, final List transactions, - final boolean isPreMatureClosure, final boolean isSavingsInterestPostingAtCurrentPeriodEnd, - final Integer financialYearBeginningMonth) { + final boolean isPreMatureClosure, final boolean isSavingsInterestPostingAtCurrentPeriodEnd, + final Integer financialYearBeginningMonth) { final MathContext mc = MathContext.DECIMAL64; final List postingPeriods = calculateInterestPayable(mc, preMatureDate, transactions, isPreMatureClosure, isSavingsInterestPostingAtCurrentPeriodEnd, financialYearBeginningMonth); @@ -753,8 +755,8 @@ private Money calculatePreMatureInterest(final LocalDate preMatureDate, final Li @Override public void postInterest(final MathContext mc, final LocalDate postingDate, final boolean isInterestTransfer, - final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth, - final LocalDate postInterestAson, final boolean backdatedTxnsAllowedTill, final boolean postReversals) { + final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth, + final LocalDate postInterestAson, final boolean backdatedTxnsAllowedTill, final boolean postReversals) { final LocalDate interestPostingUpToDate = interestPostingUpToDate(postingDate); super.postInterest(mc, interestPostingUpToDate, isInterestTransfer, isSavingsInterestPostingAtCurrentPeriodEnd, financialYearBeginningMonth, postInterestAson, backdatedTxnsAllowedTill, postReversals); @@ -762,8 +764,8 @@ public void postInterest(final MathContext mc, final LocalDate postingDate, fina @Override public List calculateInterestUsing(final MathContext mc, final LocalDate postingDate, boolean isInterestTransfer, - final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth, - final LocalDate postAsInterestOn, final boolean backdatedTxnsAllowedTill, final boolean postReversals) { + final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth, + final LocalDate postAsInterestOn, final boolean backdatedTxnsAllowedTill, final boolean postReversals) { final LocalDate interestPostingUpToDate = interestPostingUpToDate(postingDate); return super.calculateInterestUsing(mc, interestPostingUpToDate, isInterestTransfer, isSavingsInterestPostingAtCurrentPeriodEnd, financialYearBeginningMonth, postAsInterestOn, backdatedTxnsAllowedTill, postReversals); @@ -838,7 +840,7 @@ protected List sortTransactions(final List retreiveOrderedDepositTransactions() { * Default implementation is check transaction date is before installment due date. */ protected boolean isTransactionInAdvanceOfInstallment(final int currentInstallmentIndex, - final List installments, final LocalDate transactionDate) { + final List installments, final LocalDate transactionDate) { final RecurringDepositScheduleInstallment currentInstallment = installments.get(currentInstallmentIndex); return DateUtils.isBefore(transactionDate, currentInstallment.dueDate()); } private Money handleInstallmentTransaction(final RecurringDepositScheduleInstallment currentInstallment, - final Money transactionAmountUnprocessed, final LocalDate transactionDate) { + final Money transactionAmountUnprocessed, final LocalDate transactionDate) { Money transactionAmountRemaining = transactionAmountUnprocessed; Money depositAmountPortion = currentInstallment.payInstallment(transactionDate, transactionAmountRemaining); transactionAmountRemaining = transactionAmountRemaining.minus(depositAmountPortion); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/RecurringDepositAccountRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/RecurringDepositAccountRepository.java index 6d8c890282c..aa4875f8deb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/RecurringDepositAccountRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/RecurringDepositAccountRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/RecurringDepositScheduleInstallment.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/RecurringDepositScheduleInstallment.java index 5527708b223..75ba515db3d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/RecurringDepositScheduleInstallment.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/RecurringDepositScheduleInstallment.java @@ -6,9 +6,9 @@ * 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 @@ -25,11 +25,13 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.OffsetDateTime; import java.util.Optional; + import org.apache.fineract.infrastructure.core.domain.AbstractAuditableWithUTCDateTimeCustom; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; @@ -81,7 +83,8 @@ public class RecurringDepositScheduleInstallment extends AbstractAuditableWithUT /** * */ - protected RecurringDepositScheduleInstallment() {} + protected RecurringDepositScheduleInstallment() { + } /** * @param account @@ -96,9 +99,9 @@ protected RecurringDepositScheduleInstallment() {} * @param obligationsMetOnDate */ private RecurringDepositScheduleInstallment(final RecurringDepositAccount account, final Integer installmentNumber, - final LocalDate fromDate, final LocalDate dueDate, final BigDecimal depositAmount, final BigDecimal depositAmountCompleted, - final BigDecimal totalPaidInAdvance, final BigDecimal totalPaidLate, final boolean obligationsMet, - final LocalDate obligationsMetOnDate) { + final LocalDate fromDate, final LocalDate dueDate, final BigDecimal depositAmount, final BigDecimal depositAmountCompleted, + final BigDecimal totalPaidInAdvance, final BigDecimal totalPaidLate, final boolean obligationsMet, + final LocalDate obligationsMetOnDate) { this.account = account; this.installmentNumber = installmentNumber; this.fromDate = fromDate; @@ -112,15 +115,15 @@ private RecurringDepositScheduleInstallment(final RecurringDepositAccount accoun } public static RecurringDepositScheduleInstallment from(final RecurringDepositAccount account, final Integer installmentNumber, - final LocalDate fromDate, final LocalDate dueDate, final BigDecimal depositAmount, final BigDecimal depositAmountCompleted, - final BigDecimal totalPaidInAdvance, final BigDecimal totalPaidLate, final boolean obligationsMet, - final LocalDate obligationsMetOnDate) { + final LocalDate fromDate, final LocalDate dueDate, final BigDecimal depositAmount, final BigDecimal depositAmountCompleted, + final BigDecimal totalPaidInAdvance, final BigDecimal totalPaidLate, final boolean obligationsMet, + final LocalDate obligationsMetOnDate) { return new RecurringDepositScheduleInstallment(account, installmentNumber, fromDate, dueDate, depositAmount, depositAmountCompleted, totalPaidInAdvance, totalPaidLate, obligationsMet, obligationsMetOnDate); } public static RecurringDepositScheduleInstallment installment(final RecurringDepositAccount account, final Integer installmentNumber, - final LocalDate dueDate, final BigDecimal depositAmount) { + final LocalDate dueDate, final BigDecimal depositAmount) { final LocalDate fromDate = null; final BigDecimal depositAmountCompleted = null; @@ -227,7 +230,7 @@ public Money getTotalOutstanding(final MonetaryCurrency currency) { } private void trackAdvanceAndLateTotalsForInstallment(final LocalDate transactionDate, final MonetaryCurrency currency, - final Money amountPaidInInstallment) { + final Money amountPaidInInstallment) { if (isInAdvance(transactionDate)) { this.totalPaidInAdvance = asMoney(this.totalPaidInAdvance, currency).plus(amountPaidInInstallment).getAmount(); } else if (isLatePayment(transactionDate)) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountAssembler.java index 2574ba5fa9f..f740a27283c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountAssembler.java @@ -6,9 +6,9 @@ * 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 @@ -46,12 +46,14 @@ import static org.apache.fineract.portfolio.savings.SavingsApiConstants.withdrawalFeeForTransfersParamName; import com.google.gson.JsonElement; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Set; + import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.exception.UnsupportedParameterException; @@ -104,13 +106,13 @@ public class SavingsAccountAssembler { @Autowired public SavingsAccountAssembler(final SavingsAccountTransactionSummaryWrapper savingsAccountTransactionSummaryWrapper, - final SavingsAccountTransactionDataSummaryWrapper savingsAccountTransactionDataSummaryWrapper, - final ClientRepositoryWrapper clientRepository, final GroupRepositoryWrapper groupRepository, - final StaffRepositoryWrapper staffRepository, final SavingsProductRepository savingProductRepository, - final SavingsAccountRepositoryWrapper savingsAccountRepository, - final SavingsAccountChargeAssembler savingsAccountChargeAssembler, final FromJsonHelper fromApiJsonHelper, - final AccountTransfersReadPlatformService accountTransfersReadPlatformService, final JdbcTemplate jdbcTemplate, - final ConfigurationDomainService configurationDomainService, ExternalIdFactory externalIdFactory) { + final SavingsAccountTransactionDataSummaryWrapper savingsAccountTransactionDataSummaryWrapper, + final ClientRepositoryWrapper clientRepository, final GroupRepositoryWrapper groupRepository, + final StaffRepositoryWrapper staffRepository, final SavingsProductRepository savingProductRepository, + final SavingsAccountRepositoryWrapper savingsAccountRepository, + final SavingsAccountChargeAssembler savingsAccountChargeAssembler, final FromJsonHelper fromApiJsonHelper, + final AccountTransfersReadPlatformService accountTransfersReadPlatformService, final JdbcTemplate jdbcTemplate, + final ConfigurationDomainService configurationDomainService, ExternalIdFactory externalIdFactory) { this.savingsAccountTransactionSummaryWrapper = savingsAccountTransactionSummaryWrapper; this.savingsAccountTransactionDataSummaryWrapper = savingsAccountTransactionDataSummaryWrapper; this.clientRepository = clientRepository; @@ -429,7 +431,7 @@ public void setHelpers(final SavingsAccount account) { * chosen {@link SavingsProduct}. */ public SavingsAccount assembleFrom(final Client client, final Group group, final Long productId, final LocalDate appliedonDate, - final AppUser appliedBy) { + final AppUser appliedBy) { AccountType accountType = AccountType.INVALID; if (client != null) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountDomainServiceJpa.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountDomainServiceJpa.java index efc877587eb..c68605bb717 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountDomainServiceJpa.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccountDomainServiceJpa.java @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import java.util.Map; import java.util.Set; import java.util.UUID; + import org.apache.fineract.accounting.journalentry.service.JournalEntryWritePlatformService; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -63,12 +64,12 @@ public class SavingsAccountDomainServiceJpa implements SavingsAccountDomainServi @Autowired public SavingsAccountDomainServiceJpa(final SavingsAccountRepositoryWrapper savingsAccountRepository, - final SavingsAccountTransactionRepository savingsAccountTransactionRepository, - final ApplicationCurrencyRepositoryWrapper applicationCurrencyRepositoryWrapper, - final JournalEntryWritePlatformService journalEntryWritePlatformService, - final ConfigurationDomainService configurationDomainService, final PlatformSecurityContext context, - final DepositAccountOnHoldTransactionRepository depositAccountOnHoldTransactionRepository, - final BusinessEventNotifierService businessEventNotifierService) { + final SavingsAccountTransactionRepository savingsAccountTransactionRepository, + final ApplicationCurrencyRepositoryWrapper applicationCurrencyRepositoryWrapper, + final JournalEntryWritePlatformService journalEntryWritePlatformService, + final ConfigurationDomainService configurationDomainService, final PlatformSecurityContext context, + final DepositAccountOnHoldTransactionRepository depositAccountOnHoldTransactionRepository, + final BusinessEventNotifierService businessEventNotifierService) { this.savingsAccountRepository = savingsAccountRepository; this.savingsAccountTransactionRepository = savingsAccountTransactionRepository; this.applicationCurrencyRepositoryWrapper = applicationCurrencyRepositoryWrapper; @@ -82,8 +83,8 @@ public SavingsAccountDomainServiceJpa(final SavingsAccountRepositoryWrapper savi @Transactional @Override public SavingsAccountTransaction handleWithdrawal(final SavingsAccount account, final DateTimeFormatter fmt, - final LocalDate transactionDate, final BigDecimal transactionAmount, final PaymentDetail paymentDetail, - final SavingsTransactionBooleanValues transactionBooleanValues, final boolean backdatedTxnsAllowedTill) { + final LocalDate transactionDate, final BigDecimal transactionAmount, final PaymentDetail paymentDetail, + final SavingsTransactionBooleanValues transactionBooleanValues, final boolean backdatedTxnsAllowedTill) { context.authenticatedUser(); account.validateForAccountBlock(); account.validateForDebitBlock(); @@ -154,17 +155,17 @@ public SavingsAccountTransaction handleWithdrawal(final SavingsAccount account, @Transactional @Override public SavingsAccountTransaction handleDeposit(final SavingsAccount account, final DateTimeFormatter fmt, - final LocalDate transactionDate, final BigDecimal transactionAmount, final PaymentDetail paymentDetail, - final boolean isAccountTransfer, final boolean isRegularTransaction, final boolean backdatedTxnsAllowedTill) { + final LocalDate transactionDate, final BigDecimal transactionAmount, final PaymentDetail paymentDetail, + final boolean isAccountTransfer, final boolean isRegularTransaction, final boolean backdatedTxnsAllowedTill) { final SavingsAccountTransactionType savingsAccountTransactionType = SavingsAccountTransactionType.DEPOSIT; return handleDeposit(account, fmt, transactionDate, transactionAmount, paymentDetail, isAccountTransfer, isRegularTransaction, savingsAccountTransactionType, backdatedTxnsAllowedTill); } private SavingsAccountTransaction handleDeposit(final SavingsAccount account, final DateTimeFormatter fmt, - final LocalDate transactionDate, final BigDecimal transactionAmount, final PaymentDetail paymentDetail, - final boolean isAccountTransfer, final boolean isRegularTransaction, - final SavingsAccountTransactionType savingsAccountTransactionType, final boolean backdatedTxnsAllowedTill) { + final LocalDate transactionDate, final BigDecimal transactionAmount, final PaymentDetail paymentDetail, + final boolean isAccountTransfer, final boolean isRegularTransaction, + final SavingsAccountTransactionType savingsAccountTransactionType, final boolean backdatedTxnsAllowedTill) { context.authenticatedUser(); account.validateForAccountBlock(); account.validateForCreditBlock(); @@ -223,14 +224,14 @@ private SavingsAccountTransaction handleDeposit(final SavingsAccount account, fi @Transactional @Override public SavingsAccountTransaction handleHold(final SavingsAccount account, BigDecimal amount, LocalDate transactionDate, - Boolean lienAllowed) { + Boolean lienAllowed) { return SavingsAccountTransaction.holdAmount(account, account.office(), null, transactionDate, Money.of(account.getCurrency(), amount), lienAllowed); } @Override public SavingsAccountTransaction handleDividendPayout(final SavingsAccount account, final LocalDate transactionDate, - final BigDecimal transactionAmount, final boolean backdatedTxnsAllowedTill) { + final BigDecimal transactionAmount, final boolean backdatedTxnsAllowedTill) { final DateTimeFormatter fmt = null; final PaymentDetail paymentDetail = null; final boolean isAccountTransfer = false; @@ -241,7 +242,7 @@ public SavingsAccountTransaction handleDividendPayout(final SavingsAccount accou } private void updateExistingTransactionsDetails(SavingsAccount account, Set existingTransactionIds, - Set existingReversedTransactionIds) { + Set existingReversedTransactionIds) { existingTransactionIds.addAll(account.findExistingTransactionIds()); existingReversedTransactionIds.addAll(account.findExistingReversedTransactionIds()); } @@ -256,13 +257,13 @@ private void saveUpdatedTransactionsOfSavingsAccount(final List existingTransactionIds, - Set existingReversedTransactionIds) { + Set existingReversedTransactionIds) { existingTransactionIds.addAll(account.findCurrentTransactionIdsWithPivotDateConfig()); existingReversedTransactionIds.addAll(account.findCurrentReversedTransactionIdsWithPivotDateConfig()); } private void postJournalEntries(final SavingsAccount savingsAccount, final Set existingTransactionIds, - final Set existingReversedTransactionIds, boolean isAccountTransfer, final boolean backdatedTxnsAllowedTill) { + final Set existingReversedTransactionIds, boolean isAccountTransfer, final boolean backdatedTxnsAllowedTill) { final Map accountingBridgeData = savingsAccount.deriveAccountingBridgeData(savingsAccount.getCurrency().getCode(), existingTransactionIds, existingReversedTransactionIds, isAccountTransfer, backdatedTxnsAllowedTill); @@ -272,7 +273,7 @@ private void postJournalEntries(final SavingsAccount savingsAccount, final Set existingTransactionIds, - final Set existingReversedTransactionIds, final boolean backdatedTxnsAllowedTill) { + final Set existingReversedTransactionIds, final boolean backdatedTxnsAllowedTill) { final boolean isAccountTransfer = false; postJournalEntries(account, existingTransactionIds, existingReversedTransactionIds, isAccountTransfer, backdatedTxnsAllowedTill); @@ -280,7 +281,7 @@ public void postJournalEntries(final SavingsAccount account, final Set exi @Override public SavingsAccountTransaction handleReversal(SavingsAccount account, List savingsAccountTransactions, - boolean backdatedTxnsAllowedTill) { + boolean backdatedTxnsAllowedTill) { final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService .isSavingsInterestPostingAtCurrentPeriodEnd(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ActivateFixedDepositAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ActivateFixedDepositAccountCommandHandler.java index 437ad81092b..2c3e6cca9cc 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ActivateFixedDepositAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ActivateFixedDepositAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ActivateRecurringDepositAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ActivateRecurringDepositAccountCommandHandler.java index bab80747c5f..396af86708a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ActivateRecurringDepositAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ActivateRecurringDepositAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ActivateSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ActivateSavingsAccountCommandHandler.java index a7b9ba296de..6a33d835772 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ActivateSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ActivateSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/AddSavingsAccountChargeCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/AddSavingsAccountChargeCommandHandler.java index 6e4b3f9c5da..b3c259212ae 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/AddSavingsAccountChargeCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/AddSavingsAccountChargeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ApplyAnnualFeeSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ApplyAnnualFeeSavingsAccountCommandHandler.java index a73e4458551..b83cf2e1ce7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ApplyAnnualFeeSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ApplyAnnualFeeSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/BlockCreditsToSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/BlockCreditsToSavingsAccountCommandHandler.java index 7f623b4605e..536451286a8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/BlockCreditsToSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/BlockCreditsToSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/BlockDebitsFromSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/BlockDebitsFromSavingsAccountCommandHandler.java index 53cb80f70ec..96b3024845d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/BlockDebitsFromSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/BlockDebitsFromSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/BlockSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/BlockSavingsAccountCommandHandler.java index d2dec001237..c22f91e956b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/BlockSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/BlockSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CalculateInterestFixedDepositAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CalculateInterestFixedDepositAccountCommandHandler.java index 81215b74cfe..dd8c3a89b5a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CalculateInterestFixedDepositAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CalculateInterestFixedDepositAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CalculateInterestRecurringDepositAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CalculateInterestRecurringDepositAccountCommandHandler.java index 199df549e54..c0166f3fd4b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CalculateInterestRecurringDepositAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CalculateInterestRecurringDepositAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CalculateInterestSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CalculateInterestSavingsAccountCommandHandler.java index b057985426f..4689e04e4d4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CalculateInterestSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CalculateInterestSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CloseFixedDepositAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CloseFixedDepositAccountCommandHandler.java index 8b105b5a8cb..aa9a4fc1ff7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CloseFixedDepositAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CloseFixedDepositAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CloseGSIMCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CloseGSIMCommandHandler.java index 7e70c9ab943..0769e553694 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CloseGSIMCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CloseGSIMCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CloseRecurringDepositAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CloseRecurringDepositAccountCommandHandler.java index c259d849973..daaadc1dc83 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CloseRecurringDepositAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CloseRecurringDepositAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CloseSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CloseSavingsAccountCommandHandler.java index 6005147bde3..c65c0c602b6 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CloseSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CloseSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CreateFixedDepositProductCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CreateFixedDepositProductCommandHandler.java index 5d2a5886daf..c0b31e379ab 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CreateFixedDepositProductCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CreateFixedDepositProductCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CreateRecurringDepositProductCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CreateRecurringDepositProductCommandHandler.java index db60e07d21b..92fe2b79190 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CreateRecurringDepositProductCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CreateRecurringDepositProductCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CreateSavingsProductCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CreateSavingsProductCommandHandler.java index 8ba4dfe3b7a..fc55f6fd762 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CreateSavingsProductCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/CreateSavingsProductCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DeleteFixedDepositProductCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DeleteFixedDepositProductCommandHandler.java index 50594ecad49..b0c408be42e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DeleteFixedDepositProductCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DeleteFixedDepositProductCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DeleteRecurringDepositProductCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DeleteRecurringDepositProductCommandHandler.java index b4d277c2a8b..c0a1c4c158a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DeleteRecurringDepositProductCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DeleteRecurringDepositProductCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DeleteSavingsAccountChargeCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DeleteSavingsAccountChargeCommandHandler.java index af5941e783c..24d21cba1a8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DeleteSavingsAccountChargeCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DeleteSavingsAccountChargeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DeleteSavingsProductCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DeleteSavingsProductCommandHandler.java index 113cb2a9330..c2183322cc5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DeleteSavingsProductCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DeleteSavingsProductCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DepositSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DepositSavingsAccountCommandHandler.java index e3f3aa304d3..9b02e288562 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DepositSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/DepositSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationApprovalCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationApprovalCommandHandler.java index 90bac20d208..cc8bd2d85cf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationApprovalCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationApprovalCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationApprovalUndoCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationApprovalUndoCommandHandler.java index 3ed356e5fed..baff59ec4be 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationApprovalUndoCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationApprovalUndoCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationDeletionCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationDeletionCommandHandler.java index 078d95afb2d..747116565df 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationDeletionCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationDeletionCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationModificationCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationModificationCommandHandler.java index 9bfe88cafd1..1a8a9f56020 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationModificationCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationModificationCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationRejectedCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationRejectedCommandHandler.java index d6917c4862f..8536bc81e4d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationRejectedCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationRejectedCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationSubmittalCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationSubmittalCommandHandler.java index a9be193b73d..a89dfb77355 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationSubmittalCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationSubmittalCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationWithdrawnByApplicantCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationWithdrawnByApplicantCommandHandler.java index 0555d88fa84..79ae0daa872 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationWithdrawnByApplicantCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountApplicationWithdrawnByApplicantCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountDepositCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountDepositCommandHandler.java index 0fc699a3429..bc7f4593d78 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountDepositCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositAccountDepositCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositTransactionAdjustmentCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositTransactionAdjustmentCommandHandler.java index ecfce220720..b8e6bcfab42 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositTransactionAdjustmentCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/FixedDepositTransactionAdjustmentCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ForceWithdrawalSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ForceWithdrawalSavingsAccountCommandHandler.java index c0c96a38b89..18959222f2f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ForceWithdrawalSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ForceWithdrawalSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMAccountActivationCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMAccountActivationCommandHandler.java index d7e9bb3bfbe..09171aed68e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMAccountActivationCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMAccountActivationCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMApplicationApprovalCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMApplicationApprovalCommandHandler.java index 0efbd8d0db1..37461ca3edd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMApplicationApprovalCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMApplicationApprovalCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMApplicationModificationCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMApplicationModificationCommandHandler.java index 5ebc45a7c41..9f190d6f311 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMApplicationModificationCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMApplicationModificationCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMApplicationRejectionHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMApplicationRejectionHandler.java index c84ce1a5c9b..3b90dc8289a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMApplicationRejectionHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMApplicationRejectionHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMApplicationSubmittalCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMApplicationSubmittalCommandHandler.java index 9a653130bc4..7bfa2b8a241 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMApplicationSubmittalCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMApplicationSubmittalCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMDepositCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMDepositCommandHandler.java index b2bc49479bf..932258e9f7a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMDepositCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMDepositCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMUndoApprovalCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMUndoApprovalCommandHandler.java index 1a62fd439f5..d986ead94f5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMUndoApprovalCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/GSIMUndoApprovalCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/HoldAmountSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/HoldAmountSavingsAccountCommandHandler.java index c2291eb798f..0872bb0bb85 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/HoldAmountSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/HoldAmountSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/InactivateSavingsAccountChargeCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/InactivateSavingsAccountChargeCommandHandler.java index bd9fc9d30b1..8d56010759e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/InactivateSavingsAccountChargeCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/InactivateSavingsAccountChargeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PaySavingsAccountChargeCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PaySavingsAccountChargeCommandHandler.java index e0e28091d79..af7a74b7024 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PaySavingsAccountChargeCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PaySavingsAccountChargeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PostInterestFixedDepositAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PostInterestFixedDepositAccountCommandHandler.java index 507470f3351..cb28c2a5bd7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PostInterestFixedDepositAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PostInterestFixedDepositAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PostInterestRecurringDepositAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PostInterestRecurringDepositAccountCommandHandler.java index 3822733db07..8bbef0c0d5d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PostInterestRecurringDepositAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PostInterestRecurringDepositAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PostInterestSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PostInterestSavingsAccountCommandHandler.java index 434c7d54141..5c5f59f8093 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PostInterestSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PostInterestSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PostSavingsAccountInterestAsOnDateCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PostSavingsAccountInterestAsOnDateCommandHandler.java index c74a2450b1a..5377410b5fe 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PostSavingsAccountInterestAsOnDateCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PostSavingsAccountInterestAsOnDateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PrematureCloseFixedDepositAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PrematureCloseFixedDepositAccountCommandHandler.java index cb509a3a7c9..a25c44db710 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PrematureCloseFixedDepositAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PrematureCloseFixedDepositAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PrematureCloseRecurringDepositAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PrematureCloseRecurringDepositAccountCommandHandler.java index 15044fe43b3..a6988a91911 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PrematureCloseRecurringDepositAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/PrematureCloseRecurringDepositAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationApprovalCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationApprovalCommandHandler.java index 1d96193d04e..a646c71e3a1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationApprovalCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationApprovalCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationApprovalUndoCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationApprovalUndoCommandHandler.java index 44df9527d31..336a570b9f1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationApprovalUndoCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationApprovalUndoCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationDeletionCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationDeletionCommandHandler.java index e40de701f42..a9f847178f9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationDeletionCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationDeletionCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationModificationCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationModificationCommandHandler.java index 24ffc2559d7..9485aa8c877 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationModificationCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationModificationCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationRejectedCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationRejectedCommandHandler.java index 4bdfa3c3d88..7115958fc62 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationRejectedCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationRejectedCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationSubmittalCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationSubmittalCommandHandler.java index b3b19e64000..863ecf0f5cf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationSubmittalCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationSubmittalCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationWithdrawnByApplicantCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationWithdrawnByApplicantCommandHandler.java index fa7f701df04..d96d1a46ac5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationWithdrawnByApplicantCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountApplicationWithdrawnByApplicantCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountDepositCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountDepositCommandHandler.java index 8b9cfc9f2c5..911fa1fba41 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountDepositCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountDepositCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountUpdateDepositAmountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountUpdateDepositAmountCommandHandler.java index b7155f14865..c065ab96e64 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountUpdateDepositAmountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositAccountUpdateDepositAmountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositTransactionAdjustmentCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositTransactionAdjustmentCommandHandler.java index a97ac080315..4e34441cbf8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositTransactionAdjustmentCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RecurringDepositTransactionAdjustmentCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ReleaseAmountSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ReleaseAmountSavingsAccountCommandHandler.java index 876f9776adc..03bf1433b26 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ReleaseAmountSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ReleaseAmountSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RemoveSavingsOfficerCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RemoveSavingsOfficerCommandHandler.java index 7301ac7247b..af4ea1dcc85 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RemoveSavingsOfficerCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/RemoveSavingsOfficerCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ReverseTransactionSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ReverseTransactionSavingsAccountCommandHandler.java index ec09d980426..00320d3131c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ReverseTransactionSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/ReverseTransactionSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationApprovalCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationApprovalCommandHandler.java index 6e8db21fc60..8b7fec59ed4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationApprovalCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationApprovalCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationApprovalUndoCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationApprovalUndoCommandHandler.java index c638938c38b..3ccbae5d5b7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationApprovalUndoCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationApprovalUndoCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationDeletionCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationDeletionCommandHandler.java index 47bbf1bdafe..732566eb750 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationDeletionCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationDeletionCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationModificationCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationModificationCommandHandler.java index 3ac279bf401..33f271ed9d7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationModificationCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationModificationCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationRejectedCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationRejectedCommandHandler.java index 353cd72c0f2..2d79a1ed4a2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationRejectedCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationRejectedCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationSubmittalCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationSubmittalCommandHandler.java index 846deddea80..74437847b6e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationSubmittalCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationSubmittalCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationWithdrawnByApplicantCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationWithdrawnByApplicantCommandHandler.java index 9c165f0a93f..5596581373e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationWithdrawnByApplicantCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsAccountApplicationWithdrawnByApplicantCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsTransactionAdjustmentCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsTransactionAdjustmentCommandHandler.java index 5bc8ab4006c..0bc1b47307c 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsTransactionAdjustmentCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/SavingsTransactionAdjustmentCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UnblockCreditsToSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UnblockCreditsToSavingsAccountCommandHandler.java index 0985cc54af1..4326bc45d5f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UnblockCreditsToSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UnblockCreditsToSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UnblockDebitsFromSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UnblockDebitsFromSavingsAccountCommandHandler.java index 8f7b0fc9c93..131f75f2004 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UnblockDebitsFromSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UnblockDebitsFromSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UnblockSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UnblockSavingsAccountCommandHandler.java index 7db7496a698..e7bd3c10f8b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UnblockSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UnblockSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UndoTransactionFixedDepositAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UndoTransactionFixedDepositAccountCommandHandler.java index 76f3b6a0708..adce5bb4bec 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UndoTransactionFixedDepositAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UndoTransactionFixedDepositAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UndoTransactionRecurringDepositAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UndoTransactionRecurringDepositAccountCommandHandler.java index 76e054c82e5..45ef446bcf8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UndoTransactionRecurringDepositAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UndoTransactionRecurringDepositAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UndoTransactionSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UndoTransactionSavingsAccountCommandHandler.java index 084cbac32bd..92c542466ac 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UndoTransactionSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UndoTransactionSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateFixedDepositProductCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateFixedDepositProductCommandHandler.java index b7be725acca..83893b7c8a1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateFixedDepositProductCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateFixedDepositProductCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateRecurringDepositProductCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateRecurringDepositProductCommandHandler.java index 826a8627c3c..34d4bee59bd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateRecurringDepositProductCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateRecurringDepositProductCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateSavingsAccountChargeCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateSavingsAccountChargeCommandHandler.java index 5c43d709a36..be679d667b5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateSavingsAccountChargeCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateSavingsAccountChargeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateSavingsOfficerCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateSavingsOfficerCommandHandler.java index fe0a636b3a6..c6f93a8dedb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateSavingsOfficerCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateSavingsOfficerCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateSavingsProductCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateSavingsProductCommandHandler.java index a7cffd38d10..fa8300f2844 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateSavingsProductCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateSavingsProductCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateWithHoldTaxSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateWithHoldTaxSavingsAccountCommandHandler.java index e8e1e6b053f..b0fc98270ce 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateWithHoldTaxSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/UpdateWithHoldTaxSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/WaiveSavingsAccountChargeCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/WaiveSavingsAccountChargeCommandHandler.java index e361ac77dde..56e8ee75871 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/WaiveSavingsAccountChargeCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/WaiveSavingsAccountChargeCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/WithdrawSavingsAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/WithdrawSavingsAccountCommandHandler.java index cba0c1f23e8..e8de95fe891 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/WithdrawSavingsAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/WithdrawSavingsAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/WithdrawalFixedDepositAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/WithdrawalFixedDepositAccountCommandHandler.java index 1de31254499..d20577ba992 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/WithdrawalFixedDepositAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/WithdrawalFixedDepositAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/WithdrawalRecurringDepositAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/WithdrawalRecurringDepositAccountCommandHandler.java index d904035b82e..3342023be00 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/WithdrawalRecurringDepositAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/handler/WithdrawalRecurringDepositAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/addaccrualtransactionforsavings/AddAccrualTransactionForSavingsConfig.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/addaccrualtransactionforsavings/AddAccrualTransactionForSavingsConfig.java index b9b61ccea86..3132c616d92 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/addaccrualtransactionforsavings/AddAccrualTransactionForSavingsConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/addaccrualtransactionforsavings/AddAccrualTransactionForSavingsConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/addaccrualtransactionforsavings/AddAccrualTransactionForSavingsTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/addaccrualtransactionforsavings/AddAccrualTransactionForSavingsTasklet.java index 5638221996b..066623b63af 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/addaccrualtransactionforsavings/AddAccrualTransactionForSavingsTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/addaccrualtransactionforsavings/AddAccrualTransactionForSavingsTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.savings.jobs.addaccrualtransactionforsavings; import java.time.LocalDate; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.exception.MultiException; import org.apache.fineract.infrastructure.core.service.DateUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/applyannualfeeforsavings/ApplyAnnualFeeForSavingsConfig.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/applyannualfeeforsavings/ApplyAnnualFeeForSavingsConfig.java index f2170bcba51..d4100b64e41 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/applyannualfeeforsavings/ApplyAnnualFeeForSavingsConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/applyannualfeeforsavings/ApplyAnnualFeeForSavingsConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/applyannualfeeforsavings/ApplyAnnualFeeForSavingsTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/applyannualfeeforsavings/ApplyAnnualFeeForSavingsTasklet.java index eb929d523ac..8fefadfd9c2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/applyannualfeeforsavings/ApplyAnnualFeeForSavingsTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/applyannualfeeforsavings/ApplyAnnualFeeForSavingsTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.data.ApiParameterError; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/generateadhocclientschhedule/GenerateAdhocClientScheduleConfig.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/generateadhocclientschhedule/GenerateAdhocClientScheduleConfig.java index f49661a690d..d22fc8e49f5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/generateadhocclientschhedule/GenerateAdhocClientScheduleConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/generateadhocclientschhedule/GenerateAdhocClientScheduleConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/generateadhocclientschhedule/GenerateAdhocClientScheduleTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/generateadhocclientschhedule/GenerateAdhocClientScheduleTasklet.java index e5c71132469..a1ddea0c50f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/generateadhocclientschhedule/GenerateAdhocClientScheduleTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/generateadhocclientschhedule/GenerateAdhocClientScheduleTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.temporal.ChronoUnit; import java.util.Collection; import java.util.Date; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.adhocquery.data.AdHocData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/generaterdschedule/GenerateRdScheduleConfig.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/generaterdschedule/GenerateRdScheduleConfig.java index 64cc452ce31..c9d15e3f6af 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/generaterdschedule/GenerateRdScheduleConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/generaterdschedule/GenerateRdScheduleConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/generaterdschedule/GenerateRdScheduleTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/generaterdschedule/GenerateRdScheduleTasklet.java index e49ffe3ce5e..c12d17407eb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/generaterdschedule/GenerateRdScheduleTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/generaterdschedule/GenerateRdScheduleTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -30,6 +30,7 @@ import java.util.Collection; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -76,8 +77,8 @@ public RepeatStatus execute(StepContribution contribution, ChunkContext chunkCon installmentNumber++; lastDepositDate = DepositAccountUtils.calculateNextDepositDate(lastDepositDate, recurrence); OffsetDateTime auditTime = DateUtils.getAuditOffsetDateTime(); - params.add(new Object[] { savingsId, lastDepositDate, installmentNumber, amount, false, auditTime, userId, auditTime, - userId }); + params.add(new Object[]{savingsId, lastDepositDate, installmentNumber, amount, false, auditTime, userId, auditTime, + userId}); iterations++; } if (iterations > 200) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/payduesavingscharges/PayDueSavingsChargesConfig.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/payduesavingscharges/PayDueSavingsChargesConfig.java index 8da16a36593..82408393137 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/payduesavingscharges/PayDueSavingsChargesConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/payduesavingscharges/PayDueSavingsChargesConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/payduesavingscharges/PayDueSavingsChargesTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/payduesavingscharges/PayDueSavingsChargesTasklet.java index 0fb54dbaeab..788b01b7ca8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/payduesavingscharges/PayDueSavingsChargesTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/payduesavingscharges/PayDueSavingsChargesTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.data.ApiParameterError; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/postinterestforsavings/PostInterestForSavingConfig.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/postinterestforsavings/PostInterestForSavingConfig.java index b82dd2397b3..8217a03b3e6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/postinterestforsavings/PostInterestForSavingConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/postinterestforsavings/PostInterestForSavingConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/postinterestforsavings/PostInterestForSavingTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/postinterestforsavings/PostInterestForSavingTasklet.java index e579456ec3c..f9da464c0e3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/postinterestforsavings/PostInterestForSavingTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/postinterestforsavings/PostInterestForSavingTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; @@ -97,7 +98,7 @@ public RepeatStatus execute(StepContribution contribution, ChunkContext chunkCon } private void postInterest(List savingsAccounts, int threadPoolSize, final boolean backdatedTxnsAllowedTill, - final int pageSize, Long maxSavingsIdInList, Queue> queue) { + final int pageSize, Long maxSavingsIdInList, Queue> queue) { List> posters = new ArrayList<>(); int fromIndex = 0; int size = savingsAccounts.size(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/transferinteresttosavings/TransferInterestToSavingsConfig.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/transferinteresttosavings/TransferInterestToSavingsConfig.java index 255b4912deb..a5108f27ccf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/transferinteresttosavings/TransferInterestToSavingsConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/transferinteresttosavings/TransferInterestToSavingsConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/transferinteresttosavings/TransferInterestToSavingsTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/transferinteresttosavings/TransferInterestToSavingsTasklet.java index 0632438c1e2..1436f70fca2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/transferinteresttosavings/TransferInterestToSavingsTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/transferinteresttosavings/TransferInterestToSavingsTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/updatedepositsaccountmaturitydetails/UpdateDepositsAccountMaturityDetailsConfig.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/updatedepositsaccountmaturitydetails/UpdateDepositsAccountMaturityDetailsConfig.java index 0a02bfc7705..591eae96063 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/updatedepositsaccountmaturitydetails/UpdateDepositsAccountMaturityDetailsConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/updatedepositsaccountmaturitydetails/UpdateDepositsAccountMaturityDetailsConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/updatedepositsaccountmaturitydetails/UpdateDepositsAccountMaturityDetailsTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/updatedepositsaccountmaturitydetails/UpdateDepositsAccountMaturityDetailsTasklet.java index 5f956586a40..bfad1a7af60 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/updatedepositsaccountmaturitydetails/UpdateDepositsAccountMaturityDetailsTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/updatedepositsaccountmaturitydetails/UpdateDepositsAccountMaturityDetailsTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.data.ApiParameterError; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/updatesavingsdormantaccounts/UpdateSavingsDormantAccountsConfig.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/updatesavingsdormantaccounts/UpdateSavingsDormantAccountsConfig.java index 87222732432..1cb0c6e0d8f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/updatesavingsdormantaccounts/UpdateSavingsDormantAccountsConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/updatesavingsdormantaccounts/UpdateSavingsDormantAccountsConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/updatesavingsdormantaccounts/UpdateSavingsDormantAccountsTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/updatesavingsdormantaccounts/UpdateSavingsDormantAccountsTasklet.java index 29c751cd613..de883081424 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/updatesavingsdormantaccounts/UpdateSavingsDormantAccountsTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/jobs/updatesavingsdormantaccounts/UpdateSavingsDormantAccountsTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.service.DateUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformServiceImpl.java index 82821e47983..d37a1bf63e8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountInterestRateChartReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -26,6 +26,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.codes.data.CodeValueData; import org.apache.fineract.infrastructure.codes.service.CodeValueReadPlatformService; @@ -68,7 +69,7 @@ public DepositAccountInterestRateChartData retrieveOne(Long chartId) { try { this.context.authenticatedUser(); final String sql = "select " + CHART_ROW_MAPPER.schema() + " where irc.id = ? "; - return this.jdbcTemplate.queryForObject(sql, CHART_ROW_MAPPER, new Object[] { chartId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, CHART_ROW_MAPPER, new Object[]{chartId}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new DepositAccountInterestRateChartNotFoundException(chartId, e); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountOnHoldTransactionReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountOnHoldTransactionReadPlatformServiceImpl.java index 57090513b33..2aea4c29199 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountOnHoldTransactionReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountOnHoldTransactionReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; @@ -47,7 +48,7 @@ public class DepositAccountOnHoldTransactionReadPlatformServiceImpl implements D @Override public Page retriveAll(Long savingsId, Long guarantorFundingId, - SearchParameters searchParameters) { + SearchParameters searchParameters) { final StringBuilder sqlBuilder = new StringBuilder(200); List paramObj = new ArrayList<>(2); sqlBuilder.append("select " + sqlGenerator.calcFoundRows() + " "); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountPreMatureCalculationPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountPreMatureCalculationPlatformServiceImpl.java index 596e094f267..c5577ba930e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountPreMatureCalculationPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountPreMatureCalculationPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,8 +21,10 @@ import static org.apache.fineract.portfolio.savings.DepositsApiConstants.closedOnDateParamName; import com.google.gson.JsonElement; + import java.time.LocalDate; import java.util.Collection; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; import org.apache.fineract.infrastructure.core.api.JsonQuery; @@ -56,7 +58,7 @@ public class DepositAccountPreMatureCalculationPlatformServiceImpl implements De @Transactional @Override public DepositAccountData calculatePreMatureAmount(final Long accountId, final JsonQuery query, - final DepositAccountType depositAccountType) { + final DepositAccountType depositAccountType) { final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService .isSavingsInterestPostingAtCurrentPeriodEnd(); @@ -67,8 +69,8 @@ public DepositAccountData calculatePreMatureAmount(final Long accountId, final J DepositAccountData accountData = null; Collection onAccountClosureOptions = SavingsEnumerations - .depositAccountOnClosureType(new DepositAccountOnClosureType[] { DepositAccountOnClosureType.WITHDRAW_DEPOSIT, - DepositAccountOnClosureType.TRANSFER_TO_SAVINGS }); + .depositAccountOnClosureType(new DepositAccountOnClosureType[]{DepositAccountOnClosureType.WITHDRAW_DEPOSIT, + DepositAccountOnClosureType.TRANSFER_TO_SAVINGS}); final Collection paymentTypeOptions = this.paymentTypeReadPlatformService.retrieveAllPaymentTypes(); final Collection savingsAccountDatas = this.savingsAccountReadPlatformService .retrieveActiveForLookup(account.clientId(), DepositAccountType.SAVINGS_DEPOSIT); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountReadPlatformService.java index 38ad1239449..34658d2a759 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositAccountReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.Map; + import org.apache.fineract.infrastructure.core.data.PaginationParameters; import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.portfolio.account.data.AccountTransferDTO; @@ -44,7 +45,7 @@ public interface DepositAccountReadPlatformService { Collection retrieveAllTransactions(DepositAccountType depositAccountType, Long accountId); DepositAccountData retrieveTemplate(DepositAccountType depositAccountType, Long clientId, Long groupId, Long productId, - boolean staffInSelectedOfficeOnly); + boolean staffInSelectedOfficeOnly); Collection retrieveForMaturityUpdate(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl.java index 2964f96e468..3772794925e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import static org.apache.fineract.portfolio.savings.DepositsApiConstants.transferInterestToSavingsParamName; import jakarta.persistence.PersistenceException; + import java.math.MathContext; import java.time.LocalDate; import java.time.temporal.ChronoField; @@ -32,6 +33,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -136,16 +138,16 @@ private void handleDataIntegrityIssues(final JsonCommand command, final Throwabl msgCode += ".duplicate.accountNo"; msg = "Savings account with accountNo " + accountNo + " already exists"; param = "accountNo"; - msgArgs = new Object[] { accountNo, dve }; + msgArgs = new Object[]{accountNo, dve}; } else if (checkEx.getMessage().contains("sa_external_id_UNIQUE")) { final String externalId = command.stringValueOfParameterNamed("externalId"); msgCode += ".duplicate.externalId"; msg = "Savings account with externalId " + externalId + " already exists"; param = "externalId"; - msgArgs = new Object[] { externalId, dve }; + msgArgs = new Object[]{externalId, dve}; } else { msgCode += ".unknown.data.integrity.issue"; - msgArgs = new Object[] { dve }; + msgArgs = new Object[]{dve}; } log.error("Error occured.", dve); throw ErrorHandler.getMappable(dve, msgCode, msg, param, msgArgs); @@ -591,7 +593,7 @@ public CommandProcessingResult deleteApplication(final Long savingsId, final Dep @Transactional @Override public CommandProcessingResult approveApplication(final Long savingsId, final JsonCommand command, - final DepositAccountType depositAccountType) { + final DepositAccountType depositAccountType) { final AppUser currentUser = this.context.authenticatedUser(); @@ -626,7 +628,7 @@ public CommandProcessingResult approveApplication(final Long savingsId, final Js @Transactional @Override public CommandProcessingResult undoApplicationApproval(final Long savingsId, final JsonCommand command, - final DepositAccountType depositAccountType) { + final DepositAccountType depositAccountType) { this.context.authenticatedUser(); @@ -661,7 +663,7 @@ public CommandProcessingResult undoApplicationApproval(final Long savingsId, fin @Transactional @Override public CommandProcessingResult rejectApplication(final Long savingsId, final JsonCommand command, - final DepositAccountType depositAccountType) { + final DepositAccountType depositAccountType) { final AppUser currentUser = this.context.authenticatedUser(); @@ -696,7 +698,7 @@ public CommandProcessingResult rejectApplication(final Long savingsId, final Jso @Transactional @Override public CommandProcessingResult applicantWithdrawsFromApplication(final Long savingsId, final JsonCommand command, - final DepositAccountType depositAccountType) { + final DepositAccountType depositAccountType) { final AppUser currentUser = this.context.authenticatedUser(); this.savingsAccountApplicationTransitionApiJsonValidator.validateApplicantWithdrawal(command.json()); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositProductReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositProductReadPlatformServiceImpl.java index 9b8319d9a16..3bdd4fb0a31 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositProductReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositProductReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.common.AccountingEnumerations; import org.apache.fineract.infrastructure.core.data.EnumOptionData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositsDropdownReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositsDropdownReadPlatformServiceImpl.java index 1e0211b2dca..f678695753d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositsDropdownReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/DepositsDropdownReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.Collection; + import lombok.NoArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.savings.DepositAccountOnClosureType; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositAccountInterestCalculationService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositAccountInterestCalculationService.java index 5bfd07ab86d..4c812bfd671 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositAccountInterestCalculationService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositAccountInterestCalculationService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ package org.apache.fineract.portfolio.savings.service; import java.util.HashMap; + import org.apache.fineract.infrastructure.core.api.JsonQuery; public interface FixedDepositAccountInterestCalculationService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositAccountInterestCalculationServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositAccountInterestCalculationServiceImpl.java index 56c786224bb..f6ddaaf73c2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositAccountInterestCalculationServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositAccountInterestCalculationServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,9 +25,11 @@ import static org.apache.fineract.portfolio.savings.DepositsApiConstants.tenureInMonthsParamName; import com.google.gson.JsonElement; + import java.math.BigDecimal; import java.math.MathContext; import java.util.HashMap; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonQuery; import org.apache.fineract.infrastructure.core.serialization.FromJsonHelper; @@ -63,7 +65,7 @@ public HashMap calculateInterest(JsonQuery query) { } public BigDecimal calculateInterestInternal(BigDecimal principalAmount, BigDecimal annualInterestRate, Long tenureInMonths, - Long interestCompoundingPeriodInMonths) { + Long interestCompoundingPeriodInMonths) { BigDecimal numberOfCompoundingsPerAnnum = BigDecimal.valueOf(12).divide(BigDecimal.valueOf(interestCompoundingPeriodInMonths)); Long totalNumberOfCompoundings = tenureInMonths / interestCompoundingPeriodInMonths; MathContext mc = MoneyHelper.getMathContext(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositProductWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositProductWritePlatformServiceJpaRepositoryImpl.java index 463696db5db..d180e9a3890 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositProductWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/FixedDepositProductWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,10 +24,12 @@ import static org.apache.fineract.portfolio.savings.SavingsApiConstants.taxGroupIdParamName; import jakarta.persistence.PersistenceException; + import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; @@ -178,16 +180,16 @@ private void handleDataIntegrityIssues(final JsonCommand command, final Throwabl msgCode += ".duplicate.name"; msg = "Savings product with name `" + name + "` already exists"; param = "name"; - msgArgs = new Object[] { name, dae }; + msgArgs = new Object[]{name, dae}; } else if (checkEx.getMessage().contains("sp_unq_short_name")) { final String shortName = command.stringValueOfParameterNamed("shortName"); msgCode += ".duplicate.short.name"; msg = "Savings product with short name `" + shortName + "` already exists"; param = "shortName"; - msgArgs = new Object[] { shortName, dae }; + msgArgs = new Object[]{shortName, dae}; } else { msgCode += ".unknown.data.integrity.issue"; - msgArgs = new Object[] { dae }; + msgArgs = new Object[]{dae}; } log.error("Error occured.", dae); throw ErrorHandler.getMappable(dae, msgCode, msg, param, msgArgs); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/GroupSavingsIndividualMonitoringWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/GroupSavingsIndividualMonitoringWritePlatformService.java index 3dbe63da1da..123ebc19d66 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/GroupSavingsIndividualMonitoringWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/GroupSavingsIndividualMonitoringWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ package org.apache.fineract.portfolio.savings.service; import java.math.BigDecimal; + import org.apache.fineract.portfolio.group.domain.Group; import org.apache.fineract.portfolio.savings.domain.GroupSavingsIndividualMonitoring; @@ -32,5 +33,5 @@ public interface GroupSavingsIndividualMonitoringWritePlatformService { void incrementChildAccountCount(GroupSavingsIndividualMonitoring gsimAccount); GroupSavingsIndividualMonitoring addGSIMAccountInfo(String accountNumber, Group group, BigDecimal parentDeposit, - Long childAccountsCount, Boolean isAcceptingChild, Integer loanStatus, BigDecimal applicationId); + Long childAccountsCount, Boolean isAcceptingChild, Integer loanStatus, BigDecimal applicationId); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/GroupSavingsIndividualMonitoringWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/GroupSavingsIndividualMonitoringWritePlatformServiceImpl.java index 5be559bc452..719000fa792 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/GroupSavingsIndividualMonitoringWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/GroupSavingsIndividualMonitoringWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.savings.service; import java.math.BigDecimal; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.group.domain.Group; @@ -39,7 +40,7 @@ public class GroupSavingsIndividualMonitoringWritePlatformServiceImpl implements @Override public GroupSavingsIndividualMonitoring addGSIMAccountInfo(String accountNumber, Group group, BigDecimal parentDeposit, - Long childAccountsCount, Boolean isAcceptingChild, Integer loanStatus, BigDecimal applicationId) { + Long childAccountsCount, Boolean isAcceptingChild, Integer loanStatus, BigDecimal applicationId) { GroupSavingsIndividualMonitoring glimAccountInfo = GroupSavingsIndividualMonitoring.getInstance(accountNumber, group, parentDeposit, childAccountsCount, isAcceptingChild, loanStatus, applicationId); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/RecurringDepositProductWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/RecurringDepositProductWritePlatformServiceJpaRepositoryImpl.java index cd2321808e5..340997110f7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/RecurringDepositProductWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/RecurringDepositProductWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,10 +24,12 @@ import static org.apache.fineract.portfolio.savings.SavingsApiConstants.taxGroupIdParamName; import jakarta.persistence.PersistenceException; + import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; @@ -178,16 +180,16 @@ private void handleDataIntegrityIssues(final JsonCommand command, final Throwabl msgCode += ".duplicate.name"; msg = "Recurring Deposit product with name `" + name + "` already exists"; param = "name"; - msgArgs = new Object[] { name, dae }; + msgArgs = new Object[]{name, dae}; } else if (checkEx.getMessage().contains("sp_unq_short_name")) { final String shortName = command.stringValueOfParameterNamed("shortName"); msgCode += ".duplicate.short.name"; msg = "Recurring Deposit product with short name `" + shortName + "` already exists"; param = "shortName"; - msgArgs = new Object[] { shortName, dae }; + msgArgs = new Object[]{shortName, dae}; } else { msgCode += ".unknown.data.integrity.issue"; - msgArgs = new Object[] { dae }; + msgArgs = new Object[]{dae}; } log.error("Error occured.", dae); throw ErrorHandler.getMappable(dae, msgCode, msg, param, msgArgs); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountApplicationTransitionApiJsonValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountApplicationTransitionApiJsonValidator.java index daa0b2fd195..61150751bc9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountApplicationTransitionApiJsonValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountApplicationTransitionApiJsonValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.time.LocalDate; import java.util.ArrayList; @@ -28,6 +29,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -55,7 +57,8 @@ public void validateApproval(final String json) { final Set disbursementParameters = new HashSet<>(Arrays.asList("approvedOnDate", "note", "locale", "dateFormat")); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, disbursementParameters); final List dataValidationErrors = new ArrayList<>(); @@ -79,7 +82,8 @@ public void validateRejection(final String json) { final Set disbursementParameters = new HashSet<>(Arrays.asList("rejectedOnDate", "note", "locale", "dateFormat")); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, disbursementParameters); final List dataValidationErrors = new ArrayList<>(); @@ -103,7 +107,8 @@ public void validateApplicantWithdrawal(final String json) { final Set disbursementParameters = new HashSet<>(Arrays.asList("withdrawnOnDate", "note", "locale", "dateFormat")); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, disbursementParameters); final List dataValidationErrors = new ArrayList<>(); @@ -125,7 +130,8 @@ public void validateForUndo(final String json) { } final Set undoSupportedParameters = new HashSet<>(Arrays.asList("note")); - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, undoSupportedParameters); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountChargeReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountChargeReadPlatformServiceImpl.java index 7690463790c..f836940fdce 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountChargeReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountChargeReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.time.MonthDay; import java.util.Collection; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -56,8 +57,8 @@ public class SavingsAccountChargeReadPlatformServiceImpl implements SavingsAccou private final SavingsAccountChargeDueMapper chargeDueMapper; public SavingsAccountChargeReadPlatformServiceImpl(final PlatformSecurityContext context, - final ChargeDropdownReadPlatformService chargeDropdownReadPlatformService, final JdbcTemplate jdbcTemplate, - final DropdownReadPlatformService dropdownReadPlatformService, DatabaseSpecificSQLGenerator sqlGenerator) { + final ChargeDropdownReadPlatformService chargeDropdownReadPlatformService, final JdbcTemplate jdbcTemplate, + final DropdownReadPlatformService dropdownReadPlatformService, DatabaseSpecificSQLGenerator sqlGenerator) { this.context = context; this.chargeDropdownReadPlatformService = chargeDropdownReadPlatformService; this.jdbcTemplate = jdbcTemplate; @@ -176,7 +177,7 @@ public SavingsAccountChargeData retrieveSavingsAccountChargeDetails(final Long i final String sql = "select " + rm.schema() + " where sc.id=? and sc.savings_account_id=?"; - return this.jdbcTemplate.queryForObject(sql, rm, new Object[] { id, savingsAccountId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, rm, new Object[]{id, savingsAccountId}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new SavingsAccountChargeNotFoundException(savingsAccountId, e); } @@ -196,7 +197,7 @@ public Collection retrieveSavingsAccountCharges(final } sqlBuilder.append(" order by sc.charge_time_enum ASC, sc.charge_due_date ASC, sc.is_penalty ASC"); - return this.jdbcTemplate.query(sqlBuilder.toString(), rm, new Object[] { loanId }); + return this.jdbcTemplate.query(sqlBuilder.toString(), rm, new Object[]{loanId}); } private static final class SavingsAccountChargeDueMapper implements RowMapper { @@ -237,7 +238,7 @@ public Collection retrieveChargesWithAnnualFeeDue() + sqlGenerator.currentBusinessDate() + " and sa.status_enum = ? "; return this.jdbcTemplate.query(sql, this.chargeDueMapper, // NOSONAR - new Object[] { ChargeTimeType.ANNUAL_FEE.getValue(), SavingsAccountStatusType.ACTIVE.getValue() }); + new Object[]{ChargeTimeType.ANNUAL_FEE.getValue(), SavingsAccountStatusType.ACTIVE.getValue()}); } @Override @@ -247,7 +248,7 @@ public Collection retrieveChargesWithDue() { + " order by sac.charge_due_date "; return this.jdbcTemplate.query(sql, this.chargeDueMapper, // NOSONAR - new Object[] { DateUtils.getBusinessLocalDate(), SavingsAccountStatusType.ACTIVE.getValue() }); // NOSONAR + new Object[]{DateUtils.getBusinessLocalDate(), SavingsAccountStatusType.ACTIVE.getValue()}); // NOSONAR } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountInterestPostingServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountInterestPostingServiceImpl.java index 61e90337c2e..ab4559dd9b1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountInterestPostingServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountInterestPostingServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -29,6 +29,7 @@ import java.util.Map; import java.util.Set; import java.util.stream.Collectors; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.LocalDateInterval; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -57,8 +58,8 @@ public class SavingsAccountInterestPostingServiceImpl implements SavingsAccountI @Override public SavingsAccountData postInterest(final MathContext mc, final LocalDate interestPostingUpToDate, final boolean isInterestTransfer, - final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth, - final LocalDate postInterestOnDate, final boolean backdatedTxnsAllowedTill, final SavingsAccountData savingsAccountData) { + final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth, + final LocalDate postInterestOnDate, final boolean backdatedTxnsAllowedTill, final SavingsAccountData savingsAccountData) { Money interestPostedToDate = Money.zero(savingsAccountData.getCurrency()); LocalDate startInterestDate = getStartInterestCalculationDate(savingsAccountData); @@ -187,7 +188,7 @@ public SavingsAccountData postInterest(final MathContext mc, final LocalDate int } protected SavingsAccountTransactionData findTransactionFor(final LocalDate postingDate, - final List transactions) { + final List transactions) { SavingsAccountTransactionData transaction = null; for (final SavingsAccountTransactionData savingsAccountTransaction : transactions) { if (savingsAccountTransaction.occursOn(postingDate)) { @@ -199,13 +200,13 @@ protected SavingsAccountTransactionData findTransactionFor(final LocalDate posti } private Money appendPostingPeriodIfAny(final LocalDateInterval periodInterval, Money periodStartingBalance, - final List txs, final MonetaryCurrency monetaryCurrency, - final SavingsCompoundingInterestPeriodType compoundingPeriodType, final SavingsInterestCalculationType interestCalculationType, - final BigDecimal interestRateAsFraction, final int daysInYear, final LocalDate upToInterestCalculationDate, - final Collection interestPostTransactions, final boolean isInterestTransfer, final Money minBalanceForInterestCalculation, - final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final BigDecimal overdraftInterestRateAsFraction, - final Money minOverdraftForInterestCalculation, final boolean isUserPosting, final Integer financialYearBeginningMonth, - final boolean allowOverdraft, final List allPostingPeriods, Boolean isOverdraftTransacction) { + final List txs, final MonetaryCurrency monetaryCurrency, + final SavingsCompoundingInterestPeriodType compoundingPeriodType, final SavingsInterestCalculationType interestCalculationType, + final BigDecimal interestRateAsFraction, final int daysInYear, final LocalDate upToInterestCalculationDate, + final Collection interestPostTransactions, final boolean isInterestTransfer, final Money minBalanceForInterestCalculation, + final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final BigDecimal overdraftInterestRateAsFraction, + final Money minOverdraftForInterestCalculation, final boolean isUserPosting, final Integer financialYearBeginningMonth, + final boolean allowOverdraft, final List allPostingPeriods, Boolean isOverdraftTransacction) { if (txs == null || txs.isEmpty()) { return periodStartingBalance; @@ -229,8 +230,8 @@ private Money appendPostingPeriodIfAny(final LocalDateInterval periodInterval, M } public List calculateInterestUsing(final MathContext mc, final LocalDate upToInterestCalculationDate, - boolean isInterestTransfer, final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth, - final LocalDate postInterestOnDate, final boolean backdatedTxnsAllowedTill, final SavingsAccountData savingsAccountData) { + boolean isInterestTransfer, final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final Integer financialYearBeginningMonth, + final LocalDate postInterestOnDate, final boolean backdatedTxnsAllowedTill, final SavingsAccountData savingsAccountData) { // no openingBalance concept supported yet but probably will to allow // for migrations. @@ -360,7 +361,7 @@ public List calculateInterestUsing(final MathContext mc, final Lo } private List listForOverdraft(final SavingsAccountData savingsAccountData, - final LocalDateInterval periodInterval) { + final LocalDateInterval periodInterval) { List overdraftTransactionsInPeriod = new ArrayList<>(); for (SavingsAccountTransactionData lists : retreiveOrderedNonInterestPostingTransactions(savingsAccountData)) { if (MathUtil.isLessThanZero(lists.getRunningBalance()) && periodInterval.startDate().getMonth() == lists.getDate().getMonth()) { @@ -373,7 +374,7 @@ private List listForOverdraft(final SavingsAccoun } private List listForInterestPosting(final SavingsAccountData savingsAccountData, - final LocalDateInterval periodInterval, final MonetaryCurrency currency) { + final LocalDateInterval periodInterval, final MonetaryCurrency currency) { final List nonOverdraftTransactions = new ArrayList<>(); @@ -390,7 +391,7 @@ private List listForInterestPosting(final Savings } private Boolean isOverdraftAccount(final SavingsAccountData savingsAccountData, final LocalDateInterval periodInterval, - final MonetaryCurrency currency) { + final MonetaryCurrency currency) { for (SavingsAccountTransactionData tx : retreiveOrderedNonInterestPostingTransactions(savingsAccountData)) { if (MathUtil.isLessThanZero(tx.getRunningBalance()) && periodInterval.startDate().getMonth() == tx.getDate().getMonth()) { @@ -446,7 +447,7 @@ private BigDecimal getEffectiveOverdraftInterestRateAsFraction(MathContext mc, f @SuppressWarnings("unused") private BigDecimal getEffectiveInterestRateAsFraction(final MathContext mc, final LocalDate upToInterestCalculationDate, - final SavingsAccountData savingsAccountData) { + final SavingsAccountData savingsAccountData) { return savingsAccountData.getNominalAnnualInterestRate().divide(BigDecimal.valueOf(100L), mc); } @@ -496,7 +497,7 @@ public List getManualPostingDates(final SavingsAccountData savingsAcc } protected void recalculateDailyBalances(final Money openingAccountBalance, final LocalDate interestPostingUpToDate, - final boolean backdatedTxnsAllowedTill, final SavingsAccountData savingsAccountData) { + final boolean backdatedTxnsAllowedTill, final SavingsAccountData savingsAccountData) { Money runningBalance = openingAccountBalance.copy(); @@ -605,7 +606,7 @@ private boolean createWithHoldTransaction(final BigDecimal amount, final LocalDa } protected SavingsAccountTransactionData findInterestPostingTransactionFor(final LocalDate postingDate, - final SavingsAccountData savingsAccountData) { + final SavingsAccountData savingsAccountData) { SavingsAccountTransactionData postingTransation = null; List trans = savingsAccountData.getSavingsAccountTransactionData(); for (final SavingsAccountTransactionData transaction : trans) { @@ -619,7 +620,7 @@ protected SavingsAccountTransactionData findInterestPostingTransactionFor(final } protected SavingsAccountTransactionData findInterestPostingTransactionForInterest(final LocalDate postingDate, - final SavingsAccountData savingsAccountData, boolean isOverdraft) { + final SavingsAccountData savingsAccountData, boolean isOverdraft) { SavingsAccountTransactionData postingTransation = null; List transactions = savingsAccountData.getSavingsAccountTransactionData(); postingTransation = transactions.stream().filter(t -> { @@ -631,7 +632,7 @@ protected SavingsAccountTransactionData findInterestPostingTransactionForInteres } protected void resetAccountTransactionsEndOfDayBalances(final List accountTransactionsSorted, - final LocalDate interestPostingUpToDate, final SavingsAccountData savingsAccountData) { + final LocalDate interestPostingUpToDate, final SavingsAccountData savingsAccountData) { // loop over transactions in reverse LocalDate endOfBalanceDate = interestPostingUpToDate; for (int i = accountTransactionsSorted.size() - 1; i >= 0; i--) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java index 53a0d2d5974..e19f63acb34 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -31,6 +31,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.List; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.accounting.common.AccountingRuleType; import org.apache.fineract.accounting.glaccount.data.GLAccountData; @@ -106,8 +107,8 @@ public class SavingsAccountReadPlatformServiceImpl implements SavingsAccountRead private final SavingsAccountRepositoryWrapper savingsAccountRepositoryWrapper; public SavingsAccountReadPlatformServiceImpl(final PlatformSecurityContext context, final JdbcTemplate jdbcTemplate, - final SavingsAccountAssembler savingAccountAssembler, PaginationHelper paginationHelper, ColumnValidator columnValidator, - DatabaseSpecificSQLGenerator sqlGenerator, SavingsAccountRepositoryWrapper savingsAccountRepositoryWrapper) { + final SavingsAccountAssembler savingAccountAssembler, PaginationHelper paginationHelper, ColumnValidator columnValidator, + DatabaseSpecificSQLGenerator sqlGenerator, SavingsAccountRepositoryWrapper savingsAccountRepositoryWrapper) { this.context = context; this.jdbcTemplate = jdbcTemplate; this.sqlGenerator = sqlGenerator; @@ -128,7 +129,7 @@ public Collection retrieveAllForLookup(final Long clientId) final StringBuilder sqlBuilder = new StringBuilder("select " + this.savingAccountMapper.schema()); sqlBuilder.append(" where sa.client_id = ? and sa.status_enum = 300 "); - final Object[] queryParameters = new Object[] { clientId }; + final Object[] queryParameters = new Object[]{clientId}; return this.jdbcTemplate.query(sqlBuilder.toString(), this.savingAccountMapper, queryParameters); } @@ -138,17 +139,17 @@ public Collection retrieveActiveForLookup(final Long clientI final StringBuilder sqlBuilder = new StringBuilder("select " + this.savingAccountMapper.schema()); sqlBuilder.append(" where sa.client_id = ? and sa.status_enum = 300 and sa.deposit_type_enum = ? "); - final Object[] queryParameters = new Object[] { clientId, depositAccountType.getValue() }; + final Object[] queryParameters = new Object[]{clientId, depositAccountType.getValue()}; return this.jdbcTemplate.query(sqlBuilder.toString(), this.savingAccountMapper, queryParameters); } @Override public Collection retrieveActiveForLookup(final Long clientId, DepositAccountType depositAccountType, - String currencyCode) { + String currencyCode) { final StringBuilder sqlBuilder = new StringBuilder("select " + this.savingAccountMapper.schema()); sqlBuilder.append(" where sa.client_id = ? and sa.status_enum = 300 and sa.deposit_type_enum = ? and sa.currency_code = ? "); - final Object[] queryParameters = new Object[] { clientId, depositAccountType.getValue(), currencyCode }; + final Object[] queryParameters = new Object[]{clientId, depositAccountType.getValue(), currencyCode}; return this.jdbcTemplate.query(sqlBuilder.toString(), this.savingAccountMapper, queryParameters); } @@ -215,7 +216,7 @@ public SavingsAccountData retrieveOne(final Long accountId) { try { final String sql = "select " + this.savingAccountMapper.schema() + " where sa.id = ?"; - return this.jdbcTemplate.queryForObject(sql, this.savingAccountMapper, new Object[] { accountId }); // NOSONAR + return this.jdbcTemplate.queryForObject(sql, this.savingAccountMapper, new Object[]{accountId}); // NOSONAR } catch (final EmptyResultDataAccessException e) { throw new SavingsAccountNotFoundException(accountId, e); } @@ -236,7 +237,7 @@ public List retrieveAllTransactionData(final List @Override public List retrieveAllSavingsDataForInterestPosting(final boolean backdatedTxnsAllowedTill, final int pageSize, - final Integer status, final Long maxSavingsId) { + final Integer status, final Long maxSavingsId) { LocalDate yesterday = DateUtils.getBusinessLocalDate().minusDays(1); String sql = "select " + this.savingAccountMapperForInterestPosting.schema() + "join (select a.id from m_savings_account a where a.id > ? and a.status_enum = ? limit ?) b on b.id = sa.id "; @@ -250,7 +251,7 @@ public List retrieveAllSavingsDataForInterestPosting(final b sql = sql + " order by sa.id, tr.transaction_date, tr." + CREATED_DATE_DB_FIELD + ", tr.created_date, tr.id"; List savingsAccountDataList = this.jdbcTemplate.query(sql, this.savingAccountMapperForInterestPosting, // NOSONAR - new Object[] { maxSavingsId, status, pageSize, yesterday }); + new Object[]{maxSavingsId, status, pageSize, yesterday}); for (SavingsAccountData savingsAccountData : savingsAccountDataList) { this.savingAccountAssembler.assembleSavings(savingsAccountData); } @@ -1025,13 +1026,13 @@ public SavingsAccountData mapRow(final ResultSet rs, @SuppressWarnings("unused") @Override public SavingsAccountTransactionData retrieveDepositTransactionTemplate(final Long savingsId, - final DepositAccountType depositAccountType) { + final DepositAccountType depositAccountType) { try { final String sql = "select " + this.transactionTemplateMapper.schema() + " where sa.id = ? and sa.deposit_type_enum = ?"; return this.jdbcTemplate.queryForObject(sql, this.transactionTemplateMapper, // NOSONAR - new Object[] { savingsId, depositAccountType.getValue() }); + new Object[]{savingsId, depositAccountType.getValue()}); } catch (final EmptyResultDataAccessException e) { throw new SavingsAccountNotFoundException(savingsId, e); } @@ -1043,17 +1044,17 @@ public Collection retrieveAllTransactions(final L final String sql = "select " + this.transactionsMapper.schema() + " where sa.id = ? and sa.deposit_type_enum = ? order by tr.transaction_date DESC," + " tr." + CREATED_DATE_DB_FIELD + " DESC, tr.created_date DESC, tr.id DESC"; - return this.jdbcTemplate.query(sql, this.transactionsMapper, new Object[] { savingsId, depositAccountType.getValue() }); // NOSONAR + return this.jdbcTemplate.query(sql, this.transactionsMapper, new Object[]{savingsId, depositAccountType.getValue()}); // NOSONAR } @Override public SavingsAccountTransactionData retrieveSavingsTransaction(final Long savingsId, final Long transactionId, - DepositAccountType depositAccountType) { + DepositAccountType depositAccountType) { final String sql = "select " + this.transactionsMapper.schema() + " where sa.id = ? and sa.deposit_type_enum = ? and tr.id= ?"; return this.jdbcTemplate.queryForObject(sql, this.transactionsMapper, // NOSONAR - new Object[] { savingsId, depositAccountType.getValue(), transactionId }); + new Object[]{savingsId, depositAccountType.getValue(), transactionId}); } private static final class SavingsAccountTransactionsForBatchMapper implements RowMapper { @@ -1097,7 +1098,8 @@ public static class SavingsAccountTransactionsMapper implements RowMapper retrieveForLookup(Long clientId, Boolean o sqlBuilder.append(" where sa.client_id = ? and sa.status_enum = 300"); Object[] queryParameters = null; if (overdraft == null) { - queryParameters = new Object[] { clientId }; + queryParameters = new Object[]{clientId}; } else { sqlBuilder.append(" and sa.allow_overdraft = ?"); - queryParameters = new Object[] { clientId, overdraft }; + queryParameters = new Object[]{clientId, overdraft}; } return this.jdbcTemplate.query(sqlBuilder.toString(), accountMapperForLookup, queryParameters); @@ -1288,7 +1290,7 @@ public List retrieveSavingsIdsPendingInactive(LocalDate tenantLocalDate) { sql.append(" and ").append(sqlGenerator.dateDiff("?", compareDate)).append(" >= sp.days_to_inactive "); try { - ret = this.jdbcTemplate.queryForList(sql.toString(), new Object[] { tenantLocalDate }, Long.class); + ret = this.jdbcTemplate.queryForList(sql.toString(), new Object[]{tenantLocalDate}, Long.class); } catch (EmptyResultDataAccessException e) { // ignore empty result scenario } catch (DataAccessException e) { @@ -1312,7 +1314,7 @@ public List retrieveSavingsIdsPendingDormant(LocalDate tenantLocalDate) { sql.append(" >= sp.days_to_dormancy "); try { - ret = this.jdbcTemplate.queryForList(sql.toString(), new Object[] { tenantLocalDate }, Long.class); + ret = this.jdbcTemplate.queryForList(sql.toString(), new Object[]{tenantLocalDate}, Long.class); } catch (EmptyResultDataAccessException e) { // ignore empty result scenario } catch (DataAccessException e) { @@ -1336,7 +1338,7 @@ public List retrieveSavingsIdsPendingEscheat(LocalDate tenantLocalDate) { sql.append(" >= sp.days_to_escheat "); try { - ret = this.jdbcTemplate.queryForList(sql.toString(), Long.class, new Object[] { tenantLocalDate }); + ret = this.jdbcTemplate.queryForList(sql.toString(), Long.class, new Object[]{tenantLocalDate}); } catch (EmptyResultDataAccessException e) { // ignore empty result scenario } catch (DataAccessException e) { @@ -1348,7 +1350,7 @@ public List retrieveSavingsIdsPendingEscheat(LocalDate tenantLocalDate) { @Override public boolean isAccountBelongsToClient(final Long clientId, final Long accountId, final DepositAccountType depositAccountType, - final String currencyCode) { + final String currencyCode) { try { final StringBuilder buff = new StringBuilder("select count(*) from m_savings_account sa "); buff.append( @@ -1399,7 +1401,7 @@ public List getAccountsIdsByStatusPaged(Integer status, int pageSize, Long where sa.id > ? and sa.status_enum = ? order by sa.id limit ?\s"""; try { - return this.jdbcTemplate.queryForList(sql, Long.class, new Object[] { maxSavingsIdInList, status, pageSize }); + return this.jdbcTemplate.queryForList(sql, Long.class, new Object[]{maxSavingsIdInList, status, pageSize}); } catch (EmptyResultDataAccessException e) { return new ArrayList<>(); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountTemplateReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountTemplateReadPlatformServiceImpl.java index 8d9b95c9b5a..b8f1728104f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountTemplateReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountTemplateReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.infrastructure.dataqueries.data.DatatableData; @@ -76,10 +77,10 @@ public class SavingsAccountTemplateReadPlatformServiceImpl implements SavingsAcc private final EntityDatatableChecksReadService entityDatatableChecksReadService; public SavingsAccountTemplateReadPlatformServiceImpl(final PlatformSecurityContext context, final JdbcTemplate jdbcTemplate, - final ClientReadPlatformService clientReadPlatformService, final GroupReadPlatformService groupReadPlatformService, - final SavingsProductReadPlatformService savingProductReadPlatformService, final StaffReadService staffReadPlatformService, - final SavingsDropdownReadPlatformService dropdownReadPlatformService, final ChargeReadPlatformService chargeReadPlatformService, - final EntityDatatableChecksReadService entityDatatableChecksReadService, final ColumnValidator columnValidator) { + final ClientReadPlatformService clientReadPlatformService, final GroupReadPlatformService groupReadPlatformService, + final SavingsProductReadPlatformService savingProductReadPlatformService, final StaffReadService staffReadPlatformService, + final SavingsDropdownReadPlatformService dropdownReadPlatformService, final ChargeReadPlatformService chargeReadPlatformService, + final EntityDatatableChecksReadService entityDatatableChecksReadService, final ColumnValidator columnValidator) { this.context = context; this.jdbcTemplate = jdbcTemplate; this.clientReadPlatformService = clientReadPlatformService; @@ -93,7 +94,7 @@ public SavingsAccountTemplateReadPlatformServiceImpl(final PlatformSecurityConte @Override public SavingsAccountData retrieveTemplate(final Long clientId, final Long groupId, final Long productId, - final boolean staffInSelectedOfficeOnly) { + final boolean staffInSelectedOfficeOnly) { final AppUser loggedInUser = this.context.authenticatedUser(); Long officeId = loggedInUser.getOffice().getId(); @@ -117,7 +118,7 @@ public SavingsAccountData retrieveTemplate(final Long clientId, final Long group final SavingAccountTemplateMapper mapper = new SavingAccountTemplateMapper(client, group); final String sql = "select " + mapper.schema() + " where sp.id = ?"; - template = this.jdbcTemplate.queryForObject(sql, mapper, new Object[] { productId }); // NOSONAR + template = this.jdbcTemplate.queryForObject(sql, mapper, new Object[]{productId}); // NOSONAR final Collection interestCompoundingPeriodTypeOptions = this.dropdownReadPlatformService .retrieveCompoundingInterestPeriodTypeOptions(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java index 2ce2285df1e..360cd80f6f4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -32,6 +32,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import io.github.resilience4j.retry.annotation.Retry; + import java.math.BigDecimal; import java.math.MathContext; import java.time.LocalDate; @@ -47,6 +48,7 @@ import java.util.Map; import java.util.Set; import java.util.UUID; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -232,7 +234,7 @@ public CommandProcessingResult activate(final Long savingsId, final JsonCommand @Override public void processPostActiveActions(final SavingsAccount account, final DateTimeFormatter fmt, final Set existingTransactionIds, - final Set existingReversedTransactionIds) { + final Set existingReversedTransactionIds) { getAppUserIfPresent(); final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService @@ -579,7 +581,7 @@ public CommandProcessingResult postInterest(final JsonCommand command) { @Transactional @Override public void postInterest(final SavingsAccount account, final boolean postInterestAs, final LocalDate transactionDate, - final boolean backdatedTxnsAllowedTill) { + final boolean backdatedTxnsAllowedTill) { final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService .isSavingsInterestPostingAtCurrentPeriodEnd(); final Integer financialYearBeginningMonth = this.configurationDomainService.retrieveFinancialYearBeginningMonth(); @@ -629,7 +631,7 @@ public void postInterest(final SavingsAccount account, final boolean postInteres @Override @Retry(name = "postInterest", fallbackMethod = "fallbackPostInterest") public SavingsAccountData postInterest(SavingsAccountData savingsAccountData, final boolean postInterestAs, - final LocalDate transactionDate, final boolean backdatedTxnsAllowedTill) { + final LocalDate transactionDate, final boolean backdatedTxnsAllowedTill) { final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService .isSavingsInterestPostingAtCurrentPeriodEnd(); @@ -687,7 +689,7 @@ public void selectAccountId(SavingsAccountTransactionData accountTransaction, Sa @Override public CommandProcessingResult reverseTransaction(final Long savingsId, final Long transactionId, - final boolean allowAccountTransferModification, final JsonCommand command) { + final boolean allowAccountTransferModification, final JsonCommand command) { final boolean backdatedTxnsAllowedTill = this.savingAccountAssembler.getPivotConfigStatus(); final boolean isBulk = command.booleanPrimitiveValueOfParameterNamed("isBulk"); @@ -737,7 +739,7 @@ public CommandProcessingResult reverseTransaction(final Long savingsId, final Lo @Override public CommandProcessingResult undoTransaction(final Long savingsId, final Long transactionId, - final boolean allowAccountTransferModification) { + final boolean allowAccountTransferModification) { final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService .isSavingsInterestPostingAtCurrentPeriodEnd(); @@ -1129,7 +1131,7 @@ public void rejectSavingsTransfer(final SavingsAccount savingsAccount) { @Override public SavingsAccountTransaction acceptSavingsTransfer(final SavingsAccount savingsAccount, final LocalDate transferDate, - final Office acceptedInOffice, final Staff fieldOfficer) { + final Office acceptedInOffice, final Staff fieldOfficer) { getAppUserIfPresent(); final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService @@ -1358,7 +1360,7 @@ public CommandProcessingResult waiveCharge(final Long savingsAccountId, final Lo @Transactional @Override public CommandProcessingResult deleteSavingsAccountCharge(final Long savingsAccountId, final Long savingsAccountChargeId, - @SuppressWarnings("unused") final JsonCommand command) { + @SuppressWarnings("unused") final JsonCommand command) { this.context.authenticatedUser(); final SavingsAccount savingsAccount = this.savingAccountAssembler.assembleFrom(savingsAccountId, false); @@ -1453,7 +1455,7 @@ public void applyChargeDue(final Long savingsAccountChargeId, final Long account @SuppressWarnings("unused") public SavingsAccountData fallbackPostInterest(SavingsAccountData savingsAccountData, boolean postInterestAs, LocalDate transactionDate, - boolean backdatedTxnsAllowedTill, Throwable t) { + boolean backdatedTxnsAllowedTill, Throwable t) { // NOTE: allow caller to catch the exceptions // NOTE: wrap throwable only if really necessary throw errorHandler.getMappable(t, null, null, "savings.postinterest"); @@ -1461,7 +1463,7 @@ public SavingsAccountData fallbackPostInterest(SavingsAccountData savingsAccount @Transactional private SavingsAccountTransaction payCharge(final SavingsAccountCharge savingsAccountCharge, final LocalDate transactionDate, - final BigDecimal amountPaid, final DateTimeFormatter formatter, final boolean backdatedTxnsAllowedTill) { + final BigDecimal amountPaid, final DateTimeFormatter formatter, final boolean backdatedTxnsAllowedTill) { final boolean isSavingsInterestPostingAtCurrentPeriodEnd = this.configurationDomainService .isSavingsInterestPostingAtCurrentPeriodEnd(); final Integer financialYearBeginningMonth = this.configurationDomainService.retrieveFinancialYearBeginningMonth(); @@ -1514,25 +1516,25 @@ private SavingsAccountTransaction payCharge(final SavingsAccountCharge savingsAc } private void updateExistingTransactionsDetails(SavingsAccount account, Set existingTransactionIds, - Set existingReversedTransactionIds) { + Set existingReversedTransactionIds) { existingTransactionIds.addAll(account.findExistingTransactionIds()); existingReversedTransactionIds.addAll(account.findExistingReversedTransactionIds()); } private void updateExistingTransactionsDetails(SavingsAccountData account, Set existingTransactionIds, - Set existingReversedTransactionIds) { + Set existingReversedTransactionIds) { existingTransactionIds.addAll(account.findCurrentTransactionIdsWithPivotDateConfig()); existingReversedTransactionIds.addAll(account.findCurrentReversedTransactionIdsWithPivotDateConfig()); } private void updateSavingsTransactionsDetails(SavingsAccount account, Set existingTransactionIds, - Set existingReversedTransactionIds) { + Set existingReversedTransactionIds) { existingTransactionIds.addAll(account.findCurrentTransactionIdsWithPivotDateConfig()); existingReversedTransactionIds.addAll(account.findCurrentReversedTransactionIdsWithPivotDateConfig()); } private void postJournalEntries(final SavingsAccount savingsAccount, final Set existingTransactionIds, - final Set existingReversedTransactionIds, final boolean backdatedTxnsAllowedTill) { + final Set existingReversedTransactionIds, final boolean backdatedTxnsAllowedTill) { boolean isAccountTransfer = false; final Map accountingBridgeData = savingsAccount.deriveAccountingBridgeData(savingsAccount.getCurrency().getCode(), diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccrualWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccrualWritePlatformService.java index ed6f4c4ae8c..9fea938cc56 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccrualWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccrualWritePlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.savings.service; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.exception.MultiException; public interface SavingsAccrualWritePlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccrualWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccrualWritePlatformServiceImpl.java index 8adf321d626..7fcfa902be8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccrualWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsAccrualWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import java.util.List; import java.util.Set; import java.util.function.Function; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService; @@ -102,8 +103,8 @@ public void addAccrualEntries(LocalDate tillDate) throws JobExecutionException { } private void addAccrualTransactions(SavingsAccount savingsAccount, final LocalDate fromDate, final LocalDate tillDate, - final Integer financialYearBeginningMonth, final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final MathContext mc, - final Function refNoProvider) { + final Integer financialYearBeginningMonth, final boolean isSavingsInterestPostingAtCurrentPeriodEnd, final MathContext mc, + final Function refNoProvider) { final Set existingTransactionIds = new HashSet<>(); final Set existingReversedTransactionIds = new HashSet<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl.java index 9e2dd1d03d3..e9848737ab2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import jakarta.persistence.PersistenceException; + import java.math.BigDecimal; import java.util.ArrayList; import java.util.HashSet; @@ -30,6 +31,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; @@ -170,7 +172,7 @@ public CommandProcessingResult submitApplication(final JsonCommand command) { if (command.booleanObjectValueOfParameterNamed("isParentAccount") != null && ("1".equals(command.stringValueOfParameterNamed("isParentAccount")) - || command.booleanObjectValueOfParameterNamed("isParentAccount"))) { + || command.booleanObjectValueOfParameterNamed("isParentAccount"))) { // empty table check if (gsimRepository.count() != 0) { // Parent-Not an empty table @@ -699,16 +701,16 @@ private void handleDataIntegrityIssues(final JsonCommand command, final Throwabl msgCode += ".duplicate.accountNo"; msg = "Savings account with accountNo " + accountNo + " already exists"; param = "accountNo"; - msgArgs = new Object[] { accountNo, dve }; + msgArgs = new Object[]{accountNo, dve}; } else if (checkEx.getMessage().contains("sa_externalid_UNIQUE")) { final String externalId = command.stringValueOfParameterNamed("externalId"); msgCode += ".duplicate.externalId"; msg = "Savings account with externalId " + externalId + " already exists"; param = "externalId"; - msgArgs = new Object[] { externalId, dve }; + msgArgs = new Object[]{externalId, dve}; } else { msgCode += ".unknown.data.integrity.issue"; - msgArgs = new Object[] { dve }; + msgArgs = new Object[]{dve}; } log.error("Error occured.", dve); throw ErrorHandler.getMappable(dve, msgCode, msg, param, msgArgs); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsDropdownReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsDropdownReadPlatformServiceImpl.java index f4fb6238a1b..b4c3f5b5687 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsDropdownReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsDropdownReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; + import lombok.NoArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.savings.SavingsCompoundingInterestPeriodType; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductReadPlatformServiceImpl.java index 9c3e18d7812..8cddb61d064 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.common.AccountingEnumerations; import org.apache.fineract.infrastructure.core.data.EnumOptionData; @@ -62,7 +63,7 @@ public Collection retrieveAll() { sql += " and sp.id in ( " + inClause + " ) "; } - return this.jdbcTemplate.query(sql, this.savingsProductRowMapper, new Object[] { DepositAccountType.SAVINGS_DEPOSIT.getValue() }); // NOSONAR + return this.jdbcTemplate.query(sql, this.savingsProductRowMapper, new Object[]{DepositAccountType.SAVINGS_DEPOSIT.getValue()}); // NOSONAR } @Override @@ -79,7 +80,7 @@ public Collection retrieveAllForLookup() { } return this.jdbcTemplate.query(sql, this.savingsProductLookupsRowMapper, // NOSONAR - new Object[] { DepositAccountType.SAVINGS_DEPOSIT.getValue() }); + new Object[]{DepositAccountType.SAVINGS_DEPOSIT.getValue()}); } @Override @@ -88,7 +89,7 @@ public SavingsProductData retrieveOne(final Long savingProductId) { this.context.authenticatedUser(); final String sql = "select " + this.savingsProductRowMapper.schema() + " where sp.id = ? and sp.deposit_type_enum = ?"; return this.jdbcTemplate.queryForObject(sql, this.savingsProductRowMapper, // NOSONAR - new Object[] { savingProductId, DepositAccountType.SAVINGS_DEPOSIT.getValue() }); + new Object[]{savingProductId, DepositAccountType.SAVINGS_DEPOSIT.getValue()}); } catch (final EmptyResultDataAccessException e) { throw new SavingsProductNotFoundException(savingProductId, e); } @@ -260,7 +261,7 @@ public Collection retrieveAllForLookupByType(Boolean isOverd sql += " where sp.allow_overdraft=? and sp.deposit_type_enum = ?"; } return this.jdbcTemplate.query(sql, this.savingsProductLookupsRowMapper, // NOSONAR - new Object[] { isOverdraftType, DepositAccountType.SAVINGS_DEPOSIT.getValue() }); + new Object[]{isOverdraftType, DepositAccountType.SAVINGS_DEPOSIT.getValue()}); } if (inClauseAdded) { @@ -269,7 +270,7 @@ public Collection retrieveAllForLookupByType(Boolean isOverd sql += " where sp.deposit_type_enum = ?"; } return this.jdbcTemplate.query(sql, this.savingsProductLookupsRowMapper, // NOSONAR - new Object[] { DepositAccountType.SAVINGS_DEPOSIT.getValue() }); + new Object[]{DepositAccountType.SAVINGS_DEPOSIT.getValue()}); } @Override @@ -287,6 +288,6 @@ public Collection retrieveAllForCurrency(String currencyCode sql += " and id in ( " + inClause + " ) "; } - return this.jdbcTemplate.query(sql, this.savingsProductRowMapper, new Object[] { currencyCode }); // NOSONAR + return this.jdbcTemplate.query(sql, this.savingsProductRowMapper, new Object[]{currencyCode}); // NOSONAR } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductWritePlatformServiceJpaRepositoryImpl.java index 6948ef72be8..283a966a7a5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/SavingsProductWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,10 +24,12 @@ import static org.apache.fineract.portfolio.savings.SavingsApiConstants.taxGroupIdParamName; import jakarta.persistence.PersistenceException; + import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; @@ -79,16 +81,16 @@ private void handleDataIntegrityIssues(final JsonCommand command, final Throwabl msgCode += ".duplicate.name"; msg = "Savings product with name `" + name + "` already exists"; param = "name"; - msgArgs = new Object[] { name, dae }; + msgArgs = new Object[]{name, dae}; } else if (checkEx.getMessage().contains("sp_unq_short_name")) { final String shortName = command.stringValueOfParameterNamed("shortName"); msgCode += ".duplicate.short.name"; msg = "Savings product with short name `" + shortName + "` already exists"; param = "shortName"; - msgArgs = new Object[] { shortName, dae }; + msgArgs = new Object[]{shortName, dae}; } else { msgCode += ".unknown.data.integrity.issue"; - msgArgs = new Object[] { dae }; + msgArgs = new Object[]{dae}; } log.error("Error occured.", dae); throw ErrorHandler.getMappable(dae, msgCode, msg, param, msgArgs); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/search/SavingsAccountTransactionsSearchServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/search/SavingsAccountTransactionsSearchServiceImpl.java index 562f9883c2d..e2051caa587 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/search/SavingsAccountTransactionsSearchServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/service/search/SavingsAccountTransactionsSearchServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,12 +22,14 @@ import static org.apache.fineract.portfolio.savings.SavingsApiConstants.SAVINGS_ACCOUNT_RESOURCE_NAME; import com.google.gson.JsonObject; + import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Locale; import java.util.Map; import java.util.function.Predicate; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.infrastructure.core.service.MathUtil; @@ -74,7 +76,7 @@ public class SavingsAccountTransactionsSearchServiceImpl implements SavingsAccou @Override public Page searchTransactions(@NonNull Long savingsId, - @NonNull TransactionSearchRequest searchParameters) { + @NonNull TransactionSearchRequest searchParameters) { context.authenticatedUser().validateHasReadPermission(SAVINGS_ACCOUNT_RESOURCE_NAME); String apptable = EntityTables.SAVINGS_TRANSACTION.getApptableName(); @@ -131,7 +133,7 @@ public Page searchTransactions(@NonNull Long savi } private static void addFromToFilter(@NonNull String column, String fromValue, String toValue, - @NonNull List columnFilters) { + @NonNull List columnFilters) { if (fromValue != null) { columnFilters.add(toValue == null ? ColumnFilterData.create(column, SqlOperator.GTE, fromValue) : ColumnFilterData.btw(column, fromValue, toValue)); @@ -142,7 +144,7 @@ private static void addFromToFilter(@NonNull String column, String fromValue, St @Nullable private static Boolean addTransactionTypesFilter(@NonNull TransactionSearchRequest searchParameters, - List columnFilters) { + List columnFilters) { Predicate filter = null; Boolean credit = searchParameters.getCredit(); Boolean debit = searchParameters.getDebit(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/starter/SavingsConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/starter/SavingsConfiguration.java index 67093ca54be..8beb3c6f9d2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/starter/SavingsConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/starter/SavingsConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -154,8 +154,8 @@ public class SavingsConfiguration { @Bean @ConditionalOnMissingBean(SavingsAccountTransactionSearchService.class) public SavingsAccountTransactionSearchService savingsAccountTransactionSearchService(PlatformSecurityContext context, - GenericDataService genericDataService, DatabaseSpecificSQLGenerator sqlGenerator, DatatableReadService datatableService, - DataTableValidator dataTableValidator, JdbcTemplate jdbcTemplate, SearchUtil searchUtil) { + GenericDataService genericDataService, DatabaseSpecificSQLGenerator sqlGenerator, DatatableReadService datatableService, + DataTableValidator dataTableValidator, JdbcTemplate jdbcTemplate, SearchUtil searchUtil) { return new SavingsAccountTransactionsSearchServiceImpl(context, genericDataService, sqlGenerator, datatableService, dataTableValidator, jdbcTemplate, searchUtil); } @@ -169,11 +169,11 @@ public DepositAccountInterestRateChartReadPlatformServiceImpl.DepositAccountInte @Bean @ConditionalOnMissingBean(DepositAccountInterestRateChartReadPlatformService.class) public DepositAccountInterestRateChartReadPlatformService depositAccountInterestRateChartReadService(PlatformSecurityContext context, - JdbcTemplate jdbcTemplate, - DepositAccountInterestRateChartReadPlatformServiceImpl.DepositAccountInterestRateChartExtractor chartExtractor, - InterestRateChartDropdownReadService chartDropdownReadPlatformService, - InterestIncentiveDropdownReadService interestIncentiveDropdownReadPlatformService, - CodeValueReadPlatformService codeValueReadPlatformService) { + JdbcTemplate jdbcTemplate, + DepositAccountInterestRateChartReadPlatformServiceImpl.DepositAccountInterestRateChartExtractor chartExtractor, + InterestRateChartDropdownReadService chartDropdownReadPlatformService, + InterestIncentiveDropdownReadService interestIncentiveDropdownReadPlatformService, + CodeValueReadPlatformService codeValueReadPlatformService) { return new DepositAccountInterestRateChartReadPlatformServiceImpl(context, jdbcTemplate, chartExtractor, chartDropdownReadPlatformService, interestIncentiveDropdownReadPlatformService, codeValueReadPlatformService); } @@ -181,7 +181,7 @@ public DepositAccountInterestRateChartReadPlatformService depositAccountInterest @Bean @ConditionalOnMissingBean(DepositAccountOnHoldTransactionReadPlatformService.class) public DepositAccountOnHoldTransactionReadPlatformService depositAccountOnHoldTransactionReadPlatformService(JdbcTemplate jdbcTemplate, - ColumnValidator columnValidator, DatabaseSpecificSQLGenerator sqlGenerator, PaginationHelper paginationHelper) { + ColumnValidator columnValidator, DatabaseSpecificSQLGenerator sqlGenerator, PaginationHelper paginationHelper) { return new DepositAccountOnHoldTransactionReadPlatformServiceImpl(jdbcTemplate, sqlGenerator, columnValidator, paginationHelper); } @@ -199,15 +199,15 @@ public DepositAccountPreMatureCalculationPlatformService depositAccountPreMature @Bean @ConditionalOnMissingBean(DepositAccountReadPlatformService.class) public DepositAccountReadPlatformService depositAccountReadPlatformService(PlatformSecurityContext context, JdbcTemplate jdbcTemplate, - DepositAccountInterestRateChartReadPlatformService chartReadPlatformService, - InterestRateChartReadService productChartReadPlatformService, - PaginationParametersDataValidator paginationParametersDataValidator, DatabaseSpecificSQLGenerator sqlGenerator, - PaginationHelper paginationHelper, ClientReadPlatformService clientReadPlatformService, - GroupReadPlatformService groupReadPlatformService, DepositProductReadPlatformService depositProductReadPlatformService, - SavingsDropdownReadPlatformService savingsDropdownReadPlatformService, ChargeReadPlatformService chargeReadPlatformService, - StaffReadService staffReadPlatformService, DepositsDropdownReadPlatformService depositsDropdownReadPlatformService, - SavingsAccountReadPlatformService savingsAccountReadPlatformService, DropdownReadPlatformService dropdownReadPlatformService, - CalendarReadPlatformService calendarReadPlatformService, PaymentTypeReadService paymentTypeReadPlatformService) { + DepositAccountInterestRateChartReadPlatformService chartReadPlatformService, + InterestRateChartReadService productChartReadPlatformService, + PaginationParametersDataValidator paginationParametersDataValidator, DatabaseSpecificSQLGenerator sqlGenerator, + PaginationHelper paginationHelper, ClientReadPlatformService clientReadPlatformService, + GroupReadPlatformService groupReadPlatformService, DepositProductReadPlatformService depositProductReadPlatformService, + SavingsDropdownReadPlatformService savingsDropdownReadPlatformService, ChargeReadPlatformService chargeReadPlatformService, + StaffReadService staffReadPlatformService, DepositsDropdownReadPlatformService depositsDropdownReadPlatformService, + SavingsAccountReadPlatformService savingsAccountReadPlatformService, DropdownReadPlatformService dropdownReadPlatformService, + CalendarReadPlatformService calendarReadPlatformService, PaymentTypeReadService paymentTypeReadPlatformService) { return new DepositAccountReadPlatformServiceImpl(context, jdbcTemplate, chartReadPlatformService, productChartReadPlatformService, paginationParametersDataValidator, sqlGenerator, paginationHelper, clientReadPlatformService, groupReadPlatformService, depositProductReadPlatformService, savingsDropdownReadPlatformService, chargeReadPlatformService, staffReadPlatformService, @@ -218,21 +218,21 @@ public DepositAccountReadPlatformService depositAccountReadPlatformService(Platf @Bean @ConditionalOnMissingBean(DepositAccountWritePlatformService.class) public DepositAccountWritePlatformService depositAccountWritePlatformService(PlatformSecurityContext context, - SavingsAccountRepositoryWrapper savingAccountRepositoryWrapper, - SavingsAccountTransactionRepository savingsAccountTransactionRepository, DepositAccountAssembler depositAccountAssembler, - DepositAccountTransactionDataValidator depositAccountTransactionDataValidator, - SavingsAccountChargeDataValidator savingsAccountChargeDataValidator, - PaymentDetailWritePlatformService paymentDetailWritePlatformService, - ApplicationCurrencyRepositoryWrapper applicationCurrencyRepositoryWrapper, - JournalEntryWritePlatformService journalEntryWritePlatformService, DepositAccountDomainService depositAccountDomainService, - NoteRepository noteRepository, AccountTransfersReadPlatformService accountTransfersReadPlatformService, - ChargeRepositoryWrapper chargeRepository, SavingsAccountChargeRepositoryWrapper savingsAccountChargeRepository, - AccountAssociationsReadPlatformService accountAssociationsReadPlatformService, - AccountTransfersWritePlatformService accountTransfersWritePlatformService, - DepositAccountReadPlatformService depositAccountReadPlatformService, CalendarInstanceRepository calendarInstanceRepository, - ConfigurationDomainService configurationDomainService, HolidayRepositoryWrapper holidayRepository, - WorkingDaysRepositoryWrapper workingDaysRepository, - DepositAccountOnHoldTransactionRepository depositAccountOnHoldTransactionRepository + SavingsAccountRepositoryWrapper savingAccountRepositoryWrapper, + SavingsAccountTransactionRepository savingsAccountTransactionRepository, DepositAccountAssembler depositAccountAssembler, + DepositAccountTransactionDataValidator depositAccountTransactionDataValidator, + SavingsAccountChargeDataValidator savingsAccountChargeDataValidator, + PaymentDetailWritePlatformService paymentDetailWritePlatformService, + ApplicationCurrencyRepositoryWrapper applicationCurrencyRepositoryWrapper, + JournalEntryWritePlatformService journalEntryWritePlatformService, DepositAccountDomainService depositAccountDomainService, + NoteRepository noteRepository, AccountTransfersReadPlatformService accountTransfersReadPlatformService, + ChargeRepositoryWrapper chargeRepository, SavingsAccountChargeRepositoryWrapper savingsAccountChargeRepository, + AccountAssociationsReadPlatformService accountAssociationsReadPlatformService, + AccountTransfersWritePlatformService accountTransfersWritePlatformService, + DepositAccountReadPlatformService depositAccountReadPlatformService, CalendarInstanceRepository calendarInstanceRepository, + ConfigurationDomainService configurationDomainService, HolidayRepositoryWrapper holidayRepository, + WorkingDaysRepositoryWrapper workingDaysRepository, + DepositAccountOnHoldTransactionRepository depositAccountOnHoldTransactionRepository ) { return new DepositAccountWritePlatformServiceJpaRepositoryImpl(context, savingAccountRepositoryWrapper, @@ -247,16 +247,16 @@ public DepositAccountWritePlatformService depositAccountWritePlatformService(Pla @Bean @ConditionalOnMissingBean(DepositApplicationProcessWritePlatformService.class) public DepositApplicationProcessWritePlatformService depositApplicationProcessWritePlatformService(PlatformSecurityContext context, - SavingsAccountRepositoryWrapper savingAccountRepository, FixedDepositAccountRepository fixedDepositAccountRepository, - RecurringDepositAccountRepository recurringDepositAccountRepository, DepositAccountAssembler depositAccountAssembler, - DepositAccountDataValidator depositAccountDataValidator, AccountNumberGenerator accountNumberGenerator, - ClientRepositoryWrapper clientRepository, GroupRepository groupRepository, SavingsProductRepository savingsProductRepository, - NoteRepository noteRepository, StaffRepositoryWrapper staffRepository, - SavingsAccountApplicationTransitionApiJsonValidator savingsAccountApplicationTransitionApiJsonValidator, - SavingsAccountChargeAssembler savingsAccountChargeAssembler, AccountAssociationsRepository accountAssociationsRepository, - FromJsonHelper fromJsonHelper, CalendarInstanceRepository calendarInstanceRepository, - ConfigurationDomainService configurationDomainService, AccountNumberFormatRepositoryWrapper accountNumberFormatRepository, - BusinessEventNotifierService businessEventNotifierService) { + SavingsAccountRepositoryWrapper savingAccountRepository, FixedDepositAccountRepository fixedDepositAccountRepository, + RecurringDepositAccountRepository recurringDepositAccountRepository, DepositAccountAssembler depositAccountAssembler, + DepositAccountDataValidator depositAccountDataValidator, AccountNumberGenerator accountNumberGenerator, + ClientRepositoryWrapper clientRepository, GroupRepository groupRepository, SavingsProductRepository savingsProductRepository, + NoteRepository noteRepository, StaffRepositoryWrapper staffRepository, + SavingsAccountApplicationTransitionApiJsonValidator savingsAccountApplicationTransitionApiJsonValidator, + SavingsAccountChargeAssembler savingsAccountChargeAssembler, AccountAssociationsRepository accountAssociationsRepository, + FromJsonHelper fromJsonHelper, CalendarInstanceRepository calendarInstanceRepository, + ConfigurationDomainService configurationDomainService, AccountNumberFormatRepositoryWrapper accountNumberFormatRepository, + BusinessEventNotifierService businessEventNotifierService) { return new DepositApplicationProcessWritePlatformServiceJpaRepositoryImpl(context, savingAccountRepository, fixedDepositAccountRepository, recurringDepositAccountRepository, depositAccountAssembler, depositAccountDataValidator, accountNumberGenerator, clientRepository, groupRepository, savingsProductRepository, noteRepository, staffRepository, @@ -268,7 +268,7 @@ public DepositApplicationProcessWritePlatformService depositApplicationProcessWr @Bean @ConditionalOnMissingBean(DepositProductReadPlatformService.class) public DepositProductReadPlatformService depositProductReadPlatformService(PlatformSecurityContext context, JdbcTemplate jdbcTemplate, - InterestRateChartReadService interestRateChartReadPlatformService) { + InterestRateChartReadService interestRateChartReadPlatformService) { return new DepositProductReadPlatformServiceImpl(context, jdbcTemplate, interestRateChartReadPlatformService); } @@ -281,9 +281,9 @@ public DepositsDropdownReadPlatformService depositsDropdownReadPlatformService() @Bean @ConditionalOnMissingBean(FixedDepositProductWritePlatformService.class) public FixedDepositProductWritePlatformService fixedDepositProductWritePlatformService(PlatformSecurityContext context, - FixedDepositProductRepository fixedDepositProductRepository, DepositProductDataValidator fromApiJsonDataValidator, - DepositProductAssembler depositProductAssembler, - ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService, InterestRateChartAssembler chartAssembler) { + FixedDepositProductRepository fixedDepositProductRepository, DepositProductDataValidator fromApiJsonDataValidator, + DepositProductAssembler depositProductAssembler, + ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService, InterestRateChartAssembler chartAssembler) { return new FixedDepositProductWritePlatformServiceJpaRepositoryImpl(context, fixedDepositProductRepository, fromApiJsonDataValidator, depositProductAssembler, accountMappingWritePlatformService, chartAssembler); } @@ -298,16 +298,16 @@ public GroupSavingsIndividualMonitoringWritePlatformService groupSavingsIndividu @Bean @ConditionalOnMissingBean(GSIMReadPlatformService.class) public GSIMReadPlatformService gsimReadPlatformService(JdbcTemplate jdbcTemplate, PlatformSecurityContext context, - ColumnValidator columnValidator) { + ColumnValidator columnValidator) { return new GSIMReadPlatformServiceImpl(jdbcTemplate, context, columnValidator); } @Bean @ConditionalOnMissingBean(RecurringDepositProductWritePlatformService.class) public RecurringDepositProductWritePlatformService recurringDepositProductWritePlatformService(PlatformSecurityContext context, - RecurringDepositProductRepository recurringDepositProductRepository, DepositProductDataValidator fromApiJsonDataValidator, - DepositProductAssembler depositProductAssembler, - ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService, InterestRateChartAssembler chartAssembler) { + RecurringDepositProductRepository recurringDepositProductRepository, DepositProductDataValidator fromApiJsonDataValidator, + DepositProductAssembler depositProductAssembler, + ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService, InterestRateChartAssembler chartAssembler) { return new RecurringDepositProductWritePlatformServiceJpaRepositoryImpl(context, recurringDepositProductRepository, fromApiJsonDataValidator, depositProductAssembler, accountMappingWritePlatformService, chartAssembler); } @@ -322,8 +322,8 @@ public SavingsAccountApplicationTransitionApiJsonValidator savingsAccountApplica @Bean @ConditionalOnMissingBean(SavingsAccountChargeReadPlatformService.class) public SavingsAccountChargeReadPlatformService savingsAccountChargeReadPlatformService(PlatformSecurityContext context, - ChargeDropdownReadPlatformService chargeDropdownReadPlatformService, JdbcTemplate jdbcTemplate, - DropdownReadPlatformService dropdownReadPlatformService, DatabaseSpecificSQLGenerator sqlGenerator) { + ChargeDropdownReadPlatformService chargeDropdownReadPlatformService, JdbcTemplate jdbcTemplate, + DropdownReadPlatformService dropdownReadPlatformService, DatabaseSpecificSQLGenerator sqlGenerator) { return new SavingsAccountChargeReadPlatformServiceImpl(context, chargeDropdownReadPlatformService, jdbcTemplate, dropdownReadPlatformService, sqlGenerator); } @@ -337,8 +337,8 @@ public SavingsAccountInterestPostingService savingsAccountInterestPostingService @Bean @ConditionalOnMissingBean(SavingsAccountReadPlatformService.class) public SavingsAccountReadPlatformService savingsAccountReadPlatformService(PlatformSecurityContext context, JdbcTemplate jdbcTemplate, - SavingsAccountAssembler savingAccountAssembler, PaginationHelper paginationHelper, DatabaseSpecificSQLGenerator sqlGenerator, - SavingsAccountRepositoryWrapper savingsAccountRepositoryWrapper, ColumnValidator columnValidator) { + SavingsAccountAssembler savingAccountAssembler, PaginationHelper paginationHelper, DatabaseSpecificSQLGenerator sqlGenerator, + SavingsAccountRepositoryWrapper savingsAccountRepositoryWrapper, ColumnValidator columnValidator) { return new SavingsAccountReadPlatformServiceImpl(context, jdbcTemplate, savingAccountAssembler, paginationHelper, columnValidator, sqlGenerator, savingsAccountRepositoryWrapper); } @@ -346,11 +346,11 @@ public SavingsAccountReadPlatformService savingsAccountReadPlatformService(Platf @Bean @ConditionalOnMissingBean(SavingsAccountTemplateReadPlatformService.class) public SavingsAccountTemplateReadPlatformService savingsAccountTemplateReadPlatformService(PlatformSecurityContext context, - JdbcTemplate jdbcTemplate, ClientReadPlatformService clientReadPlatformService, - GroupReadPlatformService groupReadPlatformService, SavingsProductReadPlatformService savingProductReadPlatformService, - StaffReadService staffReadPlatformService, SavingsDropdownReadPlatformService dropdownReadPlatformService, - ChargeReadPlatformService chargeReadPlatformService, EntityDatatableChecksReadService entityDatatableChecksReadService, - ColumnValidator columnValidator) { + JdbcTemplate jdbcTemplate, ClientReadPlatformService clientReadPlatformService, + GroupReadPlatformService groupReadPlatformService, SavingsProductReadPlatformService savingProductReadPlatformService, + StaffReadService staffReadPlatformService, SavingsDropdownReadPlatformService dropdownReadPlatformService, + ChargeReadPlatformService chargeReadPlatformService, EntityDatatableChecksReadService entityDatatableChecksReadService, + ColumnValidator columnValidator) { return new SavingsAccountTemplateReadPlatformServiceImpl(context, jdbcTemplate, clientReadPlatformService, groupReadPlatformService, savingProductReadPlatformService, staffReadPlatformService, dropdownReadPlatformService, chargeReadPlatformService, entityDatatableChecksReadService, columnValidator); @@ -359,21 +359,21 @@ public SavingsAccountTemplateReadPlatformService savingsAccountTemplateReadPlatf @Bean @ConditionalOnMissingBean(SavingsAccountWritePlatformService.class) public SavingsAccountWritePlatformService savingsAccountWritePlatformService(PlatformSecurityContext context, - SavingsAccountDataValidator fromApiJsonDeserializer, SavingsAccountRepositoryWrapper savingAccountRepositoryWrapper, - StaffRepositoryWrapper staffRepository, SavingsAccountTransactionRepository savingsAccountTransactionRepository, - SavingsAccountAssembler savingAccountAssembler, SavingsAccountTransactionDataValidator savingsAccountTransactionDataValidator, - SavingsAccountChargeDataValidator savingsAccountChargeDataValidator, - PaymentDetailWritePlatformService paymentDetailWritePlatformService, - JournalEntryWritePlatformService journalEntryWritePlatformService, SavingsAccountDomainService savingsAccountDomainService, - NoteRepository noteRepository, AccountTransfersReadPlatformService accountTransfersReadPlatformService, - AccountAssociationsReadPlatformService accountAssociationsReadPlatformService, ChargeRepositoryWrapper chargeRepository, - SavingsAccountChargeRepositoryWrapper savingsAccountChargeRepository, HolidayRepositoryWrapper holidayRepository, - WorkingDaysRepositoryWrapper workingDaysRepository, ConfigurationDomainService configurationDomainService, - DepositAccountOnHoldTransactionRepository depositAccountOnHoldTransactionRepository, - EntityDatatableChecksWritePlatformService entityDatatableChecksWritePlatformService, AppUserRepositoryWrapper appuserRepository, - StandingInstructionRepository standingInstructionRepository, BusinessEventNotifierService businessEventNotifierService, - GSIMRepositoy gsimRepository, SavingsAccountInterestPostingService savingsAccountInterestPostingService, - ErrorHandler errorHandler) { + SavingsAccountDataValidator fromApiJsonDeserializer, SavingsAccountRepositoryWrapper savingAccountRepositoryWrapper, + StaffRepositoryWrapper staffRepository, SavingsAccountTransactionRepository savingsAccountTransactionRepository, + SavingsAccountAssembler savingAccountAssembler, SavingsAccountTransactionDataValidator savingsAccountTransactionDataValidator, + SavingsAccountChargeDataValidator savingsAccountChargeDataValidator, + PaymentDetailWritePlatformService paymentDetailWritePlatformService, + JournalEntryWritePlatformService journalEntryWritePlatformService, SavingsAccountDomainService savingsAccountDomainService, + NoteRepository noteRepository, AccountTransfersReadPlatformService accountTransfersReadPlatformService, + AccountAssociationsReadPlatformService accountAssociationsReadPlatformService, ChargeRepositoryWrapper chargeRepository, + SavingsAccountChargeRepositoryWrapper savingsAccountChargeRepository, HolidayRepositoryWrapper holidayRepository, + WorkingDaysRepositoryWrapper workingDaysRepository, ConfigurationDomainService configurationDomainService, + DepositAccountOnHoldTransactionRepository depositAccountOnHoldTransactionRepository, + EntityDatatableChecksWritePlatformService entityDatatableChecksWritePlatformService, AppUserRepositoryWrapper appuserRepository, + StandingInstructionRepository standingInstructionRepository, BusinessEventNotifierService businessEventNotifierService, + GSIMRepositoy gsimRepository, SavingsAccountInterestPostingService savingsAccountInterestPostingService, + ErrorHandler errorHandler) { return new SavingsAccountWritePlatformServiceJpaRepositoryImpl(context, fromApiJsonDeserializer, savingAccountRepositoryWrapper, staffRepository, savingsAccountTransactionRepository, savingAccountAssembler, savingsAccountTransactionDataValidator, savingsAccountChargeDataValidator, paymentDetailWritePlatformService, journalEntryWritePlatformService, @@ -387,16 +387,16 @@ public SavingsAccountWritePlatformService savingsAccountWritePlatformService(Pla @Bean @ConditionalOnMissingBean(SavingsApplicationProcessWritePlatformService.class) public SavingsApplicationProcessWritePlatformService savingsApplicationProcessWritePlatformService(PlatformSecurityContext context, - SavingsAccountRepositoryWrapper savingAccountRepository, SavingsAccountAssembler savingAccountAssembler, - SavingsAccountDataValidator savingsAccountDataValidator, AccountNumberGenerator accountNumberGenerator, - ClientRepositoryWrapper clientRepository, GroupRepository groupRepository, SavingsProductRepository savingsProductRepository, - NoteRepository noteRepository, StaffRepositoryWrapper staffRepository, - SavingsAccountApplicationTransitionApiJsonValidator savingsAccountApplicationTransitionApiJsonValidator, - SavingsAccountChargeAssembler savingsAccountChargeAssembler, CommandProcessingService commandProcessingService, - SavingsAccountDomainService savingsAccountDomainService, SavingsAccountWritePlatformService savingsAccountWritePlatformService, - AccountNumberFormatRepositoryWrapper accountNumberFormatRepository, BusinessEventNotifierService businessEventNotifierService, - EntityDatatableChecksWritePlatformService entityDatatableChecksWritePlatformService, GSIMRepositoy gsimRepository, - GroupRepositoryWrapper groupRepositoryWrapper, GroupSavingsIndividualMonitoringWritePlatformService gsimWritePlatformService) { + SavingsAccountRepositoryWrapper savingAccountRepository, SavingsAccountAssembler savingAccountAssembler, + SavingsAccountDataValidator savingsAccountDataValidator, AccountNumberGenerator accountNumberGenerator, + ClientRepositoryWrapper clientRepository, GroupRepository groupRepository, SavingsProductRepository savingsProductRepository, + NoteRepository noteRepository, StaffRepositoryWrapper staffRepository, + SavingsAccountApplicationTransitionApiJsonValidator savingsAccountApplicationTransitionApiJsonValidator, + SavingsAccountChargeAssembler savingsAccountChargeAssembler, CommandProcessingService commandProcessingService, + SavingsAccountDomainService savingsAccountDomainService, SavingsAccountWritePlatformService savingsAccountWritePlatformService, + AccountNumberFormatRepositoryWrapper accountNumberFormatRepository, BusinessEventNotifierService businessEventNotifierService, + EntityDatatableChecksWritePlatformService entityDatatableChecksWritePlatformService, GSIMRepositoy gsimRepository, + GroupRepositoryWrapper groupRepositoryWrapper, GroupSavingsIndividualMonitoringWritePlatformService gsimWritePlatformService) { return new SavingsApplicationProcessWritePlatformServiceJpaRepositoryImpl(context, savingAccountRepository, savingAccountAssembler, savingsAccountDataValidator, accountNumberGenerator, clientRepository, groupRepository, savingsProductRepository, noteRepository, staffRepository, savingsAccountApplicationTransitionApiJsonValidator, savingsAccountChargeAssembler, @@ -414,17 +414,17 @@ public SavingsDropdownReadPlatformService savingsDropdownReadPlatformService() { @Bean @ConditionalOnMissingBean(SavingsProductReadPlatformService.class) public SavingsProductReadPlatformService savingsProductReadPlatformService(PlatformSecurityContext context, JdbcTemplate jdbcTemplate, - FineractEntityAccessUtil fineractEntityAccessUtil) { + FineractEntityAccessUtil fineractEntityAccessUtil) { return new SavingsProductReadPlatformServiceImpl(context, jdbcTemplate, fineractEntityAccessUtil); } @Bean @ConditionalOnMissingBean(SavingsProductWritePlatformService.class) public SavingsProductWritePlatformService savingsProductWritePlatformService(PlatformSecurityContext context, - SavingsProductRepository savingProductRepository, SavingsProductDataValidator fromApiJsonDataValidator, - SavingsProductAssembler savingsProductAssembler, - ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService, - FineractEntityAccessUtil fineractEntityAccessUtil) { + SavingsProductRepository savingProductRepository, SavingsProductDataValidator fromApiJsonDataValidator, + SavingsProductAssembler savingsProductAssembler, + ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService, + FineractEntityAccessUtil fineractEntityAccessUtil) { return new SavingsProductWritePlatformServiceJpaRepositoryImpl(context, savingProductRepository, fromApiJsonDataValidator, savingsProductAssembler, accountMappingWritePlatformService, fineractEntityAccessUtil); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/api/SearchApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/api/SearchApiResourceSwagger.java index 138a89d855b..c8fce6f4659 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/api/SearchApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/api/SearchApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.portfolio.search.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; /** diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/data/AdHocQuerySearchRequest.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/data/AdHocQuerySearchRequest.java index 75090df0a25..874e7d38307 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/data/AdHocQuerySearchRequest.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/data/AdHocQuerySearchRequest.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; + import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/data/AdHocSearchQueryData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/data/AdHocSearchQueryData.java index 7be2823fd14..59b1329dd59 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/data/AdHocSearchQueryData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/data/AdHocSearchQueryData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.util.Collection; + import lombok.Getter; import org.apache.fineract.organisation.office.data.OfficeData; import org.apache.fineract.portfolio.loanproduct.data.LoanProductData; @@ -53,7 +54,7 @@ public static AdHocSearchQueryData template(final Collection lo } public static AdHocSearchQueryData matchedResult(final String officeName, final String loanProductName, final Integer count, - final BigDecimal loanOutStanding, final Double percentage) { + final BigDecimal loanOutStanding, final Double percentage) { final Collection loanProducts = null; final Collection offices = null; @@ -61,8 +62,8 @@ public static AdHocSearchQueryData matchedResult(final String officeName, final } private AdHocSearchQueryData(final String officeName, final String loanProductName, final Integer count, - final BigDecimal loanOutStanding, final Double percentage, final Collection loanProducts, - final Collection offices) { + final BigDecimal loanOutStanding, final Double percentage, final Collection loanProducts, + final Collection offices) { this.officeName = officeName; this.loanProductName = loanProductName; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/service/SearchReadService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/service/SearchReadService.java index 7b3d791b7bf..ab1f2560c9e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/service/SearchReadService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/service/SearchReadService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.search.service; import java.util.List; + import org.apache.fineract.portfolio.search.data.AdHocQuerySearchRequest; import org.apache.fineract.portfolio.search.data.AdHocSearchQueryData; import org.apache.fineract.portfolio.search.data.SearchConditions; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/service/SearchReadServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/service/SearchReadServiceImpl.java index fcc8f159cac..38ff02fd48d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/service/SearchReadServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/search/service/SearchReadServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.sql.SQLException; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.EnumOptionData; @@ -279,7 +280,7 @@ private static final class AdHocQuerySearchMapper implements RowMapper * 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 @@ -35,8 +35,8 @@ public class SearchConfiguration { @Bean @ConditionalOnMissingBean(SearchReadService.class) public SearchReadService searchReadService(NamedParameterJdbcTemplate namedParameterJdbcTemplate, - LoanProductReadPlatformService loanProductReadPlatformService, OfficeReadPlatformService officeReadPlatformService, - DatabaseSpecificSQLGenerator sqlGenerator, SqlValidator sqlValidator) { + LoanProductReadPlatformService loanProductReadPlatformService, OfficeReadPlatformService officeReadPlatformService, + DatabaseSpecificSQLGenerator sqlGenerator, SqlValidator sqlValidator) { return new SearchReadServiceImpl(namedParameterJdbcTemplate, loanProductReadPlatformService, officeReadPlatformService, sqlGenerator, sqlValidator); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountApplicationTimelineData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountApplicationTimelineData.java index 103694dbce6..977f8ef9cf7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountApplicationTimelineData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountApplicationTimelineData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.io.Serializable; import java.time.LocalDate; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.jersey.serializer.legacy.JsonLocalDateArrayFormat; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountChargeData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountChargeData.java index 03b23fd6c84..2591a1c9f8d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountChargeData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountChargeData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serializable; import java.math.BigDecimal; import java.util.Collection; + import lombok.Getter; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.organisation.monetary.data.CurrencyData; @@ -84,10 +85,10 @@ public ShareAccountChargeData(Long chargeId, BigDecimal amount) { } public ShareAccountChargeData(final Long id, final Long chargeId, final Long accountId, final String name, final CurrencyData currency, - final BigDecimal amount, final BigDecimal amountPaid, final BigDecimal amountWaived, final BigDecimal amountWrittenOff, - final BigDecimal amountOutstanding, final EnumOptionData chargeTimeType, final EnumOptionData chargeCalculationType, - final BigDecimal percentage, final BigDecimal amountPercentageAppliedTo, final Collection chargeOptions, - final Boolean isActive, final BigDecimal chargeamountorpercentage) { + final BigDecimal amount, final BigDecimal amountPaid, final BigDecimal amountWaived, final BigDecimal amountWrittenOff, + final BigDecimal amountOutstanding, final EnumOptionData chargeTimeType, final EnumOptionData chargeCalculationType, + final BigDecimal percentage, final BigDecimal amountPercentageAppliedTo, final Collection chargeOptions, + final Boolean isActive, final BigDecimal chargeamountorpercentage) { this.id = id; this.chargeId = chargeId; this.accountId = accountId; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountData.java index 0430001bbfa..d45e331798f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountData.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.Collection; + import lombok.Getter; import org.apache.fineract.accounting.glaccount.data.GLAccountData; import org.apache.fineract.infrastructure.core.data.EnumOptionData; @@ -94,19 +95,19 @@ public class ShareAccountData implements Serializable, AccountData { private String dateFormat; public static ShareAccountData importInstance(Long clientId, Long productId, Integer requestedShares, String externalId, - LocalDate submittedOnDate, Integer minimumActivePeriodDays, Integer minimumActivePeriodFrequencyType, - Integer lockinPeriodFrequency, Integer lockinPeriodFrequencyType, LocalDate applicationDate, - Boolean allowDividendCalculationForInactiveClients, Collection charges, Long defaultSavingsAccountId, - Integer rowIndex, String locale, String dateFormat) { + LocalDate submittedOnDate, Integer minimumActivePeriodDays, Integer minimumActivePeriodFrequencyType, + Integer lockinPeriodFrequency, Integer lockinPeriodFrequencyType, LocalDate applicationDate, + Boolean allowDividendCalculationForInactiveClients, Collection charges, Long defaultSavingsAccountId, + Integer rowIndex, String locale, String dateFormat) { return new ShareAccountData(clientId, productId, requestedShares, externalId, submittedOnDate, minimumActivePeriodDays, minimumActivePeriodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType, applicationDate, allowDividendCalculationForInactiveClients, charges, defaultSavingsAccountId, rowIndex, locale, dateFormat); } private ShareAccountData(Long clientId, Long productId, Integer requestedShares, String externalId, LocalDate submittedDate, - Integer minimumActivePeriod, Integer minimumActivePeriodFrequencyType, Integer lockinPeriodFrequency, - Integer lockinPeriodFrequencyType, LocalDate applicationDate, Boolean allowDividendCalculationForInactiveClients, - Collection charges, Long savingsAccountId, Integer rowIndex, String locale, String dateFormat) { + Integer minimumActivePeriod, Integer minimumActivePeriodFrequencyType, Integer lockinPeriodFrequency, + Integer lockinPeriodFrequencyType, LocalDate applicationDate, Boolean allowDividendCalculationForInactiveClients, + Collection charges, Long savingsAccountId, Integer rowIndex, String locale, String dateFormat) { this.clientId = clientId; this.productId = productId; @@ -155,12 +156,12 @@ private ShareAccountData(Long clientId, Long productId, Integer requestedShares, private Collection clientSavingsAccounts; public ShareAccountData(final Long id, final String accountNo, final String externalId, final Long savingsAccountId, - final String savingsAccountNumber, final Long clientId, final String clientName, final Long productId, final String productName, - final ShareAccountStatusEnumData status, final ShareAccountApplicationTimelineData timeline, final CurrencyData currency, - final ShareAccountSummaryData summaryData, final Collection charges, - final Collection purchasedSharesData, final Integer lockinPeriod, - final EnumOptionData lockPeriodTypeEnum, final Integer minimumActivePeriod, final EnumOptionData minimumActivePeriodTypeEnum, - Boolean allowdividendsforinactiveclients) { + final String savingsAccountNumber, final Long clientId, final String clientName, final Long productId, final String productName, + final ShareAccountStatusEnumData status, final ShareAccountApplicationTimelineData timeline, final CurrencyData currency, + final ShareAccountSummaryData summaryData, final Collection charges, + final Collection purchasedSharesData, final Integer lockinPeriod, + final EnumOptionData lockPeriodTypeEnum, final Integer minimumActivePeriod, final EnumOptionData minimumActivePeriodTypeEnum, + Boolean allowdividendsforinactiveclients) { this.id = id; this.accountNo = accountNo; this.externalId = externalId; @@ -184,7 +185,7 @@ public ShareAccountData(final Long id, final String accountNo, final String exte } public ShareAccountData(final Long clientId, final String clientName, final Collection productOptions, - final Collection chargeOptions) { + final Collection chargeOptions) { this.clientId = clientId; this.clientName = clientName; this.productOptions = productOptions; @@ -192,10 +193,10 @@ public ShareAccountData(final Long clientId, final String clientName, final Coll } public ShareAccountData(final Long clientId, final String clientName, final CurrencyData currency, - final Collection charges, final BigDecimal currentMarketPrice, - final Collection minimumActivePeriodFrequencyTypeOptions, - final Collection lockinPeriodFrequencyTypeOptions, final Collection clientSavingsAccounts, - final Long defaultShares) { + final Collection charges, final BigDecimal currentMarketPrice, + final Collection minimumActivePeriodFrequencyTypeOptions, + final Collection lockinPeriodFrequencyTypeOptions, final Collection clientSavingsAccounts, + final Long defaultShares) { this.clientId = clientId; this.clientName = clientName; this.charges = charges; @@ -209,15 +210,15 @@ public ShareAccountData(final Long clientId, final String clientName, final Curr } private ShareAccountData(final Long id, final String accountNo, final String externalId, final Long savingsAccountId, - final String savingsAccountNumber, final Long clientId, final String clientName, final Long productId, final String productName, - final ShareAccountStatusEnumData status, final ShareAccountApplicationTimelineData timeline, final CurrencyData currency, - final ShareAccountSummaryData summaryData, final Collection charges, - final Collection purchasedSharesData, final Integer lockinPeriod, - final EnumOptionData lockPeriodTypeEnum, final Integer minimumActivePeriod, final EnumOptionData minimumActivePeriodTypeEnum, - final Boolean allowDividendCalculationForInactiveClients, final Collection productOptions, - final Collection chargeOptions, final Collection clientSavingsAccounts, - final Collection lockinPeriodFrequencyTypeOptions, - final Collection minimumActivePeriodFrequencyTypeOption, final BigDecimal currenMarketPrice) { + final String savingsAccountNumber, final Long clientId, final String clientName, final Long productId, final String productName, + final ShareAccountStatusEnumData status, final ShareAccountApplicationTimelineData timeline, final CurrencyData currency, + final ShareAccountSummaryData summaryData, final Collection charges, + final Collection purchasedSharesData, final Integer lockinPeriod, + final EnumOptionData lockPeriodTypeEnum, final Integer minimumActivePeriod, final EnumOptionData minimumActivePeriodTypeEnum, + final Boolean allowDividendCalculationForInactiveClients, final Collection productOptions, + final Collection chargeOptions, final Collection clientSavingsAccounts, + final Collection lockinPeriodFrequencyTypeOptions, + final Collection minimumActivePeriodFrequencyTypeOption, final BigDecimal currenMarketPrice) { this.id = id; this.accountNo = accountNo; this.externalId = externalId; @@ -247,9 +248,9 @@ private ShareAccountData(final Long id, final String accountNo, final String ext } public static ShareAccountData template(ShareAccountData data, Collection productOptions, - Collection chargeOptions, Collection clientSavingsAccounts, - Collection lockinPeriodFrequencyTypeOptions, - Collection minimumActivePeriodFrequencyTypeOptions) { + Collection chargeOptions, Collection clientSavingsAccounts, + Collection lockinPeriodFrequencyTypeOptions, + Collection minimumActivePeriodFrequencyTypeOptions) { return new ShareAccountData(data.id, data.accountNo, data.externalId, data.savingsAccountId, data.savingsAccountNumber, data.clientId, data.clientName, data.productId, data.productName, data.status, data.timeline, data.currency, data.summary, data.charges, data.purchasedShares, data.lockinPeriod, data.lockPeriodTypeEnum, data.minimumActivePeriod, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountDividendData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountDividendData.java index a955639c0b5..6c4ccb45d59 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountDividendData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountDividendData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; @@ -46,7 +47,7 @@ public ShareAccountDividendData(final Long id, final ShareAccountData accountDat } public ShareAccountDividendData(final Long id, final ShareAccountData accountData, final BigDecimal amount, final EnumOptionData status, - final Long savingsTransactionId) { + final Long savingsTransactionId) { this.id = id; this.accountData = accountData; this.amount = amount; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountStatusEnumData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountStatusEnumData.java index bb7e11af5e1..a547072c6b0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountStatusEnumData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountStatusEnumData.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.shareaccounts.data; import java.io.Serializable; + import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountTransactionData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountTransactionData.java index 180a5fbd939..965cc93de6c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountTransactionData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountTransactionData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.io.Serializable; import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountTransactionEnumData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountTransactionEnumData.java index 3d59c2c8b83..90ec961d68b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountTransactionEnumData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/data/ShareAccountTransactionEnumData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/PurchasedSharesStatusType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/PurchasedSharesStatusType.java index 6c10b5b9ef5..83fd35d66d0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/PurchasedSharesStatusType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/PurchasedSharesStatusType.java @@ -6,9 +6,9 @@ * 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 @@ -42,22 +42,22 @@ public static PurchasedSharesStatusType fromInt(final Integer type) { switch (type) { case 100: enumeration = PurchasedSharesStatusType.APPLIED; - break; + break; case 300: enumeration = PurchasedSharesStatusType.APPROVED; - break; + break; case 400: enumeration = PurchasedSharesStatusType.REJECTED; - break; + break; case 500: enumeration = PurchasedSharesStatusType.PURCHASED; - break; + break; case 600: enumeration = PurchasedSharesStatusType.REDEEMED; - break; + break; case 700: enumeration = PurchasedSharesStatusType.CHARGE_PAYMENT; - break; + break; } return enumeration; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccount.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccount.java index ee231b70130..a077bc89a3c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccount.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccount.java @@ -6,9 +6,9 @@ * 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 @@ -30,10 +30,12 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.Table; import jakarta.persistence.Transient; + import java.time.LocalDate; import java.time.LocalDateTime; import java.util.HashSet; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -152,13 +154,13 @@ protected ShareAccount() { } public ShareAccount(final Client client, final ShareProduct shareProduct, final String externalId, final MonetaryCurrency currency, - final SavingsAccount savingsAccount, final String accountNo, final Long totalSharesApproved, final Long totalSharesPending, - final Set purchasedShares, final Boolean allowDividendCalculationForInactiveClients, - final Integer lockinPeriodFrequency, final PeriodFrequencyType lockPeriodType, final Integer minimumActivePeriodFrequency, - final PeriodFrequencyType minimumActivePeriodType, Set charges, AppUser submittedBy, - final LocalDate submittedDate, AppUser approvedBy, LocalDate approvedDate, AppUser rejectedBy, LocalDate rejectedDate, - AppUser activatedBy, LocalDate activatedDate, AppUser closedBy, LocalDate closedDate, AppUser modifiedBy, - LocalDateTime modifiedDate) { + final SavingsAccount savingsAccount, final String accountNo, final Long totalSharesApproved, final Long totalSharesPending, + final Set purchasedShares, final Boolean allowDividendCalculationForInactiveClients, + final Integer lockinPeriodFrequency, final PeriodFrequencyType lockPeriodType, final Integer minimumActivePeriodFrequency, + final PeriodFrequencyType minimumActivePeriodType, Set charges, AppUser submittedBy, + final LocalDate submittedDate, AppUser approvedBy, LocalDate approvedDate, AppUser rejectedBy, LocalDate rejectedDate, + AppUser activatedBy, LocalDate activatedDate, AppUser closedBy, LocalDate closedDate, AppUser modifiedBy, + LocalDateTime modifiedDate) { this.client = client; this.shareProduct = shareProduct; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountCharge.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountCharge.java index 79953b34ddc..2ccd5cf2380 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountCharge.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountCharge.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.math.MathContext; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; import org.apache.fineract.organisation.monetary.domain.Money; @@ -85,7 +87,7 @@ public class ShareAccountCharge extends AbstractPersistableCustom { private BigDecimal amountOrPercentage; public static ShareAccountCharge createNewWithoutShareAccount(final Charge chargeDefinition, final BigDecimal amountPayable, - final ChargeTimeType chargeTime, final ChargeCalculationType chargeCalculation, final boolean status) { + final ChargeTimeType chargeTime, final ChargeCalculationType chargeCalculation, final boolean status) { return new ShareAccountCharge(null, chargeDefinition, amountPayable, chargeTime, chargeCalculation, status); } @@ -94,7 +96,7 @@ protected ShareAccountCharge() { } private ShareAccountCharge(final ShareAccount shareAccount, final Charge chargeDefinition, final BigDecimal amount, - final ChargeTimeType chargeTime, final ChargeCalculationType chargeCalculation, final boolean status) { + final ChargeTimeType chargeTime, final ChargeCalculationType chargeCalculation, final boolean status) { this.shareAccount = shareAccount; this.charge = chargeDefinition; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountChargePaidBy.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountChargePaidBy.java index 0911cd06028..cfe79cb1fed 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountChargePaidBy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountChargePaidBy.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @Entity @@ -46,7 +48,7 @@ protected ShareAccountChargePaidBy() { } public ShareAccountChargePaidBy(final ShareAccountTransaction shareAccountTransaction, final ShareAccountCharge shareAccountCharge, - final BigDecimal amount) { + final BigDecimal amount) { this.shareAccountTransaction = shareAccountTransaction; this.shareAccountCharge = shareAccountCharge; this.amount = amount; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountDividendDetails.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountDividendDetails.java index aba53679f23..df8f808bb3a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountDividendDetails.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountDividendDetails.java @@ -6,9 +6,9 @@ * 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 @@ -23,7 +23,9 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.portfolio.shareproducts.domain.ShareProductDividendPayOutDetails; @@ -52,7 +54,7 @@ protected ShareAccountDividendDetails() { } public ShareAccountDividendDetails(final Long shareAccountId, final BigDecimal amount, - final ShareProductDividendPayOutDetails productDividentPayOutDetails) { + final ShareProductDividendPayOutDetails productDividentPayOutDetails) { this.shareAccountId = shareAccountId; this.amount = amount; this.productDividentPayOutDetails = productDividentPayOutDetails; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountDividendRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountDividendRepository.java index 5ea2af8c50e..8e8a4d01630 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountDividendRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountDividendRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountDividendStatusType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountDividendStatusType.java index 04ae18aa456..4502b7b368d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountDividendStatusType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountDividendStatusType.java @@ -6,9 +6,9 @@ * 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 @@ -38,10 +38,10 @@ public static ShareAccountDividendStatusType fromInt(final Integer type) { switch (type) { case 100: enumeration = ShareAccountDividendStatusType.INITIATED; - break; + break; case 300: enumeration = ShareAccountDividendStatusType.POSTED; - break; + break; } return enumeration; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountRepository.java index 437046f2ba6..2ba71a4f400 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountRepositoryWrapper.java index 59a0820e1b3..bba5aa077a0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountStatusType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountStatusType.java index dd93a401b5f..042333cd316 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountStatusType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountStatusType.java @@ -6,9 +6,9 @@ * 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 @@ -39,19 +39,19 @@ public static ShareAccountStatusType fromInt(final Integer type) { switch (type) { case 100: enumeration = ShareAccountStatusType.SUBMITTED_AND_PENDING_APPROVAL; - break; + break; case 200: enumeration = ShareAccountStatusType.APPROVED; - break; + break; case 300: enumeration = ShareAccountStatusType.ACTIVE; - break; + break; case 500: enumeration = ShareAccountStatusType.REJECTED; - break; + break; case 600: enumeration = ShareAccountStatusType.CLOSED; - break; + break; } return enumeration; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountTransaction.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountTransaction.java index af21e9cab93..3c00a1fa6b4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountTransaction.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/domain/ShareAccountTransaction.java @@ -6,9 +6,9 @@ * 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 @@ -26,10 +26,12 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OneToMany; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.HashSet; import java.util.Set; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @Entity @@ -89,7 +91,7 @@ public ShareAccountTransaction(final LocalDate transactionDate, final Long total } private ShareAccountTransaction(final LocalDate transactionDate, final Long totalShares, final BigDecimal shareValue, - final Integer status, final Integer type, final BigDecimal amount, final BigDecimal chargeAmount, final BigDecimal amountPaid) { + final Integer status, final Integer type, final BigDecimal amount, final BigDecimal chargeAmount, final BigDecimal amountPaid) { this.transactionDate = transactionDate; this.totalShares = totalShares; this.shareValue = shareValue; @@ -101,7 +103,7 @@ private ShareAccountTransaction(final LocalDate transactionDate, final Long tota } public static ShareAccountTransaction createRedeemTransaction(final LocalDate transactionDate, final Long totalShares, - final BigDecimal shareValue) { + final BigDecimal shareValue) { final Integer status = PurchasedSharesStatusType.APPROVED.getValue(); final Integer type = PurchasedSharesStatusType.REDEEMED.getValue(); final BigDecimal amount = shareValue.multiply(BigDecimal.valueOf(totalShares)); @@ -223,8 +225,8 @@ public void addAmountPaid(final BigDecimal amountPaid) { if (isRedeemTransaction()) { this.amountPaid = this.amountPaid.subtract(amountPaid); } else if (isPurchasTransaction() /* - * || isPurchaseRejectedTransaction() - */) { + * || isPurchaseRejectedTransaction() + */) { this.amountPaid = this.amountPaid.add(amountPaid); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/exceptions/IssueableSharesExceededException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/exceptions/IssueableSharesExceededException.java index af6e68a66b6..b4891787313 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/exceptions/IssueableSharesExceededException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/exceptions/IssueableSharesExceededException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/ActivateShareAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/ActivateShareAccountCommandHandler.java index 2b5108da3e5..3225a950eca 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/ActivateShareAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/ActivateShareAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/ApplyAddtionalSharesCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/ApplyAddtionalSharesCommandHandler.java index 5aa43fed391..d2ee52e1bb6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/ApplyAddtionalSharesCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/ApplyAddtionalSharesCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/ApproveAddtionalSharesCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/ApproveAddtionalSharesCommandHandler.java index bac05008445..434154dcce2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/ApproveAddtionalSharesCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/ApproveAddtionalSharesCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/ApproveShareAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/ApproveShareAccountCommandHandler.java index 658d8622dda..43eea265499 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/ApproveShareAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/ApproveShareAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/CloseShareAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/CloseShareAccountCommandHandler.java index a20689f0ee0..264105759a6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/CloseShareAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/CloseShareAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/CreateShareAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/CreateShareAccountCommandHandler.java index 1640037a7d0..bcd8a24e42e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/CreateShareAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/CreateShareAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/RedeemSharesCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/RedeemSharesCommandHandler.java index 06f6f7ade89..ebe0c49490b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/RedeemSharesCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/RedeemSharesCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/RejectAddtionalSharesCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/RejectAddtionalSharesCommandHandler.java index 0a46bec2c0d..00375851abf 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/RejectAddtionalSharesCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/RejectAddtionalSharesCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/RejectShareAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/RejectShareAccountCommandHandler.java index 4f45cdb44b7..5418c148c08 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/RejectShareAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/RejectShareAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/UndoApproveShareAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/UndoApproveShareAccountCommandHandler.java index 5cab49df138..b0e82e42b14 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/UndoApproveShareAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/UndoApproveShareAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/UpdateShareAccountCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/UpdateShareAccountCommandHandler.java index 9a5e5b042c4..4ca6ba69e73 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/UpdateShareAccountCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/handler/UpdateShareAccountCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/jobs/postdividentsforshares/PostDividentsForSharesConfig.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/jobs/postdividentsforshares/PostDividentsForSharesConfig.java index 48e8c6152c1..b30ae602f0e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/jobs/postdividentsforshares/PostDividentsForSharesConfig.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/jobs/postdividentsforshares/PostDividentsForSharesConfig.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/jobs/postdividentsforshares/PostDividentsForSharesTasklet.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/jobs/postdividentsforshares/PostDividentsForSharesTasklet.java index a85515b7c0f..544ff362a35 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/jobs/postdividentsforshares/PostDividentsForSharesTasklet.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/jobs/postdividentsforshares/PostDividentsForSharesTasklet.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.data.ApiParameterError; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/serialization/ShareAccountDataSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/serialization/ShareAccountDataSerializer.java index 622e6b67c51..eeadae4fd26 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/serialization/ShareAccountDataSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/serialization/ShareAccountDataSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -36,6 +37,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.ApiParameterError; @@ -110,9 +112,9 @@ public class ShareAccountDataSerializer { @Autowired public ShareAccountDataSerializer(final PlatformSecurityContext platformSecurityContext, final FromJsonHelper fromApiJsonHelper, - final ChargeRepositoryWrapper chargeRepository, final SavingsAccountRepositoryWrapper savingsAccountRepositoryWrapper, - final ClientRepositoryWrapper clientRepositoryWrapper, final ShareProductRepositoryWrapper shareProductRepository, - final SavingsAccountReadPlatformService savingsAccountReadPlatformService) { + final ChargeRepositoryWrapper chargeRepository, final SavingsAccountRepositoryWrapper savingsAccountRepositoryWrapper, + final ClientRepositoryWrapper clientRepositoryWrapper, final ShareProductRepositoryWrapper shareProductRepository, + final SavingsAccountReadPlatformService savingsAccountReadPlatformService) { this.platformSecurityContext = platformSecurityContext; this.fromApiJsonHelper = fromApiJsonHelper; this.chargeRepository = chargeRepository; @@ -127,7 +129,8 @@ public ShareAccount validateAndCreate(JsonCommand jsonCommand) { if (StringUtils.isBlank(jsonCommand.json())) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, jsonCommand.json(), ShareAccountApiConstants.supportedParameters); final List dataValidationErrors = new ArrayList<>(); @@ -269,7 +272,8 @@ public Map validateAndUpdate(JsonCommand jsonCommand, ShareAccou if (StringUtils.isBlank(jsonCommand.json())) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, jsonCommand.json(), ShareAccountApiConstants.supportedParameters); final List dataValidationErrors = new ArrayList<>(); @@ -462,7 +466,8 @@ public Map validateAndApprove(JsonCommand jsonCommand, ShareAcco if (StringUtils.isBlank(jsonCommand.json())) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, jsonCommand.json(), approvalParameters); final List dataValidationErrors = new ArrayList<>(); final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors).resource("sharesaccount"); @@ -499,7 +504,7 @@ public Map validateAndApprove(JsonCommand jsonCommand, ShareAcco } private void validateTotalSubsribedShares(final ShareAccount account, final ShareAccountTransaction transaction, - final DataValidatorBuilder baseDataValidator) { + final DataValidatorBuilder baseDataValidator) { Long totalSubsribedShares = account.getShareProduct().getSubscribedShares(); Long requested = Long.valueOf(0); if (transaction.isActive() && transaction.isPendingForApprovalTransaction()) { @@ -545,7 +550,8 @@ public Map validateAndUndoApprove(JsonCommand jsonCommand, Share if (StringUtils.isBlank(jsonCommand.json())) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, jsonCommand.json(), activateParameters); final List dataValidationErrors = new ArrayList<>(); final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors).resource("sharesaccount"); @@ -602,7 +608,8 @@ public Map validateAndActivate(JsonCommand jsonCommand, ShareAcc if (StringUtils.isBlank(jsonCommand.json())) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, jsonCommand.json(), activateParameters); final List dataValidationErrors = new ArrayList<>(); final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors).resource("sharesaccount"); @@ -687,7 +694,8 @@ public Map validateAndApplyAddtionalShares(JsonCommand jsonComma if (StringUtils.isBlank(jsonCommand.json())) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, jsonCommand.json(), addtionalSharesParameters); final List dataValidationErrors = new ArrayList<>(); final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors).resource("sharesaccount"); @@ -728,7 +736,7 @@ public Map validateAndApplyAddtionalShares(JsonCommand jsonComma } private boolean isTransactionBeforeExistingTransactions(LocalDate requestedDate, boolean isTransactionBeforeExistingTransactions, - ShareAccount shareAccount) { + ShareAccount shareAccount) { Collection activeTransactions = shareAccount.getShareAccountTransactions().stream() .filter(tr -> tr.isActive() && !tr.isChargeTransaction() && !tr.isPurchaseRejectedTransaction()).toList(); @@ -764,7 +772,8 @@ public Map validateAndApproveAddtionalShares(JsonCommand jsonCom if (StringUtils.isBlank(jsonCommand.json())) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, jsonCommand.json(), addtionalSharesParameters); final List dataValidationErrors = new ArrayList<>(); final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors).resource("sharesaccount"); @@ -817,7 +826,8 @@ public Map validateAndRejectAddtionalShares(JsonCommand jsonComm if (StringUtils.isBlank(jsonCommand.json())) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, jsonCommand.json(), addtionalSharesParameters); JsonElement element = jsonCommand.parsedJson(); final ArrayList purchasedShares = new ArrayList<>(); @@ -843,7 +853,7 @@ public Map validateAndRejectAddtionalShares(JsonCommand jsonComm } private void updateTotalChargeDerivedForAdditonalSharesReject(final ShareAccount shareAccount, - final ShareAccountTransaction transaction) { + final ShareAccountTransaction transaction) { Set paidBySet = transaction.getChargesPaidBy(); if (paidBySet != null && !paidBySet.isEmpty()) { for (ShareAccountChargePaidBy chargePaidBy : paidBySet) { @@ -864,7 +874,8 @@ public Map validateAndRedeemShares(JsonCommand jsonCommand, Shar if (StringUtils.isBlank(jsonCommand.json())) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, jsonCommand.json(), addtionalSharesParameters); final List dataValidationErrors = new ArrayList<>(); final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors).resource("sharesaccount"); @@ -895,7 +906,7 @@ public Map validateAndRedeemShares(JsonCommand jsonCommand, Shar } private void validateRedeemRequest(final ShareAccount account, ShareAccountTransaction redeemTransaction, - final DataValidatorBuilder baseDataValidator, final List dataValidationErrors) { + final DataValidatorBuilder baseDataValidator, final List dataValidationErrors) { if (account.getTotalApprovedShares() < redeemTransaction.getTotalShares()) { baseDataValidator.reset().parameter(ShareAccountApiConstants.requestedshares_paramname) @@ -961,21 +972,21 @@ private LocalDate deriveLockinPeriodDuration(final Integer lockinPeriod, final P if (periodType != null) { switch (periodType) { case INVALID: // It never comes in to this state. - break; + break; case DAYS: lockinDate = purchaseDate.plusDays(lockinPeriod); - break; + break; case WEEKS: lockinDate = purchaseDate.plusWeeks(lockinPeriod); - break; + break; case MONTHS: lockinDate = purchaseDate.plusMonths(lockinPeriod); - break; + break; case YEARS: lockinDate = purchaseDate.plusYears(lockinPeriod); - break; + break; case WHOLE_TERM: // Never comes in to this state. - break; + break; } } return lockinDate; @@ -1011,7 +1022,8 @@ public Map validateAndClose(JsonCommand jsonCommand, ShareAccoun if (StringUtils.isBlank(jsonCommand.json())) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, jsonCommand.json(), closeParameters); final List dataValidationErrors = new ArrayList<>(); final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors).resource("sharesaccount"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/PurchasedSharesReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/PurchasedSharesReadPlatformService.java index 8f58bc14bf2..4c66d3aaeeb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/PurchasedSharesReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/PurchasedSharesReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.shareaccounts.service; import java.util.Collection; + import org.apache.fineract.portfolio.shareaccounts.data.ShareAccountTransactionData; public interface PurchasedSharesReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/PurchasedSharesReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/PurchasedSharesReadPlatformServiceImpl.java index e9c961ebf0c..8dd095b09ee 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/PurchasedSharesReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/PurchasedSharesReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.sql.SQLException; import java.time.LocalDate; import java.util.Collection; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; @@ -39,7 +40,7 @@ public class PurchasedSharesReadPlatformServiceImpl implements PurchasedSharesRe public Collection retrievePurchasedShares(Long accountId) { PurchasedSharesDataRowMapper mapper = new PurchasedSharesDataRowMapper(); final String sql = "select " + mapper.schema() + " where saps.account_id=? and saps.is_active = true"; - return this.jdbcTemplate.query(sql, mapper, new Object[] { accountId }); // NOSONAR + return this.jdbcTemplate.query(sql, mapper, new Object[]{accountId}); // NOSONAR } private static final class PurchasedSharesDataRowMapper implements RowMapper { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountChargeReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountChargeReadPlatformService.java index 501008aafcc..c59d1dac9b0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountChargeReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountChargeReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.shareaccounts.service; import java.util.Collection; + import org.apache.fineract.portfolio.shareaccounts.data.ShareAccountChargeData; public interface ShareAccountChargeReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountChargeReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountChargeReadPlatformServiceImpl.java index 8c43a211a81..5c0ec6dee13 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountChargeReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountChargeReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; @@ -49,7 +50,7 @@ public Collection retrieveAccountCharges(Long accountId, } sqlBuilder.append(" order by sc.charge_time_enum ASC"); - return this.jdbcTemplate.query(sqlBuilder.toString(), rm, new Object[] { accountId }); + return this.jdbcTemplate.query(sqlBuilder.toString(), rm, new Object[]{accountId}); } private static final class ShareAccountChargeMapper implements RowMapper { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountCommandsServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountCommandsServiceImpl.java index 708425f92be..2f528349b32 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountCommandsServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountCommandsServiceImpl.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountDividendReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountDividendReadPlatformService.java index 3ff0ee68846..14dd75b5970 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountDividendReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountDividendReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.List; import java.util.Map; + import org.apache.fineract.infrastructure.core.service.Page; import org.apache.fineract.infrastructure.core.service.SearchParameters; import org.apache.fineract.portfolio.shareaccounts.data.ShareAccountDividendData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountDividendReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountDividendReadPlatformServiceImpl.java index 8e485b9f41d..57d6f77c7ec 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountDividendReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountDividendReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountReadPlatformService.java index 963d46508d0..c16fb70288a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.time.LocalDate; import java.util.Collection; import java.util.Set; + import org.apache.fineract.portfolio.accounts.service.AccountReadPlatformService; import org.apache.fineract.portfolio.shareaccounts.data.ShareAccountData; @@ -36,7 +37,7 @@ public interface ShareAccountReadPlatformService extends AccountReadPlatformServ Set getResponseDataParams(); Collection retrieveAllShareAccountDataForDividends(Long productId, boolean fetchInActiveAccounts, - LocalDate startDate); + LocalDate startDate); String retrieveAccountNumberByAccountId(Long accountId); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountReadPlatformServiceImpl.java index 2f7d851814e..ae94f613677 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -28,6 +28,7 @@ import java.util.Collection; import java.util.List; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; @@ -179,7 +180,7 @@ public Page retrieveAll(final Integer offSet, final Integer limit) sqlBuilder.append(" offset ").append(offSet); } - Object[] whereClauseItemsitems = new Object[] { ShareAccountStatusType.ACTIVE.getValue() }; + Object[] whereClauseItemsitems = new Object[]{ShareAccountStatusType.ACTIVE.getValue()}; return this.shareAccountDataPaginationHelper.fetchPage(this.jdbcTemplate, sqlBuilder.toString(), whereClauseItemsitems, mapper); } @@ -190,7 +191,7 @@ public Set getResponseDataParams() { @Override public Collection retrieveAllShareAccountDataForDividends(final Long id, final boolean fetchInActiveAccounts, - final LocalDate startDate) { + final LocalDate startDate) { ShareAccountMapperForDividents mapper = new ShareAccountMapperForDividents(); StringBuilder sb = new StringBuilder("select "); sb.append(mapper.schema); @@ -267,7 +268,7 @@ private static final class ShareAccountMapper implements RowMapper left join m_savings_account msa on sa.savings_account_id = msa.id\s"""; ShareAccountMapper(final Collection charges, - final Collection purchasedShares) { + final Collection purchasedShares) { this.charges = charges; this.purchasedShares = purchasedShares; } @@ -371,9 +372,9 @@ private static final class ShareAccountMapperForDividents implements RowMapper * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountSchedularServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountSchedularServiceImpl.java index 5cfbf289507..f44c406e6f5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountSchedularServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountSchedularServiceImpl.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountWritePlatformService.java index b361091065f..74514f760d0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountWritePlatformServiceJpaRepositoryImpl.java index ca6d1654326..3b2e8dd8067 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/ShareAccountWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.shareaccounts.service; import jakarta.persistence.PersistenceException; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; @@ -27,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.exception.ExceptionUtils; @@ -144,7 +146,7 @@ private Map populateJournalEntries(final ShareAccount account, f transactionDto.put("chargeAmount", transaction.chargeAmount()); transactionDto.put("paymentTypeId", null); // FIXME::make it cash - // payment + // payment if (transaction.getChargesPaidBy() != null && !transaction.getChargesPaidBy().isEmpty()) { final List> chargesPaidData = new ArrayList<>(); transactionDto.put("chargesPaid", chargesPaidData); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/SharesEnumerations.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/SharesEnumerations.java index efe1998727a..3e62ec0fc5f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/SharesEnumerations.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/service/SharesEnumerations.java @@ -6,9 +6,9 @@ * 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 @@ -58,34 +58,34 @@ public static ShareAccountStatusEnumData status(final ShareAccountStatusType typ optionData = new ShareAccountStatusEnumData(ShareAccountStatusType.INVALID.getValue().longValue(), ShareAccountStatusType.INVALID.getCode(), "Invalid", submittedAndPendingApproval, isApproved, isRejected, isActive, isClosed); - break; + break; case SUBMITTED_AND_PENDING_APPROVAL: optionData = new ShareAccountStatusEnumData(ShareAccountStatusType.SUBMITTED_AND_PENDING_APPROVAL.getValue().longValue(), ShareAccountStatusType.SUBMITTED_AND_PENDING_APPROVAL.getCode(), "Submitted and pending approval", submittedAndPendingApproval, isApproved, isRejected, isActive, isClosed); - break; + break; case APPROVED: optionData = new ShareAccountStatusEnumData(ShareAccountStatusType.APPROVED.getValue().longValue(), ShareAccountStatusType.APPROVED.getCode(), "Approved", submittedAndPendingApproval, isApproved, isRejected, isActive, isClosed); - break; + break; case ACTIVE: optionData = new ShareAccountStatusEnumData(ShareAccountStatusType.ACTIVE.getValue().longValue(), ShareAccountStatusType.ACTIVE.getCode(), "Active", submittedAndPendingApproval, isApproved, isRejected, isActive, isClosed); - break; + break; case REJECTED: optionData = new ShareAccountStatusEnumData(ShareAccountStatusType.REJECTED.getValue().longValue(), ShareAccountStatusType.REJECTED.getCode(), "Rejected", submittedAndPendingApproval, isApproved, isRejected, isActive, isClosed); - break; + break; case CLOSED: optionData = new ShareAccountStatusEnumData(ShareAccountStatusType.CLOSED.getValue().longValue(), ShareAccountStatusType.CLOSED.getCode(), "Closed", submittedAndPendingApproval, isApproved, isRejected, isActive, isClosed); - break; + break; } return optionData; @@ -96,31 +96,31 @@ public static EnumOptionData purchasedSharesEnum(PurchasedSharesStatusType type) PurchasedSharesStatusType.INVALID.getCode(), "Invalid"); switch (type) { case INVALID: - break; + break; case APPLIED: data = new EnumOptionData(PurchasedSharesStatusType.APPLIED.getValue().longValue(), PurchasedSharesStatusType.APPLIED.getCode(), "Pending Approval"); - break; + break; case APPROVED: data = new EnumOptionData(PurchasedSharesStatusType.APPROVED.getValue().longValue(), PurchasedSharesStatusType.APPROVED.getCode(), "Approved"); - break; + break; case REJECTED: data = new EnumOptionData(PurchasedSharesStatusType.REJECTED.getValue().longValue(), PurchasedSharesStatusType.REJECTED.getCode(), "Rejected"); - break; + break; case PURCHASED: data = new EnumOptionData(PurchasedSharesStatusType.PURCHASED.getValue().longValue(), PurchasedSharesStatusType.PURCHASED.getCode(), "Purchase"); - break; + break; case REDEEMED: data = new EnumOptionData(PurchasedSharesStatusType.REDEEMED.getValue().longValue(), PurchasedSharesStatusType.REDEEMED.getCode(), "Redeem"); - break; + break; case CHARGE_PAYMENT: data = new EnumOptionData(PurchasedSharesStatusType.CHARGE_PAYMENT.getValue().longValue(), PurchasedSharesStatusType.CHARGE_PAYMENT.getCode(), "Charge Payment"); - break; + break; } return data; @@ -144,23 +144,23 @@ public static EnumOptionData minimumActivePeriodFrequencyType(final SharePeriodF SharePeriodFrequencyType.INVALID.getCode(), "Invalid"); switch (type) { case INVALID: - break; + break; case DAYS: optionData = new EnumOptionData(SharePeriodFrequencyType.DAYS.getValue().longValue(), codePrefix + SharePeriodFrequencyType.DAYS.getCode(), "Days"); - break; + break; case WEEKS: optionData = new EnumOptionData(SharePeriodFrequencyType.WEEKS.getValue().longValue(), codePrefix + SharePeriodFrequencyType.WEEKS.getCode(), "Weeks"); - break; + break; case MONTHS: optionData = new EnumOptionData(SharePeriodFrequencyType.MONTHS.getValue().longValue(), codePrefix + SharePeriodFrequencyType.MONTHS.getCode(), "Months"); - break; + break; case YEARS: optionData = new EnumOptionData(SharePeriodFrequencyType.YEARS.getValue().longValue(), codePrefix + SharePeriodFrequencyType.YEARS.getCode(), "Years"); - break; + break; } return optionData; } @@ -171,23 +171,23 @@ public static EnumOptionData lockinPeriodFrequencyType(final SharePeriodFrequenc SharePeriodFrequencyType.INVALID.getCode(), "Invalid"); switch (type) { case INVALID: - break; + break; case DAYS: optionData = new EnumOptionData(SharePeriodFrequencyType.DAYS.getValue().longValue(), codePrefix + SharePeriodFrequencyType.DAYS.getCode(), "Days"); - break; + break; case WEEKS: optionData = new EnumOptionData(SharePeriodFrequencyType.WEEKS.getValue().longValue(), codePrefix + SharePeriodFrequencyType.WEEKS.getCode(), "Weeks"); - break; + break; case MONTHS: optionData = new EnumOptionData(SharePeriodFrequencyType.MONTHS.getValue().longValue(), codePrefix + SharePeriodFrequencyType.MONTHS.getCode(), "Months"); - break; + break; case YEARS: optionData = new EnumOptionData(SharePeriodFrequencyType.YEARS.getValue().longValue(), codePrefix + SharePeriodFrequencyType.YEARS.getCode(), "Years"); - break; + break; } return optionData; } @@ -197,15 +197,15 @@ public static EnumOptionData shareAccountDividendStatusEnum(ShareAccountDividend ShareAccountDividendStatusType.INVALID.getCode(), "Invalid"); switch (type) { case INVALID: - break; + break; case POSTED: data = new EnumOptionData(ShareAccountDividendStatusType.POSTED.getValue().longValue(), ShareAccountDividendStatusType.POSTED.getCode(), "Dividend Posted"); - break; + break; case INITIATED: data = new EnumOptionData(ShareAccountDividendStatusType.INITIATED.getValue().longValue(), ShareAccountDividendStatusType.INITIATED.getCode(), "Dividend Initiated"); - break; + break; } return data; @@ -220,15 +220,15 @@ public static EnumOptionData shareProductDividendStatusEnum(ShareProductDividend ShareAccountDividendStatusType.INVALID.getCode(), "Invalid"); switch (type) { case INVALID: - break; + break; case APPROVED: data = new EnumOptionData(ShareProductDividendStatusType.APPROVED.getValue().longValue(), ShareProductDividendStatusType.APPROVED.getCode(), "Dividend Approved"); - break; + break; case INITIATED: data = new EnumOptionData(ShareProductDividendStatusType.INITIATED.getValue().longValue(), ShareProductDividendStatusType.INITIATED.getCode(), "Dividend Initiated"); - break; + break; } return data; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/start/ShareAccountsConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/start/ShareAccountsConfiguration.java index 6daf958342d..26b11c98b25 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/start/ShareAccountsConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareaccounts/start/ShareAccountsConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -76,14 +76,14 @@ public ShareAccountChargeReadPlatformService shareAccountChargeReadPlatformServi @Bean(value = "SHAREACCOUNT_COMMANDSERVICE") @ConditionalOnMissingBean(AccountsCommandsService.class) public AccountsCommandsService accountsCommandsService(FromJsonHelper fromApiJsonHelper, - ShareAccountDataSerializer shareAccountDataSerializer) { + ShareAccountDataSerializer shareAccountDataSerializer) { return new ShareAccountCommandsServiceImpl(fromApiJsonHelper, shareAccountDataSerializer); } @Bean @ConditionalOnMissingBean(ShareAccountDividendReadPlatformService.class) public ShareAccountDividendReadPlatformService shareAccountDividendReadPlatformService(JdbcTemplate jdbcTemplate, - ColumnValidator columnValidator, PaginationHelper paginationHelper, DatabaseSpecificSQLGenerator sqlGenerator) { + ColumnValidator columnValidator, PaginationHelper paginationHelper, DatabaseSpecificSQLGenerator sqlGenerator) { return new ShareAccountDividendReadPlatformServiceImpl(jdbcTemplate, columnValidator, paginationHelper, sqlGenerator); } @@ -91,12 +91,12 @@ public ShareAccountDividendReadPlatformService shareAccountDividendReadPlatformS @Bean(value = "share" + AccountsApiConstants.READPLATFORM_NAME) @ConditionalOnMissingBean(ShareAccountReadPlatformService.class) public ShareAccountReadPlatformService shareAccountReadPlatformService(ApplicationContext applicationContext, - ChargeReadPlatformService chargeReadPlatformService, - ShareProductDropdownReadPlatformService shareProductDropdownReadPlatformService, - SavingsAccountReadPlatformService savingsAccountReadPlatformService, ClientReadPlatformService clientReadPlatformService, - ShareAccountChargeReadPlatformService shareAccountChargeReadPlatformService, - PurchasedSharesReadPlatformService purchasedSharesReadPlatformService, JdbcTemplate jdbcTemplate, - PaginationHelper paginationHelper, DatabaseSpecificSQLGenerator sqlGenerator) { + ChargeReadPlatformService chargeReadPlatformService, + ShareProductDropdownReadPlatformService shareProductDropdownReadPlatformService, + SavingsAccountReadPlatformService savingsAccountReadPlatformService, ClientReadPlatformService clientReadPlatformService, + ShareAccountChargeReadPlatformService shareAccountChargeReadPlatformService, + PurchasedSharesReadPlatformService purchasedSharesReadPlatformService, JdbcTemplate jdbcTemplate, + PaginationHelper paginationHelper, DatabaseSpecificSQLGenerator sqlGenerator) { return new ShareAccountReadPlatformServiceImpl(applicationContext, chargeReadPlatformService, shareProductDropdownReadPlatformService, savingsAccountReadPlatformService, clientReadPlatformService, shareAccountChargeReadPlatformService, purchasedSharesReadPlatformService, jdbcTemplate, paginationHelper, sqlGenerator); @@ -105,17 +105,17 @@ public ShareAccountReadPlatformService shareAccountReadPlatformService(Applicati @Bean @ConditionalOnMissingBean(ShareAccountSchedularService.class) public ShareAccountSchedularService shareAccountSchedularService(ShareAccountDividendRepository shareAccountDividendRepository, - SavingsAccountDomainService savingsAccountDomainService, SavingsAccountAssembler savingsAccountAssembler) { + SavingsAccountDomainService savingsAccountDomainService, SavingsAccountAssembler savingsAccountAssembler) { return new ShareAccountSchedularServiceImpl(shareAccountDividendRepository, savingsAccountDomainService, savingsAccountAssembler); } @Bean @ConditionalOnMissingBean(ShareAccountWritePlatformService.class) public ShareAccountWritePlatformService shareAccountWritePlatformService(ShareAccountDataSerializer accountDataSerializer, - ShareAccountRepositoryWrapper shareAccountRepository, ShareProductRepositoryWrapper shareProductRepository, - AccountNumberGenerator accountNumberGenerator, AccountNumberFormatRepositoryWrapper accountNumberFormatRepository, - JournalEntryWritePlatformService journalEntryWritePlatformService, NoteRepository noteRepository, - BusinessEventNotifierService businessEventNotifierService) { + ShareAccountRepositoryWrapper shareAccountRepository, ShareProductRepositoryWrapper shareProductRepository, + AccountNumberGenerator accountNumberGenerator, AccountNumberFormatRepositoryWrapper accountNumberFormatRepository, + JournalEntryWritePlatformService journalEntryWritePlatformService, NoteRepository noteRepository, + BusinessEventNotifierService businessEventNotifierService) { return new ShareAccountWritePlatformServiceJpaRepositoryImpl(accountDataSerializer, shareAccountRepository, shareProductRepository, accountNumberGenerator, accountNumberFormatRepository, journalEntryWritePlatformService, noteRepository, businessEventNotifierService); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/SharePeriodFrequencyType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/SharePeriodFrequencyType.java index 520f27cc4eb..645f98ff7d3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/SharePeriodFrequencyType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/SharePeriodFrequencyType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/data/ShareProductData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/data/ShareProductData.java index e2f5021a8ee..fa9c1bfa762 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/data/ShareProductData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/data/ShareProductData.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.Collection; import java.util.List; import java.util.Map; + import lombok.Getter; import org.apache.fineract.accounting.common.AccountingRuleType; import org.apache.fineract.accounting.glaccount.data.GLAccountData; @@ -71,15 +72,15 @@ public final class ShareProductData implements ProductData { private final Map> accountingMappingOptions; private ShareProductData(final Long id, final String name, final String shortName, final String description, final String externalId, - final CurrencyData currency, final Long totalShares, final Long totalSharesIssued, final BigDecimal unitPrice, - final BigDecimal shareCapital, final Long minimumShares, final Long nominaltShares, final Long maximumShares, - Collection marketPrice, final Collection charges, - final Boolean allowDividendCalculationForInactiveClients, final Integer lockinPeriod, final EnumOptionData lockPeriodEnum, - final Integer minimumActivePeriod, final EnumOptionData minimumActivePeriodForDividendsTypeEnum, EnumOptionData accountingRule, - Map accountingMappings, Collection paymentChannelToFundSourceMappings, - Collection feeToGLAccountMappings, final Collection currencyOptions, - final Collection chargeOptions, final Collection minimumActivePeriodFrequencyTypeOptions, - final Collection lockinPeriodFrequencyTypeOptions, Map> accountingMappingOptions) { + final CurrencyData currency, final Long totalShares, final Long totalSharesIssued, final BigDecimal unitPrice, + final BigDecimal shareCapital, final Long minimumShares, final Long nominaltShares, final Long maximumShares, + Collection marketPrice, final Collection charges, + final Boolean allowDividendCalculationForInactiveClients, final Integer lockinPeriod, final EnumOptionData lockPeriodEnum, + final Integer minimumActivePeriod, final EnumOptionData minimumActivePeriodForDividendsTypeEnum, EnumOptionData accountingRule, + Map accountingMappings, Collection paymentChannelToFundSourceMappings, + Collection feeToGLAccountMappings, final Collection currencyOptions, + final Collection chargeOptions, final Collection minimumActivePeriodFrequencyTypeOptions, + final Collection lockinPeriodFrequencyTypeOptions, Map> accountingMappingOptions) { this.id = id; this.name = name; this.shortName = shortName; @@ -112,12 +113,12 @@ private ShareProductData(final Long id, final String name, final String shortNam } public static ShareProductData data(final Long id, final String name, final String shortName, final String description, - final String externalId, final CurrencyData currency, final Long totalShares, final Long totalSharesIssued, - final BigDecimal unitPrice, final BigDecimal shareCapital, final Long minimumShares, final Long nominaltShares, - final Long maximumShares, Collection marketPrice, final Collection charges, + final String externalId, final CurrencyData currency, final Long totalShares, final Long totalSharesIssued, + final BigDecimal unitPrice, final BigDecimal shareCapital, final Long minimumShares, final Long nominaltShares, + final Long maximumShares, Collection marketPrice, final Collection charges, - final Boolean allowDividendCalculationForInactiveClients, final Integer lockinPeriod, final EnumOptionData lockPeriodTypeEnum, - final Integer minimumActivePeriod, final EnumOptionData minimumActivePeriodForDividendsEnum, EnumOptionData accountingRule) { + final Boolean allowDividendCalculationForInactiveClients, final Integer lockinPeriod, final EnumOptionData lockPeriodTypeEnum, + final Integer minimumActivePeriod, final EnumOptionData minimumActivePeriodForDividendsEnum, EnumOptionData accountingRule) { final Map accountingMappings = null; final Collection paymentChannelToFundSourceMappings = null; @@ -138,9 +139,9 @@ public static ShareProductData data(final Long id, final String name, final Stri } private ShareProductData(final Collection currencyOptions, final Collection chargeOptions, - final Collection minimumActivePeriodFrequencyTypeOptions, - final Collection lockinPeriodFrequencyTypeOptions, - final Map> accountingMappingOptions) { + final Collection minimumActivePeriodFrequencyTypeOptions, + final Collection lockinPeriodFrequencyTypeOptions, + final Map> accountingMappingOptions) { this.id = null; this.name = null; this.shortName = null; @@ -173,16 +174,16 @@ private ShareProductData(final Collection currencyOptions, final C } public static ShareProductData template(final Collection currencyOptions, final Collection chargeOptions, - final Collection minimumActivePeriodFrequencyTypeOptions, - final Collection lockinPeriodFrequencyTypeOptions, Map> accountingMappingOptions) { + final Collection minimumActivePeriodFrequencyTypeOptions, + final Collection lockinPeriodFrequencyTypeOptions, Map> accountingMappingOptions) { return new ShareProductData(currencyOptions, chargeOptions, minimumActivePeriodFrequencyTypeOptions, lockinPeriodFrequencyTypeOptions, accountingMappingOptions); } public static ShareProductData template(final ShareProductData data, final Collection currencyOptions, - final Collection chargeOptions, final Collection minimumActivePeriodFrequencyTypeOptions, - final Collection lockinPeriodFrequencyTypeOptions, - final Map> accountingMappingOptions) { + final Collection chargeOptions, final Collection minimumActivePeriodFrequencyTypeOptions, + final Collection lockinPeriodFrequencyTypeOptions, + final Map> accountingMappingOptions) { return new ShareProductData(data.id, data.name, data.shortName, data.description, data.externalId, data.currency, data.totalShares, data.totalSharesIssued, data.unitPrice, data.shareCapital, data.minimumShares, data.nominalShares, data.maximumShares, @@ -193,8 +194,8 @@ public static ShareProductData template(final ShareProductData data, final Colle } public static ShareProductData withAccountingDetails(final ShareProductData data, final Map accountingMappings, - final Collection paymentChannelToFundSourceMappings, - final Collection feeToGLAccountMappings) { + final Collection paymentChannelToFundSourceMappings, + final Collection feeToGLAccountMappings) { return new ShareProductData(data.id, data.name, data.shortName, data.description, data.externalId, data.currency, data.totalShares, data.totalSharesIssued, data.unitPrice, data.shareCapital, data.minimumShares, data.nominalShares, data.maximumShares, data.marketPrice, data.charges, data.allowDividendCalculationForInactiveClients, data.lockinPeriod, data.lockPeriodTypeEnum, diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/data/ShareProductDividendPayOutData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/data/ShareProductDividendPayOutData.java index 685fe6af8cf..c132a3cc80c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/data/ShareProductDividendPayOutData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/data/ShareProductDividendPayOutData.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.Collection; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.shareaccounts.data.ShareAccountDividendData; @@ -42,8 +43,8 @@ public class ShareProductDividendPayOutData { private final Collection accountDividendsData; public ShareProductDividendPayOutData(final Long id, final ShareProductData productData, final BigDecimal amount, - LocalDate dividendStartDate, final LocalDate dividendEndDate, final Collection accountDividendsData, - final EnumOptionData status) { + LocalDate dividendStartDate, final LocalDate dividendEndDate, final Collection accountDividendsData, + final EnumOptionData status) { this.id = id; this.productData = productData; this.amount = amount; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/data/ShareProductMarketPriceData.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/data/ShareProductMarketPriceData.java index 64ca9ec27b1..da18c00c60d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/data/ShareProductMarketPriceData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/data/ShareProductMarketPriceData.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.math.BigDecimal; import java.time.LocalDate; + import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProduct.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProduct.java index 1caa0f9b51a..2f6f7c206af 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProduct.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProduct.java @@ -6,9 +6,9 @@ * 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 @@ -31,10 +31,12 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.OrderBy; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.HashSet; import java.util.Set; + import org.apache.fineract.accounting.common.AccountingRuleType; import org.apache.fineract.infrastructure.core.domain.AbstractAuditableCustom; import org.apache.fineract.infrastructure.core.service.DateUtils; @@ -126,11 +128,11 @@ protected ShareProduct() { } public ShareProduct(final String name, final String shortName, final String description, final String externalId, - final MonetaryCurrency currency, final Long totalShares, final Long totalSharesIssued, final BigDecimal unitPrice, - final BigDecimal shareCapital, final Long minimumShares, final Long nominalShares, final Long maximumShares, - Set marketPrice, Set charges, final Boolean allowDividendCalculationForInactiveClients, - final Integer lockinPeriod, final PeriodFrequencyType lockPeriodType, final Integer minimumActivePeriod, - final PeriodFrequencyType minimumActivePeriodForDividendsType, final AccountingRuleType accountingRuleType) { + final MonetaryCurrency currency, final Long totalShares, final Long totalSharesIssued, final BigDecimal unitPrice, + final BigDecimal shareCapital, final Long minimumShares, final Long nominalShares, final Long maximumShares, + Set marketPrice, Set charges, final Boolean allowDividendCalculationForInactiveClients, + final Integer lockinPeriod, final PeriodFrequencyType lockPeriodType, final Integer minimumActivePeriod, + final PeriodFrequencyType minimumActivePeriodForDividendsType, final AccountingRuleType accountingRuleType) { this.name = name; this.shortName = shortName; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductDividendPayOutDetails.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductDividendPayOutDetails.java index 90d9ac77887..8b23fdff69a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductDividendPayOutDetails.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductDividendPayOutDetails.java @@ -6,9 +6,9 @@ * 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 @@ -24,10 +24,12 @@ import jakarta.persistence.FetchType; import jakarta.persistence.OneToMany; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.domain.AbstractAuditableCustom; import org.apache.fineract.portfolio.shareaccounts.domain.ShareAccountDividendDetails; @@ -58,7 +60,7 @@ protected ShareProductDividendPayOutDetails() { } public ShareProductDividendPayOutDetails(final Long shareProductId, final BigDecimal amount, final LocalDate dividendPeriodStartDate, - final LocalDate dividendPeriodEndDate) { + final LocalDate dividendPeriodEndDate) { this.shareProductId = shareProductId; this.amount = amount; this.dividendPeriodStartDate = dividendPeriodStartDate; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductDividendStatusType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductDividendStatusType.java index 5daf42cdcd8..56f10d279a6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductDividendStatusType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductDividendStatusType.java @@ -6,9 +6,9 @@ * 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 @@ -38,10 +38,10 @@ public static ShareProductDividendStatusType fromInt(final Integer type) { switch (type) { case 100: enumeration = ShareProductDividendStatusType.INITIATED; - break; + break; case 300: enumeration = ShareProductDividendStatusType.APPROVED; - break; + break; } return enumeration; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductDividentPayOutDetailsRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductDividentPayOutDetailsRepository.java index f7c6a9ac30a..7c2103fd82d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductDividentPayOutDetailsRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductDividentPayOutDetailsRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductDividentPayOutDetailsRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductDividentPayOutDetailsRepositoryWrapper.java index 753e610a692..1bcfb7f74a2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductDividentPayOutDetailsRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductDividentPayOutDetailsRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductMarketPrice.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductMarketPrice.java index dd6dd900010..5f1ddf1bed7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductMarketPrice.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductMarketPrice.java @@ -6,9 +6,9 @@ * 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 @@ -23,8 +23,10 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; + import java.math.BigDecimal; import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @Entity diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductRepository.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductRepository.java index ab2f5fe3e6b..b6e6fb20218 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductRepositoryWrapper.java index 7c107ab06f4..6a98a9e6f6e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/domain/ShareProductRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/exception/DividendNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/exception/DividendNotFoundException.java index d1dd48a7b24..cb688670069 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/exception/DividendNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/exception/DividendNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/exception/DividentProcessingException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/exception/DividentProcessingException.java index 8ff11ac52b8..6d3a978086d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/exception/DividentProcessingException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/exception/DividentProcessingException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/exception/ShareAccountsNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/exception/ShareAccountsNotFoundException.java index 94a306fca08..1310e94de98 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/exception/ShareAccountsNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/exception/ShareAccountsNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/ApproveShareProductDividendCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/ApproveShareProductDividendCommandHandler.java index 48676702aec..f2c45f2b0f3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/ApproveShareProductDividendCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/ApproveShareProductDividendCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/CreateShareProductCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/CreateShareProductCommandHandler.java index 96c67d6d681..a7ca381326b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/CreateShareProductCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/CreateShareProductCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/CreateShareProductDividendCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/CreateShareProductDividendCommandHandler.java index 7f2aa1bfc01..97a4e28ab35 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/CreateShareProductDividendCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/CreateShareProductDividendCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/DeleteShareProductDividendCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/DeleteShareProductDividendCommandHandler.java index e9f5b24150b..7250f36247a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/DeleteShareProductDividendCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/DeleteShareProductDividendCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/UpdateShareProductCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/UpdateShareProductCommandHandler.java index e336229ab17..d100efc332c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/UpdateShareProductCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/handler/UpdateShareProductCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/serialization/ShareProductDataSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/serialization/ShareProductDataSerializer.java index fa7bc44c100..47b4ad3245d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/serialization/ShareProductDataSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/serialization/ShareProductDataSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.math.BigDecimal; import java.time.LocalDate; @@ -33,6 +34,7 @@ import java.util.Locale; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.accounting.common.AccountingConstants; import org.apache.fineract.accounting.common.AccountingRuleType; @@ -84,7 +86,7 @@ public class ShareProductDataSerializer { @Autowired public ShareProductDataSerializer(final FromJsonHelper fromApiJsonHelper, final ChargeRepositoryWrapper chargeRepository, - final PlatformSecurityContext platformSecurityContext) { + final PlatformSecurityContext platformSecurityContext) { this.fromApiJsonHelper = fromApiJsonHelper; this.chargeRepository = chargeRepository; this.platformSecurityContext = platformSecurityContext; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductCommandsServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductCommandsServiceImpl.java index b9251e5f1a6..85df005b9e4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductCommandsServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductCommandsServiceImpl.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDividendAssembler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDividendAssembler.java index ef2d8d7fc26..d00cd1a05fd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDividendAssembler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDividendAssembler.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.organisation.monetary.domain.MonetaryCurrency; @@ -44,7 +45,7 @@ public class ShareProductDividendAssembler { private final ShareAccountReadPlatformService shareAccountReadPlatformService; public ShareProductDividendPayOutDetails calculateDividends(final Long productId, final BigDecimal amount, - final LocalDate dividendPeriodStartDate, final LocalDate dividendPeriodEndDate) { + final LocalDate dividendPeriodStartDate, final LocalDate dividendPeriodEndDate) { ShareProductData product = (ShareProductData) this.shareProductReadPlatformService.retrieveOne(productId, false); MonetaryCurrency currency = new MonetaryCurrency(product.getCurrency().getCode(), product.getCurrency().getDecimalPlaces(), @@ -58,7 +59,7 @@ public ShareProductDividendPayOutDetails calculateDividends(final Long productId ShareProductDividendPayOutDetails productDividendPayOutDetails = null; int minimumActivePeriod = 0; if (product.getMinimumActivePeriod() != null) { // minimum active period - // may be null + // may be null minimumActivePeriod = product.getMinimumActivePeriod(); } final Map numberOfSharesdaysPerAccount = new HashMap<>(); @@ -83,8 +84,8 @@ public ShareProductDividendPayOutDetails calculateDividends(final Long productId } private long calculateNumberOfShareDays(final LocalDate postingDate, final LocalDate lastDividendPostDate, - final int minimumActivePeriod, final Collection shareAccountDatas, - final Map numberOfSharesdaysPerAccount) { + final int minimumActivePeriod, final Collection shareAccountDatas, + final Map numberOfSharesdaysPerAccount) { long numberOfShareDays = 0; for (ShareAccountData accountData : shareAccountDatas) { long numberOfShareDaysPerAccount = 0; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDividendReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDividendReadPlatformService.java index 18eba3a3d77..18fc2219a14 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDividendReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDividendReadPlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDividendReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDividendReadPlatformServiceImpl.java index f9f92120d3b..73297150a01 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDividendReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDividendReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -25,6 +25,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; @@ -50,7 +51,7 @@ public class ShareProductDividendReadPlatformServiceImpl implements ShareProduct @Override public Page retriveAll(final Long productId, final Integer status, - final SearchParameters searchParameters) { + final SearchParameters searchParameters) { ShareProductDividendMapper shareProductDividendMapper = new ShareProductDividendMapper(); final StringBuilder sqlBuilder = new StringBuilder(200); sqlBuilder.append("select " + sqlGenerator.calcFoundRows() + " "); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDropdownReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDropdownReadPlatformService.java index f3e48a406e7..a3195758493 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDropdownReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDropdownReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.portfolio.shareproducts.service; import java.util.Collection; + import org.apache.fineract.infrastructure.core.data.EnumOptionData; public interface ShareProductDropdownReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDropdownReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDropdownReadPlatformServiceImpl.java index 620ea3a2b66..e013cace27b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDropdownReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductDropdownReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.List; + import lombok.NoArgsConstructor; import org.apache.fineract.infrastructure.core.data.EnumOptionData; import org.apache.fineract.portfolio.shareaccounts.service.SharesEnumerations; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductReadPlatformServiceImpl.java index 7b3ac127491..21806403926 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -27,6 +27,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.common.AccountingDropdownReadPlatformService; import org.apache.fineract.accounting.common.AccountingEnumerations; @@ -80,7 +81,7 @@ public Page retrieveAllProducts(Integer offSet, Integer limit) { sqlBuilder.append(" offset ").append(offSet); } - Object[] whereClauseItemsitems = new Object[] {}; + Object[] whereClauseItemsitems = new Object[]{}; return this.shareProductDataPaginationHelper.fetchPage(this.jdbcTemplate, sqlBuilder.toString(), whereClauseItemsitems, mapper); } @@ -91,11 +92,11 @@ public ProductData retrieveOne(Long productId, boolean includeTemplate) { try { final String sql1 = "select " + marketRowMapper.schema() + " where marketData.product_id = ?"; final Collection shareMarketCollection = this.jdbcTemplate.query(sql1, marketRowMapper, // NOSONAR - new Object[] { productId }); + new Object[]{productId}); final Collection charges = this.chargeReadPlatformService.retrieveShareProductCharges(productId); ShareProductRowMapper mapper = new ShareProductRowMapper(shareMarketCollection, charges); final String sql = "select " + mapper.schema() + " where shareproduct.id = ?"; - ShareProductData data = (ShareProductData) this.jdbcTemplate.queryForObject(sql, mapper, new Object[] { productId }); // NOSONAR + ShareProductData data = (ShareProductData) this.jdbcTemplate.queryForObject(sql, mapper, new Object[]{productId}); // NOSONAR if (data.hasAccountingEnabled()) { final Map accountingMappings = this.accountMappingReadPlatformService diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductWritePlatformService.java index 7bb811165d8..e9aaf48b0eb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductWritePlatformServiceJpaRepositoryImpl.java index 116476c7f9f..fe38d481e85 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/service/ShareProductWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,9 +20,11 @@ import com.google.gson.JsonElement; import jakarta.persistence.PersistenceException; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/starter/ShareProductsConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/starter/ShareProductsConfiguration.java index 2cbe6469d5c..cca43d5019d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/starter/ShareProductsConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/shareproducts/starter/ShareProductsConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -60,7 +60,7 @@ public ShareProductCommandsServiceImpl shareProductCommandsService(FromJsonHelpe @Bean @ConditionalOnMissingBean(ShareProductDividendAssembler.class) public ShareProductDividendAssembler shareProductDividendAssembler(ShareProductReadPlatformService shareProductReadPlatformService, - ShareAccountReadPlatformService shareAccountReadPlatformService) { + ShareAccountReadPlatformService shareAccountReadPlatformService) { return new ShareProductDividendAssembler(shareProductReadPlatformService, shareAccountReadPlatformService); } @@ -68,7 +68,7 @@ public ShareProductDividendAssembler shareProductDividendAssembler(ShareProductR @Bean @ConditionalOnMissingBean(ShareProductDividendReadPlatformService.class) public ShareProductDividendReadPlatformService shareProductDividendReadPlatformService(JdbcTemplate jdbcTemplate, - ColumnValidator columnValidator, PaginationHelper paginationHelper, DatabaseSpecificSQLGenerator sqlGenerator) { + ColumnValidator columnValidator, PaginationHelper paginationHelper, DatabaseSpecificSQLGenerator sqlGenerator) { return new ShareProductDividendReadPlatformServiceImpl(jdbcTemplate, columnValidator, paginationHelper, sqlGenerator); } @@ -82,11 +82,11 @@ public ShareProductDropdownReadPlatformService shareProductDropdownReadPlatformS @Bean(value = "shareReadPlatformService") @ConditionalOnMissingBean(ShareProductReadPlatformService.class) public ShareProductReadPlatformService shareProductReadPlatformService(JdbcTemplate jdbcTemplate, - CurrencyReadPlatformService currencyReadPlatformService, ChargeReadPlatformService chargeReadPlatformService, - ShareProductDropdownReadPlatformService shareProductDropdownReadPlatformService, - AccountingDropdownReadPlatformService accountingDropdownReadPlatformService, - ProductToGLAccountMappingReadPlatformService accountMappingReadPlatformService, - PaginationHelper shareProductDataPaginationHelper, DatabaseSpecificSQLGenerator sqlGenerator) { + CurrencyReadPlatformService currencyReadPlatformService, ChargeReadPlatformService chargeReadPlatformService, + ShareProductDropdownReadPlatformService shareProductDropdownReadPlatformService, + AccountingDropdownReadPlatformService accountingDropdownReadPlatformService, + ProductToGLAccountMappingReadPlatformService accountMappingReadPlatformService, + PaginationHelper shareProductDataPaginationHelper, DatabaseSpecificSQLGenerator sqlGenerator) { return new ShareProductReadPlatformServiceImpl(jdbcTemplate, currencyReadPlatformService, chargeReadPlatformService, shareProductDropdownReadPlatformService, accountingDropdownReadPlatformService, accountMappingReadPlatformService, shareProductDataPaginationHelper, sqlGenerator); @@ -95,11 +95,11 @@ public ShareProductReadPlatformService shareProductReadPlatformService(JdbcTempl @Bean @ConditionalOnMissingBean(ShareProductWritePlatformService.class) public ShareProductWritePlatformService shareProductWritePlatformService(ShareProductRepositoryWrapper repository, - ShareProductDataSerializer serializer, FromJsonHelper fromApiJsonHelper, - ShareProductDividentPayOutDetailsRepositoryWrapper shareProductDividentPayOutDetailsRepository, - ShareProductDividendAssembler shareProductDividendAssembler, - ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService, - BusinessEventNotifierService businessEventNotifierService) { + ShareProductDataSerializer serializer, FromJsonHelper fromApiJsonHelper, + ShareProductDividentPayOutDetailsRepositoryWrapper shareProductDividentPayOutDetailsRepository, + ShareProductDividendAssembler shareProductDividendAssembler, + ProductToGLAccountMappingWritePlatformService accountMappingWritePlatformService, + BusinessEventNotifierService businessEventNotifierService) { return new ShareProductWritePlatformServiceJpaRepositoryImpl(repository, serializer, fromApiJsonHelper, shareProductDividentPayOutDetailsRepository, shareProductDividendAssembler, accountMappingWritePlatformService, businessEventNotifierService); 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..72e00c192c4 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 @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; + import java.math.BigDecimal; import java.time.LocalDate; import java.util.ArrayList; @@ -28,6 +29,7 @@ import java.util.List; import java.util.Locale; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.glaccount.domain.GLAccount; import org.apache.fineract.accounting.glaccount.domain.GLAccountRepositoryWrapper; 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 9c4bc698a06..afa205bc39e 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 @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.accounting.common.AccountingDropdownReadPlatformService; import org.apache.fineract.portfolio.tax.data.TaxComponentData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/service/TaxWritePlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/service/TaxWritePlatformServiceImpl.java index a606846d322..3867fb375c7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/service/TaxWritePlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/tax/service/TaxWritePlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; 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 ea566802ec7..a8c0f1a85fd 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 @@ -6,9 +6,9 @@ * 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 @@ -43,16 +43,16 @@ public class TaxConfiguration { @Bean @ConditionalOnMissingBean(TaxAssembler.class) public TaxAssembler taxAssembler(FromJsonHelper fromApiJsonHelper, GLAccountRepositoryWrapper glAccountRepositoryWrapper, - TaxComponentRepositoryWrapper taxComponentRepositoryWrapper) { + TaxComponentRepositoryWrapper taxComponentRepositoryWrapper) { return new TaxAssembler(fromApiJsonHelper, glAccountRepositoryWrapper, taxComponentRepositoryWrapper); } @Bean @ConditionalOnMissingBean(TaxReadPlatformService.class) public TaxReadPlatformService taxReadPlatformService(final TaxComponentRepository taxComponentRepository, - final TaxComponentRepositoryWrapper taxComponentRepositoryWrapper, final TaxComponentMapper taxComponentMapper, - final TaxGroupRepository taxGroupRepository, final TaxGroupRepositoryWrapper taxGroupRepositoryWrapper, - final TaxGroupMapper taxGroupMapper, AccountingDropdownReadPlatformService accountingDropdownReadPlatformService) { + final TaxComponentRepositoryWrapper taxComponentRepositoryWrapper, final TaxComponentMapper taxComponentMapper, + final TaxGroupRepository taxGroupRepository, final TaxGroupRepositoryWrapper taxGroupRepositoryWrapper, + final TaxGroupMapper taxGroupMapper, AccountingDropdownReadPlatformService accountingDropdownReadPlatformService) { return new TaxReadPlatformServiceImpl(accountingDropdownReadPlatformService, taxComponentRepository, taxComponentRepositoryWrapper, taxComponentMapper, taxGroupRepository, taxGroupRepositoryWrapper, taxGroupMapper); } @@ -60,8 +60,8 @@ public TaxReadPlatformService taxReadPlatformService(final TaxComponentRepositor @Bean @ConditionalOnMissingBean(TaxWritePlatformService.class) public TaxWritePlatformService taxWritePlatformService(TaxValidator validator, TaxAssembler taxAssembler, - TaxComponentRepository taxComponentRepository, TaxGroupRepository taxGroupRepository, - TaxComponentRepositoryWrapper taxComponentRepositoryWrapper, TaxGroupRepositoryWrapper taxGroupRepositoryWrapper) { + TaxComponentRepository taxComponentRepository, TaxGroupRepository taxGroupRepository, + TaxComponentRepositoryWrapper taxComponentRepositoryWrapper, TaxGroupRepositoryWrapper taxGroupRepositoryWrapper) { return new TaxWritePlatformServiceImpl(validator, taxAssembler, taxComponentRepository, taxComponentRepositoryWrapper, taxGroupRepository, taxGroupRepositoryWrapper); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/api/TransferApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/api/TransferApiConstants.java index e106cd56a77..c76be404d77 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/api/TransferApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/api/TransferApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/data/TransfersDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/data/TransfersDataValidator.java index cf697a5e5bd..bb41b20022b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/data/TransfersDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/data/TransfersDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -27,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -83,7 +85,8 @@ public void validateForClientsTransferBetweenGroups(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, TRANSFER_CLIENTS_BETWEEN_GROUPS_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); @@ -118,7 +121,8 @@ public void validateForProposeClientTransfer(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, PROPOSE_CLIENT_TRANSFER_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); @@ -142,7 +146,8 @@ public void validateForAcceptClientTransfer(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, ACCEPT_CLIENT_TRANSFER_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -173,7 +178,8 @@ public void validateForProposeAndAcceptClientTransfer(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, PROPOSE_AND_ACCEPT_CLIENT_TRANSFER_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -209,7 +215,8 @@ public void validateForRejectClientTransfer(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, REJECT_CLIENT_TRANSFER_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -227,7 +234,8 @@ public void validateForWithdrawClientTransfer(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, WITHDRAW_CLIENT_TRANSFER_DATA_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/exception/ClientNotAwaitingTransferApprovalException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/exception/ClientNotAwaitingTransferApprovalException.java index 76dfa9f0fa7..bd8dfabea3f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/exception/ClientNotAwaitingTransferApprovalException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/exception/ClientNotAwaitingTransferApprovalException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/exception/ClientNotAwaitingTransferApprovalOrOnHoldException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/exception/ClientNotAwaitingTransferApprovalOrOnHoldException.java index 2f909f82036..0c3bfb90867 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/exception/ClientNotAwaitingTransferApprovalOrOnHoldException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/exception/ClientNotAwaitingTransferApprovalOrOnHoldException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/exception/TransferNotSupportedException.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/exception/TransferNotSupportedException.java index 3d5b2e321ae..f4399f82cef 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/exception/TransferNotSupportedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/exception/TransferNotSupportedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/AcceptClientTransferCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/AcceptClientTransferCommandHandler.java index 49156748667..01d17d3f170 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/AcceptClientTransferCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/AcceptClientTransferCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/ProposeAndAcceptClientTransferCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/ProposeAndAcceptClientTransferCommandHandler.java index cb0297942b4..cfa806287ba 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/ProposeAndAcceptClientTransferCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/ProposeAndAcceptClientTransferCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/ProposeClientTransferCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/ProposeClientTransferCommandHandler.java index f4e41f7d741..2a85167b5c4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/ProposeClientTransferCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/ProposeClientTransferCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/RejectClientTransferCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/RejectClientTransferCommandHandler.java index 495431aa9d5..1f21cd554c6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/RejectClientTransferCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/RejectClientTransferCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/TransferClientsBetweenGroupsCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/TransferClientsBetweenGroupsCommandHandler.java index 32de9263833..0534cff33cd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/TransferClientsBetweenGroupsCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/TransferClientsBetweenGroupsCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/WithdrawClientTransferCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/WithdrawClientTransferCommandHandler.java index 87cf7929ca8..620cef82493 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/WithdrawClientTransferCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/handler/WithdrawClientTransferCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/service/TransferEventType.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/service/TransferEventType.java index 12d65f0c3f2..3c24a6b4cc9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/service/TransferEventType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/service/TransferEventType.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/service/TransferWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/service/TransferWritePlatformService.java index 9d418e5adf6..39a511f3551 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/service/TransferWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/service/TransferWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/service/TransferWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/service/TransferWritePlatformServiceJpaRepositoryImpl.java index c697bbd238b..3bfaf9a5f0a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/service/TransferWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/service/TransferWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -20,11 +20,13 @@ import com.google.gson.JsonArray; import com.google.gson.JsonObject; + import java.time.LocalDate; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; @@ -138,7 +140,7 @@ public CommandProcessingResult transferClientsBetweenGroups(final Long sourceGro ***/ @Transactional public void transferClientBetweenGroups(final Group sourceGroup, final Client client, final Group destinationGroup, - final Boolean inheritDestinationGroupLoanOfficer, final Staff newLoanOfficer) { + final Boolean inheritDestinationGroupLoanOfficer, final Staff newLoanOfficer) { // next I shall validate that the client is present in this group if (!sourceGroup.hasClientAsMember(client)) { @@ -360,7 +362,7 @@ public CommandProcessingResult rejectClientTransfer(final Long clientId, final J } private void handleClientTransferLifecycleEvent(final Client client, final Office destinationOffice, - final TransferEventType transferEventType, final JsonCommand jsonCommand) { + final TransferEventType transferEventType, final JsonCommand jsonCommand) { /** Get destination loan officer if exists **/ Staff staff = null; Group destinationGroup = null; @@ -386,13 +388,13 @@ private void handleClientTransferLifecycleEvent(final Client client, final Offic case ACCEPTANCE: this.loanWritePlatformService.acceptLoanTransfer(loan, loan.getLastUserTransactionDate(), destinationOffice, staff); - break; + break; case PROPOSAL: this.loanWritePlatformService.initiateLoanTransfer(loan, transferDate); - break; + break; case REJECTION: this.loanWritePlatformService.rejectLoanTransfer(loan); - break; + break; case WITHDRAWAL: this.loanWritePlatformService.withdrawLoanTransfer(loan, loan.getLastUserTransactionDate()); } @@ -409,13 +411,13 @@ private void handleClientTransferLifecycleEvent(final Client client, final Offic case ACCEPTANCE: this.savingsAccountWritePlatformService.acceptSavingsTransfer(savingsAccount, savingsAccount.retrieveLastTransactionDate(), destinationOffice, staff); - break; + break; case PROPOSAL: this.savingsAccountWritePlatformService.initiateSavingsTransfer(savingsAccount, transferDate); - break; + break; case REJECTION: this.savingsAccountWritePlatformService.rejectSavingsTransfer(savingsAccount); - break; + break; case WITHDRAWAL: this.savingsAccountWritePlatformService.withdrawSavingsTransfer(savingsAccount, savingsAccount.retrieveLastTransactionDate()); @@ -451,17 +453,17 @@ private void handleClientTransferLifecycleEvent(final Client client, final Offic client.updateStaff(staff); } } - break; + break; case PROPOSAL: client.setStatus(ClientStatus.TRANSFER_IN_PROGRESS.getValue()); client.updateTransferToOffice(destinationOffice); client.updateProposedTransferDate(transferDate); - break; + break; case REJECTION: client.setStatus(ClientStatus.TRANSFER_ON_HOLD.getValue()); client.updateTransferToOffice(null); client.updateProposedTransferDate(null); - break; + break; case WITHDRAWAL: client.setStatus(ClientStatus.ACTIVE.getValue()); client.updateTransferToOffice(null); diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/starter/TransferConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/starter/TransferConfiguration.java index f516b0be403..3cd9f763594 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/starter/TransferConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/transfer/starter/TransferConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -44,13 +44,13 @@ public class TransferConfiguration { @Bean @ConditionalOnMissingBean(TransferWritePlatformService.class) public TransferWritePlatformService transferWritePlatformService(ClientRepositoryWrapper clientRepositoryWrapper, - OfficeRepositoryWrapper officeRepository, CalendarInstanceRepository calendarInstanceRepository, - LoanWritePlatformService loanWritePlatformService, GroupRepositoryWrapper groupRepository, - LoanRepositoryWrapper loanRepositoryWrapper, TransfersDataValidator transfersDataValidator, - StaffRepositoryWrapper staffRepositoryWrapper, SavingsAccountRepositoryWrapper savingsAccountRepositoryWrapper, - SavingsAccountWritePlatformService savingsAccountWritePlatformService, - ClientTransferDetailsRepositoryWrapper clientTransferDetailsRepositoryWrapper, PlatformSecurityContext context, - LoanOfficerService loanOfficerService, ApplicationEventPublisher eventPublisher) { + OfficeRepositoryWrapper officeRepository, CalendarInstanceRepository calendarInstanceRepository, + LoanWritePlatformService loanWritePlatformService, GroupRepositoryWrapper groupRepository, + LoanRepositoryWrapper loanRepositoryWrapper, TransfersDataValidator transfersDataValidator, + StaffRepositoryWrapper staffRepositoryWrapper, SavingsAccountRepositoryWrapper savingsAccountRepositoryWrapper, + SavingsAccountWritePlatformService savingsAccountWritePlatformService, + ClientTransferDetailsRepositoryWrapper clientTransferDetailsRepositoryWrapper, PlatformSecurityContext context, + LoanOfficerService loanOfficerService, ApplicationEventPublisher eventPublisher) { return new TransferWritePlatformServiceJpaRepositoryImpl(clientRepositoryWrapper, officeRepository, calendarInstanceRepository, groupRepository, loanWritePlatformService, savingsAccountWritePlatformService, loanRepositoryWrapper, savingsAccountRepositoryWrapper, transfersDataValidator, staffRepositoryWrapper, clientTransferDetailsRepositoryWrapper, diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/data/ComponentData.java b/fineract-provider/src/main/java/org/apache/fineract/spm/data/ComponentData.java index adb89dc7660..e082b69dd2e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/data/ComponentData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/data/ComponentData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/data/LookupTableData.java b/fineract-provider/src/main/java/org/apache/fineract/spm/data/LookupTableData.java index 90976d5b5f9..fe9e108f953 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/data/LookupTableData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/data/LookupTableData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/data/LookupTableEntry.java b/fineract-provider/src/main/java/org/apache/fineract/spm/data/LookupTableEntry.java index 98ade11f74f..bcd8517560a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/data/LookupTableEntry.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/data/LookupTableEntry.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/data/QuestionData.java b/fineract-provider/src/main/java/org/apache/fineract/spm/data/QuestionData.java index 4d2232d6798..21c5b47fc9d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/data/QuestionData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/data/QuestionData.java @@ -6,9 +6,9 @@ * 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 @@ -35,7 +35,7 @@ public QuestionData() { } public QuestionData(final Long id, final List responseDatas, final String componentKey, final String key, - final String text, final String description, final Integer sequenceNo) { + final String text, final String description, final Integer sequenceNo) { this.id = id; this.responseDatas = responseDatas; diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/data/ResponseData.java b/fineract-provider/src/main/java/org/apache/fineract/spm/data/ResponseData.java index eec142879a4..019243ff078 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/data/ResponseData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/data/ResponseData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/data/ScorecardData.java b/fineract-provider/src/main/java/org/apache/fineract/spm/data/ScorecardData.java index aa9981a4d97..72edf313a21 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/data/ScorecardData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/data/ScorecardData.java @@ -6,9 +6,9 @@ * 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 @@ -36,7 +36,7 @@ public ScorecardData() { } private ScorecardData(final Long id, final Long userId, final String username, final Long surveyId, final String surveyName, - final Long clientId) { + final Long clientId) { this.id = id; this.userId = userId; this.clientId = clientId; @@ -47,7 +47,7 @@ private ScorecardData(final Long id, final Long userId, final String username, f } public static ScorecardData instance(final Long id, final Long userId, final String username, final Long surveyId, - final String surveyName, final Long clientId) { + final String surveyName, final Long clientId) { return new ScorecardData(id, userId, username, surveyId, surveyName, clientId); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/data/ScorecardValue.java b/fineract-provider/src/main/java/org/apache/fineract/spm/data/ScorecardValue.java index edab5c1b233..b622d6776e7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/data/ScorecardValue.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/data/ScorecardValue.java @@ -6,9 +6,9 @@ * 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 @@ -39,7 +39,7 @@ private ScorecardValue(final Long questionId, final Long responseId, final Integ } public static ScorecardValue instance(final Long questionId, final Long responseId, final Integer value, - final OffsetDateTime createdOn) { + final OffsetDateTime createdOn) { return new ScorecardValue(questionId, responseId, value, createdOn); } diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/data/SurveyData.java b/fineract-provider/src/main/java/org/apache/fineract/spm/data/SurveyData.java index aaf56b3cb1f..9579676caa4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/data/SurveyData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/data/SurveyData.java @@ -6,9 +6,9 @@ * 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 @@ -38,7 +38,7 @@ public SurveyData() { } public SurveyData(final Long id, final List componentDatas, final List questionDatas, final String key, - final String name, final String description, final String countryCode, final LocalDate validFrom, final LocalDate validTo) { + final String name, final String description, final String countryCode, final LocalDate validFrom, final LocalDate validTo) { this.id = id; this.componentDatas = componentDatas; diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Component.java b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Component.java index 433b0e68f17..33a37c0483f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Component.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Component.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/LookupTable.java b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/LookupTable.java index 08979432627..4af6fa473de 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/LookupTable.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/LookupTable.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/LookupTableRepository.java b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/LookupTableRepository.java index 37073ad62cb..20f24fb9c92 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/LookupTableRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/LookupTableRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.spm.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; public interface LookupTableRepository extends JpaRepository { diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Question.java b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Question.java index df199bb19bb..b1bfea110ca 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Question.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Question.java @@ -6,9 +6,9 @@ * 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 @@ -27,7 +27,9 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.OrderBy; import jakarta.persistence.Table; + import java.util.List; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @Entity diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Response.java b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Response.java index 16416c91496..be12c52a68c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Response.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Response.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Scorecard.java b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Scorecard.java index 77c8e3d7f82..e89d1b8b500 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Scorecard.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Scorecard.java @@ -6,9 +6,9 @@ * 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 @@ -25,7 +25,9 @@ import jakarta.persistence.ManyToOne; import jakarta.persistence.OrderBy; import jakarta.persistence.Table; + import java.time.LocalDateTime; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.portfolio.client.domain.Client; import org.apache.fineract.useradministration.domain.AppUser; diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/ScorecardRepository.java b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/ScorecardRepository.java index 9acf74c3750..ed62924c46b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/ScorecardRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/ScorecardRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.spm.domain; import java.util.List; + import org.apache.fineract.portfolio.client.domain.Client; import org.springframework.data.jpa.repository.JpaRepository; diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Survey.java b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Survey.java index a49cc25d25b..71082f52f29 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Survey.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/Survey.java @@ -6,9 +6,9 @@ * 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 @@ -25,9 +25,11 @@ import jakarta.persistence.OneToMany; import jakarta.persistence.OrderBy; import jakarta.persistence.Table; + import java.time.LocalDate; import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @Entity diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/SurveyRepository.java b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/SurveyRepository.java index 72df3ebe233..6ad864d62a2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/SurveyRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/SurveyRepository.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.time.LocalDate; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/SurveyValidator.java b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/SurveyValidator.java index c75a6fcbd2c..0ae564a6ac8 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/domain/SurveyValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/domain/SurveyValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; import org.apache.fineract.infrastructure.core.exception.PlatformApiDataValidationException; diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/exception/LookupTableNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/spm/exception/LookupTableNotFoundException.java index 1a0057a9b36..0f95b3cfcae 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/exception/LookupTableNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/exception/LookupTableNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/exception/SurveyNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/spm/exception/SurveyNotFoundException.java index 70ba60ae842..7f809d51218 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/exception/SurveyNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/exception/SurveyNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/exception/SurveyResponseNotAvailableException.java b/fineract-provider/src/main/java/org/apache/fineract/spm/exception/SurveyResponseNotAvailableException.java index 9c26f990f18..d27cf63ec53 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/exception/SurveyResponseNotAvailableException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/exception/SurveyResponseNotAvailableException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/service/LookupTableService.java b/fineract-provider/src/main/java/org/apache/fineract/spm/service/LookupTableService.java index 13c18dd6251..82898e90c1b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/service/LookupTableService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/service/LookupTableService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.spm.service; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.spm.domain.LookupTable; diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/service/ScorecardReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/spm/service/ScorecardReadPlatformService.java index 32e8377d5ea..ed20fbc7f48 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/service/ScorecardReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/service/ScorecardReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.spm.service; import java.util.Collection; + import org.apache.fineract.spm.data.ScorecardData; public interface ScorecardReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/service/ScorecardReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/spm/service/ScorecardReadPlatformServiceImpl.java index 094bcac7209..aaf47c9ec09 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/service/ScorecardReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/service/ScorecardReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.time.OffsetDateTime; import java.util.Collection; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; @@ -92,7 +93,7 @@ public ScorecardValue mapRow(final ResultSet rs, @SuppressWarnings("unused") fin List getScorecardValueBySurveyAndClient(final Long surveyId, final Long clientId) { ScorecardValueMapper scvm = new ScorecardValueMapper(); String sql = "select " + scvm.schema(); - return this.jdbcTemplate.query(sql, scvm, new Object[] { surveyId, clientId }); // NOSONAR + return this.jdbcTemplate.query(sql, scvm, new Object[]{surveyId, clientId}); // NOSONAR } Collection updateScorecardValues(Collection scorecard) { @@ -107,7 +108,7 @@ public Collection retrieveScorecardBySurvey(Long surveyId) { this.context.authenticatedUser(); ScorecardMapper scm = new ScorecardMapper(); String sql = "select " + scm.schema() + " where sc.survey_id = ? " + " group by sc.survey_id, sc.client_id, sc.id "; - Collection scorecardDatas = this.jdbcTemplate.query(sql, scm, new Object[] { surveyId }); // NOSONAR + Collection scorecardDatas = this.jdbcTemplate.query(sql, scm, new Object[]{surveyId}); // NOSONAR updateScorecardValues(scorecardDatas); return scorecardDatas; } @@ -117,7 +118,7 @@ public Collection retrieveScorecardByClient(Long clientId) { this.context.authenticatedUser(); ScorecardMapper scm = new ScorecardMapper(); String sql = "select " + scm.schema() + " where sc.client_id = ? " + " group by sc.survey_id, sc.client_id, sc.id "; - Collection scorecardDatas = this.jdbcTemplate.query(sql, scm, new Object[] { clientId }); // NOSONAR + Collection scorecardDatas = this.jdbcTemplate.query(sql, scm, new Object[]{clientId}); // NOSONAR updateScorecardValues(scorecardDatas); return scorecardDatas; } @@ -128,7 +129,7 @@ public Collection retrieveScorecardBySurveyAndClient(Long surveyI ScorecardMapper scm = new ScorecardMapper(); String sql = "select " + scm.schema() + " where sc.survey_id = ? and sc.client_id = ? " + " group by sc.survey_id, sc.client_id, sc.id "; - Collection scorecardDatas = this.jdbcTemplate.query(sql, scm, new Object[] { surveyId, clientId }); // NOSONAR + Collection scorecardDatas = this.jdbcTemplate.query(sql, scm, new Object[]{surveyId, clientId}); // NOSONAR updateScorecardValues(scorecardDatas); return scorecardDatas; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/service/ScorecardService.java b/fineract-provider/src/main/java/org/apache/fineract/spm/service/ScorecardService.java index 00297f7bb5c..d6e42d9ec17 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/service/ScorecardService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/service/ScorecardService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.spm.service; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; import org.apache.fineract.portfolio.client.domain.Client; diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/service/SpmService.java b/fineract-provider/src/main/java/org/apache/fineract/spm/service/SpmService.java index 7375372f1bd..a8215f98ae0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/service/SpmService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/service/SpmService.java @@ -6,9 +6,9 @@ * 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 @@ -20,8 +20,10 @@ import jakarta.persistence.EntityExistsException; import jakarta.persistence.PersistenceException; + import java.time.LocalDate; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.exception.ErrorHandler; import org.apache.fineract.infrastructure.core.exception.PlatformDataIntegrityException; diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/starter/SpmConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/spm/starter/SpmConfiguration.java index 6e009e9b02d..8e2334a36c9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/starter/SpmConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/starter/SpmConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -58,7 +58,7 @@ public ScorecardService scorecardService(PlatformSecurityContext securityContext @Bean @ConditionalOnMissingBean(SpmService.class) public SpmService spmService(PlatformSecurityContext securityContext, SurveyRepository surveyRepository, - SurveyValidator surveyValidator) { + SurveyValidator surveyValidator) { return new SpmService(securityContext, surveyRepository, surveyValidator); } } diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/util/LookupTableMapper.java b/fineract-provider/src/main/java/org/apache/fineract/spm/util/LookupTableMapper.java index 6e34f754cd1..738a1b3b92b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/util/LookupTableMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/util/LookupTableMapper.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.spm.data.LookupTableData; import org.apache.fineract.spm.data.LookupTableEntry; import org.apache.fineract.spm.domain.LookupTable; diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/util/ScorecardMapper.java b/fineract-provider/src/main/java/org/apache/fineract/spm/util/ScorecardMapper.java index 2e229c77d7a..1cf070d3311 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/util/ScorecardMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/util/ScorecardMapper.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.fineract.infrastructure.core.service.DateUtils; import org.apache.fineract.portfolio.client.domain.Client; import org.apache.fineract.spm.data.ScorecardData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/util/SurveyApiConstants.java b/fineract-provider/src/main/java/org/apache/fineract/spm/util/SurveyApiConstants.java index ef6c84c8ca0..4db98fc94fb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/util/SurveyApiConstants.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/util/SurveyApiConstants.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/spm/util/SurveyMapper.java b/fineract-provider/src/main/java/org/apache/fineract/spm/util/SurveyMapper.java index 783b1b16c3d..b5bb6951b13 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/spm/util/SurveyMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/spm/util/SurveyMapper.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; + import org.apache.fineract.spm.data.ComponentData; import org.apache.fineract.spm.data.QuestionData; import org.apache.fineract.spm.data.ResponseData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/api/TemplatesApiResourcesSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/template/api/TemplatesApiResourcesSwagger.java index 0372d8da40f..89ae7980378 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/api/TemplatesApiResourcesSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/api/TemplatesApiResourcesSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,7 +19,9 @@ package org.apache.fineract.template.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.List; + import org.apache.fineract.template.domain.TemplateMapper; /** diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/data/TemplateData.java b/fineract-provider/src/main/java/org/apache/fineract/template/data/TemplateData.java index b0830699cdf..9899dea9c3f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/data/TemplateData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/data/TemplateData.java @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import org.apache.fineract.template.domain.Template; import org.apache.fineract.template.domain.TemplateEntity; import org.apache.fineract.template.domain.TemplateType; diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/domain/Template.java b/fineract-provider/src/main/java/org/apache/fineract/template/domain/Template.java index 9ddd970a231..49a86774ba3 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/domain/Template.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/domain/Template.java @@ -6,9 +6,9 @@ * 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 @@ -32,15 +32,17 @@ import jakarta.persistence.OrderBy; import jakarta.persistence.Table; import jakarta.persistence.UniqueConstraint; + import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @Entity -@Table(name = "m_template", uniqueConstraints = { @UniqueConstraint(columnNames = { "name" }, name = "unq_name") }) +@Table(name = "m_template", uniqueConstraints = {@UniqueConstraint(columnNames = {"name"}, name = "unq_name")}) public class Template extends AbstractPersistableCustom { @Column(name = "name", nullable = false, unique = true) @@ -60,12 +62,12 @@ public class Template extends AbstractPersistableCustom { @OrderBy(value = "mapperorder") @OneToMany(targetEntity = TemplateMapper.class, cascade = CascadeType.ALL, fetch = FetchType.EAGER) @JoinTable(name = "m_template_m_templatemappers", joinColumns = { - @JoinColumn(name = "m_template_id", referencedColumnName = "id") }, inverseJoinColumns = { - @JoinColumn(name = "mappers_id", referencedColumnName = "id", unique = true) }) + @JoinColumn(name = "m_template_id", referencedColumnName = "id")}, inverseJoinColumns = { + @JoinColumn(name = "mappers_id", referencedColumnName = "id", unique = true)}) private List mappers; public Template(final String name, final String text, final TemplateEntity entity, final TemplateType type, - final List mappers) { + final List mappers) { this.name = StringUtils.defaultIfEmpty(name, null); this.entity = entity; this.type = type; @@ -73,7 +75,8 @@ public Template(final String name, final String text, final TemplateEntity entit this.mappers = mappers; } - protected Template() {} + protected Template() { + } public static Template fromJson(final JsonCommand command) { final String name = command.stringValueOfParameterNamed("name"); @@ -84,10 +87,10 @@ public static Template fromJson(final JsonCommand command) { switch (templateTypeId) { case 0: type = TemplateType.DOCUMENT; - break; + break; case 2: type = TemplateType.SMS; - break; + break; } final JsonArray array = command.arrayOfParameterNamed("mappers"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateEntity.java b/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateEntity.java index 4c8e545149a..f58f5a046c4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateEntity.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateEntity.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateEntitySerializer.java b/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateEntitySerializer.java index b2ffa42d82c..d5494752162 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateEntitySerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateEntitySerializer.java @@ -6,9 +6,9 @@ * 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 @@ -22,13 +22,14 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; + import java.io.IOException; public class TemplateEntitySerializer extends JsonSerializer { @Override public void serialize(final TemplateEntity value, final JsonGenerator generator, - @SuppressWarnings("unused") final SerializerProvider provider) throws IOException, JsonProcessingException { + @SuppressWarnings("unused") final SerializerProvider provider) throws IOException, JsonProcessingException { generator.writeStartObject(); generator.writeFieldName("id"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateFunctions.java b/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateFunctions.java index 0c5ebf65dda..df3cea834a7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateFunctions.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateFunctions.java @@ -6,9 +6,9 @@ * 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 @@ -21,9 +21,10 @@ import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatterBuilder; + import org.apache.fineract.infrastructure.core.service.DateUtils; -@SuppressWarnings({ "HideUtilityClassConstructor" }) +@SuppressWarnings({"HideUtilityClassConstructor"}) public class TemplateFunctions { public static String now() { diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateMapper.java b/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateMapper.java index ef1fb787067..dbcb58f4d9f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateMapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateMapper.java @@ -6,9 +6,9 @@ * 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 @@ -36,7 +36,8 @@ public class TemplateMapper extends AbstractPersistableCustom { @Column(name = "mappervalue") private String mappervalue; - protected TemplateMapper() {} + protected TemplateMapper() { + } public TemplateMapper(final int mapperorder, final String mapperkey, final String mappervalue) { this.mapperorder = mapperorder; diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateRepository.java b/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateRepository.java index cc99ec7d4ff..98854f102e0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.template.domain; import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateType.java b/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateType.java index 7ca149fd8db..eac8e4223df 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateType.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateType.java @@ -6,9 +6,9 @@ * 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 @@ -29,7 +29,7 @@ public enum TemplateType { SMS(2, "SMS"); /** - * @SerializedName("E-Mail") EMAIL(1, "E-Mail") + * @SerializedName("E-Mail") EMAIL(1, " E-Mail ") */ private final int id; private final String name; diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateTypeSerializer.java b/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateTypeSerializer.java index ce37561b489..283004e6fd1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateTypeSerializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/domain/TemplateTypeSerializer.java @@ -6,9 +6,9 @@ * 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 @@ -22,13 +22,14 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; + import java.io.IOException; public class TemplateTypeSerializer extends JsonSerializer { @Override public void serialize(final TemplateType value, final JsonGenerator generator, - @SuppressWarnings("unused") final SerializerProvider provider) throws IOException, JsonProcessingException { + @SuppressWarnings("unused") final SerializerProvider provider) throws IOException, JsonProcessingException { generator.writeStartObject(); generator.writeFieldName("id"); diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/exception/TemplateForbiddenException.java b/fineract-provider/src/main/java/org/apache/fineract/template/exception/TemplateForbiddenException.java index c089b07f340..98e6c301b13 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/exception/TemplateForbiddenException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/exception/TemplateForbiddenException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/exception/TemplateNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/template/exception/TemplateNotFoundException.java index 5840cd025b7..ee04d3f6ec7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/exception/TemplateNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/exception/TemplateNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/handler/CreateTemplateCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/template/handler/CreateTemplateCommandHandler.java index 46f841fcbc6..03b7dffc080 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/handler/CreateTemplateCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/handler/CreateTemplateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/handler/DeleteTemplateCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/template/handler/DeleteTemplateCommandHandler.java index 27800eabd61..3fc032c1368 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/handler/DeleteTemplateCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/handler/DeleteTemplateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/handler/UpdateTemplateCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/template/handler/UpdateTemplateCommandHandler.java index cd6e522947c..5c47e78440c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/handler/UpdateTemplateCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/handler/UpdateTemplateCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/service/JpaTemplateDomainService.java b/fineract-provider/src/main/java/org/apache/fineract/template/service/JpaTemplateDomainService.java index e641a5b58f4..08bf178801a 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/service/JpaTemplateDomainService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/service/JpaTemplateDomainService.java @@ -6,9 +6,9 @@ * 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 @@ -20,8 +20,10 @@ import com.google.gson.JsonArray; import com.google.gson.JsonElement; + import java.util.ArrayList; import java.util.List; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; @@ -87,10 +89,10 @@ public CommandProcessingResult updateTemplate(final Long templateId, final JsonC switch (templateTypeId) { case 0: type = TemplateType.DOCUMENT; - break; + break; case 2: type = TemplateType.SMS; - break; + break; default: type = null; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/service/TemplateDomainService.java b/fineract-provider/src/main/java/org/apache/fineract/template/service/TemplateDomainService.java index 29b06eff933..e232eb4dbb5 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/service/TemplateDomainService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/service/TemplateDomainService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.template.service; import java.util.List; + import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; import org.apache.fineract.template.domain.Template; 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..19fd05fddec 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 @@ -6,9 +6,9 @@ * 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 @@ -22,6 +22,7 @@ import com.github.mustachejava.DefaultMustacheFactory; import com.github.mustachejava.Mustache; import com.github.mustachejava.MustacheFactory; + import java.io.IOException; import java.io.InputStream; import java.io.StringReader; @@ -38,6 +39,7 @@ import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.config.FineractProperties; diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/service/TrustModifier.java b/fineract-provider/src/main/java/org/apache/fineract/template/service/TrustModifier.java index 390bca73e7b..fa961861979 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/service/TrustModifier.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/service/TrustModifier.java @@ -6,9 +6,9 @@ * 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 @@ -61,7 +61,7 @@ static synchronized SSLSocketFactory prepFactory(final HttpsURLConnection httpsC if (factory == null) { final SSLContext ctx = SSLContext.getInstance("TLS"); - ctx.init(null, new TrustManager[] { new AlwaysTrustManager() }, null); + ctx.init(null, new TrustManager[]{new AlwaysTrustManager()}, null); factory = ctx.getSocketFactory(); } return factory; @@ -78,10 +78,12 @@ public boolean verify(final String hostname, final SSLSession session) { private static final class AlwaysTrustManager implements X509TrustManager { @Override - public void checkClientTrusted(final X509Certificate[] arg0, final String arg1) throws CertificateException {}// NOSONAR + public void checkClientTrusted(final X509Certificate[] arg0, final String arg1) throws CertificateException { + }// NOSONAR @Override - public void checkServerTrusted(final X509Certificate[] arg0, final String arg1) throws CertificateException {}// NOSONAR + public void checkServerTrusted(final X509Certificate[] arg0, final String arg1) throws CertificateException { + }// NOSONAR @Override public X509Certificate[] getAcceptedIssuers() { diff --git a/fineract-provider/src/main/java/org/apache/fineract/template/starter/TemplateConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/template/starter/TemplateConfiguration.java index cde91780e98..e9f37ac25dd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/template/starter/TemplateConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/template/starter/TemplateConfiguration.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/AppUserApiConstant.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/AppUserApiConstant.java index 7c9862c4710..2730bac65e1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/AppUserApiConstant.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/AppUserApiConstant.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiResourceSwagger.java index f93078e5b13..25c4f26df21 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PasswordPreferencesApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PermissionsApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PermissionsApiResourceSwagger.java index 3d806c307d5..3cbf6a12e64 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PermissionsApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/PermissionsApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.useradministration.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.Map; /** diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/RolesApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/RolesApiResourceSwagger.java index 0fbcb109ed0..df1b4345a5b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/RolesApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/RolesApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,13 +19,14 @@ package org.apache.fineract.useradministration.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.Collection; import java.util.Map; /** * Created by sanyam on 23/8/17. */ -@SuppressWarnings({ "MemberName" }) +@SuppressWarnings({"MemberName"}) final class RolesApiResourceSwagger { private RolesApiResourceSwagger() { @@ -111,7 +112,8 @@ private PutRolesRoleIdResponse() { static final class PutRolesRoleIdResponseChanges { - private PutRolesRoleIdResponseChanges() {} + private PutRolesRoleIdResponseChanges() { + } @Schema(example = "some description(changed)") public String description; diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResourceSwagger.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResourceSwagger.java index 4146737309a..b5bc2c8a298 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResourceSwagger.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/api/UsersApiResourceSwagger.java @@ -6,9 +6,9 @@ * 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 @@ -19,8 +19,10 @@ package org.apache.fineract.useradministration.api; import io.swagger.v3.oas.annotations.media.Schema; + import java.util.Collection; import java.util.List; + import org.apache.fineract.organisation.office.data.OfficeData; import org.apache.fineract.organisation.staff.data.StaffData; import org.apache.fineract.useradministration.data.RoleData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/command/PermissionsCommand.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/command/PermissionsCommand.java index c72560c8116..531417fbc8e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/command/PermissionsCommand.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/command/PermissionsCommand.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/data/PasswordPreferencesDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/data/PasswordPreferencesDataValidator.java index 86959cb8bbb..c02d7af6775 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/data/PasswordPreferencesDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/data/PasswordPreferencesDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -27,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -54,7 +56,8 @@ public void validateForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, REQUEST_DATA_PARAMETERS); final JsonElement element = this.fromApiJsonHelper.parse(json); diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/data/PasswordValidationPolicyData.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/data/PasswordValidationPolicyData.java index 845d235f536..3a5f0e2e497 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/data/PasswordValidationPolicyData.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/data/PasswordValidationPolicyData.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUserPreviousPassword.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUserPreviousPassword.java index f059921f939..054bccba20b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUserPreviousPassword.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUserPreviousPassword.java @@ -6,9 +6,9 @@ * 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 @@ -21,7 +21,9 @@ import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Table; + import java.time.LocalDate; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; import org.apache.fineract.infrastructure.core.service.DateUtils; diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUserPreviousPasswordRepository.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUserPreviousPasswordRepository.java index f1f90f888c5..a4b80262e87 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUserPreviousPasswordRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUserPreviousPasswordRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.useradministration.domain; import java.util.List; + import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUserRepository.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUserRepository.java index b1e04f227ab..699be88f2a6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUserRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUserRepository.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.useradministration.domain; import java.util.Collection; + import org.apache.fineract.infrastructure.security.domain.PlatformUserRepository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUserRepositoryWrapper.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUserRepositoryWrapper.java index ca5676e87e1..28de6c0fc2c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUserRepositoryWrapper.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/AppUserRepositoryWrapper.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/JpaUserDomainService.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/JpaUserDomainService.java index 6b8c123019d..7858d86c620 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/JpaUserDomainService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/JpaUserDomainService.java @@ -6,9 +6,9 @@ * 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 @@ -33,7 +33,7 @@ public class JpaUserDomainService implements UserDomainService { @Autowired public JpaUserDomainService(final AppUserRepository userRepository, final PlatformPasswordEncoder applicationPasswordEncoder, - final PlatformEmailService emailService) { + final PlatformEmailService emailService) { this.userRepository = userRepository; this.applicationPasswordEncoder = applicationPasswordEncoder; this.emailService = emailService; diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/PasswordValidationPolicy.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/PasswordValidationPolicy.java index 507bb27f656..4357e093009 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/PasswordValidationPolicy.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/PasswordValidationPolicy.java @@ -6,9 +6,9 @@ * 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 @@ -21,8 +21,10 @@ import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.Table; + import java.util.LinkedHashMap; import java.util.Map; + import org.apache.fineract.infrastructure.core.domain.AbstractPersistableCustom; @Entity diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/PasswordValidationPolicyRepository.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/PasswordValidationPolicyRepository.java index 96f1527d4d0..e4c73ea81c2 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/PasswordValidationPolicyRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/PasswordValidationPolicyRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/PermissionRepository.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/PermissionRepository.java index 07a3edc413f..398986e0df4 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/PermissionRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/PermissionRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/RoleRepository.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/RoleRepository.java index 832286eca16..76f60d7bded 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/RoleRepository.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/RoleRepository.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/UserDomainService.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/UserDomainService.java index ac7611f92f7..21e96d73003 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/UserDomainService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/domain/UserDomainService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PasswordMustBeDifferentException.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PasswordMustBeDifferentException.java index bb9669eb8f8..b32ebd7fbc0 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PasswordMustBeDifferentException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PasswordMustBeDifferentException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PasswordPreviouslyUsedException.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PasswordPreviouslyUsedException.java index 216fa9fe915..484c5350e7e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PasswordPreviouslyUsedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PasswordPreviouslyUsedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PasswordValidationPolicyNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PasswordValidationPolicyNotFoundException.java index a2e60875335..56100541dc9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PasswordValidationPolicyNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PasswordValidationPolicyNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PermissionCantBeMakerCheckerableException.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PermissionCantBeMakerCheckerableException.java index 9da77658fb3..08d394534dd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PermissionCantBeMakerCheckerableException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PermissionCantBeMakerCheckerableException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PermissionNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PermissionNotFoundException.java index 053e1e23e27..768ec88e938 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PermissionNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/PermissionNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/RoleAssociatedException.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/RoleAssociatedException.java index ebec28dbfa8..c7080fbfffb 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/RoleAssociatedException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/RoleAssociatedException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/RoleNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/RoleNotFoundException.java index 9e5e0cf27f8..6a21d89e32b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/RoleNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/RoleNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/UserNotFoundException.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/UserNotFoundException.java index 12ba82f1194..0a88adfeba7 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/UserNotFoundException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/UserNotFoundException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/UsernameAlreadyExistsException.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/UsernameAlreadyExistsException.java index 8dd2aeafc07..7d47379291b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/UsernameAlreadyExistsException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/UsernameAlreadyExistsException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/UsernameMustBeDifferentException.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/UsernameMustBeDifferentException.java index 663976db92b..ee832b95127 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/UsernameMustBeDifferentException.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/exception/UsernameMustBeDifferentException.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/ChangeUserPasswordCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/ChangeUserPasswordCommandHandler.java index ee4c8b1136d..2e81a623231 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/ChangeUserPasswordCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/ChangeUserPasswordCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/CreateRoleCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/CreateRoleCommandHandler.java index e8b84714fc8..447801396b9 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/CreateRoleCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/CreateRoleCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/CreateUserCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/CreateUserCommandHandler.java index 80e515e65aa..4cf34a6ec6d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/CreateUserCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/CreateUserCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/DeleteRoleCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/DeleteRoleCommandHandler.java index 9d90358760c..56a732470c1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/DeleteRoleCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/DeleteRoleCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/DeleteUserCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/DeleteUserCommandHandler.java index f2b825a7e3d..43789127b0d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/DeleteUserCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/DeleteUserCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/DisableRoleCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/DisableRoleCommandHandler.java index 3b7271383f6..d0707daab4f 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/DisableRoleCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/DisableRoleCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/EnableRoleCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/EnableRoleCommandHandler.java index 25d2d221b98..872a17737ca 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/EnableRoleCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/EnableRoleCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdateMakerCheckerPermissionsCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdateMakerCheckerPermissionsCommandHandler.java index b13ba6726c8..2f18129fc25 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdateMakerCheckerPermissionsCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdateMakerCheckerPermissionsCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdatePasswordPreferencesCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdatePasswordPreferencesCommandHandler.java index 9fb0c9b6cd1..b78fd85dc31 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdatePasswordPreferencesCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdatePasswordPreferencesCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdateRoleCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdateRoleCommandHandler.java index 90dc046766a..8fbef166774 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdateRoleCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdateRoleCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdateRolePermissionsCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdateRolePermissionsCommandHandler.java index 85e05b9de48..d02e3714bc6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdateRolePermissionsCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdateRolePermissionsCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdateUserCommandHandler.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdateUserCommandHandler.java index 75dc1c5a7ba..a643650a9bd 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdateUserCommandHandler.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/handler/UpdateUserCommandHandler.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/serialization/PermissionsCommandFromApiJsonDeserializer.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/serialization/PermissionsCommandFromApiJsonDeserializer.java index 327bcc4e1df..f1fdbd8ef3e 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/serialization/PermissionsCommandFromApiJsonDeserializer.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/serialization/PermissionsCommandFromApiJsonDeserializer.java @@ -6,9 +6,9 @@ * 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 @@ -19,11 +19,13 @@ package org.apache.fineract.useradministration.serialization; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.Arrays; import java.util.HashSet; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.exception.InvalidJsonException; import org.apache.fineract.infrastructure.core.serialization.AbstractFromApiJsonDeserializer; @@ -57,7 +59,8 @@ public PermissionsCommand commandFromApiJson(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); return this.fromApiJsonHelper.fromJson(json, PermissionsCommand.class); diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserReadPlatformService.java index ce20da63b28..7a0381e28ba 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.useradministration.service; import java.util.Collection; + import org.apache.fineract.useradministration.data.AppUserData; public interface AppUserReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserReadPlatformServiceImpl.java index e835d1f6c3b..eed55c4aed6 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Set; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.infrastructure.security.service.PlatformSecurityContext; @@ -68,7 +69,7 @@ public Collection retrieveAllUsers() { final AppUserMapper mapper = new AppUserMapper(this.roleReadPlatformService, this.staffReadPlatformService); final String sql = "select " + mapper.schema(); - return this.jdbcTemplate.query(sql, mapper, new Object[] { hierarchySearchString }); // NOSONAR + return this.jdbcTemplate.query(sql, mapper, new Object[]{hierarchySearchString}); // NOSONAR } @Override @@ -80,7 +81,7 @@ public Collection retrieveSearchTemplate() { final AppUserLookupMapper mapper = new AppUserLookupMapper(); final String sql = "select " + mapper.schema(); - return this.jdbcTemplate.query(sql, mapper, new Object[] { hierarchySearchString }); // NOSONAR + return this.jdbcTemplate.query(sql, mapper, new Object[]{hierarchySearchString}); // NOSONAR } @Override @@ -188,7 +189,7 @@ public String schema() { @Override public boolean isUsernameExist(String username) { String sql = "select count(*) from m_appuser where username = ?"; - Object[] params = new Object[] { username }; + Object[] params = new Object[]{username}; int count = this.jdbcTemplate.queryForObject(sql, Integer.class, params); return count != 0; } diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserWritePlatformService.java index 06d0437abde..3f46e271bfa 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserWritePlatformServiceJpaRepositoryImpl.java index a4ff1760fb4..3b13b34b4b1 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/AppUserWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,10 +19,12 @@ package org.apache.fineract.useradministration.service; import jakarta.persistence.PersistenceException; + import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; @@ -80,7 +82,7 @@ public class AppUserWritePlatformServiceJpaRepositoryImpl implements AppUserWrit @Override @Transactional - @Caching(evict = { @CacheEvict(value = "users", allEntries = true), @CacheEvict(value = "usersByUsername", allEntries = true) }) + @Caching(evict = {@CacheEvict(value = "users", allEntries = true), @CacheEvict(value = "usersByUsername", allEntries = true)}) public CommandProcessingResult createUser(final JsonCommand command) { try { this.context.authenticatedUser(); @@ -140,7 +142,7 @@ public CommandProcessingResult createUser(final JsonCommand command) { @Override @Transactional - @Caching(evict = { @CacheEvict(value = "users", allEntries = true), @CacheEvict(value = "usersByUsername", allEntries = true) }) + @Caching(evict = {@CacheEvict(value = "users", allEntries = true), @CacheEvict(value = "usersByUsername", allEntries = true)}) public CommandProcessingResult changeUserPassword(final Long userId, final JsonCommand command) { try { this.context.authenticatedUser(new CommandWrapperBuilder().changeUserPassword(userId).build()); @@ -172,7 +174,7 @@ public CommandProcessingResult changeUserPassword(final Long userId, final JsonC @Override @Transactional - @Caching(evict = { @CacheEvict(value = "users", allEntries = true), @CacheEvict(value = "usersByUsername", allEntries = true) }) + @Caching(evict = {@CacheEvict(value = "users", allEntries = true), @CacheEvict(value = "usersByUsername", allEntries = true)}) public CommandProcessingResult updateUser(final Long userId, final JsonCommand command) { try { final AppUser currentUser = this.context.authenticatedUser(new CommandWrapperBuilder().updateUser(null).build()); @@ -284,7 +286,7 @@ private Set assembleSetOfRoles(final String[] rolesArray) { @Override @Transactional - @Caching(evict = { @CacheEvict(value = "users", allEntries = true), @CacheEvict(value = "usersByUsername", allEntries = true) }) + @Caching(evict = {@CacheEvict(value = "users", allEntries = true), @CacheEvict(value = "usersByUsername", allEntries = true)}) public CommandProcessingResult deleteUser(final Long userId) { final AppUser user = this.appUserRepository.findById(userId).orElseThrow(() -> new UserNotFoundException(userId)); if (user.isDeleted()) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PasswordPreferencesWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PasswordPreferencesWritePlatformService.java index ef49e282739..2db61563380 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PasswordPreferencesWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PasswordPreferencesWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PasswordPreferencesWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PasswordPreferencesWritePlatformServiceJpaRepositoryImpl.java index c8a022238e8..a2042431d57 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PasswordPreferencesWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PasswordPreferencesWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.api.JsonCommand; diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PasswordValidationPolicyReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PasswordValidationPolicyReadPlatformService.java index 4d9e2fbedf1..cc679d95e12 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PasswordValidationPolicyReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PasswordValidationPolicyReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.useradministration.service; import java.util.Collection; + import org.apache.fineract.useradministration.data.PasswordValidationPolicyData; public interface PasswordValidationPolicyReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PasswordValidationPolicyReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PasswordValidationPolicyReadPlatformServiceImpl.java index 662594bb605..7f92fe34bff 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PasswordValidationPolicyReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PasswordValidationPolicyReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; + import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.infrastructure.core.service.database.DatabaseSpecificSQLGenerator; import org.apache.fineract.useradministration.data.PasswordValidationPolicyData; diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionReadPlatformService.java index c30367235db..eb938e63508 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.useradministration.service; import java.util.Collection; + import org.apache.fineract.useradministration.data.PermissionData; public interface PermissionReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionReadPlatformServiceImpl.java index 9554f8cdb73..a660ecabcca 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.fineract.infrastructure.core.service.database.DatabaseSpecificSQLGenerator; @@ -45,7 +46,7 @@ public Collection retrieveAllPermissions() { final PermissionUsageDataMapper mapper = new PermissionUsageDataMapper(sqlGenerator); final String sql = mapper.permissionSchema(); log.debug("retrieveAllPermissions: {}", sql); - return this.jdbcTemplate.query(sql, mapper, new Object[] {}); + return this.jdbcTemplate.query(sql, mapper, new Object[]{}); } @Override @@ -57,7 +58,7 @@ public Collection retrieveAllMakerCheckerablePermissions() { final String sql = mapper.makerCheckerablePermissionSchema(); log.debug("retrieveAllMakerCheckerablePermissions: {}", sql); - return this.jdbcTemplate.query(sql, mapper, new Object[] {}); + return this.jdbcTemplate.query(sql, mapper, new Object[]{}); } @Override @@ -67,7 +68,7 @@ public Collection retrieveAllRolePermissions(final Long roleId) final String sql = mapper.rolePermissionSchema(); log.debug("retrieveAllRolePermissions: {}", sql); - return this.jdbcTemplate.query(sql, mapper, new Object[] { roleId }); + return this.jdbcTemplate.query(sql, mapper, new Object[]{roleId}); } private static final class PermissionUsageDataMapper implements RowMapper { diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionWritePlatformService.java index 58362abdb01..b7d12029588 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionWritePlatformServiceJpaRepositoryImpl.java index 01eb6002d5f..3eec9fe2d23 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/PermissionWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; + import lombok.RequiredArgsConstructor; import org.apache.fineract.infrastructure.core.api.JsonCommand; import org.apache.fineract.infrastructure.core.data.CommandProcessingResult; @@ -42,7 +43,7 @@ public class PermissionWritePlatformServiceJpaRepositoryImpl implements Permissi private final PermissionRepository permissionRepository; private final PermissionsCommandFromApiJsonDeserializer fromApiJsonDeserializer; - @Caching(evict = { @CacheEvict(value = "users", allEntries = true), @CacheEvict(value = "usersByUsername", allEntries = true) }) + @Caching(evict = {@CacheEvict(value = "users", allEntries = true), @CacheEvict(value = "usersByUsername", allEntries = true)}) @Transactional @Override public CommandProcessingResult updateMakerCheckerPermissions(final JsonCommand command) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleDataValidator.java index 3e11d5daf65..ad43f544326 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -20,6 +20,7 @@ import com.google.gson.JsonElement; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -27,6 +28,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; @@ -60,7 +62,8 @@ public void validateForCreate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); @@ -82,7 +85,8 @@ public void validateForUpdate(final String json) { throw new InvalidJsonException(); } - final Type typeOfMap = new TypeToken>() {}.getType(); + final Type typeOfMap = new TypeToken>() { + }.getType(); this.fromApiJsonHelper.checkForUnsupportedParameters(typeOfMap, json, SUPPORTED_PARAMETERS); final List dataValidationErrors = new ArrayList<>(); diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleReadPlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleReadPlatformService.java index b49b96da562..0e491cc406b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleReadPlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleReadPlatformService.java @@ -6,9 +6,9 @@ * 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 @@ -19,6 +19,7 @@ package org.apache.fineract.useradministration.service; import java.util.Collection; + import org.apache.fineract.useradministration.data.RoleData; public interface RoleReadPlatformService { diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleReadPlatformServiceImpl.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleReadPlatformServiceImpl.java index c6f6b25c36c..83110f42317 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleReadPlatformServiceImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleReadPlatformServiceImpl.java @@ -6,9 +6,9 @@ * 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 @@ -21,6 +21,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.util.Collection; + import org.apache.fineract.infrastructure.core.domain.JdbcSupport; import org.apache.fineract.useradministration.data.RoleData; import org.apache.fineract.useradministration.exception.RoleNotFoundException; diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleWritePlatformService.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleWritePlatformService.java index cc35476af9d..aeba951a3ab 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleWritePlatformService.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleWritePlatformService.java @@ -6,9 +6,9 @@ * 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 diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleWritePlatformServiceJpaRepositoryImpl.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleWritePlatformServiceJpaRepositoryImpl.java index 3e31b797775..bd62f48c66c 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleWritePlatformServiceJpaRepositoryImpl.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/RoleWritePlatformServiceJpaRepositoryImpl.java @@ -6,9 +6,9 @@ * 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 @@ -19,9 +19,11 @@ package org.apache.fineract.useradministration.service; import jakarta.persistence.PersistenceException; + import java.util.Collection; import java.util.HashMap; import java.util.Map; + import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.exception.ExceptionUtils; @@ -100,7 +102,7 @@ private void handleDataIntegrityIssues(final JsonCommand command, final Throwabl throw ErrorHandler.getMappable(dve, "error.msg.role.unknown.data.integrity.issue", "Unknown data integrity issue with resource."); } - @Caching(evict = { @CacheEvict(value = "users", allEntries = true), @CacheEvict(value = "usersByUsername", allEntries = true) }) + @Caching(evict = {@CacheEvict(value = "users", allEntries = true), @CacheEvict(value = "usersByUsername", allEntries = true)}) @Transactional @Override public CommandProcessingResult updateRole(final Long roleId, final JsonCommand command) { @@ -136,7 +138,7 @@ public CommandProcessingResult updateRole(final Long roleId, final JsonCommand c } } - @Caching(evict = { @CacheEvict(value = "users", allEntries = true), @CacheEvict(value = "usersByUsername", allEntries = true) }) + @Caching(evict = {@CacheEvict(value = "users", allEntries = true), @CacheEvict(value = "usersByUsername", allEntries = true)}) @Transactional @Override public CommandProcessingResult updateRolePermissions(final Long roleId, final JsonCommand command) { diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/UserDataValidator.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/UserDataValidator.java index befe6cba925..7c4480d568b 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/UserDataValidator.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/service/UserDataValidator.java @@ -6,9 +6,9 @@ * 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 @@ -24,6 +24,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.reflect.TypeToken; + import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Arrays; @@ -31,6 +32,7 @@ import java.util.List; import java.util.Map; import java.util.Set; + import org.apache.commons.lang3.StringUtils; import org.apache.fineract.infrastructure.core.data.ApiParameterError; import org.apache.fineract.infrastructure.core.data.DataValidatorBuilder; diff --git a/fineract-provider/src/main/java/org/apache/fineract/useradministration/starter/UserAdministrationConfiguration.java b/fineract-provider/src/main/java/org/apache/fineract/useradministration/starter/UserAdministrationConfiguration.java index 8a1c543685d..1a5c986a74d 100644 --- a/fineract-provider/src/main/java/org/apache/fineract/useradministration/starter/UserAdministrationConfiguration.java +++ b/fineract-provider/src/main/java/org/apache/fineract/useradministration/starter/UserAdministrationConfiguration.java @@ -6,9 +6,9 @@ * 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 @@ -63,8 +63,8 @@ public class UserAdministrationConfiguration { @Bean @ConditionalOnMissingBean(AppUserReadPlatformService.class) public AppUserReadPlatformService appUserReadPlatformService(PlatformSecurityContext context, JdbcTemplate jdbcTemplate, - OfficeReadPlatformService officeReadPlatformService, RoleReadPlatformService roleReadPlatformService, - AppUserRepository appUserRepository, StaffReadService staffReadPlatformService) { + OfficeReadPlatformService officeReadPlatformService, RoleReadPlatformService roleReadPlatformService, + AppUserRepository appUserRepository, StaffReadService staffReadPlatformService) { return new AppUserReadPlatformServiceImpl(context, jdbcTemplate, officeReadPlatformService, roleReadPlatformService, appUserRepository, staffReadPlatformService); } @@ -72,10 +72,10 @@ public AppUserReadPlatformService appUserReadPlatformService(PlatformSecurityCon @Bean @ConditionalOnMissingBean(AppUserWritePlatformService.class) public AppUserWritePlatformService appUserWritePlatformService(PlatformSecurityContext context, UserDomainService userDomainService, - PlatformPasswordEncoder platformPasswordEncoder, AppUserRepository appUserRepository, - OfficeRepositoryWrapper officeRepositoryWrapper, RoleRepository roleRepository, UserDataValidator fromApiJsonDeserializer, - AppUserPreviousPasswordRepository appUserPreviewPasswordRepository, StaffRepository staffRepository, - ConfigurationDomainService configurationDomainService) { + PlatformPasswordEncoder platformPasswordEncoder, AppUserRepository appUserRepository, + OfficeRepositoryWrapper officeRepositoryWrapper, RoleRepository roleRepository, UserDataValidator fromApiJsonDeserializer, + AppUserPreviousPasswordRepository appUserPreviewPasswordRepository, StaffRepository staffRepository, + ConfigurationDomainService configurationDomainService) { return new AppUserWritePlatformServiceJpaRepositoryImpl(context, userDomainService, platformPasswordEncoder, appUserRepository, officeRepositoryWrapper, roleRepository, fromApiJsonDeserializer, appUserPreviewPasswordRepository, staffRepository, configurationDomainService); @@ -91,21 +91,21 @@ public PasswordPreferencesWritePlatformService passwordPreferencesWritePlatformS @Bean @ConditionalOnMissingBean(PasswordValidationPolicyReadPlatformService.class) public PasswordValidationPolicyReadPlatformService passwordValidationPolicyReadPlatformService(JdbcTemplate jdbcTemplate, - DatabaseSpecificSQLGenerator sqlGenerator) { + DatabaseSpecificSQLGenerator sqlGenerator) { return new PasswordValidationPolicyReadPlatformServiceImpl(jdbcTemplate, sqlGenerator); } @Bean @ConditionalOnMissingBean(PermissionReadPlatformService.class) public PermissionReadPlatformService permissionReadPlatformService(PlatformSecurityContext context, JdbcTemplate jdbcTemplate, - DatabaseSpecificSQLGenerator sqlGenerator) { + DatabaseSpecificSQLGenerator sqlGenerator) { return new PermissionReadPlatformServiceImpl(context, jdbcTemplate, sqlGenerator); } @Bean @ConditionalOnMissingBean(PermissionWritePlatformService.class) public PermissionWritePlatformService permissionWritePlatformService(PlatformSecurityContext context, - PermissionRepository permissionRepository, PermissionsCommandFromApiJsonDeserializer fromApiJsonDeserializer) { + PermissionRepository permissionRepository, PermissionsCommandFromApiJsonDeserializer fromApiJsonDeserializer) { return new PermissionWritePlatformServiceJpaRepositoryImpl(context, permissionRepository, fromApiJsonDeserializer); } @@ -118,8 +118,8 @@ public RoleReadPlatformService roleReadPlatformService(JdbcTemplate jdbcTemplate @Bean @ConditionalOnMissingBean(RoleWritePlatformService.class) public RoleWritePlatformService roleWritePlatformService(PlatformSecurityContext context, RoleRepository roleRepository, - PermissionRepository permissionRepository, RoleDataValidator roleCommandFromApiJsonDeserializer, - PermissionsCommandFromApiJsonDeserializer permissionsFromApiJsonDeserializer) { + PermissionRepository permissionRepository, RoleDataValidator roleCommandFromApiJsonDeserializer, + PermissionsCommandFromApiJsonDeserializer permissionsFromApiJsonDeserializer) { return new RoleWritePlatformServiceJpaRepositoryImpl(context, roleRepository, permissionRepository, roleCommandFromApiJsonDeserializer, permissionsFromApiJsonDeserializer); } diff --git a/fineract-provider/src/main/resources/ESAPI.properties b/fineract-provider/src/main/resources/ESAPI.properties index 5bec38d5fe6..0f5b71074e2 100644 --- a/fineract-provider/src/main/resources/ESAPI.properties +++ b/fineract-provider/src/main/resources/ESAPI.properties @@ -16,7 +16,6 @@ # specific language governing permissions and limitations # under the License. # - # # OWASP Enterprise Security API (ESAPI) Properties file -- PRODUCTION Version # @@ -68,7 +67,6 @@ # This is 'false' in the src/test/resources/.esapi version. It is 'true' by # default for reasons of backward compatibility with earlier ESAPI versions. ESAPI.printProperties=true - # ESAPI is designed to be easily extensible. You can use the reference implementation # or implement your own providers to take advantage of your enterprise's security # infrastructure. The functions in ESAPI are referenced using the ESAPI locator, like: @@ -89,7 +87,6 @@ ESAPI.AccessControl=org.owasp.esapi.reference.DefaultAccessController ESAPI.Authenticator=org.owasp.esapi.reference.FileBasedAuthenticator ESAPI.Encoder=org.owasp.esapi.reference.DefaultEncoder ESAPI.Encryptor=org.owasp.esapi.reference.crypto.JavaEncryptor - ESAPI.Executor=org.owasp.esapi.reference.DefaultExecutor ESAPI.HTTPUtilities=org.owasp.esapi.reference.DefaultHTTPUtilities ESAPI.IntrusionDetector=org.owasp.esapi.reference.DefaultIntrusionDetector @@ -106,7 +103,6 @@ Logger.ClientInfo=false ESAPI.Logger=org.owasp.esapi.logging.slf4j.Slf4JLogFactory ESAPI.Randomizer=org.owasp.esapi.reference.DefaultRandomizer ESAPI.Validator=org.owasp.esapi.reference.DefaultValidator - #=========================================================================== # ESAPI Authenticator # @@ -119,7 +115,6 @@ Authenticator.RememberTokenDuration=14 # Session Timeouts (in minutes) Authenticator.IdleTimeoutDuration=20 Authenticator.AbsoluteTimeoutDuration=120 - #=========================================================================== # ESAPI Encoder # @@ -133,17 +128,13 @@ Authenticator.AbsoluteTimeoutDuration=120 # Multiple encoding is when a single encoding format is applied multiple times. Allowing # multiple encoding is strongly discouraged. Encoder.AllowMultipleEncoding=false - # Mixed encoding is when multiple different encoding formats are applied, or when # multiple formats are nested. Allowing multiple encoding is strongly discouraged. Encoder.AllowMixedEncoding=false - # The default list of codecs to apply when canonicalizing untrusted data. The list should include the codecs # for all downstream interpreters or decoders. For example, if the data is likely to end up in a URL, HTML, or # inside JavaScript, then the list of codecs below is appropriate. The order of the list is not terribly important. Encoder.DefaultCodecList=HTMLEntityCodec,PercentCodec,JavaScriptCodec - - #=========================================================================== # ESAPI Encryption # @@ -178,7 +169,6 @@ Encoder.DefaultCodecList=HTMLEntityCodec,PercentCodec,JavaScriptCodec # #Encryptor.MasterKey= #Encryptor.MasterSalt= - # Provides the default JCE provider that ESAPI will "prefer" for its symmetric # encryption and hashing. (That is it will look to this provider first, but it # will defer to other providers if the requested algorithm is not implemented @@ -206,7 +196,6 @@ Encoder.DefaultCodecList=HTMLEntityCodec,PercentCodec,JavaScriptCodec # # Default: Keeps the JCE provider set to whatever JVM sets it to. Encryptor.PreferredJCEProvider= - # AES is the most widely used and strongest encryption algorithm. This # should agree with your Encryptor.CipherTransformation property. # By default, ESAPI Java 1.4 uses "PBEWithMD5AndDES" and which is @@ -222,7 +211,6 @@ Encryptor.PreferredJCEProvider= Encryptor.EncryptionAlgorithm=AES # For ESAPI Java 2.0 - New encrypt / decrypt methods use this. Encryptor.CipherTransformation=AES/CBC/PKCS5Padding - # Applies to ESAPI 2.0 and later only! # Comma-separated list of cipher modes that provide *BOTH* # confidentiality *AND* message authenticity. (NIST refers to such cipher @@ -241,7 +229,6 @@ Encryptor.CipherTransformation=AES/CBC/PKCS5Padding # GCM and CCM with "NoPadding" mode, but not with "PKCS5Padding" or other # padding modes. Encryptor.cipher_modes.combined_modes=GCM,CCM,IAPM,EAX,OCB,CWC - # Applies to ESAPI 2.0 and later only! # Additional cipher modes allowed for ESAPI 2.0 encryption. These # cipher modes are in _addition_ to those specified by the property @@ -251,7 +238,6 @@ Encryptor.cipher_modes.combined_modes=GCM,CCM,IAPM,EAX,OCB,CWC # (probably in ESAPI 2.1). # DISCUSS: Better name? Encryptor.cipher_modes.additional_allowed=CBC - # 128-bit is almost always sufficient and appears to be more resistant to # related key attacks than is 256-bit AES. Use '_' to use default key size # for cipher algorithms (where it makes sense because the algorithm supports @@ -261,7 +247,6 @@ Encryptor.cipher_modes.additional_allowed=CBC # # NOTE: This is what applies BOTH ESAPI 1.4 and 2.0. See warning above about mixing! Encryptor.EncryptionKeyLength=128 - # Because 2.0 uses CBC mode by default, it requires an initialization vector (IV). # (All cipher modes except ECB require an IV.) There are two choices: we can either # use a fixed IV known to both parties or allow ESAPI to choose a random IV. While @@ -285,7 +270,6 @@ Encryptor.ChooseIVMethod=random # (Note that the block size for AES is 16 bytes == 128 bits.) # Encryptor.fixedIV=0x000102030405060708090a0b0c0d0e0f - # Whether or not CipherText should use a message authentication code (MAC) with it. # This prevents an adversary from altering the IV as well as allowing a more # fool-proof way of determining the decryption failed because of an incorrect @@ -296,28 +280,23 @@ Encryptor.fixedIV=0x000102030405060708090a0b0c0d0e0f # If you are using ESAPI with a FIPS 140-2 cryptographic module, you *must* also # set this property to false. Encryptor.CipherText.useMAC=true - # Whether or not the PlainText object may be overwritten and then marked # eligible for garbage collection. If not set, this is still treated as 'true'. Encryptor.PlainText.overwrite=true - # Do not use DES except in a legacy situations. 56-bit is way too small key size. #Encryptor.EncryptionKeyLength=56 #Encryptor.EncryptionAlgorithm=DES - # TripleDES is considered strong enough for most purposes. # Note: There is also a 112-bit version of DESede. Using the 168-bit version # requires downloading the special jurisdiction policy from Sun. #Encryptor.EncryptionKeyLength=168 #Encryptor.EncryptionAlgorithm=DESede - Encryptor.HashAlgorithm=SHA-512 Encryptor.HashIterations=1024 Encryptor.DigitalSignatureAlgorithm=SHA1withDSA Encryptor.DigitalSignatureKeyLength=1024 Encryptor.RandomAlgorithm=SHA1PRNG Encryptor.CharacterEncoding=UTF-8 - # This is the Pseudo Random Function (PRF) that ESAPI's Key Derivation Function # (KDF) normally uses. Note this is *only* the PRF used for ESAPI's KDF and # *not* what is used for ESAPI's MAC. (Currently, HmacSHA1 is always used for @@ -358,9 +337,6 @@ HttpUtilities.ResponseContentType=text/html; charset=UTF-8 # This is the name of the cookie used to represent the HTTP session # Typically this will be the default "JSESSIONID" HttpUtilities.HttpSessionIdName=JSESSIONID - - - #=========================================================================== # ESAPI Executor # CHECKME - This should be made OS independent. Don't use unsafe defaults. @@ -373,8 +349,6 @@ HttpUtilities.HttpSessionIdName=JSESSIONID # Executor.ApprovedExecutables=/bin/bash Executor.WorkingDirectory= Executor.ApprovedExecutables= - - #=========================================================================== # ESAPI Logging # Set the application name if these logs are combined with other applications @@ -390,8 +364,6 @@ Logger.LogServerIP=true Logger.LogFileName=ESAPI_logging_file # MaxLogFileSize, the max size (in bytes) of a single log file before it cuts over to a new one (default is 10,000,000) Logger.MaxLogFileSize=10000000 - - #=========================================================================== # ESAPI Intrusion Detection # @@ -411,35 +383,28 @@ IntrusionDetector.Disable=false IntrusionDetector.event.test.count=2 IntrusionDetector.event.test.interval=10 IntrusionDetector.event.test.actions=disable,log - # Exception Events # All EnterpriseSecurityExceptions are registered automatically # Call IntrusionDetector.getInstance().addException(e) for Exceptions that do not extend EnterpriseSecurityException # Use the fully qualified classname of the exception as the base - # any intrusion is an attack IntrusionDetector.org.owasp.esapi.errors.IntrusionException.count=1 IntrusionDetector.org.owasp.esapi.errors.IntrusionException.interval=1 IntrusionDetector.org.owasp.esapi.errors.IntrusionException.actions=log,disable,logout - # for test purposes # CHECKME: Shouldn't there be something in the property name itself that designates # that these are for testing??? IntrusionDetector.org.owasp.esapi.errors.IntegrityException.count=10 IntrusionDetector.org.owasp.esapi.errors.IntegrityException.interval=5 IntrusionDetector.org.owasp.esapi.errors.IntegrityException.actions=log,disable,logout - # rapid validation errors indicate scans or attacks in progress # org.owasp.esapi.errors.ValidationException.count=10 # org.owasp.esapi.errors.ValidationException.interval=10 # org.owasp.esapi.errors.ValidationException.actions=log,logout - # sessions jumping between hosts indicates session hijacking IntrusionDetector.org.owasp.esapi.errors.AuthenticationHostException.count=2 IntrusionDetector.org.owasp.esapi.errors.AuthenticationHostException.interval=10 IntrusionDetector.org.owasp.esapi.errors.AuthenticationHostException.actions=log,logout - - #=========================================================================== # ESAPI Validation # @@ -454,16 +419,13 @@ IntrusionDetector.org.owasp.esapi.errors.AuthenticationHostException.actions=log # https://docs.oracle.com/javase/tutorial/essential/regex/pattern.html, e.g. (?u) # Validator.ConfigurationFile=validation.properties - # Validators used by ESAPI Validator.AccountName=^[a-zA-Z0-9]{3,20}$ Validator.SystemCommand=^[a-zA-Z\\-\\/]{1,64}$ Validator.RoleName=^[a-z]{1,20}$ - #the word TEST below should be changed to your application #name - only relative URL's are supported Validator.Redirect=^\\/test.*$ - # Global HTTP Validation Rules # Values with Base64 encoded data (e.g. encrypted state) will need at least [a-zA-Z0-9\/+=] Validator.HTTPScheme=^(http|https)$ @@ -482,11 +444,9 @@ Validator.HTTPQueryString=^[a-zA-Z0-9()\\-=\\*\\.\\?;,+\\/:&_ %]*$ Validator.HTTPURI=^[a-zA-Z0-9()\\-=\\*\\.\\?;,+\\/:&_ ]*$ Validator.HTTPURL=^.*$ Validator.HTTPJSESSIONID=^[A-Z0-9]{10,30}$ - # Validation of file related input Validator.FileName=^[a-zA-Z0-9!@#$%^&{}\\[\\]()_+\\-=,.~'` ]{1,255}$ Validator.DirectoryName=^[a-zA-Z0-9:/\\\\!@#$%^&{}\\[\\]()_+\\-=,.~'` ]{1,255}$ - # Validation of dates. Controls whether or not 'lenient' dates are accepted. # See DataFormat.setLenient(boolean flag) for further details. Validator.AcceptLenientDates=false diff --git a/fineract-provider/src/main/resources/application-liquibase-only.properties b/fineract-provider/src/main/resources/application-liquibase-only.properties index cf24eda913d..355e15eda2d 100644 --- a/fineract-provider/src/main/resources/application-liquibase-only.properties +++ b/fineract-provider/src/main/resources/application-liquibase-only.properties @@ -16,5 +16,4 @@ # specific language governing permissions and limitations # under the License. # - spring.main.web-application-type=none diff --git a/fineract-provider/src/main/resources/db/changelog/db.changelog-master.xml b/fineract-provider/src/main/resources/db/changelog/db.changelog-master.xml index abdad7398a1..620793f0dec 100644 --- a/fineract-provider/src/main/resources/db/changelog/db.changelog-master.xml +++ b/fineract-provider/src/main/resources/db/changelog/db.changelog-master.xml @@ -27,19 +27,31 @@ - - - + + + - - - - - - - - + + + + + + + + - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant-store/changelog-tenant-store.xml b/fineract-provider/src/main/resources/db/changelog/tenant-store/changelog-tenant-store.xml index 7d5a94e7835..7cdb0a55196 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant-store/changelog-tenant-store.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant-store/changelog-tenant-store.xml @@ -22,14 +22,14 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0001_initial_schema.xml b/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0001_initial_schema.xml index fb512c03af8..1fb702ecbc9 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0001_initial_schema.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0001_initial_schema.xml @@ -114,9 +114,15 @@ - + - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0002_initial_data.xml b/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0002_initial_data.xml index 7586eb56606..68a016f9e1e 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0002_initial_data.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0002_initial_data.xml @@ -594,7 +594,8 @@ - + @@ -690,7 +691,8 @@ - + @@ -1176,7 +1178,8 @@ - + @@ -1590,7 +1593,8 @@ - + @@ -2334,7 +2338,8 @@ - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0003_reset_postgresql_sequences.xml b/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0003_reset_postgresql_sequences.xml index b2ea722e9f9..c5a958fc056 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0003_reset_postgresql_sequences.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0003_reset_postgresql_sequences.xml @@ -24,7 +24,8 @@ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> - SELECT SETVAL('tenant_server_connections_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM tenant_server_connections; + SELECT SETVAL('tenant_server_connections_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM + tenant_server_connections; SELECT SETVAL('tenants_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM tenants; SELECT SETVAL('timezones_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM timezones; diff --git a/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0005_jdbc_connection_string.xml b/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0005_jdbc_connection_string.xml index 384ac19f58e..b48f0ad5a28 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0005_jdbc_connection_string.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0005_jdbc_connection_string.xml @@ -29,20 +29,20 @@ UPDATE tenant_server_connections SET schema_connection_parameters = - CASE - WHEN schema_connection_parameters IS NULL OR TRIM(schema_connection_parameters) = '' - THEN 'serverTimezone=UTC&useLegacyDatetimeCode=false&sessionVariables=time_zone=''-00:00''' - ELSE schema_connection_parameters || '&serverTimezone=UTC&useLegacyDatetimeCode=false&sessionVariables=time_zone=''-00:00''' - END; + CASE + WHEN schema_connection_parameters IS NULL OR TRIM(schema_connection_parameters) = '' + THEN 'serverTimezone=UTC&useLegacyDatetimeCode=false&sessionVariables=time_zone=''-00:00''' + ELSE schema_connection_parameters || '&serverTimezone=UTC&useLegacyDatetimeCode=false&sessionVariables=time_zone=''-00:00''' + END; UPDATE tenant_server_connections SET schema_connection_parameters = - CASE - WHEN schema_connection_parameters IS NULL OR TRIM(schema_connection_parameters) = '' - THEN 'serverTimezone=UTC&useLegacyDatetimeCode=false&sessionVariables=time_zone=''-00:00''' - ELSE CONCAT(schema_connection_parameters, '&serverTimezone=UTC&useLegacyDatetimeCode=false&sessionVariables=time_zone=''-00:00''') - END; + CASE + WHEN schema_connection_parameters IS NULL OR TRIM(schema_connection_parameters) = '' + THEN 'serverTimezone=UTC&useLegacyDatetimeCode=false&sessionVariables=time_zone=''-00:00''' + ELSE CONCAT(schema_connection_parameters, '&serverTimezone=UTC&useLegacyDatetimeCode=false&sessionVariables=time_zone=''-00:00''') + END; diff --git a/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0006_drop_retry_parameter_columns.xml b/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0006_drop_retry_parameter_columns.xml index d8376a59f40..03d5051b651 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0006_drop_retry_parameter_columns.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0006_drop_retry_parameter_columns.xml @@ -23,7 +23,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> - - + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0007_x_extend_tenant_ro_passwords.xml b/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0007_x_extend_tenant_ro_passwords.xml index 8cc24e6cc9a..13d67e0b312 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0007_x_extend_tenant_ro_passwords.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0007_x_extend_tenant_ro_passwords.xml @@ -23,6 +23,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0008_encrypt_existing_ro_tenant_passwords.xml b/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0008_encrypt_existing_ro_tenant_passwords.xml index 6d138f10494..1c880224446 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0008_encrypt_existing_ro_tenant_passwords.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0008_encrypt_existing_ro_tenant_passwords.xml @@ -23,6 +23,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0009_set_and_encrypt_ro_if_not_exists.xml b/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0009_set_and_encrypt_ro_if_not_exists.xml index abcd696a030..537a50bc39a 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0009_set_and_encrypt_ro_if_not_exists.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant-store/parts/0009_set_and_encrypt_ro_if_not_exists.xml @@ -25,7 +25,8 @@ - SELECT count(1) FROM tenant_server_connections WHERE id = 1 and readonly_schema_password is null and readonly_schema_username is null and readonly_schema_name is null; + SELECT count(1) FROM tenant_server_connections WHERE id = 1 and readonly_schema_password is null and + readonly_schema_username is null and readonly_schema_name is null; @@ -36,6 +37,7 @@ - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant-store/upgrades/0000_upgrade_to_1.6.xml b/fineract-provider/src/main/resources/db/changelog/tenant-store/upgrades/0000_upgrade_to_1.6.xml index 83e384d5f83..98e43c5bb62 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant-store/upgrades/0000_upgrade_to_1.6.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant-store/upgrades/0000_upgrade_to_1.6.xml @@ -30,6 +30,6 @@ - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0001_initial_schema.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0001_initial_schema.xml index 97c96088b18..d440f221c6b 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0001_initial_schema.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0001_initial_schema.xml @@ -3184,7 +3184,8 @@ - + @@ -5251,7 +5252,8 @@ - + - @@ -6552,7 +6555,8 @@ - + @@ -6637,17 +6641,20 @@ - + - + - + @@ -6663,7 +6670,8 @@ - + @@ -6859,12 +6867,14 @@ - + - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0003_postgresql_specific_initial_data.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0003_postgresql_specific_initial_data.xml index f9b257816eb..8b4c71d12f6 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0003_postgresql_specific_initial_data.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0003_postgresql_specific_initial_data.xml @@ -63,7 +63,8 @@ - + @@ -77,7 +78,8 @@ - + @@ -91,7 +93,8 @@ - + @@ -119,7 +122,8 @@ - + @@ -148,7 +152,8 @@ - + @@ -162,7 +167,8 @@ - + @@ -176,7 +182,8 @@ - + @@ -190,7 +197,8 @@ - + @@ -204,7 +212,8 @@ - + @@ -302,7 +311,8 @@ - + @@ -400,7 +410,8 @@ - + @@ -414,7 +425,8 @@ - + @@ -428,7 +440,8 @@ - + @@ -442,7 +455,8 @@ - + @@ -482,8 +496,10 @@ - - + + @@ -494,8 +510,10 @@ - - + + @@ -506,7 +524,8 @@ - + @@ -518,7 +537,8 @@ - + @@ -530,7 +550,8 @@ - + @@ -542,7 +563,8 @@ - + @@ -554,7 +576,8 @@ - + @@ -566,7 +589,8 @@ - + @@ -578,7 +602,8 @@ - + @@ -590,7 +615,8 @@ - + @@ -602,8 +628,10 @@ - - + + @@ -614,8 +642,10 @@ - - + + @@ -626,7 +656,8 @@ - + @@ -638,7 +669,8 @@ - + @@ -650,7 +682,8 @@ - + @@ -662,7 +695,8 @@ - + @@ -674,7 +708,8 @@ - + @@ -686,8 +721,10 @@ - - + + @@ -698,7 +735,8 @@ - + @@ -710,7 +748,8 @@ - + @@ -722,7 +761,8 @@ - + @@ -734,7 +774,8 @@ - + @@ -746,7 +787,8 @@ - + @@ -758,7 +800,8 @@ - + @@ -770,7 +813,8 @@ - + @@ -782,7 +826,8 @@ - + @@ -794,8 +839,10 @@ - - + + @@ -806,8 +853,10 @@ - - + + @@ -818,7 +867,8 @@ - + @@ -830,7 +880,8 @@ - + @@ -842,7 +893,8 @@ - + @@ -854,7 +906,8 @@ - + @@ -866,7 +919,8 @@ - + @@ -878,7 +932,8 @@ - + @@ -890,7 +945,8 @@ - + @@ -902,7 +958,8 @@ - + @@ -914,7 +971,8 @@ - + @@ -926,7 +984,8 @@ - + @@ -938,8 +997,10 @@ - - + + @@ -950,7 +1011,8 @@ - + @@ -962,7 +1024,8 @@ - + @@ -974,7 +1037,8 @@ - + @@ -986,7 +1050,8 @@ - + @@ -998,7 +1063,8 @@ - + @@ -1010,7 +1076,8 @@ - + @@ -1022,7 +1089,8 @@ - + @@ -1034,7 +1102,8 @@ - + @@ -1046,7 +1115,8 @@ - + @@ -1058,7 +1128,8 @@ - + @@ -1070,7 +1141,8 @@ - + @@ -1082,7 +1154,8 @@ - + @@ -1094,7 +1167,8 @@ - + @@ -1106,8 +1180,10 @@ - - + + @@ -1118,8 +1194,10 @@ - - + + @@ -1130,8 +1208,10 @@ - - + + @@ -1142,7 +1222,8 @@ - + @@ -1154,8 +1235,10 @@ - - + + @@ -1166,8 +1249,10 @@ - - + + @@ -1178,8 +1263,10 @@ - - + + @@ -1190,8 +1277,10 @@ - - + + @@ -1202,8 +1291,10 @@ - - + + @@ -1214,8 +1305,10 @@ - - + + @@ -1226,7 +1319,8 @@ - + @@ -1238,7 +1332,8 @@ - + @@ -1250,7 +1345,8 @@ - + @@ -1262,7 +1358,8 @@ - + @@ -1274,7 +1371,8 @@ - + @@ -1286,7 +1384,8 @@ - + @@ -1298,7 +1397,8 @@ - + @@ -1310,7 +1410,8 @@ - + @@ -1322,7 +1423,8 @@ - + @@ -1358,7 +1460,8 @@ - + @@ -1370,7 +1473,8 @@ - + @@ -1382,7 +1486,8 @@ - + @@ -1400,7 +1505,8 @@ SELECT SETVAL('m_code_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM m_code; SELECT SETVAL('m_code_value_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM m_code_value; SELECT SETVAL('m_creditbureau_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM m_creditbureau; - SELECT SETVAL('m_creditbureau_configuration_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM m_creditbureau_configuration; + SELECT SETVAL('m_creditbureau_configuration_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM + m_creditbureau_configuration; SELECT SETVAL('m_currency_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM m_currency; SELECT SETVAL('m_entity_relation_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM m_entity_relation; SELECT SETVAL('m_field_configuration_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM m_field_configuration; @@ -1408,27 +1514,34 @@ SELECT SETVAL('m_hook_schema_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM m_hook_schema; SELECT SETVAL('m_hook_templates_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM m_hook_templates; SELECT SETVAL('m_office_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM m_office; - SELECT SETVAL('m_organisation_currency_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM m_organisation_currency; - SELECT SETVAL('m_password_validation_policy_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM m_password_validation_policy; + SELECT SETVAL('m_organisation_currency_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM + m_organisation_currency; + SELECT SETVAL('m_password_validation_policy_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM + m_password_validation_policy; SELECT SETVAL('m_payment_type_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM m_payment_type; SELECT SETVAL('m_permission_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM m_permission; SELECT SETVAL('m_provision_category_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM m_provision_category; - SELECT SETVAL('m_report_mailing_job_configuration_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM m_report_mailing_job_configuration; + SELECT SETVAL('m_report_mailing_job_configuration_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM + m_report_mailing_job_configuration; SELECT SETVAL('m_role_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM m_role; SELECT SETVAL('m_working_days_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM m_working_days; SELECT SETVAL('mix_taxonomy_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM mix_taxonomy; SELECT SETVAL('mix_taxonomy_mapping_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM mix_taxonomy_mapping; SELECT SETVAL('mix_xbrl_namespace_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM mix_xbrl_namespace; SELECT SETVAL('ppi_scores_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM ppi_scores; - SELECT SETVAL('ref_loan_transaction_processing_strategy_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM ref_loan_transaction_processing_strategy; - SELECT SETVAL('scheduled_email_configuration_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM scheduled_email_configuration; + SELECT SETVAL('ref_loan_transaction_processing_strategy_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM + ref_loan_transaction_processing_strategy; + SELECT SETVAL('scheduled_email_configuration_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM + scheduled_email_configuration; SELECT SETVAL('scheduler_detail_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM scheduler_detail; SELECT SETVAL('topic_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM topic; SELECT SETVAL('topic_subscriber_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM topic_subscriber; SELECT SETVAL('stretchy_parameter_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM stretchy_parameter; SELECT SETVAL('stretchy_report_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM stretchy_report; - SELECT SETVAL('stretchy_report_parameter_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM stretchy_report_parameter; - SELECT SETVAL('twofactor_configuration_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM twofactor_configuration; + SELECT SETVAL('stretchy_report_parameter_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM + stretchy_report_parameter; + SELECT SETVAL('twofactor_configuration_id_seq', COALESCE(MAX(id), 0)+1, false ) FROM + twofactor_configuration; diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0004_camelcase_column_renaming.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0004_camelcase_column_renaming.xml index f67cfa07742..28dcdcfc8de 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0004_camelcase_column_renaming.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0004_camelcase_column_renaming.xml @@ -24,15 +24,25 @@ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> - - - - - - - - - - + + + + + + + + + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0010_lien_allowed_on_savings_account_products.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0010_lien_allowed_on_savings_account_products.xml index 1630e1e9898..7a541313004 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0010_lien_allowed_on_savings_account_products.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0010_lien_allowed_on_savings_account_products.xml @@ -23,22 +23,22 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0011_add_credit_balance_refund_permission.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0011_add_credit_balance_refund_permission.xml index dd626b8d442..bcd8e38fed1 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0011_add_credit_balance_refund_permission.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0011_add_credit_balance_refund_permission.xml @@ -19,14 +19,16 @@ under the License. --> - + - - - - - + + + + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0012_add_merchantissuedrefund_payoutrefund_goodwillcredit_permissions.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0012_add_merchantissuedrefund_payoutrefund_goodwillcredit_permissions.xml index f8706a84493..6350a94d3f6 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0012_add_merchantissuedrefund_payoutrefund_goodwillcredit_permissions.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0012_add_merchantissuedrefund_payoutrefund_goodwillcredit_permissions.xml @@ -19,28 +19,30 @@ under the License. --> - + - - - - - + + + + + - - - - - + + + + + - - - - - + + + + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0013_remove_topics.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0013_remove_topics.xml index 32a1f6727a7..9bc84109adb 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0013_remove_topics.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0013_remove_topics.xml @@ -19,7 +19,9 @@ under the License. --> - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0014_remove_unused_jobs.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0014_remove_unused_jobs.xml index c81da701ec1..17ee0c3bd71 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0014_remove_unused_jobs.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0014_remove_unused_jobs.xml @@ -19,7 +19,9 @@ under the License. --> - + Drop FK scheduledjobsFK diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0015_add_business_date.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0015_add_business_date.xml index e1dc2d1a8ce..cbaae5e4048 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0015_add_business_date.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0015_add_business_date.xml @@ -50,7 +50,8 @@ - + @@ -59,7 +60,8 @@ - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0016_changed_unique_constraint_of_ref_no.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0016_changed_unique_constraint_of_ref_no.xml index ec83a13c7cd..99721a2ecbe 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0016_changed_unique_constraint_of_ref_no.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0016_changed_unique_constraint_of_ref_no.xml @@ -23,7 +23,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0017_fix_stretchy_reports.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0017_fix_stretchy_reports.xml index 331083ce243..0660a019011 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0017_fix_stretchy_reports.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0017_fix_stretchy_reports.xml @@ -24,43 +24,50 @@ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> - + id='25' AND parameter_name='loanProductIdSelectAll' - + id='1002' AND parameter_name='FullParameterList' - + id='190' AND report_name='Loan Approved - Email' - + id='191' AND report_name='Loan Rejected - Email' - + id='192' AND report_name='Loan Repayment - Email' - + id='1001' AND parameter_name='FullReportList' - + id='1003' AND parameter_name='reportCategoryList' diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0018_pentaho_reports_to_table.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0018_pentaho_reports_to_table.xml index 7c1e64e6af5..f697ecb4e7b 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0018_pentaho_reports_to_table.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0018_pentaho_reports_to_table.xml @@ -20,14 +20,18 @@ --> - + - + @@ -38,7 +42,8 @@ - + @@ -49,7 +54,8 @@ - + @@ -60,7 +66,8 @@ - + @@ -69,65 +76,77 @@ - + - - + + - + - + - - + + - - + + - - + + - + - + - + - + - + @@ -139,7 +158,8 @@ - + @@ -150,7 +170,8 @@ - + @@ -161,7 +182,8 @@ - + @@ -172,7 +194,8 @@ - + @@ -181,72 +204,85 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + report_name = 'GeneralLedgerReport Table' diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0019_refactor_loan_transaction.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0019_refactor_loan_transaction.xml index 373a15845e8..047f9d5b6bd 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0019_refactor_loan_transaction.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0019_refactor_loan_transaction.xml @@ -36,11 +36,13 @@ - + id='174' AND report_name='Loan payments received (Active Loans)' - + id='175' AND report_name='Loan payments received (Overdue Loans)' diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0020_add_audit_entries.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0020_add_audit_entries.xml index 779bd1da230..5dedb256061 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0020_add_audit_entries.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0020_add_audit_entries.xml @@ -45,7 +45,8 @@ onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/> @@ -101,16 +102,20 @@ - - + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0021_add_spring_batch_db_structure.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0021_add_spring_batch_db_structure.xml index 935183ac597..a036e59f405 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0021_add_spring_batch_db_structure.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0021_add_spring_batch_db_structure.xml @@ -19,83 +19,85 @@ under the License. --> - + - CREATE TABLE BATCH_JOB_INSTANCE ( - JOB_INSTANCE_ID BIGINT NOT NULL PRIMARY KEY , - VERSION BIGINT , - JOB_NAME VARCHAR(100) NOT NULL, - JOB_KEY VARCHAR(32) NOT NULL, - constraint JOB_INST_UN unique (JOB_NAME, JOB_KEY) + CREATE TABLE BATCH_JOB_INSTANCE ( + JOB_INSTANCE_ID BIGINT NOT NULL PRIMARY KEY , + VERSION BIGINT , + JOB_NAME VARCHAR(100) NOT NULL, + JOB_KEY VARCHAR(32) NOT NULL, + constraint JOB_INST_UN unique (JOB_NAME, JOB_KEY) ) ; - CREATE TABLE BATCH_JOB_EXECUTION ( - JOB_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY , - VERSION BIGINT , - JOB_INSTANCE_ID BIGINT NOT NULL, - CREATE_TIME TIMESTAMP NOT NULL, - START_TIME TIMESTAMP DEFAULT NULL , - END_TIME TIMESTAMP DEFAULT NULL , - STATUS VARCHAR(10) , - EXIT_CODE VARCHAR(2500) , - EXIT_MESSAGE VARCHAR(2500) , - LAST_UPDATED TIMESTAMP, - JOB_CONFIGURATION_LOCATION VARCHAR(2500) NULL, - constraint JOB_INST_EXEC_FK foreign key (JOB_INSTANCE_ID) - references BATCH_JOB_INSTANCE(JOB_INSTANCE_ID) + CREATE TABLE BATCH_JOB_EXECUTION ( + JOB_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY , + VERSION BIGINT , + JOB_INSTANCE_ID BIGINT NOT NULL, + CREATE_TIME TIMESTAMP NOT NULL, + START_TIME TIMESTAMP DEFAULT NULL , + END_TIME TIMESTAMP DEFAULT NULL , + STATUS VARCHAR(10) , + EXIT_CODE VARCHAR(2500) , + EXIT_MESSAGE VARCHAR(2500) , + LAST_UPDATED TIMESTAMP, + JOB_CONFIGURATION_LOCATION VARCHAR(2500) NULL, + constraint JOB_INST_EXEC_FK foreign key (JOB_INSTANCE_ID) + references BATCH_JOB_INSTANCE(JOB_INSTANCE_ID) ) ; - CREATE TABLE BATCH_JOB_EXECUTION_PARAMS ( - JOB_EXECUTION_ID BIGINT NOT NULL , - TYPE_CD VARCHAR(6) NOT NULL , - KEY_NAME VARCHAR(100) NOT NULL , - STRING_VAL VARCHAR(250) , - DATE_VAL TIMESTAMP DEFAULT NULL , - LONG_VAL BIGINT , - DOUBLE_VAL DOUBLE PRECISION , - IDENTIFYING CHAR(1) NOT NULL , - constraint JOB_EXEC_PARAMS_FK foreign key (JOB_EXECUTION_ID) - references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) + CREATE TABLE BATCH_JOB_EXECUTION_PARAMS ( + JOB_EXECUTION_ID BIGINT NOT NULL , + TYPE_CD VARCHAR(6) NOT NULL , + KEY_NAME VARCHAR(100) NOT NULL , + STRING_VAL VARCHAR(250) , + DATE_VAL TIMESTAMP DEFAULT NULL , + LONG_VAL BIGINT , + DOUBLE_VAL DOUBLE PRECISION , + IDENTIFYING CHAR(1) NOT NULL , + constraint JOB_EXEC_PARAMS_FK foreign key (JOB_EXECUTION_ID) + references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) ) ; - CREATE TABLE BATCH_STEP_EXECUTION ( - STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY , - VERSION BIGINT NOT NULL, - STEP_NAME VARCHAR(100) NOT NULL, - JOB_EXECUTION_ID BIGINT NOT NULL, - START_TIME TIMESTAMP NOT NULL , - END_TIME TIMESTAMP DEFAULT NULL , - STATUS VARCHAR(10) , - COMMIT_COUNT BIGINT , - READ_COUNT BIGINT , - FILTER_COUNT BIGINT , - WRITE_COUNT BIGINT , - READ_SKIP_COUNT BIGINT , - WRITE_SKIP_COUNT BIGINT , - PROCESS_SKIP_COUNT BIGINT , - ROLLBACK_COUNT BIGINT , - EXIT_CODE VARCHAR(2500) , - EXIT_MESSAGE VARCHAR(2500) , - LAST_UPDATED TIMESTAMP, - constraint JOB_EXEC_STEP_FK foreign key (JOB_EXECUTION_ID) - references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) + CREATE TABLE BATCH_STEP_EXECUTION ( + STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY , + VERSION BIGINT NOT NULL, + STEP_NAME VARCHAR(100) NOT NULL, + JOB_EXECUTION_ID BIGINT NOT NULL, + START_TIME TIMESTAMP NOT NULL , + END_TIME TIMESTAMP DEFAULT NULL , + STATUS VARCHAR(10) , + COMMIT_COUNT BIGINT , + READ_COUNT BIGINT , + FILTER_COUNT BIGINT , + WRITE_COUNT BIGINT , + READ_SKIP_COUNT BIGINT , + WRITE_SKIP_COUNT BIGINT , + PROCESS_SKIP_COUNT BIGINT , + ROLLBACK_COUNT BIGINT , + EXIT_CODE VARCHAR(2500) , + EXIT_MESSAGE VARCHAR(2500) , + LAST_UPDATED TIMESTAMP, + constraint JOB_EXEC_STEP_FK foreign key (JOB_EXECUTION_ID) + references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) ) ; - CREATE TABLE BATCH_STEP_EXECUTION_CONTEXT ( - STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY, - SHORT_CONTEXT VARCHAR(2500) NOT NULL, - SERIALIZED_CONTEXT TEXT , - constraint STEP_EXEC_CTX_FK foreign key (STEP_EXECUTION_ID) - references BATCH_STEP_EXECUTION(STEP_EXECUTION_ID) + CREATE TABLE BATCH_STEP_EXECUTION_CONTEXT ( + STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY, + SHORT_CONTEXT VARCHAR(2500) NOT NULL, + SERIALIZED_CONTEXT TEXT , + constraint STEP_EXEC_CTX_FK foreign key (STEP_EXECUTION_ID) + references BATCH_STEP_EXECUTION(STEP_EXECUTION_ID) ) ; - CREATE TABLE BATCH_JOB_EXECUTION_CONTEXT ( - JOB_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY, - SHORT_CONTEXT VARCHAR(2500) NOT NULL, - SERIALIZED_CONTEXT TEXT , - constraint JOB_EXEC_CTX_FK foreign key (JOB_EXECUTION_ID) - references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) + CREATE TABLE BATCH_JOB_EXECUTION_CONTEXT ( + JOB_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY, + SHORT_CONTEXT VARCHAR(2500) NOT NULL, + SERIALIZED_CONTEXT TEXT , + constraint JOB_EXEC_CTX_FK foreign key (JOB_EXECUTION_ID) + references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) ) ; CREATE SEQUENCE BATCH_STEP_EXECUTION_SEQ MAXVALUE 9223372036854775807 NO CYCLE; @@ -106,105 +108,108 @@ - CREATE TABLE BATCH_JOB_INSTANCE ( - JOB_INSTANCE_ID BIGINT NOT NULL PRIMARY KEY , - VERSION BIGINT , - JOB_NAME VARCHAR(100) NOT NULL, - JOB_KEY VARCHAR(32) NOT NULL, - constraint JOB_INST_UN unique (JOB_NAME, JOB_KEY) + CREATE TABLE BATCH_JOB_INSTANCE ( + JOB_INSTANCE_ID BIGINT NOT NULL PRIMARY KEY , + VERSION BIGINT , + JOB_NAME VARCHAR(100) NOT NULL, + JOB_KEY VARCHAR(32) NOT NULL, + constraint JOB_INST_UN unique (JOB_NAME, JOB_KEY) ) ENGINE=InnoDB; - CREATE TABLE BATCH_JOB_EXECUTION ( - JOB_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY , - VERSION BIGINT , - JOB_INSTANCE_ID BIGINT NOT NULL, - CREATE_TIME DATETIME(6) NOT NULL, - START_TIME DATETIME(6) DEFAULT NULL , - END_TIME DATETIME(6) DEFAULT NULL , - STATUS VARCHAR(10) , - EXIT_CODE VARCHAR(2500) , - EXIT_MESSAGE VARCHAR(2500) , - LAST_UPDATED DATETIME(6), - JOB_CONFIGURATION_LOCATION VARCHAR(2500) NULL, - constraint JOB_INST_EXEC_FK foreign key (JOB_INSTANCE_ID) - references BATCH_JOB_INSTANCE(JOB_INSTANCE_ID) + CREATE TABLE BATCH_JOB_EXECUTION ( + JOB_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY , + VERSION BIGINT , + JOB_INSTANCE_ID BIGINT NOT NULL, + CREATE_TIME DATETIME(6) NOT NULL, + START_TIME DATETIME(6) DEFAULT NULL , + END_TIME DATETIME(6) DEFAULT NULL , + STATUS VARCHAR(10) , + EXIT_CODE VARCHAR(2500) , + EXIT_MESSAGE VARCHAR(2500) , + LAST_UPDATED DATETIME(6), + JOB_CONFIGURATION_LOCATION VARCHAR(2500) NULL, + constraint JOB_INST_EXEC_FK foreign key (JOB_INSTANCE_ID) + references BATCH_JOB_INSTANCE(JOB_INSTANCE_ID) ) ENGINE=InnoDB; - CREATE TABLE BATCH_JOB_EXECUTION_PARAMS ( - JOB_EXECUTION_ID BIGINT NOT NULL , - TYPE_CD VARCHAR(6) NOT NULL , - KEY_NAME VARCHAR(100) NOT NULL , - STRING_VAL VARCHAR(250) , - DATE_VAL DATETIME(6) DEFAULT NULL , - LONG_VAL BIGINT , - DOUBLE_VAL DOUBLE PRECISION , - IDENTIFYING CHAR(1) NOT NULL , - constraint JOB_EXEC_PARAMS_FK foreign key (JOB_EXECUTION_ID) - references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) + CREATE TABLE BATCH_JOB_EXECUTION_PARAMS ( + JOB_EXECUTION_ID BIGINT NOT NULL , + TYPE_CD VARCHAR(6) NOT NULL , + KEY_NAME VARCHAR(100) NOT NULL , + STRING_VAL VARCHAR(250) , + DATE_VAL DATETIME(6) DEFAULT NULL , + LONG_VAL BIGINT , + DOUBLE_VAL DOUBLE PRECISION , + IDENTIFYING CHAR(1) NOT NULL , + constraint JOB_EXEC_PARAMS_FK foreign key (JOB_EXECUTION_ID) + references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) ) ENGINE=InnoDB; - CREATE TABLE BATCH_STEP_EXECUTION ( - STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY , - VERSION BIGINT NOT NULL, - STEP_NAME VARCHAR(100) NOT NULL, - JOB_EXECUTION_ID BIGINT NOT NULL, - START_TIME DATETIME(6) NOT NULL , - END_TIME DATETIME(6) DEFAULT NULL , - STATUS VARCHAR(10) , - COMMIT_COUNT BIGINT , - READ_COUNT BIGINT , - FILTER_COUNT BIGINT , - WRITE_COUNT BIGINT , - READ_SKIP_COUNT BIGINT , - WRITE_SKIP_COUNT BIGINT , - PROCESS_SKIP_COUNT BIGINT , - ROLLBACK_COUNT BIGINT , - EXIT_CODE VARCHAR(2500) , - EXIT_MESSAGE VARCHAR(2500) , - LAST_UPDATED DATETIME(6), - constraint JOB_EXEC_STEP_FK foreign key (JOB_EXECUTION_ID) - references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) + CREATE TABLE BATCH_STEP_EXECUTION ( + STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY , + VERSION BIGINT NOT NULL, + STEP_NAME VARCHAR(100) NOT NULL, + JOB_EXECUTION_ID BIGINT NOT NULL, + START_TIME DATETIME(6) NOT NULL , + END_TIME DATETIME(6) DEFAULT NULL , + STATUS VARCHAR(10) , + COMMIT_COUNT BIGINT , + READ_COUNT BIGINT , + FILTER_COUNT BIGINT , + WRITE_COUNT BIGINT , + READ_SKIP_COUNT BIGINT , + WRITE_SKIP_COUNT BIGINT , + PROCESS_SKIP_COUNT BIGINT , + ROLLBACK_COUNT BIGINT , + EXIT_CODE VARCHAR(2500) , + EXIT_MESSAGE VARCHAR(2500) , + LAST_UPDATED DATETIME(6), + constraint JOB_EXEC_STEP_FK foreign key (JOB_EXECUTION_ID) + references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) ) ENGINE=InnoDB; - CREATE TABLE BATCH_STEP_EXECUTION_CONTEXT ( - STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY, - SHORT_CONTEXT VARCHAR(2500) NOT NULL, - SERIALIZED_CONTEXT TEXT , - constraint STEP_EXEC_CTX_FK foreign key (STEP_EXECUTION_ID) - references BATCH_STEP_EXECUTION(STEP_EXECUTION_ID) + CREATE TABLE BATCH_STEP_EXECUTION_CONTEXT ( + STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY, + SHORT_CONTEXT VARCHAR(2500) NOT NULL, + SERIALIZED_CONTEXT TEXT , + constraint STEP_EXEC_CTX_FK foreign key (STEP_EXECUTION_ID) + references BATCH_STEP_EXECUTION(STEP_EXECUTION_ID) ) ENGINE=InnoDB; - CREATE TABLE BATCH_JOB_EXECUTION_CONTEXT ( - JOB_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY, - SHORT_CONTEXT VARCHAR(2500) NOT NULL, - SERIALIZED_CONTEXT TEXT , - constraint JOB_EXEC_CTX_FK foreign key (JOB_EXECUTION_ID) - references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) + CREATE TABLE BATCH_JOB_EXECUTION_CONTEXT ( + JOB_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY, + SHORT_CONTEXT VARCHAR(2500) NOT NULL, + SERIALIZED_CONTEXT TEXT , + constraint JOB_EXEC_CTX_FK foreign key (JOB_EXECUTION_ID) + references BATCH_JOB_EXECUTION(JOB_EXECUTION_ID) ) ENGINE=InnoDB; CREATE TABLE BATCH_STEP_EXECUTION_SEQ ( - ID BIGINT NOT NULL, - UNIQUE_KEY CHAR(1) NOT NULL, - constraint UNIQUE_KEY_UN unique (UNIQUE_KEY) + ID BIGINT NOT NULL, + UNIQUE_KEY CHAR(1) NOT NULL, + constraint UNIQUE_KEY_UN unique (UNIQUE_KEY) ) ENGINE=InnoDB; - INSERT INTO BATCH_STEP_EXECUTION_SEQ (ID, UNIQUE_KEY) select * from (select 0 as ID, '0' as UNIQUE_KEY) as tmp where not exists(select * from BATCH_STEP_EXECUTION_SEQ); + INSERT INTO BATCH_STEP_EXECUTION_SEQ (ID, UNIQUE_KEY) select * from (select 0 as ID, '0' as UNIQUE_KEY) as + tmp where not exists(select * from BATCH_STEP_EXECUTION_SEQ); CREATE TABLE BATCH_JOB_EXECUTION_SEQ ( - ID BIGINT NOT NULL, - UNIQUE_KEY CHAR(1) NOT NULL, - constraint UNIQUE_KEY_UN unique (UNIQUE_KEY) + ID BIGINT NOT NULL, + UNIQUE_KEY CHAR(1) NOT NULL, + constraint UNIQUE_KEY_UN unique (UNIQUE_KEY) ) ENGINE=InnoDB; - INSERT INTO BATCH_JOB_EXECUTION_SEQ (ID, UNIQUE_KEY) select * from (select 0 as ID, '0' as UNIQUE_KEY) as tmp where not exists(select * from BATCH_JOB_EXECUTION_SEQ); + INSERT INTO BATCH_JOB_EXECUTION_SEQ (ID, UNIQUE_KEY) select * from (select 0 as ID, '0' as UNIQUE_KEY) as + tmp where not exists(select * from BATCH_JOB_EXECUTION_SEQ); CREATE TABLE BATCH_JOB_SEQ ( - ID BIGINT NOT NULL, - UNIQUE_KEY CHAR(1) NOT NULL, - constraint UNIQUE_KEY_UN unique (UNIQUE_KEY) + ID BIGINT NOT NULL, + UNIQUE_KEY CHAR(1) NOT NULL, + constraint UNIQUE_KEY_UN unique (UNIQUE_KEY) ) ENGINE=InnoDB; - INSERT INTO BATCH_JOB_SEQ (ID, UNIQUE_KEY) select * from (select 0 as ID, '0' as UNIQUE_KEY) as tmp where not exists(select * from BATCH_JOB_SEQ); + INSERT INTO BATCH_JOB_SEQ (ID, UNIQUE_KEY) select * from (select 0 as ID, '0' as UNIQUE_KEY) as tmp where + not exists(select * from BATCH_JOB_SEQ); diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0024_add_audit_entries.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0024_add_audit_entries.xml index 739751d047e..e184ce9d248 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0024_add_audit_entries.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0024_add_audit_entries.xml @@ -36,9 +36,11 @@ select count(*) from m_client - + - + @@ -57,7 +59,8 @@ - + @@ -67,16 +70,19 @@ - + select count(*) from m_loan_transaction - + - + @@ -105,16 +111,19 @@ - + @@ -125,16 +134,19 @@ - + select count(*) from m_client_transaction - + - + @@ -154,16 +166,20 @@ - - + + @@ -180,9 +196,11 @@ select count(*) from m_client_transaction - + - + @@ -203,16 +221,20 @@ - - + + @@ -220,22 +242,30 @@ select count(*) from m_floating_rates_periods - + - - + + select count(*) from m_floating_rates_periods - + - - + + - - + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0025_add_audit_entries_to_journal_entry.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0025_add_audit_entries_to_journal_entry.xml index 156f83c7a87..93ea05a6a39 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0025_add_audit_entries_to_journal_entry.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0025_add_audit_entries_to_journal_entry.xml @@ -38,19 +38,24 @@ - + - - + + @@ -59,14 +64,17 @@ select count(*) from acc_gl_journal_entry - + select count(*) from acc_gl_journal_entry - - + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0027_add_charge_refund_permission.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0027_add_charge_refund_permission.xml index 6738728d34b..1fdb08a9b83 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0027_add_charge_refund_permission.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0027_add_charge_refund_permission.xml @@ -19,14 +19,16 @@ under the License. --> - + - - - - - + + + + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0028_add_charge_refund_charge_type_to_loan_transaction.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0028_add_charge_refund_charge_type_to_loan_transaction.xml index 5552d4d7365..38932f92899 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0028_add_charge_refund_charge_type_to_loan_transaction.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0028_add_charge_refund_charge_type_to_loan_transaction.xml @@ -19,7 +19,9 @@ under the License. --> - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0029_add_delinquency_buckets.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0029_add_delinquency_buckets.xml index 5b8a6ccbe43..645902a833c 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0029_add_delinquency_buckets.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0029_add_delinquency_buckets.xml @@ -31,25 +31,25 @@ - + - + - + - + - + - + @@ -60,19 +60,19 @@ - + - + - + - + @@ -80,25 +80,25 @@ - + - + - + - + - + - + @@ -106,29 +106,29 @@ - + - + - + - + - + - + - + - + @@ -141,25 +141,25 @@ - + - + - + - + - + - + @@ -170,19 +170,19 @@ - + - + - + - + @@ -190,25 +190,25 @@ - + - + - + - + - + - + @@ -216,29 +216,29 @@ - + - + - + - + - + - + - + - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0030_add_audit_entries_to_business_date.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0030_add_audit_entries_to_business_date.xml index 60778212f12..7ecd0ac055d 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0030_add_audit_entries_to_business_date.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0030_add_audit_entries_to_business_date.xml @@ -40,16 +40,20 @@ - - + + @@ -64,8 +68,10 @@ select count(*) from m_business_date - - + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0031_add_audit_entries_to_client_identifier.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0031_add_audit_entries_to_client_identifier.xml index fe3aca12086..ac85254872a 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0031_add_audit_entries_to_client_identifier.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0031_add_audit_entries_to_client_identifier.xml @@ -37,19 +37,24 @@ - + - - + + @@ -58,18 +63,23 @@ select count(*) from m_client_identifier - + select count(*) from m_client_identifier - - + + - select count(*) from m_client_identifier where created_by is null or last_modified_by is null + select count(*) from m_client_identifier where created_by is null or + last_modified_by is null + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0033_add_audit_entries_to_loan_repayment_schedule_installment.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0033_add_audit_entries_to_loan_repayment_schedule_installment.xml index 9144fea6613..96975ba84bd 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0033_add_audit_entries_to_loan_repayment_schedule_installment.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0033_add_audit_entries_to_loan_repayment_schedule_installment.xml @@ -36,20 +36,26 @@ - - + + - - + + @@ -57,22 +63,29 @@ select count(*) from m_loan_repayment_schedule - - + + select count(*) from m_loan_repayment_schedule - - + + - select count(*) from m_loan_repayment_schedule where created_by is null or last_modified_by is null + select count(*) from m_loan_repayment_schedule where created_by is null or + last_modified_by is null + - + @@ -90,14 +103,18 @@ select count(*) from m_loan_repayment_schedule_history - - + + select count(*) from m_loan_repayment_schedule_history - - + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0034_add_audit_entries_to_note.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0034_add_audit_entries_to_note.xml index 19f519cdd51..744619f5e9d 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0034_add_audit_entries_to_note.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0034_add_audit_entries_to_note.xml @@ -40,8 +40,10 @@ - - + + select count(*) from m_note - + - select count(*) from m_note where created_by is null or last_modified_by is null + select count(*) from m_note where created_by is null or last_modified_by is + null + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0035_add_audit_entries_to_calendar.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0035_add_audit_entries_to_calendar.xml index 43204ed69e7..dfede975479 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0035_add_audit_entries_to_calendar.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0035_add_audit_entries_to_calendar.xml @@ -40,8 +40,10 @@ - - + + @@ -64,12 +67,16 @@ select count(*) from m_calendar - - + + - select count(*) from m_calendar where created_by is null or last_modified_by is null + select count(*) from m_calendar where created_by is null or last_modified_by is + null + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0036_add_audit_entries_and_rework_command_source_datetime_fields.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0036_add_audit_entries_and_rework_command_source_datetime_fields.xml index f8eab38577d..ef79422f0b8 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0036_add_audit_entries_and_rework_command_source_datetime_fields.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0036_add_audit_entries_and_rework_command_source_datetime_fields.xml @@ -35,18 +35,21 @@ - + select count(*) from m_portfolio_command_source - + select count(*) from m_portfolio_command_source - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0038_add_reversal_data_to_loan_transaction.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0038_add_reversal_data_to_loan_transaction.xml index 3b30d4bf594..098fb41d682 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0038_add_reversal_data_to_loan_transaction.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0038_add_reversal_data_to_loan_transaction.xml @@ -19,10 +19,12 @@ under the License. --> - + - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0039_add_loan_account_locks.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0039_add_loan_account_locks.xml index 3d028e47c86..6cc147dca1b 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0039_add_loan_account_locks.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0039_add_loan_account_locks.xml @@ -43,7 +43,9 @@ - diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0041_add_update_business_step_permission.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0041_add_update_business_step_permission.xml index 2b0d2565b19..b4f4d214b57 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0041_add_update_business_step_permission.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0041_add_update_business_step_permission.xml @@ -19,7 +19,9 @@ under the License. --> - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0042_table_report_query_fix.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0042_table_report_query_fix.xml index 81447a84040..c72c39c6687 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0042_table_report_query_fix.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0042_table_report_query_fix.xml @@ -25,15 +25,18 @@ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> - + report_name='GeneralLedgerReport Table' - + report_name='Income Statement Table' - + report_name='Balance Sheet Table' diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0044_table_report_query_fix.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0044_table_report_query_fix.xml index fb410da2f94..49da2c35f7c 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0044_table_report_query_fix.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0044_table_report_query_fix.xml @@ -25,7 +25,8 @@ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> - + report_name='GeneralLedgerReport Table' diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0052_loan_transaction_chargeback.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0052_loan_transaction_chargeback.xml index 638f126fe2b..15aa2e97130 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0052_loan_transaction_chargeback.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0052_loan_transaction_chargeback.xml @@ -28,28 +28,28 @@ - + - + - + - + - + - + @@ -59,28 +59,28 @@ - + - + - + - + - + - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0053_add_external_events_purge_job.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0053_add_external_events_purge_job.xml index 7b21cabd095..267c3ad2fd2 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0053_add_external_events_purge_job.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0053_add_external_events_purge_job.xml @@ -36,7 +36,8 @@ - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0055_add_submitted_on_date_to_loan_charge.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0055_add_submitted_on_date_to_loan_charge.xml index a27aff8e931..f2d54f0dee3 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0055_add_submitted_on_date_to_loan_charge.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0055_add_submitted_on_date_to_loan_charge.xml @@ -19,7 +19,9 @@ under the License. --> - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0057_add_principal_adjustments_to_loan.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0057_add_principal_adjustments_to_loan.xml index 63ae38916c9..5b01ec3762a 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0057_add_principal_adjustments_to_loan.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0057_add_principal_adjustments_to_loan.xml @@ -19,7 +19,9 @@ under the License. --> - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0058_add_execute_inline_cob_permission.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0058_add_execute_inline_cob_permission.xml index 69ee925260c..3e21f8e7892 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0058_add_execute_inline_cob_permission.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0058_add_execute_inline_cob_permission.xml @@ -19,7 +19,9 @@ under the License. --> - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0060_add_job_name_to_command_source.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0060_add_job_name_to_command_source.xml index 245a2daa906..d107957688c 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0060_add_job_name_to_command_source.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0060_add_job_name_to_command_source.xml @@ -19,7 +19,9 @@ under the License. --> - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0061_add_idempotency_key_to_command_source.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0061_add_idempotency_key_to_command_source.xml index 1bb48450d34..5818fc4639d 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0061_add_idempotency_key_to_command_source.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0061_add_idempotency_key_to_command_source.xml @@ -33,10 +33,11 @@ - + idempotency_key is null - diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0062_add_fraud_attribute_to_loan.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0062_add_fraud_attribute_to_loan.xml index c5b283e2708..712babfa578 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0062_add_fraud_attribute_to_loan.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0062_add_fraud_attribute_to_loan.xml @@ -19,7 +19,9 @@ under the License. --> - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0064_refactor_loan_transaction_strategy.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0064_refactor_loan_transaction_strategy.xml index 14acd66af02..63da0a4692e 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0064_refactor_loan_transaction_strategy.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0064_refactor_loan_transaction_strategy.xml @@ -19,7 +19,9 @@ under the License. --> - + @@ -30,41 +32,41 @@ - - + + loan_transaction_strategy_id = 1 - - + + loan_transaction_strategy_id = 2 - - + + loan_transaction_strategy_id = 3 - - + + loan_transaction_strategy_id = 4 - - + + loan_transaction_strategy_id = 5 - - + + loan_transaction_strategy_id = 6 - - + + loan_transaction_strategy_id = 7 - + @@ -79,47 +81,48 @@ - - + + loan_transaction_strategy_id = 1 - - + + loan_transaction_strategy_id = 2 - - + + loan_transaction_strategy_id = 3 - - + + loan_transaction_strategy_id = 4 - - + + loan_transaction_strategy_id = 5 - - + + loan_transaction_strategy_id = 6 - - + + loan_transaction_strategy_id = 7 - + - + + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd"> diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0087_update_dashboard_table_reports.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0087_update_dashboard_table_reports.xml index 6ceb0a712f9..d5ab59a074e 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0087_update_dashboard_table_reports.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0087_update_dashboard_table_reports.xml @@ -20,15 +20,15 @@ --> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd"> - + report_name = 'Disbursal_Vs_Awaitingdisbursal' - + report_name = 'Demand_Vs_Collection' @@ -109,7 +109,7 @@ id='154' AND report_name = 'LoanTrendsByMonth' - + + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd"> diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0093_update_general_accounting_table_reports.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0093_update_general_accounting_table_reports.xml index 3c9f58746b6..5651aec4e88 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0093_update_general_accounting_table_reports.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0093_update_general_accounting_table_reports.xml @@ -20,8 +20,8 @@ --> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd"> diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0097_update_accounting_summary_table_reports.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0097_update_accounting_summary_table_reports.xml index 791b61cd7f6..020177c5171 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0097_update_accounting_summary_table_reports.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0097_update_accounting_summary_table_reports.xml @@ -20,8 +20,8 @@ --> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd"> diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0098_update_transaction_summary_table_report.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0098_update_transaction_summary_table_report.xml index 63814103c94..8f19a029377 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0098_update_transaction_summary_table_report.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0098_update_transaction_summary_table_report.xml @@ -20,8 +20,8 @@ --> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd"> diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0100_new_repayment_strategy.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0100_new_repayment_strategy.xml index bc48a0c1276..221ea3030b7 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0100_new_repayment_strategy.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0100_new_repayment_strategy.xml @@ -26,16 +26,20 @@ - - + + - - + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0101_update_transaction_summary_table_report.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0101_update_transaction_summary_table_report.xml index 1dc0122454a..a01f0b98d4c 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0101_update_transaction_summary_table_report.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0101_update_transaction_summary_table_report.xml @@ -20,8 +20,8 @@ --> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd"> diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0103_modify_parameter_json_column_custom_job_parameters.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0103_modify_parameter_json_column_custom_job_parameters.xml index 6b93fee16fa..d9ad7609072 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0103_modify_parameter_json_column_custom_job_parameters.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0103_modify_parameter_json_column_custom_job_parameters.xml @@ -29,14 +29,27 @@ - UPDATE batch_custom_job_parameters SET parameter_json = json_build_array(json_build_object('parameterName','LoanIds','parameterValue',parameter_json)) WHERE id IN (SELECT DISTINCT cjp.id FROM (SELECT id,json_array_elements(parameter_json) AS json_data FROM batch_custom_job_parameters cjp1 WHERE json_typeof(cjp1.parameter_json)='array') AS cjp WHERE (json_typeof(cjp.json_data) = 'number')); - UPDATE batch_custom_job_parameters SET parameter_json = json_build_array(json_build_object('parameterName','BusinessDate','parameterValue',parameter_json)) WHERE id IN (SELECT DISTINCT cjp.id FROM batch_custom_job_parameters cjp WHERE json_typeof(parameter_json) IS DISTINCT FROM 'array'); + UPDATE batch_custom_job_parameters SET parameter_json = + json_build_array(json_build_object('parameterName','LoanIds','parameterValue',parameter_json)) WHERE id IN + (SELECT DISTINCT cjp.id FROM (SELECT id,json_array_elements(parameter_json) AS json_data FROM + batch_custom_job_parameters cjp1 WHERE json_typeof(cjp1.parameter_json)='array') AS cjp WHERE + (json_typeof(cjp.json_data) = 'number')); + UPDATE batch_custom_job_parameters SET parameter_json = + json_build_array(json_build_object('parameterName','BusinessDate','parameterValue',parameter_json)) WHERE id + IN (SELECT DISTINCT cjp.id FROM batch_custom_job_parameters cjp WHERE json_typeof(parameter_json) IS + DISTINCT FROM 'array'); - UPDATE batch_custom_job_parameters SET parameter_json = JSON_ARRAY(JSON_OBJECT('parameterName','LoanIds','parameterValue',parameter_json)) WHERE id IN (SELECT DISTINCT cjp.id FROM (SELECT * FROM batch_custom_job_parameters) cjp WHERE JSON_TYPE(cjp.parameter_json) = 'ARRAY' AND JSON_TYPE(JSON_EXTRACT(cjp.parameter_json, '$[0]')) = 'INTEGER'); - UPDATE batch_custom_job_parameters SET parameter_json = JSON_ARRAY(JSON_OBJECT('parameterName','BusinessDate','parameterValue',parameter_json)) WHERE id IN (SELECT DISTINCT cjp.id FROM (SELECT * FROM batch_custom_job_parameters) cjp WHERE JSON_TYPE(cjp.parameter_json) != 'ARRAY'); + UPDATE batch_custom_job_parameters SET parameter_json = + JSON_ARRAY(JSON_OBJECT('parameterName','LoanIds','parameterValue',parameter_json)) WHERE id IN (SELECT + DISTINCT cjp.id FROM (SELECT * FROM batch_custom_job_parameters) cjp WHERE JSON_TYPE(cjp.parameter_json) = + 'ARRAY' AND JSON_TYPE(JSON_EXTRACT(cjp.parameter_json, '$[0]')) = 'INTEGER'); + UPDATE batch_custom_job_parameters SET parameter_json = + JSON_ARRAY(JSON_OBJECT('parameterName','BusinessDate','parameterValue',parameter_json)) WHERE id IN (SELECT + DISTINCT cjp.id FROM (SELECT * FROM batch_custom_job_parameters) cjp WHERE JSON_TYPE(cjp.parameter_json) != + 'ARRAY'); diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0106_new_repayment_strategy.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0106_new_repayment_strategy.xml index 77e5e537fcf..780d3995b7b 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0106_new_repayment_strategy.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0106_new_repayment_strategy.xml @@ -26,16 +26,20 @@ - - + + - - + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0107_add_configuration_charges_accrual_date.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0107_add_configuration_charges_accrual_date.xml index 453d2608d01..c4d91de7063 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0107_add_configuration_charges_accrual_date.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0107_add_configuration_charges_accrual_date.xml @@ -35,7 +35,8 @@ - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0108_precondition_check_cob_loan_account_lock.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0108_precondition_check_cob_loan_account_lock.xml index 70a8709216d..8634febcdd6 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0108_precondition_check_cob_loan_account_lock.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0108_precondition_check_cob_loan_account_lock.xml @@ -23,8 +23,11 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd"> - - select count(*) from m_loan_account_locks where lock_owner = 'LOAN_COB_PARTITIONING' + + select count(*) from m_loan_account_locks where lock_owner = + 'LOAN_COB_PARTITIONING' + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0110_trial_balance_summary_with_asset_owner.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0110_trial_balance_summary_with_asset_owner.xml index f5f64b2f9da..9ad098ba057 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0110_trial_balance_summary_with_asset_owner.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0110_trial_balance_summary_with_asset_owner.xml @@ -20,8 +20,8 @@ --> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd"> @@ -39,13 +39,17 @@ - - + + - - + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0111_transaction_summary_with_asset_owner.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0111_transaction_summary_with_asset_owner.xml index 21295f096df..1d8fb69ea1a 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0111_transaction_summary_with_asset_owner.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0111_transaction_summary_with_asset_owner.xml @@ -20,8 +20,8 @@ --> + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd"> @@ -39,13 +39,17 @@ - - + + - - + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0114_create_cob_indices.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0114_create_cob_indices.xml index 0e59750d4ac..8a6970d91a8 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0114_create_cob_indices.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0114_create_cob_indices.xml @@ -29,7 +29,8 @@ - create index concurrently idx_batch_step_execution_step_name_job_execution_id on batch_step_execution(job_execution_id, step_name, start_time); + create index concurrently idx_batch_step_execution_step_name_job_execution_id on + batch_step_execution(job_execution_id, step_name, start_time); diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0115_create_index_from_loan_transaction_id.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0115_create_index_from_loan_transaction_id.xml index 22508580664..31579958560 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0115_create_index_from_loan_transaction_id.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0115_create_index_from_loan_transaction_id.xml @@ -28,7 +28,8 @@ - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0116_add_configuration_asset_externalization_of_non_active_loans.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0116_add_configuration_asset_externalization_of_non_active_loans.xml index 1035713170e..25415f94ecb 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0116_add_configuration_asset_externalization_of_non_active_loans.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0116_add_configuration_asset_externalization_of_non_active_loans.xml @@ -35,7 +35,8 @@ - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0117_set_datetime_precision.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0117_set_datetime_precision.xml index 75f961b0de0..e8a7b10a869 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0117_set_datetime_precision.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0117_set_datetime_precision.xml @@ -23,130 +23,155 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0119_add_loan_product_down_payment_configuration.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0119_add_loan_product_down_payment_configuration.xml index 6d722d83ce7..909e04e1404 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0119_add_loan_product_down_payment_configuration.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0119_add_loan_product_down_payment_configuration.xml @@ -29,7 +29,8 @@ - + @@ -39,7 +40,8 @@ - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0127_client_name_length.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0127_client_name_length.xml index c432f78d202..e17891df1a3 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0127_client_name_length.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0127_client_name_length.xml @@ -23,7 +23,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> - - + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0128_savings_audit.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0128_savings_audit.xml index 89a7e7b4ab9..c8ff784eb35 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0128_savings_audit.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0128_savings_audit.xml @@ -25,10 +25,11 @@ - + - + @@ -40,10 +41,14 @@ - - - - + + + + @@ -106,7 +111,8 @@ - + @@ -121,10 +127,14 @@ select count(*) from m_savings_account_transaction - - - - + + + + @@ -139,10 +149,14 @@ select count(*) from m_deposit_account_on_hold_transaction - - - - + + + + @@ -158,9 +172,12 @@ select count(*) from m_savings_account_charge - - - + + + @@ -175,10 +192,14 @@ select count(*) from m_savings_officer_assignment_history - - - - + + + + @@ -194,9 +215,12 @@ select count(*) from m_mandatory_savings_schedule - - - + + + @@ -209,58 +233,73 @@ - - - + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0130_add_create_delinquency_action_permission.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0130_add_create_delinquency_action_permission.xml index f478c6392c2..fcf79c30755 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0130_add_create_delinquency_action_permission.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0130_add_create_delinquency_action_permission.xml @@ -19,14 +19,16 @@ under the License. --> - + - - - - - + + + + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0131_add_configuration_maker_checker.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0131_add_configuration_maker_checker.xml index a400511b8b5..aec82b3eaa0 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0131_add_configuration_maker_checker.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0131_add_configuration_maker_checker.xml @@ -19,7 +19,8 @@ under the License. --> - diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0132_add_configuration_loan_next_repayment_date_calculation.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0132_add_configuration_loan_next_repayment_date_calculation.xml index 000a1ebcbf4..48e58544ae5 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0132_add_configuration_loan_next_repayment_date_calculation.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0132_add_configuration_loan_next_repayment_date_calculation.xml @@ -35,7 +35,8 @@ - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0136_loan_reaging_parameters.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0136_loan_reaging_parameters.xml index 381165ab9bc..4545a7305fb 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0136_loan_reaging_parameters.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0136_loan_reaging_parameters.xml @@ -77,6 +77,7 @@ - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0139_add_disburse_without_auto_payment_command.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0139_add_disburse_without_auto_payment_command.xml index 630272ac33d..fa5cf2cc123 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0139_add_disburse_without_auto_payment_command.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0139_add_disburse_without_auto_payment_command.xml @@ -19,7 +19,8 @@ under the License. --> - diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0141_add_interest_payment_waiver_transaction_type.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0141_add_interest_payment_waiver_transaction_type.xml index c1bd5374ff5..b4799df1367 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0141_add_interest_payment_waiver_transaction_type.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0141_add_interest_payment_waiver_transaction_type.xml @@ -24,11 +24,11 @@ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd"> - - - - - + + + + + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0147_enable_payment_hub_integration.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0147_enable_payment_hub_integration.xml index 38c4a9be108..d7920066189 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0147_enable_payment_hub_integration.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0147_enable_payment_hub_integration.xml @@ -36,7 +36,8 @@ - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0152_update_password_validation_policy.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0152_update_password_validation_policy.xml index 0bd2608415e..386b219bde4 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0152_update_password_validation_policy.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0152_update_password_validation_policy.xml @@ -31,7 +31,8 @@ - + @@ -45,7 +46,8 @@ - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0155_add_configuration_enable_immediate_charge_accrual_post_maturity.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0155_add_configuration_enable_immediate_charge_accrual_post_maturity.xml index 3080942d9d8..defb1873b18 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0155_add_configuration_enable_immediate_charge_accrual_post_maturity.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0155_add_configuration_enable_immediate_charge_accrual_post_maturity.xml @@ -35,7 +35,8 @@ - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0157_create_index_m_loan_transaction_relation.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0157_create_index_m_loan_transaction_relation.xml index 82a73f1c992..53b0c2c4fbc 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0157_create_index_m_loan_transaction_relation.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0157_create_index_m_loan_transaction_relation.xml @@ -31,7 +31,8 @@ - create index concurrently IDX_M_LOAN_TRANSACTION_RELATION_TO_LOAN_TRANSACTION_ID on m_loan_transaction_relation(to_loan_transaction_id); + create index concurrently IDX_M_LOAN_TRANSACTION_RELATION_TO_LOAN_TRANSACTION_ID on + m_loan_transaction_relation(to_loan_transaction_id); @@ -41,7 +42,8 @@ - create index concurrently IDX_M_LOAN_TRANSACTION_RELATION_TO_LOAN_CHARGE_ID on m_loan_transaction_relation(to_loan_charge_id); + create index concurrently IDX_M_LOAN_TRANSACTION_RELATION_TO_LOAN_CHARGE_ID on + m_loan_transaction_relation(to_loan_charge_id); diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0158_create_acc_gl_journal_entry_annual_summary.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0158_create_acc_gl_journal_entry_annual_summary.xml index 8c097ef5e6f..788e19b469e 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0158_create_acc_gl_journal_entry_annual_summary.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0158_create_acc_gl_journal_entry_annual_summary.xml @@ -25,7 +25,8 @@ - + @@ -59,7 +60,8 @@ - + @@ -92,23 +94,27 @@ - create index concurrently if not exists acc_gl_journal_entry_annual_summary_idx_1 on acc_gl_journal_entry_annual_summary(gl_code,product_id); + create index concurrently if not exists acc_gl_journal_entry_annual_summary_idx_1 on + acc_gl_journal_entry_annual_summary(gl_code,product_id); - create index acc_gl_journal_entry_annual_summary_idx_1 on acc_gl_journal_entry_annual_summary(gl_code,product_id); + create index acc_gl_journal_entry_annual_summary_idx_1 on + acc_gl_journal_entry_annual_summary(gl_code,product_id); diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0159_trial_balance_summary_with_asset_owner_year_end_summary.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0159_trial_balance_summary_with_asset_owner_year_end_summary.xml index 5168419891d..c2cf7775006 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0159_trial_balance_summary_with_asset_owner_year_end_summary.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0159_trial_balance_summary_with_asset_owner_year_end_summary.xml @@ -25,7 +25,7 @@ - diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0165_add_credited_interest_to_instalment.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0165_add_credited_interest_to_instalment.xml index cfcc13147e7..b572319c08d 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0165_add_credited_interest_to_instalment.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0165_add_credited_interest_to_instalment.xml @@ -24,7 +24,7 @@ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd"> - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0167_create_m_calendar_instance_index.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0167_create_m_calendar_instance_index.xml index 125432aca65..926af462cb4 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0167_create_m_calendar_instance_index.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0167_create_m_calendar_instance_index.xml @@ -29,7 +29,8 @@ - create index concurrently idx_m_calendar_instance_entity_id_entity_type on m_calendar_instance(entity_id, entity_type_enum); + create index concurrently idx_m_calendar_instance_entity_id_entity_type on m_calendar_instance(entity_id, + entity_type_enum); diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0172_create_loan_capitalized_income_balance.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0172_create_loan_capitalized_income_balance.xml index f305e0c5386..c9b8864e3fc 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0172_create_loan_capitalized_income_balance.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0172_create_loan_capitalized_income_balance.xml @@ -45,8 +45,8 @@ - - + + @@ -76,8 +76,8 @@ - - + + @@ -86,31 +86,38 @@ - create unique index concurrently if not exists m_loan_capitalized_income_balance_idx_1 on m_loan_capitalized_income_balance(loan_id,loan_transaction_id); - create index concurrently if not exists m_loan_capitalized_income_balance_idx_2 on m_loan_capitalized_income_balance(loan_id); + create unique index concurrently if not exists m_loan_capitalized_income_balance_idx_1 on + m_loan_capitalized_income_balance(loan_id,loan_transaction_id); + create index concurrently if not exists m_loan_capitalized_income_balance_idx_2 on + m_loan_capitalized_income_balance(loan_id); - create unique index m_loan_capitalized_income_balance_idx_1 on m_loan_capitalized_income_balance(loan_id,loan_transaction_id); + create unique index m_loan_capitalized_income_balance_idx_1 on + m_loan_capitalized_income_balance(loan_id,loan_transaction_id); create index m_loan_capitalized_income_balance_idx_2 on m_loan_capitalized_income_balance(loan_id); diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0173_user_change_pwd.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0173_user_change_pwd.xml index 5897a43c28d..4f270dbde86 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0173_user_change_pwd.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0173_user_change_pwd.xml @@ -24,7 +24,7 @@ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.1.xsd"> - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0175_add_fk_acc_product_mapping.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0175_add_fk_acc_product_mapping.xml index 2297ade56da..ffb4e707366 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0175_add_fk_acc_product_mapping.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0175_add_fk_acc_product_mapping.xml @@ -24,7 +24,8 @@ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd"> diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0177_acc_journal_entry_index.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0177_acc_journal_entry_index.xml index 398a2b8f46e..e7899fa554c 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0177_acc_journal_entry_index.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0177_acc_journal_entry_index.xml @@ -25,7 +25,8 @@ - SELECT COUNT(*) FROM pg_indexes WHERE tablename='acc_gl_journal_entry' and indexname='idx_acc_gl_journal_entry_transaction_id'; + SELECT COUNT(*) FROM pg_indexes WHERE tablename='acc_gl_journal_entry' and + indexname='idx_acc_gl_journal_entry_transaction_id'; @@ -37,8 +38,8 @@ SELECT COUNT(*) FROM information_schema.statistics WHERE table_schema = DATABASE() - AND table_name = 'acc_gl_journal_entry' - AND index_name = 'idx_acc_gl_journal_entry_transaction_id'; + AND table_name = 'acc_gl_journal_entry' + AND index_name = 'idx_acc_gl_journal_entry_transaction_id'; diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0188_create_loan_buy_down_fee_balance.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0188_create_loan_buy_down_fee_balance.xml index f320ee2ee12..732aa30451e 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0188_create_loan_buy_down_fee_balance.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0188_create_loan_buy_down_fee_balance.xml @@ -45,8 +45,8 @@ - - + + @@ -76,8 +76,8 @@ - - + + @@ -86,31 +86,38 @@ - create unique index concurrently if not exists m_loan_buy_down_fee_balance_idx_1 on m_loan_buy_down_fee_balance(loan_id,loan_transaction_id); - create index concurrently if not exists m_loan_buy_down_fee_balance_idx_2 on m_loan_buy_down_fee_balance(loan_id); + create unique index concurrently if not exists m_loan_buy_down_fee_balance_idx_1 on + m_loan_buy_down_fee_balance(loan_id,loan_transaction_id); + create index concurrently if not exists m_loan_buy_down_fee_balance_idx_2 on + m_loan_buy_down_fee_balance(loan_id); - create unique index m_loan_buy_down_fee_balance_idx_1 on m_loan_buy_down_fee_balance(loan_id,loan_transaction_id); + create unique index m_loan_buy_down_fee_balance_idx_1 on + m_loan_buy_down_fee_balance(loan_id,loan_transaction_id); create index m_loan_buy_down_fee_balance_idx_2 on m_loan_buy_down_fee_balance(loan_id); diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0192_create_loan_approved_amount_history.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0192_create_loan_approved_amount_history.xml index 1f0d1b284ed..6730483dc33 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0192_create_loan_approved_amount_history.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0192_create_loan_approved_amount_history.xml @@ -64,15 +64,18 @@ diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0195_create_loan_amortization_allocation_mapping.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0195_create_loan_amortization_allocation_mapping.xml index 1c1dc747040..15becd89cdb 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0195_create_loan_amortization_allocation_mapping.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0195_create_loan_amortization_allocation_mapping.xml @@ -25,7 +25,8 @@ - + @@ -55,7 +56,8 @@ - + @@ -87,7 +89,8 @@ constraintName="FK_laam_created_by" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id" referencedTableName="m_appuser" validate="true"/> - @@ -95,12 +98,16 @@ constraintName="FK_laam_loan_id" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="id" referencedTableName="m_loan" validate="true"/> - - @@ -111,7 +118,8 @@ - create index concurrently idx_m_loan_am_all_map_base_loan_id on m_loan_amortization_allocation_mapping(loan_id); + create index concurrently idx_m_loan_am_all_map_base_loan_id on + m_loan_amortization_allocation_mapping(loan_id); @@ -131,7 +139,8 @@ - create index concurrently idx_m_loan_am_all_map_base_loan_txn_id on m_loan_amortization_allocation_mapping(base_loan_transaction_id); + create index concurrently idx_m_loan_am_all_map_base_loan_txn_id on + m_loan_amortization_allocation_mapping(base_loan_transaction_id); @@ -147,21 +156,25 @@ - + - create index concurrently idx_m_loan_am_all_map_amort_loan_txn_id on m_loan_amortization_allocation_mapping(amortization_loan_transaction_id); + create index concurrently idx_m_loan_am_all_map_amort_loan_txn_id on + m_loan_amortization_allocation_mapping(amortization_loan_transaction_id); - + - create index idx_m_loan_am_all_map_amort_loan_txn_id on batch_step_execution(amortization_loan_transaction_id); + create index idx_m_loan_am_all_map_amort_loan_txn_id on + batch_step_execution(amortization_loan_transaction_id); diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0200_add_journal_entry_aggregation_tables.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0200_add_journal_entry_aggregation_tables.xml index f31806412e4..8e6fb5c3fc6 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0200_add_journal_entry_aggregation_tables.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0200_add_journal_entry_aggregation_tables.xml @@ -22,7 +22,7 @@ - + @@ -64,24 +64,36 @@ - - - - - + + + + + - + - + - create index concurrently idx_journal_entry_aggregation_summary on m_journal_entry_aggregation_summary(submitted_on_date,gl_account_id); + create index concurrently idx_journal_entry_aggregation_summary on + m_journal_entry_aggregation_summary(submitted_on_date,gl_account_id); - + @@ -108,10 +120,16 @@ - - - - + + + + @@ -155,24 +173,36 @@ - - - - - + + + + + - + - + - create index idx_journal_entry_aggregation_summary on m_journal_entry_aggregation_summary(submitted_on_date,gl_account_id); + create index idx_journal_entry_aggregation_summary on + m_journal_entry_aggregation_summary(submitted_on_date,gl_account_id); - + @@ -199,61 +229,72 @@ - - - + + + - + - create index concurrently idx_m_journal_entry_aggregation_tracking on m_journal_entry_aggregation_tracking(submitted_on_date); + create index concurrently idx_m_journal_entry_aggregation_tracking on + m_journal_entry_aggregation_tracking(submitted_on_date); - + - create unique index concurrently idx2_m_journal_entry_aggregation_tracking on m_journal_entry_aggregation_tracking(aggregated_on_date_to); + create unique index concurrently idx2_m_journal_entry_aggregation_tracking on + m_journal_entry_aggregation_tracking(aggregated_on_date_to); - + - create index idx_m_journal_entry_aggregation_tracking on m_journal_entry_aggregation_tracking(submitted_on_date); + create index idx_m_journal_entry_aggregation_tracking on + m_journal_entry_aggregation_tracking(submitted_on_date); - + - create unique index idx2_m_journal_entry_aggregation_tracking on m_journal_entry_aggregation_tracking(aggregated_on_date_to); + create unique index idx2_m_journal_entry_aggregation_tracking on + m_journal_entry_aggregation_tracking(aggregated_on_date_to); - + - create index concurrently idx_m_jour_ent_aggr_trac_job_exec_id on m_journal_entry_aggregation_tracking(job_execution_id); + create index concurrently idx_m_jour_ent_aggr_trac_job_exec_id on + m_journal_entry_aggregation_tracking(job_execution_id); - + @@ -263,17 +304,18 @@ create index idx_m_jour_ent_aggr_trac_job_exec_id on m_journal_entry_aggregation_tracking(job_execution_id); - + - create index concurrently idx_m_jour_ent_aggr_sum_job_exec_id on m_journal_entry_aggregation_summary(job_execution_id); + create index concurrently idx_m_jour_ent_aggr_sum_job_exec_id on + m_journal_entry_aggregation_summary(job_execution_id); - + @@ -283,37 +325,40 @@ create index idx_m_jour_ent_aggr_sum_job_exec_id on m_journal_entry_aggregation_summary(job_execution_id); - + - create index concurrently idx_m_jour_ent_aggr_sum_prod_id_entity_type on m_journal_entry_aggregation_summary(product_id, entity_type_enum); + create index concurrently idx_m_jour_ent_aggr_sum_prod_id_entity_type on + m_journal_entry_aggregation_summary(product_id, entity_type_enum); - + - create index idx_m_jour_ent_aggr_sum_prod_id_entity_type on m_journal_entry_aggregation_summary(product_id, entity_type_enum); + create index idx_m_jour_ent_aggr_sum_prod_id_entity_type on m_journal_entry_aggregation_summary(product_id, + entity_type_enum); - + - create index concurrently idx_m_jour_ent_aggr_sum_aggr_date on m_journal_entry_aggregation_summary(aggregated_on_date); + create index concurrently idx_m_jour_ent_aggr_sum_aggr_date on + m_journal_entry_aggregation_summary(aggregated_on_date); - + @@ -323,17 +368,18 @@ create index idx_m_jour_ent_aggr_sum_aggr_date on m_journal_entry_aggregation_summary(aggregated_on_date); - + - create index concurrently idx_m_jour_ent_aggr_sum_office_id on m_journal_entry_aggregation_summary(office_id); + create index concurrently idx_m_jour_ent_aggr_sum_office_id on + m_journal_entry_aggregation_summary(office_id); - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0202_trial_balance_summary_with_asset_owner_journal_entry_aggregation.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0202_trial_balance_summary_with_asset_owner_journal_entry_aggregation.xml index b0e126f15a9..c1ebae20baa 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0202_trial_balance_summary_with_asset_owner_journal_entry_aggregation.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0202_trial_balance_summary_with_asset_owner_journal_entry_aggregation.xml @@ -25,7 +25,7 @@ - @@ -29,7 +30,8 @@ - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0212_add_force_password_reset_config.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0212_add_force_password_reset_config.xml index 16354740ef1..c4606fcc839 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0212_add_force_password_reset_config.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0212_add_force_password_reset_config.xml @@ -36,7 +36,8 @@ - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0217_force_withdrawal_configs.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0217_force_withdrawal_configs.xml index 575ca65cb81..4535ccfb8ea 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0217_force_withdrawal_configs.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0217_force_withdrawal_configs.xml @@ -29,7 +29,8 @@ - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0219_remove_self_service_feature.xml b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0219_remove_self_service_feature.xml index 1b059c1551b..6945527cb49 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0219_remove_self_service_feature.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0219_remove_self_service_feature.xml @@ -30,21 +30,25 @@ - + id='1001' AND parameter_name='FullReportList' - + id='1002' AND parameter_name='FullParameterList' - + id='1003' AND parameter_name='reportCategoryList' - + id='1002' AND parameter_name='FullParameterList' diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/upgrades/0000_upgrade_to_1.5.xml b/fineract-provider/src/main/resources/db/changelog/tenant/upgrades/0000_upgrade_to_1.5.xml index 832b65aeeb2..237e4019a05 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/upgrades/0000_upgrade_to_1.5.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/upgrades/0000_upgrade_to_1.5.xml @@ -25,7 +25,7 @@ - + diff --git a/fineract-provider/src/main/resources/db/changelog/tenant/upgrades/0000_upgrade_to_1.6.xml b/fineract-provider/src/main/resources/db/changelog/tenant/upgrades/0000_upgrade_to_1.6.xml index 2f7fab2f87a..2fcc27445b6 100644 --- a/fineract-provider/src/main/resources/db/changelog/tenant/upgrades/0000_upgrade_to_1.6.xml +++ b/fineract-provider/src/main/resources/db/changelog/tenant/upgrades/0000_upgrade_to_1.6.xml @@ -25,14 +25,16 @@ - UPDATE stretchy_report SET report_name = TRIM(report_name) WHERE id IN (SELECT id FROM (SELECT id FROM stretchy_report WHERE CHAR_LENGTH(report_name) != CHAR_LENGTH(TRIM(report_name)))Y); + UPDATE stretchy_report SET report_name = TRIM(report_name) WHERE id IN (SELECT id FROM (SELECT id FROM + stretchy_report WHERE CHAR_LENGTH(report_name) != CHAR_LENGTH(TRIM(report_name)))Y); - SELECT COUNT(*) FROM stretchy_report WHERE report_name IN ('Loan Approved - Email','Loan Rejected - Email','Loan Repayment - Email'); + SELECT COUNT(*) FROM stretchy_report WHERE report_name IN ('Loan Approved - Email','Loan Rejected - + Email','Loan Repayment - Email'); @@ -71,7 +73,8 @@ - + @@ -138,29 +141,29 @@ + constraintName="fkCollateral" deferrable="false" initiallyDeferred="false" + onDelete="CASCADE" onUpdate="CASCADE" referencedColumnNames="id" + referencedTableName="m_collateral_management" validate="true"/> + constraintName="fkCurrencyCode" deferrable="false" initiallyDeferred="false" + onDelete="CASCADE" onUpdate="RESTRICT" referencedColumnNames="id" + referencedTableName="m_currency" validate="true"/> + constraintName="fkClient" deferrable="false" initiallyDeferred="false" + onDelete="CASCADE" onUpdate="CASCADE" referencedColumnNames="id" + referencedTableName="m_client" validate="true"/> + constraintName="fkClientCollateral" deferrable="false" initiallyDeferred="false" + onDelete="CASCADE" onUpdate="CASCADE" referencedColumnNames="id" + referencedTableName="m_client_collateral_management" validate="true"/> + constraintName="fkLoan" deferrable="false" initiallyDeferred="false" onDelete="CASCADE" + onUpdate="CASCADE" referencedColumnNames="id" referencedTableName="m_loan" + validate="true"/> + constraintName="fkTransaction" deferrable="false" initiallyDeferred="false" + onDelete="CASCADE" onUpdate="CASCADE" referencedColumnNames="id" + referencedTableName="m_loan_transaction" validate="true"/> @@ -291,35 +294,35 @@ - + type="DECIMAL(19, 6)"> + + type="DECIMAL(19, 6)" defaultValueComputed="NULL"/> + type="DECIMAL(5, 2)" defaultValueComputed="NULL"/> + type="DECIMAL(5, 2)" defaultValueComputed="NULL"/> + type="INT" defaultValueComputed="1"/> + type="boolean" defaultValueBoolean="true"/> @@ -345,7 +348,7 @@ + type="VARCHAR(100)" defaultValueComputed="NULL" position="5"/> @@ -387,7 +390,7 @@ + type="date" defaultValueComputed="NULL"/> diff --git a/fineract-provider/src/main/resources/jpa/static-weaving/module/fineract-provider/persistence.xml b/fineract-provider/src/main/resources/jpa/static-weaving/module/fineract-provider/persistence.xml index f9ebfb806ea..238ab84acd2 100644 --- a/fineract-provider/src/main/resources/jpa/static-weaving/module/fineract-provider/persistence.xml +++ b/fineract-provider/src/main/resources/jpa/static-weaving/module/fineract-provider/persistence.xml @@ -204,7 +204,8 @@ org.apache.fineract.infrastructure.jobs.domain.ScheduledJobDetail org.apache.fineract.infrastructure.jobs.domain.ScheduledJobRunHistory org.apache.fineract.infrastructure.jobs.domain.SchedulerDetail - org.apache.fineract.infrastructure.jobs.service.aggregationjob.domain.JournalEntryAggregationTracking + org.apache.fineract.infrastructure.jobs.service.aggregationjob.domain.JournalEntryAggregationTracking + org.apache.fineract.infrastructure.jobs.service.aggregationjob.domain.JournalEntrySummary org.apache.fineract.infrastructure.reportmailingjob.domain.ReportMailingJob org.apache.fineract.infrastructure.reportmailingjob.domain.ReportMailingJobConfiguration @@ -312,14 +313,20 @@ org.apache.fineract.portfolio.workingcapitalloan.domain.WorkingCapitalLoanTransactionAllocation org.apache.fineract.portfolio.workingcapitalloannearbreach.domain.WorkingCapitalNearBreach org.apache.fineract.portfolio.workingcapitalloanproduct.domain.WorkingCapitalLoanProduct - org.apache.fineract.portfolio.workingcapitalloanproduct.domain.WorkingCapitalLoanProductConfigurableAttributes - org.apache.fineract.portfolio.workingcapitalloanproduct.domain.WorkingCapitalLoanProductPaymentAllocationRule - org.apache.fineract.portfolio.workingcapitalloanproduct.domain.WorkingCapitalPaymentAllocationTypeListConverter + + org.apache.fineract.portfolio.workingcapitalloanproduct.domain.WorkingCapitalLoanProductConfigurableAttributes + + + org.apache.fineract.portfolio.workingcapitalloanproduct.domain.WorkingCapitalLoanProductPaymentAllocationRule + + + org.apache.fineract.portfolio.workingcapitalloanproduct.domain.WorkingCapitalPaymentAllocationTypeListConverter + false - + diff --git a/fineract-provider/src/main/resources/logback-spring.xml b/fineract-provider/src/main/resources/logback-spring.xml index 84fe601f2cd..3baca78dfce 100644 --- a/fineract-provider/src/main/resources/logback-spring.xml +++ b/fineract-provider/src/main/resources/logback-spring.xml @@ -27,7 +27,7 @@ + converterClass="org.apache.fineract.infrastructure.core.logging.TenantIdentifierLoggingConverter"/> diff --git a/fineract-provider/src/main/resources/messages.properties b/fineract-provider/src/main/resources/messages.properties index b8110d388cb..14388fe2370 100644 --- a/fineract-provider/src/main/resources/messages.properties +++ b/fineract-provider/src/main/resources/messages.properties @@ -16,7 +16,6 @@ # specific language governing permissions and limitations # under the License. # - # Interest Rate Chart validation messages validation.msg.savings.interestRateChart.slabs.overlap=There is an overlap between slabs {0} and {1}. validation.msg.savings.interestRateChart.slabs.gap=There is a gap between slabs {0} and {1}. diff --git a/fineract-provider/src/main/resources/messages_de.properties b/fineract-provider/src/main/resources/messages_de.properties index 8019c339842..da8013abf5b 100644 --- a/fineract-provider/src/main/resources/messages_de.properties +++ b/fineract-provider/src/main/resources/messages_de.properties @@ -16,7 +16,6 @@ # specific language governing permissions and limitations # under the License. # - # Interest Rate Chart validation messages validation.msg.savings.interestRateChart.slabs.overlap=Es gibt eine Überlappung zwischen Segmenten {0} und {1}. validation.msg.savings.interestRateChart.slabs.gap=Es gibt eine Lücke zwischen Segmenten {0} und {1}. diff --git a/fineract-provider/src/main/resources/sql/migrations/sample_data/barebones_db.sql b/fineract-provider/src/main/resources/sql/migrations/sample_data/barebones_db.sql index 09cd583eb5c..e69136142e2 100644 --- a/fineract-provider/src/main/resources/sql/migrations/sample_data/barebones_db.sql +++ b/fineract-provider/src/main/resources/sql/migrations/sample_data/barebones_db.sql @@ -31,25 +31,70 @@ -- Dumping structure for table fineract_default.acc_accounting_rule DROP TABLE IF EXISTS `acc_accounting_rule`; -CREATE TABLE IF NOT EXISTS `acc_accounting_rule` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL, - `office_id` BIGINT DEFAULT NULL, - `debit_account_id` BIGINT DEFAULT NULL, - `allow_multiple_debits` tinyint NOT NULL DEFAULT '0', - `credit_account_id` BIGINT DEFAULT NULL, - `allow_multiple_credits` tinyint NOT NULL DEFAULT '0', - `description` varchar(500) DEFAULT NULL, - `system_defined` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `accounting_rule_name_unique` (`name`), - KEY `FK_acc_accounting_rule_acc_gl_account_debit` (`debit_account_id`), - KEY `FK_acc_accounting_rule_acc_gl_account_credit` (`credit_account_id`), - KEY `FK_acc_accounting_rule_m_office` (`office_id`), - CONSTRAINT `FK_acc_accounting_rule_acc_gl_account_credit` FOREIGN KEY (`credit_account_id`) REFERENCES `acc_gl_account` (`id`), - CONSTRAINT `FK_acc_accounting_rule_acc_gl_account_debit` FOREIGN KEY (`debit_account_id`) REFERENCES `acc_gl_account` (`id`), - CONSTRAINT `FK_acc_accounting_rule_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `acc_accounting_rule` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `name` + varchar +( + 100 +) DEFAULT NULL, + `office_id` BIGINT DEFAULT NULL, + `debit_account_id` BIGINT DEFAULT NULL, + `allow_multiple_debits` tinyint NOT NULL DEFAULT '0', + `credit_account_id` BIGINT DEFAULT NULL, + `allow_multiple_credits` tinyint NOT NULL DEFAULT '0', + `description` varchar +( + 500 +) DEFAULT NULL, + `system_defined` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY +( + `id` +), + UNIQUE KEY `accounting_rule_name_unique` +( + `name` +), + KEY `FK_acc_accounting_rule_acc_gl_account_debit` +( + `debit_account_id` +), + KEY `FK_acc_accounting_rule_acc_gl_account_credit` +( + `credit_account_id` +), + KEY `FK_acc_accounting_rule_m_office` +( + `office_id` +), + CONSTRAINT `FK_acc_accounting_rule_acc_gl_account_credit` FOREIGN KEY +( + `credit_account_id` +) REFERENCES `acc_gl_account` +( + `id` +), + CONSTRAINT `FK_acc_accounting_rule_acc_gl_account_debit` FOREIGN KEY +( + `debit_account_id` +) REFERENCES `acc_gl_account` +( + `id` +), + CONSTRAINT `FK_acc_accounting_rule_m_office` FOREIGN KEY +( + `office_id` +) REFERENCES `m_office` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.acc_accounting_rule: ~0 rows (approximately) /*!40000 ALTER TABLE `acc_accounting_rule` DISABLE KEYS */; @@ -58,25 +103,67 @@ CREATE TABLE IF NOT EXISTS `acc_accounting_rule` ( -- Dumping structure for table fineract_default.acc_gl_account DROP TABLE IF EXISTS `acc_gl_account`; -CREATE TABLE IF NOT EXISTS `acc_gl_account` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(200) NOT NULL, - `parent_id` BIGINT DEFAULT NULL, - `hierarchy` varchar(50) DEFAULT NULL, - `gl_code` varchar(45) NOT NULL, - `disabled` tinyint NOT NULL DEFAULT '0', - `manual_journal_entries_allowed` tinyint NOT NULL DEFAULT '1', - `account_usage` tinyint NOT NULL DEFAULT '2', - `classification_enum` SMALLINT NOT NULL, - `tag_id` INT DEFAULT NULL, - `description` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `acc_gl_code` (`gl_code`), - KEY `FK_ACC_0000000001` (`parent_id`), - KEY `FKGLACC000000002` (`tag_id`), - CONSTRAINT `FKGLACC000000002` FOREIGN KEY (`tag_id`) REFERENCES `m_code_value` (`id`), - CONSTRAINT `FK_ACC_0000000001` FOREIGN KEY (`parent_id`) REFERENCES `acc_gl_account` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `acc_gl_account` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `name` + varchar +( + 200 +) NOT NULL, + `parent_id` BIGINT DEFAULT NULL, + `hierarchy` varchar +( + 50 +) DEFAULT NULL, + `gl_code` varchar +( + 45 +) NOT NULL, + `disabled` tinyint NOT NULL DEFAULT '0', + `manual_journal_entries_allowed` tinyint NOT NULL DEFAULT '1', + `account_usage` tinyint NOT NULL DEFAULT '2', + `classification_enum` SMALLINT NOT NULL, + `tag_id` INT DEFAULT NULL, + `description` varchar +( + 500 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `acc_gl_code` +( + `gl_code` +), + KEY `FK_ACC_0000000001` +( + `parent_id` +), + KEY `FKGLACC000000002` +( + `tag_id` +), + CONSTRAINT `FKGLACC000000002` FOREIGN KEY +( + `tag_id` +) REFERENCES `m_code_value` +( + `id` +), + CONSTRAINT `FK_ACC_0000000001` FOREIGN KEY +( + `parent_id` +) REFERENCES `acc_gl_account` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.acc_gl_account: ~0 rows (approximately) /*!40000 ALTER TABLE `acc_gl_account` DISABLE KEYS */; @@ -85,25 +172,91 @@ CREATE TABLE IF NOT EXISTS `acc_gl_account` ( -- Dumping structure for table fineract_default.acc_gl_closure DROP TABLE IF EXISTS `acc_gl_closure`; -CREATE TABLE IF NOT EXISTS `acc_gl_closure` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `office_id` BIGINT NOT NULL, - `closing_date` date NOT NULL, - `is_deleted` INT NOT NULL DEFAULT '0', - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - `comments` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `office_id_closing_date` (`office_id`,`closing_date`), - KEY `FK_acc_gl_closure_m_office` (`office_id`), - KEY `FK_acc_gl_closure_m_appuser` (`createdby_id`), - KEY `FK_acc_gl_closure_m_appuser_2` (`lastmodifiedby_id`), - CONSTRAINT `FK_acc_gl_closure_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_closure_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_closure_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `acc_gl_closure` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `office_id` + BIGINT + NOT + NULL, + `closing_date` + date + NOT + NULL, + `is_deleted` + INT + NOT + NULL + DEFAULT + '0', + `createdby_id` + BIGINT + DEFAULT + NULL, + `lastmodifiedby_id` + BIGINT + DEFAULT + NULL, + `created_date` + datetime + DEFAULT + NULL, + `lastmodified_date` + datetime + DEFAULT + NULL, + `comments` + varchar +( + 500 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `office_id_closing_date` +( + `office_id`, + `closing_date` +), + KEY `FK_acc_gl_closure_m_office` +( + `office_id` +), + KEY `FK_acc_gl_closure_m_appuser` +( + `createdby_id` +), + KEY `FK_acc_gl_closure_m_appuser_2` +( + `lastmodifiedby_id` +), + CONSTRAINT `FK_acc_gl_closure_m_appuser` FOREIGN KEY +( + `createdby_id` +) REFERENCES `m_appuser` +( + `id` +), + CONSTRAINT `FK_acc_gl_closure_m_appuser_2` FOREIGN KEY +( + `lastmodifiedby_id` +) REFERENCES `m_appuser` +( + `id` +), + CONSTRAINT `FK_acc_gl_closure_m_office` FOREIGN KEY +( + `office_id` +) REFERENCES `m_office` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.acc_gl_closure: ~0 rows (approximately) /*!40000 ALTER TABLE `acc_gl_closure` DISABLE KEYS */; @@ -112,15 +265,44 @@ CREATE TABLE IF NOT EXISTS `acc_gl_closure` ( -- Dumping structure for table fineract_default.acc_gl_financial_activity_account DROP TABLE IF EXISTS `acc_gl_financial_activity_account`; -CREATE TABLE IF NOT EXISTS `acc_gl_financial_activity_account` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `gl_account_id` BIGINT NOT NULL DEFAULT '0', - `financial_activity_type` SMALLINT NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `financial_activity_type` (`financial_activity_type`), - KEY `FK_office_mapping_acc_gl_account` (`gl_account_id`), - CONSTRAINT `FK_office_mapping_acc_gl_account` FOREIGN KEY (`gl_account_id`) REFERENCES `acc_gl_account` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `acc_gl_financial_activity_account` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `gl_account_id` + BIGINT + NOT + NULL + DEFAULT + '0', + `financial_activity_type` + SMALLINT + NOT + NULL, + PRIMARY + KEY +( + `id` +), + UNIQUE KEY `financial_activity_type` +( + `financial_activity_type` +), + KEY `FK_office_mapping_acc_gl_account` +( + `gl_account_id` +), + CONSTRAINT `FK_office_mapping_acc_gl_account` FOREIGN KEY +( + `gl_account_id` +) REFERENCES `acc_gl_account` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.acc_gl_financial_activity_account: ~0 rows (approximately) /*!40000 ALTER TABLE `acc_gl_financial_activity_account` DISABLE KEYS */; @@ -129,56 +311,188 @@ CREATE TABLE IF NOT EXISTS `acc_gl_financial_activity_account` ( -- Dumping structure for table fineract_default.acc_gl_journal_entry DROP TABLE IF EXISTS `acc_gl_journal_entry`; -CREATE TABLE IF NOT EXISTS `acc_gl_journal_entry` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_id` BIGINT NOT NULL, - `office_id` BIGINT NOT NULL, - `reversal_id` BIGINT DEFAULT NULL, - `currency_code` varchar(3) NOT NULL, - `transaction_id` varchar(50) NOT NULL, - `loan_transaction_id` BIGINT DEFAULT NULL, - `savings_transaction_id` BIGINT DEFAULT NULL, - `client_transaction_id` BIGINT DEFAULT NULL, - `reversed` tinyint NOT NULL DEFAULT '0', - `ref_num` varchar(100) DEFAULT NULL, - `manual_entry` tinyint NOT NULL DEFAULT '0', - `entry_date` date NOT NULL, - `type_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `entity_type_enum` SMALLINT DEFAULT NULL, - `entity_id` BIGINT DEFAULT NULL, - `createdby_id` BIGINT NOT NULL, - `lastmodifiedby_id` BIGINT NOT NULL, - `created_date` datetime NOT NULL, - `lastmodified_date` datetime NOT NULL, - `is_running_balance_calculated` TINYINT NOT NULL DEFAULT '0', - `office_running_balance` decimal(19,6) NOT NULL DEFAULT '0.000000', - `organization_running_balance` decimal(19,6) NOT NULL DEFAULT '0.000000', - `payment_details_id` BIGINT DEFAULT NULL, - `share_transaction_id` BIGINT DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_acc_gl_journal_entry_m_office` (`office_id`), - KEY `FK_acc_gl_journal_entry_m_appuser` (`createdby_id`), - KEY `FK_acc_gl_journal_entry_m_appuser_2` (`lastmodifiedby_id`), - KEY `FK_acc_gl_journal_entry_acc_gl_journal_entry` (`reversal_id`), - KEY `FK_acc_gl_journal_entry_acc_gl_account` (`account_id`), - KEY `FK_acc_gl_journal_entry_m_loan_transaction` (`loan_transaction_id`), - KEY `FK_acc_gl_journal_entry_m_savings_account_transaction` (`savings_transaction_id`), - KEY `FK_acc_gl_journal_entry_m_payment_detail` (`payment_details_id`), - KEY `FK_acc_gl_journal_entry_m_client_transaction` (`client_transaction_id`), - KEY `FK_acc_gl_journal_entry_m_share_account_transaction` (`share_transaction_id`), - CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_account` FOREIGN KEY (`account_id`) REFERENCES `acc_gl_account` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_journal_entry` FOREIGN KEY (`reversal_id`) REFERENCES `acc_gl_journal_entry` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_client_transaction` FOREIGN KEY (`client_transaction_id`) REFERENCES `m_client_transaction` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_loan_transaction` FOREIGN KEY (`loan_transaction_id`) REFERENCES `m_loan_transaction` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_payment_detail` FOREIGN KEY (`payment_details_id`) REFERENCES `m_payment_detail` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_savings_account_transaction` FOREIGN KEY (`savings_transaction_id`) REFERENCES `m_savings_account_transaction` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_share_account_transaction` FOREIGN KEY (`share_transaction_id`) REFERENCES `m_share_account_transactions` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `acc_gl_journal_entry` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `account_id` + BIGINT + NOT + NULL, + `office_id` + BIGINT + NOT + NULL, + `reversal_id` + BIGINT + DEFAULT + NULL, + `currency_code` + varchar +( + 3 +) NOT NULL, + `transaction_id` varchar +( + 50 +) NOT NULL, + `loan_transaction_id` BIGINT DEFAULT NULL, + `savings_transaction_id` BIGINT DEFAULT NULL, + `client_transaction_id` BIGINT DEFAULT NULL, + `reversed` tinyint NOT NULL DEFAULT '0', + `ref_num` varchar +( + 100 +) DEFAULT NULL, + `manual_entry` tinyint NOT NULL DEFAULT '0', + `entry_date` date NOT NULL, + `type_enum` SMALLINT NOT NULL, + `amount` decimal +( + 19, + 6 +) NOT NULL, + `description` varchar +( + 500 +) DEFAULT NULL, + `entity_type_enum` SMALLINT DEFAULT NULL, + `entity_id` BIGINT DEFAULT NULL, + `createdby_id` BIGINT NOT NULL, + `lastmodifiedby_id` BIGINT NOT NULL, + `created_date` datetime NOT NULL, + `lastmodified_date` datetime NOT NULL, + `is_running_balance_calculated` TINYINT NOT NULL DEFAULT '0', + `office_running_balance` decimal +( + 19, + 6 +) NOT NULL DEFAULT '0.000000', + `organization_running_balance` decimal +( + 19, + 6 +) NOT NULL DEFAULT '0.000000', + `payment_details_id` BIGINT DEFAULT NULL, + `share_transaction_id` BIGINT DEFAULT NULL, + PRIMARY KEY +( + `id` +), + KEY `FK_acc_gl_journal_entry_m_office` +( + `office_id` +), + KEY `FK_acc_gl_journal_entry_m_appuser` +( + `createdby_id` +), + KEY `FK_acc_gl_journal_entry_m_appuser_2` +( + `lastmodifiedby_id` +), + KEY `FK_acc_gl_journal_entry_acc_gl_journal_entry` +( + `reversal_id` +), + KEY `FK_acc_gl_journal_entry_acc_gl_account` +( + `account_id` +), + KEY `FK_acc_gl_journal_entry_m_loan_transaction` +( + `loan_transaction_id` +), + KEY `FK_acc_gl_journal_entry_m_savings_account_transaction` +( + `savings_transaction_id` +), + KEY `FK_acc_gl_journal_entry_m_payment_detail` +( + `payment_details_id` +), + KEY `FK_acc_gl_journal_entry_m_client_transaction` +( + `client_transaction_id` +), + KEY `FK_acc_gl_journal_entry_m_share_account_transaction` +( + `share_transaction_id` +), + CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_account` FOREIGN KEY +( + `account_id` +) REFERENCES `acc_gl_account` +( + `id` +), + CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_journal_entry` FOREIGN KEY +( + `reversal_id` +) REFERENCES `acc_gl_journal_entry` +( + `id` +), + CONSTRAINT `FK_acc_gl_journal_entry_m_appuser` FOREIGN KEY +( + `createdby_id` +) REFERENCES `m_appuser` +( + `id` +), + CONSTRAINT `FK_acc_gl_journal_entry_m_appuser_2` FOREIGN KEY +( + `lastmodifiedby_id` +) REFERENCES `m_appuser` +( + `id` +), + CONSTRAINT `FK_acc_gl_journal_entry_m_client_transaction` FOREIGN KEY +( + `client_transaction_id` +) REFERENCES `m_client_transaction` +( + `id` +), + CONSTRAINT `FK_acc_gl_journal_entry_m_loan_transaction` FOREIGN KEY +( + `loan_transaction_id` +) REFERENCES `m_loan_transaction` +( + `id` +), + CONSTRAINT `FK_acc_gl_journal_entry_m_office` FOREIGN KEY +( + `office_id` +) REFERENCES `m_office` +( + `id` +), + CONSTRAINT `FK_acc_gl_journal_entry_m_payment_detail` FOREIGN KEY +( + `payment_details_id` +) REFERENCES `m_payment_detail` +( + `id` +), + CONSTRAINT `FK_acc_gl_journal_entry_m_savings_account_transaction` FOREIGN KEY +( + `savings_transaction_id` +) REFERENCES `m_savings_account_transaction` +( + `id` +), + CONSTRAINT `FK_acc_gl_journal_entry_m_share_account_transaction` FOREIGN KEY +( + `share_transaction_id` +) REFERENCES `m_share_account_transactions` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.acc_gl_journal_entry: ~0 rows (approximately) /*!40000 ALTER TABLE `acc_gl_journal_entry` DISABLE KEYS */; @@ -187,20 +501,65 @@ CREATE TABLE IF NOT EXISTS `acc_gl_journal_entry` ( -- Dumping structure for table fineract_default.acc_product_mapping DROP TABLE IF EXISTS `acc_product_mapping`; -CREATE TABLE IF NOT EXISTS `acc_product_mapping` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `gl_account_id` BIGINT DEFAULT NULL, - `product_id` BIGINT DEFAULT NULL, - `product_type` SMALLINT DEFAULT NULL, - `payment_type` INT DEFAULT NULL, - `charge_id` BIGINT DEFAULT NULL, - `financial_account_type` SMALLINT DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_acc_product_mapping_m_charge` (`charge_id`), - KEY `FK_acc_product_mapping_m_payment_type` (`payment_type`), - CONSTRAINT `FK_acc_product_mapping_m_charge` FOREIGN KEY (`charge_id`) REFERENCES `m_charge` (`id`), - CONSTRAINT `FK_acc_product_mapping_m_payment_type` FOREIGN KEY (`payment_type`) REFERENCES `m_payment_type` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `acc_product_mapping` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `gl_account_id` + BIGINT + DEFAULT + NULL, + `product_id` + BIGINT + DEFAULT + NULL, + `product_type` + SMALLINT + DEFAULT + NULL, + `payment_type` + INT + DEFAULT + NULL, + `charge_id` + BIGINT + DEFAULT + NULL, + `financial_account_type` + SMALLINT + DEFAULT + NULL, + PRIMARY + KEY +( + `id` +), + KEY `FK_acc_product_mapping_m_charge` +( + `charge_id` +), + KEY `FK_acc_product_mapping_m_payment_type` +( + `payment_type` +), + CONSTRAINT `FK_acc_product_mapping_m_charge` FOREIGN KEY +( + `charge_id` +) REFERENCES `m_charge` +( + `id` +), + CONSTRAINT `FK_acc_product_mapping_m_payment_type` FOREIGN KEY +( + `payment_type` +) REFERENCES `m_payment_type` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.acc_product_mapping: ~0 rows (approximately) /*!40000 ALTER TABLE `acc_product_mapping` DISABLE KEYS */; @@ -209,18 +568,59 @@ CREATE TABLE IF NOT EXISTS `acc_product_mapping` ( -- Dumping structure for table fineract_default.acc_rule_tags DROP TABLE IF EXISTS `acc_rule_tags`; -CREATE TABLE IF NOT EXISTS `acc_rule_tags` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `acc_rule_id` BIGINT NOT NULL, - `tag_id` INT NOT NULL, - `acc_type_enum` SMALLINT NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `UNIQUE_ACCOUNT_RULE_TAGS` (`acc_rule_id`,`tag_id`,`acc_type_enum`), - KEY `FK_acc_accounting_rule_id` (`acc_rule_id`), - KEY `FK_m_code_value_id` (`tag_id`), - CONSTRAINT `FK_acc_accounting_rule_id` FOREIGN KEY (`acc_rule_id`) REFERENCES `acc_accounting_rule` (`id`), - CONSTRAINT `FK_m_code_value_id` FOREIGN KEY (`tag_id`) REFERENCES `m_code_value` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `acc_rule_tags` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `acc_rule_id` + BIGINT + NOT + NULL, + `tag_id` + INT + NOT + NULL, + `acc_type_enum` + SMALLINT + NOT + NULL, + PRIMARY + KEY +( + `id` +), + UNIQUE KEY `UNIQUE_ACCOUNT_RULE_TAGS` +( + `acc_rule_id`, + `tag_id`, + `acc_type_enum` +), + KEY `FK_acc_accounting_rule_id` +( + `acc_rule_id` +), + KEY `FK_m_code_value_id` +( + `tag_id` +), + CONSTRAINT `FK_acc_accounting_rule_id` FOREIGN KEY +( + `acc_rule_id` +) REFERENCES `acc_accounting_rule` +( + `id` +), + CONSTRAINT `FK_m_code_value_id` FOREIGN KEY +( + `tag_id` +) REFERENCES `m_code_value` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.acc_rule_tags: ~0 rows (approximately) /*!40000 ALTER TABLE `acc_rule_tags` DISABLE KEYS */; @@ -229,13 +629,31 @@ CREATE TABLE IF NOT EXISTS `acc_rule_tags` ( -- Dumping structure for table fineract_default.c_account_number_format DROP TABLE IF EXISTS `c_account_number_format`; -CREATE TABLE IF NOT EXISTS `c_account_number_format` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_type_enum` SMALLINT NOT NULL, - `prefix_type_enum` SMALLINT DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `account_type_enum` (`account_type_enum`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `c_account_number_format` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `account_type_enum` + SMALLINT + NOT + NULL, + `prefix_type_enum` + SMALLINT + DEFAULT + NULL, + PRIMARY + KEY +( + `id` +), + UNIQUE KEY `account_type_enum` +( + `account_type_enum` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.c_account_number_format: ~0 rows (approximately) /*!40000 ALTER TABLE `c_account_number_format` DISABLE KEYS */; @@ -244,182 +662,357 @@ CREATE TABLE IF NOT EXISTS `c_account_number_format` ( -- Dumping structure for table fineract_default.c_cache DROP TABLE IF EXISTS `c_cache`; -CREATE TABLE IF NOT EXISTS `c_cache` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `cache_type_enum` tinyint NOT NULL DEFAULT '1', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `c_cache` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `cache_type_enum` + tinyint + NOT + NULL + DEFAULT + '1', + PRIMARY + KEY +( + `id` +) + ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.c_cache: ~0 rows (approximately) /*!40000 ALTER TABLE `c_cache` DISABLE KEYS */; -INSERT INTO `c_cache` (`id`, `cache_type_enum`) VALUES - (1, 1); +INSERT INTO `c_cache` (`id`, `cache_type_enum`) +VALUES (1, 1); /*!40000 ALTER TABLE `c_cache` ENABLE KEYS */; -- Dumping structure for table fineract_default.c_configuration DROP TABLE IF EXISTS `c_configuration`; -CREATE TABLE IF NOT EXISTS `c_configuration` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL, - `value` INT DEFAULT NULL, - `date_value` date DEFAULT NULL, - `enabled` tinyint NOT NULL DEFAULT '0', - `is_trap_door` tinyint NOT NULL DEFAULT '0', - `description` varchar(300) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `name_UNIQUE` (`name`) -) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `c_configuration` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `name` + varchar +( + 100 +) DEFAULT NULL, + `value` INT DEFAULT NULL, + `date_value` date DEFAULT NULL, + `enabled` tinyint NOT NULL DEFAULT '0', + `is_trap_door` tinyint NOT NULL DEFAULT '0', + `description` varchar +( + 300 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `name_UNIQUE` +( + `name` +) + ) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.c_configuration: ~27 rows (approximately) /*!40000 ALTER TABLE `c_configuration` DISABLE KEYS */; -INSERT INTO `c_configuration` (`id`, `name`, `value`, `date_value`, `enabled`, `is_trap_door`, `description`) VALUES - (1, 'maker-checker', NULL, NULL, 0, 0, NULL), - (4, 'amazon-S3', NULL, NULL, 0, 0, NULL), - (5, 'reschedule-future-repayments', NULL, NULL, 1, 0, NULL), - (6, 'reschedule-repayments-on-holidays', NULL, NULL, 0, 0, NULL), - (7, 'allow-transactions-on-holiday', NULL, NULL, 0, 0, NULL), - (8, 'allow-transactions-on-non_workingday', NULL, NULL, 0, 0, NULL), - (9, 'constraint_approach_for_datatables', NULL, NULL, 0, 0, NULL), - (10, 'penalty-wait-period', 2, NULL, 1, 0, NULL), - (11, 'force-password-reset-days', 0, NULL, 0, 0, NULL), - (12, 'grace-on-penalty-posting', 0, NULL, 1, 0, NULL), - (15, 'savings-interest-posting-current-period-end', NULL, NULL, 0, 0, 'Recommended to be changed only once during start of production. When set as false(default), interest will be posted on the first date of next period. If set as true, interest will be posted on last date of current period. There is no difference in the interest amount posted.'), - (16, 'financial-year-beginning-month', 1, NULL, 1, 0, 'Recommended to be changed only once during start of production. Allowed values 1 - 12 (January - December). Interest posting periods are evaluated based on this configuration.'), - (17, 'min-clients-in-group', 5, NULL, 0, 0, 'Minimum number of Clients that a Group should have'), - (18, 'max-clients-in-group', 5, NULL, 0, 0, 'Maximum number of Clients that a Group can have'), - (19, 'meetings-mandatory-for-jlg-loans', NULL, NULL, 0, 0, 'Enforces all JLG loans to follow a meeting schedule belonging to parent group or Center'), - (20, 'office-specific-products-enabled', 0, NULL, 0, 0, 'Whether products and fees should be office specific or not? This property should NOT be changed once Mifos is Live.'), - (21, 'restrict-products-to-user-office', 0, NULL, 0, 0, 'This should be enabled only if, products & fees are office specific (i.e. office-specific-products-enabled is enabled). This property specifies if the products should be auto-restricted to office of the user who created the proudct? Note: This property should NOT be changed once Mifos is Live.'), - (22, 'office-opening-balances-contra-account', 0, NULL, 1, 0, NULL), - (23, 'rounding-mode', 6, NULL, 1, 1, '0 - UP, 1 - DOWN, 2- CEILING, 3- FLOOR, 4- HALF_UP, 5- HALF_DOWN, 6 - HALF_EVEN'), - (24, 'backdate-penalties-enabled', 0, NULL, 1, 0, 'If this parameter is disabled penalties will only be added to instalments due moving forward, any old overdue instalments will not be affected.'), - (26, 'organisation-start-date', 0, NULL, 0, 0, NULL), - (27, 'paymenttype-applicable-for-disbursement-charges', NULL, NULL, 0, 0, 'Is the Disbursement Entry need to be considering the fund source of the paymnet type'), - (28, 'interest-charged-from-date-same-as-disbursal-date', 0, NULL, 0, 0, NULL), - (29, 'skip-repayment-on-first-day-of-month', 14, NULL, 0, 0, 'skipping repayment on first day of month'), - (30, 'change-emi-if-repaymentdate-same-as-disbursementdate', 0, NULL, 1, 0, 'In tranche loans, if repayment date is same as tranche disbursement date then allow to change the emi amount'), - (31, 'daily-tpt-limit', 0, NULL, 0, 0, 'Daily limit for third party transfers'), - (32, 'Enable-Address', NULL, NULL, 0, 0, NULL); +INSERT INTO `c_configuration` (`id`, `name`, `value`, `date_value`, `enabled`, `is_trap_door`, `description`) +VALUES (1, 'maker-checker', NULL, NULL, 0, 0, NULL), + (4, 'amazon-S3', NULL, NULL, 0, 0, NULL), + (5, 'reschedule-future-repayments', NULL, NULL, 1, 0, NULL), + (6, 'reschedule-repayments-on-holidays', NULL, NULL, 0, 0, NULL), + (7, 'allow-transactions-on-holiday', NULL, NULL, 0, 0, NULL), + (8, 'allow-transactions-on-non_workingday', NULL, NULL, 0, 0, NULL), + (9, 'constraint_approach_for_datatables', NULL, NULL, 0, 0, NULL), + (10, 'penalty-wait-period', 2, NULL, 1, 0, NULL), + (11, 'force-password-reset-days', 0, NULL, 0, 0, NULL), + (12, 'grace-on-penalty-posting', 0, NULL, 1, 0, NULL), + (15, 'savings-interest-posting-current-period-end', NULL, NULL, 0, 0, + 'Recommended to be changed only once during start of production. When set as false(default), interest will be posted on the first date of next period. If set as true, interest will be posted on last date of current period. There is no difference in the interest amount posted.'), + (16, 'financial-year-beginning-month', 1, NULL, 1, 0, + 'Recommended to be changed only once during start of production. Allowed values 1 - 12 (January - December). Interest posting periods are evaluated based on this configuration.'), + (17, 'min-clients-in-group', 5, NULL, 0, 0, 'Minimum number of Clients that a Group should have'), + (18, 'max-clients-in-group', 5, NULL, 0, 0, 'Maximum number of Clients that a Group can have'), + (19, 'meetings-mandatory-for-jlg-loans', NULL, NULL, 0, 0, + 'Enforces all JLG loans to follow a meeting schedule belonging to parent group or Center'), + (20, 'office-specific-products-enabled', 0, NULL, 0, 0, + 'Whether products and fees should be office specific or not? This property should NOT be changed once Mifos is Live.'), + (21, 'restrict-products-to-user-office', 0, NULL, 0, 0, + 'This should be enabled only if, products & fees are office specific (i.e. office-specific-products-enabled is enabled). This property specifies if the products should be auto-restricted to office of the user who created the proudct? Note: This property should NOT be changed once Mifos is Live.'), + (22, 'office-opening-balances-contra-account', 0, NULL, 1, 0, NULL), + (23, 'rounding-mode', 6, NULL, 1, 1, + '0 - UP, 1 - DOWN, 2- CEILING, 3- FLOOR, 4- HALF_UP, 5- HALF_DOWN, 6 - HALF_EVEN'), + (24, 'backdate-penalties-enabled', 0, NULL, 1, 0, + 'If this parameter is disabled penalties will only be added to instalments due moving forward, any old overdue instalments will not be affected.'), + (26, 'organisation-start-date', 0, NULL, 0, 0, NULL), + (27, 'paymenttype-applicable-for-disbursement-charges', NULL, NULL, 0, 0, + 'Is the Disbursement Entry need to be considering the fund source of the paymnet type'), + (28, 'interest-charged-from-date-same-as-disbursal-date', 0, NULL, 0, 0, NULL), + (29, 'skip-repayment-on-first-day-of-month', 14, NULL, 0, 0, 'skipping repayment on first day of month'), + (30, 'change-emi-if-repaymentdate-same-as-disbursementdate', 0, NULL, 1, 0, + 'In tranche loans, if repayment date is same as tranche disbursement date then allow to change the emi amount'), + (31, 'daily-tpt-limit', 0, NULL, 0, 0, 'Daily limit for third party transfers'), + (32, 'Enable-Address', NULL, NULL, 0, 0, NULL); /*!40000 ALTER TABLE `c_configuration` ENABLE KEYS */; -- Dumping structure for table fineract_default.c_external_service DROP TABLE IF EXISTS `c_external_service`; -CREATE TABLE IF NOT EXISTS `c_external_service` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `name_UNIQUE` (`name`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `c_external_service` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `name` + varchar +( + 100 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `name_UNIQUE` +( + `name` +) + ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.c_external_service: ~3 rows (approximately) /*!40000 ALTER TABLE `c_external_service` DISABLE KEYS */; -INSERT INTO `c_external_service` (`id`, `name`) VALUES - (3, 'MESSAGE_GATEWAY'), - (1, 'S3'), - (2, 'SMTP_Email_Account'); +INSERT INTO `c_external_service` (`id`, `name`) +VALUES (3, 'MESSAGE_GATEWAY'), + (1, 'S3'), + (2, 'SMTP_Email_Account'); /*!40000 ALTER TABLE `c_external_service` ENABLE KEYS */; -- Dumping structure for table fineract_default.c_external_service_properties DROP TABLE IF EXISTS `c_external_service_properties`; -CREATE TABLE IF NOT EXISTS `c_external_service_properties` ( - `name` varchar(150) NOT NULL, - `value` varchar(250) DEFAULT NULL, - `external_service_id` BIGINT NOT NULL, - KEY `FK_c_external_service_properties_c_external_service` (`external_service_id`), - CONSTRAINT `FK_c_external_service_properties_c_external_service` FOREIGN KEY (`external_service_id`) REFERENCES `c_external_service` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `c_external_service_properties` +( + `name` + varchar +( + 150 +) NOT NULL, + `value` varchar +( + 250 +) DEFAULT NULL, + `external_service_id` BIGINT NOT NULL, + KEY `FK_c_external_service_properties_c_external_service` +( + `external_service_id` +), + CONSTRAINT `FK_c_external_service_properties_c_external_service` FOREIGN KEY +( + `external_service_id` +) REFERENCES `c_external_service` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.c_external_service_properties: ~12 rows (approximately) /*!40000 ALTER TABLE `c_external_service_properties` DISABLE KEYS */; -INSERT INTO `c_external_service_properties` (`name`, `value`, `external_service_id`) VALUES - ('s3_access_key', NULL, 1), - ('s3_bucket_name', NULL, 1), - ('s3_secret_key', NULL, 1), - ('username', 'support@cloudmicrofinance.com', 2), - ('password', 'support81', 2), - ('host', 'smtp.gmail.com', 2), - ('port', '25', 2), - ('useTLS', 'true', 2), - ('host_name', 'localhost', 3), - ('port_number', '9191', 3), - ('end_point', '/', 3), - ('tenant_app_key', NULL, 3); +INSERT INTO `c_external_service_properties` (`name`, `value`, `external_service_id`) +VALUES ('s3_access_key', NULL, 1), + ('s3_bucket_name', NULL, 1), + ('s3_secret_key', NULL, 1), + ('username', 'support@cloudmicrofinance.com', 2), + ('password', 'support81', 2), + ('host', 'smtp.gmail.com', 2), + ('port', '25', 2), + ('useTLS', 'true', 2), + ('host_name', 'localhost', 3), + ('port_number', '9191', 3), + ('end_point', '/', 3), + ('tenant_app_key', NULL, 3); /*!40000 ALTER TABLE `c_external_service_properties` ENABLE KEYS */; -- Dumping structure for table fineract_default.job DROP TABLE IF EXISTS `job`; -CREATE TABLE IF NOT EXISTS `job` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) NOT NULL, - `display_name` varchar(100) NOT NULL, - `cron_expression` varchar(20) CHARACTER SET latin1 NOT NULL, - `create_time` datetime NOT NULL, - `task_priority` SMALLINT NOT NULL DEFAULT '5', - `group_name` varchar(50) CHARACTER SET latin1 DEFAULT NULL, - `previous_run_start_time` datetime DEFAULT NULL, - `next_run_time` datetime DEFAULT NULL, - `job_key` varchar(500) DEFAULT NULL, - `initializing_errorlog` text, - `is_active` tinyint NOT NULL DEFAULT '1', - `currently_running` tinyint NOT NULL DEFAULT '0', - `updates_allowed` tinyint NOT NULL DEFAULT '1', - `scheduler_group` SMALLINT NOT NULL DEFAULT '0', - `is_misfired` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `job` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `name` + varchar +( + 100 +) NOT NULL, + `display_name` varchar +( + 100 +) NOT NULL, + `cron_expression` varchar +( + 20 +) CHARACTER SET latin1 NOT NULL, + `create_time` datetime NOT NULL, + `task_priority` SMALLINT NOT NULL DEFAULT '5', + `group_name` varchar +( + 50 +) CHARACTER SET latin1 DEFAULT NULL, + `previous_run_start_time` datetime DEFAULT NULL, + `next_run_time` datetime DEFAULT NULL, + `job_key` varchar +( + 500 +) DEFAULT NULL, + `initializing_errorlog` text, + `is_active` tinyint NOT NULL DEFAULT '1', + `currently_running` tinyint NOT NULL DEFAULT '0', + `updates_allowed` tinyint NOT NULL DEFAULT '1', + `scheduler_group` SMALLINT NOT NULL DEFAULT '0', + `is_misfired` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY +( + `id` +) + ) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.job: ~26 rows (approximately) /*!40000 ALTER TABLE `job` DISABLE KEYS */; -INSERT INTO `job` (`id`, `name`, `display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, `previous_run_start_time`, `next_run_time`, `job_key`, `initializing_errorlog`, `is_active`, `currently_running`, `updates_allowed`, `scheduler_group`, `is_misfired`) VALUES - (1, 'Update loan Summary', 'Update loan Summary', '0 0 22 1/1 * ? *', '2015-06-03 02:56:57', 5, NULL, NULL, '2017-02-24 22:00:00', 'Update loan SummaryJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (2, 'Update Loan Arrears Ageing', 'Update Loan Arrears Ageing', '0 1 0 1/1 * ? *', '2015-06-03 02:56:57', 5, NULL, NULL, '2017-02-25 00:01:00', 'Update Loan Arrears AgeingJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (3, 'Update Loan Paid In Advance', 'Update Loan Paid In Advance', '0 5 0 1/1 * ? *', '2015-06-03 02:56:57', 5, NULL, NULL, '2017-02-25 00:05:00', 'Update Loan Paid In AdvanceJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (4, 'Apply Annual Fee For Savings', 'Apply Annual Fee For Savings', '0 20 22 1/1 * ? *', '2015-06-03 02:56:57', 5, NULL, NULL, '2017-02-24 22:20:00', 'Apply Annual Fee For SavingsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (5, 'Apply Holidays To Loans', 'Apply Holidays To Loans', '0 0 12 * * ?', '2015-06-03 02:56:57', 5, NULL, NULL, '2017-02-25 12:00:00', 'Apply Holidays To LoansJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (6, 'Post Interest For Savings', 'Post Interest For Savings', '0 0 0 1/1 * ? *', '2015-06-03 02:56:58', 5, NULL, NULL, '2017-02-25 00:00:00', 'Post Interest For SavingsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 1, 0), - (7, 'Transfer Fee For Loans From Savings', 'Transfer Fee For Loans From Savings', '0 1 0 1/1 * ? *', '2015-06-03 02:57:00', 5, NULL, NULL, '2017-02-25 00:01:00', 'Transfer Fee For Loans From SavingsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (8, 'Pay Due Savings Charges', 'Pay Due Savings Charges', '0 0 12 * * ?', '2013-09-23 00:00:00', 5, NULL, NULL, '2017-02-25 12:00:00', 'Pay Due Savings ChargesJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (9, 'Update Accounting Running Balances', 'Update Accounting Running Balances', '0 1 0 1/1 * ? *', '2015-06-03 02:57:00', 5, NULL, NULL, '2017-02-25 00:01:00', 'Update Accounting Running BalancesJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (10, 'Execute Standing Instruction', 'Execute Standing Instruction', '0 0 0 1/1 * ? *', '2015-06-03 02:57:04', 5, NULL, NULL, '2017-02-25 00:00:00', 'Execute Standing InstructionJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (11, 'Add Accrual Transactions', 'Add Accrual Transactions', '0 1 0 1/1 * ? *', '2015-06-03 02:57:04', 3, NULL, NULL, '2017-02-25 00:01:00', 'Add Accrual TransactionsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 3, 0), - (12, 'Apply penalty to overdue loans', 'Apply penalty to overdue loans', '0 0 0 1/1 * ? *', '2015-06-03 02:57:04', 5, NULL, NULL, '2017-02-25 00:00:00', 'Apply penalty to overdue loansJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (13, 'Update Non Performing Assets', 'Update Non Performing Assets', '0 0 0 1/1 * ? *', '2015-06-03 02:57:04', 6, NULL, NULL, '2017-02-25 00:00:00', 'Update Non Performing AssetsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 3, 0), - (14, 'Transfer Interest To Savings', 'Transfer Interest To Savings', '0 2 0 1/1 * ? *', '2015-06-03 02:57:05', 4, NULL, NULL, '2017-02-25 00:02:00', 'Transfer Interest To SavingsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 1, 0), - (15, 'Update Deposit Accounts Maturity details', 'Update Deposit Accounts Maturity details', '0 0 0 1/1 * ? *', '2015-06-03 02:57:05', 5, NULL, NULL, '2017-02-25 00:00:00', 'Update Deposit Accounts Maturity detailsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (16, 'Add Periodic Accrual Transactions', 'Add Periodic Accrual Transactions', '0 2 0 1/1 * ? *', '2015-06-03 02:57:06', 2, NULL, NULL, '2017-02-25 00:02:00', 'Add Periodic Accrual TransactionsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 3, 0), - (17, 'Recalculate Interest For Loans', 'Recalculate Interest For Loans', '0 1 0 1/1 * ? *', '2015-06-03 02:57:07', 4, NULL, NULL, '2017-02-25 00:01:00', 'Recalculate Interest For LoansJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 3, 0), - (18, 'Generate Mandatory Savings Schedule', 'Generate Mandatory Savings Schedule', '0 5 0 1/1 * ? *', '2015-06-03 02:57:12', 5, NULL, NULL, '2017-02-25 00:05:00', 'Generate Mandatory Savings ScheduleJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (19, 'Generate Loan Loss Provisioning', 'Generate Loan Loss Provisioning', '0 0 0 1/1 * ? *', '2015-10-20 19:57:53', 5, NULL, NULL, '2017-02-25 00:00:00', 'Generate Loan Loss ProvisioningJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (20, 'Post Dividends For Shares', 'Post Dividends For Shares', '0 0 0 1/1 * ? *', '2017-02-24 14:15:48', 5, NULL, NULL, '2017-02-25 00:00:00', 'Post Dividends For SharesJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (21, 'Update Savings Dormant Accounts', 'Update Savings Dormant Accounts', '0 0 0 1/1 * ? *', '2017-02-24 14:15:54', 3, NULL, NULL, '2017-02-25 00:00:00', 'Update Savings Dormant AccountsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 1, 0), - (22, 'Add Accrual Transactions For Loans With Income Posted As Transactions', 'Add Accrual Transactions For Loans With Income Posted As Transactions', '0 1 0 1/1 * ? *', '2017-02-24 14:15:59', 5, NULL, NULL, '2017-02-25 00:01:00', 'Add Accrual Transactions For Loans With Income Posted As TransactionsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 3, 0), - (23, 'Execute Report Mailing Jobs', 'Execute Report Mailing Jobs', '0 0/15 * * * ?', '2017-02-24 14:16:11', 5, NULL, NULL, '2017-02-24 14:30:00', 'Execute Report Mailing JobsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (24, 'Update SMS Outbound with Campaign Message', 'Update SMS Outbound with Campaign Message', '0 0 5 1/1 * ? *', '2017-02-24 14:16:18', 3, NULL, NULL, '2017-02-25 05:00:00', 'Update SMS Outbound with Campaign MessageJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 4, 0), - (25, 'Send Messages to SMS Gateway', 'Send Messages to SMS Gateway', '0 0 5 1/1 * ? *', '2017-02-24 14:16:18', 2, NULL, NULL, '2017-02-25 05:00:00', 'Send Messages to SMS GatewayJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 4, 0), - (26, 'Get Delivery Reports from SMS Gateway', 'Get Delivery Reports from SMS Gateway', '0 0 5 1/1 * ? *', '2017-02-24 14:16:18', 1, NULL, NULL, '2017-02-25 05:00:00', 'Get Delivery Reports from SMS GatewayJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 4, 0); +INSERT INTO `job` (`id`, `name`, `display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, + `previous_run_start_time`, `next_run_time`, `job_key`, `initializing_errorlog`, `is_active`, + `currently_running`, `updates_allowed`, `scheduler_group`, `is_misfired`) +VALUES (1, 'Update loan Summary', 'Update loan Summary', '0 0 22 1/1 * ? *', '2015-06-03 02:56:57', 5, NULL, NULL, + '2017-02-24 22:00:00', 'Update loan SummaryJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (2, 'Update Loan Arrears Ageing', 'Update Loan Arrears Ageing', '0 1 0 1/1 * ? *', '2015-06-03 02:56:57', 5, + NULL, NULL, '2017-02-25 00:01:00', 'Update Loan Arrears AgeingJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (3, 'Update Loan Paid In Advance', 'Update Loan Paid In Advance', '0 5 0 1/1 * ? *', '2015-06-03 02:56:57', 5, + NULL, NULL, '2017-02-25 00:05:00', 'Update Loan Paid In AdvanceJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (4, 'Apply Annual Fee For Savings', 'Apply Annual Fee For Savings', '0 20 22 1/1 * ? *', '2015-06-03 02:56:57', + 5, NULL, NULL, '2017-02-24 22:20:00', 'Apply Annual Fee For SavingsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (5, 'Apply Holidays To Loans', 'Apply Holidays To Loans', '0 0 12 * * ?', '2015-06-03 02:56:57', 5, NULL, NULL, + '2017-02-25 12:00:00', 'Apply Holidays To LoansJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (6, 'Post Interest For Savings', 'Post Interest For Savings', '0 0 0 1/1 * ? *', '2015-06-03 02:56:58', 5, NULL, + NULL, '2017-02-25 00:00:00', 'Post Interest For SavingsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 1, 0), + (7, 'Transfer Fee For Loans From Savings', 'Transfer Fee For Loans From Savings', '0 1 0 1/1 * ? *', + '2015-06-03 02:57:00', 5, NULL, NULL, '2017-02-25 00:01:00', + 'Transfer Fee For Loans From SavingsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (8, 'Pay Due Savings Charges', 'Pay Due Savings Charges', '0 0 12 * * ?', '2013-09-23 00:00:00', 5, NULL, NULL, + '2017-02-25 12:00:00', 'Pay Due Savings ChargesJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (9, 'Update Accounting Running Balances', 'Update Accounting Running Balances', '0 1 0 1/1 * ? *', + '2015-06-03 02:57:00', 5, NULL, NULL, '2017-02-25 00:01:00', + 'Update Accounting Running BalancesJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (10, 'Execute Standing Instruction', 'Execute Standing Instruction', '0 0 0 1/1 * ? *', '2015-06-03 02:57:04', 5, + NULL, NULL, '2017-02-25 00:00:00', 'Execute Standing InstructionJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (11, 'Add Accrual Transactions', 'Add Accrual Transactions', '0 1 0 1/1 * ? *', '2015-06-03 02:57:04', 3, NULL, + NULL, '2017-02-25 00:01:00', 'Add Accrual TransactionsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 3, 0), + (12, 'Apply penalty to overdue loans', 'Apply penalty to overdue loans', '0 0 0 1/1 * ? *', + '2015-06-03 02:57:04', 5, NULL, NULL, '2017-02-25 00:00:00', + 'Apply penalty to overdue loansJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (13, 'Update Non Performing Assets', 'Update Non Performing Assets', '0 0 0 1/1 * ? *', '2015-06-03 02:57:04', 6, + NULL, NULL, '2017-02-25 00:00:00', 'Update Non Performing AssetsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 3, 0), + (14, 'Transfer Interest To Savings', 'Transfer Interest To Savings', '0 2 0 1/1 * ? *', '2015-06-03 02:57:05', 4, + NULL, NULL, '2017-02-25 00:02:00', 'Transfer Interest To SavingsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 1, 0), + (15, 'Update Deposit Accounts Maturity details', 'Update Deposit Accounts Maturity details', '0 0 0 1/1 * ? *', + '2015-06-03 02:57:05', 5, NULL, NULL, '2017-02-25 00:00:00', + 'Update Deposit Accounts Maturity detailsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (16, 'Add Periodic Accrual Transactions', 'Add Periodic Accrual Transactions', '0 2 0 1/1 * ? *', + '2015-06-03 02:57:06', 2, NULL, NULL, '2017-02-25 00:02:00', + 'Add Periodic Accrual TransactionsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 3, 0), + (17, 'Recalculate Interest For Loans', 'Recalculate Interest For Loans', '0 1 0 1/1 * ? *', + '2015-06-03 02:57:07', 4, NULL, NULL, '2017-02-25 00:01:00', + 'Recalculate Interest For LoansJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 3, 0), + (18, 'Generate Mandatory Savings Schedule', 'Generate Mandatory Savings Schedule', '0 5 0 1/1 * ? *', + '2015-06-03 02:57:12', 5, NULL, NULL, '2017-02-25 00:05:00', + 'Generate Mandatory Savings ScheduleJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (19, 'Generate Loan Loss Provisioning', 'Generate Loan Loss Provisioning', '0 0 0 1/1 * ? *', + '2015-10-20 19:57:53', 5, NULL, NULL, '2017-02-25 00:00:00', + 'Generate Loan Loss ProvisioningJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (20, 'Post Dividends For Shares', 'Post Dividends For Shares', '0 0 0 1/1 * ? *', '2017-02-24 14:15:48', 5, NULL, + NULL, '2017-02-25 00:00:00', 'Post Dividends For SharesJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (21, 'Update Savings Dormant Accounts', 'Update Savings Dormant Accounts', '0 0 0 1/1 * ? *', + '2017-02-24 14:15:54', 3, NULL, NULL, '2017-02-25 00:00:00', + 'Update Savings Dormant AccountsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 1, 0), + (22, 'Add Accrual Transactions For Loans With Income Posted As Transactions', + 'Add Accrual Transactions For Loans With Income Posted As Transactions', '0 1 0 1/1 * ? *', + '2017-02-24 14:15:59', 5, NULL, NULL, '2017-02-25 00:01:00', + 'Add Accrual Transactions For Loans With Income Posted As TransactionsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 3, + 0), + (23, 'Execute Report Mailing Jobs', 'Execute Report Mailing Jobs', '0 0/15 * * * ?', '2017-02-24 14:16:11', 5, + NULL, NULL, '2017-02-24 14:30:00', 'Execute Report Mailing JobsJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (24, 'Update SMS Outbound with Campaign Message', 'Update SMS Outbound with Campaign Message', '0 0 5 1/1 * ? *', + '2017-02-24 14:16:18', 3, NULL, NULL, '2017-02-25 05:00:00', + 'Update SMS Outbound with Campaign MessageJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 4, 0), + (25, 'Send Messages to SMS Gateway', 'Send Messages to SMS Gateway', '0 0 5 1/1 * ? *', '2017-02-24 14:16:18', 2, + NULL, NULL, '2017-02-25 05:00:00', 'Send Messages to SMS GatewayJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 4, 0), + (26, 'Get Delivery Reports from SMS Gateway', 'Get Delivery Reports from SMS Gateway', '0 0 5 1/1 * ? *', + '2017-02-24 14:16:18', 1, NULL, NULL, '2017-02-25 05:00:00', + 'Get Delivery Reports from SMS GatewayJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 4, 0); /*!40000 ALTER TABLE `job` ENABLE KEYS */; -- Dumping structure for table fineract_default.job_run_history DROP TABLE IF EXISTS `job_run_history`; -CREATE TABLE IF NOT EXISTS `job_run_history` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `job_id` BIGINT NOT NULL, - `version` BIGINT NOT NULL, - `start_time` datetime NOT NULL, - `end_time` datetime NOT NULL, - `status` varchar(10) CHARACTER SET latin1 NOT NULL, - `error_message` text, - `trigger_type` varchar(25) NOT NULL, - `error_log` text, - PRIMARY KEY (`id`), - KEY `scheduledjobsFK` (`job_id`), - CONSTRAINT `scheduledjobsFK` FOREIGN KEY (`job_id`) REFERENCES `job` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `job_run_history` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `job_id` + BIGINT + NOT + NULL, + `version` + BIGINT + NOT + NULL, + `start_time` + datetime + NOT + NULL, + `end_time` + datetime + NOT + NULL, + `status` + varchar +( + 10 +) CHARACTER SET latin1 NOT NULL, + `error_message` text, + `trigger_type` varchar +( + 25 +) NOT NULL, + `error_log` text, + PRIMARY KEY +( + `id` +), + KEY `scheduledjobsFK` +( + `job_id` +), + CONSTRAINT `scheduledjobsFK` FOREIGN KEY +( + `job_id` +) REFERENCES `job` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.job_run_history: ~0 rows (approximately) /*!40000 ALTER TABLE `job_run_history` DISABLE KEYS */; @@ -428,43 +1021,84 @@ CREATE TABLE IF NOT EXISTS `job_run_history` ( -- Dumping structure for table fineract_default.mix_taxonomy DROP TABLE IF EXISTS `mix_taxonomy`; -CREATE TABLE IF NOT EXISTS `mix_taxonomy` ( - `id` INT unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL, - `namespace_id` INT DEFAULT NULL, - `dimension` varchar(100) DEFAULT NULL, - `type` INT DEFAULT NULL, - `description` varchar(1000) DEFAULT NULL, - `need_mapping` tinyint DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `mix_taxonomy` +( + `id` + INT + unsigned + NOT + NULL + AUTO_INCREMENT, + `name` + varchar +( + 100 +) DEFAULT NULL, + `namespace_id` INT DEFAULT NULL, + `dimension` varchar +( + 100 +) DEFAULT NULL, + `type` INT DEFAULT NULL, + `description` varchar +( + 1000 +) DEFAULT NULL, + `need_mapping` tinyint DEFAULT NULL, + PRIMARY KEY +( + `id` +) + ) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.mix_taxonomy: ~48 rows (approximately) /*!40000 ALTER TABLE `mix_taxonomy` DISABLE KEYS */; -INSERT INTO `mix_taxonomy` (`id`, `name`, `namespace_id`, `dimension`, `type`, `description`, `need_mapping`) VALUES - (1, 'AdministrativeExpense', 1, NULL, 3, NULL, 1), - (2, 'Assets', 3, NULL, 1, 'All outstanding principals due for all outstanding client loans. This includes current, delinquent, and renegotiated loans, but not loans that have been written off. It does not include interest receivable.', 1), - (3, 'Assets', 3, 'MaturityDimension:LessThanOneYearMember', 1, 'Segmentation based on the life of an asset or liability.', 1), - (4, 'Assets', 3, 'MaturityDimension:MoreThanOneYearMember', 1, 'Segmentation based on the life of an asset or liability.', 1), - (5, 'CashAndCashEquivalents', 1, NULL, 1, NULL, 1), - (6, 'Deposits', 3, NULL, 1, 'The total value of funds placed in an account with an MFI that are payable to a depositor. This item includes any current, checking, or savings accounts that are payable on demand. It also includes time deposits which have a fixed maturity date and compulsory deposits.', 1), - (7, 'Deposits', 3, 'DepositProductsDimension:CompulsoryMember', 1, 'The value of deposits that an MFI\'s clients are required to maintain as a condition of an existing or future loan.', NULL), - (8, 'Deposits', 3, 'DepositProductsDimension:VoluntaryMember', 1, 'The value of deposits that an MFI\'s clients are not required to maintain as a condition of an existing or future loan.', NULL), - (9, 'Deposits', 3, 'LocationDimension:RuralMember', 1, 'Located in rural areas. Segmentation based on location.', NULL), - (10, 'Deposits', 3, 'LocationDimension:UrbanMember', 1, 'Located in urban areas. Segmentation based on location.', NULL), - (11, 'Deposits', 3, 'MaturityDimension:LessThanOneYearMember', 1, 'Segmentation based on the life of an asset or liability.', NULL), - (12, 'Deposits', 3, 'MaturityDimension:MoreThanOneYearMember', 1, 'Segmentation based on the life of an asset or liability.', NULL), - (13, 'EmployeeBenefitsExpense', 1, NULL, 3, NULL, NULL), - (14, 'Equity', 1, NULL, 1, NULL, NULL), - (15, 'Expense', 1, NULL, 3, NULL, NULL), - (16, 'FinancialExpense', 3, NULL, 3, 'All costs All costs incurred in raising funds from third parties, fee expenses from non-financial services, net gains (losses) due to changes in fair value of financial liabilities, impairment losses net of reversals of financial assets other than loan portfolio and net gains (losses) from restatement of financial statements in terms of the measuring unit current at the end of the reporting period.', NULL), - (17, 'FinancialRevenueOnLoans', 3, NULL, 2, 'Interest and non-interest income generated by the provision of credit services to the clients. Fees and commissions for late payment are also included.', NULL), - (18, 'ImpairmentLossAllowanceGrossLoanPortfolio', 3, NULL, 2, 'An allowance for the risk of losses in the gross loan portfolio due to default .', NULL), - (19, 'Liabilities', 1, NULL, 1, NULL, NULL), - (20, 'Liabilities', 3, 'MaturityDimension:LessThanOneYearMember', 1, 'Segmentation based on the life of an asset or liability.', NULL), - (21, 'Liabilities', 3, 'MaturityDimension:MoreThanOneYearMember', 1, 'Segmentation based on the life of an asset or liability.', NULL), - (22, 'LoanPortfolioGross', 3, NULL, 2, 'All outstanding principals due for all outstanding client loans. This includes current, delinquent, and renegotiated loans, but not loans that have been written off. It does not include interest receivable.', NULL), - (23, 'LoanPortfolioGross', 3, 'CreditProductsDimension:MicroenterpriseMember', 2, 'Loans that finance the production or trade of goods and services for an individual\'s microenterprise, whether or not the microenterprise is legally registered. Segmentation based on loan product.', NULL), +INSERT INTO `mix_taxonomy` (`id`, `name`, `namespace_id`, `dimension`, `type`, `description`, `need_mapping`) +VALUES (1, 'AdministrativeExpense', 1, NULL, 3, NULL, 1), + (2, 'Assets', 3, NULL, 1, + 'All outstanding principals due for all outstanding client loans. This includes current, delinquent, and renegotiated loans, but not loans that have been written off. It does not include interest receivable.', + 1), + (3, 'Assets', 3, 'MaturityDimension:LessThanOneYearMember', 1, + 'Segmentation based on the life of an asset or liability.', 1), + (4, 'Assets', 3, 'MaturityDimension:MoreThanOneYearMember', 1, + 'Segmentation based on the life of an asset or liability.', 1), + (5, 'CashAndCashEquivalents', 1, NULL, 1, NULL, 1), + (6, 'Deposits', 3, NULL, 1, + 'The total value of funds placed in an account with an MFI that are payable to a depositor. This item includes any current, checking, or savings accounts that are payable on demand. It also includes time deposits which have a fixed maturity date and compulsory deposits.', + 1), + (7, 'Deposits', 3, 'DepositProductsDimension:CompulsoryMember', 1, 'The value of deposits that an MFI\'s clients are required to maintain as a condition of an existing or future loan.', NULL), + (8, 'Deposits', 3, 'DepositProductsDimension:VoluntaryMember', 1, 'The value of deposits that an MFI\'s clients are not required to maintain as a condition of an existing or future loan.', + NULL), + (9, 'Deposits', 3, 'LocationDimension:RuralMember', 1, 'Located in rural areas. Segmentation based on location.', + NULL), + (10, 'Deposits', 3, 'LocationDimension:UrbanMember', 1, + 'Located in urban areas. Segmentation based on location.', NULL), + (11, 'Deposits', 3, 'MaturityDimension:LessThanOneYearMember', 1, + 'Segmentation based on the life of an asset or liability.', NULL), + (12, 'Deposits', 3, 'MaturityDimension:MoreThanOneYearMember', 1, + 'Segmentation based on the life of an asset or liability.', NULL), + (13, 'EmployeeBenefitsExpense', 1, NULL, 3, NULL, NULL), + (14, 'Equity', 1, NULL, 1, NULL, NULL), + (15, 'Expense', 1, NULL, 3, NULL, NULL), + (16, 'FinancialExpense', 3, NULL, 3, + 'All costs All costs incurred in raising funds from third parties, fee expenses from non-financial services, net gains (losses) due to changes in fair value of financial liabilities, impairment losses net of reversals of financial assets other than loan portfolio and net gains (losses) from restatement of financial statements in terms of the measuring unit current at the end of the reporting period.', + NULL), + (17, 'FinancialRevenueOnLoans', 3, NULL, 2, + 'Interest and non-interest income generated by the provision of credit services to the clients. Fees and commissions for late payment are also included.', + NULL), + (18, 'ImpairmentLossAllowanceGrossLoanPortfolio', 3, NULL, 2, + 'An allowance for the risk of losses in the gross loan portfolio due to default .', NULL), + (19, 'Liabilities', 1, NULL, 1, NULL, NULL), + (20, 'Liabilities', 3, 'MaturityDimension:LessThanOneYearMember', 1, + 'Segmentation based on the life of an asset or liability.', NULL), + (21, 'Liabilities', 3, 'MaturityDimension:MoreThanOneYearMember', 1, + 'Segmentation based on the life of an asset or liability.', NULL), + (22, 'LoanPortfolioGross', 3, NULL, 2, + 'All outstanding principals due for all outstanding client loans. This includes current, delinquent, and renegotiated loans, but not loans that have been written off. It does not include interest receivable.', + NULL), + (23, 'LoanPortfolioGross', 3, 'CreditProductsDimension:MicroenterpriseMember', 2, + 'Loans that finance the production or trade of goods and services for an individual\'s microenterprise, + whether or not the microenterprise is legally registered. Segmentation based on loan product.', NULL), (24, 'LoanPortfolioGross', 3, 'DelinquencyDimension:OneMonthOrMoreMember', 2, 'Segmentation based on the principal balance of all loans outstanding that have one or more installments of principal past due or renegotiated. Segmentation based on the principal balance of all loans outstanding that have one or more installments of principal past due or renegotiated.', NULL), (25, 'LoanPortfolioGross', 3, 'DelinquencyDimension:ThreeMonthsOrMoreMember', 2, 'Segmentation based on the principal balance of all loans outstanding that have one or more installments of principal past due or renegotiated.? Segmentation based on the principal balance of all loans outstanding that have one or more installments of principal past due or renegotiated.', NULL), (26, 'LoanPortfolioGross', 3, 'LocationDimension:RuralMember', 2, 'Located in rural areas. Segmentation based on geographic location.', NULL), @@ -473,98 +1107,261 @@ INSERT INTO `mix_taxonomy` (`id`, `name`, `namespace_id`, `dimension`, `type`, ` (29, 'LoanPortfolioGross', 3, 'MaturityDimension:MoreThanOneYearMember', 2, 'Segmentation based on the life of an asset or liability.', NULL), (30, 'NetLoanLoss', 3, '', 3, 'Referred to the value of delinquency loans written off net of any principal recovery.', NULL), (31, 'NetLoanLossProvisionExpense', 3, NULL, 3, 'Represent the net value of loan portfolio impairment loss considering any reversal on impairment loss and any recovery on loans written off recognized as a income during the accounting period.', NULL), - (32, 'NetOperatingIncome', 3, NULL, 2, 'Total operating revenue less all expenses related to the MFI\'s core financial service operation including total financial expense, impairment loss and operating expense. Donations are excluded.', NULL), - (33, 'NetOperatingIncomeNetOfTaxExpense', 3, NULL, 3, 'Net operating income reported incorporating the effect of taxes. Taxes include all domestic and foreign taxes which are based on taxable profits, other taxes related to personnel, financial transactions or value-added taxes are not considered in calculation of this value.', NULL), - (34, 'NumberOfActiveBorrowers', 3, NULL, 0, 'The number of individuals who currently have an outstanding loan balance with the MFI or are primarily responsible for repaying any portion of the gross loan portfolio. Individuals who have multiple loans with an MFI should be counted as a single borrower.', NULL), - (35, 'NumberOfActiveBorrowers', 3, 'GenderDimension:FemaleMember', 0, 'The number of individuals who currently have an outstanding loan balance with the MFI or are primarily responsible for repaying any portion of the gross loan portfolio. Individuals who have multiple loans with an MFI should be counted as a single borrower.', NULL), - (36, 'NumberOfBoardMembers', 3, 'GenderDimension:FemaleMember', 0, 'The number of members that comprise the board of directors at the end of the reporting period who are female.', NULL), - (37, 'NumberOfDepositAccounts', 3, NULL, 0, 'The number of individuals who currently have funds on deposit with the MFI on a voluntary basis; i.e., they are not required to maintain the deposit account to access a loan. This number applies only to deposits held by an MFI, not to those deposits held in other institutions by the MFI\'s clients. The number should be based on the number of individuals rather than the number of groups. A single deposit account may represent multiple depositors.', NULL), + (32, 'NetOperatingIncome', 3, NULL, 2, 'Total operating revenue less all expenses related to the MFI\'s core financial service operation including total financial expense, impairment loss and operating expense. Donations are excluded.', + NULL), + (33, 'NetOperatingIncomeNetOfTaxExpense', 3, NULL, 3, + 'Net operating income reported incorporating the effect of taxes. Taxes include all domestic and foreign taxes which are based on taxable profits, other taxes related to personnel, financial transactions or value-added taxes are not considered in calculation of this value.', + NULL), + (34, 'NumberOfActiveBorrowers', 3, NULL, 0, + 'The number of individuals who currently have an outstanding loan balance with the MFI or are primarily responsible for repaying any portion of the gross loan portfolio. Individuals who have multiple loans with an MFI should be counted as a single borrower.', + NULL), + (35, 'NumberOfActiveBorrowers', 3, 'GenderDimension:FemaleMember', 0, + 'The number of individuals who currently have an outstanding loan balance with the MFI or are primarily responsible for repaying any portion of the gross loan portfolio. Individuals who have multiple loans with an MFI should be counted as a single borrower.', + NULL), + (36, 'NumberOfBoardMembers', 3, 'GenderDimension:FemaleMember', 0, + 'The number of members that comprise the board of directors at the end of the reporting period who are female.', + NULL), + (37, 'NumberOfDepositAccounts', 3, NULL, 0, + 'The number of individuals who currently have funds on deposit with the MFI on a voluntary basis; i.e., they are not required to maintain the deposit account to access a loan. This number applies only to deposits held by an MFI, not to those deposits held in other institutions by the MFI\'s clients. The number should be based on the number of individuals rather than the number of groups. A single deposit account may represent multiple depositors.', NULL), (38, 'NumberOfDepositors', 3, '', 0, 'The number of deposit accounts, both voluntary and compulsory, opened at the MFI whose balances the institution is liable to repay. The number should be based on the number of individual accounts rather than on the number of groups.', NULL), - (39, 'NumberOfEmployees', 3, NULL, 0, 'The number of individuals who are actively employed by an entity. This number includes contract employees or advisors who dedicate a substantial portion of their time to the entity, even if they are not on the entity\'s employees roster.', NULL), - (40, 'NumberOfEmployees', 3, 'GenderDimension:FemaleMember', 0, 'The number of individuals who are actively employed by an entity. This number includes contract employees or advisors who dedicate a substantial portion of their time to the entity, even if they are not on the entity\'s employees roster.', NULL), + (39, 'NumberOfEmployees', 3, NULL, 0, 'The number of individuals who are actively employed by an entity. This number includes contract employees or advisors who dedicate a substantial portion of their time to the entity, + even if they are not on the entity\'s employees roster.', NULL), + (40, 'NumberOfEmployees', 3, 'GenderDimension:FemaleMember', 0, + 'The number of individuals who are actively employed by an entity. This number includes contract employees or advisors who dedicate a substantial portion of their time to the entity, even if they are not on the entity\'s employees roster.', NULL), (41, 'NumberOfLoanOfficers', 3, NULL, 0, 'The number of employees whose main activity is to manage a portion of the gross loan portfolio. A loan officer is a staff member of record who is directly responsible for arranging and monitoring client loans.', NULL), (42, 'NumberOfLoanOfficers', 3, 'GenderDimension:FemaleMember', 0, 'The number of employees whose main activity is to manage a portion of the gross loan portfolio. A loan officer is a staff member of record who is directly responsible for arranging and monitoring client loans.', NULL), (43, 'NumberOfManagers', 3, 'GenderDimension:FemaleMember', 0, 'The number of members that comprise the management of the institution who are female.', NULL), (44, 'NumberOfOffices', 3, NULL, 0, 'The number of staffed points of service and administrative sites used to deliver or support the delivery of financial services to microfinance clients.', NULL), - (45, 'NumberOfOutstandingLoans', 3, NULL, 0, 'The number of loans in the gross loan portfolio. For MFIs using a group lending methodology, the number of loans should refer to the number of individuals receiving loans as part of a group or as part of a group loan.', NULL), - (46, 'OperatingExpense', 3, NULL, 3, 'Includes expenses not related to financial and credit loss impairment, such as personnel expenses, depreciation, amortization and administrative expenses.', NULL), - (47, 'OperatingIncome', 3, NULL, 2, 'Includes all financial income and other operating revenue which is generated from non-financial services. Operating income also includes net gains (losses) from holding financial assets (changes on their values during the period and foreign exchange differences). Donations or any revenue not related with an MFI\'s core business of making loans and providing financial services are not considered under this category.', NULL), - (48, 'WriteOffsOnGrossLoanPortfolio', 3, NULL, 2, 'The value of loans that have been recognized as uncollectible for accounting purposes. A write-off is an accounting procedure that removes the outstanding balance of the loan from the gross loan portfolio and impairment loss allowance. Thus, the write-off does not affect the net loan portfolio, total assets, or any equity account. If the impairment loss allowance is insufficient to cover the amount written off, the excess amount will result in an additional impairment loss on loans recognised in profit or loss of the period.', NULL); + (45, 'NumberOfOutstandingLoans', 3, NULL, 0, 'The number of loans in the gross loan portfolio. For MFIs using a group lending methodology, + the number of loans should refer to the number of individuals receiving loans as part of a group or as part of a group loan.', NULL), + (46, 'OperatingExpense', 3, NULL, 3, 'Includes expenses not related to financial and credit loss impairment, + such as personnel expenses, depreciation, amortization and administrative expenses.', NULL), + (47, 'OperatingIncome', 3, NULL, 2, 'Includes all financial income and other operating revenue which is generated from non-financial services. Operating income also includes net gains (losses) from holding financial assets (changes on their values during the period and foreign exchange differences). Donations or any revenue not related with an MFI\'s core business of making loans and providing financial services are not considered under this category.', + NULL), + (48, 'WriteOffsOnGrossLoanPortfolio', 3, NULL, 2, + 'The value of loans that have been recognized as uncollectible for accounting purposes. A write-off is an accounting procedure that removes the outstanding balance of the loan from the gross loan portfolio and impairment loss allowance. Thus, the write-off does not affect the net loan portfolio, total assets, or any equity account. If the impairment loss allowance is insufficient to cover the amount written off, the excess amount will result in an additional impairment loss on loans recognised in profit or loss of the period.', + NULL); /*!40000 ALTER TABLE `mix_taxonomy` ENABLE KEYS */; -- Dumping structure for table fineract_default.mix_taxonomy_mapping DROP TABLE IF EXISTS `mix_taxonomy_mapping`; -CREATE TABLE IF NOT EXISTS `mix_taxonomy_mapping` ( - `id` INT unsigned NOT NULL AUTO_INCREMENT, - `identifier` varchar(50) NOT NULL DEFAULT '', - `config` varchar(200) DEFAULT NULL, - `last_update_date` datetime DEFAULT NULL, - `currency` varchar(11) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `mix_taxonomy_mapping` +( + `id` + INT + unsigned + NOT + NULL + AUTO_INCREMENT, + `identifier` + varchar +( + 50 +) NOT NULL DEFAULT '', + `config` varchar +( + 200 +) DEFAULT NULL, + `last_update_date` datetime DEFAULT NULL, + `currency` varchar +( + 11 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +) + ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.mix_taxonomy_mapping: ~0 rows (approximately) /*!40000 ALTER TABLE `mix_taxonomy_mapping` DISABLE KEYS */; -INSERT INTO `mix_taxonomy_mapping` (`id`, `identifier`, `config`, `last_update_date`, `currency`) VALUES - (1, 'default', NULL, NULL, ''); +INSERT INTO `mix_taxonomy_mapping` (`id`, `identifier`, `config`, `last_update_date`, `currency`) +VALUES (1, 'default', NULL, NULL, ''); /*!40000 ALTER TABLE `mix_taxonomy_mapping` ENABLE KEYS */; -- Dumping structure for table fineract_default.mix_xbrl_namespace DROP TABLE IF EXISTS `mix_xbrl_namespace`; -CREATE TABLE IF NOT EXISTS `mix_xbrl_namespace` ( - `id` INT unsigned NOT NULL AUTO_INCREMENT, - `prefix` varchar(20) NOT NULL DEFAULT '', - `url` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `UNQUE` (`prefix`) -) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `mix_xbrl_namespace` +( + `id` + INT + unsigned + NOT + NULL + AUTO_INCREMENT, + `prefix` + varchar +( + 20 +) NOT NULL DEFAULT '', + `url` varchar +( + 100 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `UNQUE` +( + `prefix` +) + ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.mix_xbrl_namespace: ~7 rows (approximately) /*!40000 ALTER TABLE `mix_xbrl_namespace` DISABLE KEYS */; -INSERT INTO `mix_xbrl_namespace` (`id`, `prefix`, `url`) VALUES - (1, 'ifrs', 'http://xbrl.iasb.org/taxonomy/2009-04-01/ifrs'), - (2, 'iso4217', 'http://www.xbrl.org/2003/iso4217'), - (3, 'mix', 'http://www.themix.org/INT/fr/ifrs/basi/YYYY-MM-DD/mx-cor'), - (4, 'xbrldi', 'http://xbrl.org/2006/xbrldi'), - (5, 'xbrli', 'http://www.xbrl.org/2003/instance'), - (6, 'link', 'http://www.xbrl.org/2003/linkbase'), - (7, 'dc-all', 'http://www.themix.org/INT/fr/ifrs/basi/2010-08-31/dc-all'); +INSERT INTO `mix_xbrl_namespace` (`id`, `prefix`, `url`) +VALUES (1, 'ifrs', 'http://xbrl.iasb.org/taxonomy/2009-04-01/ifrs'), + (2, 'iso4217', 'http://www.xbrl.org/2003/iso4217'), + (3, 'mix', 'http://www.themix.org/INT/fr/ifrs/basi/YYYY-MM-DD/mx-cor'), + (4, 'xbrldi', 'http://xbrl.org/2006/xbrldi'), + (5, 'xbrli', 'http://www.xbrl.org/2003/instance'), + (6, 'link', 'http://www.xbrl.org/2003/linkbase'), + (7, 'dc-all', 'http://www.themix.org/INT/fr/ifrs/basi/2010-08-31/dc-all'); /*!40000 ALTER TABLE `mix_xbrl_namespace` ENABLE KEYS */; -- Dumping structure for table fineract_default.m_account_transfer_details DROP TABLE IF EXISTS `m_account_transfer_details`; -CREATE TABLE IF NOT EXISTS `m_account_transfer_details` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `from_office_id` BIGINT NOT NULL, - `to_office_id` BIGINT NOT NULL, - `from_client_id` BIGINT DEFAULT NULL, - `to_client_id` BIGINT DEFAULT NULL, - `from_savings_account_id` BIGINT DEFAULT NULL, - `to_savings_account_id` BIGINT DEFAULT NULL, - `from_loan_account_id` BIGINT DEFAULT NULL, - `to_loan_account_id` BIGINT DEFAULT NULL, - `transfer_type` SMALLINT DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_account_transfer_details_from_office` (`from_office_id`), - KEY `FK_m_account_transfer_details_to_office` (`to_office_id`), - KEY `FK_m_account_transfer_details_from_client` (`from_client_id`), - KEY `FK_m_account_transfer_details_to_client` (`to_client_id`), - KEY `FK_m_account_transfer_details_from_savings_account` (`from_savings_account_id`), - KEY `FK_m_account_transfer_details_to_savings_account` (`to_savings_account_id`), - KEY `FK_m_account_transfer_details_from_loan_account` (`from_loan_account_id`), - KEY `FK_m_account_transfer_details_to_loan_account` (`to_loan_account_id`), - CONSTRAINT `FK_m_account_transfer_details_from_client` FOREIGN KEY (`from_client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FK_m_account_transfer_details_from_loan_account` FOREIGN KEY (`from_loan_account_id`) REFERENCES `m_loan` (`id`), - CONSTRAINT `FK_m_account_transfer_details_from_office` FOREIGN KEY (`from_office_id`) REFERENCES `m_office` (`id`), - CONSTRAINT `FK_m_account_transfer_details_from_savings_account` FOREIGN KEY (`from_savings_account_id`) REFERENCES `m_savings_account` (`id`), - CONSTRAINT `FK_m_account_transfer_details_to_client` FOREIGN KEY (`to_client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FK_m_account_transfer_details_to_loan_account` FOREIGN KEY (`to_loan_account_id`) REFERENCES `m_loan` (`id`), - CONSTRAINT `FK_m_account_transfer_details_to_office` FOREIGN KEY (`to_office_id`) REFERENCES `m_office` (`id`), - CONSTRAINT `FK_m_account_transfer_details_to_savings_account` FOREIGN KEY (`to_savings_account_id`) REFERENCES `m_savings_account` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_account_transfer_details` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `from_office_id` + BIGINT + NOT + NULL, + `to_office_id` + BIGINT + NOT + NULL, + `from_client_id` + BIGINT + DEFAULT + NULL, + `to_client_id` + BIGINT + DEFAULT + NULL, + `from_savings_account_id` + BIGINT + DEFAULT + NULL, + `to_savings_account_id` + BIGINT + DEFAULT + NULL, + `from_loan_account_id` + BIGINT + DEFAULT + NULL, + `to_loan_account_id` + BIGINT + DEFAULT + NULL, + `transfer_type` + SMALLINT + DEFAULT + NULL, + PRIMARY + KEY +( + `id` +), + KEY `FK_m_account_transfer_details_from_office` +( + `from_office_id` +), + KEY `FK_m_account_transfer_details_to_office` +( + `to_office_id` +), + KEY `FK_m_account_transfer_details_from_client` +( + `from_client_id` +), + KEY `FK_m_account_transfer_details_to_client` +( + `to_client_id` +), + KEY `FK_m_account_transfer_details_from_savings_account` +( + `from_savings_account_id` +), + KEY `FK_m_account_transfer_details_to_savings_account` +( + `to_savings_account_id` +), + KEY `FK_m_account_transfer_details_from_loan_account` +( + `from_loan_account_id` +), + KEY `FK_m_account_transfer_details_to_loan_account` +( + `to_loan_account_id` +), + CONSTRAINT `FK_m_account_transfer_details_from_client` FOREIGN KEY +( + `from_client_id` +) REFERENCES `m_client` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_details_from_loan_account` FOREIGN KEY +( + `from_loan_account_id` +) REFERENCES `m_loan` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_details_from_office` FOREIGN KEY +( + `from_office_id` +) REFERENCES `m_office` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_details_from_savings_account` FOREIGN KEY +( + `from_savings_account_id` +) REFERENCES `m_savings_account` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_details_to_client` FOREIGN KEY +( + `to_client_id` +) REFERENCES `m_client` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_details_to_loan_account` FOREIGN KEY +( + `to_loan_account_id` +) REFERENCES `m_loan` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_details_to_office` FOREIGN KEY +( + `to_office_id` +) REFERENCES `m_office` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_details_to_savings_account` FOREIGN KEY +( + `to_savings_account_id` +) REFERENCES `m_savings_account` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_account_transfer_details: ~0 rows (approximately) /*!40000 ALTER TABLE `m_account_transfer_details` DISABLE KEYS */; @@ -573,27 +1370,55 @@ CREATE TABLE IF NOT EXISTS `m_account_transfer_details` ( -- Dumping structure for table fineract_default.m_account_transfer_standing_instructions DROP TABLE IF EXISTS `m_account_transfer_standing_instructions`; -CREATE TABLE IF NOT EXISTS `m_account_transfer_standing_instructions` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(250) NOT NULL, - `account_transfer_details_id` BIGINT NOT NULL, - `priority` TINYINT NOT NULL, - `status` TINYINT NOT NULL, - `instruction_type` TINYINT NOT NULL, - `amount` decimal(19,6) DEFAULT NULL, - `valid_from` date NOT NULL, - `valid_till` date DEFAULT NULL, - `recurrence_type` tinyint NOT NULL, - `recurrence_frequency` SMALLINT DEFAULT NULL, - `recurrence_interval` SMALLINT DEFAULT NULL, - `recurrence_on_day` SMALLINT DEFAULT NULL, - `recurrence_on_month` SMALLINT DEFAULT NULL, - `last_run_date` date DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`), - KEY `FK_m_standing_instructions_account_transfer_details` (`account_transfer_details_id`), - CONSTRAINT `FK_m_standing_instructions_account_transfer_details` FOREIGN KEY (`account_transfer_details_id`) REFERENCES `m_account_transfer_details` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_account_transfer_standing_instructions` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `name` + varchar +( + 250 +) NOT NULL, + `account_transfer_details_id` BIGINT NOT NULL, + `priority` TINYINT NOT NULL, + `status` TINYINT NOT NULL, + `instruction_type` TINYINT NOT NULL, + `amount` decimal +( + 19, + 6 +) DEFAULT NULL, + `valid_from` date NOT NULL, + `valid_till` date DEFAULT NULL, + `recurrence_type` tinyint NOT NULL, + `recurrence_frequency` SMALLINT DEFAULT NULL, + `recurrence_interval` SMALLINT DEFAULT NULL, + `recurrence_on_day` SMALLINT DEFAULT NULL, + `recurrence_on_month` SMALLINT DEFAULT NULL, + `last_run_date` date DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `name` +( + `name` +), + KEY `FK_m_standing_instructions_account_transfer_details` +( + `account_transfer_details_id` +), + CONSTRAINT `FK_m_standing_instructions_account_transfer_details` FOREIGN KEY +( + `account_transfer_details_id` +) REFERENCES `m_account_transfer_details` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_account_transfer_standing_instructions: ~0 rows (approximately) /*!40000 ALTER TABLE `m_account_transfer_standing_instructions` DISABLE KEYS */; @@ -602,17 +1427,48 @@ CREATE TABLE IF NOT EXISTS `m_account_transfer_standing_instructions` ( -- Dumping structure for table fineract_default.m_account_transfer_standing_instructions_history DROP TABLE IF EXISTS `m_account_transfer_standing_instructions_history`; -CREATE TABLE IF NOT EXISTS `m_account_transfer_standing_instructions_history` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `standing_instruction_id` BIGINT NOT NULL, - `status` varchar(20) NOT NULL, - `execution_time` datetime NOT NULL, - `amount` decimal(19,6) NOT NULL, - `error_log` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_account_transfer_standing_instructions_history` (`standing_instruction_id`), - CONSTRAINT `FK_m_account_transfer_standing_instructions_m_history` FOREIGN KEY (`standing_instruction_id`) REFERENCES `m_account_transfer_standing_instructions` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_account_transfer_standing_instructions_history` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `standing_instruction_id` + BIGINT + NOT + NULL, + `status` + varchar +( + 20 +) NOT NULL, + `execution_time` datetime NOT NULL, + `amount` decimal +( + 19, + 6 +) NOT NULL, + `error_log` varchar +( + 500 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +), + KEY `FK_m_account_transfer_standing_instructions_history` +( + `standing_instruction_id` +), + CONSTRAINT `FK_m_account_transfer_standing_instructions_m_history` FOREIGN KEY +( + `standing_instruction_id` +) REFERENCES `m_account_transfer_standing_instructions` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_account_transfer_standing_instructions_history: ~0 rows (approximately) /*!40000 ALTER TABLE `m_account_transfer_standing_instructions_history` DISABLE KEYS */; @@ -621,32 +1477,117 @@ CREATE TABLE IF NOT EXISTS `m_account_transfer_standing_instructions_history` ( -- Dumping structure for table fineract_default.m_account_transfer_transaction DROP TABLE IF EXISTS `m_account_transfer_transaction`; -CREATE TABLE IF NOT EXISTS `m_account_transfer_transaction` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_transfer_details_id` BIGINT NOT NULL, - `from_savings_transaction_id` BIGINT DEFAULT NULL, - `from_loan_transaction_id` BIGINT DEFAULT NULL, - `to_savings_transaction_id` BIGINT DEFAULT NULL, - `to_loan_transaction_id` BIGINT DEFAULT NULL, - `is_reversed` tinyint NOT NULL, - `transaction_date` date NOT NULL, - `currency_code` varchar(3) NOT NULL, - `currency_digits` SMALLINT NOT NULL, - `currency_multiplesof` SMALLINT DEFAULT NULL, - `amount` decimal(19,6) NOT NULL, - `description` varchar(200) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_account_transfer_transaction_from_m_savings_transaction` (`from_savings_transaction_id`), - KEY `FK_m_account_transfer_transaction_to_m_savings_transaction` (`to_savings_transaction_id`), - KEY `FK_m_account_transfer_transaction_to_m_loan_transaction` (`to_loan_transaction_id`), - KEY `FK_m_account_transfer_transaction_from_m_loan_transaction` (`from_loan_transaction_id`), - KEY `FK_m_account_transfer_transaction_account_detail` (`account_transfer_details_id`), - CONSTRAINT `FK_m_account_transfer_transaction_account_detail` FOREIGN KEY (`account_transfer_details_id`) REFERENCES `m_account_transfer_details` (`id`), - CONSTRAINT `FK_m_account_transfer_transaction_from_m_loan_transaction` FOREIGN KEY (`from_loan_transaction_id`) REFERENCES `m_loan_transaction` (`id`), - CONSTRAINT `FK_m_account_transfer_transaction_from_m_savings_transaction` FOREIGN KEY (`from_savings_transaction_id`) REFERENCES `m_savings_account_transaction` (`id`), - CONSTRAINT `FK_m_account_transfer_transaction_to_m_loan_transaction` FOREIGN KEY (`to_loan_transaction_id`) REFERENCES `m_loan_transaction` (`id`), - CONSTRAINT `FK_m_account_transfer_transaction_to_m_savings_transaction` FOREIGN KEY (`to_savings_transaction_id`) REFERENCES `m_savings_account_transaction` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_account_transfer_transaction` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `account_transfer_details_id` + BIGINT + NOT + NULL, + `from_savings_transaction_id` + BIGINT + DEFAULT + NULL, + `from_loan_transaction_id` + BIGINT + DEFAULT + NULL, + `to_savings_transaction_id` + BIGINT + DEFAULT + NULL, + `to_loan_transaction_id` + BIGINT + DEFAULT + NULL, + `is_reversed` + tinyint + NOT + NULL, + `transaction_date` + date + NOT + NULL, + `currency_code` + varchar +( + 3 +) NOT NULL, + `currency_digits` SMALLINT NOT NULL, + `currency_multiplesof` SMALLINT DEFAULT NULL, + `amount` decimal +( + 19, + 6 +) NOT NULL, + `description` varchar +( + 200 +) NOT NULL, + PRIMARY KEY +( + `id` +), + KEY `FK_m_account_transfer_transaction_from_m_savings_transaction` +( + `from_savings_transaction_id` +), + KEY `FK_m_account_transfer_transaction_to_m_savings_transaction` +( + `to_savings_transaction_id` +), + KEY `FK_m_account_transfer_transaction_to_m_loan_transaction` +( + `to_loan_transaction_id` +), + KEY `FK_m_account_transfer_transaction_from_m_loan_transaction` +( + `from_loan_transaction_id` +), + KEY `FK_m_account_transfer_transaction_account_detail` +( + `account_transfer_details_id` +), + CONSTRAINT `FK_m_account_transfer_transaction_account_detail` FOREIGN KEY +( + `account_transfer_details_id` +) REFERENCES `m_account_transfer_details` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_transaction_from_m_loan_transaction` FOREIGN KEY +( + `from_loan_transaction_id` +) REFERENCES `m_loan_transaction` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_transaction_from_m_savings_transaction` FOREIGN KEY +( + `from_savings_transaction_id` +) REFERENCES `m_savings_account_transaction` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_transaction_to_m_loan_transaction` FOREIGN KEY +( + `to_loan_transaction_id` +) REFERENCES `m_loan_transaction` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_transaction_to_m_savings_transaction` FOREIGN KEY +( + `to_savings_transaction_id` +) REFERENCES `m_savings_account_transaction` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_account_transfer_transaction: ~0 rows (approximately) /*!40000 ALTER TABLE `m_account_transfer_transaction` DISABLE KEYS */; @@ -655,30 +1596,95 @@ CREATE TABLE IF NOT EXISTS `m_account_transfer_transaction` ( -- Dumping structure for table fineract_default.m_address DROP TABLE IF EXISTS `m_address`; -CREATE TABLE IF NOT EXISTS `m_address` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `street` varchar(100) DEFAULT NULL, - `address_line_1` varchar(100) DEFAULT NULL, - `address_line_2` varchar(100) DEFAULT NULL, - `address_line_3` varchar(100) DEFAULT NULL, - `town_village` varchar(100) DEFAULT NULL, - `city` varchar(100) DEFAULT NULL, - `county_district` varchar(100) DEFAULT NULL, - `state_province_id` INT DEFAULT NULL, - `country_id` INT DEFAULT NULL, - `postal_code` varchar(10) DEFAULT NULL, - `latitude` decimal(10,8) DEFAULT '0.00000000', - `longitude` decimal(10,8) DEFAULT '0.00000000', - `created_by` varchar(100) DEFAULT NULL, - `created_on` date DEFAULT NULL, - `updated_by` varchar(100) DEFAULT NULL, - `updated_on` date DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `address_fields_codefk1` (`state_province_id`), - KEY `address_fields_codefk2` (`country_id`), - CONSTRAINT `address_fields_codefk1` FOREIGN KEY (`state_province_id`) REFERENCES `m_code_value` (`id`), - CONSTRAINT `address_fields_codefk2` FOREIGN KEY (`country_id`) REFERENCES `m_code_value` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_address` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `street` + varchar +( + 100 +) DEFAULT NULL, + `address_line_1` varchar +( + 100 +) DEFAULT NULL, + `address_line_2` varchar +( + 100 +) DEFAULT NULL, + `address_line_3` varchar +( + 100 +) DEFAULT NULL, + `town_village` varchar +( + 100 +) DEFAULT NULL, + `city` varchar +( + 100 +) DEFAULT NULL, + `county_district` varchar +( + 100 +) DEFAULT NULL, + `state_province_id` INT DEFAULT NULL, + `country_id` INT DEFAULT NULL, + `postal_code` varchar +( + 10 +) DEFAULT NULL, + `latitude` decimal +( + 10, + 8 +) DEFAULT '0.00000000', + `longitude` decimal +( + 10, + 8 +) DEFAULT '0.00000000', + `created_by` varchar +( + 100 +) DEFAULT NULL, + `created_on` date DEFAULT NULL, + `updated_by` varchar +( + 100 +) DEFAULT NULL, + `updated_on` date DEFAULT NULL, + PRIMARY KEY +( + `id` +), + KEY `address_fields_codefk1` +( + `state_province_id` +), + KEY `address_fields_codefk2` +( + `country_id` +), + CONSTRAINT `address_fields_codefk1` FOREIGN KEY +( + `state_province_id` +) REFERENCES `m_code_value` +( + `id` +), + CONSTRAINT `address_fields_codefk2` FOREIGN KEY +( + `country_id` +) REFERENCES `m_code_value` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_address: ~0 rows (approximately) /*!40000 ALTER TABLE `m_address` DISABLE KEYS */; @@ -687,52 +1693,159 @@ CREATE TABLE IF NOT EXISTS `m_address` ( -- Dumping structure for table fineract_default.m_appuser DROP TABLE IF EXISTS `m_appuser`; -CREATE TABLE IF NOT EXISTS `m_appuser` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `is_deleted` tinyint NOT NULL DEFAULT '0', - `office_id` BIGINT DEFAULT NULL, - `staff_id` BIGINT DEFAULT NULL, - `username` varchar(100) NOT NULL, - `firstname` varchar(100) NOT NULL, - `lastname` varchar(100) NOT NULL, - `password` varchar(255) NOT NULL, - `email` varchar(100) NOT NULL, - `firsttime_login_remaining` bit(1) NOT NULL, - `nonexpired` bit(1) NOT NULL, - `nonlocked` bit(1) NOT NULL, - `nonexpired_credentials` bit(1) NOT NULL, - `enabled` bit(1) NOT NULL, - `last_time_password_updated` date NOT NULL, - `password_never_expires` TINYINT NOT NULL DEFAULT '0' COMMENT 'define if the password, should be check for validity period or not', - `is_self_service_user` bit(1) NOT NULL DEFAULT b'0', - PRIMARY KEY (`id`), - UNIQUE KEY `username_org` (`username`), - KEY `FKB3D587CE0DD567A` (`office_id`), - KEY `fk_m_appuser_002x` (`staff_id`), - KEY `last_time_password_updated` (`last_time_password_updated`), - CONSTRAINT `FKB3D587CE0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`), - CONSTRAINT `fk_m_appuser_002` FOREIGN KEY (`staff_id`) REFERENCES `m_staff` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_appuser` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `is_deleted` + tinyint + NOT + NULL + DEFAULT + '0', + `office_id` + BIGINT + DEFAULT + NULL, + `staff_id` + BIGINT + DEFAULT + NULL, + `username` + varchar +( + 100 +) NOT NULL, + `firstname` varchar +( + 100 +) NOT NULL, + `lastname` varchar +( + 100 +) NOT NULL, + `password` varchar +( + 255 +) NOT NULL, + `email` varchar +( + 100 +) NOT NULL, + `firsttime_login_remaining` bit +( + 1 +) NOT NULL, + `nonexpired` bit +( + 1 +) NOT NULL, + `nonlocked` bit +( + 1 +) NOT NULL, + `nonexpired_credentials` bit +( + 1 +) NOT NULL, + `enabled` bit +( + 1 +) NOT NULL, + `last_time_password_updated` date NOT NULL, + `password_never_expires` TINYINT NOT NULL DEFAULT '0' COMMENT 'define if the password, should be check for validity period or not', + `is_self_service_user` bit +( + 1 +) NOT NULL DEFAULT b'0', + PRIMARY KEY +( + `id` +), + UNIQUE KEY `username_org` +( + `username` +), + KEY `FKB3D587CE0DD567A` +( + `office_id` +), + KEY `fk_m_appuser_002x` +( + `staff_id` +), + KEY `last_time_password_updated` +( + `last_time_password_updated` +), + CONSTRAINT `FKB3D587CE0DD567A` FOREIGN KEY +( + `office_id` +) REFERENCES `m_office` +( + `id` +), + CONSTRAINT `fk_m_appuser_002` FOREIGN KEY +( + `staff_id` +) REFERENCES `m_staff` +( + `id` +) ON DELETE NO ACTION + ON UPDATE NO ACTION + ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_appuser: ~2 rows (approximately) /*!40000 ALTER TABLE `m_appuser` DISABLE KEYS */; -INSERT INTO `m_appuser` (`id`, `is_deleted`, `office_id`, `staff_id`, `username`, `firstname`, `lastname`, `password`, `email`, `firsttime_login_remaining`, `nonexpired`, `nonlocked`, `nonexpired_credentials`, `enabled`, `last_time_password_updated`, `password_never_expires`, `is_self_service_user`) VALUES - (1, 0, 1, NULL, 'mifos', 'App', 'Administrator', '5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a', 'demomfi@mifos.org', b'0', b'1', b'1', b'1', b'1', '2015-06-03', 0, b'0'), - (2, 0, 1, NULL, 'system', 'system', 'system', '5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a', 'demomfi@mifos.org', b'0', b'1', b'1', b'1', b'1', '2014-03-07', 0, b'0'); +INSERT INTO `m_appuser` (`id`, `is_deleted`, `office_id`, `staff_id`, `username`, `firstname`, `lastname`, `password`, + `email`, `firsttime_login_remaining`, `nonexpired`, `nonlocked`, `nonexpired_credentials`, + `enabled`, `last_time_password_updated`, `password_never_expires`, `is_self_service_user`) +VALUES (1, 0, 1, NULL, 'mifos', 'App', 'Administrator', + '5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a', 'demomfi@mifos.org', b'0', b'1', b'1', b'1', + b'1', '2015-06-03', 0, b'0'), + (2, 0, 1, NULL, 'system', 'system', 'system', '5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a', + 'demomfi@mifos.org', b'0', b'1', b'1', b'1', b'1', '2014-03-07', 0, b'0'); /*!40000 ALTER TABLE `m_appuser` ENABLE KEYS */; -- Dumping structure for table fineract_default.m_appuser_previous_password DROP TABLE IF EXISTS `m_appuser_previous_password`; -CREATE TABLE IF NOT EXISTS `m_appuser_previous_password` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `user_id` BIGINT NOT NULL, - `password` varchar(255) NOT NULL, - `removal_date` date NOT NULL, - PRIMARY KEY (`id`), - KEY `user_id` (`user_id`), - CONSTRAINT `m_appuser_previous_password_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `m_appuser` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE IF NOT EXISTS `m_appuser_previous_password` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `user_id` + BIGINT + NOT + NULL, + `password` + varchar +( + 255 +) NOT NULL, + `removal_date` date NOT NULL, + PRIMARY KEY +( + `id` +), + KEY `user_id` +( + `user_id` +), + CONSTRAINT `m_appuser_previous_password_ibfk_1` FOREIGN KEY +( + `user_id` +) REFERENCES `m_appuser` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- Dumping data for table fineract_default.m_appuser_previous_password: ~0 rows (approximately) /*!40000 ALTER TABLE `m_appuser_previous_password` DISABLE KEYS */; @@ -741,46 +1854,97 @@ CREATE TABLE IF NOT EXISTS `m_appuser_previous_password` ( -- Dumping structure for table fineract_default.m_appuser_role DROP TABLE IF EXISTS `m_appuser_role`; -CREATE TABLE IF NOT EXISTS `m_appuser_role` ( - `appuser_id` BIGINT NOT NULL, - `role_id` BIGINT NOT NULL, - PRIMARY KEY (`appuser_id`,`role_id`), - KEY `FK7662CE59B4100309` (`appuser_id`), - KEY `FK7662CE5915CEC7AB` (`role_id`), - CONSTRAINT `FK7662CE5915CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`), - CONSTRAINT `FK7662CE59B4100309` FOREIGN KEY (`appuser_id`) REFERENCES `m_appuser` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_appuser_role` +( + `appuser_id` + BIGINT + NOT + NULL, + `role_id` + BIGINT + NOT + NULL, + PRIMARY + KEY +( + `appuser_id`, + `role_id` +), + KEY `FK7662CE59B4100309` +( + `appuser_id` +), + KEY `FK7662CE5915CEC7AB` +( + `role_id` +), + CONSTRAINT `FK7662CE5915CEC7AB` FOREIGN KEY +( + `role_id` +) REFERENCES `m_role` +( + `id` +), + CONSTRAINT `FK7662CE59B4100309` FOREIGN KEY +( + `appuser_id` +) REFERENCES `m_appuser` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_appuser_role: ~0 rows (approximately) /*!40000 ALTER TABLE `m_appuser_role` DISABLE KEYS */; -INSERT INTO `m_appuser_role` (`appuser_id`, `role_id`) VALUES - (1, 1); +INSERT INTO `m_appuser_role` (`appuser_id`, `role_id`) +VALUES (1, 1); /*!40000 ALTER TABLE `m_appuser_role` ENABLE KEYS */; -- Dumping structure for table fineract_default.m_calendar DROP TABLE IF EXISTS `m_calendar`; -CREATE TABLE IF NOT EXISTS `m_calendar` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `title` varchar(70) NOT NULL, - `description` varchar(100) DEFAULT NULL, - `location` varchar(50) DEFAULT NULL, - `start_date` date NOT NULL, - `end_date` date DEFAULT NULL, - `duration` SMALLINT DEFAULT NULL, - `calendar_type_enum` SMALLINT NOT NULL, - `repeating` tinyint NOT NULL DEFAULT '0', - `recurrence` varchar(100) DEFAULT NULL, - `remind_by_enum` SMALLINT DEFAULT NULL, - `first_reminder` smallint DEFAULT NULL, - `second_reminder` smallint DEFAULT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - `meeting_time` time DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_calendar` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `title` + varchar +( + 70 +) NOT NULL, + `description` varchar +( + 100 +) DEFAULT NULL, + `location` varchar +( + 50 +) DEFAULT NULL, + `start_date` date NOT NULL, + `end_date` date DEFAULT NULL, + `duration` SMALLINT DEFAULT NULL, + `calendar_type_enum` SMALLINT NOT NULL, + `repeating` tinyint NOT NULL DEFAULT '0', + `recurrence` varchar +( + 100 +) DEFAULT NULL, + `remind_by_enum` SMALLINT DEFAULT NULL, + `first_reminder` smallint DEFAULT NULL, + `second_reminder` smallint DEFAULT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + `meeting_time` time DEFAULT NULL, + PRIMARY KEY +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_calendar: ~0 rows (approximately) /*!40000 ALTER TABLE `m_calendar` DISABLE KEYS */; @@ -789,25 +1953,58 @@ CREATE TABLE IF NOT EXISTS `m_calendar` ( -- Dumping structure for table fineract_default.m_calendar_history DROP TABLE IF EXISTS `m_calendar_history`; -CREATE TABLE IF NOT EXISTS `m_calendar_history` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `calendar_id` BIGINT NOT NULL, - `title` varchar(70) NOT NULL, - `description` varchar(100) DEFAULT NULL, - `location` varchar(50) DEFAULT NULL, - `start_date` date NOT NULL, - `end_date` date DEFAULT NULL, - `duration` SMALLINT DEFAULT NULL, - `calendar_type_enum` SMALLINT NOT NULL, - `repeating` tinyint NOT NULL DEFAULT '0', - `recurrence` varchar(100) DEFAULT NULL, - `remind_by_enum` SMALLINT DEFAULT NULL, - `first_reminder` smallint DEFAULT NULL, - `second_reminder` smallint DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_calendar_m_calendar_history` (`calendar_id`), - CONSTRAINT `FK_m_calendar_m_calendar_history` FOREIGN KEY (`calendar_id`) REFERENCES `m_calendar` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_calendar_history` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `calendar_id` + BIGINT + NOT + NULL, + `title` + varchar +( + 70 +) NOT NULL, + `description` varchar +( + 100 +) DEFAULT NULL, + `location` varchar +( + 50 +) DEFAULT NULL, + `start_date` date NOT NULL, + `end_date` date DEFAULT NULL, + `duration` SMALLINT DEFAULT NULL, + `calendar_type_enum` SMALLINT NOT NULL, + `repeating` tinyint NOT NULL DEFAULT '0', + `recurrence` varchar +( + 100 +) DEFAULT NULL, + `remind_by_enum` SMALLINT DEFAULT NULL, + `first_reminder` smallint DEFAULT NULL, + `second_reminder` smallint DEFAULT NULL, + PRIMARY KEY +( + `id` +), + KEY `FK_m_calendar_m_calendar_history` +( + `calendar_id` +), + CONSTRAINT `FK_m_calendar_m_calendar_history` FOREIGN KEY +( + `calendar_id` +) REFERENCES `m_calendar` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_calendar_history: ~0 rows (approximately) /*!40000 ALTER TABLE `m_calendar_history` DISABLE KEYS */; @@ -816,15 +2013,42 @@ CREATE TABLE IF NOT EXISTS `m_calendar_history` ( -- Dumping structure for table fineract_default.m_calendar_instance DROP TABLE IF EXISTS `m_calendar_instance`; -CREATE TABLE IF NOT EXISTS `m_calendar_instance` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `calendar_id` BIGINT NOT NULL, - `entity_id` BIGINT NOT NULL, - `entity_type_enum` SMALLINT NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_calendar_m_calendar_instance` (`calendar_id`), - CONSTRAINT `FK_m_calendar_m_calendar_instance` FOREIGN KEY (`calendar_id`) REFERENCES `m_calendar` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_calendar_instance` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `calendar_id` + BIGINT + NOT + NULL, + `entity_id` + BIGINT + NOT + NULL, + `entity_type_enum` + SMALLINT + NOT + NULL, + PRIMARY + KEY +( + `id` +), + KEY `FK_m_calendar_m_calendar_instance` +( + `calendar_id` +), + CONSTRAINT `FK_m_calendar_m_calendar_instance` FOREIGN KEY +( + `calendar_id` +) REFERENCES `m_calendar` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_calendar_instance: ~0 rows (approximately) /*!40000 ALTER TABLE `m_calendar_instance` DISABLE KEYS */; @@ -833,22 +2057,64 @@ CREATE TABLE IF NOT EXISTS `m_calendar_instance` ( -- Dumping structure for table fineract_default.m_cashiers DROP TABLE IF EXISTS `m_cashiers`; -CREATE TABLE IF NOT EXISTS `m_cashiers` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `staff_id` BIGINT DEFAULT NULL, - `teller_id` BIGINT DEFAULT NULL, - `description` varchar(100) DEFAULT NULL, - `start_date` date DEFAULT NULL, - `end_date` date DEFAULT NULL, - `start_time` varchar(10) DEFAULT NULL, - `end_time` varchar(10) DEFAULT NULL, - `full_day` TINYINT DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `IK_m_cashiers_m_staff` (`staff_id`), - KEY `IK_m_cashiers_m_teller` (`teller_id`), - CONSTRAINT `FK_m_cashiers_m_staff` FOREIGN KEY (`staff_id`) REFERENCES `m_staff` (`id`), - CONSTRAINT `FK_m_cashiers_m_teller` FOREIGN KEY (`teller_id`) REFERENCES `m_tellers` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_cashiers` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `staff_id` + BIGINT + DEFAULT + NULL, + `teller_id` + BIGINT + DEFAULT + NULL, + `description` + varchar +( + 100 +) DEFAULT NULL, + `start_date` date DEFAULT NULL, + `end_date` date DEFAULT NULL, + `start_time` varchar +( + 10 +) DEFAULT NULL, + `end_time` varchar +( + 10 +) DEFAULT NULL, + `full_day` TINYINT DEFAULT NULL, + PRIMARY KEY +( + `id` +), + KEY `IK_m_cashiers_m_staff` +( + `staff_id` +), + KEY `IK_m_cashiers_m_teller` +( + `teller_id` +), + CONSTRAINT `FK_m_cashiers_m_staff` FOREIGN KEY +( + `staff_id` +) REFERENCES `m_staff` +( + `id` +), + CONSTRAINT `FK_m_cashiers_m_teller` FOREIGN KEY +( + `teller_id` +) REFERENCES `m_tellers` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_cashiers: ~0 rows (approximately) /*!40000 ALTER TABLE `m_cashiers` DISABLE KEYS */; @@ -857,21 +2123,59 @@ CREATE TABLE IF NOT EXISTS `m_cashiers` ( -- Dumping structure for table fineract_default.m_cashier_transactions DROP TABLE IF EXISTS `m_cashier_transactions`; -CREATE TABLE IF NOT EXISTS `m_cashier_transactions` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `cashier_id` BIGINT NOT NULL, - `txn_type` SMALLINT NOT NULL, - `txn_amount` decimal(19,6) NOT NULL, - `txn_date` date NOT NULL, - `created_date` datetime NOT NULL, - `entity_type` varchar(50) DEFAULT NULL, - `entity_id` BIGINT DEFAULT NULL, - `txn_note` varchar(200) DEFAULT NULL, - `currency_code` varchar(3) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `IK_m_teller_transactions_m_cashier` (`cashier_id`), - CONSTRAINT `FK_m_teller_transactions_m_cashiers` FOREIGN KEY (`cashier_id`) REFERENCES `m_cashiers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_cashier_transactions` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `cashier_id` + BIGINT + NOT + NULL, + `txn_type` + SMALLINT + NOT + NULL, + `txn_amount` + decimal +( + 19, + 6 +) NOT NULL, + `txn_date` date NOT NULL, + `created_date` datetime NOT NULL, + `entity_type` varchar +( + 50 +) DEFAULT NULL, + `entity_id` BIGINT DEFAULT NULL, + `txn_note` varchar +( + 200 +) DEFAULT NULL, + `currency_code` varchar +( + 3 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +), + KEY `IK_m_teller_transactions_m_cashier` +( + `cashier_id` +), + CONSTRAINT `FK_m_teller_transactions_m_cashiers` FOREIGN KEY +( + `cashier_id` +) REFERENCES `m_cashiers` +( + `id` +) ON DELETE CASCADE + ON UPDATE CASCADE + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_cashier_transactions: ~0 rows (approximately) /*!40000 ALTER TABLE `m_cashier_transactions` DISABLE KEYS */; @@ -880,33 +2184,81 @@ CREATE TABLE IF NOT EXISTS `m_cashier_transactions` ( -- Dumping structure for table fineract_default.m_charge DROP TABLE IF EXISTS `m_charge`; -CREATE TABLE IF NOT EXISTS `m_charge` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL, - `currency_code` varchar(3) NOT NULL, - `charge_applies_to_enum` SMALLINT NOT NULL, - `charge_time_enum` SMALLINT NOT NULL, - `charge_calculation_enum` SMALLINT NOT NULL, - `charge_payment_mode_enum` SMALLINT DEFAULT NULL, - `amount` decimal(19,6) NOT NULL, - `fee_on_day` SMALLINT DEFAULT NULL, - `fee_interval` SMALLINT DEFAULT NULL, - `fee_on_month` SMALLINT DEFAULT NULL, - `is_penalty` tinyint NOT NULL DEFAULT '0', - `is_active` tinyint NOT NULL, - `is_deleted` tinyint NOT NULL DEFAULT '0', - `min_cap` decimal(19,6) DEFAULT NULL, - `max_cap` decimal(19,6) DEFAULT NULL, - `fee_frequency` SMALLINT DEFAULT NULL, - `income_or_liability_account_id` BIGINT DEFAULT NULL, - `tax_group_id` BIGINT DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`), - KEY `FK_m_charge_acc_gl_account` (`income_or_liability_account_id`), - KEY `FK_m_charge_m_tax_group` (`tax_group_id`), - CONSTRAINT `FK_m_charge_acc_gl_account` FOREIGN KEY (`income_or_liability_account_id`) REFERENCES `acc_gl_account` (`id`), - CONSTRAINT `FK_m_charge_m_tax_group` FOREIGN KEY (`tax_group_id`) REFERENCES `m_tax_group` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_charge` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `name` + varchar +( + 100 +) DEFAULT NULL, + `currency_code` varchar +( + 3 +) NOT NULL, + `charge_applies_to_enum` SMALLINT NOT NULL, + `charge_time_enum` SMALLINT NOT NULL, + `charge_calculation_enum` SMALLINT NOT NULL, + `charge_payment_mode_enum` SMALLINT DEFAULT NULL, + `amount` decimal +( + 19, + 6 +) NOT NULL, + `fee_on_day` SMALLINT DEFAULT NULL, + `fee_interval` SMALLINT DEFAULT NULL, + `fee_on_month` SMALLINT DEFAULT NULL, + `is_penalty` tinyint NOT NULL DEFAULT '0', + `is_active` tinyint NOT NULL, + `is_deleted` tinyint NOT NULL DEFAULT '0', + `min_cap` decimal +( + 19, + 6 +) DEFAULT NULL, + `max_cap` decimal +( + 19, + 6 +) DEFAULT NULL, + `fee_frequency` SMALLINT DEFAULT NULL, + `income_or_liability_account_id` BIGINT DEFAULT NULL, + `tax_group_id` BIGINT DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `name` +( + `name` +), + KEY `FK_m_charge_acc_gl_account` +( + `income_or_liability_account_id` +), + KEY `FK_m_charge_m_tax_group` +( + `tax_group_id` +), + CONSTRAINT `FK_m_charge_acc_gl_account` FOREIGN KEY +( + `income_or_liability_account_id` +) REFERENCES `acc_gl_account` +( + `id` +), + CONSTRAINT `FK_m_charge_m_tax_group` FOREIGN KEY +( + `tax_group_id` +) REFERENCES `m_tax_group` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_charge: ~0 rows (approximately) /*!40000 ALTER TABLE `m_charge` DISABLE KEYS */; @@ -915,80 +2267,239 @@ CREATE TABLE IF NOT EXISTS `m_charge` ( -- Dumping structure for table fineract_default.m_client DROP TABLE IF EXISTS `m_client`; -CREATE TABLE IF NOT EXISTS `m_client` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_no` varchar(20) NOT NULL, - `external_id` varchar(100) DEFAULT NULL, - `status_enum` INT NOT NULL DEFAULT '300', - `sub_status` INT DEFAULT NULL, - `activation_date` date DEFAULT NULL, - `office_joining_date` date DEFAULT NULL, - `office_id` BIGINT NOT NULL, - `transfer_to_office_id` BIGINT DEFAULT NULL, - `staff_id` BIGINT DEFAULT NULL, - `firstname` varchar(50) DEFAULT NULL, - `middlename` varchar(50) DEFAULT NULL, - `lastname` varchar(50) DEFAULT NULL, - `fullname` varchar(100) DEFAULT NULL, - `display_name` varchar(100) NOT NULL, - `mobile_no` varchar(50) DEFAULT NULL, - `gender_cv_id` INT DEFAULT NULL, - `date_of_birth` date DEFAULT NULL, - `image_id` BIGINT DEFAULT NULL, - `closure_reason_cv_id` INT DEFAULT NULL, - `closedon_date` date DEFAULT NULL, - `updated_by` BIGINT DEFAULT NULL, - `updated_on` date DEFAULT NULL, - `submittedon_date` date DEFAULT NULL, - `submittedon_userid` BIGINT DEFAULT NULL, - `activatedon_userid` BIGINT DEFAULT NULL, - `closedon_userid` BIGINT DEFAULT NULL, - `default_savings_product` BIGINT DEFAULT NULL, - `default_savings_account` BIGINT DEFAULT NULL, - `client_type_cv_id` INT DEFAULT NULL, - `client_classification_cv_id` INT DEFAULT NULL, - `reject_reason_cv_id` INT DEFAULT NULL, - `rejectedon_date` date DEFAULT NULL, - `rejectedon_userid` BIGINT DEFAULT NULL, - `withdraw_reason_cv_id` INT DEFAULT NULL, - `withdrawn_on_date` date DEFAULT NULL, - `withdraw_on_userid` BIGINT DEFAULT NULL, - `reactivated_on_date` date DEFAULT NULL, - `reactivated_on_userid` BIGINT DEFAULT NULL, - `legal_form_enum` INT DEFAULT NULL, - `reopened_on_date` date DEFAULT NULL, - `reopened_by_userid` BIGINT DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `account_no_UNIQUE` (`account_no`), - UNIQUE KEY `external_id` (`external_id`), - UNIQUE KEY `mobile_no_UNIQUE` (`mobile_no`), - KEY `FKCE00CAB3E0DD567A` (`office_id`), - KEY `FK_m_client_m_image` (`image_id`), - KEY `client_staff_id` (`staff_id`), - KEY `FK_m_client_m_code` (`closure_reason_cv_id`), - KEY `FK_m_client_m_office` (`transfer_to_office_id`), - KEY `FK_m_client_m_savings_product` (`default_savings_product`), - KEY `FK_m_client_m_savings_account` (`default_savings_account`), - KEY `FK_m_client_type_m_code_value` (`client_type_cv_id`), - KEY `FK_m_client_classification_m_code_value` (`client_classification_cv_id`), - KEY `FK1_m_client_gender_m_code_value` (`gender_cv_id`), - KEY `FK_m_client_substatus_m_code_value` (`sub_status`), - KEY `FK_m_client_type_mcode_value_reject` (`reject_reason_cv_id`), - KEY `FK_m_client_type_m_code_value_withdraw` (`withdraw_reason_cv_id`), - CONSTRAINT `FK1_m_client_gender_m_code_value` FOREIGN KEY (`gender_cv_id`) REFERENCES `m_code_value` (`id`), - CONSTRAINT `FKCE00CAB3E0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`), - CONSTRAINT `FK_m_client_classification_m_code_value` FOREIGN KEY (`client_classification_cv_id`) REFERENCES `m_code_value` (`id`), - CONSTRAINT `FK_m_client_m_code` FOREIGN KEY (`closure_reason_cv_id`) REFERENCES `m_code_value` (`id`), - CONSTRAINT `FK_m_client_m_image` FOREIGN KEY (`image_id`) REFERENCES `m_image` (`id`), - CONSTRAINT `FK_m_client_m_office` FOREIGN KEY (`transfer_to_office_id`) REFERENCES `m_office` (`id`), - CONSTRAINT `FK_m_client_m_savings_account` FOREIGN KEY (`default_savings_account`) REFERENCES `m_savings_account` (`id`), - CONSTRAINT `FK_m_client_m_savings_product` FOREIGN KEY (`default_savings_product`) REFERENCES `m_savings_product` (`id`), - CONSTRAINT `FK_m_client_m_staff` FOREIGN KEY (`staff_id`) REFERENCES `m_staff` (`id`), - CONSTRAINT `FK_m_client_substatus_m_code_value` FOREIGN KEY (`sub_status`) REFERENCES `m_code_value` (`id`), - CONSTRAINT `FK_m_client_type_m_code_value` FOREIGN KEY (`client_type_cv_id`) REFERENCES `m_code_value` (`id`), - CONSTRAINT `FK_m_client_type_m_code_value_withdraw` FOREIGN KEY (`withdraw_reason_cv_id`) REFERENCES `m_code_value` (`id`), - CONSTRAINT `FK_m_client_type_mcode_value_reject` FOREIGN KEY (`reject_reason_cv_id`) REFERENCES `m_code_value` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_client` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `account_no` + varchar +( + 20 +) NOT NULL, + `external_id` varchar +( + 100 +) DEFAULT NULL, + `status_enum` INT NOT NULL DEFAULT '300', + `sub_status` INT DEFAULT NULL, + `activation_date` date DEFAULT NULL, + `office_joining_date` date DEFAULT NULL, + `office_id` BIGINT NOT NULL, + `transfer_to_office_id` BIGINT DEFAULT NULL, + `staff_id` BIGINT DEFAULT NULL, + `firstname` varchar +( + 50 +) DEFAULT NULL, + `middlename` varchar +( + 50 +) DEFAULT NULL, + `lastname` varchar +( + 50 +) DEFAULT NULL, + `fullname` varchar +( + 100 +) DEFAULT NULL, + `display_name` varchar +( + 100 +) NOT NULL, + `mobile_no` varchar +( + 50 +) DEFAULT NULL, + `gender_cv_id` INT DEFAULT NULL, + `date_of_birth` date DEFAULT NULL, + `image_id` BIGINT DEFAULT NULL, + `closure_reason_cv_id` INT DEFAULT NULL, + `closedon_date` date DEFAULT NULL, + `updated_by` BIGINT DEFAULT NULL, + `updated_on` date DEFAULT NULL, + `submittedon_date` date DEFAULT NULL, + `submittedon_userid` BIGINT DEFAULT NULL, + `activatedon_userid` BIGINT DEFAULT NULL, + `closedon_userid` BIGINT DEFAULT NULL, + `default_savings_product` BIGINT DEFAULT NULL, + `default_savings_account` BIGINT DEFAULT NULL, + `client_type_cv_id` INT DEFAULT NULL, + `client_classification_cv_id` INT DEFAULT NULL, + `reject_reason_cv_id` INT DEFAULT NULL, + `rejectedon_date` date DEFAULT NULL, + `rejectedon_userid` BIGINT DEFAULT NULL, + `withdraw_reason_cv_id` INT DEFAULT NULL, + `withdrawn_on_date` date DEFAULT NULL, + `withdraw_on_userid` BIGINT DEFAULT NULL, + `reactivated_on_date` date DEFAULT NULL, + `reactivated_on_userid` BIGINT DEFAULT NULL, + `legal_form_enum` INT DEFAULT NULL, + `reopened_on_date` date DEFAULT NULL, + `reopened_by_userid` BIGINT DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `account_no_UNIQUE` +( + `account_no` +), + UNIQUE KEY `external_id` +( + `external_id` +), + UNIQUE KEY `mobile_no_UNIQUE` +( + `mobile_no` +), + KEY `FKCE00CAB3E0DD567A` +( + `office_id` +), + KEY `FK_m_client_m_image` +( + `image_id` +), + KEY `client_staff_id` +( + `staff_id` +), + KEY `FK_m_client_m_code` +( + `closure_reason_cv_id` +), + KEY `FK_m_client_m_office` +( + `transfer_to_office_id` +), + KEY `FK_m_client_m_savings_product` +( + `default_savings_product` +), + KEY `FK_m_client_m_savings_account` +( + `default_savings_account` +), + KEY `FK_m_client_type_m_code_value` +( + `client_type_cv_id` +), + KEY `FK_m_client_classification_m_code_value` +( + `client_classification_cv_id` +), + KEY `FK1_m_client_gender_m_code_value` +( + `gender_cv_id` +), + KEY `FK_m_client_substatus_m_code_value` +( + `sub_status` +), + KEY `FK_m_client_type_mcode_value_reject` +( + `reject_reason_cv_id` +), + KEY `FK_m_client_type_m_code_value_withdraw` +( + `withdraw_reason_cv_id` +), + CONSTRAINT `FK1_m_client_gender_m_code_value` FOREIGN KEY +( + `gender_cv_id` +) REFERENCES `m_code_value` +( + `id` +), + CONSTRAINT `FKCE00CAB3E0DD567A` FOREIGN KEY +( + `office_id` +) REFERENCES `m_office` +( + `id` +), + CONSTRAINT `FK_m_client_classification_m_code_value` FOREIGN KEY +( + `client_classification_cv_id` +) REFERENCES `m_code_value` +( + `id` +), + CONSTRAINT `FK_m_client_m_code` FOREIGN KEY +( + `closure_reason_cv_id` +) REFERENCES `m_code_value` +( + `id` +), + CONSTRAINT `FK_m_client_m_image` FOREIGN KEY +( + `image_id` +) REFERENCES `m_image` +( + `id` +), + CONSTRAINT `FK_m_client_m_office` FOREIGN KEY +( + `transfer_to_office_id` +) REFERENCES `m_office` +( + `id` +), + CONSTRAINT `FK_m_client_m_savings_account` FOREIGN KEY +( + `default_savings_account` +) REFERENCES `m_savings_account` +( + `id` +), + CONSTRAINT `FK_m_client_m_savings_product` FOREIGN KEY +( + `default_savings_product` +) REFERENCES `m_savings_product` +( + `id` +), + CONSTRAINT `FK_m_client_m_staff` FOREIGN KEY +( + `staff_id` +) REFERENCES `m_staff` +( + `id` +), + CONSTRAINT `FK_m_client_substatus_m_code_value` FOREIGN KEY +( + `sub_status` +) REFERENCES `m_code_value` +( + `id` +), + CONSTRAINT `FK_m_client_type_m_code_value` FOREIGN KEY +( + `client_type_cv_id` +) REFERENCES `m_code_value` +( + `id` +), + CONSTRAINT `FK_m_client_type_m_code_value_withdraw` FOREIGN KEY +( + `withdraw_reason_cv_id` +) REFERENCES `m_code_value` +( + `id` +), + CONSTRAINT `FK_m_client_type_mcode_value_reject` FOREIGN KEY +( + `reject_reason_cv_id` +) REFERENCES `m_code_value` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_client: ~0 rows (approximately) /*!40000 ALTER TABLE `m_client` DISABLE KEYS */; @@ -997,19 +2508,69 @@ CREATE TABLE IF NOT EXISTS `m_client` ( -- Dumping structure for table fineract_default.m_client_address DROP TABLE IF EXISTS `m_client_address`; -CREATE TABLE IF NOT EXISTS `m_client_address` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL DEFAULT '0', - `address_id` BIGINT NOT NULL DEFAULT '0', - `address_type_id` INT NOT NULL DEFAULT '0', - `is_active` TINYINT NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `addressIdFk` (`address_id`), - KEY `address_codefk` (`address_type_id`), - KEY `clientaddressfk` (`client_id`), - CONSTRAINT `address_codefk` FOREIGN KEY (`address_type_id`) REFERENCES `m_code_value` (`id`), - CONSTRAINT `clientaddressfk` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_client_address` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `client_id` + BIGINT + NOT + NULL + DEFAULT + '0', + `address_id` + BIGINT + NOT + NULL + DEFAULT + '0', + `address_type_id` + INT + NOT + NULL + DEFAULT + '0', + `is_active` + TINYINT + NOT + NULL + DEFAULT + '0', + PRIMARY + KEY +( + `id` +), + KEY `addressIdFk` +( + `address_id` +), + KEY `address_codefk` +( + `address_type_id` +), + KEY `clientaddressfk` +( + `client_id` +), + CONSTRAINT `address_codefk` FOREIGN KEY +( + `address_type_id` +) REFERENCES `m_code_value` +( + `id` +), + CONSTRAINT `clientaddressfk` FOREIGN KEY +( + `client_id` +) REFERENCES `m_client` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_client_address: ~0 rows (approximately) /*!40000 ALTER TABLE `m_client_address` DISABLE KEYS */; @@ -1018,17 +2579,56 @@ CREATE TABLE IF NOT EXISTS `m_client_address` ( -- Dumping structure for table fineract_default.m_client_attendance DROP TABLE IF EXISTS `m_client_attendance`; -CREATE TABLE IF NOT EXISTS `m_client_attendance` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL DEFAULT '0', - `meeting_id` BIGINT NOT NULL, - `attendance_type_enum` SMALLINT NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `unique_client_meeting_attendance` (`client_id`,`meeting_id`), - KEY `FK_m_meeting_m_client_attendance` (`meeting_id`), - CONSTRAINT `FK_m_client_m_client_attendance` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FK_m_meeting_m_client_attendance` FOREIGN KEY (`meeting_id`) REFERENCES `m_meeting` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_client_attendance` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `client_id` + BIGINT + NOT + NULL + DEFAULT + '0', + `meeting_id` + BIGINT + NOT + NULL, + `attendance_type_enum` + SMALLINT + NOT + NULL, + PRIMARY + KEY +( + `id` +), + UNIQUE KEY `unique_client_meeting_attendance` +( + `client_id`, + `meeting_id` +), + KEY `FK_m_meeting_m_client_attendance` +( + `meeting_id` +), + CONSTRAINT `FK_m_client_m_client_attendance` FOREIGN KEY +( + `client_id` +) REFERENCES `m_client` +( + `id` +), + CONSTRAINT `FK_m_meeting_m_client_attendance` FOREIGN KEY +( + `meeting_id` +) REFERENCES `m_meeting` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_client_attendance: ~0 rows (approximately) /*!40000 ALTER TABLE `m_client_attendance` DISABLE KEYS */; @@ -1037,29 +2637,94 @@ CREATE TABLE IF NOT EXISTS `m_client_attendance` ( -- Dumping structure for table fineract_default.m_client_charge DROP TABLE IF EXISTS `m_client_charge`; -CREATE TABLE IF NOT EXISTS `m_client_charge` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `charge_id` BIGINT NOT NULL, - `is_penalty` tinyint NOT NULL, - `charge_time_enum` SMALLINT NOT NULL, - `charge_due_date` date DEFAULT NULL, - `charge_calculation_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `amount_paid_derived` decimal(19,6) DEFAULT NULL, - `amount_waived_derived` decimal(19,6) DEFAULT NULL, - `amount_writtenoff_derived` decimal(19,6) DEFAULT NULL, - `amount_outstanding_derived` decimal(19,6) NOT NULL, - `is_paid_derived` tinyint DEFAULT NULL, - `waived` tinyint DEFAULT NULL, - `is_active` tinyint DEFAULT NULL, - `inactivated_on_date` date DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_client_charge_m_client` (`client_id`), - KEY `FK_m_client_charge_m_charge` (`charge_id`), - CONSTRAINT `FK_m_client_charge_m_charge` FOREIGN KEY (`charge_id`) REFERENCES `m_charge` (`id`), - CONSTRAINT `FK_m_client_charge_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_client_charge` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `client_id` + BIGINT + NOT + NULL, + `charge_id` + BIGINT + NOT + NULL, + `is_penalty` + tinyint + NOT + NULL, + `charge_time_enum` + SMALLINT + NOT + NULL, + `charge_due_date` + date + DEFAULT + NULL, + `charge_calculation_enum` + SMALLINT + NOT + NULL, + `amount` + decimal +( + 19, + 6 +) NOT NULL, + `amount_paid_derived` decimal +( + 19, + 6 +) DEFAULT NULL, + `amount_waived_derived` decimal +( + 19, + 6 +) DEFAULT NULL, + `amount_writtenoff_derived` decimal +( + 19, + 6 +) DEFAULT NULL, + `amount_outstanding_derived` decimal +( + 19, + 6 +) NOT NULL, + `is_paid_derived` tinyint DEFAULT NULL, + `waived` tinyint DEFAULT NULL, + `is_active` tinyint DEFAULT NULL, + `inactivated_on_date` date DEFAULT NULL, + PRIMARY KEY +( + `id` +), + KEY `FK_m_client_charge_m_client` +( + `client_id` +), + KEY `FK_m_client_charge_m_charge` +( + `charge_id` +), + CONSTRAINT `FK_m_client_charge_m_charge` FOREIGN KEY +( + `charge_id` +) REFERENCES `m_charge` +( + `id` +), + CONSTRAINT `FK_m_client_charge_m_client` FOREIGN KEY +( + `client_id` +) REFERENCES `m_client` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_client_charge: ~0 rows (approximately) /*!40000 ALTER TABLE `m_client_charge` DISABLE KEYS */; @@ -1068,17 +2733,54 @@ CREATE TABLE IF NOT EXISTS `m_client_charge` ( -- Dumping structure for table fineract_default.m_client_charge_paid_by DROP TABLE IF EXISTS `m_client_charge_paid_by`; -CREATE TABLE IF NOT EXISTS `m_client_charge_paid_by` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_transaction_id` BIGINT NOT NULL, - `client_charge_id` BIGINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_client_charge_paid_by_m_client_transaction` (`client_transaction_id`), - KEY `FK_m_client_charge_paid_by_m_client_charge` (`client_charge_id`), - CONSTRAINT `FK_m_client_charge_paid_by_m_client_charge` FOREIGN KEY (`client_charge_id`) REFERENCES `m_client_charge` (`id`), - CONSTRAINT `FK_m_client_charge_paid_by_m_client_transaction` FOREIGN KEY (`client_transaction_id`) REFERENCES `m_client_transaction` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_client_charge_paid_by` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `client_transaction_id` + BIGINT + NOT + NULL, + `client_charge_id` + BIGINT + NOT + NULL, + `amount` + decimal +( + 19, + 6 +) NOT NULL, + PRIMARY KEY +( + `id` +), + KEY `FK_m_client_charge_paid_by_m_client_transaction` +( + `client_transaction_id` +), + KEY `FK_m_client_charge_paid_by_m_client_charge` +( + `client_charge_id` +), + CONSTRAINT `FK_m_client_charge_paid_by_m_client_charge` FOREIGN KEY +( + `client_charge_id` +) REFERENCES `m_client_charge` +( + `id` +), + CONSTRAINT `FK_m_client_charge_paid_by_m_client_transaction` FOREIGN KEY +( + `client_transaction_id` +) REFERENCES `m_client_transaction` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_client_charge_paid_by: ~0 rows (approximately) /*!40000 ALTER TABLE `m_client_charge_paid_by` DISABLE KEYS */; @@ -1087,26 +2789,74 @@ CREATE TABLE IF NOT EXISTS `m_client_charge_paid_by` ( -- Dumping structure for table fineract_default.m_client_identifier DROP TABLE IF EXISTS `m_client_identifier`; -CREATE TABLE IF NOT EXISTS `m_client_identifier` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `document_type_id` INT NOT NULL, - `document_key` varchar(50) NOT NULL, - `status` INT NOT NULL DEFAULT '300', - `active` INT DEFAULT NULL, - `description` varchar(500) DEFAULT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `unique_identifier_key` (`document_type_id`,`document_key`), - UNIQUE KEY `unique_active_client_identifier` (`client_id`,`document_type_id`,`active`), - KEY `FK_m_client_document_m_client` (`client_id`), - KEY `FK_m_client_document_m_code_value` (`document_type_id`), - CONSTRAINT `FK_m_client_document_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FK_m_client_document_m_code_value` FOREIGN KEY (`document_type_id`) REFERENCES `m_code_value` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_client_identifier` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `client_id` + BIGINT + NOT + NULL, + `document_type_id` + INT + NOT + NULL, + `document_key` + varchar +( + 50 +) NOT NULL, + `status` INT NOT NULL DEFAULT '300', + `active` INT DEFAULT NULL, + `description` varchar +( + 500 +) DEFAULT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `unique_identifier_key` +( + `document_type_id`, + `document_key` +), + UNIQUE KEY `unique_active_client_identifier` +( + `client_id`, + `document_type_id`, + `active` +), + KEY `FK_m_client_document_m_client` +( + `client_id` +), + KEY `FK_m_client_document_m_code_value` +( + `document_type_id` +), + CONSTRAINT `FK_m_client_document_m_client` FOREIGN KEY +( + `client_id` +) REFERENCES `m_client` +( + `id` +), + CONSTRAINT `FK_m_client_document_m_code_value` FOREIGN KEY +( + `document_type_id` +) REFERENCES `m_code_value` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_client_identifier: ~0 rows (approximately) /*!40000 ALTER TABLE `m_client_identifier` DISABLE KEYS */; @@ -1115,19 +2865,52 @@ CREATE TABLE IF NOT EXISTS `m_client_identifier` ( -- Dumping structure for table fineract_default.m_client_non_person DROP TABLE IF EXISTS `m_client_non_person`; -CREATE TABLE IF NOT EXISTS `m_client_non_person` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `constitution_cv_id` INT NOT NULL, - `incorp_no` varchar(50) DEFAULT NULL, - `incorp_validity_till` datetime DEFAULT NULL, - `main_business_line_cv_id` INT DEFAULT NULL, - `remarks` varchar(150) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `client_id` (`client_id`), - KEY `FK_client_id` (`client_id`), - CONSTRAINT `FK_client_id` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_client_non_person` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `client_id` + BIGINT + NOT + NULL, + `constitution_cv_id` + INT + NOT + NULL, + `incorp_no` + varchar +( + 50 +) DEFAULT NULL, + `incorp_validity_till` datetime DEFAULT NULL, + `main_business_line_cv_id` INT DEFAULT NULL, + `remarks` varchar +( + 150 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `client_id` +( + `client_id` +), + KEY `FK_client_id` +( + `client_id` +), + CONSTRAINT `FK_client_id` FOREIGN KEY +( + `client_id` +) REFERENCES `m_client` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_client_non_person: ~0 rows (approximately) /*!40000 ALTER TABLE `m_client_non_person` DISABLE KEYS */; @@ -1136,26 +2919,72 @@ CREATE TABLE IF NOT EXISTS `m_client_non_person` ( -- Dumping structure for table fineract_default.m_client_transaction DROP TABLE IF EXISTS `m_client_transaction`; -CREATE TABLE IF NOT EXISTS `m_client_transaction` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `office_id` BIGINT NOT NULL, - `currency_code` varchar(3) NOT NULL, - `payment_detail_id` BIGINT DEFAULT NULL, - `is_reversed` tinyint NOT NULL, - `external_id` varchar(50) DEFAULT NULL, - `transaction_date` date NOT NULL, - `transaction_type_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `created_date` datetime NOT NULL, - `appuser_id` BIGINT NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `external_id` (`external_id`), - KEY `FK_m_client_transaction_m_client` (`client_id`), - KEY `FK_m_client_transaction_m_appuser` (`appuser_id`), - CONSTRAINT `FK_m_client_transaction_m_appuser` FOREIGN KEY (`appuser_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_m_client_transaction_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_client_transaction` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `client_id` + BIGINT + NOT + NULL, + `office_id` + BIGINT + NOT + NULL, + `currency_code` + varchar +( + 3 +) NOT NULL, + `payment_detail_id` BIGINT DEFAULT NULL, + `is_reversed` tinyint NOT NULL, + `external_id` varchar +( + 50 +) DEFAULT NULL, + `transaction_date` date NOT NULL, + `transaction_type_enum` SMALLINT NOT NULL, + `amount` decimal +( + 19, + 6 +) NOT NULL, + `created_date` datetime NOT NULL, + `appuser_id` BIGINT NOT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `external_id` +( + `external_id` +), + KEY `FK_m_client_transaction_m_client` +( + `client_id` +), + KEY `FK_m_client_transaction_m_appuser` +( + `appuser_id` +), + CONSTRAINT `FK_m_client_transaction_m_appuser` FOREIGN KEY +( + `appuser_id` +) REFERENCES `m_appuser` +( + `id` +), + CONSTRAINT `FK_m_client_transaction_m_client` FOREIGN KEY +( + `client_id` +) REFERENCES `m_client` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_client_transaction: ~0 rows (approximately) /*!40000 ALTER TABLE `m_client_transaction` DISABLE KEYS */; @@ -1164,242 +2993,314 @@ CREATE TABLE IF NOT EXISTS `m_client_transaction` ( -- Dumping structure for table fineract_default.m_code DROP TABLE IF EXISTS `m_code`; -CREATE TABLE IF NOT EXISTS `m_code` ( - `id` INT NOT NULL AUTO_INCREMENT, - `code_name` varchar(100) DEFAULT NULL, - `is_system_defined` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `code_name` (`code_name`) -) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_code` +( + `id` + INT + NOT + NULL + AUTO_INCREMENT, + `code_name` + varchar +( + 100 +) DEFAULT NULL, + `is_system_defined` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY +( + `id` +), + UNIQUE KEY `code_name` +( + `code_name` +) + ) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_code: ~28 rows (approximately) /*!40000 ALTER TABLE `m_code` DISABLE KEYS */; -INSERT INTO `m_code` (`id`, `code_name`, `is_system_defined`) VALUES - (1, 'Customer Identifier', 1), - (2, 'LoanCollateral', 1), - (3, 'LoanPurpose', 1), - (4, 'Gender', 1), - (5, 'YesNo', 1), - (6, 'GuarantorRelationship', 1), - (7, 'AssetAccountTags', 1), - (8, 'LiabilityAccountTags', 1), - (9, 'EquityAccountTags', 1), - (10, 'IncomeAccountTags', 1), - (11, 'ExpenseAccountTags', 1), - (13, 'GROUPROLE', 1), - (14, 'ClientClosureReason', 1), - (15, 'GroupClosureReason', 1), - (16, 'ClientType', 1), - (17, 'ClientClassification', 1), - (18, 'ClientSubStatus', 1), - (19, 'ClientRejectReason', 1), - (20, 'ClientWithdrawReason', 1), - (21, 'Entity to Entity Access Types', 1), - (22, 'CenterClosureReason', 1), - (23, 'LoanRescheduleReason', 1), - (24, 'Constitution', 1), - (25, 'Main Business Line', 1), - (26, 'WriteOffReasons', 1), - (27, 'STATE', 1), - (28, 'COUNTRY', 1), - (29, 'ADDRESS_TYPE', 1); +INSERT INTO `m_code` (`id`, `code_name`, `is_system_defined`) +VALUES (1, 'Customer Identifier', 1), + (2, 'LoanCollateral', 1), + (3, 'LoanPurpose', 1), + (4, 'Gender', 1), + (5, 'YesNo', 1), + (6, 'GuarantorRelationship', 1), + (7, 'AssetAccountTags', 1), + (8, 'LiabilityAccountTags', 1), + (9, 'EquityAccountTags', 1), + (10, 'IncomeAccountTags', 1), + (11, 'ExpenseAccountTags', 1), + (13, 'GROUPROLE', 1), + (14, 'ClientClosureReason', 1), + (15, 'GroupClosureReason', 1), + (16, 'ClientType', 1), + (17, 'ClientClassification', 1), + (18, 'ClientSubStatus', 1), + (19, 'ClientRejectReason', 1), + (20, 'ClientWithdrawReason', 1), + (21, 'Entity to Entity Access Types', 1), + (22, 'CenterClosureReason', 1), + (23, 'LoanRescheduleReason', 1), + (24, 'Constitution', 1), + (25, 'Main Business Line', 1), + (26, 'WriteOffReasons', 1), + (27, 'STATE', 1), + (28, 'COUNTRY', 1), + (29, 'ADDRESS_TYPE', 1); /*!40000 ALTER TABLE `m_code` ENABLE KEYS */; -- Dumping structure for table fineract_default.m_code_value DROP TABLE IF EXISTS `m_code_value`; -CREATE TABLE IF NOT EXISTS `m_code_value` ( - `id` INT NOT NULL AUTO_INCREMENT, - `code_id` INT NOT NULL, - `code_value` varchar(100) DEFAULT NULL, - `code_description` varchar(500) DEFAULT NULL, - `order_position` INT NOT NULL DEFAULT '0', - `code_score` INT DEFAULT NULL, - `is_active` tinyint NOT NULL DEFAULT '1', - `is_mandatory` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `code_value` (`code_id`,`code_value`), - KEY `FKCFCEA42640BE071Z` (`code_id`), - CONSTRAINT `FKCFCEA42640BE071Z` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_code_value` +( + `id` + INT + NOT + NULL + AUTO_INCREMENT, + `code_id` + INT + NOT + NULL, + `code_value` + varchar +( + 100 +) DEFAULT NULL, + `code_description` varchar +( + 500 +) DEFAULT NULL, + `order_position` INT NOT NULL DEFAULT '0', + `code_score` INT DEFAULT NULL, + `is_active` tinyint NOT NULL DEFAULT '1', + `is_mandatory` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY +( + `id` +), + UNIQUE KEY `code_value` +( + `code_id`, + `code_value` +), + KEY `FKCFCEA42640BE071Z` +( + `code_id` +), + CONSTRAINT `FKCFCEA42640BE071Z` FOREIGN KEY +( + `code_id` +) REFERENCES `m_code` +( + `id` +) + ) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_code_value: ~13 rows (approximately) /*!40000 ALTER TABLE `m_code_value` DISABLE KEYS */; -INSERT INTO `m_code_value` (`id`, `code_id`, `code_value`, `code_description`, `order_position`, `code_score`, `is_active`, `is_mandatory`) VALUES - (1, 1, 'Passport', NULL, 1, NULL, 1, 0), - (2, 1, 'Id', NULL, 2, NULL, 1, 0), - (3, 1, 'Drivers License', NULL, 3, NULL, 1, 0), - (4, 1, 'Any Other Id Type', NULL, 4, NULL, 1, 0), - (5, 6, 'Spouse', NULL, 0, NULL, 1, 0), - (6, 6, 'Parent', NULL, 0, NULL, 1, 0), - (7, 6, 'Sibling', NULL, 0, NULL, 1, 0), - (8, 6, 'Business Associate', NULL, 0, NULL, 1, 0), - (9, 6, 'Other', NULL, 0, NULL, 1, 0), - (10, 21, 'Office Access to Loan Products', NULL, 0, NULL, 1, 0), - (11, 21, 'Office Access to Savings Products', NULL, 0, NULL, 1, 0), - (12, 21, 'Office Access to Fees/Charges', NULL, 0, NULL, 1, 0), - (13, 13, 'Leader', 'Group Leader Role', 1, NULL, 1, 0); +INSERT INTO `m_code_value` (`id`, `code_id`, `code_value`, `code_description`, `order_position`, `code_score`, + `is_active`, `is_mandatory`) +VALUES (1, 1, 'Passport', NULL, 1, NULL, 1, 0), + (2, 1, 'Id', NULL, 2, NULL, 1, 0), + (3, 1, 'Drivers License', NULL, 3, NULL, 1, 0), + (4, 1, 'Any Other Id Type', NULL, 4, NULL, 1, 0), + (5, 6, 'Spouse', NULL, 0, NULL, 1, 0), + (6, 6, 'Parent', NULL, 0, NULL, 1, 0), + (7, 6, 'Sibling', NULL, 0, NULL, 1, 0), + (8, 6, 'Business Associate', NULL, 0, NULL, 1, 0), + (9, 6, 'Other', NULL, 0, NULL, 1, 0), + (10, 21, 'Office Access to Loan Products', NULL, 0, NULL, 1, 0), + (11, 21, 'Office Access to Savings Products', NULL, 0, NULL, 1, 0), + (12, 21, 'Office Access to Fees/Charges', NULL, 0, NULL, 1, 0), + (13, 13, 'Leader', 'Group Leader Role', 1, NULL, 1, 0); /*!40000 ALTER TABLE `m_code_value` ENABLE KEYS */; -- Dumping structure for table fineract_default.m_currency DROP TABLE IF EXISTS `m_currency`; -CREATE TABLE IF NOT EXISTS `m_currency` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `code` varchar(3) NOT NULL, - `decimal_places` SMALLINT NOT NULL, - `currency_multiplesof` SMALLINT DEFAULT NULL, - `display_symbol` varchar(10) DEFAULT NULL, - `name` varchar(50) NOT NULL, - `internationalized_name_code` varchar(50) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `code` (`code`) -) ENGINE=InnoDB AUTO_INCREMENT=164 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_currency` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `code` + varchar +( + 3 +) NOT NULL, + `decimal_places` SMALLINT NOT NULL, + `currency_multiplesof` SMALLINT DEFAULT NULL, + `display_symbol` varchar +( + 10 +) DEFAULT NULL, + `name` varchar +( + 50 +) NOT NULL, + `internationalized_name_code` varchar +( + 50 +) NOT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `code` +( + `code` +) + ) ENGINE=InnoDB AUTO_INCREMENT=164 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.m_currency: ~163 rows (approximately) /*!40000 ALTER TABLE `m_currency` DISABLE KEYS */; -INSERT INTO `m_currency` (`id`, `code`, `decimal_places`, `currency_multiplesof`, `display_symbol`, `name`, `internationalized_name_code`) VALUES - (1, 'AED', 2, NULL, NULL, 'UAE Dirham', 'currency.AED'), - (2, 'AFN', 2, NULL, NULL, 'Afghanistan Afghani', 'currency.AFN'), - (3, 'ALL', 2, NULL, NULL, 'Albanian Lek', 'currency.ALL'), - (4, 'AMD', 2, NULL, NULL, 'Armenian Dram', 'currency.AMD'), - (5, 'ANG', 2, NULL, NULL, 'Netherlands Antillian Guilder', 'currency.ANG'), - (6, 'AOA', 2, NULL, NULL, 'Angolan Kwanza', 'currency.AOA'), - (7, 'ARS', 2, NULL, '$', 'Argentine Peso', 'currency.ARS'), - (8, 'AUD', 2, NULL, 'A$', 'Australian Dollar', 'currency.AUD'), - (9, 'AWG', 2, NULL, NULL, 'Aruban Guilder', 'currency.AWG'), - (10, 'AZM', 2, NULL, NULL, 'Azerbaijanian Manat', 'currency.AZM'), - (11, 'BAM', 2, NULL, NULL, 'Bosnia and Herzegovina Convertible Marks', 'currency.BAM'), - (12, 'BBD', 2, NULL, NULL, 'Barbados Dollar', 'currency.BBD'), - (13, 'BDT', 2, NULL, NULL, 'Bangladesh Taka', 'currency.BDT'), - (14, 'BGN', 2, NULL, NULL, 'Bulgarian Lev', 'currency.BGN'), - (15, 'BHD', 3, NULL, NULL, 'Bahraini Dinar', 'currency.BHD'), - (16, 'BIF', 0, NULL, NULL, 'Burundi Franc', 'currency.BIF'), - (17, 'BMD', 2, NULL, NULL, 'Bermudian Dollar', 'currency.BMD'), - (18, 'BND', 2, NULL, 'B$', 'Brunei Dollar', 'currency.BND'), - (19, 'BOB', 2, NULL, 'Bs.', 'Bolivian Boliviano', 'currency.BOB'), - (20, 'BRL', 2, NULL, 'R$', 'Brazilian Real', 'currency.BRL'), - (21, 'BSD', 2, NULL, NULL, 'Bahamian Dollar', 'currency.BSD'), - (22, 'BTN', 2, NULL, NULL, 'Bhutan Ngultrum', 'currency.BTN'), - (23, 'BWP', 2, NULL, NULL, 'Botswana Pula', 'currency.BWP'), - (24, 'BYR', 0, NULL, NULL, 'Belarussian Ruble', 'currency.BYR'), - (25, 'BZD', 2, NULL, 'BZ$', 'Belize Dollar', 'currency.BZD'), - (26, 'CAD', 2, NULL, NULL, 'Canadian Dollar', 'currency.CAD'), - (27, 'CDF', 2, NULL, NULL, 'Franc Congolais', 'currency.CDF'), - (28, 'CHF', 2, NULL, NULL, 'Swiss Franc', 'currency.CHF'), - (29, 'CLP', 0, NULL, '$', 'Chilean Peso', 'currency.CLP'), - (30, 'CNY', 2, NULL, NULL, 'Chinese Yuan Renminbi', 'currency.CNY'), - (31, 'COP', 2, NULL, '$', 'Colombian Peso', 'currency.COP'), - (32, 'CRC', 2, NULL, '¢', 'Costa Rican Colon', 'currency.CRC'), - (33, 'CSD', 2, NULL, NULL, 'Serbian Dinar', 'currency.CSD'), - (34, 'CUP', 2, NULL, '$MN', 'Cuban Peso', 'currency.CUP'), - (35, 'CVE', 2, NULL, NULL, 'Cape Verde Escudo', 'currency.CVE'), - (36, 'CYP', 2, NULL, NULL, 'Cyprus Pound', 'currency.CYP'), - (37, 'CZK', 2, NULL, NULL, 'Czech Koruna', 'currency.CZK'), - (38, 'DJF', 0, NULL, NULL, 'Djibouti Franc', 'currency.DJF'), - (39, 'DKK', 2, NULL, NULL, 'Danish Krone', 'currency.DKK'), - (40, 'DOP', 2, NULL, 'RD$', 'Dominican Peso', 'currency.DOP'), - (41, 'DZD', 2, NULL, NULL, 'Algerian Dinar', 'currency.DZD'), - (42, 'EEK', 2, NULL, NULL, 'Estonian Kroon', 'currency.EEK'), - (43, 'EGP', 2, NULL, NULL, 'Egyptian Pound', 'currency.EGP'), - (44, 'ERN', 2, NULL, NULL, 'Eritrea Nafka', 'currency.ERN'), - (45, 'ETB', 2, NULL, NULL, 'Ethiopian Birr', 'currency.ETB'), - (46, 'EUR', 2, NULL, '€', 'Euro', 'currency.EUR'), - (47, 'FJD', 2, NULL, NULL, 'Fiji Dollar', 'currency.FJD'), - (48, 'FKP', 2, NULL, NULL, 'Falkland Islands Pound', 'currency.FKP'), - (49, 'GBP', 2, NULL, NULL, 'Pound Sterling', 'currency.GBP'), - (50, 'GEL', 2, NULL, NULL, 'Georgian Lari', 'currency.GEL'), - (51, 'GHC', 2, NULL, 'GHc', 'Ghana Cedi', 'currency.GHC'), - (52, 'GIP', 2, NULL, NULL, 'Gibraltar Pound', 'currency.GIP'), - (53, 'GMD', 2, NULL, NULL, 'Gambian Dalasi', 'currency.GMD'), - (54, 'GNF', 0, NULL, NULL, 'Guinea Franc', 'currency.GNF'), - (55, 'GTQ', 2, NULL, 'Q', 'Guatemala Quetzal', 'currency.GTQ'), - (56, 'GYD', 2, NULL, NULL, 'Guyana Dollar', 'currency.GYD'), - (57, 'HKD', 2, NULL, NULL, 'Hong Kong Dollar', 'currency.HKD'), - (58, 'HNL', 2, NULL, 'L', 'Honduras Lempira', 'currency.HNL'), - (59, 'HRK', 2, NULL, NULL, 'Croatian Kuna', 'currency.HRK'), - (60, 'HTG', 2, NULL, 'G', 'Haiti Gourde', 'currency.HTG'), - (61, 'HUF', 2, NULL, NULL, 'Hungarian Forint', 'currency.HUF'), - (62, 'IDR', 2, NULL, NULL, 'Indonesian Rupiah', 'currency.IDR'), - (63, 'ILS', 2, NULL, NULL, 'New Israeli Shekel', 'currency.ILS'), - (64, 'INR', 2, NULL, '?', 'Indian Rupee', 'currency.INR'), - (65, 'IQD', 3, NULL, NULL, 'Iraqi Dinar', 'currency.IQD'), - (66, 'IRR', 2, NULL, NULL, 'Iranian Rial', 'currency.IRR'), - (67, 'ISK', 0, NULL, NULL, 'Iceland Krona', 'currency.ISK'), - (68, 'JMD', 2, NULL, NULL, 'Jamaican Dollar', 'currency.JMD'), - (69, 'JOD', 3, NULL, NULL, 'Jordanian Dinar', 'currency.JOD'), - (70, 'JPY', 0, NULL, NULL, 'Japanese Yen', 'currency.JPY'), - (71, 'KES', 2, NULL, 'KSh', 'Kenyan Shilling', 'currency.KES'), - (72, 'KGS', 2, NULL, NULL, 'Kyrgyzstan Som', 'currency.KGS'), - (73, 'KHR', 2, NULL, NULL, 'Cambodia Riel', 'currency.KHR'), - (74, 'KMF', 0, NULL, NULL, 'Comoro Franc', 'currency.KMF'), - (75, 'KPW', 2, NULL, NULL, 'North Korean Won', 'currency.KPW'), - (76, 'KRW', 0, NULL, NULL, 'Korean Won', 'currency.KRW'), - (77, 'KWD', 3, NULL, NULL, 'Kuwaiti Dinar', 'currency.KWD'), - (78, 'KYD', 2, NULL, NULL, 'Cayman Islands Dollar', 'currency.KYD'), - (79, 'KZT', 2, NULL, NULL, 'Kazakhstan Tenge', 'currency.KZT'), - (80, 'LAK', 2, NULL, NULL, 'Lao Kip', 'currency.LAK'), - (81, 'LBP', 2, NULL, 'L£', 'Lebanese Pound', 'currency.LBP'), - (82, 'LKR', 2, NULL, NULL, 'Sri Lanka Rupee', 'currency.LKR'), - (83, 'LRD', 2, NULL, NULL, 'Liberian Dollar', 'currency.LRD'), - (84, 'LSL', 2, NULL, NULL, 'Lesotho Loti', 'currency.LSL'), - (85, 'LTL', 2, NULL, NULL, 'Lithuanian Litas', 'currency.LTL'), - (86, 'LVL', 2, NULL, NULL, 'Latvian Lats', 'currency.LVL'), - (87, 'LYD', 3, NULL, NULL, 'Libyan Dinar', 'currency.LYD'), - (88, 'MAD', 2, NULL, NULL, 'Moroccan Dirham', 'currency.MAD'), - (89, 'MDL', 2, NULL, NULL, 'Moldovan Leu', 'currency.MDL'), - (90, 'MGA', 2, NULL, NULL, 'Malagasy Ariary', 'currency.MGA'), - (91, 'MKD', 2, NULL, NULL, 'Macedonian Denar', 'currency.MKD'), - (92, 'MMK', 2, NULL, 'K', 'Myanmar Kyat', 'currency.MMK'), - (93, 'MNT', 2, NULL, NULL, 'Mongolian Tugrik', 'currency.MNT'), - (94, 'MOP', 2, NULL, NULL, 'Macau Pataca', 'currency.MOP'), - (95, 'MRO', 2, NULL, NULL, 'Mauritania Ouguiya', 'currency.MRO'), - (96, 'MTL', 2, NULL, NULL, 'Maltese Lira', 'currency.MTL'), - (97, 'MUR', 2, NULL, NULL, 'Mauritius Rupee', 'currency.MUR'), - (98, 'MVR', 2, NULL, NULL, 'Maldives Rufiyaa', 'currency.MVR'), - (99, 'MWK', 2, NULL, NULL, 'Malawi Kwacha', 'currency.MWK'), - (100, 'MXN', 2, NULL, '$', 'Mexican Peso', 'currency.MXN'), - (101, 'MYR', 2, NULL, NULL, 'Malaysian Ringgit', 'currency.MYR'), - (102, 'MZM', 2, NULL, NULL, 'Mozambique Metical', 'currency.MZM'), - (103, 'NAD', 2, NULL, NULL, 'Namibia Dollar', 'currency.NAD'), - (104, 'NGN', 2, NULL, NULL, 'Nigerian Naira', 'currency.NGN'), - (105, 'NIO', 2, NULL, 'C$', 'Nicaragua Cordoba Oro', 'currency.NIO'), - (106, 'NOK', 2, NULL, NULL, 'Norwegian Krone', 'currency.NOK'), - (107, 'NPR', 2, NULL, NULL, 'Nepalese Rupee', 'currency.NPR'), - (108, 'NZD', 2, NULL, NULL, 'New Zealand Dollar', 'currency.NZD'), - (109, 'OMR', 3, NULL, NULL, 'Rial Omani', 'currency.OMR'), - (110, 'PAB', 2, NULL, 'B/.', 'Panama Balboa', 'currency.PAB'), - (111, 'PEN', 2, NULL, 'S/.', 'Peruvian Nuevo Sol', 'currency.PEN'), - (112, 'PGK', 2, NULL, NULL, 'Papua New Guinea Kina', 'currency.PGK'), - (113, 'PHP', 2, NULL, NULL, 'Philippine Peso', 'currency.PHP'), - (114, 'PKR', 2, NULL, NULL, 'Pakistan Rupee', 'currency.PKR'), - (115, 'PLN', 2, NULL, NULL, 'Polish Zloty', 'currency.PLN'), - (116, 'PYG', 0, NULL, '?', 'Paraguayan Guarani', 'currency.PYG'), - (117, 'QAR', 2, NULL, NULL, 'Qatari Rial', 'currency.QAR'), - (118, 'RON', 2, NULL, NULL, 'Romanian Leu', 'currency.RON'), - (119, 'RUB', 2, NULL, NULL, 'Russian Ruble', 'currency.RUB'), - (120, 'RWF', 0, NULL, NULL, 'Rwanda Franc', 'currency.RWF'), - (121, 'SAR', 2, NULL, NULL, 'Saudi Riyal', 'currency.SAR'), - (122, 'SBD', 2, NULL, NULL, 'Solomon Islands Dollar', 'currency.SBD'), - (123, 'SCR', 2, NULL, NULL, 'Seychelles Rupee', 'currency.SCR'), - (124, 'SDD', 2, NULL, NULL, 'Sudanese Dinar', 'currency.SDD'), - (125, 'SEK', 2, NULL, NULL, 'Swedish Krona', 'currency.SEK'), - (126, 'SGD', 2, NULL, NULL, 'Singapore Dollar', 'currency.SGD'), - (127, 'SHP', 2, NULL, NULL, 'St Helena Pound', 'currency.SHP'), - (128, 'SIT', 2, NULL, NULL, 'Slovenian Tolar', 'currency.SIT'), - (129, 'SKK', 2, NULL, NULL, 'Slovak Koruna', 'currency.SKK'), - (130, 'SLL', 2, NULL, NULL, 'Sierra Leone Leone', 'currency.SLL'), - (131, 'SOS', 2, NULL, NULL, 'Somali Shilling', 'currency.SOS'), - (132, 'SRD', 2, NULL, NULL, 'Surinam Dollar', 'currency.SRD'), - (133, 'STD', 2, NULL, NULL, 'Sao Tome and Principe Dobra', 'currency.STD'), - (134, 'SVC', 2, NULL, NULL, 'El Salvador Colon', 'currency.SVC'), - (135, 'SYP', 2, NULL, NULL, 'Syrian Pound', 'currency.SYP'), - (136, 'SZL', 2, NULL, NULL, 'Swaziland Lilangeni', 'currency.SZL'), - (137, 'THB', 2, NULL, NULL, 'Thai Baht', 'currency.THB'), - (138, 'TJS', 2, NULL, NULL, 'Tajik Somoni', 'currency.TJS'), - (139, 'TMM', 2, NULL, NULL, 'Turkmenistan Manat', 'currency.TMM'), - (140, 'TND', 3, NULL, 'DT', 'Tunisian Dinar', 'currency.TND'), - (141, 'TOP', 2, NULL, NULL, 'Tonga Pa\'anga', 'currency.TOP'), +INSERT INTO `m_currency` (`id`, `code`, `decimal_places`, `currency_multiplesof`, `display_symbol`, `name`, + `internationalized_name_code`) +VALUES (1, 'AED', 2, NULL, NULL, 'UAE Dirham', 'currency.AED'), + (2, 'AFN', 2, NULL, NULL, 'Afghanistan Afghani', 'currency.AFN'), + (3, 'ALL', 2, NULL, NULL, 'Albanian Lek', 'currency.ALL'), + (4, 'AMD', 2, NULL, NULL, 'Armenian Dram', 'currency.AMD'), + (5, 'ANG', 2, NULL, NULL, 'Netherlands Antillian Guilder', 'currency.ANG'), + (6, 'AOA', 2, NULL, NULL, 'Angolan Kwanza', 'currency.AOA'), + (7, 'ARS', 2, NULL, '$', 'Argentine Peso', 'currency.ARS'), + (8, 'AUD', 2, NULL, 'A$', 'Australian Dollar', 'currency.AUD'), + (9, 'AWG', 2, NULL, NULL, 'Aruban Guilder', 'currency.AWG'), + (10, 'AZM', 2, NULL, NULL, 'Azerbaijanian Manat', 'currency.AZM'), + (11, 'BAM', 2, NULL, NULL, 'Bosnia and Herzegovina Convertible Marks', 'currency.BAM'), + (12, 'BBD', 2, NULL, NULL, 'Barbados Dollar', 'currency.BBD'), + (13, 'BDT', 2, NULL, NULL, 'Bangladesh Taka', 'currency.BDT'), + (14, 'BGN', 2, NULL, NULL, 'Bulgarian Lev', 'currency.BGN'), + (15, 'BHD', 3, NULL, NULL, 'Bahraini Dinar', 'currency.BHD'), + (16, 'BIF', 0, NULL, NULL, 'Burundi Franc', 'currency.BIF'), + (17, 'BMD', 2, NULL, NULL, 'Bermudian Dollar', 'currency.BMD'), + (18, 'BND', 2, NULL, 'B$', 'Brunei Dollar', 'currency.BND'), + (19, 'BOB', 2, NULL, 'Bs.', 'Bolivian Boliviano', 'currency.BOB'), + (20, 'BRL', 2, NULL, 'R$', 'Brazilian Real', 'currency.BRL'), + (21, 'BSD', 2, NULL, NULL, 'Bahamian Dollar', 'currency.BSD'), + (22, 'BTN', 2, NULL, NULL, 'Bhutan Ngultrum', 'currency.BTN'), + (23, 'BWP', 2, NULL, NULL, 'Botswana Pula', 'currency.BWP'), + (24, 'BYR', 0, NULL, NULL, 'Belarussian Ruble', 'currency.BYR'), + (25, 'BZD', 2, NULL, 'BZ$', 'Belize Dollar', 'currency.BZD'), + (26, 'CAD', 2, NULL, NULL, 'Canadian Dollar', 'currency.CAD'), + (27, 'CDF', 2, NULL, NULL, 'Franc Congolais', 'currency.CDF'), + (28, 'CHF', 2, NULL, NULL, 'Swiss Franc', 'currency.CHF'), + (29, 'CLP', 0, NULL, '$', 'Chilean Peso', 'currency.CLP'), + (30, 'CNY', 2, NULL, NULL, 'Chinese Yuan Renminbi', 'currency.CNY'), + (31, 'COP', 2, NULL, '$', 'Colombian Peso', 'currency.COP'), + (32, 'CRC', 2, NULL, '¢', 'Costa Rican Colon', 'currency.CRC'), + (33, 'CSD', 2, NULL, NULL, 'Serbian Dinar', 'currency.CSD'), + (34, 'CUP', 2, NULL, '$MN', 'Cuban Peso', 'currency.CUP'), + (35, 'CVE', 2, NULL, NULL, 'Cape Verde Escudo', 'currency.CVE'), + (36, 'CYP', 2, NULL, NULL, 'Cyprus Pound', 'currency.CYP'), + (37, 'CZK', 2, NULL, NULL, 'Czech Koruna', 'currency.CZK'), + (38, 'DJF', 0, NULL, NULL, 'Djibouti Franc', 'currency.DJF'), + (39, 'DKK', 2, NULL, NULL, 'Danish Krone', 'currency.DKK'), + (40, 'DOP', 2, NULL, 'RD$', 'Dominican Peso', 'currency.DOP'), + (41, 'DZD', 2, NULL, NULL, 'Algerian Dinar', 'currency.DZD'), + (42, 'EEK', 2, NULL, NULL, 'Estonian Kroon', 'currency.EEK'), + (43, 'EGP', 2, NULL, NULL, 'Egyptian Pound', 'currency.EGP'), + (44, 'ERN', 2, NULL, NULL, 'Eritrea Nafka', 'currency.ERN'), + (45, 'ETB', 2, NULL, NULL, 'Ethiopian Birr', 'currency.ETB'), + (46, 'EUR', 2, NULL, '€', 'Euro', 'currency.EUR'), + (47, 'FJD', 2, NULL, NULL, 'Fiji Dollar', 'currency.FJD'), + (48, 'FKP', 2, NULL, NULL, 'Falkland Islands Pound', 'currency.FKP'), + (49, 'GBP', 2, NULL, NULL, 'Pound Sterling', 'currency.GBP'), + (50, 'GEL', 2, NULL, NULL, 'Georgian Lari', 'currency.GEL'), + (51, 'GHC', 2, NULL, 'GHc', 'Ghana Cedi', 'currency.GHC'), + (52, 'GIP', 2, NULL, NULL, 'Gibraltar Pound', 'currency.GIP'), + (53, 'GMD', 2, NULL, NULL, 'Gambian Dalasi', 'currency.GMD'), + (54, 'GNF', 0, NULL, NULL, 'Guinea Franc', 'currency.GNF'), + (55, 'GTQ', 2, NULL, 'Q', 'Guatemala Quetzal', 'currency.GTQ'), + (56, 'GYD', 2, NULL, NULL, 'Guyana Dollar', 'currency.GYD'), + (57, 'HKD', 2, NULL, NULL, 'Hong Kong Dollar', 'currency.HKD'), + (58, 'HNL', 2, NULL, 'L', 'Honduras Lempira', 'currency.HNL'), + (59, 'HRK', 2, NULL, NULL, 'Croatian Kuna', 'currency.HRK'), + (60, 'HTG', 2, NULL, 'G', 'Haiti Gourde', 'currency.HTG'), + (61, 'HUF', 2, NULL, NULL, 'Hungarian Forint', 'currency.HUF'), + (62, 'IDR', 2, NULL, NULL, 'Indonesian Rupiah', 'currency.IDR'), + (63, 'ILS', 2, NULL, NULL, 'New Israeli Shekel', 'currency.ILS'), + (64, 'INR', 2, NULL, '?', 'Indian Rupee', 'currency.INR'), + (65, 'IQD', 3, NULL, NULL, 'Iraqi Dinar', 'currency.IQD'), + (66, 'IRR', 2, NULL, NULL, 'Iranian Rial', 'currency.IRR'), + (67, 'ISK', 0, NULL, NULL, 'Iceland Krona', 'currency.ISK'), + (68, 'JMD', 2, NULL, NULL, 'Jamaican Dollar', 'currency.JMD'), + (69, 'JOD', 3, NULL, NULL, 'Jordanian Dinar', 'currency.JOD'), + (70, 'JPY', 0, NULL, NULL, 'Japanese Yen', 'currency.JPY'), + (71, 'KES', 2, NULL, 'KSh', 'Kenyan Shilling', 'currency.KES'), + (72, 'KGS', 2, NULL, NULL, 'Kyrgyzstan Som', 'currency.KGS'), + (73, 'KHR', 2, NULL, NULL, 'Cambodia Riel', 'currency.KHR'), + (74, 'KMF', 0, NULL, NULL, 'Comoro Franc', 'currency.KMF'), + (75, 'KPW', 2, NULL, NULL, 'North Korean Won', 'currency.KPW'), + (76, 'KRW', 0, NULL, NULL, 'Korean Won', 'currency.KRW'), + (77, 'KWD', 3, NULL, NULL, 'Kuwaiti Dinar', 'currency.KWD'), + (78, 'KYD', 2, NULL, NULL, 'Cayman Islands Dollar', 'currency.KYD'), + (79, 'KZT', 2, NULL, NULL, 'Kazakhstan Tenge', 'currency.KZT'), + (80, 'LAK', 2, NULL, NULL, 'Lao Kip', 'currency.LAK'), + (81, 'LBP', 2, NULL, 'L£', 'Lebanese Pound', 'currency.LBP'), + (82, 'LKR', 2, NULL, NULL, 'Sri Lanka Rupee', 'currency.LKR'), + (83, 'LRD', 2, NULL, NULL, 'Liberian Dollar', 'currency.LRD'), + (84, 'LSL', 2, NULL, NULL, 'Lesotho Loti', 'currency.LSL'), + (85, 'LTL', 2, NULL, NULL, 'Lithuanian Litas', 'currency.LTL'), + (86, 'LVL', 2, NULL, NULL, 'Latvian Lats', 'currency.LVL'), + (87, 'LYD', 3, NULL, NULL, 'Libyan Dinar', 'currency.LYD'), + (88, 'MAD', 2, NULL, NULL, 'Moroccan Dirham', 'currency.MAD'), + (89, 'MDL', 2, NULL, NULL, 'Moldovan Leu', 'currency.MDL'), + (90, 'MGA', 2, NULL, NULL, 'Malagasy Ariary', 'currency.MGA'), + (91, 'MKD', 2, NULL, NULL, 'Macedonian Denar', 'currency.MKD'), + (92, 'MMK', 2, NULL, 'K', 'Myanmar Kyat', 'currency.MMK'), + (93, 'MNT', 2, NULL, NULL, 'Mongolian Tugrik', 'currency.MNT'), + (94, 'MOP', 2, NULL, NULL, 'Macau Pataca', 'currency.MOP'), + (95, 'MRO', 2, NULL, NULL, 'Mauritania Ouguiya', 'currency.MRO'), + (96, 'MTL', 2, NULL, NULL, 'Maltese Lira', 'currency.MTL'), + (97, 'MUR', 2, NULL, NULL, 'Mauritius Rupee', 'currency.MUR'), + (98, 'MVR', 2, NULL, NULL, 'Maldives Rufiyaa', 'currency.MVR'), + (99, 'MWK', 2, NULL, NULL, 'Malawi Kwacha', 'currency.MWK'), + (100, 'MXN', 2, NULL, '$', 'Mexican Peso', 'currency.MXN'), + (101, 'MYR', 2, NULL, NULL, 'Malaysian Ringgit', 'currency.MYR'), + (102, 'MZM', 2, NULL, NULL, 'Mozambique Metical', 'currency.MZM'), + (103, 'NAD', 2, NULL, NULL, 'Namibia Dollar', 'currency.NAD'), + (104, 'NGN', 2, NULL, NULL, 'Nigerian Naira', 'currency.NGN'), + (105, 'NIO', 2, NULL, 'C$', 'Nicaragua Cordoba Oro', 'currency.NIO'), + (106, 'NOK', 2, NULL, NULL, 'Norwegian Krone', 'currency.NOK'), + (107, 'NPR', 2, NULL, NULL, 'Nepalese Rupee', 'currency.NPR'), + (108, 'NZD', 2, NULL, NULL, 'New Zealand Dollar', 'currency.NZD'), + (109, 'OMR', 3, NULL, NULL, 'Rial Omani', 'currency.OMR'), + (110, 'PAB', 2, NULL, 'B/.', 'Panama Balboa', 'currency.PAB'), + (111, 'PEN', 2, NULL, 'S/.', 'Peruvian Nuevo Sol', 'currency.PEN'), + (112, 'PGK', 2, NULL, NULL, 'Papua New Guinea Kina', 'currency.PGK'), + (113, 'PHP', 2, NULL, NULL, 'Philippine Peso', 'currency.PHP'), + (114, 'PKR', 2, NULL, NULL, 'Pakistan Rupee', 'currency.PKR'), + (115, 'PLN', 2, NULL, NULL, 'Polish Zloty', 'currency.PLN'), + (116, 'PYG', 0, NULL, '?', 'Paraguayan Guarani', 'currency.PYG'), + (117, 'QAR', 2, NULL, NULL, 'Qatari Rial', 'currency.QAR'), + (118, 'RON', 2, NULL, NULL, 'Romanian Leu', 'currency.RON'), + (119, 'RUB', 2, NULL, NULL, 'Russian Ruble', 'currency.RUB'), + (120, 'RWF', 0, NULL, NULL, 'Rwanda Franc', 'currency.RWF'), + (121, 'SAR', 2, NULL, NULL, 'Saudi Riyal', 'currency.SAR'), + (122, 'SBD', 2, NULL, NULL, 'Solomon Islands Dollar', 'currency.SBD'), + (123, 'SCR', 2, NULL, NULL, 'Seychelles Rupee', 'currency.SCR'), + (124, 'SDD', 2, NULL, NULL, 'Sudanese Dinar', 'currency.SDD'), + (125, 'SEK', 2, NULL, NULL, 'Swedish Krona', 'currency.SEK'), + (126, 'SGD', 2, NULL, NULL, 'Singapore Dollar', 'currency.SGD'), + (127, 'SHP', 2, NULL, NULL, 'St Helena Pound', 'currency.SHP'), + (128, 'SIT', 2, NULL, NULL, 'Slovenian Tolar', 'currency.SIT'), + (129, 'SKK', 2, NULL, NULL, 'Slovak Koruna', 'currency.SKK'), + (130, 'SLL', 2, NULL, NULL, 'Sierra Leone Leone', 'currency.SLL'), + (131, 'SOS', 2, NULL, NULL, 'Somali Shilling', 'currency.SOS'), + (132, 'SRD', 2, NULL, NULL, 'Surinam Dollar', 'currency.SRD'), + (133, 'STD', 2, NULL, NULL, 'Sao Tome and Principe Dobra', 'currency.STD'), + (134, 'SVC', 2, NULL, NULL, 'El Salvador Colon', 'currency.SVC'), + (135, 'SYP', 2, NULL, NULL, 'Syrian Pound', 'currency.SYP'), + (136, 'SZL', 2, NULL, NULL, 'Swaziland Lilangeni', 'currency.SZL'), + (137, 'THB', 2, NULL, NULL, 'Thai Baht', 'currency.THB'), + (138, 'TJS', 2, NULL, NULL, 'Tajik Somoni', 'currency.TJS'), + (139, 'TMM', 2, NULL, NULL, 'Turkmenistan Manat', 'currency.TMM'), + (140, 'TND', 3, NULL, 'DT', 'Tunisian Dinar', 'currency.TND'), + (141, 'TOP', 2, NULL, NULL, 'Tonga Pa\'anga', 'currency.TOP'), (142, 'TRY', 2, NULL, NULL, 'Turkish Lira', 'currency.TRY'), (143, 'TTD', 2, NULL, NULL, 'Trinidad and Tobago Dollar', 'currency.TTD'), (144, 'TWD', 2, NULL, NULL, 'New Taiwan Dollar', 'currency.TWD'), @@ -3033,8 +4934,9 @@ CREATE TABLE IF NOT EXISTS `m_password_validation_policy` ( -- Dumping data for table fineract_default.m_password_validation_policy: ~2 rows (approximately) /*!40000 ALTER TABLE `m_password_validation_policy` DISABLE KEYS */; INSERT INTO `m_password_validation_policy` (`id`, `regex`, `description`, `active`, `key`) VALUES - (1, '^.{1,50}$', 'Password most be at least 1 character and not more that 50 characters long', 1, 'simple'), - (2, '^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\\s).{6,50}$', 'Password must be at least 6 characters, no more than 50 characters long, must include at least one upper case letter, one lower case letter, one numeric digit and no space', 0, 'secure'); + (1, '^.{1, 50}$', 'Password most be at least 1 character and not more that 50 characters long', 1, 'simple'), + (2, '^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\\s).{6, 50}$', 'Password must be at least 6 characters, no more than 50 + characters long, must include at least one upper case letter, one lower case letter, one numeric digit and no space', 0, 'secure'); /*!40000 ALTER TABLE `m_password_validation_policy` ENABLE KEYS */; @@ -5366,7 +7268,9 @@ CREATE TABLE IF NOT EXISTS `m_working_days` ( -- Dumping data for table fineract_default.m_working_days: ~1 rows (approximately) /*!40000 ALTER TABLE `m_working_days` DISABLE KEYS */; INSERT INTO `m_working_days` (`id`, `recurrence`, `repayment_rescheduling_enum`, `extend_term_daily_repayments`, `extend_term_holiday_repayment`) VALUES - (1, 'FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA,SU', 2, 0, 0); + (1, 'FREQ=WEEKLY; +INTERVAL=1;BYDAY +=MO,TU,WE,TH,FR,SA,SU', 2, 0, 0); /*!40000 ALTER TABLE `m_working_days` ENABLE KEYS */; @@ -5407,7 +7311,8 @@ CREATE TABLE IF NOT EXISTS `oauth_client_details` ( -- Dumping data for table fineract_default.oauth_client_details: ~0 rows (approximately) /*!40000 ALTER TABLE `oauth_client_details` DISABLE KEYS */; INSERT INTO `oauth_client_details` (`client_id`, `resource_ids`, `client_secret`, `scope`, `authorized_grant_types`, `web_server_redirect_uri`, `authorities`, `access_token_validity`, `refresh_token_validity`, `additional_information`, `autoapprove`) VALUES - ('community-app', NULL, '123', 'all', 'password,refresh_token', NULL, NULL, NULL, NULL, NULL, NULL); + ('community-app', NULL, ' +123', 'all', 'password,refresh_token', NULL, NULL, NULL, NULL, NULL, NULL); /*!40000 ALTER TABLE `oauth_client_details` ENABLE KEYS */; @@ -5444,7 +7349,8 @@ CREATE TABLE IF NOT EXISTS `ppi_likelihoods_ppi` ( `id` BIGINT NOT NULL AUTO_INCREMENT, `likelihood_id` BIGINT NOT NULL, `ppi_name` varchar(250) NOT NULL, - `enabled` INT NOT NULL DEFAULT '100', + `enabled` INT NOT NULL DEFAULT ' +100', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; @@ -5684,9 +7590,12 @@ INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `en DROP TABLE IF EXISTS `scheduler_detail`; CREATE TABLE IF NOT EXISTS `scheduler_detail` ( `id` SMALLINT NOT NULL AUTO_INCREMENT, - `is_suspended` tinyint NOT NULL DEFAULT '0', - `execute_misfired_jobs` tinyint NOT NULL DEFAULT '1', - `reset_scheduler_on_bootup` tinyint NOT NULL DEFAULT '1', + `is_suspended` tinyint NOT NULL DEFAULT ' +0', + `execute_misfired_jobs` tinyint NOT NULL DEFAULT ' +1', + `reset_scheduler_on_bootup` tinyint NOT NULL DEFAULT ' +1', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; @@ -5720,343 +7629,1354 @@ CREATE TABLE IF NOT EXISTS `schema_version` ( -- Dumping data for table fineract_default.schema_version: ~337 rows (approximately) /*!40000 ALTER TABLE `schema_version` DISABLE KEYS */; INSERT INTO `schema_version` (`version_rank`, `installed_rank`, `version`, `description`, `type`, `script`, `checksum`, `installed_by`, `installed_on`, `execution_time`, `success`) VALUES - (1, 1, '1', 'mifosplatform-core-ddl-latest', 'SQL', 'V1__mifosplatform-core-ddl-latest.sql', 1800446512, 'root', '2015-06-03 15:26:50', 919, 1), - (10, 10, '10', 'interest-posting-fields-for-savings', 'SQL', 'V10__interest-posting-fields-for-savings.sql', 921633032, 'root', '2015-06-03 15:26:51', 300, 1), - (100, 100, '100', 'Group saving summary report', 'SQL', 'V100__Group_saving_summary_report.sql', -1635399448, 'root', '2015-06-03 15:26:58', 1, 1), - (101, 101, '101', 'add mulitplesof to account transfers table', 'SQL', 'V101__add_mulitplesof_to_account_transfers_table.sql', 693007396, 'root', '2015-06-03 15:26:58', 109, 1), - (102, 102, '102', 'client attendance tables', 'SQL', 'V102__client_attendance_tables.sql', 1698025788, 'root', '2015-06-03 15:26:58', 48, 1), - (103, 103, '103', 'cluster support for batch jobs', 'SQL', 'V103__cluster_support_for_batch_jobs.sql', -1566474883, 'root', '2015-06-03 15:26:58', 49, 1), - (104, 104, '104', 'permissions for transfers', 'SQL', 'V104__permissions_for_transfers.sql', 1104237193, 'root', '2015-06-03 15:26:58', 2, 1), - (105, 105, '105', 'track loan transaction against office', 'SQL', 'V105__track_loan_transaction_against_office.sql', 460401960, 'root', '2015-06-03 15:26:59', 225, 1), - (106, 106, '106', 'more permissions for transfers', 'SQL', 'V106__more_permissions_for_transfers.sql', -1298572248, 'root', '2015-06-03 15:26:59', 4, 1), - (107, 107, '107', 'datatable code mappings', 'SQL', 'V107__datatable_code_mappings.sql', 1534043325, 'root', '2015-06-03 15:26:59', 37, 1), - (108, 108, '108', 'client has transfer office', 'SQL', 'V108__client_has_transfer_office.sql', 1659150580, 'root', '2015-06-03 15:26:59', 19, 1), - (109, 109, '109', 'account transfer withdrawal fee configuration', 'SQL', 'V109__account_transfer_withdrawal_fee_configuration.sql', 1610197449, 'root', '2015-06-03 15:26:59', 80, 1), - (11, 11, '11', 'add-payment-details', 'SQL', 'V11__add-payment-details.sql', 662675601, 'root', '2015-06-03 15:26:52', 88, 1), - (110, 110, '110', 'group center close', 'SQL', 'V110__group_center_close.sql', 592532718, 'root', '2015-06-03 15:26:59', 38, 1), - (111, 111, '111', 'disable constraint approach for datatables by default', 'SQL', 'V111__disable_constraint_approach_for_datatables_by_default.sql', 2058257907, 'root', '2015-06-03 15:26:59', 1, 1), - (112, 112, '111.1', 'set default transfers in suspense account for existing loan products', 'SQL', 'V111_1__set default_transfers_in_suspense_account_for_existing_loan_products.sql', -2022488149, 'root', '2015-06-03 15:26:59', 1, 1), - (113, 113, '112', 'mixreport sql support', 'SQL', 'V112__mixreport_sql_support.sql', 1698359442, 'root', '2015-06-03 15:26:59', 84, 1), - (114, 114, '113', 'track savings transaction against office', 'SQL', 'V113__track_savings_transaction_against_office.sql', -443279148, 'root', '2015-06-03 15:26:59', 106, 1), - (115, 115, '114', 'set default transfers in suspense account for existing savings products - Copy', 'SQL', 'V114__set_default_transfers_in_suspense_account_for_existing_savings_products - Copy.sql', -1403120536, 'root', '2015-06-03 15:26:59', 1, 1), - (116, 116, '115', 'permissions for cache api', 'SQL', 'V115__permissions_for_cache_api.sql', -1583242502, 'root', '2015-06-03 15:26:59', 26, 1), - (117, 117, '116', 'track currency for journal entries', 'SQL', 'V116__track_currency_for_journal_entries.sql', -1108820305, 'root', '2015-06-03 15:26:59', 127, 1), - (118, 118, '117', 'loan charge from savings', 'SQL', 'V117__loan_charge_from_savings.sql', 294078650, 'root', '2015-06-03 15:27:00', 106, 1), - (119, 119, '118', 'savings charge', 'SQL', 'V118__savings_charge.sql', 1334878019, 'root', '2015-06-03 15:27:00', 89, 1), - (120, 120, '118.1', 'savings charge patch update', 'SQL', 'V118_1__savings_charge_patch_update.sql', 681062374, 'root', '2015-06-03 15:27:00', 42, 1), - (121, 121, '118.2', 'product mapping delete duplicate fund source to account mappings', 'SQL', 'V118_2__product_mapping_delete_duplicate_fund_source_to_account_mappings.sql', 843735115, 'root', '2015-06-03 15:27:00', 0, 1), - (122, 122, '118.3', 'permissions form propose and accept client transfers', 'SQL', 'V118_3__permissions_form_propose_and_accept_client_transfers.sql', -2021972980, 'root', '2015-06-03 15:27:00', 2, 1), - (123, 123, '118.4', 'reset default transfers in suspense account for existing savings products', 'SQL', 'V118_4__reset_default_transfers_in_suspense_account_for_existing_savings_products.sql', -699275732, 'root', '2015-06-03 15:27:00', 1, 1), - (124, 124, '118.5', 'batch job entry for pay savings charge', 'SQL', 'V118_5__batch_job_entry_for_pay_savings_charge.sql', 11127915, 'root', '2015-06-03 15:27:00', 1, 1), - (125, 125, '118.6', 'defaults for income from penalties for savings product', 'SQL', 'V118_6__defaults_for_income_from_penalties_for savings_product.sql', -1604260872, 'root', '2015-06-03 15:27:00', 2, 1), - (126, 126, '118.7', 'move withdrawal annual fee to charges', 'SQL', 'V118_7__move_withdrawal_annual_fee_to_charges.sql', 486907496, 'root', '2015-06-03 15:27:00', 166, 1), - (127, 127, '118.8', 'track overpayments seperately in loan transactions', 'SQL', 'V118_8__track_overpayments_seperately_in_loan_transactions.sql', -1506771861, 'root', '2015-06-03 15:27:00', 145, 1), - (128, 128, '119', 'add template table', 'SQL', 'V119__add_template_table.sql', -340132249, 'root', '2015-06-03 15:27:00', 45, 1), - (12, 12, '12', 'add external id to couple of tables', 'SQL', 'V12__add_external_id_to_couple_of_tables.sql', 1782914953, 'root', '2015-06-03 15:26:52', 214, 1), - (129, 129, '120', 'accounting running balance', 'SQL', 'V120__accounting_running_balance.sql', 1553735313, 'root', '2015-06-03 15:27:00', 39, 1), - (130, 130, '121', 'accounting running balance for organization', 'SQL', 'V121__accounting_running_balance_for_organization.sql', -725212393, 'root', '2015-06-03 15:27:00', 63, 1), - (131, 131, '122', 'recurring fee support for savings', 'SQL', 'V122__recurring_fee_support_for_savings.sql', -1243503882, 'root', '2015-06-03 15:27:01', 77, 1), - (132, 132, '123', 'remove payment mode for savings', 'SQL', 'V123__remove_payment_mode_for_savings.sql', -310516979, 'root', '2015-06-03 15:27:01', 52, 1), - (133, 133, '124', 'added min max cap for charges', 'SQL', 'V124__added_min_max_cap_for_charges.sql', 1016982354, 'root', '2015-06-03 15:27:01', 71, 1), - (134, 134, '125', 'added column for actual fee amount or percentage', 'SQL', 'V125__added_column_for_actual_fee_amount_or_percentage.sql', -1902751935, 'root', '2015-06-03 15:27:01', 42, 1), - (135, 135, '126', 'initial database structure for sms outbound', 'SQL', 'V126__initial_database_structure_for_sms_outbound.sql', 1597367272, 'root', '2015-06-03 15:27:01', 28, 1), - (136, 136, '127', 'mobile no fields', 'SQL', 'V127__mobile_no_fields.sql', -1478167026, 'root', '2015-06-03 15:27:01', 135, 1), - (137, 137, '128', 'added loan installment charge', 'SQL', 'V128__added_loan_installment_charge.sql', -427737636, 'root', '2015-06-03 15:27:01', 24, 1), - (138, 138, '129', 'client and group timeline', 'SQL', 'V129__client_and_group_timeline.sql', -354048349, 'root', '2015-06-03 15:27:01', 114, 1), - (13, 13, '13', 'add group and client pending configuration', 'SQL', 'V13__add_group_and_client_pending_configuration.sql', 2043924577, 'root', '2015-06-03 15:26:52', 4, 1), - (139, 139, '130', 'calendar-history-table', 'SQL', 'V130__calendar-history-table.sql', -1068056425, 'root', '2015-06-03 15:27:01', 22, 1), - (140, 140, '131', 'holiday-status-column-and-permissions', 'SQL', 'V131__holiday-status-column-and-permissions.sql', 169147264, 'root', '2015-06-03 15:27:01', 89, 1), - (141, 141, '132', 'borrower cycle changes', 'SQL', 'V132__borrower_cycle_changes.sql', -1484124924, 'root', '2015-06-03 15:27:01', 70, 1), - (142, 142, '133', 'adding payment detail with journal entry', 'SQL', 'V133__adding_payment_detail_with_journal_entry.sql', 1432448000, 'root', '2015-06-03 15:27:01', 31, 1), - (143, 143, '134', 'added column value on c configuration', 'SQL', 'V134__added_column_value_on_c_configuration.sql', -587477224, 'root', '2015-06-03 15:27:01', 25, 1), - (144, 144, '134.1', 'submitted date updation for clients', 'SQL', 'V134_1__submitted_date_updation_for_clients.sql', -1714823906, 'root', '2015-06-03 15:27:01', 2, 1), - (145, 145, '134.2', 'permissions spelling correction', 'SQL', 'V134_2__permissions_spelling_correction.sql', -1824098129, 'root', '2015-06-03 15:27:02', 1, 1), - (146, 146, '135', 'added permission for undo written off', 'SQL', 'V135__added_permission_for_undo_written_off.sql', 426644857, 'root', '2015-06-03 15:27:02', 1, 1), - (147, 147, '136.1', 'update script strechy parameter', 'SQL', 'V136_1__update_script_strechy_parameter.sql', 633461657, 'root', '2015-06-03 15:27:02', 1, 1), - (148, 148, '137', 'added is active column in m staff', 'SQL', 'V137__added_is_active_column_in_m_staff.sql', 1962782431, 'root', '2015-06-03 15:27:02', 50, 1), - (149, 149, '138', 'add short name for m product loan and m savings product', 'SQL', 'V138__add_short_name_for_m_product_loan_and_m_savings_product.sql', 420749751, 'root', '2015-06-03 15:27:02', 265, 1), - (150, 150, '139', 'default value for is active updated to true in m staff', 'SQL', 'V139__default_value_for_is_active_updated_to_true_in_m_staff.sql', -633907272, 'root', '2015-06-03 15:27:02', 45, 1), - (14, 14, '14', 'rename status id to enum', 'SQL', 'V14__rename_status_id_to_enum.sql', -309404445, 'root', '2015-06-03 15:26:52', 55, 1), - (151, 151, '140', 'added loan charge status', 'SQL', 'V140__added_loan_charge_status.sql', 701858626, 'root', '2015-06-03 15:27:02', 65, 1), - (152, 152, '140.1', 'added payment detail id in ac gl journal entry', 'SQL', 'V140_1__added_payment_detail_id_in_ac_gl_journal_entry.sql', -2051594288, 'root', '2015-06-03 15:27:02', 33, 1), - (153, 153, '141', 'add early repayment strategy', 'SQL', 'V141__add_early_repayment_strategy.sql', 1510094803, 'root', '2015-06-03 15:27:02', 1, 1), - (154, 154, '142', 'read savingsaccount charge permission', 'SQL', 'V142__read_savingsaccount_charge_permission.sql', 643820806, 'root', '2015-06-03 15:27:02', 1, 1), - (155, 155, '143', 'create journalentry checker permission', 'SQL', 'V143__create_journalentry_checker_permission.sql', 1931469061, 'root', '2015-06-03 15:27:02', 1, 1), - (156, 156, '144', 'spelling mistake corrections', 'SQL', 'V144__spelling_mistake_corrections.sql', 196034832, 'root', '2015-06-03 15:27:02', 18, 1), - (157, 157, '145', 'add force password reset in c configuration', 'SQL', 'V145__add_force_password_reset_in_c_configuration.sql', 521336058, 'root', '2015-06-03 15:27:02', 164, 1), - (158, 158, '146', 'tranche loans', 'SQL', 'V146__tranche_loans.sql', 500763449, 'root', '2015-06-03 15:27:03', 180, 1), - (159, 159, '147', 'tranche loans column name changes', 'SQL', 'V147__tranche_loans_column_name_changes.sql', 400468365, 'root', '2015-06-03 15:27:03', 47, 1), - (160, 160, '148', 'overdraft changes', 'SQL', 'V148__overdraft_changes.sql', 1529306114, 'root', '2015-06-03 15:27:03', 143, 1), - (161, 161, '149', 'add created date savings transaction', 'SQL', 'V149__add_created_date_savings_transaction.sql', -116162300, 'root', '2015-06-03 15:27:03', 43, 1), - (15, 15, '15', 'center permissions', 'SQL', 'V15__center_permissions.sql', 2015498904, 'root', '2015-06-03 15:26:52', 3, 1), - (162, 162, '150', 'basic savings report', 'SQL', 'V150__basic_savings_report.sql', 1230058085, 'root', '2015-06-03 15:27:03', 53, 1), - (163, 163, '151', 'add default savings account to client', 'SQL', 'V151__add_default_savings_account_to_client.sql', 1421080968, 'root', '2015-06-03 15:27:03', 44, 1), - (164, 164, '152', 'added grace for over due', 'SQL', 'V152__added_grace_for_over_due.sql', -1487653468, 'root', '2015-06-03 15:27:03', 141, 1), - (165, 165, '153', 'Insert missed permissions', 'SQL', 'V153__Insert_missed_permissions.sql', 1384787449, 'root', '2015-06-03 15:27:03', 3, 1), - (166, 166, '154', 'aging details', 'SQL', 'V154__aging_details.sql', 1117759702, 'root', '2015-06-03 15:27:03', 1, 1), - (167, 167, '155', 'stretchy into pentaho', 'SQL', 'V155__stretchy_into_pentaho.sql', 1146009989, 'root', '2015-06-03 15:27:03', 45, 1), - (168, 168, '156', 'added loan saving txns pentaho', 'SQL', 'V156__added_loan_saving_txns_pentaho.sql', 1288577073, 'root', '2015-06-03 15:27:03', 4, 1), - (169, 169, '157', 'overdue charge improvements', 'SQL', 'V157__overdue_charge_improvements.sql', -1602717371, 'root', '2015-06-03 15:27:03', 63, 1), - (170, 170, '158', 'dashboard and navigation queries', 'SQL', 'V158__dashboard_and_navigation_queries.sql', 555462763, 'root', '2015-06-03 15:27:03', 8, 1), - (171, 171, '159', 'add transaction id column m portfolio command source', 'SQL', 'V159__add_transaction_id_column_m_portfolio_command_source.sql', 724056808, 'root', '2015-06-03 15:27:04', 99, 1), - (16, 16, '16', 'drop min max column on loan table', 'SQL', 'V16__drop_min_max_column_on_loan_table.sql', 120700748, 'root', '2015-06-03 15:26:52', 83, 1), - (172, 172, '160', 'standing instruction changes', 'SQL', 'V160__standing_instruction_changes.sql', -1634447666, 'root', '2015-06-03 15:27:04', 131, 1), - (173, 173, '160.2', 'Allow nullValue For principal on lonProduct', 'SQL', 'V160_2__Allow_nullValue_For_principal_on_lonProduct.sql', 844844635, 'root', '2015-06-03 15:27:04', 103, 1), - (174, 174, '161', 'added accrual batch job', 'SQL', 'V161__added_accrual_batch_job.sql', -760303345, 'root', '2015-06-03 15:27:04', 68, 1), - (175, 175, '162', 'overdue charge batch job', 'SQL', 'V162__overdue_charge_batch_job.sql', -1213828784, 'root', '2015-06-03 15:27:04', 1, 1), - (176, 176, '163', 'added npa for loans', 'SQL', 'V163__added_npa_for_loans.sql', 1832640598, 'root', '2015-06-03 15:27:04', 152, 1), - (177, 177, '164', 'fd and rd deposit tables', 'SQL', 'V164__fd_and_rd_deposit_tables.sql', -1202481632, 'root', '2015-06-03 15:27:04', 389, 1), - (178, 178, '165', 'added permission for disburse to saving account', 'SQL', 'V165__added_permission_for_disburse_to_saving_account.sql', -2109143723, 'root', '2015-06-03 15:27:05', 2, 1), - (179, 179, '166', 'added deposit amount to product term and preclosure', 'SQL', 'V166__added_deposit_amount_to_product_term_and_preclosure.sql', -452742507, 'root', '2015-06-03 15:27:05', 81, 1), - (180, 180, '167', 'added columns for writtenOff loans recovered', 'SQL', 'V167__added_columns_for_writtenOff_loans_recovered.sql', 384306348, 'root', '2015-06-03 15:27:05', 94, 1), - (181, 181, '168', 'added transfer fixed deposit interest to linked account', 'SQL', 'V168__added_transfer_fixed_deposit_interest_to_linked_account.sql', -246915767, 'root', '2015-06-03 15:27:05', 89, 1), - (182, 182, '169', 'update dashboard reports to core reports use report to false', 'SQL', 'V169__update_dashboard_reports_to_core_reports_use_report_to_false.sql', 1910199831, 'root', '2015-06-03 15:27:05', 1, 1), - (17, 17, '17', 'update stretchy reporting ddl', 'SQL', 'V17__update_stretchy_reporting_ddl.sql', -1374690095, 'root', '2015-06-03 15:26:52', 141, 1), - (183, 183, '170', 'update deposit accounts maturity details job', 'SQL', 'V170__update_deposit_accounts_maturity_details_job.sql', 348328732, 'root', '2015-06-03 15:27:05', 2, 1), - (184, 184, '171', 'added mandatory savings and rd changes', 'SQL', 'V171__added_mandatory_savings_and_rd_changes.sql', -106401726, 'root', '2015-06-03 15:27:05', 324, 1), - (185, 185, '172', 'accounting changes for transfers', 'SQL', 'V172__accounting_changes_for_transfers.sql', 398136509, 'root', '2015-06-03 15:27:05', 58, 1), - (186, 186, '173', 'ppi', 'SQL', 'V173__ppi.sql', -512596643, 'root', '2015-06-03 15:27:05', 107, 1), - (187, 187, '174', 'remove interest accrual', 'SQL', 'V174__remove_interest_accrual.sql', -353161686, 'root', '2015-06-03 15:27:05', 1, 1), - (188, 188, '175', 'added incentive interest rates', 'SQL', 'V175__added_incentive_interest_rates.sql', 749853165, 'root', '2015-06-03 15:27:06', 167, 1), - (189, 189, '176', 'updates to financial activity accounts', 'SQL', 'V176__updates_to_financial_activity_accounts.sql', -1274960595, 'root', '2015-06-03 15:27:06', 85, 1), - (190, 190, '177', 'cleanup for client incentives', 'SQL', 'V177__cleanup_for_client_incentives.sql', -1838944707, 'root', '2015-06-03 15:27:06', 2, 1), - (191, 191, '178', 'updates to financial activity accounts pt2', 'SQL', 'V178__updates_to_financial_activity_accounts_pt2.sql', -658545948, 'root', '2015-06-03 15:27:06', 4, 1), - (192, 192, '179', 'updates to action names for maker checker permissions', 'SQL', 'V179__updates_to_action_names_for_maker_checker_permissions.sql', 255160379, 'root', '2015-06-03 15:27:06', 4, 1), - (18, 18, '18', 'update stretchy reporting reportSql', 'SQL', 'V18__update_stretchy_reporting_reportSql.sql', 1012533433, 'root', '2015-06-03 15:26:52', 4, 1), - (193, 193, '180', 'update report schemas for disbursed vs awaitingdisbursal and groupnamesbystaff', 'SQL', 'V180__update_report_schemas_for_disbursed_vs_awaitingdisbursal_and_groupnamesbystaff.sql', 674107071, 'root', '2015-06-03 15:27:06', 2, 1), - (194, 194, '181', 'standing instruction logging', 'SQL', 'V181__standing_instruction_logging.sql', -737719462, 'root', '2015-06-03 15:27:06', 35, 1), - (195, 195, '182', 'added min required balance to savings product', 'SQL', 'V182__added_min_required_balance_to_savings_product.sql', -1648679936, 'root', '2015-06-03 15:27:06', 76, 1), - (196, 196, '183', 'added min balance for interest calculation', 'SQL', 'V183__added_min_balance_for_interest_calculation.sql', 1902310539, 'root', '2015-06-03 15:27:06', 105, 1), - (197, 197, '184', 'update min required balance for savings product', 'SQL', 'V184__update_min_required_balance_for_savings_product.sql', 313972591, 'root', '2015-06-03 15:27:06', 28, 1), - (198, 198, '185', 'add accrual till date for periodic accrual', 'SQL', 'V185__add_accrual_till_date_for_periodic_accrual.sql', 1705918516, 'root', '2015-06-03 15:27:06', 144, 1), - (199, 199, '186', 'added periodic accrual job', 'SQL', 'V186__added_periodic_accrual_job.sql', 394599380, 'root', '2015-06-03 15:27:06', 1, 1), - (200, 200, '187', 'added permission to periodic accrual', 'SQL', 'V187__added_permission_to_periodic_accrual.sql', 1479836850, 'root', '2015-06-03 15:27:06', 2, 1), - (201, 201, '188', 'add savingscharge inactivate permissions', 'SQL', 'V188__add_savingscharge_inactivate_permissions.sql', -740798972, 'root', '2015-06-03 15:27:06', 41, 1), - (202, 202, '189', 'm loan interest recalculation tables', 'SQL', 'V189__m_loan_interest_recalculation_tables.sql', -873206694, 'root', '2015-06-03 15:27:07', 301, 1), - (19, 19, '19', 'report maintenance permissions', 'SQL', 'V19__report_maintenance_permissions.sql', 57066563, 'root', '2015-06-03 15:26:52', 4, 1), - (203, 203, '190', 'add associategroup disassociategroup permissions', 'SQL', 'V190__add_associategroup_disassociategroup_permissions.sql', 1517251106, 'root', '2015-06-03 15:27:07', 2, 1), - (204, 204, '191', 'update gl account increase size of name col', 'SQL', 'V191__update_gl_account_increase_size_of_name_col.sql', -1113630867, 'root', '2015-06-03 15:27:07', 17, 1), - (205, 205, '192', 'interest recalculate job', 'SQL', 'V192__interest_recalculate_job.sql', -110230216, 'root', '2015-06-03 15:27:07', 2, 1), - (206, 206, '193', 'added column joiningDate for staff', 'SQL', 'V193__added_column_joiningDate_for_staff.sql', -443555800, 'root', '2015-06-03 15:27:07', 33, 1), - (207, 207, '194', 'added recalculatedInterestComponent for interest recalculation', 'SQL', 'V194__added_recalculatedInterestComponent_for_interest_recalculation.sql', 2052912155, 'root', '2015-06-03 15:27:07', 35, 1), - (208, 208, '195', 'moved rest frequency to product level', 'SQL', 'V195__moved_rest_frequency_to_product_level.sql', 1459923988, 'root', '2015-06-03 15:27:07', 97, 1), - (209, 209, '196', 'added loan running balance to transactions', 'SQL', 'V196__added_loan_running_balance_to_transactions.sql', 342588167, 'root', '2015-06-03 15:27:07', 48, 1), - (210, 210, '197', 'updated loan running balance of transactions', 'SQL', 'V197__updated_loan_running_balance_of_transactions.sql', 473184964, 'root', '2015-06-03 15:27:07', 27, 1), - (211, 211, '198', 'loan rescheduling tables and permissions', 'SQL', 'V198__loan_rescheduling_tables_and_permissions.sql', 689132282, 'root', '2015-06-03 15:27:07', 128, 1), - (212, 212, '199', 'removed extra columns from schedule history', 'SQL', 'V199__removed_extra_columns_from_schedule_history.sql', 1961301885, 'root', '2015-06-03 15:27:07', 105, 1), - (2, 2, '2', 'mifosx-base-reference-data-utf8', 'SQL', 'V2__mifosx-base-reference-data-utf8.sql', 2084750372, 'root', '2015-06-03 15:26:50', 30, 1), - (20, 20, '20', 'report maint perms really configuration', 'SQL', 'V20__report_maint_perms_really_configuration.sql', -796088526, 'root', '2015-06-03 15:26:52', 1, 1), - (213, 213, '200', 'alter savings account for start interest calculation date', 'SQL', 'V200__alter_savings_account_for_start_interest_calculation_date.sql', -2046824671, 'root', '2015-06-03 15:27:07', 68, 1), - (214, 214, '201', 'webhooks', 'SQL', 'V201__webhooks.sql', -1852431117, 'root', '2015-06-03 15:27:08', 194, 1), - (215, 215, '202', 'savings officer history table', 'SQL', 'V202__savings_officer_history_table.sql', 1515516270, 'root', '2015-06-03 15:27:08', 50, 1), - (216, 216, '203', 'added subbmittedDate loantransaction', 'SQL', 'V203__added_subbmittedDate_loantransaction.sql', 762589044, 'root', '2015-06-03 15:27:08', 34, 1), - (217, 217, '204', 'insert script for charges paid by for accruals', 'SQL', 'V204__insert_script_for_charges_paid_by_for_accruals.sql', 1126139057, 'root', '2015-06-03 15:27:08', 2, 1), - (218, 218, '205', 'fix for charge and interest waiver with accruals', 'SQL', 'V205__fix_for_charge_and_interest_waiver_with_accruals.sql', 1834454603, 'root', '2015-06-03 15:27:08', 91, 1), - (219, 219, '206', 'interest posting configuration', 'SQL', 'V206__interest_posting_configuration.sql', 1777902577, 'root', '2015-06-03 15:27:08', 52, 1), - (220, 220, '207', 'min max clients per group', 'SQL', 'V207__min_max_clients_per_group.sql', -1776502977, 'root', '2015-06-03 15:27:08', 46, 1), - (221, 221, '208', 'min max clients in group redux', 'SQL', 'V208__min_max_clients_in_group_redux.sql', -1881405737, 'root', '2015-06-03 15:27:08', 47, 1), - (222, 222, '209', 'add all report names in m permission table', 'SQL', 'V209__add_all_report_names_in_m_permission_table.sql', 1034507855, 'root', '2015-06-03 15:27:08', 9, 1), - (21, 21, '21', 'activation-permissions-for-clients', 'SQL', 'V21__activation-permissions-for-clients.sql', 1289685589, 'root', '2015-06-03 15:26:52', 45, 1), - (223, 223, '210', 'track manually adjusted transactions', 'SQL', 'V210__track_manually_adjusted_transactions.sql', -1444778976, 'root', '2015-06-03 15:27:08', 47, 1), - (224, 224, '211', 'minimum days between disbursal and first repayment', 'SQL', 'V211__minimum_days_between_disbursal_and_first_repayment.sql', 1660532746, 'root', '2015-06-03 15:27:08', 51, 1), - (225, 225, '212', 'add NthDay and DayOfWeek columns loan', 'SQL', 'V212__add_NthDay_and_DayOfWeek_columns_loan.sql', -924123306, 'root', '2015-06-03 15:27:08', 100, 1), - (226, 226, '213', 'NthDay and DayOfWeek columns should be nullable', 'SQL', 'V213__NthDay_and_DayOfWeek_columns_should_be_nullable.sql', -240730886, 'root', '2015-06-03 15:27:09', 135, 1), - (227, 227, '214', 'alter table add create SI at disbursement', 'SQL', 'V214__alter_table_add_create_SI_at_disbursement.sql', -473599398, 'root', '2015-06-03 15:27:09', 272, 1), - (228, 228, '215', 'guarantee on hold fund changes', 'SQL', 'V215__guarantee_on_hold_fund_changes.sql', 111795154, 'root', '2015-06-03 15:27:09', 235, 1), - (229, 229, '216', 'adding loan proposed amount to loan', 'SQL', 'V216__adding_loan_proposed_amount_to_loan.sql', 2123229215, 'root', '2015-06-03 15:27:09', 109, 1), - (230, 230, '217', 'client substatus and codevalue description', 'SQL', 'V217__client_substatus_and_codevalue_description.sql', 1344632615, 'root', '2015-06-03 15:27:09', 88, 1), - (231, 231, '218', 'add user and datetime for loan savings transactions', 'SQL', 'V218__add_user_and_datetime_for_loan_savings_transactions.sql', 939524468, 'root', '2015-06-03 15:27:10', 115, 1), - (232, 232, '219', 'guarantor on hold fund changes for account', 'SQL', 'V219__guarantor_on_hold_fund_changes_for_account.sql', -380048619, 'root', '2015-06-03 15:27:10', 327, 1), - (22, 22, '22', 'alter-group-for-consistency-add-permissions', 'SQL', 'V22__alter-group-for-consistency-add-permissions.sql', 1509095759, 'root', '2015-06-03 15:26:52', 130, 1), - (233, 233, '220', 'account number preferences', 'SQL', 'V220__account_number_preferences.sql', 765825838, 'root', '2015-06-03 15:27:10', 22, 1), - (234, 234, '221', 'add version for m savings account', 'SQL', 'V221__add_version_for_m_savings_account.sql', -2026329127, 'root', '2015-06-03 15:27:10', 49, 1), - (235, 235, '222', 'guarantor on hold fund changes for transactions', 'SQL', 'V222__guarantor_on_hold_fund_changes_for_transactions.sql', -426530719, 'root', '2015-06-03 15:27:10', 193, 1), - (236, 236, '223', 'add version for m loan account', 'SQL', 'V223__add_version_for_m_loan_account.sql', -1129379217, 'root', '2015-06-03 15:27:10', 134, 1), - (237, 237, '224', 'client lifecycle adding statuses', 'SQL', 'V224__client_lifecycle_adding_statuses.sql', 43152274, 'root', '2015-06-03 15:27:11', 181, 1), - (238, 238, '225', 'permissions for updating recurring deposit amount', 'SQL', 'V225__permissions_for_updating_recurring_deposit_amount.sql', -564145896, 'root', '2015-06-03 15:27:11', 1, 1), - (239, 239, '226', 'configuration for enforcing calendars for jlg loans', 'SQL', 'V226__configuration_for_enforcing_calendars_for_jlg_loans.sql', -382855919, 'root', '2015-06-03 15:27:11', 1, 1), - (240, 240, '227', 'loan-refund-permissions', 'SQL', 'V227__loan-refund-permissions.sql', -511074400, 'root', '2015-06-03 15:27:11', 2, 1), - (241, 241, '228', 'entity to entity access', 'SQL', 'V228__entity_to_entity_access.sql', -409076299, 'root', '2015-06-03 15:27:11', 108, 1), - (242, 242, '229', 'teller cash management', 'SQL', 'V229__teller_cash_management.sql', 2147103896, 'root', '2015-06-03 15:27:11', 83, 1), - (23, 23, '23', 'remove-enable-disable-configuration-for-client-group-status', 'SQL', 'V23__remove-enable-disable-configuration-for-client-group-status.sql', 1496208571, 'root', '2015-06-03 15:26:53', 67, 1), - (243, 243, '230', 'role status and correspoding permissions', 'SQL', 'V230__role_status_and_correspoding_permissions.sql', -21174595, 'root', '2015-06-03 15:27:11', 34, 1), - (244, 244, '231', 'm cashier transaction added currency code', 'SQL', 'V231__m_cashier_transaction_added_currency_code.sql', -1593672561, 'root', '2015-06-03 15:27:11', 32, 1), - (245, 245, '232', 'insert center closure reason', 'SQL', 'V232__insert_center_closure_reason.sql', -2049914418, 'root', '2015-06-03 15:27:11', 1, 1), - (246, 246, '233', 'Savings Transaction Receipt', 'SQL', 'V233__Savings_Transaction_Receipt.sql', 1836289382, 'root', '2015-06-03 15:27:11', 2, 1), - (247, 247, '234', 'opening balaces setup', 'SQL', 'V234__opening_balaces_setup.sql', 1777198314, 'root', '2015-06-03 15:27:11', 23, 1), - (248, 248, '235', 'add ugd template id m hook', 'SQL', 'V235__add_ugd_template_id_m_hook.sql', 1120955673, 'root', '2015-06-03 15:27:11', 81, 1), - (249, 249, '236', 'individual collection sheet permissions', 'SQL', 'V236__individual_collection_sheet_permissions.sql', -66130238, 'root', '2015-06-03 15:27:11', 1, 1), - (250, 250, '237', 'add threshold config for last instalment', 'SQL', 'V237__add_threshold_config_for_last_instalment.sql', 412873149, 'root', '2015-06-03 15:27:11', 59, 1), - (251, 251, '238', 'update staff display name length', 'SQL', 'V238__update_staff_display_name_length.sql', -1003425306, 'root', '2015-06-03 15:27:11', 47, 1), - (252, 252, '239', 'Loan Transaction Receipt', 'SQL', 'V239__Loan_Transaction_Receipt.sql', -130819179, 'root', '2015-06-03 15:27:11', 2, 1), - (24, 24, '24', 'add-group-client-foreign-key-constraint-in-loan-table', 'SQL', 'V24__add-group-client-foreign-key-constraint-in-loan-table.sql', 1077707078, 'root', '2015-06-03 15:26:53', 141, 1), - (253, 253, '240', 'arrears aging config for interest recalculation', 'SQL', 'V240__arrears_aging_config_for_interest_recalculation.sql', 674368034, 'root', '2015-06-03 15:27:12', 129, 1), - (254, 254, '241', 'fixed emi changes', 'SQL', 'V241__fixed_emi_changes.sql', 1943069939, 'root', '2015-06-03 15:27:12', 53, 1), - (255, 255, '242', 'entitytoentitymappingrelation', 'SQL', 'V242__entitytoentitymappingrelation.sql', -1770973716, 'root', '2015-06-03 15:27:12', 40, 1), - (256, 256, '243', 'alter loan disbursement details', 'SQL', 'V243__alter_loan_disbursement_details.sql', 1461060824, 'root', '2015-06-03 15:27:12', 48, 1), - (257, 257, '244', 'staff assignment history table', 'SQL', 'V244__staff_assignment_history_table.sql', -427095856, 'root', '2015-06-03 15:27:12', 33, 1), - (258, 258, '245', 'open rd changes', 'SQL', 'V245__open_rd_changes.sql', 2142566381, 'root', '2015-06-03 15:27:12', 1, 1), - (259, 259, '246', 'drop group client foreign key from m loan', 'SQL', 'V246__drop_group_client_foreign_key_from_m_loan.sql', -1721132405, 'root', '2015-06-03 15:27:12', 35, 1), - (260, 260, '247', 'consistency wrt spelling principalThresholdForLastInstalment', 'SQL', 'V247__consistency_wrt_spelling_principalThresholdForLastInstalment.sql', 1371980378, 'root', '2015-06-03 15:27:12', 7, 1), - (261, 261, '248', 'added password never expired to User', 'SQL', 'V248__added_password_never_expired_to_User.sql', -1800179163, 'root', '2015-06-03 15:27:12', 43, 1), - (262, 262, '249', 'workingdays permissions', 'SQL', 'V249__workingdays_permissions.sql', -1322891155, 'root', '2015-06-03 15:27:12', 1, 1), - (25, 25, '25', 'update client reports for status and activation change', 'SQL', 'V25__update_client_reports_for_status_and_activation_change.sql', -6310920, 'root', '2015-06-03 15:26:53', 3, 1), - (263, 263, '250', 'password validation policy', 'SQL', 'V250__password_validation_policy.sql', 1197290340, 'root', '2015-06-03 15:27:12', 26, 1), - (264, 264, '251', 'paymentType table', 'SQL', 'V251__paymentType_table.sql', -1969329175, 'root', '2015-06-03 15:27:12', 75, 1), - (265, 265, '252', 'bug fix teller cash management', 'SQL', 'V252__bug_fix_teller_cash_management.sql', -736743970, 'root', '2015-06-03 15:27:12', 110, 1), - (266, 266, '253', 'product loan configurable attributes', 'SQL', 'V253__product_loan_configurable_attributes.sql', 1787268316, 'root', '2015-06-03 15:27:12', 16, 1), - (267, 267, '254', 'General Ledger Report', 'SQL', 'V254__General_Ledger_Report.sql', -186920768, 'root', '2015-06-03 15:27:12', 4, 1), - (268, 268, '255', 'pre close interest period config', 'SQL', 'V255__pre_close_interest_period_config.sql', 1383225707, 'root', '2015-06-03 15:27:12', 26, 1), - (269, 269, '256', 'Update script for General Ledger report', 'SQL', 'V256__Update script for General_Ledger_report.sql', 952686971, 'root', '2015-06-03 15:27:12', 3, 1), - (270, 270, '257', 'staff image association', 'SQL', 'V257__staff_image_association.sql', 1740118046, 'root', '2015-06-03 15:27:12', 41, 1), - (271, 271, '258', 'interest compounding changes', 'SQL', 'V258__interest_compounding_changes.sql', 1484848861, 'root', '2015-06-03 15:27:13', 84, 1), - (272, 272, '259', 'alter working days', 'SQL', 'V259__alter_working_days.sql', 1733733251, 'root', '2015-06-03 15:27:13', 28, 1), - (26, 26, '26', 'add-support-for-withdrawal-fees-on-savings', 'SQL', 'V26__add-support-for-withdrawal-fees-on-savings.sql', -755832247, 'root', '2015-06-03 15:26:53', 176, 1), - (273, 273, '260', 'alter password validation policy', 'SQL', 'V260__alter_password_validation_policy.sql', -853716637, 'root', '2015-06-03 15:27:13', 28, 1), - (274, 274, '261', 'Update script for Client Loan Account Schedule Report', 'SQL', 'V261__Update script for Client_Loan_Account_Schedule_Report.sql', 1873100628, 'root', '2015-09-06 17:49:01', 20, 1), - (275, 275, '262', 'accountNumber for groups', 'SQL', 'V262__accountNumber_for_groups.sql', -31083607, 'root', '2015-09-06 17:49:01', 179, 1), - (276, 276, '263', 'mifos reports', 'SQL', 'V263__mifos_reports.sql', -1358041795, 'root', '2015-09-06 17:49:01', 27, 1), - (277, 277, '264', 'insert paymenttype and report read permission', 'SQL', 'V264__insert_paymenttype_and_report_read_permission.sql', 984979503, 'root', '2015-09-06 17:49:01', 6, 1), - (278, 278, '265', 'modify external service schema', 'SQL', 'V265__modify_external_service_schema.sql', 1844344576, 'root', '2015-09-06 17:49:02', 350, 1), - (279, 279, '266', 'client fees', 'SQL', 'V266__client_fees.sql', 41332385, 'root', '2015-09-06 17:49:02', 112, 1), - (280, 280, '267', 'client transaction permissions', 'SQL', 'V267__client_transaction_permissions.sql', 130000057, 'root', '2015-09-06 17:49:02', 6, 1), - (281, 281, '268', 'update gmail password', 'SQL', 'V268__update_gmail_password.sql', 1723317114, 'root', '2015-09-06 17:49:02', 8, 1), - (282, 282, '269', 'increased calendar title length ', 'SQL', 'V269__increased_calendar_title_length .sql', 1780890645, 'root', '2015-09-06 17:49:02', 156, 1), - (27, 27, '27', 'add-loan-type-column-to-loan-table', 'SQL', 'V27__add-loan-type-column-to-loan-table.sql', -2130377861, 'root', '2015-06-03 15:26:53', 97, 1), - (283, 283, '270', 'add rounding mode configuration', 'SQL', 'V270__add_rounding_mode_configuration.sql', 1195237290, 'root', '2015-09-06 17:49:02', 78, 1), - (284, 284, '271', 'accounting for client charges', 'SQL', 'V271__accounting_for_client_charges.sql', 1477443700, 'root', '2015-09-06 17:49:03', 184, 1), - (285, 285, '272', 'loan tranche disbursement charge', 'SQL', 'V272__loan_tranche_disbursement_charge.sql', 2018052750, 'root', '2015-09-06 17:49:03', 182, 1), - (286, 286, '273', 'oauth changes', 'SQL', 'V273__oauth_changes.sql', 1811521678, 'root', '2015-09-09 13:21:37', 120, 1), - (287, 287, '274', 'Loan Reschedule Code Value', 'SQL', 'V274__Loan_Reschedule_Code_Value.sql', -1190544276, 'root', '2015-09-15 18:00:14', 63, 1), - (288, 288, '275', 'loan transaction to repayment schedule mapping', 'SQL', 'V275__loan_transaction_to_repayment_schedule_mapping.sql', 1971001203, 'root', '2015-09-21 20:04:43', 570, 1), - (289, 289, '276', 'loan recalulated till date', 'SQL', 'V276__loan_recalulated_till_date.sql', 631764351, 'root', '2015-10-20 19:57:50', 1743, 1), - (290, 290, '277', 'Loan Product Provisioning', 'SQL', 'V277__Loan_Product_Provisioning.sql', -510229006, 'root', '2015-10-20 19:57:53', 2792, 1), - (291, 291, '278', 'LoanTransactionProcessingStrategy', 'SQL', 'V278__LoanTransactionProcessingStrategy.sql', -1388446419, 'root', '2015-11-04 17:03:00', 878, 1), - (292, 292, '279', 'floating rates', 'SQL', 'V279__floating_rates.sql', 830029264, 'root', '2015-11-18 16:13:08', 620, 1), - (28, 28, '28', 'accounting-abstractions-and-autoposting', 'SQL', 'V28__accounting-abstractions-and-autoposting.sql', -626584837, 'root', '2015-06-03 15:26:53', 63, 1), - (293, 293, '280', 'spm framework initial tables', 'SQL', 'V280__spm_framework_initial_tables.sql', -1638980235, 'root', '2015-12-02 16:07:43', 509, 1), - (294, 294, '281', 'add configuration param backdate-penalties', 'SQL', 'V281__add_configuration_param_backdate-penalties.sql', -45520299, 'root', '2015-12-02 16:07:44', 39, 1), - (295, 295, '282', 'CustomerSelfService', 'SQL', 'V282__CustomerSelfService.sql', -51763400, 'root', '2015-12-17 10:17:33', 440, 1), - (296, 296, '283', 'Variable Installments', 'SQL', 'V283__Variable_Installments.sql', -1104936867, 'root', '2016-01-12 17:39:15', 2067, 1), - (297, 297, '284', 'update codevalue', 'SQL', 'V284__update_codevalue.sql', 442711672, 'root', '2016-01-12 17:39:16', 982, 1), - (298, 298, '285', 'undo last tranche script', 'SQL', 'V285__undo_last_tranche_script.sql', 1551040289, 'root', '2016-01-12 17:39:17', 56, 1), - (299, 299, '286', 'partial period interest calcualtion', 'SQL', 'V286__partial_period_interest_calcualtion.sql', -1701869481, 'root', '2016-01-12 17:39:19', 1898, 1), - (300, 300, '287', 'alter spm scorecard', 'SQL', 'V287__alter_spm_scorecard.sql', 1834026952, 'root', '2016-01-20 18:23:18', 227, 1), - (301, 301, '288', 'overdraft interest', 'SQL', 'V288__overdraft_interest.sql', 2003058104, 'root', '2016-01-20 18:23:19', 282, 1), - (302, 302, '289', 'client non person', 'SQL', 'V289__client_non_person.sql', 1595576360, 'root', '2016-01-20 18:23:19', 239, 1), - (29, 29, '29', 'add-support-for-annual-fees-on-savings', 'SQL', 'V29__add-support-for-annual-fees-on-savings.sql', -1595233842, 'root', '2015-06-03 15:26:53', 157, 1), - (303, 303, '290', 'shares dividends permissions script', 'SQL', 'V290__shares_dividends_permissions_script.sql', -1504459497, 'root', '2016-01-20 18:23:19', 47, 1), - (304, 304, '291', 'organisation start date config', 'SQL', 'V291__organisation_start_date_config.sql', -1674309950, 'root', '2017-02-24 14:15:35', 1577, 1), - (305, 305, '292', 'update organisation start date', 'SQL', 'V292__update_organisation_start_date.sql', 2016095558, 'root', '2017-02-24 14:15:35', 70, 1), - (306, 306, '293', 'interest rate chart support for amounts', 'SQL', 'V293__interest_rate_chart_support_for_amounts.sql', -1720908295, 'root', '2017-02-24 14:15:38', 2446, 1), - (307, 307, '294', 'configuration for paymnettype application forDisbursement charge', 'SQL', 'V294__configuration_for_paymnettype_application_forDisbursement_charge.sql', -754382065, 'root', '2017-02-24 14:15:38', 37, 1), - (308, 308, '295', 'configuration for interest charged date same as disbursal date', 'SQL', 'V295__configuration_for_interest_charged_date_same_as_disbursal_date.sql', -1113285243, 'root', '2017-02-24 14:15:38', 43, 1), - (309, 309, '296', 'skip repayment on first-day of month', 'SQL', 'V296__skip_repayment_on first-day_of_month.sql', -172630113, 'root', '2017-02-24 14:15:38', 50, 1), - (310, 310, '297', 'Adding Meeting Time column', 'SQL', 'V297__Adding_Meeting_Time_column.sql', -637673654, 'root', '2017-02-24 14:15:39', 577, 1), - (311, 311, '298', 'savings interest tax', 'SQL', 'V298__savings_interest_tax.sql', -1023309693, 'root', '2017-02-24 14:15:44', 4419, 1), - (312, 312, '299', 'share products', 'SQL', 'V299__share_products.sql', 1270845438, 'root', '2017-02-24 14:15:48', 4370, 1), - (3, 3, '3', 'mifosx-permissions-and-authorisation-utf8', 'SQL', 'V3__mifosx-permissions-and-authorisation-utf8.sql', 914436650, 'root', '2015-06-03 15:26:50', 14, 1), - (30, 30, '30', 'add-referenceNumber-to-acc gl journal entry', 'SQL', 'V30__add-referenceNumber-to-acc_gl_journal_entry.sql', 255130282, 'root', '2015-06-03 15:26:53', 59, 1), - (313, 313, '300', 'configuration for allow changing of emi amount', 'SQL', 'V300__configuration_for_allow_changing_of_emi_amount.sql', -490331317, 'root', '2017-02-24 14:15:49', 931, 1), - (314, 314, '301', 'recurring moratorium principal periods', 'SQL', 'V301__recurring_moratorium_principal_periods.sql', 816871436, 'root', '2017-02-24 14:15:52', 2167, 1), - (315, 315, '302', 'add status to client identifier', 'SQL', 'V302__add_status_to_client_identifier.sql', 1978862509, 'root', '2017-02-24 14:15:53', 816, 1), - (316, 316, '303', 'Savings Account Dormancy', 'SQL', 'V303__Savings_Account_Dormancy.sql', -533139714, 'root', '2017-02-24 14:15:54', 1377, 1), - (317, 317, '304', 'customer self service third party transfers', 'SQL', 'V304__customer_self_service_third_party_transfers.sql', -341614071, 'root', '2017-02-24 14:15:55', 334, 1), - (318, 318, '305', 'compounding and rest frequency nth day freq and insertion script for accrual job', 'SQL', 'V305__compounding_and_rest_frequency_nth_day_freq_and_insertion_script_for_accrual_job.sql', 710584648, 'root', '2017-02-24 14:15:59', 4045, 1), - (319, 319, '306', 'add domancy tracking job to savings group', 'SQL', 'V306__add_domancy_tracking_job_to_savings_group.sql', -2998873, 'root', '2017-02-24 14:15:59', 34, 1), - (320, 320, '307', 'add share notes', 'SQL', 'V307__add_share_notes.sql', -1950926410, 'root', '2017-02-24 14:16:00', 968, 1), - (321, 321, '308', 'add interest recalculation in savings account', 'SQL', 'V308__add_interest_recalculation_in_savings_account.sql', 1869901088, 'root', '2017-02-24 14:16:01', 601, 1), - (322, 322, '309', 'add loan write off reason code', 'SQL', 'V309__add_loan_write_off_reason_code.sql', 1221434865, 'root', '2017-02-24 14:16:03', 1862, 1), - (31, 31, '31', 'drop-autopostings', 'SQL', 'V31__drop-autopostings.sql', -2072166818, 'root', '2015-06-03 15:26:53', 5, 1), - (323, 323, '310', 'copy data from entitytoentityaccess to entitytoentitymapping', 'SQL', 'V310__copy_data_from_entitytoentityaccess_to_entitytoentitymapping.sql', 1179078728, 'root', '2017-02-24 14:16:03', 4, 1), - (324, 324, '311', 'foreclosure details', 'SQL', 'V311__foreclosure_details.sql', 1236003234, 'root', '2017-02-24 14:16:04', 935, 1), - (325, 325, '312', 'add is mandatory to code value', 'SQL', 'V312__add_is_mandatory_to_code_value.sql', -1943949742, 'root', '2017-02-24 14:16:05', 512, 1), - (326, 326, '313', 'multi rescheduling script', 'SQL', 'V313__multi_rescheduling_script.sql', -1003845274, 'root', '2017-02-24 14:16:07', 2775, 1), - (327, 327, '314', 'updating r enum table', 'SQL', 'V314__updating_r_enum_table.sql', 780881263, 'root', '2017-02-24 14:16:08', 74, 1), - (328, 328, '315', 'add sync expected with disbursement date in m product loan', 'SQL', 'V315__add_sync_expected_with_disbursement_date_in_m_product_loan.sql', 553617808, 'root', '2017-02-24 14:16:08', 688, 1), - (329, 329, '316', 'address module tables metadat', 'SQL', 'V316__address_module_tables_metadat.sql', -776128404, 'root', '2017-02-24 14:16:10', 1472, 1), - (330, 330, '317', 'report mailing job module', 'SQL', 'V317__report_mailing_job_module.sql', -1917516805, 'root', '2017-02-24 14:16:11', 1217, 1), - (331, 331, '318', 'topuploan', 'SQL', 'V318__topuploan.sql', 590465441, 'root', '2017-02-24 14:16:14', 2232, 1), - (332, 332, '319', 'client undoreject', 'SQL', 'V319__client_undoreject.sql', -1615618857, 'root', '2017-02-24 14:16:15', 1003, 1), - (32, 32, '32', 'associate-disassociate-clients-from-group-permissions', 'SQL', 'V32__associate-disassociate-clients-from-group-permissions.sql', -947369256, 'root', '2015-06-03 15:26:53', 2, 1), - (333, 333, '320', 'add holiday payment reschedule', 'SQL', 'V320__add_holiday_payment_reschedule.sql', 1445492229, 'root', '2017-02-24 14:16:15', 479, 1), - (334, 334, '321', 'boolean field As Interest PostedOn', 'SQL', 'V321__boolean_field_As_Interest_PostedOn.sql', 1906735834, 'root', '2017-02-24 14:16:16', 551, 1), - (335, 335, '322', 'sms campaign', 'SQL', 'V322__sms_campaign.sql', -1316831815, 'root', '2017-02-24 14:16:18', 1579, 1), - (336, 336, '323', 'spm replace dead fk with exisiting one', 'SQL', 'V323__spm_replace_dead_fk_with_exisiting_one.sql', 656055500, 'root', '2017-02-24 14:16:19', 520, 1), - (337, 337, '324', 'datatable checks', 'SQL', 'V324__datatable_checks.sql', -142308095, 'root', '2017-02-24 14:16:19', 491, 1), - (33, 33, '33', 'drop unique check on stretchy report parameter', 'SQL', 'V33__drop_unique_check_on_stretchy_report_parameter.sql', -1599579296, 'root', '2015-06-03 15:26:53', 23, 1), - (34, 34, '34', 'add unique check on stretchy report parameter', 'SQL', 'V34__add_unique_check_on_stretchy_report_parameter.sql', -1286928230, 'root', '2015-06-03 15:26:53', 22, 1), - (35, 35, '35', 'add hierarchy column for acc gl account', 'SQL', 'V35__add_hierarchy_column_for_acc_gl_account.sql', -1387013309, 'root', '2015-06-03 15:26:54', 49, 1), - (36, 36, '36', 'add tag id column for acc gl account', 'SQL', 'V36__add_tag_id_column_for_acc_gl_account.sql', 414916166, 'root', '2015-06-03 15:26:54', 26, 1), - (37, 37, '37', 'add-center-group-collection-sheet-permissions', 'SQL', 'V37__add-center-group-collection-sheet-permissions.sql', -1268924209, 'root', '2015-06-03 15:26:54', 2, 1), - (38, 38, '38', 'add-group-summary-details-report', 'SQL', 'V38__add-group-summary-details-report.sql', -1875404314, 'root', '2015-06-03 15:26:54', 2, 1), - (39, 39, '39', 'payment-channels-updates', 'SQL', 'V39__payment-channels-updates.sql', 598090296, 'root', '2015-06-03 15:26:54', 69, 1), - (4, 4, '4', 'mifosx-core-reports-utf8', 'SQL', 'V4__mifosx-core-reports-utf8.sql', -1810870969, 'root', '2015-06-03 15:26:50', 54, 1), - (40, 40, '40', 'add permissions for accounting rule', 'SQL', 'V40__add_permissions_for_accounting_rule.sql', 1514233058, 'root', '2015-06-03 15:26:54', 2, 1), - (41, 41, '41', 'group-summary-reports', 'SQL', 'V41__group-summary-reports.sql', 1425507637, 'root', '2015-06-03 15:26:54', 4, 1), - (42, 42, '42', 'Add default value for id for acc accounting rule', 'SQL', 'V42__Add_default_value_for_id_for_acc_accounting_rule.sql', 2059436790, 'root', '2015-06-03 15:26:54', 25, 1), - (43, 43, '43', 'accounting-for-savings', 'SQL', 'V43__accounting-for-savings.sql', -1542089062, 'root', '2015-06-03 15:26:54', 180, 1), - (44, 44, '44', 'document-increase-size-of-column-type', 'SQL', 'V44__document-increase-size-of-column-type.sql', 1059756585, 'root', '2015-06-03 15:26:54', 57, 1), - (45, 45, '45', 'create acc rule tags table', 'SQL', 'V45__create_acc_rule_tags_table.sql', -1290711661, 'root', '2015-06-03 15:26:54', 11, 1), - (46, 46, '46', 'extend datatables api', 'SQL', 'V46__extend_datatables_api.sql', 1658150926, 'root', '2015-06-03 15:26:54', 2, 1), - (47, 47, '47', 'staff-hierarchy-link-to-users', 'SQL', 'V47__staff-hierarchy-link-to-users.sql', 1571520914, 'root', '2015-06-03 15:26:54', 103, 1), - (48, 48, '48', 'adding-S3-Support', 'SQL', 'V48__adding-S3-Support.sql', -767612266, 'root', '2015-06-03 15:26:54', 164, 1), - (49, 49, '49', 'track-loan-charge-payment-transactions', 'SQL', 'V49__track-loan-charge-payment-transactions.sql', -1735511516, 'root', '2015-06-03 15:26:54', 24, 1), - (5, 5, '5', 'update-savings-product-and-account-tables', 'SQL', 'V5__update-savings-product-and-account-tables.sql', 1349701479, 'root', '2015-06-03 15:26:51', 122, 1), - (50, 50, '50', 'add-grace-settings-to-loan-product', 'SQL', 'V50__add-grace-settings-to-loan-product.sql', -1807166173, 'root', '2015-06-03 15:26:55', 140, 1), - (51, 51, '51', 'track-additional-details-related-to-installment-performance', 'SQL', 'V51__track-additional-details-related-to-installment-performance.sql', 729891777, 'root', '2015-06-03 15:26:55', 102, 1), - (52, 52, '52', 'add boolean support cols to acc accounting rule', 'SQL', 'V52__add_boolean_support_cols_to_acc_accounting_rule.sql', 1853745947, 'root', '2015-06-03 15:26:55', 71, 1), - (53, 53, '53', 'track-advance-and-late-payments-on-installment', 'SQL', 'V53__track-advance-and-late-payments-on-installment.sql', 1135041990, 'root', '2015-06-03 15:26:55', 45, 1), - (54, 54, '54', 'charge-to-income-account-mappings', 'SQL', 'V54__charge-to-income-account-mappings.sql', -302610090, 'root', '2015-06-03 15:26:55', 25, 1), - (55, 55, '55', 'add-additional-transaction-processing-strategies', 'SQL', 'V55__add-additional-transaction-processing-strategies.sql', -1366608716, 'root', '2015-06-03 15:26:55', 58, 1), - (56, 56, '56', 'track-overpaid-amount-on-loans', 'SQL', 'V56__track-overpaid-amount-on-loans.sql', -2006962467, 'root', '2015-06-03 15:26:55', 99, 1), - (57, 57, '57', 'add default values to debit and credit accounts acc accounting rule', 'SQL', 'V57__add_default_values_to_debit_and_credit_accounts_acc_accounting_rule.sql', 1041459650, 'root', '2015-06-03 15:26:55', 51, 1), - (58, 58, '58', 'create-holiday-tables changed', 'SQL', 'V58__create-holiday-tables_changed.sql', -1395337105, 'root', '2015-06-03 15:26:55', 150, 1), - (59, 59, '59', 'add group roles schema and permissions', 'SQL', 'V59__add_group_roles_schema_and_permissions.sql', -406383935, 'root', '2015-06-03 15:26:55', 55, 1), - (6, 6, '6', 'add min max principal column to loan', 'SQL', 'V6__add_min_max_principal_column_to_loan.sql', -907223871, 'root', '2015-06-03 15:26:51', 140, 1), - (60, 60, '60', 'quipo dashboard reports', 'SQL', 'V60__quipo_dashboard_reports.sql', -1618354471, 'root', '2015-06-03 15:26:56', 13, 1), - (61, 61, '61', 'txn running balance example', 'SQL', 'V61__txn_running_balance_example.sql', -80025043, 'root', '2015-06-03 15:26:56', 4, 1), - (62, 62, '62', 'add staff id to m client changed', 'SQL', 'V62__add_staff_id_to_m_client_changed.sql', 1148218006, 'root', '2015-06-03 15:26:56', 18, 1), - (63, 63, '63', 'add sync disbursement with meeting column to loan', 'SQL', 'V63__add_sync_disbursement_with_meeting_column_to_loan.sql', 1201879376, 'root', '2015-06-03 15:26:56', 85, 1), - (64, 64, '64', 'add permission for assign staff', 'SQL', 'V64__add_permission_for_assign_staff.sql', -1938102414, 'root', '2015-06-03 15:26:56', 1, 1), - (65, 65, '65', 'fix rupee symbol issues', 'SQL', 'V65__fix_rupee_symbol_issues.sql', 1008895069, 'root', '2015-06-03 15:26:56', 1, 1), - (66, 66, '66', 'client close functionality', 'SQL', 'V66__client_close_functionality.sql', -142847690, 'root', '2015-06-03 15:26:56', 38, 1), - (67, 67, '67', 'loans in advance table', 'SQL', 'V67__loans_in_advance_table.sql', 1665941254, 'root', '2015-06-03 15:26:56', 21, 1), - (68, 68, '68', 'quipo dashboard reports updated', 'SQL', 'V68__quipo_dashboard_reports_updated.sql', 1746719914, 'root', '2015-06-03 15:26:56', 14, 1), - (69, 69, '69', 'loans in advance initialise', 'SQL', 'V69__loans_in_advance_initialise.sql', 1518847594, 'root', '2015-06-03 15:26:56', 8, 1), - (7, 7, '7', 'remove read makerchecker permission', 'SQL', 'V7__remove_read_makerchecker_permission.sql', -569619336, 'root', '2015-06-03 15:26:51', 2, 1), - (70, 70, '70', 'quipo program detail query fix', 'SQL', 'V70__quipo_program_detail_query_fix.sql', 1892537189, 'root', '2015-06-03 15:26:56', 1, 1), - (71, 71, '71', 'insert reschedule repayment to configuration', 'SQL', 'V71__insert_reschedule_repayment_to_configuration.sql', -1148306529, 'root', '2015-06-03 15:26:56', 1, 1), - (72, 72, '72', 'add m loan counter changes', 'SQL', 'V72__add_m_loan_counter_changes.sql', 878990870, 'root', '2015-06-03 15:26:56', 63, 1), - (73, 73, '73', 'add repayments rescheduled to and processed column to holiday', 'SQL', 'V73__add_repayments_rescheduled_to_and_processed_column_to_holiday.sql', -503832337, 'root', '2015-06-03 15:26:56', 154, 1), - (74, 74, '74', 'alter m loan counter table add group', 'SQL', 'V74__alter_m_loan_counter_table_add_group.sql', -2117284805, 'root', '2015-06-03 15:26:56', 94, 1), - (75, 75, '75', 'add reschedule-repayments-on-holidays to configuration', 'SQL', 'V75__add_reschedule-repayments-on-holidays_to_configuration.sql', 1328301697, 'root', '2015-06-03 15:26:56', 1, 1), - (76, 76, '76', 'rename permission grouping', 'SQL', 'V76__rename_permission_grouping.sql', 782643717, 'root', '2015-06-03 15:26:56', 3, 1), - (77, 77, '77', 'alter m product loan changes', 'SQL', 'V77__alter_m_product_loan_changes.sql', -1168017986, 'root', '2015-06-03 15:26:56', 87, 1), - (78, 78, '78', 'breakdown portfolio grouping', 'SQL', 'V78__breakdown_portfolio_grouping.sql', -1151517023, 'root', '2015-06-03 15:26:56', 2, 1), - (79, 79, '79', 'schedule jobs tables', 'SQL', 'V79__schedule_jobs_tables.sql', -648184231, 'root', '2015-06-03 15:26:57', 81, 1), - (8, 8, '8', 'deposit-transaction-permissions-if-they-exist', 'SQL', 'V8__deposit-transaction-permissions-if-they-exist.sql', 1925296214, 'root', '2015-06-03 15:26:51', 1, 1), - (80, 80, '80', 'schedule jobs tables updates', 'SQL', 'V80__schedule_jobs_tables_updates.sql', 427508507, 'root', '2015-06-03 15:26:57', 74, 1), - (81, 81, '81', 'savings related changes', 'SQL', 'V81__savings_related_changes.sql', 1538092549, 'root', '2015-06-03 15:26:57', 247, 1), - (82, 82, '82', 'schedule jobs tables updates for running status', 'SQL', 'V82__schedule_jobs_tables_updates_for_running_status.sql', -1900600035, 'root', '2015-06-03 15:26:57', 213, 1), - (83, 83, '83', 'non-working-days-table', 'SQL', 'V83__non-working-days-table.sql', 7304707, 'root', '2015-06-03 15:26:57', 52, 1), - (84, 84, '84', 'undo savings transaction permission', 'SQL', 'V84__undo_savings_transaction_permission.sql', -1712636214, 'root', '2015-06-03 15:26:57', 1, 1), - (85, 85, '85', 'product mix related changes', 'SQL', 'V85__product_mix_related_changes.sql', -1558734721, 'root', '2015-06-03 15:26:57', 117, 1), - (86, 86, '86', 'update-working-days', 'SQL', 'V86__update-working-days.sql', 1751835641, 'root', '2015-06-03 15:26:57', 6, 1), - (87, 87, '87', 'add permission for scheduler', 'SQL', 'V87__add_permission_for_scheduler.sql', -575950289, 'root', '2015-06-03 15:26:57', 1, 1), - (88, 88, '88', 'added update constrain for scheduler jobs', 'SQL', 'V88__added_update_constrain_for_scheduler_jobs.sql', -897794717, 'root', '2015-06-03 15:26:57', 27, 1), - (89, 89, '89', 'added scheduler group', 'SQL', 'V89__added_scheduler_group.sql', -1570560491, 'root', '2015-06-03 15:26:57', 32, 1), - (9, 9, '9', 'add min max constraint column to loan loanproduct', 'SQL', 'V9__add_min_max_constraint_column_to_loan_loanproduct.sql', -709167892, 'root', '2015-06-03 15:26:51', 317, 1), - (90, 90, '90', 'client performance history reports', 'SQL', 'V90__client_performance_history_reports.sql', -358569421, 'root', '2015-06-03 15:26:58', 2, 1), - (91, 91, '91', 'apply annual fees permission', 'SQL', 'V91__apply_annual_fees_permission.sql', 1152030995, 'root', '2015-06-03 15:26:58', 2, 1), - (92, 92, '91.1', 'configuration settings for holiday and non workingday', 'SQL', 'V91_1__configuration_settings_for_holiday_and_non_workingday.sql', 2070643129, 'root', '2015-06-03 15:26:58', 2, 1), - (93, 93, '92', 'group center assign staff permission', 'SQL', 'V92__group_center_assign_staff_permission.sql', -1280675809, 'root', '2015-06-03 15:26:58', 2, 1), - (94, 94, '93', 'loan transaction external id', 'SQL', 'V93__loan_transaction_external_id.sql', 1766682107, 'root', '2015-06-03 15:26:58', 49, 1), - (95, 95, '94', 'added savings accont type', 'SQL', 'V94__added_savings_accont type.sql', -947513684, 'root', '2015-06-03 15:26:58', 68, 1), - (96, 96, '95', 'batch job postInterest', 'SQL', 'V95__batch_job_postInterest.sql', 2096051563, 'root', '2015-06-03 15:26:58', 1, 1), - (97, 97, '96', 'savings accounts transfers table', 'SQL', 'V96__savings_accounts_transfers_table.sql', 1113386790, 'root', '2015-06-03 15:26:58', 61, 1), - (98, 98, '97', 'add permission for adjust savings transaction', 'SQL', 'V97__add_permission_for_adjust_savings_transaction.sql', -2045732265, 'root', '2015-06-03 15:26:58', 2, 1), - (99, 99, '98', 'added currency roundof for multipleof', 'SQL', 'V98__added_currency_roundof_for_multipleof.sql', -107928515, 'root', '2015-06-03 15:26:58', 325, 1); + (1, 1, ' +1', 'mifosplatform-core-ddl-latest', 'SQL', 'V1__mifosplatform-core-ddl-latest.sql', 1800446512, 'root', ' +2015-06-03 15:26:50 +', 919, 1), + (10, 10, '10 +', 'interest-posting-fields-for-savings', 'SQL', 'V10__interest-posting-fields-for-savings.sql', 921633032, 'root', ' +2015-06-03 15:26:51 +', 300, 1), + (100, 100, '100 +', 'Group saving summary report', 'SQL', 'V100__Group_saving_summary_report.sql', -1635399448, 'root', ' +2015-06-03 15:26:58 +', 1, 1), + (101, 101, '101 +', 'add mulitplesof to account transfers table', 'SQL', 'V101__add_mulitplesof_to_account_transfers_table.sql', 693007396, 'root', ' +2015-06-03 15:26:58 +', 109, 1), + (102, 102, '102 +', 'client attendance tables', 'SQL', 'V102__client_attendance_tables.sql', 1698025788, 'root', ' +2015-06-03 15:26:58 +', 48, 1), + (103, 103, '103 +', 'cluster support for batch jobs', 'SQL', 'V103__cluster_support_for_batch_jobs.sql', -1566474883, 'root', ' +2015-06-03 15:26:58 +', 49, 1), + (104, 104, '104 +', 'permissions for transfers', 'SQL', 'V104__permissions_for_transfers.sql', 1104237193, 'root', ' +2015-06-03 15:26:58 +', 2, 1), + (105, 105, '105 +', 'track loan transaction against office', 'SQL', 'V105__track_loan_transaction_against_office.sql', 460401960, 'root', ' +2015-06-03 15:26:59 +', 225, 1), + (106, 106, '106 +', 'more permissions for transfers', 'SQL', 'V106__more_permissions_for_transfers.sql', -1298572248, 'root', ' +2015-06-03 15:26:59 +', 4, 1), + (107, 107, '107 +', 'datatable code mappings', 'SQL', 'V107__datatable_code_mappings.sql', 1534043325, 'root', ' +2015-06-03 15:26:59 +', 37, 1), + (108, 108, '108 +', 'client has transfer office', 'SQL', 'V108__client_has_transfer_office.sql', 1659150580, 'root', ' +2015-06-03 15:26:59 +', 19, 1), + (109, 109, '109 +', 'account transfer withdrawal fee configuration', 'SQL', 'V109__account_transfer_withdrawal_fee_configuration.sql', 1610197449, 'root', ' +2015-06-03 15:26:59 +', 80, 1), + (11, 11, '11 +', 'add-payment-details', 'SQL', 'V11__add-payment-details.sql', 662675601, 'root', ' +2015-06-03 15:26:52 +', 88, 1), + (110, 110, '110 +', 'group center close', 'SQL', 'V110__group_center_close.sql', 592532718, 'root', ' +2015-06-03 15:26:59 +', 38, 1), + (111, 111, '111 +', 'disable constraint approach for datatables by default', 'SQL', 'V111__disable_constraint_approach_for_datatables_by_default.sql', 2058257907, 'root', ' +2015-06-03 15:26:59 +', 1, 1), + (112, 112, '111.1 +', 'set default transfers in suspense account for existing loan products', 'SQL', 'V111_1__set default_transfers_in_suspense_account_for_existing_loan_products.sql', -2022488149, 'root', ' +2015-06-03 15:26:59 +', 1, 1), + (113, 113, '112 +', 'mixreport sql support', 'SQL', 'V112__mixreport_sql_support.sql', 1698359442, 'root', ' +2015-06-03 15:26:59 +', 84, 1), + (114, 114, '113 +', 'track savings transaction against office', 'SQL', 'V113__track_savings_transaction_against_office.sql', -443279148, 'root', ' +2015-06-03 15:26:59 +', 106, 1), + (115, 115, '114 +', 'set default transfers in suspense account for existing savings products - Copy', 'SQL', 'V114__set_default_transfers_in_suspense_account_for_existing_savings_products - Copy.sql', -1403120536, 'root', ' +2015-06-03 15:26:59 +', 1, 1), + (116, 116, '115 +', 'permissions for cache api', 'SQL', 'V115__permissions_for_cache_api.sql', -1583242502, 'root', ' +2015-06-03 15:26:59 +', 26, 1), + (117, 117, '116 +', 'track currency for journal entries', 'SQL', 'V116__track_currency_for_journal_entries.sql', -1108820305, 'root', ' +2015-06-03 15:26:59 +', 127, 1), + (118, 118, '117 +', 'loan charge from savings', 'SQL', 'V117__loan_charge_from_savings.sql', 294078650, 'root', ' +2015-06-03 15:27:00 +', 106, 1), + (119, 119, '118 +', 'savings charge', 'SQL', 'V118__savings_charge.sql', 1334878019, 'root', ' +2015-06-03 15:27:00 +', 89, 1), + (120, 120, '118.1 +', 'savings charge patch update', 'SQL', 'V118_1__savings_charge_patch_update.sql', 681062374, 'root', ' +2015-06-03 15:27:00 +', 42, 1), + (121, 121, '118.2 +', 'product mapping delete duplicate fund source to account mappings', 'SQL', 'V118_2__product_mapping_delete_duplicate_fund_source_to_account_mappings.sql', 843735115, 'root', ' +2015-06-03 15:27:00 +', 0, 1), + (122, 122, '118.3 +', 'permissions form propose and accept client transfers', 'SQL', 'V118_3__permissions_form_propose_and_accept_client_transfers.sql', -2021972980, 'root', ' +2015-06-03 15:27:00 +', 2, 1), + (123, 123, '118.4 +', 'reset default transfers in suspense account for existing savings products', 'SQL', 'V118_4__reset_default_transfers_in_suspense_account_for_existing_savings_products.sql', -699275732, 'root', ' +2015-06-03 15:27:00 +', 1, 1), + (124, 124, '118.5 +', 'batch job entry for pay savings charge', 'SQL', 'V118_5__batch_job_entry_for_pay_savings_charge.sql', 11127915, 'root', ' +2015-06-03 15:27:00 +', 1, 1), + (125, 125, '118.6 +', 'defaults for income from penalties for savings product', 'SQL', 'V118_6__defaults_for_income_from_penalties_for savings_product.sql', -1604260872, 'root', ' +2015-06-03 15:27:00 +', 2, 1), + (126, 126, '118.7 +', 'move withdrawal annual fee to charges', 'SQL', 'V118_7__move_withdrawal_annual_fee_to_charges.sql', 486907496, 'root', ' +2015-06-03 15:27:00 +', 166, 1), + (127, 127, '118.8 +', 'track overpayments seperately in loan transactions', 'SQL', 'V118_8__track_overpayments_seperately_in_loan_transactions.sql', -1506771861, 'root', ' +2015-06-03 15:27:00 +', 145, 1), + (128, 128, '119 +', 'add template table', 'SQL', 'V119__add_template_table.sql', -340132249, 'root', ' +2015-06-03 15:27:00 +', 45, 1), + (12, 12, '12 +', 'add external id to couple of tables', 'SQL', 'V12__add_external_id_to_couple_of_tables.sql', 1782914953, 'root', ' +2015-06-03 15:26:52 +', 214, 1), + (129, 129, '120 +', 'accounting running balance', 'SQL', 'V120__accounting_running_balance.sql', 1553735313, 'root', ' +2015-06-03 15:27:00 +', 39, 1), + (130, 130, '121 +', 'accounting running balance for organization', 'SQL', 'V121__accounting_running_balance_for_organization.sql', -725212393, 'root', ' +2015-06-03 15:27:00 +', 63, 1), + (131, 131, '122 +', 'recurring fee support for savings', 'SQL', 'V122__recurring_fee_support_for_savings.sql', -1243503882, 'root', ' +2015-06-03 15:27:01 +', 77, 1), + (132, 132, '123 +', 'remove payment mode for savings', 'SQL', 'V123__remove_payment_mode_for_savings.sql', -310516979, 'root', ' +2015-06-03 15:27:01 +', 52, 1), + (133, 133, '124 +', 'added min max cap for charges', 'SQL', 'V124__added_min_max_cap_for_charges.sql', 1016982354, 'root', ' +2015-06-03 15:27:01 +', 71, 1), + (134, 134, '125 +', 'added column for actual fee amount or percentage', 'SQL', 'V125__added_column_for_actual_fee_amount_or_percentage.sql', -1902751935, 'root', ' +2015-06-03 15:27:01 +', 42, 1), + (135, 135, '126 +', 'initial database structure for sms outbound', 'SQL', 'V126__initial_database_structure_for_sms_outbound.sql', 1597367272, 'root', ' +2015-06-03 15:27:01 +', 28, 1), + (136, 136, '127 +', 'mobile no fields', 'SQL', 'V127__mobile_no_fields.sql', -1478167026, 'root', ' +2015-06-03 15:27:01 +', 135, 1), + (137, 137, '128 +', 'added loan installment charge', 'SQL', 'V128__added_loan_installment_charge.sql', -427737636, 'root', ' +2015-06-03 15:27:01 +', 24, 1), + (138, 138, '129 +', 'client and group timeline', 'SQL', 'V129__client_and_group_timeline.sql', -354048349, 'root', ' +2015-06-03 15:27:01 +', 114, 1), + (13, 13, '13 +', 'add group and client pending configuration', 'SQL', 'V13__add_group_and_client_pending_configuration.sql', 2043924577, 'root', ' +2015-06-03 15:26:52 +', 4, 1), + (139, 139, '130 +', 'calendar-history-table', 'SQL', 'V130__calendar-history-table.sql', -1068056425, 'root', ' +2015-06-03 15:27:01 +', 22, 1), + (140, 140, '131 +', 'holiday-status-column-and-permissions', 'SQL', 'V131__holiday-status-column-and-permissions.sql', 169147264, 'root', ' +2015-06-03 15:27:01 +', 89, 1), + (141, 141, '132 +', 'borrower cycle changes', 'SQL', 'V132__borrower_cycle_changes.sql', -1484124924, 'root', ' +2015-06-03 15:27:01 +', 70, 1), + (142, 142, '133 +', 'adding payment detail with journal entry', 'SQL', 'V133__adding_payment_detail_with_journal_entry.sql', 1432448000, 'root', ' +2015-06-03 15:27:01 +', 31, 1), + (143, 143, '134 +', 'added column value on c configuration', 'SQL', 'V134__added_column_value_on_c_configuration.sql', -587477224, 'root', ' +2015-06-03 15:27:01 +', 25, 1), + (144, 144, '134.1 +', 'submitted date updation for clients', 'SQL', 'V134_1__submitted_date_updation_for_clients.sql', -1714823906, 'root', ' +2015-06-03 15:27:01 +', 2, 1), + (145, 145, '134.2 +', 'permissions spelling correction', 'SQL', 'V134_2__permissions_spelling_correction.sql', -1824098129, 'root', ' +2015-06-03 15:27:02 +', 1, 1), + (146, 146, '135 +', 'added permission for undo written off', 'SQL', 'V135__added_permission_for_undo_written_off.sql', 426644857, 'root', ' +2015-06-03 15:27:02 +', 1, 1), + (147, 147, '136.1 +', 'update script strechy parameter', 'SQL', 'V136_1__update_script_strechy_parameter.sql', 633461657, 'root', ' +2015-06-03 15:27:02 +', 1, 1), + (148, 148, '137 +', 'added is active column in m staff', 'SQL', 'V137__added_is_active_column_in_m_staff.sql', 1962782431, 'root', ' +2015-06-03 15:27:02 +', 50, 1), + (149, 149, '138 +', 'add short name for m product loan and m savings product', 'SQL', 'V138__add_short_name_for_m_product_loan_and_m_savings_product.sql', 420749751, 'root', ' +2015-06-03 15:27:02 +', 265, 1), + (150, 150, '139 +', 'default value for is active updated to true in m staff', 'SQL', 'V139__default_value_for_is_active_updated_to_true_in_m_staff.sql', -633907272, 'root', ' +2015-06-03 15:27:02 +', 45, 1), + (14, 14, '14 +', 'rename status id to enum', 'SQL', 'V14__rename_status_id_to_enum.sql', -309404445, 'root', ' +2015-06-03 15:26:52 +', 55, 1), + (151, 151, '140 +', 'added loan charge status', 'SQL', 'V140__added_loan_charge_status.sql', 701858626, 'root', ' +2015-06-03 15:27:02 +', 65, 1), + (152, 152, '140.1 +', 'added payment detail id in ac gl journal entry', 'SQL', 'V140_1__added_payment_detail_id_in_ac_gl_journal_entry.sql', -2051594288, 'root', ' +2015-06-03 15:27:02 +', 33, 1), + (153, 153, '141 +', 'add early repayment strategy', 'SQL', 'V141__add_early_repayment_strategy.sql', 1510094803, 'root', ' +2015-06-03 15:27:02 +', 1, 1), + (154, 154, '142 +', 'read savingsaccount charge permission', 'SQL', 'V142__read_savingsaccount_charge_permission.sql', 643820806, 'root', ' +2015-06-03 15:27:02 +', 1, 1), + (155, 155, '143 +', 'create journalentry checker permission', 'SQL', 'V143__create_journalentry_checker_permission.sql', 1931469061, 'root', ' +2015-06-03 15:27:02 +', 1, 1), + (156, 156, '144 +', 'spelling mistake corrections', 'SQL', 'V144__spelling_mistake_corrections.sql', 196034832, 'root', ' +2015-06-03 15:27:02 +', 18, 1), + (157, 157, '145 +', 'add force password reset in c configuration', 'SQL', 'V145__add_force_password_reset_in_c_configuration.sql', 521336058, 'root', ' +2015-06-03 15:27:02 +', 164, 1), + (158, 158, '146 +', 'tranche loans', 'SQL', 'V146__tranche_loans.sql', 500763449, 'root', ' +2015-06-03 15:27:03 +', 180, 1), + (159, 159, '147 +', 'tranche loans column name changes', 'SQL', 'V147__tranche_loans_column_name_changes.sql', 400468365, 'root', ' +2015-06-03 15:27:03 +', 47, 1), + (160, 160, '148 +', 'overdraft changes', 'SQL', 'V148__overdraft_changes.sql', 1529306114, 'root', ' +2015-06-03 15:27:03 +', 143, 1), + (161, 161, '149 +', 'add created date savings transaction', 'SQL', 'V149__add_created_date_savings_transaction.sql', -116162300, 'root', ' +2015-06-03 15:27:03 +', 43, 1), + (15, 15, '15 +', 'center permissions', 'SQL', 'V15__center_permissions.sql', 2015498904, 'root', ' +2015-06-03 15:26:52 +', 3, 1), + (162, 162, '150 +', 'basic savings report', 'SQL', 'V150__basic_savings_report.sql', 1230058085, 'root', ' +2015-06-03 15:27:03 +', 53, 1), + (163, 163, '151 +', 'add default savings account to client', 'SQL', 'V151__add_default_savings_account_to_client.sql', 1421080968, 'root', ' +2015-06-03 15:27:03 +', 44, 1), + (164, 164, '152 +', 'added grace for over due', 'SQL', 'V152__added_grace_for_over_due.sql', -1487653468, 'root', ' +2015-06-03 15:27:03 +', 141, 1), + (165, 165, '153 +', 'Insert missed permissions', 'SQL', 'V153__Insert_missed_permissions.sql', 1384787449, 'root', ' +2015-06-03 15:27:03 +', 3, 1), + (166, 166, '154 +', 'aging details', 'SQL', 'V154__aging_details.sql', 1117759702, 'root', ' +2015-06-03 15:27:03 +', 1, 1), + (167, 167, '155 +', 'stretchy into pentaho', 'SQL', 'V155__stretchy_into_pentaho.sql', 1146009989, 'root', ' +2015-06-03 15:27:03 +', 45, 1), + (168, 168, '156 +', 'added loan saving txns pentaho', 'SQL', 'V156__added_loan_saving_txns_pentaho.sql', 1288577073, 'root', ' +2015-06-03 15:27:03 +', 4, 1), + (169, 169, '157 +', 'overdue charge improvements', 'SQL', 'V157__overdue_charge_improvements.sql', -1602717371, 'root', ' +2015-06-03 15:27:03 +', 63, 1), + (170, 170, '158 +', 'dashboard and navigation queries', 'SQL', 'V158__dashboard_and_navigation_queries.sql', 555462763, 'root', ' +2015-06-03 15:27:03 +', 8, 1), + (171, 171, '159 +', 'add transaction id column m portfolio command source', 'SQL', 'V159__add_transaction_id_column_m_portfolio_command_source.sql', 724056808, 'root', ' +2015-06-03 15:27:04 +', 99, 1), + (16, 16, '16 +', 'drop min max column on loan table', 'SQL', 'V16__drop_min_max_column_on_loan_table.sql', 120700748, 'root', ' +2015-06-03 15:26:52 +', 83, 1), + (172, 172, '160 +', 'standing instruction changes', 'SQL', 'V160__standing_instruction_changes.sql', -1634447666, 'root', ' +2015-06-03 15:27:04 +', 131, 1), + (173, 173, '160.2 +', 'Allow nullValue For principal on lonProduct', 'SQL', 'V160_2__Allow_nullValue_For_principal_on_lonProduct.sql', 844844635, 'root', ' +2015-06-03 15:27:04 +', 103, 1), + (174, 174, '161 +', 'added accrual batch job', 'SQL', 'V161__added_accrual_batch_job.sql', -760303345, 'root', ' +2015-06-03 15:27:04 +', 68, 1), + (175, 175, '162 +', 'overdue charge batch job', 'SQL', 'V162__overdue_charge_batch_job.sql', -1213828784, 'root', ' +2015-06-03 15:27:04 +', 1, 1), + (176, 176, '163 +', 'added npa for loans', 'SQL', 'V163__added_npa_for_loans.sql', 1832640598, 'root', ' +2015-06-03 15:27:04 +', 152, 1), + (177, 177, '164 +', 'fd and rd deposit tables', 'SQL', 'V164__fd_and_rd_deposit_tables.sql', -1202481632, 'root', ' +2015-06-03 15:27:04 +', 389, 1), + (178, 178, '165 +', 'added permission for disburse to saving account', 'SQL', 'V165__added_permission_for_disburse_to_saving_account.sql', -2109143723, 'root', ' +2015-06-03 15:27:05 +', 2, 1), + (179, 179, '166 +', 'added deposit amount to product term and preclosure', 'SQL', 'V166__added_deposit_amount_to_product_term_and_preclosure.sql', -452742507, 'root', ' +2015-06-03 15:27:05 +', 81, 1), + (180, 180, '167 +', 'added columns for writtenOff loans recovered', 'SQL', 'V167__added_columns_for_writtenOff_loans_recovered.sql', 384306348, 'root', ' +2015-06-03 15:27:05 +', 94, 1), + (181, 181, '168 +', 'added transfer fixed deposit interest to linked account', 'SQL', 'V168__added_transfer_fixed_deposit_interest_to_linked_account.sql', -246915767, 'root', ' +2015-06-03 15:27:05 +', 89, 1), + (182, 182, '169 +', 'update dashboard reports to core reports use report to false', 'SQL', 'V169__update_dashboard_reports_to_core_reports_use_report_to_false.sql', 1910199831, 'root', ' +2015-06-03 15:27:05 +', 1, 1), + (17, 17, '17 +', 'update stretchy reporting ddl', 'SQL', 'V17__update_stretchy_reporting_ddl.sql', -1374690095, 'root', ' +2015-06-03 15:26:52 +', 141, 1), + (183, 183, '170 +', 'update deposit accounts maturity details job', 'SQL', 'V170__update_deposit_accounts_maturity_details_job.sql', 348328732, 'root', ' +2015-06-03 15:27:05 +', 2, 1), + (184, 184, '171 +', 'added mandatory savings and rd changes', 'SQL', 'V171__added_mandatory_savings_and_rd_changes.sql', -106401726, 'root', ' +2015-06-03 15:27:05 +', 324, 1), + (185, 185, '172 +', 'accounting changes for transfers', 'SQL', 'V172__accounting_changes_for_transfers.sql', 398136509, 'root', ' +2015-06-03 15:27:05 +', 58, 1), + (186, 186, '173 +', 'ppi', 'SQL', 'V173__ppi.sql', -512596643, 'root', ' +2015-06-03 15:27:05 +', 107, 1), + (187, 187, '174 +', 'remove interest accrual', 'SQL', 'V174__remove_interest_accrual.sql', -353161686, 'root', ' +2015-06-03 15:27:05 +', 1, 1), + (188, 188, '175 +', 'added incentive interest rates', 'SQL', 'V175__added_incentive_interest_rates.sql', 749853165, 'root', ' +2015-06-03 15:27:06 +', 167, 1), + (189, 189, '176 +', 'updates to financial activity accounts', 'SQL', 'V176__updates_to_financial_activity_accounts.sql', -1274960595, 'root', ' +2015-06-03 15:27:06 +', 85, 1), + (190, 190, '177 +', 'cleanup for client incentives', 'SQL', 'V177__cleanup_for_client_incentives.sql', -1838944707, 'root', ' +2015-06-03 15:27:06 +', 2, 1), + (191, 191, '178 +', 'updates to financial activity accounts pt2', 'SQL', 'V178__updates_to_financial_activity_accounts_pt2.sql', -658545948, 'root', ' +2015-06-03 15:27:06 +', 4, 1), + (192, 192, '179 +', 'updates to action names for maker checker permissions', 'SQL', 'V179__updates_to_action_names_for_maker_checker_permissions.sql', 255160379, 'root', ' +2015-06-03 15:27:06 +', 4, 1), + (18, 18, '18 +', 'update stretchy reporting reportSql', 'SQL', 'V18__update_stretchy_reporting_reportSql.sql', 1012533433, 'root', ' +2015-06-03 15:26:52 +', 4, 1), + (193, 193, '180 +', 'update report schemas for disbursed vs awaitingdisbursal and groupnamesbystaff', 'SQL', 'V180__update_report_schemas_for_disbursed_vs_awaitingdisbursal_and_groupnamesbystaff.sql', 674107071, 'root', ' +2015-06-03 15:27:06 +', 2, 1), + (194, 194, '181 +', 'standing instruction logging', 'SQL', 'V181__standing_instruction_logging.sql', -737719462, 'root', ' +2015-06-03 15:27:06 +', 35, 1), + (195, 195, '182 +', 'added min required balance to savings product', 'SQL', 'V182__added_min_required_balance_to_savings_product.sql', -1648679936, 'root', ' +2015-06-03 15:27:06 +', 76, 1), + (196, 196, '183 +', 'added min balance for interest calculation', 'SQL', 'V183__added_min_balance_for_interest_calculation.sql', 1902310539, 'root', ' +2015-06-03 15:27:06 +', 105, 1), + (197, 197, '184 +', 'update min required balance for savings product', 'SQL', 'V184__update_min_required_balance_for_savings_product.sql', 313972591, 'root', ' +2015-06-03 15:27:06 +', 28, 1), + (198, 198, '185 +', 'add accrual till date for periodic accrual', 'SQL', 'V185__add_accrual_till_date_for_periodic_accrual.sql', 1705918516, 'root', ' +2015-06-03 15:27:06 +', 144, 1), + (199, 199, '186 +', 'added periodic accrual job', 'SQL', 'V186__added_periodic_accrual_job.sql', 394599380, 'root', ' +2015-06-03 15:27:06 +', 1, 1), + (200, 200, '187 +', 'added permission to periodic accrual', 'SQL', 'V187__added_permission_to_periodic_accrual.sql', 1479836850, 'root', ' +2015-06-03 15:27:06 +', 2, 1), + (201, 201, '188 +', 'add savingscharge inactivate permissions', 'SQL', 'V188__add_savingscharge_inactivate_permissions.sql', -740798972, 'root', ' +2015-06-03 15:27:06 +', 41, 1), + (202, 202, '189 +', 'm loan interest recalculation tables', 'SQL', 'V189__m_loan_interest_recalculation_tables.sql', -873206694, 'root', ' +2015-06-03 15:27:07 +', 301, 1), + (19, 19, '19 +', 'report maintenance permissions', 'SQL', 'V19__report_maintenance_permissions.sql', 57066563, 'root', ' +2015-06-03 15:26:52 +', 4, 1), + (203, 203, '190 +', 'add associategroup disassociategroup permissions', 'SQL', 'V190__add_associategroup_disassociategroup_permissions.sql', 1517251106, 'root', ' +2015-06-03 15:27:07 +', 2, 1), + (204, 204, '191 +', 'update gl account increase size of name col', 'SQL', 'V191__update_gl_account_increase_size_of_name_col.sql', -1113630867, 'root', ' +2015-06-03 15:27:07 +', 17, 1), + (205, 205, '192 +', 'interest recalculate job', 'SQL', 'V192__interest_recalculate_job.sql', -110230216, 'root', ' +2015-06-03 15:27:07 +', 2, 1), + (206, 206, '193 +', 'added column joiningDate for staff', 'SQL', 'V193__added_column_joiningDate_for_staff.sql', -443555800, 'root', ' +2015-06-03 15:27:07 +', 33, 1), + (207, 207, '194 +', 'added recalculatedInterestComponent for interest recalculation', 'SQL', 'V194__added_recalculatedInterestComponent_for_interest_recalculation.sql', 2052912155, 'root', ' +2015-06-03 15:27:07 +', 35, 1), + (208, 208, '195 +', 'moved rest frequency to product level', 'SQL', 'V195__moved_rest_frequency_to_product_level.sql', 1459923988, 'root', ' +2015-06-03 15:27:07 +', 97, 1), + (209, 209, '196 +', 'added loan running balance to transactions', 'SQL', 'V196__added_loan_running_balance_to_transactions.sql', 342588167, 'root', ' +2015-06-03 15:27:07 +', 48, 1), + (210, 210, '197 +', 'updated loan running balance of transactions', 'SQL', 'V197__updated_loan_running_balance_of_transactions.sql', 473184964, 'root', ' +2015-06-03 15:27:07 +', 27, 1), + (211, 211, '198 +', 'loan rescheduling tables and permissions', 'SQL', 'V198__loan_rescheduling_tables_and_permissions.sql', 689132282, 'root', ' +2015-06-03 15:27:07 +', 128, 1), + (212, 212, '199 +', 'removed extra columns from schedule history', 'SQL', 'V199__removed_extra_columns_from_schedule_history.sql', 1961301885, 'root', ' +2015-06-03 15:27:07 +', 105, 1), + (2, 2, '2 +', 'mifosx-base-reference-data-utf8', 'SQL', 'V2__mifosx-base-reference-data-utf8.sql', 2084750372, 'root', ' +2015-06-03 15:26:50 +', 30, 1), + (20, 20, '20 +', 'report maint perms really configuration', 'SQL', 'V20__report_maint_perms_really_configuration.sql', -796088526, 'root', ' +2015-06-03 15:26:52 +', 1, 1), + (213, 213, '200 +', 'alter savings account for start interest calculation date', 'SQL', 'V200__alter_savings_account_for_start_interest_calculation_date.sql', -2046824671, 'root', ' +2015-06-03 15:27:07 +', 68, 1), + (214, 214, '201 +', 'webhooks', 'SQL', 'V201__webhooks.sql', -1852431117, 'root', ' +2015-06-03 15:27:08 +', 194, 1), + (215, 215, '202 +', 'savings officer history table', 'SQL', 'V202__savings_officer_history_table.sql', 1515516270, 'root', ' +2015-06-03 15:27:08 +', 50, 1), + (216, 216, '203 +', 'added subbmittedDate loantransaction', 'SQL', 'V203__added_subbmittedDate_loantransaction.sql', 762589044, 'root', ' +2015-06-03 15:27:08 +', 34, 1), + (217, 217, '204 +', 'insert script for charges paid by for accruals', 'SQL', 'V204__insert_script_for_charges_paid_by_for_accruals.sql', 1126139057, 'root', ' +2015-06-03 15:27:08 +', 2, 1), + (218, 218, '205 +', 'fix for charge and interest waiver with accruals', 'SQL', 'V205__fix_for_charge_and_interest_waiver_with_accruals.sql', 1834454603, 'root', ' +2015-06-03 15:27:08 +', 91, 1), + (219, 219, '206 +', 'interest posting configuration', 'SQL', 'V206__interest_posting_configuration.sql', 1777902577, 'root', ' +2015-06-03 15:27:08 +', 52, 1), + (220, 220, '207 +', 'min max clients per group', 'SQL', 'V207__min_max_clients_per_group.sql', -1776502977, 'root', ' +2015-06-03 15:27:08 +', 46, 1), + (221, 221, '208 +', 'min max clients in group redux', 'SQL', 'V208__min_max_clients_in_group_redux.sql', -1881405737, 'root', ' +2015-06-03 15:27:08 +', 47, 1), + (222, 222, '209 +', 'add all report names in m permission table', 'SQL', 'V209__add_all_report_names_in_m_permission_table.sql', 1034507855, 'root', ' +2015-06-03 15:27:08 +', 9, 1), + (21, 21, '21 +', 'activation-permissions-for-clients', 'SQL', 'V21__activation-permissions-for-clients.sql', 1289685589, 'root', ' +2015-06-03 15:26:52 +', 45, 1), + (223, 223, '210 +', 'track manually adjusted transactions', 'SQL', 'V210__track_manually_adjusted_transactions.sql', -1444778976, 'root', ' +2015-06-03 15:27:08 +', 47, 1), + (224, 224, '211 +', 'minimum days between disbursal and first repayment', 'SQL', 'V211__minimum_days_between_disbursal_and_first_repayment.sql', 1660532746, 'root', ' +2015-06-03 15:27:08 +', 51, 1), + (225, 225, '212 +', 'add NthDay and DayOfWeek columns loan', 'SQL', 'V212__add_NthDay_and_DayOfWeek_columns_loan.sql', -924123306, 'root', ' +2015-06-03 15:27:08 +', 100, 1), + (226, 226, '213 +', 'NthDay and DayOfWeek columns should be nullable', 'SQL', 'V213__NthDay_and_DayOfWeek_columns_should_be_nullable.sql', -240730886, 'root', ' +2015-06-03 15:27:09 +', 135, 1), + (227, 227, '214 +', 'alter table add create SI at disbursement', 'SQL', 'V214__alter_table_add_create_SI_at_disbursement.sql', -473599398, 'root', ' +2015-06-03 15:27:09 +', 272, 1), + (228, 228, '215 +', 'guarantee on hold fund changes', 'SQL', 'V215__guarantee_on_hold_fund_changes.sql', 111795154, 'root', ' +2015-06-03 15:27:09 +', 235, 1), + (229, 229, '216 +', 'adding loan proposed amount to loan', 'SQL', 'V216__adding_loan_proposed_amount_to_loan.sql', 2123229215, 'root', ' +2015-06-03 15:27:09 +', 109, 1), + (230, 230, '217 +', 'client substatus and codevalue description', 'SQL', 'V217__client_substatus_and_codevalue_description.sql', 1344632615, 'root', ' +2015-06-03 15:27:09 +', 88, 1), + (231, 231, '218 +', 'add user and datetime for loan savings transactions', 'SQL', 'V218__add_user_and_datetime_for_loan_savings_transactions.sql', 939524468, 'root', ' +2015-06-03 15:27:10 +', 115, 1), + (232, 232, '219 +', 'guarantor on hold fund changes for account', 'SQL', 'V219__guarantor_on_hold_fund_changes_for_account.sql', -380048619, 'root', ' +2015-06-03 15:27:10 +', 327, 1), + (22, 22, '22 +', 'alter-group-for-consistency-add-permissions', 'SQL', 'V22__alter-group-for-consistency-add-permissions.sql', 1509095759, 'root', ' +2015-06-03 15:26:52 +', 130, 1), + (233, 233, '220 +', 'account number preferences', 'SQL', 'V220__account_number_preferences.sql', 765825838, 'root', ' +2015-06-03 15:27:10 +', 22, 1), + (234, 234, '221 +', 'add version for m savings account', 'SQL', 'V221__add_version_for_m_savings_account.sql', -2026329127, 'root', ' +2015-06-03 15:27:10 +', 49, 1), + (235, 235, '222 +', 'guarantor on hold fund changes for transactions', 'SQL', 'V222__guarantor_on_hold_fund_changes_for_transactions.sql', -426530719, 'root', ' +2015-06-03 15:27:10 +', 193, 1), + (236, 236, '223 +', 'add version for m loan account', 'SQL', 'V223__add_version_for_m_loan_account.sql', -1129379217, 'root', ' +2015-06-03 15:27:10 +', 134, 1), + (237, 237, '224 +', 'client lifecycle adding statuses', 'SQL', 'V224__client_lifecycle_adding_statuses.sql', 43152274, 'root', ' +2015-06-03 15:27:11 +', 181, 1), + (238, 238, '225 +', 'permissions for updating recurring deposit amount', 'SQL', 'V225__permissions_for_updating_recurring_deposit_amount.sql', -564145896, 'root', ' +2015-06-03 15:27:11 +', 1, 1), + (239, 239, '226 +', 'configuration for enforcing calendars for jlg loans', 'SQL', 'V226__configuration_for_enforcing_calendars_for_jlg_loans.sql', -382855919, 'root', ' +2015-06-03 15:27:11 +', 1, 1), + (240, 240, '227 +', 'loan-refund-permissions', 'SQL', 'V227__loan-refund-permissions.sql', -511074400, 'root', ' +2015-06-03 15:27:11 +', 2, 1), + (241, 241, '228 +', 'entity to entity access', 'SQL', 'V228__entity_to_entity_access.sql', -409076299, 'root', ' +2015-06-03 15:27:11 +', 108, 1), + (242, 242, '229 +', 'teller cash management', 'SQL', 'V229__teller_cash_management.sql', 2147103896, 'root', ' +2015-06-03 15:27:11 +', 83, 1), + (23, 23, '23 +', 'remove-enable-disable-configuration-for-client-group-status', 'SQL', 'V23__remove-enable-disable-configuration-for-client-group-status.sql', 1496208571, 'root', ' +2015-06-03 15:26:53 +', 67, 1), + (243, 243, '230 +', 'role status and correspoding permissions', 'SQL', 'V230__role_status_and_correspoding_permissions.sql', -21174595, 'root', ' +2015-06-03 15:27:11 +', 34, 1), + (244, 244, '231 +', 'm cashier transaction added currency code', 'SQL', 'V231__m_cashier_transaction_added_currency_code.sql', -1593672561, 'root', ' +2015-06-03 15:27:11 +', 32, 1), + (245, 245, '232 +', 'insert center closure reason', 'SQL', 'V232__insert_center_closure_reason.sql', -2049914418, 'root', ' +2015-06-03 15:27:11 +', 1, 1), + (246, 246, '233 +', 'Savings Transaction Receipt', 'SQL', 'V233__Savings_Transaction_Receipt.sql', 1836289382, 'root', ' +2015-06-03 15:27:11 +', 2, 1), + (247, 247, '234 +', 'opening balaces setup', 'SQL', 'V234__opening_balaces_setup.sql', 1777198314, 'root', ' +2015-06-03 15:27:11 +', 23, 1), + (248, 248, '235 +', 'add ugd template id m hook', 'SQL', 'V235__add_ugd_template_id_m_hook.sql', 1120955673, 'root', ' +2015-06-03 15:27:11 +', 81, 1), + (249, 249, '236 +', 'individual collection sheet permissions', 'SQL', 'V236__individual_collection_sheet_permissions.sql', -66130238, 'root', ' +2015-06-03 15:27:11 +', 1, 1), + (250, 250, '237 +', 'add threshold config for last instalment', 'SQL', 'V237__add_threshold_config_for_last_instalment.sql', 412873149, 'root', ' +2015-06-03 15:27:11 +', 59, 1), + (251, 251, '238 +', 'update staff display name length', 'SQL', 'V238__update_staff_display_name_length.sql', -1003425306, 'root', ' +2015-06-03 15:27:11 +', 47, 1), + (252, 252, '239 +', 'Loan Transaction Receipt', 'SQL', 'V239__Loan_Transaction_Receipt.sql', -130819179, 'root', ' +2015-06-03 15:27:11 +', 2, 1), + (24, 24, '24 +', 'add-group-client-foreign-key-constraint-in-loan-table', 'SQL', 'V24__add-group-client-foreign-key-constraint-in-loan-table.sql', 1077707078, 'root', ' +2015-06-03 15:26:53 +', 141, 1), + (253, 253, '240 +', 'arrears aging config for interest recalculation', 'SQL', 'V240__arrears_aging_config_for_interest_recalculation.sql', 674368034, 'root', ' +2015-06-03 15:27:12 +', 129, 1), + (254, 254, '241 +', 'fixed emi changes', 'SQL', 'V241__fixed_emi_changes.sql', 1943069939, 'root', ' +2015-06-03 15:27:12 +', 53, 1), + (255, 255, '242 +', 'entitytoentitymappingrelation', 'SQL', 'V242__entitytoentitymappingrelation.sql', -1770973716, 'root', ' +2015-06-03 15:27:12 +', 40, 1), + (256, 256, '243 +', 'alter loan disbursement details', 'SQL', 'V243__alter_loan_disbursement_details.sql', 1461060824, 'root', ' +2015-06-03 15:27:12 +', 48, 1), + (257, 257, '244 +', 'staff assignment history table', 'SQL', 'V244__staff_assignment_history_table.sql', -427095856, 'root', ' +2015-06-03 15:27:12 +', 33, 1), + (258, 258, '245 +', 'open rd changes', 'SQL', 'V245__open_rd_changes.sql', 2142566381, 'root', ' +2015-06-03 15:27:12 +', 1, 1), + (259, 259, '246 +', 'drop group client foreign key from m loan', 'SQL', 'V246__drop_group_client_foreign_key_from_m_loan.sql', -1721132405, 'root', ' +2015-06-03 15:27:12 +', 35, 1), + (260, 260, '247 +', 'consistency wrt spelling principalThresholdForLastInstalment', 'SQL', 'V247__consistency_wrt_spelling_principalThresholdForLastInstalment.sql', 1371980378, 'root', ' +2015-06-03 15:27:12 +', 7, 1), + (261, 261, '248 +', 'added password never expired to User', 'SQL', 'V248__added_password_never_expired_to_User.sql', -1800179163, 'root', ' +2015-06-03 15:27:12 +', 43, 1), + (262, 262, '249 +', 'workingdays permissions', 'SQL', 'V249__workingdays_permissions.sql', -1322891155, 'root', ' +2015-06-03 15:27:12 +', 1, 1), + (25, 25, '25 +', 'update client reports for status and activation change', 'SQL', 'V25__update_client_reports_for_status_and_activation_change.sql', -6310920, 'root', ' +2015-06-03 15:26:53 +', 3, 1), + (263, 263, '250 +', 'password validation policy', 'SQL', 'V250__password_validation_policy.sql', 1197290340, 'root', ' +2015-06-03 15:27:12 +', 26, 1), + (264, 264, '251 +', 'paymentType table', 'SQL', 'V251__paymentType_table.sql', -1969329175, 'root', ' +2015-06-03 15:27:12 +', 75, 1), + (265, 265, '252 +', 'bug fix teller cash management', 'SQL', 'V252__bug_fix_teller_cash_management.sql', -736743970, 'root', ' +2015-06-03 15:27:12 +', 110, 1), + (266, 266, '253 +', 'product loan configurable attributes', 'SQL', 'V253__product_loan_configurable_attributes.sql', 1787268316, 'root', ' +2015-06-03 15:27:12 +', 16, 1), + (267, 267, '254 +', 'General Ledger Report', 'SQL', 'V254__General_Ledger_Report.sql', -186920768, 'root', ' +2015-06-03 15:27:12 +', 4, 1), + (268, 268, '255 +', 'pre close interest period config', 'SQL', 'V255__pre_close_interest_period_config.sql', 1383225707, 'root', ' +2015-06-03 15:27:12 +', 26, 1), + (269, 269, '256 +', 'Update script for General Ledger report', 'SQL', 'V256__Update script for General_Ledger_report.sql', 952686971, 'root', ' +2015-06-03 15:27:12 +', 3, 1), + (270, 270, '257 +', 'staff image association', 'SQL', 'V257__staff_image_association.sql', 1740118046, 'root', ' +2015-06-03 15:27:12 +', 41, 1), + (271, 271, '258 +', 'interest compounding changes', 'SQL', 'V258__interest_compounding_changes.sql', 1484848861, 'root', ' +2015-06-03 15:27:13 +', 84, 1), + (272, 272, '259 +', 'alter working days', 'SQL', 'V259__alter_working_days.sql', 1733733251, 'root', ' +2015-06-03 15:27:13 +', 28, 1), + (26, 26, '26 +', 'add-support-for-withdrawal-fees-on-savings', 'SQL', 'V26__add-support-for-withdrawal-fees-on-savings.sql', -755832247, 'root', ' +2015-06-03 15:26:53 +', 176, 1), + (273, 273, '260 +', 'alter password validation policy', 'SQL', 'V260__alter_password_validation_policy.sql', -853716637, 'root', ' +2015-06-03 15:27:13 +', 28, 1), + (274, 274, '261 +', 'Update script for Client Loan Account Schedule Report', 'SQL', 'V261__Update script for Client_Loan_Account_Schedule_Report.sql', 1873100628, 'root', ' +2015-09-06 17:49:01 +', 20, 1), + (275, 275, '262 +', 'accountNumber for groups', 'SQL', 'V262__accountNumber_for_groups.sql', -31083607, 'root', ' +2015-09-06 17:49:01 +', 179, 1), + (276, 276, '263 +', 'mifos reports', 'SQL', 'V263__mifos_reports.sql', -1358041795, 'root', ' +2015-09-06 17:49:01 +', 27, 1), + (277, 277, '264 +', 'insert paymenttype and report read permission', 'SQL', 'V264__insert_paymenttype_and_report_read_permission.sql', 984979503, 'root', ' +2015-09-06 17:49:01 +', 6, 1), + (278, 278, '265 +', 'modify external service schema', 'SQL', 'V265__modify_external_service_schema.sql', 1844344576, 'root', ' +2015-09-06 17:49:02 +', 350, 1), + (279, 279, '266 +', 'client fees', 'SQL', 'V266__client_fees.sql', 41332385, 'root', ' +2015-09-06 17:49:02 +', 112, 1), + (280, 280, '267 +', 'client transaction permissions', 'SQL', 'V267__client_transaction_permissions.sql', 130000057, 'root', ' +2015-09-06 17:49:02 +', 6, 1), + (281, 281, '268 +', 'update gmail password', 'SQL', 'V268__update_gmail_password.sql', 1723317114, 'root', ' +2015-09-06 17:49:02 +', 8, 1), + (282, 282, '269 +', 'increased calendar title length ', 'SQL', 'V269__increased_calendar_title_length .sql', 1780890645, 'root', ' +2015-09-06 17:49:02 +', 156, 1), + (27, 27, '27 +', 'add-loan-type-column-to-loan-table', 'SQL', 'V27__add-loan-type-column-to-loan-table.sql', -2130377861, 'root', ' +2015-06-03 15:26:53 +', 97, 1), + (283, 283, '270 +', 'add rounding mode configuration', 'SQL', 'V270__add_rounding_mode_configuration.sql', 1195237290, 'root', ' +2015-09-06 17:49:02 +', 78, 1), + (284, 284, '271 +', 'accounting for client charges', 'SQL', 'V271__accounting_for_client_charges.sql', 1477443700, 'root', ' +2015-09-06 17:49:03 +', 184, 1), + (285, 285, '272 +', 'loan tranche disbursement charge', 'SQL', 'V272__loan_tranche_disbursement_charge.sql', 2018052750, 'root', ' +2015-09-06 17:49:03 +', 182, 1), + (286, 286, '273 +', 'oauth changes', 'SQL', 'V273__oauth_changes.sql', 1811521678, 'root', ' +2015-09-09 13:21:37 +', 120, 1), + (287, 287, '274 +', 'Loan Reschedule Code Value', 'SQL', 'V274__Loan_Reschedule_Code_Value.sql', -1190544276, 'root', ' +2015-09-15 18:00:14 +', 63, 1), + (288, 288, '275 +', 'loan transaction to repayment schedule mapping', 'SQL', 'V275__loan_transaction_to_repayment_schedule_mapping.sql', 1971001203, 'root', ' +2015-09-21 20:04:43 +', 570, 1), + (289, 289, '276 +', 'loan recalulated till date', 'SQL', 'V276__loan_recalulated_till_date.sql', 631764351, 'root', ' +2015-10-20 19:57:50 +', 1743, 1), + (290, 290, '277 +', 'Loan Product Provisioning', 'SQL', 'V277__Loan_Product_Provisioning.sql', -510229006, 'root', ' +2015-10-20 19:57:53 +', 2792, 1), + (291, 291, '278 +', 'LoanTransactionProcessingStrategy', 'SQL', 'V278__LoanTransactionProcessingStrategy.sql', -1388446419, 'root', ' +2015-11-04 17:03:00 +', 878, 1), + (292, 292, '279 +', 'floating rates', 'SQL', 'V279__floating_rates.sql', 830029264, 'root', ' +2015-11-18 16:13:08 +', 620, 1), + (28, 28, '28 +', 'accounting-abstractions-and-autoposting', 'SQL', 'V28__accounting-abstractions-and-autoposting.sql', -626584837, 'root', ' +2015-06-03 15:26:53 +', 63, 1), + (293, 293, '280 +', 'spm framework initial tables', 'SQL', 'V280__spm_framework_initial_tables.sql', -1638980235, 'root', ' +2015-12-02 16:07:43 +', 509, 1), + (294, 294, '281 +', 'add configuration param backdate-penalties', 'SQL', 'V281__add_configuration_param_backdate-penalties.sql', -45520299, 'root', ' +2015-12-02 16:07:44 +', 39, 1), + (295, 295, '282 +', 'CustomerSelfService', 'SQL', 'V282__CustomerSelfService.sql', -51763400, 'root', ' +2015-12-17 10:17:33 +', 440, 1), + (296, 296, '283 +', 'Variable Installments', 'SQL', 'V283__Variable_Installments.sql', -1104936867, 'root', ' +2016-01-12 17:39:15 +', 2067, 1), + (297, 297, '284 +', 'update codevalue', 'SQL', 'V284__update_codevalue.sql', 442711672, 'root', ' +2016-01-12 17:39:16 +', 982, 1), + (298, 298, '285 +', 'undo last tranche script', 'SQL', 'V285__undo_last_tranche_script.sql', 1551040289, 'root', ' +2016-01-12 17:39:17 +', 56, 1), + (299, 299, '286 +', 'partial period interest calcualtion', 'SQL', 'V286__partial_period_interest_calcualtion.sql', -1701869481, 'root', ' +2016-01-12 17:39:19 +', 1898, 1), + (300, 300, '287 +', 'alter spm scorecard', 'SQL', 'V287__alter_spm_scorecard.sql', 1834026952, 'root', ' +2016-01-20 18:23:18 +', 227, 1), + (301, 301, '288 +', 'overdraft interest', 'SQL', 'V288__overdraft_interest.sql', 2003058104, 'root', ' +2016-01-20 18:23:19 +', 282, 1), + (302, 302, '289 +', 'client non person', 'SQL', 'V289__client_non_person.sql', 1595576360, 'root', ' +2016-01-20 18:23:19 +', 239, 1), + (29, 29, '29 +', 'add-support-for-annual-fees-on-savings', 'SQL', 'V29__add-support-for-annual-fees-on-savings.sql', -1595233842, 'root', ' +2015-06-03 15:26:53 +', 157, 1), + (303, 303, '290 +', 'shares dividends permissions script', 'SQL', 'V290__shares_dividends_permissions_script.sql', -1504459497, 'root', ' +2016-01-20 18:23:19 +', 47, 1), + (304, 304, '291 +', 'organisation start date config', 'SQL', 'V291__organisation_start_date_config.sql', -1674309950, 'root', ' +2017-02-24 14:15:35 +', 1577, 1), + (305, 305, '292 +', 'update organisation start date', 'SQL', 'V292__update_organisation_start_date.sql', 2016095558, 'root', ' +2017-02-24 14:15:35 +', 70, 1), + (306, 306, '293 +', 'interest rate chart support for amounts', 'SQL', 'V293__interest_rate_chart_support_for_amounts.sql', -1720908295, 'root', ' +2017-02-24 14:15:38 +', 2446, 1), + (307, 307, '294 +', 'configuration for paymnettype application forDisbursement charge', 'SQL', 'V294__configuration_for_paymnettype_application_forDisbursement_charge.sql', -754382065, 'root', ' +2017-02-24 14:15:38 +', 37, 1), + (308, 308, '295 +', 'configuration for interest charged date same as disbursal date', 'SQL', 'V295__configuration_for_interest_charged_date_same_as_disbursal_date.sql', -1113285243, 'root', ' +2017-02-24 14:15:38 +', 43, 1), + (309, 309, '296 +', 'skip repayment on first-day of month', 'SQL', 'V296__skip_repayment_on first-day_of_month.sql', -172630113, 'root', ' +2017-02-24 14:15:38 +', 50, 1), + (310, 310, '297 +', 'Adding Meeting Time column', 'SQL', 'V297__Adding_Meeting_Time_column.sql', -637673654, 'root', ' +2017-02-24 14:15:39 +', 577, 1), + (311, 311, '298 +', 'savings interest tax', 'SQL', 'V298__savings_interest_tax.sql', -1023309693, 'root', ' +2017-02-24 14:15:44 +', 4419, 1), + (312, 312, '299 +', 'share products', 'SQL', 'V299__share_products.sql', 1270845438, 'root', ' +2017-02-24 14:15:48 +', 4370, 1), + (3, 3, '3 +', 'mifosx-permissions-and-authorisation-utf8', 'SQL', 'V3__mifosx-permissions-and-authorisation-utf8.sql', 914436650, 'root', ' +2015-06-03 15:26:50 +', 14, 1), + (30, 30, '30 +', 'add-referenceNumber-to-acc gl journal entry', 'SQL', 'V30__add-referenceNumber-to-acc_gl_journal_entry.sql', 255130282, 'root', ' +2015-06-03 15:26:53 +', 59, 1), + (313, 313, '300 +', 'configuration for allow changing of emi amount', 'SQL', 'V300__configuration_for_allow_changing_of_emi_amount.sql', -490331317, 'root', ' +2017-02-24 14:15:49 +', 931, 1), + (314, 314, '301 +', 'recurring moratorium principal periods', 'SQL', 'V301__recurring_moratorium_principal_periods.sql', 816871436, 'root', ' +2017-02-24 14:15:52 +', 2167, 1), + (315, 315, '302 +', 'add status to client identifier', 'SQL', 'V302__add_status_to_client_identifier.sql', 1978862509, 'root', ' +2017-02-24 14:15:53 +', 816, 1), + (316, 316, '303 +', 'Savings Account Dormancy', 'SQL', 'V303__Savings_Account_Dormancy.sql', -533139714, 'root', ' +2017-02-24 14:15:54 +', 1377, 1), + (317, 317, '304 +', 'customer self service third party transfers', 'SQL', 'V304__customer_self_service_third_party_transfers.sql', -341614071, 'root', ' +2017-02-24 14:15:55 +', 334, 1), + (318, 318, '305 +', 'compounding and rest frequency nth day freq and insertion script for accrual job', 'SQL', 'V305__compounding_and_rest_frequency_nth_day_freq_and_insertion_script_for_accrual_job.sql', 710584648, 'root', ' +2017-02-24 14:15:59 +', 4045, 1), + (319, 319, '306 +', 'add domancy tracking job to savings group', 'SQL', 'V306__add_domancy_tracking_job_to_savings_group.sql', -2998873, 'root', ' +2017-02-24 14:15:59 +', 34, 1), + (320, 320, '307 +', 'add share notes', 'SQL', 'V307__add_share_notes.sql', -1950926410, 'root', ' +2017-02-24 14:16:00 +', 968, 1), + (321, 321, '308 +', 'add interest recalculation in savings account', 'SQL', 'V308__add_interest_recalculation_in_savings_account.sql', 1869901088, 'root', ' +2017-02-24 14:16:01 +', 601, 1), + (322, 322, '309 +', 'add loan write off reason code', 'SQL', 'V309__add_loan_write_off_reason_code.sql', 1221434865, 'root', ' +2017-02-24 14:16:03 +', 1862, 1), + (31, 31, '31 +', 'drop-autopostings', 'SQL', 'V31__drop-autopostings.sql', -2072166818, 'root', ' +2015-06-03 15:26:53 +', 5, 1), + (323, 323, '310 +', 'copy data from entitytoentityaccess to entitytoentitymapping', 'SQL', 'V310__copy_data_from_entitytoentityaccess_to_entitytoentitymapping.sql', 1179078728, 'root', ' +2017-02-24 14:16:03 +', 4, 1), + (324, 324, '311 +', 'foreclosure details', 'SQL', 'V311__foreclosure_details.sql', 1236003234, 'root', ' +2017-02-24 14:16:04 +', 935, 1), + (325, 325, '312 +', 'add is mandatory to code value', 'SQL', 'V312__add_is_mandatory_to_code_value.sql', -1943949742, 'root', ' +2017-02-24 14:16:05 +', 512, 1), + (326, 326, '313 +', 'multi rescheduling script', 'SQL', 'V313__multi_rescheduling_script.sql', -1003845274, 'root', ' +2017-02-24 14:16:07 +', 2775, 1), + (327, 327, '314 +', 'updating r enum table', 'SQL', 'V314__updating_r_enum_table.sql', 780881263, 'root', ' +2017-02-24 14:16:08 +', 74, 1), + (328, 328, '315 +', 'add sync expected with disbursement date in m product loan', 'SQL', 'V315__add_sync_expected_with_disbursement_date_in_m_product_loan.sql', 553617808, 'root', ' +2017-02-24 14:16:08 +', 688, 1), + (329, 329, '316 +', 'address module tables metadat', 'SQL', 'V316__address_module_tables_metadat.sql', -776128404, 'root', ' +2017-02-24 14:16:10 +', 1472, 1), + (330, 330, '317 +', 'report mailing job module', 'SQL', 'V317__report_mailing_job_module.sql', -1917516805, 'root', ' +2017-02-24 14:16:11 +', 1217, 1), + (331, 331, '318 +', 'topuploan', 'SQL', 'V318__topuploan.sql', 590465441, 'root', ' +2017-02-24 14:16:14 +', 2232, 1), + (332, 332, '319 +', 'client undoreject', 'SQL', 'V319__client_undoreject.sql', -1615618857, 'root', ' +2017-02-24 14:16:15 +', 1003, 1), + (32, 32, '32 +', 'associate-disassociate-clients-from-group-permissions', 'SQL', 'V32__associate-disassociate-clients-from-group-permissions.sql', -947369256, 'root', ' +2015-06-03 15:26:53 +', 2, 1), + (333, 333, '320 +', 'add holiday payment reschedule', 'SQL', 'V320__add_holiday_payment_reschedule.sql', 1445492229, 'root', ' +2017-02-24 14:16:15 +', 479, 1), + (334, 334, '321 +', 'boolean field As Interest PostedOn', 'SQL', 'V321__boolean_field_As_Interest_PostedOn.sql', 1906735834, 'root', ' +2017-02-24 14:16:16 +', 551, 1), + (335, 335, '322 +', 'sms campaign', 'SQL', 'V322__sms_campaign.sql', -1316831815, 'root', ' +2017-02-24 14:16:18 +', 1579, 1), + (336, 336, '323 +', 'spm replace dead fk with exisiting one', 'SQL', 'V323__spm_replace_dead_fk_with_exisiting_one.sql', 656055500, 'root', ' +2017-02-24 14:16:19 +', 520, 1), + (337, 337, '324 +', 'datatable checks', 'SQL', 'V324__datatable_checks.sql', -142308095, 'root', ' +2017-02-24 14:16:19 +', 491, 1), + (33, 33, '33 +', 'drop unique check on stretchy report parameter', 'SQL', 'V33__drop_unique_check_on_stretchy_report_parameter.sql', -1599579296, 'root', ' +2015-06-03 15:26:53 +', 23, 1), + (34, 34, '34 +', 'add unique check on stretchy report parameter', 'SQL', 'V34__add_unique_check_on_stretchy_report_parameter.sql', -1286928230, 'root', ' +2015-06-03 15:26:53 +', 22, 1), + (35, 35, '35 +', 'add hierarchy column for acc gl account', 'SQL', 'V35__add_hierarchy_column_for_acc_gl_account.sql', -1387013309, 'root', ' +2015-06-03 15:26:54 +', 49, 1), + (36, 36, '36 +', 'add tag id column for acc gl account', 'SQL', 'V36__add_tag_id_column_for_acc_gl_account.sql', 414916166, 'root', ' +2015-06-03 15:26:54 +', 26, 1), + (37, 37, '37 +', 'add-center-group-collection-sheet-permissions', 'SQL', 'V37__add-center-group-collection-sheet-permissions.sql', -1268924209, 'root', ' +2015-06-03 15:26:54 +', 2, 1), + (38, 38, '38 +', 'add-group-summary-details-report', 'SQL', 'V38__add-group-summary-details-report.sql', -1875404314, 'root', ' +2015-06-03 15:26:54 +', 2, 1), + (39, 39, '39 +', 'payment-channels-updates', 'SQL', 'V39__payment-channels-updates.sql', 598090296, 'root', ' +2015-06-03 15:26:54 +', 69, 1), + (4, 4, '4 +', 'mifosx-core-reports-utf8', 'SQL', 'V4__mifosx-core-reports-utf8.sql', -1810870969, 'root', ' +2015-06-03 15:26:50 +', 54, 1), + (40, 40, '40 +', 'add permissions for accounting rule', 'SQL', 'V40__add_permissions_for_accounting_rule.sql', 1514233058, 'root', ' +2015-06-03 15:26:54 +', 2, 1), + (41, 41, '41 +', 'group-summary-reports', 'SQL', 'V41__group-summary-reports.sql', 1425507637, 'root', ' +2015-06-03 15:26:54 +', 4, 1), + (42, 42, '42 +', 'Add default value for id for acc accounting rule', 'SQL', 'V42__Add_default_value_for_id_for_acc_accounting_rule.sql', 2059436790, 'root', ' +2015-06-03 15:26:54 +', 25, 1), + (43, 43, '43 +', 'accounting-for-savings', 'SQL', 'V43__accounting-for-savings.sql', -1542089062, 'root', ' +2015-06-03 15:26:54 +', 180, 1), + (44, 44, '44 +', 'document-increase-size-of-column-type', 'SQL', 'V44__document-increase-size-of-column-type.sql', 1059756585, 'root', ' +2015-06-03 15:26:54 +', 57, 1), + (45, 45, '45 +', 'create acc rule tags table', 'SQL', 'V45__create_acc_rule_tags_table.sql', -1290711661, 'root', ' +2015-06-03 15:26:54 +', 11, 1), + (46, 46, '46 +', 'extend datatables api', 'SQL', 'V46__extend_datatables_api.sql', 1658150926, 'root', ' +2015-06-03 15:26:54 +', 2, 1), + (47, 47, '47 +', 'staff-hierarchy-link-to-users', 'SQL', 'V47__staff-hierarchy-link-to-users.sql', 1571520914, 'root', ' +2015-06-03 15:26:54 +', 103, 1), + (48, 48, '48 +', 'adding-S3-Support', 'SQL', 'V48__adding-S3-Support.sql', -767612266, 'root', ' +2015-06-03 15:26:54 +', 164, 1), + (49, 49, '49 +', 'track-loan-charge-payment-transactions', 'SQL', 'V49__track-loan-charge-payment-transactions.sql', -1735511516, 'root', ' +2015-06-03 15:26:54 +', 24, 1), + (5, 5, '5 +', 'update-savings-product-and-account-tables', 'SQL', 'V5__update-savings-product-and-account-tables.sql', 1349701479, 'root', ' +2015-06-03 15:26:51 +', 122, 1), + (50, 50, '50 +', 'add-grace-settings-to-loan-product', 'SQL', 'V50__add-grace-settings-to-loan-product.sql', -1807166173, 'root', ' +2015-06-03 15:26:55 +', 140, 1), + (51, 51, '51 +', 'track-additional-details-related-to-installment-performance', 'SQL', 'V51__track-additional-details-related-to-installment-performance.sql', 729891777, 'root', ' +2015-06-03 15:26:55 +', 102, 1), + (52, 52, '52 +', 'add boolean support cols to acc accounting rule', 'SQL', 'V52__add_boolean_support_cols_to_acc_accounting_rule.sql', 1853745947, 'root', ' +2015-06-03 15:26:55 +', 71, 1), + (53, 53, '53 +', 'track-advance-and-late-payments-on-installment', 'SQL', 'V53__track-advance-and-late-payments-on-installment.sql', 1135041990, 'root', ' +2015-06-03 15:26:55 +', 45, 1), + (54, 54, '54 +', 'charge-to-income-account-mappings', 'SQL', 'V54__charge-to-income-account-mappings.sql', -302610090, 'root', ' +2015-06-03 15:26:55 +', 25, 1), + (55, 55, '55 +', 'add-additional-transaction-processing-strategies', 'SQL', 'V55__add-additional-transaction-processing-strategies.sql', -1366608716, 'root', ' +2015-06-03 15:26:55 +', 58, 1), + (56, 56, '56 +', 'track-overpaid-amount-on-loans', 'SQL', 'V56__track-overpaid-amount-on-loans.sql', -2006962467, 'root', ' +2015-06-03 15:26:55 +', 99, 1), + (57, 57, '57 +', 'add default values to debit and credit accounts acc accounting rule', 'SQL', 'V57__add_default_values_to_debit_and_credit_accounts_acc_accounting_rule.sql', 1041459650, 'root', ' +2015-06-03 15:26:55 +', 51, 1), + (58, 58, '58 +', 'create-holiday-tables changed', 'SQL', 'V58__create-holiday-tables_changed.sql', -1395337105, 'root', ' +2015-06-03 15:26:55 +', 150, 1), + (59, 59, '59 +', 'add group roles schema and permissions', 'SQL', 'V59__add_group_roles_schema_and_permissions.sql', -406383935, 'root', ' +2015-06-03 15:26:55 +', 55, 1), + (6, 6, '6 +', 'add min max principal column to loan', 'SQL', 'V6__add_min_max_principal_column_to_loan.sql', -907223871, 'root', ' +2015-06-03 15:26:51 +', 140, 1), + (60, 60, '60 +', 'quipo dashboard reports', 'SQL', 'V60__quipo_dashboard_reports.sql', -1618354471, 'root', ' +2015-06-03 15:26:56 +', 13, 1), + (61, 61, '61 +', 'txn running balance example', 'SQL', 'V61__txn_running_balance_example.sql', -80025043, 'root', ' +2015-06-03 15:26:56 +', 4, 1), + (62, 62, '62 +', 'add staff id to m client changed', 'SQL', 'V62__add_staff_id_to_m_client_changed.sql', 1148218006, 'root', ' +2015-06-03 15:26:56 +', 18, 1), + (63, 63, '63 +', 'add sync disbursement with meeting column to loan', 'SQL', 'V63__add_sync_disbursement_with_meeting_column_to_loan.sql', 1201879376, 'root', ' +2015-06-03 15:26:56 +', 85, 1), + (64, 64, '64 +', 'add permission for assign staff', 'SQL', 'V64__add_permission_for_assign_staff.sql', -1938102414, 'root', ' +2015-06-03 15:26:56 +', 1, 1), + (65, 65, '65 +', 'fix rupee symbol issues', 'SQL', 'V65__fix_rupee_symbol_issues.sql', 1008895069, 'root', ' +2015-06-03 15:26:56 +', 1, 1), + (66, 66, '66 +', 'client close functionality', 'SQL', 'V66__client_close_functionality.sql', -142847690, 'root', ' +2015-06-03 15:26:56 +', 38, 1), + (67, 67, '67 +', 'loans in advance table', 'SQL', 'V67__loans_in_advance_table.sql', 1665941254, 'root', ' +2015-06-03 15:26:56 +', 21, 1), + (68, 68, '68 +', 'quipo dashboard reports updated', 'SQL', 'V68__quipo_dashboard_reports_updated.sql', 1746719914, 'root', ' +2015-06-03 15:26:56 +', 14, 1), + (69, 69, '69 +', 'loans in advance initialise', 'SQL', 'V69__loans_in_advance_initialise.sql', 1518847594, 'root', ' +2015-06-03 15:26:56 +', 8, 1), + (7, 7, '7 +', 'remove read makerchecker permission', 'SQL', 'V7__remove_read_makerchecker_permission.sql', -569619336, 'root', ' +2015-06-03 15:26:51 +', 2, 1), + (70, 70, '70 +', 'quipo program detail query fix', 'SQL', 'V70__quipo_program_detail_query_fix.sql', 1892537189, 'root', ' +2015-06-03 15:26:56 +', 1, 1), + (71, 71, '71 +', 'insert reschedule repayment to configuration', 'SQL', 'V71__insert_reschedule_repayment_to_configuration.sql', -1148306529, 'root', ' +2015-06-03 15:26:56 +', 1, 1), + (72, 72, '72 +', 'add m loan counter changes', 'SQL', 'V72__add_m_loan_counter_changes.sql', 878990870, 'root', ' +2015-06-03 15:26:56 +', 63, 1), + (73, 73, '73 +', 'add repayments rescheduled to and processed column to holiday', 'SQL', 'V73__add_repayments_rescheduled_to_and_processed_column_to_holiday.sql', -503832337, 'root', ' +2015-06-03 15:26:56 +', 154, 1), + (74, 74, '74 +', 'alter m loan counter table add group', 'SQL', 'V74__alter_m_loan_counter_table_add_group.sql', -2117284805, 'root', ' +2015-06-03 15:26:56 +', 94, 1), + (75, 75, '75 +', 'add reschedule-repayments-on-holidays to configuration', 'SQL', 'V75__add_reschedule-repayments-on-holidays_to_configuration.sql', 1328301697, 'root', ' +2015-06-03 15:26:56 +', 1, 1), + (76, 76, '76 +', 'rename permission grouping', 'SQL', 'V76__rename_permission_grouping.sql', 782643717, 'root', ' +2015-06-03 15:26:56 +', 3, 1), + (77, 77, '77 +', 'alter m product loan changes', 'SQL', 'V77__alter_m_product_loan_changes.sql', -1168017986, 'root', ' +2015-06-03 15:26:56 +', 87, 1), + (78, 78, '78 +', 'breakdown portfolio grouping', 'SQL', 'V78__breakdown_portfolio_grouping.sql', -1151517023, 'root', ' +2015-06-03 15:26:56 +', 2, 1), + (79, 79, '79 +', 'schedule jobs tables', 'SQL', 'V79__schedule_jobs_tables.sql', -648184231, 'root', ' +2015-06-03 15:26:57 +', 81, 1), + (8, 8, '8 +', 'deposit-transaction-permissions-if-they-exist', 'SQL', 'V8__deposit-transaction-permissions-if-they-exist.sql', 1925296214, 'root', ' +2015-06-03 15:26:51 +', 1, 1), + (80, 80, '80 +', 'schedule jobs tables updates', 'SQL', 'V80__schedule_jobs_tables_updates.sql', 427508507, 'root', ' +2015-06-03 15:26:57 +', 74, 1), + (81, 81, '81 +', 'savings related changes', 'SQL', 'V81__savings_related_changes.sql', 1538092549, 'root', ' +2015-06-03 15:26:57 +', 247, 1), + (82, 82, '82 +', 'schedule jobs tables updates for running status', 'SQL', 'V82__schedule_jobs_tables_updates_for_running_status.sql', -1900600035, 'root', ' +2015-06-03 15:26:57 +', 213, 1), + (83, 83, '83 +', 'non-working-days-table', 'SQL', 'V83__non-working-days-table.sql', 7304707, 'root', ' +2015-06-03 15:26:57 +', 52, 1), + (84, 84, '84 +', 'undo savings transaction permission', 'SQL', 'V84__undo_savings_transaction_permission.sql', -1712636214, 'root', ' +2015-06-03 15:26:57 +', 1, 1), + (85, 85, '85 +', 'product mix related changes', 'SQL', 'V85__product_mix_related_changes.sql', -1558734721, 'root', ' +2015-06-03 15:26:57 +', 117, 1), + (86, 86, '86 +', 'update-working-days', 'SQL', 'V86__update-working-days.sql', 1751835641, 'root', ' +2015-06-03 15:26:57 +', 6, 1), + (87, 87, '87 +', 'add permission for scheduler', 'SQL', 'V87__add_permission_for_scheduler.sql', -575950289, 'root', ' +2015-06-03 15:26:57 +', 1, 1), + (88, 88, '88 +', 'added update constrain for scheduler jobs', 'SQL', 'V88__added_update_constrain_for_scheduler_jobs.sql', -897794717, 'root', ' +2015-06-03 15:26:57 +', 27, 1), + (89, 89, '89 +', 'added scheduler group', 'SQL', 'V89__added_scheduler_group.sql', -1570560491, 'root', ' +2015-06-03 15:26:57 +', 32, 1), + (9, 9, '9 +', 'add min max constraint column to loan loanproduct', 'SQL', 'V9__add_min_max_constraint_column_to_loan_loanproduct.sql', -709167892, 'root', ' +2015-06-03 15:26:51 +', 317, 1), + (90, 90, '90 +', 'client performance history reports', 'SQL', 'V90__client_performance_history_reports.sql', -358569421, 'root', ' +2015-06-03 15:26:58 +', 2, 1), + (91, 91, '91 +', 'apply annual fees permission', 'SQL', 'V91__apply_annual_fees_permission.sql', 1152030995, 'root', ' +2015-06-03 15:26:58 +', 2, 1), + (92, 92, '91.1 +', 'configuration settings for holiday and non workingday', 'SQL', 'V91_1__configuration_settings_for_holiday_and_non_workingday.sql', 2070643129, 'root', ' +2015-06-03 15:26:58 +', 2, 1), + (93, 93, '92 +', 'group center assign staff permission', 'SQL', 'V92__group_center_assign_staff_permission.sql', -1280675809, 'root', ' +2015-06-03 15:26:58 +', 2, 1), + (94, 94, '93 +', 'loan transaction external id', 'SQL', 'V93__loan_transaction_external_id.sql', 1766682107, 'root', ' +2015-06-03 15:26:58 +', 49, 1), + (95, 95, '94 +', 'added savings accont type', 'SQL', 'V94__added_savings_accont type.sql', -947513684, 'root', ' +2015-06-03 15:26:58 +', 68, 1), + (96, 96, '95 +', 'batch job postInterest', 'SQL', 'V95__batch_job_postInterest.sql', 2096051563, 'root', ' +2015-06-03 15:26:58 +', 1, 1), + (97, 97, '96 +', 'savings accounts transfers table', 'SQL', 'V96__savings_accounts_transfers_table.sql', 1113386790, 'root', ' +2015-06-03 15:26:58 +', 61, 1), + (98, 98, '97 +', 'add permission for adjust savings transaction', 'SQL', 'V97__add_permission_for_adjust_savings_transaction.sql', -2045732265, 'root', ' +2015-06-03 15:26:58 +', 2, 1), + (99, 99, '98 +', 'added currency roundof for multipleof', 'SQL', 'V98__added_currency_roundof_for_multipleof.sql', -107928515, 'root', ' +2015-06-03 15:26:58 +', 325, 1); /*!40000 ALTER TABLE `schema_version` ENABLE KEYS */; @@ -6082,7 +9002,8 @@ CREATE TABLE IF NOT EXISTS `sms_campaign` ( `next_trigger_date` datetime DEFAULT NULL, `last_trigger_date` datetime DEFAULT NULL, `recurrence_start_date` datetime DEFAULT NULL, - `is_visible` tinyint DEFAULT '1', + `is_visible` tinyint DEFAULT '1 +', PRIMARY KEY (`id`), KEY `report_id` (`report_id`), CONSTRAINT `sms_campaign_ibfk_1` FOREIGN KEY (`report_id`) REFERENCES `stretchy_report` (`id`) @@ -6100,7 +9021,8 @@ CREATE TABLE IF NOT EXISTS `sms_messages_outbound` ( `group_id` BIGINT DEFAULT NULL, `client_id` BIGINT DEFAULT NULL, `staff_id` BIGINT DEFAULT NULL, - `status_enum` INT NOT NULL DEFAULT '100', + `status_enum` INT NOT NULL DEFAULT '100 +', `mobile_no` varchar(50) NOT NULL, `message` varchar(1000) NOT NULL, `campaign_id` BIGINT NOT NULL, @@ -6149,36 +9071,251 @@ CREATE TABLE IF NOT EXISTS `stretchy_parameter` ( INSERT INTO `stretchy_parameter` (`id`, `parameter_name`, `parameter_variable`, `parameter_label`, `parameter_displayType`, `parameter_FormatType`, `parameter_default`, `special`, `selectOne`, `selectAll`, `parameter_sql`, `parent_id`) VALUES (1, 'startDateSelect', 'startDate', 'startDate', 'date', 'date', 'today', NULL, NULL, NULL, NULL, NULL), (2, 'endDateSelect', 'endDate', 'endDate', 'date', 'date', 'today', NULL, NULL, NULL, NULL, NULL), - (3, 'obligDateTypeSelect', 'obligDateType', 'obligDateType', 'select', 'number', '0', NULL, NULL, NULL, 'select * from\r\n(select 1 as id, "Closed" as `name` union all\r\nselect 2, "Disbursal" ) x\r\norder by x.`id`', NULL), - (5, 'OfficeIdSelectOne', 'officeId', 'Office', 'select', 'number', '0', NULL, 'Y', NULL, 'select id, \r\nconcat(substring("........................................", 1, \r\n \n\n((LENGTH(`hierarchy`) - LENGTH(REPLACE(`hierarchy`, \'.\', \'\')) - 1) * 4)), \r\n `name`) as tc\r\nfrom m_office\r\nwhere hierarchy like concat\n\n(\'${currentUserHierarchy}\', \'%\')\r\norder by hierarchy', NULL), - (6, 'loanOfficerIdSelectAll', 'loanOfficerId', 'Loan Officer', 'select', 'number', '0', NULL, NULL, 'Y', '(select lo.id, lo.display_name as `Name` \r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\njoin m_staff lo on lo.office_id = ounder.id\r\nwhere lo.is_loan_officer = true\r\nand o.id = ${officeId})\r\nunion all\r\n(select -10, \'-\')\r\norder by 2', 5), - (10, 'currencyIdSelectAll', 'currencyId', 'Currency', 'select', 'number', '0', NULL, NULL, 'Y', 'select `code`, `name`\r\nfrom m_organisation_currency\r\norder by `code`', NULL), - (20, 'fundIdSelectAll', 'fundId', 'Fund', 'select', 'number', '0', NULL, NULL, 'Y', '(select id, `name`\r\nfrom m_fund)\r\nunion all\r\n(select -10, \'-\')\r\norder by 2', NULL), - (25, 'loanProductIdSelectAll', 'loanProductId', 'Product', 'select', 'number', '0', NULL, NULL, 'Y', 'select p.id, p.`name`\r\nfrom m_product_loan p\r\nwhere (p.currency_code = \'$\{currencyId}\' or \'-1\'= \'$\{currencyId}\')\r\norder by 2', 10), - (26, 'loanPurposeIdSelectAll', 'loanPurposeId', 'Loan Purpose', 'select', 'number', '0', NULL, NULL, 'Y', 'select -10 as id, \'-\' as code_value\r\nunion all\r\nselect * from (select v.id, v.code_value\r\nfrom m_code c\r\njoin m_code_value v on v.code_id = c.id\r\nwhere c.code_name = "loanPurpose"\r\norder by v.order_position) x', NULL), - (100, 'parTypeSelect', 'parType', 'parType', 'select', 'number', '0', NULL, NULL, NULL, 'select * from\r\n(select 1 as id, "Principal Only" as `name` union all\r\nselect 2, "Principal + Interest" union all\r\nselect 3, "Principal + Interest + Fees" union all\r\nselect 4, "Principal + Interest + Fees + Penalties") x\r\norder by x.`id`', NULL), - (1001, 'FullReportList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, 'select r.id as report_id, r.report_name, r.report_type, r.report_subtype, r.report_category,\nrp.id as parameter_id, rp.report_parameter_name, p.parameter_name\n from stretchy_report r\n left join stretchy_report_parameter rp on rp.report_id = r.id \n left join stretchy_parameter p on p.id = rp.parameter_id\n where r.use_report is true\n and exists\n ( select \'f\'\n from m_appuser_role ur \n join m_role r on r.id = ur.role_id\n join m_role_permission rp on rp.role_id = r.id\n join m_permission p on p.id = rp.permission_id\n where ur.appuser_id = ${currentUserId}\n and (p.code in (\'ALL_FUNCTIONS_READ\', \'ALL_FUNCTIONS\') or p.code = concat("READ_", r.report_name)) )\n order by r.report_category, r.report_name, rp.id', NULL), - (1002, 'FullParameterList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, 'select sp.parameter_name, sp.parameter_variable, sp.parameter_label, sp.parameter_displayType, \r sp.parameter_FormatType, sp.parameter_default, sp.selectOne, sp.selectAll, spp.parameter_name as parentParameterName\r from stretchy_parameter sp\r left join stretchy_parameter spp on spp.id = sp.parent_id\r where sp.special is null\r and exists \r (select \'f\' \r from stretchy_report sr\r join stretchy_report_parameter srp on srp.report_id = sr.id\r where sr.report_name in(${reportListing})\r and srp.parameter_id = sp.id\r )\r order by sp.id', NULL), - (1003, 'reportCategoryList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, 'select r.id as report_id, r.report_name, r.report_type, r.report_subtype, r.report_category,\n rp.id as parameter_id, rp.report_parameter_name, p.parameter_name\n from stretchy_report r\n left join stretchy_report_parameter rp on rp.report_id = r.id\n left join stretchy_parameter p on p.id = rp.parameter_id\n where r.report_category = \'${reportCategory}\'\n and r.use_report is true\n and exists\n (select \'f\'\n from m_appuser_role ur \n join m_role r on r.id = ur.role_id\n join m_role_permission rp on rp.role_id = r.id\n join m_permission p on p.id = rp.permission_id\n where ur.appuser_id = ${currentUserId}\n and (p.code in (\'ALL_FUNCTIONS_READ\', \'ALL_FUNCTIONS\') or p.code = concat("READ_", r.report_name)) )\n order by r.report_category, r.report_name, rp.id', NULL), + (3, 'obligDateTypeSelect', 'obligDateType', 'obligDateType', 'select', 'number', ' +0', NULL, NULL, NULL, 'select * from +\r +\n(select 1 as id, "Closed" as `name` union all +\r +\nselect 2, "Disbursal" ) x +\r +\norder by x.`id`', NULL), + (5, 'OfficeIdSelectOne', 'officeId', 'Office', 'select', 'number', ' +0', NULL, 'Y', NULL, 'select id, +\r +\nconcat(substring("........................................", 1, +\r +\n +\n +\n((LENGTH(`hierarchy`) - LENGTH(REPLACE(`hierarchy`, +\'.\', +\'\')) - 1) * 4)), +\r +\n `name`) as tc +\r +\nfrom m_office +\r +\nwhere hierarchy like concat +\n +\n( +\'${currentUserHierarchy}\', +\'%\') +\r +\norder by hierarchy', NULL), + (6, 'loanOfficerIdSelectAll', 'loanOfficerId', 'Loan Officer', 'select', 'number', ' +0', NULL, NULL, 'Y', '(select lo.id, lo.display_name as `Name` +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\njoin m_staff lo on lo.office_id = ounder.id +\r +\nwhere lo.is_loan_officer = true +\r +\nand o.id = +${officeId} +) +\r +\nunion all +\r +\n(select -10, +\'-\') +\r +\norder by 2 +', 5), + (10, 'currencyIdSelectAll', 'currencyId', 'Currency', 'select', 'number', ' +0', NULL, NULL, 'Y', 'select `code`, `name` +\r +\nfrom m_organisation_currency +\r +\norder by `code`', NULL), + (20, 'fundIdSelectAll', 'fundId', 'Fund', 'select', 'number', ' +0', NULL, NULL, 'Y', '(select id, `name` +\r +\nfrom m_fund) +\r +\nunion all +\r +\n(select -10, +\'-\') +\r +\norder by 2 +', NULL), + (25, 'loanProductIdSelectAll', 'loanProductId', 'Product', 'select', 'number', ' +0', NULL, NULL, 'Y', 'select p.id, p.`name` +\r +\nfrom m_product_loan p +\r +\nwhere (p.currency_code = +\'$\{currencyId}\' or +\'-1\'= +\'$\{currencyId}\') +\r +\norder by 2 +', 10), + (26, 'loanPurposeIdSelectAll', 'loanPurposeId', 'Loan Purpose', 'select', 'number', ' +0', NULL, NULL, 'Y', 'select -10 as id, +\'-\' as code_value +\r +\nunion all +\r +\nselect * from (select v.id, v.code_value +\r +\nfrom m_code c +\r +\njoin m_code_value v on v.code_id = c.id +\r +\nwhere c.code_name = "loanPurpose" +\r +\norder by v.order_position) x', NULL), + (100, 'parTypeSelect', 'parType', 'parType', 'select', 'number', ' +0', NULL, NULL, NULL, 'select * from +\r +\n(select 1 as id, "Principal Only" as `name` union all +\r +\nselect 2, "Principal + Interest" union all +\r +\nselect 3, "Principal + Interest + Fees" union all +\r +\nselect 4, "Principal + Interest + Fees + Penalties") x +\r +\norder by x.`id`', NULL), + (1001, 'FullReportList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, 'select r.id as report_id, r.report_name, r.report_type, r.report_subtype, r.report_category, +\nrp.id as parameter_id, rp.report_parameter_name, p.parameter_name +\n from stretchy_report r +\n left join stretchy_report_parameter rp on rp.report_id = r.id +\n left join stretchy_parameter p on p.id = rp.parameter_id +\n where r.use_report is true +\n and exists +\n ( select +\'f\' +\n from m_appuser_role ur +\n join m_role r on r.id = ur.role_id +\n join m_role_permission rp on rp.role_id = r.id +\n join m_permission p on p.id = rp.permission_id +\n where ur.appuser_id = +${currentUserId} +\n and (p.code in ( +\'ALL_FUNCTIONS_READ\', +\'ALL_FUNCTIONS\') or p.code = concat("READ_", r.report_name)) ) +\n order by r.report_category, r.report_name, rp.id', NULL), + (1002, 'FullParameterList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, 'select sp.parameter_name, sp.parameter_variable, sp.parameter_label, sp.parameter_displayType, +\r sp.parameter_FormatType, sp.parameter_default, sp.selectOne, sp.selectAll, spp.parameter_name as parentParameterName +\r from stretchy_parameter sp +\r left join stretchy_parameter spp on spp.id = sp.parent_id +\r where sp.special is null +\r and exists +\r (select +\'f\' +\r from stretchy_report sr +\r join stretchy_report_parameter srp on srp.report_id = sr.id +\r where sr.report_name in( +${reportListing} +) +\r and srp.parameter_id = sp.id +\r ) +\r order by sp.id', NULL), + (1003, 'reportCategoryList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, 'select r.id as report_id, r.report_name, r.report_type, r.report_subtype, r.report_category, +\n rp.id as parameter_id, rp.report_parameter_name, p.parameter_name +\n from stretchy_report r +\n left join stretchy_report_parameter rp on rp.report_id = r.id +\n left join stretchy_parameter p on p.id = rp.parameter_id +\n where r.report_category = +\'${reportCategory}\' +\n and r.use_report is true +\n and exists +\n (select +\'f\' +\n from m_appuser_role ur +\n join m_role r on r.id = ur.role_id +\n join m_role_permission rp on rp.role_id = r.id +\n join m_permission p on p.id = rp.permission_id +\n where ur.appuser_id = +${currentUserId} +\n and (p.code in ( +\'ALL_FUNCTIONS_READ\', +\'ALL_FUNCTIONS\') or p.code = concat("READ_", r.report_name)) ) +\n order by r.report_category, r.report_name, rp.id', NULL), (1004, 'selectAccount', 'accountNo', 'Enter Account No', 'text', 'string', 'n/a', NULL, NULL, NULL, NULL, NULL), - (1005, 'savingsProductIdSelectAll', 'savingsProductId', 'Product', 'select', 'number', '0', NULL, NULL, 'Y', 'select p.id, p.`name`\r\nfrom m_savings_product p\r\norder by 2', NULL), + (1005, 'savingsProductIdSelectAll', 'savingsProductId', 'Product', 'select', 'number', ' +0', NULL, NULL, 'Y', 'select p.id, p.`name` +\r +\nfrom m_savings_product p +\r +\norder by 2 +', NULL), (1006, 'transactionId', 'transactionId', 'transactionId', 'text', 'string', 'n/a', NULL, NULL, NULL, NULL, NULL), (1007, 'selectCenterId', 'centerId', 'Enter Center Id', 'text', 'string', 'n/a', NULL, NULL, NULL, NULL, NULL), - (1008, 'SelectGLAccountNO', 'GLAccountNO', 'GLAccountNO', 'select', 'number', '0', NULL, NULL, NULL, 'select id aid,name aname\r\nfrom acc_gl_account', NULL), + (1008, 'SelectGLAccountNO', 'GLAccountNO', 'GLAccountNO', 'select', 'number', ' +0', NULL, NULL, NULL, 'select id aid,name aname +\r +\nfrom acc_gl_account', NULL), (1009, 'asOnDate', 'asOn', 'As On', 'date', 'date', 'today', NULL, NULL, NULL, NULL, NULL), - (1010, 'SavingsAccountSubStatus', 'subStatus', 'SavingsAccountDormancyStatus', 'select', 'number', '100', NULL, NULL, NULL, 'select * from\r\n(select 100 as id, "Inactive" as name union all\r\nselect 200 as id, "Dormant" as name union all \r\nselect 300 as id, "Escheat" as name) x\r\norder by x.`id`', NULL), + (1010, 'SavingsAccountSubStatus', 'subStatus', 'SavingsAccountDormancyStatus', 'select', 'number', ' +100', NULL, NULL, NULL, 'select * from +\r +\n(select 100 as id, "Inactive" as name union all +\r +\nselect 200 as id, "Dormant" as name union all +\r +\nselect 300 as id, "Escheat" as name) x +\r +\norder by x.`id`', NULL), (1011, 'cycleXSelect', 'cycleX', 'Cycle X Number', 'text', 'number', 'n/a', NULL, NULL, NULL, NULL, NULL), (1012, 'cycleYSelect', 'cycleY', 'Cycle Y Number', 'text', 'number', 'n/a', NULL, NULL, NULL, NULL, NULL), (1013, 'fromXSelect', 'fromX', 'From X Number', 'text', 'number', 'n/a', NULL, NULL, NULL, NULL, NULL), (1014, 'toYSelect', 'toY', 'To Y Number', 'text', 'number', 'n/a', NULL, NULL, NULL, NULL, NULL), (1015, 'overdueXSelect', 'overdueX', 'Overdue X Number', 'text', 'number', 'n/a', NULL, NULL, NULL, NULL, NULL), (1016, 'overdueYSelect', 'overdueY', 'Overdue Y Number', 'text', 'number', 'n/a', NULL, NULL, NULL, NULL, NULL), - (1017, 'DefaultLoan', 'loanId', 'Loan', 'none', 'number', '-1', NULL, NULL, 'Y', 'select ml.id \nfrom m_loan ml \nleft join m_client mc on mc.id = ml.client_id \nleft join m_office mo on mo.id = mc.office_id \nwhere mo.id = ${officeId} or ${officeId} = -1', 5), - (1018, 'DefaultClient', 'clientId', 'Client', 'none', 'number', '-1', NULL, NULL, 'Y', 'select mc.id \nfrom m_client mc\n left join m_office on mc.office_id = mo.id\n where mo.id = ${officeId} or ${officeId} = -1', 5), - (1019, 'DefaultGroup', 'groupId', 'Group', 'none', 'number', '-1', NULL, NULL, 'Y', 'select mg.id \nfrom m_group mg\nleft join m_office mo on mg.office_id = mo.id\nwhere mo.id = ${officeId} or ${officeId} = -1', 5), - (1020, 'SelectLoanType', 'loanType', 'Loan Type', 'select', 'number', '-1', NULL, NULL, 'Y', 'select\nenum_id as id,\nenum_value as value\nfrom r_enum_value\nwhere enum_name = \'loan_type_enum\'', NULL), - (1021, 'DefaultSavings', 'savingsId', 'Savings', 'none', 'number', '-1', NULL, NULL, 'Y', NULL, 5), - (1022, 'DefaultSavingsTransactionId', 'savingsTransactionId', 'Savings Transaction', 'none', 'number', '-1', NULL, NULL, 'Y', NULL, 5); + (1017, 'DefaultLoan', 'loanId', 'Loan', 'none', 'number', '-1 +', NULL, NULL, 'Y', 'select ml.id +\nfrom m_loan ml +\nleft join m_client mc on mc.id = ml.client_id +\nleft join m_office mo on mo.id = mc.office_id +\nwhere mo.id = +${officeId} +or +${officeId} += +- +1 +', 5), + (1018, 'DefaultClient', 'clientId', 'Client', 'none', 'number', '-1 +', NULL, NULL, 'Y', 'select mc.id +\nfrom m_client mc +\n left join m_office on mc.office_id = mo.id +\n where mo.id = +${officeId} +or +${officeId} += +- +1 +', 5), + (1019, 'DefaultGroup', 'groupId', 'Group', 'none', 'number', '-1 +', NULL, NULL, 'Y', 'select mg.id +\nfrom m_group mg +\nleft join m_office mo on mg.office_id = mo.id +\nwhere mo.id = +${officeId} +or +${officeId} += +- +1 +', 5), + (1020, 'SelectLoanType', 'loanType', 'Loan Type', 'select', 'number', '-1 +', NULL, NULL, 'Y', 'select +\nenum_id as id, +\nenum_value as value +\nfrom r_enum_value +\nwhere enum_name = +\'loan_type_enum\'', NULL), + (1021, 'DefaultSavings', 'savingsId', 'Savings', 'none', 'number', '-1 +', NULL, NULL, 'Y', NULL, 5), + (1022, 'DefaultSavingsTransactionId', 'savingsTransactionId', 'Savings Transaction', 'none', 'number', '-1 +', NULL, NULL, 'Y', NULL, 5); /*!40000 ALTER TABLE `stretchy_parameter` ENABLE KEYS */; @@ -6192,8 +9329,10 @@ CREATE TABLE IF NOT EXISTS `stretchy_report` ( `report_category` varchar(45) DEFAULT NULL, `report_sql` text, `description` text, - `core_report` tinyint DEFAULT '0', - `use_report` tinyint DEFAULT '0', + `core_report` tinyint DEFAULT ' +0', + `use_report` tinyint DEFAULT ' +0', PRIMARY KEY (`id`), UNIQUE KEY `report_name_UNIQUE` (`report_name`) ) ENGINE=InnoDB AUTO_INCREMENT=188 DEFAULT CHARSET=UTF8MB4; @@ -6201,51 +9340,3104 @@ CREATE TABLE IF NOT EXISTS `stretchy_report` ( -- Dumping data for table fineract_default.stretchy_report: ~115 rows (approximately) /*!40000 ALTER TABLE `stretchy_report` DISABLE KEYS */; INSERT INTO `stretchy_report` (`id`, `report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES - (1, 'Client Listing', 'Table', NULL, 'Client', 'select\nconcat(repeat("..",\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\n c.account_no as "Client Account No.",\nc.display_name as "Name",\nr.enum_message_property as "Status",\nc.activation_date as "Activation", c.external_id as "External Id"\nfrom m_office o\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_client c on c.office_id = ounder.id\nleft join r_enum_value r on r.enum_name = \'status_enum\' and r.enum_id = c.status_enum\nwhere o.id = ${officeId}\norder by ounder.hierarchy, c.account_no', 'Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \'one to one\' additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t \n\nhave that client browser/memory impact).', 1, 1), - (2, 'Client Loans Listing', 'Table', NULL, 'Client', 'select\nconcat(repeat("..",\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch", c.account_no as "Client Account No.",\nc.display_name as "Name",\nr.enum_message_property as "Client Status",\nlo.display_name as "Loan Officer", l.account_no as "Loan Account No.", l.external_id as "External Id", p.name as Loan, st.enum_message_property as "Status",\nf.`name` as Fund, purp.code_value as "Loan Purpose",\nifnull(cur.display_symbol, l.currency_code) as Currency,\nl.principal_amount, l.arrearstolerance_amount as "Arrears Tolerance Amount",\nl.number_of_repayments as "Expected No. Repayments",\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate",\nl.nominal_interest_rate_per_period as "Nominal Interest Rate Per Period",\nipf.enum_message_property as "Interest Rate Frequency",\nim.enum_message_property as "Interest Method",\nicp.enum_message_property as "Interest Calculated in Period",\nl.term_frequency as "Term Frequency",\ntf.enum_message_property as "Term Frequency Period",\nl.repay_every as "Repayment Frequency",\nrf.enum_message_property as "Repayment Frequency Period",\nam.enum_message_property as "Amortization",\nl.total_charges_due_at_disbursement_derived as "Total Charges Due At Disbursement",\ndate(l.submittedon_date) as Submitted, date(l.approvedon_date) Approved, l.expected_disbursedon_date As "Expected Disbursal",\ndate(l.expected_firstrepaymenton_date) as "Expected First Repayment",\ndate(l.interest_calculated_from_date) as "Interest Calculated From" ,\ndate(l.disbursedon_date) as Disbursed,\ndate(l.expected_maturedon_date) "Expected Maturity",\ndate(l.maturedon_date) as "Matured On", date(l.closedon_date) as Closed,\ndate(l.rejectedon_date) as Rejected, date(l.rescheduledon_date) as Rescheduled,\ndate(l.withdrawnon_date) as Withdrawn, date(l.writtenoffon_date) "Written Off"\nfrom m_office o\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_client c on c.office_id = ounder.id\nleft join r_enum_value r on r.enum_name = \'status_enum\'\n and r.enum_id = c.status_enum\nleft join m_loan l on l.client_id = c.id\nleft join m_staff lo on lo.id = l.loan_officer_id\nleft join m_product_loan p on p.id = l.product_id\nleft join m_fund f on f.id = l.fund_id\nleft join r_enum_value st on st.enum_name = "loan_status_id" and st.enum_id = l.loan_status_id\nleft join r_enum_value ipf on ipf.enum_name = "interest_period_frequency_enum"\n and ipf.enum_id = l.interest_period_frequency_enum\nleft join r_enum_value im on im.enum_name = "interest_method_enum"\n and im.enum_id = l.interest_method_enum\nleft join r_enum_value tf on tf.enum_name = "term_period_frequency_enum"\n and tf.enum_id = l.term_period_frequency_enum\nleft join r_enum_value icp on icp.enum_name = "interest_calculated_in_period_enum"\n and icp.enum_id = l.interest_calculated_in_period_enum\nleft join r_enum_value rf on rf.enum_name = "repayment_period_frequency_enum"\n and rf.enum_id = l.repayment_period_frequency_enum\nleft join r_enum_value am on am.enum_name = "amortization_method_enum"\n and am.enum_id = l.amortization_method_enum\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\nleft join m_currency cur on cur.code = l.currency_code\nwhere o.id = ${officeId}\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\norder by ounder.hierarchy, 2 , l.id', 'Individual Client Report\r\n\r\nPretty \n\nwide report that lists the basic details of client loans. \r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t have that client browser/memory impact).', 1, 1), - (5, 'Loans Awaiting Disbursal', 'Table', NULL, 'Loan', 'SELECT \r\nconcat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nc.account_no as "Client Account No", c.display_name as "Name", l.account_no as "Loan Account No.", pl.`name` as "Product", \r\nf.`name` as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount as Principal, \r\nl.term_frequency as "Term Frequency",\n\n\r\ntf.enum_message_property as "Term Frequency Period",\r\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate",\r\ndate(l.approvedon_date) "Approved",\r\ndatediff(l.expected_disbursedon_date, curdate()) as "Days to Disbursal",\r\ndate(l.expected_disbursedon_date) "Expected Disbursal",\r\npurp.code_value as "Loan Purpose",\r\n lo.display_name as "Loan Officer"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = "term_period_frequency_enum" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\norder by ounder.hierarchy, datediff(l.expected_disbursedon_date, curdate()), c.account_no', 'Individual Client Report', 1, 1), - (6, 'Loans Awaiting Disbursal Summary', 'Table', NULL, 'Loan', 'SELECT \r\nconcat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\npl.`name` as "Product", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, f.`name` as Fund,\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`, ounder.name\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`', 'Individual Client Report', 1, 1), - (7, 'Loans Awaiting Disbursal Summary by Month', 'Table', NULL, 'Loan', 'SELECT \r\nconcat(repeat("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\npl.`name` as "Product", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nyear(l.expected_disbursedon_date) as "Year", \r\nmonthname(l.expected_disbursedon_date) as "Month",\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date), ounder.name, l.expected_disbursedon_date\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)', 'Individual Client Report', 1, 1), - (8, 'Loans Pending Approval', 'Table', NULL, 'Loan', 'SELECT \r\nconcat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nc.account_no as "Client Account No.", c.display_name as "Client Name", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, pl.`name` as "Product", \r\nl.account_no as "Loan Account No.", \r\nl.principal_amount as "Loan Amount", \r\nl.term_frequency as "Term Frequency",\n\n\r\ntf.enum_message_property as "Term Frequency Period",\r\nl.annual_nominal_interest_rate as " Annual \n\nNominal Interest Rate", \r\ndatediff(curdate(), l.submittedon_date) "Days Pending Approval", \r\npurp.code_value as "Loan Purpose",\r\nlo.display_name as "Loan Officer"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = "term_period_frequency_enum" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 100 /*Submitted and awaiting approval */\r\norder by ounder.hierarchy, l.submittedon_date, l.account_no', 'Individual Client Report', 1, 1), - (11, 'Active Loans - Summary', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as "Office/Branch", x.currency as Currency,\r\n x.client_count as "No. of Clients", x.active_loan_count as "No. Active Loans", x. loans_in_arrears_count as "No. of Loans in Arrears",\r\nx.principal as "Total Loans Disbursed", x.principal_repaid as "Principal Repaid", x.principal_outstanding as "Principal Outstanding", x.principal_overdue as "Principal Overdue",\r\nx.interest as "Total Interest", x.interest_repaid as "Interest Repaid", x.interest_outstanding as "Interest Outstanding", x.interest_overdue as "Interest Overdue",\r\nx.fees as "Total Fees", x.fees_repaid as "Fees Repaid", x.fees_outstanding as "Fees Outstanding", x.fees_overdue as "Fees Overdue",\r\nx.penalties as "Total Penalties", x.penalties_repaid as "Penalties Repaid", x.penalties_outstanding as "Penalties Outstanding", x.penalties_overdue as "Penalties Overdue",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else "invalid PAR Type"\r\n end) as "Portfolio at Risk %"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(if(laa.loan_id is not null, l.id, null) )) as loans_in_arrears_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(laa.principal_overdue_derived) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(laa.interest_overdue_derived) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(laa.fee_charges_overdue_derived) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(laa.penalty_charges_overdue_derived) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', NULL, 1, 1), - (12, 'Active Loans - Details', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as "Loan Officer", \r\nc.display_name as "Client", l.account_no as "Loan Account No.", pl.`name` as "Product", \r\nf.`name` as Fund, \r\nl.principal_amount as "Loan Amount", \r\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", \r\ndate(l.disbursedon_date) as "Disbursed Date", \r\ndate(l.expected_maturedon_date) as "Expected Matured On",\r\n\r\nl.principal_repaid_derived as "Principal Repaid",\r\nl.principal_outstanding_derived as "Principal Outstanding",\r\nlaa.principal_overdue_derived as "Principal Overdue",\r\n\r\nl.interest_repaid_derived as "Interest Repaid",\r\nl.interest_outstanding_derived as "Interest Outstanding",\r\nlaa.interest_overdue_derived as "Interest Overdue",\r\n\r\nl.fee_charges_repaid_derived as "Fees Repaid",\r\nl.fee_charges_outstanding_derived as "Fees Outstanding",\r\nlaa.fee_charges_overdue_derived as "Fees Overdue",\r\n\r\nl.penalty_charges_repaid_derived as "Penalties Repaid",\r\nl.penalty_charges_outstanding_derived as "Penalties Outstanding",\r\npenalty_charges_overdue_derived as "Penalties Overdue"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'Individual Client \n\nReport', 1, 1), - (13, 'Obligation Met Loans Details', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as "Client Account No.", c.display_name as "Client",\r\nl.account_no as "Loan Account No.", pl.`name` as "Product", \r\nf.`name` as Fund, \r\nl.principal_amount as "Loan Amount", \r\nl.total_repayment_derived as "Total Repaid", \r\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", \r\ndate(l.disbursedon_date) as "Disbursed", \r\ndate(l.closedon_date) as "Closed",\r\n\r\nl.principal_repaid_derived as "Principal Repaid",\r\nl.interest_repaid_derived as "Interest Repaid",\r\nl.fee_charges_repaid_derived as "Fees Repaid",\r\nl.penalty_charges_repaid_derived as "Penalties Repaid",\r\nlo.display_name as "Loan Officer"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'Individual Client \n\nReport', 1, 1), - (14, 'Obligation Met Loans Summary', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\ncount(distinct(c.id)) as "No. of Clients",\r\ncount(distinct(l.id)) as "No. of Loans",\r\nsum(l.principal_amount) as "Total Loan Amount", \r\nsum(l.principal_repaid_derived) as "Total Principal Repaid",\r\nsum(l.interest_repaid_derived) as "Total Interest Repaid",\r\nsum(l.fee_charges_repaid_derived) as "Total Fees Repaid",\r\nsum(l.penalty_charges_repaid_derived) as "Total Penalties Repaid",\r\nsum(l.interest_waived_derived) as "Total Interest Waived",\r\nsum(l.fee_charges_waived_derived) as "Total Fees Waived",\r\nsum(l.penalty_charges_waived_derived) as "Total Penalties Waived"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by ounder.hierarchy, l.currency_code, ounder.name\r\norder by ounder.hierarchy, l.currency_code', 'Individual Client \n\nReport', 1, 1), - (15, 'Portfolio at Risk', 'Table', NULL, 'Loan', 'select x.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else "invalid PAR Type"\r\n end) as "Portfolio at Risk %"\r\n from \r\n(select ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nsum(l.principal_outstanding_derived) as "Principal Outstanding",\r\nsum(laa.principal_overdue_derived) as "Principal Overdue",\r\n\r\nsum(l.interest_outstanding_derived) as "Interest Outstanding",\r\nsum(laa.interest_overdue_derived) as "Interest Overdue",\r\n\r\nsum(l.fee_charges_outstanding_derived) as "Fees Outstanding",\r\nsum(laa.fee_charges_overdue_derived) as "Fees Overdue",\r\n\r\nsum(penalty_charges_outstanding_derived) as "Penalties Outstanding",\r\nsum(laa.penalty_charges_overdue_derived) as "Penalties Overdue"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.currency_code\r\norder by l.currency_code) x', 'Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', 1, 1), - (16, 'Portfolio at Risk by Branch', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as "Office/Branch",\r\nx.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else "invalid PAR Type"\r\n end) as "Portfolio at Risk %"\r\n from m_office mo\r\njoin \r\n(select ounder.id as "branch", ifnull(cur.display_symbol, l.currency_code) as Currency, \r\n\r\nsum(l.principal_outstanding_derived) as "Principal Outstanding",\r\nsum(laa.principal_overdue_derived) as "Principal Overdue",\r\n\r\nsum(l.interest_outstanding_derived) as "Interest Outstanding",\r\nsum(laa.interest_overdue_derived) as "Interest Overdue",\r\n\r\nsum(l.fee_charges_outstanding_derived) as "Fees Outstanding",\r\nsum(laa.fee_charges_overdue_derived) as "Fees Overdue",\r\n\r\nsum(penalty_charges_outstanding_derived) as "Penalties Outstanding",\r\nsum(laa.penalty_charges_overdue_derived) as "Penalties Overdue"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', 'Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', 1, 1), - (20, 'Funds Disbursed Between Dates Summary', 'Table', NULL, 'Fund', 'select ifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nround(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office ounder \r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\ngroup by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)\r\norder by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)', NULL, 1, 1), - (21, 'Funds Disbursed Between Dates Summary by Office', 'Table', NULL, 'Fund', 'select \r\nconcat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\n \n\nifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office o\r\n\n\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c \n\non c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\n\n\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand o.id = ${officeId}\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand \n\n(l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\ngroup by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, \n\nl.currency_code)\r\norder by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)', NULL, 1, 1), + (1, 'Client Listing', 'Table', NULL, 'Client', 'select +\nconcat(repeat("..", +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\n c.account_no as "Client Account No.", +\nc.display_name as "Name", +\nr.enum_message_property as "Status", +\nc.activation_date as "Activation", c.external_id as "External Id" +\nfrom m_office o +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\njoin m_client c on c.office_id = ounder.id +\nleft join r_enum_value r on r.enum_name = +\'status_enum\' and r.enum_id = c.status_enum +\nwhere o.id = +${officeId} +\norder by ounder.hierarchy, c.account_no', 'Individual Client Report +\r +\n +\r +\nLists the small number of defined fields on the client table. Would expect to copy this +\n +\nreport and add any +\'one to one\' additional data for specific tenant needs. +\r +\n +\r +\nCan be run for any size MFI but you +\'d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t +\n +\nhave that client browser/memory impact).', 1, 1), + (2, 'Client Loans Listing', 'Table', NULL, 'Client', 'select +\nconcat(repeat("..", +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", c.account_no as "Client Account No.", +\nc.display_name as "Name", +\nr.enum_message_property as "Client Status", +\nlo.display_name as "Loan Officer", l.account_no as "Loan Account No.", l.external_id as "External Id", p.name as Loan, st.enum_message_property as "Status", +\nf.`name` as Fund, purp.code_value as "Loan Purpose", +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\nl.principal_amount, l.arrearstolerance_amount as "Arrears Tolerance Amount", +\nl.number_of_repayments as "Expected No. Repayments", +\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", +\nl.nominal_interest_rate_per_period as "Nominal Interest Rate Per Period", +\nipf.enum_message_property as "Interest Rate Frequency", +\nim.enum_message_property as "Interest Method", +\nicp.enum_message_property as "Interest Calculated in Period", +\nl.term_frequency as "Term Frequency", +\ntf.enum_message_property as "Term Frequency Period", +\nl.repay_every as "Repayment Frequency", +\nrf.enum_message_property as "Repayment Frequency Period", +\nam.enum_message_property as "Amortization", +\nl.total_charges_due_at_disbursement_derived as "Total Charges Due At Disbursement", +\ndate(l.submittedon_date) as Submitted, date(l.approvedon_date) Approved, l.expected_disbursedon_date As "Expected Disbursal", +\ndate(l.expected_firstrepaymenton_date) as "Expected First Repayment", +\ndate(l.interest_calculated_from_date) as "Interest Calculated From" , +\ndate(l.disbursedon_date) as Disbursed, +\ndate(l.expected_maturedon_date) "Expected Maturity", +\ndate(l.maturedon_date) as "Matured On", date(l.closedon_date) as Closed, +\ndate(l.rejectedon_date) as Rejected, date(l.rescheduledon_date) as Rescheduled, +\ndate(l.withdrawnon_date) as Withdrawn, date(l.writtenoffon_date) "Written Off" +\nfrom m_office o +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\njoin m_client c on c.office_id = ounder.id +\nleft join r_enum_value r on r.enum_name = +\'status_enum\' +\n and r.enum_id = c.status_enum +\nleft join m_loan l on l.client_id = c.id +\nleft join m_staff lo on lo.id = l.loan_officer_id +\nleft join m_product_loan p on p.id = l.product_id +\nleft join m_fund f on f.id = l.fund_id +\nleft join r_enum_value st on st.enum_name = "loan_status_id" and st.enum_id = l.loan_status_id +\nleft join r_enum_value ipf on ipf.enum_name = "interest_period_frequency_enum" +\n and ipf.enum_id = l.interest_period_frequency_enum +\nleft join r_enum_value im on im.enum_name = "interest_method_enum" +\n and im.enum_id = l.interest_method_enum +\nleft join r_enum_value tf on tf.enum_name = "term_period_frequency_enum" +\n and tf.enum_id = l.term_period_frequency_enum +\nleft join r_enum_value icp on icp.enum_name = "interest_calculated_in_period_enum" +\n and icp.enum_id = l.interest_calculated_in_period_enum +\nleft join r_enum_value rf on rf.enum_name = "repayment_period_frequency_enum" +\n and rf.enum_id = l.repayment_period_frequency_enum +\nleft join r_enum_value am on am.enum_name = "amortization_method_enum" +\n and am.enum_id = l.amortization_method_enum +\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id +\nleft join m_currency cur on cur.code = l.currency_code +\nwhere o.id = +${officeId} +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\norder by ounder.hierarchy, 2 , l.id', 'Individual Client Report +\r +\n +\r +\nPretty +\n +\nwide report that lists the basic details of client loans. +\r +\n +\r +\nCan be run for any size MFI but you +\'d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t have that client browser/memory impact).', 1, 1), + (5, 'Loans Awaiting Disbursal', 'Table', NULL, 'Loan', 'SELECT +\r +\nconcat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nc.account_no as "Client Account No", c.display_name as "Name", l.account_no as "Loan Account No.", pl.`name` as "Product", +\r +\nf.`name` as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nl.principal_amount as Principal, +\r +\nl.term_frequency as "Term Frequency", +\n +\n +\r +\ntf.enum_message_property as "Term Frequency Period", +\r +\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", +\r +\ndate(l.approvedon_date) "Approved", +\r +\ndatediff(l.expected_disbursedon_date, curdate()) as "Days to Disbursal", +\r +\ndate(l.expected_disbursedon_date) "Expected Disbursal", +\r +\npurp.code_value as "Loan Purpose", +\r +\n lo.display_name as "Loan Officer" +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id +\r +\nleft join r_enum_value tf on tf.enum_name = "term_period_frequency_enum" and tf.enum_id = l.term_period_frequency_enum +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 200 +\r +\norder by ounder.hierarchy, datediff(l.expected_disbursedon_date, curdate()), c.account_no', 'Individual Client Report', 1, 1), + (6, 'Loans Awaiting Disbursal Summary', 'Table', NULL, 'Loan', 'SELECT +\r +\nconcat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\npl.`name` as "Product", +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, f.`name` as Fund, +\r +\nsum(l.principal_amount) as Principal +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 200 +\r +\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`, ounder.name +\r +\norder by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`', 'Individual Client Report', 1, 1), + (7, 'Loans Awaiting Disbursal Summary by Month', 'Table', NULL, 'Loan', 'SELECT +\r +\nconcat(repeat("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\npl.`name` as "Product", +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nyear(l.expected_disbursedon_date) as "Year", +\r +\nmonthname(l.expected_disbursedon_date) as "Month", +\r +\nsum(l.principal_amount) as Principal +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 200 +\r +\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date), ounder.name, l.expected_disbursedon_date +\r +\norder by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)', 'Individual Client Report', 1, 1), + (8, 'Loans Pending Approval', 'Table', NULL, 'Loan', 'SELECT +\r +\nconcat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nc.account_no as "Client Account No.", c.display_name as "Client Name", +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, pl.`name` as "Product", +\r +\nl.account_no as "Loan Account No.", +\r +\nl.principal_amount as "Loan Amount", +\r +\nl.term_frequency as "Term Frequency", +\n +\n +\r +\ntf.enum_message_property as "Term Frequency Period", +\r +\nl.annual_nominal_interest_rate as " Annual \n\nNominal Interest Rate", +\r +\ndatediff(curdate(), l.submittedon_date) "Days Pending Approval", +\r +\npurp.code_value as "Loan Purpose", +\r +\nlo.display_name as "Loan Officer" +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id +\r +\nleft join r_enum_value tf on tf.enum_name = "term_period_frequency_enum" and tf.enum_id = l.term_period_frequency_enum +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 100 /*Submitted and awaiting approval */ +\r +\norder by ounder.hierarchy, l.submittedon_date, l.account_no', 'Individual Client Report', 1, 1), + (11, 'Active Loans - Summary', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, +\'.\', +\'\')) - 1))), mo.`name`) as "Office/Branch", x.currency as Currency, +\r +\n x.client_count as "No. of Clients", x.active_loan_count as "No. Active Loans", x. loans_in_arrears_count as "No. of Loans in Arrears", +\r +\nx.principal as "Total Loans Disbursed", x.principal_repaid as "Principal Repaid", x.principal_outstanding as "Principal Outstanding", x.principal_overdue as "Principal Overdue", +\r +\nx.interest as "Total Interest", x.interest_repaid as "Interest Repaid", x.interest_outstanding as "Interest Outstanding", x.interest_overdue as "Interest Overdue", +\r +\nx.fees as "Total Fees", x.fees_repaid as "Fees Repaid", x.fees_outstanding as "Fees Outstanding", x.fees_overdue as "Fees Overdue", +\r +\nx.penalties as "Total Penalties", x.penalties_repaid as "Penalties Repaid", x.penalties_outstanding as "Penalties Outstanding", x.penalties_overdue as "Penalties Overdue", +\r +\n +\r +\n (case +\r +\n when +${parType} += +1 +then +\r +\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char) +\r +\n when +${parType} += +2 +then +\r +\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char) +\r +\n when +${parType} += +3 +then +\r +\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char) +\r +\n when +${parType} += +4 +then +\r +\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char) +\r +\n else "invalid PAR Type" +\r +\n end) as "Portfolio at Risk %" +\r +\n from m_office mo +\r +\njoin +\r +\n(select ounder.id as branch, +\r +\nifnull(cur.display_symbol, l.currency_code) as currency, +\r +\ncount(distinct(c.id)) as client_count, +\r +\ncount(distinct(l.id)) as active_loan_count, +\r +\ncount(distinct(if(laa.loan_id is not null, l.id, null) )) as loans_in_arrears_count, +\r +\n +\r +\nsum(l.principal_disbursed_derived) as principal, +\r +\nsum(l.principal_repaid_derived) as principal_repaid, +\r +\nsum(l.principal_outstanding_derived) as principal_outstanding, +\r +\nsum(laa.principal_overdue_derived) as principal_overdue, +\r +\n +\r +\nsum(l.interest_charged_derived) as interest, +\r +\nsum(l.interest_repaid_derived) as interest_repaid, +\r +\nsum(l.interest_outstanding_derived) as interest_outstanding, +\r +\nsum(laa.interest_overdue_derived) as interest_overdue, +\r +\n +\r +\nsum(l.fee_charges_charged_derived) as fees, +\r +\nsum(l.fee_charges_repaid_derived) as fees_repaid, +\r +\nsum(l.fee_charges_outstanding_derived) as fees_outstanding, +\r +\nsum(laa.fee_charges_overdue_derived) as fees_overdue, +\r +\n +\r +\nsum(l.penalty_charges_charged_derived) as penalties, +\r +\nsum(l.penalty_charges_repaid_derived) as penalties_repaid, +\r +\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding, +\r +\nsum(laa.penalty_charges_overdue_derived) as penalties_overdue +\r +\n +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\n +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 300 +\r +\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id +\r +\norder by mo.hierarchy, x.Currency', NULL, 1, 1), + (12, 'Active Loans - Details', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nlo.display_name as "Loan Officer", +\r +\nc.display_name as "Client", l.account_no as "Loan Account No.", pl.`name` as "Product", +\r +\nf.`name` as Fund, +\r +\nl.principal_amount as "Loan Amount", +\r +\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", +\r +\ndate(l.disbursedon_date) as "Disbursed Date", +\r +\ndate(l.expected_maturedon_date) as "Expected Matured On", +\r +\n +\r +\nl.principal_repaid_derived as "Principal Repaid", +\r +\nl.principal_outstanding_derived as "Principal Outstanding", +\r +\nlaa.principal_overdue_derived as "Principal Overdue", +\r +\n +\r +\nl.interest_repaid_derived as "Interest Repaid", +\r +\nl.interest_outstanding_derived as "Interest Outstanding", +\r +\nlaa.interest_overdue_derived as "Interest Overdue", +\r +\n +\r +\nl.fee_charges_repaid_derived as "Fees Repaid", +\r +\nl.fee_charges_outstanding_derived as "Fees Outstanding", +\r +\nlaa.fee_charges_overdue_derived as "Fees Overdue", +\r +\n +\r +\nl.penalty_charges_repaid_derived as "Penalties Repaid", +\r +\nl.penalty_charges_outstanding_derived as "Penalties Outstanding", +\r +\npenalty_charges_overdue_derived as "Penalties Overdue" +\r +\n +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 300 +\r +\ngroup by l.id +\r +\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'Individual Client +\n +\nReport', 1, 1), + (13, 'Obligation Met Loans Details', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nc.account_no as "Client Account No.", c.display_name as "Client", +\r +\nl.account_no as "Loan Account No.", pl.`name` as "Product", +\r +\nf.`name` as Fund, +\r +\nl.principal_amount as "Loan Amount", +\r +\nl.total_repayment_derived as "Total Repaid", +\r +\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", +\r +\ndate(l.disbursedon_date) as "Disbursed", +\r +\ndate(l.closedon_date) as "Closed", +\r +\n +\r +\nl.principal_repaid_derived as "Principal Repaid", +\r +\nl.interest_repaid_derived as "Interest Repaid", +\r +\nl.fee_charges_repaid_derived as "Fees Repaid", +\r +\nl.penalty_charges_repaid_derived as "Penalties Repaid", +\r +\nlo.display_name as "Loan Officer" +\r +\n +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand (case +\r +\n when +${obligDateType} += +1 +then +\r +\n l.closedon_date between +\'${startDate}\' and +\'${endDate}\' +\r +\n when +${obligDateType} += +2 +then +\r +\n l.disbursedon_date between +\'${startDate}\' and +\'${endDate}\' +\r +\n else 1 = 1 +\r +\n end) +\r +\nand l.loan_status_id = 600 +\r +\ngroup by l.id +\r +\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'Individual Client +\n +\nReport', 1, 1), + (14, 'Obligation Met Loans Summary', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\ncount(distinct(c.id)) as "No. of Clients", +\r +\ncount(distinct(l.id)) as "No. of Loans", +\r +\nsum(l.principal_amount) as "Total Loan Amount", +\r +\nsum(l.principal_repaid_derived) as "Total Principal Repaid", +\r +\nsum(l.interest_repaid_derived) as "Total Interest Repaid", +\r +\nsum(l.fee_charges_repaid_derived) as "Total Fees Repaid", +\r +\nsum(l.penalty_charges_repaid_derived) as "Total Penalties Repaid", +\r +\nsum(l.interest_waived_derived) as "Total Interest Waived", +\r +\nsum(l.fee_charges_waived_derived) as "Total Fees Waived", +\r +\nsum(l.penalty_charges_waived_derived) as "Total Penalties Waived" +\r +\n +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand (case +\r +\n when +${obligDateType} += +1 +then +\r +\n l.closedon_date between +\'${startDate}\' and +\'${endDate}\' +\r +\n when +${obligDateType} += +2 +then +\r +\n l.disbursedon_date between +\'${startDate}\' and +\'${endDate}\' +\r +\n else 1 = 1 +\r +\n end) +\r +\nand l.loan_status_id = 600 +\r +\ngroup by ounder.hierarchy, l.currency_code, ounder.name +\r +\norder by ounder.hierarchy, l.currency_code', 'Individual Client +\n +\nReport', 1, 1), + (15, 'Portfolio at Risk', 'Table', NULL, 'Loan', 'select x.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, +\r +\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`, +\r +\n +\r +\n (case +\r +\n when +${parType} += +1 +then +\r +\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char) +\r +\n when +${parType} += +2 +then +\r +\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char) +\r +\n when +${parType} += +3 +then +\r +\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char) +\r +\n when +${parType} += +4 +then +\r +\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char) +\r +\n else "invalid PAR Type" +\r +\n end) as "Portfolio at Risk %" +\r +\n from +\r +\n(select ifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nsum(l.principal_outstanding_derived) as "Principal Outstanding", +\r +\nsum(laa.principal_overdue_derived) as "Principal Overdue", +\r +\n +\r +\nsum(l.interest_outstanding_derived) as "Interest Outstanding", +\r +\nsum(laa.interest_overdue_derived) as "Interest Overdue", +\r +\n +\r +\nsum(l.fee_charges_outstanding_derived) as "Fees Outstanding", +\r +\nsum(laa.fee_charges_overdue_derived) as "Fees Overdue", +\r +\n +\r +\nsum(penalty_charges_outstanding_derived) as "Penalties Outstanding", +\r +\nsum(laa.penalty_charges_overdue_derived) as "Penalties Overdue" +\r +\n +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id +\r +\nleft join m_product_loan p on p.id = l.product_id +\r +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 300 +\r +\ngroup by l.currency_code +\r +\norder by l.currency_code) x', 'Covers all loans. +\r +\n +\r +\nFor larger MFIs +… we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does) +\r +\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', 1, 1), + (16, 'Portfolio at Risk by Branch', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, +\'.\', +\'\')) - 1))), mo.`name`) as "Office/Branch", +\r +\nx.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, +\r +\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`, +\r +\n +\r +\n (case +\r +\n when +${parType} += +1 +then +\r +\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char) +\r +\n when +${parType} += +2 +then +\r +\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char) +\r +\n when +${parType} += +3 +then +\r +\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char) +\r +\n when +${parType} += +4 +then +\r +\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char) +\r +\n else "invalid PAR Type" +\r +\n end) as "Portfolio at Risk %" +\r +\n from m_office mo +\r +\njoin +\r +\n(select ounder.id as "branch", ifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\n +\r +\nsum(l.principal_outstanding_derived) as "Principal Outstanding", +\r +\nsum(laa.principal_overdue_derived) as "Principal Overdue", +\r +\n +\r +\nsum(l.interest_outstanding_derived) as "Interest Outstanding", +\r +\nsum(laa.interest_overdue_derived) as "Interest Overdue", +\r +\n +\r +\nsum(l.fee_charges_outstanding_derived) as "Fees Outstanding", +\r +\nsum(laa.fee_charges_overdue_derived) as "Fees Overdue", +\r +\n +\r +\nsum(penalty_charges_outstanding_derived) as "Penalties Outstanding", +\r +\nsum(laa.penalty_charges_overdue_derived) as "Penalties Overdue" +\r +\n +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id +\r +\nleft join m_product_loan p on p.id = l.product_id +\r +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 300 +\r +\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id +\r +\norder by mo.hierarchy, x.Currency', 'Covers all loans. +\r +\n +\r +\nFor larger MFIs +… we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does) +\r +\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', 1, 1), + (20, 'Funds Disbursed Between Dates Summary', 'Table', NULL, 'Fund', 'select ifnull(f.`name`, +\'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nround(sum(l.principal_amount), 4) as disbursed_amount +\r +\nfrom m_office ounder +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_currency cur on cur.`code` = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nwhere disbursedon_date between +\'${startDate}\' and +\'${endDate}\' +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (l.currency_code = +\'$\{currencyId}\' or +\'-1\' = +\'$\{currencyId}\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\ngroup by ifnull(f.`name`, +\'-\') , ifnull(cur.display_symbol, l.currency_code) +\r +\norder by ifnull(f.`name`, +\'-\') , ifnull(cur.display_symbol, l.currency_code)', NULL, 1, 1), + (21, 'Funds Disbursed Between Dates Summary by Office', 'Table', NULL, 'Fund', 'select +\r +\nconcat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\n +\n +\nifnull(f.`name`, +\'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount +\r +\nfrom m_office o +\r +\n +\n +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c +\n +\non c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_currency cur on cur.`code` = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\n +\n +\nwhere disbursedon_date between +\'${startDate}\' and +\'${endDate}\' +\r +\nand o.id = +${officeId} +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand +\n +\n(l.currency_code = +\'$\{currencyId}\' or +\'-1\' = +\'$\{currencyId}\') +\r +\ngroup by ounder.`name`, ifnull(f.`name`, +\'-\') , ifnull(cur.display_symbol, +\n +\nl.currency_code) +\r +\norder by ounder.`name`, ifnull(f.`name`, +\'-\') , ifnull(cur.display_symbol, l.currency_code)', NULL, 1, 1), (48, 'Balance Sheet', 'Pentaho', NULL, 'Accounting', NULL, 'Balance Sheet', 1, 1), (49, 'Income Statement', 'Pentaho', NULL, 'Accounting', NULL, 'Profit and Loss Statement', 1, 1), (50, 'Trial Balance', 'Pentaho', NULL, 'Accounting', NULL, 'Trial Balance Report', 1, 1), - (51, 'Written-Off Loans', 'Table', NULL, 'Loan', 'SELECT \r\nconcat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as "Client Account No.",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as "Loan Amount",\r\nifnull(lt.principal_portion_derived, 0) AS \'Written-Off Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Written-Off Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Written-Off Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Written-Off Penalties\',\r\nn.note AS \'Reason For Write-Off\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 6 /*write-off */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=601\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") \r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', 'Individual Lending Report. Written Off Loans', 1, 1), - (52, 'Aging Detail', 'Table', NULL, 'Loan', '\r\nSELECT \r\nconcat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nmc.account_no as "Client Account No.",\r\n mc.display_name AS "Client Name",\r\n ml.account_no AS "Account Number",\r\n ml.principal_amount AS "Loan Amount",\r\n ml.principal_disbursed_derived AS "Original Principal",\r\n ml.interest_charged_derived AS "Original Interest",\r\n ml.principal_repaid_derived AS "Principal Paid",\r\n ml.interest_repaid_derived AS "Interest Paid",\r\n laa.principal_overdue_derived AS "Principal Overdue",\r\n laa.interest_overdue_derived AS "Interest Overdue",\r\nDATEDIFF(CURDATE(), laa.overdue_since_date_derived) as "Days in Arrears",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<7, \'<1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<8, \' 1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<22, \' 3\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<29, \' 4\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<36, \' 5\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<43, \' 6\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<50, \' 7\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<57, \' 8\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<64, \' 9\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<85, \'12\', \'12+\')))))))))))) )AS "Weeks In Arrears Band",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<361, \'180 - 360\', \r\n \'> 360\'))))) AS "Days in Arrears Band"\r\n\r\n FROM m_office mo \r\n JOIN m_office ounder ON ounder.hierarchy like concat(mo.hierarchy, \'%\')\r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n INNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = \'loan_status_id\'\r\n INNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\n left join m_currency cur on cur.code = ml.currency_code\r\n WHERE ml.loan_status_id=300\r\n AND mo.id=${officeId}\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no\r\n', 'Loan arrears aging (Weeks)', 1, 1), - (53, 'Aging Summary (Arrears in Weeks)', 'Table', NULL, 'Loan', 'SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Weeks In Arrears (Up To)\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'1\',2 UNION\r\n SELECT \'2\',3 UNION\r\n SELECT \'3\',4 UNION\r\n SELECT \'4\',5 UNION\r\n SELECT \'5\',6 UNION\r\n SELECT \'6\',7 UNION\r\n SELECT \'7\',8 UNION\r\n SELECT \'8\',9 UNION\r\n SELECT \'9\',10 UNION\r\n SELECT \'10\',11 UNION\r\n SELECT \'11\',12 UNION\r\n SELECT \'12\',13 UNION\r\n SELECT \'12+\',14) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<8, \'1\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<22, \'3\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<29, \'4\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<36, \'5\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<43, \'6\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<50, \'7\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<57, \'8\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<64, \'9\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<85, \'12\',\r\n \'12+\'))))))))))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid', 'Loan amount in arrears by branch', 1, 1), - (54, 'Rescheduled Loans', 'Table', NULL, 'Loan', 'SELECT \r\nconcat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as "Client Account No.",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as "Loan Amount",\r\nifnull(lt.principal_portion_derived, 0) AS \'Rescheduled Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Rescheduled Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Rescheduled Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Rescheduled Penalties\',\r\nn.note AS \'Reason For Rescheduling\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 7 /*marked for rescheduling */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=602\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', 'Individual Lending Report. Rescheduled Loans. The ability to reschedule (or mark that you have rescheduled the loan elsewhere) is a legacy of the older Mifos product. Needed for migration.', 1, 1), - (55, 'Active Loans Passed Final Maturity', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as "Loan Officer", \r\nc.display_name as "Client", l.account_no as "Loan Account No.", pl.`name` as "Product", \r\nf.`name` as Fund, \r\nl.principal_amount as "Loan Amount", \r\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", \r\ndate(l.disbursedon_date) as "Disbursed Date", \r\ndate(l.expected_maturedon_date) as "Expected Matured On",\r\n\r\nl.principal_repaid_derived as "Principal Repaid",\r\nl.principal_outstanding_derived as "Principal Outstanding",\r\nlaa.principal_overdue_derived as "Principal Overdue",\r\n\r\nl.interest_repaid_derived as "Interest Repaid",\r\nl.interest_outstanding_derived as "Interest Outstanding",\r\nlaa.interest_overdue_derived as "Interest Overdue",\r\n\r\nl.fee_charges_repaid_derived as "Fees Repaid",\r\nl.fee_charges_outstanding_derived as "Fees Outstanding",\r\nlaa.fee_charges_overdue_derived as "Fees Overdue",\r\n\r\nl.penalty_charges_repaid_derived as "Penalties Repaid",\r\nl.penalty_charges_outstanding_derived as "Penalties Outstanding",\r\nlaa.penalty_charges_overdue_derived as "Penalties Overdue"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'Individual Client \n\nReport', 1, 1), - (56, 'Active Loans Passed Final Maturity Summary', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as "Office/Branch", x.currency as Currency,\r\n x.client_count as "No. of Clients", x.active_loan_count as "No. Active Loans", x. arrears_loan_count as "No. of Loans in Arrears",\r\nx.principal as "Total Loans Disbursed", x.principal_repaid as "Principal Repaid", x.principal_outstanding as "Principal Outstanding", x.principal_overdue as "Principal Overdue",\r\nx.interest as "Total Interest", x.interest_repaid as "Interest Repaid", x.interest_outstanding as "Interest Outstanding", x.interest_overdue as "Interest Overdue",\r\nx.fees as "Total Fees", x.fees_repaid as "Fees Repaid", x.fees_outstanding as "Fees Outstanding", x.fees_overdue as "Fees Overdue",\r\nx.penalties as "Total Penalties", x.penalties_repaid as "Penalties Repaid", x.penalties_outstanding as "Penalties Outstanding", x.penalties_overdue as "Penalties Overdue",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else "invalid PAR Type"\r\n end) as "Portfolio at Risk %"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', NULL, 1, 1), - (57, 'Active Loans in last installment', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(lastInstallment.`hierarchy`) - LENGTH(REPLACE(lastInstallment.`hierarchy`, \'.\', \'\')) - 1))), lastInstallment.branch) as "Office/Branch",\r\nlastInstallment.Currency,\r\nlastInstallment.`Loan Officer`, \r\nlastInstallment.`Client Account No`, lastInstallment.`Client`, \r\nlastInstallment.`Loan Account No`, lastInstallment.`Product`, \r\nlastInstallment.`Fund`, lastInstallment.`Loan Amount`, \r\nlastInstallment.`Annual Nominal Interest Rate`, \r\nlastInstallment.`Disbursed`, lastInstallment.`Expected Matured On` ,\r\n\r\nl.principal_repaid_derived as "Principal Repaid",\r\nl.principal_outstanding_derived as "Principal Outstanding",\r\nlaa.principal_overdue_derived as "Principal Overdue",\r\n\r\nl.interest_repaid_derived as "Interest Repaid",\r\nl.interest_outstanding_derived as "Interest Outstanding",\r\nlaa.interest_overdue_derived as "Interest Overdue",\r\n\r\nl.fee_charges_repaid_derived as "Fees Repaid",\r\nl.fee_charges_outstanding_derived as "Fees Outstanding",\r\nlaa.fee_charges_overdue_derived as "Fees Overdue",\r\n\r\nl.penalty_charges_repaid_derived as "Penalties Repaid",\r\nl.penalty_charges_outstanding_derived as "Penalties Outstanding",\r\nlaa.penalty_charges_overdue_derived as "Penalties Overdue"\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as "Loan Officer", c.account_no as "Client Account No",\r\nc.display_name as "Client", l.account_no as "Loan Account No", pl.`name` as "Product", \r\nf.`name` as Fund, l.principal_amount as "Loan Amount", \r\nl.annual_nominal_interest_rate as "Annual Nominal Interest Rate", \r\ndate(l.disbursedon_date) as "Disbursed", date(l.expected_maturedon_date) as "Expected Matured On"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\norder by lastInstallment.hierarchy, lastInstallment.Currency, lastInstallment.`Client Account No`, lastInstallment.`Loan Account No`', 'Individual Client \n\nReport', 1, 1), - (58, 'Active Loans in last installment Summary', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as "Office/Branch", x.currency as Currency,\r\n x.client_count as "No. of Clients", x.active_loan_count as "No. Active Loans", x. arrears_loan_count as "No. of Loans in Arrears",\r\nx.principal as "Total Loans Disbursed", x.principal_repaid as "Principal Repaid", x.principal_outstanding as "Principal Outstanding", x.principal_overdue as "Principal Overdue",\r\nx.interest as "Total Interest", x.interest_repaid as "Interest Repaid", x.interest_outstanding as "Interest Outstanding", x.interest_overdue as "Interest Overdue",\r\nx.fees as "Total Fees", x.fees_repaid as "Fees Repaid", x.fees_outstanding as "Fees Outstanding", x.fees_overdue as "Fees Overdue",\r\nx.penalties as "Total Penalties", x.penalties_repaid as "Penalties Repaid", x.penalties_outstanding as "Penalties Outstanding", x.penalties_overdue as "Penalties Overdue",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else "invalid PAR Type"\r\n end) as "Portfolio at Risk %"\r\n from m_office mo\r\njoin \r\n(select lastInstallment.branchId as branchId,\r\nlastInstallment.Currency,\r\ncount(distinct(lastInstallment.clientId)) as client_count, \r\ncount(distinct(lastInstallment.loanId)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id as branchId, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as "Loan Officer", c.id as clientId, c.account_no as "Client Account No",\r\nc.display_name as "Client", l.account_no as "Loan Account No", pl.`name` as "Product", \r\nf.`name` as Fund, l.principal_amount as "Loan Amount", \r\nl.annual_nominal_interest_rate as "Annual Nominal Interest Rate", \r\ndate(l.disbursedon_date) as "Disbursed", date(l.expected_maturedon_date) as "Expected Matured On"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\ngroup by lastInstallment.branchId, lastInstallment.Currency) x on x.branchId = mo.id\r\norder by mo.hierarchy, x.Currency', 'Individual Client \n\nReport', 1, 1), - (59, 'Active Loans by Disbursal Period', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as "Client Account No", c.display_name as "Client", l.account_no as "Loan Account No", pl.`name` as "Product", \r\nf.`name` as Fund, \r\nl.principal_amount as "Loan Principal Amount", \r\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", \r\ndate(l.disbursedon_date) as "Disbursed Date", \r\n\r\nl.total_expected_repayment_derived as "Total Loan (P+I+F+Pen)",\r\nl.total_repayment_derived as "Total Repaid (P+I+F+Pen)",\r\nlo.display_name as "Loan Officer"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'Individual Client \n\nReport', 1, 1), - (61, 'Aging Summary (Arrears in Months)', 'Table', NULL, 'Loan', 'SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Days In Arrears\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'0 - 30\',2 UNION\r\n SELECT \'30 - 60\',3 UNION\r\n SELECT \'60 - 90\',4 UNION\r\n SELECT \'90 - 180\',5 UNION\r\n SELECT \'180 - 360\',6 UNION\r\n SELECT \'> 360\',7 ) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<361, \'180 - 360\', \r\n \'> 360\')))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid', 'Loan amount in arrears by branch', 1, 1), + (51, 'Written-Off Loans', 'Table', NULL, 'Loan', 'SELECT +\r +\nconcat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nifnull(cur.display_symbol, ml.currency_code) as Currency, +\r +\nc.account_no as "Client Account No.", +\r +\nc.display_name AS +\'Client Name\', +\r +\nml.account_no AS +\'Loan Account No.\', +\r +\nmpl.name AS +\'Product Name\', +\r +\nml.disbursedon_date AS +\'Disbursed Date\', +\r +\nlt.transaction_date AS +\'Written Off date\', +\r +\nml.principal_amount as "Loan Amount", +\r +\nifnull(lt.principal_portion_derived, 0) AS +\'Written-Off Principal\', +\r +\nifnull(lt.interest_portion_derived, 0) AS +\'Written-Off Interest\', +\r +\nifnull(lt.fee_charges_portion_derived,0) AS +\'Written-Off Fees\', +\r +\nifnull(lt.penalty_charges_portion_derived,0) AS +\'Written-Off Penalties\', +\r +\nn.note AS +\'Reason For Write-Off\', +\r +\nIFNULL(ms.display_name, +\'-\') AS +\'Loan Officer Name\' +\r +\nFROM m_office o +\r +\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nAND ounder.hierarchy like CONCAT( +\'${currentUserHierarchy}\', +\'%\') +\r +\nJOIN m_client c ON c.office_id = ounder.id +\r +\nJOIN m_loan ml ON ml.client_id = c.id +\r +\nJOIN m_product_loan mpl ON mpl.id=ml.product_id +\r +\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id +\r +\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id +\r +\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id +\r +\nLEFT JOIN m_currency cur on cur.code = ml.currency_code +\r +\nWHERE lt.transaction_type_enum = 6 /*write-off */ +\r +\nAND lt.is_reversed is false +\r +\nAND ml.loan_status_id=601 +\r +\nAND o.id= +${officeId} +\r +\nAND (mpl.id= +${loanProductId} +OR +${loanProductId} += +- +1 +) +\r +\nAND lt.transaction_date BETWEEN +\'${startDate}\' AND +\'${endDate}\' +\r +\nAND (ml.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', 'Individual Lending Report. Written Off Loans', 1, 1), + (52, 'Aging Detail', 'Table', NULL, 'Loan', ' +\r +\nSELECT +\r +\nconcat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nifnull(cur.display_symbol, ml.currency_code) as Currency, +\r +\nmc.account_no as "Client Account No.", +\r +\n mc.display_name AS "Client Name", +\r +\n ml.account_no AS "Account Number", +\r +\n ml.principal_amount AS "Loan Amount", +\r +\n ml.principal_disbursed_derived AS "Original Principal", +\r +\n ml.interest_charged_derived AS "Original Interest", +\r +\n ml.principal_repaid_derived AS "Principal Paid", +\r +\n ml.interest_repaid_derived AS "Interest Paid", +\r +\n laa.principal_overdue_derived AS "Principal Overdue", +\r +\n laa.interest_overdue_derived AS "Interest Overdue", +\r +\nDATEDIFF(CURDATE(), laa.overdue_since_date_derived) as "Days in Arrears", +\r +\n +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<7, +\'<1\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<8, +\' 1\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<15, +\'2\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<22, +\' 3\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<29, +\' 4\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<36, +\' 5\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<43, +\' 6\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<50, +\' 7\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<57, +\' 8\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<64, +\' 9\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<71, +\'10\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<78, +\'11\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<85, +\'12\', +\'12+\')))))))))))) )AS "Weeks In Arrears Band", +\r +\n +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<31, +\'0 - 30\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<61, +\'30 - 60\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<91, +\'60 - 90\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<181, +\'90 - 180\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<361, +\'180 - 360\', +\r +\n +\'> 360\'))))) AS "Days in Arrears Band" +\r +\n +\r +\n FROM m_office mo +\r +\n JOIN m_office ounder ON ounder.hierarchy like concat(mo.hierarchy, +\'%\') +\r +\n AND ounder.hierarchy like CONCAT( +\'${currentUserHierarchy}\', +\'%\') +\r +\n INNER JOIN m_client mc ON mc.office_id=ounder.id +\r +\n INNER JOIN m_loan ml ON ml.client_id = mc.id +\r +\n INNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = +\'loan_status_id\' +\r +\n INNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id +\r +\n left join m_currency cur on cur.code = ml.currency_code +\r +\n WHERE ml.loan_status_id=300 +\r +\n AND mo.id= +${officeId} +\r +\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no +\r +\n', 'Loan arrears aging (Weeks)', 1, 1), + (53, 'Aging Summary (Arrears in Weeks)', 'Table', NULL, 'Loan', 'SELECT +\r +\n IFNULL(periods.currencyName, periods.currency) as currency, +\r +\n periods.period_no +\'Weeks In Arrears (Up To)\', +\r +\n IFNULL(ars.loanId, 0) +\'No Of Loans\', +\r +\n IFNULL(ars.principal,0.0) +\'Original Principal\', +\r +\n IFNULL(ars.interest,0.0) +\'Original Interest\', +\r +\n IFNULL(ars.prinPaid,0.0) +\'Principal Paid\', +\r +\n IFNULL(ars.intPaid,0.0) +\'Interest Paid\', +\r +\n IFNULL(ars.prinOverdue,0.0) +\'Principal Overdue\', +\r +\n IFNULL(ars.intOverdue,0.0) +\'Interest Overdue\' +\r +\nFROM +\r +\n /* full table of aging periods/currencies used combo to ensure each line represented */ +\r +\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from +\r +\n (SELECT +\'On Schedule\' period_no,1 pid UNION +\r +\n SELECT +\'1\',2 UNION +\r +\n SELECT +\'2\',3 UNION +\r +\n SELECT +\'3\',4 UNION +\r +\n SELECT +\'4\',5 UNION +\r +\n SELECT +\'5\',6 UNION +\r +\n SELECT +\'6\',7 UNION +\r +\n SELECT +\'7\',8 UNION +\r +\n SELECT +\'8\',9 UNION +\r +\n SELECT +\'9\',10 UNION +\r +\n SELECT +\'10\',11 UNION +\r +\n SELECT +\'11\',12 UNION +\r +\n SELECT +\'12\',13 UNION +\r +\n SELECT +\'12+\',14) pers, +\r +\n (SELECT distinctrow moc.code, moc.name +\r +\n FROM m_office mo2 +\r +\n INNER JOIN m_office ounder2 ON ounder2.hierarchy +\r +\n LIKE CONCAT(mo2.hierarchy, +\'%\') +\r +\nAND ounder2.hierarchy like CONCAT( +\'${currentUserHierarchy}\', +\'%\') +\r +\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id +\r +\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id +\r +\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code +\r +\n WHERE ml2.loan_status_id=300 /* active */ +\r +\n AND mo2.id= +${officeId} +\r +\nAND (ml2.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")) curs) periods +\r +\n +\r +\n +\r +\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */ +\r +\n(SELECT +\r +\n z.currency, z.arrPeriod, +\r +\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, +\r +\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, +\r +\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue +\r +\nFROM +\r +\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */ +\r +\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue, +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, +\'On Schedule\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<8, +\'1\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<15, +\'2\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<22, +\'3\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<29, +\'4\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<36, +\'5\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<43, +\'6\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<50, +\'7\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<57, +\'8\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<64, +\'9\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<71, +\'10\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<78, +\'11\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<85, +\'12\', +\r +\n +\'12+\'))))))))))))) AS arrPeriod +\r +\n +\r +\n FROM /* get the individual loan details */ +\r +\n (SELECT ml.id AS loanId, ml.currency_code as currency, +\r +\n ml.principal_disbursed_derived as principal, +\r +\n ml.interest_charged_derived as interest, +\r +\n ml.principal_repaid_derived as prinPaid, +\r +\n ml.interest_repaid_derived intPaid, +\r +\n +\r +\n laa.principal_overdue_derived as prinOverdue, +\r +\n laa.interest_overdue_derived as intOverdue, +\r +\n +\r +\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate +\r +\n +\r +\n FROM m_office mo +\r +\n INNER JOIN m_office ounder ON ounder.hierarchy +\r +\n LIKE CONCAT(mo.hierarchy, +\'%\') +\r +\nAND ounder.hierarchy like CONCAT( +\'${currentUserHierarchy}\', +\'%\') +\r +\n INNER JOIN m_client mc ON mc.office_id=ounder.id +\r +\n INNER JOIN m_loan ml ON ml.client_id = mc.id +\r +\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id +\r +\n WHERE ml.loan_status_id=300 /* active */ +\r +\n AND mo.id= +${officeId} +\r +\n AND (ml.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\n GROUP BY ml.id) x +\r +\n ) z +\r +\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency +\r +\nORDER BY periods.currency, periods.pid', 'Loan amount in arrears by branch', 1, 1), + (54, 'Rescheduled Loans', 'Table', NULL, 'Loan', 'SELECT +\r +\nconcat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nifnull(cur.display_symbol, ml.currency_code) as Currency, +\r +\nc.account_no as "Client Account No.", +\r +\nc.display_name AS +\'Client Name\', +\r +\nml.account_no AS +\'Loan Account No.\', +\r +\nmpl.name AS +\'Product Name\', +\r +\nml.disbursedon_date AS +\'Disbursed Date\', +\r +\nlt.transaction_date AS +\'Written Off date\', +\r +\nml.principal_amount as "Loan Amount", +\r +\nifnull(lt.principal_portion_derived, 0) AS +\'Rescheduled Principal\', +\r +\nifnull(lt.interest_portion_derived, 0) AS +\'Rescheduled Interest\', +\r +\nifnull(lt.fee_charges_portion_derived,0) AS +\'Rescheduled Fees\', +\r +\nifnull(lt.penalty_charges_portion_derived,0) AS +\'Rescheduled Penalties\', +\r +\nn.note AS +\'Reason For Rescheduling\', +\r +\nIFNULL(ms.display_name, +\'-\') AS +\'Loan Officer Name\' +\r +\nFROM m_office o +\r +\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nAND ounder.hierarchy like CONCAT( +\'${currentUserHierarchy}\', +\'%\') +\r +\nJOIN m_client c ON c.office_id = ounder.id +\r +\nJOIN m_loan ml ON ml.client_id = c.id +\r +\nJOIN m_product_loan mpl ON mpl.id=ml.product_id +\r +\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id +\r +\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id +\r +\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id +\r +\nLEFT JOIN m_currency cur on cur.code = ml.currency_code +\r +\nWHERE lt.transaction_type_enum = 7 /*marked for rescheduling */ +\r +\nAND lt.is_reversed is false +\r +\nAND ml.loan_status_id=602 +\r +\nAND o.id= +${officeId} +\r +\nAND (mpl.id= +${loanProductId} +OR +${loanProductId} += +- +1 +) +\r +\nAND lt.transaction_date BETWEEN +\'${startDate}\' AND +\'${endDate}\' +\r +\nAND (ml.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', 'Individual Lending Report. Rescheduled Loans. The ability to reschedule (or mark that you have rescheduled the loan elsewhere) is a legacy of the older Mifos product. Needed for migration.', 1, 1), + (55, 'Active Loans Passed Final Maturity', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nlo.display_name as "Loan Officer", +\r +\nc.display_name as "Client", l.account_no as "Loan Account No.", pl.`name` as "Product", +\r +\nf.`name` as Fund, +\r +\nl.principal_amount as "Loan Amount", +\r +\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", +\r +\ndate(l.disbursedon_date) as "Disbursed Date", +\r +\ndate(l.expected_maturedon_date) as "Expected Matured On", +\r +\n +\r +\nl.principal_repaid_derived as "Principal Repaid", +\r +\nl.principal_outstanding_derived as "Principal Outstanding", +\r +\nlaa.principal_overdue_derived as "Principal Overdue", +\r +\n +\r +\nl.interest_repaid_derived as "Interest Repaid", +\r +\nl.interest_outstanding_derived as "Interest Outstanding", +\r +\nlaa.interest_overdue_derived as "Interest Overdue", +\r +\n +\r +\nl.fee_charges_repaid_derived as "Fees Repaid", +\r +\nl.fee_charges_outstanding_derived as "Fees Outstanding", +\r +\nlaa.fee_charges_overdue_derived as "Fees Overdue", +\r +\n +\r +\nl.penalty_charges_repaid_derived as "Penalties Repaid", +\r +\nl.penalty_charges_outstanding_derived as "Penalties Outstanding", +\r +\nlaa.penalty_charges_overdue_derived as "Penalties Overdue" +\r +\n +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 300 +\r +\nand l.expected_maturedon_date < curdate() +\r +\ngroup by l.id +\r +\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'Individual Client +\n +\nReport', 1, 1), + (56, 'Active Loans Passed Final Maturity Summary', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, +\'.\', +\'\')) - 1))), mo.`name`) as "Office/Branch", x.currency as Currency, +\r +\n x.client_count as "No. of Clients", x.active_loan_count as "No. Active Loans", x. arrears_loan_count as "No. of Loans in Arrears", +\r +\nx.principal as "Total Loans Disbursed", x.principal_repaid as "Principal Repaid", x.principal_outstanding as "Principal Outstanding", x.principal_overdue as "Principal Overdue", +\r +\nx.interest as "Total Interest", x.interest_repaid as "Interest Repaid", x.interest_outstanding as "Interest Outstanding", x.interest_overdue as "Interest Overdue", +\r +\nx.fees as "Total Fees", x.fees_repaid as "Fees Repaid", x.fees_outstanding as "Fees Outstanding", x.fees_overdue as "Fees Overdue", +\r +\nx.penalties as "Total Penalties", x.penalties_repaid as "Penalties Repaid", x.penalties_outstanding as "Penalties Outstanding", x.penalties_overdue as "Penalties Overdue", +\r +\n +\r +\n (case +\r +\n when +${parType} += +1 +then +\r +\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char) +\r +\n when +${parType} += +2 +then +\r +\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char) +\r +\n when +${parType} += +3 +then +\r +\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char) +\r +\n when +${parType} += +4 +then +\r +\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char) +\r +\n else "invalid PAR Type" +\r +\n end) as "Portfolio at Risk %" +\r +\n from m_office mo +\r +\njoin +\r +\n(select ounder.id as branch, +\r +\nifnull(cur.display_symbol, l.currency_code) as currency, +\r +\ncount(distinct(c.id)) as client_count, +\r +\ncount(distinct(l.id)) as active_loan_count, +\r +\ncount(distinct(laa.loan_id) ) as arrears_loan_count, +\r +\n +\r +\nsum(l.principal_disbursed_derived) as principal, +\r +\nsum(l.principal_repaid_derived) as principal_repaid, +\r +\nsum(l.principal_outstanding_derived) as principal_outstanding, +\r +\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue, +\r +\n +\r +\nsum(l.interest_charged_derived) as interest, +\r +\nsum(l.interest_repaid_derived) as interest_repaid, +\r +\nsum(l.interest_outstanding_derived) as interest_outstanding, +\r +\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue, +\r +\n +\r +\nsum(l.fee_charges_charged_derived) as fees, +\r +\nsum(l.fee_charges_repaid_derived) as fees_repaid, +\r +\nsum(l.fee_charges_outstanding_derived) as fees_outstanding, +\r +\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue, +\r +\n +\r +\nsum(l.penalty_charges_charged_derived) as penalties, +\r +\nsum(l.penalty_charges_repaid_derived) as penalties_repaid, +\r +\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding, +\r +\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue +\r +\n +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\r +\n +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 300 +\r +\nand l.expected_maturedon_date < curdate() +\r +\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id +\r +\norder by mo.hierarchy, x.Currency', NULL, 1, 1), + (57, 'Active Loans in last installment', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(lastInstallment.`hierarchy`) - LENGTH(REPLACE(lastInstallment.`hierarchy`, +\'.\', +\'\')) - 1))), lastInstallment.branch) as "Office/Branch", +\r +\nlastInstallment.Currency, +\r +\nlastInstallment.`Loan Officer`, +\r +\nlastInstallment.`Client Account No`, lastInstallment.`Client`, +\r +\nlastInstallment.`Loan Account No`, lastInstallment.`Product`, +\r +\nlastInstallment.`Fund`, lastInstallment.`Loan Amount`, +\r +\nlastInstallment.`Annual Nominal Interest Rate`, +\r +\nlastInstallment.`Disbursed`, lastInstallment.`Expected Matured On` , +\r +\n +\r +\nl.principal_repaid_derived as "Principal Repaid", +\r +\nl.principal_outstanding_derived as "Principal Outstanding", +\r +\nlaa.principal_overdue_derived as "Principal Overdue", +\r +\n +\r +\nl.interest_repaid_derived as "Interest Repaid", +\r +\nl.interest_outstanding_derived as "Interest Outstanding", +\r +\nlaa.interest_overdue_derived as "Interest Overdue", +\r +\n +\r +\nl.fee_charges_repaid_derived as "Fees Repaid", +\r +\nl.fee_charges_outstanding_derived as "Fees Outstanding", +\r +\nlaa.fee_charges_overdue_derived as "Fees Overdue", +\r +\n +\r +\nl.penalty_charges_repaid_derived as "Penalties Repaid", +\r +\nl.penalty_charges_outstanding_derived as "Penalties Outstanding", +\r +\nlaa.penalty_charges_overdue_derived as "Penalties Overdue" +\r +\n +\r +\nfrom +\r +\n(select l.id as loanId, l.number_of_repayments, min(r.installment), +\r +\nounder.id, ounder.hierarchy, ounder.`name` as branch, +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nlo.display_name as "Loan Officer", c.account_no as "Client Account No", +\r +\nc.display_name as "Client", l.account_no as "Loan Account No", pl.`name` as "Product", +\r +\nf.`name` as Fund, l.principal_amount as "Loan Amount", +\r +\nl.annual_nominal_interest_rate as "Annual Nominal Interest Rate", +\r +\ndate(l.disbursedon_date) as "Disbursed", date(l.expected_maturedon_date) as "Expected Matured On" +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_loan_repayment_schedule r on r.loan_id = l.id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 300 +\r +\nand r.completed_derived is false +\r +\nand r.duedate >= curdate() +\r +\ngroup by l.id +\r +\nhaving l.number_of_repayments = min(r.installment)) lastInstallment +\r +\njoin m_loan l on l.id = lastInstallment.loanId +\r +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\r +\norder by lastInstallment.hierarchy, lastInstallment.Currency, lastInstallment.`Client Account No`, lastInstallment.`Loan Account No`', 'Individual Client +\n +\nReport', 1, 1), + (58, 'Active Loans in last installment Summary', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, +\'.\', +\'\')) - 1))), mo.`name`) as "Office/Branch", x.currency as Currency, +\r +\n x.client_count as "No. of Clients", x.active_loan_count as "No. Active Loans", x. arrears_loan_count as "No. of Loans in Arrears", +\r +\nx.principal as "Total Loans Disbursed", x.principal_repaid as "Principal Repaid", x.principal_outstanding as "Principal Outstanding", x.principal_overdue as "Principal Overdue", +\r +\nx.interest as "Total Interest", x.interest_repaid as "Interest Repaid", x.interest_outstanding as "Interest Outstanding", x.interest_overdue as "Interest Overdue", +\r +\nx.fees as "Total Fees", x.fees_repaid as "Fees Repaid", x.fees_outstanding as "Fees Outstanding", x.fees_overdue as "Fees Overdue", +\r +\nx.penalties as "Total Penalties", x.penalties_repaid as "Penalties Repaid", x.penalties_outstanding as "Penalties Outstanding", x.penalties_overdue as "Penalties Overdue", +\r +\n +\r +\n (case +\r +\n when +${parType} += +1 +then +\r +\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char) +\r +\n when +${parType} += +2 +then +\r +\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char) +\r +\n when +${parType} += +3 +then +\r +\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char) +\r +\n when +${parType} += +4 +then +\r +\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char) +\r +\n else "invalid PAR Type" +\r +\n end) as "Portfolio at Risk %" +\r +\n from m_office mo +\r +\njoin +\r +\n(select lastInstallment.branchId as branchId, +\r +\nlastInstallment.Currency, +\r +\ncount(distinct(lastInstallment.clientId)) as client_count, +\r +\ncount(distinct(lastInstallment.loanId)) as active_loan_count, +\r +\ncount(distinct(laa.loan_id) ) as arrears_loan_count, +\r +\n +\r +\nsum(l.principal_disbursed_derived) as principal, +\r +\nsum(l.principal_repaid_derived) as principal_repaid, +\r +\nsum(l.principal_outstanding_derived) as principal_outstanding, +\r +\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue, +\r +\n +\r +\nsum(l.interest_charged_derived) as interest, +\r +\nsum(l.interest_repaid_derived) as interest_repaid, +\r +\nsum(l.interest_outstanding_derived) as interest_outstanding, +\r +\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue, +\r +\n +\r +\nsum(l.fee_charges_charged_derived) as fees, +\r +\nsum(l.fee_charges_repaid_derived) as fees_repaid, +\r +\nsum(l.fee_charges_outstanding_derived) as fees_outstanding, +\r +\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue, +\r +\n +\r +\nsum(l.penalty_charges_charged_derived) as penalties, +\r +\nsum(l.penalty_charges_repaid_derived) as penalties_repaid, +\r +\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding, +\r +\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue +\r +\n +\r +\nfrom +\r +\n(select l.id as loanId, l.number_of_repayments, min(r.installment), +\r +\nounder.id as branchId, ounder.hierarchy, ounder.`name` as branch, +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nlo.display_name as "Loan Officer", c.id as clientId, c.account_no as "Client Account No", +\r +\nc.display_name as "Client", l.account_no as "Loan Account No", pl.`name` as "Product", +\r +\nf.`name` as Fund, l.principal_amount as "Loan Amount", +\r +\nl.annual_nominal_interest_rate as "Annual Nominal Interest Rate", +\r +\ndate(l.disbursedon_date) as "Disbursed", date(l.expected_maturedon_date) as "Expected Matured On" +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_loan_repayment_schedule r on r.loan_id = l.id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 300 +\r +\nand r.completed_derived is false +\r +\nand r.duedate >= curdate() +\r +\ngroup by l.id +\r +\nhaving l.number_of_repayments = min(r.installment)) lastInstallment +\r +\njoin m_loan l on l.id = lastInstallment.loanId +\r +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\r +\ngroup by lastInstallment.branchId, lastInstallment.Currency) x on x.branchId = mo.id +\r +\norder by mo.hierarchy, x.Currency', 'Individual Client +\n +\nReport', 1, 1), + (59, 'Active Loans by Disbursal Period', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nc.account_no as "Client Account No", c.display_name as "Client", l.account_no as "Loan Account No", pl.`name` as "Product", +\r +\nf.`name` as Fund, +\r +\nl.principal_amount as "Loan Principal Amount", +\r +\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", +\r +\ndate(l.disbursedon_date) as "Disbursed Date", +\r +\n +\r +\nl.total_expected_repayment_derived as "Total Loan (P+I+F+Pen)", +\r +\nl.total_repayment_derived as "Total Repaid (P+I+F+Pen)", +\r +\nlo.display_name as "Loan Officer" +\r +\n +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.disbursedon_date between +\'${startDate}\' and +\'${endDate}\' +\r +\nand l.loan_status_id = 300 +\r +\ngroup by l.id +\r +\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'Individual Client +\n +\nReport', 1, 1), + (61, 'Aging Summary (Arrears in Months)', 'Table', NULL, 'Loan', 'SELECT +\r +\n IFNULL(periods.currencyName, periods.currency) as currency, +\r +\n periods.period_no +\'Days In Arrears\', +\r +\n IFNULL(ars.loanId, 0) +\'No Of Loans\', +\r +\n IFNULL(ars.principal,0.0) +\'Original Principal\', +\r +\n IFNULL(ars.interest,0.0) +\'Original Interest\', +\r +\n IFNULL(ars.prinPaid,0.0) +\'Principal Paid\', +\r +\n IFNULL(ars.intPaid,0.0) +\'Interest Paid\', +\r +\n IFNULL(ars.prinOverdue,0.0) +\'Principal Overdue\', +\r +\n IFNULL(ars.intOverdue,0.0) +\'Interest Overdue\' +\r +\nFROM +\r +\n /* full table of aging periods/currencies used combo to ensure each line represented */ +\r +\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from +\r +\n (SELECT +\'On Schedule\' period_no,1 pid UNION +\r +\n SELECT +\'0 - 30\',2 UNION +\r +\n SELECT +\'30 - 60\',3 UNION +\r +\n SELECT +\'60 - 90\',4 UNION +\r +\n SELECT +\'90 - 180\',5 UNION +\r +\n SELECT +\'180 - 360\',6 UNION +\r +\n SELECT +\'> 360\',7 ) pers, +\r +\n (SELECT distinctrow moc.code, moc.name +\r +\n FROM m_office mo2 +\r +\n INNER JOIN m_office ounder2 ON ounder2.hierarchy +\r +\n LIKE CONCAT(mo2.hierarchy, +\'%\') +\r +\nAND ounder2.hierarchy like CONCAT( +\'${currentUserHierarchy}\', +\'%\') +\r +\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id +\r +\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id +\r +\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code +\r +\n WHERE ml2.loan_status_id=300 /* active */ +\r +\n AND mo2.id= +${officeId} +\r +\nAND (ml2.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")) curs) periods +\r +\n +\r +\n +\r +\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */ +\r +\n(SELECT +\r +\n z.currency, z.arrPeriod, +\r +\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, +\r +\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, +\r +\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue +\r +\nFROM +\r +\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */ +\r +\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue, +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, +\'On Schedule\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<31, +\'0 - 30\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<61, +\'30 - 60\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<91, +\'60 - 90\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<181, +\'90 - 180\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<361, +\'180 - 360\', +\r +\n +\'> 360\')))))) AS arrPeriod +\r +\n +\r +\n FROM /* get the individual loan details */ +\r +\n (SELECT ml.id AS loanId, ml.currency_code as currency, +\r +\n ml.principal_disbursed_derived as principal, +\r +\n ml.interest_charged_derived as interest, +\r +\n ml.principal_repaid_derived as prinPaid, +\r +\n ml.interest_repaid_derived intPaid, +\r +\n +\r +\n laa.principal_overdue_derived as prinOverdue, +\r +\n laa.interest_overdue_derived as intOverdue, +\r +\n +\r +\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate +\r +\n +\r +\n FROM m_office mo +\r +\n INNER JOIN m_office ounder ON ounder.hierarchy +\r +\n LIKE CONCAT(mo.hierarchy, +\'%\') +\r +\nAND ounder.hierarchy like CONCAT( +\'${currentUserHierarchy}\', +\'%\') +\r +\n INNER JOIN m_client mc ON mc.office_id=ounder.id +\r +\n INNER JOIN m_loan ml ON ml.client_id = mc.id +\r +\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id +\r +\n WHERE ml.loan_status_id=300 /* active */ +\r +\n AND mo.id= +${officeId} +\r +\n AND (ml.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\n GROUP BY ml.id) x +\r +\n ) z +\r +\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency +\r +\nORDER BY periods.currency, periods.pid', 'Loan amount in arrears by branch', 1, 1), (91, 'Loan Account Schedule', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 0), (92, 'Branch Expected Cash Flow', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 1), - (93, 'Expected Payments By Date - Basic', 'Table', NULL, 'Loan', 'SELECT \r\n ounder.name \'Office\', \r\n IFNULL(ms.display_name,\'-\') \'Loan Officer\',\r\n mc.account_no \'Client Account Number\',\r\n mc.display_name \'Name\',\r\n mp.name \'Product\',\r\n ml.account_no \'Loan Account Number\',\r\n mr.duedate \'Due Date\',\r\n mr.installment \'Installment\',\r\n cu.display_symbol \'Currency\',\r\n mr.principal_amount- IFNULL(mr.principal_completed_derived,0) \'Principal Due\',\r\n mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0) \'Interest Due\', \r\n IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0) \'Fees Due\', \r\n IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0) \'Penalty Due\',\r\n (mr.principal_amount- IFNULL(mr.principal_completed_derived,0)) +\r\n (mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0)) + \r\n (IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0)) + \r\n (IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0)) \'Total Due\', \r\n mlaa.total_overdue_derived \'Total Overdue\'\r\n \r\n FROM m_office mo\r\n JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\n \r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n \r\n LEFT JOIN m_client mc ON mc.office_id=ounder.id\r\n LEFT JOIN m_loan ml ON ml.client_id=mc.id AND ml.loan_status_id=300\r\n LEFT JOIN m_loan_arrears_aging mlaa ON mlaa.loan_id=ml.id\r\n LEFT JOIN m_loan_repayment_schedule mr ON mr.loan_id=ml.id AND mr.completed_derived=0\r\n LEFT JOIN m_product_loan mp ON mp.id=ml.product_id\r\n LEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\n LEFT JOIN m_currency cu ON cu.code=ml.currency_code\r\n WHERE mo.id=${officeId}\r\n AND (IFNULL(ml.loan_officer_id, -10) = "${loanOfficerId}" OR "-1" = "${loanOfficerId}")\r\n AND mr.duedate BETWEEN \'${startDate}\' AND \'${endDate}\'\r\n ORDER BY ounder.id,mr.duedate,ml.account_no', 'Test', 1, 1), + (93, 'Expected Payments By Date - Basic', 'Table', NULL, 'Loan', 'SELECT +\r +\n ounder.name +\'Office\', +\r +\n IFNULL(ms.display_name, +\'-\') +\'Loan Officer\', +\r +\n mc.account_no +\'Client Account Number\', +\r +\n mc.display_name +\'Name\', +\r +\n mp.name +\'Product\', +\r +\n ml.account_no +\'Loan Account Number\', +\r +\n mr.duedate +\'Due Date\', +\r +\n mr.installment +\'Installment\', +\r +\n cu.display_symbol +\'Currency\', +\r +\n mr.principal_amount- IFNULL(mr.principal_completed_derived,0) +\'Principal Due\', +\r +\n mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0) +\'Interest Due\', +\r +\n IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0) +\'Fees Due\', +\r +\n IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0) +\'Penalty Due\', +\r +\n (mr.principal_amount- IFNULL(mr.principal_completed_derived,0)) + +\r +\n (mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0)) + +\r +\n (IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0)) + +\r +\n (IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0)) +\'Total Due\', +\r +\n mlaa.total_overdue_derived +\'Total Overdue\' +\r +\n +\r +\n FROM m_office mo +\r +\n JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, +\'%\') +\r +\n +\r +\n AND ounder.hierarchy like CONCAT( +\'${currentUserHierarchy}\', +\'%\') +\r +\n +\r +\n LEFT JOIN m_client mc ON mc.office_id=ounder.id +\r +\n LEFT JOIN m_loan ml ON ml.client_id=mc.id AND ml.loan_status_id=300 +\r +\n LEFT JOIN m_loan_arrears_aging mlaa ON mlaa.loan_id=ml.id +\r +\n LEFT JOIN m_loan_repayment_schedule mr ON mr.loan_id=ml.id AND mr.completed_derived=0 +\r +\n LEFT JOIN m_product_loan mp ON mp.id=ml.product_id +\r +\n LEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id +\r +\n LEFT JOIN m_currency cu ON cu.code=ml.currency_code +\r +\n WHERE mo.id= +${officeId} +\r +\n AND (IFNULL(ml.loan_officer_id, -10) = "${loanOfficerId}" OR "-1" = "${loanOfficerId}") +\r +\n AND mr.duedate BETWEEN +\'${startDate}\' AND +\'${endDate}\' +\r +\n ORDER BY ounder.id,mr.duedate,ml.account_no', 'Test', 1, 1), (94, 'Expected Payments By Date - Formatted', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 1), - (96, 'GroupSummaryCounts', 'Table', NULL, NULL, '\n/*\nActive Client is a client linked to the \'group\' via m_group_client\nand with an active \'status_enum\'.)\nActive Borrowers - Borrower may be a client or a \'group\'\n*/\nselect x.*\nfrom m_office o,\nm_group g,\n\n(select a.activeClients,\n(b.activeClientLoans + c.activeGroupLoans) as activeLoans,\nb.activeClientLoans, c.activeGroupLoans,\n(b.activeClientBorrowers + c.activeGroupBorrowers) as activeBorrowers,\nb.activeClientBorrowers, c.activeGroupBorrowers,\n(b.overdueClientLoans + c.overdueGroupLoans) as overdueLoans,\nb.overdueClientLoans, c.overdueGroupLoans\nfrom\n(select count(*) as activeClients\nfrom m_group topgroup\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, \'%\')\njoin m_group_client gc on gc.group_id = g.id\njoin m_client c on c.id = gc.client_id\nwhere topgroup.id = ${groupId}\nand c.status_enum = 300) a,\n\n(select count(*) as activeClientLoans,\ncount(distinct(l.client_id)) as activeClientBorrowers,\nifnull(sum(if(laa.loan_id is not null, 1, 0)), 0) as overdueClientLoans\nfrom m_group topgroup\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, \'%\')\njoin m_loan l on l.group_id = g.id and l.client_id is not null\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\nwhere topgroup.id = ${groupId}\nand l.loan_status_id = 300) b,\n\n(select count(*) as activeGroupLoans,\ncount(distinct(l.group_id)) as activeGroupBorrowers,\nifnull(sum(if(laa.loan_id is not null, 1, 0)), 0) as overdueGroupLoans\nfrom m_group topgroup\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, \'%\')\njoin m_loan l on l.group_id = g.id and l.client_id is null\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\nwhere topgroup.id = ${groupId}\nand l.loan_status_id = 300) c\n) x\n\nwhere g.id = ${groupId}\nand o.id = g.office_id\nand o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\n', 'Utility query for getting group summary count details for a group_id', 1, 0), - (97, 'GroupSummaryAmounts', 'Table', NULL, NULL, '\nselect ifnull(cur.display_symbol, l.currency_code) as currency,\nifnull(sum(l.principal_disbursed_derived),0) as totalDisbursedAmount,\nifnull(sum(l.principal_outstanding_derived),0) as totalLoanOutstandingAmount,\ncount(laa.loan_id) as overdueLoans, ifnull(sum(laa.total_overdue_derived), 0) as totalLoanOverdueAmount\nfrom m_group topgroup\njoin m_office o on o.id = topgroup.office_id and o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, \'%\')\njoin m_loan l on l.group_id = g.id\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\nleft join m_currency cur on cur.code = l.currency_code\nwhere topgroup.id = ${groupId}\nand l.disbursedon_date is not null\ngroup by l.currency_code\n', 'Utility query for getting group summary currency amount details for a group_id', 1, 0), - (106, 'TxnRunningBalances', 'Table', NULL, 'Transaction', '\nselect date(\'${startDate}\') as \'Transaction Date\', \'Opening Balance\' as `Transaction Type`, null as Office,\n null as \'Loan Officer\', null as `Loan Account No`, null as `Loan Product`, null as `Currency`,\n null as `Client Account No`, null as Client,\n null as Amount, null as Principal, null as Interest,\n@totalOutstandingPrincipal :=\nifnull(round(sum(\n if (txn.transaction_type_enum = 1 /* disbursement */,\n ifnull(txn.amount,0.00),\n ifnull(txn.principal_portion_derived,0.00) * -1))\n ,2),0.00) as \'Outstanding Principal\',\n\n@totalInterestIncome :=\nifnull(round(sum(\n if (txn.transaction_type_enum in (2,5,8) /* repayment, repayment at disbursal, recovery repayment */,\n ifnull(txn.interest_portion_derived,0.00),\n 0))\n ,2),0.00) as \'Interest Income\',\n\n@totalWriteOff :=\nifnull(round(sum(\n if (txn.transaction_type_enum = 6 /* write-off */,\n ifnull(txn.principal_portion_derived,0.00),\n 0))\n ,2),0.00) as \'Principal Write Off\'\nfrom m_office o\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\n and ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_client c on c.office_id = ounder.id\njoin m_loan l on l.client_id = c.id\njoin m_product_loan lp on lp.id = l.product_id\njoin m_loan_transaction txn on txn.loan_id = l.id\nleft join m_currency cur on cur.code = l.currency_code\nwhere txn.is_reversed = false\nand txn.transaction_type_enum not in (10,11)\nand o.id = ${officeId}\nand txn.transaction_date < date(\'${startDate}\')\n\nunion all\n\nselect x.`Transaction Date`, x.`Transaction Type`, x.Office, x.`Loan Officer`, x.`Loan Account No`, x.`Loan Product`, x.`Currency`,\n x.`Client Account No`, x.Client, x.Amount, x.Principal, x.Interest,\ncast(round(\n if (x.transaction_type_enum = 1 /* disbursement */,\n @totalOutstandingPrincipal := @totalOutstandingPrincipal + x.`Amount`,\n @totalOutstandingPrincipal := @totalOutstandingPrincipal - x.`Principal`)\n ,2) as decimal(19,2)) as \'Outstanding Principal\',\ncast(round(\n if (x.transaction_type_enum in (2,5,8) /* repayment, repayment at disbursal, recovery repayment */,\n @totalInterestIncome := @totalInterestIncome + x.`Interest`,\n @totalInterestIncome)\n ,2) as decimal(19,2)) as \'Interest Income\',\ncast(round(\n if (x.transaction_type_enum = 6 /* write-off */,\n @totalWriteOff := @totalWriteOff + x.`Principal`,\n @totalWriteOff)\n ,2) as decimal(19,2)) as \'Principal Write Off\'\nfrom\n(select txn.transaction_type_enum, txn.id as txn_id, txn.transaction_date as \'Transaction Date\',\ncast(\n ifnull(re.enum_message_property, concat(\'Unknown Transaction Type Value: \' , txn.transaction_type_enum))\n as char) as \'Transaction Type\',\nounder.`name` as Office, lo.display_name as \'Loan Officer\',\nl.account_no as \'Loan Account No\', lp.`name` as \'Loan Product\',\nifnull(cur.display_symbol, l.currency_code) as Currency,\nc.account_no as \'Client Account No\', c.display_name as \'Client\',\nifnull(txn.amount,0.00) as Amount,\nifnull(txn.principal_portion_derived,0.00) as Principal,\nifnull(txn.interest_portion_derived,0.00) as Interest\nfrom m_office o\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\n and ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_client c on c.office_id = ounder.id\njoin m_loan l on l.client_id = c.id\nleft join m_staff lo on lo.id = l.loan_officer_id\njoin m_product_loan lp on lp.id = l.product_id\njoin m_loan_transaction txn on txn.loan_id = l.id\nleft join m_currency cur on cur.code = l.currency_code\nleft join r_enum_value re on re.enum_name = \'transaction_type_enum\'\n and re.enum_id = txn.transaction_type_enum\nwhere txn.is_reversed = false\nand txn.transaction_type_enum not in (10,11)\nand (ifnull(l.loan_officer_id, -10) = \'${loanOfficerId}\' or \'-1\' = \'${loanOfficerId}\')\nand o.id = ${officeId}\nand txn.transaction_date >= date(\'${startDate}\')\nand txn.transaction_date <= date(\'${endDate}\')\norder by txn.transaction_date, txn.id) x\n', 'Running Balance Txn report for Individual Lending.\nSuitable for small MFI\'s. Larger could use it using the branch or other parameters.\nBasically, suck it and see if its quick enough for you out-of-te box or whether it needs performance work in your situation.\n', 0, 0), - (107, 'FieldAgentStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_staff fa\njoin m_office o on o.id = fa.office_id\n and o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_group pgm on pgm.staff_id = fa.id\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id\njoin m_client c on c.id = l.client_id\nwhere fa.id = ${staffId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Field Agent Statistics', 0, 0), - (108, 'FieldAgentPrograms', 'Table', NULL, 'Quipo', '\nselect pgm.id, pgm.display_name as `name`, sts.enum_message_property as status\n from m_group pgm\n join m_office o on o.id = pgm.office_id\n and o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\n left join r_enum_value sts on sts.enum_name = \'status_enum\' and sts.enum_id = pgm.status_enum\n where pgm.staff_id = ${staffId}\n', 'List of Field Agent Programs', 0, 0), - (109, 'ProgramDetails', 'Table', NULL, 'Quipo', '\n select l.id as loanId, l.account_no as loanAccountNo, c.id as clientId, c.account_no as clientAccountNo,\n pgm.display_name as programName,\n\n(select count(*)\nfrom m_loan cy\nwhere cy.group_id = pgm.id and cy.client_id =c.id\nand cy.disbursedon_date <= l.disbursedon_date) as loanCycleNo,\n\nc.display_name as clientDisplayName,\n ifnull(cur.display_symbol, l.currency_code) as Currency,\nifnull(l.principal_repaid_derived,0.0) as loanRepaidAmount,\nifnull(l.principal_outstanding_derived, 0.0) as loanOutstandingAmount,\nifnull(lpa.principal_in_advance_derived,0.0) as LoanPaidInAdvance,\n\nifnull(laa.principal_overdue_derived, 0.0) as loanInArrearsAmount,\nif(ifnull(laa.principal_overdue_derived, 0.00) > 0, \'Yes\', \'No\') as inDefault,\n\nif(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0) as portfolioAtRisk\n\n from m_group pgm\n join m_office o on o.id = pgm.office_id\n and o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\n join m_loan l on l.group_id = pgm.id and l.client_id is not null\n left join m_currency cur on cur.code = l.currency_code\n join m_client c on c.id = l.client_id\n left join m_loan_arrears_aging laa on laa.loan_id = l.id\n left join m_loan_paid_in_advance lpa on lpa.loan_id = l.id\n where pgm.id = ${programId}\n and l.loan_status_id = 300\norder by c.display_name, l.account_no\n\n', 'List of Loans in a Program', 0, 0), + (96, 'GroupSummaryCounts', 'Table', NULL, NULL, ' +\n/*\nActive Client is a client linked to the \'group\' via m_group_client\nand with an active \'status_enum\'.)\nActive Borrowers - Borrower may be a client or a \'group\'\n*/ +\nselect x.* +\nfrom m_office o, +\nm_group g, +\n +\n(select a.activeClients, +\n(b.activeClientLoans + c.activeGroupLoans) as activeLoans, +\nb.activeClientLoans, c.activeGroupLoans, +\n(b.activeClientBorrowers + c.activeGroupBorrowers) as activeBorrowers, +\nb.activeClientBorrowers, c.activeGroupBorrowers, +\n(b.overdueClientLoans + c.overdueGroupLoans) as overdueLoans, +\nb.overdueClientLoans, c.overdueGroupLoans +\nfrom +\n(select count(*) as activeClients +\nfrom m_group topgroup +\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, +\'%\') +\njoin m_group_client gc on gc.group_id = g.id +\njoin m_client c on c.id = gc.client_id +\nwhere topgroup.id = +${groupId} +\nand c.status_enum = 300) a, +\n +\n(select count(*) as activeClientLoans, +\ncount(distinct(l.client_id)) as activeClientBorrowers, +\nifnull(sum(if(laa.loan_id is not null, 1, 0)), 0) as overdueClientLoans +\nfrom m_group topgroup +\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, +\'%\') +\njoin m_loan l on l.group_id = g.id and l.client_id is not null +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\nwhere topgroup.id = +${groupId} +\nand l.loan_status_id = 300) b, +\n +\n(select count(*) as activeGroupLoans, +\ncount(distinct(l.group_id)) as activeGroupBorrowers, +\nifnull(sum(if(laa.loan_id is not null, 1, 0)), 0) as overdueGroupLoans +\nfrom m_group topgroup +\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, +\'%\') +\njoin m_loan l on l.group_id = g.id and l.client_id is null +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\nwhere topgroup.id = +${groupId} +\nand l.loan_status_id = 300) c +\n) x +\n +\nwhere g.id = +${groupId} +\nand o.id = g.office_id +\nand o.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\n', 'Utility query for getting group summary count details for a group_id', 1, 0), + (97, 'GroupSummaryAmounts', 'Table', NULL, NULL, ' +\nselect ifnull(cur.display_symbol, l.currency_code) as currency, +\nifnull(sum(l.principal_disbursed_derived),0) as totalDisbursedAmount, +\nifnull(sum(l.principal_outstanding_derived),0) as totalLoanOutstandingAmount, +\ncount(laa.loan_id) as overdueLoans, ifnull(sum(laa.total_overdue_derived), 0) as totalLoanOverdueAmount +\nfrom m_group topgroup +\njoin m_office o on o.id = topgroup.office_id and o.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, +\'%\') +\njoin m_loan l on l.group_id = g.id +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\nleft join m_currency cur on cur.code = l.currency_code +\nwhere topgroup.id = +${groupId} +\nand l.disbursedon_date is not null +\ngroup by l.currency_code +\n', 'Utility query for getting group summary currency amount details for a group_id', 1, 0), + (106, 'TxnRunningBalances', 'Table', NULL, 'Transaction', ' +\nselect date( +\'${startDate}\') as +\'Transaction Date\', +\'Opening Balance\' as `Transaction Type`, null as Office, +\n null as +\'Loan Officer\', null as `Loan Account No`, null as `Loan Product`, null as `Currency`, +\n null as `Client Account No`, null as Client, +\n null as Amount, null as Principal, null as Interest, +\n@totalOutstandingPrincipal := +\nifnull(round(sum( +\n if (txn.transaction_type_enum = 1 /* disbursement */, +\n ifnull(txn.amount,0.00), +\n ifnull(txn.principal_portion_derived,0.00) * -1)) +\n ,2),0.00) as +\'Outstanding Principal\', +\n +\n@totalInterestIncome := +\nifnull(round(sum( +\n if (txn.transaction_type_enum in (2,5,8) /* repayment, repayment at disbursal, recovery repayment */, +\n ifnull(txn.interest_portion_derived,0.00), +\n 0)) +\n ,2),0.00) as +\'Interest Income\', +\n +\n@totalWriteOff := +\nifnull(round(sum( +\n if (txn.transaction_type_enum = 6 /* write-off */, +\n ifnull(txn.principal_portion_derived,0.00), +\n 0)) +\n ,2),0.00) as +\'Principal Write Off\' +\nfrom m_office o +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\n and ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\njoin m_client c on c.office_id = ounder.id +\njoin m_loan l on l.client_id = c.id +\njoin m_product_loan lp on lp.id = l.product_id +\njoin m_loan_transaction txn on txn.loan_id = l.id +\nleft join m_currency cur on cur.code = l.currency_code +\nwhere txn.is_reversed = false +\nand txn.transaction_type_enum not in (10,11) +\nand o.id = +${officeId} +\nand txn.transaction_date < date( +\'${startDate}\') +\n +\nunion all +\n +\nselect x.`Transaction Date`, x.`Transaction Type`, x.Office, x.`Loan Officer`, x.`Loan Account No`, x.`Loan Product`, x.`Currency`, +\n x.`Client Account No`, x.Client, x.Amount, x.Principal, x.Interest, +\ncast(round( +\n if (x.transaction_type_enum = 1 /* disbursement */, +\n @totalOutstandingPrincipal := @totalOutstandingPrincipal + x.`Amount`, +\n @totalOutstandingPrincipal := @totalOutstandingPrincipal - x.`Principal`) +\n ,2) as decimal(19,2)) as +\'Outstanding Principal\', +\ncast(round( +\n if (x.transaction_type_enum in (2,5,8) /* repayment, repayment at disbursal, recovery repayment */, +\n @totalInterestIncome := @totalInterestIncome + x.`Interest`, +\n @totalInterestIncome) +\n ,2) as decimal(19,2)) as +\'Interest Income\', +\ncast(round( +\n if (x.transaction_type_enum = 6 /* write-off */, +\n @totalWriteOff := @totalWriteOff + x.`Principal`, +\n @totalWriteOff) +\n ,2) as decimal(19,2)) as +\'Principal Write Off\' +\nfrom +\n(select txn.transaction_type_enum, txn.id as txn_id, txn.transaction_date as +\'Transaction Date\', +\ncast( +\n ifnull(re.enum_message_property, concat( +\'Unknown Transaction Type Value: \' , txn.transaction_type_enum)) +\n as char) as +\'Transaction Type\', +\nounder.`name` as Office, lo.display_name as +\'Loan Officer\', +\nl.account_no as +\'Loan Account No\', lp.`name` as +\'Loan Product\', +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\nc.account_no as +\'Client Account No\', c.display_name as +\'Client\', +\nifnull(txn.amount,0.00) as Amount, +\nifnull(txn.principal_portion_derived,0.00) as Principal, +\nifnull(txn.interest_portion_derived,0.00) as Interest +\nfrom m_office o +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\n and ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\njoin m_client c on c.office_id = ounder.id +\njoin m_loan l on l.client_id = c.id +\nleft join m_staff lo on lo.id = l.loan_officer_id +\njoin m_product_loan lp on lp.id = l.product_id +\njoin m_loan_transaction txn on txn.loan_id = l.id +\nleft join m_currency cur on cur.code = l.currency_code +\nleft join r_enum_value re on re.enum_name = +\'transaction_type_enum\' +\n and re.enum_id = txn.transaction_type_enum +\nwhere txn.is_reversed = false +\nand txn.transaction_type_enum not in (10,11) +\nand (ifnull(l.loan_officer_id, -10) = +\'${loanOfficerId}\' or +\'-1\' = +\'${loanOfficerId}\') +\nand o.id = +${officeId} +\nand txn.transaction_date >= date( +\'${startDate}\') +\nand txn.transaction_date <= date( +\'${endDate}\') +\norder by txn.transaction_date, txn.id) x +\n', 'Running Balance Txn report for Individual Lending. +\nSuitable for small MFI +\'s. Larger could use it using the branch or other parameters.\nBasically, suck it and see if its quick enough for you out-of-te box or whether it needs performance work in your situation.\n', 0, 0), + (107, 'FieldAgentStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_staff fa\njoin m_office o on o.id = fa.office_id\n and o.hierarchy like concat(\' +${currentUserHierarchy} +\', \'% +\')\njoin m_group pgm on pgm.staff_id = fa.id\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id\njoin m_client c on c.id = l.client_id\nwhere fa.id = ${staffId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Field Agent Statistics', 0, 0), + (108, 'FieldAgentPrograms', 'Table', NULL, 'Quipo', '\nselect pgm.id, pgm.display_name as `name`, sts.enum_message_property as status\n from m_group pgm\n join m_office o on o.id = pgm.office_id\n and o.hierarchy like concat(\' +${currentUserHierarchy} +\', \'% +\')\n left join r_enum_value sts on sts.enum_name = \'status_enum +\' and sts.enum_id = pgm.status_enum\n where pgm.staff_id = ${staffId}\n', 'List of Field Agent Programs', 0, 0), + (109, 'ProgramDetails', 'Table', NULL, 'Quipo', '\n select l.id as loanId, l.account_no as loanAccountNo, c.id as clientId, c.account_no as clientAccountNo,\n pgm.display_name as programName,\n\n(select count(*)\nfrom m_loan cy\nwhere cy.group_id = pgm.id and cy.client_id =c.id\nand cy.disbursedon_date <= l.disbursedon_date) as loanCycleNo,\n\nc.display_name as clientDisplayName,\n ifnull(cur.display_symbol, l.currency_code) as Currency,\nifnull(l.principal_repaid_derived,0.0) as loanRepaidAmount,\nifnull(l.principal_outstanding_derived, 0.0) as loanOutstandingAmount,\nifnull(lpa.principal_in_advance_derived,0.0) as LoanPaidInAdvance,\n\nifnull(laa.principal_overdue_derived, 0.0) as loanInArrearsAmount,\nif(ifnull(laa.principal_overdue_derived, 0.00) > 0, \'Yes +\', \'No +\') as inDefault,\n\nif(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0) as portfolioAtRisk\n\n from m_group pgm\n join m_office o on o.id = pgm.office_id\n and o.hierarchy like concat(\' +${currentUserHierarchy} +\', \'% +\')\n join m_loan l on l.group_id = pgm.id and l.client_id is not null\n left join m_currency cur on cur.code = l.currency_code\n join m_client c on c.id = l.client_id\n left join m_loan_arrears_aging laa on laa.loan_id = l.id\n left join m_loan_paid_in_advance lpa on lpa.loan_id = l.id\n where pgm.id = ${programId}\n and l.loan_status_id = 300\norder by c.display_name, l.account_no\n\n', 'List of Loans in a Program', 0, 0), (110, 'ChildrenStaffList', 'Table', NULL, 'Quipo', '\n select s.id, s.display_name,\ns.firstname, s.lastname, s.organisational_role_enum,\ns.organisational_role_parent_staff_id,\nsp.display_name as `organisational_role_parent_staff_display_name`\nfrom m_staff s\njoin m_staff sp on s.organisational_role_parent_staff_id = sp.id\nwhere s.organisational_role_parent_staff_id = ${staffId}\n', 'Get Next Level Down Staff', 0, 0), - (111, 'CoordinatorStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_staff coord\njoin m_staff fa on fa.organisational_role_parent_staff_id = coord.id\njoin m_office o on o.id = fa.office_id\n and o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_group pgm on pgm.staff_id = fa.id\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id\njoin m_client c on c.id = l.client_id\nwhere coord.id = ${staffId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Coordinator Statistics', 0, 0), - (112, 'BranchManagerStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_staff bm\njoin m_staff coord on coord.organisational_role_parent_staff_id = bm.id\njoin m_staff fa on fa.organisational_role_parent_staff_id = coord.id\njoin m_office o on o.id = fa.office_id\n and o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_group pgm on pgm.staff_id = fa.id\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id\njoin m_client c on c.id = l.client_id\nwhere bm.id = ${staffId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Branch Manager Statistics', 0, 0), - (113, 'ProgramDirectorStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_staff pd\njoin m_staff bm on bm.organisational_role_parent_staff_id = pd.id\njoin m_staff coord on coord.organisational_role_parent_staff_id = bm.id\njoin m_staff fa on fa.organisational_role_parent_staff_id = coord.id\njoin m_office o on o.id = fa.office_id\n and o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_group pgm on pgm.staff_id = fa.id\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id\njoin m_client c on c.id = l.client_id\nwhere pd.id = ${staffId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Program DirectorStatistics', 0, 0), - (114, 'ProgramStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_group pgm\njoin m_office o on o.id = pgm.office_id\n and o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id\njoin m_client c on c.id = l.client_id\nwhere pgm.id = ${programId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Program Statistics', 0, 0), - (115, 'ClientSummary ', 'Table', NULL, NULL, 'SELECT x.* FROM m_client c, m_office o, \n(\n SELECT a.loanCycle, a.activeLoans, b.lastLoanAmount, d.activeSavings, d.totalSavings FROM \n (SELECT IFNULL(MAX(l.loan_counter),0) AS loanCycle, COUNT(l.id) AS activeLoans FROM m_loan l WHERE l.loan_status_id=300 AND l.client_id=${clientId}) a, \n (SELECT count(l.id), IFNULL(l.principal_amount,0) AS \'lastLoanAmount\' FROM m_loan l WHERE l.client_id=${clientId} AND l.disbursedon_date = (SELECT IFNULL(MAX(disbursedon_date),NOW()) FROM m_loan where client_id=${clientId} and loan_status_id=300) group by l.principal_amount) b, \n (SELECT COUNT(s.id) AS \'activeSavings\', IFNULL(SUM(s.account_balance_derived),0) AS \'totalSavings\' FROM m_savings_account s WHERE s.status_enum=300 AND s.client_id=${clientId}) d\n) x\nWHERE c.id=${clientId} AND o.id = c.office_id AND o.hierarchy LIKE CONCAT(\'${currentUserHierarchy}\', \'%\')', 'Utility query for getting the client summary details', 1, 0), - (116, 'LoanCyclePerProduct', 'Table', NULL, NULL, 'SELECT lp.name AS \'productName\', MAX(l.loan_product_counter) AS \'loanProductCycle\' FROM m_loan l JOIN m_product_loan lp ON l.product_id=lp.id WHERE lp.include_in_borrower_cycle=1 AND l.loan_product_counter IS NOT NULL AND l.client_id=${clientId} GROUP BY l.product_id', 'Utility query for getting the client loan cycle details', 1, 0), - (117, 'GroupSavingSummary', 'Table', NULL, NULL, 'select ifnull(cur.display_symbol, sa.currency_code) as currency,\ncount(sa.id) as totalSavingAccounts, ifnull(sum(sa.account_balance_derived),0) as totalSavings\nfrom m_group topgroup\njoin m_office o on o.id = topgroup.office_id and o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, \'%\')\njoin m_savings_account sa on sa.group_id = g.id\nleft join m_currency cur on cur.code = sa.currency_code\nwhere topgroup.id = ${groupId}\nand sa.activatedon_date is not null\ngroup by sa.currency_code', 'Utility query for getting group or center saving summary details for a group_id', 1, 0), + (111, 'CoordinatorStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_staff coord\njoin m_staff fa on fa.organisational_role_parent_staff_id = coord.id\njoin m_office o on o.id = fa.office_id\n and o.hierarchy like concat(\' +${currentUserHierarchy} +\', \'% +\')\njoin m_group pgm on pgm.staff_id = fa.id\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id\njoin m_client c on c.id = l.client_id\nwhere coord.id = ${staffId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Coordinator Statistics', 0, 0), + (112, 'BranchManagerStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_staff bm\njoin m_staff coord on coord.organisational_role_parent_staff_id = bm.id\njoin m_staff fa on fa.organisational_role_parent_staff_id = coord.id\njoin m_office o on o.id = fa.office_id\n and o.hierarchy like concat(\' +${currentUserHierarchy} +\', \'% +\')\njoin m_group pgm on pgm.staff_id = fa.id\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id\njoin m_client c on c.id = l.client_id\nwhere bm.id = ${staffId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Branch Manager Statistics', 0, 0), + (113, 'ProgramDirectorStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_staff pd\njoin m_staff bm on bm.organisational_role_parent_staff_id = pd.id\njoin m_staff coord on coord.organisational_role_parent_staff_id = bm.id\njoin m_staff fa on fa.organisational_role_parent_staff_id = coord.id\njoin m_office o on o.id = fa.office_id\n and o.hierarchy like concat(\' +${currentUserHierarchy} +\', \'% +\')\njoin m_group pgm on pgm.staff_id = fa.id\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id\njoin m_client c on c.id = l.client_id\nwhere pd.id = ${staffId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Program DirectorStatistics', 0, 0), + (114, 'ProgramStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_group pgm\njoin m_office o on o.id = pgm.office_id\n and o.hierarchy like concat(\' +${currentUserHierarchy} +\', \'% +\')\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id\njoin m_client c on c.id = l.client_id\nwhere pgm.id = ${programId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Program Statistics', 0, 0), + (115, 'ClientSummary ', 'Table', NULL, NULL, 'SELECT x.* FROM m_client c, m_office o, \n(\n SELECT a.loanCycle, a.activeLoans, b.lastLoanAmount, d.activeSavings, d.totalSavings FROM \n (SELECT IFNULL(MAX(l.loan_counter),0) AS loanCycle, COUNT(l.id) AS activeLoans FROM m_loan l WHERE l.loan_status_id=300 AND l.client_id=${clientId}) a, \n (SELECT count(l.id), IFNULL(l.principal_amount,0) AS \'lastLoanAmount +\' FROM m_loan l WHERE l.client_id=${clientId} AND l.disbursedon_date = (SELECT IFNULL(MAX(disbursedon_date),NOW()) FROM m_loan where client_id=${clientId} and loan_status_id=300) group by l.principal_amount) b, \n (SELECT COUNT(s.id) AS \'activeSavings +\', IFNULL(SUM(s.account_balance_derived),0) AS \'totalSavings +\' FROM m_savings_account s WHERE s.status_enum=300 AND s.client_id=${clientId}) d\n) x\nWHERE c.id=${clientId} AND o.id = c.office_id AND o.hierarchy LIKE CONCAT(\' +${currentUserHierarchy} +\', \'% +\')', 'Utility query for getting the client summary details', 1, 0), + (116, 'LoanCyclePerProduct', 'Table', NULL, NULL, 'SELECT lp.name AS \'productName +\', MAX(l.loan_product_counter) AS \'loanProductCycle +\' FROM m_loan l JOIN m_product_loan lp ON l.product_id=lp.id WHERE lp.include_in_borrower_cycle=1 AND l.loan_product_counter IS NOT NULL AND l.client_id=${clientId} GROUP BY l.product_id', 'Utility query for getting the client loan cycle details', 1, 0), + (117, 'GroupSavingSummary', 'Table', NULL, NULL, 'select ifnull(cur.display_symbol, sa.currency_code) as currency,\ncount(sa.id) as totalSavingAccounts, ifnull(sum(sa.account_balance_derived),0) as totalSavings\nfrom m_group topgroup\njoin m_office o on o.id = topgroup.office_id and o.hierarchy like concat(\' +${currentUserHierarchy} +\', \'% +\')\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, \'% +\')\njoin m_savings_account sa on sa.group_id = g.id\nleft join m_currency cur on cur.code = sa.currency_code\nwhere topgroup.id = ${groupId}\nand sa.activatedon_date is not null\ngroup by sa.currency_code', 'Utility query for getting group or center saving summary details for a group_id', 1, 0), (118, 'Savings Transactions', 'Pentaho', NULL, 'Savings', NULL, NULL, 0, 1), (119, 'Client Savings Summary', 'Pentaho', NULL, 'Savings', NULL, NULL, 0, 1), (120, 'Active Loans - Details(Pentaho)', 'Pentaho', NULL, 'Loan', '(NULL)', '(NULL)', 1, 1), @@ -6293,476 +12485,599 @@ INSERT INTO `stretchy_report` (`id`, `report_name`, `report_type`, `report_subty (162, 'Balance Outstanding', 'Pentaho', NULL, 'Loans', NULL, NULL, 0, 1), (163, 'Collection Report', 'Pentaho', NULL, 'Loans', NULL, NULL, 0, 1), (164, 'Disbursal Report', 'Pentaho', NULL, 'Loans', NULL, NULL, 0, 1), - (165, 'Savings Accounts Dormancy Report', 'Table', NULL, 'Savings', 'select cl.display_name as \'Client Display Name\',\r\nsa.account_no as \'Account Number\',\r\ncl.mobile_no as \'Mobile Number\',\r\n@lastdate:=(select IFNULL(max(sat.transaction_date),sa.activatedon_date) \r\n from m_savings_account_transaction as sat \r\n where sat.is_reversed = 0 \r\n and sat.transaction_type_enum in (1,2) \r\n and sat.savings_account_id = sa.id) as \'Date of Last Activity\',\r\nDATEDIFF(now(), @lastdate) as \'Days Since Last Activity\'\r\nfrom m_savings_account as sa \r\ninner join m_savings_product as sp on (sa.product_id = sp.id and sp.is_dormancy_tracking_active = 1) \r\nleft join m_client as cl on sa.client_id = cl.id \r\nwhere sa.sub_status_enum = ${subStatus}\r\nand cl.office_id = ${officeId}', NULL, 1, 1), - (166, 'Active Clients', 'SMS', 'NonTriggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum\' AND r.enum_id = c.status_enum\r\nWHERE o.id = ${officeId} AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId})\r\nGROUP BY c.id\r\nORDER BY ounder.hierarchy, c.account_no', 'All clients with the status ‘Active’', 0, 1), - (167, 'Prospective Clients', 'SMS', 'NonTriggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum\' AND r.enum_id = c.status_enum\r\nLEFT JOIN m_loan l ON l.client_id = c.id\r\nWHERE o.id = ${officeId} AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND l.client_id IS NULL\r\nGROUP BY c.id\r\nORDER BY ounder.hierarchy, c.account_no', 'All clients with the status ‘Active’ who have never had a loan before', 0, 1), - (168, 'Active Loan Clients', 'SMS', 'NonTriggered', 'Clients', 'SELECT \r\nc.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", \r\nl.principal_amount AS "loanAmount", \r\n(IFNULL(l.principal_outstanding_derived, 0) + IFNULL(l.interest_outstanding_derived, 0) + IFNULL(l.fee_charges_outstanding_derived, 0) + IFNULL(l.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nl.principal_disbursed_derived AS "loanDisbursed",\r\nounder.id AS "officeNumber", \r\nl.account_no AS "loanAccountId", \r\ngua.lastname AS "guarantorLastName", COUNT(gua.id) AS "numberOfGuarantors",\r\ng.display_name AS "groupName"\r\n\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan l ON l.client_id = c.id\r\nJOIN m_product_loan pl ON pl.id = l.product_id\r\nLEFT JOIN m_group_client gc ON gc.client_id = c.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = l.loan_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = l.currency_code\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = l.id\r\nWHERE o.id = ${officeId} AND (IFNULL(l.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND l.loan_status_id = 300 AND (DATEDIFF(CURDATE(), l.disbursedon_date) BETWEEN ${cycleX} AND ${cycleY})\r\nGROUP BY l.id, gua.lastname, g.display_name\r\nORDER BY ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'All clients with an outstanding loan between cycleX and cycleY days', 0, 1), - (169, 'Loan in arrears', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nmc.id AS "id", \r\nmc.firstname AS "firstName",\r\nmc.middlename AS "middleName",\r\nmc.lastname AS "lastName",\r\nmc.display_name AS "fullName",\r\nmc.mobile_no AS "mobileNo", \r\nml.principal_amount AS "loanAmount", \r\n(IFNULL(ml.principal_outstanding_derived, 0) + IFNULL(ml.interest_outstanding_derived, 0) + IFNULL(ml.fee_charges_outstanding_derived, 0) + IFNULL(ml.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nml.principal_disbursed_derived AS "loanDisbursed",\r\nlaa.overdue_since_date_derived AS "paymentDueDate",\r\nIFNULL(laa.total_overdue_derived, 0) AS "totalDue",\r\nounder.id AS "officeNumber", \r\nml.account_no AS "loanAccountId", \r\ngua.lastname AS "guarantorLastName", \r\nCOUNT(gua.id) AS "numberOfGuarantors",\r\ng.display_name AS "groupName"\r\n\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\nINNER JOIN m_client mc ON mc.office_id=ounder.id\r\nINNER JOIN m_loan ml ON ml.client_id = mc.id\r\nINNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = \'loan_status_id\'\r\nINNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\nLEFT JOIN m_currency cur ON cur.code = ml.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = mc.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = ml.loan_officer_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = ml.id\r\nWHERE ml.loan_status_id=300 AND mo.id=${officeId} AND (IFNULL(ml.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND (DATEDIFF(CURDATE(), laa.overdue_since_date_derived) BETWEEN ${fromX} AND ${toY})\r\nGROUP BY ml.id, gua.lastname, g.display_name\r\nORDER BY ounder.hierarchy, ml.currency_code, mc.account_no, ml.account_no', 'All clients with an outstanding loan in arrears between fromX and toY days', 0, 1), + (165, 'Savings Accounts Dormancy Report', 'Table', NULL, 'Savings', 'select cl.display_name as \'Client Display Name +\',\r\nsa.account_no as \'Account Number +\',\r\ncl.mobile_no as \'Mobile Number +\',\r\n@lastdate:=(select IFNULL(max(sat.transaction_date),sa.activatedon_date) \r\n from m_savings_account_transaction as sat \r\n where sat.is_reversed = 0 \r\n and sat.transaction_type_enum in (1,2) \r\n and sat.savings_account_id = sa.id) as \'Date of Last Activity +\',\r\nDATEDIFF(now(), @lastdate) as \'Days Since Last Activity +\'\r\nfrom m_savings_account as sa \r\ninner join m_savings_product as sp on (sa.product_id = sp.id and sp.is_dormancy_tracking_active = 1) \r\nleft join m_client as cl on sa.client_id = cl.id \r\nwhere sa.sub_status_enum = ${subStatus}\r\nand cl.office_id = ${officeId}', NULL, 1, 1), + (166, 'Active Clients', 'SMS', 'NonTriggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'. +\', \' +\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum +\' AND r.enum_id = c.status_enum\r\nWHERE o.id = ${officeId} AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId})\r\nGROUP BY c.id\r\nORDER BY ounder.hierarchy, c.account_no', 'All clients with the status ‘Active’', 0, 1), + (167, 'Prospective Clients', 'SMS', 'NonTriggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'. +\', \' +\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum +\' AND r.enum_id = c.status_enum\r\nLEFT JOIN m_loan l ON l.client_id = c.id\r\nWHERE o.id = ${officeId} AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND l.client_id IS NULL\r\nGROUP BY c.id\r\nORDER BY ounder.hierarchy, c.account_no', 'All clients with the status ‘Active’ who have never had a loan before', 0, 1), + (168, 'Active Loan Clients', 'SMS', 'NonTriggered', 'Clients', 'SELECT \r\nc.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", \r\nl.principal_amount AS "loanAmount", \r\n(IFNULL(l.principal_outstanding_derived, 0) + IFNULL(l.interest_outstanding_derived, 0) + IFNULL(l.fee_charges_outstanding_derived, 0) + IFNULL(l.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nl.principal_disbursed_derived AS "loanDisbursed",\r\nounder.id AS "officeNumber", \r\nl.account_no AS "loanAccountId", \r\ngua.lastname AS "guarantorLastName", COUNT(gua.id) AS "numberOfGuarantors",\r\ng.display_name AS "groupName"\r\n\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan l ON l.client_id = c.id\r\nJOIN m_product_loan pl ON pl.id = l.product_id\r\nLEFT JOIN m_group_client gc ON gc.client_id = c.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = l.loan_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = l.currency_code\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = l.id\r\nWHERE o.id = ${officeId} AND (IFNULL(l.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND l.loan_status_id = 300 AND (DATEDIFF(CURDATE(), l.disbursedon_date) BETWEEN ${cycleX} AND ${cycleY})\r\nGROUP BY l.id, gua.lastname, g.display_name\r\nORDER BY ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'All clients with an outstanding loan between cycleX and cycleY days', 0, 1), + (169, 'Loan in arrears', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nmc.id AS "id", \r\nmc.firstname AS "firstName",\r\nmc.middlename AS "middleName",\r\nmc.lastname AS "lastName",\r\nmc.display_name AS "fullName",\r\nmc.mobile_no AS "mobileNo", \r\nml.principal_amount AS "loanAmount", \r\n(IFNULL(ml.principal_outstanding_derived, 0) + IFNULL(ml.interest_outstanding_derived, 0) + IFNULL(ml.fee_charges_outstanding_derived, 0) + IFNULL(ml.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nml.principal_disbursed_derived AS "loanDisbursed",\r\nlaa.overdue_since_date_derived AS "paymentDueDate",\r\nIFNULL(laa.total_overdue_derived, 0) AS "totalDue",\r\nounder.id AS "officeNumber", \r\nml.account_no AS "loanAccountId", \r\ngua.lastname AS "guarantorLastName", \r\nCOUNT(gua.id) AS "numberOfGuarantors",\r\ng.display_name AS "groupName"\r\n\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'% +\')\r\nINNER JOIN m_client mc ON mc.office_id=ounder.id\r\nINNER JOIN m_loan ml ON ml.client_id = mc.id\r\nINNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = \'loan_status_id +\'\r\nINNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\nLEFT JOIN m_currency cur ON cur.code = ml.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = mc.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = ml.loan_officer_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = ml.id\r\nWHERE ml.loan_status_id=300 AND mo.id=${officeId} AND (IFNULL(ml.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND (DATEDIFF(CURDATE(), laa.overdue_since_date_derived) BETWEEN ${fromX} AND ${toY})\r\nGROUP BY ml.id, gua.lastname, g.display_name\r\nORDER BY ounder.hierarchy, ml.currency_code, mc.account_no, ml.account_no', 'All clients with an outstanding loan in arrears between fromX and toY days', 0, 1), (170, 'Loan payments due', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\ncl.id AS "id", \r\ncl.firstname AS "firstName",\r\ncl.middlename AS "middleName",\r\ncl.lastname AS "lastName",\r\ncl.display_name AS "fullName",\r\ncl.mobile_no AS "mobileNo", \r\nl.principal_amount AS "loanAmount",\r\nof.id AS "officeNumber",\r\n(IFNULL(l.principal_outstanding_derived, 0) + IFNULL(l.interest_outstanding_derived, 0) + IFNULL(l.fee_charges_outstanding_derived, 0) + IFNULL(l.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nl.principal_disbursed_derived AS "loanDisbursed",\r\nls.duedate AS "paymentDueDate",\r\n(IFNULL(SUM(ls.principal_amount),0) - IFNULL(SUM(ls.principal_writtenoff_derived),0)\r\n + IFNULL(SUM(ls.interest_amount),0) - IFNULL(SUM(ls.interest_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.interest_waived_derived),0)\r\n + IFNULL(SUM(ls.fee_charges_amount),0) - IFNULL(SUM(ls.fee_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.fee_charges_waived_derived),0)\r\n + IFNULL(SUM(ls.penalty_charges_amount),0) - IFNULL(SUM(ls.penalty_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.penalty_charges_waived_derived),0)\r\n) AS "totalDue",\r\nlaa.total_overdue_derived AS "totalOverdue",\r\nl.account_no AS "loanAccountId",\r\ngua.lastname AS "guarantorLastName",\r\nCOUNT(gua.id) AS "numberOfGuarantors",\r\ngp.display_name AS "groupName"\r\n\r\nFROM m_office of\r\nLEFT JOIN m_client cl ON of.id = cl.office_id\r\nLEFT JOIN m_loan l ON cl.id = l.client_id\r\nLEFT JOIN m_group_client gc ON gc.client_id = cl.id\r\nLEFT JOIN m_group gp ON gp.id = l.group_id\r\nLEFT JOIN m_loan_repayment_schedule ls ON l.id = ls.loan_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = l.id\r\nINNER JOIN m_loan_arrears_aging laa ON laa.loan_id=l.id\r\nWHERE of.id = ${officeId} AND (IFNULL(l.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND (DATEDIFF(CURDATE(), ls.duedate) BETWEEN ${fromX} AND ${toY}) \r\nAND (of.hierarchy LIKE CONCAT((\r\nSELECT ino.hierarchy\r\nFROM m_office ino\r\nWHERE ino.id = ${officeId}),"%"))\r\nGROUP BY l.id, ls.duedate, gua.lastname\r\nORDER BY of.hierarchy, l.currency_code, cl.account_no, l.account_no', 'All clients with an unpaid installment due on their loan between fromX and toY days', 0, 1), - (171, 'Dormant Prospects', 'SMS', 'NonTriggered', 'Clients', 'SELECT c.id AS "id", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) AS "officeName", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", \r\no.id AS "officeNumber", \r\nTIMESTAMPDIFF(MONTH, c.activation_date, CURDATE()) AS "dormant"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum\' AND r.enum_id = c.status_enum\r\nLEFT JOIN m_loan l ON l.client_id = c.id\r\nWHERE o.id = ${officeId} AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND l.client_id IS NULL AND (TIMESTAMPDIFF(MONTH, c.activation_date, CURDATE()) > 3)\r\nGROUP BY c.id\r\nORDER BY ounder.hierarchy, c.account_no', 'All individuals who have not yet received a loan but were also entered into the system more than 3 months', 0, 1), - (172, 'Active group leaders', 'SMS', 'NonTriggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_group g ON g.office_id = ounder.id\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN m_group_client gc ON gc.group_id = g.id AND gc.client_id = c.id\r\nLEFT JOIN m_group_roles gr ON gr.group_id = g.id AND gr.client_id = c.id\r\nLEFT JOIN m_staff ms ON ms.id = c.staff_id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum\' AND r.enum_id = c.status_enum\r\nLEFT JOIN m_code_value cv ON cv.id = gr.role_cv_id\r\nLEFT JOIN m_code code ON code.id = cv.code_id\r\nWHERE o.id = ${officeId} AND g.status_enum = 300 AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND code.code_name = \'GROUPROLE\' AND cv.code_value = \'Leader\'\r\nGROUP BY c.id\r\nORDER BY ounder.hierarchy, c.account_no', 'All active group chairmen', 0, 1), - (173, 'Loan payments due (Overdue Loans)', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nmc.id AS "id", \r\nmc.firstname AS "firstName",\r\nmc.middlename AS "middleName",\r\nmc.lastname AS "lastName",\r\nmc.display_name AS "fullName",\r\nmc.mobile_no AS "mobileNo", \r\nml.principal_amount AS "loanAmount", \r\n(IFNULL(ml.principal_outstanding_derived, 0) + IFNULL(ml.interest_outstanding_derived, 0) + IFNULL(ml.fee_charges_outstanding_derived, 0) + IFNULL(ml.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nml.principal_disbursed_derived AS "loanDisbursed",\r\nlaa.overdue_since_date_derived AS "paymentDueDate",\r\n(IFNULL(SUM(ls.principal_amount),0) - IFNULL(SUM(ls.principal_writtenoff_derived),0)\r\n + IFNULL(SUM(ls.interest_amount),0) - IFNULL(SUM(ls.interest_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.interest_waived_derived),0)\r\n + IFNULL(SUM(ls.fee_charges_amount),0) - IFNULL(SUM(ls.fee_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.fee_charges_waived_derived),0)\r\n + IFNULL(SUM(ls.penalty_charges_amount),0) - IFNULL(SUM(ls.penalty_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.penalty_charges_waived_derived),0)\r\n) AS "totalDue",\r\nlaa.total_overdue_derived AS "totalOverdue",\r\nounder.id AS "officeNumber", \r\nml.account_no AS "loanAccountId", \r\ngua.lastname AS "guarantorLastName", \r\nCOUNT(gua.id) AS "numberOfGuarantors",\r\ng.display_name AS "groupName"\r\n\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\nINNER JOIN m_client mc ON mc.office_id=ounder.id\r\nINNER JOIN m_loan ml ON ml.client_id = mc.id\r\nINNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = \'loan_status_id\'\r\nINNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\nLEFT JOIN m_loan_repayment_schedule ls ON ls.loan_id = ml.id\r\nLEFT JOIN m_currency cur ON cur.code = ml.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = mc.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = ml.loan_officer_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = ml.id\r\nWHERE ml.loan_status_id=300 AND mo.id=${officeId} AND (IFNULL(ml.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) \r\nAND (DATEDIFF(CURDATE(), ls.duedate) BETWEEN ${fromX} AND ${toY})\r\nAND (DATEDIFF(CURDATE(), laa.overdue_since_date_derived) BETWEEN ${overdueX} AND ${overdueY})\r\nGROUP BY ml.id, gua.lastname, g.display_name\r\nORDER BY ounder.hierarchy, ml.currency_code, mc.account_no, ml.account_no', 'Loan Payments Due between fromX to toY days for clients in arrears between overdueX and overdueY days', 0, 1), - (174, 'Loan payments received (Active Loans)', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nmc.id AS "id", \r\nmc.firstname AS "firstName",\r\nmc.middlename AS "middleName",\r\nmc.lastname AS "lastName",\r\nmc.display_name AS "fullName",\r\nmc.mobile_no AS "mobileNo", \r\nml.principal_amount AS "loanAmount", \r\n(IFNULL(ml.principal_outstanding_derived, 0) + IFNULL(ml.interest_outstanding_derived, 0) + IFNULL(ml.fee_charges_outstanding_derived, 0) + IFNULL(ml.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nounder.id AS "officeNumber", \r\nml.account_no AS "loanAccountNumber",\r\nSUM(lt.amount) AS "repaymentAmount"\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\nINNER JOIN m_client mc ON mc.office_id=ounder.id\r\nINNER JOIN m_loan ml ON ml.client_id = mc.id\r\nINNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = \'loan_status_id\'\r\nINNER JOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nINNER JOIN m_appuser au ON au.id = lt.appuser_id\r\nLEFT JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\nLEFT JOIN m_payment_detail mpd ON mpd.id=lt.payment_detail_id\r\nLEFT JOIN m_currency cur ON cur.code = ml.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = mc.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = ml.loan_officer_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = ml.id\r\nWHERE ml.loan_status_id=300 AND mo.id=${officeId} AND (IFNULL(ml.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND (DATEDIFF(CURDATE(), lt.transaction_date) BETWEEN ${fromX} AND ${toY}) AND lt.is_reversed=0 AND lt.transaction_type_enum=2 AND laa.loan_id IS NULL\r\nGROUP BY ml.id\r\nORDER BY ounder.hierarchy, ml.currency_code, mc.account_no, ml.account_no', 'Payments received in the last fromX to toY days for any loan with the status Active (on-time)', 0, 1), - (175, 'Loan payments received (Overdue Loans)', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nml.id AS "loanId", \r\nmc.id AS "id", \r\nmc.firstname AS "firstName",\r\nmc.middlename AS "middleName",\r\nmc.lastname AS "lastName",\r\nmc.display_name AS "fullName",\r\nmc.mobile_no AS "mobileNo", \r\nml.principal_amount AS "loanAmount", \r\n(IFNULL(ml.principal_outstanding_derived, 0) + IFNULL(ml.interest_outstanding_derived, 0) + IFNULL(ml.fee_charges_outstanding_derived, 0) + IFNULL(ml.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nounder.id AS "officeNumber", \r\nml.account_no AS "loanAccountNumber",\r\nSUM(lt.amount) AS "repaymentAmount"\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\nINNER JOIN m_client mc ON mc.office_id=ounder.id\r\nINNER JOIN m_loan ml ON ml.client_id = mc.id\r\nINNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = \'loan_status_id\'\r\nINNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\nINNER JOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nINNER JOIN m_appuser au ON au.id = lt.appuser_id\r\nLEFT JOIN m_payment_detail mpd ON mpd.id=lt.payment_detail_id\r\nLEFT JOIN m_currency cur ON cur.code = ml.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = mc.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = ml.loan_officer_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = ml.id\r\nWHERE ml.loan_status_id=300 AND mo.id=${officeId} AND (IFNULL(ml.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND (DATEDIFF(CURDATE(), lt.transaction_date) BETWEEN ${fromX} AND ${toY}) AND (DATEDIFF(CURDATE(), laa.overdue_since_date_derived) BETWEEN ${overdueX} AND ${overdueY}) AND lt.is_reversed=0 AND lt.transaction_type_enum=2\r\nGROUP BY ml.id\r\nORDER BY ounder.hierarchy, ml.currency_code, mc.account_no, ml.account_no', 'Payments received in the last fromX to toY days for any loan with the status Overdue (arrears) between overdueX and overdueY days', 0, 1), - (176, 'Happy Birthday', 'SMS', 'NonTriggered', 'Clients', 'SELECT \r\nc.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber", \r\nc.date_of_birth AS "dateOfBirth",\r\nIF(c.date_of_birth IS NULL, 0, CEIL(DATEDIFF (NOW(), c.date_of_birth)/365)) AS "age"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum\' AND r.enum_id = c.status_enum\r\nLEFT JOIN m_staff ms ON ms.id = c.staff_id\r\nWHERE o.id = ${officeId} AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND c.date_of_birth IS NOT NULL AND (DAY(c.date_of_birth)=DAY(NOW())) AND (MONTH(c.date_of_birth)=MONTH(NOW()))\r\nORDER BY ounder.hierarchy, c.account_no', 'This sends a message to all clients with the status Active on their Birthday', 0, 1), - (177, 'Loan fully repaid', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nc.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", \r\nl.principal_amount AS "loanAmount",\r\n(IFNULL(l.principal_outstanding_derived, 0) + IFNULL(l.interest_outstanding_derived, 0) + IFNULL(l.fee_charges_outstanding_derived, 0) + IFNULL(l.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nl.principal_disbursed_derived AS "loanDisbursed",\r\no.id AS "officeNumber",\r\nl.account_no AS "loanAccountId",\r\ngua.lastname AS "guarantorLastName", COUNT(gua.id) AS "numberOfGuarantors",\r\nls.duedate AS "dueDate",\r\nlaa.total_overdue_derived AS "totalDue",\r\ngp.display_name AS "groupName",\r\nl.total_repayment_derived AS "totalFullyPaid"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan l ON l.client_id = c.id\r\nLEFT JOIN m_staff lo ON lo.id = l.loan_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = l.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = c.id\r\nLEFT JOIN m_group gp ON gp.id = l.group_id\r\nLEFT JOIN m_loan_repayment_schedule ls ON l.id = ls.loan_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = l.id\r\nLEFT JOIN m_loan_arrears_aging laa ON laa.loan_id=l.id\r\nWHERE o.id = ${officeId} AND (IFNULL(l.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND \r\n(DATEDIFF(CURDATE(), l.closedon_date) BETWEEN ${fromX} AND ${toY})\r\n AND (l.loan_status_id IN (600, 700))\r\nGROUP BY l.id, gua.lastname, ls.duedate\r\nORDER BY ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'All loans that have been fully repaid (Closed or Overpaid) in the last fromX to toY days', 0, 1), - (178, 'Loan outstanding after final instalment date', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nc.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", \r\nl.principal_amount AS "loanAmount",\r\no.id AS "officeNumber",\r\n(IFNULL(l.principal_outstanding_derived, 0) + IFNULL(l.interest_outstanding_derived, 0) + IFNULL(l.fee_charges_outstanding_derived, 0) + IFNULL(l.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nl.principal_disbursed_derived AS "loanDisbursed",\r\nls.duedate AS "paymentDueDate",\r\n(IFNULL(SUM(ls.principal_amount),0) - IFNULL(SUM(ls.principal_writtenoff_derived),0)\r\n + IFNULL(SUM(ls.interest_amount),0) - IFNULL(SUM(ls.interest_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.interest_waived_derived),0)\r\n + IFNULL(SUM(ls.fee_charges_amount),0) - IFNULL(SUM(ls.fee_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.fee_charges_waived_derived),0)\r\n + IFNULL(SUM(ls.penalty_charges_amount),0) - IFNULL(SUM(ls.penalty_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.penalty_charges_waived_derived),0)\r\n) AS "totalDue",\r\nlaa.total_overdue_derived AS "totalOverdue",\r\nl.account_no AS "loanAccountId",\r\ngua.lastname AS "guarantorLastName",\r\nCOUNT(gua.id) AS "numberOfGuarantors",\r\ngp.display_name AS "groupName"\r\n\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan l ON l.client_id = c.id\r\nLEFT JOIN m_staff lo ON lo.id = l.loan_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = l.currency_code\r\nLEFT JOIN m_loan_arrears_aging laa ON laa.loan_id = l.id\r\nLEFT JOIN m_group_client gc ON gc.client_id = c.id\r\nLEFT JOIN m_group gp ON gp.id = l.group_id\r\nLEFT JOIN m_loan_repayment_schedule ls ON l.id = ls.loan_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = l.id\r\nWHERE o.id = ${officeId} AND (IFNULL(l.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND l.loan_status_id = 300 AND l.expected_maturedon_date < CURDATE() \r\nAND (DATEDIFF(CURDATE(), l.expected_maturedon_date) BETWEEN ${fromX} AND ${toY})\r\nGROUP BY l.id, ls.duedate, gua.lastname\r\nORDER BY ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'All active loans (with an outstanding balance) between fromX to toY days after the final instalment date on their loan schedule', 0, 1), - (179, 'Loan Repayment', 'SMS', 'Triggered', NULL, 'select ml.id as loanId,mc.id, mc.firstname, ifnull(mc.middlename,\'\') as middlename, mc.lastname, mc.display_name as FullName, mobile_no as mobileNo, mc.group_name as GroupName, round(ml.principal_amount, ml.currency_digits) as LoanAmount, round(ml.`total_outstanding_derived`, ml.currency_digits) as LoanOutstanding,\nml.`account_no` as LoanAccountId, round(mlt.amountPaid, ml.currency_digits) as repaymentAmount\nFROM m_office mo\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\nAND ounder.hierarchy like CONCAT(\'.\', \'%\')\nLEFT JOIN (\n select \n ml.id as loanId, \n ifnull(mc.id,mc2.id) as id, \n ifnull(mc.firstname,mc2.firstname) as firstname, \n ifnull(mc.middlename,ifnull(mc2.middlename,(\'\'))) as middlename, \n ifnull(mc.lastname,mc2.lastname) as lastname, \n ifnull(mc.display_name,mc2.display_name) as display_name, \n ifnull(mc.status_enum,mc2.status_enum) as status_enum,\n ifnull(mc.mobile_no,mc2.mobile_no) as mobile_no,\n ifnull(mg.office_id,mc2.office_id) as office_id,\n ifnull(mg.staff_id,mc2.staff_id) as staff_id,\n mg.id as group_id, \nmg.display_name as group_name\n from\n m_loan ml\n left join m_group mg on mg.id = ml.group_id\n left join m_group_client mgc on mgc.group_id = mg.id\n left join m_client mc on mc.id = mgc.client_id\n left join m_client mc2 on mc2.id = ml.client_id\n order by loanId\n ) mc on mc.office_id = ounder.id\nright join m_loan as ml on mc.loanId = ml.id\nright join(\nselect mlt.amount as amountPaid,mlt.id,mlt.loan_id\nfrom m_loan_transaction mlt\nwhere mlt.is_reversed = 0 \ngroup by mlt.loan_id, mlt.amount, mlt.id\n) as mlt on mlt.loan_id = ml.id\nright join m_loan_repayment_schedule as mls1 on ml.id = mls1.loan_id and mls1.`completed_derived` = 0\nand mls1.installment = (SELECT MIN(installment) from m_loan_repayment_schedule where loan_id = ml.id and duedate <= CURDATE() and completed_derived=0)\nwhere mc.status_enum = 300 and mobile_no is not null and ml.`loan_status_id` = 300\nand (mo.id = ${officeId} or ${officeId} = -1)\nand (mc.staff_id = ${loanOfficerId} or ${loanOfficerId} = -1)\nand (ml.loan_type_enum = ${loanType} or ${loanType} = -1)\nand ml.id in (select mla.loan_id from m_loan_arrears_aging mla)\ngroup by ml.id, mc.id, mc.firstname, mc.middlename, mc.lastname, mc.display_name, mc.mobile_no, mlt.amountPaid', 'Loan Repayment', 0, 0), - (180, 'Loan Approved', 'SMS', 'Triggered', NULL, 'SELECT mc.id, mc.firstname, mc.middlename as middlename, mc.lastname, mc.display_name as FullName, mc.mobile_no as mobileNo, mc.group_name as GroupName, mo.name as officename, ml.id as loanId, ml.account_no as accountnumber, ml.principal_amount_proposed as loanamount, ml.annual_nominal_interest_rate as annualinterestrate FROM m_office mo JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\') AND ounder.hierarchy like CONCAT(\'.\', \'%\') LEFT JOIN ( select ml.id as loanId, ifnull(mc.id,mc2.id) as id, ifnull(mc.firstname,mc2.firstname) as firstname, ifnull(mc.middlename,ifnull(mc2.middlename,(\'\'))) as middlename, ifnull(mc.lastname,mc2.lastname) as lastname, ifnull(mc.display_name,mc2.display_name) as display_name, ifnull(mc.status_enum,mc2.status_enum) as status_enum, ifnull(mc.mobile_no,mc2.mobile_no) as mobile_no, ifnull(mg.office_id,mc2.office_id) as office_id, ifnull(mg.staff_id,mc2.staff_id) as staff_id, mg.id as group_id, mg.display_name as group_name from m_loan ml left join m_group mg on mg.id = ml.group_id left join m_group_client mgc on mgc.group_id = mg.id left join m_client mc on mc.id = mgc.client_id left join m_client mc2 on mc2.id = ml.client_id order by loanId ) mc on mc.office_id = ounder.id left join m_loan ml on ml.id = mc.loanId WHERE mc.status_enum = 300 and mc.mobile_no is not null and (mo.id = ${officeId} or ${officeId} = -1) and (mc.staff_id = ${loanOfficerId} or ${loanOfficerId} = -1)and (ml.id = ${loanId} or ${loanId} = -1)and (mc.id = ${clientId} or ${clientId} = -1)and (mc.group_id = ${groupId} or ${groupId} = -1)and (ml.loan_type_enum = ${loanType} or ${loanType} = -1)', 'Loan and client data of approved loan', 0, 0), - (181, 'Loan Rejected', 'SMS', 'Triggered', NULL, 'SELECT mc.id, mc.firstname, mc.middlename as middlename, mc.lastname, mc.display_name as FullName, mc.mobile_no as mobileNo, mc.group_name as GroupName, mo.name as officename, ml.id as loanId, ml.account_no as accountnumber, ml.principal_amount_proposed as loanamount, ml.annual_nominal_interest_rate as annualinterestrate FROM m_office mo JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\') AND ounder.hierarchy like CONCAT(\'.\', \'%\') LEFT JOIN ( select ml.id as loanId, ifnull(mc.id,mc2.id) as id, ifnull(mc.firstname,mc2.firstname) as firstname, ifnull(mc.middlename,ifnull(mc2.middlename,(\'\'))) as middlename, ifnull(mc.lastname,mc2.lastname) as lastname, ifnull(mc.display_name,mc2.display_name) as display_name, ifnull(mc.status_enum,mc2.status_enum) as status_enum, ifnull(mc.mobile_no,mc2.mobile_no) as mobile_no, ifnull(mg.office_id,mc2.office_id) as office_id, ifnull(mg.staff_id,mc2.staff_id) as staff_id, mg.id as group_id, mg.display_name as group_name from m_loan ml left join m_group mg on mg.id = ml.group_id left join m_group_client mgc on mgc.group_id = mg.id left join m_client mc on mc.id = mgc.client_id left join m_client mc2 on mc2.id = ml.client_id order by loanId ) mc on mc.office_id = ounder.id left join m_loan ml on ml.id = mc.loanId WHERE mc.status_enum = 300 and mc.mobile_no is not null and (mo.id = ${officeId} or ${officeId} = -1) and (mc.staff_id = ${loanOfficerId} or ${loanOfficerId} = -1) and (ml.id = ${loanId} or ${loanId} = -1) and (mc.id = ${clientId} or ${clientId} = -1) and (mc.group_id = ${groupId} or ${groupId} = -1) and (ml.loan_type_enum = ${loanType} or ${loanType} = -1)', 'Loan and client data of rejected loan', 0, 0), - (182, 'Client Rejected', 'SMS', 'Triggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum\' AND r.enum_id = c.status_enum\r\nWHERE o.id = ${officeId} AND c.id = ${clientId} AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId})', 'Client Rejection', 0, 1), - (183, 'Client Activated', 'SMS', 'Triggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum\' AND r.enum_id = c.status_enum\r\nWHERE o.id = ${officeId} AND c.id = ${clientId} AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId})', 'Client Activation', 0, 1), - (184, 'Savings Rejected', 'SMS', 'Triggered', 'Savings', 'SELECT \r\nc.id AS "id",\r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo",\r\ns.account_no AS "savingsAccountNo",\r\nounder.id AS "officeNumber",\r\nounder.name AS "officeName"\r\n\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_savings_account s ON s.client_id = c.id\r\nJOIN m_savings_product sp ON sp.id = s.product_id\r\nLEFT JOIN m_staff st ON st.id = s.field_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = s.currency_code\r\nWHERE o.id = ${officeId} AND (IFNULL(s.field_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND s.id = ${savingsId}', 'Savings Rejected', 0, 1), - (185, 'Savings Activated', 'SMS', 'Triggered', 'Savings', 'SELECT \r\nc.id AS "id",\r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo",\r\ns.account_no AS "savingsAccountNo",\r\nounder.id AS "officeNumber",\r\nounder.name AS "officeName"\r\n\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_savings_account s ON s.client_id = c.id\r\nJOIN m_savings_product sp ON sp.id = s.product_id\r\nLEFT JOIN m_staff st ON st.id = s.field_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = s.currency_code\r\nWHERE o.id = ${officeId} AND (IFNULL(s.field_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND s.id = ${savingsId}', 'Savings Activation', 0, 1), - (186, 'Savings Deposit', 'SMS', 'Triggered', NULL, 'SELECT sc.savingsId AS savingsId, sc.id AS clientId, sc.firstname, IFNULL(sc.middlename,\'\') AS middlename, sc.lastname, sc.display_name AS FullName, sc.mobile_no AS mobileNo,\r\nms.`account_no` AS savingsAccountNo, ROUND(mst.amountPaid, ms.currency_digits) AS depositAmount, ms.account_balance_derived AS balance, \r\nmst.transactionDate AS transactionDate\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\') AND ounder.hierarchy LIKE CONCAT(\'.\', \'%\')\r\nLEFT JOIN (\r\nSELECT \r\n sa.id AS savingsId, mc.id AS id, mc.firstname AS firstname, mc.middlename AS middlename, mc.lastname AS lastname, \r\n mc.display_name AS display_name, mc.status_enum AS status_enum, \r\n mc.mobile_no AS mobile_no, mc.office_id AS office_id, \r\n mc.staff_id AS staff_id\r\nFROM\r\nm_savings_account sa\r\nLEFT JOIN m_client mc ON mc.id = sa.client_id\r\nORDER BY savingsId) sc ON sc.office_id = ounder.id\r\nRIGHT JOIN m_savings_account AS ms ON sc.savingsId = ms.id\r\nRIGHT JOIN(\r\nSELECT st.amount AS amountPaid, st.id, st.savings_account_id, st.id AS savingsTransactionId, st.transaction_date AS transactionDate\r\nFROM m_savings_account_transaction st\r\nWHERE st.is_reversed = 0\r\nGROUP BY st.savings_account_id, st.amount, st.id\r\n) AS mst ON mst.savings_account_id = ms.id\r\nWHERE sc.mobile_no IS NOT NULL AND (mo.id = ${officeId} OR ${officeId} = -1) AND (sc.staff_id = ${loanOfficerId} OR ${loanOfficerId} = -1) AND mst.savingsTransactionId = ${savingsTransactionId}', 'Savings Deposit', 0, 1), - (187, 'Savings Withdrawal', 'SMS', 'Triggered', NULL, 'SELECT sc.savingsId AS savingsId, sc.id AS clientId, sc.firstname, IFNULL(sc.middlename,\'\') AS middlename, sc.lastname, sc.display_name AS FullName, sc.mobile_no AS mobileNo,\r\nms.`account_no` AS savingsAccountNo, ROUND(mst.amountPaid, ms.currency_digits) AS withdrawAmount, ms.account_balance_derived AS balance, \r\nmst.transactionDate AS transactionDate\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\') AND ounder.hierarchy LIKE CONCAT(\'.\', \'%\')\r\nLEFT JOIN (\r\nSELECT \r\n sa.id AS savingsId, mc.id AS id, mc.firstname AS firstname, mc.middlename AS middlename, mc.lastname AS lastname, \r\n mc.display_name AS display_name, mc.status_enum AS status_enum, \r\n mc.mobile_no AS mobile_no, mc.office_id AS office_id, \r\n mc.staff_id AS staff_id\r\nFROM\r\nm_savings_account sa\r\nLEFT JOIN m_client mc ON mc.id = sa.client_id\r\nORDER BY savingsId) sc ON sc.office_id = ounder.id\r\nRIGHT JOIN m_savings_account AS ms ON sc.savingsId = ms.id\r\nRIGHT JOIN(\r\nSELECT st.amount AS amountPaid, st.id, st.savings_account_id, st.id AS savingsTransactionId, st.transaction_date AS transactionDate\r\nFROM m_savings_account_transaction st\r\nWHERE st.is_reversed = 0\r\nGROUP BY st.savings_account_id, st.amount, st.id\r\n) AS mst ON mst.savings_account_id = ms.id\r\nWHERE sc.mobile_no IS NOT NULL AND (mo.id = ${officeId} OR ${officeId} = -1) AND (sc.staff_id = ${loanOfficerId} OR ${loanOfficerId} = -1) AND mst.savingsTransactionId = ${savingsTransactionId}', 'Savings Withdrawal', 0, 1); + (171, 'Dormant Prospects', 'SMS', 'NonTriggered', 'Clients', 'SELECT c.id AS "id", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'. +\', \' +\')) - 1))), ounder.`name`) AS "officeName", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", \r\no.id AS "officeNumber", \r\nTIMESTAMPDIFF(MONTH, c.activation_date, CURDATE()) AS "dormant"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum +\' AND r.enum_id = c.status_enum\r\nLEFT JOIN m_loan l ON l.client_id = c.id\r\nWHERE o.id = ${officeId} AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND l.client_id IS NULL AND (TIMESTAMPDIFF(MONTH, c.activation_date, CURDATE()) > 3)\r\nGROUP BY c.id\r\nORDER BY ounder.hierarchy, c.account_no', 'All individuals who have not yet received a loan but were also entered into the system more than 3 months', 0, 1), + (172, 'Active group leaders', 'SMS', 'NonTriggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'. +\', \' +\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_group g ON g.office_id = ounder.id\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN m_group_client gc ON gc.group_id = g.id AND gc.client_id = c.id\r\nLEFT JOIN m_group_roles gr ON gr.group_id = g.id AND gr.client_id = c.id\r\nLEFT JOIN m_staff ms ON ms.id = c.staff_id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum +\' AND r.enum_id = c.status_enum\r\nLEFT JOIN m_code_value cv ON cv.id = gr.role_cv_id\r\nLEFT JOIN m_code code ON code.id = cv.code_id\r\nWHERE o.id = ${officeId} AND g.status_enum = 300 AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND code.code_name = \'GROUPROLE +\' AND cv.code_value = \'Leader +\'\r\nGROUP BY c.id\r\nORDER BY ounder.hierarchy, c.account_no', 'All active group chairmen', 0, 1), + (173, 'Loan payments due (Overdue Loans)', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nmc.id AS "id", \r\nmc.firstname AS "firstName",\r\nmc.middlename AS "middleName",\r\nmc.lastname AS "lastName",\r\nmc.display_name AS "fullName",\r\nmc.mobile_no AS "mobileNo", \r\nml.principal_amount AS "loanAmount", \r\n(IFNULL(ml.principal_outstanding_derived, 0) + IFNULL(ml.interest_outstanding_derived, 0) + IFNULL(ml.fee_charges_outstanding_derived, 0) + IFNULL(ml.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nml.principal_disbursed_derived AS "loanDisbursed",\r\nlaa.overdue_since_date_derived AS "paymentDueDate",\r\n(IFNULL(SUM(ls.principal_amount),0) - IFNULL(SUM(ls.principal_writtenoff_derived),0)\r\n + IFNULL(SUM(ls.interest_amount),0) - IFNULL(SUM(ls.interest_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.interest_waived_derived),0)\r\n + IFNULL(SUM(ls.fee_charges_amount),0) - IFNULL(SUM(ls.fee_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.fee_charges_waived_derived),0)\r\n + IFNULL(SUM(ls.penalty_charges_amount),0) - IFNULL(SUM(ls.penalty_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.penalty_charges_waived_derived),0)\r\n) AS "totalDue",\r\nlaa.total_overdue_derived AS "totalOverdue",\r\nounder.id AS "officeNumber", \r\nml.account_no AS "loanAccountId", \r\ngua.lastname AS "guarantorLastName", \r\nCOUNT(gua.id) AS "numberOfGuarantors",\r\ng.display_name AS "groupName"\r\n\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'% +\')\r\nINNER JOIN m_client mc ON mc.office_id=ounder.id\r\nINNER JOIN m_loan ml ON ml.client_id = mc.id\r\nINNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = \'loan_status_id +\'\r\nINNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\nLEFT JOIN m_loan_repayment_schedule ls ON ls.loan_id = ml.id\r\nLEFT JOIN m_currency cur ON cur.code = ml.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = mc.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = ml.loan_officer_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = ml.id\r\nWHERE ml.loan_status_id=300 AND mo.id=${officeId} AND (IFNULL(ml.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) \r\nAND (DATEDIFF(CURDATE(), ls.duedate) BETWEEN ${fromX} AND ${toY})\r\nAND (DATEDIFF(CURDATE(), laa.overdue_since_date_derived) BETWEEN ${overdueX} AND ${overdueY})\r\nGROUP BY ml.id, gua.lastname, g.display_name\r\nORDER BY ounder.hierarchy, ml.currency_code, mc.account_no, ml.account_no', 'Loan Payments Due between fromX to toY days for clients in arrears between overdueX and overdueY days', 0, 1), + (174, 'Loan payments received (Active Loans)', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nmc.id AS "id", \r\nmc.firstname AS "firstName",\r\nmc.middlename AS "middleName",\r\nmc.lastname AS "lastName",\r\nmc.display_name AS "fullName",\r\nmc.mobile_no AS "mobileNo", \r\nml.principal_amount AS "loanAmount", \r\n(IFNULL(ml.principal_outstanding_derived, 0) + IFNULL(ml.interest_outstanding_derived, 0) + IFNULL(ml.fee_charges_outstanding_derived, 0) + IFNULL(ml.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nounder.id AS "officeNumber", \r\nml.account_no AS "loanAccountNumber",\r\nSUM(lt.amount) AS "repaymentAmount"\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'% +\')\r\nINNER JOIN m_client mc ON mc.office_id=ounder.id\r\nINNER JOIN m_loan ml ON ml.client_id = mc.id\r\nINNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = \'loan_status_id +\'\r\nINNER JOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nINNER JOIN m_appuser au ON au.id = lt.appuser_id\r\nLEFT JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\nLEFT JOIN m_payment_detail mpd ON mpd.id=lt.payment_detail_id\r\nLEFT JOIN m_currency cur ON cur.code = ml.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = mc.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = ml.loan_officer_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = ml.id\r\nWHERE ml.loan_status_id=300 AND mo.id=${officeId} AND (IFNULL(ml.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND (DATEDIFF(CURDATE(), lt.transaction_date) BETWEEN ${fromX} AND ${toY}) AND lt.is_reversed=0 AND lt.transaction_type_enum=2 AND laa.loan_id IS NULL\r\nGROUP BY ml.id\r\nORDER BY ounder.hierarchy, ml.currency_code, mc.account_no, ml.account_no', 'Payments received in the last fromX to toY days for any loan with the status Active (on-time)', 0, 1), + (175, 'Loan payments received (Overdue Loans)', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nml.id AS "loanId", \r\nmc.id AS "id", \r\nmc.firstname AS "firstName",\r\nmc.middlename AS "middleName",\r\nmc.lastname AS "lastName",\r\nmc.display_name AS "fullName",\r\nmc.mobile_no AS "mobileNo", \r\nml.principal_amount AS "loanAmount", \r\n(IFNULL(ml.principal_outstanding_derived, 0) + IFNULL(ml.interest_outstanding_derived, 0) + IFNULL(ml.fee_charges_outstanding_derived, 0) + IFNULL(ml.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nounder.id AS "officeNumber", \r\nml.account_no AS "loanAccountNumber",\r\nSUM(lt.amount) AS "repaymentAmount"\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'% +\')\r\nINNER JOIN m_client mc ON mc.office_id=ounder.id\r\nINNER JOIN m_loan ml ON ml.client_id = mc.id\r\nINNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = \'loan_status_id +\'\r\nINNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\nINNER JOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nINNER JOIN m_appuser au ON au.id = lt.appuser_id\r\nLEFT JOIN m_payment_detail mpd ON mpd.id=lt.payment_detail_id\r\nLEFT JOIN m_currency cur ON cur.code = ml.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = mc.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = ml.loan_officer_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = ml.id\r\nWHERE ml.loan_status_id=300 AND mo.id=${officeId} AND (IFNULL(ml.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND (DATEDIFF(CURDATE(), lt.transaction_date) BETWEEN ${fromX} AND ${toY}) AND (DATEDIFF(CURDATE(), laa.overdue_since_date_derived) BETWEEN ${overdueX} AND ${overdueY}) AND lt.is_reversed=0 AND lt.transaction_type_enum=2\r\nGROUP BY ml.id\r\nORDER BY ounder.hierarchy, ml.currency_code, mc.account_no, ml.account_no', 'Payments received in the last fromX to toY days for any loan with the status Overdue (arrears) between overdueX and overdueY days', 0, 1), + (176, 'Happy Birthday', 'SMS', 'NonTriggered', 'Clients', 'SELECT \r\nc.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'. +\', \' +\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber", \r\nc.date_of_birth AS "dateOfBirth",\r\nIF(c.date_of_birth IS NULL, 0, CEIL(DATEDIFF (NOW(), c.date_of_birth)/365)) AS "age"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum +\' AND r.enum_id = c.status_enum\r\nLEFT JOIN m_staff ms ON ms.id = c.staff_id\r\nWHERE o.id = ${officeId} AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND c.date_of_birth IS NOT NULL AND (DAY(c.date_of_birth)=DAY(NOW())) AND (MONTH(c.date_of_birth)=MONTH(NOW()))\r\nORDER BY ounder.hierarchy, c.account_no', 'This sends a message to all clients with the status Active on their Birthday', 0, 1), + (177, 'Loan fully repaid', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nc.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", \r\nl.principal_amount AS "loanAmount",\r\n(IFNULL(l.principal_outstanding_derived, 0) + IFNULL(l.interest_outstanding_derived, 0) + IFNULL(l.fee_charges_outstanding_derived, 0) + IFNULL(l.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nl.principal_disbursed_derived AS "loanDisbursed",\r\no.id AS "officeNumber",\r\nl.account_no AS "loanAccountId",\r\ngua.lastname AS "guarantorLastName", COUNT(gua.id) AS "numberOfGuarantors",\r\nls.duedate AS "dueDate",\r\nlaa.total_overdue_derived AS "totalDue",\r\ngp.display_name AS "groupName",\r\nl.total_repayment_derived AS "totalFullyPaid"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan l ON l.client_id = c.id\r\nLEFT JOIN m_staff lo ON lo.id = l.loan_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = l.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = c.id\r\nLEFT JOIN m_group gp ON gp.id = l.group_id\r\nLEFT JOIN m_loan_repayment_schedule ls ON l.id = ls.loan_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = l.id\r\nLEFT JOIN m_loan_arrears_aging laa ON laa.loan_id=l.id\r\nWHERE o.id = ${officeId} AND (IFNULL(l.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND \r\n(DATEDIFF(CURDATE(), l.closedon_date) BETWEEN ${fromX} AND ${toY})\r\n AND (l.loan_status_id IN (600, 700))\r\nGROUP BY l.id, gua.lastname, ls.duedate\r\nORDER BY ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'All loans that have been fully repaid (Closed or Overpaid) in the last fromX to toY days', 0, 1), + (178, 'Loan outstanding after final instalment date', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nc.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", \r\nl.principal_amount AS "loanAmount",\r\no.id AS "officeNumber",\r\n(IFNULL(l.principal_outstanding_derived, 0) + IFNULL(l.interest_outstanding_derived, 0) + IFNULL(l.fee_charges_outstanding_derived, 0) + IFNULL(l.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nl.principal_disbursed_derived AS "loanDisbursed",\r\nls.duedate AS "paymentDueDate",\r\n(IFNULL(SUM(ls.principal_amount),0) - IFNULL(SUM(ls.principal_writtenoff_derived),0)\r\n + IFNULL(SUM(ls.interest_amount),0) - IFNULL(SUM(ls.interest_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.interest_waived_derived),0)\r\n + IFNULL(SUM(ls.fee_charges_amount),0) - IFNULL(SUM(ls.fee_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.fee_charges_waived_derived),0)\r\n + IFNULL(SUM(ls.penalty_charges_amount),0) - IFNULL(SUM(ls.penalty_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.penalty_charges_waived_derived),0)\r\n) AS "totalDue",\r\nlaa.total_overdue_derived AS "totalOverdue",\r\nl.account_no AS "loanAccountId",\r\ngua.lastname AS "guarantorLastName",\r\nCOUNT(gua.id) AS "numberOfGuarantors",\r\ngp.display_name AS "groupName"\r\n\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan l ON l.client_id = c.id\r\nLEFT JOIN m_staff lo ON lo.id = l.loan_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = l.currency_code\r\nLEFT JOIN m_loan_arrears_aging laa ON laa.loan_id = l.id\r\nLEFT JOIN m_group_client gc ON gc.client_id = c.id\r\nLEFT JOIN m_group gp ON gp.id = l.group_id\r\nLEFT JOIN m_loan_repayment_schedule ls ON l.id = ls.loan_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = l.id\r\nWHERE o.id = ${officeId} AND (IFNULL(l.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND l.loan_status_id = 300 AND l.expected_maturedon_date < CURDATE() \r\nAND (DATEDIFF(CURDATE(), l.expected_maturedon_date) BETWEEN ${fromX} AND ${toY})\r\nGROUP BY l.id, ls.duedate, gua.lastname\r\nORDER BY ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'All active loans (with an outstanding balance) between fromX to toY days after the final instalment date on their loan schedule', 0, 1), + (179, 'Loan Repayment', 'SMS', 'Triggered', NULL, 'select ml.id as loanId,mc.id, mc.firstname, ifnull(mc.middlename,\' +\') as middlename, mc.lastname, mc.display_name as FullName, mobile_no as mobileNo, mc.group_name as GroupName, round(ml.principal_amount, ml.currency_digits) as LoanAmount, round(ml.`total_outstanding_derived`, ml.currency_digits) as LoanOutstanding,\nml.`account_no` as LoanAccountId, round(mlt.amountPaid, ml.currency_digits) as repaymentAmount\nFROM m_office mo\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'% +\')\nAND ounder.hierarchy like CONCAT(\'. +\', \'% +\')\nLEFT JOIN (\n select \n ml.id as loanId, \n ifnull(mc.id,mc2.id) as id, \n ifnull(mc.firstname,mc2.firstname) as firstname, \n ifnull(mc.middlename,ifnull(mc2.middlename,(\' +\'))) as middlename, \n ifnull(mc.lastname,mc2.lastname) as lastname, \n ifnull(mc.display_name,mc2.display_name) as display_name, \n ifnull(mc.status_enum,mc2.status_enum) as status_enum,\n ifnull(mc.mobile_no,mc2.mobile_no) as mobile_no,\n ifnull(mg.office_id,mc2.office_id) as office_id,\n ifnull(mg.staff_id,mc2.staff_id) as staff_id,\n mg.id as group_id, \nmg.display_name as group_name\n from\n m_loan ml\n left join m_group mg on mg.id = ml.group_id\n left join m_group_client mgc on mgc.group_id = mg.id\n left join m_client mc on mc.id = mgc.client_id\n left join m_client mc2 on mc2.id = ml.client_id\n order by loanId\n ) mc on mc.office_id = ounder.id\nright join m_loan as ml on mc.loanId = ml.id\nright join(\nselect mlt.amount as amountPaid,mlt.id,mlt.loan_id\nfrom m_loan_transaction mlt\nwhere mlt.is_reversed = 0 \ngroup by mlt.loan_id, mlt.amount, mlt.id\n) as mlt on mlt.loan_id = ml.id\nright join m_loan_repayment_schedule as mls1 on ml.id = mls1.loan_id and mls1.`completed_derived` = 0\nand mls1.installment = (SELECT MIN(installment) from m_loan_repayment_schedule where loan_id = ml.id and duedate <= CURDATE() and completed_derived=0)\nwhere mc.status_enum = 300 and mobile_no is not null and ml.`loan_status_id` = 300\nand (mo.id = ${officeId} or ${officeId} = -1)\nand (mc.staff_id = ${loanOfficerId} or ${loanOfficerId} = -1)\nand (ml.loan_type_enum = ${loanType} or ${loanType} = -1)\nand ml.id in (select mla.loan_id from m_loan_arrears_aging mla)\ngroup by ml.id, mc.id, mc.firstname, mc.middlename, mc.lastname, mc.display_name, mc.mobile_no, mlt.amountPaid', 'Loan Repayment', 0, 0), + (180, 'Loan Approved', 'SMS', 'Triggered', NULL, 'SELECT mc.id, mc.firstname, mc.middlename as middlename, mc.lastname, mc.display_name as FullName, mc.mobile_no as mobileNo, mc.group_name as GroupName, mo.name as officename, ml.id as loanId, ml.account_no as accountnumber, ml.principal_amount_proposed as loanamount, ml.annual_nominal_interest_rate as annualinterestrate FROM m_office mo JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'% +\') AND ounder.hierarchy like CONCAT(\'. +\', \'% +\') LEFT JOIN ( select ml.id as loanId, ifnull(mc.id,mc2.id) as id, ifnull(mc.firstname,mc2.firstname) as firstname, ifnull(mc.middlename,ifnull(mc2.middlename,(\' +\'))) as middlename, ifnull(mc.lastname,mc2.lastname) as lastname, ifnull(mc.display_name,mc2.display_name) as display_name, ifnull(mc.status_enum,mc2.status_enum) as status_enum, ifnull(mc.mobile_no,mc2.mobile_no) as mobile_no, ifnull(mg.office_id,mc2.office_id) as office_id, ifnull(mg.staff_id,mc2.staff_id) as staff_id, mg.id as group_id, mg.display_name as group_name from m_loan ml left join m_group mg on mg.id = ml.group_id left join m_group_client mgc on mgc.group_id = mg.id left join m_client mc on mc.id = mgc.client_id left join m_client mc2 on mc2.id = ml.client_id order by loanId ) mc on mc.office_id = ounder.id left join m_loan ml on ml.id = mc.loanId WHERE mc.status_enum = 300 and mc.mobile_no is not null and (mo.id = ${officeId} or ${officeId} = -1) and (mc.staff_id = ${loanOfficerId} or ${loanOfficerId} = -1)and (ml.id = ${loanId} or ${loanId} = -1)and (mc.id = ${clientId} or ${clientId} = -1)and (mc.group_id = ${groupId} or ${groupId} = -1)and (ml.loan_type_enum = ${loanType} or ${loanType} = -1)', 'Loan and client data of approved loan', 0, 0), + (181, 'Loan Rejected', 'SMS', 'Triggered', NULL, 'SELECT mc.id, mc.firstname, mc.middlename as middlename, mc.lastname, mc.display_name as FullName, mc.mobile_no as mobileNo, mc.group_name as GroupName, mo.name as officename, ml.id as loanId, ml.account_no as accountnumber, ml.principal_amount_proposed as loanamount, ml.annual_nominal_interest_rate as annualinterestrate FROM m_office mo JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'% +\') AND ounder.hierarchy like CONCAT(\'. +\', \'% +\') LEFT JOIN ( select ml.id as loanId, ifnull(mc.id,mc2.id) as id, ifnull(mc.firstname,mc2.firstname) as firstname, ifnull(mc.middlename,ifnull(mc2.middlename,(\' +\'))) as middlename, ifnull(mc.lastname,mc2.lastname) as lastname, ifnull(mc.display_name,mc2.display_name) as display_name, ifnull(mc.status_enum,mc2.status_enum) as status_enum, ifnull(mc.mobile_no,mc2.mobile_no) as mobile_no, ifnull(mg.office_id,mc2.office_id) as office_id, ifnull(mg.staff_id,mc2.staff_id) as staff_id, mg.id as group_id, mg.display_name as group_name from m_loan ml left join m_group mg on mg.id = ml.group_id left join m_group_client mgc on mgc.group_id = mg.id left join m_client mc on mc.id = mgc.client_id left join m_client mc2 on mc2.id = ml.client_id order by loanId ) mc on mc.office_id = ounder.id left join m_loan ml on ml.id = mc.loanId WHERE mc.status_enum = 300 and mc.mobile_no is not null and (mo.id = ${officeId} or ${officeId} = -1) and (mc.staff_id = ${loanOfficerId} or ${loanOfficerId} = -1) and (ml.id = ${loanId} or ${loanId} = -1) and (mc.id = ${clientId} or ${clientId} = -1) and (mc.group_id = ${groupId} or ${groupId} = -1) and (ml.loan_type_enum = ${loanType} or ${loanType} = -1)', 'Loan and client data of rejected loan', 0, 0), + (182, 'Client Rejected', 'SMS', 'Triggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'. +\', \' +\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum +\' AND r.enum_id = c.status_enum\r\nWHERE o.id = ${officeId} AND c.id = ${clientId} AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId})', 'Client Rejection', 0, 1), + (183, 'Client Activated', 'SMS', 'Triggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'. +\', \' +\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum +\' AND r.enum_id = c.status_enum\r\nWHERE o.id = ${officeId} AND c.id = ${clientId} AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId})', 'Client Activation', 0, 1), + (184, 'Savings Rejected', 'SMS', 'Triggered', 'Savings', 'SELECT \r\nc.id AS "id",\r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo",\r\ns.account_no AS "savingsAccountNo",\r\nounder.id AS "officeNumber",\r\nounder.name AS "officeName"\r\n\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_savings_account s ON s.client_id = c.id\r\nJOIN m_savings_product sp ON sp.id = s.product_id\r\nLEFT JOIN m_staff st ON st.id = s.field_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = s.currency_code\r\nWHERE o.id = ${officeId} AND (IFNULL(s.field_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND s.id = ${savingsId}', 'Savings Rejected', 0, 1), + (185, 'Savings Activated', 'SMS', 'Triggered', 'Savings', 'SELECT \r\nc.id AS "id",\r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo",\r\ns.account_no AS "savingsAccountNo",\r\nounder.id AS "officeNumber",\r\nounder.name AS "officeName"\r\n\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_savings_account s ON s.client_id = c.id\r\nJOIN m_savings_product sp ON sp.id = s.product_id\r\nLEFT JOIN m_staff st ON st.id = s.field_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = s.currency_code\r\nWHERE o.id = ${officeId} AND (IFNULL(s.field_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND s.id = ${savingsId}', 'Savings Activation', 0, 1), + (186, 'Savings Deposit', 'SMS', 'Triggered', NULL, 'SELECT sc.savingsId AS savingsId, sc.id AS clientId, sc.firstname, IFNULL(sc.middlename,\' +\') AS middlename, sc.lastname, sc.display_name AS FullName, sc.mobile_no AS mobileNo,\r\nms.`account_no` AS savingsAccountNo, ROUND(mst.amountPaid, ms.currency_digits) AS depositAmount, ms.account_balance_derived AS balance, \r\nmst.transactionDate AS transactionDate\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'% +\') AND ounder.hierarchy LIKE CONCAT(\'. +\', \'% +\')\r\nLEFT JOIN (\r\nSELECT \r\n sa.id AS savingsId, mc.id AS id, mc.firstname AS firstname, mc.middlename AS middlename, mc.lastname AS lastname, \r\n mc.display_name AS display_name, mc.status_enum AS status_enum, \r\n mc.mobile_no AS mobile_no, mc.office_id AS office_id, \r\n mc.staff_id AS staff_id\r\nFROM\r\nm_savings_account sa\r\nLEFT JOIN m_client mc ON mc.id = sa.client_id\r\nORDER BY savingsId) sc ON sc.office_id = ounder.id\r\nRIGHT JOIN m_savings_account AS ms ON sc.savingsId = ms.id\r\nRIGHT JOIN(\r\nSELECT st.amount AS amountPaid, st.id, st.savings_account_id, st.id AS savingsTransactionId, st.transaction_date AS transactionDate\r\nFROM m_savings_account_transaction st\r\nWHERE st.is_reversed = 0\r\nGROUP BY st.savings_account_id, st.amount, st.id\r\n) AS mst ON mst.savings_account_id = ms.id\r\nWHERE sc.mobile_no IS NOT NULL AND (mo.id = ${officeId} OR ${officeId} = -1) AND (sc.staff_id = ${loanOfficerId} OR ${loanOfficerId} = -1) AND mst.savingsTransactionId = ${savingsTransactionId}', 'Savings Deposit', 0, 1), + (187, 'Savings Withdrawal', 'SMS', 'Triggered', NULL, 'SELECT sc.savingsId AS savingsId, sc.id AS clientId, sc.firstname, IFNULL(sc.middlename,\' +\') AS middlename, sc.lastname, sc.display_name AS FullName, sc.mobile_no AS mobileNo,\r\nms.`account_no` AS savingsAccountNo, ROUND(mst.amountPaid, ms.currency_digits) AS withdrawAmount, ms.account_balance_derived AS balance, \r\nmst.transactionDate AS transactionDate\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'% +\') AND ounder.hierarchy LIKE CONCAT(\'. +\', \'% +\')\r\nLEFT JOIN (\r\nSELECT \r\n sa.id AS savingsId, mc.id AS id, mc.firstname AS firstname, mc.middlename AS middlename, mc.lastname AS lastname, \r\n mc.display_name AS display_name, mc.status_enum AS status_enum, \r\n mc.mobile_no AS mobile_no, mc.office_id AS office_id, \r\n mc.staff_id AS staff_id\r\nFROM\r\nm_savings_account sa\r\nLEFT JOIN m_client mc ON mc.id = sa.client_id\r\nORDER BY savingsId) sc ON sc.office_id = ounder.id\r\nRIGHT JOIN m_savings_account AS ms ON sc.savingsId = ms.id\r\nRIGHT JOIN(\r\nSELECT st.amount AS amountPaid, st.id, st.savings_account_id, st.id AS savingsTransactionId, st.transaction_date AS transactionDate\r\nFROM m_savings_account_transaction st\r\nWHERE st.is_reversed = 0\r\nGROUP BY st.savings_account_id, st.amount, st.id\r\n) AS mst ON mst.savings_account_id = ms.id\r\nWHERE sc.mobile_no IS NOT NULL AND (mo.id = ${officeId} OR ${officeId} = -1) AND (sc.staff_id = ${loanOfficerId} OR ${loanOfficerId} = -1) AND mst.savingsTransactionId = ${savingsTransactionId}', 'Savings Withdrawal', 0, 1); /*!40000 ALTER TABLE `stretchy_report` ENABLE KEYS */; -- Dumping structure for table fineract_default.stretchy_report_parameter DROP TABLE IF EXISTS `stretchy_report_parameter`; -CREATE TABLE IF NOT EXISTS `stretchy_report_parameter` ( - `id` INT NOT NULL AUTO_INCREMENT, - `report_id` INT NOT NULL, - `parameter_id` INT NOT NULL, - `report_parameter_name` varchar(45) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `report_parameter_unique` (`report_id`,`parameter_id`), - KEY `fk_report_parameter_001_idx` (`report_id`), - KEY `fk_report_parameter_002_idx` (`parameter_id`), - CONSTRAINT `fk_report_parameter_001` FOREIGN KEY (`report_id`) REFERENCES `stretchy_report` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION, - CONSTRAINT `fk_report_parameter_002` FOREIGN KEY (`parameter_id`) REFERENCES `stretchy_parameter` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION -) ENGINE=InnoDB AUTO_INCREMENT=522 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `stretchy_report_parameter` +( + `id` + INT + NOT + NULL + AUTO_INCREMENT, + `report_id` + INT + NOT + NULL, + `parameter_id` + INT + NOT + NULL, + `report_parameter_name` + varchar +( + 45 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `report_parameter_unique` +( + `report_id`, + `parameter_id` +), + KEY `fk_report_parameter_001_idx` +( + `report_id` +), + KEY `fk_report_parameter_002_idx` +( + `parameter_id` +), + CONSTRAINT `fk_report_parameter_001` FOREIGN KEY +( + `report_id` +) REFERENCES `stretchy_report` +( + `id` +) ON DELETE CASCADE + ON UPDATE NO ACTION, + CONSTRAINT `fk_report_parameter_002` FOREIGN KEY +( + `parameter_id` +) REFERENCES `stretchy_parameter` +( + `id` +) + ON DELETE NO ACTION + ON UPDATE NO ACTION + ) ENGINE=InnoDB AUTO_INCREMENT=522 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.stretchy_report_parameter: ~415 rows (approximately) /*!40000 ALTER TABLE `stretchy_report_parameter` DISABLE KEYS */; -INSERT INTO `stretchy_report_parameter` (`id`, `report_id`, `parameter_id`, `report_parameter_name`) VALUES - (1, 1, 5, NULL), - (2, 2, 5, NULL), - (3, 2, 6, NULL), - (4, 2, 10, NULL), - (5, 2, 20, NULL), - (6, 2, 25, NULL), - (7, 2, 26, NULL), - (8, 5, 5, NULL), - (9, 5, 6, NULL), - (10, 5, 10, NULL), - (11, 5, 20, NULL), - (12, 5, 25, NULL), - (13, 5, 26, NULL), - (14, 6, 5, NULL), - (15, 6, 6, NULL), - (16, 6, 10, NULL), - (17, 6, 20, NULL), - (18, 6, 25, NULL), - (19, 6, 26, NULL), - (20, 7, 5, NULL), - (21, 7, 6, NULL), - (22, 7, 10, NULL), - (23, 7, 20, NULL), - (24, 7, 25, NULL), - (25, 7, 26, NULL), - (26, 8, 5, NULL), - (27, 8, 6, NULL), - (28, 8, 10, NULL), - (29, 8, 25, NULL), - (30, 8, 26, NULL), - (31, 11, 5, NULL), - (32, 11, 6, NULL), - (33, 11, 10, NULL), - (34, 11, 20, NULL), - (35, 11, 25, NULL), - (36, 11, 26, NULL), - (37, 11, 100, NULL), - (38, 12, 5, NULL), - (39, 12, 6, NULL), - (40, 12, 10, NULL), - (41, 12, 20, NULL), - (42, 12, 25, NULL), - (43, 12, 26, NULL), - (44, 13, 1, NULL), - (45, 13, 2, NULL), - (46, 13, 3, NULL), - (47, 13, 5, NULL), - (48, 13, 6, NULL), - (49, 13, 10, NULL), - (50, 13, 20, NULL), - (51, 13, 25, NULL), - (52, 13, 26, NULL), - (53, 14, 1, NULL), - (54, 14, 2, NULL), - (55, 14, 3, NULL), - (56, 14, 5, NULL), - (57, 14, 6, NULL), - (58, 14, 10, NULL), - (59, 14, 20, NULL), - (60, 14, 25, NULL), - (61, 14, 26, NULL), - (62, 15, 5, NULL), - (63, 15, 6, NULL), - (64, 15, 10, NULL), - (65, 15, 20, NULL), - (66, 15, 25, NULL), - (67, 15, 26, NULL), - (68, 15, 100, NULL), - (69, 16, 5, NULL), - (70, 16, 6, NULL), - (71, 16, 10, NULL), - (72, 16, 20, NULL), - (73, 16, 25, NULL), - (74, 16, 26, NULL), - (75, 16, 100, NULL), - (76, 20, 1, NULL), - (77, 20, 2, NULL), - (78, 20, 10, NULL), - (79, 20, 20, NULL), - (80, 21, 1, NULL), - (81, 21, 2, NULL), - (82, 21, 5, NULL), - (83, 21, 10, NULL), - (84, 21, 20, NULL), - (85, 48, 5, 'branch'), - (86, 48, 2, 'date'), - (87, 49, 5, 'branch'), - (88, 49, 1, 'fromDate'), - (89, 49, 2, 'toDate'), - (90, 50, 5, 'branch'), - (91, 50, 1, 'fromDate'), - (92, 50, 2, 'toDate'), - (93, 51, 1, NULL), - (94, 51, 2, NULL), - (95, 51, 5, NULL), - (96, 51, 10, NULL), - (97, 51, 25, NULL), - (98, 52, 5, NULL), - (99, 53, 5, NULL), - (100, 53, 10, NULL), - (101, 54, 1, NULL), - (102, 54, 2, NULL), - (103, 54, 5, NULL), - (104, 54, 10, NULL), - (105, 54, 25, NULL), - (106, 55, 5, NULL), - (107, 55, 6, NULL), - (108, 55, 10, NULL), - (109, 55, 20, NULL), - (110, 55, 25, NULL), - (111, 55, 26, NULL), - (112, 56, 5, NULL), - (113, 56, 6, NULL), - (114, 56, 10, NULL), - (115, 56, 20, NULL), - (116, 56, 25, NULL), - (117, 56, 26, NULL), - (118, 56, 100, NULL), - (119, 57, 5, NULL), - (120, 57, 6, NULL), - (121, 57, 10, NULL), - (122, 57, 20, NULL), - (123, 57, 25, NULL), - (124, 57, 26, NULL), - (125, 58, 5, NULL), - (126, 58, 6, NULL), - (127, 58, 10, NULL), - (128, 58, 20, NULL), - (129, 58, 25, NULL), - (130, 58, 26, NULL), - (131, 58, 100, NULL), - (132, 59, 1, NULL), - (133, 59, 2, NULL), - (134, 59, 5, NULL), - (135, 59, 6, NULL), - (136, 59, 10, NULL), - (137, 59, 20, NULL), - (138, 59, 25, NULL), - (139, 59, 26, NULL), - (140, 61, 5, NULL), - (141, 61, 10, NULL), - (142, 92, 1, 'fromDate'), - (143, 92, 5, 'selectOffice'), - (144, 92, 2, 'toDate'), - (145, 93, 1, NULL), - (146, 93, 2, NULL), - (147, 93, 5, NULL), - (148, 93, 6, NULL), - (149, 94, 2, 'endDate'), - (150, 94, 6, 'loanOfficerId'), - (151, 94, 5, 'officeId'), - (152, 94, 1, 'startDate'), - (256, 106, 2, NULL), - (257, 106, 6, NULL), - (258, 106, 5, NULL), - (259, 106, 1, NULL), - (263, 118, 1, 'fromDate'), - (264, 118, 2, 'toDate'), - (265, 118, 1004, 'accountNo'), - (266, 119, 1, 'fromDate'), - (267, 119, 2, 'toDate'), - (268, 119, 5, 'selectOffice'), - (269, 119, 1005, 'selectProduct'), - (270, 120, 5, 'branch'), - (271, 120, 6, 'loanOfficer'), - (272, 120, 10, 'currencyId'), - (273, 120, 20, 'fundId'), - (274, 120, 25, 'loanProductId'), - (275, 120, 26, 'loanPurposeId'), - (276, 121, 5, 'Branch'), - (277, 121, 6, 'loanOfficer'), - (278, 121, 10, 'CurrencyId'), - (279, 121, 20, 'fundId'), - (280, 121, 25, 'loanProductId'), - (281, 121, 26, 'loanPurposeId'), - (282, 121, 100, 'parType'), - (283, 122, 5, 'Branch'), - (284, 122, 6, 'loanOfficer'), - (285, 122, 10, 'CurrencyId'), - (286, 122, 20, 'fundId'), - (287, 122, 25, 'loanProductId'), - (288, 122, 26, 'loanPurposeId'), - (289, 122, 1, 'startDate'), - (290, 122, 2, 'endDate'), - (291, 123, 5, 'Branch'), - (292, 123, 6, 'Loan Officer'), - (293, 123, 10, 'CurrencyId'), - (294, 123, 20, 'fundId'), - (295, 123, 25, 'loanProductId'), - (296, 123, 26, 'loanPurposeId'), - (297, 123, 100, 'parType'), - (298, 124, 5, 'Branch'), - (299, 124, 6, 'Loan Officer'), - (300, 124, 10, 'CurrencyId'), - (301, 124, 20, 'fundId'), - (302, 124, 25, 'loanProductId'), - (303, 124, 26, 'loanPurposeId'), - (304, 125, 5, 'Branch'), - (305, 125, 6, 'Loan Officer'), - (306, 125, 10, 'CurrencyId'), - (307, 125, 20, 'fundId'), - (308, 125, 25, 'loanProductId'), - (309, 125, 26, 'loanPurposeId'), - (310, 125, 100, 'parType'), - (311, 126, 5, 'Branch'), - (312, 126, 6, 'Loan Officer'), - (313, 126, 10, 'CurrencyId'), - (314, 126, 20, 'fundId'), - (315, 126, 25, 'loanProductId'), - (316, 126, 26, 'loanPurposeId'), - (317, 127, 5, 'Branch'), - (318, 128, 5, 'Branch'), - (319, 128, 10, 'CurrencyId'), - (320, 129, 5, 'Branch'), - (321, 129, 10, 'CurrencyId'), - (322, 130, 5, 'selectOffice'), - (323, 131, 5, 'Branch'), - (324, 131, 6, 'Loan Officer'), - (325, 131, 10, 'CurrencyId'), - (326, 131, 20, 'fundId'), - (327, 131, 25, 'loanProductId'), - (328, 131, 26, 'loanPurposeId'), - (329, 132, 5, 'Branch'), - (330, 132, 6, 'Loan Officer'), - (331, 132, 1, 'startDate'), - (332, 132, 2, 'endDate'), - (333, 133, 5, 'Branch'), - (334, 133, 10, 'CurrencyId'), - (335, 133, 20, 'fundId'), - (336, 133, 1, 'startDate'), - (337, 133, 2, 'endDate'), - (338, 134, 10, 'CurrencyId'), - (339, 134, 20, 'fundId'), - (340, 134, 1, 'startDate'), - (341, 134, 2, 'endDate'), - (342, 135, 5, 'Branch'), - (343, 135, 6, 'Loan Officer'), - (344, 135, 10, 'CurrencyId'), - (345, 135, 20, 'fundId'), - (346, 135, 25, 'loanProductId'), - (347, 135, 26, 'loanPurposeId'), - (348, 136, 5, 'Branch'), - (349, 136, 6, 'Loan Officer'), - (350, 136, 10, 'CurrencyId'), - (351, 136, 20, 'fundId'), - (352, 136, 25, 'loanProductId'), - (353, 136, 26, 'loanPurposeId'), - (354, 137, 5, 'Branch'), - (355, 137, 6, 'Loan Officer'), - (356, 137, 10, 'CurrencyId'), - (357, 137, 20, 'fundId'), - (358, 137, 25, 'loanProductId'), - (359, 137, 26, 'loanPurposeId'), - (360, 138, 5, 'Branch'), - (361, 138, 6, 'Loan Officer'), - (362, 138, 10, 'CurrencyId'), - (363, 138, 20, 'fundId'), - (364, 138, 25, 'loanProductId'), - (365, 138, 26, 'loanPurposeId'), - (366, 139, 5, 'Branch'), - (367, 139, 6, 'Loan Officer'), - (368, 139, 10, 'CurrencyId'), - (369, 139, 20, 'fundId'), - (370, 139, 25, 'loanProductId'), - (371, 139, 26, 'loanPurposeId'), - (372, 139, 1, 'startDate'), - (373, 139, 2, 'endDate'), - (374, 139, 3, 'obligDateType'), - (375, 140, 5, 'Branch'), - (376, 140, 6, 'Loan Officer'), - (377, 140, 10, 'CurrencyId'), - (378, 140, 20, 'fundId'), - (379, 140, 25, 'loanProductId'), - (380, 140, 26, 'loanPurposeId'), - (381, 140, 1, 'Startdate'), - (382, 140, 2, 'Enddate'), - (383, 140, 3, 'obligDateType'), - (384, 141, 5, 'Branch'), - (385, 141, 6, 'Loan Officer'), - (386, 141, 10, 'CurrencyId'), - (387, 141, 20, 'fundId'), - (388, 141, 25, 'loanProductId'), - (389, 141, 26, 'loanPurposeId'), - (390, 141, 100, 'parType'), - (391, 142, 5, 'Branch'), - (392, 142, 6, 'loanOfficer'), - (393, 142, 10, 'CurrencyId'), - (394, 142, 20, 'fundId'), - (395, 142, 25, 'loanProductId'), - (396, 142, 26, 'loanPurposeId'), - (397, 142, 100, 'parType'), - (398, 143, 5, 'Branch'), - (399, 143, 10, 'CurrencyId'), - (400, 143, 25, 'loanProductId'), - (401, 143, 1, 'startDate'), - (402, 143, 2, 'endDate'), - (403, 144, 5, 'Branch'), - (404, 144, 6, 'Loan Officer'), - (405, 144, 1, 'startDate'), - (406, 144, 2, 'endDate'), - (407, 145, 5, 'Branch'), - (408, 145, 10, 'CurrencyId'), - (409, 145, 25, 'loanProductId'), - (410, 145, 1, 'startDate'), - (411, 145, 2, 'endDate'), - (412, 146, 1, 'startDate'), - (413, 146, 2, 'endDate'), - (414, 146, 1004, 'accountNo'), - (415, 147, 1, 'startDate'), - (416, 147, 2, 'endDate'), - (417, 147, 1004, 'selectLoan'), - (418, 149, 5, ''), - (419, 150, 5, ''), - (420, 151, 5, ''), - (421, 152, 5, ''), - (422, 153, 5, ''), - (423, 154, 5, ''), - (424, 155, 5, ''), - (425, 156, 5, ''), - (426, 157, 1006, 'transactionId'), - (427, 158, 1006, 'transactionId'), - (428, 159, 1007, 'centerId'), - (429, 160, 1008, 'account'), - (430, 160, 1, 'fromDate'), - (431, 160, 2, 'toDate'), - (432, 160, 5, 'branch'), - (433, 162, 5, 'branch'), - (434, 162, 1009, 'ondate'), - (435, 163, 5, 'branch'), - (436, 163, 1, 'fromDate'), - (437, 163, 2, 'toDate'), - (438, 164, 5, 'branch'), - (439, 164, 1, 'fromDate'), - (440, 164, 2, 'toDate'), - (441, 165, 1010, NULL), - (442, 165, 5, NULL), - (443, 166, 5, 'officeId'), - (444, 166, 6, 'loanOfficerId'), - (445, 167, 5, 'officeId'), - (446, 167, 6, 'loanOfficerId'), - (447, 168, 5, 'officeId'), - (448, 168, 6, 'loanOfficerId'), - (449, 168, 1011, 'cycleX'), - (450, 168, 1012, 'cycleY'), - (451, 169, 5, 'officeId'), - (452, 169, 6, 'loanOfficerId'), - (453, 169, 1013, 'fromX'), - (454, 169, 1014, 'toY'), - (455, 170, 5, 'officeId'), - (456, 170, 6, 'loanOfficerId'), - (457, 170, 1013, 'fromX'), - (458, 170, 1014, 'toY'), - (459, 171, 5, 'officeId'), - (460, 171, 6, 'loanOfficerId'), - (461, 172, 5, 'officeId'), - (462, 172, 6, 'loanOfficerId'), - (463, 173, 5, 'officeId'), - (464, 173, 6, 'loanOfficerId'), - (465, 173, 1013, 'fromX'), - (466, 173, 1014, 'toY'), - (467, 173, 1015, 'overdueX'), - (468, 173, 1016, 'overdueY'), - (469, 174, 5, 'officeId'), - (470, 174, 6, 'loanOfficerId'), - (471, 174, 1013, 'fromX'), - (472, 174, 1014, 'toY'), - (473, 175, 5, 'officeId'), - (474, 175, 6, 'loanOfficerId'), - (475, 175, 1013, 'fromX'), - (476, 175, 1014, 'toY'), - (477, 175, 1015, 'overdueX'), - (478, 175, 1016, 'overdueY'), - (479, 176, 5, 'officeId'), - (480, 176, 6, 'loanOfficerId'), - (481, 177, 5, 'officeId'), - (482, 177, 6, 'loanOfficerId'), - (483, 177, 1013, 'fromX'), - (484, 177, 1014, 'toY'), - (485, 178, 5, 'officeId'), - (486, 178, 6, 'loanOfficerId'), - (487, 178, 1013, 'fromX'), - (488, 178, 1014, 'toY'), - (489, 181, 5, 'officeId'), - (490, 180, 5, 'officeId'), - (491, 179, 5, 'officeId'), - (492, 181, 6, 'loanOfficerId'), - (493, 180, 6, 'loanOfficerId'), - (494, 179, 6, 'loanOfficerId'), - (495, 181, 1017, 'loanId'), - (496, 180, 1017, 'loanId'), - (497, 181, 1018, 'clientId'), - (498, 180, 1018, 'clientId'), - (499, 181, 1019, 'groupId'), - (500, 180, 1019, 'groupId'), - (501, 181, 1020, 'loanType'), - (502, 180, 1020, 'loanType'), - (503, 179, 1020, 'loanType'), - (504, 182, 5, 'officeId'), - (505, 183, 5, 'officeId'), - (506, 182, 6, 'loanOfficerId'), - (507, 183, 6, 'loanOfficerId'), - (508, 182, 1018, 'clientId'), - (509, 183, 1018, 'clientId'), - (510, 184, 5, 'officeId'), - (511, 184, 6, 'loanOfficerId'), - (512, 184, 1021, 'savingsId'), - (513, 185, 5, 'officeId'), - (514, 185, 6, 'loanOfficerId'), - (515, 185, 1021, 'savingsId'), - (516, 186, 5, 'officeId'), - (517, 186, 6, 'loanOfficerId'), - (518, 186, 1022, 'savingsTransactionId'), - (519, 187, 5, 'officeId'), - (520, 187, 6, 'loanOfficerId'), - (521, 187, 1022, 'savingsTransactionId'); +INSERT INTO `stretchy_report_parameter` (`id`, `report_id`, `parameter_id`, `report_parameter_name`) +VALUES (1, 1, 5, NULL), + (2, 2, 5, NULL), + (3, 2, 6, NULL), + (4, 2, 10, NULL), + (5, 2, 20, NULL), + (6, 2, 25, NULL), + (7, 2, 26, NULL), + (8, 5, 5, NULL), + (9, 5, 6, NULL), + (10, 5, 10, NULL), + (11, 5, 20, NULL), + (12, 5, 25, NULL), + (13, 5, 26, NULL), + (14, 6, 5, NULL), + (15, 6, 6, NULL), + (16, 6, 10, NULL), + (17, 6, 20, NULL), + (18, 6, 25, NULL), + (19, 6, 26, NULL), + (20, 7, 5, NULL), + (21, 7, 6, NULL), + (22, 7, 10, NULL), + (23, 7, 20, NULL), + (24, 7, 25, NULL), + (25, 7, 26, NULL), + (26, 8, 5, NULL), + (27, 8, 6, NULL), + (28, 8, 10, NULL), + (29, 8, 25, NULL), + (30, 8, 26, NULL), + (31, 11, 5, NULL), + (32, 11, 6, NULL), + (33, 11, 10, NULL), + (34, 11, 20, NULL), + (35, 11, 25, NULL), + (36, 11, 26, NULL), + (37, 11, 100, NULL), + (38, 12, 5, NULL), + (39, 12, 6, NULL), + (40, 12, 10, NULL), + (41, 12, 20, NULL), + (42, 12, 25, NULL), + (43, 12, 26, NULL), + (44, 13, 1, NULL), + (45, 13, 2, NULL), + (46, 13, 3, NULL), + (47, 13, 5, NULL), + (48, 13, 6, NULL), + (49, 13, 10, NULL), + (50, 13, 20, NULL), + (51, 13, 25, NULL), + (52, 13, 26, NULL), + (53, 14, 1, NULL), + (54, 14, 2, NULL), + (55, 14, 3, NULL), + (56, 14, 5, NULL), + (57, 14, 6, NULL), + (58, 14, 10, NULL), + (59, 14, 20, NULL), + (60, 14, 25, NULL), + (61, 14, 26, NULL), + (62, 15, 5, NULL), + (63, 15, 6, NULL), + (64, 15, 10, NULL), + (65, 15, 20, NULL), + (66, 15, 25, NULL), + (67, 15, 26, NULL), + (68, 15, 100, NULL), + (69, 16, 5, NULL), + (70, 16, 6, NULL), + (71, 16, 10, NULL), + (72, 16, 20, NULL), + (73, 16, 25, NULL), + (74, 16, 26, NULL), + (75, 16, 100, NULL), + (76, 20, 1, NULL), + (77, 20, 2, NULL), + (78, 20, 10, NULL), + (79, 20, 20, NULL), + (80, 21, 1, NULL), + (81, 21, 2, NULL), + (82, 21, 5, NULL), + (83, 21, 10, NULL), + (84, 21, 20, NULL), + (85, 48, 5, 'branch'), + (86, 48, 2, 'date'), + (87, 49, 5, 'branch'), + (88, 49, 1, 'fromDate'), + (89, 49, 2, 'toDate'), + (90, 50, 5, 'branch'), + (91, 50, 1, 'fromDate'), + (92, 50, 2, 'toDate'), + (93, 51, 1, NULL), + (94, 51, 2, NULL), + (95, 51, 5, NULL), + (96, 51, 10, NULL), + (97, 51, 25, NULL), + (98, 52, 5, NULL), + (99, 53, 5, NULL), + (100, 53, 10, NULL), + (101, 54, 1, NULL), + (102, 54, 2, NULL), + (103, 54, 5, NULL), + (104, 54, 10, NULL), + (105, 54, 25, NULL), + (106, 55, 5, NULL), + (107, 55, 6, NULL), + (108, 55, 10, NULL), + (109, 55, 20, NULL), + (110, 55, 25, NULL), + (111, 55, 26, NULL), + (112, 56, 5, NULL), + (113, 56, 6, NULL), + (114, 56, 10, NULL), + (115, 56, 20, NULL), + (116, 56, 25, NULL), + (117, 56, 26, NULL), + (118, 56, 100, NULL), + (119, 57, 5, NULL), + (120, 57, 6, NULL), + (121, 57, 10, NULL), + (122, 57, 20, NULL), + (123, 57, 25, NULL), + (124, 57, 26, NULL), + (125, 58, 5, NULL), + (126, 58, 6, NULL), + (127, 58, 10, NULL), + (128, 58, 20, NULL), + (129, 58, 25, NULL), + (130, 58, 26, NULL), + (131, 58, 100, NULL), + (132, 59, 1, NULL), + (133, 59, 2, NULL), + (134, 59, 5, NULL), + (135, 59, 6, NULL), + (136, 59, 10, NULL), + (137, 59, 20, NULL), + (138, 59, 25, NULL), + (139, 59, 26, NULL), + (140, 61, 5, NULL), + (141, 61, 10, NULL), + (142, 92, 1, 'fromDate'), + (143, 92, 5, 'selectOffice'), + (144, 92, 2, 'toDate'), + (145, 93, 1, NULL), + (146, 93, 2, NULL), + (147, 93, 5, NULL), + (148, 93, 6, NULL), + (149, 94, 2, 'endDate'), + (150, 94, 6, 'loanOfficerId'), + (151, 94, 5, 'officeId'), + (152, 94, 1, 'startDate'), + (256, 106, 2, NULL), + (257, 106, 6, NULL), + (258, 106, 5, NULL), + (259, 106, 1, NULL), + (263, 118, 1, 'fromDate'), + (264, 118, 2, 'toDate'), + (265, 118, 1004, 'accountNo'), + (266, 119, 1, 'fromDate'), + (267, 119, 2, 'toDate'), + (268, 119, 5, 'selectOffice'), + (269, 119, 1005, 'selectProduct'), + (270, 120, 5, 'branch'), + (271, 120, 6, 'loanOfficer'), + (272, 120, 10, 'currencyId'), + (273, 120, 20, 'fundId'), + (274, 120, 25, 'loanProductId'), + (275, 120, 26, 'loanPurposeId'), + (276, 121, 5, 'Branch'), + (277, 121, 6, 'loanOfficer'), + (278, 121, 10, 'CurrencyId'), + (279, 121, 20, 'fundId'), + (280, 121, 25, 'loanProductId'), + (281, 121, 26, 'loanPurposeId'), + (282, 121, 100, 'parType'), + (283, 122, 5, 'Branch'), + (284, 122, 6, 'loanOfficer'), + (285, 122, 10, 'CurrencyId'), + (286, 122, 20, 'fundId'), + (287, 122, 25, 'loanProductId'), + (288, 122, 26, 'loanPurposeId'), + (289, 122, 1, 'startDate'), + (290, 122, 2, 'endDate'), + (291, 123, 5, 'Branch'), + (292, 123, 6, 'Loan Officer'), + (293, 123, 10, 'CurrencyId'), + (294, 123, 20, 'fundId'), + (295, 123, 25, 'loanProductId'), + (296, 123, 26, 'loanPurposeId'), + (297, 123, 100, 'parType'), + (298, 124, 5, 'Branch'), + (299, 124, 6, 'Loan Officer'), + (300, 124, 10, 'CurrencyId'), + (301, 124, 20, 'fundId'), + (302, 124, 25, 'loanProductId'), + (303, 124, 26, 'loanPurposeId'), + (304, 125, 5, 'Branch'), + (305, 125, 6, 'Loan Officer'), + (306, 125, 10, 'CurrencyId'), + (307, 125, 20, 'fundId'), + (308, 125, 25, 'loanProductId'), + (309, 125, 26, 'loanPurposeId'), + (310, 125, 100, 'parType'), + (311, 126, 5, 'Branch'), + (312, 126, 6, 'Loan Officer'), + (313, 126, 10, 'CurrencyId'), + (314, 126, 20, 'fundId'), + (315, 126, 25, 'loanProductId'), + (316, 126, 26, 'loanPurposeId'), + (317, 127, 5, 'Branch'), + (318, 128, 5, 'Branch'), + (319, 128, 10, 'CurrencyId'), + (320, 129, 5, 'Branch'), + (321, 129, 10, 'CurrencyId'), + (322, 130, 5, 'selectOffice'), + (323, 131, 5, 'Branch'), + (324, 131, 6, 'Loan Officer'), + (325, 131, 10, 'CurrencyId'), + (326, 131, 20, 'fundId'), + (327, 131, 25, 'loanProductId'), + (328, 131, 26, 'loanPurposeId'), + (329, 132, 5, 'Branch'), + (330, 132, 6, 'Loan Officer'), + (331, 132, 1, 'startDate'), + (332, 132, 2, 'endDate'), + (333, 133, 5, 'Branch'), + (334, 133, 10, 'CurrencyId'), + (335, 133, 20, 'fundId'), + (336, 133, 1, 'startDate'), + (337, 133, 2, 'endDate'), + (338, 134, 10, 'CurrencyId'), + (339, 134, 20, 'fundId'), + (340, 134, 1, 'startDate'), + (341, 134, 2, 'endDate'), + (342, 135, 5, 'Branch'), + (343, 135, 6, 'Loan Officer'), + (344, 135, 10, 'CurrencyId'), + (345, 135, 20, 'fundId'), + (346, 135, 25, 'loanProductId'), + (347, 135, 26, 'loanPurposeId'), + (348, 136, 5, 'Branch'), + (349, 136, 6, 'Loan Officer'), + (350, 136, 10, 'CurrencyId'), + (351, 136, 20, 'fundId'), + (352, 136, 25, 'loanProductId'), + (353, 136, 26, 'loanPurposeId'), + (354, 137, 5, 'Branch'), + (355, 137, 6, 'Loan Officer'), + (356, 137, 10, 'CurrencyId'), + (357, 137, 20, 'fundId'), + (358, 137, 25, 'loanProductId'), + (359, 137, 26, 'loanPurposeId'), + (360, 138, 5, 'Branch'), + (361, 138, 6, 'Loan Officer'), + (362, 138, 10, 'CurrencyId'), + (363, 138, 20, 'fundId'), + (364, 138, 25, 'loanProductId'), + (365, 138, 26, 'loanPurposeId'), + (366, 139, 5, 'Branch'), + (367, 139, 6, 'Loan Officer'), + (368, 139, 10, 'CurrencyId'), + (369, 139, 20, 'fundId'), + (370, 139, 25, 'loanProductId'), + (371, 139, 26, 'loanPurposeId'), + (372, 139, 1, 'startDate'), + (373, 139, 2, 'endDate'), + (374, 139, 3, 'obligDateType'), + (375, 140, 5, 'Branch'), + (376, 140, 6, 'Loan Officer'), + (377, 140, 10, 'CurrencyId'), + (378, 140, 20, 'fundId'), + (379, 140, 25, 'loanProductId'), + (380, 140, 26, 'loanPurposeId'), + (381, 140, 1, 'Startdate'), + (382, 140, 2, 'Enddate'), + (383, 140, 3, 'obligDateType'), + (384, 141, 5, 'Branch'), + (385, 141, 6, 'Loan Officer'), + (386, 141, 10, 'CurrencyId'), + (387, 141, 20, 'fundId'), + (388, 141, 25, 'loanProductId'), + (389, 141, 26, 'loanPurposeId'), + (390, 141, 100, 'parType'), + (391, 142, 5, 'Branch'), + (392, 142, 6, 'loanOfficer'), + (393, 142, 10, 'CurrencyId'), + (394, 142, 20, 'fundId'), + (395, 142, 25, 'loanProductId'), + (396, 142, 26, 'loanPurposeId'), + (397, 142, 100, 'parType'), + (398, 143, 5, 'Branch'), + (399, 143, 10, 'CurrencyId'), + (400, 143, 25, 'loanProductId'), + (401, 143, 1, 'startDate'), + (402, 143, 2, 'endDate'), + (403, 144, 5, 'Branch'), + (404, 144, 6, 'Loan Officer'), + (405, 144, 1, 'startDate'), + (406, 144, 2, 'endDate'), + (407, 145, 5, 'Branch'), + (408, 145, 10, 'CurrencyId'), + (409, 145, 25, 'loanProductId'), + (410, 145, 1, 'startDate'), + (411, 145, 2, 'endDate'), + (412, 146, 1, 'startDate'), + (413, 146, 2, 'endDate'), + (414, 146, 1004, 'accountNo'), + (415, 147, 1, 'startDate'), + (416, 147, 2, 'endDate'), + (417, 147, 1004, 'selectLoan'), + (418, 149, 5, ''), + (419, 150, 5, ''), + (420, 151, 5, ''), + (421, 152, 5, ''), + (422, 153, 5, ''), + (423, 154, 5, ''), + (424, 155, 5, ''), + (425, 156, 5, ''), + (426, 157, 1006, 'transactionId'), + (427, 158, 1006, 'transactionId'), + (428, 159, 1007, 'centerId'), + (429, 160, 1008, 'account'), + (430, 160, 1, 'fromDate'), + (431, 160, 2, 'toDate'), + (432, 160, 5, 'branch'), + (433, 162, 5, 'branch'), + (434, 162, 1009, 'ondate'), + (435, 163, 5, 'branch'), + (436, 163, 1, 'fromDate'), + (437, 163, 2, 'toDate'), + (438, 164, 5, 'branch'), + (439, 164, 1, 'fromDate'), + (440, 164, 2, 'toDate'), + (441, 165, 1010, NULL), + (442, 165, 5, NULL), + (443, 166, 5, 'officeId'), + (444, 166, 6, 'loanOfficerId'), + (445, 167, 5, 'officeId'), + (446, 167, 6, 'loanOfficerId'), + (447, 168, 5, 'officeId'), + (448, 168, 6, 'loanOfficerId'), + (449, 168, 1011, 'cycleX'), + (450, 168, 1012, 'cycleY'), + (451, 169, 5, 'officeId'), + (452, 169, 6, 'loanOfficerId'), + (453, 169, 1013, 'fromX'), + (454, 169, 1014, 'toY'), + (455, 170, 5, 'officeId'), + (456, 170, 6, 'loanOfficerId'), + (457, 170, 1013, 'fromX'), + (458, 170, 1014, 'toY'), + (459, 171, 5, 'officeId'), + (460, 171, 6, 'loanOfficerId'), + (461, 172, 5, 'officeId'), + (462, 172, 6, 'loanOfficerId'), + (463, 173, 5, 'officeId'), + (464, 173, 6, 'loanOfficerId'), + (465, 173, 1013, 'fromX'), + (466, 173, 1014, 'toY'), + (467, 173, 1015, 'overdueX'), + (468, 173, 1016, 'overdueY'), + (469, 174, 5, 'officeId'), + (470, 174, 6, 'loanOfficerId'), + (471, 174, 1013, 'fromX'), + (472, 174, 1014, 'toY'), + (473, 175, 5, 'officeId'), + (474, 175, 6, 'loanOfficerId'), + (475, 175, 1013, 'fromX'), + (476, 175, 1014, 'toY'), + (477, 175, 1015, 'overdueX'), + (478, 175, 1016, 'overdueY'), + (479, 176, 5, 'officeId'), + (480, 176, 6, 'loanOfficerId'), + (481, 177, 5, 'officeId'), + (482, 177, 6, 'loanOfficerId'), + (483, 177, 1013, 'fromX'), + (484, 177, 1014, 'toY'), + (485, 178, 5, 'officeId'), + (486, 178, 6, 'loanOfficerId'), + (487, 178, 1013, 'fromX'), + (488, 178, 1014, 'toY'), + (489, 181, 5, 'officeId'), + (490, 180, 5, 'officeId'), + (491, 179, 5, 'officeId'), + (492, 181, 6, 'loanOfficerId'), + (493, 180, 6, 'loanOfficerId'), + (494, 179, 6, 'loanOfficerId'), + (495, 181, 1017, 'loanId'), + (496, 180, 1017, 'loanId'), + (497, 181, 1018, 'clientId'), + (498, 180, 1018, 'clientId'), + (499, 181, 1019, 'groupId'), + (500, 180, 1019, 'groupId'), + (501, 181, 1020, 'loanType'), + (502, 180, 1020, 'loanType'), + (503, 179, 1020, 'loanType'), + (504, 182, 5, 'officeId'), + (505, 183, 5, 'officeId'), + (506, 182, 6, 'loanOfficerId'), + (507, 183, 6, 'loanOfficerId'), + (508, 182, 1018, 'clientId'), + (509, 183, 1018, 'clientId'), + (510, 184, 5, 'officeId'), + (511, 184, 6, 'loanOfficerId'), + (512, 184, 1021, 'savingsId'), + (513, 185, 5, 'officeId'), + (514, 185, 6, 'loanOfficerId'), + (515, 185, 1021, 'savingsId'), + (516, 186, 5, 'officeId'), + (517, 186, 6, 'loanOfficerId'), + (518, 186, 1022, 'savingsTransactionId'), + (519, 187, 5, 'officeId'), + (520, 187, 6, 'loanOfficerId'), + (521, 187, 1022, 'savingsTransactionId'); /*!40000 ALTER TABLE `stretchy_report_parameter` ENABLE KEYS */; -- Dumping structure for table fineract_default.x_registered_table DROP TABLE IF EXISTS `x_registered_table`; -CREATE TABLE IF NOT EXISTS `x_registered_table` ( - `registered_table_name` varchar(50) NOT NULL, - `application_table_name` varchar(50) NOT NULL, - `category` INT NOT NULL DEFAULT '100', - PRIMARY KEY (`registered_table_name`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `x_registered_table` +( + `registered_table_name` + varchar +( + 50 +) NOT NULL, + `application_table_name` varchar +( + 50 +) NOT NULL, + `category` INT NOT NULL DEFAULT '100', + PRIMARY KEY +( + `registered_table_name` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.x_registered_table: ~0 rows (approximately) /*!40000 ALTER TABLE `x_registered_table` DISABLE KEYS */; @@ -6771,13 +13086,30 @@ CREATE TABLE IF NOT EXISTS `x_registered_table` ( -- Dumping structure for table fineract_default.x_table_column_code_mappings DROP TABLE IF EXISTS `x_table_column_code_mappings`; -CREATE TABLE IF NOT EXISTS `x_table_column_code_mappings` ( - `column_alias_name` varchar(50) NOT NULL, - `code_id` INT NOT NULL, - PRIMARY KEY (`column_alias_name`), - KEY `FK_x_code_id` (`code_id`), - CONSTRAINT `FK_x_code_id` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `x_table_column_code_mappings` +( + `column_alias_name` + varchar +( + 50 +) NOT NULL, + `code_id` INT NOT NULL, + PRIMARY KEY +( + `column_alias_name` +), + KEY `FK_x_code_id` +( + `code_id` +), + CONSTRAINT `FK_x_code_id` FOREIGN KEY +( + `code_id` +) REFERENCES `m_code` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table fineract_default.x_table_column_code_mappings: ~0 rows (approximately) /*!40000 ALTER TABLE `x_table_column_code_mappings` DISABLE KEYS */; diff --git a/fineract-provider/src/main/resources/sql/migrations/sample_data/interop_sample_data.sql b/fineract-provider/src/main/resources/sql/migrations/sample_data/interop_sample_data.sql index 7430f378a5a..c1ff865d832 100644 --- a/fineract-provider/src/main/resources/sql/migrations/sample_data/interop_sample_data.sql +++ b/fineract-provider/src/main/resources/sql/migrations/sample_data/interop_sample_data.sql @@ -21,10 +21,13 @@ -- !both tn03, tn04 tenants -- saving product, account -SET @last_saving_prod_id = -1; -SELECT COALESCE(max(id), 1) from m_savings_product into @last_saving_prod_id; +SET +@last_saving_prod_id = -1; +SELECT COALESCE(max(id), 1) +from m_savings_product into @last_saving_prod_id; -SET @saving_prod_name = concat('Saving Product', @last_saving_prod_id); +SET +@saving_prod_name = concat('Saving Product', @last_saving_prod_id); INSERT INTO `m_savings_product` (`name`, `short_name`, `description`, `deposit_type_enum`, `currency_code`, `currency_digits`, @@ -34,10 +37,13 @@ INSERT INTO `m_savings_product` `withdrawal_fee_for_transfer`, `allow_overdraft`, `min_required_balance`, `enforce_min_required_balance`, `min_balance_for_interest_calculation`, `withhold_tax`, `tax_group_id`, `is_dormancy_tracking_active`) VALUES (@saving_prod_name, concat('SP', @last_saving_prod_id), 'Saving Product', 100, 'TZS', 2, NULL, 0.000000, 1, - 4, 1, 360, NULL, 2, NULL, NULL, 0, 0, 0.000000, 1, NULL, 0, NULL, 0); + 4, 1, 360, NULL, 2, NULL, NULL, 0, 0, 0.000000, 1, NULL, 0, NULL, 0); -SET @saving_prod_id = -1; -SELECT id FROM m_savings_product WHERE name = @saving_prod_name INTO @saving_prod_id; +SET +@saving_prod_id = -1; +SELECT id +FROM m_savings_product +WHERE name = @saving_prod_name INTO @saving_prod_id; -- interop_identifier @@ -45,38 +51,61 @@ SELECT id FROM m_savings_product WHERE name = @saving_prod_name INTO @saving_pro -- gl_account, mappings -- ASSET-1, LIABILITY-2, EQUITY-3, INCOME-4, EXPENSE-5 -SET @payment_type_id = -1; -SELECT id FROM m_payment_type WHERE value = 'Money Transfer' INTO @payment_type_id; - -SET @saving_gl_name = 'Interoperation Saving'; -INSERT INTO `acc_gl_account` (`name`, `parent_id`, `hierarchy`, `gl_code`, `disabled`, `manual_journal_entries_allowed`, `account_usage`, `classification_enum`, `description`) -VALUES (@saving_gl_name, NULL, NULL, 'Interop_Saving', 0, 1, 1, 1, 'Interoperation Saving Asset'); -- account_usage: DETAIL, classification_enum: ASSET - -INSERT INTO `acc_product_mapping` (`gl_account_id`, `product_id`, `product_type`, `payment_type`, `charge_id`, `financial_account_type`) -VALUES ((SELECT id FROM acc_gl_account WHERE name = @saving_gl_name), @saving_prod_id, 2, @payment_type_id, NULL, 1); -- product_type: SAVING, financial_account_type: ASSET - -SET @nostro_gl_name = 'Interoperation NOSTRO'; -INSERT INTO `acc_gl_account` (`name`, `parent_id`, `hierarchy`, `gl_code`, `disabled`, `manual_journal_entries_allowed`, `account_usage`, `classification_enum`, `description`) -VALUES (@nostro_gl_name, NULL, NULL, 'Interop_Nostro', 0, 0, 1, 2, 'Interoperation NOSTRO Liability'); -- account_usage: DETAIL, classification_enum: LIABILITY - -INSERT INTO `acc_product_mapping` (`gl_account_id`, `product_id`, `product_type`, `payment_type`, `charge_id`, `financial_account_type`) -VALUES ((SELECT id FROM acc_gl_account WHERE name = @nostro_gl_name), @saving_prod_id, 2, NULL, NULL, 2); -- product_type: SAVING, financial_account_type: LIABILITY - -SET @fee_gl_name = 'Interoperation Fee'; -INSERT INTO `acc_gl_account` (`name`, `parent_id`, `hierarchy`, `gl_code`, `disabled`, `manual_journal_entries_allowed`, `account_usage`, `classification_enum`, `description`) -VALUES (@fee_gl_name, NULL, NULL, 'Interop_Fee', 0, 0, 1, 4, 'Interoperation Fee Income'); -- account_usage: DETAIL, classification_enum: INCOME - -SET @fee_gl_id = -1; -SELECT id FROM acc_gl_account WHERE name = @fee_gl_name INTO @fee_gl_id; - -INSERT INTO `acc_product_mapping` (`gl_account_id`, `product_id`, `product_type`, `payment_type`, `charge_id`, `financial_account_type`) +SET +@payment_type_id = -1; +SELECT id +FROM m_payment_type +WHERE value = 'Money Transfer' INTO @payment_type_id; + +SET +@saving_gl_name = 'Interoperation Saving'; +INSERT INTO `acc_gl_account` (`name`, `parent_id`, `hierarchy`, `gl_code`, `disabled`, `manual_journal_entries_allowed`, + `account_usage`, `classification_enum`, `description`) +VALUES (@saving_gl_name, NULL, NULL, 'Interop_Saving', 0, 1, 1, 1, + 'Interoperation Saving Asset'); -- account_usage: DETAIL, classification_enum: ASSET + +INSERT INTO `acc_product_mapping` (`gl_account_id`, `product_id`, `product_type`, `payment_type`, `charge_id`, + `financial_account_type`) +VALUES ((SELECT id FROM acc_gl_account WHERE name = @saving_gl_name), @saving_prod_id, 2, @payment_type_id, NULL, + 1); -- product_type: SAVING, financial_account_type: ASSET + +SET +@nostro_gl_name = 'Interoperation NOSTRO'; +INSERT INTO `acc_gl_account` (`name`, `parent_id`, `hierarchy`, `gl_code`, `disabled`, `manual_journal_entries_allowed`, + `account_usage`, `classification_enum`, `description`) +VALUES (@nostro_gl_name, NULL, NULL, 'Interop_Nostro', 0, 0, 1, 2, + 'Interoperation NOSTRO Liability'); -- account_usage: DETAIL, classification_enum: LIABILITY + +INSERT INTO `acc_product_mapping` (`gl_account_id`, `product_id`, `product_type`, `payment_type`, `charge_id`, + `financial_account_type`) +VALUES ((SELECT id FROM acc_gl_account WHERE name = @nostro_gl_name), @saving_prod_id, 2, NULL, NULL, + 2); -- product_type: SAVING, financial_account_type: LIABILITY + +SET +@fee_gl_name = 'Interoperation Fee'; +INSERT INTO `acc_gl_account` (`name`, `parent_id`, `hierarchy`, `gl_code`, `disabled`, `manual_journal_entries_allowed`, + `account_usage`, `classification_enum`, `description`) +VALUES (@fee_gl_name, NULL, NULL, 'Interop_Fee', 0, 0, 1, 4, + 'Interoperation Fee Income'); -- account_usage: DETAIL, classification_enum: INCOME + +SET +@fee_gl_id = -1; +SELECT id +FROM acc_gl_account +WHERE name = @fee_gl_name INTO @fee_gl_id; + +INSERT INTO `acc_product_mapping` (`gl_account_id`, `product_id`, `product_type`, `payment_type`, `charge_id`, + `financial_account_type`) VALUES (@fee_gl_id, @saving_prod_id, 2, NULL, NULL, 4); -- product_type: SAVING, financial_account_type: INCOME -SET @charge_name = 'Interoperation Withdraw Fee'; +SET +@charge_name = 'Interoperation Withdraw Fee'; INSERT INTO `m_charge` -(`name`,`currency_code`,`charge_applies_to_enum`,`charge_time_enum`,`charge_calculation_enum`,`charge_payment_mode_enum`, - `amount`,`fee_on_day`,`fee_interval`,`fee_on_month`,`is_penalty`,`is_active`,`is_deleted`,`min_cap`,`max_cap`,`fee_frequency`, - `income_or_liability_account_id`,`tax_group_id`) +(`name`, `currency_code`, `charge_applies_to_enum`, `charge_time_enum`, `charge_calculation_enum`, + `charge_payment_mode_enum`, + `amount`, `fee_on_day`, `fee_interval`, `fee_on_month`, `is_penalty`, `is_active`, `is_deleted`, `min_cap`, `max_cap`, + `fee_frequency`, + `income_or_liability_account_id`, `tax_group_id`) VALUES (@charge_name, 'TZS', 2, 5, 1, NULL, 1.000000, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, @fee_gl_id, NULL); -- loan product diff --git a/fineract-provider/src/main/resources/sql/migrations/sample_data/load_sample_data.sql b/fineract-provider/src/main/resources/sql/migrations/sample_data/load_sample_data.sql index f800b6fa8a5..fdcec97804a 100644 --- a/fineract-provider/src/main/resources/sql/migrations/sample_data/load_sample_data.sql +++ b/fineract-provider/src/main/resources/sql/migrations/sample_data/load_sample_data.sql @@ -31,25 +31,70 @@ -- Dumping structure for table mifostenant-reference.acc_accounting_rule DROP TABLE IF EXISTS `acc_accounting_rule`; -CREATE TABLE IF NOT EXISTS `acc_accounting_rule` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL, - `office_id` BIGINT DEFAULT NULL, - `debit_account_id` BIGINT DEFAULT NULL, - `allow_multiple_debits` tinyint NOT NULL DEFAULT '0', - `credit_account_id` BIGINT DEFAULT NULL, - `allow_multiple_credits` tinyint NOT NULL DEFAULT '0', - `description` varchar(500) DEFAULT NULL, - `system_defined` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `accounting_rule_name_unique` (`name`), - KEY `FK_acc_accounting_rule_acc_gl_account_debit` (`debit_account_id`), - KEY `FK_acc_accounting_rule_acc_gl_account_credit` (`credit_account_id`), - KEY `FK_acc_accounting_rule_m_office` (`office_id`), - CONSTRAINT `FK_acc_accounting_rule_acc_gl_account_credit` FOREIGN KEY (`credit_account_id`) REFERENCES `acc_gl_account` (`id`), - CONSTRAINT `FK_acc_accounting_rule_acc_gl_account_debit` FOREIGN KEY (`debit_account_id`) REFERENCES `acc_gl_account` (`id`), - CONSTRAINT `FK_acc_accounting_rule_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `acc_accounting_rule` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `name` + varchar +( + 100 +) DEFAULT NULL, + `office_id` BIGINT DEFAULT NULL, + `debit_account_id` BIGINT DEFAULT NULL, + `allow_multiple_debits` tinyint NOT NULL DEFAULT '0', + `credit_account_id` BIGINT DEFAULT NULL, + `allow_multiple_credits` tinyint NOT NULL DEFAULT '0', + `description` varchar +( + 500 +) DEFAULT NULL, + `system_defined` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY +( + `id` +), + UNIQUE KEY `accounting_rule_name_unique` +( + `name` +), + KEY `FK_acc_accounting_rule_acc_gl_account_debit` +( + `debit_account_id` +), + KEY `FK_acc_accounting_rule_acc_gl_account_credit` +( + `credit_account_id` +), + KEY `FK_acc_accounting_rule_m_office` +( + `office_id` +), + CONSTRAINT `FK_acc_accounting_rule_acc_gl_account_credit` FOREIGN KEY +( + `credit_account_id` +) REFERENCES `acc_gl_account` +( + `id` +), + CONSTRAINT `FK_acc_accounting_rule_acc_gl_account_debit` FOREIGN KEY +( + `debit_account_id` +) REFERENCES `acc_gl_account` +( + `id` +), + CONSTRAINT `FK_acc_accounting_rule_m_office` FOREIGN KEY +( + `office_id` +) REFERENCES `m_office` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.acc_accounting_rule: ~0 rows (approximately) /*!40000 ALTER TABLE `acc_accounting_rule` DISABLE KEYS */; @@ -58,108 +103,220 @@ CREATE TABLE IF NOT EXISTS `acc_accounting_rule` ( -- Dumping structure for table mifostenant-reference.acc_gl_account DROP TABLE IF EXISTS `acc_gl_account`; -CREATE TABLE IF NOT EXISTS `acc_gl_account` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(200) NOT NULL, - `parent_id` BIGINT DEFAULT NULL, - `hierarchy` varchar(50) DEFAULT NULL, - `gl_code` varchar(45) NOT NULL, - `disabled` tinyint NOT NULL DEFAULT '0', - `manual_journal_entries_allowed` tinyint NOT NULL DEFAULT '1', - `account_usage` tinyint NOT NULL DEFAULT '2', - `classification_enum` SMALLINT NOT NULL, - `tag_id` INT DEFAULT NULL, - `description` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `acc_gl_code` (`gl_code`), - KEY `FK_ACC_0000000001` (`parent_id`), - KEY `FKGLACC000000002` (`tag_id`), - CONSTRAINT `FKGLACC000000002` FOREIGN KEY (`tag_id`) REFERENCES `m_code_value` (`id`), - CONSTRAINT `FK_ACC_0000000001` FOREIGN KEY (`parent_id`) REFERENCES `acc_gl_account` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `acc_gl_account` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `name` + varchar +( + 200 +) NOT NULL, + `parent_id` BIGINT DEFAULT NULL, + `hierarchy` varchar +( + 50 +) DEFAULT NULL, + `gl_code` varchar +( + 45 +) NOT NULL, + `disabled` tinyint NOT NULL DEFAULT '0', + `manual_journal_entries_allowed` tinyint NOT NULL DEFAULT '1', + `account_usage` tinyint NOT NULL DEFAULT '2', + `classification_enum` SMALLINT NOT NULL, + `tag_id` INT DEFAULT NULL, + `description` varchar +( + 500 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `acc_gl_code` +( + `gl_code` +), + KEY `FK_ACC_0000000001` +( + `parent_id` +), + KEY `FKGLACC000000002` +( + `tag_id` +), + CONSTRAINT `FKGLACC000000002` FOREIGN KEY +( + `tag_id` +) REFERENCES `m_code_value` +( + `id` +), + CONSTRAINT `FK_ACC_0000000001` FOREIGN KEY +( + `parent_id` +) REFERENCES `acc_gl_account` +( + `id` +) + ) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.acc_gl_account: ~55 rows (approximately) /*!40000 ALTER TABLE `acc_gl_account` DISABLE KEYS */; -INSERT INTO `acc_gl_account` (`id`, `name`, `parent_id`, `hierarchy`, `gl_code`, `disabled`, `manual_journal_entries_allowed`, `account_usage`, `classification_enum`, `tag_id`, `description`) VALUES - (1, 'Deposit Accounts Portfolio', NULL, '.', '10100', 0, 1, 2, 2, NULL, NULL), - (2, 'Overpayment Liability', NULL, '.', '10200', 0, 1, 1, 2, NULL, NULL), - (3, 'Interest Payable', NULL, '.', '10300', 0, 1, 2, 2, NULL, NULL), - (4, 'Pass-Through Collections', NULL, '.', '10400', 0, 1, 2, 2, NULL, NULL), - (5, 'External Credits and Borrowings', NULL, '.', '10500', 0, 1, 2, 2, NULL, NULL), - (6, 'Accrued Expenses and Provisions', NULL, '.', '10600', 0, 1, 2, 2, NULL, NULL), - (7, 'Other Liabilities', NULL, '.', '10700', 0, 1, 2, 2, NULL, NULL), - (8, 'Fixed Assets', NULL, '.', '20100', 0, 1, 2, 1, NULL, NULL), - (9, 'Investments', NULL, '.', '20200', 0, 1, 2, 1, NULL, NULL), - (10, 'Cash', NULL, '.', '20300', 0, 1, 2, 1, NULL, NULL), - (11, 'Bank Accounts', NULL, '.', '20400', 0, 1, 2, 1, NULL, NULL), - (12, 'Lending Portfolio', NULL, '.', '20500', 0, 1, 2, 1, NULL, NULL), - (13, 'Interest and Fees Receivable', NULL, '.', '20600', 0, 1, 2, 1, NULL, NULL), - (14, 'Advance Payments', NULL, '.', '20700', 0, 1, 2, 1, NULL, NULL), - (15, 'Reserves for Possible Losses', NULL, '.', '20800', 0, 1, 2, 1, NULL, NULL), - (16, 'Accrued Income', NULL, '.', '20900', 0, 1, 2, 1, NULL, NULL), - (17, 'Suspense Account', NULL, '.', '9999', 0, 1, 1, 1, NULL, NULL), - (18, 'Portfolio Earnings', NULL, '.', '30100', 0, 1, 2, 4, NULL, NULL), - (19, 'Non Portfolio Income', NULL, '.', '30200', 0, 1, 2, 4, NULL, NULL), - (20, 'Portfolio Expenses', NULL, '.', '40100', 0, 1, 2, 5, NULL, NULL), - (21, 'General And Administrative Expenses', NULL, '.', '40200', 0, 1, 2, 5, NULL, NULL), - (22, 'Sundry Expenses', NULL, '.', '40800', 0, 1, 2, 5, NULL, NULL), - (23, 'Repairs and Maintenance', NULL, '.', '40900', 0, 1, 2, 5, NULL, NULL), - (24, 'Depreciation and Amortization', NULL, '.', '41000', 0, 1, 2, 5, NULL, NULL), - (25, 'Equity and Share Capital', NULL, '.', '50100', 0, 1, 2, 3, NULL, NULL), - (26, 'Opening Balances Contra Account', NULL, '.', '9099', 0, 1, 2, 3, NULL, NULL), - (27, 'Voluntary Savings', 1, '.1.', '10101', 0, 1, 2, 2, NULL, NULL), - (28, 'Mandatory Savings', 1, '.1.', '10102', 0, 1, 2, 2, NULL, NULL), - (29, 'Term Deposits', 1, '.1.', '10103', 0, 1, 2, 2, NULL, NULL), - (30, 'Recurring Deposits', 1, '.1.', '10104', 0, 1, 1, 2, NULL, NULL), - (31, 'Furniture and Fixtures', 8, '.8.', '20101', 0, 1, 1, 1, NULL, NULL), - (32, 'Cash In Hand', 10, '.10.', '20301', 0, 1, 1, 1, NULL, NULL), - (33, 'Petty Cash', 10, '.10.', '20302', 0, 1, 1, 1, NULL, NULL), - (34, 'Loans to Customers', 12, '.12.', '20501', 0, 1, 1, 1, NULL, NULL), - (35, 'Current Account Overdrafts', 12, '.12.', '20502', 0, 1, 1, 1, NULL, NULL), - (36, 'Fees and Charges', 18, '.18.', '30101', 0, 1, 1, 4, NULL, NULL), - (37, 'Penalties', 18, '.18.', '30102', 0, 1, 1, 4, NULL, NULL), - (38, 'Interest Received from Borrowers', 18, '.18.', '30103', 0, 1, 1, 4, NULL, NULL), - (39, 'Insurance Charges', 18, '.18.', '30104', 0, 1, 1, 4, NULL, NULL), - (40, 'Other Operating Income', 18, '.18.', '30105', 0, 1, 1, 4, NULL, NULL), - (41, 'Losses Written Off', 20, '.20.', '40101', 0, 1, 1, 5, NULL, NULL), - (42, 'Interest Paid To Depositors', 20, '.20.', '40102', 0, 1, 1, 5, NULL, NULL), - (43, 'Loan Collection Expenses', 20, '.20.', '40103', 0, 1, 1, 5, NULL, NULL), - (44, 'Salaries and Wages', 21, '.21.', '40300', 0, 1, 1, 5, NULL, NULL), - (45, 'Professional Expenses', 21, '.21.', '40400', 0, 1, 1, 5, NULL, NULL), - (46, 'Travel and Conveyance Expenses', 21, '.21.', '40500', 0, 1, 1, 5, NULL, NULL), - (47, 'Training Expenses', 21, '.21.', '40600', 0, 1, 1, 5, NULL, NULL), - (48, 'Office Expenses', 21, '.21.', '40700', 0, 1, 2, 5, NULL, NULL), - (49, 'Printing and Stationery', 48, '.21.48.', '40701', 0, 1, 1, 5, NULL, NULL), - (50, 'Telephone Charges', 48, '.21.48.', '40702', 0, 1, 1, 5, NULL, NULL), - (51, 'Electricity Charges', 48, '.21.48.', '40703', 0, 1, 1, 5, NULL, NULL), - (52, 'Rent Paid', 48, '.21.48.', '40704', 0, 1, 1, 5, NULL, NULL), - (53, 'Internet Charges', 48, '.21.48.', '40705', 0, 1, 1, 5, NULL, NULL), - (54, 'Loan Recovery (Temp)', NULL, '.', '220002-Temp', 0, 1, 1, 4, NULL, 'Temporary account to track income from Loan recovery'), - (55, 'Liability Transfer (Temp)', NULL, '.', '220004-Temp', 0, 1, 1, 2, NULL, 'Temporary Liability account to track Account Transfers'); +INSERT INTO `acc_gl_account` (`id`, `name`, `parent_id`, `hierarchy`, `gl_code`, `disabled`, + `manual_journal_entries_allowed`, `account_usage`, `classification_enum`, `tag_id`, + `description`) +VALUES (1, 'Deposit Accounts Portfolio', NULL, '.', '10100', 0, 1, 2, 2, NULL, NULL), + (2, 'Overpayment Liability', NULL, '.', '10200', 0, 1, 1, 2, NULL, NULL), + (3, 'Interest Payable', NULL, '.', '10300', 0, 1, 2, 2, NULL, NULL), + (4, 'Pass-Through Collections', NULL, '.', '10400', 0, 1, 2, 2, NULL, NULL), + (5, 'External Credits and Borrowings', NULL, '.', '10500', 0, 1, 2, 2, NULL, NULL), + (6, 'Accrued Expenses and Provisions', NULL, '.', '10600', 0, 1, 2, 2, NULL, NULL), + (7, 'Other Liabilities', NULL, '.', '10700', 0, 1, 2, 2, NULL, NULL), + (8, 'Fixed Assets', NULL, '.', '20100', 0, 1, 2, 1, NULL, NULL), + (9, 'Investments', NULL, '.', '20200', 0, 1, 2, 1, NULL, NULL), + (10, 'Cash', NULL, '.', '20300', 0, 1, 2, 1, NULL, NULL), + (11, 'Bank Accounts', NULL, '.', '20400', 0, 1, 2, 1, NULL, NULL), + (12, 'Lending Portfolio', NULL, '.', '20500', 0, 1, 2, 1, NULL, NULL), + (13, 'Interest and Fees Receivable', NULL, '.', '20600', 0, 1, 2, 1, NULL, NULL), + (14, 'Advance Payments', NULL, '.', '20700', 0, 1, 2, 1, NULL, NULL), + (15, 'Reserves for Possible Losses', NULL, '.', '20800', 0, 1, 2, 1, NULL, NULL), + (16, 'Accrued Income', NULL, '.', '20900', 0, 1, 2, 1, NULL, NULL), + (17, 'Suspense Account', NULL, '.', '9999', 0, 1, 1, 1, NULL, NULL), + (18, 'Portfolio Earnings', NULL, '.', '30100', 0, 1, 2, 4, NULL, NULL), + (19, 'Non Portfolio Income', NULL, '.', '30200', 0, 1, 2, 4, NULL, NULL), + (20, 'Portfolio Expenses', NULL, '.', '40100', 0, 1, 2, 5, NULL, NULL), + (21, 'General And Administrative Expenses', NULL, '.', '40200', 0, 1, 2, 5, NULL, NULL), + (22, 'Sundry Expenses', NULL, '.', '40800', 0, 1, 2, 5, NULL, NULL), + (23, 'Repairs and Maintenance', NULL, '.', '40900', 0, 1, 2, 5, NULL, NULL), + (24, 'Depreciation and Amortization', NULL, '.', '41000', 0, 1, 2, 5, NULL, NULL), + (25, 'Equity and Share Capital', NULL, '.', '50100', 0, 1, 2, 3, NULL, NULL), + (26, 'Opening Balances Contra Account', NULL, '.', '9099', 0, 1, 2, 3, NULL, NULL), + (27, 'Voluntary Savings', 1, '.1.', '10101', 0, 1, 2, 2, NULL, NULL), + (28, 'Mandatory Savings', 1, '.1.', '10102', 0, 1, 2, 2, NULL, NULL), + (29, 'Term Deposits', 1, '.1.', '10103', 0, 1, 2, 2, NULL, NULL), + (30, 'Recurring Deposits', 1, '.1.', '10104', 0, 1, 1, 2, NULL, NULL), + (31, 'Furniture and Fixtures', 8, '.8.', '20101', 0, 1, 1, 1, NULL, NULL), + (32, 'Cash In Hand', 10, '.10.', '20301', 0, 1, 1, 1, NULL, NULL), + (33, 'Petty Cash', 10, '.10.', '20302', 0, 1, 1, 1, NULL, NULL), + (34, 'Loans to Customers', 12, '.12.', '20501', 0, 1, 1, 1, NULL, NULL), + (35, 'Current Account Overdrafts', 12, '.12.', '20502', 0, 1, 1, 1, NULL, NULL), + (36, 'Fees and Charges', 18, '.18.', '30101', 0, 1, 1, 4, NULL, NULL), + (37, 'Penalties', 18, '.18.', '30102', 0, 1, 1, 4, NULL, NULL), + (38, 'Interest Received from Borrowers', 18, '.18.', '30103', 0, 1, 1, 4, NULL, NULL), + (39, 'Insurance Charges', 18, '.18.', '30104', 0, 1, 1, 4, NULL, NULL), + (40, 'Other Operating Income', 18, '.18.', '30105', 0, 1, 1, 4, NULL, NULL), + (41, 'Losses Written Off', 20, '.20.', '40101', 0, 1, 1, 5, NULL, NULL), + (42, 'Interest Paid To Depositors', 20, '.20.', '40102', 0, 1, 1, 5, NULL, NULL), + (43, 'Loan Collection Expenses', 20, '.20.', '40103', 0, 1, 1, 5, NULL, NULL), + (44, 'Salaries and Wages', 21, '.21.', '40300', 0, 1, 1, 5, NULL, NULL), + (45, 'Professional Expenses', 21, '.21.', '40400', 0, 1, 1, 5, NULL, NULL), + (46, 'Travel and Conveyance Expenses', 21, '.21.', '40500', 0, 1, 1, 5, NULL, NULL), + (47, 'Training Expenses', 21, '.21.', '40600', 0, 1, 1, 5, NULL, NULL), + (48, 'Office Expenses', 21, '.21.', '40700', 0, 1, 2, 5, NULL, NULL), + (49, 'Printing and Stationery', 48, '.21.48.', '40701', 0, 1, 1, 5, NULL, NULL), + (50, 'Telephone Charges', 48, '.21.48.', '40702', 0, 1, 1, 5, NULL, NULL), + (51, 'Electricity Charges', 48, '.21.48.', '40703', 0, 1, 1, 5, NULL, NULL), + (52, 'Rent Paid', 48, '.21.48.', '40704', 0, 1, 1, 5, NULL, NULL), + (53, 'Internet Charges', 48, '.21.48.', '40705', 0, 1, 1, 5, NULL, NULL), + (54, 'Loan Recovery (Temp)', NULL, '.', '220002-Temp', 0, 1, 1, 4, NULL, + 'Temporary account to track income from Loan recovery'), + (55, 'Liability Transfer (Temp)', NULL, '.', '220004-Temp', 0, 1, 1, 2, NULL, + 'Temporary Liability account to track Account Transfers'); /*!40000 ALTER TABLE `acc_gl_account` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.acc_gl_closure DROP TABLE IF EXISTS `acc_gl_closure`; -CREATE TABLE IF NOT EXISTS `acc_gl_closure` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `office_id` BIGINT NOT NULL, - `closing_date` date NOT NULL, - `is_deleted` INT NOT NULL DEFAULT '0', - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - `comments` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `office_id_closing_date` (`office_id`,`closing_date`), - KEY `FK_acc_gl_closure_m_office` (`office_id`), - KEY `FK_acc_gl_closure_m_appuser` (`createdby_id`), - KEY `FK_acc_gl_closure_m_appuser_2` (`lastmodifiedby_id`), - CONSTRAINT `FK_acc_gl_closure_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_closure_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_closure_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `acc_gl_closure` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `office_id` + BIGINT + NOT + NULL, + `closing_date` + date + NOT + NULL, + `is_deleted` + INT + NOT + NULL + DEFAULT + '0', + `createdby_id` + BIGINT + DEFAULT + NULL, + `lastmodifiedby_id` + BIGINT + DEFAULT + NULL, + `created_date` + datetime + DEFAULT + NULL, + `lastmodified_date` + datetime + DEFAULT + NULL, + `comments` + varchar +( + 500 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `office_id_closing_date` +( + `office_id`, + `closing_date` +), + KEY `FK_acc_gl_closure_m_office` +( + `office_id` +), + KEY `FK_acc_gl_closure_m_appuser` +( + `createdby_id` +), + KEY `FK_acc_gl_closure_m_appuser_2` +( + `lastmodifiedby_id` +), + CONSTRAINT `FK_acc_gl_closure_m_appuser` FOREIGN KEY +( + `createdby_id` +) REFERENCES `m_appuser` +( + `id` +), + CONSTRAINT `FK_acc_gl_closure_m_appuser_2` FOREIGN KEY +( + `lastmodifiedby_id` +) REFERENCES `m_appuser` +( + `id` +), + CONSTRAINT `FK_acc_gl_closure_m_office` FOREIGN KEY +( + `office_id` +) REFERENCES `m_office` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.acc_gl_closure: ~0 rows (approximately) /*!40000 ALTER TABLE `acc_gl_closure` DISABLE KEYS */; @@ -168,75 +325,236 @@ CREATE TABLE IF NOT EXISTS `acc_gl_closure` ( -- Dumping structure for table mifostenant-reference.acc_gl_financial_activity_account DROP TABLE IF EXISTS `acc_gl_financial_activity_account`; -CREATE TABLE IF NOT EXISTS `acc_gl_financial_activity_account` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `gl_account_id` BIGINT NOT NULL DEFAULT '0', - `financial_activity_type` SMALLINT NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `financial_activity_type` (`financial_activity_type`), - KEY `FK_office_mapping_acc_gl_account` (`gl_account_id`), - CONSTRAINT `FK_office_mapping_acc_gl_account` FOREIGN KEY (`gl_account_id`) REFERENCES `acc_gl_account` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `acc_gl_financial_activity_account` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `gl_account_id` + BIGINT + NOT + NULL + DEFAULT + '0', + `financial_activity_type` + SMALLINT + NOT + NULL, + PRIMARY + KEY +( + `id` +), + UNIQUE KEY `financial_activity_type` +( + `financial_activity_type` +), + KEY `FK_office_mapping_acc_gl_account` +( + `gl_account_id` +), + CONSTRAINT `FK_office_mapping_acc_gl_account` FOREIGN KEY +( + `gl_account_id` +) REFERENCES `acc_gl_account` +( + `id` +) + ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.acc_gl_financial_activity_account: ~0 rows (approximately) /*!40000 ALTER TABLE `acc_gl_financial_activity_account` DISABLE KEYS */; -INSERT INTO `acc_gl_financial_activity_account` (`id`, `gl_account_id`, `financial_activity_type`) VALUES - (1, 55, 200); +INSERT INTO `acc_gl_financial_activity_account` (`id`, `gl_account_id`, `financial_activity_type`) +VALUES (1, 55, 200); /*!40000 ALTER TABLE `acc_gl_financial_activity_account` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.acc_gl_journal_entry DROP TABLE IF EXISTS `acc_gl_journal_entry`; -CREATE TABLE IF NOT EXISTS `acc_gl_journal_entry` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_id` BIGINT NOT NULL, - `office_id` BIGINT NOT NULL, - `reversal_id` BIGINT DEFAULT NULL, - `currency_code` varchar(3) NOT NULL, - `transaction_id` varchar(50) NOT NULL, - `loan_transaction_id` BIGINT DEFAULT NULL, - `savings_transaction_id` BIGINT DEFAULT NULL, - `client_transaction_id` BIGINT DEFAULT NULL, - `reversed` tinyint NOT NULL DEFAULT '0', - `ref_num` varchar(100) DEFAULT NULL, - `manual_entry` tinyint NOT NULL DEFAULT '0', - `entry_date` date NOT NULL, - `type_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `description` varchar(500) DEFAULT NULL, - `entity_type_enum` SMALLINT DEFAULT NULL, - `entity_id` BIGINT DEFAULT NULL, - `createdby_id` BIGINT NOT NULL, - `lastmodifiedby_id` BIGINT NOT NULL, - `created_date` datetime NOT NULL, - `lastmodified_date` datetime NOT NULL, - `is_running_balance_calculated` TINYINT NOT NULL DEFAULT '0', - `office_running_balance` decimal(19,6) NOT NULL DEFAULT '0.000000', - `organization_running_balance` decimal(19,6) NOT NULL DEFAULT '0.000000', - `payment_details_id` BIGINT DEFAULT NULL, - `share_transaction_id` BIGINT DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_acc_gl_journal_entry_m_office` (`office_id`), - KEY `FK_acc_gl_journal_entry_m_appuser` (`createdby_id`), - KEY `FK_acc_gl_journal_entry_m_appuser_2` (`lastmodifiedby_id`), - KEY `FK_acc_gl_journal_entry_acc_gl_journal_entry` (`reversal_id`), - KEY `FK_acc_gl_journal_entry_acc_gl_account` (`account_id`), - KEY `FK_acc_gl_journal_entry_m_loan_transaction` (`loan_transaction_id`), - KEY `FK_acc_gl_journal_entry_m_savings_account_transaction` (`savings_transaction_id`), - KEY `FK_acc_gl_journal_entry_m_payment_detail` (`payment_details_id`), - KEY `FK_acc_gl_journal_entry_m_client_transaction` (`client_transaction_id`), - KEY `FK_acc_gl_journal_entry_m_share_account_transaction` (`share_transaction_id`), - CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_account` FOREIGN KEY (`account_id`) REFERENCES `acc_gl_account` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_journal_entry` FOREIGN KEY (`reversal_id`) REFERENCES `acc_gl_journal_entry` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_appuser` FOREIGN KEY (`createdby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_appuser_2` FOREIGN KEY (`lastmodifiedby_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_client_transaction` FOREIGN KEY (`client_transaction_id`) REFERENCES `m_client_transaction` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_loan_transaction` FOREIGN KEY (`loan_transaction_id`) REFERENCES `m_loan_transaction` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_office` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_payment_detail` FOREIGN KEY (`payment_details_id`) REFERENCES `m_payment_detail` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_savings_account_transaction` FOREIGN KEY (`savings_transaction_id`) REFERENCES `m_savings_account_transaction` (`id`), - CONSTRAINT `FK_acc_gl_journal_entry_m_share_account_transaction` FOREIGN KEY (`share_transaction_id`) REFERENCES `m_share_account_transactions` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `acc_gl_journal_entry` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `account_id` + BIGINT + NOT + NULL, + `office_id` + BIGINT + NOT + NULL, + `reversal_id` + BIGINT + DEFAULT + NULL, + `currency_code` + varchar +( + 3 +) NOT NULL, + `transaction_id` varchar +( + 50 +) NOT NULL, + `loan_transaction_id` BIGINT DEFAULT NULL, + `savings_transaction_id` BIGINT DEFAULT NULL, + `client_transaction_id` BIGINT DEFAULT NULL, + `reversed` tinyint NOT NULL DEFAULT '0', + `ref_num` varchar +( + 100 +) DEFAULT NULL, + `manual_entry` tinyint NOT NULL DEFAULT '0', + `entry_date` date NOT NULL, + `type_enum` SMALLINT NOT NULL, + `amount` decimal +( + 19, + 6 +) NOT NULL, + `description` varchar +( + 500 +) DEFAULT NULL, + `entity_type_enum` SMALLINT DEFAULT NULL, + `entity_id` BIGINT DEFAULT NULL, + `createdby_id` BIGINT NOT NULL, + `lastmodifiedby_id` BIGINT NOT NULL, + `created_date` datetime NOT NULL, + `lastmodified_date` datetime NOT NULL, + `is_running_balance_calculated` TINYINT NOT NULL DEFAULT '0', + `office_running_balance` decimal +( + 19, + 6 +) NOT NULL DEFAULT '0.000000', + `organization_running_balance` decimal +( + 19, + 6 +) NOT NULL DEFAULT '0.000000', + `payment_details_id` BIGINT DEFAULT NULL, + `share_transaction_id` BIGINT DEFAULT NULL, + PRIMARY KEY +( + `id` +), + KEY `FK_acc_gl_journal_entry_m_office` +( + `office_id` +), + KEY `FK_acc_gl_journal_entry_m_appuser` +( + `createdby_id` +), + KEY `FK_acc_gl_journal_entry_m_appuser_2` +( + `lastmodifiedby_id` +), + KEY `FK_acc_gl_journal_entry_acc_gl_journal_entry` +( + `reversal_id` +), + KEY `FK_acc_gl_journal_entry_acc_gl_account` +( + `account_id` +), + KEY `FK_acc_gl_journal_entry_m_loan_transaction` +( + `loan_transaction_id` +), + KEY `FK_acc_gl_journal_entry_m_savings_account_transaction` +( + `savings_transaction_id` +), + KEY `FK_acc_gl_journal_entry_m_payment_detail` +( + `payment_details_id` +), + KEY `FK_acc_gl_journal_entry_m_client_transaction` +( + `client_transaction_id` +), + KEY `FK_acc_gl_journal_entry_m_share_account_transaction` +( + `share_transaction_id` +), + CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_account` FOREIGN KEY +( + `account_id` +) REFERENCES `acc_gl_account` +( + `id` +), + CONSTRAINT `FK_acc_gl_journal_entry_acc_gl_journal_entry` FOREIGN KEY +( + `reversal_id` +) REFERENCES `acc_gl_journal_entry` +( + `id` +), + CONSTRAINT `FK_acc_gl_journal_entry_m_appuser` FOREIGN KEY +( + `createdby_id` +) REFERENCES `m_appuser` +( + `id` +), + CONSTRAINT `FK_acc_gl_journal_entry_m_appuser_2` FOREIGN KEY +( + `lastmodifiedby_id` +) REFERENCES `m_appuser` +( + `id` +), + CONSTRAINT `FK_acc_gl_journal_entry_m_client_transaction` FOREIGN KEY +( + `client_transaction_id` +) REFERENCES `m_client_transaction` +( + `id` +), + CONSTRAINT `FK_acc_gl_journal_entry_m_loan_transaction` FOREIGN KEY +( + `loan_transaction_id` +) REFERENCES `m_loan_transaction` +( + `id` +), + CONSTRAINT `FK_acc_gl_journal_entry_m_office` FOREIGN KEY +( + `office_id` +) REFERENCES `m_office` +( + `id` +), + CONSTRAINT `FK_acc_gl_journal_entry_m_payment_detail` FOREIGN KEY +( + `payment_details_id` +) REFERENCES `m_payment_detail` +( + `id` +), + CONSTRAINT `FK_acc_gl_journal_entry_m_savings_account_transaction` FOREIGN KEY +( + `savings_transaction_id` +) REFERENCES `m_savings_account_transaction` +( + `id` +), + CONSTRAINT `FK_acc_gl_journal_entry_m_share_account_transaction` FOREIGN KEY +( + `share_transaction_id` +) REFERENCES `m_share_account_transactions` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.acc_gl_journal_entry: ~0 rows (approximately) /*!40000 ALTER TABLE `acc_gl_journal_entry` DISABLE KEYS */; @@ -245,59 +563,146 @@ CREATE TABLE IF NOT EXISTS `acc_gl_journal_entry` ( -- Dumping structure for table mifostenant-reference.acc_product_mapping DROP TABLE IF EXISTS `acc_product_mapping`; -CREATE TABLE IF NOT EXISTS `acc_product_mapping` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `gl_account_id` BIGINT DEFAULT NULL, - `product_id` BIGINT DEFAULT NULL, - `product_type` SMALLINT DEFAULT NULL, - `payment_type` INT DEFAULT NULL, - `charge_id` BIGINT DEFAULT NULL, - `financial_account_type` SMALLINT DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_acc_product_mapping_m_code_value` (`payment_type`), - KEY `FK_acc_product_mapping_m_charge` (`charge_id`), - CONSTRAINT `FK_acc_product_mapping_m_charge` FOREIGN KEY (`charge_id`) REFERENCES `m_charge` (`id`), - CONSTRAINT `FK_acc_product_mapping_m_payment_type` FOREIGN KEY (`payment_type`) REFERENCES `m_payment_type` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `acc_product_mapping` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `gl_account_id` + BIGINT + DEFAULT + NULL, + `product_id` + BIGINT + DEFAULT + NULL, + `product_type` + SMALLINT + DEFAULT + NULL, + `payment_type` + INT + DEFAULT + NULL, + `charge_id` + BIGINT + DEFAULT + NULL, + `financial_account_type` + SMALLINT + DEFAULT + NULL, + PRIMARY + KEY +( + `id` +), + KEY `FK_acc_product_mapping_m_code_value` +( + `payment_type` +), + KEY `FK_acc_product_mapping_m_charge` +( + `charge_id` +), + CONSTRAINT `FK_acc_product_mapping_m_charge` FOREIGN KEY +( + `charge_id` +) REFERENCES `m_charge` +( + `id` +), + CONSTRAINT `FK_acc_product_mapping_m_payment_type` FOREIGN KEY +( + `payment_type` +) REFERENCES `m_payment_type` +( + `id` +) + ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.acc_product_mapping: ~18 rows (approximately) /*!40000 ALTER TABLE `acc_product_mapping` DISABLE KEYS */; -INSERT INTO `acc_product_mapping` (`id`, `gl_account_id`, `product_id`, `product_type`, `payment_type`, `charge_id`, `financial_account_type`) VALUES - (1, 32, 1, 1, NULL, NULL, 1), - (2, 34, 1, 1, NULL, NULL, 2), - (3, 17, 1, 1, NULL, NULL, 10), - (4, 38, 1, 1, NULL, NULL, 3), - (5, 36, 1, 1, NULL, NULL, 4), - (6, 37, 1, 1, NULL, NULL, 5), - (7, 41, 1, 1, NULL, NULL, 6), - (8, 2, 1, 1, NULL, NULL, 11), - (9, 31, 1, 2, NULL, NULL, 1), - (10, 32, 1, 2, NULL, NULL, 11), - (11, 36, 1, 2, NULL, NULL, 4), - (12, 37, 1, 2, NULL, NULL, 5), - (13, 38, 1, 2, NULL, NULL, 12), - (14, 41, 1, 2, NULL, NULL, 3), - (15, 42, 1, 2, NULL, NULL, 13), - (16, 30, 1, 2, NULL, NULL, 2), - (17, 30, 1, 2, NULL, NULL, 10), - (18, 54, 1, 1, NULL, NULL, 12); +INSERT INTO `acc_product_mapping` (`id`, `gl_account_id`, `product_id`, `product_type`, `payment_type`, `charge_id`, + `financial_account_type`) +VALUES (1, 32, 1, 1, NULL, NULL, 1), + (2, 34, 1, 1, NULL, NULL, 2), + (3, 17, 1, 1, NULL, NULL, 10), + (4, 38, 1, 1, NULL, NULL, 3), + (5, 36, 1, 1, NULL, NULL, 4), + (6, 37, 1, 1, NULL, NULL, 5), + (7, 41, 1, 1, NULL, NULL, 6), + (8, 2, 1, 1, NULL, NULL, 11), + (9, 31, 1, 2, NULL, NULL, 1), + (10, 32, 1, 2, NULL, NULL, 11), + (11, 36, 1, 2, NULL, NULL, 4), + (12, 37, 1, 2, NULL, NULL, 5), + (13, 38, 1, 2, NULL, NULL, 12), + (14, 41, 1, 2, NULL, NULL, 3), + (15, 42, 1, 2, NULL, NULL, 13), + (16, 30, 1, 2, NULL, NULL, 2), + (17, 30, 1, 2, NULL, NULL, 10), + (18, 54, 1, 1, NULL, NULL, 12); /*!40000 ALTER TABLE `acc_product_mapping` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.acc_rule_tags DROP TABLE IF EXISTS `acc_rule_tags`; -CREATE TABLE IF NOT EXISTS `acc_rule_tags` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `acc_rule_id` BIGINT NOT NULL, - `tag_id` INT NOT NULL, - `acc_type_enum` SMALLINT NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `UNIQUE_ACCOUNT_RULE_TAGS` (`acc_rule_id`,`tag_id`,`acc_type_enum`), - KEY `FK_acc_accounting_rule_id` (`acc_rule_id`), - KEY `FK_m_code_value_id` (`tag_id`), - CONSTRAINT `FK_acc_accounting_rule_id` FOREIGN KEY (`acc_rule_id`) REFERENCES `acc_accounting_rule` (`id`), - CONSTRAINT `FK_m_code_value_id` FOREIGN KEY (`tag_id`) REFERENCES `m_code_value` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE IF NOT EXISTS `acc_rule_tags` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `acc_rule_id` + BIGINT + NOT + NULL, + `tag_id` + INT + NOT + NULL, + `acc_type_enum` + SMALLINT + NOT + NULL, + PRIMARY + KEY +( + `id` +), + UNIQUE KEY `UNIQUE_ACCOUNT_RULE_TAGS` +( + `acc_rule_id`, + `tag_id`, + `acc_type_enum` +), + KEY `FK_acc_accounting_rule_id` +( + `acc_rule_id` +), + KEY `FK_m_code_value_id` +( + `tag_id` +), + CONSTRAINT `FK_acc_accounting_rule_id` FOREIGN KEY +( + `acc_rule_id` +) REFERENCES `acc_accounting_rule` +( + `id` +), + CONSTRAINT `FK_m_code_value_id` FOREIGN KEY +( + `tag_id` +) REFERENCES `m_code_value` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- Dumping data for table mifostenant-reference.acc_rule_tags: ~0 rows (approximately) /*!40000 ALTER TABLE `acc_rule_tags` DISABLE KEYS */; @@ -306,13 +711,31 @@ CREATE TABLE IF NOT EXISTS `acc_rule_tags` ( -- Dumping structure for table mifostenant-reference.c_account_number_format DROP TABLE IF EXISTS `c_account_number_format`; -CREATE TABLE IF NOT EXISTS `c_account_number_format` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_type_enum` SMALLINT NOT NULL, - `prefix_type_enum` SMALLINT DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `account_type_enum` (`account_type_enum`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `c_account_number_format` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `account_type_enum` + SMALLINT + NOT + NULL, + `prefix_type_enum` + SMALLINT + DEFAULT + NULL, + PRIMARY + KEY +( + `id` +), + UNIQUE KEY `account_type_enum` +( + `account_type_enum` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.c_account_number_format: ~0 rows (approximately) /*!40000 ALTER TABLE `c_account_number_format` DISABLE KEYS */; @@ -321,246 +744,466 @@ CREATE TABLE IF NOT EXISTS `c_account_number_format` ( -- Dumping structure for table mifostenant-reference.c_cache DROP TABLE IF EXISTS `c_cache`; -CREATE TABLE IF NOT EXISTS `c_cache` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `cache_type_enum` tinyint NOT NULL DEFAULT '1', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `c_cache` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `cache_type_enum` + tinyint + NOT + NULL + DEFAULT + '1', + PRIMARY + KEY +( + `id` +) + ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.c_cache: ~0 rows (approximately) /*!40000 ALTER TABLE `c_cache` DISABLE KEYS */; -INSERT INTO `c_cache` (`id`, `cache_type_enum`) VALUES - (1, 1); +INSERT INTO `c_cache` (`id`, `cache_type_enum`) +VALUES (1, 1); /*!40000 ALTER TABLE `c_cache` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.c_configuration DROP TABLE IF EXISTS `c_configuration`; -CREATE TABLE IF NOT EXISTS `c_configuration` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL, - `value` INT DEFAULT NULL, - `date_value` date DEFAULT NULL, - `enabled` tinyint NOT NULL DEFAULT '0', - `is_trap_door` tinyint NOT NULL DEFAULT '0', - `description` varchar(300) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `name_UNIQUE` (`name`) -) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `c_configuration` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `name` + varchar +( + 100 +) DEFAULT NULL, + `value` INT DEFAULT NULL, + `date_value` date DEFAULT NULL, + `enabled` tinyint NOT NULL DEFAULT '0', + `is_trap_door` tinyint NOT NULL DEFAULT '0', + `description` varchar +( + 300 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `name_UNIQUE` +( + `name` +) + ) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.c_configuration: ~27 rows (approximately) /*!40000 ALTER TABLE `c_configuration` DISABLE KEYS */; -INSERT INTO `c_configuration` (`id`, `name`, `value`, `date_value`, `enabled`, `is_trap_door`, `description`) VALUES - (1, 'maker-checker', NULL, NULL, 0, 0, NULL), - (4, 'amazon-S3', NULL, NULL, 0, 0, NULL), - (5, 'reschedule-future-repayments', NULL, NULL, 1, 0, NULL), - (6, 'reschedule-repayments-on-holidays', NULL, NULL, 0, 0, NULL), - (7, 'allow-transactions-on-holiday', NULL, NULL, 0, 0, NULL), - (8, 'allow-transactions-on-non_workingday', NULL, NULL, 0, 0, NULL), - (9, 'constraint_approach_for_datatables', NULL, NULL, 0, 0, NULL), - (10, 'penalty-wait-period', 2, NULL, 1, 0, NULL), - (11, 'force-password-reset-days', 0, NULL, 0, 0, NULL), - (12, 'grace-on-penalty-posting', 0, NULL, 1, 0, NULL), - (15, 'savings-interest-posting-current-period-end', NULL, NULL, 0, 0, 'Recommended to be changed only once during start of production. When set as false(default), interest will be posted on the first date of next period. If set as true, interest will be posted on last date of current period. There is no difference in the interest amount posted.'), - (16, 'financial-year-beginning-month', 1, NULL, 1, 0, 'Recommended to be changed only once during start of production. Allowed values 1 - 12 (January - December). Interest posting periods are evaluated based on this configuration.'), - (17, 'min-clients-in-group', 5, NULL, 0, 0, 'Minimum number of Clients that a Group should have'), - (18, 'max-clients-in-group', 5, NULL, 0, 0, 'Maximum number of Clients that a Group can have'), - (19, 'meetings-mandatory-for-jlg-loans', NULL, NULL, 0, 0, 'Enforces all JLG loans to follow a meeting schedule belonging to parent group or Center'), - (20, 'office-specific-products-enabled', 0, NULL, 0, 0, 'Whether products and fees should be office specific or not? This property should NOT be changed once Mifos is Live.'), - (21, 'restrict-products-to-user-office', 0, NULL, 0, 0, 'This should be enabled only if, products & fees are office specific (i.e. office-specific-products-enabled is enabled). This property specifies if the products should be auto-restricted to office of the user who created the proudct? Note: This property should NOT be changed once Mifos is Live.'), - (22, 'office-opening-balances-contra-account', 0, NULL, 1, 0, NULL), - (23, 'rounding-mode', 6, NULL, 1, 1, '0 - UP, 1 - DOWN, 2- CEILING, 3- FLOOR, 4- HALF_UP, 5- HALF_DOWN, 6 - HALF_EVEN'), - (24, 'backdate-penalties-enabled', 0, NULL, 1, 0, 'If this parameter is disabled penalties will only be added to instalments due moving forward, any old overdue instalments will not be affected.'), - (26, 'organisation-start-date', 0, NULL, 0, 0, NULL), - (27, 'paymenttype-applicable-for-disbursement-charges', NULL, NULL, 0, 0, 'Is the Disbursement Entry need to be considering the fund source of the paymnet type'), - (28, 'interest-charged-from-date-same-as-disbursal-date', 0, NULL, 0, 0, NULL), - (29, 'skip-repayment-on-first-day-of-month', 14, NULL, 0, 0, 'skipping repayment on first day of month'), - (30, 'change-emi-if-repaymentdate-same-as-disbursementdate', 0, NULL, 1, 0, 'In tranche loans, if repayment date is same as tranche disbursement date then allow to change the emi amount'), - (31, 'daily-tpt-limit', 0, NULL, 0, 0, 'Daily limit for third party transfers'), - (32, 'Enable-Address', NULL, NULL, 0, 0, NULL); +INSERT INTO `c_configuration` (`id`, `name`, `value`, `date_value`, `enabled`, `is_trap_door`, `description`) +VALUES (1, 'maker-checker', NULL, NULL, 0, 0, NULL), + (4, 'amazon-S3', NULL, NULL, 0, 0, NULL), + (5, 'reschedule-future-repayments', NULL, NULL, 1, 0, NULL), + (6, 'reschedule-repayments-on-holidays', NULL, NULL, 0, 0, NULL), + (7, 'allow-transactions-on-holiday', NULL, NULL, 0, 0, NULL), + (8, 'allow-transactions-on-non_workingday', NULL, NULL, 0, 0, NULL), + (9, 'constraint_approach_for_datatables', NULL, NULL, 0, 0, NULL), + (10, 'penalty-wait-period', 2, NULL, 1, 0, NULL), + (11, 'force-password-reset-days', 0, NULL, 0, 0, NULL), + (12, 'grace-on-penalty-posting', 0, NULL, 1, 0, NULL), + (15, 'savings-interest-posting-current-period-end', NULL, NULL, 0, 0, + 'Recommended to be changed only once during start of production. When set as false(default), interest will be posted on the first date of next period. If set as true, interest will be posted on last date of current period. There is no difference in the interest amount posted.'), + (16, 'financial-year-beginning-month', 1, NULL, 1, 0, + 'Recommended to be changed only once during start of production. Allowed values 1 - 12 (January - December). Interest posting periods are evaluated based on this configuration.'), + (17, 'min-clients-in-group', 5, NULL, 0, 0, 'Minimum number of Clients that a Group should have'), + (18, 'max-clients-in-group', 5, NULL, 0, 0, 'Maximum number of Clients that a Group can have'), + (19, 'meetings-mandatory-for-jlg-loans', NULL, NULL, 0, 0, + 'Enforces all JLG loans to follow a meeting schedule belonging to parent group or Center'), + (20, 'office-specific-products-enabled', 0, NULL, 0, 0, + 'Whether products and fees should be office specific or not? This property should NOT be changed once Mifos is Live.'), + (21, 'restrict-products-to-user-office', 0, NULL, 0, 0, + 'This should be enabled only if, products & fees are office specific (i.e. office-specific-products-enabled is enabled). This property specifies if the products should be auto-restricted to office of the user who created the proudct? Note: This property should NOT be changed once Mifos is Live.'), + (22, 'office-opening-balances-contra-account', 0, NULL, 1, 0, NULL), + (23, 'rounding-mode', 6, NULL, 1, 1, + '0 - UP, 1 - DOWN, 2- CEILING, 3- FLOOR, 4- HALF_UP, 5- HALF_DOWN, 6 - HALF_EVEN'), + (24, 'backdate-penalties-enabled', 0, NULL, 1, 0, + 'If this parameter is disabled penalties will only be added to instalments due moving forward, any old overdue instalments will not be affected.'), + (26, 'organisation-start-date', 0, NULL, 0, 0, NULL), + (27, 'paymenttype-applicable-for-disbursement-charges', NULL, NULL, 0, 0, + 'Is the Disbursement Entry need to be considering the fund source of the paymnet type'), + (28, 'interest-charged-from-date-same-as-disbursal-date', 0, NULL, 0, 0, NULL), + (29, 'skip-repayment-on-first-day-of-month', 14, NULL, 0, 0, 'skipping repayment on first day of month'), + (30, 'change-emi-if-repaymentdate-same-as-disbursementdate', 0, NULL, 1, 0, + 'In tranche loans, if repayment date is same as tranche disbursement date then allow to change the emi amount'), + (31, 'daily-tpt-limit', 0, NULL, 0, 0, 'Daily limit for third party transfers'), + (32, 'Enable-Address', NULL, NULL, 0, 0, NULL); /*!40000 ALTER TABLE `c_configuration` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.c_external_service DROP TABLE IF EXISTS `c_external_service`; -CREATE TABLE IF NOT EXISTS `c_external_service` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `name_UNIQUE` (`name`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `c_external_service` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `name` + varchar +( + 100 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `name_UNIQUE` +( + `name` +) + ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.c_external_service: ~3 rows (approximately) /*!40000 ALTER TABLE `c_external_service` DISABLE KEYS */; -INSERT INTO `c_external_service` (`id`, `name`) VALUES - (3, 'MESSAGE_GATEWAY'), - (1, 'S3'), - (2, 'SMTP_Email_Account'); +INSERT INTO `c_external_service` (`id`, `name`) +VALUES (3, 'MESSAGE_GATEWAY'), + (1, 'S3'), + (2, 'SMTP_Email_Account'); /*!40000 ALTER TABLE `c_external_service` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.c_external_service_properties DROP TABLE IF EXISTS `c_external_service_properties`; -CREATE TABLE IF NOT EXISTS `c_external_service_properties` ( - `name` varchar(150) NOT NULL, - `value` varchar(250) DEFAULT NULL, - `external_service_id` BIGINT NOT NULL, - KEY `FK_c_external_service_properties_c_external_service` (`external_service_id`), - CONSTRAINT `FK_c_external_service_properties_c_external_service` FOREIGN KEY (`external_service_id`) REFERENCES `c_external_service` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `c_external_service_properties` +( + `name` + varchar +( + 150 +) NOT NULL, + `value` varchar +( + 250 +) DEFAULT NULL, + `external_service_id` BIGINT NOT NULL, + KEY `FK_c_external_service_properties_c_external_service` +( + `external_service_id` +), + CONSTRAINT `FK_c_external_service_properties_c_external_service` FOREIGN KEY +( + `external_service_id` +) REFERENCES `c_external_service` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.c_external_service_properties: ~12 rows (approximately) /*!40000 ALTER TABLE `c_external_service_properties` DISABLE KEYS */; -INSERT INTO `c_external_service_properties` (`name`, `value`, `external_service_id`) VALUES - ('s3_access_key', NULL, 1), - ('s3_bucket_name', NULL, 1), - ('s3_secret_key', NULL, 1), - ('username', 'support@cloudmicrofinance.com', 2), - ('password', 'support81', 2), - ('host', 'smtp.gmail.com', 2), - ('port', '25', 2), - ('useTLS', 'true', 2), - ('host_name', 'localhost', 3), - ('port_number', '9191', 3), - ('end_point', '/', 3), - ('tenant_app_key', NULL, 3); +INSERT INTO `c_external_service_properties` (`name`, `value`, `external_service_id`) +VALUES ('s3_access_key', NULL, 1), + ('s3_bucket_name', NULL, 1), + ('s3_secret_key', NULL, 1), + ('username', 'support@cloudmicrofinance.com', 2), + ('password', 'support81', 2), + ('host', 'smtp.gmail.com', 2), + ('port', '25', 2), + ('useTLS', 'true', 2), + ('host_name', 'localhost', 3), + ('port_number', '9191', 3), + ('end_point', '/', 3), + ('tenant_app_key', NULL, 3); /*!40000 ALTER TABLE `c_external_service_properties` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.job DROP TABLE IF EXISTS `job`; -CREATE TABLE IF NOT EXISTS `job` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) NOT NULL, - `display_name` varchar(100) NOT NULL, - `cron_expression` varchar(20) CHARACTER SET latin1 NOT NULL, - `create_time` datetime NOT NULL, - `task_priority` SMALLINT NOT NULL DEFAULT '5', - `group_name` varchar(50) CHARACTER SET latin1 DEFAULT NULL, - `previous_run_start_time` datetime DEFAULT NULL, - `next_run_time` datetime DEFAULT NULL, - `job_key` varchar(500) DEFAULT NULL, - `initializing_errorlog` text, - `is_active` tinyint NOT NULL DEFAULT '1', - `currently_running` tinyint NOT NULL DEFAULT '0', - `updates_allowed` tinyint NOT NULL DEFAULT '1', - `scheduler_group` SMALLINT NOT NULL DEFAULT '0', - `is_misfired` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `job` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `name` + varchar +( + 100 +) NOT NULL, + `display_name` varchar +( + 100 +) NOT NULL, + `cron_expression` varchar +( + 20 +) CHARACTER SET latin1 NOT NULL, + `create_time` datetime NOT NULL, + `task_priority` SMALLINT NOT NULL DEFAULT '5', + `group_name` varchar +( + 50 +) CHARACTER SET latin1 DEFAULT NULL, + `previous_run_start_time` datetime DEFAULT NULL, + `next_run_time` datetime DEFAULT NULL, + `job_key` varchar +( + 500 +) DEFAULT NULL, + `initializing_errorlog` text, + `is_active` tinyint NOT NULL DEFAULT '1', + `currently_running` tinyint NOT NULL DEFAULT '0', + `updates_allowed` tinyint NOT NULL DEFAULT '1', + `scheduler_group` SMALLINT NOT NULL DEFAULT '0', + `is_misfired` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY +( + `id` +) + ) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.job: ~26 rows (approximately) /*!40000 ALTER TABLE `job` DISABLE KEYS */; -INSERT INTO `job` (`id`, `name`, `display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, `previous_run_start_time`, `next_run_time`, `job_key`, `initializing_errorlog`, `is_active`, `currently_running`, `updates_allowed`, `scheduler_group`, `is_misfired`) VALUES - (1, 'Update loan Summary', 'Update loan Summary', '0 0 22 1/1 * ? *', '2014-03-07 18:29:14', 5, NULL, '2014-06-11 09:30:00', '2017-02-24 22:00:00', 'Update loan SummaryJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (2, 'Update Loan Arrears Ageing', 'Update Loan Arrears Ageing', '0 1 0 1/1 * ? *', '2014-03-07 18:29:14', 5, NULL, NULL, '2017-02-25 00:01:00', 'Update Loan Arrears AgeingJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (3, 'Update Loan Paid In Advance', 'Update Loan Paid In Advance', '0 5 0 1/1 * ? *', '2014-03-07 18:29:14', 5, NULL, NULL, '2017-02-25 00:05:00', 'Update Loan Paid In AdvanceJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (4, 'Apply Annual Fee For Savings', 'Apply Annual Fee For Savings', '0 20 22 1/1 * ? *', '2014-03-07 18:29:14', 5, NULL, '2014-06-11 09:50:00', '2017-02-24 22:20:00', 'Apply Annual Fee For SavingsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (5, 'Apply Holidays To Loans', 'Apply Holidays To Loans', '0 0 12 * * ?', '2014-03-07 18:29:14', 5, NULL, '2014-03-24 12:00:04', '2017-02-25 12:00:00', 'Apply Holidays To LoansJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (6, 'Post Interest For Savings', 'Post Interest For Savings', '0 0 0 1/1 * ? *', '2014-03-07 18:29:21', 5, NULL, NULL, '2017-02-25 00:00:00', 'Post Interest For SavingsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 1, 0), - (7, 'Transfer Fee For Loans From Savings', 'Transfer Fee For Loans From Savings', '0 1 0 1/1 * ? *', '2014-03-07 18:29:32', 5, NULL, NULL, '2017-02-25 00:01:00', 'Transfer Fee For Loans From SavingsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (8, 'Pay Due Savings Charges', 'Pay Due Savings Charges', '0 0 12 * * ?', '2013-09-23 00:00:00', 5, NULL, '2014-03-24 12:00:04', '2017-02-25 12:00:00', 'Pay Due Savings ChargesJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (9, 'Update Accounting Running Balances', 'Update Accounting Running Balances', '0 1 0 1/1 * ? *', '2014-03-07 18:29:37', 5, NULL, NULL, '2017-02-25 00:01:00', 'Update Accounting Running BalancesJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (10, 'Execute Standing Instruction', 'Execute Standing Instruction', '0 0 0 1/1 * ? *', '2014-05-01 16:10:35', 5, NULL, NULL, '2017-02-25 00:00:00', 'Execute Standing InstructionJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (11, 'Add Accrual Transactions', 'Add Accrual Transactions', '0 1 0 1/1 * ? *', '2014-05-01 16:10:36', 3, NULL, NULL, '2017-02-25 00:01:00', 'Add Accrual TransactionsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 3, 0), - (12, 'Apply penalty to overdue loans', 'Apply penalty to overdue loans', '0 0 0 1/1 * ? *', '2014-05-01 16:10:36', 5, NULL, NULL, '2017-02-25 00:00:00', 'Apply penalty to overdue loansJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (13, 'Update Non Performing Assets', 'Update Non Performing Assets', '0 0 0 1/1 * ? *', '2014-05-01 16:10:41', 6, NULL, NULL, '2017-02-25 00:00:00', 'Update Non Performing AssetsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 3, 0), - (14, 'Transfer Interest To Savings', 'Transfer Interest To Savings', '0 2 0 1/1 * ? *', '2014-06-11 09:09:15', 4, NULL, NULL, '2017-02-25 00:02:00', 'Transfer Interest To SavingsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 1, 0), - (15, 'Update Deposit Accounts Maturity details', 'Update Deposit Accounts Maturity details', '0 0 0 1/1 * ? *', '2014-06-11 09:09:15', 5, NULL, NULL, '2017-02-25 00:00:00', 'Update Deposit Accounts Maturity detailsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (16, 'Add Periodic Accrual Transactions', 'Add Periodic Accrual Transactions', '0 2 0 1/1 * ? *', '2014-10-14 16:19:45', 2, NULL, NULL, '2017-02-25 00:02:00', 'Add Periodic Accrual TransactionsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 3, 0), - (17, 'Recalculate Interest For Loans', 'Recalculate Interest For Loans', '0 1 0 1/1 * ? *', '2014-10-14 16:19:55', 4, NULL, NULL, '2017-02-25 00:01:00', 'Recalculate Interest For LoansJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 3, 0), - (18, 'Generate Mandatory Savings Schedule', 'Generate Mandatory Savings Schedule', '0 5 0 1/1 * ? *', '2015-04-16 02:28:43', 5, NULL, NULL, '2017-02-25 00:05:00', 'Generate Mandatory Savings ScheduleJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (19, 'Generate Loan Loss Provisioning', 'Generate Loan Loss Provisioning', '0 0 0 1/1 * ? *', '2015-10-20 19:57:58', 5, NULL, NULL, '2017-02-25 00:00:00', 'Generate Loan Loss ProvisioningJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (20, 'Post Dividends For Shares', 'Post Dividends For Shares', '0 0 0 1/1 * ? *', '2017-02-24 14:16:33', 5, NULL, NULL, '2017-02-25 00:00:00', 'Post Dividends For SharesJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (21, 'Update Savings Dormant Accounts', 'Update Savings Dormant Accounts', '0 0 0 1/1 * ? *', '2017-02-24 14:16:37', 3, NULL, NULL, '2017-02-25 00:00:00', 'Update Savings Dormant AccountsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 1, 0), - (22, 'Add Accrual Transactions For Loans With Income Posted As Transactions', 'Add Accrual Transactions For Loans With Income Posted As Transactions', '0 1 0 1/1 * ? *', '2017-02-24 14:16:42', 5, NULL, NULL, '2017-02-25 00:01:00', 'Add Accrual Transactions For Loans With Income Posted As TransactionsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 3, 0), - (23, 'Execute Report Mailing Jobs', 'Execute Report Mailing Jobs', '0 0/15 * * * ?', '2017-02-24 14:16:54', 5, NULL, NULL, '2017-02-24 14:30:00', 'Execute Report Mailing JobsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), - (24, 'Update SMS Outbound with Campaign Message', 'Update SMS Outbound with Campaign Message', '0 0 5 1/1 * ? *', '2017-02-24 14:17:00', 3, NULL, NULL, '2017-02-25 05:00:00', 'Update SMS Outbound with Campaign MessageJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 4, 0), - (25, 'Send Messages to SMS Gateway', 'Send Messages to SMS Gateway', '0 0 5 1/1 * ? *', '2017-02-24 14:17:00', 2, NULL, NULL, '2017-02-25 05:00:00', 'Send Messages to SMS GatewayJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 4, 0), - (26, 'Get Delivery Reports from SMS Gateway', 'Get Delivery Reports from SMS Gateway', '0 0 5 1/1 * ? *', '2017-02-24 14:17:00', 1, NULL, NULL, '2017-02-25 05:00:00', 'Get Delivery Reports from SMS GatewayJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 4, 0); +INSERT INTO `job` (`id`, `name`, `display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, + `previous_run_start_time`, `next_run_time`, `job_key`, `initializing_errorlog`, `is_active`, + `currently_running`, `updates_allowed`, `scheduler_group`, `is_misfired`) +VALUES (1, 'Update loan Summary', 'Update loan Summary', '0 0 22 1/1 * ? *', '2014-03-07 18:29:14', 5, NULL, + '2014-06-11 09:30:00', '2017-02-24 22:00:00', 'Update loan SummaryJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (2, 'Update Loan Arrears Ageing', 'Update Loan Arrears Ageing', '0 1 0 1/1 * ? *', '2014-03-07 18:29:14', 5, + NULL, NULL, '2017-02-25 00:01:00', 'Update Loan Arrears AgeingJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (3, 'Update Loan Paid In Advance', 'Update Loan Paid In Advance', '0 5 0 1/1 * ? *', '2014-03-07 18:29:14', 5, + NULL, NULL, '2017-02-25 00:05:00', 'Update Loan Paid In AdvanceJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (4, 'Apply Annual Fee For Savings', 'Apply Annual Fee For Savings', '0 20 22 1/1 * ? *', '2014-03-07 18:29:14', + 5, NULL, '2014-06-11 09:50:00', '2017-02-24 22:20:00', 'Apply Annual Fee For SavingsJobDetail2 _ DEFAULT', NULL, + 1, 0, 1, 0, 0), + (5, 'Apply Holidays To Loans', 'Apply Holidays To Loans', '0 0 12 * * ?', '2014-03-07 18:29:14', 5, NULL, + '2014-03-24 12:00:04', '2017-02-25 12:00:00', 'Apply Holidays To LoansJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, + 0), + (6, 'Post Interest For Savings', 'Post Interest For Savings', '0 0 0 1/1 * ? *', '2014-03-07 18:29:21', 5, NULL, + NULL, '2017-02-25 00:00:00', 'Post Interest For SavingsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 1, 0), + (7, 'Transfer Fee For Loans From Savings', 'Transfer Fee For Loans From Savings', '0 1 0 1/1 * ? *', + '2014-03-07 18:29:32', 5, NULL, NULL, '2017-02-25 00:01:00', + 'Transfer Fee For Loans From SavingsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (8, 'Pay Due Savings Charges', 'Pay Due Savings Charges', '0 0 12 * * ?', '2013-09-23 00:00:00', 5, NULL, + '2014-03-24 12:00:04', '2017-02-25 12:00:00', 'Pay Due Savings ChargesJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, + 0), + (9, 'Update Accounting Running Balances', 'Update Accounting Running Balances', '0 1 0 1/1 * ? *', + '2014-03-07 18:29:37', 5, NULL, NULL, '2017-02-25 00:01:00', + 'Update Accounting Running BalancesJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (10, 'Execute Standing Instruction', 'Execute Standing Instruction', '0 0 0 1/1 * ? *', '2014-05-01 16:10:35', 5, + NULL, NULL, '2017-02-25 00:00:00', 'Execute Standing InstructionJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (11, 'Add Accrual Transactions', 'Add Accrual Transactions', '0 1 0 1/1 * ? *', '2014-05-01 16:10:36', 3, NULL, + NULL, '2017-02-25 00:01:00', 'Add Accrual TransactionsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 3, 0), + (12, 'Apply penalty to overdue loans', 'Apply penalty to overdue loans', '0 0 0 1/1 * ? *', + '2014-05-01 16:10:36', 5, NULL, NULL, '2017-02-25 00:00:00', + 'Apply penalty to overdue loansJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (13, 'Update Non Performing Assets', 'Update Non Performing Assets', '0 0 0 1/1 * ? *', '2014-05-01 16:10:41', 6, + NULL, NULL, '2017-02-25 00:00:00', 'Update Non Performing AssetsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 3, 0), + (14, 'Transfer Interest To Savings', 'Transfer Interest To Savings', '0 2 0 1/1 * ? *', '2014-06-11 09:09:15', 4, + NULL, NULL, '2017-02-25 00:02:00', 'Transfer Interest To SavingsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 1, 0), + (15, 'Update Deposit Accounts Maturity details', 'Update Deposit Accounts Maturity details', '0 0 0 1/1 * ? *', + '2014-06-11 09:09:15', 5, NULL, NULL, '2017-02-25 00:00:00', + 'Update Deposit Accounts Maturity detailsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (16, 'Add Periodic Accrual Transactions', 'Add Periodic Accrual Transactions', '0 2 0 1/1 * ? *', + '2014-10-14 16:19:45', 2, NULL, NULL, '2017-02-25 00:02:00', + 'Add Periodic Accrual TransactionsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 3, 0), + (17, 'Recalculate Interest For Loans', 'Recalculate Interest For Loans', '0 1 0 1/1 * ? *', + '2014-10-14 16:19:55', 4, NULL, NULL, '2017-02-25 00:01:00', + 'Recalculate Interest For LoansJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 3, 0), + (18, 'Generate Mandatory Savings Schedule', 'Generate Mandatory Savings Schedule', '0 5 0 1/1 * ? *', + '2015-04-16 02:28:43', 5, NULL, NULL, '2017-02-25 00:05:00', + 'Generate Mandatory Savings ScheduleJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (19, 'Generate Loan Loss Provisioning', 'Generate Loan Loss Provisioning', '0 0 0 1/1 * ? *', + '2015-10-20 19:57:58', 5, NULL, NULL, '2017-02-25 00:00:00', + 'Generate Loan Loss ProvisioningJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (20, 'Post Dividends For Shares', 'Post Dividends For Shares', '0 0 0 1/1 * ? *', '2017-02-24 14:16:33', 5, NULL, + NULL, '2017-02-25 00:00:00', 'Post Dividends For SharesJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (21, 'Update Savings Dormant Accounts', 'Update Savings Dormant Accounts', '0 0 0 1/1 * ? *', + '2017-02-24 14:16:37', 3, NULL, NULL, '2017-02-25 00:00:00', + 'Update Savings Dormant AccountsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 1, 0), + (22, 'Add Accrual Transactions For Loans With Income Posted As Transactions', + 'Add Accrual Transactions For Loans With Income Posted As Transactions', '0 1 0 1/1 * ? *', + '2017-02-24 14:16:42', 5, NULL, NULL, '2017-02-25 00:01:00', + 'Add Accrual Transactions For Loans With Income Posted As TransactionsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 3, + 0), + (23, 'Execute Report Mailing Jobs', 'Execute Report Mailing Jobs', '0 0/15 * * * ?', '2017-02-24 14:16:54', 5, + NULL, NULL, '2017-02-24 14:30:00', 'Execute Report Mailing JobsJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 0, 0), + (24, 'Update SMS Outbound with Campaign Message', 'Update SMS Outbound with Campaign Message', '0 0 5 1/1 * ? *', + '2017-02-24 14:17:00', 3, NULL, NULL, '2017-02-25 05:00:00', + 'Update SMS Outbound with Campaign MessageJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 4, 0), + (25, 'Send Messages to SMS Gateway', 'Send Messages to SMS Gateway', '0 0 5 1/1 * ? *', '2017-02-24 14:17:00', 2, + NULL, NULL, '2017-02-25 05:00:00', 'Send Messages to SMS GatewayJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 4, 0), + (26, 'Get Delivery Reports from SMS Gateway', 'Get Delivery Reports from SMS Gateway', '0 0 5 1/1 * ? *', + '2017-02-24 14:17:00', 1, NULL, NULL, '2017-02-25 05:00:00', + 'Get Delivery Reports from SMS GatewayJobDetail2 _ DEFAULT', NULL, 1, 0, 1, 4, 0); /*!40000 ALTER TABLE `job` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.job_run_history DROP TABLE IF EXISTS `job_run_history`; -CREATE TABLE IF NOT EXISTS `job_run_history` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `job_id` BIGINT NOT NULL, - `version` BIGINT NOT NULL, - `start_time` datetime NOT NULL, - `end_time` datetime NOT NULL, - `status` varchar(10) CHARACTER SET latin1 NOT NULL, - `error_message` text, - `trigger_type` varchar(25) NOT NULL, - `error_log` text, - PRIMARY KEY (`id`), - KEY `scheduledjobsFK` (`job_id`), - CONSTRAINT `scheduledjobsFK` FOREIGN KEY (`job_id`) REFERENCES `job` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `job_run_history` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `job_id` + BIGINT + NOT + NULL, + `version` + BIGINT + NOT + NULL, + `start_time` + datetime + NOT + NULL, + `end_time` + datetime + NOT + NULL, + `status` + varchar +( + 10 +) CHARACTER SET latin1 NOT NULL, + `error_message` text, + `trigger_type` varchar +( + 25 +) NOT NULL, + `error_log` text, + PRIMARY KEY +( + `id` +), + KEY `scheduledjobsFK` +( + `job_id` +), + CONSTRAINT `scheduledjobsFK` FOREIGN KEY +( + `job_id` +) REFERENCES `job` +( + `id` +) + ) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.job_run_history: ~18 rows (approximately) /*!40000 ALTER TABLE `job_run_history` DISABLE KEYS */; -INSERT INTO `job_run_history` (`id`, `job_id`, `version`, `start_time`, `end_time`, `status`, `error_message`, `trigger_type`, `error_log`) VALUES - (1, 8, 1, '2014-03-14 12:00:00', '2014-03-14 12:00:01', 'success', NULL, 'cron', NULL), - (2, 5, 1, '2014-03-14 12:00:00', '2014-03-14 12:00:01', 'success', NULL, 'cron', NULL), - (3, 5, 2, '2014-03-15 12:00:00', '2014-03-15 12:00:11', 'success', NULL, 'cron', NULL), - (4, 8, 2, '2014-03-15 12:00:02', '2014-03-15 12:00:11', 'success', NULL, 'cron', NULL), - (5, 8, 3, '2014-03-17 12:00:00', '2014-03-17 12:00:02', 'success', NULL, 'cron', NULL), - (6, 5, 3, '2014-03-17 12:00:00', '2014-03-17 12:00:02', 'success', NULL, 'cron', NULL), - (7, 8, 4, '2014-03-18 12:00:00', '2014-03-18 12:00:03', 'success', NULL, 'cron', NULL), - (8, 5, 4, '2014-03-18 12:00:00', '2014-03-18 12:00:02', 'success', NULL, 'cron', NULL), - (9, 5, 5, '2014-03-19 12:00:00', '2014-03-19 12:00:02', 'success', NULL, 'cron', NULL), - (10, 8, 5, '2014-03-19 12:00:00', '2014-03-19 12:00:02', 'success', NULL, 'cron', NULL), - (11, 5, 6, '2014-03-20 12:00:00', '2014-03-20 12:00:02', 'success', NULL, 'cron', NULL), - (12, 8, 6, '2014-03-20 12:00:00', '2014-03-20 12:00:02', 'success', NULL, 'cron', NULL), - (13, 8, 7, '2014-03-21 12:00:00', '2014-03-21 12:00:01', 'success', NULL, 'cron', NULL), - (14, 5, 7, '2014-03-21 12:00:00', '2014-03-21 12:00:01', 'success', NULL, 'cron', NULL), - (15, 5, 8, '2014-03-24 12:00:04', '2014-03-24 12:00:12', 'success', NULL, 'cron', NULL), - (16, 8, 8, '2014-03-24 12:00:04', '2014-03-24 12:00:12', 'success', NULL, 'cron', NULL), - (17, 1, 1, '2014-06-11 09:30:00', '2014-06-11 09:30:01', 'success', NULL, 'cron', NULL), - (18, 4, 1, '2014-06-11 09:50:00', '2014-06-11 09:50:01', 'success', NULL, 'cron', NULL); +INSERT INTO `job_run_history` (`id`, `job_id`, `version`, `start_time`, `end_time`, `status`, `error_message`, + `trigger_type`, `error_log`) +VALUES (1, 8, 1, '2014-03-14 12:00:00', '2014-03-14 12:00:01', 'success', NULL, 'cron', NULL), + (2, 5, 1, '2014-03-14 12:00:00', '2014-03-14 12:00:01', 'success', NULL, 'cron', NULL), + (3, 5, 2, '2014-03-15 12:00:00', '2014-03-15 12:00:11', 'success', NULL, 'cron', NULL), + (4, 8, 2, '2014-03-15 12:00:02', '2014-03-15 12:00:11', 'success', NULL, 'cron', NULL), + (5, 8, 3, '2014-03-17 12:00:00', '2014-03-17 12:00:02', 'success', NULL, 'cron', NULL), + (6, 5, 3, '2014-03-17 12:00:00', '2014-03-17 12:00:02', 'success', NULL, 'cron', NULL), + (7, 8, 4, '2014-03-18 12:00:00', '2014-03-18 12:00:03', 'success', NULL, 'cron', NULL), + (8, 5, 4, '2014-03-18 12:00:00', '2014-03-18 12:00:02', 'success', NULL, 'cron', NULL), + (9, 5, 5, '2014-03-19 12:00:00', '2014-03-19 12:00:02', 'success', NULL, 'cron', NULL), + (10, 8, 5, '2014-03-19 12:00:00', '2014-03-19 12:00:02', 'success', NULL, 'cron', NULL), + (11, 5, 6, '2014-03-20 12:00:00', '2014-03-20 12:00:02', 'success', NULL, 'cron', NULL), + (12, 8, 6, '2014-03-20 12:00:00', '2014-03-20 12:00:02', 'success', NULL, 'cron', NULL), + (13, 8, 7, '2014-03-21 12:00:00', '2014-03-21 12:00:01', 'success', NULL, 'cron', NULL), + (14, 5, 7, '2014-03-21 12:00:00', '2014-03-21 12:00:01', 'success', NULL, 'cron', NULL), + (15, 5, 8, '2014-03-24 12:00:04', '2014-03-24 12:00:12', 'success', NULL, 'cron', NULL), + (16, 8, 8, '2014-03-24 12:00:04', '2014-03-24 12:00:12', 'success', NULL, 'cron', NULL), + (17, 1, 1, '2014-06-11 09:30:00', '2014-06-11 09:30:01', 'success', NULL, 'cron', NULL), + (18, 4, 1, '2014-06-11 09:50:00', '2014-06-11 09:50:01', 'success', NULL, 'cron', NULL); /*!40000 ALTER TABLE `job_run_history` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.mix_taxonomy DROP TABLE IF EXISTS `mix_taxonomy`; -CREATE TABLE IF NOT EXISTS `mix_taxonomy` ( - `id` INT unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL, - `namespace_id` INT DEFAULT NULL, - `dimension` varchar(100) DEFAULT NULL, - `type` INT DEFAULT NULL, - `description` varchar(1000) DEFAULT NULL, - `need_mapping` tinyint DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `mix_taxonomy` +( + `id` + INT + unsigned + NOT + NULL + AUTO_INCREMENT, + `name` + varchar +( + 100 +) DEFAULT NULL, + `namespace_id` INT DEFAULT NULL, + `dimension` varchar +( + 100 +) DEFAULT NULL, + `type` INT DEFAULT NULL, + `description` varchar +( + 1000 +) DEFAULT NULL, + `need_mapping` tinyint DEFAULT NULL, + PRIMARY KEY +( + `id` +) + ) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.mix_taxonomy: ~48 rows (approximately) /*!40000 ALTER TABLE `mix_taxonomy` DISABLE KEYS */; -INSERT INTO `mix_taxonomy` (`id`, `name`, `namespace_id`, `dimension`, `type`, `description`, `need_mapping`) VALUES - (1, 'AdministrativeExpense', 1, NULL, 3, NULL, 1), - (2, 'Assets', 3, NULL, 1, 'All outstanding principals due for all outstanding client loans. This includes current, delinquent, and renegotiated loans, but not loans that have been written off. It does not include interest receivable.', 1), - (3, 'Assets', 3, 'MaturityDimension:LessThanOneYearMember', 1, 'Segmentation based on the life of an asset or liability.', 1), - (4, 'Assets', 3, 'MaturityDimension:MoreThanOneYearMember', 1, 'Segmentation based on the life of an asset or liability.', 1), - (5, 'CashAndCashEquivalents', 1, NULL, 1, NULL, 1), - (6, 'Deposits', 3, NULL, 1, 'The total value of funds placed in an account with an MFI that are payable to a depositor. This item includes any current, checking, or savings accounts that are payable on demand. It also includes time deposits which have a fixed maturity date and compulsory deposits.', 1), - (7, 'Deposits', 3, 'DepositProductsDimension:CompulsoryMember', 1, 'The value of deposits that an MFI\'s clients are required to maintain as a condition of an existing or future loan.', NULL), - (8, 'Deposits', 3, 'DepositProductsDimension:VoluntaryMember', 1, 'The value of deposits that an MFI\'s clients are not required to maintain as a condition of an existing or future loan.', NULL), - (9, 'Deposits', 3, 'LocationDimension:RuralMember', 1, 'Located in rural areas. Segmentation based on location.', NULL), - (10, 'Deposits', 3, 'LocationDimension:UrbanMember', 1, 'Located in urban areas. Segmentation based on location.', NULL), - (11, 'Deposits', 3, 'MaturityDimension:LessThanOneYearMember', 1, 'Segmentation based on the life of an asset or liability.', NULL), - (12, 'Deposits', 3, 'MaturityDimension:MoreThanOneYearMember', 1, 'Segmentation based on the life of an asset or liability.', NULL), - (13, 'EmployeeBenefitsExpense', 1, NULL, 3, NULL, NULL), - (14, 'Equity', 1, NULL, 1, NULL, NULL), - (15, 'Expense', 1, NULL, 3, NULL, NULL), - (16, 'FinancialExpense', 3, NULL, 3, 'All costs All costs incurred in raising funds from third parties, fee expenses from non-financial services, net gains (losses) due to changes in fair value of financial liabilities, impairment losses net of reversals of financial assets other than loan portfolio and net gains (losses) from restatement of financial statements in terms of the measuring unit current at the end of the reporting period.', NULL), - (17, 'FinancialRevenueOnLoans', 3, NULL, 2, 'Interest and non-interest income generated by the provision of credit services to the clients. Fees and commissions for late payment are also included.', NULL), - (18, 'ImpairmentLossAllowanceGrossLoanPortfolio', 3, NULL, 2, 'An allowance for the risk of losses in the gross loan portfolio due to default .', NULL), - (19, 'Liabilities', 1, NULL, 1, NULL, NULL), - (20, 'Liabilities', 3, 'MaturityDimension:LessThanOneYearMember', 1, 'Segmentation based on the life of an asset or liability.', NULL), - (21, 'Liabilities', 3, 'MaturityDimension:MoreThanOneYearMember', 1, 'Segmentation based on the life of an asset or liability.', NULL), - (22, 'LoanPortfolioGross', 3, NULL, 2, 'All outstanding principals due for all outstanding client loans. This includes current, delinquent, and renegotiated loans, but not loans that have been written off. It does not include interest receivable.', NULL), - (23, 'LoanPortfolioGross', 3, 'CreditProductsDimension:MicroenterpriseMember', 2, 'Loans that finance the production or trade of goods and services for an individual\'s microenterprise, whether or not the microenterprise is legally registered. Segmentation based on loan product.', NULL), +INSERT INTO `mix_taxonomy` (`id`, `name`, `namespace_id`, `dimension`, `type`, `description`, `need_mapping`) +VALUES (1, 'AdministrativeExpense', 1, NULL, 3, NULL, 1), + (2, 'Assets', 3, NULL, 1, + 'All outstanding principals due for all outstanding client loans. This includes current, delinquent, and renegotiated loans, but not loans that have been written off. It does not include interest receivable.', + 1), + (3, 'Assets', 3, 'MaturityDimension:LessThanOneYearMember', 1, + 'Segmentation based on the life of an asset or liability.', 1), + (4, 'Assets', 3, 'MaturityDimension:MoreThanOneYearMember', 1, + 'Segmentation based on the life of an asset or liability.', 1), + (5, 'CashAndCashEquivalents', 1, NULL, 1, NULL, 1), + (6, 'Deposits', 3, NULL, 1, + 'The total value of funds placed in an account with an MFI that are payable to a depositor. This item includes any current, checking, or savings accounts that are payable on demand. It also includes time deposits which have a fixed maturity date and compulsory deposits.', + 1), + (7, 'Deposits', 3, 'DepositProductsDimension:CompulsoryMember', 1, 'The value of deposits that an MFI\'s clients are required to maintain as a condition of an existing or future loan.', NULL), + (8, 'Deposits', 3, 'DepositProductsDimension:VoluntaryMember', 1, 'The value of deposits that an MFI\'s clients are not required to maintain as a condition of an existing or future loan.', + NULL), + (9, 'Deposits', 3, 'LocationDimension:RuralMember', 1, 'Located in rural areas. Segmentation based on location.', + NULL), + (10, 'Deposits', 3, 'LocationDimension:UrbanMember', 1, + 'Located in urban areas. Segmentation based on location.', NULL), + (11, 'Deposits', 3, 'MaturityDimension:LessThanOneYearMember', 1, + 'Segmentation based on the life of an asset or liability.', NULL), + (12, 'Deposits', 3, 'MaturityDimension:MoreThanOneYearMember', 1, + 'Segmentation based on the life of an asset or liability.', NULL), + (13, 'EmployeeBenefitsExpense', 1, NULL, 3, NULL, NULL), + (14, 'Equity', 1, NULL, 1, NULL, NULL), + (15, 'Expense', 1, NULL, 3, NULL, NULL), + (16, 'FinancialExpense', 3, NULL, 3, + 'All costs All costs incurred in raising funds from third parties, fee expenses from non-financial services, net gains (losses) due to changes in fair value of financial liabilities, impairment losses net of reversals of financial assets other than loan portfolio and net gains (losses) from restatement of financial statements in terms of the measuring unit current at the end of the reporting period.', + NULL), + (17, 'FinancialRevenueOnLoans', 3, NULL, 2, + 'Interest and non-interest income generated by the provision of credit services to the clients. Fees and commissions for late payment are also included.', + NULL), + (18, 'ImpairmentLossAllowanceGrossLoanPortfolio', 3, NULL, 2, + 'An allowance for the risk of losses in the gross loan portfolio due to default .', NULL), + (19, 'Liabilities', 1, NULL, 1, NULL, NULL), + (20, 'Liabilities', 3, 'MaturityDimension:LessThanOneYearMember', 1, + 'Segmentation based on the life of an asset or liability.', NULL), + (21, 'Liabilities', 3, 'MaturityDimension:MoreThanOneYearMember', 1, + 'Segmentation based on the life of an asset or liability.', NULL), + (22, 'LoanPortfolioGross', 3, NULL, 2, + 'All outstanding principals due for all outstanding client loans. This includes current, delinquent, and renegotiated loans, but not loans that have been written off. It does not include interest receivable.', + NULL), + (23, 'LoanPortfolioGross', 3, 'CreditProductsDimension:MicroenterpriseMember', 2, + 'Loans that finance the production or trade of goods and services for an individual\'s microenterprise, + whether or not the microenterprise is legally registered. Segmentation based on loan product.', NULL), (24, 'LoanPortfolioGross', 3, 'DelinquencyDimension:OneMonthOrMoreMember', 2, 'Segmentation based on the principal balance of all loans outstanding that have one or more installments of principal past due or renegotiated. Segmentation based on the principal balance of all loans outstanding that have one or more installments of principal past due or renegotiated.', NULL), (25, 'LoanPortfolioGross', 3, 'DelinquencyDimension:ThreeMonthsOrMoreMember', 2, 'Segmentation based on the principal balance of all loans outstanding that have one or more installments of principal past due or renegotiated.? Segmentation based on the principal balance of all loans outstanding that have one or more installments of principal past due or renegotiated.', NULL), (26, 'LoanPortfolioGross', 3, 'LocationDimension:RuralMember', 2, 'Located in rural areas. Segmentation based on geographic location.', NULL), @@ -569,98 +1212,261 @@ INSERT INTO `mix_taxonomy` (`id`, `name`, `namespace_id`, `dimension`, `type`, ` (29, 'LoanPortfolioGross', 3, 'MaturityDimension:MoreThanOneYearMember', 2, 'Segmentation based on the life of an asset or liability.', NULL), (30, 'NetLoanLoss', 3, '', 3, 'Referred to the value of delinquency loans written off net of any principal recovery.', NULL), (31, 'NetLoanLossProvisionExpense', 3, NULL, 3, 'Represent the net value of loan portfolio impairment loss considering any reversal on impairment loss and any recovery on loans written off recognized as a income during the accounting period.', NULL), - (32, 'NetOperatingIncome', 3, NULL, 2, 'Total operating revenue less all expenses related to the MFI\'s core financial service operation including total financial expense, impairment loss and operating expense. Donations are excluded.', NULL), - (33, 'NetOperatingIncomeNetOfTaxExpense', 3, NULL, 3, 'Net operating income reported incorporating the effect of taxes. Taxes include all domestic and foreign taxes which are based on taxable profits, other taxes related to personnel, financial transactions or value-added taxes are not considered in calculation of this value.', NULL), - (34, 'NumberOfActiveBorrowers', 3, NULL, 0, 'The number of individuals who currently have an outstanding loan balance with the MFI or are primarily responsible for repaying any portion of the gross loan portfolio. Individuals who have multiple loans with an MFI should be counted as a single borrower.', NULL), - (35, 'NumberOfActiveBorrowers', 3, 'GenderDimension:FemaleMember', 0, 'The number of individuals who currently have an outstanding loan balance with the MFI or are primarily responsible for repaying any portion of the gross loan portfolio. Individuals who have multiple loans with an MFI should be counted as a single borrower.', NULL), - (36, 'NumberOfBoardMembers', 3, 'GenderDimension:FemaleMember', 0, 'The number of members that comprise the board of directors at the end of the reporting period who are female.', NULL), - (37, 'NumberOfDepositAccounts', 3, NULL, 0, 'The number of individuals who currently have funds on deposit with the MFI on a voluntary basis; i.e., they are not required to maintain the deposit account to access a loan. This number applies only to deposits held by an MFI, not to those deposits held in other institutions by the MFI\'s clients. The number should be based on the number of individuals rather than the number of groups. A single deposit account may represent multiple depositors.', NULL), + (32, 'NetOperatingIncome', 3, NULL, 2, 'Total operating revenue less all expenses related to the MFI\'s core financial service operation including total financial expense, impairment loss and operating expense. Donations are excluded.', + NULL), + (33, 'NetOperatingIncomeNetOfTaxExpense', 3, NULL, 3, + 'Net operating income reported incorporating the effect of taxes. Taxes include all domestic and foreign taxes which are based on taxable profits, other taxes related to personnel, financial transactions or value-added taxes are not considered in calculation of this value.', + NULL), + (34, 'NumberOfActiveBorrowers', 3, NULL, 0, + 'The number of individuals who currently have an outstanding loan balance with the MFI or are primarily responsible for repaying any portion of the gross loan portfolio. Individuals who have multiple loans with an MFI should be counted as a single borrower.', + NULL), + (35, 'NumberOfActiveBorrowers', 3, 'GenderDimension:FemaleMember', 0, + 'The number of individuals who currently have an outstanding loan balance with the MFI or are primarily responsible for repaying any portion of the gross loan portfolio. Individuals who have multiple loans with an MFI should be counted as a single borrower.', + NULL), + (36, 'NumberOfBoardMembers', 3, 'GenderDimension:FemaleMember', 0, + 'The number of members that comprise the board of directors at the end of the reporting period who are female.', + NULL), + (37, 'NumberOfDepositAccounts', 3, NULL, 0, + 'The number of individuals who currently have funds on deposit with the MFI on a voluntary basis; i.e., they are not required to maintain the deposit account to access a loan. This number applies only to deposits held by an MFI, not to those deposits held in other institutions by the MFI\'s clients. The number should be based on the number of individuals rather than the number of groups. A single deposit account may represent multiple depositors.', NULL), (38, 'NumberOfDepositors', 3, '', 0, 'The number of deposit accounts, both voluntary and compulsory, opened at the MFI whose balances the institution is liable to repay. The number should be based on the number of individual accounts rather than on the number of groups.', NULL), - (39, 'NumberOfEmployees', 3, NULL, 0, 'The number of individuals who are actively employed by an entity. This number includes contract employees or advisors who dedicate a substantial portion of their time to the entity, even if they are not on the entity\'s employees roster.', NULL), - (40, 'NumberOfEmployees', 3, 'GenderDimension:FemaleMember', 0, 'The number of individuals who are actively employed by an entity. This number includes contract employees or advisors who dedicate a substantial portion of their time to the entity, even if they are not on the entity\'s employees roster.', NULL), + (39, 'NumberOfEmployees', 3, NULL, 0, 'The number of individuals who are actively employed by an entity. This number includes contract employees or advisors who dedicate a substantial portion of their time to the entity, + even if they are not on the entity\'s employees roster.', NULL), + (40, 'NumberOfEmployees', 3, 'GenderDimension:FemaleMember', 0, + 'The number of individuals who are actively employed by an entity. This number includes contract employees or advisors who dedicate a substantial portion of their time to the entity, even if they are not on the entity\'s employees roster.', NULL), (41, 'NumberOfLoanOfficers', 3, NULL, 0, 'The number of employees whose main activity is to manage a portion of the gross loan portfolio. A loan officer is a staff member of record who is directly responsible for arranging and monitoring client loans.', NULL), (42, 'NumberOfLoanOfficers', 3, 'GenderDimension:FemaleMember', 0, 'The number of employees whose main activity is to manage a portion of the gross loan portfolio. A loan officer is a staff member of record who is directly responsible for arranging and monitoring client loans.', NULL), (43, 'NumberOfManagers', 3, 'GenderDimension:FemaleMember', 0, 'The number of members that comprise the management of the institution who are female.', NULL), (44, 'NumberOfOffices', 3, NULL, 0, 'The number of staffed points of service and administrative sites used to deliver or support the delivery of financial services to microfinance clients.', NULL), - (45, 'NumberOfOutstandingLoans', 3, NULL, 0, 'The number of loans in the gross loan portfolio. For MFIs using a group lending methodology, the number of loans should refer to the number of individuals receiving loans as part of a group or as part of a group loan.', NULL), - (46, 'OperatingExpense', 3, NULL, 3, 'Includes expenses not related to financial and credit loss impairment, such as personnel expenses, depreciation, amortization and administrative expenses.', NULL), - (47, 'OperatingIncome', 3, NULL, 2, 'Includes all financial income and other operating revenue which is generated from non-financial services. Operating income also includes net gains (losses) from holding financial assets (changes on their values during the period and foreign exchange differences). Donations or any revenue not related with an MFI\'s core business of making loans and providing financial services are not considered under this category.', NULL), - (48, 'WriteOffsOnGrossLoanPortfolio', 3, NULL, 2, 'The value of loans that have been recognized as uncollectible for accounting purposes. A write-off is an accounting procedure that removes the outstanding balance of the loan from the gross loan portfolio and impairment loss allowance. Thus, the write-off does not affect the net loan portfolio, total assets, or any equity account. If the impairment loss allowance is insufficient to cover the amount written off, the excess amount will result in an additional impairment loss on loans recognised in profit or loss of the period.', NULL); + (45, 'NumberOfOutstandingLoans', 3, NULL, 0, 'The number of loans in the gross loan portfolio. For MFIs using a group lending methodology, + the number of loans should refer to the number of individuals receiving loans as part of a group or as part of a group loan.', NULL), + (46, 'OperatingExpense', 3, NULL, 3, 'Includes expenses not related to financial and credit loss impairment, + such as personnel expenses, depreciation, amortization and administrative expenses.', NULL), + (47, 'OperatingIncome', 3, NULL, 2, 'Includes all financial income and other operating revenue which is generated from non-financial services. Operating income also includes net gains (losses) from holding financial assets (changes on their values during the period and foreign exchange differences). Donations or any revenue not related with an MFI\'s core business of making loans and providing financial services are not considered under this category.', + NULL), + (48, 'WriteOffsOnGrossLoanPortfolio', 3, NULL, 2, + 'The value of loans that have been recognized as uncollectible for accounting purposes. A write-off is an accounting procedure that removes the outstanding balance of the loan from the gross loan portfolio and impairment loss allowance. Thus, the write-off does not affect the net loan portfolio, total assets, or any equity account. If the impairment loss allowance is insufficient to cover the amount written off, the excess amount will result in an additional impairment loss on loans recognised in profit or loss of the period.', + NULL); /*!40000 ALTER TABLE `mix_taxonomy` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.mix_taxonomy_mapping DROP TABLE IF EXISTS `mix_taxonomy_mapping`; -CREATE TABLE IF NOT EXISTS `mix_taxonomy_mapping` ( - `id` INT unsigned NOT NULL AUTO_INCREMENT, - `identifier` varchar(50) NOT NULL DEFAULT '', - `config` varchar(200) DEFAULT NULL, - `last_update_date` datetime DEFAULT NULL, - `currency` varchar(11) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `mix_taxonomy_mapping` +( + `id` + INT + unsigned + NOT + NULL + AUTO_INCREMENT, + `identifier` + varchar +( + 50 +) NOT NULL DEFAULT '', + `config` varchar +( + 200 +) DEFAULT NULL, + `last_update_date` datetime DEFAULT NULL, + `currency` varchar +( + 11 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +) + ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.mix_taxonomy_mapping: ~0 rows (approximately) /*!40000 ALTER TABLE `mix_taxonomy_mapping` DISABLE KEYS */; -INSERT INTO `mix_taxonomy_mapping` (`id`, `identifier`, `config`, `last_update_date`, `currency`) VALUES - (1, 'default', NULL, NULL, ''); +INSERT INTO `mix_taxonomy_mapping` (`id`, `identifier`, `config`, `last_update_date`, `currency`) +VALUES (1, 'default', NULL, NULL, ''); /*!40000 ALTER TABLE `mix_taxonomy_mapping` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.mix_xbrl_namespace DROP TABLE IF EXISTS `mix_xbrl_namespace`; -CREATE TABLE IF NOT EXISTS `mix_xbrl_namespace` ( - `id` INT unsigned NOT NULL AUTO_INCREMENT, - `prefix` varchar(20) NOT NULL DEFAULT '', - `url` varchar(100) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `UNQUE` (`prefix`) -) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `mix_xbrl_namespace` +( + `id` + INT + unsigned + NOT + NULL + AUTO_INCREMENT, + `prefix` + varchar +( + 20 +) NOT NULL DEFAULT '', + `url` varchar +( + 100 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `UNQUE` +( + `prefix` +) + ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.mix_xbrl_namespace: ~7 rows (approximately) /*!40000 ALTER TABLE `mix_xbrl_namespace` DISABLE KEYS */; -INSERT INTO `mix_xbrl_namespace` (`id`, `prefix`, `url`) VALUES - (1, 'ifrs', 'http://xbrl.iasb.org/taxonomy/2009-04-01/ifrs'), - (2, 'iso4217', 'http://www.xbrl.org/2003/iso4217'), - (3, 'mix', 'http://www.themix.org/INT/fr/ifrs/basi/YYYY-MM-DD/mx-cor'), - (4, 'xbrldi', 'http://xbrl.org/2006/xbrldi'), - (5, 'xbrli', 'http://www.xbrl.org/2003/instance'), - (6, 'link', 'http://www.xbrl.org/2003/linkbase'), - (7, 'dc-all', 'http://www.themix.org/INT/fr/ifrs/basi/2010-08-31/dc-all'); +INSERT INTO `mix_xbrl_namespace` (`id`, `prefix`, `url`) +VALUES (1, 'ifrs', 'http://xbrl.iasb.org/taxonomy/2009-04-01/ifrs'), + (2, 'iso4217', 'http://www.xbrl.org/2003/iso4217'), + (3, 'mix', 'http://www.themix.org/INT/fr/ifrs/basi/YYYY-MM-DD/mx-cor'), + (4, 'xbrldi', 'http://xbrl.org/2006/xbrldi'), + (5, 'xbrli', 'http://www.xbrl.org/2003/instance'), + (6, 'link', 'http://www.xbrl.org/2003/linkbase'), + (7, 'dc-all', 'http://www.themix.org/INT/fr/ifrs/basi/2010-08-31/dc-all'); /*!40000 ALTER TABLE `mix_xbrl_namespace` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.m_account_transfer_details DROP TABLE IF EXISTS `m_account_transfer_details`; -CREATE TABLE IF NOT EXISTS `m_account_transfer_details` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `from_office_id` BIGINT NOT NULL, - `to_office_id` BIGINT NOT NULL, - `from_client_id` BIGINT DEFAULT NULL, - `to_client_id` BIGINT DEFAULT NULL, - `from_savings_account_id` BIGINT DEFAULT NULL, - `to_savings_account_id` BIGINT DEFAULT NULL, - `from_loan_account_id` BIGINT DEFAULT NULL, - `to_loan_account_id` BIGINT DEFAULT NULL, - `transfer_type` SMALLINT DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_account_transfer_details_from_office` (`from_office_id`), - KEY `FK_m_account_transfer_details_to_office` (`to_office_id`), - KEY `FK_m_account_transfer_details_from_client` (`from_client_id`), - KEY `FK_m_account_transfer_details_to_client` (`to_client_id`), - KEY `FK_m_account_transfer_details_from_savings_account` (`from_savings_account_id`), - KEY `FK_m_account_transfer_details_to_savings_account` (`to_savings_account_id`), - KEY `FK_m_account_transfer_details_from_loan_account` (`from_loan_account_id`), - KEY `FK_m_account_transfer_details_to_loan_account` (`to_loan_account_id`), - CONSTRAINT `FK_m_account_transfer_details_from_client` FOREIGN KEY (`from_client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FK_m_account_transfer_details_from_loan_account` FOREIGN KEY (`from_loan_account_id`) REFERENCES `m_loan` (`id`), - CONSTRAINT `FK_m_account_transfer_details_from_office` FOREIGN KEY (`from_office_id`) REFERENCES `m_office` (`id`), - CONSTRAINT `FK_m_account_transfer_details_from_savings_account` FOREIGN KEY (`from_savings_account_id`) REFERENCES `m_savings_account` (`id`), - CONSTRAINT `FK_m_account_transfer_details_to_client` FOREIGN KEY (`to_client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FK_m_account_transfer_details_to_loan_account` FOREIGN KEY (`to_loan_account_id`) REFERENCES `m_loan` (`id`), - CONSTRAINT `FK_m_account_transfer_details_to_office` FOREIGN KEY (`to_office_id`) REFERENCES `m_office` (`id`), - CONSTRAINT `FK_m_account_transfer_details_to_savings_account` FOREIGN KEY (`to_savings_account_id`) REFERENCES `m_savings_account` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_account_transfer_details` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `from_office_id` + BIGINT + NOT + NULL, + `to_office_id` + BIGINT + NOT + NULL, + `from_client_id` + BIGINT + DEFAULT + NULL, + `to_client_id` + BIGINT + DEFAULT + NULL, + `from_savings_account_id` + BIGINT + DEFAULT + NULL, + `to_savings_account_id` + BIGINT + DEFAULT + NULL, + `from_loan_account_id` + BIGINT + DEFAULT + NULL, + `to_loan_account_id` + BIGINT + DEFAULT + NULL, + `transfer_type` + SMALLINT + DEFAULT + NULL, + PRIMARY + KEY +( + `id` +), + KEY `FK_m_account_transfer_details_from_office` +( + `from_office_id` +), + KEY `FK_m_account_transfer_details_to_office` +( + `to_office_id` +), + KEY `FK_m_account_transfer_details_from_client` +( + `from_client_id` +), + KEY `FK_m_account_transfer_details_to_client` +( + `to_client_id` +), + KEY `FK_m_account_transfer_details_from_savings_account` +( + `from_savings_account_id` +), + KEY `FK_m_account_transfer_details_to_savings_account` +( + `to_savings_account_id` +), + KEY `FK_m_account_transfer_details_from_loan_account` +( + `from_loan_account_id` +), + KEY `FK_m_account_transfer_details_to_loan_account` +( + `to_loan_account_id` +), + CONSTRAINT `FK_m_account_transfer_details_from_client` FOREIGN KEY +( + `from_client_id` +) REFERENCES `m_client` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_details_from_loan_account` FOREIGN KEY +( + `from_loan_account_id` +) REFERENCES `m_loan` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_details_from_office` FOREIGN KEY +( + `from_office_id` +) REFERENCES `m_office` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_details_from_savings_account` FOREIGN KEY +( + `from_savings_account_id` +) REFERENCES `m_savings_account` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_details_to_client` FOREIGN KEY +( + `to_client_id` +) REFERENCES `m_client` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_details_to_loan_account` FOREIGN KEY +( + `to_loan_account_id` +) REFERENCES `m_loan` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_details_to_office` FOREIGN KEY +( + `to_office_id` +) REFERENCES `m_office` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_details_to_savings_account` FOREIGN KEY +( + `to_savings_account_id` +) REFERENCES `m_savings_account` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_account_transfer_details: ~0 rows (approximately) /*!40000 ALTER TABLE `m_account_transfer_details` DISABLE KEYS */; @@ -669,27 +1475,55 @@ CREATE TABLE IF NOT EXISTS `m_account_transfer_details` ( -- Dumping structure for table mifostenant-reference.m_account_transfer_standing_instructions DROP TABLE IF EXISTS `m_account_transfer_standing_instructions`; -CREATE TABLE IF NOT EXISTS `m_account_transfer_standing_instructions` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(250) NOT NULL, - `account_transfer_details_id` BIGINT NOT NULL, - `priority` TINYINT NOT NULL, - `status` TINYINT NOT NULL, - `instruction_type` TINYINT NOT NULL, - `amount` decimal(19,6) DEFAULT NULL, - `valid_from` date NOT NULL, - `valid_till` date DEFAULT NULL, - `recurrence_type` tinyint NOT NULL, - `recurrence_frequency` SMALLINT DEFAULT NULL, - `recurrence_interval` SMALLINT DEFAULT NULL, - `recurrence_on_day` SMALLINT DEFAULT NULL, - `recurrence_on_month` SMALLINT DEFAULT NULL, - `last_run_date` date DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`), - KEY `FK_m_standing_instructions_account_transfer_details` (`account_transfer_details_id`), - CONSTRAINT `FK_m_standing_instructions_account_transfer_details` FOREIGN KEY (`account_transfer_details_id`) REFERENCES `m_account_transfer_details` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_account_transfer_standing_instructions` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `name` + varchar +( + 250 +) NOT NULL, + `account_transfer_details_id` BIGINT NOT NULL, + `priority` TINYINT NOT NULL, + `status` TINYINT NOT NULL, + `instruction_type` TINYINT NOT NULL, + `amount` decimal +( + 19, + 6 +) DEFAULT NULL, + `valid_from` date NOT NULL, + `valid_till` date DEFAULT NULL, + `recurrence_type` tinyint NOT NULL, + `recurrence_frequency` SMALLINT DEFAULT NULL, + `recurrence_interval` SMALLINT DEFAULT NULL, + `recurrence_on_day` SMALLINT DEFAULT NULL, + `recurrence_on_month` SMALLINT DEFAULT NULL, + `last_run_date` date DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `name` +( + `name` +), + KEY `FK_m_standing_instructions_account_transfer_details` +( + `account_transfer_details_id` +), + CONSTRAINT `FK_m_standing_instructions_account_transfer_details` FOREIGN KEY +( + `account_transfer_details_id` +) REFERENCES `m_account_transfer_details` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_account_transfer_standing_instructions: ~0 rows (approximately) /*!40000 ALTER TABLE `m_account_transfer_standing_instructions` DISABLE KEYS */; @@ -698,17 +1532,48 @@ CREATE TABLE IF NOT EXISTS `m_account_transfer_standing_instructions` ( -- Dumping structure for table mifostenant-reference.m_account_transfer_standing_instructions_history DROP TABLE IF EXISTS `m_account_transfer_standing_instructions_history`; -CREATE TABLE IF NOT EXISTS `m_account_transfer_standing_instructions_history` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `standing_instruction_id` BIGINT NOT NULL, - `status` varchar(20) NOT NULL, - `execution_time` datetime NOT NULL, - `amount` decimal(19,6) NOT NULL, - `error_log` varchar(500) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_account_transfer_standing_instructions_history` (`standing_instruction_id`), - CONSTRAINT `FK_m_account_transfer_standing_instructions_m_history` FOREIGN KEY (`standing_instruction_id`) REFERENCES `m_account_transfer_standing_instructions` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_account_transfer_standing_instructions_history` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `standing_instruction_id` + BIGINT + NOT + NULL, + `status` + varchar +( + 20 +) NOT NULL, + `execution_time` datetime NOT NULL, + `amount` decimal +( + 19, + 6 +) NOT NULL, + `error_log` varchar +( + 500 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +), + KEY `FK_m_account_transfer_standing_instructions_history` +( + `standing_instruction_id` +), + CONSTRAINT `FK_m_account_transfer_standing_instructions_m_history` FOREIGN KEY +( + `standing_instruction_id` +) REFERENCES `m_account_transfer_standing_instructions` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_account_transfer_standing_instructions_history: ~0 rows (approximately) /*!40000 ALTER TABLE `m_account_transfer_standing_instructions_history` DISABLE KEYS */; @@ -717,32 +1582,117 @@ CREATE TABLE IF NOT EXISTS `m_account_transfer_standing_instructions_history` ( -- Dumping structure for table mifostenant-reference.m_account_transfer_transaction DROP TABLE IF EXISTS `m_account_transfer_transaction`; -CREATE TABLE IF NOT EXISTS `m_account_transfer_transaction` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_transfer_details_id` BIGINT NOT NULL, - `from_savings_transaction_id` BIGINT DEFAULT NULL, - `from_loan_transaction_id` BIGINT DEFAULT NULL, - `to_savings_transaction_id` BIGINT DEFAULT NULL, - `to_loan_transaction_id` BIGINT DEFAULT NULL, - `is_reversed` tinyint NOT NULL, - `transaction_date` date NOT NULL, - `currency_code` varchar(3) NOT NULL, - `currency_digits` SMALLINT NOT NULL, - `currency_multiplesof` SMALLINT DEFAULT NULL, - `amount` decimal(19,6) NOT NULL, - `description` varchar(200) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_account_transfer_transaction_from_m_savings_transaction` (`from_savings_transaction_id`), - KEY `FK_m_account_transfer_transaction_to_m_savings_transaction` (`to_savings_transaction_id`), - KEY `FK_m_account_transfer_transaction_to_m_loan_transaction` (`to_loan_transaction_id`), - KEY `FK_m_account_transfer_transaction_from_m_loan_transaction` (`from_loan_transaction_id`), - KEY `FK_m_account_transfer_transaction_account_detail` (`account_transfer_details_id`), - CONSTRAINT `FK_m_account_transfer_transaction_account_detail` FOREIGN KEY (`account_transfer_details_id`) REFERENCES `m_account_transfer_details` (`id`), - CONSTRAINT `FK_m_account_transfer_transaction_from_m_loan_transaction` FOREIGN KEY (`from_loan_transaction_id`) REFERENCES `m_loan_transaction` (`id`), - CONSTRAINT `FK_m_account_transfer_transaction_from_m_savings_transaction` FOREIGN KEY (`from_savings_transaction_id`) REFERENCES `m_savings_account_transaction` (`id`), - CONSTRAINT `FK_m_account_transfer_transaction_to_m_loan_transaction` FOREIGN KEY (`to_loan_transaction_id`) REFERENCES `m_loan_transaction` (`id`), - CONSTRAINT `FK_m_account_transfer_transaction_to_m_savings_transaction` FOREIGN KEY (`to_savings_transaction_id`) REFERENCES `m_savings_account_transaction` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_account_transfer_transaction` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `account_transfer_details_id` + BIGINT + NOT + NULL, + `from_savings_transaction_id` + BIGINT + DEFAULT + NULL, + `from_loan_transaction_id` + BIGINT + DEFAULT + NULL, + `to_savings_transaction_id` + BIGINT + DEFAULT + NULL, + `to_loan_transaction_id` + BIGINT + DEFAULT + NULL, + `is_reversed` + tinyint + NOT + NULL, + `transaction_date` + date + NOT + NULL, + `currency_code` + varchar +( + 3 +) NOT NULL, + `currency_digits` SMALLINT NOT NULL, + `currency_multiplesof` SMALLINT DEFAULT NULL, + `amount` decimal +( + 19, + 6 +) NOT NULL, + `description` varchar +( + 200 +) NOT NULL, + PRIMARY KEY +( + `id` +), + KEY `FK_m_account_transfer_transaction_from_m_savings_transaction` +( + `from_savings_transaction_id` +), + KEY `FK_m_account_transfer_transaction_to_m_savings_transaction` +( + `to_savings_transaction_id` +), + KEY `FK_m_account_transfer_transaction_to_m_loan_transaction` +( + `to_loan_transaction_id` +), + KEY `FK_m_account_transfer_transaction_from_m_loan_transaction` +( + `from_loan_transaction_id` +), + KEY `FK_m_account_transfer_transaction_account_detail` +( + `account_transfer_details_id` +), + CONSTRAINT `FK_m_account_transfer_transaction_account_detail` FOREIGN KEY +( + `account_transfer_details_id` +) REFERENCES `m_account_transfer_details` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_transaction_from_m_loan_transaction` FOREIGN KEY +( + `from_loan_transaction_id` +) REFERENCES `m_loan_transaction` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_transaction_from_m_savings_transaction` FOREIGN KEY +( + `from_savings_transaction_id` +) REFERENCES `m_savings_account_transaction` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_transaction_to_m_loan_transaction` FOREIGN KEY +( + `to_loan_transaction_id` +) REFERENCES `m_loan_transaction` +( + `id` +), + CONSTRAINT `FK_m_account_transfer_transaction_to_m_savings_transaction` FOREIGN KEY +( + `to_savings_transaction_id` +) REFERENCES `m_savings_account_transaction` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_account_transfer_transaction: ~0 rows (approximately) /*!40000 ALTER TABLE `m_account_transfer_transaction` DISABLE KEYS */; @@ -751,30 +1701,95 @@ CREATE TABLE IF NOT EXISTS `m_account_transfer_transaction` ( -- Dumping structure for table mifostenant-reference.m_address DROP TABLE IF EXISTS `m_address`; -CREATE TABLE IF NOT EXISTS `m_address` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `street` varchar(100) DEFAULT NULL, - `address_line_1` varchar(100) DEFAULT NULL, - `address_line_2` varchar(100) DEFAULT NULL, - `address_line_3` varchar(100) DEFAULT NULL, - `town_village` varchar(100) DEFAULT NULL, - `city` varchar(100) DEFAULT NULL, - `county_district` varchar(100) DEFAULT NULL, - `state_province_id` INT DEFAULT NULL, - `country_id` INT DEFAULT NULL, - `postal_code` varchar(10) DEFAULT NULL, - `latitude` decimal(10,8) DEFAULT '0.00000000', - `longitude` decimal(10,8) DEFAULT '0.00000000', - `created_by` varchar(100) DEFAULT NULL, - `created_on` date DEFAULT NULL, - `updated_by` varchar(100) DEFAULT NULL, - `updated_on` date DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `address_fields_codefk1` (`state_province_id`), - KEY `address_fields_codefk2` (`country_id`), - CONSTRAINT `address_fields_codefk1` FOREIGN KEY (`state_province_id`) REFERENCES `m_code_value` (`id`), - CONSTRAINT `address_fields_codefk2` FOREIGN KEY (`country_id`) REFERENCES `m_code_value` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_address` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `street` + varchar +( + 100 +) DEFAULT NULL, + `address_line_1` varchar +( + 100 +) DEFAULT NULL, + `address_line_2` varchar +( + 100 +) DEFAULT NULL, + `address_line_3` varchar +( + 100 +) DEFAULT NULL, + `town_village` varchar +( + 100 +) DEFAULT NULL, + `city` varchar +( + 100 +) DEFAULT NULL, + `county_district` varchar +( + 100 +) DEFAULT NULL, + `state_province_id` INT DEFAULT NULL, + `country_id` INT DEFAULT NULL, + `postal_code` varchar +( + 10 +) DEFAULT NULL, + `latitude` decimal +( + 10, + 8 +) DEFAULT '0.00000000', + `longitude` decimal +( + 10, + 8 +) DEFAULT '0.00000000', + `created_by` varchar +( + 100 +) DEFAULT NULL, + `created_on` date DEFAULT NULL, + `updated_by` varchar +( + 100 +) DEFAULT NULL, + `updated_on` date DEFAULT NULL, + PRIMARY KEY +( + `id` +), + KEY `address_fields_codefk1` +( + `state_province_id` +), + KEY `address_fields_codefk2` +( + `country_id` +), + CONSTRAINT `address_fields_codefk1` FOREIGN KEY +( + `state_province_id` +) REFERENCES `m_code_value` +( + `id` +), + CONSTRAINT `address_fields_codefk2` FOREIGN KEY +( + `country_id` +) REFERENCES `m_code_value` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_address: ~0 rows (approximately) /*!40000 ALTER TABLE `m_address` DISABLE KEYS */; @@ -783,55 +1798,165 @@ CREATE TABLE IF NOT EXISTS `m_address` ( -- Dumping structure for table mifostenant-reference.m_appuser DROP TABLE IF EXISTS `m_appuser`; -CREATE TABLE IF NOT EXISTS `m_appuser` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `is_deleted` tinyint NOT NULL DEFAULT '0', - `office_id` BIGINT DEFAULT NULL, - `staff_id` BIGINT DEFAULT NULL, - `username` varchar(100) NOT NULL, - `firstname` varchar(100) NOT NULL, - `lastname` varchar(100) NOT NULL, - `password` varchar(255) NOT NULL, - `email` varchar(100) NOT NULL, - `firsttime_login_remaining` bit(1) NOT NULL, - `nonexpired` bit(1) NOT NULL, - `nonlocked` bit(1) NOT NULL, - `nonexpired_credentials` bit(1) NOT NULL, - `enabled` bit(1) NOT NULL, - `last_time_password_updated` date NOT NULL, - `password_never_expires` TINYINT NOT NULL DEFAULT '0' COMMENT 'define if the password, should be check for validity period or not', - `is_self_service_user` bit(1) NOT NULL DEFAULT b'0', - PRIMARY KEY (`id`), - UNIQUE KEY `username_org` (`username`), - KEY `FKB3D587CE0DD567A` (`office_id`), - KEY `fk_m_appuser_002x` (`staff_id`), - KEY `last_time_password_updated` (`last_time_password_updated`), - CONSTRAINT `FKB3D587CE0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`), - CONSTRAINT `fk_m_appuser_002` FOREIGN KEY (`staff_id`) REFERENCES `m_staff` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_appuser` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `is_deleted` + tinyint + NOT + NULL + DEFAULT + '0', + `office_id` + BIGINT + DEFAULT + NULL, + `staff_id` + BIGINT + DEFAULT + NULL, + `username` + varchar +( + 100 +) NOT NULL, + `firstname` varchar +( + 100 +) NOT NULL, + `lastname` varchar +( + 100 +) NOT NULL, + `password` varchar +( + 255 +) NOT NULL, + `email` varchar +( + 100 +) NOT NULL, + `firsttime_login_remaining` bit +( + 1 +) NOT NULL, + `nonexpired` bit +( + 1 +) NOT NULL, + `nonlocked` bit +( + 1 +) NOT NULL, + `nonexpired_credentials` bit +( + 1 +) NOT NULL, + `enabled` bit +( + 1 +) NOT NULL, + `last_time_password_updated` date NOT NULL, + `password_never_expires` TINYINT NOT NULL DEFAULT '0' COMMENT 'define if the password, should be check for validity period or not', + `is_self_service_user` bit +( + 1 +) NOT NULL DEFAULT b'0', + PRIMARY KEY +( + `id` +), + UNIQUE KEY `username_org` +( + `username` +), + KEY `FKB3D587CE0DD567A` +( + `office_id` +), + KEY `fk_m_appuser_002x` +( + `staff_id` +), + KEY `last_time_password_updated` +( + `last_time_password_updated` +), + CONSTRAINT `FKB3D587CE0DD567A` FOREIGN KEY +( + `office_id` +) REFERENCES `m_office` +( + `id` +), + CONSTRAINT `fk_m_appuser_002` FOREIGN KEY +( + `staff_id` +) REFERENCES `m_staff` +( + `id` +) ON DELETE NO ACTION + ON UPDATE NO ACTION + ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_appuser: ~5 rows (approximately) /*!40000 ALTER TABLE `m_appuser` DISABLE KEYS */; -INSERT INTO `m_appuser` (`id`, `is_deleted`, `office_id`, `staff_id`, `username`, `firstname`, `lastname`, `password`, `email`, `firsttime_login_remaining`, `nonexpired`, `nonlocked`, `nonexpired_credentials`, `enabled`, `last_time_password_updated`, `password_never_expires`, `is_self_service_user`) VALUES - (1, 0, 1, NULL, 'mifos', 'App', 'Administrator', '5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a', 'demomfi@mifos.org', b'0', b'1', b'1', b'1', b'1', '2014-03-07', 0, b'0'), - (2, 0, 1, NULL, 'adama', 'Adam', 'A', '08a5c6ee6e7361aa153b4c8620d31bcedef514238a69c0f30f05fe460663cbc6', 'adama@123.com', b'0', b'1', b'1', b'1', b'1', '2014-03-07', 0, b'0'), - (4, 0, 2, NULL, 'benb', 'Ben', 'B', '19d327dc34e2f7b889b571ad9651355e8cce87493611847c70fabf1fcfa914c8', 'benb@123.com', b'0', b'1', b'1', b'1', b'1', '2014-03-07', 0, b'0'), - (5, 0, 3, NULL, 'janej', 'Jane', 'J', 'f37ddcab2b9cfb015d94becdda719361ce13df943058cbf3130db468c288acb9', 'janej@123.com', b'0', b'1', b'1', b'1', b'1', '2014-03-07', 0, b'0'), - (6, 0, 1, NULL, 'system', 'system', 'system', '5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a', 'demomfi@mifos.org', b'0', b'1', b'1', b'1', b'1', '2014-03-07', 0, b'0'); +INSERT INTO `m_appuser` (`id`, `is_deleted`, `office_id`, `staff_id`, `username`, `firstname`, `lastname`, `password`, + `email`, `firsttime_login_remaining`, `nonexpired`, `nonlocked`, `nonexpired_credentials`, + `enabled`, `last_time_password_updated`, `password_never_expires`, `is_self_service_user`) +VALUES (1, 0, 1, NULL, 'mifos', 'App', 'Administrator', + '5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a', 'demomfi@mifos.org', b'0', b'1', b'1', b'1', + b'1', '2014-03-07', 0, b'0'), + (2, 0, 1, NULL, 'adama', 'Adam', 'A', '08a5c6ee6e7361aa153b4c8620d31bcedef514238a69c0f30f05fe460663cbc6', + 'adama@123.com', b'0', b'1', b'1', b'1', b'1', '2014-03-07', 0, b'0'), + (4, 0, 2, NULL, 'benb', 'Ben', 'B', '19d327dc34e2f7b889b571ad9651355e8cce87493611847c70fabf1fcfa914c8', + 'benb@123.com', b'0', b'1', b'1', b'1', b'1', '2014-03-07', 0, b'0'), + (5, 0, 3, NULL, 'janej', 'Jane', 'J', 'f37ddcab2b9cfb015d94becdda719361ce13df943058cbf3130db468c288acb9', + 'janej@123.com', b'0', b'1', b'1', b'1', b'1', '2014-03-07', 0, b'0'), + (6, 0, 1, NULL, 'system', 'system', 'system', '5787039480429368bf94732aacc771cd0a3ea02bcf504ffe1185ab94213bc63a', + 'demomfi@mifos.org', b'0', b'1', b'1', b'1', b'1', '2014-03-07', 0, b'0'); /*!40000 ALTER TABLE `m_appuser` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.m_appuser_previous_password DROP TABLE IF EXISTS `m_appuser_previous_password`; -CREATE TABLE IF NOT EXISTS `m_appuser_previous_password` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `user_id` BIGINT NOT NULL, - `password` varchar(255) NOT NULL, - `removal_date` date NOT NULL, - PRIMARY KEY (`id`), - KEY `user_id` (`user_id`), - CONSTRAINT `m_appuser_previous_password_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `m_appuser` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE IF NOT EXISTS `m_appuser_previous_password` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `user_id` + BIGINT + NOT + NULL, + `password` + varchar +( + 255 +) NOT NULL, + `removal_date` date NOT NULL, + PRIMARY KEY +( + `id` +), + KEY `user_id` +( + `user_id` +), + CONSTRAINT `m_appuser_previous_password_ibfk_1` FOREIGN KEY +( + `user_id` +) REFERENCES `m_appuser` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- Dumping data for table mifostenant-reference.m_appuser_previous_password: ~0 rows (approximately) /*!40000 ALTER TABLE `m_appuser_previous_password` DISABLE KEYS */; @@ -840,49 +1965,100 @@ CREATE TABLE IF NOT EXISTS `m_appuser_previous_password` ( -- Dumping structure for table mifostenant-reference.m_appuser_role DROP TABLE IF EXISTS `m_appuser_role`; -CREATE TABLE IF NOT EXISTS `m_appuser_role` ( - `appuser_id` BIGINT NOT NULL, - `role_id` BIGINT NOT NULL, - PRIMARY KEY (`appuser_id`,`role_id`), - KEY `FK7662CE59B4100309` (`appuser_id`), - KEY `FK7662CE5915CEC7AB` (`role_id`), - CONSTRAINT `FK7662CE5915CEC7AB` FOREIGN KEY (`role_id`) REFERENCES `m_role` (`id`), - CONSTRAINT `FK7662CE59B4100309` FOREIGN KEY (`appuser_id`) REFERENCES `m_appuser` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_appuser_role` +( + `appuser_id` + BIGINT + NOT + NULL, + `role_id` + BIGINT + NOT + NULL, + PRIMARY + KEY +( + `appuser_id`, + `role_id` +), + KEY `FK7662CE59B4100309` +( + `appuser_id` +), + KEY `FK7662CE5915CEC7AB` +( + `role_id` +), + CONSTRAINT `FK7662CE5915CEC7AB` FOREIGN KEY +( + `role_id` +) REFERENCES `m_role` +( + `id` +), + CONSTRAINT `FK7662CE59B4100309` FOREIGN KEY +( + `appuser_id` +) REFERENCES `m_appuser` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_appuser_role: ~4 rows (approximately) /*!40000 ALTER TABLE `m_appuser_role` DISABLE KEYS */; -INSERT INTO `m_appuser_role` (`appuser_id`, `role_id`) VALUES - (1, 1), - (2, 1), - (4, 1), - (5, 1); +INSERT INTO `m_appuser_role` (`appuser_id`, `role_id`) +VALUES (1, 1), + (2, 1), + (4, 1), + (5, 1); /*!40000 ALTER TABLE `m_appuser_role` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.m_calendar DROP TABLE IF EXISTS `m_calendar`; -CREATE TABLE IF NOT EXISTS `m_calendar` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `title` varchar(70) NOT NULL, - `description` varchar(100) DEFAULT NULL, - `location` varchar(50) DEFAULT NULL, - `start_date` date NOT NULL, - `end_date` date DEFAULT NULL, - `duration` SMALLINT DEFAULT NULL, - `calendar_type_enum` SMALLINT NOT NULL, - `repeating` tinyint NOT NULL DEFAULT '0', - `recurrence` varchar(100) DEFAULT NULL, - `remind_by_enum` SMALLINT DEFAULT NULL, - `first_reminder` smallint DEFAULT NULL, - `second_reminder` smallint DEFAULT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - `meeting_time` time DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_calendar` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `title` + varchar +( + 70 +) NOT NULL, + `description` varchar +( + 100 +) DEFAULT NULL, + `location` varchar +( + 50 +) DEFAULT NULL, + `start_date` date NOT NULL, + `end_date` date DEFAULT NULL, + `duration` SMALLINT DEFAULT NULL, + `calendar_type_enum` SMALLINT NOT NULL, + `repeating` tinyint NOT NULL DEFAULT '0', + `recurrence` varchar +( + 100 +) DEFAULT NULL, + `remind_by_enum` SMALLINT DEFAULT NULL, + `first_reminder` smallint DEFAULT NULL, + `second_reminder` smallint DEFAULT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + `meeting_time` time DEFAULT NULL, + PRIMARY KEY +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_calendar: ~0 rows (approximately) /*!40000 ALTER TABLE `m_calendar` DISABLE KEYS */; @@ -891,25 +2067,58 @@ CREATE TABLE IF NOT EXISTS `m_calendar` ( -- Dumping structure for table mifostenant-reference.m_calendar_history DROP TABLE IF EXISTS `m_calendar_history`; -CREATE TABLE IF NOT EXISTS `m_calendar_history` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `calendar_id` BIGINT NOT NULL, - `title` varchar(70) NOT NULL, - `description` varchar(100) DEFAULT NULL, - `location` varchar(50) DEFAULT NULL, - `start_date` date NOT NULL, - `end_date` date DEFAULT NULL, - `duration` SMALLINT DEFAULT NULL, - `calendar_type_enum` SMALLINT NOT NULL, - `repeating` tinyint NOT NULL DEFAULT '0', - `recurrence` varchar(100) DEFAULT NULL, - `remind_by_enum` SMALLINT DEFAULT NULL, - `first_reminder` smallint DEFAULT NULL, - `second_reminder` smallint DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_calendar_m_calendar_history` (`calendar_id`), - CONSTRAINT `FK_m_calendar_m_calendar_history` FOREIGN KEY (`calendar_id`) REFERENCES `m_calendar` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=latin1; +CREATE TABLE IF NOT EXISTS `m_calendar_history` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `calendar_id` + BIGINT + NOT + NULL, + `title` + varchar +( + 70 +) NOT NULL, + `description` varchar +( + 100 +) DEFAULT NULL, + `location` varchar +( + 50 +) DEFAULT NULL, + `start_date` date NOT NULL, + `end_date` date DEFAULT NULL, + `duration` SMALLINT DEFAULT NULL, + `calendar_type_enum` SMALLINT NOT NULL, + `repeating` tinyint NOT NULL DEFAULT '0', + `recurrence` varchar +( + 100 +) DEFAULT NULL, + `remind_by_enum` SMALLINT DEFAULT NULL, + `first_reminder` smallint DEFAULT NULL, + `second_reminder` smallint DEFAULT NULL, + PRIMARY KEY +( + `id` +), + KEY `FK_m_calendar_m_calendar_history` +( + `calendar_id` +), + CONSTRAINT `FK_m_calendar_m_calendar_history` FOREIGN KEY +( + `calendar_id` +) REFERENCES `m_calendar` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- Dumping data for table mifostenant-reference.m_calendar_history: ~0 rows (approximately) /*!40000 ALTER TABLE `m_calendar_history` DISABLE KEYS */; @@ -918,15 +2127,42 @@ CREATE TABLE IF NOT EXISTS `m_calendar_history` ( -- Dumping structure for table mifostenant-reference.m_calendar_instance DROP TABLE IF EXISTS `m_calendar_instance`; -CREATE TABLE IF NOT EXISTS `m_calendar_instance` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `calendar_id` BIGINT NOT NULL, - `entity_id` BIGINT NOT NULL, - `entity_type_enum` SMALLINT NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_calendar_m_calendar_instance` (`calendar_id`), - CONSTRAINT `FK_m_calendar_m_calendar_instance` FOREIGN KEY (`calendar_id`) REFERENCES `m_calendar` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_calendar_instance` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `calendar_id` + BIGINT + NOT + NULL, + `entity_id` + BIGINT + NOT + NULL, + `entity_type_enum` + SMALLINT + NOT + NULL, + PRIMARY + KEY +( + `id` +), + KEY `FK_m_calendar_m_calendar_instance` +( + `calendar_id` +), + CONSTRAINT `FK_m_calendar_m_calendar_instance` FOREIGN KEY +( + `calendar_id` +) REFERENCES `m_calendar` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_calendar_instance: ~0 rows (approximately) /*!40000 ALTER TABLE `m_calendar_instance` DISABLE KEYS */; @@ -935,22 +2171,64 @@ CREATE TABLE IF NOT EXISTS `m_calendar_instance` ( -- Dumping structure for table mifostenant-reference.m_cashiers DROP TABLE IF EXISTS `m_cashiers`; -CREATE TABLE IF NOT EXISTS `m_cashiers` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `staff_id` BIGINT DEFAULT NULL, - `teller_id` BIGINT DEFAULT NULL, - `description` varchar(100) DEFAULT NULL, - `start_date` date DEFAULT NULL, - `end_date` date DEFAULT NULL, - `start_time` varchar(10) DEFAULT NULL, - `end_time` varchar(10) DEFAULT NULL, - `full_day` TINYINT DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `IK_m_cashiers_m_staff` (`staff_id`), - KEY `IK_m_cashiers_m_teller` (`teller_id`), - CONSTRAINT `FK_m_cashiers_m_staff` FOREIGN KEY (`staff_id`) REFERENCES `m_staff` (`id`), - CONSTRAINT `FK_m_cashiers_m_teller` FOREIGN KEY (`teller_id`) REFERENCES `m_tellers` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_cashiers` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `staff_id` + BIGINT + DEFAULT + NULL, + `teller_id` + BIGINT + DEFAULT + NULL, + `description` + varchar +( + 100 +) DEFAULT NULL, + `start_date` date DEFAULT NULL, + `end_date` date DEFAULT NULL, + `start_time` varchar +( + 10 +) DEFAULT NULL, + `end_time` varchar +( + 10 +) DEFAULT NULL, + `full_day` TINYINT DEFAULT NULL, + PRIMARY KEY +( + `id` +), + KEY `IK_m_cashiers_m_staff` +( + `staff_id` +), + KEY `IK_m_cashiers_m_teller` +( + `teller_id` +), + CONSTRAINT `FK_m_cashiers_m_staff` FOREIGN KEY +( + `staff_id` +) REFERENCES `m_staff` +( + `id` +), + CONSTRAINT `FK_m_cashiers_m_teller` FOREIGN KEY +( + `teller_id` +) REFERENCES `m_tellers` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_cashiers: ~0 rows (approximately) /*!40000 ALTER TABLE `m_cashiers` DISABLE KEYS */; @@ -959,21 +2237,59 @@ CREATE TABLE IF NOT EXISTS `m_cashiers` ( -- Dumping structure for table mifostenant-reference.m_cashier_transactions DROP TABLE IF EXISTS `m_cashier_transactions`; -CREATE TABLE IF NOT EXISTS `m_cashier_transactions` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `cashier_id` BIGINT NOT NULL, - `txn_type` SMALLINT NOT NULL, - `txn_amount` decimal(19,6) NOT NULL, - `txn_date` date NOT NULL, - `created_date` datetime NOT NULL, - `entity_type` varchar(50) DEFAULT NULL, - `entity_id` BIGINT DEFAULT NULL, - `txn_note` varchar(200) DEFAULT NULL, - `currency_code` varchar(3) DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `IK_m_teller_transactions_m_cashier` (`cashier_id`), - CONSTRAINT `FK_m_teller_transactions_m_cashiers` FOREIGN KEY (`cashier_id`) REFERENCES `m_cashiers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_cashier_transactions` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `cashier_id` + BIGINT + NOT + NULL, + `txn_type` + SMALLINT + NOT + NULL, + `txn_amount` + decimal +( + 19, + 6 +) NOT NULL, + `txn_date` date NOT NULL, + `created_date` datetime NOT NULL, + `entity_type` varchar +( + 50 +) DEFAULT NULL, + `entity_id` BIGINT DEFAULT NULL, + `txn_note` varchar +( + 200 +) DEFAULT NULL, + `currency_code` varchar +( + 3 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +), + KEY `IK_m_teller_transactions_m_cashier` +( + `cashier_id` +), + CONSTRAINT `FK_m_teller_transactions_m_cashiers` FOREIGN KEY +( + `cashier_id` +) REFERENCES `m_cashiers` +( + `id` +) ON DELETE CASCADE + ON UPDATE CASCADE + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_cashier_transactions: ~0 rows (approximately) /*!40000 ALTER TABLE `m_cashier_transactions` DISABLE KEYS */; @@ -982,146 +2298,428 @@ CREATE TABLE IF NOT EXISTS `m_cashier_transactions` ( -- Dumping structure for table mifostenant-reference.m_charge DROP TABLE IF EXISTS `m_charge`; -CREATE TABLE IF NOT EXISTS `m_charge` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `name` varchar(100) DEFAULT NULL, - `currency_code` varchar(3) NOT NULL, - `charge_applies_to_enum` SMALLINT NOT NULL, - `charge_time_enum` SMALLINT NOT NULL, - `charge_calculation_enum` SMALLINT NOT NULL, - `charge_payment_mode_enum` SMALLINT DEFAULT NULL, - `amount` decimal(19,6) NOT NULL, - `fee_on_day` SMALLINT DEFAULT NULL, - `fee_interval` SMALLINT DEFAULT NULL, - `fee_on_month` SMALLINT DEFAULT NULL, - `is_penalty` tinyint NOT NULL DEFAULT '0', - `is_active` tinyint NOT NULL, - `is_deleted` tinyint NOT NULL DEFAULT '0', - `min_cap` decimal(19,6) DEFAULT NULL, - `max_cap` decimal(19,6) DEFAULT NULL, - `fee_frequency` SMALLINT DEFAULT NULL, - `income_or_liability_account_id` BIGINT DEFAULT NULL, - `tax_group_id` BIGINT DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `name` (`name`), - KEY `FK_m_charge_acc_gl_account` (`income_or_liability_account_id`), - KEY `FK_m_charge_m_tax_group` (`tax_group_id`), - CONSTRAINT `FK_m_charge_acc_gl_account` FOREIGN KEY (`income_or_liability_account_id`) REFERENCES `acc_gl_account` (`id`), - CONSTRAINT `FK_m_charge_m_tax_group` FOREIGN KEY (`tax_group_id`) REFERENCES `m_tax_group` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_charge` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `name` + varchar +( + 100 +) DEFAULT NULL, + `currency_code` varchar +( + 3 +) NOT NULL, + `charge_applies_to_enum` SMALLINT NOT NULL, + `charge_time_enum` SMALLINT NOT NULL, + `charge_calculation_enum` SMALLINT NOT NULL, + `charge_payment_mode_enum` SMALLINT DEFAULT NULL, + `amount` decimal +( + 19, + 6 +) NOT NULL, + `fee_on_day` SMALLINT DEFAULT NULL, + `fee_interval` SMALLINT DEFAULT NULL, + `fee_on_month` SMALLINT DEFAULT NULL, + `is_penalty` tinyint NOT NULL DEFAULT '0', + `is_active` tinyint NOT NULL, + `is_deleted` tinyint NOT NULL DEFAULT '0', + `min_cap` decimal +( + 19, + 6 +) DEFAULT NULL, + `max_cap` decimal +( + 19, + 6 +) DEFAULT NULL, + `fee_frequency` SMALLINT DEFAULT NULL, + `income_or_liability_account_id` BIGINT DEFAULT NULL, + `tax_group_id` BIGINT DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `name` +( + `name` +), + KEY `FK_m_charge_acc_gl_account` +( + `income_or_liability_account_id` +), + KEY `FK_m_charge_m_tax_group` +( + `tax_group_id` +), + CONSTRAINT `FK_m_charge_acc_gl_account` FOREIGN KEY +( + `income_or_liability_account_id` +) REFERENCES `acc_gl_account` +( + `id` +), + CONSTRAINT `FK_m_charge_m_tax_group` FOREIGN KEY +( + `tax_group_id` +) REFERENCES `m_tax_group` +( + `id` +) + ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_charge: ~0 rows (approximately) /*!40000 ALTER TABLE `m_charge` DISABLE KEYS */; -INSERT INTO `m_charge` (`id`, `name`, `currency_code`, `charge_applies_to_enum`, `charge_time_enum`, `charge_calculation_enum`, `charge_payment_mode_enum`, `amount`, `fee_on_day`, `fee_interval`, `fee_on_month`, `is_penalty`, `is_active`, `is_deleted`, `min_cap`, `max_cap`, `fee_frequency`, `income_or_liability_account_id`, `tax_group_id`) VALUES - (1, 'Processing Fee', 'USD', 1, 1, 1, 0, 500.000000, NULL, NULL, NULL, 0, 1, 0, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `m_charge` (`id`, `name`, `currency_code`, `charge_applies_to_enum`, `charge_time_enum`, + `charge_calculation_enum`, `charge_payment_mode_enum`, `amount`, `fee_on_day`, `fee_interval`, + `fee_on_month`, `is_penalty`, `is_active`, `is_deleted`, `min_cap`, `max_cap`, `fee_frequency`, + `income_or_liability_account_id`, `tax_group_id`) +VALUES (1, 'Processing Fee', 'USD', 1, 1, 1, 0, 500.000000, NULL, NULL, NULL, 0, 1, 0, NULL, NULL, NULL, NULL, NULL); /*!40000 ALTER TABLE `m_charge` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.m_client DROP TABLE IF EXISTS `m_client`; -CREATE TABLE IF NOT EXISTS `m_client` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `account_no` varchar(20) NOT NULL, - `external_id` varchar(100) DEFAULT NULL, - `status_enum` INT NOT NULL DEFAULT '300', - `sub_status` INT DEFAULT NULL, - `activation_date` date DEFAULT NULL, - `office_joining_date` date DEFAULT NULL, - `office_id` BIGINT NOT NULL, - `transfer_to_office_id` BIGINT DEFAULT NULL, - `staff_id` BIGINT DEFAULT NULL, - `firstname` varchar(50) DEFAULT NULL, - `middlename` varchar(50) DEFAULT NULL, - `lastname` varchar(50) DEFAULT NULL, - `fullname` varchar(100) DEFAULT NULL, - `display_name` varchar(100) NOT NULL, - `mobile_no` varchar(50) DEFAULT NULL, - `gender_cv_id` INT DEFAULT NULL, - `date_of_birth` date DEFAULT NULL, - `image_id` BIGINT DEFAULT NULL, - `closure_reason_cv_id` INT DEFAULT NULL, - `closedon_date` date DEFAULT NULL, - `updated_by` BIGINT DEFAULT NULL, - `updated_on` date DEFAULT NULL, - `submittedon_date` date DEFAULT NULL, - `submittedon_userid` BIGINT DEFAULT NULL, - `activatedon_userid` BIGINT DEFAULT NULL, - `closedon_userid` BIGINT DEFAULT NULL, - `default_savings_product` BIGINT DEFAULT NULL, - `default_savings_account` BIGINT DEFAULT NULL, - `client_type_cv_id` INT DEFAULT NULL, - `client_classification_cv_id` INT DEFAULT NULL, - `reject_reason_cv_id` INT DEFAULT NULL, - `rejectedon_date` date DEFAULT NULL, - `rejectedon_userid` BIGINT DEFAULT NULL, - `withdraw_reason_cv_id` INT DEFAULT NULL, - `withdrawn_on_date` date DEFAULT NULL, - `withdraw_on_userid` BIGINT DEFAULT NULL, - `reactivated_on_date` date DEFAULT NULL, - `reactivated_on_userid` BIGINT DEFAULT NULL, - `legal_form_enum` INT DEFAULT NULL, - `reopened_on_date` date DEFAULT NULL, - `reopened_by_userid` BIGINT DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `account_no_UNIQUE` (`account_no`), - UNIQUE KEY `external_id` (`external_id`), - UNIQUE KEY `mobile_no_UNIQUE` (`mobile_no`), - KEY `FKCE00CAB3E0DD567A` (`office_id`), - KEY `FK_m_client_m_image` (`image_id`), - KEY `client_staff_id` (`staff_id`), - KEY `FK_m_client_m_code` (`closure_reason_cv_id`), - KEY `FK_m_client_m_office` (`transfer_to_office_id`), - KEY `FK_m_client_m_savings_product` (`default_savings_product`), - KEY `FK_m_client_m_savings_account` (`default_savings_account`), - KEY `FK_m_client_type_m_code_value` (`client_type_cv_id`), - KEY `FK_m_client_classification_m_code_value` (`client_classification_cv_id`), - KEY `FK1_m_client_gender_m_code_value` (`gender_cv_id`), - KEY `FK_m_client_substatus_m_code_value` (`sub_status`), - KEY `FK_m_client_type_mcode_value_reject` (`reject_reason_cv_id`), - KEY `FK_m_client_type_m_code_value_withdraw` (`withdraw_reason_cv_id`), - CONSTRAINT `FK1_m_client_gender_m_code_value` FOREIGN KEY (`gender_cv_id`) REFERENCES `m_code_value` (`id`), - CONSTRAINT `FKCE00CAB3E0DD567A` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`), - CONSTRAINT `FK_m_client_classification_m_code_value` FOREIGN KEY (`client_classification_cv_id`) REFERENCES `m_code_value` (`id`), - CONSTRAINT `FK_m_client_m_code` FOREIGN KEY (`closure_reason_cv_id`) REFERENCES `m_code_value` (`id`), - CONSTRAINT `FK_m_client_m_image` FOREIGN KEY (`image_id`) REFERENCES `m_image` (`id`), - CONSTRAINT `FK_m_client_m_office` FOREIGN KEY (`transfer_to_office_id`) REFERENCES `m_office` (`id`), - CONSTRAINT `FK_m_client_m_savings_account` FOREIGN KEY (`default_savings_account`) REFERENCES `m_savings_account` (`id`), - CONSTRAINT `FK_m_client_m_savings_product` FOREIGN KEY (`default_savings_product`) REFERENCES `m_savings_product` (`id`), - CONSTRAINT `FK_m_client_m_staff` FOREIGN KEY (`staff_id`) REFERENCES `m_staff` (`id`), - CONSTRAINT `FK_m_client_substatus_m_code_value` FOREIGN KEY (`sub_status`) REFERENCES `m_code_value` (`id`), - CONSTRAINT `FK_m_client_type_m_code_value` FOREIGN KEY (`client_type_cv_id`) REFERENCES `m_code_value` (`id`), - CONSTRAINT `FK_m_client_type_m_code_value_withdraw` FOREIGN KEY (`withdraw_reason_cv_id`) REFERENCES `m_code_value` (`id`), - CONSTRAINT `FK_m_client_type_mcode_value_reject` FOREIGN KEY (`reject_reason_cv_id`) REFERENCES `m_code_value` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_client` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `account_no` + varchar +( + 20 +) NOT NULL, + `external_id` varchar +( + 100 +) DEFAULT NULL, + `status_enum` INT NOT NULL DEFAULT '300', + `sub_status` INT DEFAULT NULL, + `activation_date` date DEFAULT NULL, + `office_joining_date` date DEFAULT NULL, + `office_id` BIGINT NOT NULL, + `transfer_to_office_id` BIGINT DEFAULT NULL, + `staff_id` BIGINT DEFAULT NULL, + `firstname` varchar +( + 50 +) DEFAULT NULL, + `middlename` varchar +( + 50 +) DEFAULT NULL, + `lastname` varchar +( + 50 +) DEFAULT NULL, + `fullname` varchar +( + 100 +) DEFAULT NULL, + `display_name` varchar +( + 100 +) NOT NULL, + `mobile_no` varchar +( + 50 +) DEFAULT NULL, + `gender_cv_id` INT DEFAULT NULL, + `date_of_birth` date DEFAULT NULL, + `image_id` BIGINT DEFAULT NULL, + `closure_reason_cv_id` INT DEFAULT NULL, + `closedon_date` date DEFAULT NULL, + `updated_by` BIGINT DEFAULT NULL, + `updated_on` date DEFAULT NULL, + `submittedon_date` date DEFAULT NULL, + `submittedon_userid` BIGINT DEFAULT NULL, + `activatedon_userid` BIGINT DEFAULT NULL, + `closedon_userid` BIGINT DEFAULT NULL, + `default_savings_product` BIGINT DEFAULT NULL, + `default_savings_account` BIGINT DEFAULT NULL, + `client_type_cv_id` INT DEFAULT NULL, + `client_classification_cv_id` INT DEFAULT NULL, + `reject_reason_cv_id` INT DEFAULT NULL, + `rejectedon_date` date DEFAULT NULL, + `rejectedon_userid` BIGINT DEFAULT NULL, + `withdraw_reason_cv_id` INT DEFAULT NULL, + `withdrawn_on_date` date DEFAULT NULL, + `withdraw_on_userid` BIGINT DEFAULT NULL, + `reactivated_on_date` date DEFAULT NULL, + `reactivated_on_userid` BIGINT DEFAULT NULL, + `legal_form_enum` INT DEFAULT NULL, + `reopened_on_date` date DEFAULT NULL, + `reopened_by_userid` BIGINT DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `account_no_UNIQUE` +( + `account_no` +), + UNIQUE KEY `external_id` +( + `external_id` +), + UNIQUE KEY `mobile_no_UNIQUE` +( + `mobile_no` +), + KEY `FKCE00CAB3E0DD567A` +( + `office_id` +), + KEY `FK_m_client_m_image` +( + `image_id` +), + KEY `client_staff_id` +( + `staff_id` +), + KEY `FK_m_client_m_code` +( + `closure_reason_cv_id` +), + KEY `FK_m_client_m_office` +( + `transfer_to_office_id` +), + KEY `FK_m_client_m_savings_product` +( + `default_savings_product` +), + KEY `FK_m_client_m_savings_account` +( + `default_savings_account` +), + KEY `FK_m_client_type_m_code_value` +( + `client_type_cv_id` +), + KEY `FK_m_client_classification_m_code_value` +( + `client_classification_cv_id` +), + KEY `FK1_m_client_gender_m_code_value` +( + `gender_cv_id` +), + KEY `FK_m_client_substatus_m_code_value` +( + `sub_status` +), + KEY `FK_m_client_type_mcode_value_reject` +( + `reject_reason_cv_id` +), + KEY `FK_m_client_type_m_code_value_withdraw` +( + `withdraw_reason_cv_id` +), + CONSTRAINT `FK1_m_client_gender_m_code_value` FOREIGN KEY +( + `gender_cv_id` +) REFERENCES `m_code_value` +( + `id` +), + CONSTRAINT `FKCE00CAB3E0DD567A` FOREIGN KEY +( + `office_id` +) REFERENCES `m_office` +( + `id` +), + CONSTRAINT `FK_m_client_classification_m_code_value` FOREIGN KEY +( + `client_classification_cv_id` +) REFERENCES `m_code_value` +( + `id` +), + CONSTRAINT `FK_m_client_m_code` FOREIGN KEY +( + `closure_reason_cv_id` +) REFERENCES `m_code_value` +( + `id` +), + CONSTRAINT `FK_m_client_m_image` FOREIGN KEY +( + `image_id` +) REFERENCES `m_image` +( + `id` +), + CONSTRAINT `FK_m_client_m_office` FOREIGN KEY +( + `transfer_to_office_id` +) REFERENCES `m_office` +( + `id` +), + CONSTRAINT `FK_m_client_m_savings_account` FOREIGN KEY +( + `default_savings_account` +) REFERENCES `m_savings_account` +( + `id` +), + CONSTRAINT `FK_m_client_m_savings_product` FOREIGN KEY +( + `default_savings_product` +) REFERENCES `m_savings_product` +( + `id` +), + CONSTRAINT `FK_m_client_m_staff` FOREIGN KEY +( + `staff_id` +) REFERENCES `m_staff` +( + `id` +), + CONSTRAINT `FK_m_client_substatus_m_code_value` FOREIGN KEY +( + `sub_status` +) REFERENCES `m_code_value` +( + `id` +), + CONSTRAINT `FK_m_client_type_m_code_value` FOREIGN KEY +( + `client_type_cv_id` +) REFERENCES `m_code_value` +( + `id` +), + CONSTRAINT `FK_m_client_type_m_code_value_withdraw` FOREIGN KEY +( + `withdraw_reason_cv_id` +) REFERENCES `m_code_value` +( + `id` +), + CONSTRAINT `FK_m_client_type_mcode_value_reject` FOREIGN KEY +( + `reject_reason_cv_id` +) REFERENCES `m_code_value` +( + `id` +) + ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_client: ~7 rows (approximately) /*!40000 ALTER TABLE `m_client` DISABLE KEYS */; -INSERT INTO `m_client` (`id`, `account_no`, `external_id`, `status_enum`, `sub_status`, `activation_date`, `office_joining_date`, `office_id`, `transfer_to_office_id`, `staff_id`, `firstname`, `middlename`, `lastname`, `fullname`, `display_name`, `mobile_no`, `gender_cv_id`, `date_of_birth`, `image_id`, `closure_reason_cv_id`, `closedon_date`, `updated_by`, `updated_on`, `submittedon_date`, `submittedon_userid`, `activatedon_userid`, `closedon_userid`, `default_savings_product`, `default_savings_account`, `client_type_cv_id`, `client_classification_cv_id`, `reject_reason_cv_id`, `rejectedon_date`, `rejectedon_userid`, `withdraw_reason_cv_id`, `withdrawn_on_date`, `withdraw_on_userid`, `reactivated_on_date`, `reactivated_on_userid`, `legal_form_enum`, `reopened_on_date`, `reopened_by_userid`) VALUES - (1, '000000001', NULL, 300, NULL, '2014-03-07', '2014-03-07', 1, NULL, 1, 'Smith', NULL, 'R', NULL, 'Smith R', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2010-01-01', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - (2, '000000002', NULL, 300, NULL, '2010-01-04', '2010-01-04', 2, NULL, 2, 'Johnson', NULL, 'D', NULL, 'Johnson D', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2010-01-04', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - (4, '000000004', NULL, 300, NULL, '2010-01-04', '2010-01-04', 2, NULL, 2, 'Williams', NULL, 'G', NULL, 'Williams G', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2010-01-04', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - (5, '000000005', NULL, 300, NULL, '2010-01-04', '2010-01-04', 2, NULL, 2, 'Harris', NULL, 'P', NULL, 'Harris P', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2010-01-04', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - (6, '000000006', NULL, 300, NULL, '2010-01-04', '2010-01-04', 2, NULL, 2, 'Allen', NULL, 'E', NULL, 'Allen E', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2010-01-04', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - (7, '000000007', NULL, 300, NULL, '2010-01-04', '2010-01-04', 2, NULL, 2, 'Scott', NULL, 'C', NULL, 'Scott C', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2010-01-04', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), - (8, '000000008', NULL, 300, NULL, '2010-01-04', '2010-01-04', 2, NULL, 2, 'Robinson', NULL, 'R', NULL, 'Robinson R', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2010-01-04', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `m_client` (`id`, `account_no`, `external_id`, `status_enum`, `sub_status`, `activation_date`, + `office_joining_date`, `office_id`, `transfer_to_office_id`, `staff_id`, `firstname`, + `middlename`, `lastname`, `fullname`, `display_name`, `mobile_no`, `gender_cv_id`, + `date_of_birth`, `image_id`, `closure_reason_cv_id`, `closedon_date`, `updated_by`, + `updated_on`, `submittedon_date`, `submittedon_userid`, `activatedon_userid`, `closedon_userid`, + `default_savings_product`, `default_savings_account`, `client_type_cv_id`, + `client_classification_cv_id`, `reject_reason_cv_id`, `rejectedon_date`, `rejectedon_userid`, + `withdraw_reason_cv_id`, `withdrawn_on_date`, `withdraw_on_userid`, `reactivated_on_date`, + `reactivated_on_userid`, `legal_form_enum`, `reopened_on_date`, `reopened_by_userid`) +VALUES (1, '000000001', NULL, 300, NULL, '2014-03-07', '2014-03-07', 1, NULL, 1, 'Smith', NULL, 'R', NULL, 'Smith R', + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2010-01-01', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (2, '000000002', NULL, 300, NULL, '2010-01-04', '2010-01-04', 2, NULL, 2, 'Johnson', NULL, 'D', NULL, + 'Johnson D', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2010-01-04', 1, 1, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (4, '000000004', NULL, 300, NULL, '2010-01-04', '2010-01-04', 2, NULL, 2, 'Williams', NULL, 'G', NULL, + 'Williams G', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2010-01-04', 1, 1, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (5, '000000005', NULL, 300, NULL, '2010-01-04', '2010-01-04', 2, NULL, 2, 'Harris', NULL, 'P', NULL, 'Harris P', + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2010-01-04', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (6, '000000006', NULL, 300, NULL, '2010-01-04', '2010-01-04', 2, NULL, 2, 'Allen', NULL, 'E', NULL, 'Allen E', + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2010-01-04', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (7, '000000007', NULL, 300, NULL, '2010-01-04', '2010-01-04', 2, NULL, 2, 'Scott', NULL, 'C', NULL, 'Scott C', + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2010-01-04', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), + (8, '000000008', NULL, 300, NULL, '2010-01-04', '2010-01-04', 2, NULL, 2, 'Robinson', NULL, 'R', NULL, + 'Robinson R', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2010-01-04', 1, 1, NULL, NULL, NULL, NULL, NULL, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); /*!40000 ALTER TABLE `m_client` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.m_client_address DROP TABLE IF EXISTS `m_client_address`; -CREATE TABLE IF NOT EXISTS `m_client_address` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL DEFAULT '0', - `address_id` BIGINT NOT NULL DEFAULT '0', - `address_type_id` INT NOT NULL DEFAULT '0', - `is_active` TINYINT NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `addressIdFk` (`address_id`), - KEY `address_codefk` (`address_type_id`), - KEY `clientaddressfk` (`client_id`), - CONSTRAINT `address_codefk` FOREIGN KEY (`address_type_id`) REFERENCES `m_code_value` (`id`), - CONSTRAINT `clientaddressfk` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_client_address` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `client_id` + BIGINT + NOT + NULL + DEFAULT + '0', + `address_id` + BIGINT + NOT + NULL + DEFAULT + '0', + `address_type_id` + INT + NOT + NULL + DEFAULT + '0', + `is_active` + TINYINT + NOT + NULL + DEFAULT + '0', + PRIMARY + KEY +( + `id` +), + KEY `addressIdFk` +( + `address_id` +), + KEY `address_codefk` +( + `address_type_id` +), + KEY `clientaddressfk` +( + `client_id` +), + CONSTRAINT `address_codefk` FOREIGN KEY +( + `address_type_id` +) REFERENCES `m_code_value` +( + `id` +), + CONSTRAINT `clientaddressfk` FOREIGN KEY +( + `client_id` +) REFERENCES `m_client` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_client_address: ~0 rows (approximately) /*!40000 ALTER TABLE `m_client_address` DISABLE KEYS */; @@ -1130,17 +2728,56 @@ CREATE TABLE IF NOT EXISTS `m_client_address` ( -- Dumping structure for table mifostenant-reference.m_client_attendance DROP TABLE IF EXISTS `m_client_attendance`; -CREATE TABLE IF NOT EXISTS `m_client_attendance` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL DEFAULT '0', - `meeting_id` BIGINT NOT NULL, - `attendance_type_enum` SMALLINT NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `unique_client_meeting_attendance` (`client_id`,`meeting_id`), - KEY `FK_m_meeting_m_client_attendance` (`meeting_id`), - CONSTRAINT `FK_m_client_m_client_attendance` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FK_m_meeting_m_client_attendance` FOREIGN KEY (`meeting_id`) REFERENCES `m_meeting` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_client_attendance` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `client_id` + BIGINT + NOT + NULL + DEFAULT + '0', + `meeting_id` + BIGINT + NOT + NULL, + `attendance_type_enum` + SMALLINT + NOT + NULL, + PRIMARY + KEY +( + `id` +), + UNIQUE KEY `unique_client_meeting_attendance` +( + `client_id`, + `meeting_id` +), + KEY `FK_m_meeting_m_client_attendance` +( + `meeting_id` +), + CONSTRAINT `FK_m_client_m_client_attendance` FOREIGN KEY +( + `client_id` +) REFERENCES `m_client` +( + `id` +), + CONSTRAINT `FK_m_meeting_m_client_attendance` FOREIGN KEY +( + `meeting_id` +) REFERENCES `m_meeting` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_client_attendance: ~0 rows (approximately) /*!40000 ALTER TABLE `m_client_attendance` DISABLE KEYS */; @@ -1149,29 +2786,94 @@ CREATE TABLE IF NOT EXISTS `m_client_attendance` ( -- Dumping structure for table mifostenant-reference.m_client_charge DROP TABLE IF EXISTS `m_client_charge`; -CREATE TABLE IF NOT EXISTS `m_client_charge` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `charge_id` BIGINT NOT NULL, - `is_penalty` tinyint NOT NULL, - `charge_time_enum` SMALLINT NOT NULL, - `charge_due_date` date DEFAULT NULL, - `charge_calculation_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `amount_paid_derived` decimal(19,6) DEFAULT NULL, - `amount_waived_derived` decimal(19,6) DEFAULT NULL, - `amount_writtenoff_derived` decimal(19,6) DEFAULT NULL, - `amount_outstanding_derived` decimal(19,6) NOT NULL, - `is_paid_derived` tinyint DEFAULT NULL, - `waived` tinyint DEFAULT NULL, - `is_active` tinyint DEFAULT NULL, - `inactivated_on_date` date DEFAULT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_client_charge_m_client` (`client_id`), - KEY `FK_m_client_charge_m_charge` (`charge_id`), - CONSTRAINT `FK_m_client_charge_m_charge` FOREIGN KEY (`charge_id`) REFERENCES `m_charge` (`id`), - CONSTRAINT `FK_m_client_charge_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_client_charge` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `client_id` + BIGINT + NOT + NULL, + `charge_id` + BIGINT + NOT + NULL, + `is_penalty` + tinyint + NOT + NULL, + `charge_time_enum` + SMALLINT + NOT + NULL, + `charge_due_date` + date + DEFAULT + NULL, + `charge_calculation_enum` + SMALLINT + NOT + NULL, + `amount` + decimal +( + 19, + 6 +) NOT NULL, + `amount_paid_derived` decimal +( + 19, + 6 +) DEFAULT NULL, + `amount_waived_derived` decimal +( + 19, + 6 +) DEFAULT NULL, + `amount_writtenoff_derived` decimal +( + 19, + 6 +) DEFAULT NULL, + `amount_outstanding_derived` decimal +( + 19, + 6 +) NOT NULL, + `is_paid_derived` tinyint DEFAULT NULL, + `waived` tinyint DEFAULT NULL, + `is_active` tinyint DEFAULT NULL, + `inactivated_on_date` date DEFAULT NULL, + PRIMARY KEY +( + `id` +), + KEY `FK_m_client_charge_m_client` +( + `client_id` +), + KEY `FK_m_client_charge_m_charge` +( + `charge_id` +), + CONSTRAINT `FK_m_client_charge_m_charge` FOREIGN KEY +( + `charge_id` +) REFERENCES `m_charge` +( + `id` +), + CONSTRAINT `FK_m_client_charge_m_client` FOREIGN KEY +( + `client_id` +) REFERENCES `m_client` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_client_charge: ~0 rows (approximately) /*!40000 ALTER TABLE `m_client_charge` DISABLE KEYS */; @@ -1180,17 +2882,54 @@ CREATE TABLE IF NOT EXISTS `m_client_charge` ( -- Dumping structure for table mifostenant-reference.m_client_charge_paid_by DROP TABLE IF EXISTS `m_client_charge_paid_by`; -CREATE TABLE IF NOT EXISTS `m_client_charge_paid_by` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_transaction_id` BIGINT NOT NULL, - `client_charge_id` BIGINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - PRIMARY KEY (`id`), - KEY `FK_m_client_charge_paid_by_m_client_transaction` (`client_transaction_id`), - KEY `FK_m_client_charge_paid_by_m_client_charge` (`client_charge_id`), - CONSTRAINT `FK_m_client_charge_paid_by_m_client_charge` FOREIGN KEY (`client_charge_id`) REFERENCES `m_client_charge` (`id`), - CONSTRAINT `FK_m_client_charge_paid_by_m_client_transaction` FOREIGN KEY (`client_transaction_id`) REFERENCES `m_client_transaction` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_client_charge_paid_by` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `client_transaction_id` + BIGINT + NOT + NULL, + `client_charge_id` + BIGINT + NOT + NULL, + `amount` + decimal +( + 19, + 6 +) NOT NULL, + PRIMARY KEY +( + `id` +), + KEY `FK_m_client_charge_paid_by_m_client_transaction` +( + `client_transaction_id` +), + KEY `FK_m_client_charge_paid_by_m_client_charge` +( + `client_charge_id` +), + CONSTRAINT `FK_m_client_charge_paid_by_m_client_charge` FOREIGN KEY +( + `client_charge_id` +) REFERENCES `m_client_charge` +( + `id` +), + CONSTRAINT `FK_m_client_charge_paid_by_m_client_transaction` FOREIGN KEY +( + `client_transaction_id` +) REFERENCES `m_client_transaction` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_client_charge_paid_by: ~0 rows (approximately) /*!40000 ALTER TABLE `m_client_charge_paid_by` DISABLE KEYS */; @@ -1199,26 +2938,74 @@ CREATE TABLE IF NOT EXISTS `m_client_charge_paid_by` ( -- Dumping structure for table mifostenant-reference.m_client_identifier DROP TABLE IF EXISTS `m_client_identifier`; -CREATE TABLE IF NOT EXISTS `m_client_identifier` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `document_type_id` INT NOT NULL, - `document_key` varchar(50) NOT NULL, - `status` INT NOT NULL DEFAULT '300', - `active` INT DEFAULT NULL, - `description` varchar(500) DEFAULT NULL, - `createdby_id` BIGINT DEFAULT NULL, - `lastmodifiedby_id` BIGINT DEFAULT NULL, - `created_date` datetime DEFAULT NULL, - `lastmodified_date` datetime DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `unique_identifier_key` (`document_type_id`,`document_key`), - UNIQUE KEY `unique_active_client_identifier` (`client_id`,`document_type_id`,`active`), - KEY `FK_m_client_document_m_client` (`client_id`), - KEY `FK_m_client_document_m_code_value` (`document_type_id`), - CONSTRAINT `FK_m_client_document_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`), - CONSTRAINT `FK_m_client_document_m_code_value` FOREIGN KEY (`document_type_id`) REFERENCES `m_code_value` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_client_identifier` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `client_id` + BIGINT + NOT + NULL, + `document_type_id` + INT + NOT + NULL, + `document_key` + varchar +( + 50 +) NOT NULL, + `status` INT NOT NULL DEFAULT '300', + `active` INT DEFAULT NULL, + `description` varchar +( + 500 +) DEFAULT NULL, + `createdby_id` BIGINT DEFAULT NULL, + `lastmodifiedby_id` BIGINT DEFAULT NULL, + `created_date` datetime DEFAULT NULL, + `lastmodified_date` datetime DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `unique_identifier_key` +( + `document_type_id`, + `document_key` +), + UNIQUE KEY `unique_active_client_identifier` +( + `client_id`, + `document_type_id`, + `active` +), + KEY `FK_m_client_document_m_client` +( + `client_id` +), + KEY `FK_m_client_document_m_code_value` +( + `document_type_id` +), + CONSTRAINT `FK_m_client_document_m_client` FOREIGN KEY +( + `client_id` +) REFERENCES `m_client` +( + `id` +), + CONSTRAINT `FK_m_client_document_m_code_value` FOREIGN KEY +( + `document_type_id` +) REFERENCES `m_code_value` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_client_identifier: ~0 rows (approximately) /*!40000 ALTER TABLE `m_client_identifier` DISABLE KEYS */; @@ -1227,19 +3014,52 @@ CREATE TABLE IF NOT EXISTS `m_client_identifier` ( -- Dumping structure for table mifostenant-reference.m_client_non_person DROP TABLE IF EXISTS `m_client_non_person`; -CREATE TABLE IF NOT EXISTS `m_client_non_person` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `constitution_cv_id` INT NOT NULL, - `incorp_no` varchar(50) DEFAULT NULL, - `incorp_validity_till` datetime DEFAULT NULL, - `main_business_line_cv_id` INT DEFAULT NULL, - `remarks` varchar(150) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `client_id` (`client_id`), - KEY `FK_client_id` (`client_id`), - CONSTRAINT `FK_client_id` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_client_non_person` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `client_id` + BIGINT + NOT + NULL, + `constitution_cv_id` + INT + NOT + NULL, + `incorp_no` + varchar +( + 50 +) DEFAULT NULL, + `incorp_validity_till` datetime DEFAULT NULL, + `main_business_line_cv_id` INT DEFAULT NULL, + `remarks` varchar +( + 150 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `client_id` +( + `client_id` +), + KEY `FK_client_id` +( + `client_id` +), + CONSTRAINT `FK_client_id` FOREIGN KEY +( + `client_id` +) REFERENCES `m_client` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_client_non_person: ~0 rows (approximately) /*!40000 ALTER TABLE `m_client_non_person` DISABLE KEYS */; @@ -1248,26 +3068,72 @@ CREATE TABLE IF NOT EXISTS `m_client_non_person` ( -- Dumping structure for table mifostenant-reference.m_client_transaction DROP TABLE IF EXISTS `m_client_transaction`; -CREATE TABLE IF NOT EXISTS `m_client_transaction` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `client_id` BIGINT NOT NULL, - `office_id` BIGINT NOT NULL, - `currency_code` varchar(3) NOT NULL, - `payment_detail_id` BIGINT DEFAULT NULL, - `is_reversed` tinyint NOT NULL, - `external_id` varchar(50) DEFAULT NULL, - `transaction_date` date NOT NULL, - `transaction_type_enum` SMALLINT NOT NULL, - `amount` decimal(19,6) NOT NULL, - `created_date` datetime NOT NULL, - `appuser_id` BIGINT NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `external_id` (`external_id`), - KEY `FK_m_client_transaction_m_client` (`client_id`), - KEY `FK_m_client_transaction_m_appuser` (`appuser_id`), - CONSTRAINT `FK_m_client_transaction_m_appuser` FOREIGN KEY (`appuser_id`) REFERENCES `m_appuser` (`id`), - CONSTRAINT `FK_m_client_transaction_m_client` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_client_transaction` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `client_id` + BIGINT + NOT + NULL, + `office_id` + BIGINT + NOT + NULL, + `currency_code` + varchar +( + 3 +) NOT NULL, + `payment_detail_id` BIGINT DEFAULT NULL, + `is_reversed` tinyint NOT NULL, + `external_id` varchar +( + 50 +) DEFAULT NULL, + `transaction_date` date NOT NULL, + `transaction_type_enum` SMALLINT NOT NULL, + `amount` decimal +( + 19, + 6 +) NOT NULL, + `created_date` datetime NOT NULL, + `appuser_id` BIGINT NOT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `external_id` +( + `external_id` +), + KEY `FK_m_client_transaction_m_client` +( + `client_id` +), + KEY `FK_m_client_transaction_m_appuser` +( + `appuser_id` +), + CONSTRAINT `FK_m_client_transaction_m_appuser` FOREIGN KEY +( + `appuser_id` +) REFERENCES `m_appuser` +( + `id` +), + CONSTRAINT `FK_m_client_transaction_m_client` FOREIGN KEY +( + `client_id` +) REFERENCES `m_client` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_client_transaction: ~0 rows (approximately) /*!40000 ALTER TABLE `m_client_transaction` DISABLE KEYS */; @@ -1276,256 +3142,328 @@ CREATE TABLE IF NOT EXISTS `m_client_transaction` ( -- Dumping structure for table mifostenant-reference.m_code DROP TABLE IF EXISTS `m_code`; -CREATE TABLE IF NOT EXISTS `m_code` ( - `id` INT NOT NULL AUTO_INCREMENT, - `code_name` varchar(100) DEFAULT NULL, - `is_system_defined` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `code_name` (`code_name`) -) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_code` +( + `id` + INT + NOT + NULL + AUTO_INCREMENT, + `code_name` + varchar +( + 100 +) DEFAULT NULL, + `is_system_defined` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY +( + `id` +), + UNIQUE KEY `code_name` +( + `code_name` +) + ) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_code: ~28 rows (approximately) /*!40000 ALTER TABLE `m_code` DISABLE KEYS */; -INSERT INTO `m_code` (`id`, `code_name`, `is_system_defined`) VALUES - (1, 'Customer Identifier', 1), - (2, 'LoanCollateral', 1), - (3, 'LoanPurpose', 1), - (4, 'Gender', 1), - (5, 'YesNo', 1), - (6, 'GuarantorRelationship', 1), - (7, 'AssetAccountTags', 1), - (8, 'LiabilityAccountTags', 1), - (9, 'EquityAccountTags', 1), - (10, 'IncomeAccountTags', 1), - (11, 'ExpenseAccountTags', 1), - (13, 'GROUPROLE', 1), - (14, 'ClientClosureReason', 1), - (15, 'GroupClosureReason', 1), - (16, 'ClientType', 1), - (17, 'ClientClassification', 1), - (18, 'ClientSubStatus', 1), - (19, 'ClientRejectReason', 1), - (20, 'ClientWithdrawReason', 1), - (21, 'Entity to Entity Access Types', 1), - (22, 'CenterClosureReason', 1), - (23, 'LoanRescheduleReason', 1), - (24, 'Constitution', 1), - (25, 'Main Business Line', 1), - (26, 'WriteOffReasons', 1), - (27, 'STATE', 1), - (28, 'COUNTRY', 1), - (29, 'ADDRESS_TYPE', 1); +INSERT INTO `m_code` (`id`, `code_name`, `is_system_defined`) +VALUES (1, 'Customer Identifier', 1), + (2, 'LoanCollateral', 1), + (3, 'LoanPurpose', 1), + (4, 'Gender', 1), + (5, 'YesNo', 1), + (6, 'GuarantorRelationship', 1), + (7, 'AssetAccountTags', 1), + (8, 'LiabilityAccountTags', 1), + (9, 'EquityAccountTags', 1), + (10, 'IncomeAccountTags', 1), + (11, 'ExpenseAccountTags', 1), + (13, 'GROUPROLE', 1), + (14, 'ClientClosureReason', 1), + (15, 'GroupClosureReason', 1), + (16, 'ClientType', 1), + (17, 'ClientClassification', 1), + (18, 'ClientSubStatus', 1), + (19, 'ClientRejectReason', 1), + (20, 'ClientWithdrawReason', 1), + (21, 'Entity to Entity Access Types', 1), + (22, 'CenterClosureReason', 1), + (23, 'LoanRescheduleReason', 1), + (24, 'Constitution', 1), + (25, 'Main Business Line', 1), + (26, 'WriteOffReasons', 1), + (27, 'STATE', 1), + (28, 'COUNTRY', 1), + (29, 'ADDRESS_TYPE', 1); /*!40000 ALTER TABLE `m_code` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.m_code_value DROP TABLE IF EXISTS `m_code_value`; -CREATE TABLE IF NOT EXISTS `m_code_value` ( - `id` INT NOT NULL AUTO_INCREMENT, - `code_id` INT NOT NULL, - `code_value` varchar(100) DEFAULT NULL, - `code_description` varchar(500) DEFAULT NULL, - `order_position` INT NOT NULL DEFAULT '0', - `code_score` INT DEFAULT NULL, - `is_active` tinyint NOT NULL DEFAULT '1', - `is_mandatory` tinyint NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - UNIQUE KEY `code_value` (`code_id`,`code_value`), - KEY `FKCFCEA42640BE071Z` (`code_id`), - CONSTRAINT `FKCFCEA42640BE071Z` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_code_value` +( + `id` + INT + NOT + NULL + AUTO_INCREMENT, + `code_id` + INT + NOT + NULL, + `code_value` + varchar +( + 100 +) DEFAULT NULL, + `code_description` varchar +( + 500 +) DEFAULT NULL, + `order_position` INT NOT NULL DEFAULT '0', + `code_score` INT DEFAULT NULL, + `is_active` tinyint NOT NULL DEFAULT '1', + `is_mandatory` tinyint NOT NULL DEFAULT '0', + PRIMARY KEY +( + `id` +), + UNIQUE KEY `code_value` +( + `code_id`, + `code_value` +), + KEY `FKCFCEA42640BE071Z` +( + `code_id` +), + CONSTRAINT `FKCFCEA42640BE071Z` FOREIGN KEY +( + `code_id` +) REFERENCES `m_code` +( + `id` +) + ) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_code_value: ~27 rows (approximately) /*!40000 ALTER TABLE `m_code_value` DISABLE KEYS */; -INSERT INTO `m_code_value` (`id`, `code_id`, `code_value`, `code_description`, `order_position`, `code_score`, `is_active`, `is_mandatory`) VALUES - (1, 1, 'Passport Id', NULL, 1, NULL, 1, 0), - (2, 1, 'Government Id', NULL, 2, NULL, 1, 0), - (3, 1, 'Drivers License', NULL, 3, NULL, 1, 0), - (4, 1, 'Any Other Id Type', NULL, 4, NULL, 1, 0), - (5, 6, 'Spouse', NULL, 0, NULL, 1, 0), - (6, 6, 'Parent', NULL, 0, NULL, 1, 0), - (7, 6, 'Sibling', NULL, 0, NULL, 1, 0), - (8, 6, 'Business Associate', NULL, 0, NULL, 1, 0), - (9, 6, 'Other', NULL, 0, NULL, 1, 0), - (10, 3, 'Cattle Rearing', NULL, 104, NULL, 1, 0), - (11, 3, 'Others', NULL, 105, NULL, 1, 0), - (12, 3, 'Tailoring Shop', NULL, 101, NULL, 1, 0), - (13, 3, 'Small Provisions Store', NULL, 102, NULL, 1, 0), - (14, 3, 'Agriculture', NULL, 103, NULL, 1, 0), - (15, 14, 'Blacklisted', NULL, 1, NULL, 1, 0), - (16, 14, 'Deceased', NULL, 2, NULL, 1, 0), - (17, 14, 'Transferred', NULL, 3, NULL, 1, 0), - (18, 14, 'Left', NULL, 4, NULL, 1, 0), - (19, 14, 'others', NULL, 5, NULL, 1, 0), - (20, 1, 'Voter ID', NULL, 6, NULL, 1, 0), - (21, 1, 'Ration Card', NULL, 5, NULL, 1, 0), - (22, 4, 'Male', NULL, 1, NULL, 1, 0), - (24, 4, 'Female', NULL, 2, NULL, 1, 0), - (25, 21, 'Office Access to Loan Products', NULL, 0, NULL, 1, 0), - (26, 21, 'Office Access to Savings Products', NULL, 0, NULL, 1, 0), - (27, 21, 'Office Access to Fees/Charges', NULL, 0, NULL, 1, 0), - (28, 13, 'Leader', 'Group Leader Role', 1, NULL, 1, 0); +INSERT INTO `m_code_value` (`id`, `code_id`, `code_value`, `code_description`, `order_position`, `code_score`, + `is_active`, `is_mandatory`) +VALUES (1, 1, 'Passport Id', NULL, 1, NULL, 1, 0), + (2, 1, 'Government Id', NULL, 2, NULL, 1, 0), + (3, 1, 'Drivers License', NULL, 3, NULL, 1, 0), + (4, 1, 'Any Other Id Type', NULL, 4, NULL, 1, 0), + (5, 6, 'Spouse', NULL, 0, NULL, 1, 0), + (6, 6, 'Parent', NULL, 0, NULL, 1, 0), + (7, 6, 'Sibling', NULL, 0, NULL, 1, 0), + (8, 6, 'Business Associate', NULL, 0, NULL, 1, 0), + (9, 6, 'Other', NULL, 0, NULL, 1, 0), + (10, 3, 'Cattle Rearing', NULL, 104, NULL, 1, 0), + (11, 3, 'Others', NULL, 105, NULL, 1, 0), + (12, 3, 'Tailoring Shop', NULL, 101, NULL, 1, 0), + (13, 3, 'Small Provisions Store', NULL, 102, NULL, 1, 0), + (14, 3, 'Agriculture', NULL, 103, NULL, 1, 0), + (15, 14, 'Blacklisted', NULL, 1, NULL, 1, 0), + (16, 14, 'Deceased', NULL, 2, NULL, 1, 0), + (17, 14, 'Transferred', NULL, 3, NULL, 1, 0), + (18, 14, 'Left', NULL, 4, NULL, 1, 0), + (19, 14, 'others', NULL, 5, NULL, 1, 0), + (20, 1, 'Voter ID', NULL, 6, NULL, 1, 0), + (21, 1, 'Ration Card', NULL, 5, NULL, 1, 0), + (22, 4, 'Male', NULL, 1, NULL, 1, 0), + (24, 4, 'Female', NULL, 2, NULL, 1, 0), + (25, 21, 'Office Access to Loan Products', NULL, 0, NULL, 1, 0), + (26, 21, 'Office Access to Savings Products', NULL, 0, NULL, 1, 0), + (27, 21, 'Office Access to Fees/Charges', NULL, 0, NULL, 1, 0), + (28, 13, 'Leader', 'Group Leader Role', 1, NULL, 1, 0); /*!40000 ALTER TABLE `m_code_value` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.m_currency DROP TABLE IF EXISTS `m_currency`; -CREATE TABLE IF NOT EXISTS `m_currency` ( - `id` BIGINT NOT NULL AUTO_INCREMENT, - `code` varchar(3) NOT NULL, - `decimal_places` SMALLINT NOT NULL, - `currency_multiplesof` SMALLINT DEFAULT NULL, - `display_symbol` varchar(10) DEFAULT NULL, - `name` varchar(50) NOT NULL, - `internationalized_name_code` varchar(50) NOT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `code` (`code`) -) ENGINE=InnoDB AUTO_INCREMENT=164 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `m_currency` +( + `id` + BIGINT + NOT + NULL + AUTO_INCREMENT, + `code` + varchar +( + 3 +) NOT NULL, + `decimal_places` SMALLINT NOT NULL, + `currency_multiplesof` SMALLINT DEFAULT NULL, + `display_symbol` varchar +( + 10 +) DEFAULT NULL, + `name` varchar +( + 50 +) NOT NULL, + `internationalized_name_code` varchar +( + 50 +) NOT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `code` +( + `code` +) + ) ENGINE=InnoDB AUTO_INCREMENT=164 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.m_currency: ~163 rows (approximately) /*!40000 ALTER TABLE `m_currency` DISABLE KEYS */; -INSERT INTO `m_currency` (`id`, `code`, `decimal_places`, `currency_multiplesof`, `display_symbol`, `name`, `internationalized_name_code`) VALUES - (1, 'AED', 2, NULL, NULL, 'UAE Dirham', 'currency.AED'), - (2, 'AFN', 2, NULL, NULL, 'Afghanistan Afghani', 'currency.AFN'), - (3, 'ALL', 2, NULL, NULL, 'Albanian Lek', 'currency.ALL'), - (4, 'AMD', 2, NULL, NULL, 'Armenian Dram', 'currency.AMD'), - (5, 'ANG', 2, NULL, NULL, 'Netherlands Antillian Guilder', 'currency.ANG'), - (6, 'AOA', 2, NULL, NULL, 'Angolan Kwanza', 'currency.AOA'), - (7, 'ARS', 2, NULL, '$', 'Argentine Peso', 'currency.ARS'), - (8, 'AUD', 2, NULL, 'A$', 'Australian Dollar', 'currency.AUD'), - (9, 'AWG', 2, NULL, NULL, 'Aruban Guilder', 'currency.AWG'), - (10, 'AZM', 2, NULL, NULL, 'Azerbaijanian Manat', 'currency.AZM'), - (11, 'BAM', 2, NULL, NULL, 'Bosnia and Herzegovina Convertible Marks', 'currency.BAM'), - (12, 'BBD', 2, NULL, NULL, 'Barbados Dollar', 'currency.BBD'), - (13, 'BDT', 2, NULL, NULL, 'Bangladesh Taka', 'currency.BDT'), - (14, 'BGN', 2, NULL, NULL, 'Bulgarian Lev', 'currency.BGN'), - (15, 'BHD', 3, NULL, NULL, 'Bahraini Dinar', 'currency.BHD'), - (16, 'BIF', 0, NULL, NULL, 'Burundi Franc', 'currency.BIF'), - (17, 'BMD', 2, NULL, NULL, 'Bermudian Dollar', 'currency.BMD'), - (18, 'BND', 2, NULL, 'B$', 'Brunei Dollar', 'currency.BND'), - (19, 'BOB', 2, NULL, 'Bs.', 'Bolivian Boliviano', 'currency.BOB'), - (20, 'BRL', 2, NULL, 'R$', 'Brazilian Real', 'currency.BRL'), - (21, 'BSD', 2, NULL, NULL, 'Bahamian Dollar', 'currency.BSD'), - (22, 'BTN', 2, NULL, NULL, 'Bhutan Ngultrum', 'currency.BTN'), - (23, 'BWP', 2, NULL, NULL, 'Botswana Pula', 'currency.BWP'), - (24, 'BYR', 0, NULL, NULL, 'Belarussian Ruble', 'currency.BYR'), - (25, 'BZD', 2, NULL, 'BZ$', 'Belize Dollar', 'currency.BZD'), - (26, 'CAD', 2, NULL, NULL, 'Canadian Dollar', 'currency.CAD'), - (27, 'CDF', 2, NULL, NULL, 'Franc Congolais', 'currency.CDF'), - (28, 'CHF', 2, NULL, NULL, 'Swiss Franc', 'currency.CHF'), - (29, 'CLP', 0, NULL, '$', 'Chilean Peso', 'currency.CLP'), - (30, 'CNY', 2, NULL, NULL, 'Chinese Yuan Renminbi', 'currency.CNY'), - (31, 'COP', 2, NULL, '$', 'Colombian Peso', 'currency.COP'), - (32, 'CRC', 2, NULL, '?', 'Costa Rican Colon', 'currency.CRC'), - (33, 'CSD', 2, NULL, NULL, 'Serbian Dinar', 'currency.CSD'), - (34, 'CUP', 2, NULL, '$MN', 'Cuban Peso', 'currency.CUP'), - (35, 'CVE', 2, NULL, NULL, 'Cape Verde Escudo', 'currency.CVE'), - (36, 'CYP', 2, NULL, NULL, 'Cyprus Pound', 'currency.CYP'), - (37, 'CZK', 2, NULL, NULL, 'Czech Koruna', 'currency.CZK'), - (38, 'DJF', 0, NULL, NULL, 'Djibouti Franc', 'currency.DJF'), - (39, 'DKK', 2, NULL, NULL, 'Danish Krone', 'currency.DKK'), - (40, 'DOP', 2, NULL, 'RD$', 'Dominican Peso', 'currency.DOP'), - (41, 'DZD', 2, NULL, NULL, 'Algerian Dinar', 'currency.DZD'), - (42, 'EEK', 2, NULL, NULL, 'Estonian Kroon', 'currency.EEK'), - (43, 'EGP', 2, NULL, NULL, 'Egyptian Pound', 'currency.EGP'), - (44, 'ERN', 2, NULL, NULL, 'Eritrea Nafka', 'currency.ERN'), - (45, 'ETB', 2, NULL, NULL, 'Ethiopian Birr', 'currency.ETB'), - (46, 'EUR', 2, NULL, '€', 'Euro', 'currency.EUR'), - (47, 'FJD', 2, NULL, NULL, 'Fiji Dollar', 'currency.FJD'), - (48, 'FKP', 2, NULL, NULL, 'Falkland Islands Pound', 'currency.FKP'), - (49, 'GBP', 2, NULL, NULL, 'Pound Sterling', 'currency.GBP'), - (50, 'GEL', 2, NULL, NULL, 'Georgian Lari', 'currency.GEL'), - (51, 'GHC', 2, NULL, 'GHc', 'Ghana Cedi', 'currency.GHC'), - (52, 'GIP', 2, NULL, NULL, 'Gibraltar Pound', 'currency.GIP'), - (53, 'GMD', 2, NULL, NULL, 'Gambian Dalasi', 'currency.GMD'), - (54, 'GNF', 0, NULL, NULL, 'Guinea Franc', 'currency.GNF'), - (55, 'GTQ', 2, NULL, 'Q', 'Guatemala Quetzal', 'currency.GTQ'), - (56, 'GYD', 2, NULL, NULL, 'Guyana Dollar', 'currency.GYD'), - (57, 'HKD', 2, NULL, NULL, 'Hong Kong Dollar', 'currency.HKD'), - (58, 'HNL', 2, NULL, 'L', 'Honduras Lempira', 'currency.HNL'), - (59, 'HRK', 2, NULL, NULL, 'Croatian Kuna', 'currency.HRK'), - (60, 'HTG', 2, NULL, 'G', 'Haiti Gourde', 'currency.HTG'), - (61, 'HUF', 2, NULL, NULL, 'Hungarian Forint', 'currency.HUF'), - (62, 'IDR', 2, NULL, NULL, 'Indonesian Rupiah', 'currency.IDR'), - (63, 'ILS', 2, NULL, NULL, 'New Israeli Shekel', 'currency.ILS'), - (64, 'INR', 2, NULL, '₹', 'Indian Rupee', 'currency.INR'), - (65, 'IQD', 3, NULL, NULL, 'Iraqi Dinar', 'currency.IQD'), - (66, 'IRR', 2, NULL, NULL, 'Iranian Rial', 'currency.IRR'), - (67, 'ISK', 0, NULL, NULL, 'Iceland Krona', 'currency.ISK'), - (68, 'JMD', 2, NULL, NULL, 'Jamaican Dollar', 'currency.JMD'), - (69, 'JOD', 3, NULL, NULL, 'Jordanian Dinar', 'currency.JOD'), - (70, 'JPY', 0, NULL, NULL, 'Japanese Yen', 'currency.JPY'), - (71, 'KES', 2, NULL, 'KSh', 'Kenyan Shilling', 'currency.KES'), - (72, 'KGS', 2, NULL, NULL, 'Kyrgyzstan Som', 'currency.KGS'), - (73, 'KHR', 2, NULL, NULL, 'Cambodia Riel', 'currency.KHR'), - (74, 'KMF', 0, NULL, NULL, 'Comoro Franc', 'currency.KMF'), - (75, 'KPW', 2, NULL, NULL, 'North Korean Won', 'currency.KPW'), - (76, 'KRW', 0, NULL, NULL, 'Korean Won', 'currency.KRW'), - (77, 'KWD', 3, NULL, NULL, 'Kuwaiti Dinar', 'currency.KWD'), - (78, 'KYD', 2, NULL, NULL, 'Cayman Islands Dollar', 'currency.KYD'), - (79, 'KZT', 2, NULL, NULL, 'Kazakhstan Tenge', 'currency.KZT'), - (80, 'LAK', 2, NULL, NULL, 'Lao Kip', 'currency.LAK'), - (81, 'LBP', 2, NULL, 'L£', 'Lebanese Pound', 'currency.LBP'), - (82, 'LKR', 2, NULL, NULL, 'Sri Lanka Rupee', 'currency.LKR'), - (83, 'LRD', 2, NULL, NULL, 'Liberian Dollar', 'currency.LRD'), - (84, 'LSL', 2, NULL, NULL, 'Lesotho Loti', 'currency.LSL'), - (85, 'LTL', 2, NULL, NULL, 'Lithuanian Litas', 'currency.LTL'), - (86, 'LVL', 2, NULL, NULL, 'Latvian Lats', 'currency.LVL'), - (87, 'LYD', 3, NULL, NULL, 'Libyan Dinar', 'currency.LYD'), - (88, 'MAD', 2, NULL, NULL, 'Moroccan Dirham', 'currency.MAD'), - (89, 'MDL', 2, NULL, NULL, 'Moldovan Leu', 'currency.MDL'), - (90, 'MGA', 2, NULL, NULL, 'Malagasy Ariary', 'currency.MGA'), - (91, 'MKD', 2, NULL, NULL, 'Macedonian Denar', 'currency.MKD'), - (92, 'MMK', 2, NULL, 'K', 'Myanmar Kyat', 'currency.MMK'), - (93, 'MNT', 2, NULL, NULL, 'Mongolian Tugrik', 'currency.MNT'), - (94, 'MOP', 2, NULL, NULL, 'Macau Pataca', 'currency.MOP'), - (95, 'MRO', 2, NULL, NULL, 'Mauritania Ouguiya', 'currency.MRO'), - (96, 'MTL', 2, NULL, NULL, 'Maltese Lira', 'currency.MTL'), - (97, 'MUR', 2, NULL, NULL, 'Mauritius Rupee', 'currency.MUR'), - (98, 'MVR', 2, NULL, NULL, 'Maldives Rufiyaa', 'currency.MVR'), - (99, 'MWK', 2, NULL, NULL, 'Malawi Kwacha', 'currency.MWK'), - (100, 'MXN', 2, NULL, '$', 'Mexican Peso', 'currency.MXN'), - (101, 'MYR', 2, NULL, NULL, 'Malaysian Ringgit', 'currency.MYR'), - (102, 'MZM', 2, NULL, NULL, 'Mozambique Metical', 'currency.MZM'), - (103, 'NAD', 2, NULL, NULL, 'Namibia Dollar', 'currency.NAD'), - (104, 'NGN', 2, NULL, NULL, 'Nigerian Naira', 'currency.NGN'), - (105, 'NIO', 2, NULL, 'C$', 'Nicaragua Cordoba Oro', 'currency.NIO'), - (106, 'NOK', 2, NULL, NULL, 'Norwegian Krone', 'currency.NOK'), - (107, 'NPR', 2, NULL, NULL, 'Nepalese Rupee', 'currency.NPR'), - (108, 'NZD', 2, NULL, NULL, 'New Zealand Dollar', 'currency.NZD'), - (109, 'OMR', 3, NULL, NULL, 'Rial Omani', 'currency.OMR'), - (110, 'PAB', 2, NULL, 'B/.', 'Panama Balboa', 'currency.PAB'), - (111, 'PEN', 2, NULL, 'S/.', 'Peruvian Nuevo Sol', 'currency.PEN'), - (112, 'PGK', 2, NULL, NULL, 'Papua New Guinea Kina', 'currency.PGK'), - (113, 'PHP', 2, NULL, NULL, 'Philippine Peso', 'currency.PHP'), - (114, 'PKR', 2, NULL, NULL, 'Pakistan Rupee', 'currency.PKR'), - (115, 'PLN', 2, NULL, NULL, 'Polish Zloty', 'currency.PLN'), - (116, 'PYG', 0, NULL, '?', 'Paraguayan Guarani', 'currency.PYG'), - (117, 'QAR', 2, NULL, NULL, 'Qatari Rial', 'currency.QAR'), - (118, 'RON', 2, NULL, NULL, 'Romanian Leu', 'currency.RON'), - (119, 'RUB', 2, NULL, NULL, 'Russian Ruble', 'currency.RUB'), - (120, 'RWF', 0, NULL, NULL, 'Rwanda Franc', 'currency.RWF'), - (121, 'SAR', 2, NULL, NULL, 'Saudi Riyal', 'currency.SAR'), - (122, 'SBD', 2, NULL, NULL, 'Solomon Islands Dollar', 'currency.SBD'), - (123, 'SCR', 2, NULL, NULL, 'Seychelles Rupee', 'currency.SCR'), - (124, 'SDD', 2, NULL, NULL, 'Sudanese Dinar', 'currency.SDD'), - (125, 'SEK', 2, NULL, NULL, 'Swedish Krona', 'currency.SEK'), - (126, 'SGD', 2, NULL, NULL, 'Singapore Dollar', 'currency.SGD'), - (127, 'SHP', 2, NULL, NULL, 'St Helena Pound', 'currency.SHP'), - (128, 'SIT', 2, NULL, NULL, 'Slovenian Tolar', 'currency.SIT'), - (129, 'SKK', 2, NULL, NULL, 'Slovak Koruna', 'currency.SKK'), - (130, 'SLL', 2, NULL, NULL, 'Sierra Leone Leone', 'currency.SLL'), - (131, 'SOS', 2, NULL, NULL, 'Somali Shilling', 'currency.SOS'), - (132, 'SRD', 2, NULL, NULL, 'Surinam Dollar', 'currency.SRD'), - (133, 'STD', 2, NULL, NULL, 'Sao Tome and Principe Dobra', 'currency.STD'), - (134, 'SVC', 2, NULL, NULL, 'El Salvador Colon', 'currency.SVC'), - (135, 'SYP', 2, NULL, NULL, 'Syrian Pound', 'currency.SYP'), - (136, 'SZL', 2, NULL, NULL, 'Swaziland Lilangeni', 'currency.SZL'), - (137, 'THB', 2, NULL, NULL, 'Thai Baht', 'currency.THB'), - (138, 'TJS', 2, NULL, NULL, 'Tajik Somoni', 'currency.TJS'), - (139, 'TMM', 2, NULL, NULL, 'Turkmenistan Manat', 'currency.TMM'), - (140, 'TND', 3, NULL, 'DT', 'Tunisian Dinar', 'currency.TND'), - (141, 'TOP', 2, NULL, NULL, 'Tonga Pa\'anga', 'currency.TOP'), +INSERT INTO `m_currency` (`id`, `code`, `decimal_places`, `currency_multiplesof`, `display_symbol`, `name`, + `internationalized_name_code`) +VALUES (1, 'AED', 2, NULL, NULL, 'UAE Dirham', 'currency.AED'), + (2, 'AFN', 2, NULL, NULL, 'Afghanistan Afghani', 'currency.AFN'), + (3, 'ALL', 2, NULL, NULL, 'Albanian Lek', 'currency.ALL'), + (4, 'AMD', 2, NULL, NULL, 'Armenian Dram', 'currency.AMD'), + (5, 'ANG', 2, NULL, NULL, 'Netherlands Antillian Guilder', 'currency.ANG'), + (6, 'AOA', 2, NULL, NULL, 'Angolan Kwanza', 'currency.AOA'), + (7, 'ARS', 2, NULL, '$', 'Argentine Peso', 'currency.ARS'), + (8, 'AUD', 2, NULL, 'A$', 'Australian Dollar', 'currency.AUD'), + (9, 'AWG', 2, NULL, NULL, 'Aruban Guilder', 'currency.AWG'), + (10, 'AZM', 2, NULL, NULL, 'Azerbaijanian Manat', 'currency.AZM'), + (11, 'BAM', 2, NULL, NULL, 'Bosnia and Herzegovina Convertible Marks', 'currency.BAM'), + (12, 'BBD', 2, NULL, NULL, 'Barbados Dollar', 'currency.BBD'), + (13, 'BDT', 2, NULL, NULL, 'Bangladesh Taka', 'currency.BDT'), + (14, 'BGN', 2, NULL, NULL, 'Bulgarian Lev', 'currency.BGN'), + (15, 'BHD', 3, NULL, NULL, 'Bahraini Dinar', 'currency.BHD'), + (16, 'BIF', 0, NULL, NULL, 'Burundi Franc', 'currency.BIF'), + (17, 'BMD', 2, NULL, NULL, 'Bermudian Dollar', 'currency.BMD'), + (18, 'BND', 2, NULL, 'B$', 'Brunei Dollar', 'currency.BND'), + (19, 'BOB', 2, NULL, 'Bs.', 'Bolivian Boliviano', 'currency.BOB'), + (20, 'BRL', 2, NULL, 'R$', 'Brazilian Real', 'currency.BRL'), + (21, 'BSD', 2, NULL, NULL, 'Bahamian Dollar', 'currency.BSD'), + (22, 'BTN', 2, NULL, NULL, 'Bhutan Ngultrum', 'currency.BTN'), + (23, 'BWP', 2, NULL, NULL, 'Botswana Pula', 'currency.BWP'), + (24, 'BYR', 0, NULL, NULL, 'Belarussian Ruble', 'currency.BYR'), + (25, 'BZD', 2, NULL, 'BZ$', 'Belize Dollar', 'currency.BZD'), + (26, 'CAD', 2, NULL, NULL, 'Canadian Dollar', 'currency.CAD'), + (27, 'CDF', 2, NULL, NULL, 'Franc Congolais', 'currency.CDF'), + (28, 'CHF', 2, NULL, NULL, 'Swiss Franc', 'currency.CHF'), + (29, 'CLP', 0, NULL, '$', 'Chilean Peso', 'currency.CLP'), + (30, 'CNY', 2, NULL, NULL, 'Chinese Yuan Renminbi', 'currency.CNY'), + (31, 'COP', 2, NULL, '$', 'Colombian Peso', 'currency.COP'), + (32, 'CRC', 2, NULL, '?', 'Costa Rican Colon', 'currency.CRC'), + (33, 'CSD', 2, NULL, NULL, 'Serbian Dinar', 'currency.CSD'), + (34, 'CUP', 2, NULL, '$MN', 'Cuban Peso', 'currency.CUP'), + (35, 'CVE', 2, NULL, NULL, 'Cape Verde Escudo', 'currency.CVE'), + (36, 'CYP', 2, NULL, NULL, 'Cyprus Pound', 'currency.CYP'), + (37, 'CZK', 2, NULL, NULL, 'Czech Koruna', 'currency.CZK'), + (38, 'DJF', 0, NULL, NULL, 'Djibouti Franc', 'currency.DJF'), + (39, 'DKK', 2, NULL, NULL, 'Danish Krone', 'currency.DKK'), + (40, 'DOP', 2, NULL, 'RD$', 'Dominican Peso', 'currency.DOP'), + (41, 'DZD', 2, NULL, NULL, 'Algerian Dinar', 'currency.DZD'), + (42, 'EEK', 2, NULL, NULL, 'Estonian Kroon', 'currency.EEK'), + (43, 'EGP', 2, NULL, NULL, 'Egyptian Pound', 'currency.EGP'), + (44, 'ERN', 2, NULL, NULL, 'Eritrea Nafka', 'currency.ERN'), + (45, 'ETB', 2, NULL, NULL, 'Ethiopian Birr', 'currency.ETB'), + (46, 'EUR', 2, NULL, '€', 'Euro', 'currency.EUR'), + (47, 'FJD', 2, NULL, NULL, 'Fiji Dollar', 'currency.FJD'), + (48, 'FKP', 2, NULL, NULL, 'Falkland Islands Pound', 'currency.FKP'), + (49, 'GBP', 2, NULL, NULL, 'Pound Sterling', 'currency.GBP'), + (50, 'GEL', 2, NULL, NULL, 'Georgian Lari', 'currency.GEL'), + (51, 'GHC', 2, NULL, 'GHc', 'Ghana Cedi', 'currency.GHC'), + (52, 'GIP', 2, NULL, NULL, 'Gibraltar Pound', 'currency.GIP'), + (53, 'GMD', 2, NULL, NULL, 'Gambian Dalasi', 'currency.GMD'), + (54, 'GNF', 0, NULL, NULL, 'Guinea Franc', 'currency.GNF'), + (55, 'GTQ', 2, NULL, 'Q', 'Guatemala Quetzal', 'currency.GTQ'), + (56, 'GYD', 2, NULL, NULL, 'Guyana Dollar', 'currency.GYD'), + (57, 'HKD', 2, NULL, NULL, 'Hong Kong Dollar', 'currency.HKD'), + (58, 'HNL', 2, NULL, 'L', 'Honduras Lempira', 'currency.HNL'), + (59, 'HRK', 2, NULL, NULL, 'Croatian Kuna', 'currency.HRK'), + (60, 'HTG', 2, NULL, 'G', 'Haiti Gourde', 'currency.HTG'), + (61, 'HUF', 2, NULL, NULL, 'Hungarian Forint', 'currency.HUF'), + (62, 'IDR', 2, NULL, NULL, 'Indonesian Rupiah', 'currency.IDR'), + (63, 'ILS', 2, NULL, NULL, 'New Israeli Shekel', 'currency.ILS'), + (64, 'INR', 2, NULL, '₹', 'Indian Rupee', 'currency.INR'), + (65, 'IQD', 3, NULL, NULL, 'Iraqi Dinar', 'currency.IQD'), + (66, 'IRR', 2, NULL, NULL, 'Iranian Rial', 'currency.IRR'), + (67, 'ISK', 0, NULL, NULL, 'Iceland Krona', 'currency.ISK'), + (68, 'JMD', 2, NULL, NULL, 'Jamaican Dollar', 'currency.JMD'), + (69, 'JOD', 3, NULL, NULL, 'Jordanian Dinar', 'currency.JOD'), + (70, 'JPY', 0, NULL, NULL, 'Japanese Yen', 'currency.JPY'), + (71, 'KES', 2, NULL, 'KSh', 'Kenyan Shilling', 'currency.KES'), + (72, 'KGS', 2, NULL, NULL, 'Kyrgyzstan Som', 'currency.KGS'), + (73, 'KHR', 2, NULL, NULL, 'Cambodia Riel', 'currency.KHR'), + (74, 'KMF', 0, NULL, NULL, 'Comoro Franc', 'currency.KMF'), + (75, 'KPW', 2, NULL, NULL, 'North Korean Won', 'currency.KPW'), + (76, 'KRW', 0, NULL, NULL, 'Korean Won', 'currency.KRW'), + (77, 'KWD', 3, NULL, NULL, 'Kuwaiti Dinar', 'currency.KWD'), + (78, 'KYD', 2, NULL, NULL, 'Cayman Islands Dollar', 'currency.KYD'), + (79, 'KZT', 2, NULL, NULL, 'Kazakhstan Tenge', 'currency.KZT'), + (80, 'LAK', 2, NULL, NULL, 'Lao Kip', 'currency.LAK'), + (81, 'LBP', 2, NULL, 'L£', 'Lebanese Pound', 'currency.LBP'), + (82, 'LKR', 2, NULL, NULL, 'Sri Lanka Rupee', 'currency.LKR'), + (83, 'LRD', 2, NULL, NULL, 'Liberian Dollar', 'currency.LRD'), + (84, 'LSL', 2, NULL, NULL, 'Lesotho Loti', 'currency.LSL'), + (85, 'LTL', 2, NULL, NULL, 'Lithuanian Litas', 'currency.LTL'), + (86, 'LVL', 2, NULL, NULL, 'Latvian Lats', 'currency.LVL'), + (87, 'LYD', 3, NULL, NULL, 'Libyan Dinar', 'currency.LYD'), + (88, 'MAD', 2, NULL, NULL, 'Moroccan Dirham', 'currency.MAD'), + (89, 'MDL', 2, NULL, NULL, 'Moldovan Leu', 'currency.MDL'), + (90, 'MGA', 2, NULL, NULL, 'Malagasy Ariary', 'currency.MGA'), + (91, 'MKD', 2, NULL, NULL, 'Macedonian Denar', 'currency.MKD'), + (92, 'MMK', 2, NULL, 'K', 'Myanmar Kyat', 'currency.MMK'), + (93, 'MNT', 2, NULL, NULL, 'Mongolian Tugrik', 'currency.MNT'), + (94, 'MOP', 2, NULL, NULL, 'Macau Pataca', 'currency.MOP'), + (95, 'MRO', 2, NULL, NULL, 'Mauritania Ouguiya', 'currency.MRO'), + (96, 'MTL', 2, NULL, NULL, 'Maltese Lira', 'currency.MTL'), + (97, 'MUR', 2, NULL, NULL, 'Mauritius Rupee', 'currency.MUR'), + (98, 'MVR', 2, NULL, NULL, 'Maldives Rufiyaa', 'currency.MVR'), + (99, 'MWK', 2, NULL, NULL, 'Malawi Kwacha', 'currency.MWK'), + (100, 'MXN', 2, NULL, '$', 'Mexican Peso', 'currency.MXN'), + (101, 'MYR', 2, NULL, NULL, 'Malaysian Ringgit', 'currency.MYR'), + (102, 'MZM', 2, NULL, NULL, 'Mozambique Metical', 'currency.MZM'), + (103, 'NAD', 2, NULL, NULL, 'Namibia Dollar', 'currency.NAD'), + (104, 'NGN', 2, NULL, NULL, 'Nigerian Naira', 'currency.NGN'), + (105, 'NIO', 2, NULL, 'C$', 'Nicaragua Cordoba Oro', 'currency.NIO'), + (106, 'NOK', 2, NULL, NULL, 'Norwegian Krone', 'currency.NOK'), + (107, 'NPR', 2, NULL, NULL, 'Nepalese Rupee', 'currency.NPR'), + (108, 'NZD', 2, NULL, NULL, 'New Zealand Dollar', 'currency.NZD'), + (109, 'OMR', 3, NULL, NULL, 'Rial Omani', 'currency.OMR'), + (110, 'PAB', 2, NULL, 'B/.', 'Panama Balboa', 'currency.PAB'), + (111, 'PEN', 2, NULL, 'S/.', 'Peruvian Nuevo Sol', 'currency.PEN'), + (112, 'PGK', 2, NULL, NULL, 'Papua New Guinea Kina', 'currency.PGK'), + (113, 'PHP', 2, NULL, NULL, 'Philippine Peso', 'currency.PHP'), + (114, 'PKR', 2, NULL, NULL, 'Pakistan Rupee', 'currency.PKR'), + (115, 'PLN', 2, NULL, NULL, 'Polish Zloty', 'currency.PLN'), + (116, 'PYG', 0, NULL, '?', 'Paraguayan Guarani', 'currency.PYG'), + (117, 'QAR', 2, NULL, NULL, 'Qatari Rial', 'currency.QAR'), + (118, 'RON', 2, NULL, NULL, 'Romanian Leu', 'currency.RON'), + (119, 'RUB', 2, NULL, NULL, 'Russian Ruble', 'currency.RUB'), + (120, 'RWF', 0, NULL, NULL, 'Rwanda Franc', 'currency.RWF'), + (121, 'SAR', 2, NULL, NULL, 'Saudi Riyal', 'currency.SAR'), + (122, 'SBD', 2, NULL, NULL, 'Solomon Islands Dollar', 'currency.SBD'), + (123, 'SCR', 2, NULL, NULL, 'Seychelles Rupee', 'currency.SCR'), + (124, 'SDD', 2, NULL, NULL, 'Sudanese Dinar', 'currency.SDD'), + (125, 'SEK', 2, NULL, NULL, 'Swedish Krona', 'currency.SEK'), + (126, 'SGD', 2, NULL, NULL, 'Singapore Dollar', 'currency.SGD'), + (127, 'SHP', 2, NULL, NULL, 'St Helena Pound', 'currency.SHP'), + (128, 'SIT', 2, NULL, NULL, 'Slovenian Tolar', 'currency.SIT'), + (129, 'SKK', 2, NULL, NULL, 'Slovak Koruna', 'currency.SKK'), + (130, 'SLL', 2, NULL, NULL, 'Sierra Leone Leone', 'currency.SLL'), + (131, 'SOS', 2, NULL, NULL, 'Somali Shilling', 'currency.SOS'), + (132, 'SRD', 2, NULL, NULL, 'Surinam Dollar', 'currency.SRD'), + (133, 'STD', 2, NULL, NULL, 'Sao Tome and Principe Dobra', 'currency.STD'), + (134, 'SVC', 2, NULL, NULL, 'El Salvador Colon', 'currency.SVC'), + (135, 'SYP', 2, NULL, NULL, 'Syrian Pound', 'currency.SYP'), + (136, 'SZL', 2, NULL, NULL, 'Swaziland Lilangeni', 'currency.SZL'), + (137, 'THB', 2, NULL, NULL, 'Thai Baht', 'currency.THB'), + (138, 'TJS', 2, NULL, NULL, 'Tajik Somoni', 'currency.TJS'), + (139, 'TMM', 2, NULL, NULL, 'Turkmenistan Manat', 'currency.TMM'), + (140, 'TND', 3, NULL, 'DT', 'Tunisian Dinar', 'currency.TND'), + (141, 'TOP', 2, NULL, NULL, 'Tonga Pa\'anga', 'currency.TOP'), (142, 'TRY', 2, NULL, NULL, 'Turkish Lira', 'currency.TRY'), (143, 'TTD', 2, NULL, NULL, 'Trinidad and Tobago Dollar', 'currency.TTD'), (144, 'TWD', 2, NULL, NULL, 'New Taiwan Dollar', 'currency.TWD'), @@ -3205,8 +5143,9 @@ CREATE TABLE IF NOT EXISTS `m_password_validation_policy` ( -- Dumping data for table mifostenant-reference.m_password_validation_policy: ~2 rows (approximately) /*!40000 ALTER TABLE `m_password_validation_policy` DISABLE KEYS */; INSERT INTO `m_password_validation_policy` (`id`, `regex`, `description`, `active`, `key`) VALUES - (1, '^.{1,50}$', 'Password most be at least 1 character and not more that 50 characters long', 1, 'simple'), - (2, '^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\\s).{6,50}$', 'Password must be at least 6 characters, no more than 50 characters long, must include at least one upper case letter, one lower case letter, one numeric digit and no space', 0, 'secure'); + (1, '^.{1, 50}$', 'Password most be at least 1 character and not more that 50 characters long', 1, 'simple'), + (2, '^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\\s).{6, 50}$', 'Password must be at least 6 characters, no more than 50 + characters long, must include at least one upper case letter, one lower case letter, one numeric digit and no space', 0, 'secure'); /*!40000 ALTER TABLE `m_password_validation_policy` ENABLE KEYS */; @@ -4074,50 +6013,120 @@ CREATE TABLE IF NOT EXISTS `m_portfolio_command_source` ( -- Dumping data for table mifostenant-reference.m_portfolio_command_source: ~72 rows (approximately) /*!40000 ALTER TABLE `m_portfolio_command_source` DISABLE KEYS */; INSERT INTO `m_portfolio_command_source` (`id`, `action_name`, `entity_name`, `office_id`, `group_id`, `client_id`, `loan_id`, `savings_account_id`, `api_get_url`, `resource_id`, `subresource_id`, `command_as_json`, `maker_id`, `made_on_date`, `checker_id`, `checked_on_date`, `status`, `product_id`, `transaction_id`) VALUES - (1, 'CREATE', 'STAFF', 1, NULL, NULL, NULL, NULL, '/staff/template', 1, NULL, '{"isLoanOfficer":true,"officeId":1,"firstname":"Aliya","lastname":"A"}', 1, '2014-03-07 19:10:05', NULL, NULL, 1, NULL, NULL), - (2, 'CREATE', 'USER', 1, NULL, NULL, NULL, NULL, '/users/template', 2, NULL, '{"sendPasswordToEmail":true,"officeId":1,"username":"adama","firstname":"Adam","lastname":"A","email":"adama@123.com","roles":["1"]}', 1, '2014-03-07 19:19:31', NULL, NULL, 1, NULL, NULL), - (3, 'CREATE', 'CLIENT', 1, NULL, 1, NULL, NULL, '/clients/template', 1, NULL, '{"officeId":1,"staffId":1,"firstname":"Smith","lastname":"R","active":true,"locale":"en","dateFormat":"dd MMMM yyyy","activationDate":"07 March 2014","submittedOnDate":"01 January 2010","savingsProductId":null}', 1, '2014-03-07 19:23:36', NULL, NULL, 1, NULL, NULL), - (4, 'CREATE', 'OFFICE', 2, NULL, NULL, NULL, NULL, '/offices/template', 2, NULL, '{"parentId":1,"name":"Manila","locale":"en","dateFormat":"dd MMMM yyyy","openingDate":"01 January 2010"}', 1, '2014-03-07 19:24:51', NULL, NULL, 1, NULL, NULL), - (5, 'CREATE', 'USER', 2, NULL, NULL, NULL, NULL, '/users/template', 4, NULL, '{"sendPasswordToEmail":true,"officeId":2,"username":"benb","firstname":"Ben","lastname":"B","email":"benb@123.com","roles":["1"]}', 1, '2014-03-07 19:26:26', NULL, NULL, 1, NULL, NULL), - (6, 'CREATE', 'STAFF', 2, NULL, NULL, NULL, NULL, '/staff/template', 2, NULL, '{"isLoanOfficer":true,"officeId":2,"firstname":"Mary","lastname":"M"}', 1, '2014-03-07 19:27:47', NULL, NULL, 1, NULL, NULL), - (7, 'CREATE', 'CENTER', 2, 1, NULL, NULL, NULL, '/centers/template', 1, NULL, '{"officeId":2,"staffId":2,"active":true,"name":"Jimmy","activationDate":"07 March 2014","submittedOnDate":"02 January 2010","locale":"en","dateFormat":"dd MMMM yyyy"}', 1, '2014-03-07 19:32:33', NULL, NULL, 1, NULL, NULL), - (8, 'UPDATE', 'CENTER', 2, 1, NULL, NULL, NULL, '/centers/1', 1, NULL, '{"activationDate":"02 January 2010","dateFormat":"dd MMMM yyyy","locale":"en"}', 1, '2014-03-07 19:32:55', NULL, NULL, 1, NULL, NULL), - (9, 'CREATE', 'CENTER', 2, 2, NULL, NULL, NULL, '/centers/template', 2, NULL, '{"officeId":2,"name":"Global Trade Finance","active":true,"activationDate":"07 March 2014","submittedOnDate":"03 January 2010","locale":"en","dateFormat":"dd MMMM yyyy"}', 1, '2014-03-07 19:41:08', NULL, NULL, 1, NULL, NULL), - (10, 'UPDATE', 'CENTER', 2, 2, NULL, NULL, NULL, '/centers/2', 2, NULL, '{"staffId":2,"activationDate":"03 January 2010","dateFormat":"dd MMMM yyyy","locale":"en"}', 1, '2014-03-07 19:41:40', NULL, NULL, 1, NULL, NULL), - (11, 'CREATE', 'GROUP', 2, 3, NULL, NULL, NULL, '/groups/template', 3, NULL, '{"clientMembers":[],"staffId":"2","name":"Nirvana","active":false,"submittedOnDate":"04 January 2010","dateFormat":"dd MMMM yyyy","locale":"en","centerId":"2","officeId":"2"}', 1, '2014-03-07 19:44:24', NULL, NULL, 1, NULL, NULL), - (12, 'ACTIVATE', 'GROUP', 2, 3, NULL, NULL, NULL, '/groups/3?command=activate', 3, NULL, '{"activationDate":"04 January 2010","locale":"en","dateFormat":"dd MMMM yyyy"}', 1, '2014-03-07 19:45:06', NULL, NULL, 1, NULL, NULL), - (13, 'CREATE', 'GROUP', 2, 4, NULL, NULL, NULL, '/groups/template', 4, NULL, '{"clientMembers":[],"staffId":"2","name":"Oasis","active":true,"activationDate":"04 January 2010","submittedOnDate":"04 January 2010","dateFormat":"dd MMMM yyyy","locale":"en","centerId":"2","officeId":"2"}', 1, '2014-03-07 19:51:14', NULL, NULL, 1, NULL, NULL), - (14, 'CREATE', 'CLIENT', 2, 3, 2, NULL, NULL, '/clients/template', 2, NULL, '{"staffId":"2","firstname":"Johnson","lastname":"D","active":true,"activationDate":"04 January 2010","dateFormat":"dd MMMM yyyy","locale":"en","groupId":"3","officeId":"2"}', 1, '2014-03-07 19:56:25', NULL, NULL, 1, NULL, NULL), - (15, 'CREATE', 'CLIENT', 2, 3, 3, NULL, NULL, '/clients/template', 3, NULL, '{"staffId":"2","firstname":"Williams","lastname":"G","active":false,"activationDate":"04 January 2010","dateFormat":"dd MMMM yyyy","locale":"en","groupId":"3","officeId":"2"}', 1, '2014-03-07 19:57:18', NULL, NULL, 1, NULL, NULL), + (1, 'CREATE', 'STAFF', 1, NULL, NULL, NULL, NULL, '/staff/template', 1, NULL, '{"isLoanOfficer":true, "officeId":1, + "firstname":"Aliya", "lastname":"A"}', 1, '2014-03-07 19:10:05', NULL, NULL, 1, NULL, NULL), + (2, 'CREATE', 'USER', 1, NULL, NULL, NULL, NULL, '/users/template', 2, NULL, '{"sendPasswordToEmail":true, + "officeId":1, "username":"adama", "firstname":"Adam", "lastname":"A", "email":"adama@123.com", "roles":["1"]}', 1, '2014-03-07 19:19:31', NULL, NULL, 1, NULL, NULL), + (3, 'CREATE', 'CLIENT', 1, NULL, 1, NULL, NULL, '/clients/template', 1, NULL, '{"officeId":1, "staffId":1, + "firstname":"Smith", "lastname":"R", "active":true, "locale":"en", "dateFormat":"dd MMMM yyyy", + "activationDate":"07 March 2014", "submittedOnDate":"01 January 2010", "savingsProductId":null}', 1, '2014-03-07 19:23:36', NULL, NULL, 1, NULL, NULL), + (4, 'CREATE', 'OFFICE', 2, NULL, NULL, NULL, NULL, '/offices/template', 2, NULL, '{"parentId":1, "name":"Manila", + "locale":"en", "dateFormat":"dd MMMM yyyy", "openingDate":"01 January 2010"}', 1, '2014-03-07 19:24:51', NULL, NULL, 1, NULL, NULL), + (5, 'CREATE', 'USER', 2, NULL, NULL, NULL, NULL, '/users/template', 4, NULL, '{"sendPasswordToEmail":true, + "officeId":2, "username":"benb", "firstname":"Ben", "lastname":"B", "email":"benb@123.com", "roles":["1"]}', 1, '2014-03-07 19:26:26', NULL, NULL, 1, NULL, NULL), + (6, 'CREATE', 'STAFF', 2, NULL, NULL, NULL, NULL, '/staff/template', 2, NULL, '{"isLoanOfficer":true, "officeId":2, + "firstname":"Mary", "lastname":"M"}', 1, '2014-03-07 19:27:47', NULL, NULL, 1, NULL, NULL), + (7, 'CREATE', 'CENTER', 2, 1, NULL, NULL, NULL, '/centers/template', 1, NULL, '{"officeId":2, "staffId":2, + "active":true, "name":"Jimmy", "activationDate":"07 March 2014", "submittedOnDate":"02 January 2010", + "locale":"en", "dateFormat":"dd MMMM yyyy"}', 1, '2014-03-07 19:32:33', NULL, NULL, 1, NULL, NULL), + (8, 'UPDATE', 'CENTER', 2, 1, NULL, NULL, NULL, '/centers/1', 1, NULL, '{"activationDate":"02 January 2010", + "dateFormat":"dd MMMM yyyy", "locale":"en"}', 1, '2014-03-07 19:32:55', NULL, NULL, 1, NULL, NULL), + (9, 'CREATE', 'CENTER', 2, 2, NULL, NULL, NULL, '/centers/template', 2, NULL, '{"officeId":2, + "name":"Global Trade Finance", "active":true, "activationDate":"07 March 2014", + "submittedOnDate":"03 January 2010", "locale":"en", "dateFormat":"dd MMMM yyyy"}', 1, '2014-03-07 19:41:08', NULL, NULL, 1, NULL, NULL), + (10, 'UPDATE', 'CENTER', 2, 2, NULL, NULL, NULL, '/centers/2', 2, NULL, '{"staffId":2, + "activationDate":"03 January 2010", "dateFormat":"dd MMMM yyyy", "locale":"en"}', 1, '2014-03-07 19:41:40', NULL, NULL, 1, NULL, NULL), + (11, 'CREATE', 'GROUP', 2, 3, NULL, NULL, NULL, '/groups/template', 3, NULL, '{"clientMembers":[], "staffId":"2", + "name":"Nirvana", "active":false, "submittedOnDate":"04 January 2010", "dateFormat":"dd MMMM yyyy", + "locale":"en", "centerId":"2", "officeId":"2"}', 1, '2014-03-07 19:44:24', NULL, NULL, 1, NULL, NULL), + (12, 'ACTIVATE', 'GROUP', 2, 3, NULL, NULL, NULL, '/groups/3?command=activate', 3, NULL, '{"activationDate":"04 January 2010", + "locale":"en", "dateFormat":"dd MMMM yyyy"}', 1, '2014-03-07 19:45:06', NULL, NULL, 1, NULL, NULL), + (13, 'CREATE', 'GROUP', 2, 4, NULL, NULL, NULL, '/groups/template', 4, NULL, '{"clientMembers":[], "staffId":"2", + "name":"Oasis", "active":true, "activationDate":"04 January 2010", "submittedOnDate":"04 January 2010", + "dateFormat":"dd MMMM yyyy", "locale":"en", "centerId":"2", "officeId":"2"}', 1, '2014-03-07 19:51:14', NULL, NULL, 1, NULL, NULL), + (14, 'CREATE', 'CLIENT', 2, 3, 2, NULL, NULL, '/clients/template', 2, NULL, '{"staffId":"2", "firstname":"Johnson", + "lastname":"D", "active":true, "activationDate":"04 January 2010", "dateFormat":"dd MMMM yyyy", "locale":"en", + "groupId":"3", "officeId":"2"}', 1, '2014-03-07 19:56:25', NULL, NULL, 1, NULL, NULL), + (15, 'CREATE', 'CLIENT', 2, 3, 3, NULL, NULL, '/clients/template', 3, NULL, '{"staffId":"2", "firstname":"Williams", + "lastname":"G", "active":false, "activationDate":"04 January 2010", "dateFormat":"dd MMMM yyyy", "locale":"en", + "groupId":"3", "officeId":"2"}', 1, '2014-03-07 19:57:18', NULL, NULL, 1, NULL, NULL), (16, 'DELETE', 'CLIENT', 2, NULL, 3, NULL, NULL, '/clients/3', 3, NULL, '{}', 1, '2014-03-07 19:59:46', NULL, NULL, 1, NULL, NULL), - (17, 'CREATE', 'CLIENT', 2, 3, 4, NULL, NULL, '/clients/template', 4, NULL, '{"staffId":"2","firstname":"Williams","lastname":"G","active":true,"activationDate":"04 January 2010","dateFormat":"dd MMMM yyyy","locale":"en","groupId":"3","officeId":"2"}', 1, '2014-03-07 20:00:26', NULL, NULL, 1, NULL, NULL), - (18, 'CREATE', 'CLIENT', 2, 3, 5, NULL, NULL, '/clients/template', 5, NULL, '{"staffId":"2","firstname":"Harris","lastname":"P","active":true,"activationDate":"04 January 2010","dateFormat":"dd MMMM yyyy","locale":"en","groupId":"3","officeId":"2"}', 1, '2014-03-07 20:01:07', NULL, NULL, 1, NULL, NULL), - (19, 'CREATE', 'CLIENT', 2, 4, 6, NULL, NULL, '/clients/template', 6, NULL, '{"staffId":"2","firstname":"Allen","lastname":"E","active":true,"activationDate":"04 January 2010","dateFormat":"dd MMMM yyyy","locale":"en","groupId":"4","officeId":"2"}', 1, '2014-03-07 20:02:37', NULL, NULL, 1, NULL, NULL), - (20, 'CREATE', 'CLIENT', 2, 4, 7, NULL, NULL, '/clients/template', 7, NULL, '{"staffId":"2","firstname":"Allen","lastname":"E","active":true,"activationDate":"04 January 2010","dateFormat":"dd MMMM yyyy","locale":"en","groupId":"4","officeId":"2"}', 1, '2014-03-07 20:02:37', NULL, NULL, 1, NULL, NULL), - (21, 'UPDATE', 'CLIENT', 2, NULL, 7, NULL, NULL, '/clients/7', 7, NULL, '{"firstname":"Scott","lastname":"C"}', 1, '2014-03-07 20:04:17', NULL, NULL, 1, NULL, NULL), - (22, 'CREATE', 'CLIENT', 2, 4, 8, NULL, NULL, '/clients/template', 8, NULL, '{"staffId":"2","firstname":"Robinson","lastname":"R","active":true,"activationDate":"04 January 2010","dateFormat":"dd MMMM yyyy","locale":"en","groupId":"4","officeId":"2"}', 1, '2014-03-07 20:05:31', NULL, NULL, 1, NULL, NULL), - (23, 'CREATE', 'OFFICE', 3, NULL, NULL, NULL, NULL, '/offices/template', 3, NULL, '{"parentId":1,"name":"Pasay","locale":"en","dateFormat":"dd MMMM yyyy","openingDate":"08 February 2010"}', 1, '2014-03-07 20:06:22', NULL, NULL, 1, NULL, NULL), - (24, 'CREATE', 'USER', 1, NULL, NULL, NULL, NULL, '/users/template', 5, NULL, '{"sendPasswordToEmail":true,"officeId":1,"username":"janej","firstname":"Jane","lastname":"J","email":"janej@123.com","roles":["1"]}', 1, '2014-03-07 20:07:48', NULL, NULL, 1, NULL, NULL), - (25, 'CREATE', 'STAFF', 3, NULL, NULL, NULL, NULL, '/staff/template', 3, NULL, '{"isLoanOfficer":true,"officeId":3,"firstname":"John","lastname":"K"}', 1, '2014-03-07 20:08:28', NULL, NULL, 1, NULL, NULL), + (17, 'CREATE', 'CLIENT', 2, 3, 4, NULL, NULL, '/clients/template', 4, NULL, '{"staffId":"2", "firstname":"Williams", + "lastname":"G", "active":true, "activationDate":"04 January 2010", "dateFormat":"dd MMMM yyyy", "locale":"en", + "groupId":"3", "officeId":"2"}', 1, '2014-03-07 20:00:26', NULL, NULL, 1, NULL, NULL), + (18, 'CREATE', 'CLIENT', 2, 3, 5, NULL, NULL, '/clients/template', 5, NULL, '{"staffId":"2", "firstname":"Harris", + "lastname":"P", "active":true, "activationDate":"04 January 2010", "dateFormat":"dd MMMM yyyy", "locale":"en", + "groupId":"3", "officeId":"2"}', 1, '2014-03-07 20:01:07', NULL, NULL, 1, NULL, NULL), + (19, 'CREATE', 'CLIENT', 2, 4, 6, NULL, NULL, '/clients/template', 6, NULL, '{"staffId":"2", "firstname":"Allen", + "lastname":"E", "active":true, "activationDate":"04 January 2010", "dateFormat":"dd MMMM yyyy", "locale":"en", + "groupId":"4", "officeId":"2"}', 1, '2014-03-07 20:02:37', NULL, NULL, 1, NULL, NULL), + (20, 'CREATE', 'CLIENT', 2, 4, 7, NULL, NULL, '/clients/template', 7, NULL, '{"staffId":"2", "firstname":"Allen", + "lastname":"E", "active":true, "activationDate":"04 January 2010", "dateFormat":"dd MMMM yyyy", "locale":"en", + "groupId":"4", "officeId":"2"}', 1, '2014-03-07 20:02:37', NULL, NULL, 1, NULL, NULL), + (21, 'UPDATE', 'CLIENT', 2, NULL, 7, NULL, NULL, '/clients/7', 7, NULL, '{"firstname":"Scott", "lastname":"C"}', 1, '2014-03-07 20:04:17', NULL, NULL, 1, NULL, NULL), + (22, 'CREATE', 'CLIENT', 2, 4, 8, NULL, NULL, '/clients/template', 8, NULL, '{"staffId":"2", "firstname":"Robinson", + "lastname":"R", "active":true, "activationDate":"04 January 2010", "dateFormat":"dd MMMM yyyy", "locale":"en", + "groupId":"4", "officeId":"2"}', 1, '2014-03-07 20:05:31', NULL, NULL, 1, NULL, NULL), + (23, 'CREATE', 'OFFICE', 3, NULL, NULL, NULL, NULL, '/offices/template', 3, NULL, '{"parentId":1, "name":"Pasay", + "locale":"en", "dateFormat":"dd MMMM yyyy", "openingDate":"08 February 2010"}', 1, '2014-03-07 20:06:22', NULL, NULL, 1, NULL, NULL), + (24, 'CREATE', 'USER', 1, NULL, NULL, NULL, NULL, '/users/template', 5, NULL, '{"sendPasswordToEmail":true, + "officeId":1, "username":"janej", "firstname":"Jane", "lastname":"J", "email":"janej@123.com", "roles":["1"]}', 1, '2014-03-07 20:07:48', NULL, NULL, 1, NULL, NULL), + (25, 'CREATE', 'STAFF', 3, NULL, NULL, NULL, NULL, '/staff/template', 3, NULL, '{"isLoanOfficer":true, "officeId":3, + "firstname":"John", "lastname":"K"}', 1, '2014-03-07 20:08:28', NULL, NULL, 1, NULL, NULL), (26, 'CREATE', 'FUND', NULL, NULL, NULL, NULL, NULL, '/funds/template', 1, NULL, '{"name":"Loan from Central Bank"}', 1, '2014-03-10 10:11:50', NULL, NULL, 1, NULL, NULL), - (27, 'CREATE', 'LOANPRODUCT', NULL, NULL, NULL, NULL, NULL, '/loanproducts/template', 1, NULL, '{"currencyCode":"USD","includeInBorrowerCycle":"false","useBorrowerCycle":"false","digitsAfterDecimal":"2","inMultiplesOf":"0","repaymentFrequencyType":1,"interestRateFrequencyType":3,"amortizationType":1,"interestType":1,"interestCalculationPeriodType":1,"transactionProcessingStrategyCode":"mifos-standard-strategy","principalVariationsForBorrowerCycle":[],"interestRateVariationsForBorrowerCycle":[],"numberOfRepaymentVariationsForBorrowerCycle":[],"multiDisburseLoan":false,"fundSourceAccountId":31,"loanPortfolioAccountId":32,"transfersInSuspenseAccountId":33,"interestOnLoanAccountId":36,"incomeFromFeeAccountId":37,"incomeFromPenaltyAccountId":38,"writeOffAccountId":41,"overpaymentLiabilityAccountId":30,"accountingRule":"2","name":"Income Generating Loan","shortName":"IGL","fundId":1,"minPrincipal":"10000","principal":"10000","maxPrincipal":"10000","minNumberOfRepayments":"25","numberOfRepayments":"25","maxNumberOfRepayments":"25","repaymentEvery":"1","minInterestRatePerPeriod":"26","interestRatePerPeriod":"26","maxInterestRatePerPeriod":"26","paymentChannelToFundSourceMappings":[],"feeToIncomeAccountMappings":[],"penaltyToIncomeAccountMappings":[],"charges":[],"dateFormat":"dd MMMM yyyy","locale":"en","startDate":"01 January 2010"}', 1, '2014-03-10 10:16:39', NULL, NULL, 1, NULL, NULL), - (28, 'CREATE', 'SAVINGSPRODUCT', NULL, NULL, NULL, NULL, NULL, '/savingsproducts/template', 1, NULL, '{"currencyCode":"USD","digitsAfterDecimal":2,"interestCompoundingPeriodType":1,"interestPostingPeriodType":4,"interestCalculationType":1,"interestCalculationDaysInYearType":365,"savingsReferenceAccountId":31,"overdraftPortfolioControlId":32,"savingsControlAccountId":30,"incomeFromFeeAccountId":36,"incomeFromPenaltyAccountId":37,"incomeFromInterestId":38,"interestOnSavingsAccountId":41,"writeOffAccountId":42,"accountingRule":"2","name":"Voluntary savings","shortName":"VS","description":"Save money","inMultiplesOf":"0","nominalAnnualInterestRate":"9.5","minRequiredOpeningBalance":"1000","lockinPeriodFrequency":"1","lockinPeriodFrequencyType":1,"withdrawalFeeForTransfers":"false","paymentChannelToFundSourceMappings":[],"feeToIncomeAccountMappings":[],"penaltyToIncomeAccountMappings":[],"charges":[],"locale":"en","transfersInSuspenseAccountId":30}', 1, '2014-03-10 10:21:16', NULL, NULL, 1, NULL, NULL), - (29, 'UPDATE', 'SAVINGSPRODUCT', NULL, NULL, NULL, NULL, NULL, '/savingsproducts/1', 1, NULL, '{"shortName":"VS","penaltyToIncomeAccountMappings":"[]","paymentChannelToFundSourceMappings":"[]","feeToIncomeAccountMappings":"[]"}', 1, '2014-03-10 10:21:51', NULL, NULL, 1, NULL, NULL), - (30, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/3/codevalues/template', 10, NULL, '{"name":"Cattle Rearing","position":"104"}', 1, '2014-03-10 10:27:02', NULL, NULL, 1, NULL, NULL), - (31, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/3/codevalues/template', 11, NULL, '{"name":"Others","position":"105"}', 1, '2014-03-10 10:27:17', NULL, NULL, 1, NULL, NULL), - (32, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/3/codevalues/template', 12, NULL, '{"name":"Tailoring Shop","position":"101"}', 1, '2014-03-10 10:27:34', NULL, NULL, 1, NULL, NULL), - (33, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/3/codevalues/template', 13, NULL, '{"name":"Small Provisions Store","position":"102"}', 1, '2014-03-10 10:27:49', NULL, NULL, 1, NULL, NULL), - (34, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/3/codevalues/template', 14, NULL, '{"name":"Agriculture","position":"105"}', 1, '2014-03-10 10:28:02', NULL, NULL, 1, NULL, NULL), + (27, 'CREATE', 'LOANPRODUCT', NULL, NULL, NULL, NULL, NULL, '/loanproducts/template', 1, NULL, '{"currencyCode":"USD", + "includeInBorrowerCycle":"false", "useBorrowerCycle":"false", "digitsAfterDecimal":"2", "inMultiplesOf":"0", + "repaymentFrequencyType":1, "interestRateFrequencyType":3, "amortizationType":1, "interestType":1, + "interestCalculationPeriodType":1, "transactionProcessingStrategyCode":"mifos-standard-strategy", + "principalVariationsForBorrowerCycle":[], "interestRateVariationsForBorrowerCycle":[], + "numberOfRepaymentVariationsForBorrowerCycle":[], "multiDisburseLoan":false, "fundSourceAccountId":31, + "loanPortfolioAccountId":32, "transfersInSuspenseAccountId":33, "interestOnLoanAccountId":36, + "incomeFromFeeAccountId":37, "incomeFromPenaltyAccountId":38, "writeOffAccountId":41, + "overpaymentLiabilityAccountId":30, "accountingRule":"2", "name":"Income Generating Loan", "shortName":"IGL", + "fundId":1, "minPrincipal":"10000", "principal":"10000", "maxPrincipal":"10000", "minNumberOfRepayments":"25", + "numberOfRepayments":"25", "maxNumberOfRepayments":"25", "repaymentEvery":"1", "minInterestRatePerPeriod":"26", + "interestRatePerPeriod":"26", "maxInterestRatePerPeriod":"26", "paymentChannelToFundSourceMappings":[], + "feeToIncomeAccountMappings":[], "penaltyToIncomeAccountMappings":[], "charges":[], "dateFormat":"dd MMMM yyyy", + "locale":"en", "startDate":"01 January 2010"}', 1, '2014-03-10 10:16:39', NULL, NULL, 1, NULL, NULL), + (28, 'CREATE', 'SAVINGSPRODUCT', NULL, NULL, NULL, NULL, NULL, '/savingsproducts/template', 1, NULL, '{"currencyCode":"USD", + "digitsAfterDecimal":2, "interestCompoundingPeriodType":1, "interestPostingPeriodType":4, + "interestCalculationType":1, "interestCalculationDaysInYearType":365, "savingsReferenceAccountId":31, + "overdraftPortfolioControlId":32, "savingsControlAccountId":30, "incomeFromFeeAccountId":36, + "incomeFromPenaltyAccountId":37, "incomeFromInterestId":38, "interestOnSavingsAccountId":41, + "writeOffAccountId":42, "accountingRule":"2", "name":"Voluntary savings", "shortName":"VS", + "description":"Save money", "inMultiplesOf":"0", "nominalAnnualInterestRate":"9.5", + "minRequiredOpeningBalance":"1000", "lockinPeriodFrequency":"1", "lockinPeriodFrequencyType":1, + "withdrawalFeeForTransfers":"false", "paymentChannelToFundSourceMappings":[], "feeToIncomeAccountMappings":[], + "penaltyToIncomeAccountMappings":[], "charges":[], "locale":"en", "transfersInSuspenseAccountId":30}', 1, '2014-03-10 10:21:16', NULL, NULL, 1, NULL, NULL), + (29, 'UPDATE', 'SAVINGSPRODUCT', NULL, NULL, NULL, NULL, NULL, '/savingsproducts/1', 1, NULL, '{"shortName":"VS", + "penaltyToIncomeAccountMappings":"[]", "paymentChannelToFundSourceMappings":"[]", "feeToIncomeAccountMappings":"[]"}', 1, '2014-03-10 10:21:51', NULL, NULL, 1, NULL, NULL), + (30, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/3/codevalues/template', 10, NULL, '{"name":"Cattle Rearing", + "position":"104"}', 1, '2014-03-10 10:27:02', NULL, NULL, 1, NULL, NULL), + (31, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/3/codevalues/template', 11, NULL, '{"name":"Others", + "position":"105"}', 1, '2014-03-10 10:27:17', NULL, NULL, 1, NULL, NULL), + (32, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/3/codevalues/template', 12, NULL, '{"name":"Tailoring Shop", + "position":"101"}', 1, '2014-03-10 10:27:34', NULL, NULL, 1, NULL, NULL), + (33, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/3/codevalues/template', 13, NULL, '{"name":"Small Provisions Store", + "position":"102"}', 1, '2014-03-10 10:27:49', NULL, NULL, 1, NULL, NULL), + (34, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/3/codevalues/template', 14, NULL, '{"name":"Agriculture", + "position":"105"}', 1, '2014-03-10 10:28:02', NULL, NULL, 1, NULL, NULL), (35, 'UPDATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/3/codevalues/14', 14, NULL, '{"position":103}', 1, '2014-03-10 10:28:13', NULL, NULL, 1, NULL, NULL), - (36, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/14/codevalues/template', 15, NULL, '{"name":"Blacklisted","position":"201"}', 1, '2014-03-10 10:31:50', NULL, NULL, 1, NULL, NULL), - (37, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/14/codevalues/template', 16, NULL, '{"name":"Deceased","position":"202"}', 1, '2014-03-10 10:34:54', NULL, NULL, 1, NULL, NULL), - (38, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/14/codevalues/template', 17, NULL, '{"name":"Transferred","position":"203"}', 1, '2014-03-10 10:35:10', NULL, NULL, 1, NULL, NULL), - (39, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/14/codevalues/template', 18, NULL, '{"name":"Left","position":"204"}', 1, '2014-03-10 10:35:23', NULL, NULL, 1, NULL, NULL), - (40, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/14/codevalues/template', 19, NULL, '{"position":"205","name":"others"}', 1, '2014-03-10 10:35:33', NULL, NULL, 1, NULL, NULL), + (36, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/14/codevalues/template', 15, NULL, '{"name":"Blacklisted", + "position":"201"}', 1, '2014-03-10 10:31:50', NULL, NULL, 1, NULL, NULL), + (37, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/14/codevalues/template', 16, NULL, '{"name":"Deceased", + "position":"202"}', 1, '2014-03-10 10:34:54', NULL, NULL, 1, NULL, NULL), + (38, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/14/codevalues/template', 17, NULL, '{"name":"Transferred", + "position":"203"}', 1, '2014-03-10 10:35:10', NULL, NULL, 1, NULL, NULL), + (39, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/14/codevalues/template', 18, NULL, '{"name":"Left", + "position":"204"}', 1, '2014-03-10 10:35:23', NULL, NULL, 1, NULL, NULL), + (40, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/14/codevalues/template', 19, NULL, '{"position":"205", + "name":"others"}', 1, '2014-03-10 10:35:33', NULL, NULL, 1, NULL, NULL), (41, 'UPDATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/1/codevalues/2', 2, NULL, '{"name":"Government Id"}', 1, '2014-03-10 10:37:37', NULL, NULL, 1, NULL, NULL), (42, 'UPDATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/1/codevalues/1', 1, NULL, '{"name":"Passport Id"}', 1, '2014-03-10 10:38:09', NULL, NULL, 1, NULL, NULL), - (43, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/1/codevalues/template', 20, NULL, '{"name":"Voter ID","position":"7"}', 1, '2014-03-10 10:38:50', NULL, NULL, 1, NULL, NULL), - (44, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/1/codevalues/template', 21, NULL, '{"name":"Ration Card","position":"6"}', 1, '2014-03-10 10:39:08', NULL, NULL, 1, NULL, NULL), + (43, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/1/codevalues/template', 20, NULL, '{"name":"Voter ID", + "position":"7"}', 1, '2014-03-10 10:38:50', NULL, NULL, 1, NULL, NULL), + (44, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/1/codevalues/template', 21, NULL, '{"name":"Ration Card", + "position":"6"}', 1, '2014-03-10 10:39:08', NULL, NULL, 1, NULL, NULL), (45, 'UPDATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/1/codevalues/21', 21, NULL, '{"position":5}', 1, '2014-03-10 10:39:20', NULL, NULL, 1, NULL, NULL), (46, 'UPDATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/1/codevalues/20', 20, NULL, '{"position":6}', 1, '2014-03-10 10:39:24', NULL, NULL, 1, NULL, NULL), (47, 'UPDATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/14/codevalues/19', 19, NULL, '{"position":5}', 1, '2014-03-10 10:39:53', NULL, NULL, 1, NULL, NULL), @@ -4125,25 +6134,47 @@ INSERT INTO `m_portfolio_command_source` (`id`, `action_name`, `entity_name`, `o (49, 'UPDATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/14/codevalues/17', 17, NULL, '{"position":3}', 1, '2014-03-10 10:39:53', NULL, NULL, 1, NULL, NULL), (50, 'UPDATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/14/codevalues/16', 16, NULL, '{"position":2}', 1, '2014-03-10 10:39:54', NULL, NULL, 1, NULL, NULL), (51, 'UPDATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/14/codevalues/15', 15, NULL, '{"position":1}', 1, '2014-03-10 10:39:54', NULL, NULL, 1, NULL, NULL), - (52, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/4/codevalues/template', 22, NULL, '{"name":"Male","position":"1"}', 1, '2014-03-10 10:46:36', NULL, NULL, 1, NULL, NULL), + (52, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/4/codevalues/template', 22, NULL, '{"name":"Male", + "position":"1"}', 1, '2014-03-10 10:46:36', NULL, NULL, 1, NULL, NULL), (53, 'UPDATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/4/codevalues/22', 22, NULL, '{"position":2}', 1, '2014-03-10 10:46:49', NULL, NULL, 1, NULL, NULL), (54, 'UPDATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/4/codevalues/22', 22, NULL, '{"position":1}', 1, '2014-03-10 10:47:02', NULL, NULL, 1, NULL, NULL), - (55, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/4/codevalues/template', 24, NULL, '{"name":"Female","position":"2"}', 1, '2014-03-10 10:47:20', NULL, NULL, 1, NULL, NULL), - (56, 'CREATE', 'CHARGE', NULL, NULL, NULL, NULL, NULL, '/charges/template', 1, NULL, '{"chargeAppliesTo":1,"name":"Processing Fee","currencyCode":"USD","chargeTimeType":1,"chargeCalculationType":1,"chargePaymentMode":0,"amount":"500","active":true,"locale":"en","monthDayFormat":"dd MMM"}', 1, '2014-03-10 10:50:24', NULL, NULL, 1, NULL, NULL), - (57, 'UPDATE', 'LOANPRODUCT', NULL, NULL, NULL, NULL, NULL, '/loanproducts/1', 1, NULL, '{"inMultiplesOf":0,"charges":"[{\\"id\\":1}]","penaltyToIncomeAccountMappings":"[]","paymentChannelToFundSourceMappings":"[]","feeToIncomeAccountMappings":"[]"}', 1, '2014-03-10 10:59:18', NULL, NULL, 1, NULL, NULL), + (55, 'CREATE', 'CODEVALUE', NULL, NULL, NULL, NULL, NULL, '/codes/4/codevalues/template', 24, NULL, '{"name":"Female", + "position":"2"}', 1, '2014-03-10 10:47:20', NULL, NULL, 1, NULL, NULL), + (56, 'CREATE', 'CHARGE', NULL, NULL, NULL, NULL, NULL, '/charges/template', 1, NULL, '{"chargeAppliesTo":1, + "name":"Processing Fee", "currencyCode":"USD", "chargeTimeType":1, "chargeCalculationType":1, + "chargePaymentMode":0, "amount":"500", "active":true, "locale":"en", "monthDayFormat":"dd MMM"}', 1, '2014-03-10 10:50:24', NULL, NULL, 1, NULL, NULL), + (57, 'UPDATE', 'LOANPRODUCT', NULL, NULL, NULL, NULL, NULL, '/loanproducts/1', 1, NULL, '{"inMultiplesOf":0, + "charges":"[{\\"id\\":1}]", "penaltyToIncomeAccountMappings":"[]", "paymentChannelToFundSourceMappings":"[]", + "feeToIncomeAccountMappings":"[]"}', 1, '2014-03-10 10:59:18', NULL, NULL, 1, NULL, NULL), (58, 'UPDATE', 'USER', 3, NULL, NULL, NULL, NULL, '/users/5', 5, NULL, '{"officeId":3}', 1, '2014-03-14 16:22:56', NULL, NULL, 1, NULL, NULL), (59, 'UPDATE', 'CENTER', 2, 2, NULL, NULL, NULL, '/centers/2', 2, NULL, '{"name":"Santa Maria"}', 1, '2014-03-14 16:50:20', NULL, NULL, 1, NULL, NULL), (60, 'UPDATE', 'CENTER', 2, 1, NULL, NULL, NULL, '/centers/1', 1, NULL, '{"name":"Santa Cruz"}', 1, '2014-03-14 16:51:55', NULL, NULL, 1, NULL, NULL), (61, 'UPDATE', 'GROUP', 2, 3, NULL, NULL, NULL, '/groups/3', 3, NULL, '{"name":"Santa Maria Group 1"}', 1, '2014-03-14 16:57:00', NULL, NULL, 1, NULL, NULL), (62, 'UPDATE', 'GROUP', 2, 4, NULL, NULL, NULL, '/groups/4', 4, NULL, '{"name":"Santa Maria Group 2"}', 1, '2014-03-14 16:57:27', NULL, NULL, 1, NULL, NULL), - (63, 'UPDATE', 'LOANPRODUCT', NULL, NULL, NULL, NULL, NULL, '/loanproducts/1', 1, NULL, '{"inMultiplesOf":0,"penaltyToIncomeAccountMappings":"[]","incomeFromFeeAccountId":36,"fundSourceAccountId":32,"paymentChannelToFundSourceMappings":"[]","interestOnLoanAccountId":38,"transfersInSuspenseAccountId":31,"loanPortfolioAccountId":34,"incomeFromPenaltyAccountId":37,"feeToIncomeAccountMappings":"[]"}', 1, '2014-05-01 16:25:00', NULL, NULL, 1, NULL, NULL), + (63, 'UPDATE', 'LOANPRODUCT', NULL, NULL, NULL, NULL, NULL, '/loanproducts/1', 1, NULL, '{"inMultiplesOf":0, + "penaltyToIncomeAccountMappings":"[]", "incomeFromFeeAccountId":36, "fundSourceAccountId":32, + "paymentChannelToFundSourceMappings":"[]", "interestOnLoanAccountId":38, "transfersInSuspenseAccountId":31, + "loanPortfolioAccountId":34, "incomeFromPenaltyAccountId":37, "feeToIncomeAccountMappings":"[]"}', 1, '2014-05-01 16:25:00', NULL, NULL, 1, NULL, NULL), (64, 'UPDATE', 'GLACCOUNT', NULL, NULL, NULL, NULL, NULL, '/glaccounts/17', 17, NULL, '{"usage":1}', 1, '2014-05-01 16:25:26', NULL, NULL, 1, NULL, NULL), (65, 'UPDATE', 'GLACCOUNT', NULL, NULL, NULL, NULL, NULL, '/glaccounts/2', 2, NULL, '{"usage":1}', 1, '2014-05-01 16:25:56', NULL, NULL, 1, NULL, NULL), - (66, 'UPDATE', 'LOANPRODUCT', NULL, NULL, NULL, NULL, NULL, '/loanproducts/1', 1, NULL, '{"inMultiplesOf":0,"penaltyToIncomeAccountMappings":"[]","paymentChannelToFundSourceMappings":"[]","feeToIncomeAccountMappings":"[]"}', 1, '2014-05-01 16:26:06', NULL, NULL, 1, NULL, NULL), - (67, 'UPDATE', 'LOANPRODUCT', NULL, NULL, NULL, NULL, NULL, '/loanproducts/1', 1, NULL, '{"inMultiplesOf":0,"overpaymentLiabilityAccountId":2,"penaltyToIncomeAccountMappings":"[]","paymentChannelToFundSourceMappings":"[]","transfersInSuspenseAccountId":17,"feeToIncomeAccountMappings":"[]"}', 1, '2014-05-01 16:26:37', NULL, NULL, 1, NULL, NULL), - (68, 'CREATE', 'LOAN', 2, NULL, 8, 1, NULL, '/loans', 1, NULL, '{"clientId":"8","productId":1,"disbursementData":[],"fundId":1,"principal":10000,"loanTermFrequency":25,"loanTermFrequencyType":1,"numberOfRepayments":25,"repaymentEvery":1,"repaymentFrequencyType":1,"interestRatePerPeriod":26,"amortizationType":1,"interestType":1,"interestCalculationPeriodType":1,"transactionProcessingStrategyCode":"mifos-standard-strategy","locale":"en","dateFormat":"dd MMMM yyyy","loanType":"individual","expectedDisbursementDate":"16 June 2014","submittedOnDate":"02 June 2014","charges":[{"chargeId":1,"amount":500}]}', 1, '2014-06-11 09:17:45', NULL, NULL, 1, NULL, NULL), - (69, 'APPROVE', 'LOAN', 2, NULL, 8, 1, NULL, '/loans/1', 1, NULL, '{"status":{"id":200,"code":"loanStatusType.approved","value":"Approved","pendingApproval":false,"waitingForDisbursal":true,"active":false,"closedObligationsMet":false,"closedWrittenOff":false,"closedRescheduled":false,"closed":false,"overpaid":false},"locale":"en","dateFormat":"dd MMMM yyyy","approvedOnDate":"11 June 2014"}', 1, '2014-06-11 09:18:16', NULL, NULL, 1, NULL, NULL), - (70, 'CREATE', 'FINANCIALACTIVITYACCOUNT', NULL, NULL, NULL, NULL, NULL, '/organizationglaccounts/template', 2, NULL, '{"financialActivityId":100,"glAccountId":33}', 1, '2014-06-16 16:54:20', NULL, NULL, 1, NULL, NULL), + (66, 'UPDATE', 'LOANPRODUCT', NULL, NULL, NULL, NULL, NULL, '/loanproducts/1', 1, NULL, '{"inMultiplesOf":0, + "penaltyToIncomeAccountMappings":"[]", "paymentChannelToFundSourceMappings":"[]", "feeToIncomeAccountMappings":"[]"}', 1, '2014-05-01 16:26:06', NULL, NULL, 1, NULL, NULL), + (67, 'UPDATE', 'LOANPRODUCT', NULL, NULL, NULL, NULL, NULL, '/loanproducts/1', 1, NULL, '{"inMultiplesOf":0, + "overpaymentLiabilityAccountId":2, "penaltyToIncomeAccountMappings":"[]", + "paymentChannelToFundSourceMappings":"[]", "transfersInSuspenseAccountId":17, "feeToIncomeAccountMappings":"[]"}', 1, '2014-05-01 16:26:37', NULL, NULL, 1, NULL, NULL), + (68, 'CREATE', 'LOAN', 2, NULL, 8, 1, NULL, '/loans', 1, NULL, '{"clientId":"8", "productId":1, + "disbursementData":[], "fundId":1, "principal":10000, "loanTermFrequency":25, "loanTermFrequencyType":1, + "numberOfRepayments":25, "repaymentEvery":1, "repaymentFrequencyType":1, "interestRatePerPeriod":26, + "amortizationType":1, "interestType":1, "interestCalculationPeriodType":1, + "transactionProcessingStrategyCode":"mifos-standard-strategy", "locale":"en", "dateFormat":"dd MMMM yyyy", + "loanType":"individual", "expectedDisbursementDate":"16 June 2014", "submittedOnDate":"02 June 2014", + "charges":[{"chargeId":1, "amount":500}]}', 1, '2014-06-11 09:17:45', NULL, NULL, 1, NULL, NULL), + (69, 'APPROVE', 'LOAN', 2, NULL, 8, 1, NULL, '/loans/1', 1, NULL, '{"status":{"id":200, + "code":"loanStatusType.approved", "value":"Approved", "pendingApproval":false, "waitingForDisbursal":true, + "active":false, "closedObligationsMet":false, "closedWrittenOff":false, "closedRescheduled":false, + "closed":false, "overpaid":false}, "locale":"en", "dateFormat":"dd MMMM yyyy", "approvedOnDate":"11 June 2014"}', 1, '2014-06-11 09:18:16', NULL, NULL, 1, NULL, NULL), + (70, 'CREATE', 'FINANCIALACTIVITYACCOUNT', NULL, NULL, NULL, NULL, NULL, '/organizationglaccounts/template', 2, NULL, '{"financialActivityId":100, + "glAccountId":33}', 1, '2014-06-16 16:54:20', NULL, NULL, 1, NULL, NULL), (71, 'UPDATE', 'FINANCIALACTIVITYACCOUNT', NULL, NULL, NULL, NULL, NULL, '/organizationglaccounts/2', 2, NULL, '{"glAccountId":32}', 1, '2014-06-16 16:57:17', NULL, NULL, 1, NULL, NULL), (72, 'DELETE', 'FINANCIALACTIVITYACCOUNT', NULL, NULL, NULL, NULL, NULL, '/organizationglaccounts/2', 2, NULL, '{}', 1, '2014-06-16 17:11:12', NULL, NULL, 1, NULL, NULL); /*!40000 ALTER TABLE `m_portfolio_command_source` ENABLE KEYS */; @@ -5277,7 +7308,7 @@ CREATE TABLE IF NOT EXISTS `m_staff` ( INSERT INTO `m_staff` (`id`, `is_loan_officer`, `office_id`, `firstname`, `lastname`, `display_name`, `mobile_no`, `external_id`, `organisational_role_enum`, `organisational_role_parent_staff_id`, `is_active`, `joining_date`, `image_id`) VALUES (1, 1, 1, 'Aliya', 'A', 'A, Aliya', NULL, NULL, NULL, NULL, 1, NULL, NULL), (2, 1, 2, 'Mary', 'M', 'M, Mary', NULL, NULL, NULL, NULL, 1, NULL, NULL), - (3, 1, 3, 'John', 'K', 'K, John', NULL, NULL, NULL, NULL, 1, NULL, NULL); + (3, 1, 3, 'John', 'K', 'K, John ', NULL, NULL, NULL, NULL, 1, NULL, NULL); /*!40000 ALTER TABLE `m_staff` ENABLE KEYS */; @@ -5623,7 +7654,9 @@ CREATE TABLE IF NOT EXISTS `m_working_days` ( -- Dumping data for table mifostenant-reference.m_working_days: ~1 rows (approximately) /*!40000 ALTER TABLE `m_working_days` DISABLE KEYS */; INSERT INTO `m_working_days` (`id`, `recurrence`, `repayment_rescheduling_enum`, `extend_term_daily_repayments`, `extend_term_holiday_repayment`) VALUES - (1, 'FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR,SA,SU', 2, 0, 0); + (1, 'FREQ=WEEKLY; +INTERVAL=1;BYDAY +=MO,TU,WE,TH,FR,SA,SU', 2, 0, 0); /*!40000 ALTER TABLE `m_working_days` ENABLE KEYS */; @@ -5664,7 +7697,8 @@ CREATE TABLE IF NOT EXISTS `oauth_client_details` ( -- Dumping data for table mifostenant-reference.oauth_client_details: ~0 rows (approximately) /*!40000 ALTER TABLE `oauth_client_details` DISABLE KEYS */; INSERT INTO `oauth_client_details` (`client_id`, `resource_ids`, `client_secret`, `scope`, `authorized_grant_types`, `web_server_redirect_uri`, `authorities`, `access_token_validity`, `refresh_token_validity`, `additional_information`, `autoapprove`) VALUES - ('community-app', NULL, '123', 'all', 'password,refresh_token', NULL, NULL, NULL, NULL, NULL, NULL); + ('community-app', NULL, ' +123', 'all', 'password,refresh_token', NULL, NULL, NULL, NULL, NULL, NULL); /*!40000 ALTER TABLE `oauth_client_details` ENABLE KEYS */; @@ -5701,7 +7735,8 @@ CREATE TABLE IF NOT EXISTS `ppi_likelihoods_ppi` ( `id` BIGINT NOT NULL AUTO_INCREMENT, `likelihood_id` BIGINT NOT NULL, `ppi_name` varchar(250) NOT NULL, - `enabled` INT NOT NULL DEFAULT '100', + `enabled` INT NOT NULL DEFAULT ' +100', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; @@ -5939,9 +7974,12 @@ INSERT INTO `r_enum_value` (`enum_name`, `enum_id`, `enum_message_property`, `en DROP TABLE IF EXISTS `scheduler_detail`; CREATE TABLE IF NOT EXISTS `scheduler_detail` ( `id` SMALLINT NOT NULL AUTO_INCREMENT, - `is_suspended` tinyint NOT NULL DEFAULT '0', - `execute_misfired_jobs` tinyint NOT NULL DEFAULT '1', - `reset_scheduler_on_bootup` tinyint NOT NULL DEFAULT '1', + `is_suspended` tinyint NOT NULL DEFAULT ' +0', + `execute_misfired_jobs` tinyint NOT NULL DEFAULT ' +1', + `reset_scheduler_on_bootup` tinyint NOT NULL DEFAULT ' +1', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=UTF8MB4; @@ -5975,343 +8013,1354 @@ CREATE TABLE IF NOT EXISTS `schema_version` ( -- Dumping data for table mifostenant-reference.schema_version: ~337 rows (approximately) /*!40000 ALTER TABLE `schema_version` DISABLE KEYS */; INSERT INTO `schema_version` (`version_rank`, `installed_rank`, `version`, `description`, `type`, `script`, `checksum`, `installed_by`, `installed_on`, `execution_time`, `success`) VALUES - (1, 1, '1', 'mifosplatform-core-ddl-latest', 'SQL', 'V1__mifosplatform-core-ddl-latest.sql', -1957145051, 'root', '2014-03-08 02:28:38', 10710, 1), - (10, 10, '10', 'interest-posting-fields-for-savings', 'SQL', 'V10__interest-posting-fields-for-savings.sql', -1133853485, 'root', '2014-03-08 02:28:43', 1339, 1), - (100, 100, '100', 'Group saving summary report', 'SQL', 'V100__Group_saving_summary_report.sql', -1635399448, 'root', '2014-03-08 02:29:23', 26, 1), - (101, 101, '101', 'add mulitplesof to account transfers table', 'SQL', 'V101__add_mulitplesof_to_account_transfers_table.sql', -1162976022, 'root', '2014-03-08 02:29:24', 271, 1), - (102, 102, '102', 'client attendance tables', 'SQL', 'V102__client_attendance_tables.sql', -45448019, 'root', '2014-03-08 02:29:24', 359, 1), - (103, 103, '103', 'cluster support for batch jobs', 'SQL', 'V103__cluster_support_for_batch_jobs.sql', -781879007, 'root', '2014-03-08 02:29:25', 489, 1), - (104, 104, '104', 'permissions for transfers', 'SQL', 'V104__permissions_for_transfers.sql', 653895919, 'root', '2014-03-08 02:29:25', 51, 1), - (105, 105, '105', 'track loan transaction against office', 'SQL', 'V105__track_loan_transaction_against_office.sql', 785650440, 'root', '2014-03-08 02:29:26', 1260, 1), - (106, 106, '106', 'more permissions for transfers', 'SQL', 'V106__more_permissions_for_transfers.sql', -1132691133, 'root', '2014-03-08 02:29:27', 63, 1), - (107, 107, '107', 'datatable code mappings', 'SQL', 'V107__datatable_code_mappings.sql', 630737271, 'root', '2014-03-08 02:29:27', 185, 1), - (108, 108, '108', 'client has transfer office', 'SQL', 'V108__client_has_transfer_office.sql', -1748734810, 'root', '2014-03-08 02:29:27', 356, 1), - (109, 109, '109', 'account transfer withdrawal fee configuration', 'SQL', 'V109__account_transfer_withdrawal_fee_configuration.sql', -754569033, 'root', '2014-03-08 02:29:28', 524, 1), - (11, 11, '11', 'add-payment-details', 'SQL', 'V11__add-payment-details.sql', 391380768, 'root', '2014-03-08 02:28:44', 404, 1), - (110, 110, '110', 'group center close', 'SQL', 'V110__group_center_close.sql', -1261775365, 'root', '2014-03-08 02:29:28', 326, 1), - (111, 111, '111', 'disable constraint approach for datatables by default', 'SQL', 'V111__disable_constraint_approach_for_datatables_by_default.sql', 2058257907, 'root', '2014-03-08 02:29:29', 28, 1), - (112, 112, '111.1', 'set default transfers in suspense account for existing loan products', 'SQL', 'V111_1__set default_transfers_in_suspense_account_for_existing_loan_products.sql', 1907173791, 'root', '2014-03-08 02:29:29', 5, 1), - (113, 113, '112', 'mixreport sql support', 'SQL', 'V112__mixreport_sql_support.sql', 1254859560, 'root', '2014-03-08 02:29:29', 655, 1), - (114, 114, '113', 'track savings transaction against office', 'SQL', 'V113__track_savings_transaction_against_office.sql', -1390529632, 'root', '2014-03-08 02:29:30', 799, 1), - (115, 115, '114', 'set default transfers in suspense account for existing savings products - Copy', 'SQL', 'V114__set_default_transfers_in_suspense_account_for_existing_savings_products - Copy.sql', 1518369372, 'root', '2014-03-08 02:29:30', 3, 1), - (116, 116, '115', 'permissions for cache api', 'SQL', 'V115__permissions_for_cache_api.sql', 156437687, 'root', '2014-03-08 02:29:31', 147, 1), - (117, 117, '116', 'track currency for journal entries', 'SQL', 'V116__track_currency_for_journal_entries.sql', 1109139399, 'root', '2014-03-08 02:29:31', 613, 1), - (118, 118, '117', 'loan charge from savings', 'SQL', 'V117__loan_charge_from_savings.sql', 13633826, 'root', '2014-03-08 02:29:32', 942, 1), - (119, 119, '118', 'savings charge', 'SQL', 'V118__savings_charge.sql', 899101813, 'root', '2014-03-08 02:29:33', 522, 1), - (120, 120, '118.1', 'savings charge patch update', 'SQL', 'V118_1__savings_charge_patch_update.sql', 426133125, 'root', '2014-03-08 02:29:34', 304, 1), - (121, 121, '118.2', 'product mapping delete duplicate fund source to account mappings', 'SQL', 'V118_2__product_mapping_delete_duplicate_fund_source_to_account_mappings.sql', 139468093, 'root', '2014-03-08 02:29:34', 3, 1), - (122, 122, '118.3', 'permissions form propose and accept client transfers', 'SQL', 'V118_3__permissions_form_propose_and_accept_client_transfers.sql', 602708322, 'root', '2014-03-08 02:29:34', 26, 1), - (123, 123, '118.4', 'reset default transfers in suspense account for existing savings products', 'SQL', 'V118_4__reset_default_transfers_in_suspense_account_for_existing_savings_products.sql', 1246865828, 'root', '2014-03-08 02:29:34', 7, 1), - (124, 124, '118.5', 'batch job entry for pay savings charge', 'SQL', 'V118_5__batch_job_entry_for_pay_savings_charge.sql', -1477017272, 'root', '2014-03-08 02:29:34', 34, 1), - (125, 125, '118.6', 'defaults for income from penalties for savings product', 'SQL', 'V118_6__defaults_for_income_from_penalties_for savings_product.sql', 255024118, 'root', '2014-03-08 02:29:34', 3, 1), - (126, 126, '118.7', 'move withdrawal annual fee to charges', 'SQL', 'V118_7__move_withdrawal_annual_fee_to_charges.sql', 480656720, 'root', '2014-03-08 02:29:35', 1079, 1), - (127, 127, '118.8', 'track overpayments seperately in loan transactions', 'SQL', 'V118_8__track_overpayments_seperately_in_loan_transactions.sql', 1684107411, 'root', '2014-03-08 02:29:36', 342, 1), - (128, 128, '119', 'add template table', 'SQL', 'V119__add_template_table.sql', 1524629249, 'root', '2014-03-08 02:29:36', 388, 1), - (12, 12, '12', 'add external id to couple of tables', 'SQL', 'V12__add_external_id_to_couple_of_tables.sql', 371833586, 'root', '2014-03-08 02:28:45', 1332, 1), - (129, 129, '120', 'accounting running balance', 'SQL', 'V120__accounting_running_balance.sql', 746738547, 'root', '2014-03-08 02:29:37', 619, 1), - (130, 130, '121', 'accounting running balance for organization', 'SQL', 'V121__accounting_running_balance_for_organization.sql', 1907762382, 'root', '2014-03-08 02:29:38', 488, 1), - (131, 131, '122', 'recurring fee support for savings', 'SQL', 'V122__recurring_fee_support_for_savings.sql', -1538770236, 'root', '2014-03-08 02:29:38', 527, 1), - (132, 132, '123', 'remove payment mode for savings', 'SQL', 'V123__remove_payment_mode_for_savings.sql', 1909778922, 'root', '2014-03-08 02:29:39', 186, 1), - (133, 133, '124', 'added min max cap for charges', 'SQL', 'V124__added_min_max_cap_for_charges.sql', -1996899270, 'root', '2014-03-08 02:29:39', 472, 1), - (134, 134, '125', 'added column for actual fee amount or percentage', 'SQL', 'V125__added_column_for_actual_fee_amount_or_percentage.sql', -87760502, 'root', '2014-03-08 02:29:40', 230, 1), - (135, 135, '126', 'initial database structure for sms outbound', 'SQL', 'V126__initial_database_structure_for_sms_outbound.sql', -586195149, 'root', '2014-03-08 02:29:40', 252, 1), - (136, 136, '127', 'mobile no fields', 'SQL', 'V127__mobile_no_fields.sql', -659228285, 'root', '2014-03-08 02:29:40', 417, 1), - (137, 137, '128', 'added loan installment charge', 'SQL', 'V128__added_loan_installment_charge.sql', -1983585024, 'root', '2014-03-08 02:29:41', 145, 1), - (138, 138, '129', 'client and group timeline', 'SQL', 'V129__client_and_group_timeline.sql', -1671377251, 'root', '2014-03-08 02:29:42', 840, 1), - (13, 13, '13', 'add group and client pending configuration', 'SQL', 'V13__add_group_and_client_pending_configuration.sql', 145878397, 'root', '2014-03-08 02:28:46', 58, 1), - (139, 139, '130', 'calendar-history-table', 'SQL', 'V130__calendar-history-table.sql', -475045678, 'root', '2014-03-08 02:29:42', 180, 1), - (140, 140, '131', 'holiday-status-column-and-permissions', 'SQL', 'V131__holiday-status-column-and-permissions.sql', -1387001593, 'root', '2014-03-08 02:29:43', 862, 1), - (141, 141, '132', 'borrower cycle changes', 'SQL', 'V132__borrower_cycle_changes.sql', -355052428, 'root', '2014-03-08 02:29:44', 579, 1), - (142, 142, '133', 'adding payment detail with journal entry', 'SQL', 'V133__adding_payment_detail_with_journal_entry.sql', 1975659943, 'root', '2014-03-08 02:29:44', 399, 1), - (143, 143, '134', 'added column value on c configuration', 'SQL', 'V134__added_column_value_on_c_configuration.sql', -30626232, 'root', '2014-03-08 02:29:45', 495, 1), - (144, 144, '134.1', 'submitted date updation for clients', 'SQL', 'V134_1__submitted_date_updation_for_clients.sql', 184599342, 'root', '2014-03-08 02:29:45', 7, 1), - (145, 145, '134.2', 'permissions spelling correction', 'SQL', 'V134_2__permissions_spelling_correction.sql', 996960341, 'root', '2014-03-08 02:29:45', 73, 1), - (146, 146, '135', 'added permission for undo written off', 'SQL', 'V135__added_permission_for_undo_written_off.sql', 1414936537, 'root', '2014-03-08 02:29:45', 50, 1), - (147, 147, '136.1', 'update script strechy parameter', 'SQL', 'V136_1__update_script_strechy_parameter.sql', 633461657, 'root', '2014-03-08 02:29:46', 56, 1), - (148, 148, '137', 'added is active column in m staff', 'SQL', 'V137__added_is_active_column_in_m_staff.sql', 1962782431, 'root', '2014-03-08 02:29:46', 494, 1), - (149, 149, '138', 'add short name for m product loan and m savings product', 'SQL', 'V138__add_short_name_for_m_product_loan_and_m_savings_product.sql', -1526828084, 'root', '2014-03-08 02:29:51', 4619, 1), - (150, 150, '139', 'default value for is active updated to true in m staff', 'SQL', 'V139__default_value_for_is_active_updated_to_true_in_m_staff.sql', 844329308, 'root', '2014-03-08 02:29:52', 569, 1), - (14, 14, '14', 'rename status id to enum', 'SQL', 'V14__rename_status_id_to_enum.sql', 1958382098, 'root', '2014-03-08 02:28:46', 532, 1), - (151, 151, '140', 'added loan charge status', 'SQL', 'V140__added_loan_charge_status.sql', 1209971905, 'root', '2014-03-08 02:29:53', 657, 1), - (152, 152, '140.1', 'added payment detail id in ac gl journal entry', 'SQL', 'V140_1__added_payment_detail_id_in_ac_gl_journal_entry.sql', -214253481, 'root', '2014-03-08 02:29:53', 664, 1), - (153, 153, '141', 'add early repayment strategy', 'SQL', 'V141__add_early_repayment_strategy.sql', 401969634, 'root', '2014-03-08 02:29:54', 56, 1), - (154, 154, '142', 'read savingsaccount charge permission', 'SQL', 'V142__read_savingsaccount_charge_permission.sql', -1798083956, 'root', '2014-03-08 02:29:54', 64, 1), - (155, 155, '143', 'create journalentry checker permission', 'SQL', 'V143__create_journalentry_checker_permission.sql', 227507002, 'root', '2014-03-08 02:29:54', 57, 1), - (156, 156, '144', 'spelling mistake corrections', 'SQL', 'V144__spelling_mistake_corrections.sql', -778391100, 'root', '2014-03-08 02:29:55', 547, 1), - (157, 157, '145', 'add force password reset in c configuration', 'SQL', 'V145__add_force_password_reset_in_c_configuration.sql', -662441756, 'root', '2014-03-08 02:29:57', 2286, 1), - (158, 158, '146', 'tranche loans', 'SQL', 'V146__tranche_loans.sql', 989126672, 'root', '2014-03-08 02:30:02', 4290, 1), - (159, 159, '147', 'tranche loans column name changes', 'SQL', 'V147__tranche_loans_column_name_changes.sql', -533159256, 'root', '2014-03-08 02:30:03', 812, 1), - (160, 160, '148', 'overdraft changes', 'SQL', 'V148__overdraft_changes.sql', -1470217992, 'root', '2014-03-08 02:30:07', 3837, 1), - (161, 161, '149', 'add created date savings transaction', 'SQL', 'V149__add_created_date_savings_transaction.sql', 137884095, 'root', '2014-03-08 02:30:08', 772, 1), - (15, 15, '15', 'center permissions', 'SQL', 'V15__center_permissions.sql', 1124247014, 'root', '2014-03-08 02:28:46', 28, 1), - (162, 162, '150', 'basic savings report', 'SQL', 'V150__basic_savings_report.sql', -1500021911, 'root', '2014-03-08 02:30:09', 1191, 1), - (163, 163, '151', 'add default savings account to client', 'SQL', 'V151__add_default_savings_account_to_client.sql', -2012873976, 'root', '2014-04-03 03:47:49', 105, 1), - (164, 164, '152', 'added grace for over due', 'SQL', 'V152__added_grace_for_over_due.sql', 1917777205, 'root', '2014-04-03 03:47:49', 170, 1), - (165, 165, '153', 'Insert missed permissions', 'SQL', 'V153__Insert_missed_permissions.sql', -1693091937, 'root', '2014-04-03 03:47:49', 13, 1), - (166, 166, '154', 'aging details', 'SQL', 'V154__aging_details.sql', 1117759702, 'root', '2014-04-03 03:47:49', 14, 1), - (167, 167, '155', 'stretchy into pentaho', 'SQL', 'V155__stretchy_into_pentaho.sql', -1836158085, 'root', '2014-04-03 03:47:49', 137, 1), - (168, 168, '156', 'added loan saving txns pentaho', 'SQL', 'V156__added_loan_saving_txns_pentaho.sql', 1942570756, 'root', '2014-04-03 03:47:49', 6, 1), - (169, 169, '157', 'overdue charge improvements', 'SQL', 'V157__overdue_charge_improvements.sql', -1267720651, 'root', '2014-04-03 03:47:50', 106, 1), - (170, 170, '158', 'dashboard and navigation queries', 'SQL', 'V158__dashboard_and_navigation_queries.sql', -265915721, 'root', '2014-04-03 03:47:50', 14, 1), - (171, 171, '159', 'add transaction id column m portfolio command source', 'SQL', 'V159__add_transaction_id_column_m_portfolio_command_source.sql', -1834626647, 'root', '2014-05-01 23:10:29', 2615, 1), - (16, 16, '16', 'drop min max column on loan table', 'SQL', 'V16__drop_min_max_column_on_loan_table.sql', -1497882087, 'root', '2014-03-08 02:28:47', 275, 1), - (172, 172, '160', 'standing instruction changes', 'SQL', 'V160__standing_instruction_changes.sql', -2130923257, 'root', '2014-05-01 23:10:35', 5658, 1), - (173, 191, '160.2', 'Allow nullValue For principal on lonProduct', 'SQL', 'V160_2__Allow_nullValue_For_principal_on_lonProduct.sql', 844844635, 'root', '2014-07-11 06:57:59', 1699, 1), - (174, 173, '161', 'added accrual batch job', 'SQL', 'V161__added_accrual_batch_job.sql', -1558441026, 'root', '2014-05-01 23:10:36', 813, 1), - (175, 174, '162', 'overdue charge batch job', 'SQL', 'V162__overdue_charge_batch_job.sql', -1213828784, 'root', '2014-05-01 23:10:36', 15, 1), - (176, 175, '163', 'added npa for loans', 'SQL', 'V163__added_npa_for_loans.sql', -381581272, 'root', '2014-05-01 23:10:41', 4713, 1), - (177, 176, '164', 'fd and rd deposit tables', 'SQL', 'V164__fd_and_rd_deposit_tables.sql', -489803231, 'root', '2014-05-01 23:10:48', 7168, 1), - (178, 177, '165', 'added permission for disburse to saving account', 'SQL', 'V165__added_permission_for_disburse_to_saving_account.sql', -2109143723, 'root', '2014-05-01 23:10:48', 100, 1), - (179, 178, '166', 'added deposit amount to product term and preclosure', 'SQL', 'V166__added_deposit_amount_to_product_term_and_preclosure.sql', -2068527520, 'root', '2014-05-01 23:10:50', 1411, 1), - (180, 179, '167', 'added columns for writtenOff loans recovered', 'SQL', 'V167__added_columns_for_writtenOff_loans_recovered.sql', -901133645, 'root', '2014-06-11 21:39:12', 3242, 1), - (181, 180, '168', 'added transfer fixed deposit interest to linked account', 'SQL', 'V168__added_transfer_fixed_deposit_interest_to_linked_account.sql', 1513454871, 'root', '2014-06-11 21:39:15', 2239, 1), - (182, 181, '169', 'update dashboard reports to core reports use report to false', 'SQL', 'V169__update_dashboard_reports_to_core_reports_use_report_to_false.sql', 1910199831, 'root', '2014-06-11 21:39:15', 39, 1), - (17, 17, '17', 'update stretchy reporting ddl', 'SQL', 'V17__update_stretchy_reporting_ddl.sql', 2040068410, 'root', '2014-03-08 02:28:48', 1519, 1), - (183, 182, '170', 'update deposit accounts maturity details job', 'SQL', 'V170__update_deposit_accounts_maturity_details_job.sql', 348328732, 'root', '2014-06-11 21:39:15', 31, 1), - (184, 183, '171', 'added mandatory savings and rd changes', 'SQL', 'V171__added_mandatory_savings_and_rd_changes.sql', -219494664, 'root', '2014-06-11 21:39:21', 5645, 1), - (185, 184, '172', 'accounting changes for transfers', 'SQL', 'V172__accounting_changes_for_transfers.sql', 1989818135, 'root', '2014-06-11 21:39:22', 1052, 1), - (186, 185, '173', 'ppi', 'SQL', 'V173__ppi.sql', -2061337506, 'root', '2014-06-11 21:39:25', 3126, 1), - (187, 186, '174', 'remove interest accrual', 'SQL', 'V174__remove_interest_accrual.sql', 1343795196, 'root', '2014-06-11 21:39:25', 3, 1), - (188, 187, '175', 'added incentive interest rates', 'SQL', 'V175__added_incentive_interest_rates.sql', 1609110836, 'root', '2014-06-11 21:39:33', 7507, 1), - (189, 188, '176', 'updates to financial activity accounts', 'SQL', 'V176__updates_to_financial_activity_accounts.sql', 242225588, 'root', '2014-06-17 05:16:55', 2330, 1), - (190, 189, '177', 'cleanup for client incentives', 'SQL', 'V177__cleanup_for_client_incentives.sql', -2131344758, 'root', '2014-06-17 05:16:56', 36, 1), - (191, 190, '178', 'updates to financial activity accounts pt2', 'SQL', 'V178__updates_to_financial_activity_accounts_pt2.sql', -417659005, 'root', '2014-06-17 05:16:56', 40, 1), - (192, 192, '179', 'updates to action names for maker checker permissions', 'SQL', 'V179__updates_to_action_names_for_maker_checker_permissions.sql', -239637884, 'root', '2014-07-11 06:57:59', 163, 1), - (18, 18, '18', 'update stretchy reporting reportSql', 'SQL', 'V18__update_stretchy_reporting_reportSql.sql', -170206095, 'root', '2014-03-08 02:28:48', 29, 1), - (193, 193, '180', 'update report schemas for disbursed vs awaitingdisbursal and groupnamesbystaff', 'SQL', 'V180__update_report_schemas_for_disbursed_vs_awaitingdisbursal_and_groupnamesbystaff.sql', -478172694, 'root', '2014-07-11 06:57:59', 43, 1), - (194, 194, '181', 'standing instruction logging', 'SQL', 'V181__standing_instruction_logging.sql', -259580241, 'root', '2014-07-11 06:58:00', 848, 1), - (195, 195, '182', 'added min required balance to savings product', 'SQL', 'V182__added_min_required_balance_to_savings_product.sql', -2083442779, 'root', '2014-07-11 06:58:03', 2500, 1), - (196, 196, '183', 'added min balance for interest calculation', 'SQL', 'V183__added_min_balance_for_interest_calculation.sql', -1892956044, 'root', '2014-07-11 06:58:05', 2157, 1), - (197, 197, '184', 'update min required balance for savings product', 'SQL', 'V184__update_min_required_balance_for_savings_product.sql', -978631870, 'root', '2014-07-11 06:58:06', 618, 1), - (198, 198, '185', 'add accrual till date for periodic accrual', 'SQL', 'V185__add_accrual_till_date_for_periodic_accrual.sql', 1925372415, 'root', '2014-10-15 04:49:45', 3845, 1), - (199, 199, '186', 'added periodic accrual job', 'SQL', 'V186__added_periodic_accrual_job.sql', 292417488, 'root', '2014-10-15 04:49:45', 71, 1), - (200, 200, '187', 'added permission to periodic accrual', 'SQL', 'V187__added_permission_to_periodic_accrual.sql', 1479836850, 'root', '2014-10-15 04:49:45', 24, 1), - (201, 201, '188', 'add savingscharge inactivate permissions', 'SQL', 'V188__add_savingscharge_inactivate_permissions.sql', 2095096043, 'root', '2014-10-15 04:49:46', 945, 1), - (202, 202, '189', 'm loan interest recalculation tables', 'SQL', 'V189__m_loan_interest_recalculation_tables.sql', -61157169, 'root', '2014-10-15 04:49:53', 6949, 1), - (19, 19, '19', 'report maintenance permissions', 'SQL', 'V19__report_maintenance_permissions.sql', -1528956905, 'root', '2014-03-08 02:28:49', 26, 1), - (203, 203, '190', 'add associategroup disassociategroup permissions', 'SQL', 'V190__add_associategroup_disassociategroup_permissions.sql', 296284732, 'root', '2014-10-15 04:49:53', 30, 1), - (204, 204, '191', 'update gl account increase size of name col', 'SQL', 'V191__update_gl_account_increase_size_of_name_col.sql', -247079901, 'root', '2014-10-15 04:49:55', 1552, 1), - (205, 205, '192', 'interest recalculate job', 'SQL', 'V192__interest_recalculate_job.sql', 589462859, 'root', '2014-10-15 04:49:55', 43, 1), - (206, 206, '193', 'added column joiningDate for staff', 'SQL', 'V193__added_column_joiningDate_for_staff.sql', 586097114, 'root', '2014-10-15 04:49:56', 1100, 1), - (207, 207, '194', 'added recalculatedInterestComponent for interest recalculation', 'SQL', 'V194__added_recalculatedInterestComponent_for_interest_recalculation.sql', 1691292674, 'root', '2014-10-15 04:49:57', 815, 1), - (208, 208, '195', 'moved rest frequency to product level', 'SQL', 'V195__moved_rest_frequency_to_product_level.sql', 1697161943, 'root', '2014-10-15 04:49:59', 1551, 1), - (209, 209, '196', 'added loan running balance to transactions', 'SQL', 'V196__added_loan_running_balance_to_transactions.sql', 320541466, 'root', '2014-10-15 04:50:00', 1091, 1), - (210, 210, '197', 'updated loan running balance of transactions', 'SQL', 'V197__updated_loan_running_balance_of_transactions.sql', 514142390, 'root', '2014-10-15 04:50:00', 360, 1), - (211, 211, '198', 'loan rescheduling tables and permissions', 'SQL', 'V198__loan_rescheduling_tables_and_permissions.sql', 320951317, 'root', '2014-10-15 04:50:05', 4569, 1), - (212, 212, '199', 'removed extra columns from schedule history', 'SQL', 'V199__removed_extra_columns_from_schedule_history.sql', -885550667, 'root', '2014-10-15 04:50:06', 695, 1), - (2, 2, '2', 'mifosx-base-reference-data-utf8', 'SQL', 'V2__mifosx-base-reference-data-utf8.sql', 1316484475, 'root', '2014-03-08 02:28:38', 106, 1), - (20, 20, '20', 'report maint perms really configuration', 'SQL', 'V20__report_maint_perms_really_configuration.sql', -402845015, 'root', '2014-03-08 02:28:49', 31, 1), - (213, 213, '200', 'alter savings account for start interest calculation date', 'SQL', 'V200__alter_savings_account_for_start_interest_calculation_date.sql', 338554725, 'root', '2014-10-15 04:50:07', 1303, 1), - (214, 214, '201', 'webhooks', 'SQL', 'V201__webhooks.sql', 1446707293, 'root', '2014-10-15 04:50:10', 3093, 1), - (215, 215, '202', 'savings officer history table', 'SQL', 'V202__savings_officer_history_table.sql', 445151847, 'root', '2014-10-15 04:50:11', 672, 1), - (216, 216, '203', 'added subbmittedDate loantransaction', 'SQL', 'V203__added_subbmittedDate_loantransaction.sql', 481117136, 'root', '2014-10-15 04:50:13', 1698, 1), - (217, 217, '204', 'insert script for charges paid by for accruals', 'SQL', 'V204__insert_script_for_charges_paid_by_for_accruals.sql', 1126139057, 'root', '2014-10-15 04:50:13', 4, 1), - (218, 218, '205', 'fix for charge and interest waiver with accruals', 'SQL', 'V205__fix_for_charge_and_interest_waiver_with_accruals.sql', 620191357, 'root', '2014-11-02 18:54:39', 2022, 1), - (219, 219, '206', 'interest posting configuration', 'SQL', 'V206__interest_posting_configuration.sql', -1024393207, 'root', '2014-11-02 18:54:40', 948, 1), - (220, 220, '207', 'min max clients per group', 'SQL', 'V207__min_max_clients_per_group.sql', -2069742774, 'root', '2014-12-23 22:35:48', 923, 1), - (221, 221, '208', 'min max clients in group redux', 'SQL', 'V208__min_max_clients_in_group_redux.sql', 1253715309, 'root', '2014-12-23 22:35:49', 764, 1), - (222, 222, '209', 'add all report names in m permission table', 'SQL', 'V209__add_all_report_names_in_m_permission_table.sql', -801564857, 'root', '2014-12-23 22:35:49', 177, 1), - (21, 21, '21', 'activation-permissions-for-clients', 'SQL', 'V21__activation-permissions-for-clients.sql', -569932376, 'root', '2014-03-08 02:28:49', 328, 1), - (223, 223, '210', 'track manually adjusted transactions', 'SQL', 'V210__track_manually_adjusted_transactions.sql', 228516334, 'root', '2014-12-23 22:35:51', 1242, 1), - (224, 224, '211', 'minimum days between disbursal and first repayment', 'SQL', 'V211__minimum_days_between_disbursal_and_first_repayment.sql', 888628428, 'root', '2014-12-23 22:35:53', 1831, 1), - (225, 225, '212', 'add NthDay and DayOfWeek columns loan', 'SQL', 'V212__add_NthDay_and_DayOfWeek_columns_loan.sql', 1949824258, 'root', '2014-12-23 22:35:56', 3064, 1), - (226, 226, '213', 'NthDay and DayOfWeek columns should be nullable', 'SQL', 'V213__NthDay_and_DayOfWeek_columns_should_be_nullable.sql', 1399365002, 'root', '2014-12-23 22:36:00', 4338, 1), - (227, 227, '214', 'alter table add create SI at disbursement', 'SQL', 'V214__alter_table_add_create_SI_at_disbursement.sql', -154407476, 'root', '2014-12-23 22:36:03', 3021, 1), - (228, 228, '215', 'guarantee on hold fund changes', 'SQL', 'V215__guarantee_on_hold_fund_changes.sql', 303524926, 'root', '2014-12-23 22:36:08', 5060, 1), - (229, 229, '216', 'adding loan proposed amount to loan', 'SQL', 'V216__adding_loan_proposed_amount_to_loan.sql', 348182179, 'root', '2014-12-23 22:36:13', 4172, 1), - (230, 230, '217', 'client substatus and codevalue description', 'SQL', 'V217__client_substatus_and_codevalue_description.sql', 1679310398, 'root', '2014-12-23 22:36:20', 7286, 1), - (231, 231, '218', 'add user and datetime for loan savings transactions', 'SQL', 'V218__add_user_and_datetime_for_loan_savings_transactions.sql', -1058697092, 'root', '2014-12-23 22:36:23', 2416, 1), - (232, 232, '219', 'guarantor on hold fund changes for account', 'SQL', 'V219__guarantor_on_hold_fund_changes_for_account.sql', 1081934247, 'root', '2014-12-23 22:36:34', 10673, 1), - (22, 22, '22', 'alter-group-for-consistency-add-permissions', 'SQL', 'V22__alter-group-for-consistency-add-permissions.sql', 578271556, 'root', '2014-03-08 02:28:50', 841, 1), - (233, 233, '220', 'account number preferences', 'SQL', 'V220__account_number_preferences.sql', -502873750, 'root', '2014-12-23 22:36:35', 1295, 1), - (234, 234, '221', 'add version for m savings account', 'SQL', 'V221__add_version_for_m_savings_account.sql', 863858591, 'root', '2014-12-23 22:36:38', 2521, 1), - (235, 235, '222', 'guarantor on hold fund changes for transactions', 'SQL', 'V222__guarantor_on_hold_fund_changes_for_transactions.sql', -1709074177, 'root', '2014-12-23 22:36:43', 5200, 1), - (236, 236, '223', 'add version for m loan account', 'SQL', 'V223__add_version_for_m_loan_account.sql', -973851712, 'root', '2014-12-23 22:36:49', 5675, 1), - (237, 237, '224', 'client lifecycle adding statuses', 'SQL', 'V224__client_lifecycle_adding_statuses.sql', -289697454, 'root', '2014-12-23 22:37:01', 11533, 1), - (238, 238, '225', 'permissions for updating recurring deposit amount', 'SQL', 'V225__permissions_for_updating_recurring_deposit_amount.sql', -1367144205, 'root', '2014-12-23 22:37:01', 41, 1), - (239, 239, '226', 'configuration for enforcing calendars for jlg loans', 'SQL', 'V226__configuration_for_enforcing_calendars_for_jlg_loans.sql', -382855919, 'root', '2014-12-23 22:37:01', 31, 1), - (240, 240, '227', 'loan-refund-permissions', 'SQL', 'V227__loan-refund-permissions.sql', 2141152676, 'root', '2014-12-23 22:37:01', 242, 1), - (241, 241, '228', 'entity to entity access', 'SQL', 'V228__entity_to_entity_access.sql', -1244421071, 'root', '2014-12-23 22:37:03', 1255, 1), - (242, 242, '229', 'teller cash management', 'SQL', 'V229__teller_cash_management.sql', 753724982, 'root', '2014-12-23 22:37:05', 2441, 1), - (23, 23, '23', 'remove-enable-disable-configuration-for-client-group-status', 'SQL', 'V23__remove-enable-disable-configuration-for-client-group-status.sql', -832390233, 'root', '2014-03-08 02:28:50', 295, 1), - (243, 243, '230', 'role status and correspoding permissions', 'SQL', 'V230__role_status_and_correspoding_permissions.sql', -21174595, 'root', '2015-04-16 14:58:42', 131, 1), - (244, 244, '231', 'm cashier transaction added currency code', 'SQL', 'V231__m_cashier_transaction_added_currency_code.sql', -1593672561, 'root', '2015-04-16 14:58:42', 33, 1), - (245, 245, '232', 'insert center closure reason', 'SQL', 'V232__insert_center_closure_reason.sql', -2049914418, 'root', '2015-04-16 14:58:42', 2, 1), - (246, 246, '233', 'Savings Transaction Receipt', 'SQL', 'V233__Savings_Transaction_Receipt.sql', 1836289382, 'root', '2015-04-16 14:58:42', 16, 1), - (247, 247, '234', 'opening balaces setup', 'SQL', 'V234__opening_balaces_setup.sql', 1777198314, 'root', '2015-04-16 14:58:42', 30, 1), - (248, 248, '235', 'add ugd template id m hook', 'SQL', 'V235__add_ugd_template_id_m_hook.sql', 1120955673, 'root', '2015-04-16 14:58:42', 73, 1), - (249, 249, '236', 'individual collection sheet permissions', 'SQL', 'V236__individual_collection_sheet_permissions.sql', -66130238, 'root', '2015-04-16 14:58:42', 2, 1), - (250, 250, '237', 'add threshold config for last instalment', 'SQL', 'V237__add_threshold_config_for_last_instalment.sql', 412873149, 'root', '2015-04-16 14:58:42', 53, 1), - (251, 251, '238', 'update staff display name length', 'SQL', 'V238__update_staff_display_name_length.sql', -1003425306, 'root', '2015-04-16 14:58:42', 57, 1), - (252, 252, '239', 'Loan Transaction Receipt', 'SQL', 'V239__Loan_Transaction_Receipt.sql', -130819179, 'root', '2015-04-16 14:58:42', 3, 1), - (24, 24, '24', 'add-group-client-foreign-key-constraint-in-loan-table', 'SQL', 'V24__add-group-client-foreign-key-constraint-in-loan-table.sql', -621897624, 'root', '2014-03-08 02:28:51', 318, 1), - (253, 253, '240', 'arrears aging config for interest recalculation', 'SQL', 'V240__arrears_aging_config_for_interest_recalculation.sql', 674368034, 'root', '2015-04-16 14:58:42', 114, 1), - (254, 254, '241', 'fixed emi changes', 'SQL', 'V241__fixed_emi_changes.sql', 1943069939, 'root', '2015-04-16 14:58:42', 47, 1), - (255, 255, '242', 'entitytoentitymappingrelation', 'SQL', 'V242__entitytoentitymappingrelation.sql', -1770973716, 'root', '2015-04-16 14:58:42', 59, 1), - (256, 256, '243', 'alter loan disbursement details', 'SQL', 'V243__alter_loan_disbursement_details.sql', 1461060824, 'root', '2015-04-16 14:58:42', 31, 1), - (257, 257, '244', 'staff assignment history table', 'SQL', 'V244__staff_assignment_history_table.sql', -427095856, 'root', '2015-04-16 14:58:43', 30, 1), - (258, 258, '245', 'open rd changes', 'SQL', 'V245__open_rd_changes.sql', 2142566381, 'root', '2015-04-16 14:58:43', 2, 1), - (259, 259, '246', 'drop group client foreign key from m loan', 'SQL', 'V246__drop_group_client_foreign_key_from_m_loan.sql', -1721132405, 'root', '2015-04-16 14:58:43', 11, 1), - (260, 260, '247', 'consistency wrt spelling principalThresholdForLastInstalment', 'SQL', 'V247__consistency_wrt_spelling_principalThresholdForLastInstalment.sql', 1371980378, 'root', '2015-04-16 14:58:43', 9, 1), - (261, 261, '248', 'added password never expired to User', 'SQL', 'V248__added_password_never_expired_to_User.sql', -1800179163, 'root', '2015-04-16 14:58:43', 37, 1), - (262, 262, '249', 'workingdays permissions', 'SQL', 'V249__workingdays_permissions.sql', -1322891155, 'root', '2015-04-16 14:58:43', 3, 1), - (25, 25, '25', 'update client reports for status and activation change', 'SQL', 'V25__update_client_reports_for_status_and_activation_change.sql', -1426943124, 'root', '2014-03-08 02:28:51', 30, 1), - (263, 263, '250', 'password validation policy', 'SQL', 'V250__password_validation_policy.sql', 1197290340, 'root', '2015-04-16 14:58:43', 38, 1), - (264, 264, '251', 'paymentType table', 'SQL', 'V251__paymentType_table.sql', -1969329175, 'root', '2015-04-16 14:58:43', 117, 1), - (265, 265, '252', 'bug fix teller cash management', 'SQL', 'V252__bug_fix_teller_cash_management.sql', -736743970, 'root', '2015-04-16 14:58:43', 167, 1), - (266, 266, '253', 'product loan configurable attributes', 'SQL', 'V253__product_loan_configurable_attributes.sql', 1787268316, 'root', '2015-04-16 14:58:43', 15, 1), - (267, 267, '254', 'General Ledger Report', 'SQL', 'V254__General_Ledger_Report.sql', -186920768, 'root', '2015-04-16 14:58:43', 6, 1), - (268, 268, '255', 'pre close interest period config', 'SQL', 'V255__pre_close_interest_period_config.sql', 1383225707, 'root', '2015-04-16 14:58:43', 23, 1), - (269, 269, '256', 'Update script for General Ledger report', 'SQL', 'V256__Update script for General_Ledger_report.sql', 1918702942, 'root', '2015-04-16 14:58:43', 4, 1), - (270, 270, '257', 'staff image association', 'SQL', 'V257__staff_image_association.sql', 1740118046, 'root', '2015-04-16 14:58:43', 37, 1), - (271, 271, '258', 'interest compounding changes', 'SQL', 'V258__interest_compounding_changes.sql', 1484848861, 'root', '2015-05-19 04:50:26', 223, 1), - (272, 272, '259', 'alter working days', 'SQL', 'V259__alter_working_days.sql', 1733733251, 'root', '2015-05-19 04:50:26', 33, 1), - (26, 26, '26', 'add-support-for-withdrawal-fees-on-savings', 'SQL', 'V26__add-support-for-withdrawal-fees-on-savings.sql', -1955461568, 'root', '2014-03-08 02:28:52', 884, 1), - (273, 273, '260', 'alter password validation policy', 'SQL', 'V260__alter_password_validation_policy.sql', -853716637, 'root', '2015-05-19 04:50:26', 32, 1), - (274, 274, '261', 'Update script for Client Loan Account Schedule Report', 'SQL', 'V261__Update script for Client_Loan_Account_Schedule_Report.sql', 1873100628, 'root', '2015-09-06 17:49:04', 14, 1), - (275, 275, '262', 'accountNumber for groups', 'SQL', 'V262__accountNumber_for_groups.sql', -31083607, 'root', '2015-09-06 17:49:04', 123, 1), - (276, 276, '263', 'mifos reports', 'SQL', 'V263__mifos_reports.sql', -1358041795, 'root', '2015-09-06 17:49:04', 12, 1), - (277, 277, '264', 'insert paymenttype and report read permission', 'SQL', 'V264__insert_paymenttype_and_report_read_permission.sql', 984979503, 'root', '2015-09-06 17:49:04', 6, 1), - (278, 278, '265', 'modify external service schema', 'SQL', 'V265__modify_external_service_schema.sql', 1844344576, 'root', '2015-09-06 17:49:05', 290, 1), - (279, 279, '266', 'client fees', 'SQL', 'V266__client_fees.sql', 41332385, 'root', '2015-09-06 17:49:05', 111, 1), - (280, 280, '267', 'client transaction permissions', 'SQL', 'V267__client_transaction_permissions.sql', 130000057, 'root', '2015-09-06 17:49:05', 6, 1), - (281, 281, '268', 'update gmail password', 'SQL', 'V268__update_gmail_password.sql', 1723317114, 'root', '2015-09-06 17:49:05', 5, 1), - (282, 282, '269', 'increased calendar title length ', 'SQL', 'V269__increased_calendar_title_length .sql', 1780890645, 'root', '2015-09-06 17:49:05', 167, 1), - (27, 27, '27', 'add-loan-type-column-to-loan-table', 'SQL', 'V27__add-loan-type-column-to-loan-table.sql', -746287938, 'root', '2014-03-08 02:28:52', 344, 1), - (283, 283, '270', 'add rounding mode configuration', 'SQL', 'V270__add_rounding_mode_configuration.sql', 1195237290, 'root', '2015-09-06 17:49:05', 67, 1), - (284, 284, '271', 'accounting for client charges', 'SQL', 'V271__accounting_for_client_charges.sql', 1477443700, 'root', '2015-09-06 17:49:06', 204, 1), - (285, 285, '272', 'loan tranche disbursement charge', 'SQL', 'V272__loan_tranche_disbursement_charge.sql', 2018052750, 'root', '2015-09-06 17:49:06', 178, 1), - (286, 286, '273', 'oauth changes', 'SQL', 'V273__oauth_changes.sql', 1811521678, 'root', '2015-09-09 13:21:38', 98, 1), - (287, 287, '274', 'Loan Reschedule Code Value', 'SQL', 'V274__Loan_Reschedule_Code_Value.sql', -1190544276, 'root', '2015-09-15 18:00:15', 32, 1), - (288, 288, '275', 'loan transaction to repayment schedule mapping', 'SQL', 'V275__loan_transaction_to_repayment_schedule_mapping.sql', 1971001203, 'root', '2015-09-21 20:04:43', 471, 1), - (289, 289, '276', 'loan recalulated till date', 'SQL', 'V276__loan_recalulated_till_date.sql', 631764351, 'root', '2015-10-20 19:57:56', 1672, 1), - (290, 290, '277', 'Loan Product Provisioning', 'SQL', 'V277__Loan_Product_Provisioning.sql', -510229006, 'root', '2015-10-20 19:57:58', 2295, 1), - (291, 291, '278', 'LoanTransactionProcessingStrategy', 'SQL', 'V278__LoanTransactionProcessingStrategy.sql', -1388446419, 'root', '2015-11-04 17:03:01', 877, 1), - (292, 292, '279', 'floating rates', 'SQL', 'V279__floating_rates.sql', 830029264, 'root', '2015-11-18 16:13:09', 645, 1), - (28, 28, '28', 'accounting-abstractions-and-autoposting', 'SQL', 'V28__accounting-abstractions-and-autoposting.sql', -966431980, 'root', '2014-03-08 02:28:53', 556, 1), - (293, 293, '280', 'spm framework initial tables', 'SQL', 'V280__spm_framework_initial_tables.sql', -1638980235, 'root', '2015-12-02 16:07:45', 630, 1), - (294, 294, '281', 'add configuration param backdate-penalties', 'SQL', 'V281__add_configuration_param_backdate-penalties.sql', -45520299, 'root', '2015-12-02 16:07:45', 45, 1), - (295, 295, '282', 'CustomerSelfService', 'SQL', 'V282__CustomerSelfService.sql', -51763400, 'root', '2015-12-17 10:17:34', 255, 1), - (296, 296, '283', 'Variable Installments', 'SQL', 'V283__Variable_Installments.sql', -1104936867, 'root', '2016-01-12 17:39:21', 1966, 1), - (297, 297, '284', 'update codevalue', 'SQL', 'V284__update_codevalue.sql', 442711672, 'root', '2016-01-12 17:39:22', 457, 1), - (298, 298, '285', 'undo last tranche script', 'SQL', 'V285__undo_last_tranche_script.sql', 1551040289, 'root', '2016-01-12 17:39:22', 29, 1), - (299, 299, '286', 'partial period interest calcualtion', 'SQL', 'V286__partial_period_interest_calcualtion.sql', -1701869481, 'root', '2016-01-12 17:39:23', 1590, 1), - (300, 300, '287', 'alter spm scorecard', 'SQL', 'V287__alter_spm_scorecard.sql', 1834026952, 'root', '2016-01-20 18:23:20', 194, 1), - (301, 301, '288', 'overdraft interest', 'SQL', 'V288__overdraft_interest.sql', 2003058104, 'root', '2016-01-20 18:23:20', 307, 1), - (302, 302, '289', 'client non person', 'SQL', 'V289__client_non_person.sql', 1595576360, 'root', '2016-01-20 18:23:20', 277, 1), - (29, 29, '29', 'add-support-for-annual-fees-on-savings', 'SQL', 'V29__add-support-for-annual-fees-on-savings.sql', 992227725, 'root', '2014-03-08 02:28:55', 1556, 1), - (303, 303, '290', 'shares dividends permissions script', 'SQL', 'V290__shares_dividends_permissions_script.sql', -1504459497, 'root', '2016-01-20 18:23:21', 39, 1), - (304, 304, '291', 'organisation start date config', 'SQL', 'V291__organisation_start_date_config.sql', -1674309950, 'root', '2017-02-24 14:16:20', 564, 1), - (305, 305, '292', 'update organisation start date', 'SQL', 'V292__update_organisation_start_date.sql', 2016095558, 'root', '2017-02-24 14:16:20', 43, 1), - (306, 306, '293', 'interest rate chart support for amounts', 'SQL', 'V293__interest_rate_chart_support_for_amounts.sql', -1720908295, 'root', '2017-02-24 14:16:22', 1738, 1), - (307, 307, '294', 'configuration for paymnettype application forDisbursement charge', 'SQL', 'V294__configuration_for_paymnettype_application_forDisbursement_charge.sql', -754382065, 'root', '2017-02-24 14:16:22', 28, 1), - (308, 308, '295', 'configuration for interest charged date same as disbursal date', 'SQL', 'V295__configuration_for_interest_charged_date_same_as_disbursal_date.sql', -1113285243, 'root', '2017-02-24 14:16:23', 62, 1), - (309, 309, '296', 'skip repayment on first-day of month', 'SQL', 'V296__skip_repayment_on first-day_of_month.sql', -172630113, 'root', '2017-02-24 14:16:23', 31, 1), - (310, 310, '297', 'Adding Meeting Time column', 'SQL', 'V297__Adding_Meeting_Time_column.sql', -637673654, 'root', '2017-02-24 14:16:23', 399, 1), - (311, 311, '298', 'savings interest tax', 'SQL', 'V298__savings_interest_tax.sql', -1023309693, 'root', '2017-02-24 14:16:28', 5052, 1), - (312, 312, '299', 'share products', 'SQL', 'V299__share_products.sql', 1270845438, 'root', '2017-02-24 14:16:33', 4109, 1), - (3, 3, '3', 'mifosx-permissions-and-authorisation-utf8', 'SQL', 'V3__mifosx-permissions-and-authorisation-utf8.sql', 1922951887, 'root', '2014-03-08 02:28:38', 110, 1), - (30, 30, '30', 'add-referenceNumber-to-acc gl journal entry', 'SQL', 'V30__add-referenceNumber-to-acc_gl_journal_entry.sql', 2079970797, 'root', '2014-03-08 02:28:55', 327, 1), - (313, 313, '300', 'configuration for allow changing of emi amount', 'SQL', 'V300__configuration_for_allow_changing_of_emi_amount.sql', -490331317, 'root', '2017-02-24 14:16:34', 813, 1), - (314, 314, '301', 'recurring moratorium principal periods', 'SQL', 'V301__recurring_moratorium_principal_periods.sql', 816871436, 'root', '2017-02-24 14:16:35', 1744, 1), - (315, 315, '302', 'add status to client identifier', 'SQL', 'V302__add_status_to_client_identifier.sql', 1978862509, 'root', '2017-02-24 14:16:36', 668, 1), - (316, 316, '303', 'Savings Account Dormancy', 'SQL', 'V303__Savings_Account_Dormancy.sql', -533139714, 'root', '2017-02-24 14:16:37', 1218, 1), - (317, 317, '304', 'customer self service third party transfers', 'SQL', 'V304__customer_self_service_third_party_transfers.sql', -341614071, 'root', '2017-02-24 14:16:38', 307, 1), - (318, 318, '305', 'compounding and rest frequency nth day freq and insertion script for accrual job', 'SQL', 'V305__compounding_and_rest_frequency_nth_day_freq_and_insertion_script_for_accrual_job.sql', 710584648, 'root', '2017-02-24 14:16:42', 3933, 1), - (319, 319, '306', 'add domancy tracking job to savings group', 'SQL', 'V306__add_domancy_tracking_job_to_savings_group.sql', -2998873, 'root', '2017-02-24 14:16:42', 29, 1), - (320, 320, '307', 'add share notes', 'SQL', 'V307__add_share_notes.sql', -1950926410, 'root', '2017-02-24 14:16:43', 718, 1), - (321, 321, '308', 'add interest recalculation in savings account', 'SQL', 'V308__add_interest_recalculation_in_savings_account.sql', 1869901088, 'root', '2017-02-24 14:16:44', 621, 1), - (322, 322, '309', 'add loan write off reason code', 'SQL', 'V309__add_loan_write_off_reason_code.sql', 1221434865, 'root', '2017-02-24 14:16:46', 1461, 1), - (31, 31, '31', 'drop-autopostings', 'SQL', 'V31__drop-autopostings.sql', 630501407, 'root', '2014-03-08 02:28:55', 39, 1), - (323, 323, '310', 'copy data from entitytoentityaccess to entitytoentitymapping', 'SQL', 'V310__copy_data_from_entitytoentityaccess_to_entitytoentitymapping.sql', 1179078728, 'root', '2017-02-24 14:16:46', 3, 1), - (324, 324, '311', 'foreclosure details', 'SQL', 'V311__foreclosure_details.sql', 1236003234, 'root', '2017-02-24 14:16:47', 939, 1), - (325, 325, '312', 'add is mandatory to code value', 'SQL', 'V312__add_is_mandatory_to_code_value.sql', -1943949742, 'root', '2017-02-24 14:16:47', 639, 1), - (326, 326, '313', 'multi rescheduling script', 'SQL', 'V313__multi_rescheduling_script.sql', -1003845274, 'root', '2017-02-24 14:16:50', 2730, 1), - (327, 327, '314', 'updating r enum table', 'SQL', 'V314__updating_r_enum_table.sql', 780881263, 'root', '2017-02-24 14:16:50', 82, 1), - (328, 328, '315', 'add sync expected with disbursement date in m product loan', 'SQL', 'V315__add_sync_expected_with_disbursement_date_in_m_product_loan.sql', 553617808, 'root', '2017-02-24 14:16:51', 658, 1), - (329, 329, '316', 'address module tables metadat', 'SQL', 'V316__address_module_tables_metadat.sql', -776128404, 'root', '2017-02-24 14:16:53', 1139, 1), - (330, 330, '317', 'report mailing job module', 'SQL', 'V317__report_mailing_job_module.sql', -1917516805, 'root', '2017-02-24 14:16:54', 1173, 1), - (331, 331, '318', 'topuploan', 'SQL', 'V318__topuploan.sql', 590465441, 'root', '2017-02-24 14:16:56', 2073, 1), - (332, 332, '319', 'client undoreject', 'SQL', 'V319__client_undoreject.sql', -1615618857, 'root', '2017-02-24 14:16:57', 1032, 1), - (32, 32, '32', 'associate-disassociate-clients-from-group-permissions', 'SQL', 'V32__associate-disassociate-clients-from-group-permissions.sql', 765311507, 'root', '2014-03-08 02:28:55', 29, 1), - (333, 333, '320', 'add holiday payment reschedule', 'SQL', 'V320__add_holiday_payment_reschedule.sql', 1445492229, 'root', '2017-02-24 14:16:58', 545, 1), - (334, 334, '321', 'boolean field As Interest PostedOn', 'SQL', 'V321__boolean_field_As_Interest_PostedOn.sql', 1906735834, 'root', '2017-02-24 14:16:59', 658, 1), - (335, 335, '322', 'sms campaign', 'SQL', 'V322__sms_campaign.sql', -1316831815, 'root', '2017-02-24 14:17:00', 1608, 1), - (336, 336, '323', 'spm replace dead fk with exisiting one', 'SQL', 'V323__spm_replace_dead_fk_with_exisiting_one.sql', 656055500, 'root', '2017-02-24 14:17:01', 498, 1), - (337, 337, '324', 'datatable checks', 'SQL', 'V324__datatable_checks.sql', -142308095, 'root', '2017-02-24 14:17:02', 335, 1), - (33, 33, '33', 'drop unique check on stretchy report parameter', 'SQL', 'V33__drop_unique_check_on_stretchy_report_parameter.sql', -716768190, 'root', '2014-03-08 02:28:56', 253, 1), - (34, 34, '34', 'add unique check on stretchy report parameter', 'SQL', 'V34__add_unique_check_on_stretchy_report_parameter.sql', -1989718961, 'root', '2014-03-08 02:28:56', 254, 1), - (35, 35, '35', 'add hierarchy column for acc gl account', 'SQL', 'V35__add_hierarchy_column_for_acc_gl_account.sql', -1387013309, 'root', '2014-03-08 02:28:57', 300, 1), - (36, 36, '36', 'add tag id column for acc gl account', 'SQL', 'V36__add_tag_id_column_for_acc_gl_account.sql', -620418591, 'root', '2014-03-08 02:28:57', 404, 1), - (37, 37, '37', 'add-center-group-collection-sheet-permissions', 'SQL', 'V37__add-center-group-collection-sheet-permissions.sql', -1157429270, 'root', '2014-03-08 02:28:57', 32, 1), - (38, 38, '38', 'add-group-summary-details-report', 'SQL', 'V38__add-group-summary-details-report.sql', -1018394665, 'root', '2014-03-08 02:28:57', 36, 1), - (39, 39, '39', 'payment-channels-updates', 'SQL', 'V39__payment-channels-updates.sql', -1005512239, 'root', '2014-03-08 02:28:58', 1172, 1), - (4, 4, '4', 'mifosx-core-reports-utf8', 'SQL', 'V4__mifosx-core-reports-utf8.sql', -934709187, 'root', '2014-03-08 02:28:39', 287, 1), - (40, 40, '40', 'add permissions for accounting rule', 'SQL', 'V40__add_permissions_for_accounting_rule.sql', 1514233058, 'root', '2014-03-08 02:28:59', 37, 1), - (41, 41, '41', 'group-summary-reports', 'SQL', 'V41__group-summary-reports.sql', 263779795, 'root', '2014-03-08 02:28:59', 229, 1), - (42, 42, '42', 'Add default value for id for acc accounting rule', 'SQL', 'V42__Add_default_value_for_id_for_acc_accounting_rule.sql', 1068680120, 'root', '2014-03-08 02:28:59', 242, 1), - (43, 43, '43', 'accounting-for-savings', 'SQL', 'V43__accounting-for-savings.sql', 1965510021, 'root', '2014-03-08 02:29:00', 567, 1), - (44, 44, '44', 'document-increase-size-of-column-type', 'SQL', 'V44__document-increase-size-of-column-type.sql', 1264142829, 'root', '2014-03-08 02:29:00', 271, 1), - (45, 45, '45', 'create acc rule tags table', 'SQL', 'V45__create_acc_rule_tags_table.sql', -307868244, 'root', '2014-03-08 02:29:01', 189, 1), - (46, 46, '46', 'extend datatables api', 'SQL', 'V46__extend_datatables_api.sql', 297544230, 'root', '2014-03-08 02:29:01', 38, 1), - (47, 47, '47', 'staff-hierarchy-link-to-users', 'SQL', 'V47__staff-hierarchy-link-to-users.sql', 480254198, 'root', '2014-03-08 02:29:02', 868, 1), - (48, 48, '48', 'adding-S3-Support', 'SQL', 'V48__adding-S3-Support.sql', -280798781, 'root', '2014-03-08 02:29:03', 1276, 1), - (49, 49, '49', 'track-loan-charge-payment-transactions', 'SQL', 'V49__track-loan-charge-payment-transactions.sql', 170618680, 'root', '2014-03-08 02:29:03', 176, 1), - (5, 5, '5', 'update-savings-product-and-account-tables', 'SQL', 'V5__update-savings-product-and-account-tables.sql', 1171300485, 'root', '2014-03-08 02:28:39', 636, 1), - (50, 50, '50', 'add-grace-settings-to-loan-product', 'SQL', 'V50__add-grace-settings-to-loan-product.sql', 188244658, 'root', '2014-03-08 02:29:05', 926, 1), - (51, 51, '51', 'track-additional-details-related-to-installment-performance', 'SQL', 'V51__track-additional-details-related-to-installment-performance.sql', 2012793946, 'root', '2014-03-08 02:29:05', 602, 1), - (52, 52, '52', 'add boolean support cols to acc accounting rule', 'SQL', 'V52__add_boolean_support_cols_to_acc_accounting_rule.sql', 961668575, 'root', '2014-03-08 02:29:06', 501, 1), - (53, 53, '53', 'track-advance-and-late-payments-on-installment', 'SQL', 'V53__track-advance-and-late-payments-on-installment.sql', -230737076, 'root', '2014-03-08 02:29:06', 212, 1), - (54, 54, '54', 'charge-to-income-account-mappings', 'SQL', 'V54__charge-to-income-account-mappings.sql', 2064168495, 'root', '2014-03-08 02:29:07', 303, 1), - (55, 55, '55', 'add-additional-transaction-processing-strategies', 'SQL', 'V55__add-additional-transaction-processing-strategies.sql', 1186305896, 'root', '2014-03-08 02:29:07', 352, 1), - (56, 56, '56', 'track-overpaid-amount-on-loans', 'SQL', 'V56__track-overpaid-amount-on-loans.sql', 1455634018, 'root', '2014-03-08 02:29:07', 239, 1), - (57, 57, '57', 'add default values to debit and credit accounts acc accounting rule', 'SQL', 'V57__add_default_values_to_debit_and_credit_accounts_acc_accounting_rule.sql', 1936034654, 'root', '2014-03-08 02:29:08', 272, 1), - (58, 58, '58', 'create-holiday-tables changed', 'SQL', 'V58__create-holiday-tables_changed.sql', 878594707, 'root', '2014-03-08 02:29:08', 374, 1), - (59, 59, '59', 'add group roles schema and permissions', 'SQL', 'V59__add_group_roles_schema_and_permissions.sql', 2139634800, 'root', '2014-03-08 02:29:09', 259, 1), - (6, 6, '6', 'add min max principal column to loan', 'SQL', 'V6__add_min_max_principal_column_to_loan.sql', 21414779, 'root', '2014-03-08 02:28:40', 648, 1), - (60, 60, '60', 'quipo dashboard reports', 'SQL', 'V60__quipo_dashboard_reports.sql', -1414014218, 'root', '2014-03-08 02:29:09', 67, 1), - (61, 61, '61', 'txn running balance example', 'SQL', 'V61__txn_running_balance_example.sql', -1186179870, 'root', '2014-03-08 02:29:09', 43, 1), - (62, 62, '62', 'add staff id to m client changed', 'SQL', 'V62__add_staff_id_to_m_client_changed.sql', -903717279, 'root', '2014-03-08 02:29:09', 289, 1), - (63, 63, '63', 'add sync disbursement with meeting column to loan', 'SQL', 'V63__add_sync_disbursement_with_meeting_column_to_loan.sql', 1706011840, 'root', '2014-03-08 02:29:10', 298, 1), - (64, 64, '64', 'add permission for assign staff', 'SQL', 'V64__add_permission_for_assign_staff.sql', -1938102414, 'root', '2014-03-08 02:29:10', 36, 1), - (65, 65, '65', 'fix rupee symbol issues', 'SQL', 'V65__fix_rupee_symbol_issues.sql', 581612224, 'root', '2014-03-08 02:29:10', 33, 1), - (66, 66, '66', 'client close functionality', 'SQL', 'V66__client_close_functionality.sql', 225242657, 'root', '2014-03-08 02:29:10', 357, 1), - (67, 67, '67', 'loans in advance table', 'SQL', 'V67__loans_in_advance_table.sql', -2001051496, 'root', '2014-03-08 02:29:11', 126, 1), - (68, 68, '68', 'quipo dashboard reports updated', 'SQL', 'V68__quipo_dashboard_reports_updated.sql', -1241469930, 'root', '2014-03-08 02:29:11', 74, 1), - (69, 69, '69', 'loans in advance initialise', 'SQL', 'V69__loans_in_advance_initialise.sql', -1961764720, 'root', '2014-03-08 02:29:11', 44, 1), - (7, 7, '7', 'remove read makerchecker permission', 'SQL', 'V7__remove_read_makerchecker_permission.sql', -335430825, 'root', '2014-03-08 02:28:40', 37, 1), - (70, 70, '70', 'quipo program detail query fix', 'SQL', 'V70__quipo_program_detail_query_fix.sql', 961289260, 'root', '2014-03-08 02:29:11', 37, 1), - (71, 71, '71', 'insert reschedule repayment to configuration', 'SQL', 'V71__insert_reschedule_repayment_to_configuration.sql', -1148306529, 'root', '2014-03-08 02:29:11', 29, 1), - (72, 72, '72', 'add m loan counter changes', 'SQL', 'V72__add_m_loan_counter_changes.sql', 201544058, 'root', '2014-03-08 02:29:12', 487, 1), - (73, 73, '73', 'add repayments rescheduled to and processed column to holiday', 'SQL', 'V73__add_repayments_rescheduled_to_and_processed_column_to_holiday.sql', -1946338033, 'root', '2014-03-08 02:29:12', 265, 1), - (74, 74, '74', 'alter m loan counter table add group', 'SQL', 'V74__alter_m_loan_counter_table_add_group.sql', -889985683, 'root', '2014-03-08 02:29:13', 322, 1), - (75, 75, '75', 'add reschedule-repayments-on-holidays to configuration', 'SQL', 'V75__add_reschedule-repayments-on-holidays_to_configuration.sql', 1328301697, 'root', '2014-03-08 02:29:13', 24, 1), - (76, 76, '76', 'rename permission grouping', 'SQL', 'V76__rename_permission_grouping.sql', 1717580945, 'root', '2014-03-08 02:29:13', 28, 1), - (77, 77, '77', 'alter m product loan changes', 'SQL', 'V77__alter_m_product_loan_changes.sql', 677013677, 'root', '2014-03-08 02:29:13', 283, 1), - (78, 78, '78', 'breakdown portfolio grouping', 'SQL', 'V78__breakdown_portfolio_grouping.sql', -1385954232, 'root', '2014-03-08 02:29:13', 28, 1), - (79, 79, '79', 'schedule jobs tables', 'SQL', 'V79__schedule_jobs_tables.sql', 339707179, 'root', '2014-03-08 02:29:14', 435, 1), - (8, 8, '8', 'deposit-transaction-permissions-if-they-exist', 'SQL', 'V8__deposit-transaction-permissions-if-they-exist.sql', -1507997551, 'root', '2014-03-08 02:28:40', 6, 1), - (80, 80, '80', 'schedule jobs tables updates', 'SQL', 'V80__schedule_jobs_tables_updates.sql', -152869205, 'root', '2014-03-08 02:29:15', 1507, 1), - (81, 81, '81', 'savings related changes', 'SQL', 'V81__savings_related_changes.sql', 285284658, 'root', '2014-03-08 02:29:17', 1593, 1), - (82, 82, '82', 'schedule jobs tables updates for running status', 'SQL', 'V82__schedule_jobs_tables_updates_for_running_status.sql', -1029370098, 'root', '2014-03-08 02:29:18', 621, 1), - (83, 83, '83', 'non-working-days-table', 'SQL', 'V83__non-working-days-table.sql', -1092480574, 'root', '2014-03-08 02:29:18', 138, 1), - (84, 84, '84', 'undo savings transaction permission', 'SQL', 'V84__undo_savings_transaction_permission.sql', 1857641857, 'root', '2014-03-08 02:29:18', 31, 1), - (85, 85, '85', 'product mix related changes', 'SQL', 'V85__product_mix_related_changes.sql', -740767169, 'root', '2014-03-08 02:29:19', 484, 1), - (86, 86, '86', 'update-working-days', 'SQL', 'V86__update-working-days.sql', 1266232028, 'root', '2014-03-08 02:29:19', 45, 1), - (87, 87, '87', 'add permission for scheduler', 'SQL', 'V87__add_permission_for_scheduler.sql', -575950289, 'root', '2014-03-08 02:29:19', 27, 1), - (88, 88, '88', 'added update constrain for scheduler jobs', 'SQL', 'V88__added_update_constrain_for_scheduler_jobs.sql', 1579070736, 'root', '2014-03-08 02:29:20', 380, 1), - (89, 89, '89', 'added scheduler group', 'SQL', 'V89__added_scheduler_group.sql', -1538207332, 'root', '2014-03-08 02:29:20', 245, 1), - (9, 9, '9', 'add min max constraint column to loan loanproduct', 'SQL', 'V9__add_min_max_constraint_column_to_loan_loanproduct.sql', -2103326932, 'root', '2014-03-08 02:28:42', 1503, 1), - (90, 90, '90', 'client performance history reports', 'SQL', 'V90__client_performance_history_reports.sql', 35589718, 'root', '2014-03-08 02:29:20', 51, 1), - (91, 91, '91', 'apply annual fees permission', 'SQL', 'V91__apply_annual_fees_permission.sql', 440351308, 'root', '2014-03-08 02:29:20', 34, 1), - (92, 92, '91.1', 'configuration settings for holiday and non workingday', 'SQL', 'V91_1__configuration_settings_for_holiday_and_non_workingday.sql', -429561096, 'root', '2014-03-08 02:29:20', 25, 1), - (93, 93, '92', 'group center assign staff permission', 'SQL', 'V92__group_center_assign_staff_permission.sql', -1557846330, 'root', '2014-03-08 02:29:20', 21, 1), - (94, 94, '93', 'loan transaction external id', 'SQL', 'V93__loan_transaction_external_id.sql', 987684239, 'root', '2014-03-08 02:29:21', 252, 1), - (95, 95, '94', 'added savings accont type', 'SQL', 'V94__added_savings_accont type.sql', 623078091, 'root', '2014-03-08 02:29:21', 199, 1), - (96, 96, '95', 'batch job postInterest', 'SQL', 'V95__batch_job_postInterest.sql', -1484077135, 'root', '2014-03-08 02:29:21', 25, 1), - (97, 97, '96', 'savings accounts transfers table', 'SQL', 'V96__savings_accounts_transfers_table.sql', -1447275289, 'root', '2014-03-08 02:29:22', 370, 1), - (98, 98, '97', 'add permission for adjust savings transaction', 'SQL', 'V97__add_permission_for_adjust_savings_transaction.sql', -2045732265, 'root', '2014-03-08 02:29:22', 20, 1), - (99, 99, '98', 'added currency roundof for multipleof', 'SQL', 'V98__added_currency_roundof_for_multipleof.sql', -131804848, 'root', '2014-03-08 02:29:23', 1440, 1); + (1, 1, ' +1', 'mifosplatform-core-ddl-latest', 'SQL', 'V1__mifosplatform-core-ddl-latest.sql', -1957145051, 'root', ' +2014-03-08 02:28:38 +', 10710, 1), + (10, 10, '10 +', 'interest-posting-fields-for-savings', 'SQL', 'V10__interest-posting-fields-for-savings.sql', -1133853485, 'root', ' +2014-03-08 02:28:43 +', 1339, 1), + (100, 100, '100 +', 'Group saving summary report', 'SQL', 'V100__Group_saving_summary_report.sql', -1635399448, 'root', ' +2014-03-08 02:29:23 +', 26, 1), + (101, 101, '101 +', 'add mulitplesof to account transfers table', 'SQL', 'V101__add_mulitplesof_to_account_transfers_table.sql', -1162976022, 'root', ' +2014-03-08 02:29:24 +', 271, 1), + (102, 102, '102 +', 'client attendance tables', 'SQL', 'V102__client_attendance_tables.sql', -45448019, 'root', ' +2014-03-08 02:29:24 +', 359, 1), + (103, 103, '103 +', 'cluster support for batch jobs', 'SQL', 'V103__cluster_support_for_batch_jobs.sql', -781879007, 'root', ' +2014-03-08 02:29:25 +', 489, 1), + (104, 104, '104 +', 'permissions for transfers', 'SQL', 'V104__permissions_for_transfers.sql', 653895919, 'root', ' +2014-03-08 02:29:25 +', 51, 1), + (105, 105, '105 +', 'track loan transaction against office', 'SQL', 'V105__track_loan_transaction_against_office.sql', 785650440, 'root', ' +2014-03-08 02:29:26 +', 1260, 1), + (106, 106, '106 +', 'more permissions for transfers', 'SQL', 'V106__more_permissions_for_transfers.sql', -1132691133, 'root', ' +2014-03-08 02:29:27 +', 63, 1), + (107, 107, '107 +', 'datatable code mappings', 'SQL', 'V107__datatable_code_mappings.sql', 630737271, 'root', ' +2014-03-08 02:29:27 +', 185, 1), + (108, 108, '108 +', 'client has transfer office', 'SQL', 'V108__client_has_transfer_office.sql', -1748734810, 'root', ' +2014-03-08 02:29:27 +', 356, 1), + (109, 109, '109 +', 'account transfer withdrawal fee configuration', 'SQL', 'V109__account_transfer_withdrawal_fee_configuration.sql', -754569033, 'root', ' +2014-03-08 02:29:28 +', 524, 1), + (11, 11, '11 +', 'add-payment-details', 'SQL', 'V11__add-payment-details.sql', 391380768, 'root', ' +2014-03-08 02:28:44 +', 404, 1), + (110, 110, '110 +', 'group center close', 'SQL', 'V110__group_center_close.sql', -1261775365, 'root', ' +2014-03-08 02:29:28 +', 326, 1), + (111, 111, '111 +', 'disable constraint approach for datatables by default', 'SQL', 'V111__disable_constraint_approach_for_datatables_by_default.sql', 2058257907, 'root', ' +2014-03-08 02:29:29 +', 28, 1), + (112, 112, '111.1 +', 'set default transfers in suspense account for existing loan products', 'SQL', 'V111_1__set default_transfers_in_suspense_account_for_existing_loan_products.sql', 1907173791, 'root', ' +2014-03-08 02:29:29 +', 5, 1), + (113, 113, '112 +', 'mixreport sql support', 'SQL', 'V112__mixreport_sql_support.sql', 1254859560, 'root', ' +2014-03-08 02:29:29 +', 655, 1), + (114, 114, '113 +', 'track savings transaction against office', 'SQL', 'V113__track_savings_transaction_against_office.sql', -1390529632, 'root', ' +2014-03-08 02:29:30 +', 799, 1), + (115, 115, '114 +', 'set default transfers in suspense account for existing savings products - Copy', 'SQL', 'V114__set_default_transfers_in_suspense_account_for_existing_savings_products - Copy.sql', 1518369372, 'root', ' +2014-03-08 02:29:30 +', 3, 1), + (116, 116, '115 +', 'permissions for cache api', 'SQL', 'V115__permissions_for_cache_api.sql', 156437687, 'root', ' +2014-03-08 02:29:31 +', 147, 1), + (117, 117, '116 +', 'track currency for journal entries', 'SQL', 'V116__track_currency_for_journal_entries.sql', 1109139399, 'root', ' +2014-03-08 02:29:31 +', 613, 1), + (118, 118, '117 +', 'loan charge from savings', 'SQL', 'V117__loan_charge_from_savings.sql', 13633826, 'root', ' +2014-03-08 02:29:32 +', 942, 1), + (119, 119, '118 +', 'savings charge', 'SQL', 'V118__savings_charge.sql', 899101813, 'root', ' +2014-03-08 02:29:33 +', 522, 1), + (120, 120, '118.1 +', 'savings charge patch update', 'SQL', 'V118_1__savings_charge_patch_update.sql', 426133125, 'root', ' +2014-03-08 02:29:34 +', 304, 1), + (121, 121, '118.2 +', 'product mapping delete duplicate fund source to account mappings', 'SQL', 'V118_2__product_mapping_delete_duplicate_fund_source_to_account_mappings.sql', 139468093, 'root', ' +2014-03-08 02:29:34 +', 3, 1), + (122, 122, '118.3 +', 'permissions form propose and accept client transfers', 'SQL', 'V118_3__permissions_form_propose_and_accept_client_transfers.sql', 602708322, 'root', ' +2014-03-08 02:29:34 +', 26, 1), + (123, 123, '118.4 +', 'reset default transfers in suspense account for existing savings products', 'SQL', 'V118_4__reset_default_transfers_in_suspense_account_for_existing_savings_products.sql', 1246865828, 'root', ' +2014-03-08 02:29:34 +', 7, 1), + (124, 124, '118.5 +', 'batch job entry for pay savings charge', 'SQL', 'V118_5__batch_job_entry_for_pay_savings_charge.sql', -1477017272, 'root', ' +2014-03-08 02:29:34 +', 34, 1), + (125, 125, '118.6 +', 'defaults for income from penalties for savings product', 'SQL', 'V118_6__defaults_for_income_from_penalties_for savings_product.sql', 255024118, 'root', ' +2014-03-08 02:29:34 +', 3, 1), + (126, 126, '118.7 +', 'move withdrawal annual fee to charges', 'SQL', 'V118_7__move_withdrawal_annual_fee_to_charges.sql', 480656720, 'root', ' +2014-03-08 02:29:35 +', 1079, 1), + (127, 127, '118.8 +', 'track overpayments seperately in loan transactions', 'SQL', 'V118_8__track_overpayments_seperately_in_loan_transactions.sql', 1684107411, 'root', ' +2014-03-08 02:29:36 +', 342, 1), + (128, 128, '119 +', 'add template table', 'SQL', 'V119__add_template_table.sql', 1524629249, 'root', ' +2014-03-08 02:29:36 +', 388, 1), + (12, 12, '12 +', 'add external id to couple of tables', 'SQL', 'V12__add_external_id_to_couple_of_tables.sql', 371833586, 'root', ' +2014-03-08 02:28:45 +', 1332, 1), + (129, 129, '120 +', 'accounting running balance', 'SQL', 'V120__accounting_running_balance.sql', 746738547, 'root', ' +2014-03-08 02:29:37 +', 619, 1), + (130, 130, '121 +', 'accounting running balance for organization', 'SQL', 'V121__accounting_running_balance_for_organization.sql', 1907762382, 'root', ' +2014-03-08 02:29:38 +', 488, 1), + (131, 131, '122 +', 'recurring fee support for savings', 'SQL', 'V122__recurring_fee_support_for_savings.sql', -1538770236, 'root', ' +2014-03-08 02:29:38 +', 527, 1), + (132, 132, '123 +', 'remove payment mode for savings', 'SQL', 'V123__remove_payment_mode_for_savings.sql', 1909778922, 'root', ' +2014-03-08 02:29:39 +', 186, 1), + (133, 133, '124 +', 'added min max cap for charges', 'SQL', 'V124__added_min_max_cap_for_charges.sql', -1996899270, 'root', ' +2014-03-08 02:29:39 +', 472, 1), + (134, 134, '125 +', 'added column for actual fee amount or percentage', 'SQL', 'V125__added_column_for_actual_fee_amount_or_percentage.sql', -87760502, 'root', ' +2014-03-08 02:29:40 +', 230, 1), + (135, 135, '126 +', 'initial database structure for sms outbound', 'SQL', 'V126__initial_database_structure_for_sms_outbound.sql', -586195149, 'root', ' +2014-03-08 02:29:40 +', 252, 1), + (136, 136, '127 +', 'mobile no fields', 'SQL', 'V127__mobile_no_fields.sql', -659228285, 'root', ' +2014-03-08 02:29:40 +', 417, 1), + (137, 137, '128 +', 'added loan installment charge', 'SQL', 'V128__added_loan_installment_charge.sql', -1983585024, 'root', ' +2014-03-08 02:29:41 +', 145, 1), + (138, 138, '129 +', 'client and group timeline', 'SQL', 'V129__client_and_group_timeline.sql', -1671377251, 'root', ' +2014-03-08 02:29:42 +', 840, 1), + (13, 13, '13 +', 'add group and client pending configuration', 'SQL', 'V13__add_group_and_client_pending_configuration.sql', 145878397, 'root', ' +2014-03-08 02:28:46 +', 58, 1), + (139, 139, '130 +', 'calendar-history-table', 'SQL', 'V130__calendar-history-table.sql', -475045678, 'root', ' +2014-03-08 02:29:42 +', 180, 1), + (140, 140, '131 +', 'holiday-status-column-and-permissions', 'SQL', 'V131__holiday-status-column-and-permissions.sql', -1387001593, 'root', ' +2014-03-08 02:29:43 +', 862, 1), + (141, 141, '132 +', 'borrower cycle changes', 'SQL', 'V132__borrower_cycle_changes.sql', -355052428, 'root', ' +2014-03-08 02:29:44 +', 579, 1), + (142, 142, '133 +', 'adding payment detail with journal entry', 'SQL', 'V133__adding_payment_detail_with_journal_entry.sql', 1975659943, 'root', ' +2014-03-08 02:29:44 +', 399, 1), + (143, 143, '134 +', 'added column value on c configuration', 'SQL', 'V134__added_column_value_on_c_configuration.sql', -30626232, 'root', ' +2014-03-08 02:29:45 +', 495, 1), + (144, 144, '134.1 +', 'submitted date updation for clients', 'SQL', 'V134_1__submitted_date_updation_for_clients.sql', 184599342, 'root', ' +2014-03-08 02:29:45 +', 7, 1), + (145, 145, '134.2 +', 'permissions spelling correction', 'SQL', 'V134_2__permissions_spelling_correction.sql', 996960341, 'root', ' +2014-03-08 02:29:45 +', 73, 1), + (146, 146, '135 +', 'added permission for undo written off', 'SQL', 'V135__added_permission_for_undo_written_off.sql', 1414936537, 'root', ' +2014-03-08 02:29:45 +', 50, 1), + (147, 147, '136.1 +', 'update script strechy parameter', 'SQL', 'V136_1__update_script_strechy_parameter.sql', 633461657, 'root', ' +2014-03-08 02:29:46 +', 56, 1), + (148, 148, '137 +', 'added is active column in m staff', 'SQL', 'V137__added_is_active_column_in_m_staff.sql', 1962782431, 'root', ' +2014-03-08 02:29:46 +', 494, 1), + (149, 149, '138 +', 'add short name for m product loan and m savings product', 'SQL', 'V138__add_short_name_for_m_product_loan_and_m_savings_product.sql', -1526828084, 'root', ' +2014-03-08 02:29:51 +', 4619, 1), + (150, 150, '139 +', 'default value for is active updated to true in m staff', 'SQL', 'V139__default_value_for_is_active_updated_to_true_in_m_staff.sql', 844329308, 'root', ' +2014-03-08 02:29:52 +', 569, 1), + (14, 14, '14 +', 'rename status id to enum', 'SQL', 'V14__rename_status_id_to_enum.sql', 1958382098, 'root', ' +2014-03-08 02:28:46 +', 532, 1), + (151, 151, '140 +', 'added loan charge status', 'SQL', 'V140__added_loan_charge_status.sql', 1209971905, 'root', ' +2014-03-08 02:29:53 +', 657, 1), + (152, 152, '140.1 +', 'added payment detail id in ac gl journal entry', 'SQL', 'V140_1__added_payment_detail_id_in_ac_gl_journal_entry.sql', -214253481, 'root', ' +2014-03-08 02:29:53 +', 664, 1), + (153, 153, '141 +', 'add early repayment strategy', 'SQL', 'V141__add_early_repayment_strategy.sql', 401969634, 'root', ' +2014-03-08 02:29:54 +', 56, 1), + (154, 154, '142 +', 'read savingsaccount charge permission', 'SQL', 'V142__read_savingsaccount_charge_permission.sql', -1798083956, 'root', ' +2014-03-08 02:29:54 +', 64, 1), + (155, 155, '143 +', 'create journalentry checker permission', 'SQL', 'V143__create_journalentry_checker_permission.sql', 227507002, 'root', ' +2014-03-08 02:29:54 +', 57, 1), + (156, 156, '144 +', 'spelling mistake corrections', 'SQL', 'V144__spelling_mistake_corrections.sql', -778391100, 'root', ' +2014-03-08 02:29:55 +', 547, 1), + (157, 157, '145 +', 'add force password reset in c configuration', 'SQL', 'V145__add_force_password_reset_in_c_configuration.sql', -662441756, 'root', ' +2014-03-08 02:29:57 +', 2286, 1), + (158, 158, '146 +', 'tranche loans', 'SQL', 'V146__tranche_loans.sql', 989126672, 'root', ' +2014-03-08 02:30:02 +', 4290, 1), + (159, 159, '147 +', 'tranche loans column name changes', 'SQL', 'V147__tranche_loans_column_name_changes.sql', -533159256, 'root', ' +2014-03-08 02:30:03 +', 812, 1), + (160, 160, '148 +', 'overdraft changes', 'SQL', 'V148__overdraft_changes.sql', -1470217992, 'root', ' +2014-03-08 02:30:07 +', 3837, 1), + (161, 161, '149 +', 'add created date savings transaction', 'SQL', 'V149__add_created_date_savings_transaction.sql', 137884095, 'root', ' +2014-03-08 02:30:08 +', 772, 1), + (15, 15, '15 +', 'center permissions', 'SQL', 'V15__center_permissions.sql', 1124247014, 'root', ' +2014-03-08 02:28:46 +', 28, 1), + (162, 162, '150 +', 'basic savings report', 'SQL', 'V150__basic_savings_report.sql', -1500021911, 'root', ' +2014-03-08 02:30:09 +', 1191, 1), + (163, 163, '151 +', 'add default savings account to client', 'SQL', 'V151__add_default_savings_account_to_client.sql', -2012873976, 'root', ' +2014-04-03 03:47:49 +', 105, 1), + (164, 164, '152 +', 'added grace for over due', 'SQL', 'V152__added_grace_for_over_due.sql', 1917777205, 'root', ' +2014-04-03 03:47:49 +', 170, 1), + (165, 165, '153 +', 'Insert missed permissions', 'SQL', 'V153__Insert_missed_permissions.sql', -1693091937, 'root', ' +2014-04-03 03:47:49 +', 13, 1), + (166, 166, '154 +', 'aging details', 'SQL', 'V154__aging_details.sql', 1117759702, 'root', ' +2014-04-03 03:47:49 +', 14, 1), + (167, 167, '155 +', 'stretchy into pentaho', 'SQL', 'V155__stretchy_into_pentaho.sql', -1836158085, 'root', ' +2014-04-03 03:47:49 +', 137, 1), + (168, 168, '156 +', 'added loan saving txns pentaho', 'SQL', 'V156__added_loan_saving_txns_pentaho.sql', 1942570756, 'root', ' +2014-04-03 03:47:49 +', 6, 1), + (169, 169, '157 +', 'overdue charge improvements', 'SQL', 'V157__overdue_charge_improvements.sql', -1267720651, 'root', ' +2014-04-03 03:47:50 +', 106, 1), + (170, 170, '158 +', 'dashboard and navigation queries', 'SQL', 'V158__dashboard_and_navigation_queries.sql', -265915721, 'root', ' +2014-04-03 03:47:50 +', 14, 1), + (171, 171, '159 +', 'add transaction id column m portfolio command source', 'SQL', 'V159__add_transaction_id_column_m_portfolio_command_source.sql', -1834626647, 'root', ' +2014-05-01 23:10:29 +', 2615, 1), + (16, 16, '16 +', 'drop min max column on loan table', 'SQL', 'V16__drop_min_max_column_on_loan_table.sql', -1497882087, 'root', ' +2014-03-08 02:28:47 +', 275, 1), + (172, 172, '160 +', 'standing instruction changes', 'SQL', 'V160__standing_instruction_changes.sql', -2130923257, 'root', ' +2014-05-01 23:10:35 +', 5658, 1), + (173, 191, '160.2 +', 'Allow nullValue For principal on lonProduct', 'SQL', 'V160_2__Allow_nullValue_For_principal_on_lonProduct.sql', 844844635, 'root', ' +2014-07-11 06:57:59 +', 1699, 1), + (174, 173, '161 +', 'added accrual batch job', 'SQL', 'V161__added_accrual_batch_job.sql', -1558441026, 'root', ' +2014-05-01 23:10:36 +', 813, 1), + (175, 174, '162 +', 'overdue charge batch job', 'SQL', 'V162__overdue_charge_batch_job.sql', -1213828784, 'root', ' +2014-05-01 23:10:36 +', 15, 1), + (176, 175, '163 +', 'added npa for loans', 'SQL', 'V163__added_npa_for_loans.sql', -381581272, 'root', ' +2014-05-01 23:10:41 +', 4713, 1), + (177, 176, '164 +', 'fd and rd deposit tables', 'SQL', 'V164__fd_and_rd_deposit_tables.sql', -489803231, 'root', ' +2014-05-01 23:10:48 +', 7168, 1), + (178, 177, '165 +', 'added permission for disburse to saving account', 'SQL', 'V165__added_permission_for_disburse_to_saving_account.sql', -2109143723, 'root', ' +2014-05-01 23:10:48 +', 100, 1), + (179, 178, '166 +', 'added deposit amount to product term and preclosure', 'SQL', 'V166__added_deposit_amount_to_product_term_and_preclosure.sql', -2068527520, 'root', ' +2014-05-01 23:10:50 +', 1411, 1), + (180, 179, '167 +', 'added columns for writtenOff loans recovered', 'SQL', 'V167__added_columns_for_writtenOff_loans_recovered.sql', -901133645, 'root', ' +2014-06-11 21:39:12 +', 3242, 1), + (181, 180, '168 +', 'added transfer fixed deposit interest to linked account', 'SQL', 'V168__added_transfer_fixed_deposit_interest_to_linked_account.sql', 1513454871, 'root', ' +2014-06-11 21:39:15 +', 2239, 1), + (182, 181, '169 +', 'update dashboard reports to core reports use report to false', 'SQL', 'V169__update_dashboard_reports_to_core_reports_use_report_to_false.sql', 1910199831, 'root', ' +2014-06-11 21:39:15 +', 39, 1), + (17, 17, '17 +', 'update stretchy reporting ddl', 'SQL', 'V17__update_stretchy_reporting_ddl.sql', 2040068410, 'root', ' +2014-03-08 02:28:48 +', 1519, 1), + (183, 182, '170 +', 'update deposit accounts maturity details job', 'SQL', 'V170__update_deposit_accounts_maturity_details_job.sql', 348328732, 'root', ' +2014-06-11 21:39:15 +', 31, 1), + (184, 183, '171 +', 'added mandatory savings and rd changes', 'SQL', 'V171__added_mandatory_savings_and_rd_changes.sql', -219494664, 'root', ' +2014-06-11 21:39:21 +', 5645, 1), + (185, 184, '172 +', 'accounting changes for transfers', 'SQL', 'V172__accounting_changes_for_transfers.sql', 1989818135, 'root', ' +2014-06-11 21:39:22 +', 1052, 1), + (186, 185, '173 +', 'ppi', 'SQL', 'V173__ppi.sql', -2061337506, 'root', ' +2014-06-11 21:39:25 +', 3126, 1), + (187, 186, '174 +', 'remove interest accrual', 'SQL', 'V174__remove_interest_accrual.sql', 1343795196, 'root', ' +2014-06-11 21:39:25 +', 3, 1), + (188, 187, '175 +', 'added incentive interest rates', 'SQL', 'V175__added_incentive_interest_rates.sql', 1609110836, 'root', ' +2014-06-11 21:39:33 +', 7507, 1), + (189, 188, '176 +', 'updates to financial activity accounts', 'SQL', 'V176__updates_to_financial_activity_accounts.sql', 242225588, 'root', ' +2014-06-17 05:16:55 +', 2330, 1), + (190, 189, '177 +', 'cleanup for client incentives', 'SQL', 'V177__cleanup_for_client_incentives.sql', -2131344758, 'root', ' +2014-06-17 05:16:56 +', 36, 1), + (191, 190, '178 +', 'updates to financial activity accounts pt2', 'SQL', 'V178__updates_to_financial_activity_accounts_pt2.sql', -417659005, 'root', ' +2014-06-17 05:16:56 +', 40, 1), + (192, 192, '179 +', 'updates to action names for maker checker permissions', 'SQL', 'V179__updates_to_action_names_for_maker_checker_permissions.sql', -239637884, 'root', ' +2014-07-11 06:57:59 +', 163, 1), + (18, 18, '18 +', 'update stretchy reporting reportSql', 'SQL', 'V18__update_stretchy_reporting_reportSql.sql', -170206095, 'root', ' +2014-03-08 02:28:48 +', 29, 1), + (193, 193, '180 +', 'update report schemas for disbursed vs awaitingdisbursal and groupnamesbystaff', 'SQL', 'V180__update_report_schemas_for_disbursed_vs_awaitingdisbursal_and_groupnamesbystaff.sql', -478172694, 'root', ' +2014-07-11 06:57:59 +', 43, 1), + (194, 194, '181 +', 'standing instruction logging', 'SQL', 'V181__standing_instruction_logging.sql', -259580241, 'root', ' +2014-07-11 06:58:00 +', 848, 1), + (195, 195, '182 +', 'added min required balance to savings product', 'SQL', 'V182__added_min_required_balance_to_savings_product.sql', -2083442779, 'root', ' +2014-07-11 06:58:03 +', 2500, 1), + (196, 196, '183 +', 'added min balance for interest calculation', 'SQL', 'V183__added_min_balance_for_interest_calculation.sql', -1892956044, 'root', ' +2014-07-11 06:58:05 +', 2157, 1), + (197, 197, '184 +', 'update min required balance for savings product', 'SQL', 'V184__update_min_required_balance_for_savings_product.sql', -978631870, 'root', ' +2014-07-11 06:58:06 +', 618, 1), + (198, 198, '185 +', 'add accrual till date for periodic accrual', 'SQL', 'V185__add_accrual_till_date_for_periodic_accrual.sql', 1925372415, 'root', ' +2014-10-15 04:49:45 +', 3845, 1), + (199, 199, '186 +', 'added periodic accrual job', 'SQL', 'V186__added_periodic_accrual_job.sql', 292417488, 'root', ' +2014-10-15 04:49:45 +', 71, 1), + (200, 200, '187 +', 'added permission to periodic accrual', 'SQL', 'V187__added_permission_to_periodic_accrual.sql', 1479836850, 'root', ' +2014-10-15 04:49:45 +', 24, 1), + (201, 201, '188 +', 'add savingscharge inactivate permissions', 'SQL', 'V188__add_savingscharge_inactivate_permissions.sql', 2095096043, 'root', ' +2014-10-15 04:49:46 +', 945, 1), + (202, 202, '189 +', 'm loan interest recalculation tables', 'SQL', 'V189__m_loan_interest_recalculation_tables.sql', -61157169, 'root', ' +2014-10-15 04:49:53 +', 6949, 1), + (19, 19, '19 +', 'report maintenance permissions', 'SQL', 'V19__report_maintenance_permissions.sql', -1528956905, 'root', ' +2014-03-08 02:28:49 +', 26, 1), + (203, 203, '190 +', 'add associategroup disassociategroup permissions', 'SQL', 'V190__add_associategroup_disassociategroup_permissions.sql', 296284732, 'root', ' +2014-10-15 04:49:53 +', 30, 1), + (204, 204, '191 +', 'update gl account increase size of name col', 'SQL', 'V191__update_gl_account_increase_size_of_name_col.sql', -247079901, 'root', ' +2014-10-15 04:49:55 +', 1552, 1), + (205, 205, '192 +', 'interest recalculate job', 'SQL', 'V192__interest_recalculate_job.sql', 589462859, 'root', ' +2014-10-15 04:49:55 +', 43, 1), + (206, 206, '193 +', 'added column joiningDate for staff', 'SQL', 'V193__added_column_joiningDate_for_staff.sql', 586097114, 'root', ' +2014-10-15 04:49:56 +', 1100, 1), + (207, 207, '194 +', 'added recalculatedInterestComponent for interest recalculation', 'SQL', 'V194__added_recalculatedInterestComponent_for_interest_recalculation.sql', 1691292674, 'root', ' +2014-10-15 04:49:57 +', 815, 1), + (208, 208, '195 +', 'moved rest frequency to product level', 'SQL', 'V195__moved_rest_frequency_to_product_level.sql', 1697161943, 'root', ' +2014-10-15 04:49:59 +', 1551, 1), + (209, 209, '196 +', 'added loan running balance to transactions', 'SQL', 'V196__added_loan_running_balance_to_transactions.sql', 320541466, 'root', ' +2014-10-15 04:50:00 +', 1091, 1), + (210, 210, '197 +', 'updated loan running balance of transactions', 'SQL', 'V197__updated_loan_running_balance_of_transactions.sql', 514142390, 'root', ' +2014-10-15 04:50:00 +', 360, 1), + (211, 211, '198 +', 'loan rescheduling tables and permissions', 'SQL', 'V198__loan_rescheduling_tables_and_permissions.sql', 320951317, 'root', ' +2014-10-15 04:50:05 +', 4569, 1), + (212, 212, '199 +', 'removed extra columns from schedule history', 'SQL', 'V199__removed_extra_columns_from_schedule_history.sql', -885550667, 'root', ' +2014-10-15 04:50:06 +', 695, 1), + (2, 2, '2 +', 'mifosx-base-reference-data-utf8', 'SQL', 'V2__mifosx-base-reference-data-utf8.sql', 1316484475, 'root', ' +2014-03-08 02:28:38 +', 106, 1), + (20, 20, '20 +', 'report maint perms really configuration', 'SQL', 'V20__report_maint_perms_really_configuration.sql', -402845015, 'root', ' +2014-03-08 02:28:49 +', 31, 1), + (213, 213, '200 +', 'alter savings account for start interest calculation date', 'SQL', 'V200__alter_savings_account_for_start_interest_calculation_date.sql', 338554725, 'root', ' +2014-10-15 04:50:07 +', 1303, 1), + (214, 214, '201 +', 'webhooks', 'SQL', 'V201__webhooks.sql', 1446707293, 'root', ' +2014-10-15 04:50:10 +', 3093, 1), + (215, 215, '202 +', 'savings officer history table', 'SQL', 'V202__savings_officer_history_table.sql', 445151847, 'root', ' +2014-10-15 04:50:11 +', 672, 1), + (216, 216, '203 +', 'added subbmittedDate loantransaction', 'SQL', 'V203__added_subbmittedDate_loantransaction.sql', 481117136, 'root', ' +2014-10-15 04:50:13 +', 1698, 1), + (217, 217, '204 +', 'insert script for charges paid by for accruals', 'SQL', 'V204__insert_script_for_charges_paid_by_for_accruals.sql', 1126139057, 'root', ' +2014-10-15 04:50:13 +', 4, 1), + (218, 218, '205 +', 'fix for charge and interest waiver with accruals', 'SQL', 'V205__fix_for_charge_and_interest_waiver_with_accruals.sql', 620191357, 'root', ' +2014-11-02 18:54:39 +', 2022, 1), + (219, 219, '206 +', 'interest posting configuration', 'SQL', 'V206__interest_posting_configuration.sql', -1024393207, 'root', ' +2014-11-02 18:54:40 +', 948, 1), + (220, 220, '207 +', 'min max clients per group', 'SQL', 'V207__min_max_clients_per_group.sql', -2069742774, 'root', ' +2014-12-23 22:35:48 +', 923, 1), + (221, 221, '208 +', 'min max clients in group redux', 'SQL', 'V208__min_max_clients_in_group_redux.sql', 1253715309, 'root', ' +2014-12-23 22:35:49 +', 764, 1), + (222, 222, '209 +', 'add all report names in m permission table', 'SQL', 'V209__add_all_report_names_in_m_permission_table.sql', -801564857, 'root', ' +2014-12-23 22:35:49 +', 177, 1), + (21, 21, '21 +', 'activation-permissions-for-clients', 'SQL', 'V21__activation-permissions-for-clients.sql', -569932376, 'root', ' +2014-03-08 02:28:49 +', 328, 1), + (223, 223, '210 +', 'track manually adjusted transactions', 'SQL', 'V210__track_manually_adjusted_transactions.sql', 228516334, 'root', ' +2014-12-23 22:35:51 +', 1242, 1), + (224, 224, '211 +', 'minimum days between disbursal and first repayment', 'SQL', 'V211__minimum_days_between_disbursal_and_first_repayment.sql', 888628428, 'root', ' +2014-12-23 22:35:53 +', 1831, 1), + (225, 225, '212 +', 'add NthDay and DayOfWeek columns loan', 'SQL', 'V212__add_NthDay_and_DayOfWeek_columns_loan.sql', 1949824258, 'root', ' +2014-12-23 22:35:56 +', 3064, 1), + (226, 226, '213 +', 'NthDay and DayOfWeek columns should be nullable', 'SQL', 'V213__NthDay_and_DayOfWeek_columns_should_be_nullable.sql', 1399365002, 'root', ' +2014-12-23 22:36:00 +', 4338, 1), + (227, 227, '214 +', 'alter table add create SI at disbursement', 'SQL', 'V214__alter_table_add_create_SI_at_disbursement.sql', -154407476, 'root', ' +2014-12-23 22:36:03 +', 3021, 1), + (228, 228, '215 +', 'guarantee on hold fund changes', 'SQL', 'V215__guarantee_on_hold_fund_changes.sql', 303524926, 'root', ' +2014-12-23 22:36:08 +', 5060, 1), + (229, 229, '216 +', 'adding loan proposed amount to loan', 'SQL', 'V216__adding_loan_proposed_amount_to_loan.sql', 348182179, 'root', ' +2014-12-23 22:36:13 +', 4172, 1), + (230, 230, '217 +', 'client substatus and codevalue description', 'SQL', 'V217__client_substatus_and_codevalue_description.sql', 1679310398, 'root', ' +2014-12-23 22:36:20 +', 7286, 1), + (231, 231, '218 +', 'add user and datetime for loan savings transactions', 'SQL', 'V218__add_user_and_datetime_for_loan_savings_transactions.sql', -1058697092, 'root', ' +2014-12-23 22:36:23 +', 2416, 1), + (232, 232, '219 +', 'guarantor on hold fund changes for account', 'SQL', 'V219__guarantor_on_hold_fund_changes_for_account.sql', 1081934247, 'root', ' +2014-12-23 22:36:34 +', 10673, 1), + (22, 22, '22 +', 'alter-group-for-consistency-add-permissions', 'SQL', 'V22__alter-group-for-consistency-add-permissions.sql', 578271556, 'root', ' +2014-03-08 02:28:50 +', 841, 1), + (233, 233, '220 +', 'account number preferences', 'SQL', 'V220__account_number_preferences.sql', -502873750, 'root', ' +2014-12-23 22:36:35 +', 1295, 1), + (234, 234, '221 +', 'add version for m savings account', 'SQL', 'V221__add_version_for_m_savings_account.sql', 863858591, 'root', ' +2014-12-23 22:36:38 +', 2521, 1), + (235, 235, '222 +', 'guarantor on hold fund changes for transactions', 'SQL', 'V222__guarantor_on_hold_fund_changes_for_transactions.sql', -1709074177, 'root', ' +2014-12-23 22:36:43 +', 5200, 1), + (236, 236, '223 +', 'add version for m loan account', 'SQL', 'V223__add_version_for_m_loan_account.sql', -973851712, 'root', ' +2014-12-23 22:36:49 +', 5675, 1), + (237, 237, '224 +', 'client lifecycle adding statuses', 'SQL', 'V224__client_lifecycle_adding_statuses.sql', -289697454, 'root', ' +2014-12-23 22:37:01 +', 11533, 1), + (238, 238, '225 +', 'permissions for updating recurring deposit amount', 'SQL', 'V225__permissions_for_updating_recurring_deposit_amount.sql', -1367144205, 'root', ' +2014-12-23 22:37:01 +', 41, 1), + (239, 239, '226 +', 'configuration for enforcing calendars for jlg loans', 'SQL', 'V226__configuration_for_enforcing_calendars_for_jlg_loans.sql', -382855919, 'root', ' +2014-12-23 22:37:01 +', 31, 1), + (240, 240, '227 +', 'loan-refund-permissions', 'SQL', 'V227__loan-refund-permissions.sql', 2141152676, 'root', ' +2014-12-23 22:37:01 +', 242, 1), + (241, 241, '228 +', 'entity to entity access', 'SQL', 'V228__entity_to_entity_access.sql', -1244421071, 'root', ' +2014-12-23 22:37:03 +', 1255, 1), + (242, 242, '229 +', 'teller cash management', 'SQL', 'V229__teller_cash_management.sql', 753724982, 'root', ' +2014-12-23 22:37:05 +', 2441, 1), + (23, 23, '23 +', 'remove-enable-disable-configuration-for-client-group-status', 'SQL', 'V23__remove-enable-disable-configuration-for-client-group-status.sql', -832390233, 'root', ' +2014-03-08 02:28:50 +', 295, 1), + (243, 243, '230 +', 'role status and correspoding permissions', 'SQL', 'V230__role_status_and_correspoding_permissions.sql', -21174595, 'root', ' +2015-04-16 14:58:42 +', 131, 1), + (244, 244, '231 +', 'm cashier transaction added currency code', 'SQL', 'V231__m_cashier_transaction_added_currency_code.sql', -1593672561, 'root', ' +2015-04-16 14:58:42 +', 33, 1), + (245, 245, '232 +', 'insert center closure reason', 'SQL', 'V232__insert_center_closure_reason.sql', -2049914418, 'root', ' +2015-04-16 14:58:42 +', 2, 1), + (246, 246, '233 +', 'Savings Transaction Receipt', 'SQL', 'V233__Savings_Transaction_Receipt.sql', 1836289382, 'root', ' +2015-04-16 14:58:42 +', 16, 1), + (247, 247, '234 +', 'opening balaces setup', 'SQL', 'V234__opening_balaces_setup.sql', 1777198314, 'root', ' +2015-04-16 14:58:42 +', 30, 1), + (248, 248, '235 +', 'add ugd template id m hook', 'SQL', 'V235__add_ugd_template_id_m_hook.sql', 1120955673, 'root', ' +2015-04-16 14:58:42 +', 73, 1), + (249, 249, '236 +', 'individual collection sheet permissions', 'SQL', 'V236__individual_collection_sheet_permissions.sql', -66130238, 'root', ' +2015-04-16 14:58:42 +', 2, 1), + (250, 250, '237 +', 'add threshold config for last instalment', 'SQL', 'V237__add_threshold_config_for_last_instalment.sql', 412873149, 'root', ' +2015-04-16 14:58:42 +', 53, 1), + (251, 251, '238 +', 'update staff display name length', 'SQL', 'V238__update_staff_display_name_length.sql', -1003425306, 'root', ' +2015-04-16 14:58:42 +', 57, 1), + (252, 252, '239 +', 'Loan Transaction Receipt', 'SQL', 'V239__Loan_Transaction_Receipt.sql', -130819179, 'root', ' +2015-04-16 14:58:42 +', 3, 1), + (24, 24, '24 +', 'add-group-client-foreign-key-constraint-in-loan-table', 'SQL', 'V24__add-group-client-foreign-key-constraint-in-loan-table.sql', -621897624, 'root', ' +2014-03-08 02:28:51 +', 318, 1), + (253, 253, '240 +', 'arrears aging config for interest recalculation', 'SQL', 'V240__arrears_aging_config_for_interest_recalculation.sql', 674368034, 'root', ' +2015-04-16 14:58:42 +', 114, 1), + (254, 254, '241 +', 'fixed emi changes', 'SQL', 'V241__fixed_emi_changes.sql', 1943069939, 'root', ' +2015-04-16 14:58:42 +', 47, 1), + (255, 255, '242 +', 'entitytoentitymappingrelation', 'SQL', 'V242__entitytoentitymappingrelation.sql', -1770973716, 'root', ' +2015-04-16 14:58:42 +', 59, 1), + (256, 256, '243 +', 'alter loan disbursement details', 'SQL', 'V243__alter_loan_disbursement_details.sql', 1461060824, 'root', ' +2015-04-16 14:58:42 +', 31, 1), + (257, 257, '244 +', 'staff assignment history table', 'SQL', 'V244__staff_assignment_history_table.sql', -427095856, 'root', ' +2015-04-16 14:58:43 +', 30, 1), + (258, 258, '245 +', 'open rd changes', 'SQL', 'V245__open_rd_changes.sql', 2142566381, 'root', ' +2015-04-16 14:58:43 +', 2, 1), + (259, 259, '246 +', 'drop group client foreign key from m loan', 'SQL', 'V246__drop_group_client_foreign_key_from_m_loan.sql', -1721132405, 'root', ' +2015-04-16 14:58:43 +', 11, 1), + (260, 260, '247 +', 'consistency wrt spelling principalThresholdForLastInstalment', 'SQL', 'V247__consistency_wrt_spelling_principalThresholdForLastInstalment.sql', 1371980378, 'root', ' +2015-04-16 14:58:43 +', 9, 1), + (261, 261, '248 +', 'added password never expired to User', 'SQL', 'V248__added_password_never_expired_to_User.sql', -1800179163, 'root', ' +2015-04-16 14:58:43 +', 37, 1), + (262, 262, '249 +', 'workingdays permissions', 'SQL', 'V249__workingdays_permissions.sql', -1322891155, 'root', ' +2015-04-16 14:58:43 +', 3, 1), + (25, 25, '25 +', 'update client reports for status and activation change', 'SQL', 'V25__update_client_reports_for_status_and_activation_change.sql', -1426943124, 'root', ' +2014-03-08 02:28:51 +', 30, 1), + (263, 263, '250 +', 'password validation policy', 'SQL', 'V250__password_validation_policy.sql', 1197290340, 'root', ' +2015-04-16 14:58:43 +', 38, 1), + (264, 264, '251 +', 'paymentType table', 'SQL', 'V251__paymentType_table.sql', -1969329175, 'root', ' +2015-04-16 14:58:43 +', 117, 1), + (265, 265, '252 +', 'bug fix teller cash management', 'SQL', 'V252__bug_fix_teller_cash_management.sql', -736743970, 'root', ' +2015-04-16 14:58:43 +', 167, 1), + (266, 266, '253 +', 'product loan configurable attributes', 'SQL', 'V253__product_loan_configurable_attributes.sql', 1787268316, 'root', ' +2015-04-16 14:58:43 +', 15, 1), + (267, 267, '254 +', 'General Ledger Report', 'SQL', 'V254__General_Ledger_Report.sql', -186920768, 'root', ' +2015-04-16 14:58:43 +', 6, 1), + (268, 268, '255 +', 'pre close interest period config', 'SQL', 'V255__pre_close_interest_period_config.sql', 1383225707, 'root', ' +2015-04-16 14:58:43 +', 23, 1), + (269, 269, '256 +', 'Update script for General Ledger report', 'SQL', 'V256__Update script for General_Ledger_report.sql', 1918702942, 'root', ' +2015-04-16 14:58:43 +', 4, 1), + (270, 270, '257 +', 'staff image association', 'SQL', 'V257__staff_image_association.sql', 1740118046, 'root', ' +2015-04-16 14:58:43 +', 37, 1), + (271, 271, '258 +', 'interest compounding changes', 'SQL', 'V258__interest_compounding_changes.sql', 1484848861, 'root', ' +2015-05-19 04:50:26 +', 223, 1), + (272, 272, '259 +', 'alter working days', 'SQL', 'V259__alter_working_days.sql', 1733733251, 'root', ' +2015-05-19 04:50:26 +', 33, 1), + (26, 26, '26 +', 'add-support-for-withdrawal-fees-on-savings', 'SQL', 'V26__add-support-for-withdrawal-fees-on-savings.sql', -1955461568, 'root', ' +2014-03-08 02:28:52 +', 884, 1), + (273, 273, '260 +', 'alter password validation policy', 'SQL', 'V260__alter_password_validation_policy.sql', -853716637, 'root', ' +2015-05-19 04:50:26 +', 32, 1), + (274, 274, '261 +', 'Update script for Client Loan Account Schedule Report', 'SQL', 'V261__Update script for Client_Loan_Account_Schedule_Report.sql', 1873100628, 'root', ' +2015-09-06 17:49:04 +', 14, 1), + (275, 275, '262 +', 'accountNumber for groups', 'SQL', 'V262__accountNumber_for_groups.sql', -31083607, 'root', ' +2015-09-06 17:49:04 +', 123, 1), + (276, 276, '263 +', 'mifos reports', 'SQL', 'V263__mifos_reports.sql', -1358041795, 'root', ' +2015-09-06 17:49:04 +', 12, 1), + (277, 277, '264 +', 'insert paymenttype and report read permission', 'SQL', 'V264__insert_paymenttype_and_report_read_permission.sql', 984979503, 'root', ' +2015-09-06 17:49:04 +', 6, 1), + (278, 278, '265 +', 'modify external service schema', 'SQL', 'V265__modify_external_service_schema.sql', 1844344576, 'root', ' +2015-09-06 17:49:05 +', 290, 1), + (279, 279, '266 +', 'client fees', 'SQL', 'V266__client_fees.sql', 41332385, 'root', ' +2015-09-06 17:49:05 +', 111, 1), + (280, 280, '267 +', 'client transaction permissions', 'SQL', 'V267__client_transaction_permissions.sql', 130000057, 'root', ' +2015-09-06 17:49:05 +', 6, 1), + (281, 281, '268 +', 'update gmail password', 'SQL', 'V268__update_gmail_password.sql', 1723317114, 'root', ' +2015-09-06 17:49:05 +', 5, 1), + (282, 282, '269 +', 'increased calendar title length ', 'SQL', 'V269__increased_calendar_title_length .sql', 1780890645, 'root', ' +2015-09-06 17:49:05 +', 167, 1), + (27, 27, '27 +', 'add-loan-type-column-to-loan-table', 'SQL', 'V27__add-loan-type-column-to-loan-table.sql', -746287938, 'root', ' +2014-03-08 02:28:52 +', 344, 1), + (283, 283, '270 +', 'add rounding mode configuration', 'SQL', 'V270__add_rounding_mode_configuration.sql', 1195237290, 'root', ' +2015-09-06 17:49:05 +', 67, 1), + (284, 284, '271 +', 'accounting for client charges', 'SQL', 'V271__accounting_for_client_charges.sql', 1477443700, 'root', ' +2015-09-06 17:49:06 +', 204, 1), + (285, 285, '272 +', 'loan tranche disbursement charge', 'SQL', 'V272__loan_tranche_disbursement_charge.sql', 2018052750, 'root', ' +2015-09-06 17:49:06 +', 178, 1), + (286, 286, '273 +', 'oauth changes', 'SQL', 'V273__oauth_changes.sql', 1811521678, 'root', ' +2015-09-09 13:21:38 +', 98, 1), + (287, 287, '274 +', 'Loan Reschedule Code Value', 'SQL', 'V274__Loan_Reschedule_Code_Value.sql', -1190544276, 'root', ' +2015-09-15 18:00:15 +', 32, 1), + (288, 288, '275 +', 'loan transaction to repayment schedule mapping', 'SQL', 'V275__loan_transaction_to_repayment_schedule_mapping.sql', 1971001203, 'root', ' +2015-09-21 20:04:43 +', 471, 1), + (289, 289, '276 +', 'loan recalulated till date', 'SQL', 'V276__loan_recalulated_till_date.sql', 631764351, 'root', ' +2015-10-20 19:57:56 +', 1672, 1), + (290, 290, '277 +', 'Loan Product Provisioning', 'SQL', 'V277__Loan_Product_Provisioning.sql', -510229006, 'root', ' +2015-10-20 19:57:58 +', 2295, 1), + (291, 291, '278 +', 'LoanTransactionProcessingStrategy', 'SQL', 'V278__LoanTransactionProcessingStrategy.sql', -1388446419, 'root', ' +2015-11-04 17:03:01 +', 877, 1), + (292, 292, '279 +', 'floating rates', 'SQL', 'V279__floating_rates.sql', 830029264, 'root', ' +2015-11-18 16:13:09 +', 645, 1), + (28, 28, '28 +', 'accounting-abstractions-and-autoposting', 'SQL', 'V28__accounting-abstractions-and-autoposting.sql', -966431980, 'root', ' +2014-03-08 02:28:53 +', 556, 1), + (293, 293, '280 +', 'spm framework initial tables', 'SQL', 'V280__spm_framework_initial_tables.sql', -1638980235, 'root', ' +2015-12-02 16:07:45 +', 630, 1), + (294, 294, '281 +', 'add configuration param backdate-penalties', 'SQL', 'V281__add_configuration_param_backdate-penalties.sql', -45520299, 'root', ' +2015-12-02 16:07:45 +', 45, 1), + (295, 295, '282 +', 'CustomerSelfService', 'SQL', 'V282__CustomerSelfService.sql', -51763400, 'root', ' +2015-12-17 10:17:34 +', 255, 1), + (296, 296, '283 +', 'Variable Installments', 'SQL', 'V283__Variable_Installments.sql', -1104936867, 'root', ' +2016-01-12 17:39:21 +', 1966, 1), + (297, 297, '284 +', 'update codevalue', 'SQL', 'V284__update_codevalue.sql', 442711672, 'root', ' +2016-01-12 17:39:22 +', 457, 1), + (298, 298, '285 +', 'undo last tranche script', 'SQL', 'V285__undo_last_tranche_script.sql', 1551040289, 'root', ' +2016-01-12 17:39:22 +', 29, 1), + (299, 299, '286 +', 'partial period interest calcualtion', 'SQL', 'V286__partial_period_interest_calcualtion.sql', -1701869481, 'root', ' +2016-01-12 17:39:23 +', 1590, 1), + (300, 300, '287 +', 'alter spm scorecard', 'SQL', 'V287__alter_spm_scorecard.sql', 1834026952, 'root', ' +2016-01-20 18:23:20 +', 194, 1), + (301, 301, '288 +', 'overdraft interest', 'SQL', 'V288__overdraft_interest.sql', 2003058104, 'root', ' +2016-01-20 18:23:20 +', 307, 1), + (302, 302, '289 +', 'client non person', 'SQL', 'V289__client_non_person.sql', 1595576360, 'root', ' +2016-01-20 18:23:20 +', 277, 1), + (29, 29, '29 +', 'add-support-for-annual-fees-on-savings', 'SQL', 'V29__add-support-for-annual-fees-on-savings.sql', 992227725, 'root', ' +2014-03-08 02:28:55 +', 1556, 1), + (303, 303, '290 +', 'shares dividends permissions script', 'SQL', 'V290__shares_dividends_permissions_script.sql', -1504459497, 'root', ' +2016-01-20 18:23:21 +', 39, 1), + (304, 304, '291 +', 'organisation start date config', 'SQL', 'V291__organisation_start_date_config.sql', -1674309950, 'root', ' +2017-02-24 14:16:20 +', 564, 1), + (305, 305, '292 +', 'update organisation start date', 'SQL', 'V292__update_organisation_start_date.sql', 2016095558, 'root', ' +2017-02-24 14:16:20 +', 43, 1), + (306, 306, '293 +', 'interest rate chart support for amounts', 'SQL', 'V293__interest_rate_chart_support_for_amounts.sql', -1720908295, 'root', ' +2017-02-24 14:16:22 +', 1738, 1), + (307, 307, '294 +', 'configuration for paymnettype application forDisbursement charge', 'SQL', 'V294__configuration_for_paymnettype_application_forDisbursement_charge.sql', -754382065, 'root', ' +2017-02-24 14:16:22 +', 28, 1), + (308, 308, '295 +', 'configuration for interest charged date same as disbursal date', 'SQL', 'V295__configuration_for_interest_charged_date_same_as_disbursal_date.sql', -1113285243, 'root', ' +2017-02-24 14:16:23 +', 62, 1), + (309, 309, '296 +', 'skip repayment on first-day of month', 'SQL', 'V296__skip_repayment_on first-day_of_month.sql', -172630113, 'root', ' +2017-02-24 14:16:23 +', 31, 1), + (310, 310, '297 +', 'Adding Meeting Time column', 'SQL', 'V297__Adding_Meeting_Time_column.sql', -637673654, 'root', ' +2017-02-24 14:16:23 +', 399, 1), + (311, 311, '298 +', 'savings interest tax', 'SQL', 'V298__savings_interest_tax.sql', -1023309693, 'root', ' +2017-02-24 14:16:28 +', 5052, 1), + (312, 312, '299 +', 'share products', 'SQL', 'V299__share_products.sql', 1270845438, 'root', ' +2017-02-24 14:16:33 +', 4109, 1), + (3, 3, '3 +', 'mifosx-permissions-and-authorisation-utf8', 'SQL', 'V3__mifosx-permissions-and-authorisation-utf8.sql', 1922951887, 'root', ' +2014-03-08 02:28:38 +', 110, 1), + (30, 30, '30 +', 'add-referenceNumber-to-acc gl journal entry', 'SQL', 'V30__add-referenceNumber-to-acc_gl_journal_entry.sql', 2079970797, 'root', ' +2014-03-08 02:28:55 +', 327, 1), + (313, 313, '300 +', 'configuration for allow changing of emi amount', 'SQL', 'V300__configuration_for_allow_changing_of_emi_amount.sql', -490331317, 'root', ' +2017-02-24 14:16:34 +', 813, 1), + (314, 314, '301 +', 'recurring moratorium principal periods', 'SQL', 'V301__recurring_moratorium_principal_periods.sql', 816871436, 'root', ' +2017-02-24 14:16:35 +', 1744, 1), + (315, 315, '302 +', 'add status to client identifier', 'SQL', 'V302__add_status_to_client_identifier.sql', 1978862509, 'root', ' +2017-02-24 14:16:36 +', 668, 1), + (316, 316, '303 +', 'Savings Account Dormancy', 'SQL', 'V303__Savings_Account_Dormancy.sql', -533139714, 'root', ' +2017-02-24 14:16:37 +', 1218, 1), + (317, 317, '304 +', 'customer self service third party transfers', 'SQL', 'V304__customer_self_service_third_party_transfers.sql', -341614071, 'root', ' +2017-02-24 14:16:38 +', 307, 1), + (318, 318, '305 +', 'compounding and rest frequency nth day freq and insertion script for accrual job', 'SQL', 'V305__compounding_and_rest_frequency_nth_day_freq_and_insertion_script_for_accrual_job.sql', 710584648, 'root', ' +2017-02-24 14:16:42 +', 3933, 1), + (319, 319, '306 +', 'add domancy tracking job to savings group', 'SQL', 'V306__add_domancy_tracking_job_to_savings_group.sql', -2998873, 'root', ' +2017-02-24 14:16:42 +', 29, 1), + (320, 320, '307 +', 'add share notes', 'SQL', 'V307__add_share_notes.sql', -1950926410, 'root', ' +2017-02-24 14:16:43 +', 718, 1), + (321, 321, '308 +', 'add interest recalculation in savings account', 'SQL', 'V308__add_interest_recalculation_in_savings_account.sql', 1869901088, 'root', ' +2017-02-24 14:16:44 +', 621, 1), + (322, 322, '309 +', 'add loan write off reason code', 'SQL', 'V309__add_loan_write_off_reason_code.sql', 1221434865, 'root', ' +2017-02-24 14:16:46 +', 1461, 1), + (31, 31, '31 +', 'drop-autopostings', 'SQL', 'V31__drop-autopostings.sql', 630501407, 'root', ' +2014-03-08 02:28:55 +', 39, 1), + (323, 323, '310 +', 'copy data from entitytoentityaccess to entitytoentitymapping', 'SQL', 'V310__copy_data_from_entitytoentityaccess_to_entitytoentitymapping.sql', 1179078728, 'root', ' +2017-02-24 14:16:46 +', 3, 1), + (324, 324, '311 +', 'foreclosure details', 'SQL', 'V311__foreclosure_details.sql', 1236003234, 'root', ' +2017-02-24 14:16:47 +', 939, 1), + (325, 325, '312 +', 'add is mandatory to code value', 'SQL', 'V312__add_is_mandatory_to_code_value.sql', -1943949742, 'root', ' +2017-02-24 14:16:47 +', 639, 1), + (326, 326, '313 +', 'multi rescheduling script', 'SQL', 'V313__multi_rescheduling_script.sql', -1003845274, 'root', ' +2017-02-24 14:16:50 +', 2730, 1), + (327, 327, '314 +', 'updating r enum table', 'SQL', 'V314__updating_r_enum_table.sql', 780881263, 'root', ' +2017-02-24 14:16:50 +', 82, 1), + (328, 328, '315 +', 'add sync expected with disbursement date in m product loan', 'SQL', 'V315__add_sync_expected_with_disbursement_date_in_m_product_loan.sql', 553617808, 'root', ' +2017-02-24 14:16:51 +', 658, 1), + (329, 329, '316 +', 'address module tables metadat', 'SQL', 'V316__address_module_tables_metadat.sql', -776128404, 'root', ' +2017-02-24 14:16:53 +', 1139, 1), + (330, 330, '317 +', 'report mailing job module', 'SQL', 'V317__report_mailing_job_module.sql', -1917516805, 'root', ' +2017-02-24 14:16:54 +', 1173, 1), + (331, 331, '318 +', 'topuploan', 'SQL', 'V318__topuploan.sql', 590465441, 'root', ' +2017-02-24 14:16:56 +', 2073, 1), + (332, 332, '319 +', 'client undoreject', 'SQL', 'V319__client_undoreject.sql', -1615618857, 'root', ' +2017-02-24 14:16:57 +', 1032, 1), + (32, 32, '32 +', 'associate-disassociate-clients-from-group-permissions', 'SQL', 'V32__associate-disassociate-clients-from-group-permissions.sql', 765311507, 'root', ' +2014-03-08 02:28:55 +', 29, 1), + (333, 333, '320 +', 'add holiday payment reschedule', 'SQL', 'V320__add_holiday_payment_reschedule.sql', 1445492229, 'root', ' +2017-02-24 14:16:58 +', 545, 1), + (334, 334, '321 +', 'boolean field As Interest PostedOn', 'SQL', 'V321__boolean_field_As_Interest_PostedOn.sql', 1906735834, 'root', ' +2017-02-24 14:16:59 +', 658, 1), + (335, 335, '322 +', 'sms campaign', 'SQL', 'V322__sms_campaign.sql', -1316831815, 'root', ' +2017-02-24 14:17:00 +', 1608, 1), + (336, 336, '323 +', 'spm replace dead fk with exisiting one', 'SQL', 'V323__spm_replace_dead_fk_with_exisiting_one.sql', 656055500, 'root', ' +2017-02-24 14:17:01 +', 498, 1), + (337, 337, '324 +', 'datatable checks', 'SQL', 'V324__datatable_checks.sql', -142308095, 'root', ' +2017-02-24 14:17:02 +', 335, 1), + (33, 33, '33 +', 'drop unique check on stretchy report parameter', 'SQL', 'V33__drop_unique_check_on_stretchy_report_parameter.sql', -716768190, 'root', ' +2014-03-08 02:28:56 +', 253, 1), + (34, 34, '34 +', 'add unique check on stretchy report parameter', 'SQL', 'V34__add_unique_check_on_stretchy_report_parameter.sql', -1989718961, 'root', ' +2014-03-08 02:28:56 +', 254, 1), + (35, 35, '35 +', 'add hierarchy column for acc gl account', 'SQL', 'V35__add_hierarchy_column_for_acc_gl_account.sql', -1387013309, 'root', ' +2014-03-08 02:28:57 +', 300, 1), + (36, 36, '36 +', 'add tag id column for acc gl account', 'SQL', 'V36__add_tag_id_column_for_acc_gl_account.sql', -620418591, 'root', ' +2014-03-08 02:28:57 +', 404, 1), + (37, 37, '37 +', 'add-center-group-collection-sheet-permissions', 'SQL', 'V37__add-center-group-collection-sheet-permissions.sql', -1157429270, 'root', ' +2014-03-08 02:28:57 +', 32, 1), + (38, 38, '38 +', 'add-group-summary-details-report', 'SQL', 'V38__add-group-summary-details-report.sql', -1018394665, 'root', ' +2014-03-08 02:28:57 +', 36, 1), + (39, 39, '39 +', 'payment-channels-updates', 'SQL', 'V39__payment-channels-updates.sql', -1005512239, 'root', ' +2014-03-08 02:28:58 +', 1172, 1), + (4, 4, '4 +', 'mifosx-core-reports-utf8', 'SQL', 'V4__mifosx-core-reports-utf8.sql', -934709187, 'root', ' +2014-03-08 02:28:39 +', 287, 1), + (40, 40, '40 +', 'add permissions for accounting rule', 'SQL', 'V40__add_permissions_for_accounting_rule.sql', 1514233058, 'root', ' +2014-03-08 02:28:59 +', 37, 1), + (41, 41, '41 +', 'group-summary-reports', 'SQL', 'V41__group-summary-reports.sql', 263779795, 'root', ' +2014-03-08 02:28:59 +', 229, 1), + (42, 42, '42 +', 'Add default value for id for acc accounting rule', 'SQL', 'V42__Add_default_value_for_id_for_acc_accounting_rule.sql', 1068680120, 'root', ' +2014-03-08 02:28:59 +', 242, 1), + (43, 43, '43 +', 'accounting-for-savings', 'SQL', 'V43__accounting-for-savings.sql', 1965510021, 'root', ' +2014-03-08 02:29:00 +', 567, 1), + (44, 44, '44 +', 'document-increase-size-of-column-type', 'SQL', 'V44__document-increase-size-of-column-type.sql', 1264142829, 'root', ' +2014-03-08 02:29:00 +', 271, 1), + (45, 45, '45 +', 'create acc rule tags table', 'SQL', 'V45__create_acc_rule_tags_table.sql', -307868244, 'root', ' +2014-03-08 02:29:01 +', 189, 1), + (46, 46, '46 +', 'extend datatables api', 'SQL', 'V46__extend_datatables_api.sql', 297544230, 'root', ' +2014-03-08 02:29:01 +', 38, 1), + (47, 47, '47 +', 'staff-hierarchy-link-to-users', 'SQL', 'V47__staff-hierarchy-link-to-users.sql', 480254198, 'root', ' +2014-03-08 02:29:02 +', 868, 1), + (48, 48, '48 +', 'adding-S3-Support', 'SQL', 'V48__adding-S3-Support.sql', -280798781, 'root', ' +2014-03-08 02:29:03 +', 1276, 1), + (49, 49, '49 +', 'track-loan-charge-payment-transactions', 'SQL', 'V49__track-loan-charge-payment-transactions.sql', 170618680, 'root', ' +2014-03-08 02:29:03 +', 176, 1), + (5, 5, '5 +', 'update-savings-product-and-account-tables', 'SQL', 'V5__update-savings-product-and-account-tables.sql', 1171300485, 'root', ' +2014-03-08 02:28:39 +', 636, 1), + (50, 50, '50 +', 'add-grace-settings-to-loan-product', 'SQL', 'V50__add-grace-settings-to-loan-product.sql', 188244658, 'root', ' +2014-03-08 02:29:05 +', 926, 1), + (51, 51, '51 +', 'track-additional-details-related-to-installment-performance', 'SQL', 'V51__track-additional-details-related-to-installment-performance.sql', 2012793946, 'root', ' +2014-03-08 02:29:05 +', 602, 1), + (52, 52, '52 +', 'add boolean support cols to acc accounting rule', 'SQL', 'V52__add_boolean_support_cols_to_acc_accounting_rule.sql', 961668575, 'root', ' +2014-03-08 02:29:06 +', 501, 1), + (53, 53, '53 +', 'track-advance-and-late-payments-on-installment', 'SQL', 'V53__track-advance-and-late-payments-on-installment.sql', -230737076, 'root', ' +2014-03-08 02:29:06 +', 212, 1), + (54, 54, '54 +', 'charge-to-income-account-mappings', 'SQL', 'V54__charge-to-income-account-mappings.sql', 2064168495, 'root', ' +2014-03-08 02:29:07 +', 303, 1), + (55, 55, '55 +', 'add-additional-transaction-processing-strategies', 'SQL', 'V55__add-additional-transaction-processing-strategies.sql', 1186305896, 'root', ' +2014-03-08 02:29:07 +', 352, 1), + (56, 56, '56 +', 'track-overpaid-amount-on-loans', 'SQL', 'V56__track-overpaid-amount-on-loans.sql', 1455634018, 'root', ' +2014-03-08 02:29:07 +', 239, 1), + (57, 57, '57 +', 'add default values to debit and credit accounts acc accounting rule', 'SQL', 'V57__add_default_values_to_debit_and_credit_accounts_acc_accounting_rule.sql', 1936034654, 'root', ' +2014-03-08 02:29:08 +', 272, 1), + (58, 58, '58 +', 'create-holiday-tables changed', 'SQL', 'V58__create-holiday-tables_changed.sql', 878594707, 'root', ' +2014-03-08 02:29:08 +', 374, 1), + (59, 59, '59 +', 'add group roles schema and permissions', 'SQL', 'V59__add_group_roles_schema_and_permissions.sql', 2139634800, 'root', ' +2014-03-08 02:29:09 +', 259, 1), + (6, 6, '6 +', 'add min max principal column to loan', 'SQL', 'V6__add_min_max_principal_column_to_loan.sql', 21414779, 'root', ' +2014-03-08 02:28:40 +', 648, 1), + (60, 60, '60 +', 'quipo dashboard reports', 'SQL', 'V60__quipo_dashboard_reports.sql', -1414014218, 'root', ' +2014-03-08 02:29:09 +', 67, 1), + (61, 61, '61 +', 'txn running balance example', 'SQL', 'V61__txn_running_balance_example.sql', -1186179870, 'root', ' +2014-03-08 02:29:09 +', 43, 1), + (62, 62, '62 +', 'add staff id to m client changed', 'SQL', 'V62__add_staff_id_to_m_client_changed.sql', -903717279, 'root', ' +2014-03-08 02:29:09 +', 289, 1), + (63, 63, '63 +', 'add sync disbursement with meeting column to loan', 'SQL', 'V63__add_sync_disbursement_with_meeting_column_to_loan.sql', 1706011840, 'root', ' +2014-03-08 02:29:10 +', 298, 1), + (64, 64, '64 +', 'add permission for assign staff', 'SQL', 'V64__add_permission_for_assign_staff.sql', -1938102414, 'root', ' +2014-03-08 02:29:10 +', 36, 1), + (65, 65, '65 +', 'fix rupee symbol issues', 'SQL', 'V65__fix_rupee_symbol_issues.sql', 581612224, 'root', ' +2014-03-08 02:29:10 +', 33, 1), + (66, 66, '66 +', 'client close functionality', 'SQL', 'V66__client_close_functionality.sql', 225242657, 'root', ' +2014-03-08 02:29:10 +', 357, 1), + (67, 67, '67 +', 'loans in advance table', 'SQL', 'V67__loans_in_advance_table.sql', -2001051496, 'root', ' +2014-03-08 02:29:11 +', 126, 1), + (68, 68, '68 +', 'quipo dashboard reports updated', 'SQL', 'V68__quipo_dashboard_reports_updated.sql', -1241469930, 'root', ' +2014-03-08 02:29:11 +', 74, 1), + (69, 69, '69 +', 'loans in advance initialise', 'SQL', 'V69__loans_in_advance_initialise.sql', -1961764720, 'root', ' +2014-03-08 02:29:11 +', 44, 1), + (7, 7, '7 +', 'remove read makerchecker permission', 'SQL', 'V7__remove_read_makerchecker_permission.sql', -335430825, 'root', ' +2014-03-08 02:28:40 +', 37, 1), + (70, 70, '70 +', 'quipo program detail query fix', 'SQL', 'V70__quipo_program_detail_query_fix.sql', 961289260, 'root', ' +2014-03-08 02:29:11 +', 37, 1), + (71, 71, '71 +', 'insert reschedule repayment to configuration', 'SQL', 'V71__insert_reschedule_repayment_to_configuration.sql', -1148306529, 'root', ' +2014-03-08 02:29:11 +', 29, 1), + (72, 72, '72 +', 'add m loan counter changes', 'SQL', 'V72__add_m_loan_counter_changes.sql', 201544058, 'root', ' +2014-03-08 02:29:12 +', 487, 1), + (73, 73, '73 +', 'add repayments rescheduled to and processed column to holiday', 'SQL', 'V73__add_repayments_rescheduled_to_and_processed_column_to_holiday.sql', -1946338033, 'root', ' +2014-03-08 02:29:12 +', 265, 1), + (74, 74, '74 +', 'alter m loan counter table add group', 'SQL', 'V74__alter_m_loan_counter_table_add_group.sql', -889985683, 'root', ' +2014-03-08 02:29:13 +', 322, 1), + (75, 75, '75 +', 'add reschedule-repayments-on-holidays to configuration', 'SQL', 'V75__add_reschedule-repayments-on-holidays_to_configuration.sql', 1328301697, 'root', ' +2014-03-08 02:29:13 +', 24, 1), + (76, 76, '76 +', 'rename permission grouping', 'SQL', 'V76__rename_permission_grouping.sql', 1717580945, 'root', ' +2014-03-08 02:29:13 +', 28, 1), + (77, 77, '77 +', 'alter m product loan changes', 'SQL', 'V77__alter_m_product_loan_changes.sql', 677013677, 'root', ' +2014-03-08 02:29:13 +', 283, 1), + (78, 78, '78 +', 'breakdown portfolio grouping', 'SQL', 'V78__breakdown_portfolio_grouping.sql', -1385954232, 'root', ' +2014-03-08 02:29:13 +', 28, 1), + (79, 79, '79 +', 'schedule jobs tables', 'SQL', 'V79__schedule_jobs_tables.sql', 339707179, 'root', ' +2014-03-08 02:29:14 +', 435, 1), + (8, 8, '8 +', 'deposit-transaction-permissions-if-they-exist', 'SQL', 'V8__deposit-transaction-permissions-if-they-exist.sql', -1507997551, 'root', ' +2014-03-08 02:28:40 +', 6, 1), + (80, 80, '80 +', 'schedule jobs tables updates', 'SQL', 'V80__schedule_jobs_tables_updates.sql', -152869205, 'root', ' +2014-03-08 02:29:15 +', 1507, 1), + (81, 81, '81 +', 'savings related changes', 'SQL', 'V81__savings_related_changes.sql', 285284658, 'root', ' +2014-03-08 02:29:17 +', 1593, 1), + (82, 82, '82 +', 'schedule jobs tables updates for running status', 'SQL', 'V82__schedule_jobs_tables_updates_for_running_status.sql', -1029370098, 'root', ' +2014-03-08 02:29:18 +', 621, 1), + (83, 83, '83 +', 'non-working-days-table', 'SQL', 'V83__non-working-days-table.sql', -1092480574, 'root', ' +2014-03-08 02:29:18 +', 138, 1), + (84, 84, '84 +', 'undo savings transaction permission', 'SQL', 'V84__undo_savings_transaction_permission.sql', 1857641857, 'root', ' +2014-03-08 02:29:18 +', 31, 1), + (85, 85, '85 +', 'product mix related changes', 'SQL', 'V85__product_mix_related_changes.sql', -740767169, 'root', ' +2014-03-08 02:29:19 +', 484, 1), + (86, 86, '86 +', 'update-working-days', 'SQL', 'V86__update-working-days.sql', 1266232028, 'root', ' +2014-03-08 02:29:19 +', 45, 1), + (87, 87, '87 +', 'add permission for scheduler', 'SQL', 'V87__add_permission_for_scheduler.sql', -575950289, 'root', ' +2014-03-08 02:29:19 +', 27, 1), + (88, 88, '88 +', 'added update constrain for scheduler jobs', 'SQL', 'V88__added_update_constrain_for_scheduler_jobs.sql', 1579070736, 'root', ' +2014-03-08 02:29:20 +', 380, 1), + (89, 89, '89 +', 'added scheduler group', 'SQL', 'V89__added_scheduler_group.sql', -1538207332, 'root', ' +2014-03-08 02:29:20 +', 245, 1), + (9, 9, '9 +', 'add min max constraint column to loan loanproduct', 'SQL', 'V9__add_min_max_constraint_column_to_loan_loanproduct.sql', -2103326932, 'root', ' +2014-03-08 02:28:42 +', 1503, 1), + (90, 90, '90 +', 'client performance history reports', 'SQL', 'V90__client_performance_history_reports.sql', 35589718, 'root', ' +2014-03-08 02:29:20 +', 51, 1), + (91, 91, '91 +', 'apply annual fees permission', 'SQL', 'V91__apply_annual_fees_permission.sql', 440351308, 'root', ' +2014-03-08 02:29:20 +', 34, 1), + (92, 92, '91.1 +', 'configuration settings for holiday and non workingday', 'SQL', 'V91_1__configuration_settings_for_holiday_and_non_workingday.sql', -429561096, 'root', ' +2014-03-08 02:29:20 +', 25, 1), + (93, 93, '92 +', 'group center assign staff permission', 'SQL', 'V92__group_center_assign_staff_permission.sql', -1557846330, 'root', ' +2014-03-08 02:29:20 +', 21, 1), + (94, 94, '93 +', 'loan transaction external id', 'SQL', 'V93__loan_transaction_external_id.sql', 987684239, 'root', ' +2014-03-08 02:29:21 +', 252, 1), + (95, 95, '94 +', 'added savings accont type', 'SQL', 'V94__added_savings_accont type.sql', 623078091, 'root', ' +2014-03-08 02:29:21 +', 199, 1), + (96, 96, '95 +', 'batch job postInterest', 'SQL', 'V95__batch_job_postInterest.sql', -1484077135, 'root', ' +2014-03-08 02:29:21 +', 25, 1), + (97, 97, '96 +', 'savings accounts transfers table', 'SQL', 'V96__savings_accounts_transfers_table.sql', -1447275289, 'root', ' +2014-03-08 02:29:22 +', 370, 1), + (98, 98, '97 +', 'add permission for adjust savings transaction', 'SQL', 'V97__add_permission_for_adjust_savings_transaction.sql', -2045732265, 'root', ' +2014-03-08 02:29:22 +', 20, 1), + (99, 99, '98 +', 'added currency roundof for multipleof', 'SQL', 'V98__added_currency_roundof_for_multipleof.sql', -131804848, 'root', ' +2014-03-08 02:29:23 +', 1440, 1); /*!40000 ALTER TABLE `schema_version` ENABLE KEYS */; @@ -6337,7 +9386,8 @@ CREATE TABLE IF NOT EXISTS `sms_campaign` ( `next_trigger_date` datetime DEFAULT NULL, `last_trigger_date` datetime DEFAULT NULL, `recurrence_start_date` datetime DEFAULT NULL, - `is_visible` tinyint DEFAULT '1', + `is_visible` tinyint DEFAULT '1 +', PRIMARY KEY (`id`), KEY `report_id` (`report_id`), CONSTRAINT `sms_campaign_ibfk_1` FOREIGN KEY (`report_id`) REFERENCES `stretchy_report` (`id`) @@ -6355,7 +9405,8 @@ CREATE TABLE IF NOT EXISTS `sms_messages_outbound` ( `group_id` BIGINT DEFAULT NULL, `client_id` BIGINT DEFAULT NULL, `staff_id` BIGINT DEFAULT NULL, - `status_enum` INT NOT NULL DEFAULT '100', + `status_enum` INT NOT NULL DEFAULT '100 +', `mobile_no` varchar(50) NOT NULL, `message` varchar(1000) NOT NULL, `campaign_id` BIGINT NOT NULL, @@ -6404,36 +9455,251 @@ CREATE TABLE IF NOT EXISTS `stretchy_parameter` ( INSERT INTO `stretchy_parameter` (`id`, `parameter_name`, `parameter_variable`, `parameter_label`, `parameter_displayType`, `parameter_FormatType`, `parameter_default`, `special`, `selectOne`, `selectAll`, `parameter_sql`, `parent_id`) VALUES (1, 'startDateSelect', 'startDate', 'startDate', 'date', 'date', 'today', NULL, NULL, NULL, NULL, NULL), (2, 'endDateSelect', 'endDate', 'endDate', 'date', 'date', 'today', NULL, NULL, NULL, NULL, NULL), - (3, 'obligDateTypeSelect', 'obligDateType', 'obligDateType', 'select', 'number', '0', NULL, NULL, NULL, 'select * from\r\n(select 1 as id, "Closed" as `name` union all\r\nselect 2, "Disbursal" ) x\r\norder by x.`id`', NULL), - (5, 'OfficeIdSelectOne', 'officeId', 'Office', 'select', 'number', '0', NULL, 'Y', NULL, 'select id, \r\nconcat(substring("........................................", 1, \r\n \n\n((LENGTH(`hierarchy`) - LENGTH(REPLACE(`hierarchy`, \'.\', \'\')) - 1) * 4)), \r\n `name`) as tc\r\nfrom m_office\r\nwhere hierarchy like concat\n\n(\'${currentUserHierarchy}\', \'%\')\r\norder by hierarchy', NULL), - (6, 'loanOfficerIdSelectAll', 'loanOfficerId', 'Loan Officer', 'select', 'number', '0', NULL, NULL, 'Y', '(select lo.id, lo.display_name as `Name` \r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\njoin m_staff lo on lo.office_id = ounder.id\r\nwhere lo.is_loan_officer = true\r\nand o.id = ${officeId})\r\nunion all\r\n(select -10, \'-\')\r\norder by 2', 5), - (10, 'currencyIdSelectAll', 'currencyId', 'Currency', 'select', 'number', '0', NULL, NULL, 'Y', 'select `code`, `name`\r\nfrom m_organisation_currency\r\norder by `code`', NULL), - (20, 'fundIdSelectAll', 'fundId', 'Fund', 'select', 'number', '0', NULL, NULL, 'Y', '(select id, `name`\r\nfrom m_fund)\r\nunion all\r\n(select -10, \'-\')\r\norder by 2', NULL), - (25, 'loanProductIdSelectAll', 'loanProductId', 'Product', 'select', 'number', '0', NULL, NULL, 'Y', 'select p.id, p.`name`\r\nfrom m_product_loan p\r\nwhere (p.currency_code = \'$\{currencyId}\' or \'-1\'= \'$\{currencyId}\')\r\norder by 2', 10), - (26, 'loanPurposeIdSelectAll', 'loanPurposeId', 'Loan Purpose', 'select', 'number', '0', NULL, NULL, 'Y', 'select -10 as id, \'-\' as code_value\r\nunion all\r\nselect * from (select v.id, v.code_value\r\nfrom m_code c\r\njoin m_code_value v on v.code_id = c.id\r\nwhere c.code_name = "loanPurpose"\r\norder by v.order_position) x', NULL), - (100, 'parTypeSelect', 'parType', 'parType', 'select', 'number', '0', NULL, NULL, NULL, 'select * from\r\n(select 1 as id, "Principal Only" as `name` union all\r\nselect 2, "Principal + Interest" union all\r\nselect 3, "Principal + Interest + Fees" union all\r\nselect 4, "Principal + Interest + Fees + Penalties") x\r\norder by x.`id`', NULL), - (1001, 'FullReportList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, 'select r.id as report_id, r.report_name, r.report_type, r.report_subtype, r.report_category,\nrp.id as parameter_id, rp.report_parameter_name, p.parameter_name\n from stretchy_report r\n left join stretchy_report_parameter rp on rp.report_id = r.id \n left join stretchy_parameter p on p.id = rp.parameter_id\n where r.use_report is true\n and exists\n ( select \'f\'\n from m_appuser_role ur \n join m_role r on r.id = ur.role_id\n join m_role_permission rp on rp.role_id = r.id\n join m_permission p on p.id = rp.permission_id\n where ur.appuser_id = ${currentUserId}\n and (p.code in (\'ALL_FUNCTIONS_READ\', \'ALL_FUNCTIONS\') or p.code = concat("READ_", r.report_name)) )\n order by r.report_category, r.report_name, rp.id', NULL), - (1002, 'FullParameterList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, 'select sp.parameter_name, sp.parameter_variable, sp.parameter_label, sp.parameter_displayType, \r sp.parameter_FormatType, sp.parameter_default, sp.selectOne, sp.selectAll, spp.parameter_name as parentParameterName\r from stretchy_parameter sp\r left join stretchy_parameter spp on spp.id = sp.parent_id\r where sp.special is null\r and exists \r (select \'f\' \r from stretchy_report sr\r join stretchy_report_parameter srp on srp.report_id = sr.id\r where sr.report_name in(${reportListing})\r and srp.parameter_id = sp.id\r )\r order by sp.id', NULL), - (1003, 'reportCategoryList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, 'select r.id as report_id, r.report_name, r.report_type, r.report_subtype, r.report_category,\n rp.id as parameter_id, rp.report_parameter_name, p.parameter_name\n from stretchy_report r\n left join stretchy_report_parameter rp on rp.report_id = r.id\n left join stretchy_parameter p on p.id = rp.parameter_id\n where r.report_category = \'${reportCategory}\'\n and r.use_report is true\n and exists\n (select \'f\'\n from m_appuser_role ur \n join m_role r on r.id = ur.role_id\n join m_role_permission rp on rp.role_id = r.id\n join m_permission p on p.id = rp.permission_id\n where ur.appuser_id = ${currentUserId}\n and (p.code in (\'ALL_FUNCTIONS_READ\', \'ALL_FUNCTIONS\') or p.code = concat("READ_", r.report_name)) )\n order by r.report_category, r.report_name, rp.id', NULL), + (3, 'obligDateTypeSelect', 'obligDateType', 'obligDateType', 'select', 'number', ' +0', NULL, NULL, NULL, 'select * from +\r +\n(select 1 as id, "Closed" as `name` union all +\r +\nselect 2, "Disbursal" ) x +\r +\norder by x.`id`', NULL), + (5, 'OfficeIdSelectOne', 'officeId', 'Office', 'select', 'number', ' +0', NULL, 'Y', NULL, 'select id, +\r +\nconcat(substring("........................................", 1, +\r +\n +\n +\n((LENGTH(`hierarchy`) - LENGTH(REPLACE(`hierarchy`, +\'.\', +\'\')) - 1) * 4)), +\r +\n `name`) as tc +\r +\nfrom m_office +\r +\nwhere hierarchy like concat +\n +\n( +\'${currentUserHierarchy}\', +\'%\') +\r +\norder by hierarchy', NULL), + (6, 'loanOfficerIdSelectAll', 'loanOfficerId', 'Loan Officer', 'select', 'number', ' +0', NULL, NULL, 'Y', '(select lo.id, lo.display_name as `Name` +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\njoin m_staff lo on lo.office_id = ounder.id +\r +\nwhere lo.is_loan_officer = true +\r +\nand o.id = +${officeId} +) +\r +\nunion all +\r +\n(select -10, +\'-\') +\r +\norder by 2 +', 5), + (10, 'currencyIdSelectAll', 'currencyId', 'Currency', 'select', 'number', ' +0', NULL, NULL, 'Y', 'select `code`, `name` +\r +\nfrom m_organisation_currency +\r +\norder by `code`', NULL), + (20, 'fundIdSelectAll', 'fundId', 'Fund', 'select', 'number', ' +0', NULL, NULL, 'Y', '(select id, `name` +\r +\nfrom m_fund) +\r +\nunion all +\r +\n(select -10, +\'-\') +\r +\norder by 2 +', NULL), + (25, 'loanProductIdSelectAll', 'loanProductId', 'Product', 'select', 'number', ' +0', NULL, NULL, 'Y', 'select p.id, p.`name` +\r +\nfrom m_product_loan p +\r +\nwhere (p.currency_code = +\'$\{currencyId}\' or +\'-1\'= +\'$\{currencyId}\') +\r +\norder by 2 +', 10), + (26, 'loanPurposeIdSelectAll', 'loanPurposeId', 'Loan Purpose', 'select', 'number', ' +0', NULL, NULL, 'Y', 'select -10 as id, +\'-\' as code_value +\r +\nunion all +\r +\nselect * from (select v.id, v.code_value +\r +\nfrom m_code c +\r +\njoin m_code_value v on v.code_id = c.id +\r +\nwhere c.code_name = "loanPurpose" +\r +\norder by v.order_position) x', NULL), + (100, 'parTypeSelect', 'parType', 'parType', 'select', 'number', ' +0', NULL, NULL, NULL, 'select * from +\r +\n(select 1 as id, "Principal Only" as `name` union all +\r +\nselect 2, "Principal + Interest" union all +\r +\nselect 3, "Principal + Interest + Fees" union all +\r +\nselect 4, "Principal + Interest + Fees + Penalties") x +\r +\norder by x.`id`', NULL), + (1001, 'FullReportList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, 'select r.id as report_id, r.report_name, r.report_type, r.report_subtype, r.report_category, +\nrp.id as parameter_id, rp.report_parameter_name, p.parameter_name +\n from stretchy_report r +\n left join stretchy_report_parameter rp on rp.report_id = r.id +\n left join stretchy_parameter p on p.id = rp.parameter_id +\n where r.use_report is true +\n and exists +\n ( select +\'f\' +\n from m_appuser_role ur +\n join m_role r on r.id = ur.role_id +\n join m_role_permission rp on rp.role_id = r.id +\n join m_permission p on p.id = rp.permission_id +\n where ur.appuser_id = +${currentUserId} +\n and (p.code in ( +\'ALL_FUNCTIONS_READ\', +\'ALL_FUNCTIONS\') or p.code = concat("READ_", r.report_name)) ) +\n order by r.report_category, r.report_name, rp.id', NULL), + (1002, 'FullParameterList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, 'select sp.parameter_name, sp.parameter_variable, sp.parameter_label, sp.parameter_displayType, +\r sp.parameter_FormatType, sp.parameter_default, sp.selectOne, sp.selectAll, spp.parameter_name as parentParameterName +\r from stretchy_parameter sp +\r left join stretchy_parameter spp on spp.id = sp.parent_id +\r where sp.special is null +\r and exists +\r (select +\'f\' +\r from stretchy_report sr +\r join stretchy_report_parameter srp on srp.report_id = sr.id +\r where sr.report_name in( +${reportListing} +) +\r and srp.parameter_id = sp.id +\r ) +\r order by sp.id', NULL), + (1003, 'reportCategoryList', NULL, 'n/a', 'n/a', 'n/a', 'n/a', 'Y', NULL, NULL, 'select r.id as report_id, r.report_name, r.report_type, r.report_subtype, r.report_category, +\n rp.id as parameter_id, rp.report_parameter_name, p.parameter_name +\n from stretchy_report r +\n left join stretchy_report_parameter rp on rp.report_id = r.id +\n left join stretchy_parameter p on p.id = rp.parameter_id +\n where r.report_category = +\'${reportCategory}\' +\n and r.use_report is true +\n and exists +\n (select +\'f\' +\n from m_appuser_role ur +\n join m_role r on r.id = ur.role_id +\n join m_role_permission rp on rp.role_id = r.id +\n join m_permission p on p.id = rp.permission_id +\n where ur.appuser_id = +${currentUserId} +\n and (p.code in ( +\'ALL_FUNCTIONS_READ\', +\'ALL_FUNCTIONS\') or p.code = concat("READ_", r.report_name)) ) +\n order by r.report_category, r.report_name, rp.id', NULL), (1004, 'selectAccount', 'accountNo', 'Enter Account No', 'text', 'string', 'n/a', NULL, NULL, NULL, NULL, NULL), - (1005, 'savingsProductIdSelectAll', 'savingsProductId', 'Product', 'select', 'number', '0', NULL, NULL, 'Y', 'select p.id, p.`name`\r\nfrom m_savings_product p\r\norder by 2', NULL), + (1005, 'savingsProductIdSelectAll', 'savingsProductId', 'Product', 'select', 'number', ' +0', NULL, NULL, 'Y', 'select p.id, p.`name` +\r +\nfrom m_savings_product p +\r +\norder by 2 +', NULL), (1006, 'transactionId', 'transactionId', 'transactionId', 'text', 'string', 'n/a', NULL, NULL, NULL, NULL, NULL), (1007, 'selectCenterId', 'centerId', 'Enter Center Id', 'text', 'string', 'n/a', NULL, NULL, NULL, NULL, NULL), - (1008, 'SelectGLAccountNO', 'GLAccountNO', 'GLAccountNO', 'select', 'number', '0', NULL, NULL, NULL, 'select id aid,name aname\r\nfrom acc_gl_account', NULL), + (1008, 'SelectGLAccountNO', 'GLAccountNO', 'GLAccountNO', 'select', 'number', ' +0', NULL, NULL, NULL, 'select id aid,name aname +\r +\nfrom acc_gl_account', NULL), (1009, 'asOnDate', 'asOn', 'As On', 'date', 'date', 'today', NULL, NULL, NULL, NULL, NULL), - (1010, 'SavingsAccountSubStatus', 'subStatus', 'SavingsAccountDormancyStatus', 'select', 'number', '100', NULL, NULL, NULL, 'select * from\r\n(select 100 as id, "Inactive" as name union all\r\nselect 200 as id, "Dormant" as name union all \r\nselect 300 as id, "Escheat" as name) x\r\norder by x.`id`', NULL), + (1010, 'SavingsAccountSubStatus', 'subStatus', 'SavingsAccountDormancyStatus', 'select', 'number', ' +100', NULL, NULL, NULL, 'select * from +\r +\n(select 100 as id, "Inactive" as name union all +\r +\nselect 200 as id, "Dormant" as name union all +\r +\nselect 300 as id, "Escheat" as name) x +\r +\norder by x.`id`', NULL), (1011, 'cycleXSelect', 'cycleX', 'Cycle X Number', 'text', 'number', 'n/a', NULL, NULL, NULL, NULL, NULL), (1012, 'cycleYSelect', 'cycleY', 'Cycle Y Number', 'text', 'number', 'n/a', NULL, NULL, NULL, NULL, NULL), (1013, 'fromXSelect', 'fromX', 'From X Number', 'text', 'number', 'n/a', NULL, NULL, NULL, NULL, NULL), (1014, 'toYSelect', 'toY', 'To Y Number', 'text', 'number', 'n/a', NULL, NULL, NULL, NULL, NULL), (1015, 'overdueXSelect', 'overdueX', 'Overdue X Number', 'text', 'number', 'n/a', NULL, NULL, NULL, NULL, NULL), (1016, 'overdueYSelect', 'overdueY', 'Overdue Y Number', 'text', 'number', 'n/a', NULL, NULL, NULL, NULL, NULL), - (1017, 'DefaultLoan', 'loanId', 'Loan', 'none', 'number', '-1', NULL, NULL, 'Y', 'select ml.id \nfrom m_loan ml \nleft join m_client mc on mc.id = ml.client_id \nleft join m_office mo on mo.id = mc.office_id \nwhere mo.id = ${officeId} or ${officeId} = -1', 5), - (1018, 'DefaultClient', 'clientId', 'Client', 'none', 'number', '-1', NULL, NULL, 'Y', 'select mc.id \nfrom m_client mc\n left join m_office on mc.office_id = mo.id\n where mo.id = ${officeId} or ${officeId} = -1', 5), - (1019, 'DefaultGroup', 'groupId', 'Group', 'none', 'number', '-1', NULL, NULL, 'Y', 'select mg.id \nfrom m_group mg\nleft join m_office mo on mg.office_id = mo.id\nwhere mo.id = ${officeId} or ${officeId} = -1', 5), - (1020, 'SelectLoanType', 'loanType', 'Loan Type', 'select', 'number', '-1', NULL, NULL, 'Y', 'select\nenum_id as id,\nenum_value as value\nfrom r_enum_value\nwhere enum_name = \'loan_type_enum\'', NULL), - (1021, 'DefaultSavings', 'savingsId', 'Savings', 'none', 'number', '-1', NULL, NULL, 'Y', NULL, 5), - (1022, 'DefaultSavingsTransactionId', 'savingsTransactionId', 'Savings Transaction', 'none', 'number', '-1', NULL, NULL, 'Y', NULL, 5); + (1017, 'DefaultLoan', 'loanId', 'Loan', 'none', 'number', '-1 +', NULL, NULL, 'Y', 'select ml.id +\nfrom m_loan ml +\nleft join m_client mc on mc.id = ml.client_id +\nleft join m_office mo on mo.id = mc.office_id +\nwhere mo.id = +${officeId} +or +${officeId} += +- +1 +', 5), + (1018, 'DefaultClient', 'clientId', 'Client', 'none', 'number', '-1 +', NULL, NULL, 'Y', 'select mc.id +\nfrom m_client mc +\n left join m_office on mc.office_id = mo.id +\n where mo.id = +${officeId} +or +${officeId} += +- +1 +', 5), + (1019, 'DefaultGroup', 'groupId', 'Group', 'none', 'number', '-1 +', NULL, NULL, 'Y', 'select mg.id +\nfrom m_group mg +\nleft join m_office mo on mg.office_id = mo.id +\nwhere mo.id = +${officeId} +or +${officeId} += +- +1 +', 5), + (1020, 'SelectLoanType', 'loanType', 'Loan Type', 'select', 'number', '-1 +', NULL, NULL, 'Y', 'select +\nenum_id as id, +\nenum_value as value +\nfrom r_enum_value +\nwhere enum_name = +\'loan_type_enum\'', NULL), + (1021, 'DefaultSavings', 'savingsId', 'Savings', 'none', 'number', '-1 +', NULL, NULL, 'Y', NULL, 5), + (1022, 'DefaultSavingsTransactionId', 'savingsTransactionId', 'Savings Transaction', 'none', 'number', '-1 +', NULL, NULL, 'Y', NULL, 5); /*!40000 ALTER TABLE `stretchy_parameter` ENABLE KEYS */; @@ -6447,8 +9713,10 @@ CREATE TABLE IF NOT EXISTS `stretchy_report` ( `report_category` varchar(45) DEFAULT NULL, `report_sql` text, `description` text, - `core_report` tinyint DEFAULT '0', - `use_report` tinyint DEFAULT '0', + `core_report` tinyint DEFAULT ' +0', + `use_report` tinyint DEFAULT ' +0', PRIMARY KEY (`id`), UNIQUE KEY `report_name_UNIQUE` (`report_name`) ) ENGINE=InnoDB AUTO_INCREMENT=188 DEFAULT CHARSET=UTF8MB4; @@ -6456,51 +9724,3104 @@ CREATE TABLE IF NOT EXISTS `stretchy_report` ( -- Dumping data for table mifostenant-reference.stretchy_report: ~115 rows (approximately) /*!40000 ALTER TABLE `stretchy_report` DISABLE KEYS */; INSERT INTO `stretchy_report` (`id`, `report_name`, `report_type`, `report_subtype`, `report_category`, `report_sql`, `description`, `core_report`, `use_report`) VALUES - (1, 'Client Listing', 'Table', NULL, 'Client', 'select \nconcat(repeat("..", \n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\n c.account_no as "Client Account No.", \nc.display_name as "Name", \nr.enum_message_property as "Status",\nc.activation_date as "Activation", c.external_id as "External Id"\nfrom m_office o \njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_client c on c.office_id = ounder.id\nleft join r_enum_value r on r.enum_name = \'status_enum\' and r.enum_id = c.status_enum\nwhere o.id = ${officeId}\norder by ounder.hierarchy, c.account_no', 'Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \'one to one\' additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t \n\nhave that client browser/memory impact).', 1, 1), - (2, 'Client Loans Listing', 'Table', NULL, 'Client', 'select \nconcat(repeat("..", \n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch", c.account_no as "Client Account No.", \nc.display_name as "Name",\nr.enum_message_property as "Client Status",\nlo.display_name as "Loan Officer", l.account_no as "Loan Account No.", l.external_id as "External Id", p.name as Loan, st.enum_message_property as "Status", \nf.`name` as Fund, purp.code_value as "Loan Purpose",\nifnull(cur.display_symbol, l.currency_code) as Currency, \nl.principal_amount, l.arrearstolerance_amount as "Arrears Tolerance Amount",\nl.number_of_repayments as "Expected No. Repayments", \nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", \nl.nominal_interest_rate_per_period as "Nominal Interest Rate Per Period",\nipf.enum_message_property as "Interest Rate Frequency",\nim.enum_message_property as "Interest Method",\nicp.enum_message_property as "Interest Calculated in Period",\nl.term_frequency as "Term Frequency",\ntf.enum_message_property as "Term Frequency Period",\nl.repay_every as "Repayment Frequency",\nrf.enum_message_property as "Repayment Frequency Period",\nam.enum_message_property as "Amortization",\nl.total_charges_due_at_disbursement_derived as "Total Charges Due At Disbursement",\ndate(l.submittedon_date) as Submitted, date(l.approvedon_date) Approved, l.expected_disbursedon_date As "Expected Disbursal",\ndate(l.expected_firstrepaymenton_date) as "Expected First Repayment", \ndate(l.interest_calculated_from_date) as "Interest Calculated From" ,\ndate(l.disbursedon_date) as Disbursed, \ndate(l.expected_maturedon_date) "Expected Maturity",\ndate(l.maturedon_date) as "Matured On", date(l.closedon_date) as Closed,\ndate(l.rejectedon_date) as Rejected, date(l.rescheduledon_date) as Rescheduled, \ndate(l.withdrawnon_date) as Withdrawn, date(l.writtenoffon_date) "Written Off"\nfrom m_office o \njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_client c on c.office_id = ounder.id\nleft join r_enum_value r on r.enum_name = \'status_enum\' \n and r.enum_id = c.status_enum\nleft join m_loan l on l.client_id = c.id\nleft join m_staff lo on lo.id = l.loan_officer_id\nleft join m_product_loan p on p.id = l.product_id\nleft join m_fund f on f.id = l.fund_id\nleft join r_enum_value st on st.enum_name = "loan_status_id" and st.enum_id = l.loan_status_id\nleft join r_enum_value ipf on ipf.enum_name = "interest_period_frequency_enum" \n and ipf.enum_id = l.interest_period_frequency_enum\nleft join r_enum_value im on im.enum_name = "interest_method_enum" \n and im.enum_id = l.interest_method_enum\nleft join r_enum_value tf on tf.enum_name = "term_period_frequency_enum" \n and tf.enum_id = l.term_period_frequency_enum\nleft join r_enum_value icp on icp.enum_name = "interest_calculated_in_period_enum" \n and icp.enum_id = l.interest_calculated_in_period_enum\nleft join r_enum_value rf on rf.enum_name = "repayment_period_frequency_enum" \n and rf.enum_id = l.repayment_period_frequency_enum\nleft join r_enum_value am on am.enum_name = "amortization_method_enum" \n and am.enum_id = l.amortization_method_enum\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\nleft join m_currency cur on cur.code = l.currency_code\nwhere o.id = ${officeId}\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\norder by ounder.hierarchy, 2 , l.id', 'Individual Client Report\r\n\r\nPretty \n\nwide report that lists the basic details of client loans. \r\n\r\nCan be run for any size MFI but you\'d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t have that client browser/memory impact).', 1, 1), - (5, 'Loans Awaiting Disbursal', 'Table', NULL, 'Loan', 'SELECT \r\nconcat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nc.account_no as "Client Account No", c.display_name as "Name", l.account_no as "Loan Account No.", pl.`name` as "Product", \r\nf.`name` as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nl.principal_amount as Principal, \r\nl.term_frequency as "Term Frequency",\n\n\r\ntf.enum_message_property as "Term Frequency Period",\r\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate",\r\ndate(l.approvedon_date) "Approved",\r\ndatediff(l.expected_disbursedon_date, curdate()) as "Days to Disbursal",\r\ndate(l.expected_disbursedon_date) "Expected Disbursal",\r\npurp.code_value as "Loan Purpose",\r\n lo.display_name as "Loan Officer"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = "term_period_frequency_enum" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\norder by ounder.hierarchy, datediff(l.expected_disbursedon_date, curdate()), c.account_no', 'Individual Client Report', 1, 1), - (6, 'Loans Awaiting Disbursal Summary', 'Table', NULL, 'Loan', 'SELECT \r\nconcat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\npl.`name` as "Product", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, f.`name` as Fund,\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`, ounder.name\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`', 'Individual Client Report', 1, 1), - (7, 'Loans Awaiting Disbursal Summary by Month', 'Table', NULL, 'Loan', 'SELECT \r\nconcat(repeat("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\npl.`name` as "Product", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, \r\nyear(l.expected_disbursedon_date) as "Year", \r\nmonthname(l.expected_disbursedon_date) as "Month",\r\nsum(l.principal_amount) as Principal\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 200\r\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date), ounder.name, l.expected_disbursedon_date\r\norder by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)', 'Individual Client Report', 1, 1), - (8, 'Loans Pending Approval', 'Table', NULL, 'Loan', 'SELECT \r\nconcat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nc.account_no as "Client Account No.", c.display_name as "Client Name", \r\nifnull(cur.display_symbol, l.currency_code) as Currency, pl.`name` as "Product", \r\nl.account_no as "Loan Account No.", \r\nl.principal_amount as "Loan Amount", \r\nl.term_frequency as "Term Frequency",\n\n\r\ntf.enum_message_property as "Term Frequency Period",\r\nl.annual_nominal_interest_rate as " Annual \n\nNominal Interest Rate", \r\ndatediff(curdate(), l.submittedon_date) "Days Pending Approval", \r\npurp.code_value as "Loan Purpose",\r\nlo.display_name as "Loan Officer"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join r_enum_value tf on tf.enum_name = "term_period_frequency_enum" and tf.enum_id = l.term_period_frequency_enum\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 100 /*Submitted and awaiting approval */\r\norder by ounder.hierarchy, l.submittedon_date, l.account_no', 'Individual Client Report', 1, 1), - (11, 'Active Loans - Summary', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as "Office/Branch", x.currency as Currency,\r\n x.client_count as "No. of Clients", x.active_loan_count as "No. Active Loans", x. loans_in_arrears_count as "No. of Loans in Arrears",\r\nx.principal as "Total Loans Disbursed", x.principal_repaid as "Principal Repaid", x.principal_outstanding as "Principal Outstanding", x.principal_overdue as "Principal Overdue",\r\nx.interest as "Total Interest", x.interest_repaid as "Interest Repaid", x.interest_outstanding as "Interest Outstanding", x.interest_overdue as "Interest Overdue",\r\nx.fees as "Total Fees", x.fees_repaid as "Fees Repaid", x.fees_outstanding as "Fees Outstanding", x.fees_overdue as "Fees Overdue",\r\nx.penalties as "Total Penalties", x.penalties_repaid as "Penalties Repaid", x.penalties_outstanding as "Penalties Outstanding", x.penalties_overdue as "Penalties Overdue",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else "invalid PAR Type"\r\n end) as "Portfolio at Risk %"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(if(laa.loan_id is not null, l.id, null) )) as loans_in_arrears_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(laa.principal_overdue_derived) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(laa.interest_overdue_derived) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(laa.fee_charges_overdue_derived) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(laa.penalty_charges_overdue_derived) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', NULL, 1, 1), - (12, 'Active Loans - Details', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as "Loan Officer", \r\nc.display_name as "Client", l.account_no as "Loan Account No.", pl.`name` as "Product", \r\nf.`name` as Fund, \r\nl.principal_amount as "Loan Amount", \r\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", \r\ndate(l.disbursedon_date) as "Disbursed Date", \r\ndate(l.expected_maturedon_date) as "Expected Matured On",\r\n\r\nl.principal_repaid_derived as "Principal Repaid",\r\nl.principal_outstanding_derived as "Principal Outstanding",\r\nlaa.principal_overdue_derived as "Principal Overdue",\r\n\r\nl.interest_repaid_derived as "Interest Repaid",\r\nl.interest_outstanding_derived as "Interest Outstanding",\r\nlaa.interest_overdue_derived as "Interest Overdue",\r\n\r\nl.fee_charges_repaid_derived as "Fees Repaid",\r\nl.fee_charges_outstanding_derived as "Fees Outstanding",\r\nlaa.fee_charges_overdue_derived as "Fees Overdue",\r\n\r\nl.penalty_charges_repaid_derived as "Penalties Repaid",\r\nl.penalty_charges_outstanding_derived as "Penalties Outstanding",\r\npenalty_charges_overdue_derived as "Penalties Overdue"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'Individual Client \n\nReport', 1, 1), - (13, 'Obligation Met Loans Details', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as "Client Account No.", c.display_name as "Client",\r\nl.account_no as "Loan Account No.", pl.`name` as "Product", \r\nf.`name` as Fund, \r\nl.principal_amount as "Loan Amount", \r\nl.total_repayment_derived as "Total Repaid", \r\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", \r\ndate(l.disbursedon_date) as "Disbursed", \r\ndate(l.closedon_date) as "Closed",\r\n\r\nl.principal_repaid_derived as "Principal Repaid",\r\nl.interest_repaid_derived as "Interest Repaid",\r\nl.fee_charges_repaid_derived as "Fees Repaid",\r\nl.penalty_charges_repaid_derived as "Penalties Repaid",\r\nlo.display_name as "Loan Officer"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'Individual Client \n\nReport', 1, 1), - (14, 'Obligation Met Loans Summary', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\ncount(distinct(c.id)) as "No. of Clients",\r\ncount(distinct(l.id)) as "No. of Loans",\r\nsum(l.principal_amount) as "Total Loan Amount", \r\nsum(l.principal_repaid_derived) as "Total Principal Repaid",\r\nsum(l.interest_repaid_derived) as "Total Interest Repaid",\r\nsum(l.fee_charges_repaid_derived) as "Total Fees Repaid",\r\nsum(l.penalty_charges_repaid_derived) as "Total Penalties Repaid",\r\nsum(l.interest_waived_derived) as "Total Interest Waived",\r\nsum(l.fee_charges_waived_derived) as "Total Fees Waived",\r\nsum(l.penalty_charges_waived_derived) as "Total Penalties Waived"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand (case\r\n when ${obligDateType} = 1 then\r\n l.closedon_date between \'${startDate}\' and \'${endDate}\'\r\n when ${obligDateType} = 2 then\r\n l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\n else 1 = 1\r\n end)\r\nand l.loan_status_id = 600\r\ngroup by ounder.hierarchy, l.currency_code, ounder.name\r\norder by ounder.hierarchy, l.currency_code', 'Individual Client \n\nReport', 1, 1), - (15, 'Portfolio at Risk', 'Table', NULL, 'Loan', 'select x.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else "invalid PAR Type"\r\n end) as "Portfolio at Risk %"\r\n from \r\n(select ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nsum(l.principal_outstanding_derived) as "Principal Outstanding",\r\nsum(laa.principal_overdue_derived) as "Principal Overdue",\r\n\r\nsum(l.interest_outstanding_derived) as "Interest Outstanding",\r\nsum(laa.interest_overdue_derived) as "Interest Overdue",\r\n\r\nsum(l.fee_charges_outstanding_derived) as "Fees Outstanding",\r\nsum(laa.fee_charges_overdue_derived) as "Fees Overdue",\r\n\r\nsum(penalty_charges_outstanding_derived) as "Penalties Outstanding",\r\nsum(laa.penalty_charges_overdue_derived) as "Penalties Overdue"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by l.currency_code\r\norder by l.currency_code) x', 'Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', 1, 1), - (16, 'Portfolio at Risk by Branch', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as "Office/Branch",\r\nx.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, \r\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`,\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char)\r\n else "invalid PAR Type"\r\n end) as "Portfolio at Risk %"\r\n from m_office mo\r\njoin \r\n(select ounder.id as "branch", ifnull(cur.display_symbol, l.currency_code) as Currency, \r\n\r\nsum(l.principal_outstanding_derived) as "Principal Outstanding",\r\nsum(laa.principal_overdue_derived) as "Principal Overdue",\r\n\r\nsum(l.interest_outstanding_derived) as "Interest Outstanding",\r\nsum(laa.interest_overdue_derived) as "Interest Overdue",\r\n\r\nsum(l.fee_charges_outstanding_derived) as "Fees Outstanding",\r\nsum(laa.fee_charges_overdue_derived) as "Fees Overdue",\r\n\r\nsum(penalty_charges_outstanding_derived) as "Penalties Outstanding",\r\nsum(laa.penalty_charges_overdue_derived) as "Penalties Overdue"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id\r\nleft join m_product_loan p on p.id = l.product_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', 'Covers all loans.\r\n\r\nFor larger MFIs … we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does)\r\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', 1, 1), - (20, 'Funds Disbursed Between Dates Summary', 'Table', NULL, 'Fund', 'select ifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, \r\nround(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office ounder \r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\ngroup by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)\r\norder by ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)', NULL, 1, 1), - (21, 'Funds Disbursed Between Dates Summary by Office', 'Table', NULL, 'Fund', 'select \r\nconcat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\n \n\nifnull(f.`name`, \'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount\r\nfrom m_office o\r\n\n\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c \n\non c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_currency cur on cur.`code` = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\n\n\nwhere disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand o.id = ${officeId}\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand \n\n(l.currency_code = \'$\{currencyId}\' or \'-1\' = \'$\{currencyId}\')\r\ngroup by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, \n\nl.currency_code)\r\norder by ounder.`name`, ifnull(f.`name`, \'-\') , ifnull(cur.display_symbol, l.currency_code)', NULL, 1, 1), + (1, 'Client Listing', 'Table', NULL, 'Client', 'select +\nconcat(repeat("..", +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\n c.account_no as "Client Account No.", +\nc.display_name as "Name", +\nr.enum_message_property as "Status", +\nc.activation_date as "Activation", c.external_id as "External Id" +\nfrom m_office o +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\njoin m_client c on c.office_id = ounder.id +\nleft join r_enum_value r on r.enum_name = +\'status_enum\' and r.enum_id = c.status_enum +\nwhere o.id = +${officeId} +\norder by ounder.hierarchy, c.account_no', 'Individual Client Report +\r +\n +\r +\nLists the small number of defined fields on the client table. Would expect to copy this +\n +\nreport and add any +\'one to one\' additional data for specific tenant needs. +\r +\n +\r +\nCan be run for any size MFI but you +\'d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t +\n +\nhave that client browser/memory impact).', 1, 1), + (2, 'Client Loans Listing', 'Table', NULL, 'Client', 'select +\nconcat(repeat("..", +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", c.account_no as "Client Account No.", +\nc.display_name as "Name", +\nr.enum_message_property as "Client Status", +\nlo.display_name as "Loan Officer", l.account_no as "Loan Account No.", l.external_id as "External Id", p.name as Loan, st.enum_message_property as "Status", +\nf.`name` as Fund, purp.code_value as "Loan Purpose", +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\nl.principal_amount, l.arrearstolerance_amount as "Arrears Tolerance Amount", +\nl.number_of_repayments as "Expected No. Repayments", +\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", +\nl.nominal_interest_rate_per_period as "Nominal Interest Rate Per Period", +\nipf.enum_message_property as "Interest Rate Frequency", +\nim.enum_message_property as "Interest Method", +\nicp.enum_message_property as "Interest Calculated in Period", +\nl.term_frequency as "Term Frequency", +\ntf.enum_message_property as "Term Frequency Period", +\nl.repay_every as "Repayment Frequency", +\nrf.enum_message_property as "Repayment Frequency Period", +\nam.enum_message_property as "Amortization", +\nl.total_charges_due_at_disbursement_derived as "Total Charges Due At Disbursement", +\ndate(l.submittedon_date) as Submitted, date(l.approvedon_date) Approved, l.expected_disbursedon_date As "Expected Disbursal", +\ndate(l.expected_firstrepaymenton_date) as "Expected First Repayment", +\ndate(l.interest_calculated_from_date) as "Interest Calculated From" , +\ndate(l.disbursedon_date) as Disbursed, +\ndate(l.expected_maturedon_date) "Expected Maturity", +\ndate(l.maturedon_date) as "Matured On", date(l.closedon_date) as Closed, +\ndate(l.rejectedon_date) as Rejected, date(l.rescheduledon_date) as Rescheduled, +\ndate(l.withdrawnon_date) as Withdrawn, date(l.writtenoffon_date) "Written Off" +\nfrom m_office o +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\njoin m_client c on c.office_id = ounder.id +\nleft join r_enum_value r on r.enum_name = +\'status_enum\' +\n and r.enum_id = c.status_enum +\nleft join m_loan l on l.client_id = c.id +\nleft join m_staff lo on lo.id = l.loan_officer_id +\nleft join m_product_loan p on p.id = l.product_id +\nleft join m_fund f on f.id = l.fund_id +\nleft join r_enum_value st on st.enum_name = "loan_status_id" and st.enum_id = l.loan_status_id +\nleft join r_enum_value ipf on ipf.enum_name = "interest_period_frequency_enum" +\n and ipf.enum_id = l.interest_period_frequency_enum +\nleft join r_enum_value im on im.enum_name = "interest_method_enum" +\n and im.enum_id = l.interest_method_enum +\nleft join r_enum_value tf on tf.enum_name = "term_period_frequency_enum" +\n and tf.enum_id = l.term_period_frequency_enum +\nleft join r_enum_value icp on icp.enum_name = "interest_calculated_in_period_enum" +\n and icp.enum_id = l.interest_calculated_in_period_enum +\nleft join r_enum_value rf on rf.enum_name = "repayment_period_frequency_enum" +\n and rf.enum_id = l.repayment_period_frequency_enum +\nleft join r_enum_value am on am.enum_name = "amortization_method_enum" +\n and am.enum_id = l.amortization_method_enum +\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id +\nleft join m_currency cur on cur.code = l.currency_code +\nwhere o.id = +${officeId} +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\norder by ounder.hierarchy, 2 , l.id', 'Individual Client Report +\r +\n +\r +\nPretty +\n +\nwide report that lists the basic details of client loans. +\r +\n +\r +\nCan be run for any size MFI but you +\'d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\'t have that client browser/memory impact).', 1, 1), + (5, 'Loans Awaiting Disbursal', 'Table', NULL, 'Loan', 'SELECT +\r +\nconcat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nc.account_no as "Client Account No", c.display_name as "Name", l.account_no as "Loan Account No.", pl.`name` as "Product", +\r +\nf.`name` as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nl.principal_amount as Principal, +\r +\nl.term_frequency as "Term Frequency", +\n +\n +\r +\ntf.enum_message_property as "Term Frequency Period", +\r +\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", +\r +\ndate(l.approvedon_date) "Approved", +\r +\ndatediff(l.expected_disbursedon_date, curdate()) as "Days to Disbursal", +\r +\ndate(l.expected_disbursedon_date) "Expected Disbursal", +\r +\npurp.code_value as "Loan Purpose", +\r +\n lo.display_name as "Loan Officer" +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id +\r +\nleft join r_enum_value tf on tf.enum_name = "term_period_frequency_enum" and tf.enum_id = l.term_period_frequency_enum +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 200 +\r +\norder by ounder.hierarchy, datediff(l.expected_disbursedon_date, curdate()), c.account_no', 'Individual Client Report', 1, 1), + (6, 'Loans Awaiting Disbursal Summary', 'Table', NULL, 'Loan', 'SELECT +\r +\nconcat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\npl.`name` as "Product", +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, f.`name` as Fund, +\r +\nsum(l.principal_amount) as Principal +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 200 +\r +\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`, ounder.name +\r +\norder by ounder.hierarchy, pl.`name`, l.currency_code, f.`name`', 'Individual Client Report', 1, 1), + (7, 'Loans Awaiting Disbursal Summary by Month', 'Table', NULL, 'Loan', 'SELECT +\r +\nconcat(repeat("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\npl.`name` as "Product", +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nyear(l.expected_disbursedon_date) as "Year", +\r +\nmonthname(l.expected_disbursedon_date) as "Month", +\r +\nsum(l.principal_amount) as Principal +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 200 +\r +\ngroup by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date), ounder.name, l.expected_disbursedon_date +\r +\norder by ounder.hierarchy, pl.`name`, l.currency_code, year(l.expected_disbursedon_date), month(l.expected_disbursedon_date)', 'Individual Client Report', 1, 1), + (8, 'Loans Pending Approval', 'Table', NULL, 'Loan', 'SELECT +\r +\nconcat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nc.account_no as "Client Account No.", c.display_name as "Client Name", +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, pl.`name` as "Product", +\r +\nl.account_no as "Loan Account No.", +\r +\nl.principal_amount as "Loan Amount", +\r +\nl.term_frequency as "Term Frequency", +\n +\n +\r +\ntf.enum_message_property as "Term Frequency Period", +\r +\nl.annual_nominal_interest_rate as " Annual \n\nNominal Interest Rate", +\r +\ndatediff(curdate(), l.submittedon_date) "Days Pending Approval", +\r +\npurp.code_value as "Loan Purpose", +\r +\nlo.display_name as "Loan Officer" +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id +\r +\nleft join r_enum_value tf on tf.enum_name = "term_period_frequency_enum" and tf.enum_id = l.term_period_frequency_enum +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 100 /*Submitted and awaiting approval */ +\r +\norder by ounder.hierarchy, l.submittedon_date, l.account_no', 'Individual Client Report', 1, 1), + (11, 'Active Loans - Summary', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, +\'.\', +\'\')) - 1))), mo.`name`) as "Office/Branch", x.currency as Currency, +\r +\n x.client_count as "No. of Clients", x.active_loan_count as "No. Active Loans", x. loans_in_arrears_count as "No. of Loans in Arrears", +\r +\nx.principal as "Total Loans Disbursed", x.principal_repaid as "Principal Repaid", x.principal_outstanding as "Principal Outstanding", x.principal_overdue as "Principal Overdue", +\r +\nx.interest as "Total Interest", x.interest_repaid as "Interest Repaid", x.interest_outstanding as "Interest Outstanding", x.interest_overdue as "Interest Overdue", +\r +\nx.fees as "Total Fees", x.fees_repaid as "Fees Repaid", x.fees_outstanding as "Fees Outstanding", x.fees_overdue as "Fees Overdue", +\r +\nx.penalties as "Total Penalties", x.penalties_repaid as "Penalties Repaid", x.penalties_outstanding as "Penalties Outstanding", x.penalties_overdue as "Penalties Overdue", +\r +\n +\r +\n (case +\r +\n when +${parType} += +1 +then +\r +\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char) +\r +\n when +${parType} += +2 +then +\r +\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char) +\r +\n when +${parType} += +3 +then +\r +\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char) +\r +\n when +${parType} += +4 +then +\r +\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char) +\r +\n else "invalid PAR Type" +\r +\n end) as "Portfolio at Risk %" +\r +\n from m_office mo +\r +\njoin +\r +\n(select ounder.id as branch, +\r +\nifnull(cur.display_symbol, l.currency_code) as currency, +\r +\ncount(distinct(c.id)) as client_count, +\r +\ncount(distinct(l.id)) as active_loan_count, +\r +\ncount(distinct(if(laa.loan_id is not null, l.id, null) )) as loans_in_arrears_count, +\r +\n +\r +\nsum(l.principal_disbursed_derived) as principal, +\r +\nsum(l.principal_repaid_derived) as principal_repaid, +\r +\nsum(l.principal_outstanding_derived) as principal_outstanding, +\r +\nsum(laa.principal_overdue_derived) as principal_overdue, +\r +\n +\r +\nsum(l.interest_charged_derived) as interest, +\r +\nsum(l.interest_repaid_derived) as interest_repaid, +\r +\nsum(l.interest_outstanding_derived) as interest_outstanding, +\r +\nsum(laa.interest_overdue_derived) as interest_overdue, +\r +\n +\r +\nsum(l.fee_charges_charged_derived) as fees, +\r +\nsum(l.fee_charges_repaid_derived) as fees_repaid, +\r +\nsum(l.fee_charges_outstanding_derived) as fees_outstanding, +\r +\nsum(laa.fee_charges_overdue_derived) as fees_overdue, +\r +\n +\r +\nsum(l.penalty_charges_charged_derived) as penalties, +\r +\nsum(l.penalty_charges_repaid_derived) as penalties_repaid, +\r +\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding, +\r +\nsum(laa.penalty_charges_overdue_derived) as penalties_overdue +\r +\n +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\n +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 300 +\r +\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id +\r +\norder by mo.hierarchy, x.Currency', NULL, 1, 1), + (12, 'Active Loans - Details', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nlo.display_name as "Loan Officer", +\r +\nc.display_name as "Client", l.account_no as "Loan Account No.", pl.`name` as "Product", +\r +\nf.`name` as Fund, +\r +\nl.principal_amount as "Loan Amount", +\r +\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", +\r +\ndate(l.disbursedon_date) as "Disbursed Date", +\r +\ndate(l.expected_maturedon_date) as "Expected Matured On", +\r +\n +\r +\nl.principal_repaid_derived as "Principal Repaid", +\r +\nl.principal_outstanding_derived as "Principal Outstanding", +\r +\nlaa.principal_overdue_derived as "Principal Overdue", +\r +\n +\r +\nl.interest_repaid_derived as "Interest Repaid", +\r +\nl.interest_outstanding_derived as "Interest Outstanding", +\r +\nlaa.interest_overdue_derived as "Interest Overdue", +\r +\n +\r +\nl.fee_charges_repaid_derived as "Fees Repaid", +\r +\nl.fee_charges_outstanding_derived as "Fees Outstanding", +\r +\nlaa.fee_charges_overdue_derived as "Fees Overdue", +\r +\n +\r +\nl.penalty_charges_repaid_derived as "Penalties Repaid", +\r +\nl.penalty_charges_outstanding_derived as "Penalties Outstanding", +\r +\npenalty_charges_overdue_derived as "Penalties Overdue" +\r +\n +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 300 +\r +\ngroup by l.id +\r +\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'Individual Client +\n +\nReport', 1, 1), + (13, 'Obligation Met Loans Details', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nc.account_no as "Client Account No.", c.display_name as "Client", +\r +\nl.account_no as "Loan Account No.", pl.`name` as "Product", +\r +\nf.`name` as Fund, +\r +\nl.principal_amount as "Loan Amount", +\r +\nl.total_repayment_derived as "Total Repaid", +\r +\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", +\r +\ndate(l.disbursedon_date) as "Disbursed", +\r +\ndate(l.closedon_date) as "Closed", +\r +\n +\r +\nl.principal_repaid_derived as "Principal Repaid", +\r +\nl.interest_repaid_derived as "Interest Repaid", +\r +\nl.fee_charges_repaid_derived as "Fees Repaid", +\r +\nl.penalty_charges_repaid_derived as "Penalties Repaid", +\r +\nlo.display_name as "Loan Officer" +\r +\n +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand (case +\r +\n when +${obligDateType} += +1 +then +\r +\n l.closedon_date between +\'${startDate}\' and +\'${endDate}\' +\r +\n when +${obligDateType} += +2 +then +\r +\n l.disbursedon_date between +\'${startDate}\' and +\'${endDate}\' +\r +\n else 1 = 1 +\r +\n end) +\r +\nand l.loan_status_id = 600 +\r +\ngroup by l.id +\r +\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'Individual Client +\n +\nReport', 1, 1), + (14, 'Obligation Met Loans Summary', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\ncount(distinct(c.id)) as "No. of Clients", +\r +\ncount(distinct(l.id)) as "No. of Loans", +\r +\nsum(l.principal_amount) as "Total Loan Amount", +\r +\nsum(l.principal_repaid_derived) as "Total Principal Repaid", +\r +\nsum(l.interest_repaid_derived) as "Total Interest Repaid", +\r +\nsum(l.fee_charges_repaid_derived) as "Total Fees Repaid", +\r +\nsum(l.penalty_charges_repaid_derived) as "Total Penalties Repaid", +\r +\nsum(l.interest_waived_derived) as "Total Interest Waived", +\r +\nsum(l.fee_charges_waived_derived) as "Total Fees Waived", +\r +\nsum(l.penalty_charges_waived_derived) as "Total Penalties Waived" +\r +\n +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand (case +\r +\n when +${obligDateType} += +1 +then +\r +\n l.closedon_date between +\'${startDate}\' and +\'${endDate}\' +\r +\n when +${obligDateType} += +2 +then +\r +\n l.disbursedon_date between +\'${startDate}\' and +\'${endDate}\' +\r +\n else 1 = 1 +\r +\n end) +\r +\nand l.loan_status_id = 600 +\r +\ngroup by ounder.hierarchy, l.currency_code, ounder.name +\r +\norder by ounder.hierarchy, l.currency_code', 'Individual Client +\n +\nReport', 1, 1), + (15, 'Portfolio at Risk', 'Table', NULL, 'Loan', 'select x.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, +\r +\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`, +\r +\n +\r +\n (case +\r +\n when +${parType} += +1 +then +\r +\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char) +\r +\n when +${parType} += +2 +then +\r +\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char) +\r +\n when +${parType} += +3 +then +\r +\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char) +\r +\n when +${parType} += +4 +then +\r +\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char) +\r +\n else "invalid PAR Type" +\r +\n end) as "Portfolio at Risk %" +\r +\n from +\r +\n(select ifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nsum(l.principal_outstanding_derived) as "Principal Outstanding", +\r +\nsum(laa.principal_overdue_derived) as "Principal Overdue", +\r +\n +\r +\nsum(l.interest_outstanding_derived) as "Interest Outstanding", +\r +\nsum(laa.interest_overdue_derived) as "Interest Overdue", +\r +\n +\r +\nsum(l.fee_charges_outstanding_derived) as "Fees Outstanding", +\r +\nsum(laa.fee_charges_overdue_derived) as "Fees Overdue", +\r +\n +\r +\nsum(penalty_charges_outstanding_derived) as "Penalties Outstanding", +\r +\nsum(laa.penalty_charges_overdue_derived) as "Penalties Overdue" +\r +\n +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id +\r +\nleft join m_product_loan p on p.id = l.product_id +\r +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 300 +\r +\ngroup by l.currency_code +\r +\norder by l.currency_code) x', 'Covers all loans. +\r +\n +\r +\nFor larger MFIs â +€¦ we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does) +\r +\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', 1, 1), + (16, 'Portfolio at Risk by Branch', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, +\'.\', +\'\')) - 1))), mo.`name`) as "Office/Branch", +\r +\nx.Currency, x.`Principal Outstanding`, x.`Principal Overdue`, x.`Interest Outstanding`, x.`Interest Overdue`, +\r +\nx.`Fees Outstanding`, x.`Fees Overdue`, x.`Penalties Outstanding`, x.`Penalties Overdue`, +\r +\n +\r +\n (case +\r +\n when +${parType} += +1 +then +\r +\n cast(round((x.`Principal Overdue` * 100) / x.`Principal Outstanding`, 2) as char) +\r +\n when +${parType} += +2 +then +\r +\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding`), 2) as char) +\r +\n when +${parType} += +3 +then +\r +\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding`), 2) as char) +\r +\n when +${parType} += +4 +then +\r +\n cast(round(((x.`Principal Overdue` + x.`Interest Overdue` + x.`Fees Overdue` + x.`Penalties Overdue`) * 100) / (x.`Principal Outstanding` + x.`Interest Outstanding` + x.`Fees Outstanding` + x.`Penalties Overdue`), 2) as char) +\r +\n else "invalid PAR Type" +\r +\n end) as "Portfolio at Risk %" +\r +\n from m_office mo +\r +\njoin +\r +\n(select ounder.id as "branch", ifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\n +\r +\nsum(l.principal_outstanding_derived) as "Principal Outstanding", +\r +\nsum(laa.principal_overdue_derived) as "Principal Overdue", +\r +\n +\r +\nsum(l.interest_outstanding_derived) as "Interest Outstanding", +\r +\nsum(laa.interest_overdue_derived) as "Interest Overdue", +\r +\n +\r +\nsum(l.fee_charges_outstanding_derived) as "Fees Outstanding", +\r +\nsum(laa.fee_charges_overdue_derived) as "Fees Overdue", +\r +\n +\r +\nsum(penalty_charges_outstanding_derived) as "Penalties Outstanding", +\r +\nsum(laa.penalty_charges_overdue_derived) as "Penalties Overdue" +\r +\n +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_code_value purp on purp.id = l.loanpurpose_cv_id +\r +\nleft join m_product_loan p on p.id = l.product_id +\r +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 300 +\r +\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id +\r +\norder by mo.hierarchy, x.Currency', 'Covers all loans. +\r +\n +\r +\nFor larger MFIs â +€¦ we should add some derived fields on loan (or a 1:1 loan related table like mifos 2.x does) +\r +\nPrinciple, Interest, Fees, Penalties Outstanding and Overdue (possibly waived and written off too)', 1, 1), + (20, 'Funds Disbursed Between Dates Summary', 'Table', NULL, 'Fund', 'select ifnull(f.`name`, +\'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nround(sum(l.principal_amount), 4) as disbursed_amount +\r +\nfrom m_office ounder +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_currency cur on cur.`code` = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nwhere disbursedon_date between +\'${startDate}\' and +\'${endDate}\' +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (l.currency_code = +\'$\{currencyId}\' or +\'-1\' = +\'$\{currencyId}\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\ngroup by ifnull(f.`name`, +\'-\') , ifnull(cur.display_symbol, l.currency_code) +\r +\norder by ifnull(f.`name`, +\'-\') , ifnull(cur.display_symbol, l.currency_code)', NULL, 1, 1), + (21, 'Funds Disbursed Between Dates Summary by Office', 'Table', NULL, 'Fund', 'select +\r +\nconcat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\n +\n +\nifnull(f.`name`, +\'-\') as Fund, ifnull(cur.display_symbol, l.currency_code) as Currency, round(sum(l.principal_amount), 4) as disbursed_amount +\r +\nfrom m_office o +\r +\n +\n +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c +\n +\non c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_currency cur on cur.`code` = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\n +\n +\nwhere disbursedon_date between +\'${startDate}\' and +\'${endDate}\' +\r +\nand o.id = +${officeId} +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand +\n +\n(l.currency_code = +\'$\{currencyId}\' or +\'-1\' = +\'$\{currencyId}\') +\r +\ngroup by ounder.`name`, ifnull(f.`name`, +\'-\') , ifnull(cur.display_symbol, +\n +\nl.currency_code) +\r +\norder by ounder.`name`, ifnull(f.`name`, +\'-\') , ifnull(cur.display_symbol, l.currency_code)', NULL, 1, 1), (48, 'Balance Sheet', 'Pentaho', NULL, 'Accounting', NULL, 'Balance Sheet', 1, 1), (49, 'Income Statement', 'Pentaho', NULL, 'Accounting', NULL, 'Profit and Loss Statement', 1, 1), (50, 'Trial Balance', 'Pentaho', NULL, 'Accounting', NULL, 'Trial Balance Report', 1, 1), - (51, 'Written-Off Loans', 'Table', NULL, 'Loan', 'SELECT \r\nconcat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as "Client Account No.",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as "Loan Amount",\r\nifnull(lt.principal_portion_derived, 0) AS \'Written-Off Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Written-Off Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Written-Off Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Written-Off Penalties\',\r\nn.note AS \'Reason For Write-Off\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 6 /*write-off */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=601\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") \r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', 'Individual Lending Report. Written Off Loans', 1, 1), - (52, 'Aging Detail', 'Table', NULL, 'Loan', '\r\nSELECT \r\nconcat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nmc.account_no as "Client Account No.",\r\n mc.display_name AS "Client Name",\r\n ml.account_no AS "Account Number",\r\n ml.principal_amount AS "Loan Amount",\r\n ml.principal_disbursed_derived AS "Original Principal",\r\n ml.interest_charged_derived AS "Original Interest",\r\n ml.principal_repaid_derived AS "Principal Paid",\r\n ml.interest_repaid_derived AS "Interest Paid",\r\n laa.principal_overdue_derived AS "Principal Overdue",\r\n laa.interest_overdue_derived AS "Interest Overdue",\r\nDATEDIFF(CURDATE(), laa.overdue_since_date_derived) as "Days in Arrears",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<7, \'<1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<8, \' 1\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<22, \' 3\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<29, \' 4\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<36, \' 5\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<43, \' 6\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<50, \' 7\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<57, \' 8\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<64, \' 9\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<85, \'12\', \'12+\')))))))))))) )AS "Weeks In Arrears Band",\r\n\r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<361, \'180 - 360\', \r\n \'> 360\'))))) AS "Days in Arrears Band"\r\n\r\n FROM m_office mo \r\n JOIN m_office ounder ON ounder.hierarchy like concat(mo.hierarchy, \'%\')\r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n INNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = \'loan_status_id\'\r\n INNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\n left join m_currency cur on cur.code = ml.currency_code\r\n WHERE ml.loan_status_id=300\r\n AND mo.id=${officeId}\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no\r\n', 'Loan arrears aging (Weeks)', 1, 1), - (53, 'Aging Summary (Arrears in Weeks)', 'Table', NULL, 'Loan', 'SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Weeks In Arrears (Up To)\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'1\',2 UNION\r\n SELECT \'2\',3 UNION\r\n SELECT \'3\',4 UNION\r\n SELECT \'4\',5 UNION\r\n SELECT \'5\',6 UNION\r\n SELECT \'6\',7 UNION\r\n SELECT \'7\',8 UNION\r\n SELECT \'8\',9 UNION\r\n SELECT \'9\',10 UNION\r\n SELECT \'10\',11 UNION\r\n SELECT \'11\',12 UNION\r\n SELECT \'12\',13 UNION\r\n SELECT \'12+\',14) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<8, \'1\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<15, \'2\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<22, \'3\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<29, \'4\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<36, \'5\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<43, \'6\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<50, \'7\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<57, \'8\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<64, \'9\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<71, \'10\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<78, \'11\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<85, \'12\',\r\n \'12+\'))))))))))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid', 'Loan amount in arrears by branch', 1, 1), - (54, 'Rescheduled Loans', 'Table', NULL, 'Loan', 'SELECT \r\nconcat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nifnull(cur.display_symbol, ml.currency_code) as Currency, \r\nc.account_no as "Client Account No.",\r\nc.display_name AS \'Client Name\',\r\nml.account_no AS \'Loan Account No.\',\r\nmpl.name AS \'Product Name\',\r\nml.disbursedon_date AS \'Disbursed Date\',\r\nlt.transaction_date AS \'Written Off date\',\r\nml.principal_amount as "Loan Amount",\r\nifnull(lt.principal_portion_derived, 0) AS \'Rescheduled Principal\',\r\nifnull(lt.interest_portion_derived, 0) AS \'Rescheduled Interest\',\r\nifnull(lt.fee_charges_portion_derived,0) AS \'Rescheduled Fees\',\r\nifnull(lt.penalty_charges_portion_derived,0) AS \'Rescheduled Penalties\',\r\nn.note AS \'Reason For Rescheduling\',\r\nIFNULL(ms.display_name,\'-\') AS \'Loan Officer Name\'\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan ml ON ml.client_id = c.id\r\nJOIN m_product_loan mpl ON mpl.id=ml.product_id\r\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id\r\nLEFT JOIN m_currency cur on cur.code = ml.currency_code\r\nWHERE lt.transaction_type_enum = 7 /*marked for rescheduling */\r\nAND lt.is_reversed is false \r\nAND ml.loan_status_id=602\r\nAND o.id=${officeId}\r\nAND (mpl.id=${loanProductId} OR ${loanProductId}=-1)\r\nAND lt.transaction_date BETWEEN \'${startDate}\' AND \'${endDate}\'\r\nAND (ml.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', 'Individual Lending Report. Rescheduled Loans. The ability to reschedule (or mark that you have rescheduled the loan elsewhere) is a legacy of the older Mifos product. Needed for migration.', 1, 1), - (55, 'Active Loans Passed Final Maturity', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as "Loan Officer", \r\nc.display_name as "Client", l.account_no as "Loan Account No.", pl.`name` as "Product", \r\nf.`name` as Fund, \r\nl.principal_amount as "Loan Amount", \r\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", \r\ndate(l.disbursedon_date) as "Disbursed Date", \r\ndate(l.expected_maturedon_date) as "Expected Matured On",\r\n\r\nl.principal_repaid_derived as "Principal Repaid",\r\nl.principal_outstanding_derived as "Principal Outstanding",\r\nlaa.principal_overdue_derived as "Principal Overdue",\r\n\r\nl.interest_repaid_derived as "Interest Repaid",\r\nl.interest_outstanding_derived as "Interest Outstanding",\r\nlaa.interest_overdue_derived as "Interest Overdue",\r\n\r\nl.fee_charges_repaid_derived as "Fees Repaid",\r\nl.fee_charges_outstanding_derived as "Fees Outstanding",\r\nlaa.fee_charges_overdue_derived as "Fees Overdue",\r\n\r\nl.penalty_charges_repaid_derived as "Penalties Repaid",\r\nl.penalty_charges_outstanding_derived as "Penalties Outstanding",\r\nlaa.penalty_charges_overdue_derived as "Penalties Overdue"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'Individual Client \n\nReport', 1, 1), - (56, 'Active Loans Passed Final Maturity Summary', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as "Office/Branch", x.currency as Currency,\r\n x.client_count as "No. of Clients", x.active_loan_count as "No. Active Loans", x. arrears_loan_count as "No. of Loans in Arrears",\r\nx.principal as "Total Loans Disbursed", x.principal_repaid as "Principal Repaid", x.principal_outstanding as "Principal Outstanding", x.principal_overdue as "Principal Overdue",\r\nx.interest as "Total Interest", x.interest_repaid as "Interest Repaid", x.interest_outstanding as "Interest Outstanding", x.interest_overdue as "Interest Overdue",\r\nx.fees as "Total Fees", x.fees_repaid as "Fees Repaid", x.fees_outstanding as "Fees Outstanding", x.fees_overdue as "Fees Overdue",\r\nx.penalties as "Total Penalties", x.penalties_repaid as "Penalties Repaid", x.penalties_outstanding as "Penalties Outstanding", x.penalties_overdue as "Penalties Overdue",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else "invalid PAR Type"\r\n end) as "Portfolio at Risk %"\r\n from m_office mo\r\njoin \r\n(select ounder.id as branch,\r\nifnull(cur.display_symbol, l.currency_code) as currency,\r\ncount(distinct(c.id)) as client_count, \r\ncount(distinct(l.id)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\n\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand l.expected_maturedon_date < curdate()\r\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id\r\norder by mo.hierarchy, x.Currency', NULL, 1, 1), - (57, 'Active Loans in last installment', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(lastInstallment.`hierarchy`) - LENGTH(REPLACE(lastInstallment.`hierarchy`, \'.\', \'\')) - 1))), lastInstallment.branch) as "Office/Branch",\r\nlastInstallment.Currency,\r\nlastInstallment.`Loan Officer`, \r\nlastInstallment.`Client Account No`, lastInstallment.`Client`, \r\nlastInstallment.`Loan Account No`, lastInstallment.`Product`, \r\nlastInstallment.`Fund`, lastInstallment.`Loan Amount`, \r\nlastInstallment.`Annual Nominal Interest Rate`, \r\nlastInstallment.`Disbursed`, lastInstallment.`Expected Matured On` ,\r\n\r\nl.principal_repaid_derived as "Principal Repaid",\r\nl.principal_outstanding_derived as "Principal Outstanding",\r\nlaa.principal_overdue_derived as "Principal Overdue",\r\n\r\nl.interest_repaid_derived as "Interest Repaid",\r\nl.interest_outstanding_derived as "Interest Outstanding",\r\nlaa.interest_overdue_derived as "Interest Overdue",\r\n\r\nl.fee_charges_repaid_derived as "Fees Repaid",\r\nl.fee_charges_outstanding_derived as "Fees Outstanding",\r\nlaa.fee_charges_overdue_derived as "Fees Overdue",\r\n\r\nl.penalty_charges_repaid_derived as "Penalties Repaid",\r\nl.penalty_charges_outstanding_derived as "Penalties Outstanding",\r\nlaa.penalty_charges_overdue_derived as "Penalties Overdue"\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as "Loan Officer", c.account_no as "Client Account No",\r\nc.display_name as "Client", l.account_no as "Loan Account No", pl.`name` as "Product", \r\nf.`name` as Fund, l.principal_amount as "Loan Amount", \r\nl.annual_nominal_interest_rate as "Annual Nominal Interest Rate", \r\ndate(l.disbursedon_date) as "Disbursed", date(l.expected_maturedon_date) as "Expected Matured On"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\norder by lastInstallment.hierarchy, lastInstallment.Currency, lastInstallment.`Client Account No`, lastInstallment.`Loan Account No`', 'Individual Client \n\nReport', 1, 1), - (58, 'Active Loans in last installment Summary', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, \'.\', \'\')) - 1))), mo.`name`) as "Office/Branch", x.currency as Currency,\r\n x.client_count as "No. of Clients", x.active_loan_count as "No. Active Loans", x. arrears_loan_count as "No. of Loans in Arrears",\r\nx.principal as "Total Loans Disbursed", x.principal_repaid as "Principal Repaid", x.principal_outstanding as "Principal Outstanding", x.principal_overdue as "Principal Overdue",\r\nx.interest as "Total Interest", x.interest_repaid as "Interest Repaid", x.interest_outstanding as "Interest Outstanding", x.interest_overdue as "Interest Overdue",\r\nx.fees as "Total Fees", x.fees_repaid as "Fees Repaid", x.fees_outstanding as "Fees Outstanding", x.fees_overdue as "Fees Overdue",\r\nx.penalties as "Total Penalties", x.penalties_repaid as "Penalties Repaid", x.penalties_outstanding as "Penalties Outstanding", x.penalties_overdue as "Penalties Overdue",\r\n\r\n (case\r\n when ${parType} = 1 then\r\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char)\r\n when ${parType} = 2 then\r\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char)\r\n when ${parType} = 3 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char)\r\n when ${parType} = 4 then\r\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char)\r\n else "invalid PAR Type"\r\n end) as "Portfolio at Risk %"\r\n from m_office mo\r\njoin \r\n(select lastInstallment.branchId as branchId,\r\nlastInstallment.Currency,\r\ncount(distinct(lastInstallment.clientId)) as client_count, \r\ncount(distinct(lastInstallment.loanId)) as active_loan_count,\r\ncount(distinct(laa.loan_id) ) as arrears_loan_count,\r\n\r\nsum(l.principal_disbursed_derived) as principal,\r\nsum(l.principal_repaid_derived) as principal_repaid,\r\nsum(l.principal_outstanding_derived) as principal_outstanding,\r\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue,\r\n\r\nsum(l.interest_charged_derived) as interest,\r\nsum(l.interest_repaid_derived) as interest_repaid,\r\nsum(l.interest_outstanding_derived) as interest_outstanding,\r\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue,\r\n\r\nsum(l.fee_charges_charged_derived) as fees,\r\nsum(l.fee_charges_repaid_derived) as fees_repaid,\r\nsum(l.fee_charges_outstanding_derived) as fees_outstanding,\r\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue,\r\n\r\nsum(l.penalty_charges_charged_derived) as penalties,\r\nsum(l.penalty_charges_repaid_derived) as penalties_repaid,\r\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding,\r\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue\r\n\r\nfrom \r\n(select l.id as loanId, l.number_of_repayments, min(r.installment), \r\nounder.id as branchId, ounder.hierarchy, ounder.`name` as branch, \r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nlo.display_name as "Loan Officer", c.id as clientId, c.account_no as "Client Account No",\r\nc.display_name as "Client", l.account_no as "Loan Account No", pl.`name` as "Product", \r\nf.`name` as Fund, l.principal_amount as "Loan Amount", \r\nl.annual_nominal_interest_rate as "Annual Nominal Interest Rate", \r\ndate(l.disbursedon_date) as "Disbursed", date(l.expected_maturedon_date) as "Expected Matured On"\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_repayment_schedule r on r.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.loan_status_id = 300\r\nand r.completed_derived is false\r\nand r.duedate >= curdate()\r\ngroup by l.id\r\nhaving l.number_of_repayments = min(r.installment)) lastInstallment\r\njoin m_loan l on l.id = lastInstallment.loanId\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\ngroup by lastInstallment.branchId, lastInstallment.Currency) x on x.branchId = mo.id\r\norder by mo.hierarchy, x.Currency', 'Individual Client \n\nReport', 1, 1), - (59, 'Active Loans by Disbursal Period', 'Table', NULL, 'Loan', 'select concat(repeat("..", \r\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) as "Office/Branch",\r\nifnull(cur.display_symbol, l.currency_code) as Currency,\r\nc.account_no as "Client Account No", c.display_name as "Client", l.account_no as "Loan Account No", pl.`name` as "Product", \r\nf.`name` as Fund, \r\nl.principal_amount as "Loan Principal Amount", \r\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", \r\ndate(l.disbursedon_date) as "Disbursed Date", \r\n\r\nl.total_expected_repayment_derived as "Total Loan (P+I+F+Pen)",\r\nl.total_repayment_derived as "Total Repaid (P+I+F+Pen)",\r\nlo.display_name as "Loan Officer"\r\n\r\nfrom m_office o \r\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\r\nand ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\r\njoin m_client c on c.office_id = ounder.id\r\njoin m_loan l on l.client_id = c.id\r\njoin m_product_loan pl on pl.id = l.product_id\r\nleft join m_staff lo on lo.id = l.loan_officer_id\r\nleft join m_currency cur on cur.code = l.currency_code\r\nleft join m_fund f on f.id = l.fund_id\r\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\r\nwhere o.id = ${officeId}\r\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}")\r\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}")\r\nand (ifnull(l.fund_id, -10) = ${fundId} or -1 = ${fundId})\r\nand (ifnull(l.loanpurpose_cv_id, -10) = ${loanPurposeId} or -1 = ${loanPurposeId})\r\nand l.disbursedon_date between \'${startDate}\' and \'${endDate}\'\r\nand l.loan_status_id = 300\r\ngroup by l.id\r\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'Individual Client \n\nReport', 1, 1), - (61, 'Aging Summary (Arrears in Months)', 'Table', NULL, 'Loan', 'SELECT \r\n IFNULL(periods.currencyName, periods.currency) as currency, \r\n periods.period_no \'Days In Arrears\', \r\n IFNULL(ars.loanId, 0) \'No Of Loans\', \r\n IFNULL(ars.principal,0.0) \'Original Principal\', \r\n IFNULL(ars.interest,0.0) \'Original Interest\', \r\n IFNULL(ars.prinPaid,0.0) \'Principal Paid\', \r\n IFNULL(ars.intPaid,0.0) \'Interest Paid\', \r\n IFNULL(ars.prinOverdue,0.0) \'Principal Overdue\', \r\n IFNULL(ars.intOverdue,0.0)\'Interest Overdue\'\r\nFROM \r\n /* full table of aging periods/currencies used combo to ensure each line represented */\r\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from\r\n (SELECT \'On Schedule\' period_no,1 pid UNION\r\n SELECT \'0 - 30\',2 UNION\r\n SELECT \'30 - 60\',3 UNION\r\n SELECT \'60 - 90\',4 UNION\r\n SELECT \'90 - 180\',5 UNION\r\n SELECT \'180 - 360\',6 UNION\r\n SELECT \'> 360\',7 ) pers,\r\n (SELECT distinctrow moc.code, moc.name\r\n FROM m_office mo2\r\n INNER JOIN m_office ounder2 ON ounder2.hierarchy \r\n LIKE CONCAT(mo2.hierarchy, \'%\')\r\nAND ounder2.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id\r\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id\r\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code\r\n WHERE ml2.loan_status_id=300 /* active */\r\n AND mo2.id=${officeId}\r\nAND (ml2.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")) curs) periods\r\n\r\n\r\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */\r\n(SELECT \r\n z.currency, z.arrPeriod, \r\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, \r\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, \r\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue\r\nFROM\r\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */\r\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue,\r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, \'On Schedule\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<31, \'0 - 30\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<61, \'30 - 60\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<91, \'60 - 90\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<181, \'90 - 180\', \r\n IF(DATEDIFF(CURDATE(), minOverdueDate)<361, \'180 - 360\', \r\n \'> 360\')))))) AS arrPeriod\r\n\r\n FROM /* get the individual loan details */\r\n (SELECT ml.id AS loanId, ml.currency_code as currency,\r\n ml.principal_disbursed_derived as principal, \r\n ml.interest_charged_derived as interest, \r\n ml.principal_repaid_derived as prinPaid, \r\n ml.interest_repaid_derived intPaid,\r\n\r\n laa.principal_overdue_derived as prinOverdue,\r\n laa.interest_overdue_derived as intOverdue,\r\n\r\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate\r\n \r\n FROM m_office mo\r\n INNER JOIN m_office ounder ON ounder.hierarchy \r\n LIKE CONCAT(mo.hierarchy, \'%\')\r\nAND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n INNER JOIN m_client mc ON mc.office_id=ounder.id\r\n INNER JOIN m_loan ml ON ml.client_id = mc.id\r\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id\r\n WHERE ml.loan_status_id=300 /* active */\r\n AND mo.id=${officeId}\r\n AND (ml.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")\r\n GROUP BY ml.id) x\r\n ) z \r\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency\r\nORDER BY periods.currency, periods.pid', 'Loan amount in arrears by branch', 1, 1), + (51, 'Written-Off Loans', 'Table', NULL, 'Loan', 'SELECT +\r +\nconcat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nifnull(cur.display_symbol, ml.currency_code) as Currency, +\r +\nc.account_no as "Client Account No.", +\r +\nc.display_name AS +\'Client Name\', +\r +\nml.account_no AS +\'Loan Account No.\', +\r +\nmpl.name AS +\'Product Name\', +\r +\nml.disbursedon_date AS +\'Disbursed Date\', +\r +\nlt.transaction_date AS +\'Written Off date\', +\r +\nml.principal_amount as "Loan Amount", +\r +\nifnull(lt.principal_portion_derived, 0) AS +\'Written-Off Principal\', +\r +\nifnull(lt.interest_portion_derived, 0) AS +\'Written-Off Interest\', +\r +\nifnull(lt.fee_charges_portion_derived,0) AS +\'Written-Off Fees\', +\r +\nifnull(lt.penalty_charges_portion_derived,0) AS +\'Written-Off Penalties\', +\r +\nn.note AS +\'Reason For Write-Off\', +\r +\nIFNULL(ms.display_name, +\'-\') AS +\'Loan Officer Name\' +\r +\nFROM m_office o +\r +\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nAND ounder.hierarchy like CONCAT( +\'${currentUserHierarchy}\', +\'%\') +\r +\nJOIN m_client c ON c.office_id = ounder.id +\r +\nJOIN m_loan ml ON ml.client_id = c.id +\r +\nJOIN m_product_loan mpl ON mpl.id=ml.product_id +\r +\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id +\r +\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id +\r +\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id +\r +\nLEFT JOIN m_currency cur on cur.code = ml.currency_code +\r +\nWHERE lt.transaction_type_enum = 6 /*write-off */ +\r +\nAND lt.is_reversed is false +\r +\nAND ml.loan_status_id=601 +\r +\nAND o.id= +${officeId} +\r +\nAND (mpl.id= +${loanProductId} +OR +${loanProductId} += +- +1 +) +\r +\nAND lt.transaction_date BETWEEN +\'${startDate}\' AND +\'${endDate}\' +\r +\nAND (ml.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', 'Individual Lending Report. Written Off Loans', 1, 1), + (52, 'Aging Detail', 'Table', NULL, 'Loan', ' +\r +\nSELECT +\r +\nconcat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nifnull(cur.display_symbol, ml.currency_code) as Currency, +\r +\nmc.account_no as "Client Account No.", +\r +\n mc.display_name AS "Client Name", +\r +\n ml.account_no AS "Account Number", +\r +\n ml.principal_amount AS "Loan Amount", +\r +\n ml.principal_disbursed_derived AS "Original Principal", +\r +\n ml.interest_charged_derived AS "Original Interest", +\r +\n ml.principal_repaid_derived AS "Principal Paid", +\r +\n ml.interest_repaid_derived AS "Interest Paid", +\r +\n laa.principal_overdue_derived AS "Principal Overdue", +\r +\n laa.interest_overdue_derived AS "Interest Overdue", +\r +\nDATEDIFF(CURDATE(), laa.overdue_since_date_derived) as "Days in Arrears", +\r +\n +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<7, +\'<1\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<8, +\' 1\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<15, +\'2\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<22, +\' 3\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<29, +\' 4\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<36, +\' 5\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<43, +\' 6\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<50, +\' 7\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<57, +\' 8\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<64, +\' 9\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<71, +\'10\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<78, +\'11\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<85, +\'12\', +\'12+\')))))))))))) )AS "Weeks In Arrears Band", +\r +\n +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<31, +\'0 - 30\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<61, +\'30 - 60\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<91, +\'60 - 90\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<181, +\'90 - 180\', +\r +\n IF(DATEDIFF(CURDATE(), laa.overdue_since_date_derived)<361, +\'180 - 360\', +\r +\n +\'> 360\'))))) AS "Days in Arrears Band" +\r +\n +\r +\n FROM m_office mo +\r +\n JOIN m_office ounder ON ounder.hierarchy like concat(mo.hierarchy, +\'%\') +\r +\n AND ounder.hierarchy like CONCAT( +\'${currentUserHierarchy}\', +\'%\') +\r +\n INNER JOIN m_client mc ON mc.office_id=ounder.id +\r +\n INNER JOIN m_loan ml ON ml.client_id = mc.id +\r +\n INNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = +\'loan_status_id\' +\r +\n INNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id +\r +\n left join m_currency cur on cur.code = ml.currency_code +\r +\n WHERE ml.loan_status_id=300 +\r +\n AND mo.id= +${officeId} +\r +\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no +\r +\n', 'Loan arrears aging (Weeks)', 1, 1), + (53, 'Aging Summary (Arrears in Weeks)', 'Table', NULL, 'Loan', 'SELECT +\r +\n IFNULL(periods.currencyName, periods.currency) as currency, +\r +\n periods.period_no +\'Weeks In Arrears (Up To)\', +\r +\n IFNULL(ars.loanId, 0) +\'No Of Loans\', +\r +\n IFNULL(ars.principal,0.0) +\'Original Principal\', +\r +\n IFNULL(ars.interest,0.0) +\'Original Interest\', +\r +\n IFNULL(ars.prinPaid,0.0) +\'Principal Paid\', +\r +\n IFNULL(ars.intPaid,0.0) +\'Interest Paid\', +\r +\n IFNULL(ars.prinOverdue,0.0) +\'Principal Overdue\', +\r +\n IFNULL(ars.intOverdue,0.0) +\'Interest Overdue\' +\r +\nFROM +\r +\n /* full table of aging periods/currencies used combo to ensure each line represented */ +\r +\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from +\r +\n (SELECT +\'On Schedule\' period_no,1 pid UNION +\r +\n SELECT +\'1\',2 UNION +\r +\n SELECT +\'2\',3 UNION +\r +\n SELECT +\'3\',4 UNION +\r +\n SELECT +\'4\',5 UNION +\r +\n SELECT +\'5\',6 UNION +\r +\n SELECT +\'6\',7 UNION +\r +\n SELECT +\'7\',8 UNION +\r +\n SELECT +\'8\',9 UNION +\r +\n SELECT +\'9\',10 UNION +\r +\n SELECT +\'10\',11 UNION +\r +\n SELECT +\'11\',12 UNION +\r +\n SELECT +\'12\',13 UNION +\r +\n SELECT +\'12+\',14) pers, +\r +\n (SELECT distinctrow moc.code, moc.name +\r +\n FROM m_office mo2 +\r +\n INNER JOIN m_office ounder2 ON ounder2.hierarchy +\r +\n LIKE CONCAT(mo2.hierarchy, +\'%\') +\r +\nAND ounder2.hierarchy like CONCAT( +\'${currentUserHierarchy}\', +\'%\') +\r +\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id +\r +\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id +\r +\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code +\r +\n WHERE ml2.loan_status_id=300 /* active */ +\r +\n AND mo2.id= +${officeId} +\r +\nAND (ml2.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")) curs) periods +\r +\n +\r +\n +\r +\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */ +\r +\n(SELECT +\r +\n z.currency, z.arrPeriod, +\r +\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, +\r +\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, +\r +\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue +\r +\nFROM +\r +\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */ +\r +\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue, +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, +\'On Schedule\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<8, +\'1\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<15, +\'2\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<22, +\'3\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<29, +\'4\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<36, +\'5\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<43, +\'6\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<50, +\'7\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<57, +\'8\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<64, +\'9\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<71, +\'10\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<78, +\'11\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<85, +\'12\', +\r +\n +\'12+\'))))))))))))) AS arrPeriod +\r +\n +\r +\n FROM /* get the individual loan details */ +\r +\n (SELECT ml.id AS loanId, ml.currency_code as currency, +\r +\n ml.principal_disbursed_derived as principal, +\r +\n ml.interest_charged_derived as interest, +\r +\n ml.principal_repaid_derived as prinPaid, +\r +\n ml.interest_repaid_derived intPaid, +\r +\n +\r +\n laa.principal_overdue_derived as prinOverdue, +\r +\n laa.interest_overdue_derived as intOverdue, +\r +\n +\r +\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate +\r +\n +\r +\n FROM m_office mo +\r +\n INNER JOIN m_office ounder ON ounder.hierarchy +\r +\n LIKE CONCAT(mo.hierarchy, +\'%\') +\r +\nAND ounder.hierarchy like CONCAT( +\'${currentUserHierarchy}\', +\'%\') +\r +\n INNER JOIN m_client mc ON mc.office_id=ounder.id +\r +\n INNER JOIN m_loan ml ON ml.client_id = mc.id +\r +\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id +\r +\n WHERE ml.loan_status_id=300 /* active */ +\r +\n AND mo.id= +${officeId} +\r +\n AND (ml.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\n GROUP BY ml.id) x +\r +\n ) z +\r +\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency +\r +\nORDER BY periods.currency, periods.pid', 'Loan amount in arrears by branch', 1, 1), + (54, 'Rescheduled Loans', 'Table', NULL, 'Loan', 'SELECT +\r +\nconcat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nifnull(cur.display_symbol, ml.currency_code) as Currency, +\r +\nc.account_no as "Client Account No.", +\r +\nc.display_name AS +\'Client Name\', +\r +\nml.account_no AS +\'Loan Account No.\', +\r +\nmpl.name AS +\'Product Name\', +\r +\nml.disbursedon_date AS +\'Disbursed Date\', +\r +\nlt.transaction_date AS +\'Written Off date\', +\r +\nml.principal_amount as "Loan Amount", +\r +\nifnull(lt.principal_portion_derived, 0) AS +\'Rescheduled Principal\', +\r +\nifnull(lt.interest_portion_derived, 0) AS +\'Rescheduled Interest\', +\r +\nifnull(lt.fee_charges_portion_derived,0) AS +\'Rescheduled Fees\', +\r +\nifnull(lt.penalty_charges_portion_derived,0) AS +\'Rescheduled Penalties\', +\r +\nn.note AS +\'Reason For Rescheduling\', +\r +\nIFNULL(ms.display_name, +\'-\') AS +\'Loan Officer Name\' +\r +\nFROM m_office o +\r +\nJOIN m_office ounder ON ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nAND ounder.hierarchy like CONCAT( +\'${currentUserHierarchy}\', +\'%\') +\r +\nJOIN m_client c ON c.office_id = ounder.id +\r +\nJOIN m_loan ml ON ml.client_id = c.id +\r +\nJOIN m_product_loan mpl ON mpl.id=ml.product_id +\r +\nLEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id +\r +\nJOIN m_loan_transaction lt ON lt.loan_id = ml.id +\r +\nLEFT JOIN m_note n ON n.loan_transaction_id = lt.id +\r +\nLEFT JOIN m_currency cur on cur.code = ml.currency_code +\r +\nWHERE lt.transaction_type_enum = 7 /*marked for rescheduling */ +\r +\nAND lt.is_reversed is false +\r +\nAND ml.loan_status_id=602 +\r +\nAND o.id= +${officeId} +\r +\nAND (mpl.id= +${loanProductId} +OR +${loanProductId} += +- +1 +) +\r +\nAND lt.transaction_date BETWEEN +\'${startDate}\' AND +\'${endDate}\' +\r +\nAND (ml.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nORDER BY ounder.hierarchy, ifnull(cur.display_symbol, ml.currency_code), ml.account_no', 'Individual Lending Report. Rescheduled Loans. The ability to reschedule (or mark that you have rescheduled the loan elsewhere) is a legacy of the older Mifos product. Needed for migration.', 1, 1), + (55, 'Active Loans Passed Final Maturity', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nlo.display_name as "Loan Officer", +\r +\nc.display_name as "Client", l.account_no as "Loan Account No.", pl.`name` as "Product", +\r +\nf.`name` as Fund, +\r +\nl.principal_amount as "Loan Amount", +\r +\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", +\r +\ndate(l.disbursedon_date) as "Disbursed Date", +\r +\ndate(l.expected_maturedon_date) as "Expected Matured On", +\r +\n +\r +\nl.principal_repaid_derived as "Principal Repaid", +\r +\nl.principal_outstanding_derived as "Principal Outstanding", +\r +\nlaa.principal_overdue_derived as "Principal Overdue", +\r +\n +\r +\nl.interest_repaid_derived as "Interest Repaid", +\r +\nl.interest_outstanding_derived as "Interest Outstanding", +\r +\nlaa.interest_overdue_derived as "Interest Overdue", +\r +\n +\r +\nl.fee_charges_repaid_derived as "Fees Repaid", +\r +\nl.fee_charges_outstanding_derived as "Fees Outstanding", +\r +\nlaa.fee_charges_overdue_derived as "Fees Overdue", +\r +\n +\r +\nl.penalty_charges_repaid_derived as "Penalties Repaid", +\r +\nl.penalty_charges_outstanding_derived as "Penalties Outstanding", +\r +\nlaa.penalty_charges_overdue_derived as "Penalties Overdue" +\r +\n +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 300 +\r +\nand l.expected_maturedon_date < curdate() +\r +\ngroup by l.id +\r +\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'Individual Client +\n +\nReport', 1, 1), + (56, 'Active Loans Passed Final Maturity Summary', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, +\'.\', +\'\')) - 1))), mo.`name`) as "Office/Branch", x.currency as Currency, +\r +\n x.client_count as "No. of Clients", x.active_loan_count as "No. Active Loans", x. arrears_loan_count as "No. of Loans in Arrears", +\r +\nx.principal as "Total Loans Disbursed", x.principal_repaid as "Principal Repaid", x.principal_outstanding as "Principal Outstanding", x.principal_overdue as "Principal Overdue", +\r +\nx.interest as "Total Interest", x.interest_repaid as "Interest Repaid", x.interest_outstanding as "Interest Outstanding", x.interest_overdue as "Interest Overdue", +\r +\nx.fees as "Total Fees", x.fees_repaid as "Fees Repaid", x.fees_outstanding as "Fees Outstanding", x.fees_overdue as "Fees Overdue", +\r +\nx.penalties as "Total Penalties", x.penalties_repaid as "Penalties Repaid", x.penalties_outstanding as "Penalties Outstanding", x.penalties_overdue as "Penalties Overdue", +\r +\n +\r +\n (case +\r +\n when +${parType} += +1 +then +\r +\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char) +\r +\n when +${parType} += +2 +then +\r +\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char) +\r +\n when +${parType} += +3 +then +\r +\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char) +\r +\n when +${parType} += +4 +then +\r +\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char) +\r +\n else "invalid PAR Type" +\r +\n end) as "Portfolio at Risk %" +\r +\n from m_office mo +\r +\njoin +\r +\n(select ounder.id as branch, +\r +\nifnull(cur.display_symbol, l.currency_code) as currency, +\r +\ncount(distinct(c.id)) as client_count, +\r +\ncount(distinct(l.id)) as active_loan_count, +\r +\ncount(distinct(laa.loan_id) ) as arrears_loan_count, +\r +\n +\r +\nsum(l.principal_disbursed_derived) as principal, +\r +\nsum(l.principal_repaid_derived) as principal_repaid, +\r +\nsum(l.principal_outstanding_derived) as principal_outstanding, +\r +\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue, +\r +\n +\r +\nsum(l.interest_charged_derived) as interest, +\r +\nsum(l.interest_repaid_derived) as interest_repaid, +\r +\nsum(l.interest_outstanding_derived) as interest_outstanding, +\r +\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue, +\r +\n +\r +\nsum(l.fee_charges_charged_derived) as fees, +\r +\nsum(l.fee_charges_repaid_derived) as fees_repaid, +\r +\nsum(l.fee_charges_outstanding_derived) as fees_outstanding, +\r +\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue, +\r +\n +\r +\nsum(l.penalty_charges_charged_derived) as penalties, +\r +\nsum(l.penalty_charges_repaid_derived) as penalties_repaid, +\r +\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding, +\r +\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue +\r +\n +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\r +\n +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 300 +\r +\nand l.expected_maturedon_date < curdate() +\r +\ngroup by ounder.id, l.currency_code) x on x.branch = mo.id +\r +\norder by mo.hierarchy, x.Currency', NULL, 1, 1), + (57, 'Active Loans in last installment', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(lastInstallment.`hierarchy`) - LENGTH(REPLACE(lastInstallment.`hierarchy`, +\'.\', +\'\')) - 1))), lastInstallment.branch) as "Office/Branch", +\r +\nlastInstallment.Currency, +\r +\nlastInstallment.`Loan Officer`, +\r +\nlastInstallment.`Client Account No`, lastInstallment.`Client`, +\r +\nlastInstallment.`Loan Account No`, lastInstallment.`Product`, +\r +\nlastInstallment.`Fund`, lastInstallment.`Loan Amount`, +\r +\nlastInstallment.`Annual Nominal Interest Rate`, +\r +\nlastInstallment.`Disbursed`, lastInstallment.`Expected Matured On` , +\r +\n +\r +\nl.principal_repaid_derived as "Principal Repaid", +\r +\nl.principal_outstanding_derived as "Principal Outstanding", +\r +\nlaa.principal_overdue_derived as "Principal Overdue", +\r +\n +\r +\nl.interest_repaid_derived as "Interest Repaid", +\r +\nl.interest_outstanding_derived as "Interest Outstanding", +\r +\nlaa.interest_overdue_derived as "Interest Overdue", +\r +\n +\r +\nl.fee_charges_repaid_derived as "Fees Repaid", +\r +\nl.fee_charges_outstanding_derived as "Fees Outstanding", +\r +\nlaa.fee_charges_overdue_derived as "Fees Overdue", +\r +\n +\r +\nl.penalty_charges_repaid_derived as "Penalties Repaid", +\r +\nl.penalty_charges_outstanding_derived as "Penalties Outstanding", +\r +\nlaa.penalty_charges_overdue_derived as "Penalties Overdue" +\r +\n +\r +\nfrom +\r +\n(select l.id as loanId, l.number_of_repayments, min(r.installment), +\r +\nounder.id, ounder.hierarchy, ounder.`name` as branch, +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nlo.display_name as "Loan Officer", c.account_no as "Client Account No", +\r +\nc.display_name as "Client", l.account_no as "Loan Account No", pl.`name` as "Product", +\r +\nf.`name` as Fund, l.principal_amount as "Loan Amount", +\r +\nl.annual_nominal_interest_rate as "Annual Nominal Interest Rate", +\r +\ndate(l.disbursedon_date) as "Disbursed", date(l.expected_maturedon_date) as "Expected Matured On" +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_loan_repayment_schedule r on r.loan_id = l.id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 300 +\r +\nand r.completed_derived is false +\r +\nand r.duedate >= curdate() +\r +\ngroup by l.id +\r +\nhaving l.number_of_repayments = min(r.installment)) lastInstallment +\r +\njoin m_loan l on l.id = lastInstallment.loanId +\r +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\r +\norder by lastInstallment.hierarchy, lastInstallment.Currency, lastInstallment.`Client Account No`, lastInstallment.`Loan Account No`', 'Individual Client +\n +\nReport', 1, 1), + (58, 'Active Loans in last installment Summary', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(mo.`hierarchy`) - LENGTH(REPLACE(mo.`hierarchy`, +\'.\', +\'\')) - 1))), mo.`name`) as "Office/Branch", x.currency as Currency, +\r +\n x.client_count as "No. of Clients", x.active_loan_count as "No. Active Loans", x. arrears_loan_count as "No. of Loans in Arrears", +\r +\nx.principal as "Total Loans Disbursed", x.principal_repaid as "Principal Repaid", x.principal_outstanding as "Principal Outstanding", x.principal_overdue as "Principal Overdue", +\r +\nx.interest as "Total Interest", x.interest_repaid as "Interest Repaid", x.interest_outstanding as "Interest Outstanding", x.interest_overdue as "Interest Overdue", +\r +\nx.fees as "Total Fees", x.fees_repaid as "Fees Repaid", x.fees_outstanding as "Fees Outstanding", x.fees_overdue as "Fees Overdue", +\r +\nx.penalties as "Total Penalties", x.penalties_repaid as "Penalties Repaid", x.penalties_outstanding as "Penalties Outstanding", x.penalties_overdue as "Penalties Overdue", +\r +\n +\r +\n (case +\r +\n when +${parType} += +1 +then +\r +\n cast(round((x.principal_overdue * 100) / x.principal_outstanding, 2) as char) +\r +\n when +${parType} += +2 +then +\r +\n cast(round(((x.principal_overdue + x.interest_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding), 2) as char) +\r +\n when +${parType} += +3 +then +\r +\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding), 2) as char) +\r +\n when +${parType} += +4 +then +\r +\n cast(round(((x.principal_overdue + x.interest_overdue + x.fees_overdue + x.penalties_overdue) * 100) / (x.principal_outstanding + x.interest_outstanding + x.fees_outstanding + x.penalties_overdue), 2) as char) +\r +\n else "invalid PAR Type" +\r +\n end) as "Portfolio at Risk %" +\r +\n from m_office mo +\r +\njoin +\r +\n(select lastInstallment.branchId as branchId, +\r +\nlastInstallment.Currency, +\r +\ncount(distinct(lastInstallment.clientId)) as client_count, +\r +\ncount(distinct(lastInstallment.loanId)) as active_loan_count, +\r +\ncount(distinct(laa.loan_id) ) as arrears_loan_count, +\r +\n +\r +\nsum(l.principal_disbursed_derived) as principal, +\r +\nsum(l.principal_repaid_derived) as principal_repaid, +\r +\nsum(l.principal_outstanding_derived) as principal_outstanding, +\r +\nsum(ifnull(laa.principal_overdue_derived,0)) as principal_overdue, +\r +\n +\r +\nsum(l.interest_charged_derived) as interest, +\r +\nsum(l.interest_repaid_derived) as interest_repaid, +\r +\nsum(l.interest_outstanding_derived) as interest_outstanding, +\r +\nsum(ifnull(laa.interest_overdue_derived,0)) as interest_overdue, +\r +\n +\r +\nsum(l.fee_charges_charged_derived) as fees, +\r +\nsum(l.fee_charges_repaid_derived) as fees_repaid, +\r +\nsum(l.fee_charges_outstanding_derived) as fees_outstanding, +\r +\nsum(ifnull(laa.fee_charges_overdue_derived,0)) as fees_overdue, +\r +\n +\r +\nsum(l.penalty_charges_charged_derived) as penalties, +\r +\nsum(l.penalty_charges_repaid_derived) as penalties_repaid, +\r +\nsum(l.penalty_charges_outstanding_derived) as penalties_outstanding, +\r +\nsum(ifnull(laa.penalty_charges_overdue_derived,0)) as penalties_overdue +\r +\n +\r +\nfrom +\r +\n(select l.id as loanId, l.number_of_repayments, min(r.installment), +\r +\nounder.id as branchId, ounder.hierarchy, ounder.`name` as branch, +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nlo.display_name as "Loan Officer", c.id as clientId, c.account_no as "Client Account No", +\r +\nc.display_name as "Client", l.account_no as "Loan Account No", pl.`name` as "Product", +\r +\nf.`name` as Fund, l.principal_amount as "Loan Amount", +\r +\nl.annual_nominal_interest_rate as "Annual Nominal Interest Rate", +\r +\ndate(l.disbursedon_date) as "Disbursed", date(l.expected_maturedon_date) as "Expected Matured On" +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_loan_repayment_schedule r on r.loan_id = l.id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.loan_status_id = 300 +\r +\nand r.completed_derived is false +\r +\nand r.duedate >= curdate() +\r +\ngroup by l.id +\r +\nhaving l.number_of_repayments = min(r.installment)) lastInstallment +\r +\njoin m_loan l on l.id = lastInstallment.loanId +\r +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\r +\ngroup by lastInstallment.branchId, lastInstallment.Currency) x on x.branchId = mo.id +\r +\norder by mo.hierarchy, x.Currency', 'Individual Client +\n +\nReport', 1, 1), + (59, 'Active Loans by Disbursal Period', 'Table', NULL, 'Loan', 'select concat(repeat("..", +\r +\n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, +\'.\', +\'\')) - 1))), ounder.`name`) as "Office/Branch", +\r +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\r +\nc.account_no as "Client Account No", c.display_name as "Client", l.account_no as "Loan Account No", pl.`name` as "Product", +\r +\nf.`name` as Fund, +\r +\nl.principal_amount as "Loan Principal Amount", +\r +\nl.annual_nominal_interest_rate as " Annual Nominal Interest Rate", +\r +\ndate(l.disbursedon_date) as "Disbursed Date", +\r +\n +\r +\nl.total_expected_repayment_derived as "Total Loan (P+I+F+Pen)", +\r +\nl.total_repayment_derived as "Total Repaid (P+I+F+Pen)", +\r +\nlo.display_name as "Loan Officer" +\r +\n +\r +\nfrom m_office o +\r +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\r +\nand ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\r +\njoin m_client c on c.office_id = ounder.id +\r +\njoin m_loan l on l.client_id = c.id +\r +\njoin m_product_loan pl on pl.id = l.product_id +\r +\nleft join m_staff lo on lo.id = l.loan_officer_id +\r +\nleft join m_currency cur on cur.code = l.currency_code +\r +\nleft join m_fund f on f.id = l.fund_id +\r +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\r +\nwhere o.id = +${officeId} +\r +\nand (l.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\nand (l.product_id = "${loanProductId}" or "-1" = "${loanProductId}") +\r +\nand (ifnull(l.loan_officer_id, -10) = "${loanOfficerId}" or "-1" = "${loanOfficerId}") +\r +\nand (ifnull(l.fund_id, -10) = +${fundId} +or +- +1 += +${fundId} +) +\r +\nand (ifnull(l.loanpurpose_cv_id, -10) = +${loanPurposeId} +or +- +1 += +${loanPurposeId} +) +\r +\nand l.disbursedon_date between +\'${startDate}\' and +\'${endDate}\' +\r +\nand l.loan_status_id = 300 +\r +\ngroup by l.id +\r +\norder by ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'Individual Client +\n +\nReport', 1, 1), + (61, 'Aging Summary (Arrears in Months)', 'Table', NULL, 'Loan', 'SELECT +\r +\n IFNULL(periods.currencyName, periods.currency) as currency, +\r +\n periods.period_no +\'Days In Arrears\', +\r +\n IFNULL(ars.loanId, 0) +\'No Of Loans\', +\r +\n IFNULL(ars.principal,0.0) +\'Original Principal\', +\r +\n IFNULL(ars.interest,0.0) +\'Original Interest\', +\r +\n IFNULL(ars.prinPaid,0.0) +\'Principal Paid\', +\r +\n IFNULL(ars.intPaid,0.0) +\'Interest Paid\', +\r +\n IFNULL(ars.prinOverdue,0.0) +\'Principal Overdue\', +\r +\n IFNULL(ars.intOverdue,0.0) +\'Interest Overdue\' +\r +\nFROM +\r +\n /* full table of aging periods/currencies used combo to ensure each line represented */ +\r +\n (SELECT curs.code as currency, curs.name as currencyName, pers.* from +\r +\n (SELECT +\'On Schedule\' period_no,1 pid UNION +\r +\n SELECT +\'0 - 30\',2 UNION +\r +\n SELECT +\'30 - 60\',3 UNION +\r +\n SELECT +\'60 - 90\',4 UNION +\r +\n SELECT +\'90 - 180\',5 UNION +\r +\n SELECT +\'180 - 360\',6 UNION +\r +\n SELECT +\'> 360\',7 ) pers, +\r +\n (SELECT distinctrow moc.code, moc.name +\r +\n FROM m_office mo2 +\r +\n INNER JOIN m_office ounder2 ON ounder2.hierarchy +\r +\n LIKE CONCAT(mo2.hierarchy, +\'%\') +\r +\nAND ounder2.hierarchy like CONCAT( +\'${currentUserHierarchy}\', +\'%\') +\r +\n INNER JOIN m_client mc2 ON mc2.office_id=ounder2.id +\r +\n INNER JOIN m_loan ml2 ON ml2.client_id = mc2.id +\r +\n INNER JOIN m_organisation_currency moc ON moc.code = ml2.currency_code +\r +\n WHERE ml2.loan_status_id=300 /* active */ +\r +\n AND mo2.id= +${officeId} +\r +\nAND (ml2.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}")) curs) periods +\r +\n +\r +\n +\r +\nLEFT JOIN /* table of aging periods per currency with gaps if no applicable loans */ +\r +\n(SELECT +\r +\n z.currency, z.arrPeriod, +\r +\n COUNT(z.loanId) as loanId, SUM(z.principal) as principal, SUM(z.interest) as interest, +\r +\n SUM(z.prinPaid) as prinPaid, SUM(z.intPaid) as intPaid, +\r +\n SUM(z.prinOverdue) as prinOverdue, SUM(z.intOverdue) as intOverdue +\r +\nFROM +\r +\n /*derived table just used to get arrPeriod value (was much slower to\r\n duplicate calc of minOverdueDate in inner query)\r\nmight not be now with derived fields but didn’t check */ +\r +\n (SELECT x.loanId, x.currency, x.principal, x.interest, x.prinPaid, x.intPaid, x.prinOverdue, x.intOverdue, +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<1, +\'On Schedule\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<31, +\'0 - 30\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<61, +\'30 - 60\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<91, +\'60 - 90\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<181, +\'90 - 180\', +\r +\n IF(DATEDIFF(CURDATE(), minOverdueDate)<361, +\'180 - 360\', +\r +\n +\'> 360\')))))) AS arrPeriod +\r +\n +\r +\n FROM /* get the individual loan details */ +\r +\n (SELECT ml.id AS loanId, ml.currency_code as currency, +\r +\n ml.principal_disbursed_derived as principal, +\r +\n ml.interest_charged_derived as interest, +\r +\n ml.principal_repaid_derived as prinPaid, +\r +\n ml.interest_repaid_derived intPaid, +\r +\n +\r +\n laa.principal_overdue_derived as prinOverdue, +\r +\n laa.interest_overdue_derived as intOverdue, +\r +\n +\r +\n IFNULL(laa.overdue_since_date_derived, curdate()) as minOverdueDate +\r +\n +\r +\n FROM m_office mo +\r +\n INNER JOIN m_office ounder ON ounder.hierarchy +\r +\n LIKE CONCAT(mo.hierarchy, +\'%\') +\r +\nAND ounder.hierarchy like CONCAT( +\'${currentUserHierarchy}\', +\'%\') +\r +\n INNER JOIN m_client mc ON mc.office_id=ounder.id +\r +\n INNER JOIN m_loan ml ON ml.client_id = mc.id +\r +\n LEFT JOIN m_loan_arrears_aging laa on laa.loan_id = ml.id +\r +\n WHERE ml.loan_status_id=300 /* active */ +\r +\n AND mo.id= +${officeId} +\r +\n AND (ml.currency_code = "$\{currencyId}" or "-1" = "$\{currencyId}") +\r +\n GROUP BY ml.id) x +\r +\n ) z +\r +\nGROUP BY z.currency, z.arrPeriod ) ars ON ars.arrPeriod=periods.period_no and ars.currency = periods.currency +\r +\nORDER BY periods.currency, periods.pid', 'Loan amount in arrears by branch', 1, 1), (91, 'Loan Account Schedule', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 0), (92, 'Branch Expected Cash Flow', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 1), - (93, 'Expected Payments By Date - Basic', 'Table', NULL, 'Loan', 'SELECT \r\n ounder.name \'Office\', \r\n IFNULL(ms.display_name,\'-\') \'Loan Officer\',\r\n mc.account_no \'Client Account Number\',\r\n mc.display_name \'Name\',\r\n mp.name \'Product\',\r\n ml.account_no \'Loan Account Number\',\r\n mr.duedate \'Due Date\',\r\n mr.installment \'Installment\',\r\n cu.display_symbol \'Currency\',\r\n mr.principal_amount- IFNULL(mr.principal_completed_derived,0) \'Principal Due\',\r\n mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0) \'Interest Due\', \r\n IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0) \'Fees Due\', \r\n IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0) \'Penalty Due\',\r\n (mr.principal_amount- IFNULL(mr.principal_completed_derived,0)) +\r\n (mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0)) + \r\n (IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0)) + \r\n (IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0)) \'Total Due\', \r\n mlaa.total_overdue_derived \'Total Overdue\'\r\n \r\n FROM m_office mo\r\n JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\n \r\n AND ounder.hierarchy like CONCAT(\'${currentUserHierarchy}\', \'%\')\r\n \r\n LEFT JOIN m_client mc ON mc.office_id=ounder.id\r\n LEFT JOIN m_loan ml ON ml.client_id=mc.id AND ml.loan_status_id=300\r\n LEFT JOIN m_loan_arrears_aging mlaa ON mlaa.loan_id=ml.id\r\n LEFT JOIN m_loan_repayment_schedule mr ON mr.loan_id=ml.id AND mr.completed_derived=0\r\n LEFT JOIN m_product_loan mp ON mp.id=ml.product_id\r\n LEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id\r\n LEFT JOIN m_currency cu ON cu.code=ml.currency_code\r\n WHERE mo.id=${officeId}\r\n AND (IFNULL(ml.loan_officer_id, -10) = "${loanOfficerId}" OR "-1" = "${loanOfficerId}")\r\n AND mr.duedate BETWEEN \'${startDate}\' AND \'${endDate}\'\r\n ORDER BY ounder.id,mr.duedate,ml.account_no', 'Test', 1, 1), + (93, 'Expected Payments By Date - Basic', 'Table', NULL, 'Loan', 'SELECT +\r +\n ounder.name +\'Office\', +\r +\n IFNULL(ms.display_name, +\'-\') +\'Loan Officer\', +\r +\n mc.account_no +\'Client Account Number\', +\r +\n mc.display_name +\'Name\', +\r +\n mp.name +\'Product\', +\r +\n ml.account_no +\'Loan Account Number\', +\r +\n mr.duedate +\'Due Date\', +\r +\n mr.installment +\'Installment\', +\r +\n cu.display_symbol +\'Currency\', +\r +\n mr.principal_amount- IFNULL(mr.principal_completed_derived,0) +\'Principal Due\', +\r +\n mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0) +\'Interest Due\', +\r +\n IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0) +\'Fees Due\', +\r +\n IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0) +\'Penalty Due\', +\r +\n (mr.principal_amount- IFNULL(mr.principal_completed_derived,0)) + +\r +\n (mr.interest_amount- IFNULL(IFNULL(mr.interest_completed_derived,mr.interest_waived_derived),0)) + +\r +\n (IFNULL(mr.fee_charges_amount,0)- IFNULL(IFNULL(mr.fee_charges_completed_derived,mr.fee_charges_waived_derived),0)) + +\r +\n (IFNULL(mr.penalty_charges_amount,0)- IFNULL(IFNULL(mr.penalty_charges_completed_derived,mr.penalty_charges_waived_derived),0)) +\'Total Due\', +\r +\n mlaa.total_overdue_derived +\'Total Overdue\' +\r +\n +\r +\n FROM m_office mo +\r +\n JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, +\'%\') +\r +\n +\r +\n AND ounder.hierarchy like CONCAT( +\'${currentUserHierarchy}\', +\'%\') +\r +\n +\r +\n LEFT JOIN m_client mc ON mc.office_id=ounder.id +\r +\n LEFT JOIN m_loan ml ON ml.client_id=mc.id AND ml.loan_status_id=300 +\r +\n LEFT JOIN m_loan_arrears_aging mlaa ON mlaa.loan_id=ml.id +\r +\n LEFT JOIN m_loan_repayment_schedule mr ON mr.loan_id=ml.id AND mr.completed_derived=0 +\r +\n LEFT JOIN m_product_loan mp ON mp.id=ml.product_id +\r +\n LEFT JOIN m_staff ms ON ms.id=ml.loan_officer_id +\r +\n LEFT JOIN m_currency cu ON cu.code=ml.currency_code +\r +\n WHERE mo.id= +${officeId} +\r +\n AND (IFNULL(ml.loan_officer_id, -10) = "${loanOfficerId}" OR "-1" = "${loanOfficerId}") +\r +\n AND mr.duedate BETWEEN +\'${startDate}\' AND +\'${endDate}\' +\r +\n ORDER BY ounder.id,mr.duedate,ml.account_no', 'Test', 1, 1), (94, 'Expected Payments By Date - Formatted', 'Pentaho', NULL, 'Loan', NULL, NULL, 1, 1), - (96, 'GroupSummaryCounts', 'Table', NULL, NULL, '\n/*\nActive Client is a client linked to the \'group\' via m_group_client \nand with an active \'status_enum\'.)\nActive Borrowers - Borrower may be a client or a \'group\'\n*/\nselect x.*\nfrom m_office o,\nm_group g,\n\n(select a.activeClients, \n(b.activeClientLoans + c.activeGroupLoans) as activeLoans, \nb.activeClientLoans, c.activeGroupLoans,\n(b.activeClientBorrowers + c.activeGroupBorrowers) as activeBorrowers,\nb.activeClientBorrowers, c.activeGroupBorrowers,\n(b.overdueClientLoans + c.overdueGroupLoans) as overdueLoans,\nb.overdueClientLoans, c.overdueGroupLoans\nfrom\n(select count(*) as activeClients\nfrom m_group topgroup\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, \'%\')\njoin m_group_client gc on gc.group_id = g.id\njoin m_client c on c.id = gc.client_id\nwhere topgroup.id = ${groupId} \nand c.status_enum = 300) a,\n\n(select count(*) as activeClientLoans, \ncount(distinct(l.client_id)) as activeClientBorrowers,\nifnull(sum(if(laa.loan_id is not null, 1, 0)), 0) as overdueClientLoans\nfrom m_group topgroup\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, \'%\')\njoin m_loan l on l.group_id = g.id and l.client_id is not null\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\nwhere topgroup.id = ${groupId} \nand l.loan_status_id = 300) b,\n\n(select count(*) as activeGroupLoans, \ncount(distinct(l.group_id)) as activeGroupBorrowers,\nifnull(sum(if(laa.loan_id is not null, 1, 0)), 0) as overdueGroupLoans\nfrom m_group topgroup\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, \'%\')\njoin m_loan l on l.group_id = g.id and l.client_id is null\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\nwhere topgroup.id = ${groupId} \nand l.loan_status_id = 300) c\n) x\n\nwhere g.id = ${groupId}\nand o.id = g.office_id\nand o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\n', 'Utility query for getting group summary count details for a group_id', 1, 0), - (97, 'GroupSummaryAmounts', 'Table', NULL, NULL, '\nselect ifnull(cur.display_symbol, l.currency_code) as currency,\nifnull(sum(l.principal_disbursed_derived),0) as totalDisbursedAmount,\nifnull(sum(l.principal_outstanding_derived),0) as totalLoanOutstandingAmount,\ncount(laa.loan_id) as overdueLoans, ifnull(sum(laa.total_overdue_derived), 0) as totalLoanOverdueAmount\nfrom m_group topgroup\njoin m_office o on o.id = topgroup.office_id and o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, \'%\')\njoin m_loan l on l.group_id = g.id\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id\nleft join m_currency cur on cur.code = l.currency_code\nwhere topgroup.id = ${groupId}\nand l.disbursedon_date is not null\ngroup by l.currency_code\n', 'Utility query for getting group summary currency amount details for a group_id', 1, 0), - (106, 'TxnRunningBalances', 'Table', NULL, 'Transaction', '\nselect date(\'${startDate}\') as \'Transaction Date\', \'Opening Balance\' as `Transaction Type`, null as Office,\n null as \'Loan Officer\', null as `Loan Account No`, null as `Loan Product`, null as `Currency`, \n null as `Client Account No`, null as Client, \n null as Amount, null as Principal, null as Interest,\n@totalOutstandingPrincipal := \nifnull(round(sum(\n if (txn.transaction_type_enum = 1 /* disbursement */,\n ifnull(txn.amount,0.00), \n ifnull(txn.principal_portion_derived,0.00) * -1)) \n ,2),0.00) as \'Outstanding Principal\',\n\n@totalInterestIncome := \nifnull(round(sum(\n if (txn.transaction_type_enum in (2,5,8) /* repayment, repayment at disbursal, recovery repayment */,\n ifnull(txn.interest_portion_derived,0.00), \n 0))\n ,2),0.00) as \'Interest Income\',\n\n@totalWriteOff :=\nifnull(round(sum(\n if (txn.transaction_type_enum = 6 /* write-off */,\n ifnull(txn.principal_portion_derived,0.00), \n 0)) \n ,2),0.00) as \'Principal Write Off\'\nfrom m_office o\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\n and ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_client c on c.office_id = ounder.id\njoin m_loan l on l.client_id = c.id\njoin m_product_loan lp on lp.id = l.product_id\njoin m_loan_transaction txn on txn.loan_id = l.id\nleft join m_currency cur on cur.code = l.currency_code\nwhere txn.is_reversed = false \nand txn.transaction_type_enum not in (10,11)\nand o.id = ${officeId}\nand txn.transaction_date < date(\'${startDate}\')\n\nunion all\n\nselect x.`Transaction Date`, x.`Transaction Type`, x.Office, x.`Loan Officer`, x.`Loan Account No`, x.`Loan Product`, x.`Currency`, \n x.`Client Account No`, x.Client, x.Amount, x.Principal, x.Interest,\ncast(round( \n if (x.transaction_type_enum = 1 /* disbursement */,\n @totalOutstandingPrincipal := @totalOutstandingPrincipal + x.`Amount`, \n @totalOutstandingPrincipal := @totalOutstandingPrincipal - x.`Principal`) \n ,2) as decimal(19,2)) as \'Outstanding Principal\',\ncast(round(\n if (x.transaction_type_enum in (2,5,8) /* repayment, repayment at disbursal, recovery repayment */,\n @totalInterestIncome := @totalInterestIncome + x.`Interest`, \n @totalInterestIncome) \n ,2) as decimal(19,2)) as \'Interest Income\',\ncast(round(\n if (x.transaction_type_enum = 6 /* write-off */,\n @totalWriteOff := @totalWriteOff + x.`Principal`, \n @totalWriteOff) \n ,2) as decimal(19,2)) as \'Principal Write Off\'\nfrom\n(select txn.transaction_type_enum, txn.id as txn_id, txn.transaction_date as \'Transaction Date\', \ncast(\n ifnull(re.enum_message_property, concat(\'Unknown Transaction Type Value: \' , txn.transaction_type_enum)) \n as char) as \'Transaction Type\',\nounder.`name` as Office, lo.display_name as \'Loan Officer\',\nl.account_no as \'Loan Account No\', lp.`name` as \'Loan Product\', \nifnull(cur.display_symbol, l.currency_code) as Currency,\nc.account_no as \'Client Account No\', c.display_name as \'Client\',\nifnull(txn.amount,0.00) as Amount,\nifnull(txn.principal_portion_derived,0.00) as Principal,\nifnull(txn.interest_portion_derived,0.00) as Interest\nfrom m_office o\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \'%\')\n and ounder.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_client c on c.office_id = ounder.id\njoin m_loan l on l.client_id = c.id\nleft join m_staff lo on lo.id = l.loan_officer_id\njoin m_product_loan lp on lp.id = l.product_id\njoin m_loan_transaction txn on txn.loan_id = l.id\nleft join m_currency cur on cur.code = l.currency_code\nleft join r_enum_value re on re.enum_name = \'transaction_type_enum\'\n and re.enum_id = txn.transaction_type_enum\nwhere txn.is_reversed = false \nand txn.transaction_type_enum not in (10,11)\nand (ifnull(l.loan_officer_id, -10) = \'${loanOfficerId}\' or \'-1\' = \'${loanOfficerId}\')\nand o.id = ${officeId}\nand txn.transaction_date >= date(\'${startDate}\')\nand txn.transaction_date <= date(\'${endDate}\')\norder by txn.transaction_date, txn.id) x\n', 'Running Balance Txn report for Individual Lending.\nSuitable for small MFI\'s. Larger could use it using the branch or other parameters.\nBasically, suck it and see if its quick enough for you out-of-te box or whether it needs performance work in your situation.\n', 0, 0), - (107, 'FieldAgentStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_staff fa\njoin m_office o on o.id = fa.office_id\n and o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_group pgm on pgm.staff_id = fa.id\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id \nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id \njoin m_client c on c.id = l.client_id\nwhere fa.id = ${staffId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Field Agent Statistics', 0, 0), - (108, 'FieldAgentPrograms', 'Table', NULL, 'Quipo', ' \nselect pgm.id, pgm.display_name as `name`, sts.enum_message_property as status\n from m_group pgm \n join m_office o on o.id = pgm.office_id\n and o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\n left join r_enum_value sts on sts.enum_name = \'status_enum\' and sts.enum_id = pgm.status_enum\n where pgm.staff_id = ${staffId} \n', 'List of Field Agent Programs', 0, 0), - (109, 'ProgramDetails', 'Table', NULL, 'Quipo', '\n select l.id as loanId, l.account_no as loanAccountNo, c.id as clientId, c.account_no as clientAccountNo,\n pgm.display_name as programName, \n\n(select count(*)\nfrom m_loan cy\nwhere cy.group_id = pgm.id and cy.client_id =c.id\nand cy.disbursedon_date <= l.disbursedon_date) as loanCycleNo,\n\nc.display_name as clientDisplayName,\n ifnull(cur.display_symbol, l.currency_code) as Currency,\nifnull(l.principal_repaid_derived,0.0) as loanRepaidAmount,\nifnull(l.principal_outstanding_derived, 0.0) as loanOutstandingAmount,\nifnull(lpa.principal_in_advance_derived,0.0) as LoanPaidInAdvance,\n\nifnull(laa.principal_overdue_derived, 0.0) as loanInArrearsAmount, \nif(ifnull(laa.principal_overdue_derived, 0.00) > 0, \'Yes\', \'No\') as inDefault,\n\nif(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0) as portfolioAtRisk\n\n from m_group pgm\n join m_office o on o.id = pgm.office_id\n and o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\n join m_loan l on l.group_id = pgm.id and l.client_id is not null\n left join m_currency cur on cur.code = l.currency_code\n join m_client c on c.id = l.client_id\n left join m_loan_arrears_aging laa on laa.loan_id = l.id\n left join m_loan_paid_in_advance lpa on lpa.loan_id = l.id \n where pgm.id = ${programId}\n and l.loan_status_id = 300\norder by c.display_name, l.account_no\n \n', 'List of Loans in a Program', 0, 0), + (96, 'GroupSummaryCounts', 'Table', NULL, NULL, ' +\n/*\nActive Client is a client linked to the \'group\' via m_group_client \nand with an active \'status_enum\'.)\nActive Borrowers - Borrower may be a client or a \'group\'\n*/ +\nselect x.* +\nfrom m_office o, +\nm_group g, +\n +\n(select a.activeClients, +\n(b.activeClientLoans + c.activeGroupLoans) as activeLoans, +\nb.activeClientLoans, c.activeGroupLoans, +\n(b.activeClientBorrowers + c.activeGroupBorrowers) as activeBorrowers, +\nb.activeClientBorrowers, c.activeGroupBorrowers, +\n(b.overdueClientLoans + c.overdueGroupLoans) as overdueLoans, +\nb.overdueClientLoans, c.overdueGroupLoans +\nfrom +\n(select count(*) as activeClients +\nfrom m_group topgroup +\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, +\'%\') +\njoin m_group_client gc on gc.group_id = g.id +\njoin m_client c on c.id = gc.client_id +\nwhere topgroup.id = +${groupId} +\nand c.status_enum = 300) a, +\n +\n(select count(*) as activeClientLoans, +\ncount(distinct(l.client_id)) as activeClientBorrowers, +\nifnull(sum(if(laa.loan_id is not null, 1, 0)), 0) as overdueClientLoans +\nfrom m_group topgroup +\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, +\'%\') +\njoin m_loan l on l.group_id = g.id and l.client_id is not null +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\nwhere topgroup.id = +${groupId} +\nand l.loan_status_id = 300) b, +\n +\n(select count(*) as activeGroupLoans, +\ncount(distinct(l.group_id)) as activeGroupBorrowers, +\nifnull(sum(if(laa.loan_id is not null, 1, 0)), 0) as overdueGroupLoans +\nfrom m_group topgroup +\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, +\'%\') +\njoin m_loan l on l.group_id = g.id and l.client_id is null +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\nwhere topgroup.id = +${groupId} +\nand l.loan_status_id = 300) c +\n) x +\n +\nwhere g.id = +${groupId} +\nand o.id = g.office_id +\nand o.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\n', 'Utility query for getting group summary count details for a group_id', 1, 0), + (97, 'GroupSummaryAmounts', 'Table', NULL, NULL, ' +\nselect ifnull(cur.display_symbol, l.currency_code) as currency, +\nifnull(sum(l.principal_disbursed_derived),0) as totalDisbursedAmount, +\nifnull(sum(l.principal_outstanding_derived),0) as totalLoanOutstandingAmount, +\ncount(laa.loan_id) as overdueLoans, ifnull(sum(laa.total_overdue_derived), 0) as totalLoanOverdueAmount +\nfrom m_group topgroup +\njoin m_office o on o.id = topgroup.office_id and o.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, +\'%\') +\njoin m_loan l on l.group_id = g.id +\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id +\nleft join m_currency cur on cur.code = l.currency_code +\nwhere topgroup.id = +${groupId} +\nand l.disbursedon_date is not null +\ngroup by l.currency_code +\n', 'Utility query for getting group summary currency amount details for a group_id', 1, 0), + (106, 'TxnRunningBalances', 'Table', NULL, 'Transaction', ' +\nselect date( +\'${startDate}\') as +\'Transaction Date\', +\'Opening Balance\' as `Transaction Type`, null as Office, +\n null as +\'Loan Officer\', null as `Loan Account No`, null as `Loan Product`, null as `Currency`, +\n null as `Client Account No`, null as Client, +\n null as Amount, null as Principal, null as Interest, +\n@totalOutstandingPrincipal := +\nifnull(round(sum( +\n if (txn.transaction_type_enum = 1 /* disbursement */, +\n ifnull(txn.amount,0.00), +\n ifnull(txn.principal_portion_derived,0.00) * -1)) +\n ,2),0.00) as +\'Outstanding Principal\', +\n +\n@totalInterestIncome := +\nifnull(round(sum( +\n if (txn.transaction_type_enum in (2,5,8) /* repayment, repayment at disbursal, recovery repayment */, +\n ifnull(txn.interest_portion_derived,0.00), +\n 0)) +\n ,2),0.00) as +\'Interest Income\', +\n +\n@totalWriteOff := +\nifnull(round(sum( +\n if (txn.transaction_type_enum = 6 /* write-off */, +\n ifnull(txn.principal_portion_derived,0.00), +\n 0)) +\n ,2),0.00) as +\'Principal Write Off\' +\nfrom m_office o +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\n and ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\njoin m_client c on c.office_id = ounder.id +\njoin m_loan l on l.client_id = c.id +\njoin m_product_loan lp on lp.id = l.product_id +\njoin m_loan_transaction txn on txn.loan_id = l.id +\nleft join m_currency cur on cur.code = l.currency_code +\nwhere txn.is_reversed = false +\nand txn.transaction_type_enum not in (10,11) +\nand o.id = +${officeId} +\nand txn.transaction_date < date( +\'${startDate}\') +\n +\nunion all +\n +\nselect x.`Transaction Date`, x.`Transaction Type`, x.Office, x.`Loan Officer`, x.`Loan Account No`, x.`Loan Product`, x.`Currency`, +\n x.`Client Account No`, x.Client, x.Amount, x.Principal, x.Interest, +\ncast(round( +\n if (x.transaction_type_enum = 1 /* disbursement */, +\n @totalOutstandingPrincipal := @totalOutstandingPrincipal + x.`Amount`, +\n @totalOutstandingPrincipal := @totalOutstandingPrincipal - x.`Principal`) +\n ,2) as decimal(19,2)) as +\'Outstanding Principal\', +\ncast(round( +\n if (x.transaction_type_enum in (2,5,8) /* repayment, repayment at disbursal, recovery repayment */, +\n @totalInterestIncome := @totalInterestIncome + x.`Interest`, +\n @totalInterestIncome) +\n ,2) as decimal(19,2)) as +\'Interest Income\', +\ncast(round( +\n if (x.transaction_type_enum = 6 /* write-off */, +\n @totalWriteOff := @totalWriteOff + x.`Principal`, +\n @totalWriteOff) +\n ,2) as decimal(19,2)) as +\'Principal Write Off\' +\nfrom +\n(select txn.transaction_type_enum, txn.id as txn_id, txn.transaction_date as +\'Transaction Date\', +\ncast( +\n ifnull(re.enum_message_property, concat( +\'Unknown Transaction Type Value: \' , txn.transaction_type_enum)) +\n as char) as +\'Transaction Type\', +\nounder.`name` as Office, lo.display_name as +\'Loan Officer\', +\nl.account_no as +\'Loan Account No\', lp.`name` as +\'Loan Product\', +\nifnull(cur.display_symbol, l.currency_code) as Currency, +\nc.account_no as +\'Client Account No\', c.display_name as +\'Client\', +\nifnull(txn.amount,0.00) as Amount, +\nifnull(txn.principal_portion_derived,0.00) as Principal, +\nifnull(txn.interest_portion_derived,0.00) as Interest +\nfrom m_office o +\njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, +\'%\') +\n and ounder.hierarchy like concat( +\'${currentUserHierarchy}\', +\'%\') +\njoin m_client c on c.office_id = ounder.id +\njoin m_loan l on l.client_id = c.id +\nleft join m_staff lo on lo.id = l.loan_officer_id +\njoin m_product_loan lp on lp.id = l.product_id +\njoin m_loan_transaction txn on txn.loan_id = l.id +\nleft join m_currency cur on cur.code = l.currency_code +\nleft join r_enum_value re on re.enum_name = +\'transaction_type_enum\' +\n and re.enum_id = txn.transaction_type_enum +\nwhere txn.is_reversed = false +\nand txn.transaction_type_enum not in (10,11) +\nand (ifnull(l.loan_officer_id, -10) = +\'${loanOfficerId}\' or +\'-1\' = +\'${loanOfficerId}\') +\nand o.id = +${officeId} +\nand txn.transaction_date >= date( +\'${startDate}\') +\nand txn.transaction_date <= date( +\'${endDate}\') +\norder by txn.transaction_date, txn.id) x +\n', 'Running Balance Txn report for Individual Lending. +\nSuitable for small MFI +\'s. Larger could use it using the branch or other parameters.\nBasically, suck it and see if its quick enough for you out-of-te box or whether it needs performance work in your situation.\n', 0, 0), + (107, 'FieldAgentStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_staff fa\njoin m_office o on o.id = fa.office_id\n and o.hierarchy like concat(\' +${currentUserHierarchy} +\', \'% +\')\njoin m_group pgm on pgm.staff_id = fa.id\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id \nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id \njoin m_client c on c.id = l.client_id\nwhere fa.id = ${staffId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Field Agent Statistics', 0, 0), + (108, 'FieldAgentPrograms', 'Table', NULL, 'Quipo', ' \nselect pgm.id, pgm.display_name as `name`, sts.enum_message_property as status\n from m_group pgm \n join m_office o on o.id = pgm.office_id\n and o.hierarchy like concat(\' +${currentUserHierarchy} +\', \'% +\')\n left join r_enum_value sts on sts.enum_name = \'status_enum +\' and sts.enum_id = pgm.status_enum\n where pgm.staff_id = ${staffId} \n', 'List of Field Agent Programs', 0, 0), + (109, 'ProgramDetails', 'Table', NULL, 'Quipo', '\n select l.id as loanId, l.account_no as loanAccountNo, c.id as clientId, c.account_no as clientAccountNo,\n pgm.display_name as programName, \n\n(select count(*)\nfrom m_loan cy\nwhere cy.group_id = pgm.id and cy.client_id =c.id\nand cy.disbursedon_date <= l.disbursedon_date) as loanCycleNo,\n\nc.display_name as clientDisplayName,\n ifnull(cur.display_symbol, l.currency_code) as Currency,\nifnull(l.principal_repaid_derived,0.0) as loanRepaidAmount,\nifnull(l.principal_outstanding_derived, 0.0) as loanOutstandingAmount,\nifnull(lpa.principal_in_advance_derived,0.0) as LoanPaidInAdvance,\n\nifnull(laa.principal_overdue_derived, 0.0) as loanInArrearsAmount, \nif(ifnull(laa.principal_overdue_derived, 0.00) > 0, \'Yes +\', \'No +\') as inDefault,\n\nif(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0) as portfolioAtRisk\n\n from m_group pgm\n join m_office o on o.id = pgm.office_id\n and o.hierarchy like concat(\' +${currentUserHierarchy} +\', \'% +\')\n join m_loan l on l.group_id = pgm.id and l.client_id is not null\n left join m_currency cur on cur.code = l.currency_code\n join m_client c on c.id = l.client_id\n left join m_loan_arrears_aging laa on laa.loan_id = l.id\n left join m_loan_paid_in_advance lpa on lpa.loan_id = l.id \n where pgm.id = ${programId}\n and l.loan_status_id = 300\norder by c.display_name, l.account_no\n \n', 'List of Loans in a Program', 0, 0), (110, 'ChildrenStaffList', 'Table', NULL, 'Quipo', '\n select s.id, s.display_name, \ns.firstname, s.lastname, s.organisational_role_enum, \ns.organisational_role_parent_staff_id, \nsp.display_name as `organisational_role_parent_staff_display_name` \nfrom m_staff s \njoin m_staff sp on s.organisational_role_parent_staff_id = sp.id \nwhere s.organisational_role_parent_staff_id = ${staffId}\n', 'Get Next Level Down Staff', 0, 0), - (111, 'CoordinatorStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_staff coord\njoin m_staff fa on fa.organisational_role_parent_staff_id = coord.id\njoin m_office o on o.id = fa.office_id\n and o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_group pgm on pgm.staff_id = fa.id\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id \nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id \njoin m_client c on c.id = l.client_id\nwhere coord.id = ${staffId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Coordinator Statistics', 0, 0), - (112, 'BranchManagerStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_staff bm\njoin m_staff coord on coord.organisational_role_parent_staff_id = bm.id\njoin m_staff fa on fa.organisational_role_parent_staff_id = coord.id\njoin m_office o on o.id = fa.office_id\n and o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_group pgm on pgm.staff_id = fa.id\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id \nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id \njoin m_client c on c.id = l.client_id\nwhere bm.id = ${staffId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Branch Manager Statistics', 0, 0), - (113, 'ProgramDirectorStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_staff pd\njoin m_staff bm on bm.organisational_role_parent_staff_id = pd.id\njoin m_staff coord on coord.organisational_role_parent_staff_id = bm.id\njoin m_staff fa on fa.organisational_role_parent_staff_id = coord.id\njoin m_office o on o.id = fa.office_id\n and o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_group pgm on pgm.staff_id = fa.id\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id \nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id \njoin m_client c on c.id = l.client_id\nwhere pd.id = ${staffId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Program DirectorStatistics', 0, 0), - (114, 'ProgramStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_group pgm\njoin m_office o on o.id = pgm.office_id\n and o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id \nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id \njoin m_client c on c.id = l.client_id\nwhere pgm.id = ${programId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Program Statistics', 0, 0), - (115, 'ClientSummary ', 'Table', NULL, NULL, 'SELECT x.* FROM m_client c, m_office o, \n(\n SELECT a.loanCycle, a.activeLoans, b.lastLoanAmount, d.activeSavings, d.totalSavings FROM \n (SELECT IFNULL(MAX(l.loan_counter),0) AS loanCycle, COUNT(l.id) AS activeLoans FROM m_loan l WHERE l.loan_status_id=300 AND l.client_id=${clientId}) a, \n (SELECT count(l.id), IFNULL(l.principal_amount,0) AS \'lastLoanAmount\' FROM m_loan l WHERE l.client_id=${clientId} AND l.disbursedon_date = (SELECT IFNULL(MAX(disbursedon_date),NOW()) FROM m_loan where client_id=${clientId} and loan_status_id=300) group by l.principal_amount) b, \n (SELECT COUNT(s.id) AS \'activeSavings\', IFNULL(SUM(s.account_balance_derived),0) AS \'totalSavings\' FROM m_savings_account s WHERE s.status_enum=300 AND s.client_id=${clientId}) d\n) x\nWHERE c.id=${clientId} AND o.id = c.office_id AND o.hierarchy LIKE CONCAT(\'${currentUserHierarchy}\', \'%\')', 'Utility query for getting the client summary details', 1, 0), - (116, 'LoanCyclePerProduct', 'Table', NULL, NULL, 'SELECT lp.name AS \'productName\', MAX(l.loan_product_counter) AS \'loanProductCycle\' FROM m_loan l JOIN m_product_loan lp ON l.product_id=lp.id WHERE lp.include_in_borrower_cycle=1 AND l.loan_product_counter IS NOT NULL AND l.client_id=${clientId} GROUP BY l.product_id', 'Utility query for getting the client loan cycle details', 1, 0), - (117, 'GroupSavingSummary', 'Table', NULL, NULL, 'select ifnull(cur.display_symbol, sa.currency_code) as currency,\ncount(sa.id) as totalSavingAccounts, ifnull(sum(sa.account_balance_derived),0) as totalSavings\nfrom m_group topgroup\njoin m_office o on o.id = topgroup.office_id and o.hierarchy like concat(\'${currentUserHierarchy}\', \'%\')\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, \'%\')\njoin m_savings_account sa on sa.group_id = g.id\nleft join m_currency cur on cur.code = sa.currency_code\nwhere topgroup.id = ${groupId}\nand sa.activatedon_date is not null\ngroup by sa.currency_code', 'Utility query for getting group or center saving summary details for a group_id', 1, 0), + (111, 'CoordinatorStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_staff coord\njoin m_staff fa on fa.organisational_role_parent_staff_id = coord.id\njoin m_office o on o.id = fa.office_id\n and o.hierarchy like concat(\' +${currentUserHierarchy} +\', \'% +\')\njoin m_group pgm on pgm.staff_id = fa.id\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id \nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id \njoin m_client c on c.id = l.client_id\nwhere coord.id = ${staffId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Coordinator Statistics', 0, 0), + (112, 'BranchManagerStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_staff bm\njoin m_staff coord on coord.organisational_role_parent_staff_id = bm.id\njoin m_staff fa on fa.organisational_role_parent_staff_id = coord.id\njoin m_office o on o.id = fa.office_id\n and o.hierarchy like concat(\' +${currentUserHierarchy} +\', \'% +\')\njoin m_group pgm on pgm.staff_id = fa.id\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id \nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id \njoin m_client c on c.id = l.client_id\nwhere bm.id = ${staffId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Branch Manager Statistics', 0, 0), + (113, 'ProgramDirectorStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_staff pd\njoin m_staff bm on bm.organisational_role_parent_staff_id = pd.id\njoin m_staff coord on coord.organisational_role_parent_staff_id = bm.id\njoin m_staff fa on fa.organisational_role_parent_staff_id = coord.id\njoin m_office o on o.id = fa.office_id\n and o.hierarchy like concat(\' +${currentUserHierarchy} +\', \'% +\')\njoin m_group pgm on pgm.staff_id = fa.id\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id \nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id \njoin m_client c on c.id = l.client_id\nwhere pd.id = ${staffId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Program DirectorStatistics', 0, 0), + (114, 'ProgramStats', 'Table', NULL, 'Quipo', '\nselect ifnull(cur.display_symbol, l.currency_code) as Currency,\n/*This query will return more than one entry if more than one currency is used */\ncount(distinct(c.id)) as activeClients, count(*) as activeLoans,\nsum(l.principal_disbursed_derived) as disbursedAmount,\nsum(l.principal_outstanding_derived) as loanOutstandingAmount,\nround((sum(l.principal_outstanding_derived) * 100) / sum(l.principal_disbursed_derived),2) as loanOutstandingPC,\nsum(ifnull(lpa.principal_in_advance_derived,0.0)) as LoanPaidInAdvance,\nsum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) as portfolioAtRisk,\n\nround((sum(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n l.principal_outstanding_derived,0)) * 100) / sum(l.principal_outstanding_derived), 2) as portfolioAtRiskPC,\n\ncount(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) as clientsInDefault,\nround((count(distinct(\n if(date_sub(curdate(), interval 28 day) > ifnull(laa.overdue_since_date_derived, curdate()),\n c.id,null))) * 100) / count(distinct(c.id)),2) as clientsInDefaultPC,\n(sum(l.principal_disbursed_derived) / count(*)) as averageLoanAmount\nfrom m_group pgm\njoin m_office o on o.id = pgm.office_id\n and o.hierarchy like concat(\' +${currentUserHierarchy} +\', \'% +\')\njoin m_loan l on l.group_id = pgm.id and l.client_id is not null\nleft join m_currency cur on cur.code = l.currency_code\nleft join m_loan_arrears_aging laa on laa.loan_id = l.id \nleft join m_loan_paid_in_advance lpa on lpa.loan_id = l.id \njoin m_client c on c.id = l.client_id\nwhere pgm.id = ${programId}\nand l.loan_status_id = 300\ngroup by l.currency_code\n', 'Program Statistics', 0, 0), + (115, 'ClientSummary ', 'Table', NULL, NULL, 'SELECT x.* FROM m_client c, m_office o, \n(\n SELECT a.loanCycle, a.activeLoans, b.lastLoanAmount, d.activeSavings, d.totalSavings FROM \n (SELECT IFNULL(MAX(l.loan_counter),0) AS loanCycle, COUNT(l.id) AS activeLoans FROM m_loan l WHERE l.loan_status_id=300 AND l.client_id=${clientId}) a, \n (SELECT count(l.id), IFNULL(l.principal_amount,0) AS \'lastLoanAmount +\' FROM m_loan l WHERE l.client_id=${clientId} AND l.disbursedon_date = (SELECT IFNULL(MAX(disbursedon_date),NOW()) FROM m_loan where client_id=${clientId} and loan_status_id=300) group by l.principal_amount) b, \n (SELECT COUNT(s.id) AS \'activeSavings +\', IFNULL(SUM(s.account_balance_derived),0) AS \'totalSavings +\' FROM m_savings_account s WHERE s.status_enum=300 AND s.client_id=${clientId}) d\n) x\nWHERE c.id=${clientId} AND o.id = c.office_id AND o.hierarchy LIKE CONCAT(\' +${currentUserHierarchy} +\', \'% +\')', 'Utility query for getting the client summary details', 1, 0), + (116, 'LoanCyclePerProduct', 'Table', NULL, NULL, 'SELECT lp.name AS \'productName +\', MAX(l.loan_product_counter) AS \'loanProductCycle +\' FROM m_loan l JOIN m_product_loan lp ON l.product_id=lp.id WHERE lp.include_in_borrower_cycle=1 AND l.loan_product_counter IS NOT NULL AND l.client_id=${clientId} GROUP BY l.product_id', 'Utility query for getting the client loan cycle details', 1, 0), + (117, 'GroupSavingSummary', 'Table', NULL, NULL, 'select ifnull(cur.display_symbol, sa.currency_code) as currency,\ncount(sa.id) as totalSavingAccounts, ifnull(sum(sa.account_balance_derived),0) as totalSavings\nfrom m_group topgroup\njoin m_office o on o.id = topgroup.office_id and o.hierarchy like concat(\' +${currentUserHierarchy} +\', \'% +\')\njoin m_group g on g.hierarchy like concat(topgroup.hierarchy, \'% +\')\njoin m_savings_account sa on sa.group_id = g.id\nleft join m_currency cur on cur.code = sa.currency_code\nwhere topgroup.id = ${groupId}\nand sa.activatedon_date is not null\ngroup by sa.currency_code', 'Utility query for getting group or center saving summary details for a group_id', 1, 0), (118, 'Savings Transactions', 'Pentaho', NULL, NULL, NULL, NULL, 0, 1), (119, 'Client Savings Summary', 'Pentaho', NULL, NULL, NULL, NULL, 0, 1), (120, 'Active Loans - Details(Pentaho)', 'Pentaho', NULL, 'Loan', '(NULL)', '(NULL)', 1, 1), @@ -6548,476 +12869,596 @@ INSERT INTO `stretchy_report` (`id`, `report_name`, `report_type`, `report_subty (162, 'Balance Outstanding', 'Pentaho', NULL, 'Loans', NULL, NULL, 0, 1), (163, 'Collection Report', 'Pentaho', NULL, 'Loans', NULL, NULL, 0, 1), (164, 'Disbursal Report', 'Pentaho', NULL, 'Loans', NULL, NULL, 0, 1), - (165, 'Savings Accounts Dormancy Report', 'Table', NULL, 'Savings', 'select cl.display_name as \'Client Display Name\',\r\nsa.account_no as \'Account Number\',\r\ncl.mobile_no as \'Mobile Number\',\r\n@lastdate:=(select IFNULL(max(sat.transaction_date),sa.activatedon_date) \r\n from m_savings_account_transaction as sat \r\n where sat.is_reversed = 0 \r\n and sat.transaction_type_enum in (1,2) \r\n and sat.savings_account_id = sa.id) as \'Date of Last Activity\',\r\nDATEDIFF(now(), @lastdate) as \'Days Since Last Activity\'\r\nfrom m_savings_account as sa \r\ninner join m_savings_product as sp on (sa.product_id = sp.id and sp.is_dormancy_tracking_active = 1) \r\nleft join m_client as cl on sa.client_id = cl.id \r\nwhere sa.sub_status_enum = ${subStatus}\r\nand cl.office_id = ${officeId}', NULL, 1, 1), - (166, 'Active Clients', 'SMS', 'NonTriggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum\' AND r.enum_id = c.status_enum\r\nWHERE o.id = ${officeId} AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId})\r\nGROUP BY c.id\r\nORDER BY ounder.hierarchy, c.account_no', 'All clients with the status ‘Active’', 0, 1), - (167, 'Prospective Clients', 'SMS', 'NonTriggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum\' AND r.enum_id = c.status_enum\r\nLEFT JOIN m_loan l ON l.client_id = c.id\r\nWHERE o.id = ${officeId} AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND l.client_id IS NULL\r\nGROUP BY c.id\r\nORDER BY ounder.hierarchy, c.account_no', 'All clients with the status ‘Active’ who have never had a loan before', 0, 1), - (168, 'Active Loan Clients', 'SMS', 'NonTriggered', 'Clients', 'SELECT \r\nc.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", \r\nl.principal_amount AS "loanAmount", \r\n(IFNULL(l.principal_outstanding_derived, 0) + IFNULL(l.interest_outstanding_derived, 0) + IFNULL(l.fee_charges_outstanding_derived, 0) + IFNULL(l.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nl.principal_disbursed_derived AS "loanDisbursed",\r\nounder.id AS "officeNumber", \r\nl.account_no AS "loanAccountId", \r\ngua.lastname AS "guarantorLastName", COUNT(gua.id) AS "numberOfGuarantors",\r\ng.display_name AS "groupName"\r\n\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan l ON l.client_id = c.id\r\nJOIN m_product_loan pl ON pl.id = l.product_id\r\nLEFT JOIN m_group_client gc ON gc.client_id = c.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = l.loan_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = l.currency_code\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = l.id\r\nWHERE o.id = ${officeId} AND (IFNULL(l.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND l.loan_status_id = 300 AND (DATEDIFF(CURDATE(), l.disbursedon_date) BETWEEN ${cycleX} AND ${cycleY})\r\nGROUP BY l.id, gua.lastname, g.display_name\r\nORDER BY ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'All clients with an outstanding loan between cycleX and cycleY days', 0, 1), - (169, 'Loan in arrears', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nmc.id AS "id", \r\nmc.firstname AS "firstName",\r\nmc.middlename AS "middleName",\r\nmc.lastname AS "lastName",\r\nmc.display_name AS "fullName",\r\nmc.mobile_no AS "mobileNo", \r\nml.principal_amount AS "loanAmount", \r\n(IFNULL(ml.principal_outstanding_derived, 0) + IFNULL(ml.interest_outstanding_derived, 0) + IFNULL(ml.fee_charges_outstanding_derived, 0) + IFNULL(ml.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nml.principal_disbursed_derived AS "loanDisbursed",\r\nlaa.overdue_since_date_derived AS "paymentDueDate",\r\nIFNULL(laa.total_overdue_derived, 0) AS "totalDue",\r\nounder.id AS "officeNumber", \r\nml.account_no AS "loanAccountId", \r\ngua.lastname AS "guarantorLastName", \r\nCOUNT(gua.id) AS "numberOfGuarantors",\r\ng.display_name AS "groupName"\r\n\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\nINNER JOIN m_client mc ON mc.office_id=ounder.id\r\nINNER JOIN m_loan ml ON ml.client_id = mc.id\r\nINNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = \'loan_status_id\'\r\nINNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\nLEFT JOIN m_currency cur ON cur.code = ml.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = mc.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = ml.loan_officer_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = ml.id\r\nWHERE ml.loan_status_id=300 AND mo.id=${officeId} AND (IFNULL(ml.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND (DATEDIFF(CURDATE(), laa.overdue_since_date_derived) BETWEEN ${fromX} AND ${toY})\r\nGROUP BY ml.id, gua.lastname, g.display_name\r\nORDER BY ounder.hierarchy, ml.currency_code, mc.account_no, ml.account_no', 'All clients with an outstanding loan in arrears between fromX and toY days', 0, 1), + (165, 'Savings Accounts Dormancy Report', 'Table', NULL, 'Savings', 'select cl.display_name as \'Client Display Name +\',\r\nsa.account_no as \'Account Number +\',\r\ncl.mobile_no as \'Mobile Number +\',\r\n@lastdate:=(select IFNULL(max(sat.transaction_date),sa.activatedon_date) \r\n from m_savings_account_transaction as sat \r\n where sat.is_reversed = 0 \r\n and sat.transaction_type_enum in (1,2) \r\n and sat.savings_account_id = sa.id) as \'Date of Last Activity +\',\r\nDATEDIFF(now(), @lastdate) as \'Days Since Last Activity +\'\r\nfrom m_savings_account as sa \r\ninner join m_savings_product as sp on (sa.product_id = sp.id and sp.is_dormancy_tracking_active = 1) \r\nleft join m_client as cl on sa.client_id = cl.id \r\nwhere sa.sub_status_enum = ${subStatus}\r\nand cl.office_id = ${officeId}', NULL, 1, 1), + (166, 'Active Clients', 'SMS', 'NonTriggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'. +\', \' +\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum +\' AND r.enum_id = c.status_enum\r\nWHERE o.id = ${officeId} AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId})\r\nGROUP BY c.id\r\nORDER BY ounder.hierarchy, c.account_no', 'All clients with the status ‘Active’', 0, 1), + (167, 'Prospective Clients', 'SMS', 'NonTriggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'. +\', \' +\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum +\' AND r.enum_id = c.status_enum\r\nLEFT JOIN m_loan l ON l.client_id = c.id\r\nWHERE o.id = ${officeId} AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND l.client_id IS NULL\r\nGROUP BY c.id\r\nORDER BY ounder.hierarchy, c.account_no', 'All clients with the status ‘Active’ who have never had a loan before', 0, 1), + (168, 'Active Loan Clients', 'SMS', 'NonTriggered', 'Clients', 'SELECT \r\nc.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", \r\nl.principal_amount AS "loanAmount", \r\n(IFNULL(l.principal_outstanding_derived, 0) + IFNULL(l.interest_outstanding_derived, 0) + IFNULL(l.fee_charges_outstanding_derived, 0) + IFNULL(l.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nl.principal_disbursed_derived AS "loanDisbursed",\r\nounder.id AS "officeNumber", \r\nl.account_no AS "loanAccountId", \r\ngua.lastname AS "guarantorLastName", COUNT(gua.id) AS "numberOfGuarantors",\r\ng.display_name AS "groupName"\r\n\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan l ON l.client_id = c.id\r\nJOIN m_product_loan pl ON pl.id = l.product_id\r\nLEFT JOIN m_group_client gc ON gc.client_id = c.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = l.loan_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = l.currency_code\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = l.id\r\nWHERE o.id = ${officeId} AND (IFNULL(l.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND l.loan_status_id = 300 AND (DATEDIFF(CURDATE(), l.disbursedon_date) BETWEEN ${cycleX} AND ${cycleY})\r\nGROUP BY l.id, gua.lastname, g.display_name\r\nORDER BY ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'All clients with an outstanding loan between cycleX and cycleY days', 0, 1), + (169, 'Loan in arrears', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nmc.id AS "id", \r\nmc.firstname AS "firstName",\r\nmc.middlename AS "middleName",\r\nmc.lastname AS "lastName",\r\nmc.display_name AS "fullName",\r\nmc.mobile_no AS "mobileNo", \r\nml.principal_amount AS "loanAmount", \r\n(IFNULL(ml.principal_outstanding_derived, 0) + IFNULL(ml.interest_outstanding_derived, 0) + IFNULL(ml.fee_charges_outstanding_derived, 0) + IFNULL(ml.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nml.principal_disbursed_derived AS "loanDisbursed",\r\nlaa.overdue_since_date_derived AS "paymentDueDate",\r\nIFNULL(laa.total_overdue_derived, 0) AS "totalDue",\r\nounder.id AS "officeNumber", \r\nml.account_no AS "loanAccountId", \r\ngua.lastname AS "guarantorLastName", \r\nCOUNT(gua.id) AS "numberOfGuarantors",\r\ng.display_name AS "groupName"\r\n\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'% +\')\r\nINNER JOIN m_client mc ON mc.office_id=ounder.id\r\nINNER JOIN m_loan ml ON ml.client_id = mc.id\r\nINNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = \'loan_status_id +\'\r\nINNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\nLEFT JOIN m_currency cur ON cur.code = ml.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = mc.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = ml.loan_officer_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = ml.id\r\nWHERE ml.loan_status_id=300 AND mo.id=${officeId} AND (IFNULL(ml.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND (DATEDIFF(CURDATE(), laa.overdue_since_date_derived) BETWEEN ${fromX} AND ${toY})\r\nGROUP BY ml.id, gua.lastname, g.display_name\r\nORDER BY ounder.hierarchy, ml.currency_code, mc.account_no, ml.account_no', 'All clients with an outstanding loan in arrears between fromX and toY days', 0, 1), (170, 'Loan payments due', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\ncl.id AS "id", \r\ncl.firstname AS "firstName",\r\ncl.middlename AS "middleName",\r\ncl.lastname AS "lastName",\r\ncl.display_name AS "fullName",\r\ncl.mobile_no AS "mobileNo", \r\nl.principal_amount AS "loanAmount",\r\nof.id AS "officeNumber",\r\n(IFNULL(l.principal_outstanding_derived, 0) + IFNULL(l.interest_outstanding_derived, 0) + IFNULL(l.fee_charges_outstanding_derived, 0) + IFNULL(l.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nl.principal_disbursed_derived AS "loanDisbursed",\r\nls.duedate AS "paymentDueDate",\r\n(IFNULL(SUM(ls.principal_amount),0) - IFNULL(SUM(ls.principal_writtenoff_derived),0)\r\n + IFNULL(SUM(ls.interest_amount),0) - IFNULL(SUM(ls.interest_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.interest_waived_derived),0)\r\n + IFNULL(SUM(ls.fee_charges_amount),0) - IFNULL(SUM(ls.fee_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.fee_charges_waived_derived),0)\r\n + IFNULL(SUM(ls.penalty_charges_amount),0) - IFNULL(SUM(ls.penalty_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.penalty_charges_waived_derived),0)\r\n) AS "totalDue",\r\nlaa.total_overdue_derived AS "totalOverdue",\r\nl.account_no AS "loanAccountId",\r\ngua.lastname AS "guarantorLastName",\r\nCOUNT(gua.id) AS "numberOfGuarantors",\r\ngp.display_name AS "groupName"\r\n\r\nFROM m_office of\r\nLEFT JOIN m_client cl ON of.id = cl.office_id\r\nLEFT JOIN m_loan l ON cl.id = l.client_id\r\nLEFT JOIN m_group_client gc ON gc.client_id = cl.id\r\nLEFT JOIN m_group gp ON gp.id = l.group_id\r\nLEFT JOIN m_loan_repayment_schedule ls ON l.id = ls.loan_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = l.id\r\nINNER JOIN m_loan_arrears_aging laa ON laa.loan_id=l.id\r\nWHERE of.id = ${officeId} AND (IFNULL(l.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND (DATEDIFF(CURDATE(), ls.duedate) BETWEEN ${fromX} AND ${toY}) \r\nAND (of.hierarchy LIKE CONCAT((\r\nSELECT ino.hierarchy\r\nFROM m_office ino\r\nWHERE ino.id = ${officeId}),"%"))\r\nGROUP BY l.id, ls.duedate, gua.lastname\r\nORDER BY of.hierarchy, l.currency_code, cl.account_no, l.account_no', 'All clients with an unpaid installment due on their loan between fromX and toY days', 0, 1), - (171, 'Dormant Prospects', 'SMS', 'NonTriggered', 'Clients', 'SELECT c.id AS "id", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) AS "officeName", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", \r\no.id AS "officeNumber", \r\nTIMESTAMPDIFF(MONTH, c.activation_date, CURDATE()) AS "dormant"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum\' AND r.enum_id = c.status_enum\r\nLEFT JOIN m_loan l ON l.client_id = c.id\r\nWHERE o.id = ${officeId} AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND l.client_id IS NULL AND (TIMESTAMPDIFF(MONTH, c.activation_date, CURDATE()) > 3)\r\nGROUP BY c.id\r\nORDER BY ounder.hierarchy, c.account_no', 'All individuals who have not yet received a loan but were also entered into the system more than 3 months', 0, 1), - (172, 'Active group leaders', 'SMS', 'NonTriggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_group g ON g.office_id = ounder.id\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN m_group_client gc ON gc.group_id = g.id AND gc.client_id = c.id\r\nLEFT JOIN m_group_roles gr ON gr.group_id = g.id AND gr.client_id = c.id\r\nLEFT JOIN m_staff ms ON ms.id = c.staff_id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum\' AND r.enum_id = c.status_enum\r\nLEFT JOIN m_code_value cv ON cv.id = gr.role_cv_id\r\nLEFT JOIN m_code code ON code.id = cv.code_id\r\nWHERE o.id = ${officeId} AND g.status_enum = 300 AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND code.code_name = \'GROUPROLE\' AND cv.code_value = \'Leader\'\r\nGROUP BY c.id\r\nORDER BY ounder.hierarchy, c.account_no', 'All active group chairmen', 0, 1), - (173, 'Loan payments due (Overdue Loans)', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nmc.id AS "id", \r\nmc.firstname AS "firstName",\r\nmc.middlename AS "middleName",\r\nmc.lastname AS "lastName",\r\nmc.display_name AS "fullName",\r\nmc.mobile_no AS "mobileNo", \r\nml.principal_amount AS "loanAmount", \r\n(IFNULL(ml.principal_outstanding_derived, 0) + IFNULL(ml.interest_outstanding_derived, 0) + IFNULL(ml.fee_charges_outstanding_derived, 0) + IFNULL(ml.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nml.principal_disbursed_derived AS "loanDisbursed",\r\nlaa.overdue_since_date_derived AS "paymentDueDate",\r\n(IFNULL(SUM(ls.principal_amount),0) - IFNULL(SUM(ls.principal_writtenoff_derived),0)\r\n + IFNULL(SUM(ls.interest_amount),0) - IFNULL(SUM(ls.interest_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.interest_waived_derived),0)\r\n + IFNULL(SUM(ls.fee_charges_amount),0) - IFNULL(SUM(ls.fee_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.fee_charges_waived_derived),0)\r\n + IFNULL(SUM(ls.penalty_charges_amount),0) - IFNULL(SUM(ls.penalty_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.penalty_charges_waived_derived),0)\r\n) AS "totalDue",\r\nlaa.total_overdue_derived AS "totalOverdue",\r\nounder.id AS "officeNumber", \r\nml.account_no AS "loanAccountId", \r\ngua.lastname AS "guarantorLastName", \r\nCOUNT(gua.id) AS "numberOfGuarantors",\r\ng.display_name AS "groupName"\r\n\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\nINNER JOIN m_client mc ON mc.office_id=ounder.id\r\nINNER JOIN m_loan ml ON ml.client_id = mc.id\r\nINNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = \'loan_status_id\'\r\nINNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\nLEFT JOIN m_loan_repayment_schedule ls ON ls.loan_id = ml.id\r\nLEFT JOIN m_currency cur ON cur.code = ml.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = mc.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = ml.loan_officer_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = ml.id\r\nWHERE ml.loan_status_id=300 AND mo.id=${officeId} AND (IFNULL(ml.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) \r\nAND (DATEDIFF(CURDATE(), ls.duedate) BETWEEN ${fromX} AND ${toY})\r\nAND (DATEDIFF(CURDATE(), laa.overdue_since_date_derived) BETWEEN ${overdueX} AND ${overdueY})\r\nGROUP BY ml.id, gua.lastname, g.display_name\r\nORDER BY ounder.hierarchy, ml.currency_code, mc.account_no, ml.account_no', 'Loan Payments Due between fromX to toY days for clients in arrears between overdueX and overdueY days', 0, 1), - (174, 'Loan payments received (Active Loans)', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nmc.id AS "id", \r\nmc.firstname AS "firstName",\r\nmc.middlename AS "middleName",\r\nmc.lastname AS "lastName",\r\nmc.display_name AS "fullName",\r\nmc.mobile_no AS "mobileNo", \r\nml.principal_amount AS "loanAmount", \r\n(IFNULL(ml.principal_outstanding_derived, 0) + IFNULL(ml.interest_outstanding_derived, 0) + IFNULL(ml.fee_charges_outstanding_derived, 0) + IFNULL(ml.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nounder.id AS "officeNumber", \r\nml.account_no AS "loanAccountNumber",\r\nSUM(lt.amount) AS "repaymentAmount"\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\nINNER JOIN m_client mc ON mc.office_id=ounder.id\r\nINNER JOIN m_loan ml ON ml.client_id = mc.id\r\nINNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = \'loan_status_id\'\r\nINNER JOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nINNER JOIN m_appuser au ON au.id = lt.appuser_id\r\nLEFT JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\nLEFT JOIN m_payment_detail mpd ON mpd.id=lt.payment_detail_id\r\nLEFT JOIN m_currency cur ON cur.code = ml.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = mc.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = ml.loan_officer_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = ml.id\r\nWHERE ml.loan_status_id=300 AND mo.id=${officeId} AND (IFNULL(ml.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND (DATEDIFF(CURDATE(), lt.transaction_date) BETWEEN ${fromX} AND ${toY}) AND lt.is_reversed=0 AND lt.transaction_type_enum=2 AND laa.loan_id IS NULL\r\nGROUP BY ml.id\r\nORDER BY ounder.hierarchy, ml.currency_code, mc.account_no, ml.account_no', 'Payments received in the last fromX to toY days for any loan with the status Active (on-time)', 0, 1), - (175, 'Loan payments received (Overdue Loans)', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nml.id AS "loanId", \r\nmc.id AS "id", \r\nmc.firstname AS "firstName",\r\nmc.middlename AS "middleName",\r\nmc.lastname AS "lastName",\r\nmc.display_name AS "fullName",\r\nmc.mobile_no AS "mobileNo", \r\nml.principal_amount AS "loanAmount", \r\n(IFNULL(ml.principal_outstanding_derived, 0) + IFNULL(ml.interest_outstanding_derived, 0) + IFNULL(ml.fee_charges_outstanding_derived, 0) + IFNULL(ml.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nounder.id AS "officeNumber", \r\nml.account_no AS "loanAccountNumber",\r\nSUM(lt.amount) AS "repaymentAmount"\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\r\nINNER JOIN m_client mc ON mc.office_id=ounder.id\r\nINNER JOIN m_loan ml ON ml.client_id = mc.id\r\nINNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = \'loan_status_id\'\r\nINNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\nINNER JOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nINNER JOIN m_appuser au ON au.id = lt.appuser_id\r\nLEFT JOIN m_payment_detail mpd ON mpd.id=lt.payment_detail_id\r\nLEFT JOIN m_currency cur ON cur.code = ml.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = mc.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = ml.loan_officer_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = ml.id\r\nWHERE ml.loan_status_id=300 AND mo.id=${officeId} AND (IFNULL(ml.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND (DATEDIFF(CURDATE(), lt.transaction_date) BETWEEN ${fromX} AND ${toY}) AND (DATEDIFF(CURDATE(), laa.overdue_since_date_derived) BETWEEN ${overdueX} AND ${overdueY}) AND lt.is_reversed=0 AND lt.transaction_type_enum=2\r\nGROUP BY ml.id\r\nORDER BY ounder.hierarchy, ml.currency_code, mc.account_no, ml.account_no', 'Payments received in the last fromX to toY days for any loan with the status Overdue (arrears) between overdueX and overdueY days', 0, 1), - (176, 'Happy Birthday', 'SMS', 'NonTriggered', 'Clients', 'SELECT \r\nc.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber", \r\nc.date_of_birth AS "dateOfBirth",\r\nIF(c.date_of_birth IS NULL, 0, CEIL(DATEDIFF (NOW(), c.date_of_birth)/365)) AS "age"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum\' AND r.enum_id = c.status_enum\r\nLEFT JOIN m_staff ms ON ms.id = c.staff_id\r\nWHERE o.id = ${officeId} AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND c.date_of_birth IS NOT NULL AND (DAY(c.date_of_birth)=DAY(NOW())) AND (MONTH(c.date_of_birth)=MONTH(NOW()))\r\nORDER BY ounder.hierarchy, c.account_no', 'This sends a message to all clients with the status Active on their Birthday', 0, 1), - (177, 'Loan fully repaid', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nc.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", \r\nl.principal_amount AS "loanAmount",\r\n(IFNULL(l.principal_outstanding_derived, 0) + IFNULL(l.interest_outstanding_derived, 0) + IFNULL(l.fee_charges_outstanding_derived, 0) + IFNULL(l.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nl.principal_disbursed_derived AS "loanDisbursed",\r\no.id AS "officeNumber",\r\nl.account_no AS "loanAccountId",\r\ngua.lastname AS "guarantorLastName", COUNT(gua.id) AS "numberOfGuarantors",\r\nls.duedate AS "dueDate",\r\nlaa.total_overdue_derived AS "totalDue",\r\ngp.display_name AS "groupName",\r\nl.total_repayment_derived AS "totalFullyPaid"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan l ON l.client_id = c.id\r\nLEFT JOIN m_staff lo ON lo.id = l.loan_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = l.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = c.id\r\nLEFT JOIN m_group gp ON gp.id = l.group_id\r\nLEFT JOIN m_loan_repayment_schedule ls ON l.id = ls.loan_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = l.id\r\nLEFT JOIN m_loan_arrears_aging laa ON laa.loan_id=l.id\r\nWHERE o.id = ${officeId} AND (IFNULL(l.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND \r\n(DATEDIFF(CURDATE(), l.closedon_date) BETWEEN ${fromX} AND ${toY})\r\n AND (l.loan_status_id IN (600, 700))\r\nGROUP BY l.id, gua.lastname, ls.duedate\r\nORDER BY ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'All loans that have been fully repaid (Closed or Overpaid) in the last fromX to toY days', 0, 1), - (178, 'Loan outstanding after final instalment date', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nc.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", \r\nl.principal_amount AS "loanAmount",\r\no.id AS "officeNumber",\r\n(IFNULL(l.principal_outstanding_derived, 0) + IFNULL(l.interest_outstanding_derived, 0) + IFNULL(l.fee_charges_outstanding_derived, 0) + IFNULL(l.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nl.principal_disbursed_derived AS "loanDisbursed",\r\nls.duedate AS "paymentDueDate",\r\n(IFNULL(SUM(ls.principal_amount),0) - IFNULL(SUM(ls.principal_writtenoff_derived),0)\r\n + IFNULL(SUM(ls.interest_amount),0) - IFNULL(SUM(ls.interest_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.interest_waived_derived),0)\r\n + IFNULL(SUM(ls.fee_charges_amount),0) - IFNULL(SUM(ls.fee_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.fee_charges_waived_derived),0)\r\n + IFNULL(SUM(ls.penalty_charges_amount),0) - IFNULL(SUM(ls.penalty_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.penalty_charges_waived_derived),0)\r\n) AS "totalDue",\r\nlaa.total_overdue_derived AS "totalOverdue",\r\nl.account_no AS "loanAccountId",\r\ngua.lastname AS "guarantorLastName",\r\nCOUNT(gua.id) AS "numberOfGuarantors",\r\ngp.display_name AS "groupName"\r\n\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan l ON l.client_id = c.id\r\nLEFT JOIN m_staff lo ON lo.id = l.loan_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = l.currency_code\r\nLEFT JOIN m_loan_arrears_aging laa ON laa.loan_id = l.id\r\nLEFT JOIN m_group_client gc ON gc.client_id = c.id\r\nLEFT JOIN m_group gp ON gp.id = l.group_id\r\nLEFT JOIN m_loan_repayment_schedule ls ON l.id = ls.loan_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = l.id\r\nWHERE o.id = ${officeId} AND (IFNULL(l.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND l.loan_status_id = 300 AND l.expected_maturedon_date < CURDATE() \r\nAND (DATEDIFF(CURDATE(), l.expected_maturedon_date) BETWEEN ${fromX} AND ${toY})\r\nGROUP BY l.id, ls.duedate, gua.lastname\r\nORDER BY ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'All active loans (with an outstanding balance) between fromX to toY days after the final instalment date on their loan schedule', 0, 1), - (179, 'Loan Repayment', 'SMS', 'Triggered', NULL, 'select ml.id as loanId,mc.id, mc.firstname, ifnull(mc.middlename,\'\') as middlename, mc.lastname, mc.display_name as FullName, mobile_no as mobileNo, mc.group_name as GroupName, round(ml.principal_amount, ml.currency_digits) as LoanAmount, round(ml.`total_outstanding_derived`, ml.currency_digits) as LoanOutstanding,\nml.`account_no` as LoanAccountId, round(mlt.amountPaid, ml.currency_digits) as repaymentAmount\nFROM m_office mo\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\')\nAND ounder.hierarchy like CONCAT(\'.\', \'%\')\nLEFT JOIN (\n select \n ml.id as loanId, \n ifnull(mc.id,mc2.id) as id, \n ifnull(mc.firstname,mc2.firstname) as firstname, \n ifnull(mc.middlename,ifnull(mc2.middlename,(\'\'))) as middlename, \n ifnull(mc.lastname,mc2.lastname) as lastname, \n ifnull(mc.display_name,mc2.display_name) as display_name, \n ifnull(mc.status_enum,mc2.status_enum) as status_enum,\n ifnull(mc.mobile_no,mc2.mobile_no) as mobile_no,\n ifnull(mg.office_id,mc2.office_id) as office_id,\n ifnull(mg.staff_id,mc2.staff_id) as staff_id,\n mg.id as group_id, \nmg.display_name as group_name\n from\n m_loan ml\n left join m_group mg on mg.id = ml.group_id\n left join m_group_client mgc on mgc.group_id = mg.id\n left join m_client mc on mc.id = mgc.client_id\n left join m_client mc2 on mc2.id = ml.client_id\n order by loanId\n ) mc on mc.office_id = ounder.id\nright join m_loan as ml on mc.loanId = ml.id\nright join(\nselect mlt.amount as amountPaid,mlt.id,mlt.loan_id\nfrom m_loan_transaction mlt\nwhere mlt.is_reversed = 0 \ngroup by mlt.loan_id, mlt.amount, mlt.id\n) as mlt on mlt.loan_id = ml.id\nright join m_loan_repayment_schedule as mls1 on ml.id = mls1.loan_id and mls1.`completed_derived` = 0\nand mls1.installment = (SELECT MIN(installment) from m_loan_repayment_schedule where loan_id = ml.id and duedate <= CURDATE() and completed_derived=0)\nwhere mc.status_enum = 300 and mobile_no is not null and ml.`loan_status_id` = 300\nand (mo.id = ${officeId} or ${officeId} = -1)\nand (mc.staff_id = ${loanOfficerId} or ${loanOfficerId} = -1)\nand (ml.loan_type_enum = ${loanType} or ${loanType} = -1)\nand ml.id in (select mla.loan_id from m_loan_arrears_aging mla)\ngroup by ml.id, mc.id, mc.firstname, mc.middlename, mc.lastname, mc.display_name, mc.mobile_no, mlt.amountPaid', 'Loan Repayment', 0, 0), - (180, 'Loan Approved', 'SMS', 'Triggered', NULL, 'SELECT mc.id, mc.firstname, mc.middlename as middlename, mc.lastname, mc.display_name as FullName, mc.mobile_no as mobileNo, mc.group_name as GroupName, mo.name as officename, ml.id as loanId, ml.account_no as accountnumber, ml.principal_amount_proposed as loanamount, ml.annual_nominal_interest_rate as annualinterestrate FROM m_office mo JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\') AND ounder.hierarchy like CONCAT(\'.\', \'%\') LEFT JOIN ( select ml.id as loanId, ifnull(mc.id,mc2.id) as id, ifnull(mc.firstname,mc2.firstname) as firstname, ifnull(mc.middlename,ifnull(mc2.middlename,(\'\'))) as middlename, ifnull(mc.lastname,mc2.lastname) as lastname, ifnull(mc.display_name,mc2.display_name) as display_name, ifnull(mc.status_enum,mc2.status_enum) as status_enum, ifnull(mc.mobile_no,mc2.mobile_no) as mobile_no, ifnull(mg.office_id,mc2.office_id) as office_id, ifnull(mg.staff_id,mc2.staff_id) as staff_id, mg.id as group_id, mg.display_name as group_name from m_loan ml left join m_group mg on mg.id = ml.group_id left join m_group_client mgc on mgc.group_id = mg.id left join m_client mc on mc.id = mgc.client_id left join m_client mc2 on mc2.id = ml.client_id order by loanId ) mc on mc.office_id = ounder.id left join m_loan ml on ml.id = mc.loanId WHERE mc.status_enum = 300 and mc.mobile_no is not null and (mo.id = ${officeId} or ${officeId} = -1) and (mc.staff_id = ${loanOfficerId} or ${loanOfficerId} = -1)and (ml.id = ${loanId} or ${loanId} = -1)and (mc.id = ${clientId} or ${clientId} = -1)and (mc.group_id = ${groupId} or ${groupId} = -1)and (ml.loan_type_enum = ${loanType} or ${loanType} = -1)', 'Loan and client data of approved loan', 0, 0), - (181, 'Loan Rejected', 'SMS', 'Triggered', NULL, 'SELECT mc.id, mc.firstname, mc.middlename as middlename, mc.lastname, mc.display_name as FullName, mc.mobile_no as mobileNo, mc.group_name as GroupName, mo.name as officename, ml.id as loanId, ml.account_no as accountnumber, ml.principal_amount_proposed as loanamount, ml.annual_nominal_interest_rate as annualinterestrate FROM m_office mo JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\') AND ounder.hierarchy like CONCAT(\'.\', \'%\') LEFT JOIN ( select ml.id as loanId, ifnull(mc.id,mc2.id) as id, ifnull(mc.firstname,mc2.firstname) as firstname, ifnull(mc.middlename,ifnull(mc2.middlename,(\'\'))) as middlename, ifnull(mc.lastname,mc2.lastname) as lastname, ifnull(mc.display_name,mc2.display_name) as display_name, ifnull(mc.status_enum,mc2.status_enum) as status_enum, ifnull(mc.mobile_no,mc2.mobile_no) as mobile_no, ifnull(mg.office_id,mc2.office_id) as office_id, ifnull(mg.staff_id,mc2.staff_id) as staff_id, mg.id as group_id, mg.display_name as group_name from m_loan ml left join m_group mg on mg.id = ml.group_id left join m_group_client mgc on mgc.group_id = mg.id left join m_client mc on mc.id = mgc.client_id left join m_client mc2 on mc2.id = ml.client_id order by loanId ) mc on mc.office_id = ounder.id left join m_loan ml on ml.id = mc.loanId WHERE mc.status_enum = 300 and mc.mobile_no is not null and (mo.id = ${officeId} or ${officeId} = -1) and (mc.staff_id = ${loanOfficerId} or ${loanOfficerId} = -1) and (ml.id = ${loanId} or ${loanId} = -1) and (mc.id = ${clientId} or ${clientId} = -1) and (mc.group_id = ${groupId} or ${groupId} = -1) and (ml.loan_type_enum = ${loanType} or ${loanType} = -1)', 'Loan and client data of rejected loan', 0, 0), - (182, 'Client Rejected', 'SMS', 'Triggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum\' AND r.enum_id = c.status_enum\r\nWHERE o.id = ${officeId} AND c.id = ${clientId} AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId})', 'Client Rejection', 0, 1), - (183, 'Client Activated', 'SMS', 'Triggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'.\', \'\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum\' AND r.enum_id = c.status_enum\r\nWHERE o.id = ${officeId} AND c.id = ${clientId} AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId})', 'Client Activation', 0, 1), - (184, 'Savings Rejected', 'SMS', 'Triggered', 'Savings', 'SELECT \r\nc.id AS "id",\r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo",\r\ns.account_no AS "savingsAccountNo",\r\nounder.id AS "officeNumber",\r\nounder.name AS "officeName"\r\n\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_savings_account s ON s.client_id = c.id\r\nJOIN m_savings_product sp ON sp.id = s.product_id\r\nLEFT JOIN m_staff st ON st.id = s.field_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = s.currency_code\r\nWHERE o.id = ${officeId} AND (IFNULL(s.field_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND s.id = ${savingsId}', 'Savings Rejected', 0, 1), - (185, 'Savings Activated', 'SMS', 'Triggered', 'Savings', 'SELECT \r\nc.id AS "id",\r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo",\r\ns.account_no AS "savingsAccountNo",\r\nounder.id AS "officeNumber",\r\nounder.name AS "officeName"\r\n\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'%\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_savings_account s ON s.client_id = c.id\r\nJOIN m_savings_product sp ON sp.id = s.product_id\r\nLEFT JOIN m_staff st ON st.id = s.field_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = s.currency_code\r\nWHERE o.id = ${officeId} AND (IFNULL(s.field_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND s.id = ${savingsId}', 'Savings Activation', 0, 1), - (186, 'Savings Deposit', 'SMS', 'Triggered', NULL, 'SELECT sc.savingsId AS savingsId, sc.id AS clientId, sc.firstname, IFNULL(sc.middlename,\'\') AS middlename, sc.lastname, sc.display_name AS FullName, sc.mobile_no AS mobileNo,\r\nms.`account_no` AS savingsAccountNo, ROUND(mst.amountPaid, ms.currency_digits) AS depositAmount, ms.account_balance_derived AS balance, \r\nmst.transactionDate AS transactionDate\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\') AND ounder.hierarchy LIKE CONCAT(\'.\', \'%\')\r\nLEFT JOIN (\r\nSELECT \r\n sa.id AS savingsId, mc.id AS id, mc.firstname AS firstname, mc.middlename AS middlename, mc.lastname AS lastname, \r\n mc.display_name AS display_name, mc.status_enum AS status_enum, \r\n mc.mobile_no AS mobile_no, mc.office_id AS office_id, \r\n mc.staff_id AS staff_id\r\nFROM\r\nm_savings_account sa\r\nLEFT JOIN m_client mc ON mc.id = sa.client_id\r\nORDER BY savingsId) sc ON sc.office_id = ounder.id\r\nRIGHT JOIN m_savings_account AS ms ON sc.savingsId = ms.id\r\nRIGHT JOIN(\r\nSELECT st.amount AS amountPaid, st.id, st.savings_account_id, st.id AS savingsTransactionId, st.transaction_date AS transactionDate\r\nFROM m_savings_account_transaction st\r\nWHERE st.is_reversed = 0\r\nGROUP BY st.savings_account_id, st.amount, st.id\r\n) AS mst ON mst.savings_account_id = ms.id\r\nWHERE sc.mobile_no IS NOT NULL AND (mo.id = ${officeId} OR ${officeId} = -1) AND (sc.staff_id = ${loanOfficerId} OR ${loanOfficerId} = -1) AND mst.savingsTransactionId = ${savingsTransactionId}', 'Savings Deposit', 0, 1), - (187, 'Savings Withdrawal', 'SMS', 'Triggered', NULL, 'SELECT sc.savingsId AS savingsId, sc.id AS clientId, sc.firstname, IFNULL(sc.middlename,\'\') AS middlename, sc.lastname, sc.display_name AS FullName, sc.mobile_no AS mobileNo,\r\nms.`account_no` AS savingsAccountNo, ROUND(mst.amountPaid, ms.currency_digits) AS withdrawAmount, ms.account_balance_derived AS balance, \r\nmst.transactionDate AS transactionDate\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'%\') AND ounder.hierarchy LIKE CONCAT(\'.\', \'%\')\r\nLEFT JOIN (\r\nSELECT \r\n sa.id AS savingsId, mc.id AS id, mc.firstname AS firstname, mc.middlename AS middlename, mc.lastname AS lastname, \r\n mc.display_name AS display_name, mc.status_enum AS status_enum, \r\n mc.mobile_no AS mobile_no, mc.office_id AS office_id, \r\n mc.staff_id AS staff_id\r\nFROM\r\nm_savings_account sa\r\nLEFT JOIN m_client mc ON mc.id = sa.client_id\r\nORDER BY savingsId) sc ON sc.office_id = ounder.id\r\nRIGHT JOIN m_savings_account AS ms ON sc.savingsId = ms.id\r\nRIGHT JOIN(\r\nSELECT st.amount AS amountPaid, st.id, st.savings_account_id, st.id AS savingsTransactionId, st.transaction_date AS transactionDate\r\nFROM m_savings_account_transaction st\r\nWHERE st.is_reversed = 0\r\nGROUP BY st.savings_account_id, st.amount, st.id\r\n) AS mst ON mst.savings_account_id = ms.id\r\nWHERE sc.mobile_no IS NOT NULL AND (mo.id = ${officeId} OR ${officeId} = -1) AND (sc.staff_id = ${loanOfficerId} OR ${loanOfficerId} = -1) AND mst.savingsTransactionId = ${savingsTransactionId}', 'Savings Withdrawal', 0, 1); + (171, 'Dormant Prospects', 'SMS', 'NonTriggered', 'Clients', 'SELECT c.id AS "id", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'. +\', \' +\')) - 1))), ounder.`name`) AS "officeName", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", \r\no.id AS "officeNumber", \r\nTIMESTAMPDIFF(MONTH, c.activation_date, CURDATE()) AS "dormant"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum +\' AND r.enum_id = c.status_enum\r\nLEFT JOIN m_loan l ON l.client_id = c.id\r\nWHERE o.id = ${officeId} AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND l.client_id IS NULL AND (TIMESTAMPDIFF(MONTH, c.activation_date, CURDATE()) > 3)\r\nGROUP BY c.id\r\nORDER BY ounder.hierarchy, c.account_no', 'All individuals who have not yet received a loan but were also entered into the system more than 3 months', 0, 1), + (172, 'Active group leaders', 'SMS', 'NonTriggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'. +\', \' +\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_group g ON g.office_id = ounder.id\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN m_group_client gc ON gc.group_id = g.id AND gc.client_id = c.id\r\nLEFT JOIN m_group_roles gr ON gr.group_id = g.id AND gr.client_id = c.id\r\nLEFT JOIN m_staff ms ON ms.id = c.staff_id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum +\' AND r.enum_id = c.status_enum\r\nLEFT JOIN m_code_value cv ON cv.id = gr.role_cv_id\r\nLEFT JOIN m_code code ON code.id = cv.code_id\r\nWHERE o.id = ${officeId} AND g.status_enum = 300 AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND code.code_name = \'GROUPROLE +\' AND cv.code_value = \'Leader +\'\r\nGROUP BY c.id\r\nORDER BY ounder.hierarchy, c.account_no', 'All active group chairmen', 0, 1), + (173, 'Loan payments due (Overdue Loans)', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nmc.id AS "id", \r\nmc.firstname AS "firstName",\r\nmc.middlename AS "middleName",\r\nmc.lastname AS "lastName",\r\nmc.display_name AS "fullName",\r\nmc.mobile_no AS "mobileNo", \r\nml.principal_amount AS "loanAmount", \r\n(IFNULL(ml.principal_outstanding_derived, 0) + IFNULL(ml.interest_outstanding_derived, 0) + IFNULL(ml.fee_charges_outstanding_derived, 0) + IFNULL(ml.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nml.principal_disbursed_derived AS "loanDisbursed",\r\nlaa.overdue_since_date_derived AS "paymentDueDate",\r\n(IFNULL(SUM(ls.principal_amount),0) - IFNULL(SUM(ls.principal_writtenoff_derived),0)\r\n + IFNULL(SUM(ls.interest_amount),0) - IFNULL(SUM(ls.interest_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.interest_waived_derived),0)\r\n + IFNULL(SUM(ls.fee_charges_amount),0) - IFNULL(SUM(ls.fee_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.fee_charges_waived_derived),0)\r\n + IFNULL(SUM(ls.penalty_charges_amount),0) - IFNULL(SUM(ls.penalty_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.penalty_charges_waived_derived),0)\r\n) AS "totalDue",\r\nlaa.total_overdue_derived AS "totalOverdue",\r\nounder.id AS "officeNumber", \r\nml.account_no AS "loanAccountId", \r\ngua.lastname AS "guarantorLastName", \r\nCOUNT(gua.id) AS "numberOfGuarantors",\r\ng.display_name AS "groupName"\r\n\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'% +\')\r\nINNER JOIN m_client mc ON mc.office_id=ounder.id\r\nINNER JOIN m_loan ml ON ml.client_id = mc.id\r\nINNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = \'loan_status_id +\'\r\nINNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\nLEFT JOIN m_loan_repayment_schedule ls ON ls.loan_id = ml.id\r\nLEFT JOIN m_currency cur ON cur.code = ml.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = mc.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = ml.loan_officer_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = ml.id\r\nWHERE ml.loan_status_id=300 AND mo.id=${officeId} AND (IFNULL(ml.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) \r\nAND (DATEDIFF(CURDATE(), ls.duedate) BETWEEN ${fromX} AND ${toY})\r\nAND (DATEDIFF(CURDATE(), laa.overdue_since_date_derived) BETWEEN ${overdueX} AND ${overdueY})\r\nGROUP BY ml.id, gua.lastname, g.display_name\r\nORDER BY ounder.hierarchy, ml.currency_code, mc.account_no, ml.account_no', 'Loan Payments Due between fromX to toY days for clients in arrears between overdueX and overdueY days', 0, 1), + (174, 'Loan payments received (Active Loans)', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nmc.id AS "id", \r\nmc.firstname AS "firstName",\r\nmc.middlename AS "middleName",\r\nmc.lastname AS "lastName",\r\nmc.display_name AS "fullName",\r\nmc.mobile_no AS "mobileNo", \r\nml.principal_amount AS "loanAmount", \r\n(IFNULL(ml.principal_outstanding_derived, 0) + IFNULL(ml.interest_outstanding_derived, 0) + IFNULL(ml.fee_charges_outstanding_derived, 0) + IFNULL(ml.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nounder.id AS "officeNumber", \r\nml.account_no AS "loanAccountNumber",\r\nSUM(lt.amount) AS "repaymentAmount"\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'% +\')\r\nINNER JOIN m_client mc ON mc.office_id=ounder.id\r\nINNER JOIN m_loan ml ON ml.client_id = mc.id\r\nINNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = \'loan_status_id +\'\r\nINNER JOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nINNER JOIN m_appuser au ON au.id = lt.appuser_id\r\nLEFT JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\nLEFT JOIN m_payment_detail mpd ON mpd.id=lt.payment_detail_id\r\nLEFT JOIN m_currency cur ON cur.code = ml.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = mc.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = ml.loan_officer_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = ml.id\r\nWHERE ml.loan_status_id=300 AND mo.id=${officeId} AND (IFNULL(ml.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND (DATEDIFF(CURDATE(), lt.transaction_date) BETWEEN ${fromX} AND ${toY}) AND lt.is_reversed=0 AND lt.transaction_type_enum=2 AND laa.loan_id IS NULL\r\nGROUP BY ml.id\r\nORDER BY ounder.hierarchy, ml.currency_code, mc.account_no, ml.account_no', 'Payments received in the last fromX to toY days for any loan with the status Active (on-time)', 0, 1), + (175, 'Loan payments received (Overdue Loans)', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nml.id AS "loanId", \r\nmc.id AS "id", \r\nmc.firstname AS "firstName",\r\nmc.middlename AS "middleName",\r\nmc.lastname AS "lastName",\r\nmc.display_name AS "fullName",\r\nmc.mobile_no AS "mobileNo", \r\nml.principal_amount AS "loanAmount", \r\n(IFNULL(ml.principal_outstanding_derived, 0) + IFNULL(ml.interest_outstanding_derived, 0) + IFNULL(ml.fee_charges_outstanding_derived, 0) + IFNULL(ml.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nounder.id AS "officeNumber", \r\nml.account_no AS "loanAccountNumber",\r\nSUM(lt.amount) AS "repaymentAmount"\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'% +\')\r\nINNER JOIN m_client mc ON mc.office_id=ounder.id\r\nINNER JOIN m_loan ml ON ml.client_id = mc.id\r\nINNER JOIN r_enum_value rev ON rev.enum_id=ml.loan_status_id AND rev.enum_name = \'loan_status_id +\'\r\nINNER JOIN m_loan_arrears_aging laa ON laa.loan_id=ml.id\r\nINNER JOIN m_loan_transaction lt ON lt.loan_id = ml.id\r\nINNER JOIN m_appuser au ON au.id = lt.appuser_id\r\nLEFT JOIN m_payment_detail mpd ON mpd.id=lt.payment_detail_id\r\nLEFT JOIN m_currency cur ON cur.code = ml.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = mc.id\r\nLEFT JOIN m_group g ON g.id = gc.group_id\r\nLEFT JOIN m_staff lo ON lo.id = ml.loan_officer_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = ml.id\r\nWHERE ml.loan_status_id=300 AND mo.id=${officeId} AND (IFNULL(ml.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND (DATEDIFF(CURDATE(), lt.transaction_date) BETWEEN ${fromX} AND ${toY}) AND (DATEDIFF(CURDATE(), laa.overdue_since_date_derived) BETWEEN ${overdueX} AND ${overdueY}) AND lt.is_reversed=0 AND lt.transaction_type_enum=2\r\nGROUP BY ml.id\r\nORDER BY ounder.hierarchy, ml.currency_code, mc.account_no, ml.account_no', 'Payments received in the last fromX to toY days for any loan with the status Overdue (arrears) between overdueX and overdueY days', 0, 1), + (176, 'Happy Birthday', 'SMS', 'NonTriggered', 'Clients', 'SELECT \r\nc.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'. +\', \' +\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber", \r\nc.date_of_birth AS "dateOfBirth",\r\nIF(c.date_of_birth IS NULL, 0, CEIL(DATEDIFF (NOW(), c.date_of_birth)/365)) AS "age"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum +\' AND r.enum_id = c.status_enum\r\nLEFT JOIN m_staff ms ON ms.id = c.staff_id\r\nWHERE o.id = ${officeId} AND c.status_enum = 300 AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND c.date_of_birth IS NOT NULL AND (DAY(c.date_of_birth)=DAY(NOW())) AND (MONTH(c.date_of_birth)=MONTH(NOW()))\r\nORDER BY ounder.hierarchy, c.account_no', 'This sends a message to all clients with the status Active on their Birthday', 0, 1), + (177, 'Loan fully repaid', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nc.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", \r\nl.principal_amount AS "loanAmount",\r\n(IFNULL(l.principal_outstanding_derived, 0) + IFNULL(l.interest_outstanding_derived, 0) + IFNULL(l.fee_charges_outstanding_derived, 0) + IFNULL(l.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nl.principal_disbursed_derived AS "loanDisbursed",\r\no.id AS "officeNumber",\r\nl.account_no AS "loanAccountId",\r\ngua.lastname AS "guarantorLastName", COUNT(gua.id) AS "numberOfGuarantors",\r\nls.duedate AS "dueDate",\r\nlaa.total_overdue_derived AS "totalDue",\r\ngp.display_name AS "groupName",\r\nl.total_repayment_derived AS "totalFullyPaid"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan l ON l.client_id = c.id\r\nLEFT JOIN m_staff lo ON lo.id = l.loan_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = l.currency_code\r\nLEFT JOIN m_group_client gc ON gc.client_id = c.id\r\nLEFT JOIN m_group gp ON gp.id = l.group_id\r\nLEFT JOIN m_loan_repayment_schedule ls ON l.id = ls.loan_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = l.id\r\nLEFT JOIN m_loan_arrears_aging laa ON laa.loan_id=l.id\r\nWHERE o.id = ${officeId} AND (IFNULL(l.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND \r\n(DATEDIFF(CURDATE(), l.closedon_date) BETWEEN ${fromX} AND ${toY})\r\n AND (l.loan_status_id IN (600, 700))\r\nGROUP BY l.id, gua.lastname, ls.duedate\r\nORDER BY ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'All loans that have been fully repaid (Closed or Overpaid) in the last fromX to toY days', 0, 1), + (178, 'Loan outstanding after final instalment date', 'SMS', 'NonTriggered', 'Loan', 'SELECT \r\nc.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", \r\nl.principal_amount AS "loanAmount",\r\no.id AS "officeNumber",\r\n(IFNULL(l.principal_outstanding_derived, 0) + IFNULL(l.interest_outstanding_derived, 0) + IFNULL(l.fee_charges_outstanding_derived, 0) + IFNULL(l.penalty_charges_outstanding_derived, 0)) AS "loanOutstanding",\r\nl.principal_disbursed_derived AS "loanDisbursed",\r\nls.duedate AS "paymentDueDate",\r\n(IFNULL(SUM(ls.principal_amount),0) - IFNULL(SUM(ls.principal_writtenoff_derived),0)\r\n + IFNULL(SUM(ls.interest_amount),0) - IFNULL(SUM(ls.interest_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.interest_waived_derived),0)\r\n + IFNULL(SUM(ls.fee_charges_amount),0) - IFNULL(SUM(ls.fee_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.fee_charges_waived_derived),0)\r\n + IFNULL(SUM(ls.penalty_charges_amount),0) - IFNULL(SUM(ls.penalty_charges_writtenoff_derived),0) \r\n - IFNULL(SUM(ls.penalty_charges_waived_derived),0)\r\n) AS "totalDue",\r\nlaa.total_overdue_derived AS "totalOverdue",\r\nl.account_no AS "loanAccountId",\r\ngua.lastname AS "guarantorLastName",\r\nCOUNT(gua.id) AS "numberOfGuarantors",\r\ngp.display_name AS "groupName"\r\n\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_loan l ON l.client_id = c.id\r\nLEFT JOIN m_staff lo ON lo.id = l.loan_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = l.currency_code\r\nLEFT JOIN m_loan_arrears_aging laa ON laa.loan_id = l.id\r\nLEFT JOIN m_group_client gc ON gc.client_id = c.id\r\nLEFT JOIN m_group gp ON gp.id = l.group_id\r\nLEFT JOIN m_loan_repayment_schedule ls ON l.id = ls.loan_id\r\nLEFT JOIN m_guarantor gua ON gua.loan_id = l.id\r\nWHERE o.id = ${officeId} AND (IFNULL(l.loan_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND l.loan_status_id = 300 AND l.expected_maturedon_date < CURDATE() \r\nAND (DATEDIFF(CURDATE(), l.expected_maturedon_date) BETWEEN ${fromX} AND ${toY})\r\nGROUP BY l.id, ls.duedate, gua.lastname\r\nORDER BY ounder.hierarchy, l.currency_code, c.account_no, l.account_no', 'All active loans (with an outstanding balance) between fromX to toY days after the final instalment date on their loan schedule', 0, 1), + (179, 'Loan Repayment', 'SMS', 'Triggered', NULL, 'select ml.id as loanId,mc.id, mc.firstname, ifnull(mc.middlename,\' +\') as middlename, mc.lastname, mc.display_name as FullName, mobile_no as mobileNo, mc.group_name as GroupName, round(ml.principal_amount, ml.currency_digits) as LoanAmount, round(ml.`total_outstanding_derived`, ml.currency_digits) as LoanOutstanding,\nml.`account_no` as LoanAccountId, round(mlt.amountPaid, ml.currency_digits) as repaymentAmount\nFROM m_office mo\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'% +\')\nAND ounder.hierarchy like CONCAT(\'. +\', \'% +\')\nLEFT JOIN (\n select \n ml.id as loanId, \n ifnull(mc.id,mc2.id) as id, \n ifnull(mc.firstname,mc2.firstname) as firstname, \n ifnull(mc.middlename,ifnull(mc2.middlename,(\' +\'))) as middlename, \n ifnull(mc.lastname,mc2.lastname) as lastname, \n ifnull(mc.display_name,mc2.display_name) as display_name, \n ifnull(mc.status_enum,mc2.status_enum) as status_enum,\n ifnull(mc.mobile_no,mc2.mobile_no) as mobile_no,\n ifnull(mg.office_id,mc2.office_id) as office_id,\n ifnull(mg.staff_id,mc2.staff_id) as staff_id,\n mg.id as group_id, \nmg.display_name as group_name\n from\n m_loan ml\n left join m_group mg on mg.id = ml.group_id\n left join m_group_client mgc on mgc.group_id = mg.id\n left join m_client mc on mc.id = mgc.client_id\n left join m_client mc2 on mc2.id = ml.client_id\n order by loanId\n ) mc on mc.office_id = ounder.id\nright join m_loan as ml on mc.loanId = ml.id\nright join(\nselect mlt.amount as amountPaid,mlt.id,mlt.loan_id\nfrom m_loan_transaction mlt\nwhere mlt.is_reversed = 0 \ngroup by mlt.loan_id, mlt.amount, mlt.id\n) as mlt on mlt.loan_id = ml.id\nright join m_loan_repayment_schedule as mls1 on ml.id = mls1.loan_id and mls1.`completed_derived` = 0\nand mls1.installment = (SELECT MIN(installment) from m_loan_repayment_schedule where loan_id = ml.id and duedate <= CURDATE() and completed_derived=0)\nwhere mc.status_enum = 300 and mobile_no is not null and ml.`loan_status_id` = 300\nand (mo.id = ${officeId} or ${officeId} = -1)\nand (mc.staff_id = ${loanOfficerId} or ${loanOfficerId} = -1)\nand (ml.loan_type_enum = ${loanType} or ${loanType} = -1)\nand ml.id in (select mla.loan_id from m_loan_arrears_aging mla)\ngroup by ml.id, mc.id, mc.firstname, mc.middlename, mc.lastname, mc.display_name, mc.mobile_no, mlt.amountPaid', 'Loan Repayment', 0, 0), + (180, 'Loan Approved', 'SMS', 'Triggered', NULL, 'SELECT mc.id, mc.firstname, mc.middlename as middlename, mc.lastname, mc.display_name as FullName, mc.mobile_no as mobileNo, mc.group_name as GroupName, mo.name as officename, ml.id as loanId, ml.account_no as accountnumber, ml.principal_amount_proposed as loanamount, ml.annual_nominal_interest_rate as annualinterestrate FROM m_office mo JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'% +\') AND ounder.hierarchy like CONCAT(\'. +\', \'% +\') LEFT JOIN ( select ml.id as loanId, ifnull(mc.id,mc2.id) as id, ifnull(mc.firstname,mc2.firstname) as firstname, ifnull(mc.middlename,ifnull(mc2.middlename,(\' +\'))) as middlename, ifnull(mc.lastname,mc2.lastname) as lastname, ifnull(mc.display_name,mc2.display_name) as display_name, ifnull(mc.status_enum,mc2.status_enum) as status_enum, ifnull(mc.mobile_no,mc2.mobile_no) as mobile_no, ifnull(mg.office_id,mc2.office_id) as office_id, ifnull(mg.staff_id,mc2.staff_id) as staff_id, mg.id as group_id, mg.display_name as group_name from m_loan ml left join m_group mg on mg.id = ml.group_id left join m_group_client mgc on mgc.group_id = mg.id left join m_client mc on mc.id = mgc.client_id left join m_client mc2 on mc2.id = ml.client_id order by loanId ) mc on mc.office_id = ounder.id left join m_loan ml on ml.id = mc.loanId WHERE mc.status_enum = 300 and mc.mobile_no is not null and (mo.id = ${officeId} or ${officeId} = -1) and (mc.staff_id = ${loanOfficerId} or ${loanOfficerId} = -1)and (ml.id = ${loanId} or ${loanId} = -1)and (mc.id = ${clientId} or ${clientId} = -1)and (mc.group_id = ${groupId} or ${groupId} = -1)and (ml.loan_type_enum = ${loanType} or ${loanType} = -1)', 'Loan and client data of approved loan', 0, 0), + (181, 'Loan Rejected', 'SMS', 'Triggered', NULL, 'SELECT mc.id, mc.firstname, mc.middlename as middlename, mc.lastname, mc.display_name as FullName, mc.mobile_no as mobileNo, mc.group_name as GroupName, mo.name as officename, ml.id as loanId, ml.account_no as accountnumber, ml.principal_amount_proposed as loanamount, ml.annual_nominal_interest_rate as annualinterestrate FROM m_office mo JOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'% +\') AND ounder.hierarchy like CONCAT(\'. +\', \'% +\') LEFT JOIN ( select ml.id as loanId, ifnull(mc.id,mc2.id) as id, ifnull(mc.firstname,mc2.firstname) as firstname, ifnull(mc.middlename,ifnull(mc2.middlename,(\' +\'))) as middlename, ifnull(mc.lastname,mc2.lastname) as lastname, ifnull(mc.display_name,mc2.display_name) as display_name, ifnull(mc.status_enum,mc2.status_enum) as status_enum, ifnull(mc.mobile_no,mc2.mobile_no) as mobile_no, ifnull(mg.office_id,mc2.office_id) as office_id, ifnull(mg.staff_id,mc2.staff_id) as staff_id, mg.id as group_id, mg.display_name as group_name from m_loan ml left join m_group mg on mg.id = ml.group_id left join m_group_client mgc on mgc.group_id = mg.id left join m_client mc on mc.id = mgc.client_id left join m_client mc2 on mc2.id = ml.client_id order by loanId ) mc on mc.office_id = ounder.id left join m_loan ml on ml.id = mc.loanId WHERE mc.status_enum = 300 and mc.mobile_no is not null and (mo.id = ${officeId} or ${officeId} = -1) and (mc.staff_id = ${loanOfficerId} or ${loanOfficerId} = -1) and (ml.id = ${loanId} or ${loanId} = -1) and (mc.id = ${clientId} or ${clientId} = -1) and (mc.group_id = ${groupId} or ${groupId} = -1) and (ml.loan_type_enum = ${loanType} or ${loanType} = -1)', 'Loan and client data of rejected loan', 0, 0), + (182, 'Client Rejected', 'SMS', 'Triggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'. +\', \' +\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum +\' AND r.enum_id = c.status_enum\r\nWHERE o.id = ${officeId} AND c.id = ${clientId} AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId})', 'Client Rejection', 0, 1), + (183, 'Client Activated', 'SMS', 'Triggered', 'Clients', 'SELECT c.id AS "id", \r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo", CONCAT(REPEAT("..", ((LENGTH(ounder.`hierarchy`) - LENGTH(\r\nREPLACE(ounder.`hierarchy`, \'. +\', \' +\')) - 1))), ounder.`name`) AS "officeName", \r\no.id AS "officeNumber"\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nLEFT JOIN r_enum_value r ON r.enum_name = \'status_enum +\' AND r.enum_id = c.status_enum\r\nWHERE o.id = ${officeId} AND c.id = ${clientId} AND (IFNULL(c.staff_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId})', 'Client Activation', 0, 1), + (184, 'Savings Rejected', 'SMS', 'Triggered', 'Savings', 'SELECT \r\nc.id AS "id",\r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo",\r\ns.account_no AS "savingsAccountNo",\r\nounder.id AS "officeNumber",\r\nounder.name AS "officeName"\r\n\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_savings_account s ON s.client_id = c.id\r\nJOIN m_savings_product sp ON sp.id = s.product_id\r\nLEFT JOIN m_staff st ON st.id = s.field_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = s.currency_code\r\nWHERE o.id = ${officeId} AND (IFNULL(s.field_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND s.id = ${savingsId}', 'Savings Rejected', 0, 1), + (185, 'Savings Activated', 'SMS', 'Triggered', 'Savings', 'SELECT \r\nc.id AS "id",\r\nc.firstname AS "firstName",\r\nc.middlename AS "middleName",\r\nc.lastname AS "lastName",\r\nc.display_name AS "fullName",\r\nc.mobile_no AS "mobileNo",\r\ns.account_no AS "savingsAccountNo",\r\nounder.id AS "officeNumber",\r\nounder.name AS "officeName"\r\n\r\nFROM m_office o\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(o.hierarchy, \'% +\')\r\nJOIN m_client c ON c.office_id = ounder.id\r\nJOIN m_savings_account s ON s.client_id = c.id\r\nJOIN m_savings_product sp ON sp.id = s.product_id\r\nLEFT JOIN m_staff st ON st.id = s.field_officer_id\r\nLEFT JOIN m_currency cur ON cur.code = s.currency_code\r\nWHERE o.id = ${officeId} AND (IFNULL(s.field_officer_id, -10) = ${loanOfficerId} OR "-1" = ${loanOfficerId}) AND s.id = ${savingsId}', 'Savings Activation', 0, 1), + (186, 'Savings Deposit', 'SMS', 'Triggered', NULL, 'SELECT sc.savingsId AS savingsId, sc.id AS clientId, sc.firstname, IFNULL(sc.middlename,\' +\') AS middlename, sc.lastname, sc.display_name AS FullName, sc.mobile_no AS mobileNo,\r\nms.`account_no` AS savingsAccountNo, ROUND(mst.amountPaid, ms.currency_digits) AS depositAmount, ms.account_balance_derived AS balance, \r\nmst.transactionDate AS transactionDate\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'% +\') AND ounder.hierarchy LIKE CONCAT(\'. +\', \'% +\')\r\nLEFT JOIN (\r\nSELECT \r\n sa.id AS savingsId, mc.id AS id, mc.firstname AS firstname, mc.middlename AS middlename, mc.lastname AS lastname, \r\n mc.display_name AS display_name, mc.status_enum AS status_enum, \r\n mc.mobile_no AS mobile_no, mc.office_id AS office_id, \r\n mc.staff_id AS staff_id\r\nFROM\r\nm_savings_account sa\r\nLEFT JOIN m_client mc ON mc.id = sa.client_id\r\nORDER BY savingsId) sc ON sc.office_id = ounder.id\r\nRIGHT JOIN m_savings_account AS ms ON sc.savingsId = ms.id\r\nRIGHT JOIN(\r\nSELECT st.amount AS amountPaid, st.id, st.savings_account_id, st.id AS savingsTransactionId, st.transaction_date AS transactionDate\r\nFROM m_savings_account_transaction st\r\nWHERE st.is_reversed = 0\r\nGROUP BY st.savings_account_id, st.amount, st.id\r\n) AS mst ON mst.savings_account_id = ms.id\r\nWHERE sc.mobile_no IS NOT NULL AND (mo.id = ${officeId} OR ${officeId} = -1) AND (sc.staff_id = ${loanOfficerId} OR ${loanOfficerId} = -1) AND mst.savingsTransactionId = ${savingsTransactionId}', 'Savings Deposit', 0, 1), + (187, 'Savings Withdrawal', 'SMS', 'Triggered', NULL, 'SELECT sc.savingsId AS savingsId, sc.id AS clientId, sc.firstname, IFNULL(sc.middlename,\' +\') AS middlename, sc.lastname, sc.display_name AS FullName, sc.mobile_no AS mobileNo,\r\nms.`account_no` AS savingsAccountNo, ROUND(mst.amountPaid, ms.currency_digits) AS withdrawAmount, ms.account_balance_derived AS balance, \r\nmst.transactionDate AS transactionDate\r\nFROM m_office mo\r\nJOIN m_office ounder ON ounder.hierarchy LIKE CONCAT(mo.hierarchy, \'% +\') AND ounder.hierarchy LIKE CONCAT(\'. +\', \'% +\')\r\nLEFT JOIN (\r\nSELECT \r\n sa.id AS savingsId, mc.id AS id, mc.firstname AS firstname, mc.middlename AS middlename, mc.lastname AS lastname, \r\n mc.display_name AS display_name, mc.status_enum AS status_enum, \r\n mc.mobile_no AS mobile_no, mc.office_id AS office_id, \r\n mc.staff_id AS staff_id\r\nFROM\r\nm_savings_account sa\r\nLEFT JOIN m_client mc ON mc.id = sa.client_id\r\nORDER BY savingsId) sc ON sc.office_id = ounder.id\r\nRIGHT JOIN m_savings_account AS ms ON sc.savingsId = ms.id\r\nRIGHT JOIN(\r\nSELECT st.amount AS amountPaid, st.id, st.savings_account_id, st.id AS savingsTransactionId, st.transaction_date AS transactionDate\r\nFROM m_savings_account_transaction st\r\nWHERE st.is_reversed = 0\r\nGROUP BY st.savings_account_id, st.amount, st.id\r\n) AS mst ON mst.savings_account_id = ms.id\r\nWHERE sc.mobile_no IS NOT NULL AND (mo.id = ${officeId} OR ${officeId} = -1) AND (sc.staff_id = ${loanOfficerId} OR ${loanOfficerId} = -1) AND mst.savingsTransactionId = ${savingsTransactionId}', 'Savings Withdrawal', 0, 1); /*!40000 ALTER TABLE `stretchy_report` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.stretchy_report_parameter DROP TABLE IF EXISTS `stretchy_report_parameter`; -CREATE TABLE IF NOT EXISTS `stretchy_report_parameter` ( - `id` INT NOT NULL AUTO_INCREMENT, - `report_id` INT NOT NULL, - `parameter_id` INT NOT NULL, - `report_parameter_name` varchar(45) DEFAULT NULL, - PRIMARY KEY (`id`), - UNIQUE KEY `report_parameter_unique` (`report_id`,`parameter_id`), - KEY `fk_report_parameter_001_idx` (`report_id`), - KEY `fk_report_parameter_002_idx` (`parameter_id`), - CONSTRAINT `fk_report_parameter_001` FOREIGN KEY (`report_id`) REFERENCES `stretchy_report` (`id`) ON DELETE CASCADE, - CONSTRAINT `fk_report_parameter_002` FOREIGN KEY (`parameter_id`) REFERENCES `stretchy_parameter` (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=522 DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `stretchy_report_parameter` +( + `id` + INT + NOT + NULL + AUTO_INCREMENT, + `report_id` + INT + NOT + NULL, + `parameter_id` + INT + NOT + NULL, + `report_parameter_name` + varchar +( + 45 +) DEFAULT NULL, + PRIMARY KEY +( + `id` +), + UNIQUE KEY `report_parameter_unique` +( + `report_id`, + `parameter_id` +), + KEY `fk_report_parameter_001_idx` +( + `report_id` +), + KEY `fk_report_parameter_002_idx` +( + `parameter_id` +), + CONSTRAINT `fk_report_parameter_001` FOREIGN KEY +( + `report_id` +) REFERENCES `stretchy_report` +( + `id` +) ON DELETE CASCADE, + CONSTRAINT `fk_report_parameter_002` FOREIGN KEY +( + `parameter_id` +) REFERENCES `stretchy_parameter` +( + `id` +) + ) ENGINE=InnoDB AUTO_INCREMENT=522 DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.stretchy_report_parameter: ~415 rows (approximately) /*!40000 ALTER TABLE `stretchy_report_parameter` DISABLE KEYS */; -INSERT INTO `stretchy_report_parameter` (`id`, `report_id`, `parameter_id`, `report_parameter_name`) VALUES - (1, 1, 5, NULL), - (2, 2, 5, NULL), - (3, 2, 6, NULL), - (4, 2, 10, NULL), - (5, 2, 20, NULL), - (6, 2, 25, NULL), - (7, 2, 26, NULL), - (8, 5, 5, NULL), - (9, 5, 6, NULL), - (10, 5, 10, NULL), - (11, 5, 20, NULL), - (12, 5, 25, NULL), - (13, 5, 26, NULL), - (14, 6, 5, NULL), - (15, 6, 6, NULL), - (16, 6, 10, NULL), - (17, 6, 20, NULL), - (18, 6, 25, NULL), - (19, 6, 26, NULL), - (20, 7, 5, NULL), - (21, 7, 6, NULL), - (22, 7, 10, NULL), - (23, 7, 20, NULL), - (24, 7, 25, NULL), - (25, 7, 26, NULL), - (26, 8, 5, NULL), - (27, 8, 6, NULL), - (28, 8, 10, NULL), - (29, 8, 25, NULL), - (30, 8, 26, NULL), - (31, 11, 5, NULL), - (32, 11, 6, NULL), - (33, 11, 10, NULL), - (34, 11, 20, NULL), - (35, 11, 25, NULL), - (36, 11, 26, NULL), - (37, 11, 100, NULL), - (38, 12, 5, NULL), - (39, 12, 6, NULL), - (40, 12, 10, NULL), - (41, 12, 20, NULL), - (42, 12, 25, NULL), - (43, 12, 26, NULL), - (44, 13, 1, NULL), - (45, 13, 2, NULL), - (46, 13, 3, NULL), - (47, 13, 5, NULL), - (48, 13, 6, NULL), - (49, 13, 10, NULL), - (50, 13, 20, NULL), - (51, 13, 25, NULL), - (52, 13, 26, NULL), - (53, 14, 1, NULL), - (54, 14, 2, NULL), - (55, 14, 3, NULL), - (56, 14, 5, NULL), - (57, 14, 6, NULL), - (58, 14, 10, NULL), - (59, 14, 20, NULL), - (60, 14, 25, NULL), - (61, 14, 26, NULL), - (62, 15, 5, NULL), - (63, 15, 6, NULL), - (64, 15, 10, NULL), - (65, 15, 20, NULL), - (66, 15, 25, NULL), - (67, 15, 26, NULL), - (68, 15, 100, NULL), - (69, 16, 5, NULL), - (70, 16, 6, NULL), - (71, 16, 10, NULL), - (72, 16, 20, NULL), - (73, 16, 25, NULL), - (74, 16, 26, NULL), - (75, 16, 100, NULL), - (76, 20, 1, NULL), - (77, 20, 2, NULL), - (78, 20, 10, NULL), - (79, 20, 20, NULL), - (80, 21, 1, NULL), - (81, 21, 2, NULL), - (82, 21, 5, NULL), - (83, 21, 10, NULL), - (84, 21, 20, NULL), - (85, 48, 5, 'branch'), - (86, 48, 2, 'date'), - (87, 49, 5, 'branch'), - (88, 49, 1, 'fromDate'), - (89, 49, 2, 'toDate'), - (90, 50, 5, 'branch'), - (91, 50, 1, 'fromDate'), - (92, 50, 2, 'toDate'), - (93, 51, 1, NULL), - (94, 51, 2, NULL), - (95, 51, 5, NULL), - (96, 51, 10, NULL), - (97, 51, 25, NULL), - (98, 52, 5, NULL), - (99, 53, 5, NULL), - (100, 53, 10, NULL), - (101, 54, 1, NULL), - (102, 54, 2, NULL), - (103, 54, 5, NULL), - (104, 54, 10, NULL), - (105, 54, 25, NULL), - (106, 55, 5, NULL), - (107, 55, 6, NULL), - (108, 55, 10, NULL), - (109, 55, 20, NULL), - (110, 55, 25, NULL), - (111, 55, 26, NULL), - (112, 56, 5, NULL), - (113, 56, 6, NULL), - (114, 56, 10, NULL), - (115, 56, 20, NULL), - (116, 56, 25, NULL), - (117, 56, 26, NULL), - (118, 56, 100, NULL), - (119, 57, 5, NULL), - (120, 57, 6, NULL), - (121, 57, 10, NULL), - (122, 57, 20, NULL), - (123, 57, 25, NULL), - (124, 57, 26, NULL), - (125, 58, 5, NULL), - (126, 58, 6, NULL), - (127, 58, 10, NULL), - (128, 58, 20, NULL), - (129, 58, 25, NULL), - (130, 58, 26, NULL), - (131, 58, 100, NULL), - (132, 59, 1, NULL), - (133, 59, 2, NULL), - (134, 59, 5, NULL), - (135, 59, 6, NULL), - (136, 59, 10, NULL), - (137, 59, 20, NULL), - (138, 59, 25, NULL), - (139, 59, 26, NULL), - (140, 61, 5, NULL), - (141, 61, 10, NULL), - (142, 92, 1, 'fromDate'), - (143, 92, 5, 'selectOffice'), - (144, 92, 2, 'toDate'), - (145, 93, 1, NULL), - (146, 93, 2, NULL), - (147, 93, 5, NULL), - (148, 93, 6, NULL), - (149, 94, 2, 'endDate'), - (150, 94, 6, 'loanOfficerId'), - (151, 94, 5, 'officeId'), - (152, 94, 1, 'startDate'), - (256, 106, 2, NULL), - (257, 106, 6, NULL), - (258, 106, 5, NULL), - (259, 106, 1, NULL), - (263, 118, 1, 'fromDate'), - (264, 118, 2, 'toDate'), - (265, 118, 1004, 'accountNo'), - (266, 119, 1, 'fromDate'), - (267, 119, 2, 'toDate'), - (268, 119, 5, 'selectOffice'), - (269, 119, 1005, 'selectProduct'), - (270, 120, 5, 'branch'), - (271, 120, 6, 'loanOfficer'), - (272, 120, 10, 'currencyId'), - (273, 120, 20, 'fundId'), - (274, 120, 25, 'loanProductId'), - (275, 120, 26, 'loanPurposeId'), - (276, 121, 5, 'Branch'), - (277, 121, 6, 'loanOfficer'), - (278, 121, 10, 'CurrencyId'), - (279, 121, 20, 'fundId'), - (280, 121, 25, 'loanProductId'), - (281, 121, 26, 'loanPurposeId'), - (282, 121, 100, 'parType'), - (283, 122, 5, 'Branch'), - (284, 122, 6, 'loanOfficer'), - (285, 122, 10, 'CurrencyId'), - (286, 122, 20, 'fundId'), - (287, 122, 25, 'loanProductId'), - (288, 122, 26, 'loanPurposeId'), - (289, 122, 1, 'startDate'), - (290, 122, 2, 'endDate'), - (291, 123, 5, 'Branch'), - (292, 123, 6, 'Loan Officer'), - (293, 123, 10, 'CurrencyId'), - (294, 123, 20, 'fundId'), - (295, 123, 25, 'loanProductId'), - (296, 123, 26, 'loanPurposeId'), - (297, 123, 100, 'parType'), - (298, 124, 5, 'Branch'), - (299, 124, 6, 'Loan Officer'), - (300, 124, 10, 'CurrencyId'), - (301, 124, 20, 'fundId'), - (302, 124, 25, 'loanProductId'), - (303, 124, 26, 'loanPurposeId'), - (304, 125, 5, 'Branch'), - (305, 125, 6, 'Loan Officer'), - (306, 125, 10, 'CurrencyId'), - (307, 125, 20, 'fundId'), - (308, 125, 25, 'loanProductId'), - (309, 125, 26, 'loanPurposeId'), - (310, 125, 100, 'parType'), - (311, 126, 5, 'Branch'), - (312, 126, 6, 'Loan Officer'), - (313, 126, 10, 'CurrencyId'), - (314, 126, 20, 'fundId'), - (315, 126, 25, 'loanProductId'), - (316, 126, 26, 'loanPurposeId'), - (317, 127, 5, 'Branch'), - (318, 128, 5, 'Branch'), - (319, 128, 10, 'CurrencyId'), - (320, 129, 5, 'Branch'), - (321, 129, 10, 'CurrencyId'), - (322, 130, 5, 'selectOffice'), - (323, 131, 5, 'Branch'), - (324, 131, 6, 'Loan Officer'), - (325, 131, 10, 'CurrencyId'), - (326, 131, 20, 'fundId'), - (327, 131, 25, 'loanProductId'), - (328, 131, 26, 'loanPurposeId'), - (329, 132, 5, 'Branch'), - (330, 132, 6, 'Loan Officer'), - (331, 132, 1, 'startDate'), - (332, 132, 2, 'endDate'), - (333, 133, 5, 'Branch'), - (334, 133, 10, 'CurrencyId'), - (335, 133, 20, 'fundId'), - (336, 133, 1, 'startDate'), - (337, 133, 2, 'endDate'), - (338, 134, 10, 'CurrencyId'), - (339, 134, 20, 'fundId'), - (340, 134, 1, 'startDate'), - (341, 134, 2, 'endDate'), - (342, 135, 5, 'Branch'), - (343, 135, 6, 'Loan Officer'), - (344, 135, 10, 'CurrencyId'), - (345, 135, 20, 'fundId'), - (346, 135, 25, 'loanProductId'), - (347, 135, 26, 'loanPurposeId'), - (348, 136, 5, 'Branch'), - (349, 136, 6, 'Loan Officer'), - (350, 136, 10, 'CurrencyId'), - (351, 136, 20, 'fundId'), - (352, 136, 25, 'loanProductId'), - (353, 136, 26, 'loanPurposeId'), - (354, 137, 5, 'Branch'), - (355, 137, 6, 'Loan Officer'), - (356, 137, 10, 'CurrencyId'), - (357, 137, 20, 'fundId'), - (358, 137, 25, 'loanProductId'), - (359, 137, 26, 'loanPurposeId'), - (360, 138, 5, 'Branch'), - (361, 138, 6, 'Loan Officer'), - (362, 138, 10, 'CurrencyId'), - (363, 138, 20, 'fundId'), - (364, 138, 25, 'loanProductId'), - (365, 138, 26, 'loanPurposeId'), - (366, 139, 5, 'Branch'), - (367, 139, 6, 'Loan Officer'), - (368, 139, 10, 'CurrencyId'), - (369, 139, 20, 'fundId'), - (370, 139, 25, 'loanProductId'), - (371, 139, 26, 'loanPurposeId'), - (372, 139, 1, 'startDate'), - (373, 139, 2, 'endDate'), - (374, 139, 3, 'obligDateType'), - (375, 140, 5, 'Branch'), - (376, 140, 6, 'Loan Officer'), - (377, 140, 10, 'CurrencyId'), - (378, 140, 20, 'fundId'), - (379, 140, 25, 'loanProductId'), - (380, 140, 26, 'loanPurposeId'), - (381, 140, 1, 'Startdate'), - (382, 140, 2, 'Enddate'), - (383, 140, 3, 'obligDateType'), - (384, 141, 5, 'Branch'), - (385, 141, 6, 'Loan Officer'), - (386, 141, 10, 'CurrencyId'), - (387, 141, 20, 'fundId'), - (388, 141, 25, 'loanProductId'), - (389, 141, 26, 'loanPurposeId'), - (390, 141, 100, 'parType'), - (391, 142, 5, 'Branch'), - (392, 142, 6, 'loanOfficer'), - (393, 142, 10, 'CurrencyId'), - (394, 142, 20, 'fundId'), - (395, 142, 25, 'loanProductId'), - (396, 142, 26, 'loanPurposeId'), - (397, 142, 100, 'parType'), - (398, 143, 5, 'Branch'), - (399, 143, 10, 'CurrencyId'), - (400, 143, 25, 'loanProductId'), - (401, 143, 1, 'startDate'), - (402, 143, 2, 'endDate'), - (403, 144, 5, 'Branch'), - (404, 144, 6, 'Loan Officer'), - (405, 144, 1, 'startDate'), - (406, 144, 2, 'endDate'), - (407, 145, 5, 'Branch'), - (408, 145, 10, 'CurrencyId'), - (409, 145, 25, 'loanProductId'), - (410, 145, 1, 'startDate'), - (411, 145, 2, 'endDate'), - (412, 146, 1, 'startDate'), - (413, 146, 2, 'endDate'), - (414, 146, 1004, 'accountNo'), - (415, 147, 1, 'startDate'), - (416, 147, 2, 'endDate'), - (417, 147, 1004, 'selectLoan'), - (418, 149, 5, ''), - (419, 150, 5, ''), - (420, 151, 5, ''), - (421, 152, 5, ''), - (422, 153, 5, ''), - (423, 154, 5, ''), - (424, 155, 5, ''), - (425, 156, 5, ''), - (426, 157, 1006, 'transactionId'), - (427, 158, 1006, 'transactionId'), - (428, 159, 1007, 'centerId'), - (429, 160, 1008, 'account'), - (430, 160, 1, 'fromDate'), - (431, 160, 2, 'toDate'), - (432, 160, 5, 'branch'), - (433, 162, 5, 'branch'), - (434, 162, 1009, 'ondate'), - (435, 163, 5, 'branch'), - (436, 163, 1, 'fromDate'), - (437, 163, 2, 'toDate'), - (438, 164, 5, 'branch'), - (439, 164, 1, 'fromDate'), - (440, 164, 2, 'toDate'), - (441, 165, 1010, NULL), - (442, 165, 5, NULL), - (443, 166, 5, 'officeId'), - (444, 166, 6, 'loanOfficerId'), - (445, 167, 5, 'officeId'), - (446, 167, 6, 'loanOfficerId'), - (447, 168, 5, 'officeId'), - (448, 168, 6, 'loanOfficerId'), - (449, 168, 1011, 'cycleX'), - (450, 168, 1012, 'cycleY'), - (451, 169, 5, 'officeId'), - (452, 169, 6, 'loanOfficerId'), - (453, 169, 1013, 'fromX'), - (454, 169, 1014, 'toY'), - (455, 170, 5, 'officeId'), - (456, 170, 6, 'loanOfficerId'), - (457, 170, 1013, 'fromX'), - (458, 170, 1014, 'toY'), - (459, 171, 5, 'officeId'), - (460, 171, 6, 'loanOfficerId'), - (461, 172, 5, 'officeId'), - (462, 172, 6, 'loanOfficerId'), - (463, 173, 5, 'officeId'), - (464, 173, 6, 'loanOfficerId'), - (465, 173, 1013, 'fromX'), - (466, 173, 1014, 'toY'), - (467, 173, 1015, 'overdueX'), - (468, 173, 1016, 'overdueY'), - (469, 174, 5, 'officeId'), - (470, 174, 6, 'loanOfficerId'), - (471, 174, 1013, 'fromX'), - (472, 174, 1014, 'toY'), - (473, 175, 5, 'officeId'), - (474, 175, 6, 'loanOfficerId'), - (475, 175, 1013, 'fromX'), - (476, 175, 1014, 'toY'), - (477, 175, 1015, 'overdueX'), - (478, 175, 1016, 'overdueY'), - (479, 176, 5, 'officeId'), - (480, 176, 6, 'loanOfficerId'), - (481, 177, 5, 'officeId'), - (482, 177, 6, 'loanOfficerId'), - (483, 177, 1013, 'fromX'), - (484, 177, 1014, 'toY'), - (485, 178, 5, 'officeId'), - (486, 178, 6, 'loanOfficerId'), - (487, 178, 1013, 'fromX'), - (488, 178, 1014, 'toY'), - (489, 181, 5, 'officeId'), - (490, 180, 5, 'officeId'), - (491, 179, 5, 'officeId'), - (492, 181, 6, 'loanOfficerId'), - (493, 180, 6, 'loanOfficerId'), - (494, 179, 6, 'loanOfficerId'), - (495, 181, 1017, 'loanId'), - (496, 180, 1017, 'loanId'), - (497, 181, 1018, 'clientId'), - (498, 180, 1018, 'clientId'), - (499, 181, 1019, 'groupId'), - (500, 180, 1019, 'groupId'), - (501, 181, 1020, 'loanType'), - (502, 180, 1020, 'loanType'), - (503, 179, 1020, 'loanType'), - (504, 182, 5, 'officeId'), - (505, 183, 5, 'officeId'), - (506, 182, 6, 'loanOfficerId'), - (507, 183, 6, 'loanOfficerId'), - (508, 182, 1018, 'clientId'), - (509, 183, 1018, 'clientId'), - (510, 184, 5, 'officeId'), - (511, 184, 6, 'loanOfficerId'), - (512, 184, 1021, 'savingsId'), - (513, 185, 5, 'officeId'), - (514, 185, 6, 'loanOfficerId'), - (515, 185, 1021, 'savingsId'), - (516, 186, 5, 'officeId'), - (517, 186, 6, 'loanOfficerId'), - (518, 186, 1022, 'savingsTransactionId'), - (519, 187, 5, 'officeId'), - (520, 187, 6, 'loanOfficerId'), - (521, 187, 1022, 'savingsTransactionId'); +INSERT INTO `stretchy_report_parameter` (`id`, `report_id`, `parameter_id`, `report_parameter_name`) +VALUES (1, 1, 5, NULL), + (2, 2, 5, NULL), + (3, 2, 6, NULL), + (4, 2, 10, NULL), + (5, 2, 20, NULL), + (6, 2, 25, NULL), + (7, 2, 26, NULL), + (8, 5, 5, NULL), + (9, 5, 6, NULL), + (10, 5, 10, NULL), + (11, 5, 20, NULL), + (12, 5, 25, NULL), + (13, 5, 26, NULL), + (14, 6, 5, NULL), + (15, 6, 6, NULL), + (16, 6, 10, NULL), + (17, 6, 20, NULL), + (18, 6, 25, NULL), + (19, 6, 26, NULL), + (20, 7, 5, NULL), + (21, 7, 6, NULL), + (22, 7, 10, NULL), + (23, 7, 20, NULL), + (24, 7, 25, NULL), + (25, 7, 26, NULL), + (26, 8, 5, NULL), + (27, 8, 6, NULL), + (28, 8, 10, NULL), + (29, 8, 25, NULL), + (30, 8, 26, NULL), + (31, 11, 5, NULL), + (32, 11, 6, NULL), + (33, 11, 10, NULL), + (34, 11, 20, NULL), + (35, 11, 25, NULL), + (36, 11, 26, NULL), + (37, 11, 100, NULL), + (38, 12, 5, NULL), + (39, 12, 6, NULL), + (40, 12, 10, NULL), + (41, 12, 20, NULL), + (42, 12, 25, NULL), + (43, 12, 26, NULL), + (44, 13, 1, NULL), + (45, 13, 2, NULL), + (46, 13, 3, NULL), + (47, 13, 5, NULL), + (48, 13, 6, NULL), + (49, 13, 10, NULL), + (50, 13, 20, NULL), + (51, 13, 25, NULL), + (52, 13, 26, NULL), + (53, 14, 1, NULL), + (54, 14, 2, NULL), + (55, 14, 3, NULL), + (56, 14, 5, NULL), + (57, 14, 6, NULL), + (58, 14, 10, NULL), + (59, 14, 20, NULL), + (60, 14, 25, NULL), + (61, 14, 26, NULL), + (62, 15, 5, NULL), + (63, 15, 6, NULL), + (64, 15, 10, NULL), + (65, 15, 20, NULL), + (66, 15, 25, NULL), + (67, 15, 26, NULL), + (68, 15, 100, NULL), + (69, 16, 5, NULL), + (70, 16, 6, NULL), + (71, 16, 10, NULL), + (72, 16, 20, NULL), + (73, 16, 25, NULL), + (74, 16, 26, NULL), + (75, 16, 100, NULL), + (76, 20, 1, NULL), + (77, 20, 2, NULL), + (78, 20, 10, NULL), + (79, 20, 20, NULL), + (80, 21, 1, NULL), + (81, 21, 2, NULL), + (82, 21, 5, NULL), + (83, 21, 10, NULL), + (84, 21, 20, NULL), + (85, 48, 5, 'branch'), + (86, 48, 2, 'date'), + (87, 49, 5, 'branch'), + (88, 49, 1, 'fromDate'), + (89, 49, 2, 'toDate'), + (90, 50, 5, 'branch'), + (91, 50, 1, 'fromDate'), + (92, 50, 2, 'toDate'), + (93, 51, 1, NULL), + (94, 51, 2, NULL), + (95, 51, 5, NULL), + (96, 51, 10, NULL), + (97, 51, 25, NULL), + (98, 52, 5, NULL), + (99, 53, 5, NULL), + (100, 53, 10, NULL), + (101, 54, 1, NULL), + (102, 54, 2, NULL), + (103, 54, 5, NULL), + (104, 54, 10, NULL), + (105, 54, 25, NULL), + (106, 55, 5, NULL), + (107, 55, 6, NULL), + (108, 55, 10, NULL), + (109, 55, 20, NULL), + (110, 55, 25, NULL), + (111, 55, 26, NULL), + (112, 56, 5, NULL), + (113, 56, 6, NULL), + (114, 56, 10, NULL), + (115, 56, 20, NULL), + (116, 56, 25, NULL), + (117, 56, 26, NULL), + (118, 56, 100, NULL), + (119, 57, 5, NULL), + (120, 57, 6, NULL), + (121, 57, 10, NULL), + (122, 57, 20, NULL), + (123, 57, 25, NULL), + (124, 57, 26, NULL), + (125, 58, 5, NULL), + (126, 58, 6, NULL), + (127, 58, 10, NULL), + (128, 58, 20, NULL), + (129, 58, 25, NULL), + (130, 58, 26, NULL), + (131, 58, 100, NULL), + (132, 59, 1, NULL), + (133, 59, 2, NULL), + (134, 59, 5, NULL), + (135, 59, 6, NULL), + (136, 59, 10, NULL), + (137, 59, 20, NULL), + (138, 59, 25, NULL), + (139, 59, 26, NULL), + (140, 61, 5, NULL), + (141, 61, 10, NULL), + (142, 92, 1, 'fromDate'), + (143, 92, 5, 'selectOffice'), + (144, 92, 2, 'toDate'), + (145, 93, 1, NULL), + (146, 93, 2, NULL), + (147, 93, 5, NULL), + (148, 93, 6, NULL), + (149, 94, 2, 'endDate'), + (150, 94, 6, 'loanOfficerId'), + (151, 94, 5, 'officeId'), + (152, 94, 1, 'startDate'), + (256, 106, 2, NULL), + (257, 106, 6, NULL), + (258, 106, 5, NULL), + (259, 106, 1, NULL), + (263, 118, 1, 'fromDate'), + (264, 118, 2, 'toDate'), + (265, 118, 1004, 'accountNo'), + (266, 119, 1, 'fromDate'), + (267, 119, 2, 'toDate'), + (268, 119, 5, 'selectOffice'), + (269, 119, 1005, 'selectProduct'), + (270, 120, 5, 'branch'), + (271, 120, 6, 'loanOfficer'), + (272, 120, 10, 'currencyId'), + (273, 120, 20, 'fundId'), + (274, 120, 25, 'loanProductId'), + (275, 120, 26, 'loanPurposeId'), + (276, 121, 5, 'Branch'), + (277, 121, 6, 'loanOfficer'), + (278, 121, 10, 'CurrencyId'), + (279, 121, 20, 'fundId'), + (280, 121, 25, 'loanProductId'), + (281, 121, 26, 'loanPurposeId'), + (282, 121, 100, 'parType'), + (283, 122, 5, 'Branch'), + (284, 122, 6, 'loanOfficer'), + (285, 122, 10, 'CurrencyId'), + (286, 122, 20, 'fundId'), + (287, 122, 25, 'loanProductId'), + (288, 122, 26, 'loanPurposeId'), + (289, 122, 1, 'startDate'), + (290, 122, 2, 'endDate'), + (291, 123, 5, 'Branch'), + (292, 123, 6, 'Loan Officer'), + (293, 123, 10, 'CurrencyId'), + (294, 123, 20, 'fundId'), + (295, 123, 25, 'loanProductId'), + (296, 123, 26, 'loanPurposeId'), + (297, 123, 100, 'parType'), + (298, 124, 5, 'Branch'), + (299, 124, 6, 'Loan Officer'), + (300, 124, 10, 'CurrencyId'), + (301, 124, 20, 'fundId'), + (302, 124, 25, 'loanProductId'), + (303, 124, 26, 'loanPurposeId'), + (304, 125, 5, 'Branch'), + (305, 125, 6, 'Loan Officer'), + (306, 125, 10, 'CurrencyId'), + (307, 125, 20, 'fundId'), + (308, 125, 25, 'loanProductId'), + (309, 125, 26, 'loanPurposeId'), + (310, 125, 100, 'parType'), + (311, 126, 5, 'Branch'), + (312, 126, 6, 'Loan Officer'), + (313, 126, 10, 'CurrencyId'), + (314, 126, 20, 'fundId'), + (315, 126, 25, 'loanProductId'), + (316, 126, 26, 'loanPurposeId'), + (317, 127, 5, 'Branch'), + (318, 128, 5, 'Branch'), + (319, 128, 10, 'CurrencyId'), + (320, 129, 5, 'Branch'), + (321, 129, 10, 'CurrencyId'), + (322, 130, 5, 'selectOffice'), + (323, 131, 5, 'Branch'), + (324, 131, 6, 'Loan Officer'), + (325, 131, 10, 'CurrencyId'), + (326, 131, 20, 'fundId'), + (327, 131, 25, 'loanProductId'), + (328, 131, 26, 'loanPurposeId'), + (329, 132, 5, 'Branch'), + (330, 132, 6, 'Loan Officer'), + (331, 132, 1, 'startDate'), + (332, 132, 2, 'endDate'), + (333, 133, 5, 'Branch'), + (334, 133, 10, 'CurrencyId'), + (335, 133, 20, 'fundId'), + (336, 133, 1, 'startDate'), + (337, 133, 2, 'endDate'), + (338, 134, 10, 'CurrencyId'), + (339, 134, 20, 'fundId'), + (340, 134, 1, 'startDate'), + (341, 134, 2, 'endDate'), + (342, 135, 5, 'Branch'), + (343, 135, 6, 'Loan Officer'), + (344, 135, 10, 'CurrencyId'), + (345, 135, 20, 'fundId'), + (346, 135, 25, 'loanProductId'), + (347, 135, 26, 'loanPurposeId'), + (348, 136, 5, 'Branch'), + (349, 136, 6, 'Loan Officer'), + (350, 136, 10, 'CurrencyId'), + (351, 136, 20, 'fundId'), + (352, 136, 25, 'loanProductId'), + (353, 136, 26, 'loanPurposeId'), + (354, 137, 5, 'Branch'), + (355, 137, 6, 'Loan Officer'), + (356, 137, 10, 'CurrencyId'), + (357, 137, 20, 'fundId'), + (358, 137, 25, 'loanProductId'), + (359, 137, 26, 'loanPurposeId'), + (360, 138, 5, 'Branch'), + (361, 138, 6, 'Loan Officer'), + (362, 138, 10, 'CurrencyId'), + (363, 138, 20, 'fundId'), + (364, 138, 25, 'loanProductId'), + (365, 138, 26, 'loanPurposeId'), + (366, 139, 5, 'Branch'), + (367, 139, 6, 'Loan Officer'), + (368, 139, 10, 'CurrencyId'), + (369, 139, 20, 'fundId'), + (370, 139, 25, 'loanProductId'), + (371, 139, 26, 'loanPurposeId'), + (372, 139, 1, 'startDate'), + (373, 139, 2, 'endDate'), + (374, 139, 3, 'obligDateType'), + (375, 140, 5, 'Branch'), + (376, 140, 6, 'Loan Officer'), + (377, 140, 10, 'CurrencyId'), + (378, 140, 20, 'fundId'), + (379, 140, 25, 'loanProductId'), + (380, 140, 26, 'loanPurposeId'), + (381, 140, 1, 'Startdate'), + (382, 140, 2, 'Enddate'), + (383, 140, 3, 'obligDateType'), + (384, 141, 5, 'Branch'), + (385, 141, 6, 'Loan Officer'), + (386, 141, 10, 'CurrencyId'), + (387, 141, 20, 'fundId'), + (388, 141, 25, 'loanProductId'), + (389, 141, 26, 'loanPurposeId'), + (390, 141, 100, 'parType'), + (391, 142, 5, 'Branch'), + (392, 142, 6, 'loanOfficer'), + (393, 142, 10, 'CurrencyId'), + (394, 142, 20, 'fundId'), + (395, 142, 25, 'loanProductId'), + (396, 142, 26, 'loanPurposeId'), + (397, 142, 100, 'parType'), + (398, 143, 5, 'Branch'), + (399, 143, 10, 'CurrencyId'), + (400, 143, 25, 'loanProductId'), + (401, 143, 1, 'startDate'), + (402, 143, 2, 'endDate'), + (403, 144, 5, 'Branch'), + (404, 144, 6, 'Loan Officer'), + (405, 144, 1, 'startDate'), + (406, 144, 2, 'endDate'), + (407, 145, 5, 'Branch'), + (408, 145, 10, 'CurrencyId'), + (409, 145, 25, 'loanProductId'), + (410, 145, 1, 'startDate'), + (411, 145, 2, 'endDate'), + (412, 146, 1, 'startDate'), + (413, 146, 2, 'endDate'), + (414, 146, 1004, 'accountNo'), + (415, 147, 1, 'startDate'), + (416, 147, 2, 'endDate'), + (417, 147, 1004, 'selectLoan'), + (418, 149, 5, ''), + (419, 150, 5, ''), + (420, 151, 5, ''), + (421, 152, 5, ''), + (422, 153, 5, ''), + (423, 154, 5, ''), + (424, 155, 5, ''), + (425, 156, 5, ''), + (426, 157, 1006, 'transactionId'), + (427, 158, 1006, 'transactionId'), + (428, 159, 1007, 'centerId'), + (429, 160, 1008, 'account'), + (430, 160, 1, 'fromDate'), + (431, 160, 2, 'toDate'), + (432, 160, 5, 'branch'), + (433, 162, 5, 'branch'), + (434, 162, 1009, 'ondate'), + (435, 163, 5, 'branch'), + (436, 163, 1, 'fromDate'), + (437, 163, 2, 'toDate'), + (438, 164, 5, 'branch'), + (439, 164, 1, 'fromDate'), + (440, 164, 2, 'toDate'), + (441, 165, 1010, NULL), + (442, 165, 5, NULL), + (443, 166, 5, 'officeId'), + (444, 166, 6, 'loanOfficerId'), + (445, 167, 5, 'officeId'), + (446, 167, 6, 'loanOfficerId'), + (447, 168, 5, 'officeId'), + (448, 168, 6, 'loanOfficerId'), + (449, 168, 1011, 'cycleX'), + (450, 168, 1012, 'cycleY'), + (451, 169, 5, 'officeId'), + (452, 169, 6, 'loanOfficerId'), + (453, 169, 1013, 'fromX'), + (454, 169, 1014, 'toY'), + (455, 170, 5, 'officeId'), + (456, 170, 6, 'loanOfficerId'), + (457, 170, 1013, 'fromX'), + (458, 170, 1014, 'toY'), + (459, 171, 5, 'officeId'), + (460, 171, 6, 'loanOfficerId'), + (461, 172, 5, 'officeId'), + (462, 172, 6, 'loanOfficerId'), + (463, 173, 5, 'officeId'), + (464, 173, 6, 'loanOfficerId'), + (465, 173, 1013, 'fromX'), + (466, 173, 1014, 'toY'), + (467, 173, 1015, 'overdueX'), + (468, 173, 1016, 'overdueY'), + (469, 174, 5, 'officeId'), + (470, 174, 6, 'loanOfficerId'), + (471, 174, 1013, 'fromX'), + (472, 174, 1014, 'toY'), + (473, 175, 5, 'officeId'), + (474, 175, 6, 'loanOfficerId'), + (475, 175, 1013, 'fromX'), + (476, 175, 1014, 'toY'), + (477, 175, 1015, 'overdueX'), + (478, 175, 1016, 'overdueY'), + (479, 176, 5, 'officeId'), + (480, 176, 6, 'loanOfficerId'), + (481, 177, 5, 'officeId'), + (482, 177, 6, 'loanOfficerId'), + (483, 177, 1013, 'fromX'), + (484, 177, 1014, 'toY'), + (485, 178, 5, 'officeId'), + (486, 178, 6, 'loanOfficerId'), + (487, 178, 1013, 'fromX'), + (488, 178, 1014, 'toY'), + (489, 181, 5, 'officeId'), + (490, 180, 5, 'officeId'), + (491, 179, 5, 'officeId'), + (492, 181, 6, 'loanOfficerId'), + (493, 180, 6, 'loanOfficerId'), + (494, 179, 6, 'loanOfficerId'), + (495, 181, 1017, 'loanId'), + (496, 180, 1017, 'loanId'), + (497, 181, 1018, 'clientId'), + (498, 180, 1018, 'clientId'), + (499, 181, 1019, 'groupId'), + (500, 180, 1019, 'groupId'), + (501, 181, 1020, 'loanType'), + (502, 180, 1020, 'loanType'), + (503, 179, 1020, 'loanType'), + (504, 182, 5, 'officeId'), + (505, 183, 5, 'officeId'), + (506, 182, 6, 'loanOfficerId'), + (507, 183, 6, 'loanOfficerId'), + (508, 182, 1018, 'clientId'), + (509, 183, 1018, 'clientId'), + (510, 184, 5, 'officeId'), + (511, 184, 6, 'loanOfficerId'), + (512, 184, 1021, 'savingsId'), + (513, 185, 5, 'officeId'), + (514, 185, 6, 'loanOfficerId'), + (515, 185, 1021, 'savingsId'), + (516, 186, 5, 'officeId'), + (517, 186, 6, 'loanOfficerId'), + (518, 186, 1022, 'savingsTransactionId'), + (519, 187, 5, 'officeId'), + (520, 187, 6, 'loanOfficerId'), + (521, 187, 1022, 'savingsTransactionId'); /*!40000 ALTER TABLE `stretchy_report_parameter` ENABLE KEYS */; -- Dumping structure for table mifostenant-reference.x_registered_table DROP TABLE IF EXISTS `x_registered_table`; -CREATE TABLE IF NOT EXISTS `x_registered_table` ( - `registered_table_name` varchar(50) NOT NULL, - `application_table_name` varchar(50) NOT NULL, - `category` INT NOT NULL DEFAULT '100', - PRIMARY KEY (`registered_table_name`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `x_registered_table` +( + `registered_table_name` + varchar +( + 50 +) NOT NULL, + `application_table_name` varchar +( + 50 +) NOT NULL, + `category` INT NOT NULL DEFAULT '100', + PRIMARY KEY +( + `registered_table_name` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.x_registered_table: ~0 rows (approximately) /*!40000 ALTER TABLE `x_registered_table` DISABLE KEYS */; @@ -7026,13 +13467,30 @@ CREATE TABLE IF NOT EXISTS `x_registered_table` ( -- Dumping structure for table mifostenant-reference.x_table_column_code_mappings DROP TABLE IF EXISTS `x_table_column_code_mappings`; -CREATE TABLE IF NOT EXISTS `x_table_column_code_mappings` ( - `column_alias_name` varchar(50) NOT NULL, - `code_id` INT NOT NULL, - PRIMARY KEY (`column_alias_name`), - KEY `FK_x_code_id` (`code_id`), - CONSTRAINT `FK_x_code_id` FOREIGN KEY (`code_id`) REFERENCES `m_code` (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; +CREATE TABLE IF NOT EXISTS `x_table_column_code_mappings` +( + `column_alias_name` + varchar +( + 50 +) NOT NULL, + `code_id` INT NOT NULL, + PRIMARY KEY +( + `column_alias_name` +), + KEY `FK_x_code_id` +( + `code_id` +), + CONSTRAINT `FK_x_code_id` FOREIGN KEY +( + `code_id` +) REFERENCES `m_code` +( + `id` +) + ) ENGINE=InnoDB DEFAULT CHARSET=UTF8MB4; -- Dumping data for table mifostenant-reference.x_table_column_code_mappings: ~0 rows (approximately) /*!40000 ALTER TABLE `x_table_column_code_mappings` DISABLE KEYS */; diff --git a/fineract-provider/src/main/resources/sql/migrations/sample_data/tn03_interop_sample_data.sql b/fineract-provider/src/main/resources/sql/migrations/sample_data/tn03_interop_sample_data.sql index e69e2250b12..232f78eb6bb 100644 --- a/fineract-provider/src/main/resources/sql/migrations/sample_data/tn03_interop_sample_data.sql +++ b/fineract-provider/src/main/resources/sql/migrations/sample_data/tn03_interop_sample_data.sql @@ -19,40 +19,62 @@ -- To use: Change saving_account_no before every run! -USE `tn03`; +USE +`tn03`; -- data initialization -- user+roles -- client -SET @client_name = 'InteropCustomer'; -SET @saving_account_no = '9062b90de19b43989005'; -SET @saving_account_ext_id = '9062b90de19b43989005d9'; -SET @IBAN = 'IC11in02tn03' + @saving_account_ext_id; -SET @MSISDN = '27710203999'; +SET +@client_name = 'InteropCustomer'; +SET +@saving_account_no = '9062b90de19b43989005'; +SET +@saving_account_ext_id = '9062b90de19b43989005d9'; +SET +@IBAN = 'IC11in02tn03' + @saving_account_ext_id; +SET +@MSISDN = '27710203999'; -INSERT INTO `m_client` (`account_no`, `external_id`, `status_enum`, `sub_status`, `activation_date`, `office_joining_date`, - `office_id`, `transfer_to_office_id`, `staff_id`, `firstname`, `middlename`, `lastname`, `fullname`, - `display_name`, `mobile_no`, `gender_cv_id`, `date_of_birth`, `image_id`, `closure_reason_cv_id`, - `closedon_date`, `updated_by`, `updated_on`, `submittedon_date`, `submittedon_userid`, `activatedon_userid`, - `closedon_userid`, `default_savings_product`, `default_savings_account`, `client_type_cv_id`, `client_classification_cv_id`, - `reject_reason_cv_id`, `rejectedon_date`, `rejectedon_userid`, `withdraw_reason_cv_id`, `withdrawn_on_date`, - `withdraw_on_userid`, `reactivated_on_date`, `reactivated_on_userid`, `legal_form_enum`, `reopened_on_date`, +INSERT INTO `m_client` (`account_no`, `external_id`, `status_enum`, `sub_status`, `activation_date`, + `office_joining_date`, + `office_id`, `transfer_to_office_id`, `staff_id`, `firstname`, `middlename`, `lastname`, + `fullname`, + `display_name`, `mobile_no`, `gender_cv_id`, `date_of_birth`, `image_id`, + `closure_reason_cv_id`, + `closedon_date`, `updated_by`, `updated_on`, `submittedon_date`, `submittedon_userid`, + `activatedon_userid`, + `closedon_userid`, `default_savings_product`, `default_savings_account`, `client_type_cv_id`, + `client_classification_cv_id`, + `reject_reason_cv_id`, `rejectedon_date`, `rejectedon_userid`, `withdraw_reason_cv_id`, + `withdrawn_on_date`, + `withdraw_on_userid`, `reactivated_on_date`, `reactivated_on_userid`, `legal_form_enum`, + `reopened_on_date`, `reopened_by_userid`) VALUES (@saving_account_no, NULL, 300, NULL, ADDDATE(curdate(), -100), NULL, 1, NULL, NULL, NULL, NULL, NULL, - @client_name, @client_name, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ADDDATE(curdate(), -100), - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL); + @client_name, @client_name, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ADDDATE(curdate(), -100), + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -- saving product, account -SET @last_saving_prod_id = -1; -SELECT COALESCE(max(id), 1) from m_savings_product into @last_saving_prod_id; +SET +@last_saving_prod_id = -1; +SELECT COALESCE(max(id), 1) +from m_savings_product into @last_saving_prod_id; -SET @saving_prod_name = concat('Saving Product', @last_saving_prod_id); -SET @saving_prod_id = -1; -SELECT id FROM m_savings_product WHERE name = @saving_prod_name INTO @saving_prod_id; +SET +@saving_prod_name = concat('Saving Product', @last_saving_prod_id); +SET +@saving_prod_id = -1; +SELECT id +FROM m_savings_product +WHERE name = @saving_prod_name INTO @saving_prod_id; -SET @client_id = -1; -SELECT id FROM m_client WHERE fullname = @client_name INTO @client_id; +SET +@client_id = -1; +SELECT id +FROM m_client +WHERE fullname = @client_name INTO @client_id; INSERT INTO `m_savings_account` (`account_no`, `external_id`, `client_id`, `group_id`, `product_id`, `field_officer_id`, `status_enum`, @@ -63,25 +85,35 @@ INSERT INTO `m_savings_account` `interest_calculation_days_in_year_type_enum`, `min_required_opening_balance`, `withdrawal_fee_for_transfer`, `allow_overdraft`, `account_balance_derived`, `min_required_balance`, `enforce_min_required_balance`, `version`, `withhold_tax`) -VALUES (@saving_account_no, @saving_account_ext_id, @client_id, NULL, @saving_prod_id, NULL, 300, 0, 1, 100, ADDDATE(curdate(), -100), - NULL, ADDDATE(curdate(), -100), NULL, ADDDATE(curdate(), -100), NULL, 'TZS', 2, NULL, 1.000000, 1, 4, 1, -- 29. - 4 - 360, NULL, 1, 1, 100000000.000000, 0.000000, 1, 1, 0); +VALUES (@saving_account_no, @saving_account_ext_id, @client_id, NULL, @saving_prod_id, NULL, 300, 0, 1, 100, + ADDDATE(curdate(), -100), + NULL, ADDDATE(curdate(), -100), NULL, ADDDATE(curdate(), -100), NULL, 'TZS', 2, NULL, 1.000000, 1, 4, + 1, -- 29. - 4 + 360, NULL, 1, 1, 100000000.000000, 0.000000, 1, 1, 0); -- interop_identifier -SET @saving_acc_id = -1; -SELECT id FROM m_savings_account WHERE account_no = @saving_account_no INTO @saving_acc_id; +SET +@saving_acc_id = -1; +SELECT id +FROM m_savings_account +WHERE account_no = @saving_account_no INTO @saving_acc_id; -INSERT INTO interop_identifier (id, account_id, type, a_value, sub_value_or_type, created_by, created_on, modified_by, modified_on) +INSERT INTO interop_identifier (id, account_id, type, a_value, sub_value_or_type, created_by, created_on, modified_by, + modified_on) VALUES (NULL, @saving_acc_id, 'IBAN', @IBAN, NULL, 'operator', CURDATE(), 'operator', CURDATE()); -INSERT INTO interop_identifier (id, account_id, type, a_value, sub_value_or_type, created_by, created_on, modified_by, modified_on) +INSERT INTO interop_identifier (id, account_id, type, a_value, sub_value_or_type, created_by, created_on, modified_by, + modified_on) VALUES (NULL, @saving_acc_id, 'MSISDN', @MSISDN, NULL, 'operator', CURDATE(), 'operator', CURDATE()); -- charge, mapping -- gl_account, mappings -- ASSET-1, LIABILITY-2, EQUITY-3, INCOME-4, EXPENSE-5 -SET @charge_name = 'Interoperation Withdraw Fee'; +SET +@charge_name = 'Interoperation Withdraw Fee'; -INSERT INTO `m_savings_account_charge` (`savings_account_id`, `charge_id`, `is_penalty`, `charge_time_enum`, `charge_calculation_enum`, - `amount`, `amount_outstanding_derived`,`is_paid_derived`, `waived`, `is_active`) +INSERT INTO `m_savings_account_charge` (`savings_account_id`, `charge_id`, `is_penalty`, `charge_time_enum`, + `charge_calculation_enum`, + `amount`, `amount_outstanding_derived`, `is_paid_derived`, `waived`, + `is_active`) VALUES (@saving_acc_id, (SELECT id FROM m_charge WHERE name = @charge_name), 0, 5, 1, 1.000000, 0.000000, 0, 0, 1); diff --git a/fineract-provider/src/main/resources/sql/migrations/sample_data/tn04_interop_sample_data.sql b/fineract-provider/src/main/resources/sql/migrations/sample_data/tn04_interop_sample_data.sql index 6afa60a3a18..fbc4ffbe092 100644 --- a/fineract-provider/src/main/resources/sql/migrations/sample_data/tn04_interop_sample_data.sql +++ b/fineract-provider/src/main/resources/sql/migrations/sample_data/tn04_interop_sample_data.sql @@ -19,40 +19,62 @@ -- To use: Change saving_account_no before every run! -USE `tn04`; +USE +`tn04`; -- data initialization -- user+roles -- client -SET @client_name = 'InteropMerchant'; -SET @saving_account_no = 'a6b6c10b2aaa4778ac2f'; -SET @saving_account_ext_id = 'a6b6c10b2aaa4778ac2fc9'; -SET @IBAN = 'IC11in02tn04' + @saving_account_ext_id; -SET @MSISDN = '27710204999'; +SET +@client_name = 'InteropMerchant'; +SET +@saving_account_no = 'a6b6c10b2aaa4778ac2f'; +SET +@saving_account_ext_id = 'a6b6c10b2aaa4778ac2fc9'; +SET +@IBAN = 'IC11in02tn04' + @saving_account_ext_id; +SET +@MSISDN = '27710204999'; -INSERT INTO `m_client` (`account_no`, `external_id`, `status_enum`, `sub_status`, `activation_date`, `office_joining_date`, - `office_id`, `transfer_to_office_id`, `staff_id`, `firstname`, `middlename`, `lastname`, `fullname`, - `display_name`, `mobile_no`, `gender_cv_id`, `date_of_birth`, `image_id`, `closure_reason_cv_id`, - `closedon_date`, `updated_by`, `updated_on`, `submittedon_date`, `submittedon_userid`, `activatedon_userid`, - `closedon_userid`, `default_savings_product`, `default_savings_account`, `client_type_cv_id`, `client_classification_cv_id`, - `reject_reason_cv_id`, `rejectedon_date`, `rejectedon_userid`, `withdraw_reason_cv_id`, `withdrawn_on_date`, - `withdraw_on_userid`, `reactivated_on_date`, `reactivated_on_userid`, `legal_form_enum`, `reopened_on_date`, +INSERT INTO `m_client` (`account_no`, `external_id`, `status_enum`, `sub_status`, `activation_date`, + `office_joining_date`, + `office_id`, `transfer_to_office_id`, `staff_id`, `firstname`, `middlename`, `lastname`, + `fullname`, + `display_name`, `mobile_no`, `gender_cv_id`, `date_of_birth`, `image_id`, + `closure_reason_cv_id`, + `closedon_date`, `updated_by`, `updated_on`, `submittedon_date`, `submittedon_userid`, + `activatedon_userid`, + `closedon_userid`, `default_savings_product`, `default_savings_account`, `client_type_cv_id`, + `client_classification_cv_id`, + `reject_reason_cv_id`, `rejectedon_date`, `rejectedon_userid`, `withdraw_reason_cv_id`, + `withdrawn_on_date`, + `withdraw_on_userid`, `reactivated_on_date`, `reactivated_on_userid`, `legal_form_enum`, + `reopened_on_date`, `reopened_by_userid`) VALUES (@saving_account_no, NULL, 300, NULL, ADDDATE(curdate(), -100), NULL, 1, NULL, NULL, NULL, NULL, NULL, - @client_name, @client_name, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ADDDATE(curdate(), -100), - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL); + @client_name, @client_name, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, ADDDATE(curdate(), -100), + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -- saving product, account -SET @last_saving_prod_id = -1; -SELECT COALESCE(max(id), 1) from m_savings_product into @last_saving_prod_id; +SET +@last_saving_prod_id = -1; +SELECT COALESCE(max(id), 1) +from m_savings_product into @last_saving_prod_id; -SET @saving_prod_name = concat('Saving Product', @last_saving_prod_id); -SET @saving_prod_id = -1; -SELECT id FROM m_savings_product WHERE name = @saving_prod_name INTO @saving_prod_id; +SET +@saving_prod_name = concat('Saving Product', @last_saving_prod_id); +SET +@saving_prod_id = -1; +SELECT id +FROM m_savings_product +WHERE name = @saving_prod_name INTO @saving_prod_id; -SET @client_id = -1; -SELECT id FROM m_client WHERE fullname = @client_name INTO @client_id; +SET +@client_id = -1; +SELECT id +FROM m_client +WHERE fullname = @client_name INTO @client_id; INSERT INTO `m_savings_account` (`account_no`, `external_id`, `client_id`, `group_id`, `product_id`, `field_officer_id`, `status_enum`, @@ -63,25 +85,35 @@ INSERT INTO `m_savings_account` `interest_calculation_days_in_year_type_enum`, `min_required_opening_balance`, `withdrawal_fee_for_transfer`, `allow_overdraft`, `account_balance_derived`, `min_required_balance`, `enforce_min_required_balance`, `version`, `withhold_tax`) -VALUES (@saving_account_no, @saving_account_ext_id, @client_id, NULL, @saving_prod_id, NULL, 300, 0, 1, 100, ADDDATE(curdate(), -100), - NULL, ADDDATE(curdate(), -100), NULL, ADDDATE(curdate(), -100), NULL, 'TZS', 2, NULL, 1.000000, 1, 4, 1, -- 29. - 4 - 360, NULL, 1, 1, 100000000.000000, 0.000000, 1, 1, 0); +VALUES (@saving_account_no, @saving_account_ext_id, @client_id, NULL, @saving_prod_id, NULL, 300, 0, 1, 100, + ADDDATE(curdate(), -100), + NULL, ADDDATE(curdate(), -100), NULL, ADDDATE(curdate(), -100), NULL, 'TZS', 2, NULL, 1.000000, 1, 4, + 1, -- 29. - 4 + 360, NULL, 1, 1, 100000000.000000, 0.000000, 1, 1, 0); -- interop_identifier -SET @saving_acc_id = -1; -SELECT id FROM m_savings_account WHERE account_no = @saving_account_no INTO @saving_acc_id; +SET +@saving_acc_id = -1; +SELECT id +FROM m_savings_account +WHERE account_no = @saving_account_no INTO @saving_acc_id; -INSERT INTO interop_identifier (id, account_id, type, a_value, sub_value_or_type, created_by, created_on, modified_by, modified_on) +INSERT INTO interop_identifier (id, account_id, type, a_value, sub_value_or_type, created_by, created_on, modified_by, + modified_on) VALUES (NULL, @saving_acc_id, 'IBAN', @IBAN, NULL, 'operator', CURDATE(), 'operator', CURDATE()); -INSERT INTO interop_identifier (id, account_id, type, a_value, sub_value_or_type, created_by, created_on, modified_by, modified_on) +INSERT INTO interop_identifier (id, account_id, type, a_value, sub_value_or_type, created_by, created_on, modified_by, + modified_on) VALUES (NULL, @saving_acc_id, 'MSISDN', @MSISDN, NULL, 'operator', CURDATE(), 'operator', CURDATE()); -- charge, mapping -- gl_account, mappings -- ASSET-1, LIABILITY-2, EQUITY-3, INCOME-4, EXPENSE-5 -SET @charge_name = 'Interoperation Withdraw Fee'; +SET +@charge_name = 'Interoperation Withdraw Fee'; -INSERT INTO `m_savings_account_charge` (`savings_account_id`, `charge_id`, `is_penalty`, `charge_time_enum`, `charge_calculation_enum`, - `amount`, `amount_outstanding_derived`,`is_paid_derived`, `waived`, `is_active`) +INSERT INTO `m_savings_account_charge` (`savings_account_id`, `charge_id`, `is_penalty`, `charge_time_enum`, + `charge_calculation_enum`, + `amount`, `amount_outstanding_derived`, `is_paid_derived`, `waived`, + `is_active`) VALUES (@saving_acc_id, (SELECT id FROM m_charge WHERE name = @charge_name), 0, 5, 1, 1.000000, 0.000000, 0, 0, 1); 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 bbebbe7aa32..bcc7a45e025 100644 --- a/fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm +++ b/fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm @@ -1,13 +1,14 @@ - - - -Apache Fineract API Documentation - - + Apache Fineract API Documentation + + + -

-
- - -
-

Client

-
-
- - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
-   -
-
-

Apache Fineract API Documentation

-

Apache Fineract is a secure, multi-tenanted microfinance platform.

-

- The goal of the Apache Fineract API is to empower developers to build apps - on top of the Apache Fineract Platform. The reference app - (username: mifos, password: password) works on the same demo - 'tenant' as the interactive links in this documentation. -

-

- The API is organized around REST. -

-

- The API is designed to have:
- predictable, - resource-oriented URLs
- to use HTTP response codes to - indicate API errors
- to use built-in HTTP features, like - HTTP authentication and HTTP verbs, which can be understood by - off-the-shelf HTTP clients. -

-

- JSON is - returned in all responses from the API, including errors. -

-

- Much of the API presentation and design ideas are owed to the - excellent Apigee "Web API Design" eBook/PDF and the - very good Stripe - API reference. -

-
-
+
+
+
+ + +
+

Client

+
+
+ + + -
+
RESOURCES
-
+ + + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ - + - + -
POST
+
POST
+
create/complex - update
+
create/complex + update +
+
+
+
+ - + - + -
GET
+
GET
+
read
+
read
+
+
+
+ - + - + -
PUT
+
PUT
+
update
+
update
+
+
+
+ - + - + -
DELETE
+
DELETE
+
delete
+
delete
+
ClientclientsCreate a ClientList Clients
clients/{clientId}Retrieve a ClientUpdate a ClientDelete a Client
clients/{clientId}?command=activateActivate a Client
clients/{clientId}?command=closeClose a Client
clients/{clientId}?command=rejectReject a Client Application
clients/{clientId}?command=withdrawWithdraw a Client Application
clients/{clientId}?command=reactivateReactivate a Client
clients/{clientId}?command=UndoRejectionUndoReject a Client
clients/{clientId}?command=UndoWithdrawalUndoWithdrawal Client
clients/{clientId}?command=assignStaffAssign Staff
clients/{clientId}?command=unassignStaffUnassign Staff
clients/{clientId}?command=proposeTransferPropose a Client Transfer
clients/{clientId}?command=withdrawTransferWithdraw Client Transfer Proposal
clients/{clientId}?command=acceptTransferAccept Client Transfer
clients/{clientId}?command=rejectTransferReject Client Transfer
clients/{clientId}?command=updateSavingsAccountUpdate Default Savings Account
clients/{clientId}?command=proposeAndAcceptTransferPropose and Accept a Client Transfer
clients/{clientId}/accountsRetrieve client accounts overview
Client Addressclient/{clientId}/addressesCreate an address for a ClientList all Addresses for a ClientUpdate an address for a Client
Entity Field Configurationfieldconfiguration/{entity}List all configuration for a entity
Client Identifiersclients/{clientId}/identifiersCreate an Identifier for a ClientList all Identifiers for a Client
clients/{clientId}/identifiers/{identifierId}Retrieve a Client IdentifierUpdate a Client IdentifierDelete a Client Identifier
Client Imagesclients/{clientId}/imagesUpload an Image for a Client (as DATA URI)Get Client Image (DATA URI)Update Client Image (DATA URI)Delete Client Image
- Upload an Image for a Client (Multi-part form data) - Get Client Image (Binary file) - Update Client Image (Multi-part form data) -
Standing InstructionsstandinginstructionsCreate Standing InstructionList Standing Instructions
standinginstructions/{standingInstructionId}Retrieve a Standing InstructionUpdate Standing InstructionDelete Standing Instruction(status change)
standinginstructionrunhistoryStanding Instructions Run History
Account TransferaccounttransfersCreate Account TransferList Account Transfer
accounttransfers/{accountTransferId}Retrieve a Account Transfer
accounttransfers/templateRefundByTransferRetrieve Refund of an Active Loan by Transfer Template
accounttransfers/refundByTransferRefund an active loan by transfer
Client Chargeclients/{clientId}/chargesAdd Client ChargeList Client Charges
clients/{clientId}/charges/{clientChargeId}Retrieve a Client ChargeDelete a Client Charge
clients/{clientId}/charges/{clientChargeId}?command=payPay a Client Charge
clients/{clientId}/charges/{clientChargeId}?command=waiveWaive a Client Charge
Client Transactionsclients/{clientId}/transactionsList Client Transactions
clients/{clientId}/transactions/{transactionId}?command=undoUndo a Client TransactionRetrieve a Client Transaction
- - - - -
-

Savings

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
RESOURCES
-
- - - - - - -
POST
create/complex - update
- - - - - - -
GET
read
- - - - - - -
PUT
update
- - - - - - -
DELETE
delete
Savings AccountssavingsaccountsSubmit new savings applicationList savings application/accounts
savingsaccounts/{accountId}Retrieve a savings application/accountModify a savings applicationDelete a savings application
savingsaccounts/{accountId}?command=updateWithHoldTaxModify savings application withhold tax
savingsaccounts/{accountId}?command=approveApprove a savings application
savingsaccounts/{accountId}?command=undoApprovalUndo savings application approval
savingsaccounts/{accountId}?command=assignSavingsOfficerAssign Savings Officer
savingsaccounts/{accountId}?command=unassignSavingsOfficerUnassign Savings Officer
savingsaccounts/{accountId}?command=rejectReject a savings application
savingsaccounts/{accountId}?command=withdrawWithdraw savings application
savingsaccounts/{accountId}?command=activateActivate a savings account
savingsaccounts/{accountId}?command=closeClose a savings account
savingsaccounts/{accountId}?command=calculateInterestCalculate interest on a savings account
savingsaccounts/{accountId}?command=postInterestPost interest on a savings account
savingsaccounts/{accountId}?command=blockBlock savings account
savingsaccounts/{accountId}?command=unblockUnblock savings account
savingsaccounts/{accountId}?command=blockCreditBlock Savings Account Credit Transactions
savingsaccounts/{accountId}?command=unblockCreditUnblock Savings Account Credit Transactions
savingsaccounts/{accountId}?command=blockDebitBlock Savings Account Debit Transactions
savingsaccounts/{accountId}?command=unblockDebitUnblock Savings Account Debit Transactions
savingsaccounts/gsimSubmit a GSIMModify GSIM
savingsaccounts/gsimcommands/{gsimId}?command=approveApprove a GSIM
savingsaccounts/gsimcommands/{gsimId}?command=undoapprovalUndoapprove a GSIM
savingsaccounts/gsimcommands/{gsimId}?command=rejectReject a GSIM
savingsaccounts/gsimcommands/{gsimId}?command=withdrawnByApplicantWithdraw a GSIM
savingsaccounts/gsimcommands/{gsimId}?command=activateActivate a GSIM
savingsaccounts/gsimcommands/{gsimId}?command=closeClose a GSIM
Savings Transactionssavingsaccounts/{accountId}/transactions?command=depositMake a deposit
savingsaccounts/{savingsId}/transactions?command=gsimDepositMake a GSIM-Deposit
savingsaccounts/{accountId}/transactions?command=withdrawalMake a withdrawal
savingsaccounts/{accountId}/transactions/{transactionId}?command=undoUndo transaction
savingsaccounts/{accountId}/transactions/{transactionId}?command=modifyAdjust transaction
savingsaccounts/{accountId}/transactions/{transactionId}?command=holdAmountHold Amount
savingsaccounts/{accountId}/transactions/{transactionId}?command=releaseAmountRelease Amount
savingsaccounts/{accountId}/transactions/templateRetrieve savings account transaction template
savingsaccounts/{accountId}/transactions/{transactionId}Retrieve savings account transaction
Savings Account Chargessavingsaccounts/{accountId}/chargesAdd a Savings Account ChargeList Savings Account Charges
savingsaccounts/{accountId}/charges/{savingsAccountChargeId}Retrieve a Savings Account ChargeModify a Savings Account ChargeDelete a Savings Account Charge
savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=paychargePay a Savings Account Charge
savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=waiveWaive a Savings Account Charge
savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=inactivateInactivate a Savings Account Charge
Fixed Deposit AccountsfixeddepositaccountsSubmit new fixed deposit applicationList fixed deposit application/accounts
fixeddepositaccounts/{accountId}Retrieve a fixed deposit application/accountModify a fixed deposit applicationDelete a fixed deposit application
fixeddepositaccounts/{accountId}?command=approveApprove a fixed deposit application
fixeddepositaccounts/{accountId}?command=undoApprovalUndo fixed deposit application approval
fixeddepositaccounts/{accountId}?command=rejectReject a fixed deposit application
fixeddepositaccounts/{accountId}?command=withdrawWithdraw fixed deposit application
fixeddepositaccounts/{accountId}?command=activateActivate a fixed deposit account
fixeddepositaccounts/{accountId}?command=closeClose a fixed deposit account
fixeddepositaccounts/{accountId}?command=prematureClosePremature Close a fixed deposit account
fixeddepositaccounts/{accountId}?command=calculatePrematureAmountCalculate Premature amount on a fixed deposit account
fixeddepositaccounts/{accountId}?command=calculateInterestCalculate interest on a fixed deposit account
fixeddepositaccounts/{accountId}?command=postInterestPost interest on a fixed deposit account
Recurring Deposit AccountsrecurringdepositaccountsSubmit new recurring deposit applicationList recurring deposit application/accounts
recurringdepositaccounts/{accountId}Retrieve a recurring deposit application/accountModify a recurring deposit applicationDelete a recurring deposit application
recurringdepositaccounts/{accountId}?command=approveApprove a recurring deposit application
recurringdepositaccounts/{accountId}?command=undoApprovalUndo recurring deposit application approval
recurringdepositaccounts/{accountId}?command=rejectReject a recurring deposit application
recurringdepositaccounts/{accountId}?command=withdrawWithdraw recurring deposit application
recurringdepositaccounts/{accountId}?command=activateActivate a recurring deposit account
recurringdepositaccounts/{accountId}?command=updateDepositAmountUpdate recommended deposit amount
recurringdepositaccounts/{accountId}?command=closeClose a recurring deposit account
recurringdepositaccounts/{accountId}?command=prematureClosePremature Close a recurring deposit account
recurringdepositaccounts/{accountId}?command=calculatePrematureAmountCalculate Premature amount on a recurring deposit account
recurringdepositaccounts/{accountId}?command=calculateInterestCalculate interest on a recurring deposit account
recurringdepositaccounts/{accountId}?command=postInterestPost interest on a recurring deposit account
Recurring Deposit Transactionsrecurringdepositaccounts/{accountId}/transactions?command=depositMake a deposit
recurringdepositaccounts/{accountId}/transactions?command=withdrawalMake a withdrawal
recurringdepositaccounts/{accountId}/transactions/{transactionId}?command=undoUndo transaction
recurringdepositaccounts/{accountId}/transactions/{transactionId}?command=modifyAdjust transaction
recurringdepositaccounts/{accountId}/transactions/templateRetrieve Deposit account transaction template
recurringdepositaccounts/{accountId}/transactions/{transactionId}Retrieve Deposit account transaction
-
-
-
- -
-

Shares

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
RESOURCES
-
- - - - - - -
POST
create/complex - update
- - - - - - -
GET
read
- - - - - - -
PUT
update
- - - - - - -
DELETE
delete
Share AccountsshareaccountsSubmit new share applicationList share application/accounts
accounts/share/{accountId}Retrieve a share application/accountModify a share application
accounts/share/{accountId}?command=approveApprove a share application
accounts/share/{accountId}?command=undoApprovalUndo share application approval
accounts/share/{accountId}?command=rejectReject a share application
accounts/share/{accountId}?command=activateActivate a share account
accounts/share/{accountId}?command=closeClose a share account
accounts/share/{accountId}?command=applyadditionalsharesApply additional shares on a share account
accounts/share/{accountId}?command=approveadditionalsharesApprove additional shares request on a share account
accounts/share/{accountId}?command=rejectadditionalsharesReject additional shares request on a share account
accounts/share/{accountId}?command=redeemsharesRedeem shares on a share account
-
-
-
- -
-

Loan

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
RESOURCES
-
- - - - - - -
POST
create/complex - update
- - - - - - -
GET
read
- - - - - - -
PUT
update
- - - - - - -
DELETE
delete
Loansloans?calculateLoanScheduleCalculate Loan Repayment Schedule
loansSubmit a new Loan ApplicationList Loans/Loan Applications
loans/{loanId}Retrieve a LoanUpdate a LoanDelete a Loan Application
loans/{loanId}?command=approveApprove Loan Application
loans/{loanId}?command=undoApprovalUndo Loan Application Approval
loans/{loanId}?command=assignLoanOfficerAssign a Loan Officer
loans/{loanId}?command=unassignLoanOfficerUnassign a Loan Officer
loans/{loanId}?command=rejectReject Loan Application
loans/{loanId}?command=withdrawWithdraw Loan Application
loans/{loanId}?command=disburseDisburse Loan
loans/{loanId}?command=disburseToSavingsDisburse Loan To Savings Account
loans/{loanId}?command=undoDisbursalUndo Loan Application Disbursal
loans/{loanId}?command=recoverGuaranteesRecover From Guarantors
loansSubmit a GLIM
loans/glimAccount/{glimId}?command=approveApprove GLIM
loans/glimAccount/{glimId}?command=undoapprovalUndoapprove a GLIM
loans/glimAccount/{glimId}?command=rejectReject a GLIM
loans/glimAccount/{glimId}?command=disburseDisburse a GLIM
loans/glimAccount/{glimId}?command=undodisbursalUndoDisburse a GLIM
loans/glimAccount/{glimId}?command=glimrepaymentGLIM Repayment
loans/glimAccount/{glimId}Retrieve a GLIM
Loan Transactionsloans/{loanId}/transactions?command=repaymentEnter a repayment
loans/{loanId}/transactions?command=waiveInterestWaive Interest
loans/{loanId}/transactions?command=writeoffWrite-off Loan
loans/{loanId}/transactions?command=undowriteoffUndo Loan Write-off transaction
loans/{loanId}/transactions?command=prepayLoanLoan Pre-Closure transaction template
loans/{loanId}/transactions?command=recoverypaymentMake a Recovery Payment
loans/{loanId}/transactions/{transactionId}Retrieve a transactions details
loans/{loanId}/transactions/{transactionId}Adjust a Transaction
loans/{loanId}/transactions?command=refundByCashRefund an Active Loan by Cash
loans/{loanId}/transactions?command=foreclosureForeclose an Active Loan
Loan Chargesloans/{loanId}/chargesAdd a Loan Charge
loans/{loanId}/charges/{loanChargeId}Pay Loan Charge from Linked SavingsRetrieve a Loan ChargeModify a Loan ChargeDelete a Loan Charge
Loan Guarantorsloans/{loanId}/guarantorsCreate a Guarantor - List Guarantors -
loans/{loanId}/guarantors/{guarantorId}Retrieve a GuarantorUpdate a GuarantorDelete a Guarantor
Loan Collateralloans/{loanId}/collateralsCreate a Collateral - List collaterals -
loans/{loanId}/collaterals/{collateralId}Retrieve a CollateralUpdate a CollateralDelete a Collateral
Loan ReschedulingrescheduleloansCreate new loan reschedule request
rescheduleloans/{requestId}Retrieve a Loan Reschedule Request
rescheduleloans/{requestId}?command=previewLoanRescheduleRetrieve a Preview of The New Loan Repayment Schedule
rescheduleloans/{requestId}?command=rejectReject Loan Reschedule Request
rescheduleloans/{requestId}?command=approveApprove Loan Reschedule Request
Loan Term Variations/loans/{loanId}/schedule?command=calculateLoanScheduleCalculate Schedule with Loan Term Variations
/loans/{loanId}/schedule?command=addVariationsCreate Loan Term Variations
/loans/{loanId}/schedule?command=deleteVariationsRemove All Loan Term Variations
-
-
-
- -
-

Groups

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
RESOURCES
-
- - - - - - -
POST
create/complex - update
- - - - - - -
GET
read
- - - - - - -
PUT
update
- - - - - - -
DELETE
delete
GroupgroupsCreate a GroupList Groups
groups/templateRetrieve Group Template
groups/{groupId}Retrieve a GroupUpdate a GroupDelete a Group
groups/{groupId}?command=activateActivate a Group
groups/{groupId}?command=associateClientsAssociate Clients
groups/{groupId}?command=disassociateClientsDisassociate Clients
groups/{groupId}/accountsRetrieve Group accounts summary
groups/{groupId}?command=transferClientsBulk Transfer Clients across Groups
groups/{groupId}?command=generateCollectionSheetGenerate Collection Sheet
groups/{groupId}?command=saveCollectionSheetSave Collection Sheet
groups/{groupId}?command=unassignStaffUnassign Staff
groups/{groupId}?command=assignStaffAssign Staff
groups/{groupId}?command=closeClose Group
groups/{groupId}?command=assignRoleAssign Role
groups/{groupId}?command=unassignRoleUnassign Role
groups/{groupId}?command=updateRoleUpdate Role
groups/{groupId}/gsimaccountsList of GSIM Applications
groups/{groupId}/glimaccountsList of GLIM Applications
CentercentersCreate a CenterList Centers
centers/templateRetrieve Center Template
centers/{centerId}Retrieve a CenterUpdate a CenterDelete a Center
centers/{centerId}?command=activateActivate a Center
centers/{centerId}?command=closeClose Center
centers/{centerId}?command=associateGroupsAssociate Groups
centers/{centerId}?command=disassociateGroupsDisassociate Groups
centers/{centerId}/accountsRetrieve Center accounts summary
centers/{centerId}?command=generateCollectionSheetGenerate Collection Sheet
centers/{centerId}?command=saveCollectionSheetSave Collection Sheet
Collection Sheetcollectionsheet?command=generateCollectionSheetGenerate Collection Sheet
collectionsheet?command=saveCollectionSheetSave Collection Sheet
-
-
-
- -
-

Accounting

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
RESOURCES
-
- - - - - - -
POST
create/complex - update
- - - - - - -
GET
read
- - - - - - -
PUT
update
- - - - - - -
DELETE
delete
General Ledger AccountglaccountsCreate a New Ledger AccountList Ledger Accounts
glaccounts/{glaccountId}Retrieve a Ledger AccountUpdate a Ledger AccountDelete a Ledger Account
Accounting ClosureglclosuresCreate an Accounting ClosureList Accounting Closures
glclosures/{glclosureId}Retrieve an Accounting ClosureUpdate an Accounting ClosureDelete an Accounting Closure
Journal EntriesjournalentriesCreate Journal EntriesList Journal Entries
journalentries?command=updateRunningBalanceUpdate Running Balance for Journal Entries
journalentries/{entryId}Retrieve a single Entry
journalentries/{transactionId}/reversalReverse Journal Entries
Accounting RulesaccountingrulesCreate a Accounting RuleList Accounting Rules
accountingrules/{accountingruleId}Retrieve a Accounting RuleUpdate a Accounting RuleDelete a Accounting Rule
Mapping Financial Activities to AccountsfinancialactivityaccountsCreate Financial Activity to Account Mapping
List Financial Activities to Accounts Mappings
financialactivityaccounts/{financialActivityAccountId}Retrieve a Financial Activity to Account MappingUpdate a Financial Activity to Account MappingDelete a Financial Activity to Account Mapping
Periodic Accrual AccountingaccrualaccountingExecute Periodic Accrual Accounting
Provisioning EntriesprovisioningentriesCreate Provisioning Entry
List Provisioning Entries
provisioningentries/{entryId}Retrieve Provisioning EntryRecreates Provisionin EntryAdd Provisioning Journal Entries
-
-
-
-
-

Org

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
RESOURCES
-
- - - - - - -
POST
create/complex - update
- - - - - - -
GET
read
- - - - - - -
PUT
update
- - - - - - -
DELETE
delete
OfficeofficesCreate an OfficeList Offices
offices/{officeId}Retrieve an OfficeUpdate an Office
Loan ProductloanproductsCreate a Loan - ProductList Loan Products
loanproducts/{productId}Retrieve a Loan - ProductUpdate a Loan - Product
Savings ProductsavingsproductsCreate a Savings productList Savings products
savingsproducts/{productId}Retrieve a savings productUpdate a savings productDelete a savings product
Fixed Deposit ProductfixeddepositproductsCreate a Fixed Deposit productList Fixed Deposit products
fixeddepositproducts/{productId}Retrieve a Fixed Deposit productUpdate a Fixed Deposit productDelete a Fixed Deposit product
Recurring Deposit ProductrecurringdepositproductsCreate a Recurring Deposit productList Recurring Deposit products
recurringdepositproducts/{productId}Retrieve a Recurring Deposit productUpdate a Recurring Deposit productDelete a Recurring Deposit product
Share ProductshareproductsCreate a Share productList Share products
shareproducts/{productId}Retrieve a Share productUpdate a Share product
SMS CampaignssmscampaignsCreate a SMS CampaignList SMS Campaigns
smscampaigns/{campaignId}Retrieve a SMS CampaignUpdate a SMS CampaignDelete a SMS Campaign
smscampaigns/{campaignId}command=activateActivate a SMS Campaign
smscampaigns/{campaignId}command=closeClose a SMS Campaign
smscampaigns/{campaignId}command=reactivateReactivate a SMS Campaign
Entity-Datatable ChecksentityDatatableChecksCreate an Entity-Datatable Check
entityDatatableChecks?limit=15&offset=0List Entity-Datatable Checks
entityDatatableChecks/templateRetrieves an Entity-Datatable Check template
entityDatatableChecks/{entityDatatableCheckId}Delete an Entity-Datatable Check
CurrencycurrenciesRetrieve - Currency ConfigurationUpdate Currency - Configuration
FundsfundsCreate a FundList Funds
funds/{fundId}Retrieve a FundUpdate a Fund
StaffstaffCreate a Staff MemberList Staff
staff/{staffId}Retrieve a Staff MemberUpdate a Staff Member
Staff Imagesstaff/{staffId}/imagesUpload an Image for a Staff Member (as DATA URI)Get Staff Image (DATA URI)Update Staff Image (DATA URI)Delete Staff Image
- Upload an Image for a Staff Member (Multi-part form data) - Get Staff Image (Binary file) - Update Staff Image (Multi-part form data) -
ChargeschargesCreate a ChargeList Charges
charges/{chargeId}Retrieve a ChargeUpdate a ChargeDelete a Charge
Loan Product Mixloanproducts?associations=productMixesList Loan Products Mix
loanproducts/{productId}/productmixCreate a Loan Product MixRetrieve Loan Products MixUpdate Loan Product MixDelete Loan Products Mix
HolidaysholidaysCreate a HolidayList Holidays
holidays/{holidayId}Retrieve a HolidayUpdate a HolidayDelete a Holiday
holidays/{holidayId}?command=activateActivate a Holiday
Working daysworkingdaysList workingdaysWorking days template
workingdays/{workingdaysId}Update a workingdays
User Generated DocumentstemplatesCreate a UGDList UGDs
templates/{templateId}Retrieve a UGDUpdate a UGDDelete a UGD
Interest Rate ChartschartsCreate a ChartList Charts
interestratecharts/{chartId}Retrieve a ChartUpdate a ChartDelete a Chart
Interest Rate SlabsslabsCreate a SlabList Slabs
interestrateslabs/{slabId}Retrieve a SlabUpdate a SlabDelete a Slab
Teller Cash ManagementtellersCreate TellerList Tellers
tellers/{tellerId}Find TellerUpdate TellerDelete Teller
tellers/{tellerId}/cashiersCreate CashierRetrieve Cashier
tellers/{tellerId}/cashiers/{cashierId}Find CashierUpdate CashierDelete Cashier
tellers/{tellerId}/cashiers/templateRetrieve Cashier Template
tellers/{tellerId}/cashiers/{cashierId}/allocateAllocate Cash To Cashier
tellers/{tellerId}/cashiers/{cashierId}/settleSettle Cash From Cashier
tellers/{tellerId}/cashiers/{cashierId}/transactionsRetrieve Cashier Transactions
tellers/{tellerId}/cashiers/{cashierId}/summaryandtransactionsRetrieve Cashier Transactions With Summary
tellers/{tellerId}/cashiers/{cashierId}/transactions/templateRetrieve Cashier Transaction Template
Payment TypepaymenttypesCreate Payment TypeList Payment Types
paymenttypes/{paymentTypeId}Retrieve Payment TypeUpdate Payment TypeDelete Payment Type
Provisioning CriteriaprovisioningcriteriaCreate Provisioning CriteriaList Provisioning Criteria
provisioningcriteria/{criteriaId}Retrieve Provisioning CriteriaUpdate Provisioning CriteriaDelete Provisioning Criteria
Floating RatesfloatingratesCreate Floating RateList Floating Rates
floatingrates/{floatingRateId}Retrieve Floating RateUpdate Floating Rate
Tax Componenttaxes/componentCreate Tax ComponentList Tax Components
taxes/component/{taxComponentId}Retrieve Tax componentUpdate Tax Component
Tax Grouptaxes/groupCreate Tax GroupList Tax Groups
taxes/group/{taxGroupId}Retrieve Tax GroupUpdate Tax Group
RatesratesCreate RateList Rates
rates/{rateId}Retrieve RateUpdate Rate
-
-
-
-
-

User

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
RESOURCES
-
- - - - - - -
POST
create/complex - update
- - - - - - -
GET
read
- - - - - - -
PUT
update
- - - - - - -
DELETE
delete
Authentication HTTP BasicauthenticationVerify Authentication
Authentication Oauth2authenticated userFetch Authenticated user details
Two-Factor AuthenticationtwofactorRequest OTPList OTP delivery methods
twofactor/validateValidate OTP
twofactor/invalidateInvalidate Access Token
UserusersCreate a UserList Users
users/{userId}Retrieve a UserUpdate a UserDelete a User
RolerolesCreate a New RoleList Roles
roles/{roleId}Retrieve a RoleUpdate a RoleDelete Role
roles/{roleId}/permissionsRetrieve a - Role's PermissionsUpdate a Role's - Permissions
roles/{roleId}?command=enableEnable Role
roles/{roleId}?command=disableDisable Role
PermissionpermissionsList Application PermissionsEnable/Disable Permissions for Maker Checker
Password preferencespasswordpreferencesGet Password PreferencesUpdate Password Preferences
-
-
-
-
-

System

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
RESOURCES
-
- - - - - - -
POST
create/complex - update
- - - - - - -
GET
read
- - - - - - -
PUT
update
- - - - - - -
DELETE
delete
Global ConfigurationconfigurationsList - Global Configuration
Global Configurationconfigurations/{configId}Retrieve - a Global ConfigurationUpdate - Global Configuration
HookshooksCreate a HookList Hooks
hooks/{hookId}Retrieve a HookUpdate a HookDelete a Hook
Account number formataccountnumberformatsCreate an Account number formatList Account number formats
accountnumberformats/{accountnumberformatId}Retrieve an Account number formatUpdate an Account number formatDelete an Account number format
CodescodesCreate a CodeList Codes
codes/{codeId}Retrieve a CodeUpdate a CodeDelete a Code
Code Valuescodes/{codeId}/codevaluesCreate a Code ValueList Code Values
codes/{codeId}/codevalues/{codevalueId}Retrieve a Code ValueUpdate a Code ValueDelete a Code Value
AuditsauditsList Audits
audits/{auditId}Retrieve an Audit Entry
MakercheckersmakercheckersList Maker Checker Entries
makercheckers/{auditId}Delete Maker Checker Entry
makercheckers/{auditId}?command=approveApprove Maker Checker Entry
Scheduler jobsjobsList Scheduler jobs
jobs/{jobId}Retrieve a jobUpdate a job
jobs/{jobId}?command=executeJobRun a job
jobs/{jobid}/runhistoryRetrieve job history
schedulerRetrieve scheduler status
scheduler?command=startActivate a scheduler service
scheduler?command=stopSuspend a scheduler service
External Servicesexternalservice/{servicename}Retrieve - a external service configurationUpdate - external service Configuration
Credit Bureau ConfigurationCreditBureauConfigurationList - all Integrated Credit-Bureau
CreditBureauConfiguration/configuration/{creditBureauId}Create - Configuration
CreditBureauConfiguration/config/{organisationCreditBureauId}Get - Configuration
CreditBureauConfiguration/configuration/{configurationId}Update - Configuration
CreditBureauConfiguration/organisationCreditBureau/{organisationCreditBureauId}Create Organisation-Credit-Bureau
CreditBureauConfiguration/organisationCreditBureauGet Organisation-Credit-BureauUpdate Organisation-Credit-Bureau
CreditBureauConfiguration/mappings/{CreditBureauId}Create CreditBureau-LoanProduct Mapping
CreditBureauConfiguration/mappingsGet all MappingsUpdate - Mappings
ThitsaWorks CreditBureau IntegrationcreditBureauIntegration/creditReportFetch ThitsaWorks CreditReport
creditBureauIntegration/creditReport/{creditBureauId}Get Credit-Report Information
Two-Factor Configurationtwofactor/configureRetrieve - Two-Factor ConfigurationUpdate - Two-Factor Configuration
-
-
-
-
-

Non-Core

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
RESOURCES
-
- - - - - - -
POST
create/complex - update
- - - - - - -
GET
read
- - - - - - -
PUT
update
- - - - - - -
DELETE
delete
Data TabledatatablesCreate Data TableList Data Tables
datatables/{datatable}Retrieve Data Table DetailsUpdate Data TableDelete Data Table
datatables/register/{datatable}/{apptable}Register Data Table
datatables/deregister/{datatable}Deregister Data - Table
datatables/{datatable}/{apptableId}Create Entry in Data - TableRetrieve Entry(s) - from Data TableUpdate Entry in Data - Table (One to One)Delete Entry(s) in - Data Table
datatables/{datatable}/{apptableId}/{datatableId}Update Entry in - Data Table (One to Many)Delete Entry in - Data Table (One to Many)
Notes{resource}/{resourceId}/notesAdd a Resource NoteRetrieve a Resource's Notes
{resource}/{resourceId}/notes/{noteId}List All - Notes for a ResourceUpdate a Resource NoteDelete a Resource Note
Documents{entityType}/{entityId}/documentsCreate a DocumentList All Document Details
{entityType}/{entityId}/documents/{documentId}Retrieve a Documents DetailsUpdate a DocumentDelete a Document
{entityType}/{entityId}/documents/{documentId}/attachmentRetrieve - binary file associated with a - Document -
SearchsearchSearch Resources
AdHoc Searchsearch/advanceAdvance Search
Surveysurvey/List surveys
survey/{surveyName}Retrieve Survey details
survey/{surveyName}/{clientId}Create Entry in the survey table
-
-
-
-
-

Report

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
RESOURCES
-
- - - - - - -
POST
create/complex - update
- - - - - - -
GET
read
- - - - - - -
PUT
update
- - - - - - -
DELETE
delete
ReportreportsCreate a ReportList Reports
reports/{id}Retrieve a ReportUpdate a ReportDelete a Report
Run Reportrunreports/{reportName}Run a Report
Report Mailing JobreportmailingjobCreate a Report Mailing JobList Reports Mailing Jobs
reportmailingjob/{id}Retrieve a Report Mailing JobUpdate a Report Mailing JobDelete a Report Mailing Job
reportmailingjobrunhistory/{jobId}Retrieve Reports Mailing Job History
-
-
-
-
-

Template

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
RESOURCES
-
- - - - - - -
GET
read
clients/templateRetrieve Client Template
groups/templateRetrieve Group Template
loanproducts/templateRetrieve Loan Product Template
loanproducts/template?isProductMixTemplate=trueRetrieve Loan Product Mix Template
loans/template?clientId={clientId}Retrieve Loan Template
loans/{loanId}/transactions/templateRetrieve Loan Transaction Template
charges/templateRetrieve Charge Template
offices/templateRetrieve Office Template
users/templateRetrieve User Template
hooks/templateRetrieve Hooks Template
audits/searchtemplateRetrieve Audit Search Template
makercheckers/searchtemplateRetrieve Maker Checker Search Template
reports/templateRetrieve Report Template
accountingrules/templateRetrieve Accounting Rule Template
savingproducts/templateRetrieve Savings Product Template
savingsaccounts/template?clientId={clientId}Retrieve savings template
savingsaccounts/{accountId}/transactions/templateRetrieve savings account transaction template
standinginstructions/templateRetrieve Standing Instruction Template
accounttransfers/templateRetrieve Account Transfer Template
-
-
-
- - -
-

SPM

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
RESOURCES
-
- - - - - - -
POST
create/complex - update
- - - - - - -
GET
read
- - - - - - -
PUT
update
- - - - - - -
DELETE
delete
SurveysurveysCreate a SurveyList Surveys
surveys/{id}Retrieve a SurveyDeactivate a Survey
Lookup Tablesurveys/{id}/lookuptablesCreate a Lookup Table entryList Lookup Table entries
surveys/{id}/lookuptables/{id}Retrieve an Entry
Scorecardsurveys/{id}/scorecardsCreate a Scorecard entryList Scorecard entries
-
-
-
- - -
-

Self Service

-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
RESOURCES
-
- - - - - - -
POST
create/complex - update
- - - - - - -
GET
read
- - - - - - -
PUT
update
- - - - - - -
DELETE
delete
Authentication HTTP Basicself/authenticationVerify Authentication
Authentication Oauth2self/userdetailsFetch Authenticated User Details
Update Userself/userUpdate User
Clientsself/clientsList Clients
self/clients/{clientId}Retrieve Client
self/clients/{clientId}/accountsRetrieve Client Accounts Overview
self/clients/{clientId}/imagesRetrieve Client Image
self/clients/{clientId}/chargesList Client Charges
self/clients/{clientId}/charges/{chargeId}Retrieve a Client Charge
self/clients/{clientId}/transactionsList Client Transactions
self/clients/{clientId}/transactions/{transactionId}Retrieve a Client Transaction
self/clients/{clientId}/imagesUpload client image (Data URI)
self/clients/{clientId}/imagesUpload client image (Multi-part Form data)
self/clients/{clientId}/imagesDelete client image
Loan Productself/loanproducts?clientId={clientId}List Loan Products
self/loanproducts/{productId}?clientId={clientId}Retrieve a Loan - Product
Savings Productself/savingsproducts?clientId={clientId}List Savings products
self/savingsproducts/{productId}?clientId={clientId}Retrieve a savings product
Share Productself/shareproducts?clientId={clientId}List Share products
self/shareproducts/{productId}?clientId={clientId}Retrieve a share product
Loansself/loans/template?templateType=individualLoan Application Template
self/loans?command=calculateLoanScheduleCalculate Loan Repayment Schedule
self/loansSubmit new Loan Application
self/loans/{loanId}Retrieve a LoanUpdate a Loan Application
self/loans/{loanId}?command=withdrawnByApplicantWithdraw Loan Application
self/loans/{loanId}/transactions/{transactionId}Retrieve a Loan Transaction Details
self/loans/{loanId}/chargesRetrieve Loan Charges
self/loans/{loanId}/charges/{chargeId}Retrieve a Loan Charge Details
Savingsself/savingsaccounts/template?clientId={clientId}&productId={productId}Retrieve Savings Application Template
self/savingsaccountsSubmit new Savings Application
self/savingsaccounts/{accountId}Retrieve a Savings AccountUpdate Savings Account
self/savingsaccounts/{accountId}/transactions/{transactionId}Retrieve a Savings Transaction Details
self/savingsaccounts/{accountId}/chargesRetrieve Savings Charges
self/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}Retrieve a Savings Charge Details
Share Accountsself/shareaccounts/template?clientId=?productId=?Share Accounts Template
self/shareaccountsSubmit New Share Application
self/shareaccounts/{accountId}Retrieve a Share Application/Account
Own Account Transfersself/accounttransfers/templateAccount Transfer Template
self/accounttransfersAccount Transfer
Beneficiary for Third Party Transfer/self/beneficiaries/tpt/templateBeneficiary TPT Template
/self/beneficiaries/tptAdd TPT BeneficiaryGet TPT Beneficiary ListUpdate TPT BeneficiaryDelete TPT Beneficiary
Third Party Account Transfersself/accounttransfers/template?type="tpt"Third Party Account Transfer Template
self/accounttransfers?type="tpt"Third Party Account Transfer
Guarantor and Obligee detailsself/loans/{loanId}/guarantorsGuarantors list
self/clients/{clientId}/obligeedetailsObligee list
Run Reportself/runreports/{reportName}Run a Report
Surveysself/surveys?isActive=trueRetrieve Active Surveys
self/surveys/scorecards/{surveyId}Take Survey
self/surveys/scorecards/clients/{clientId}Survey Scorecards
Link/Delink accounts to pocketself/pockets?command=linkAccountsLink accounts to pocket
self/pockets?command=delinkAccountsDelink accounts from pocket
self/pocketsRetrieve accounts linked to pocket
-
-
-
+
+
ClientclientsCreate a ClientList Clients
clients/{clientId}Retrieve a ClientUpdate a ClientDelete a Client
clients/{clientId}?command=activateActivate a Client
clients/{clientId}?command=closeClose a Client
clients/{clientId}?command=rejectReject a Client Application
clients/{clientId}?command=withdrawWithdraw a Client Application
clients/{clientId}?command=reactivateReactivate a Client
clients/{clientId}?command=UndoRejectionUndoReject a Client
clients/{clientId}?command=UndoWithdrawalUndoWithdrawal Client
clients/{clientId}?command=assignStaffAssign Staff
clients/{clientId}?command=unassignStaffUnassign Staff
clients/{clientId}?command=proposeTransferPropose a Client Transfer
clients/{clientId}?command=withdrawTransferWithdraw Client Transfer Proposal
clients/{clientId}?command=acceptTransferAccept Client Transfer
clients/{clientId}?command=rejectTransferReject Client Transfer
clients/{clientId}?command=updateSavingsAccountUpdate Default Savings Account
clients/{clientId}?command=proposeAndAcceptTransferPropose and Accept a Client Transfer +
clients/{clientId}/accountsRetrieve client accounts overview
Client Addressclient/{clientId}/addressesCreate an address for a ClientList all Addresses for a ClientUpdate an address for a Client
Entity Field Configurationfieldconfiguration/{entity}List all configuration for a entity
Client Identifiersclients/{clientId}/identifiersCreate an Identifier for a ClientList all Identifiers for a Client
clients/{clientId}/identifiers/{identifierId}Retrieve a Client IdentifierUpdate a Client IdentifierDelete a Client Identifier
Client Imagesclients/{clientId}/imagesUpload an Image for a Client (as DATA URI)Get Client Image (DATA URI)Update Client Image (DATA URI)Delete Client Image
+ Upload an Image for a Client (Multi-part form data) + Get Client Image (Binary file) + Update Client Image (Multi-part form data) +
Standing InstructionsstandinginstructionsCreate Standing InstructionList Standing Instructions
standinginstructions/{standingInstructionId}Retrieve a Standing InstructionUpdate Standing InstructionDelete Standing Instruction(status change) +
standinginstructionrunhistoryStanding Instructions Run History
Account TransferaccounttransfersCreate Account TransferList Account Transfer
accounttransfers/{accountTransferId}Retrieve a Account Transfer
accounttransfers/templateRefundByTransferRetrieve Refund of an + Active Loan by Transfer Template
accounttransfers/refundByTransferRefund an active loan by transfer +
Client Chargeclients/{clientId}/chargesAdd Client ChargeList Client Charges
clients/{clientId}/charges/{clientChargeId}Retrieve a Client ChargeDelete a Client Charge
clients/{clientId}/charges/{clientChargeId}?command=payPay a Client Charge
clients/{clientId}/charges/{clientChargeId}?command=waiveWaive a Client Charge
Client Transactionsclients/{clientId}/transactionsList Client Transactions
clients/{clientId}/transactions/{transactionId}?command=undoUndo a Client TransactionRetrieve a Client Transaction
+
+
+
-   -
-
-

Try The API From Your Browser

-

GET (read) examples can be run directly from this - documentation. It is just a matter of clicking a link. Most - browsers display the output on the same page (or another tab if - you right click and select that option). Internet Explorer will - probably treat the output as if you wanted to download a file. In - that case just elect to open the output in a text editor.

-

- If you want to check out the POST, PUT and DELETE (update) - examples a good approach is to take a moment to install a REST - plugin for your browser e.g. RESTClient for FireFox -

- The REST plugins will allow you to: -
    -
  • Select the "Verb" (e.g. POST)
  • -
  • Enter the resource name (e.g. offices)
  • -
  • Add a header to indicate you are sending - JSON data as part of the request body (Content-Type: - application/json)
  • -
  • Add a header to indicate your 'tenant' - (X-Mifos-Platform-TenantId: default)
  • -
  • Paste the example JSON into a Request Body
  • -
  • Send the Request (and receive a Response)
  • -
-
-
- -   -
-
-

Generic Options

-

Convenience Templates

-

There are a list of convenience resources (see Template - menu option). These resources end with "/template" and can be - useful when building maintenance user interface screens for client - applications. The template data returned may consist of any or all - of: -

    -
  • Field Defaults
  • -
  • Allowed Value Lists
  • -
-

-

- Also, many "Retrieve a" type resources (Retrieve a Client for example) allow - the parameter option "template=true". This appends any "Allowed - Value Lists" which can be useful when building update - functionality. -

- -

Restrict Returned Fields

-

Parameter "fields={fieldlist}" can be used on GET requests - to restrict the fields returned.

-

Normal Request:

-
offices/1
-

-

Request (restricting fields returned):

-
offices/1?fields=id,name
-

-

Pretty JSON Formatting

-

Parameter "pretty=true" can be used to display JSON from GET - requests in an easy-to-read format. This parameter is used in this - documentation.

-

Easy-to-read JSON output for POSTs, PUTs and DELETEs will - available in the REST plugin you use e.g. RESTClient for FireFox

-

Normal Request (with pretty printing/formatting):

-
offices/1?pretty=true
-

-
+
+

Savings

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
RESOURCES
+
+
+ + + + + + + +
+
POST
+
+
create/complex + update +
+
+
+ + + + + + + +
+
GET
+
+
read
+
+
+ + + + + + + +
+
PUT
+
+
update
+
+
+ + + + + + + +
+
DELETE
+
+
delete
+
+
Savings AccountssavingsaccountsSubmit new savings applicationList savings application/accounts
savingsaccounts/{accountId}Retrieve a savings application/accountModify a savings applicationDelete a savings application
savingsaccounts/{accountId}?command=updateWithHoldTaxModify savings application withhold tax +
savingsaccounts/{accountId}?command=approveApprove a savings application
savingsaccounts/{accountId}?command=undoApprovalUndo savings application approval
savingsaccounts/{accountId}?command=assignSavingsOfficerAssign Savings Officer
savingsaccounts/{accountId}?command=unassignSavingsOfficerUnassign Savings Officer
savingsaccounts/{accountId}?command=rejectReject a savings application
savingsaccounts/{accountId}?command=withdrawWithdraw savings application
savingsaccounts/{accountId}?command=activateActivate a savings account
savingsaccounts/{accountId}?command=closeClose a savings account
savingsaccounts/{accountId}?command=calculateInterestCalculate interest on a savings + account
savingsaccounts/{accountId}?command=postInterestPost interest on a savings account
savingsaccounts/{accountId}?command=blockBlock savings account
savingsaccounts/{accountId}?command=unblockUnblock savings account
savingsaccounts/{accountId}?command=blockCreditBlock Savings Account Credit Transactions +
savingsaccounts/{accountId}?command=unblockCreditUnblock Savings Account Credit + Transactions
savingsaccounts/{accountId}?command=blockDebitBlock Savings Account Debit Transactions
savingsaccounts/{accountId}?command=unblockDebitUnblock Savings Account Debit Transactions +
savingsaccounts/gsimSubmit a GSIMModify GSIM
savingsaccounts/gsimcommands/{gsimId}?command=approveApprove a GSIM
savingsaccounts/gsimcommands/{gsimId}?command=undoapprovalUndoapprove a GSIM
savingsaccounts/gsimcommands/{gsimId}?command=rejectReject a GSIM
savingsaccounts/gsimcommands/{gsimId}?command=withdrawnByApplicantWithdraw a GSIM
savingsaccounts/gsimcommands/{gsimId}?command=activateActivate a GSIM
savingsaccounts/gsimcommands/{gsimId}?command=closeClose a GSIM
Savings Transactionssavingsaccounts/{accountId}/transactions?command=depositMake a deposit
savingsaccounts/{savingsId}/transactions?command=gsimDepositMake a GSIM-Deposit
savingsaccounts/{accountId}/transactions?command=withdrawalMake a withdrawal
savingsaccounts/{accountId}/transactions/{transactionId}?command=undoUndo transaction
savingsaccounts/{accountId}/transactions/{transactionId}?command=modifyAdjust transaction
savingsaccounts/{accountId}/transactions/{transactionId}?command=holdAmountHold Amount
savingsaccounts/{accountId}/transactions/{transactionId}?command=releaseAmountRelease Amount
savingsaccounts/{accountId}/transactions/templateRetrieve savings account transaction + template
savingsaccounts/{accountId}/transactions/{transactionId}Retrieve savings account transaction
Savings Account Chargessavingsaccounts/{accountId}/chargesAdd a Savings Account ChargeList Savings Account Charges
savingsaccounts/{accountId}/charges/{savingsAccountChargeId}Retrieve a Savings Account ChargeModify a Savings Account ChargeDelete a Savings Account Charge
savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=paychargePay a Savings Account Charge
savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=waiveWaive a Savings Account Charge
savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=inactivateInactivate a Savings Account Charge
Fixed Deposit AccountsfixeddepositaccountsSubmit new fixed deposit applicationList fixed deposit application/accounts
fixeddepositaccounts/{accountId}Retrieve a fixed deposit application/accountModify a fixed deposit applicationDelete a fixed deposit application
fixeddepositaccounts/{accountId}?command=approveApprove a fixed deposit application
fixeddepositaccounts/{accountId}?command=undoApprovalUndo fixed deposit application approval
fixeddepositaccounts/{accountId}?command=rejectReject a fixed deposit application
fixeddepositaccounts/{accountId}?command=withdrawWithdraw fixed deposit application
fixeddepositaccounts/{accountId}?command=activateActivate a fixed deposit account
fixeddepositaccounts/{accountId}?command=closeClose a fixed deposit account
fixeddepositaccounts/{accountId}?command=prematureClosePremature Close a fixed deposit account
fixeddepositaccounts/{accountId}?command=calculatePrematureAmountCalculate Premature amount on a fixed + deposit account
fixeddepositaccounts/{accountId}?command=calculateInterestCalculate interest on a fixed deposit + account
fixeddepositaccounts/{accountId}?command=postInterestPost interest on a fixed deposit account
Recurring Deposit AccountsrecurringdepositaccountsSubmit new recurring deposit applicationList recurring deposit application/accounts
recurringdepositaccounts/{accountId}Retrieve a recurring deposit application/accountModify a recurring deposit applicationDelete a recurring deposit application
recurringdepositaccounts/{accountId}?command=approveApprove a recurring deposit application
recurringdepositaccounts/{accountId}?command=undoApprovalUndo recurring deposit application approval
recurringdepositaccounts/{accountId}?command=rejectReject a recurring deposit application
recurringdepositaccounts/{accountId}?command=withdrawWithdraw recurring deposit application +
recurringdepositaccounts/{accountId}?command=activateActivate a recurring deposit account
recurringdepositaccounts/{accountId}?command=updateDepositAmountUpdate recommended deposit amount
recurringdepositaccounts/{accountId}?command=closeClose a recurring deposit account
recurringdepositaccounts/{accountId}?command=prematureClosePremature Close a recurring deposit account +
recurringdepositaccounts/{accountId}?command=calculatePrematureAmountCalculate Premature amount on a + recurring deposit account
recurringdepositaccounts/{accountId}?command=calculateInterestCalculate interest on a recurring deposit + account
recurringdepositaccounts/{accountId}?command=postInterestPost interest on a recurring deposit account +
Recurring Deposit Transactionsrecurringdepositaccounts/{accountId}/transactions?command=depositMake a deposit
recurringdepositaccounts/{accountId}/transactions?command=withdrawalMake a withdrawal
recurringdepositaccounts/{accountId}/transactions/{transactionId}?command=undoUndo transaction
recurringdepositaccounts/{accountId}/transactions/{transactionId}?command=modifyAdjust transaction
recurringdepositaccounts/{accountId}/transactions/templateRetrieve Deposit account + transaction template
recurringdepositaccounts/{accountId}/transactions/{transactionId}Retrieve Deposit account transaction +
+
+
+
-
+
+

Shares

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -   -
-
-

Creating and Updating

-

When you want to 'Create a ...' you have to at least supply - the mandatory fields. The mandatory fields are listed in this - documentation under the relevant 'Create a ...' heading.

- -

When you want to 'Update a ...' you can update individual - fields or a combination of fields (subject to data integrity - rules).

-
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + -   -
-
-

Updating Dates and Numbers

-

Dates

-

- Dates are returned in GET requests as an array e.g. [ 2007, 4, - 11]. However, the API accepts them as strings in POST and PUT - requests. If there are any dates in your POST or PUT requests, you - need to provide the "locale" and "dateFormat". This can be any - date pattern supported by Joda-Time. - This capability can help you when saving data in your client - application as you shouldn't need to do any date format conversion - prior to issuing your POST or PUT request. -

-JSON examples: -{ - "locale": "en_US", - "dateFormat": "dd MMMM yyyy", - "openingDate": "01 July 2007" -} - -{ - "locale": "en_US", - "dateFormat": "yyyy-MM-dd", - "openingDate": "2007-03-21" -} - -

Numbers

-

You must provide a "locale" when updating numbers. Numbers - are not "Ids" or "Types" but are typically money amounts or - percentages that relate to loans. In any case, the API will send - back an error message if you forget.

-JSON examples: -{ - "locale": "en_US", - "principal": "240,400.88" -} -{ - "locale": "fr_CH", - "principal": "240 400.88" -} - -
- -
- -   -
-
-

Field Descriptions

-

- Most fields are self-explanatory. Fields that aren't are described - under the relevant resource heading e.g. AUTHENTICATION -

- -
- -
- -   -
-
-

Authentication Overview

-

- Authentication to the API can be configured to be supported via HTTP - Basic Auth or OAuth2. -

- -

- Default authentication is using HTTP Basic Auth. Oauth2 can be enabled by using -Psecurity=oauth option on gradle build command , refer - the platform setup wiki for additional details. -

-

- Optionally, two-factor authentication can be enabled by using - -Ptwofactor=enabled on gradle build. - Details of the authentication workflow with two-factor authentication enabled can be found here. -

-

- The platform has been configured to reject plain HTTP requests and - to expect all API requests to be made over HTTPS. All - requests must be authenticated. -

-
-
- -
-
- -   -
-
-

Authentication HTTP Basic

-

- Authentication to the API occurs via HTTP - Basic Auth. -

- -
-
- -// A Javascript/Jquery example of how to login to Apache Fineract and use its api. -// Typically, the javascript application would -// 1) Display a login page to retrieve the username and password. -// 2) Send the username and password to a function -// such as setBasicAuthKey below which sets the HTTP Basic Auth key. -// 3) The HTTP Basic Auth key is used in all subsequent requests -// (see the function executeAjaxRequest below). - -function setBasicAuthKey(username, password) { - - var jqxhr = $.ajax({ - url : "authentication?username=" + username + "&password=" + password, - type : 'POST', - contentType : "application/json; charset=utf-8", - dataType : 'json', - data : "{}", - cache : false, - success : function(data, textStatus, jqXHR) { - basicAuthKey = data.base64EncodedAuthenticationKey; - }, - error : function(jqXHR, textStatus, errorThrown) { - //error processing - } - }); -} - -function executeAjaxRequest(url, verbType, jsonData, basicAuthKey, successFunction, errorFunction) { - var jqxhr = $.ajax({ - url : url, - type : verbType, //POST, GET, PUT or DELETE - contentType : "application/json; charset=utf-8", - dataType : 'json', - data : jsonData, - cache : false, - beforeSend : function(xhr) { - xhr.setRequestHeader("Authorization", "Basic " + basicAuthKey); - }, - success : successFunction, - error : errorFunction - }); -} - -
-
- -   -
-
-

Authentication Oauth2

-

- Authentication to the API occurs via OAuth2. 'Resource Owner Password Credentials Grant' type is used. -

- -
-
- -// A Javascript/JQuery example of how to login to Apache Fineract and use its API. -// Typically, the JavaScript application would: -// 1) Display a login page to retrieve the username and password. -// 2) Send the username, password, client_id , grant_type and client_secret to a function -// such as getOauthToken() below which POSTs these as x-www-form-urlencoded (but NOT in the URL, see FINERACT-629) -// and stores the token in a global variable. -// 3) The HTTP bearer Auth key is used in all subsequent requests -// (see the function executeAjaxRequest() below). - -function getOauthToken(username, password) { - - var jqxhr = $.ajax({ - url : "URL of the authentication server", - type : 'POST', - dataType : 'json', - data : { - username: credentials.username, - password: credentials.password, - client_id: "community-app", - grant_type: "password", - client_secret: "123" - }, - cache : false, - success : function(data, textStatus, jqXHR) { - authKey = data.access_token; - }, - error : function(jqXHR, textStatus, errorThrown) { - //error processing - } - }); -} - -function executeAjaxRequest(url, verbType, jsonData, authKey, successFunction, errorFunction) { - var jqxhr = $.ajax({ - url : url, - type : verbType, //POST, GET, PUT or DELETE - contentType : "application/json; charset=utf-8", - dataType : 'json', - data : jsonData, - cache : false, - beforeSend : function(xhr) { - xhr.setRequestHeader("Authorization", "bearer " + authKey); - }, - success : successFunction, - error : errorFunction - }); -} - -
-
-   -
-
-

Two-Factor Authentication

-

- Two-Factor authentication is supported by requesting & verifying - one-time passwords(OTP). OTPs are sent via SMS & email. -

-

- Two-factor authentication is disabled by default. - More information on how to enable TFA can be found here. -

-

- Two-factor authentication workflow: -

    -
  1. User authticates via BasicAuth / oAauth.
  2. -
  3. Client requests a list of supported OTP delivery methods for the authenticated user(Get Delivery Methods).
  4. -
  5. User selects an OTP delivery method and client sends a request for OTP(Request OTP).
  6. -
  7. User receives an OTP and the client sends it for verification(Validate OTP).
  8. -
  9. If the OTP is valid, an access token is returned
  10. -
  11. The access token is sent in following requestes to the server as a header Fineract-Platform-TFA-Token
  12. -
  13. On session end, the access token should be invalidatedInvalidate Access Token).
  14. -
-

-

- Two-Factor authentication and delivery methods can be configured via - the /twofactor/configure endpoint. -

-
-
- -
-
- -   -
-
-

Get Delivery Methods

-

Returns a list of possible OTP delivery methods for the current user.

-

Requires first-factor authenticated user.

-
-
- GET https://DomainName/api/v1/twofactor - -[ - { - "name": "sms", - "target": "08888888888" - }, - { - "name": "email", - "target": "user@example.com" - } -] -
-
- -   -
-
-

Request OTP

-

Requests an OTP.

-

Requires first-factor authenticated user.

-
Arguments
-
-
deliveryMethod
-
- String mandatory, the delivery method name -
-
extendedToken
-
- boolean optional, whether to request an extended token, default false -
-
-
-
- POST https://DomainName/api/v1/twofactor?deliveryMethod=sms&extendedToken=false - -{ - "requestTime": 1500000000000, - "tokenLiveTimeInSec": 300, - "extendedAccessToken": false, - "deliveryMethod": { - "name": "sms", - "target": "08888888888" - } -} -
-
- -   -
-
-

Validate OTP

-

Validates an OTP. If the OTP is valid, an access token is created.

-

The returned access token is later sent as a header Fineract-Platform-TFA-Token.

-

Requires first-factor authenticated user.

-
Arguments
-
-
token
-
- String mandatory, the OTP to validate -
-
-
-
- POST https://DomainName/api/v1/twofactor/validate?token=YYYYY - -{ - "token": "cb0bb6e33fc540709d50a16eb2e555f9", - "validFrom": 1501530702801, - "validTo": 1501617102801 -} -
-
- -   -
-
-

Invalidate Access Token

-

Invalidates an access token.

-

Two factor access tokens should be invalidated on logout.

-

Requires fully authenticated user.

-
-
- POST https://DomainName/api/v1/twofactor/invalidate - -{ - "token": "cb0bb6e33fc540709d50a16eb2e555f9" -} - -{ - "resourceIdentifier": "cb0bb6e33fc540709d50a16eb2e555f9" -} +
+
+ + + + +
RESOURCES
+
+
+ + + + + + + +
+
POST
+
+
create/complex + update +
+
+
+ + + + + + + +
+
GET
+
+
read
+
+
+ + + + + + + +
+
PUT
+
+
update
+
+
+ + + + + + + +
+
DELETE
+
+
delete
+
+
Share AccountsshareaccountsSubmit new share applicationList share application/accounts
accounts/share/{accountId}Retrieve a share application/accountModify a share application
accounts/share/{accountId}?command=approveApprove a share application
accounts/share/{accountId}?command=undoApprovalUndo share application approval
accounts/share/{accountId}?command=rejectReject a share application
accounts/share/{accountId}?command=activateActivate a share account
accounts/share/{accountId}?command=closeClose a share account
accounts/share/{accountId}?command=applyadditionalsharesApply additional shares on a share + account
accounts/share/{accountId}?command=approveadditionalsharesApprove additional shares request on a + share account
accounts/share/{accountId}?command=rejectadditionalsharesReject additional shares request on a + share account
accounts/share/{accountId}?command=redeemsharesRedeem shares on a share account
+
-   -
-
-

Batch API

- -

- 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,..}..]}. -

- -
-
- -POST https://DomainName/api/v1/batches - - -POST batches -Content-Type: application/json Request Body: -[ - { - "requestId":1, - "relativeUrl":"clients", - "method":"POST", - "headers":[ - { - "name":"Content-type", - "value":"text/html" - } - ], - "body":"{ - \"officeId\": 1, - \"firstname\": \"Petra\", - \"lastname\": \"Yton\", - \"externalId\": \"ex_externalId1\", - \"dateFormat\": \"dd MMMM yyyy\", - \"locale\": \"en\", - \"active\": true, - \"activationDate\": \"04 March 2009\", - \"submittedOnDate\": \"04 March 2009\" - }" - }, - { - "requestId":2, - "relativeUrl":"loans", - "method":"POST", - "headers":[ - { - "name":"Content-type", - "value":"text/html" - } - ], - "reference":1, - "body":"{ \"dateFormat\": \"dd MMMM yyyy\", - \"locale\": \"en_GB\", - \"clientId\": \"$.clientId\", - \"productId\": 26, - \"principal\": \"10,000.00\", - \"loanTermFrequency\": 12, - \"loanTermFrequencyType\": 2, - \"loanType\": \"individual\", - \"numberOfRepayments\": 10, - \"repaymentEvery\": 1, - \"repaymentFrequencyType\": 2, - \"interestRatePerPeriod\": 10, - \"amortizationType\": 1, - \"interestType\": 0, - \"interestCalculationPeriodType\": 1, - \"transactionProcessingStrategyCode\": \"mifos-standard-strategy\", - \"expectedDisbursementDate\": \"10 Jun 2013\", - \"submittedOnDate\": \"10 Jun 2013\" - }" - }, - { - "requestId":3, - "relativeUrl":"loans/$.loanId/charges", - "method":"POST", - "reference":2, - "headers":[ - { - "name":"Content-type", - "value":"text/html" - } - ], - "body":"{ - \"chargeId\": \"2\", - \"locale\": \"en\", - \"amount\": \"100\", - \"dateFormat\": \"dd MMMM yyyy\", - \"dueDate\": \"29 April 2013\" - }" - }, - { - "requestId":4, - "relativeUrl":"loans/$.loanId/charges", - "method":"GET", - "reference":2, - "headers":[ - { - "name":"Content-type", - "value":"text/html" - } - ], - "body":"{}" - } -] - - -[ - { - "requestId":1, - "statusCode":200, - "headers":[ - { - "name":"Content-type", - "value":"text/html" - }, - { - "name":"X-Mifos-Platform-TenantId", - "value":"text/html" - } - ], - "body":"{\"officeId\":1,\"clientId\":909,\"resourceId\":909}" - }, - { - "requestId":2, - "statusCode":200, - "headers":[ - { - "name":"Content-type", - "value":"text/html" - } - ], - "body":"{\"officeId\":1,\"clientId\":909,\"loanId\":212,\"resourceId\":212}" - }, - { - "requestId":3, - "statusCode":200, - "headers":[ - { - "name":"Content-type", - "value":"text/html" - } - ], - "body":"{\"officeId\":1,\"clientId\":909,\"loanId\":212,\"resourceId\":155}" - }, - { - "requestId":4, - "statusCode":200, - "headers":[ - { - "name":"Content-type", - "value":"text/html" - } - ], - "body":"[ - { - \"id\":155, - \"chargeId\":2, - \"name\":\"Charge_Loans_GEQJC5\", - \"chargeTimeType\":{ - \"id\":1, - \"code\":\"chargeTimeType.disbursement\", - \"value\":\"Disbursement\" - }, - \"chargeCalculationType\":{ - \"id\":2, - \"code\":\"chargeCalculationType.percent.of.amount\", - \"value\":\"% Amount\" - }, - \"percentage\":100.000000, - \"amountPercentageAppliedTo\":10000.000000, - \"currency\":{ - \"code\":\"USD\", - \"name\":\"USDollar\", - \"decimalPlaces\":2, - \"displaySymbol\":\"$\", - \"nameCode\":\"currency.USD\", - \"displayLabel\":\"US Dollar ($)\" - }, - \"amount\":10000.000000, - \"amountPaid\":0, - \"amountWaived\":0, - \"amountWrittenOff\":0, - \"amountOutstanding\":10000.000000, - \"amountOrPercentage\":100.000000, - \"penalty\":false, - \"chargePaymentMode\":{ - \"id\":0, - \"code\":\"chargepaymentmode.regular\", - \"value\":\"Regular\" - }, - \"paid\":false, - \"waived\":false, - \"chargePayable\":false - } - ]" - } -] - -
- -
- -   -
-
-

Batch requests in a single transaction

- -

- 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. -

- -
-
- -POST https://DomainName/api/v1/batches?enclosingTransaction=true - - -POST batches -Content-Type: application/json Request Body: -[ - { - "requestId":1, - "relativeUrl":"clients", - "method":"POST", - "headers":[ - { - "name":"Content-type", - "value":"text/html" - }, - { - "name":"X-Mifos-Platform-TenantId", - "value":"text/html" - } - ], - "body":"{ - \"officeId\": 1, - \"firstname\": \"Petra\", - \"lastname\": \"Yton\", - \"externalId\": \"externalId_4\", - \"dateFormat\": \"dd MMMM yyyy\", - \"locale\": \"en\", \"active\": true, - \"activationDate\": \"04 March 2009\", - \"submittedOnDate\": \"04 March 2009\" - }" - }, - { - "requestId":2, - "relativeUrl":"savingsaccounts", - "method":"POST", - "reference":1, - "headers":[ - { - "name":"Content-type", - "value":"text/html" - } - ], - "body":"{ - \"clientId\": \"$.clientId\", - \"productId\": 1, - \"locale\": \"en\", - \"dateFormat\": \"dd MMMM yyyy\", - \"submittedOnDate\": \"01 March 2011\" - }" - } -] - - -Successful transaction response: -[ - { - "requestId":1, - "statusCode":200, - "headers":[ - { - "name":"Content-type", - "value":"text/html" - }, - { - "name":"X-Mifos-Platform-TenantId", - "value":"text/html" - } - ], - "body":"{\"officeId\":1,\"clientId\":922,\"resourceId\":922}" - }, - { - "requestId":2, - "statusCode":200, - "headers":[ - { - "name":"Content-type", - "value":"text/html" - } - ], - "body":"{\"officeId\":1,\"clientId\":922,\"savingsId\":116,\"resourceId\":116}" - } -] - - -
- -
- -   -
-
-

Batch API Errors

- -

- In Batch API without "enclosingTransaction=true", if one of the response is erroneous, then an appropriate status code will be set for that request and the error message will be returned in it's "body", while all other requests will return successful response with a status code of "200". -

- -
-
- -   -
-
-

Available Command Strategies

- -

- These are the currently available command strategies within the Mifos Batch API. So, these listed operations can be executed using a Batch Request. -

- -
- -
- -   -
-
-

Errors

- -

All errors are returned in JSON.

- -
-
-
HTTP Status Code Summary
-
    -
  • 200 OK - Everything Worked.
  • -
  • 400 Bad Request - Invalid Parameter or - Data Integrity Issue.
  • -
  • 401 Authentication Error.
  • -
  • 403 Unauthorized Request.
  • -
  • 404 Resource Not Found
  • -
  • 500 Platform Internal Server Error.
  • -
-
-
- -Error Message returned when attempting to create an Office without passing any parameters -{ -"developerMessage": "The request was invalid. This typically will happen due to validation errors which are provided.", -"developerDocLink": "https://github.com/openMF/mifosx/wiki/HTTP-API-Error-codes", -"httpStatusCode": "400", -"defaultUserMessage": "Validation errors exist.", -"userMessageGlobalisationCode": "validation.msg.validation.errors.exist", -"errors": [ - { - "developerMessage": "The parameter name cannot be blank.", - "defaultUserMessage": "The parameter name cannot be blank.", - "userMessageGlobalisationCode": "validation.msg.office.name.cannot.be.blank", - "parameterName": "name", - "value": null, - "args": [] - }, - { - "developerMessage": "The parameter openingDate cannot be blank.", - "defaultUserMessage": "The parameter openingDate cannot be blank.", - "userMessageGlobalisationCode": "validation.msg.office.openingDate.cannot.be.blank", - "parameterName": "openingDate", "value": null, "args": [] - }, - { - "developerMessage": "The parameter parentId cannot be blank.", - "defaultUserMessage": "The parameter parentId cannot be blank.", - "userMessageGlobalisationCode": - "validation.msg.office.parentId.cannot.be.blank", "parameterName": - "parentId", "value": null, "args": [] - } -] -} - -
-
-   -
-
-

Self Service API Overview

-

- Self Service APIs are a set of APIs with restricted data scope. Functional specifications and design can be viewed - here. -

- -

- While creating a user, user can be tagged as self service user. Also you can associate - clients that this user has access to. Data scope is restricted to these linked clients. -

-

- A self service user shall have access to only self service APIs. Self service APIs cannot be accessed by non-self service user. Vice-versa is also true. -

-
-
- -
-
- -   -
-
-

Clients

-

Clients are people and businesses that have applied (or may apply) to an MFI for loans.

-

Clients can be created in Pending or straight into Active state.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+

Loan

+
+
+
Field Descriptions
accountNo
If provided during client creation, its - value is set as account no. for client account, otherwise an - auto generated account no. is put in place based on the - configured strategy.
externalId
A place to put an external reference for - this client e.g. The ID another system uses.
If - provided, it must be unique. -
active
Indicates whether this client is to be created as active client. If active=true, then activationDate must be provided. If active=false, then the client is created as pending. -
activationDate
The date on which the client became active. -
firstname
Facility to break up name into parts - suitable for humans.
middlename
Facility to break up name into parts - suitable for humans.
lastname
Facility to break up name into parts - suitable for humans.
fullname
Facility to set name of a client or - business that doesn't suit the firstname,middlename,lastname - structure.
mobileNo
Optional: unique mobile number that is used by SMS or Mobile Money functionality. -
staffId
The staffId of the staff member dealing with the client office. The staff member is not specifically the loan officer.
savingsProductId
Optional: Default overdraft savings account of client -
datatables
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
+
+ + + + +
RESOURCES
+
+
+ + + + + + + +
+
POST
+
+
create/complex + update +
+
+
+ + + + + + + +
+
GET
+
+
read
+
+
+ + + + + + + +
+
PUT
+
+
update
+
+
+ + + + + + + +
+
DELETE
+
+
delete
+
+
Loansloans?calculateLoanScheduleCalculate Loan Repayment Schedule
loansSubmit a new Loan ApplicationList Loans/Loan Applications
loans/{loanId}Retrieve a LoanUpdate a LoanDelete a Loan Application
loans/{loanId}?command=approveApprove Loan Application
loans/{loanId}?command=undoApprovalUndo Loan Application Approval
loans/{loanId}?command=assignLoanOfficerAssign a Loan Officer
loans/{loanId}?command=unassignLoanOfficerUnassign a Loan Officer
loans/{loanId}?command=rejectReject Loan Application
Facility to enrich client details. + loans/{loanId}?command=withdrawWithdraw Loan Application
loans/{loanId}?command=disburseDisburse Loan
loans/{loanId}?command=disburseToSavingsDisburse Loan To Savings Account
loans/{loanId}?command=undoDisbursalUndo Loan Application Disbursal
loans/{loanId}?command=recoverGuaranteesRecover From Guarantors
loansSubmit a GLIM
loans/glimAccount/{glimId}?command=approveApprove GLIM
loans/glimAccount/{glimId}?command=undoapprovalUndoapprove a GLIM
loans/glimAccount/{glimId}?command=rejectReject a GLIM
loans/glimAccount/{glimId}?command=disburseDisburse a GLIM
loans/glimAccount/{glimId}?command=undodisbursalUndoDisburse a GLIM
loans/glimAccount/{glimId}?command=glimrepaymentGLIM Repayment
loans/glimAccount/{glimId}Retrieve a GLIM
Loan Transactionsloans/{loanId}/transactions?command=repaymentEnter a repayment
loans/{loanId}/transactions?command=waiveInterestWaive Interest
loans/{loanId}/transactions?command=writeoffWrite-off Loan
loans/{loanId}/transactions?command=undowriteoffUndo Loan Write-off transaction
-
-
- -   -
-
-

Retrieve Client Details Template

-

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
  • -
-

-
Arguments
-
-
officeId
-
- Integer optional -
-
staffInSelectedOfficeOnly
-
- Boolean optional -
-
Defaults to false if not provided. If staffInSelectedOfficeOnly=true only staff - who are associated with the selected branch are returned.
-
commandParam
-
- String optional -
-
If commandParam=close retrieves all closureReasons which are associated with - "ClientClosureReason" value.
-
-

Example Request:

-
clients/template
-
-
- -GET https://DomainName/api/v1/clients/template - - -{ - "activationDate":[2014,3,4], - "officeId":1, - "officeOptions":[{ - "id":1, - "name":"Head Office", - "nameDecorated":"Head Office" - }], - "staffOptions":[{ - "id":1, - "firstname":"xyz", - "lastname":"sjs", - "displayName":"sjs, xyz", - "officeId":1, - "officeName":"Head Office", - "isLoanOfficer":true, - "isActive":true - }], - "savingProductOptions":[{ - "id":4, - "name":"account overdraft", - "withdrawalFeeForTransfers":false, - "allowOverdraft":false - }], - "datatables": [{ - "applicationTableName": "m_client", - "registeredTableName": "Address Details", - "columnHeaderData": [{ - "columnName": "client_id", - "columnType": "bigint", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": false, - "isColumnPrimaryKey": true, - "columnValues": [] - }, - { - "columnName": "State", - "columnType": "varchar", - "columnLength": 25, - "columnDisplayType": "STRING", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "COUNTRY_cd_Country", - "columnType": "int", - "columnLength": 0, - "columnDisplayType": "CODELOOKUP", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [{ - "id": 17, - "value": "India", - "score": 0 - }], - "columnCode": "COUNTRY" - }] - }, - { - "applicationTableName": "m_client", - "registeredTableName": "Client Timeline", - "columnHeaderData": [{ - "columnName": "client_id", - "columnType": "bigint", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": false, - "isColumnPrimaryKey": true, - "columnValues": [] - }, - { - "columnName": "Approval Data", - "columnType": "date", - "columnLength": 0, - "columnDisplayType": "DATE", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [] - }] - }] -} - -
- -
- - GET https://DomainName/api/v1/clients/template - - - { - "activationDate":[2014,3,4], - "officeId":1, - "officeOptions":[{ - "id":1, - "name":"Head Office", - "nameDecorated":"Head Office" - }], - "staffOptions":[{ - "id":1, - "firstname":"xyz", - "lastname":"sjs", - "displayName":"sjs, xyz", - "officeId":1, - "officeName":"Head Office", - "isLoanOfficer":true, - "isActive":true - }], - "savingProductOptions":[{ - "id":4, - "name":"account overdraft", - "withdrawalFeeForTransfers":false, - "allowOverdraft":false - }], - "datatables": [{ - "applicationTableName": "m_client", - "registeredTableName": "Address Details", - "columnHeaderData": [{ - "columnName": "client_id", - "columnType": "bigint", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": false, - "isColumnPrimaryKey": true, - "columnValues": [] - }, - { - "columnName": "State", - "columnType": "varchar", - "columnLength": 25, - "columnDisplayType": "STRING", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "COUNTRY_cd_Country", - "columnType": "int", - "columnLength": 0, - "columnDisplayType": "CODELOOKUP", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [{ - "id": 17, - "value": "India", - "score": 0 - }], - "columnCode": "COUNTRY" - }] - }, - { - "applicationTableName": "m_client", - "registeredTableName": "Client Timeline", - "columnHeaderData": [{ - "columnName": "client_id", - "columnType": "bigint", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": false, - "isColumnPrimaryKey": true, - "columnValues": [] - }, - { - "columnName": "Approval Data", - "columnType": "date", - "columnLength": 0, - "columnDisplayType": "DATE", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [] - }] - }] - } - -
- -
-

if address is enabled

- - GET https://DomainName/api/v1/clients/template - - - - - { - "activationDate": - [ - 2016, - 8, - 11 - ], - "officeId": 1, - "officeOptions": - [ - { - "id": 1, - "name": "Head Office", - "nameDecorated": "Head Office" - } - ], - "savingProductOptions": - [ - ], - "genderOptions": - [ - { - "id": 748, - "name": "Female", - "position": 1, - "isActive": true - }, - { - "id": 749, - "name": "Male", - "position": 2, - "isActive": true - } - ], - "clientTypeOptions": - [ - { - "id": 761, - "name": "JLG", - "position": 1, - "description": "", - "isActive": true - }, - { - "id": 760, - "name": "individual", - "position": 2, - "description": "", - "isActive": true - } - ], - "clientClassificationOptions": - [ - ], - "clientNonPersonConstitutionOptions": - [ - ], - "clientNonPersonMainBusinessLineOptions": - [ - ], - "clientLegalFormOptions": - [ - { - "id": 1, - "code": "legalFormType.person", - "value": "PERSON" - }, - { - "id": 2, - "code": "legalFormType.entity", - "value": "ENTITY" - } - ], - "address": - { - "countryIdOptions": - [ - { - "id": 802, - "name": "INDIA", - "position": 1, - "isActive": true - }, - { - "id": 803, - "name": "BANGLADESH", - "position": 2, - "isActive": true - }, - { - "id": 807, - "name": "UNITED STATES", - "position": 3, - "isActive": true - } - ], - "stateProvinceIdOptions": - [ - { - "id": 800, - "name": "MAHARASHTRA", - "position": 1, - "isActive": true - }, - { - "id": 801, - "name": "GUJRAT", - "position": 2, - "isActive": true - } - ], - "addressTypeIdOptions": - [ - { - "id": 804, - "name": "PERMANENT ADDRESS", - "position": 1, - "isActive": true - }, - { - "id": 805, - "name": "OFFICE ADDRESS", - "position": 2, - "isActive": true - }, - { - "id": 806, - "name": "CURRENT ADDRESS", - "position": 3, - "isActive": true - } - ] - }, - "isAddressEnabled": true - }, - "datatables": [{ - "applicationTableName": "m_client", - "registeredTableName": "Address Details", - "columnHeaderData": [{ - "columnName": "client_id", - "columnType": "bigint", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": false, - "isColumnPrimaryKey": true, - "columnValues": [] - }, - { - "columnName": "State", - "columnType": "varchar", - "columnLength": 25, - "columnDisplayType": "STRING", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "COUNTRY_cd_Country", - "columnType": "int", - "columnLength": 0, - "columnDisplayType": "CODELOOKUP", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [{ - "id": 17, - "value": "India", - "score": 0 - }], - "columnCode": "COUNTRY" - }] - }, - { - "applicationTableName": "m_client", - "registeredTableName": "Client Timeline", - "columnHeaderData": [{ - "columnName": "client_id", - "columnType": "bigint", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": false, - "isColumnPrimaryKey": true, - "columnValues": [] - }, - { - "columnName": "Approval Data", - "columnType": "date", - "columnLength": 0, - "columnDisplayType": "DATE", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [] - }] - }] - - - -
-
- -   -
-
-

Create a Client

-

- Note:
1. You can enter either:
- firstname/middlename/lastname - for a person (middlename is - optional) OR
fullname - for a business or organisation - (or person known by one name).
- 2. If address is enable(enable-address=true), then additional field
- called address has to be passed. - -

- - - - - - - -
Mandatory Fields
firstname and lastname OR fullname,
officeId,
active=true and activationDate OR active=false,
- if(address enabled) address -
-
- - - - - - - -
Optional Fields
groupId, externalId, accountNo, staffId, mobileNo, savingsProductId, genderId, clientTypeId, clientClassificationId
-
-
- -POST https://DomainName/api/v1/clients - - -POST clients -Content-Type: application/json Request Body: -{ - "officeId": 1, - "firstname": "Petra", - "lastname": "Yton", - "externalId": "786YYH7", - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "active": true, - "activationDate": "04 March 2009", - "submittedOnDate":"04 March 2009", - "savingsProductId" : 4, - "datatables": [{ - "registeredTableName": "Family Details", - "data": { - "locale": "en", - "Number of members": "5", - "Number of dependents": "3", - "No of Children": "2", - "Date of verification": "14 December 2016", - "dateFormat": "dd MMMM yyyy" - } - }, - { - "registeredTableName": "Residency Address", - "data": { - "locale": "en", - "Address Line": "Basavana Gudi Road", - "Street": "Gandhi Bazaar", - "Landmark": "Aashrama", - "COUNTRY_cd_Country": 17, - "STATE_cd_State": "7", - "DISTRICT_cd_District": "13", - "Pincode": "560040" - } - }] -} - - -{ - "officeId": 1, - "clientId": 1, - "resourceId": 1, - "savingsId": 10 -} - -
-
- -

if address is enabled

- POST https://DomainName/api/v1/clients -
- - POST clients - Content-Type: application/json Request Body: - { - - "firstname": "Petra", - "lastname": "Yton", - "externalId": "786YYH7", - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "active": true, - "activationDate": "04 March 2009", - "submittedOnDate":"04 March 2009", - "officeId":1, - "address":[ - { - "addressTypeId": 805, - "isActive": true, - "street": "rapchik", - "stateProvinceId": 800, - "countryId": 802 - } - ] - } - - - { - "officeId": 1, - "clientId": 1, - "resourceId": 1, - "savingsId": 10 - } - -
-
- -POST clients -Content-Type: application/json -Request Body: -{ - "officeId": 1, - "fullname": "Client of group", - "groupId": 1, - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "active": true, - "activationDate": "04 March 2009" -} - - -{ - "officeId": 1, - "groupId": 1, - "clientId": 2, - "resourceId": 2 -} - -
-
- -   -
-
-

Activate a Client

-

Clients can be created in a Pending state. This API exists to enable client activation (for when a client becomes an approved member of the financial Institution).

-

If the client happens to be already active this API will result in an error.

-
-
- POST https://Domain Name/api/v1/clients/{clientId}?command=activate - POST clients/1?command=activate -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "activationDate": "01 March 2011" -} - - -{ - "officeId": 1, - "clientId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

Close a Client

-

Clients can be closed if they do not have any non-closed loans/savingsAccount. This API exists to close a client .

-

If the client have any active loans/savingsAccount this API will result in an error.

-
-
- POST https://Domain Name/api/v1/clients/{clientId}?command=close - POST clients/1?command=close -Content-Type: application/json -Request Body: -{ - "dateFormat":"dd MMMM yyyy", - "locale":"en", - "closureDate":"25 June 2013", - "closureReasonId":"11" -} - - -{ - "clientId":15, - "resourceId":15 -} - -
-
- -   -
-
-

Reject a Client

-

Clients can be rejected when client is in pending for activation status.

-

If the client is any other status, this API throws an error.

- - - - - - - -
Mandatory Fields
rejectionDate, rejectionReasonId
-
-
- -
- POST https://Domain Name/api/v1/clients/{clientId}?command=reject - POST clients/1?command=reject -Content-Type: application/json -Request Body: -{ -"rejectionDate":"28 November 2014", -"rejectionReasonId":16, -"locale":"en", -"dateFormat":"dd MMMM yyyy" -} - - -{ - "clientId":15, - "resourceId":15 -} - -
-
- -   -
-
-

Withdraw a Client

-

Client applications can be withdrawn when client is in a pending for activation status.

-

If the client is any other status, this API throws an error.

- - - - - - - -
Mandatory Fields
withdrawalDate, withdrawalReasonId
-
-
-
- POST https://Domain Name/api/v1/clients/{clientId}?command=withdraw - POST clients/1?command=withdraw -Content-Type: application/json -Request Body: -{ -"withdrawalDate":"28 November 2014", -"withdrawalReasonId":17, -"locale":"en", -"dateFormat":"dd MMMM yyyy" -} - - -{ - "officeId":1, - "clientId":15, - "resourceId":15 -} - -
-
- - -   -
-
-

Reactivate a Client

-

Clients can be reactivated after they have been closed.

-

Trying to reactivate a client in any other state throws an error.

- - - - - - - -
Mandatory Fields
reactivationDate
-
-
-
- POST https://Domain Name/api/v1/clients/{clientId}?command=reactivate - POST clients/1?command=reactivate - -Content-Type: application/json -Request Body: -{ -"reactivationDate":"28 November 2014", -"locale":"en", -"dateFormat":"dd MMMM yyyy" -} - - -{ - - "clientId":15, - "resourceId":15 -} - -
-
- -   -
-
-

UndoReject a Client

-

Clients can be reactivated after they have been rejected.

-

Trying to reactivate a client in any other state throws an error.

- - - - - - - -
Mandatory Fields
reopenedDate
-
-
-
- POST https://Domain Name/api/v1/clients/{clientId}?command=UndoRejection - POST clients/1?command=UndoRejection - -Content-Type: application/json -Request Body: -{ -"reopenedDate":"28 November 2014", -"locale":"en", -"dateFormat":"dd MMMM yyyy" -} - - -{ - - "clientId":15, - "resourceId":15 -} - -
-
- -  -
-
-

UndoWithdraw a Client

-

Clients can be reactivated after they have been withdrawn.

-

Trying to reactivate a client in any other state throws an error.

- - - - - - - -
Mandatory Fields
reopenedDate
-
-
-
- POST https://Domain Name/api/v1/clients/{clientId}?command=UndoWithdrawal - POST clients/1?command=UndoWithdrawal -Content-Type: application/json -Request Body: -{ -"reopenedDate":"28 November 2014", -"locale":"en", -"dateFormat":"dd MMMM yyyy" -} - - -{ - - "clientId":15, - "resourceId":15 -} - -
-
-   -
-
-

Assign a Staff

-

Allows you to assign a Staff for existed Client.

-

The selected Staff should belong to the same office (or an officer higher up in the hierarchy) - as the Client he manages.

-
-
- POST https://Domain Name/api/v1/clients/{clientId}?command=assignStaff - POST clients/1?command=assignStaff -Content-Type: application/json -Request Body: -{ - "staffId": "1" -} - - -{ - "officeId": 1, - "clientId": 1, - "resourceId": 1, - "changes": {"staffId":1} -} - -
-
- -   -
-
-

Unassign a Staff

-

Allows you to unassign the Staff assigned to a Client.

-
-
- POST https://Domain Name/api/v1/clients/{clientId}?command=unassignStaff - POST clients/1?command=unassignStaff -Content-Type: application/json -Request Body: -{ - "staffId":"1" -} - - -{ - "officeId": 1, - "clientId": 1, - "resourceId": 1, - "changes": {"staffId":1} -} - -
-
- -   -
-
-

Update Default Savings Account

-

Allows you to modify or assign a default savings account for an existing Client.

-

The selected savings account should be one among the existing savings account for a particular customer.

-
-
- POST https://Domain Name/api/v1/clients/{clientId}?command=updateSavingsAccount - POST clients/1?command=updateSavingsAccount -Content-Type: application/json -Request Body: -{ - "savingsAccountId": "22" -} - - -{ - "officeId":1, - "clientId":1, - "resourceId":1 - ,"changes":{ - "savingsAccountId":22 - } -} - -
-
- -   -
-
-

Propose a Client Transfer

-

Allows you to propose the transfer of a Client to a different Office on a specific date, if loan or savings transaction not present from proposed transfer date to current date.

-
-
- POST https://Domain Name/api/v1/clients/{clientId}?command=proposeTransfer - POST clients/1?command=proposeTransfer -Content-Type: application/json -Request Body: -{ - "transferDate":"28 August 2018", - "destinationOfficeId":"2", - "note":"Client Relocating to Bangalore" -} - - -{ - "clientId": 2, - "resourceId": 2 -} - - - -
-
- -   -
-
-

Withdraw a Client Transfer

-

Allows you to withdraw the proposed transfer of a Client to a different Office.

-

Withdrawal can happen only if the destination Branch (to which the transfer was - proposed) has not already - accepted the transfer proposal.

-
-
- POST https://Domain Name/api/v1/clients/{clientId}?command=withdrawTransfer - POST clients/1?command=withdrawTransfer -Content-Type: application/json -Request Body: -{ - "note":"Sorry, data entry error" -} - - -{ - "clientId": 2, - "resourceId": 2 -} - - -
-
- -   -
-
-

Reject a Client Transfer

-

Allows the Destination Branch to reject the proposed Client Transfer.

-
-
- POST https://Domain Name/api/v1/clients/{clientId}?command=rejectTransfer - POST clients/1?command=rejectTransfer -Content-Type: application/json -Request Body: -{ - "note":"We cannot accept tranfers of clients having loans with less than 1 repayment left" -} - - -{ - "clientId": 2, - "resourceId": 2 -} - - - -
-
- -   -
-
-

Accept a Client Transfer

-

Allows the Destination Branch to accept the proposed Client Transfer.

-

The destination branch may also choose to link this client to a group (in which case, any existing active JLG loan of the client is rescheduled to match the meeting frequency of the group) and loan Officer at the time of accepting - the transfer.

-
-
- POST https://Domain Name/api/v1/clients/{clientId}?command=acceptTransfer - POST clients/1?command=acceptTransfer -Content-Type: application/json -Request Body: -{ - "destinationGroupId":"13", - "staffId":"1", - "note":"Due Diligence done and all documents received" -} - - -{ - "clientId": 2, - "resourceId": 2 -} - - - -
-
- - -   -
-
-

Propose and Accept a Client Transfer

-

Abstraction over the Propose and Accept Client Transfer API's which enable a user with Data Scope over both the Target and Destination Branches to directly - transfer a Client to the destination Office.

-
-
- POST https://Domain Name/api/v1/clients/{clientId}?command=proposeAndAcceptTransfer - POST clients/1?command=proposeTransfer -Content-Type: application/json -Request Body: -{ - "destinationOfficeId":"2", - "destinationGroupId":"13", - "staffId":"1", - "note":"Client Relocating to Bangalore" -} - - -{ - "clientId": 2, - "resourceId": 2 -} - - - -
-
- - -   -
-
-

Retrieve a Client

-

Example Requests:

-
clients/1
-
-
-
clients/1?template=true
-
-
-
clients/1?fields=id,displayName,officeName
-
-
- -GET https://DomainName/api/v1/clients/{clientId} - - -{ - "id": 27, - "accountNo": "000000027", - "status": { - "id": 300, - "code": "clientStatusType.active", - "value": "Active" - }, - "active": true, - "activationDate": [ - 2013, - 1, - 1 - ], - "firstname": "savings", - "lastname": "test", - "displayName": "savings test", - "officeId": 1, - "officeName": "Head Office", - "timeline": { - "submittedOnDate": [ - 2013, - 1, - 1 - ], - "submittedByUsername": "mifos", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator", - "activatedOnDate": [ - 2013, - 1, - 1 - ], - "activatedByUsername": "mifos", - "activatedByFirstname": "App", - "activatedByLastname": "Administrator" - }, - "savingsProductId": 4, - "savingsProductName": "account overdraft", - "groups": [] -} - -
-
- -   -
-
-

List Clients

-

The list capability of clients can support pagination and sorting.

-
Optional Arguments
-
-
offset
-
- Integer optional, defaults to 0 -
-
Indicates the result from which pagination starts
- -
limit
-
- Integer optional, defaults to 200 -
-
Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- -
orderBy
-
- String optional, one of displayName, accountNo, officeId, officeName -
-
Orders results by the indicated field.
- -
sortBy
-
- String optional, one of ASC, DESC -
-
Indicates what way to order results if orderBy is used.
- -
officeId
-
- Integer optional -
-
Provides the ability to restrict list of clients returned based on the office they are associated with.
-
underHierarchy
-
- String optional -
-
Use the office hierarchy string to return all clients under a given hierarchy.
- -
displayName
-
- String optional -
-
Use displayName of clients to restrict results.
- -
firstName
-
- String optional -
-
Use firstName of clients to restrict results.
- -
lastName
-
- String optional -
-
Use lastName of clients to restrict results.
- -
externalId
-
- String optional -
-
Use externalId of clients to restrict results.
- -
orphansOnly
-
- Boolean optional, defaults to false -
-
Use orphansOnly as true to list clients which are not associated to any group/parent.
-
-

Example Requests:

-
clients
-
-
clients?fields=displayName,officeName,timeline
-
-
clients?offset=10&limit=50
-
-
clients?orderBy=displayName&sortOrder=DESC
-
-
- -GET https://DomainName/api/v1/clients - - -{ - "totalFilteredRecords": 2, - "pageItems": [ - { - "id": 1, - "accountNo": "000000001", - "status": { - "id": 300, - "code": "clientStatusType.active", - "value": "Active" - }, - "active": true, - "activationDate": [ - 2013, - 3, - 1 - ], - "fullname": "Small shop", - "displayName": "Small shop", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 2, - "accountNo": "000000002", - "status": { - "id": 100, - "code": "clientStatusType.pending", - "value": "Pending" - }, - "active": false, - "fullname": "Home Farm Produce", - "displayName": "Home Farm Produce", - "officeId": 1, - "officeName": "Head Office" - } - ] -} - -
-
- -   -
-
-

Update a Client

-

Note:You can update any of the basic attributes of a client (but not its associations) using this API.

-

Changing the relationship between a client and its office is not supported through this API. An API specific to handling transfers of clients between offices is available for the same.

-

The relationship between a client and a group must be removed through the Groups API.

-
-
- -PUT https://DomainName/api/v1/clients/{clientId} - - -PUT clients/1 -Content-Type: application/json -Request Body: -{ - "externalId": "786444UUUYYH7" -} - - -{ - "officeId": 1, - "clientId": 1, - "resourceId": 1, - "changes": { - "externalId": "786444UUUYYH7" - } -} - -
-
- -   -
-
-

Delete a Client

-

If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard delete' and cannot be recovered from. Once clients become active or have loans or savings associated with them, you cannot delete the client but you may Close the client if they have left the program.

-
-
- -DELETE https://DomainName/api/v1/clients/{clientId} - - -DELETE clients/3 -Content-Type: application/json - - -{ - "officeId": 1, - "clientId": 3, - "resourceId": 3 -} - -
-
- -   -
-
-

Retrieve client accounts overview

-

- An example of how a loan portfolio summary can be provided. This - is requested in a specific use case of the community application.
It is quite reasonable to add resources like this to simplify User Interface development. -

-

Example Requests:

-
clients/1/accounts
-
-
-
clients/1/accounts?fields=loanAccounts,savingsAccounts
-
-
- -GET https://DomainName/api/v1/clients/{clientId}/accounts - - -{ - "loanAccounts": [ - { - "id": 1, - "accountNo": "000000001", - "externalId": "456", - "productId": 1, - "productName": "TestOne", - "status": { - "id": 300, - "code": "loanStatusType.active", - "value": "Active", - "pendingApproval": false, - "waitingForDisbursal": false, - "active": true, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "loanType": { - "id": 1, - "code": "loanType.individual", - "value": "Individual" - }, - "loanCycle": 1 - } - ], - "savingsAccounts": [ - { - "id": 7, - "accountNo": "000000007", - "productId": 2, - "productName": "Other product", - "status": { - "id": 100, - "code": "savingsAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - }, - { - "id": 6, - "accountNo": "000000006", - "productId": 1, - "productName": "Passbook Savings", - "status": { - "id": 300, - "code": "savingsAccountStatusType.active", - "value": "Active", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": true, - "closed": false - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "accountBalance": 1828.03 - }, - { - "id": 5, - "accountNo": "000000005", - "productId": 1, - "productName": "Passbook Savings", - "status": { - "id": 400, - "code": "savingsAccountStatusType.withdrawn.by.applicant", - "value": "Withdrawn by applicant", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "withdrawnByApplicant": true, - "active": false, - "closed": true - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - } - ] -} -
-
- - -   -
-
-

Entity Field Configuration

-

Entity Field configuration API is a generic and extensible
- wherein various entities and subentities can be related.
- It gives the user an ability to enable/disable fields,
add regular expression for validation.

- - - + + + + + + + - - + + + + + + + - + + + + + + - - + + + + + + + - + + + + + + - - + + + + + + + - + + + + + + - - + + + + + + + - + + + + + + - - + + + + + + + - + + + + + + - - + + + + + + + - + + + + + + - -
Field Descriptions
loans/{loanId}/transactions?command=prepayLoanLoan Pre-Closure transaction template +
entity
loans/{loanId}/transactions?command=recoverypaymentMake a Recovery Payment
Entity to which relationship is to be established -
loans/{loanId}/transactions/{transactionId}Retrieve a transactions details
subentity
loans/{loanId}/transactions/{transactionId}Adjust a Transaction
Entity which uses/relies on other entity for addional description - loans/{loanId}/transactions?command=refundByCashRefund an Active Loan by Cash
field
loans/{loanId}/transactions?command=foreclosureForeclose an Active Loan
Field of the Enity which is to be configured - Loan Chargesloans/{loanId}/chargesAdd a Loan Charge
validation_regex
loans/{loanId}/charges/{loanChargeId}Pay Loan Charge from Linked SavingsRetrieve a Loan ChargeModify a Loan ChargeDelete a Loan Charge
Regular expression for validating field's data - Loan Guarantorsloans/{loanId}/guarantorsCreate a Guarantor + List Guarantors +
is_enabled
loans/{loanId}/guarantors/{guarantorId}Retrieve a GuarantorUpdate a GuarantorDelete a Guarantor
This is used to enable/disable field - Loan Collateralloans/{loanId}/collateralsCreate a Collateral + List collaterals +
is_mandatory
loans/{loanId}/collaterals/{collateralId}Retrieve a CollateralUpdate a CollateralDelete a Collateral
This is used to make field mandatory - Loan ReschedulingrescheduleloansCreate new loan reschedule request
-
-
-   -
-
- - GET https://DomainName/api/v1/fieldconfiguration/{entity} - - - [ - { - "fieldConfigurationId": 1, - "entity": "ADDRESS", - "subentity": "CLIENT", - "field": "addressType", - "is_enabled": true, - "is_mandatory": false, - "validation_regex": "" - }, - { - "fieldConfigurationId": 2, - "entity": "ADDRESS", - "subentity": "CLIENT", - "field": "street", - "is_enabled": true, - "is_mandatory": true, - "validation_regex": "" - }, - { - "fieldConfigurationId": 3, - "entity": "ADDRESS", - "subentity": "CLIENT", - "field": "addressLine1", - "is_enabled": true, - "is_mandatory": false, - "validation_regex": "" - }, - { - "fieldConfigurationId": 4, - "entity": "ADDRESS", - "subentity": "CLIENT", - "field": "addressLine2", - "is_enabled": true, - "is_mandatory": false, - "validation_regex": "" - }, - { - "fieldConfigurationId": 5, - "entity": "ADDRESS", - "subentity": "CLIENT", - "field": "addressLine3", - "is_enabled": true, - "is_mandatory": false, - "validation_regex": "" - } - ] - -
-
- - - - -   -
-
-

Client Address

-

Address module is an optional module and can be configured
- into the system by using GlobalConfiguration setting: enable-address.
- In order to activate Address module, we need to enable the configuration,
- enable-address by setting its value to true. -

- - - + + + + + + + - - + + + + + + + - + + + + + + - - + + + + + + + - + + + + + + - -
Field Descriptions
rescheduleloans/{requestId}Retrieve a Loan Reschedule Request
addressTypeId
rescheduleloans/{requestId}?command=previewLoanRescheduleRetrieve a Preview of The New Loan Repayment + Schedule
Address module has the ability to store
- multiple types of address of clients.addressTypeId is basically a code whose
value - are used to store the different types of addresses. -
rescheduleloans/{requestId}?command=rejectReject Loan Reschedule Request
street,addressLine1,addressLine2,addressLine3,townVillage,city,
- countyDistrict,stateProvinceId,
- countryId,postalCode,latitude,longitude,createdBy,createdOn,
- updatedBy,updatedOn
rescheduleloans/{requestId}?command=approveApprove Loan Reschedule Request
The above are the fields of address
- which are configurable using settings stored for each field in
- m_field_configuration table. -
Loan Term Variations/loans/{loanId}/schedule?command=calculateLoanScheduleCalculate Schedule with Loan Term + Variations
-
-
- -   -
-
-

List all addresses for a Client

-

Example Requests:

-
client/1/addresses
-
-
-
clients/1/addresses?status=false,true&&type=1,2,3
- -
-
- - GET https://DomainName/api/v1/client/{clientid}/addresses - - - [ - { - "client_id": 111755, - "addressType": "PERMANENT ADDRESS", - "addressId": 14, - "addressTypeId": 804, - "isActive": false, - "street": "anki's home", - "addressLine1": "test123", - "addressLine2": "iuyt", - "addressLine3": "", - "townVillage": "", - "city": "mumbai", - "countyDistrict": "", - "stateProvinceId": 801, - "countryName": "UNITED STATES", - "stateName": "GUJRAT", - "countryId": 807, - "postalCode": "400095", - "createdBy": "", - "updatedBy": "" - }, - { - "client_id": 111755, - "addressType": "PERMANENT ADDRESS", - "addressId": 17, - "addressTypeId": 804, - "isActive": false, - "street": "anki's home", - "addressLine1": "", - "addressLine2": "", - "addressLine3": "", - "townVillage": "", - "city": "", - "countyDistrict": "", - "stateProvinceId": 800, - "countryName": "INDIA", - "stateName": "MAHARASHTRA", - "countryId": 802, - "postalCode": "", - "createdBy": "", - "updatedBy": "" - }, - { - "client_id": 111755, - "addressType": "OFFICE ADDRESS", - "addressId": 18, - "addressTypeId": 805, - "isActive": false, - "street": "anki's office", - "addressLine1": "", - "addressLine2": "", - "addressLine3": "", - "townVillage": "", - "city": "", - "countyDistrict": "", - "stateProvinceId": 0, - "countryId": 0, - "postalCode": "", - "createdBy": "", - "updatedBy": "" - } - ] - -
- -
- - GET https://DomainName/api/v1/client/{clientid}/addresses?type=804&&status=false - - - [ - { - "client_id": 111755, - "addressType": "PERMANENT ADDRESS", - "addressId": 14, - "addressTypeId": 804, - "isActive": false, - "street": "anki's home", - "addressLine1": "test123", - "addressLine2": "iuyt", - "addressLine3": "", - "townVillage": "", - "city": "mumbai", - "countyDistrict": "", - "stateProvinceId": 801, - "countryName": "UNITED STATES", - "stateName": "GUJRAT", - "countryId": 807, - "postalCode": "400095", - "createdBy": "", - "updatedBy": "" - } - } - ] - -
-
- -   -
-
-

Create an address for a Client

- - - + + + + + + + - - + + + + + + +
Mandatory Fields
/loans/{loanId}/schedule?command=addVariationsCreate Loan Term Variations
type and clientId -
/loans/{loanId}/schedule?command=deleteVariationsRemove All Loan Term Variations
-
- - POST https://DomainName/api/v1/client/{clientId}/addresses?type={addressTypeId} - - - POST client/1/address?type=805 - Content-Type: application/json Request Body: - { - "street":"Ipca", - "addressLine1":"Kandivali", - "addressLine2":"plot47", - "addressLine3":"charkop", - "city":"Mumbai", - "stateProvinceId":800, - "countryId":802, - "postalCode":"400064" - } - - - { - "resourceId":15 - } - -
+
-   -
-
-

update an address for a Client

-

All the address fields can be updated by using update client address API.

+
+

Groups

+
+
- - - - + + + + -
Mandatory Fields
type and addressId + +
+ + + + +
RESOURCES
+
+
+ + + + + + + +
+
POST
+
+
create/complex + update +
+
+
+ + + + + + + +
+
GET
+
+
read
+
+
+ + + + + + + +
+
PUT
+
+
update
+
+
+ + + + + + + +
+
DELETE
+
+
delete
+
-
-
- - PUT https://DomainName/api/v1/client/{clientId}/addresses?type={addressTypeId} - - - POST client/1/addresses?type=805 - Content-Type: application/json Request Body: - { - "addressId":67, - "street":"goldensource" - } - - - { - "resourceId":67 - } - -
-
+ + Group + groups + Create a Group + List Groups + + + + + + groups/template + + Retrieve Group Template + + + + + + groups/{groupId} + + Retrieve a Group + Update a Group + Delete a Group + + + + groups/{groupId}?command=activate + Activate a Group + + + + + + + groups/{groupId}?command=associateClients + Associate Clients + + + + + + + groups/{groupId}?command=disassociateClients + Disassociate Clients + + + + + + + groups/{groupId}/accounts + + Retrieve Group accounts summary + + + + + + groups/{groupId}?command=transferClients + Bulk Transfer Clients across Groups + + + + + + + groups/{groupId}?command=generateCollectionSheet + Generate Collection Sheet + + + + + + + groups/{groupId}?command=saveCollectionSheet + Save Collection Sheet + + + + + + + groups/{groupId}?command=unassignStaff + Unassign Staff + + + + + + + groups/{groupId}?command=assignStaff + Assign Staff + + + + + + + groups/{groupId}?command=close + Close Group + + + + + + + groups/{groupId}?command=assignRole + Assign Role + + + + + + + groups/{groupId}?command=unassignRole + Unassign Role + + + + + + + groups/{groupId}?command=updateRole + Update Role + + + + + + + groups/{groupId}/gsimaccounts + + List of GSIM Applications + + + + + + groups/{groupId}/glimaccounts + + List of GLIM Applications + + + + + Center + centers + Create a Center + List Centers + + + + + + centers/template + + Retrieve Center Template + + + + + + centers/{centerId} + + Retrieve a Center + Update a Center + Delete a Center + + + + centers/{centerId}?command=activate + Activate a Center + + + + + + + centers/{centerId}?command=close + Close Center + + + + + + + centers/{centerId}?command=associateGroups + Associate Groups + + + + + + + centers/{centerId}?command=disassociateGroups + Disassociate Groups + + + + + + + centers/{centerId}/accounts + + Retrieve Center accounts summary + + + + + + centers/{centerId}?command=generateCollectionSheet + Generate Collection Sheet + + + + + + + centers/{centerId}?command=saveCollectionSheet + Save Collection Sheet + + + + - -   -
-
-

Client Identifiers

-

Client Identifiers refer to documents that are - used to uniquely identify a customer.
- Ex: Drivers License, Passport, Ration card etc -

- - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
documentKey
Number/String used to uniquely identify a particular - document (Driving License number for a driving license etc)
documentType
Type of the identification document - (License, Passport Etc)
description
Any user comments to be associated - with the Client Identifier
-
-
-   -
-
-

List all Identifiers for a Client

-

Example Requests:

-
clients/1/identifiers
-
-
-
clients/1/identifiers?fields=documentKey,documentType,description
-
-
- -GET https://DomainName/api/v1/clients/{clientId}/identifiers - - -[ - { - "id": 2, - "clientId": 1, - "documentType": { - "id": 3, - "name": "Drivers License" - }, - "documentKey": "12345", - "description": "Issued in the year 2--7" - } -] - -
-
+ + Collection Sheet + collectionsheet?command=generateCollectionSheet + Generate Collection Sheet + + + + + + + collectionsheet?command=saveCollectionSheet + Save Collection Sheet + + + + + +
+
+
-   -
-
-

Retrieve Client Identifier Details Template

-

This is a convenience resource useful for - 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:

-
clients/1/identifiers/template
-
-
- -GET https://DomainName/api/v1/clients/{clientId}/identifiers/template - - -{ - "allowedDocumentTypes": [ - { - "id": 1, - "name": "Passport", - "position": 0 - }, - { - "id": 2, - "name": "Id", - "position": 0 - }, - { - "id": 3, - "name": "Drivers License", - "position": 0 - }, - { - "id": 4, - "name": "Any Other Id Type", - "position": 0 - } - ] -} - -
-
+
+

Accounting

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -   -
-
-

Retrieve a Client Identifier

-

Example Requests:

-
clients/1/identifier/2
-
-
-
clients/1/identifier/2?template=true
-
-
-
clients/1/identifiers/2?fields=documentKey,documentType,description
-
-
- -GET https://DomainName/api/v1/clients/{clientId}/identifiers/{identifierId} - - -{ - "id": 2, - "clientId": 1, - "documentType": { - "id": 3, - "name": "Drivers License" - }, - "documentKey": "12345", - "description": "Issued in 2007" -} - -
-
+ + + + + + + + + + + + + + + + -   -
-
-

Create an Identifier for a Client

-
+
+ + + + +
RESOURCES
+
+
+ + + + + + + +
+
POST
+
+
create/complex + update +
+
+
+ + + + + + + +
+
GET
+
+
read
+
+
+ + + + + + + +
+
PUT
+
+
update
+
+
+ + + + + + + +
+
DELETE
+
+
delete
+
+
General Ledger AccountglaccountsCreate a New Ledger AccountList Ledger Accounts
glaccounts/{glaccountId}Retrieve a Ledger AccountUpdate a Ledger AccountDelete a Ledger Account
Accounting ClosureglclosuresCreate an Accounting ClosureList Accounting Closures
glclosures/{glclosureId}Retrieve an Accounting ClosureUpdate an Accounting ClosureDelete an Accounting Closure
Journal EntriesjournalentriesCreate Journal EntriesList Journal Entries
journalentries?command=updateRunningBalanceUpdate Running Balance for Journal Entries +
journalentries/{entryId}Retrieve a single Entry
journalentries/{transactionId}/reversalReverse Journal Entries
Accounting RulesaccountingrulesCreate a Accounting RuleList Accounting Rules
accountingrules/{accountingruleId}Retrieve a Accounting RuleUpdate a Accounting RuleDelete a Accounting Rule
Mapping Financial Activities to AccountsfinancialactivityaccountsCreate Financial Activity to Account + Mapping
List Financial Activities to Accounts + Mappings
financialactivityaccounts/{financialActivityAccountId}Retrieve a Financial Activity to Account + MappingUpdate a Financial Activity to Account + MappingDelete a Financial Activity to Account + Mapping
Periodic Accrual AccountingaccrualaccountingExecute Periodic Accrual Accounting
+
Provisioning EntriesprovisioningentriesCreate Provisioning Entry
List Provisioning Entries
provisioningentries/{entryId}Retrieve Provisioning EntryRecreates Provisionin EntryAdd Provisioning Journal Entries
- - - - - - -
Mandatory Fields
documentKey, documentTypeId -
-
-
- -POST https://DomainName/api/v1/clients/{clientId}/identifiers - - -POST clients/1/identifiers -Content-Type: application/json -Request Body: -{ -"documentTypeId":"1", -"documentKey":"KA-54677", -"description":"Document has been verified" -} - - -{ - "officeId": 1, - "clientId": 1, - "resourceId": 3 -} - -
-
-   -
-
-

Update a Client Identifier

-
-
- -PUT https://DomainName/api/v1/clients/{clientId}/identifiers/{identifierId} - - -PUT clients/1/identifiers/3 -Content-Type: application/json -Request Body: -{ -"documentTypeId":"4", -"documentKey":"KA-94667", -"description":"Document has been updated" -} - - -{ - "officeId": 1, - "clientId": 1, - "resourceId": 3, - "changes": { - "documentTypeId": 4, - "documentKey": "KA-94667", - "description": "Document has been updated" - } -} - -
-
+ +
+
+ +
+

Org

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -   -
-
-

Delete a Client Identifier

-
-
- -DELETE https://DomainName/api/v1/clients/{clientId}/identifiers/{identifierId} - - -DELETE clients/1/identifiers/3 -Content-Type: application/json -No Request Body: - - -{ - "officeId": 1, - "clientId": 1, - "resourceId": 3 -} - -
-
- - - -   -
-
-

Images

-

The current API provides support for the addition of a single - image for entities like Client (URL pattern /clients) and Staff (URL pattern /staff.)
- Allowed formats: JPEG (.jpg or .jpeg), GIF (.gif) and PNG (.png). -

-

The API supports two different Approaches for manipulating Images. -

    -
  • Data URI's: - For easier manipulation by Javascript clients etc in supported Browsers. -
  • -
  • - Multi-part form data: - Images can be uploaded using Multi part forms and downloaded as regular binary files. -
  • -
    -
-
- -   -
-
-

Get Entity Image (DATA URI)

-

Optional arguments are identical to those of Get Image associated with an Entity (Binary file).

-

Example Requests:

-
clients/1/images
-
staff/1/images
-
-
-
- -GET https://DomainName/api/v1/clients/{clientId}/images -Accept: text/plain - - - -data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ -bWFnZVJlYWR5ccllPAAAAJ1JREFUeNpi+P//PwMIA4E9EG8E4idQDGLbw+WhiiqA+D8OXAFVAzbp -DxBvB2JLIGaGYkuoGEjOhhFIHAbij0BdPgxYACMj42ogJQpifwBiXSDeC8JIbt4LxSC5DyxQjTeB -+BeaYb+Q5EBOAVutCzMJHUNNPADzzDokiYdAfAmJvwLkGeTgWQfyKZICS6hYBTwc0QL8ORSjBDhA -gAEAOg13B6R/SAgAAAAASUVORK5CYII= - -
-
- -   -
-
-

Get Image associated with an Entity (Binary file).

-
Optional Arguments
-
-
output
-
- String optional one of octet or inline_octet -
-
The query parameter overrides the "Accept" Header and sets the Media Type to "application/octet-stream"
- octet : Returns the image binary file as an attachment. The Content-Disposition header is set to attachment;filename=somefile.ext
- inline_octet :The Content-Disposition header is set to inline;filename=somefile.ext -
-
maxWidth
-
- Integer optional -
-
Triggers resizing of the image to the defined width
- -
maxHeight
-
-
- Integer optional -
- -
Triggers resizing of the image to the defined height
- - -
-
-
- -GET https://DomainName/api/v1/clients/{clientId}/images -Accept: application/octet-stream - - -GET clients/1/images -Accept: application/octet-stream - - -Not shown: The corresponding binary (image) file - -
-
- -   -
-
-

Upload an Image for an Entity (Data URI)

-
-
- -POST https://DomainName/api/v1/clients/{clientId}/images - - -POST clients/1/images -Content-Type: text/plain -Request Body: -data:image/png;base64,iVBORw0KGgoAA -AANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0l -EQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6 -P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC - - -{ - "resourceId": 1, - "changes": {}, - "resourceIdentifier": "1" -} - -
-
- -   -
-
-

Upload an Image for an Entity (Multi-part Form data)

-
+
+ + + + +
RESOURCES
+
+
+ + + + + + + +
+
POST
+
+
create/complex + update +
+
+
+ + + + + + + +
+
GET
+
+
read
+
+
+ + + + + + + +
+
PUT
+
+
update
+
+
+ + + + + + + +
+
DELETE
+
+
delete
+
+
OfficeofficesCreate an OfficeList Offices
offices/{officeId}Retrieve an OfficeUpdate an Office
Loan ProductloanproductsCreate a Loan + ProductList Loan Products
loanproducts/{productId}Retrieve a Loan + ProductUpdate a Loan + Product
Savings ProductsavingsproductsCreate a Savings productList Savings products
- - - - - - -
Mandatory Fields
file -
-

- The form should contain a required named body part with the - name "file".

- If you are using a HTML form, a snippet like - <input type="file" name="file"></input> - can be used for uploading the image file. -

-
-
- -POST https://DomainName/api/v1/clients/{clientId}/images - - -POST clients/1/images -Content-Type: multipart/form-data -Request Body: Not shown - - -{ - "resourceId": 1, - "changes": {}, - "resourceIdentifier": "1" -} - -
-
- -   -
-
-

Update a Image associated with an Entity (Data URI)

-
-
- -PUT https://DomainName/api/v1/clients/{clientId}/images - - -PUT clients/1/images -Content-Type: text/plain -Request Body: -data:image/png;base64,iVBORw0KGgoAA -AANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0l -EQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6 -P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC - - -{ - "resourceId": 1, - "changes": {}, - "resourceIdentifier": "1" -} - -
-
- -   -
-
-

Update an Entity's Image (Multi-part Form data)

- - - - - - - -
Mandatory Fields
file -
-

- The form should contain a required named body part with the - name "file".

- If you are using a HTML form, a snippet like - <input type="file" name="file"></input> - can be used for uploading the image file. -

-
-
- -PUT https://DomainName/api/v1/clients/{clientId}/images - - -PUT clients/1/images -Content-Type: multipart/form-data -Request Body: Not shown - -
-
- -   -
-
-

Delete an Entity's Image

-
-
- -DELETE https://DomainName/api/v1/clients/{clientId}/images - - -DELETE clients/1/images -Content-Type: application/json -No Request Body: - - -{ - "resourceId": 1, - "changes": {}, - "resourceIdentifier": "1" -} - -
-
- - -   -
-
-

Centers

-

Centers along with Groups are used to provided a distinctive banking distribution channel used in microfinance. Its common in areas such as Southern Asia to use Centers and Group as administrative units in grameen style lending. Typically groups will contain one to five people and centers themselves will be made of anywhere between 2-10 groups. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
externalId
A place to put an external reference for this center e.g. The ID another system uses. If provided, it must be unique. -
name
Name given to the Center.
active
Indicates whether this center is to be created as active. If active=true, then activationDate must be provided. If active=false, then the center is created as pending. -
activationDate
The date on which the center became active. -
officeId
The officeId of the office/branch this center is administrated through.
staffId
The staffId of the staff member dealing with this center. The staff member is not specifically the loan officer.
groupMembers
The array of groupIds to indicate what groups are part of this center.
-
-
- -   -
-
-

Retrieve a Center Template

-

Example Requests:

-
centers/template
-
-
centers/template?officeId=2
-
-
- -GET https://DomainName/fineract-provider/api/v1/centers/template - - -{ - "active": false, - "activationDate": [ - 2013, - 4, - 18 - ], - "officeId": 1, - "officeOptions": [ - { - "id": 1, - "name": "Head Office", - "nameDecorated": "Head Office" - }, - { - "id": 2, - "name": "Branch Office 1", - "nameDecorated": "....Branch Office 1" - } - ], - "staffOptions": [ - { - "id": 1, - "displayName": "C, Mike" - } - ], - "groupMembersOptions": [ - { - "id": 1, - "name": "First Group", - "externalId": "000-1A", - "officeId": 1, - "officeName": "Head Office", - "hierarchy": ".1." - }, - { - "id": 2, - "name": "Pending Group", - "officeId": 1, - "officeName": "Head Office", - "hierarchy": ".2." - } - ] -} - -
-
- -GET https://DomainName/fineract-provider/api/v1/centers/template?officeId=2 - - -{ - "active": false, - "activationDate": [ - 2013, - 4, - 18 - ], - "officeId": 2, - "officeOptions": [ - { - "id": 1, - "name": "Head Office", - "nameDecorated": "Head Office" - }, - { - "id": 2, - "name": "Branch Office 1", - "nameDecorated": "....Branch Office 1" - } - ], - "staffOptions": [ - { - "id": 2, - "displayName": "D, Mary" - }, - { - "id": 3, - "displayName": "P, Paul" - } - ] -} - -
-
- -   -
-
-

Create a Center

- - - - - - - -
Mandatory Fields
name, officeId, active, activationDate (if active=true)
-
- - - - - - - -
Optional Fields
externalId, staffId, groupMembers
-
-
-

Create a center as pending with no association to groupMembers.

- -POST https://DomainName/fineract-provider/api/v1/centers - - -POST centers -Content-Type: application/json Request Body: -{ - "name": "First Center (No groups)", - "officeId": 1, - "active": false -} - - -{ - "officeId": 1, - "groupId": 8, - "resourceId": 8 -} - -
- -
-

Create a center as active with no association to groupMembers.

- -POST https://DomainName/fineract-provider/api/v1/centers - - -POST centers -Content-Type: application/json Request Body: -{ - "name": "centerwithgroup", - "officeId": 1, - "groupMembers": ["7"], - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "active": true, - "activationDate": "01 March 2011" -} - - -{ - "officeId": 1, - "groupId": 9, - "resourceId": 9 -} - -
-
- -   -
-
-

Activate a Center

-

Centers can be created in a Pending state. This API exists to enable center activation.

-

If the center happens to be already active, this API will result in an error.

-
-
- POST https://Domain Name/api/v1/centers/{centerId}?command=activate - POST centers/1?command=activate -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "activationDate": "01 March 2011" -} - - -{ - "officeId": 1, - "groupId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

Close a Center

-

Centers can be closed if they don't have any non-closed groups or saving accounts.

-

If the Center has any active groups or savings accounts, this API will result in an error.

-
-
- POST https://Domain Name/api/v1/centers/{centerId}?command=close - POST centers/1?command=close -Content-Type: application/json -Request Body: -{ - "closureReasonId": 32, - "closureDate": "05 May 2014", - "locale": "en", - "dateFormat": "dd MMMM yyyy" -} - - -{ - "resourceId": 1 -} - -
-
- -   -
-
-

Associate Groups

-

This API allows associating existing groups to a center.

-

The groups are listed from the office to which the center is associated.

-

If group(s) is already associated with a center, this API will result in an error.

-
- -
- POST https://Domain Name/api/v1/centers/{centerId}?command=associateGroups - POST centers/1?command=associateGroups -Content-Type: application/json -Request Body: -{ - "grouptMembers":[1,2] -} - - -{ - "officeId": 1, - "groupId": 1, - "resourceId": 1, - "grouptMembers": [1,2] -} - -
-
- -   -
-
-

Disassociate Groups

-

This API allows to disassociate groups from a center.

-
- -
- POST https://Domain Name/api/v1/centers/{centerId}?command=disassociateGroups - POST center/1?command=disassociateGroups -Content-Type: application/json -Request Body: -{ - "grouptMembers":[1,2] -} - - -{ - "officeId": 1, - "groupId": 1, - "resourceId": 1, - "grouptMembers": [1,2] -} - -
-
- -   -
-
-

Retrieve Center accounts overview

-

- An example of how a savings summary for a Center can be provided. This - is requested in a specific use case of the reference application.
It is quite reasonable to add resources like this to simplify User Interface development. -

-

Example Requests:

-
centers/9/accounts
-
-
- -GET https://DomainName/api/v1/centers/{centerId}/accounts - - -{ - "savingsAccounts": [{ - "id": 16, - "accountNo": "000000016", - "productId": 1, - "productName": "Voluntary savings", - "status": { - "id": 100, - "code": "savingsAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false, - "prematureClosed": false, - "transferInProgress": false, - "transferOnHold": false - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 0, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "accountType": { - "id": 2, - "code": "accountType.group", - "value": "Group" - }, - "timeline": { - "submittedOnDate": [2014,5,1], - "submittedByUsername": "mifos", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator" - }, - "depositType": { - "id": 100, - "code": "depositAccountType.savingsDeposit", - "value": "Savings" - } - }] -} - -
-
- -   -
-
-

Generate Collection Sheet

-

This Api retrieves repayment details of all jlg loans under a center as on a specified meeting date.

-
-
- POST https://Domain Name/api/v1/centers/{centerId}?command=generateCollectionSheet - POST centers/10?command=generateCollectionSheet -Content-Type: application/json -Request Body: -{ - "dateFormat":"dd MMMM yyyy", - "locale":"en", - "calendarId":6, - "transactionDate":"04 May 2014" -} - - -{ - "dueDate": [2014,5,4], - "loanProducts": [{ - "id": 1, - "name": "IGL", - "includeInBorrowerCycle": false, - "useBorrowerCycle": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 0, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "principalVariationsForBorrowerCycle": [], - "interestRateVariationsForBorrowerCycle": [], - "numberOfRepaymentVariationsForBorrowerCycle": [] - }], - "groups": [{ - "groupId": 1, - "groupName": "Group 1", - "staffId": 1, - "staffName": "A, Aliya", - "levelId": 2, - "levelName": "Group", - "clients": [{ - "clientId": 10, - "clientName": "saving acc", - "loans": [{ - "loanId": 10, - "accountId": "000000010", - "accountStatusId": 300, - "productShortName": "IGL", - "productId": 1, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 0, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "principalDue": 1200.000000, - "principalPaid": 0.000000, - "interestDue": 21.360000, - "interestPaid": 0.000000, - "totalDue": 1221.360000 - }], - "attendanceType": { - "id": 0, - "code": "attendanceType.invalid", - "value": "Invalid" - } - }] - }], - "attendanceTypeOptions": [{ - "id": 1, - "code": "attendanceType.present", - "value": "Present" - }, - { - "id": 2, - "code": "attendanceType.absent", - "value": "Absent" - }, - { - "id": 3, - "code": "attendanceType.approved", - "value": "Approved" - }, - { - "id": 4, - "code": "attendanceType.leave", - "value": "Leave" - }, - { - "id": 5, - "code": "attendanceType.late", - "value": "Late" - }] -} - -
-
- -   -
-
-

Generate Individual Collection Sheet

-

This Api retrieves repayment details of all individual loans under a office as on a specified meeting date.

-
-
- POST https://Domain Name/api/v1/collectionsheet?command=generateCollectionSheet - POST collectionsheet?command=generateCollectionSheet -Content-Type: application/json -Request Body: -{ - "dateFormat":"dd MMMM yyyy", - "locale":"en", - "transactionDate":"15 January 2015", - "officeId":3 -} - - -{ - "dueDate": [ - 2015, - 1, - 15 - ], - "clients": [ - { - "clientId": 74, - "clientName": "guarantee test", - "loans": [ - { - "loanId": 307, - "accountId": "000000307", - "accountStatusId": 300, - "productShortName": "pr", - "productId": 60, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 0, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "principalDue": 1126.23, - "principalPaid": 8873.77, - "interestDue": 0, - "interestPaid": 504.95, - "totalDue": 1126.23 - } - ], - "savings": [ - { - "savingsId": 213, - "accountId": "000000213", - "accountStatusId": 300, - "productName": "11", - "productId": 30, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 0, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "dueAmount": 2000 - } - ] - } - ], - "paymentTypeOptions": [ - { - "id": 19, - "name": "receipt", - "position": 1, - "description": "rec" - }, - { - "id": 20, - "name": "check", - "position": 2, - "description": "che" - } - ] -} - -
-
- - -   -
-
-

Save Collection Sheet

-

This Api allows the loan officer to perform bulk repayments of JLG loans for a center on a given meeting date.

-
-
- POST https://Domain Name/api/v1/centers/{centerId}?command=saveCollectionSheet - POST centers/10?command=saveCollectionSheet -{ - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "calendarId": 6, - "transactionDate": "04 May 2014", - "actualDisbursementDate": "04 May 2014", - "clientsAttendance": [], - "bulkDisbursementTransactions": [], - "bulkRepaymentTransactions": [{ - "loanId": 10, - "transactionAmount": 1221.36 - }] -} - - -{ - "groupId": 10, - "resourceId": 10, - "changes": { - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "loanTransactions": [10], - "SavingsTransactions": [] - } -} - -
-
- -   -
-
-

Save Collection Sheet

-

This Api allows the loan officer to perform bulk repayments of individual loans and deposit of mandatory savings on a given meeting date.

-
-
- POST https://Domain Name/api/v1/collectionsheet?command=saveCollectionSheet - POST collectionsheet?command=saveCollectionSheet -{ - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "transactionDate": "04 May 2014", - "actualDisbursementDate": "04 May 2014", - "bulkDisbursementTransactions": [], - "bulkRepaymentTransactions": [{ - "loanId": 10, - "transactionAmount": 1221.36, - "paymentTypeId":19, - "receiptNumber":"1245356" - }], - "bulkSavingsDueTransactions":[] -} - - -{ - "groupId": 10, - "resourceId": 10, - "changes": { - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "loanTransactions": [15], - "SavingsTransactions": [] - - } -} - -
-
- - -   -
-
-

Update a Center

-
-
- -PUT https://DomainName/fineract-provider/api/v1/centers/{centerId} - - -PUT centers/8 -Content-Type: application/json -Request Body: -{ - "name": "First Center (No groups)" -} - - -{ - "officeId": 1, - "groupId": 8, - "resourceId": 8, - "changes": { - "name": "First Center (No groups) - modified" - } -} - -
-
- -   -
-
-

Delete a Center

-

A Center can be deleted if it is in pending state and has no association - groups, loans or savings.

-
-
- -POST https://DomainName/fineract-provider/api/v1/centers/{centerId} - - -DELETE centers/8 - - -{ - "resourceId":1, - "changes":{} -} - -
-
- -   -
-
-

Retrieve a Center

-

Example Requests:

-
centers/1
-
-
centers/1?associations=groupMembers
-
-
-

Retrieve an existing center with no groups information.

- -GET https://DomainName/fineract-provider/api/v1/centers/8 - - -{ - "id": 8, - "status": { - "id": 100, - "code": "groupingStatusType.pending", - "value": "Pending" - }, - "active": false, - "name": "First Center (No groups)", - "officeId": 1, - "officeName": "Head Office", - "hierarchy": ".8." -} - -
-
-

Retrieve an existing center without the details of group associations.

- -GET https://DomainName/fineract-provider/api/v1/centers/9 - - -{ - "id": 9, - "status": { - "id": 300, - "code": "groupingStatusType.active", - "value": "Active" - }, - "active": true, - "activationDate": [ - 2011, - 3, - 1 - ], - "name": "centerwithgroup", - "officeId": 1, - "officeName": "Head Office", - "hierarchy": ".9." -} - -
-
- -   -
-
-

List Centers

-

The default implementation supports pagination and sorting with the default pagination size set to 200 records. The parameter limit with value -1 will return all entries.

-
Optional Arguments
-
-
paged
-
- Boolean optional, defaults to false -
-
If paged is true then results will be paginated.
-
offset
-
- Integer optional, defaults to 0 -
-
Indicates from what result to start from.
- -
limit
-
- Integer optional, defaults to 200 -
-
Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- -
orderBy
-
- String optional, one of displayName, accountNo, officeId, officeName -
-
Orders the results by the field indicated.
- -
sortBy
-
- String optional, one of ASC, DESC -
-
Indicates what way to order results if orderBy is used.
- -
officeId
-
- Integer optional -
-
Provides ability to restrict list of centers returned based on the office there associated with.
-
underHierarchy
-
- String optional -
-
Use the office hierarchy string to return all centers under a given hierarchy.
- -
name
-
- String optional -
-
Use name of centers to restrict results.
- -
externalId
-
- String optional -
-
Use externalId of center to restrict results.
- -
-

Example Requests:

-
centers
-
-
centers?fields=name,officeName,joinedDate
-
-
centers?offset=10&limit=50
-
-
centers?orderBy=name&sortOrder=DESC
-
-
- -GET https://DomainName/fineract-provider/api/v1/centers?paged=true - - -{ - "totalFilteredRecords": 2, - "pageItems": [ - { - "id": 2, - "status": { - "id": 100, - "code": "groupingStatusType.pending", - "value": "Pending" - }, - "active": false, - "name": "Center 1", - "officeId": 1, - "officeName": "Head Office", - "hierarchy": ".2." - }, - { - "id": 3, - "status": { - "id": 100, - "code": "groupingStatusType.pending", - "value": "Pending" - }, - "active": false, - "name": "Center 2", - "officeId": 1, - "officeName": "Head Office", - "hierarchy": ".3." - } - ] -} - -
-
- - - -   -
-
-

Groups

-

Groups are used to provide a distinctive banking distribution channel used in microfinances throughout the world. The Group is an administrative unit. It can contain as few as 5 people or as many as 40 depending on how its used.

- -

Different styles of group lending - Joint-Liability Group, Grameen Model (Center-Group), Self-Help Groups, Village/Communal Banks)

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + - + + + + + + -
Field Descriptions
name
Name given to the Group.
externalId
A place to put an external reference for this group e.g. The ID another system uses. If provided, it must be unique. -
officeId
The officeId of the office/branch this group is administrated through.
active
Indicates whether this group is to be created as active. If active=true, then activationDate must be provided. If active=false, then the group is created as pending. -
activationDate
The date on which the group became active. -
staffId
The staffId of the staff member dealing with this group. The staff member is not specifically the loan officer. The staff member must be assigned to the same office as this group.
clientMembers
The individual client members that make up the group. The clients must be assigned to the same office as this group.
calendarId
The identifier of the calendar to which the transaction is linked with.
transactionDate
The date on which the transaction took place.
role
The role to be assigned to a client.
actualDisbursementDate
The date on which the actual disbursement took place.
clientsAttendance
The clients attendance.
bulkRepaymentTransaction
The details of any bulk repayment transactions.
bulkDisbursementTransactions
The details of any bulk disbursement transactions.
datatables
savingsproducts/{productId}Retrieve a savings productUpdate a savings productDelete a savings product
Facility to enrich group details. - Fixed Deposit ProductfixeddepositproductsCreate a Fixed Deposit productList Fixed Deposit products
-
-
- -   -
-
-

Retrieve Group Template

-

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
  • -
-

-
Arguments
-
-
officeId
-
- Integer optional -
-
centerId
-
- Integer optional -
-
staffInSelectedOfficeOnly
-
- Boolean optional -
-
Defaults to false if not provided. If staffInSelectedOfficeOnly=true only staff - who are associated with the selected branch are returned.
-
- -

Example Requests:

-
groups/template
-
-
groups/template?officeId=2
-
-
groups/template?centerId=1
-
-
groups/template?centerId=1&staffInSelectedOfficeOnly=true
-
-
-
-

Template to create a standard group

- -GET https://DomainName/fineract-provider/api/v1/groups/template - - -{ - "officeId": 1, - "officeOptions": [ - { - "id": 1, - "name": "Head Office", - "nameDecorated": "Head Office" - }, - { - "id": 2, - "name": "Branch Office 1", - "nameDecorated": "....Branch Office 1" - } - ], - "staffOptions": [ - { - "id": 1, - "displayName": "C, Mike" - } - ], - "clientOptions": [ - { - "id": 1, - "displayName": "Petra Yton", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 2, - "displayName": "Small shop business", - "officeId": 1, - "officeName": "Head Office" - } - ], - "datatables": [{ - "applicationTableName": "m_group", - "registeredTableName": "Group Activation Data", - "columnHeaderData": [{ - "columnName": "group_id", - "columnType": "bigint", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": false, - "isColumnPrimaryKey": true, - "columnValues": [] - }, - { - "columnName": "GROUPROLE_cd_Ctry", - "columnType": "int", - "columnLength": 0, - "columnDisplayType": "CODELOOKUP", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [{ - "id": 13, - "value": "Leader", - "score": 0 - }, - { - "id": 16, - "value": "Leader1", - "score": 0 - }, - { - "id": 14, - "value": "Collector", - "score": 0 - }], - "columnCode": "GROUPROLE" - }] - }, - { - "applicationTableName": "m_group", - "registeredTableName": "Group Enrichment", - "columnHeaderData": [{ - "columnName": "group_id", - "columnType": "bigint", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": false, - "isColumnPrimaryKey": true, - "columnValues": [] - }, - { - "columnName": "name", - "columnType": "varchar", - "columnLength": 15, - "columnDisplayType": "STRING", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - }] - }] -} - -
-
-

Template to create a standard group with specific office known. This will return only staffOptions and clientMembersOptions relevant for the chosen office.

- -GET https://DomainName/fineract-provider/api/v1/groups/template?officeId=2 - - -{ - "officeId": 2, - "officeOptions": [ - { - "id": 1, - "name": "Head Office", - "nameDecorated": "Head Office" - }, - { - "id": 2, - "name": "Branch Office 1", - "nameDecorated": "....Branch Office 1" - } - ], - "staffOptions": [ - { - "id": 2, - "displayName": "D, Mary" - }, - { - "id": 3, - "displayName": "P, Paul" - } - ] -} - -
-
-

Template to create a group for an existing center. As an existing center will be assigned to an office, this will return only staffOptions and clientMembersOptions relevant for the chosen center/office.

- -GET https://DomainName/fineract-provider/api/v1/groups/template?centerId=1 - - - - -
-
- -   -
-
-

Create a Group

- - - - - - - -
Mandatory Fields
name, officeId, active, activationDate (if active=true)
-
- - - - - - - -
Optional Fields
externalId, staffId, clientMembers
-
-
- -POST https://DomainName/fineract-provider/api/v1/groups - - -POST groups -Content-Type: application/json Request Body: -{ - "officeId":"1", - "name":"Pending Group", - "active": false -} - - -{ - "officeId": 1, - "groupId": 2, - "resourceId": 2 -} - - -POST groups -Content-Type: application/json Request Body: -{ - "officeId":"1", - "name":"First Group", - "externalId": "000-1A", - "clientMembers": ["1"], - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "active": true, - "activationDate": "04 March 2009", - "submittedOnDate":"04 March 2009", - "datatables": [{ - "registeredTableName": "Address Details", - "data": { - "locale": "en", - "COUNTRY_cd_Country": 17 - } - }, - { - "registeredTableName": "Group Activation Data", - "data": { - "locale": "en", - "GROUPROLE_cd_Ctry": 13, - "Date": "01 December 2016", - "dateFormat": "dd MMMM yyyy" - } - }] -} - - -{ - "officeId": 1, - "groupId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

Activate a Group

-

Groups can be created in a Pending state. This API exists to enable group activation.

-

If the group happens to be already active this API will result in an error.

- - - - - - - -
Mandatory Fields
activationDate
-
-
-
- POST https://Domain Name/api/v1/groups/{groupId}?command=activate - POST groups/1?command=activate -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "activationDate": "01 March 2011" -} - - -{ - "officeId": 1, - "groupId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

Associate Clients

-

This API allows to associate existing clients to a group.

-

The clients are listed from the office to which the group is associated.

-

If client(s) is already associated with group then API will result in an error.

- - - - - - - -
Mandatory Fields
clientMembers
-
-
- -
- POST https://Domain Name/api/v1/groups/{groupId}?command=associateClients - POST groups/1?command=associateClients -Content-Type: application/json -Request Body: -{ - "clientMembers":[1,2] -} - - -{ - "officeId": 1, - "groupId": 1, - "resourceId": 1, - "clientMembers": [1,2] -} - -
-
-   -
-
-

Disassociate Clients

-

This API allows to disassociate clients from a group.

-

Disassociating a client with active joint liability group loans results in an error.

- - - - - - - -
Mandatory Fields
clientMembers
-
-
- -
- POST https://Domain Name/api/v1/groups/{groupId}?command=disassociateClients - POST groups/1?command=disassociateClients -Content-Type: application/json -Request Body: -{ - "clientMembers":[1,2] -} - - -{ - "officeId": 1, - "groupId": 1, - "resourceId": 1, - "clientMembers": [1,2] -} - -
-
- -   -
-
-

Transfer Clients across groups

-

This API allows to transfer clients from one group to another

- - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
destinationGroupId
The identifier of the group to which the clients are to be transferred ( - has to be in the same branch as the source Group).
clients
Identifiers of all clients who need to be transferred -
inheritDestinationGroupLoanOfficer
Flag specifies if the transferred clients (and all their active loans) - should be linked to the assigned loan officer for the group -
-
- - - - - - - -
Mandatory Fields
destinationGroupId, clients
-
- - - - - - - -
Optional Fields
inheritDestinationGroupLoanOfficer (defaults to true), transferActiveLoans (defaults to true)
-
- - -
- - POST https://Domain Name/api/v1/groups/{groupId}?command=transferClients - POST groups/1?command=transferClients -Content-Type: application/json -Request Body: -{ - destinationGroupId:2, - clients:[{id:1}] -} - - -{ - "resourceId": 1 -} - - - -
-
- -   -
-
-

Generate Collection Sheet

-

This API retrieves repayment details of all jlg loans of all members of a group on a specified meeting date.

-
- - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -
Mandatory Fields
calendarId, transactionDate
fixeddepositproducts/{productId}Retrieve a Fixed Deposit productUpdate a Fixed Deposit productDelete a Fixed Deposit product
Recurring Deposit ProductrecurringdepositproductsCreate a Recurring Deposit productList Recurring Deposit products
recurringdepositproducts/{productId}Retrieve a Recurring Deposit productUpdate a Recurring Deposit productDelete a Recurring Deposit product
Share ProductshareproductsCreate a Share productList Share products
shareproducts/{productId}Retrieve a Share productUpdate a Share product
SMS CampaignssmscampaignsCreate a SMS CampaignList SMS Campaigns
smscampaigns/{campaignId}Retrieve a SMS CampaignUpdate a SMS CampaignDelete a SMS Campaign
smscampaigns/{campaignId}command=activateActivate a SMS Campaign
smscampaigns/{campaignId}command=closeClose a SMS Campaign
smscampaigns/{campaignId}command=reactivateReactivate a SMS Campaign
Entity-Datatable ChecksentityDatatableChecksCreate an Entity-Datatable Check
entityDatatableChecks?limit=15&offset=0List Entity-Datatable Checks
entityDatatableChecks/templateRetrieves an Entity-Datatable Check + template
entityDatatableChecks/{entityDatatableCheckId}Delete an Entity-Datatable Check
CurrencycurrenciesRetrieve + Currency ConfigurationUpdate Currency + Configuration
FundsfundsCreate a FundList Funds
funds/{fundId}Retrieve a FundUpdate a Fund
StaffstaffCreate a Staff MemberList Staff
staff/{staffId}Retrieve a Staff MemberUpdate a Staff Member
Staff Imagesstaff/{staffId}/imagesUpload an Image for a Staff Member (as DATA URI) + Get Staff Image (DATA URI)Update Staff Image (DATA URI)Delete Staff Image
+ Upload an Image for a Staff Member (Multi-part form data) + Get Staff Image (Binary file) + Update Staff Image (Multi-part form data) +
ChargeschargesCreate a ChargeList Charges
charges/{chargeId}Retrieve a ChargeUpdate a ChargeDelete a Charge
Loan Product Mixloanproducts?associations=productMixesList Loan Products Mix
loanproducts/{productId}/productmixCreate a Loan Product MixRetrieve Loan Products MixUpdate Loan Product MixDelete Loan Products Mix
HolidaysholidaysCreate a HolidayList Holidays
holidays/{holidayId}Retrieve a HolidayUpdate a HolidayDelete a Holiday
holidays/{holidayId}?command=activateActivate a Holiday
Working daysworkingdaysList workingdaysWorking days template
workingdays/{workingdaysId}Update a workingdays
User Generated DocumentstemplatesCreate a UGDList UGDs
templates/{templateId}Retrieve a UGDUpdate a UGDDelete a UGD
Interest Rate ChartschartsCreate a ChartList Charts
interestratecharts/{chartId}Retrieve a ChartUpdate a ChartDelete a Chart
Interest Rate SlabsslabsCreate a SlabList Slabs
interestrateslabs/{slabId}Retrieve a SlabUpdate a SlabDelete a Slab
Teller Cash ManagementtellersCreate TellerList Tellers
tellers/{tellerId}Find TellerUpdate TellerDelete Teller
tellers/{tellerId}/cashiersCreate CashierRetrieve Cashier
tellers/{tellerId}/cashiers/{cashierId}Find CashierUpdate CashierDelete Cashier
tellers/{tellerId}/cashiers/templateRetrieve Cashier Template
tellers/{tellerId}/cashiers/{cashierId}/allocateAllocate Cash To Cashier
tellers/{tellerId}/cashiers/{cashierId}/settleSettle Cash From Cashier
tellers/{tellerId}/cashiers/{cashierId}/transactionsRetrieve Cashier Transactions
tellers/{tellerId}/cashiers/{cashierId}/summaryandtransactionsRetrieve Cashier Transactions With + Summary
tellers/{tellerId}/cashiers/{cashierId}/transactions/templateRetrieve Cashier Transaction Template
-
-
- POST https://Domain Name/api/v1/groups/{groupId}?command=generateCollectionSheet - POST groups/1?command=generateCollectionSheet -Content-Type: application/json -Request Body: -{ - "dateFormat":"dd MMMM yyyy", - "locale":"en", - "calendarId":6, - "transactionDate":"04 May 2014" -} - - -{ - "dueDate": [2014,5,4], - "loanProducts": [{ - "id": 1, - "name": "IGL", - "includeInBorrowerCycle": false, - "useBorrowerCycle": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 0, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "principalVariationsForBorrowerCycle": [], - "interestRateVariationsForBorrowerCycle": [], - "numberOfRepaymentVariationsForBorrowerCycle": [] - }], - "groups": [{ - "groupId": 1, - "groupName": "Group 1", - "staffId": 1, - "staffName": "A, Aliya", - "levelId": 2, - "levelName": "Group", - "clients": [{ - "clientId": 10, - "clientName": "saving acc", - "loans": [{ - "loanId": 10, - "accountId": "000000010", - "accountStatusId": 300, - "productShortName": "IGL", - "productId": 1, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 0, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "principalDue": 1200.000000, - "principalPaid": 0.000000, - "interestDue": 21.360000, - "interestPaid": 0.000000, - "totalDue": 1221.360000 - }], - "attendanceType": { - "id": 0, - "code": "attendanceType.invalid", - "value": "Invalid" - } - }] - }], - "attendanceTypeOptions": [{ - "id": 1, - "code": "attendanceType.present", - "value": "Present" - }, - { - "id": 2, - "code": "attendanceType.absent", - "value": "Absent" - }, - { - "id": 3, - "code": "attendanceType.approved", - "value": "Approved" - }, - { - "id": 4, - "code": "attendanceType.leave", - "value": "Leave" - }, - { - "id": 5, - "code": "attendanceType.late", - "value": "Late" - }] -} - -
-
-   -
-
-

Save Collection Sheet

-

This api allows the loan officer to perform bulk repayments of JLG loans for a group on its meeting date.

- - - - - - + + + + + + + -
Mandatory Fields
calendarId, transactionDate, actualDisbursementDate
Payment TypepaymenttypesCreate Payment TypeList Payment Types
-
- - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Optional Fields
clientsAttendance, bulkRepaymentTransaction, bulkDisbursementTransactions
paymenttypes/{paymentTypeId}Retrieve Payment TypeUpdate Payment TypeDelete Payment Type
Provisioning CriteriaprovisioningcriteriaCreate Provisioning CriteriaList Provisioning Criteria
provisioningcriteria/{criteriaId}Retrieve Provisioning CriteriaUpdate Provisioning CriteriaDelete Provisioning Criteria
Floating RatesfloatingratesCreate Floating RateList Floating Rates
floatingrates/{floatingRateId}Retrieve Floating RateUpdate Floating Rate
Tax Componenttaxes/componentCreate Tax ComponentList Tax Components
taxes/component/{taxComponentId}Retrieve Tax componentUpdate Tax Component
Tax Grouptaxes/groupCreate Tax GroupList Tax Groups
taxes/group/{taxGroupId}Retrieve Tax GroupUpdate Tax Group
RatesratesCreate RateList Rates
rates/{rateId}Retrieve RateUpdate Rate
-
- POST https://Domain Name/api/v1/groups/{groupId}?command=saveCollectionSheet - POST groups/1?command=saveCollectionSheet -{ - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "calendarId": 6, - "transactionDate": "04 May 2014", - "actualDisbursementDate": "04 May 2014", - "clientsAttendance": [], - "bulkDisbursementTransactions": [], - "bulkRepaymentTransactions": [{ - "loanId": 10, - "transactionAmount": 1221.36 - }] -} - - -{ - "groupId": 1, - "resourceId": 1, - "changes": { - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "bulkTransations": { - "loanId": 10, - "transactionAmount": 1221.36, - "transactionDate": [2014,5,4] - } - } -} - -
- -   -
-
-

Unassign a Staff

-

Allows you to unassign the Staff.

+
+
+

User

+
+
- - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Mandatory Fields
staffId
+
+ + + + +
RESOURCES
+
+
+ + + + + + + +
+
POST
+
+
create/complex + update +
+
+
+ + + + + + + +
+
GET
+
+
read
+
+
+ + + + + + + +
+
PUT
+
+
update
+
+
+ + + + + + + +
+
DELETE
+
+
delete
+
+
Authentication HTTP BasicauthenticationVerify Authentication
Authentication Oauth2authenticated userFetch Authenticated user details
Two-Factor AuthenticationtwofactorRequest OTPList OTP delivery methods
twofactor/validateValidate OTP
twofactor/invalidateInvalidate Access Token
UserusersCreate a UserList Users
users/{userId}Retrieve a UserUpdate a UserDelete a User
RolerolesCreate a New RoleList Roles
roles/{roleId}Retrieve a RoleUpdate a RoleDelete Role
roles/{roleId}/permissionsRetrieve a + Role's PermissionsUpdate a Role's + Permissions
roles/{roleId}?command=enableEnable Role
roles/{roleId}?command=disableDisable Role
PermissionpermissionsList Application PermissionsEnable/Disable Permissions for Maker Checker
Password preferencespasswordpreferencesGet Password PreferencesUpdate Password Preferences
-
- POST https://Domain Name/api/v1/groups/{groupId}?command=unassignStaff - POST groups/1?command=unassignStaff -Content-Type: application/json -Request Body: -{ - "staffId":"1" -} - - -{ - "officeId": 1, - "groupId": 1, - "resourceId": 1, - "changes": {} -} - -
-
- -   -
-
-

Assign a Staff

-

Allows you to assign Staff to an existing Group.

-

The selected Staff should be belong to the same office (or an office higher up in the hierarchy) as this group

- - - - - - - -
Mandatory Fields
staffId
- - - - - - - - - - -
Optional Fields
inheritStaffForClientAccounts
Optional: Boolean if true all members of the group (i.e all clients with active loans and savings ) will inherit the staffId
-
-
- POST https://Domain Name/api/v1/groups/{groupId}?command=assignStaff - POST groups/1?command=assignStaff -Content-Type: application/json -Request Body: -{ - "staffId": "1" -} - - -{ - "officeId": 1, - "groupId": 1, - "resourceId": 1, - "changes": {"staffId":1} -} - -
-
- -   -
-
-

Close a Group

-

This API exists to close a group. Groups can be closed if they don't have any non-closed clients/loans/savingsAccounts.

-

If the group has any active clients/loans/savingsAccount, this API will result in an error.

-
-
- POST https://Domain Name/api/v1/groups/{groupId}?command=close - POST groups/1?command=close -Content-Type: application/json -Request Body: -{ - "dateFormat":"dd MMMM yyyy", - "locale":"en", - "closureDate":"25 June 2013", - "closureReasonId":"30" -} - - -{ - "groupId": 1, - "resourceId": 1 -} - -
- -   -
-
-

Assign a Role

-

Allows you to assign a Role to an existing member of a group.

-

We can define the different roles applicable to group members by adding code values to the pre-defined system code GROUPROLE. Example:Group leader etc.

+
+
+

System

+
+
- - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Mandatory Fields
clientId, role
+
+ + + + +
RESOURCES
+
+
+ + + + + + + +
+
POST
+
+
create/complex + update +
+
+
+ + + + + + + +
+
GET
+
+
read
+
+
+ + + + + + + +
+
PUT
+
+
update
+
+
+ + + + + + + +
+
DELETE
+
+
delete
+
+
Global ConfigurationconfigurationsList + Global Configuration
Global Configurationconfigurations/{configId}Retrieve + a Global ConfigurationUpdate + Global Configuration
HookshooksCreate a HookList Hooks
hooks/{hookId}Retrieve a HookUpdate a HookDelete a Hook
Account number formataccountnumberformatsCreate an Account number formatList Account number formats
accountnumberformats/{accountnumberformatId}Retrieve an Account number formatUpdate an Account number formatDelete an Account number format
CodescodesCreate a CodeList Codes
codes/{codeId}Retrieve a CodeUpdate a CodeDelete a Code
Code Valuescodes/{codeId}/codevaluesCreate a Code ValueList Code Values
codes/{codeId}/codevalues/{codevalueId}Retrieve a Code ValueUpdate a Code ValueDelete a Code Value
AuditsauditsList Audits
audits/{auditId}Retrieve an Audit Entry
MakercheckersmakercheckersList Maker Checker Entries
makercheckers/{auditId}Delete Maker Checker Entry
makercheckers/{auditId}?command=approveApprove Maker Checker Entry
Scheduler jobsjobsList Scheduler jobs
jobs/{jobId}Retrieve a jobUpdate a job
jobs/{jobId}?command=executeJobRun a job
jobs/{jobid}/runhistoryRetrieve job history
schedulerRetrieve scheduler status
scheduler?command=startActivate a scheduler service
scheduler?command=stopSuspend a scheduler service
External Servicesexternalservice/{servicename}Retrieve + a external service configurationUpdate + external service Configuration
Credit Bureau ConfigurationCreditBureauConfigurationList + all Integrated Credit-Bureau
CreditBureauConfiguration/configuration/{creditBureauId}Create + Configuration
CreditBureauConfiguration/config/{organisationCreditBureauId}Get + Configuration
CreditBureauConfiguration/configuration/{configurationId}Update + Configuration
CreditBureauConfiguration/organisationCreditBureau/{organisationCreditBureauId}Create Organisation-Credit-Bureau
CreditBureauConfiguration/organisationCreditBureauGet Organisation-Credit-BureauUpdate Organisation-Credit-Bureau
CreditBureauConfiguration/mappings/{CreditBureauId}Create CreditBureau-LoanProduct + Mapping
CreditBureauConfiguration/mappingsGet all MappingsUpdate + Mappings
ThitsaWorks CreditBureau Integration + creditBureauIntegration/creditReportFetch ThitsaWorks CreditReport
creditBureauIntegration/creditReport/{creditBureauId}Get Credit-Report Information
Two-Factor Configurationtwofactor/configureRetrieve + Two-Factor ConfigurationUpdate + Two-Factor Configuration
-
- POST https://Domain Name/api/v1/groups/{groupId}?command=assignRole - POST groups/1?command=assignRole -Content-Type: application/json -Request Body: -{ - "clientId": "1", - "role":30 -} - - -{ - "clientId": 1, - "groupId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

Unassign a Role

-

Allows you to unassign Roles associated tp Group members.

-
-
- POST https://Domain Name/api/v1/groups/{groupId}?command=unassignRole&roleId=1 - POST groups/1?command=unassignRole&roleId=1 -Content-Type: application/json -Request Body: -{} - - -{ - "clientId": 1, - "groupId": 1, - "resourceId": 1 -} - -
- -   -
-
-

Update a Role

-

Allows you to update the member Role.

+
+
+

Non-Core

+
+
- - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Mandatory Fields
role
+
+ + + + +
RESOURCES
+
+
+ + + + + + + +
+
POST
+
+
create/complex + update +
+
+
+ + + + + + + +
+
GET
+
+
read
+
+
+ + + + + + + +
+
PUT
+
+
update
+
+
+ + + + + + + +
+
DELETE
+
+
delete
+
+
Data TabledatatablesCreate Data TableList Data Tables
datatables/{datatable}Retrieve Data Table DetailsUpdate Data TableDelete Data Table
datatables/register/{datatable}/{apptable}Register Data Table
datatables/deregister/{datatable}Deregister Data + Table
datatables/{datatable}/{apptableId}Create Entry in Data + TableRetrieve Entry(s) + from Data TableUpdate Entry in Data + Table (One to One)Delete Entry(s) in + Data Table
datatables/{datatable}/{apptableId}/{datatableId}Update Entry in + Data Table (One to Many)Delete Entry in + Data Table (One to Many)
Notes{resource}/{resourceId}/notesAdd a Resource NoteRetrieve a Resource's Notes
{resource}/{resourceId}/notes/{noteId}List All + Notes for a ResourceUpdate a Resource NoteDelete a Resource Note
Documents{entityType}/{entityId}/documentsCreate a DocumentList All Document Details
{entityType}/{entityId}/documents/{documentId}Retrieve a Documents DetailsUpdate a DocumentDelete a Document
{entityType}/{entityId}/documents/{documentId}/attachmentRetrieve + binary file associated with a + Document +
SearchsearchSearch Resources
AdHoc Searchsearch/advanceAdvance Search
Surveysurvey/List surveys
survey/{surveyName}Retrieve Survey details
survey/{surveyName}/{clientId}Create Entry in the survey table
-
- POST https://Domain Name/api/v1/groups/{groupId}?command=updateRole&roleId=2 - POST groups/1?command=updateRole&roleId=2 -Content-Type: application/json -Request Body: -{ - "role":"31" -} - - -{ - "groupId": 1, - "resourceId": 2, - "changes":{"role":31} -} - -
- -   -
-
-

Retrieve a Group

-

Retrieve group information.

-
-
associations
-
- String optional -
-
- One of, or comma separated of clientMembers, activeClientMembers, groupRoles, calendars, collectionMeetingCalendar -
- or all for all associations. -
-
staffInSelectedOfficeOnly
-
- Boolean optional, defaults to false -
-
If staffInSelectedOfficeOnly=true only staff - who are associated with the selected branch are returned.
-
roleId
-
- Long optional -
-
If present, will retrieve group role information
-
-

Example Requests:

-
groups/1
-
-
groups/1?associations=clientMembers
-
-
-

Group without any associations.

- -GET https://DomainName/fineract-provider/api/v1/groups/1 - - -{ - "id": 1, - "name": "First Group", - "externalId": "000-1A", - "officeId": 1, - "officeName": "Head Office", - "hierarchy": ".1.", - "timeline": { - "activatedOnDate": [ - 2013, - 11, - 14 - ], - "activatedByUsername": "mifos", - "activatedByFirstname": "App", - "activatedByLastname": "Administrator" - } -} - -
-
-

Group along with all its Clients.

- -GET https://DomainName/fineract-provider/api/v1/groups/1?associations=clientMembers - - -{ - "id": 1, - "name": "First Group", - "externalId": "000-1A", - "officeId": 1, - "officeName": "Head Office", - "hierarchy": ".1.", - "timeline": { - "activatedOnDate": [ - 2013, - 11, - 14 - ], - "activatedByUsername": "mifos", - "activatedByFirstname": "App", - "activatedByLastname": "Administrator" - }, - "clientMembers": [ - { - "id": 1, - "accountNo": "000000001", - "externalId": "786YYH7", - "activationDate": [ - 2009, - 3, - 4 - ], - "firstname": "Petra", - "lastname": "Yton", - "displayName": "Petra Yton", - "officeId": 1, - "officeName": "Head Office" - } - ] -} - +
+
+

Report

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
RESOURCES
+
+
+ + + + + + + +
+
POST
+
+
create/complex + update +
+
+
+ + + + + + + +
+
GET
+
+
read
+
+
+ + + + + + + +
+
PUT
+
+
update
+
+
+ + + + + + + +
+
DELETE
+
+
delete
+
+
ReportreportsCreate a ReportList Reports
reports/{id}Retrieve a ReportUpdate a ReportDelete a Report
Run Reportrunreports/{reportName}Run a Report
Report Mailing JobreportmailingjobCreate a Report Mailing JobList Reports Mailing Jobs
reportmailingjob/{id}Retrieve a Report Mailing JobUpdate a Report Mailing JobDelete a Report Mailing Job
reportmailingjobrunhistory/{jobId}Retrieve Reports Mailing Job History
- - -   -
-
-

Retrieve Group accounts overview

-

- Retrieves details of all Loan and Savings accounts associated with this group. -

-

Example Requests:

-
groups/1/accounts
-
-
-
groups/1/accounts?fields=loanAccounts,savingsAccounts,memberLoanAccounts,
memberSavingsAccounts
-
-
- -GET https://DomainName/api/v1/groups/{groupId}/accounts - - -{ - "loanAccounts": [ - { - "id": 3, - "accountNo": "000000003", - "productId": 3, - "productName": "daily product", - "status": { - "id": 100, - "code": "loanStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "pendingApproval": true, - "waitingForDisbursal": false, - "active": false, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "loanType": { - "id": 2, - "code": "accountType.group", - "value": "Group" - } - } - ], - "savingsAccounts": [ - { - "id": 9, - "accountNo": "000000009", - "productId": 1, - "productName": "p_sav", - "status": { - "id": 100, - "code": "savingsAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "accountType": { - "id": 2, - "code": "accountType.group", - "value": "Group" - } - }, - { - "id": 4, - "accountNo": "000000004", - "productId": 1, - "productName": "p_sav", - "status": { - "id": 300, - "code": "savingsAccountStatusType.active", - "value": "Active", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": true, - "closed": false - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "accountType": { - "id": 2, - "code": "accountType.group", - "value": "Group" - } - } - ], - "memberLoanAccounts": [ - { - "id": 4, - "accountNo": "000000004", - "productId": 1, - "productName": "testLoan", - "status": { - "id": 200, - "code": "loanStatusType.approved", - "value": "Approved", - "pendingApproval": false, - "waitingForDisbursal": true, - "active": false, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "loanType": { - "id": 3, - "code": "accountType.jlg", - "value": "JLG" - } - }, - { - "id": 7, - "accountNo": "000000007", - "productId": 2, - "productName": "weekly product", - "status": { - "id": 100, - "code": "loanStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "pendingApproval": true, - "waitingForDisbursal": false, - "active": false, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "loanType": { - "id": 3, - "code": "accountType.jlg", - "value": "JLG" - } - } - ], - "memberSavingsAccounts": [ - { - "id": 3, - "accountNo": "000000003", - "productId": 1, - "productName": "p_sav", - "status": { - "id": 100, - "code": "savingsAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "accountType": { - "id": 3, - "code": "accountType.jlg", - "value": "JLG" - } - }, - { - "id": 10, - "accountNo": "000000010", - "productId": 1, - "productName": "p_sav", - "status": { - "id": 100, - "code": "savingsAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "accountType": { - "id": 3, - "code": "accountType.jlg", - "value": "JLG" - } - } - ] -} - -
-
- - -   -
-
-

Update a Group

-
-
- -PUT https://DomainName/fineract-provider/api/v1/groups/{groupid} - - -PUT groups/1 -Content-Type: application/json -Request Body: -{ - "name": "First Group (changed)" -} - - -{ - "officeId": 1, - "groupId": 1, - "resourceId": 1, - "changes": { - "name": "First Group (changed)" - } -} - -
-
- -   -
-
-

Delete a Group

-

A group can be deleted if it is in pending state and has no associations - clients, loans or savings

-
-
- -POST https://DomainName/fineract-provider/api/v1/groups/{groupid} - - -DELETE groups/2 - - -{ - "officeId": 1, - "groupId": 2, - "resourceId": 2 -} - -
-
- -   -
-
-

List Groups

-

The default implementation of listing Groups returns 200 entries with support for pagination and sorting. Using the parameter limit with value -1 returns all entries.

-
Optional Arguments
-
-
paged
-
- Boolean optional, defaults to false -
-
If paged is true then results will be paginated.
-
offset
-
- Integer optional, defaults to 0 -
-
Indicates from what result to start from.
- -
limit
-
- Integer optional, defaults to 200 -
-
Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- -
orderBy
-
- String optional, one of displayName, accountNo, officeId, officeName -
-
Orders the results by the field indicated.
- -
sortBy
-
- String optional, one of ASC, DESC -
-
Indicates what way to order results if orderBy is used.
- -
officeId
-
- Integer optional -
-
Provides ability to restrict list of groups returned based on the office there associated with.
-
underHierarchy
-
- String optional -
-
Use the office hierarchy string to return all groups under a given hierarchy.
- -
name
-
- String optional -
-
Use name of groups to restrict results.
- -
externalId
-
- String optional -
-
Use externalId of groups to restrict results.
- -
orphansOnly
-
- Boolean optional, defaults to false -
-
Use orphansOnly as true to list groups which are not associated to any center/parent.
-
-

Example Requests:

-
groups
-
-
groups?fields=name,officeName,joinedDate
-
-
groups?offset=10&limit=50
-
-
groups?orderBy=name&sortOrder=DESC
-
-
- -GET https://DomainName/fineract-provider/api/v1/groups?paged=true - - -{ - "totalFilteredRecords": 2, - "pageItems": [ - { - "id": 4, - "name": "AnotherGroup", - "status": { - "id": 100, - "code": "clientStatusType.pending", - "value": "Pending" - }, - "active": false, - "officeId": 1, - "officeName": "Head Office", - "hierarchy": ".4." - } - ] -} - -
-
- - - -   -
-
-

Retrieve a GSIM Application

-

Associations: String optional - One of, or comma separated of GSIM Applications or all for all associations -

- -
-
- -GET https://DomainName/fineract-provider/api/v1/groups/{groupId}/gsimaccounts - - - - -[{ - "gsimId": 1, - "groupId": 1, - "accountNumber": "000000006", - "childGSIMAccounts": [], - "parentBalance": 2500.000000, - "savingsStatus": "SUBMITTED_AND_PENDING_APPROVAL" - }, - { - "gsimId": 8, - "groupId": 1, - "accountNumber": "000000014", - "childGSIMAccounts": [{ - "id": 14, - "displayName": "(1) qwe poi", - "accountNo": "0000000141", - "productId": 1, - "productName": "productrial", - "shortProductName": "Ipro", - "status": { - "id": 400, - "code": "savingsAccountStatusType.withdrawn.by.applicant", - "value": "Withdrawn by applicant", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "withdrawnByApplicant": true, - "active": false, - "closed": true, - "prematureClosed": false, - "transferInProgress": false, - "transferOnHold": false, - "matured": false - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "accountType": { - "id": 0, - "code": "accountType.invalid", - "value": "Invalid" - }, - "timeline": { - "submittedOnDate": [2020, 6, 3], - "submittedByUsername": "mifos", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator", - "withdrawnOnDate": [2020, 6, 3], - "withdrawnByUsername": "mifos", - "withdrawnByFirstname": "App", - "withdrawnByLastname": "Administrator", - "closedOnDate": [2020, 6, 3], - "closedByUsername": "mifos", - "closedByFirstname": "App", - "closedByLastname": "Administrator" - }, - "subStatus": { - "id": 0, - "code": "SavingsAccountSubStatusEnum.none", - "value": "None", - "none": true, - "inactive": false, - "dormant": false, - "escheat": false, - "block": false, - "blockCredit": false, - "blockDebit": false - }, - "depositType": { - "id": 100, - "code": "depositAccountType.savingsDeposit", - "value": "Savings" - } - }], - "parentBalance": 0.000000, - "savingsStatus": "SUBMITTED_AND_PENDING_APPROVAL" - }, { - "gsimId": 10, - "groupId": 1, - "accountNumber": "000000016", - "childGSIMAccounts": [{ - "id": 16, - "displayName": "(1) qwe poi", - "accountNo": "0000000161", - "productId": 1, - "productName": "productrial", - "shortProductName": "Ipro", - "status": { - "id": 600, - "code": "savingsAccountStatusType.closed", - "value": "Closed", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": true, - "prematureClosed": false, - "transferInProgress": false, - "transferOnHold": false, - "matured": false - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "accountType": { - "id": 0, - "code": "accountType.invalid", - "value": "Invalid" - }, - "timeline": { - "submittedOnDate": [2020, 6, 3], - "submittedByUsername": "mifos", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator", - "approvedOnDate": [2020, 6, 4], - "approvedByUsername": "mifos", - "approvedByFirstname": "App", - "approvedByLastname": "Administrator", - "activatedOnDate": [2020, 6, 4], - "closedOnDate": [2020, 6, 4], - "closedByUsername": "mifos", - "closedByFirstname": "App", - "closedByLastname": "Administrator" - }, - "subStatus": { - "id": 0, - "code": "SavingsAccountSubStatusEnum.none", - "value": "None", - "none": true, - "inactive": false, - "dormant": false, - "escheat": false, - "block": false, - "blockCredit": false, - "blockDebit": false - }, - "lastActiveTransactionDate": [2020, 6, 4], - "depositType": { - "id": 100, - "code": "depositAccountType.savingsDeposit", - "value": "Savings" - } - }], - "parentBalance": 0.000000, - "savingsStatus": "CLOSED_OBLIGATIONS_MET" -}] - - -
-
- - - - -   -
-
-

Retrieve a GLIM Application

-

Associations: String optional - One of, or comma separated of GLIM Applications or all for all associations -

- -
-
- -GET https://DomainName/fineract-provider/api/v1/groups/{groupId}/glimaccounts - - - -[{ - "glimId": 1, - "groupId": 1, - "accountNumber": "000000002", - "childGLIMAccounts": [{ - "id": 2, - "accountNo": "0000000021", - "parentAccountNumber": "000000002", - "productId": 1, - "productName": "loanp1", - "shortProductName": "LP1", - "status": { - "id": 500, - "code": "loanStatusType.rejected", - "value": "Rejected", - "pendingApproval": false, - "waitingForDisbursal": false, - "active": false, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "loanType": { - "id": 4, - "code": "accountType.glim", - "value": "GLIM" - }, - "timeline": { - "submittedOnDate": [2020, 6, 10], - "submittedByUsername": "mifos", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator", - "rejectedOnDate": [2020, 6, 12], - "rejectedByUsername": "mifos", - "rejectedByFirstname": "App", - "rejectedByLastname": "Administrator", - "expectedDisbursementDate": [2020, 6, 10], - "closedOnDate": [2020, 6, 12], - "closedByUsername": "mifos", - "closedByFirstname": "App", - "closedByLastname": "Administrator", - "expectedMaturityDate": [2021, 4, 10], - "writeOffByUsername": "mifos", - "writeOffByFirstname": "App", - "writeOffByLastname": "Administrator" - }, - "inArrears": false - }], - "parentPrincipalAmount": 10.000000, - "loanStatus": "SUBMITTED_AND_PENDING_APPROVAL" -},{ - "glimId": 2, - "groupId": 1, - "accountNumber": "000000003", - "childGLIMAccounts": [{ - "id": 3, - "accountNo": "0000000031", - "parentAccountNumber": "000000003", - "productId": 1, - "productName": "loanp1", - "shortProductName": "LP1", - "status": { - "id": 200, - "code": "loanStatusType.approved", - "value": "Approved", - "pendingApproval": false, - "waitingForDisbursal": true, - "active": false, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "loanType": { - "id": 4, - "code": "accountType.glim", - "value": "GLIM" - }, - "timeline": { - "submittedOnDate": [2020, 6, 10], - "submittedByUsername": "mifos", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator", - "approvedOnDate": [2020, 6, 12], - "approvedByUsername": "mifos", - "approvedByFirstname": "App", - "approvedByLastname": "Administrator", - "expectedDisbursementDate": [2020, 6, 10], - "expectedMaturityDate": [2021, 4, 10] - }, - "inArrears": false - }], - "parentPrincipalAmount": 10.000000, - "loanStatus": "SUBMITTED_AND_PENDING_APPROVAL" -}] - +
+
+

Template

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
RESOURCES
+
+
+ + + + + + + +
+
GET
+
+
read
+
+
clients/templateRetrieve Client Template
groups/templateRetrieve Group Template
loanproducts/templateRetrieve Loan Product Template
loanproducts/template?isProductMixTemplate=trueRetrieve Loan Product Mix Template
loans/template?clientId={clientId}Retrieve Loan Template
loans/{loanId}/transactions/templateRetrieve Loan Transaction Template
charges/templateRetrieve Charge Template
offices/templateRetrieve Office Template
users/templateRetrieve User Template
hooks/templateRetrieve Hooks Template
audits/searchtemplateRetrieve Audit Search Template
makercheckers/searchtemplateRetrieve Maker Checker Search Template
reports/templateRetrieve Report Template
accountingrules/templateRetrieve Accounting Rule Template
savingproducts/templateRetrieve Savings Product Template
savingsaccounts/template?clientId={clientId}Retrieve savings template
savingsaccounts/{accountId}/transactions/templateRetrieve savings account transaction + template
standinginstructions/templateRetrieve Standing Instruction Template
accounttransfers/templateRetrieve Account Transfer Template
+
- - - - - - - - - -   -
-
-

Loans

-

The API concept of loans models the loan application process and the loan contract/monitoring process.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
accountNo
The account no. associated with this loan. Is auto generated if not provided at loan application creation time.
externalId
A place to put an external reference for - this loan e.g. The ID another system uses.
If provided, - it must be unique. -
fundId
Optional: For associating a loan with a given fund.
loanOfficerId
Optional: For associating a loan with a given staff member who is a loan officer.
loanPurposeId
Optional: For marking a loan with a given loan purpose option. Loan purposes are configurable and can be setup by system admin through code/code values screens.
principal
The loan amount to be disbursed to through loan.
loanTermFrequency
The length of loan term
Used like: - loanTermFrequency loanTermFrequencyType
e.g. 12 Months -
loanTermFrequencyType
The loan term period to use. Used like: - loanTermFrequency loanTermFrequencyType
e.g. 12 Months - Example Values: 0=Days, 1=Weeks, 2=Months, 3=Years -
numberOfRepayments
Number of installments to repay.
- Used like: numberOfRepayments Every repaymentEvery - repaymentFrequencyType
e.g. 10 (repayments) Every 12 Weeks -
repaymentEvery
Used like: numberOfRepayments Every - repaymentEvery repaymentFrequencyType
e.g. 10 - (repayments) Every 12 Weeks -
repaymentFrequencyType
Used like: numberOfRepayments Every - repaymentEvery repaymentFrequencyType
e.g. 10 - (repayments) Every 12 Weeks
- Example Values: 0=Days, 1=Weeks, 2=Months -
interestRatePerPeriod
Interest Rate.
Used like: - interestRatePerPeriod % interestRateFrequencyType - interestType
- e.g. 12.0000% Per year - Declining Balance -
interestRateFrequencyType
Used like: interestRatePerPeriod% - interestRateFrequencyType - interestType
e.g. 12.0000% - Per year - Declining Balance
- Example Values: 2=Per month, 3=Per year -
graceOnPrincipalPayment
Optional: Integer - represents the number of repayment periods that grace should apply to the principal component of a repayment period. -
graceOnInterestPayment
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. -
graceOnInterestCharged
Optional: Integer - represents the number of repayment periods that should be interest-free. -
graceOnArrearsAgeing
Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAgeing days overdue. -
interestChargedFromDate
Optional: Date - The date from with interest is to start being charged.
expectedDisbursementDate
The proposed disbursement date of the loan so a proposed repayment schedule can be provided.
submittedOnDate
The date the loan application was submitted by applicant.
linkAccountId
The Savings Account id for linking with loan account for payments.
amortizationType
Example Values: 0=Equal - principle payments, 1=Equal installments
interestType
Used like: interestRatePerPeriod% - interestRateFrequencyType - interestType
e.g. 12.0000% - Per year - Declining Balance
- Example Values: 0=Declining Balance, 1=Flat -
interestCalculationPeriodType
Example Values: 0=Daily, 1=Same as repayment period
allowPartialPeriodInterestCalculation
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) -
inArrearsTolerance
The amount that can be 'waived' at end - of all loan payments because it is too small to worry about.
- This is also the tolerance amount assessed when determining if a - loan is in arrears. -
transactionProcessingStrategyCode
-An enumeration that indicates the type of transaction processing strategy to be used. This relates to functionality that is also known as Payment Application Logic. - -

A number of out of the box approaches exist, some are custom to specific MFIs, some are more general and indicate the order in which payments are processed.

- -

Refer to the Payment Application Logic / Transaction Processing Strategy section in the appendix for more detailed overview of each available payment application logic provided out of the box.

- -List of current approaches:
-
    -
  • 1 = Mifos style (Similar to Old Mifos)
  • -
  • 2 = Heavensfamily (Custom MFI approach)
  • -
  • 3 = Creocore (Custom MFI approach)
  • -
  • 4 = RBI (India)
  • -
  • 5 = Principal Interest Penalties Fees Order
  • -
  • 6 = Interest Principal Penalties Fees Order
  • -
  • 7 = Early Payment Strategy
  • -
- - -
loanType
To represent different type of loans.
- At present there are three type of loans are supported. -
Available loan types: -
    -
  1. individual: Loan given to individual member
  2. -
  3. group: Loan given to group as a whole
  4. -
  5. jlg: Joint liability group loan given to members in a group on individual basis. JLG loan can be given to one or more members in a group.
  6. -
-
recalculationRestFrequencyDate
Specifies rest frequency start date for interest recalculation. This date must be before or equal to disbursement date -
recalculationCompoundingFrequencyDate
Specifies compounding frequency start date for interest recalculation. This date must be equal to disbursement date -
-
-
- -   -
-
-

Retrieve Loan Details Template

-

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
  • -
-

-
Arguments
-
-
templateType
-
- String mandatory, allowed values are individual, group, jlg, jlgbulk -
-
-
templateType value decides the required template data for creating a new loan application. - -
-
-
'individual': Loan template data for creating individual loans. -
-
- 'group': Loan template data for creating a group loan (loan given to group as a whole). -
-
- 'jlg': Loan template data for creating a Joint liability group loan for a client. -
-
- 'jlgbulk': Loan template data for creating a Joint liability group loan for multiple clients at a time in a group. -
-
clientId
-
- Integer mandatory -
-
-
Optional Arguments
-
-
productId
-
- Integer optional -
-
If entered, productId, productName and selectedProduct - fields are returned.
- -
staffInSelectedOfficeOnly
-
- Boolean optional -
-
Defaults to false if not provided. If staffInSelectedOfficeOnly=true only loan officers - who are associated with the selected branch are returned.
-
activeOnly
-
- Boolean optional -
-
Defaults to false if not provided. If activeOnly=true only active loan products are returned.
-
-

Example Requests:

-
loans/template?templateType=individual&clientId=1
-
-
-
loans/template?templateType=individual&clientId=1&productId=1
-
-
- -GET https://DomainName/api/v1/loans/template?templateType=individual&clientId=1 - - -{ - "clientId": 1, - "clientName": "Kampala first Client", - "clientOfficeId": 2, - "timeline": { - "expectedDisbursementDate": [ - 2013, - 3, - 8 - ] - }, - "productOptions": [ - { - "id": 1, - "name": "Kampala Product (with cash accounting)" - } - ] -} - - -GET https://DomainName/api/v1/loans/template?templateType=individual&clientId=1&productId=1 - - -{ - "clientId": 1, - "clientName": "Kampala first Client", - "clientOfficeId": 2, - "loanProductId": 1, - "loanProductName": "Kampala Product (with cash accounting)", - "loanProductDescription": "Typical Kampala loan product with cash accounting enabled for testing.", - "currency": { - "code": "UGX", - "name": "Uganda Shilling", - "decimalPlaces": 2, - "displaySymbol": "USh", - "nameCode": "currency.UGX", - "displayLabel": "Uganda Shilling (USh)" - }, - "principal": 1000000, - "termFrequency": 12, - "termPeriodFrequencyType": { - "id": 2, - "code": "repaymentFrequency.periodFrequencyType.months", - "value": "Months" - }, - "numberOfRepayments": 12, - "repaymentEvery": 1, - "repaymentFrequencyType": { - "id": 2, - "code": "repaymentFrequency.periodFrequencyType.months", - "value": "Months" - }, - "interestRatePerPeriod": 24, - "interestRateFrequencyType": { - "id": 3, - "code": "interestRateFrequency.periodFrequencyType.years", - "value": "Per year" - }, - "annualInterestRate": 24, - "amortizationType": { - "id": 1, - "code": "amortizationType.equal.installments", - "value": "Equal installments" - }, - "interestType": { - "id": 1, - "code": "interestType.flat", - "value": "Flat" - }, - "interestCalculationPeriodType": { - "id": 1, - "code": "interestCalculationPeriodType.same.as.repayment.period", - "value": "Same as repayment period" - }, - "transactionProcessingStrategyCode": "mifos-standard-strategy", - "timeline": { - "expectedDisbursementDate": [ - 2013, - 3, - 8 - ] - }, - "daysInMonthType": { - "id": 30, - "code": "DaysInMonthType.days360", - "value": "30 Days" - }, - "daysInYearType": { - "id": 360, - "code": "DaysInYearType.days360", - "value": "360 Days" - }, - "isInterestRecalculationEnabled": true, - "interestRecalculationData": { - "interestRecalculationCompoundingType": { - "id": 2, - "code": "interestRecalculationCompoundingMethod.fee", - "value": "Fee" - }, - "recalculationCompoundingFrequencyType": { - "id":1, - "code":"interestRecalculationFrequencyType.same.as.repayment.period", - "value":"Same as repayment period" - }, - "rescheduleStrategyType": { - "id": 2, - "code": "loanRescheduleStrategyMethod.reduce.number.of.installments", - "value": "Reduce number of installments" - }, - "recalculationRestFrequencyType": { - "id":1, - "code":"interestRecalculationFrequencyType.same.as.repayment.period", - "value":"Same as repayment period" - } - } - "charges": [], - "productOptions": [ - { - "id": 1, - "name": "Kampala Product (with cash accounting)" - } - ], - "loanOfficerOptions": [ - { - "id": 2, - "firstname": "Kampala", - "lastname": "LoanOfficer", - "displayName": "LoanOfficer, Kampala", - "officeId": 2, - "officeName": "Uganda (Kampala)", - "isLoanOfficer": true - } - ], - "loanPurposeOptions": [ - { - "id": 20, - "name": "option.Agriculture", - "position": 1 - }, - { - "id": 21, - "name": "option.Manufacturing", - "position": 20 - }, - { - "id": 22, - "name": "option.HousingImprovement", - "position": 21 - } - ], - "termFrequencyTypeOptions": [ - { - "id": 0, - "code": "loanTermFrequency.periodFrequencyType.days", - "value": "Days" - }, - { - "id": 1, - "code": "loanTermFrequency.periodFrequencyType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "loanTermFrequency.periodFrequencyType.months", - "value": "Months" - }, - { - "id": 3, - "code": "loanTermFrequency.periodFrequencyType.years", - "value": "Years" - } - ], - "repaymentFrequencyTypeOptions": [ - { - "id": 0, - "code": "repaymentFrequency.periodFrequencyType.days", - "value": "Days" - }, - { - "id": 1, - "code": "repaymentFrequency.periodFrequencyType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "repaymentFrequency.periodFrequencyType.months", - "value": "Months" - } - ], - "interestRateFrequencyTypeOptions": [ - { - "id": 2, - "code": "interestRateFrequency.periodFrequencyType.months", - "value": "Per month" - }, - { - "id": 3, - "code": "interestRateFrequency.periodFrequencyType.years", - "value": "Per year" - } - ], - "amortizationTypeOptions": [ - { - "id": 1, - "code": "amortizationType.equal.installments", - "value": "Equal installments" - }, - { - "id": 0, - "code": "amortizationType.equal.principal", - "value": "Equal principle payments" - } - ], - "interestTypeOptions": [ - { - "id": 1, - "code": "interestType.flat", - "value": "Flat" - }, - { - "id": 0, - "code": "interestType.declining.balance", - "value": "Declining Balance" - } - ], - "interestCalculationPeriodTypeOptions": [ - { - "id": 0, - "code": "interestCalculationPeriodType.daily", - "value": "Daily" - }, - { - "id": 1, - "code": "interestCalculationPeriodType.same.as.repayment.period", - "value": "Same as repayment period" - } - ], - "transactionProcessingStrategyOptions": [ - { - "id": 2, - "code": "heavensfamily-strategy", - "name": "Heavensfamily" - } - ], - "chargeOptions": [ - { - "id": 1, - "name": "Bank Fee (per installment)", - "active": true, - "penalty": false, - "currency": { - "code": "UGX", - "name": "Uganda Shilling", - "decimalPlaces": 2, - "displaySymbol": "USh", - "nameCode": "currency.UGX", - "displayLabel": "Uganda Shilling (USh)" - }, - "amount": 1500, - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - } - } - ], - "loanCollateralOptions": [ - { - "id": 17, - "name": "option.House", - "position": 1 - }, - { - "id": 18, - "name": "option.Television", - "position": 17 - }, - { - "id": 19, - "name": "option.Gold", - "position": 18 - } - ], - "accountLinkingOptions":[ - { - "id":1, - "accountNo":"000000001", - "clientId":1, - "clientName":"pramod nuthakki", - "productId":1, - "productName":"pramod sav", - "fieldOfficerId":0, - "currency":{"code":"USD","name":"US Dollar","decimalPlaces":2,"displaySymbol":"$","nameCode":"currency.USD","displayLabel":"US Dollar ($)"} - } - ], - "datatables": [{ - "applicationTableName": "m_loan", - "registeredTableName": "loan_balance", - "columnHeaderData": [{ - "columnName": "loan_id", - "columnType": "bigint", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": false, - "isColumnPrimaryKey": true, - "columnValues": [] - }, - { - "columnName": "account_number", - "columnType": "varchar", - "columnLength": 25, - "columnDisplayType": "STRING", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "Balance", - "columnType": "decimal", - "columnLength": 0, - "columnDisplayType": "DECIMAL", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [] - }] - }, - { - "applicationTableName": "m_loan", - "registeredTableName": "Loan Enrichment", - "columnHeaderData": [{ - "columnName": "loan_id", - "columnType": "bigint", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": false, - "isColumnPrimaryKey": true, - "columnValues": [] - }, - { - "columnName": "Activation Date", - "columnType": "date", - "columnLength": 0, - "columnDisplayType": "DATE", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - }] - }] -} - -
-
- -   -
-
-

Retrieve a Loan

-

- Note: template=true parameter doesn't apply to this resource. -

-
Arguments
-
-
associations
-
- optional, Either 'all' or a comma separated list of - loan 'associations' (itemised below). -
-
exclude
-
- optional, 'all' and a comma separated list of - loan associations (itemised below) as 'exclude'. -
-
-
Associations are just extra pieces of data that you - might or might not want to retrieve.
-
-
-
- 'all': Gets all association data. -
-
- 'repaymentSchedule': Loan schedule data. -
-
- 'originalSchedule': Loan schedule data without interest recalculations. -
-
- 'futureSchedule': Loan schedule data from today date(will be displayed only for interest first repayment strategy processors) -
-
- 'transactions': Loan transactions data. -
-
- 'charges': Loan charges data. -
-
- 'guarantors': Loan guarantors data. -
-
- 'collateral': Loan collateral data. -
-
-

Example Requests:

-
loans/1
-
-
-
loans/1?fields=id,principal,annualInterestRate
-
-
-
loans/1?associations=all
-
-
loans/1?associations=all&exclude=guarantors
-
-
-
loans/1?fields=id,principal,annualInterestRate&associations=repaymentSchedule,transactions
-
-
- -GET https://DomainName/api/v1/loans/{loanId} - - -{ - "id": 1, - "accountNo": "000000001", - "status": { - "id": 300, - "code": "loanStatusType.active", - "value": "Active", - "pendingApproval": false, - "waitingForDisbursal": false, - "active": true, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "clientId": 1, - "clientName": "Kampala first Client", - "clientOfficeId": 2, - "loanProductId": 1, - "loanProductName": "Kampala Product (with cash accounting)", - "loanProductDescription": "Typical Kampala loan product with cash accounting enabled for testing.", - "loanPurposeId": 22, - "loanPurposeName": "option.HousingImprovement", - "loanOfficerId": 2, - "loanOfficerName": "LoanOfficer, Kampala", - "loanType": { - "id": 1, - "code": "loanType.individual", - "value": "Individual" - }, - "currency": { - "code": "UGX", - "name": "Uganda Shilling", - "decimalPlaces": 2, - "displaySymbol": "USh", - "nameCode": "currency.UGX", - "displayLabel": "Uganda Shilling (USh)" - }, - "principal": 1000000, - "termFrequency": 12, - "termPeriodFrequencyType": { - "id": 2, - "code": "termFrequency.periodFrequencyType.months", - "value": "Months" - }, - "numberOfRepayments": 12, - "repaymentEvery": 1, - "repaymentFrequencyType": { - "id": 2, - "code": "repaymentFrequency.periodFrequencyType.months", - "value": "Months" - }, - "interestRatePerPeriod": 24, - "interestRateFrequencyType": { - "id": 3, - "code": "interestRateFrequency.periodFrequencyType.years", - "value": "Per year" - }, - "annualInterestRate": 24, - "amortizationType": { - "id": 1, - "code": "amortizationType.equal.installments", - "value": "Equal installments" - }, - "interestType": { - "id": 1, - "code": "interestType.flat", - "value": "Flat" - }, - "interestCalculationPeriodType": { - "id": 1, - "code": "interestCalculationPeriodType.same.as.repayment.period", - "value": "Same as repayment period" - }, - "transactionProcessingStrategyCode": "mifos-standard-strategy", - "timeline": { - "submittedOnDate": [ - 2012, - 4, - 3 - ], - "submittedByUsername": "admin", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator", - "approvedOnDate": [ - 2012, - 4, - 3 - ], - "approvedByUsername": "admin", - "approvedByFirstname": "App", - "approvedByLastname": "Administrator", - "expectedDisbursementDate": [ - 2012, - 4, - 10 - ], - "actualDisbursementDate": [ - 2012, - 4, - 10 - ], - "disbursedByUsername": "admin", - "disbursedByFirstname": "App", - "disbursedByLastname": "Administrator", - "expectedMaturityDate": [ - 2013, - 4, - 10 - ] - }, - "summary": { - "currency": { - "code": "UGX", - "name": "Uganda Shilling", - "decimalPlaces": 2, - "displaySymbol": "USh", - "nameCode": "currency.UGX", - "displayLabel": "Uganda Shilling (USh)" - }, - "principalDisbursed": 1000000, - "principalPaid": 0, - "principalWrittenOff": 0, - "principalOutstanding": 1000000, - "principalOverdue": 833333.3, - "interestCharged": 240000, - "interestPaid": 0, - "interestWaived": 0, - "interestWrittenOff": 0, - "interestOutstanding": 240000, - "interestOverdue": 200000, - "feeChargesCharged": 18000, - "feeChargesDueAtDisbursementCharged": 0, - "feeChargesPaid": 0, - "feeChargesWaived": 0, - "feeChargesWrittenOff": 0, - "feeChargesOutstanding": 18000, - "feeChargesOverdue": 15000, - "penaltyChargesCharged": 0, - "penaltyChargesPaid": 0, - "penaltyChargesWaived": 0, - "penaltyChargesWrittenOff": 0, - "penaltyChargesOutstanding": 0, - "penaltyChargesOverdue": 0, - "totalExpectedRepayment": 1258000, - "totalRepayment": 0, - "totalExpectedCostOfLoan": 258000, - "totalCostOfLoan": 0, - "totalWaived": 0, - "totalWrittenOff": 0, - "totalOutstanding": 1258000, - "totalOverdue": 1048333.3, - "overdueSinceDate": [ - 2012, - 5, - 10 - ], - "linkedAccount":{ - "id":1, - "accountNo":"000000001" - }, - "disbursementDetails":[{"id":71,"expectedDisbursementDate":[2013,11,1],"principal":22000.000000,"approvedPrincipal":22000.000000}], - "fixedEmiAmount":1100.000000, - "maxOutstandingLoanBalance":35000, - "canDisburse":false, - "emiAmountVariations": [], - "inArrears": true, - "isNPA":false, - "overdueCharges": [ - { - "id": 20, - "name": "overdraft penality", - "active": true, - "penalty": true, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 3.000000, - "chargeTimeType": { - "id": 9, - "code": "chargeTimeType.overdueInstallment", - "value": "overdue fees" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - "chargeCalculationType": { - "id": 2, - "code": "chargeCalculationType.percent.of.amount", - "value": "% Amount" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - }, - "feeInterval": 2, - "feeFrequency": { - "id": 1, - "code": "feeFrequencyperiodFrequencyType.weeks", - "value": "Weeks" - } - } - ] - } -} - -
-
- -   -
-
-

List Loans

-

The list capability of loans can support pagination and sorting.

-
Optional Arguments
-
-
offset
-
- Integer optional, defaults to 0 -
-
Indicates from what result to start from.
- -
limit
-
- Integer optional, defaults to 200 -
-
Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- -
orderBy
-
- String optional, one of displayName, accountNo, officeId, officeName -
-
Orders the results by the field indicated.
- -
sortBy
-
- String optional, one of ASC, DESC -
-
Indicates what way to order results if orderBy is used.
- -
officeId
-
- Integer optional -
-
Provides ability to restrict list of loans returned based on the office there associated with.
- -
underHierarchy
-
- String optional -
-
Use the office hierarchy string to return all loans under a given hierarchy.
- -
accountNo
-
- String optional -
-
Use account no. of loans to restrict results.
- -
clientId
-
- String optional -
-
Use client ID of loans to restrict results.
- -
associations
-
String optional, - Comma separated list of recurring loan 'associations' (itemized below). -
-
-
- Associations are just extra pieces of data that you might or might not want to retrieve.
-
-
-
- 'summary': Gets loan account summarry related information. -
- -
externalId
-
- String optional -
-
Use externalId of loan to restrict results.
- -
-

Example Requests:

-
loans
-
-
loans?fields=accountNo
-
-
loans?offset=10&limit=50
-
-
loans?orderBy=accountNo&sortOrder=DESC
-
-
- -GET https://DomainName/fineract-provider/api/v1/loans - - -{ - "totalFilteredRecords": 1, - "pageItems": [ - { - "id": 1, - "accountNo": "000000001", - "status": { - "id": 300, - "code": "loanStatusType.active", - "value": "Active", - "pendingApproval": false, - "waitingForDisbursal": false, - "active": true, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "clientId": 1, - "clientName": "Change To IndividualName", - "clientOfficeId": 1, - "loanProductId": 1, - "loanProductName": "AgriCredit", - "loanProductDescription": "test", - "loanType": { - "id": 1, - "code": "loanType.individual", - "value": "Individual" - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "principal": 10000, - "termFrequency": 12, - "termPeriodFrequencyType": { - "id": 2, - "code": "termFrequency.periodFrequencyType.months", - "value": "Months" - }, - "numberOfRepayments": 12, - "repaymentEvery": 1, - "repaymentFrequencyType": { - "id": 2, - "code": "repaymentFrequency.periodFrequencyType.months", - "value": "Months" - }, - "interestRatePerPeriod": 2, - "interestRateFrequencyType": { - "id": 2, - "code": "interestRateFrequency.periodFrequencyType.months", - "value": "Per month" - }, - "annualInterestRate": 24, - "amortizationType": { - "id": 1, - "code": "amortizationType.equal.installments", - "value": "Equal installments" - }, - "interestType": { - "id": 0, - "code": "interestType.declining.balance", - "value": "Declining Balance" - }, - "interestCalculationPeriodType": { - "id": 1, - "code": "interestCalculationPeriodType.same.as.repayment.period", - "value": "Same as repayment period" - }, - "transactionProcessingStrategyCode": "mifos-standard-strategy", - "timeline": { - "submittedOnDate": [ - 2012, - 6, - 1 - ], - "submittedByUsername": "mifos", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator", - "approvedOnDate": [ - 2012, - 6, - 1 - ], - "approvedByUsername": "mifos", - "approvedByFirstname": "App", - "approvedByLastname": "Administrator", - "expectedDisbursementDate": [ - 2012, - 6, - 1 - ], - "actualDisbursementDate": [ - 2012, - 6, - 1 - ], - "disbursedByUsername": "mifos", - "disbursedByFirstname": "App", - "disbursedByLastname": "Administrator", - "expectedMaturityDate": [ - 2013, - 6, - 1 - ] - }, - "linkedAccount":{ - "id":1, - "accountNo":"000000001" - }, - "summary": { - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "principalDisbursed": 10000, - "principalPaid": 3073.07, - "principalWrittenOff": 0, - "principalOutstanding": 6926.93, - "principalOverdue": 5999.92, - "interestCharged": 1347.15, - "interestPaid": 709.33, - "interestWaived": 0, - "interestWrittenOff": 0, - "interestOutstanding": 637.82, - "interestOverdue": 619.28, - "feeChargesCharged": 0, - "feeChargesDueAtDisbursementCharged": 0, - "feeChargesPaid": 0, - "feeChargesWaived": 0, - "feeChargesWrittenOff": 0, - "feeChargesOutstanding": 0, - "feeChargesOverdue": 0, - "penaltyChargesCharged": 0, - "penaltyChargesPaid": 0, - "penaltyChargesWaived": 0, - "penaltyChargesWrittenOff": 0, - "penaltyChargesOutstanding": 0, - "penaltyChargesOverdue": 0, - "totalExpectedRepayment": 11347.15, - "totalRepayment": 3782.4, - "totalExpectedCostOfLoan": 1347.15, - "totalCostOfLoan": 709.33, - "totalWaived": 0, - "totalWrittenOff": 0, - "totalOutstanding": 7564.75, - "totalOverdue": 6619.2, - "overdueSinceDate": [ - 2012, - 11, - 1 - ] - }, - "feeChargesAtDisbursementCharged": 0, - "inArrears":false, - "isNPA":false - } - ] -} - -
-
- -  -
-
-

Retrieve GLIM Application

-

Allows you to retrieve the GLIM Application.

-
-
- -GET https://DomainName/fineract-provider/api/v1/loans/glimAccount/{glimId} - - -[ - { - "glimId": 1, - "groupId": 1, - "clientId": 2, - "clientName": "client1 qwe", - "childLoanId": 2, - "parentAccountNo": "000000002", - "parentPrincipalAmount": 10.000000, - "childLoanAccountNo": "0000000021", - "childPrincipalAmount": 1000.000000 - } -] - -
-
- -   -
-
-

Modify a loan application

-

Loan 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.

-
-
- PUT https://Domain Name/api/v1/loans/{loanId} - PUT loans/1 -Content-Type: application/json -No Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "productId": 1, - "principal": "5000", - "loanTermFrequency": 10, - "loanTermFrequencyType": 0, - "numberOfRepayments": 10, - "repaymentEvery": 1, - "repaymentFrequencyType": 0, - "interestRatePerPeriod": 2, - "interestType": 0, - "interestCalculationPeriodType": 0, - "amortizationType": 1, - "expectedDisbursementDate": "04 March 2014", - "transactionProcessingStrategyCode": "mifos-standard-strategy" -} - - -{ - "officeId": 2, - "clientId": 1, - "loanId": 1, - "resourceId": 1, - "changes": { - "principal": 5000, - "locale": "en" - } -} - -
-
- -   -
-
-

Calculate loan repayment schedule

- - - - - - - -
Mandatory Fields
productId, principal, loanTermFrequency, - loanTermFrequencyType, numberOfRepayments, repaymentEvery, - repaymentFrequencyType, interestRatePerPeriod, - amortizationType, interestType, - interestCalculationPeriodType, expectedDisbursementDate, - transactionProcessingStrategyCode
-
-
- -POST https://DomainName/api/v1/loans?command=calculateLoanSchedule - - -POST loans?command=calculateLoanSchedule -Content-Type: application/json -Request Body: -{ - "dateFormat": "dd MMMM yyyy", - "locale": "en_GB", - "productId": 1, - "principal": "100,000.00", - "loanTermFrequency": 12, - "loanTermFrequencyType": 2, - "numberOfRepayments": 12, - "repaymentEvery": 1, - "repaymentFrequencyType": 2, - "interestRatePerPeriod": 2, - "amortizationType": 1, - "interestType": 0, - "interestCalculationPeriodType": 1, - "expectedDisbursementDate": "20 September 2011", - "transactionProcessingStrategyCode": "mifos-standard-strategy" -} - - -{ - "currency": { - "code": "UGX", - "name": "Uganda Shilling", - "decimalPlaces": 2, - "displaySymbol": "USh", - "nameCode": "currency.UGX", - "displayLabel": "Uganda Shilling (USh)" - }, - "loanTermInDays": 366, - "totalPrincipalDisbursed": 100000, - "totalPrincipalExpected": 100000, - "totalPrincipalPaid": 0, - "totalInterestCharged": 13471.52, - "totalFeeChargesCharged": 0, - "totalPenaltyChargesCharged": 0, - "totalWaived": 0, - "totalWrittenOff": 0, - "totalRepaymentExpected": 113471.52, - "totalRepayment": 0, - "totalOutstanding": 0, - "periods": [ - { - "period": 0, - "dueDate": [ - 2011, - 9, - 20 - ], - "principalDisbursed": 100000, - "principalLoanBalanceOutstanding": 100000, - "feeChargesDue": 0, - "feeChargesOutstanding": 0, - "totalOriginalDueForPeriod": 0, - "totalDueForPeriod": 0, - "totalOutstandingForPeriod": 0, - "totalOverdue": 0, - "totalActualCostOfLoanForPeriod": 0 - }, - { - "period": 1, - "fromDate": [ - 2011, - 9, - 20 - ], - "dueDate": [ - 2011, - 10, - 20 - ], - "daysInPeriod": 30, - "principalOriginalDue": 7455.96, - "principalDue": 7455.96, - "principalOutstanding": 7455.96, - "principalLoanBalanceOutstanding": 92544.04, - "interestOriginalDue": 2000, - "interestDue": 2000, - "interestOutstanding": 2000, - "feeChargesDue": 0, - "penaltyChargesDue": 0, - "totalOriginalDueForPeriod": 9455.96, - "totalDueForPeriod": 9455.96, - "totalPaidForPeriod": 0, - "totalOutstandingForPeriod": 9455.96, - "totalOverdue": 9455.96, - "totalActualCostOfLoanForPeriod": 2000 - }, - ... - ... - { - "period": 12, - "fromDate": [ - 2012, - 8, - 20 - ], - "dueDate": [ - 2012, - 9, - 20 - ], - "daysInPeriod": 31, - "principalOriginalDue": 9270.56, - "principalDue": 9270.56, - "principalOutstanding": 9270.56, - "principalLoanBalanceOutstanding": 0, - "interestOriginalDue": 185.4, - "interestDue": 185.4, - "interestOutstanding": 185.4, - "feeChargesDue": 0, - "penaltyChargesDue": 0, - "totalOriginalDueForPeriod": 9455.96, - "totalDueForPeriod": 9455.96, - "totalPaidForPeriod": 0, - "totalOutstandingForPeriod": 9455.96, - "totalOverdue": 9455.96, - "totalActualCostOfLoanForPeriod": 185.4 - } - ] -} - -
-
- -   -
-
-

Submit a new Loan Application

- - - - - - - -
Mandatory Fields
clientId, productId, principal, loanTermFrequency, - loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery, - repaymentFrequencyType, interestRatePerPeriod, - amortizationType, interestType, - interestCalculationPeriodType, transactionProcessingStrategyCode, - expectedDisbursementDate, submittedOnDate, loanType
-
- - - - - - - -
Additional Mandatory Fields if interest recalculation is enabled for product and Rest frequency not same as repayment period
recalculationRestFrequencyDate
- - - - - - - -
Additional Mandatory Fields if interest recalculation with interest/fee compounding is enabled for product and compounding frequency not same as repayment period
recalculationCompoundingFrequencyDate
+ +
+

SPM

+
+
- + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Additional Mandatory Field if Entity-Datatable Check is enabled for the entity of type loan.
+
+ + + + +
RESOURCES
+
+
+ + + + + + + +
+
POST
+
+
create/complex + update +
+
+
+ + + + + + + +
+
GET
+
+
read
+
+
+ + + + + + + +
+
PUT
+
+
update
+
+
+ + + + + + + +
+
DELETE
+
+
delete
+
+
datatables
SurveysurveysCreate a SurveyList Surveys
surveys/{id}Retrieve a SurveyDeactivate a Survey
Lookup Tablesurveys/{id}/lookuptablesCreate a Lookup Table entryList Lookup Table entries
surveys/{id}/lookuptables/{id}Retrieve an Entry
Scorecardsurveys/{id}/scorecardsCreate a Scorecard entryList Scorecard entries
-
- - - - - - - -
Optional Fields
graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalculation, - fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true), daysInYearType -
-
-
- -POST https://DomainName/api/v1/loans - - -POST loans -Content-Type: application/json -Request Body: -{ - "dateFormat": "dd MMMM yyyy", - "locale": "en_GB", - "clientId": 1, - "productId": 1, - "principal": "10,000.00", - "loanTermFrequency": 12, - "loanTermFrequencyType": 2, - "loanType": "individual", - "numberOfRepayments": 10, - "repaymentEvery": 1, - "repaymentFrequencyType": 2, - "interestRatePerPeriod": 10, - "amortizationType": 1, - "interestType": 0, - "interestCalculationPeriodType": 1, - "transactionProcessingStrategyCode": "mifos-standard-strategy", - "expectedDisbursementDate": "10 Jun 2013", - "submittedOnDate": "10 Jun 2013", - "linkAccountId" : "1", - "fixedEmiAmount":1100, - "maxOutstandingLoanBalance":"35000", - "daysInYearType":1, - "disbursementData":[{"expectedDisbursementDate":"01 November 2013", - "principal":22000,"approvedPrincipal":22000}], - "datatables": [{ - "registeredTableName": "loan_balance", - "data": { - "locale": "en", - "account_number": "0000001", - "Balance": "3300.00", - "DateField": "01 December 2016 00:00", - "dateFormat": "dd MMMM yyyy HH:mm", - "DateTimeField": "01 December 2016 12:00" - } - }, - { - "registeredTableName": "Date Loan Field", - "data": { - "locale": "en", - "Activation Date": "01 December 2016 00:00", - "dateFormat": "dd MMMM yyyy HH:mm" - } - }] -} - - -{ - "officeId": 1, - "clientId": 1, - "loanId": 1, - "resourceId": 1 -} - -
-
+
+
+
-   -
-
-

Approve Loan Application

- - - - - - - -
Mandatory Fields
approvedOnDate
-
- - - - - - - - - - -
Optional Fields
approvedLoanAmount
expectedDisbursementDate
-
-
- -POST https://DomainName/api/v1/loans/{loanId}?command=approve - - -POST loans/1?command=approve -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "approvedOnDate": "20 September 2011", - "expectedDisbursementDate" : "20 September 2011", - "note": "Loan approval note", - "disbursementData" : [{ id=226, principal="5", expectedDisbursementDate="20 September 2011"}, - { id=227, principal="91", expectedDisbursementDate="21 September 2011"}] -} - - -{ - "officeId": 1, - "clientId": 1, - "loanId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 200, - "code": "loanStatusType.approved", - "value": "Approved", - "pendingApproval": false, - "waitingForDisbursal": true, - "active": false, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "approvedOnDate": "20 September 2011", - "note": "Loan approval note" - } -} - -
-
+ +
+

Self Service

+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -   -
-
-

Recover Loan Guarantee

-
-
- -POST https://DomainName/api/v1/loans/{loanId}?command=recoverGuarantees - - -POST loans/1?command=approve -Content-Type: application/json -No Request Body: - - -{ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - "loanId": 1 -} - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
RESOURCES
+
+
+ + + + + + + +
+
POST
+
+
create/complex + update +
+
+
+ + + + + + + +
+
GET
+
+
read
+
+
+ + + + + + + +
+
PUT
+
+
update
+
+
+ + + + + + + +
+
DELETE
+
+
delete
+
+
Authentication HTTP Basicself/authenticationVerify Authentication
Authentication Oauth2self/userdetailsFetch Authenticated User Details
Update Userself/userUpdate User
Clientsself/clientsList Clients
self/clients/{clientId}Retrieve Client
self/clients/{clientId}/accountsRetrieve Client Accounts Overview
self/clients/{clientId}/imagesRetrieve Client Image
self/clients/{clientId}/chargesList Client Charges
self/clients/{clientId}/charges/{chargeId}Retrieve a Client Charge
self/clients/{clientId}/transactionsList Client Transactions
self/clients/{clientId}/transactions/{transactionId}Retrieve a Client Transaction
self/clients/{clientId}/imagesUpload client image (Data URI)
self/clients/{clientId}/imagesUpload client image (Multi-part Form + data)
self/clients/{clientId}/imagesDelete client image
Loan Productself/loanproducts?clientId={clientId}List Loan Products
self/loanproducts/{productId}?clientId={clientId}Retrieve a Loan + Product
Savings Productself/savingsproducts?clientId={clientId}List Savings products
self/savingsproducts/{productId}?clientId={clientId}Retrieve a savings product
Share Productself/shareproducts?clientId={clientId}List Share products
self/shareproducts/{productId}?clientId={clientId}Retrieve a share product
Loansself/loans/template?templateType=individualLoan Application Template
self/loans?command=calculateLoanScheduleCalculate Loan Repayment Schedule
self/loansSubmit new Loan Application
self/loans/{loanId}Retrieve a LoanUpdate a Loan Application
self/loans/{loanId}?command=withdrawnByApplicantWithdraw Loan Application
self/loans/{loanId}/transactions/{transactionId}Retrieve a Loan Transaction Details
self/loans/{loanId}/chargesRetrieve Loan Charges
self/loans/{loanId}/charges/{chargeId}Retrieve a Loan Charge Details
Savingsself/savingsaccounts/template?clientId={clientId}&productId={productId}Retrieve Savings Application Template
self/savingsaccountsSubmit new Savings Application
self/savingsaccounts/{accountId}Retrieve a Savings AccountUpdate Savings Account
self/savingsaccounts/{accountId}/transactions/{transactionId}Retrieve a Savings Transaction Details
self/savingsaccounts/{accountId}/chargesRetrieve Savings Charges
self/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}Retrieve a Savings Charge Details
Share Accountsself/shareaccounts/template?clientId=?productId=?Share Accounts Template
self/shareaccountsSubmit New Share Application
self/shareaccounts/{accountId}Retrieve a Share Application/Account
Own Account Transfersself/accounttransfers/templateAccount Transfer Template
self/accounttransfersAccount Transfer
Beneficiary for Third Party Transfer/self/beneficiaries/tpt/templateBeneficiary TPT Template
/self/beneficiaries/tptAdd TPT BeneficiaryGet TPT Beneficiary ListUpdate TPT BeneficiaryDelete TPT Beneficiary
Third Party Account Transfersself/accounttransfers/template?type="tpt"Third Party Account Transfer Template
self/accounttransfers?type="tpt"Third Party Account Transfer
Guarantor and Obligee detailsself/loans/{loanId}/guarantorsGuarantors list
self/clients/{clientId}/obligeedetailsObligee list
Run Reportself/runreports/{reportName}Run a Report
Surveysself/surveys?isActive=trueRetrieve Active Surveys
self/surveys/scorecards/{surveyId}Take Survey
self/surveys/scorecards/clients/{clientId}Survey Scorecards
Link/Delink accounts to pocketself/pockets?command=linkAccountsLink accounts to pocket
self/pockets?command=delinkAccountsDelink accounts from pocket
self/pocketsRetrieve accounts linked to pocket
+
+
+
-   -
-
-

Undo Loan Application Approval

-
-
- -POST https://DomainName/api/v1/loans/{loanId}?command=undoApproval - - -POST loans/1?command=undoApproval -Content-Type: application/json -Request Body: -{ - "note": "Loan undo approval note" -} - - -{ - "officeId": 1, - "clientId": 1, - "loanId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 100, - "code": "loanStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "pendingApproval": true, - "waitingForDisbursal": false, - "active": false, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "approvedOnDate": "" - } -} - -
-
+
-   -
-
-

Assign a Loan Officer

-

Allows you to assign Loan Officer for existing Loan.

-
-
- POST https://Domain Name/api/v1/loans/{loanId}?command=assignLoanOfficer - POST loans/1?command=assignLoanOfficer -Content-Type: application/json -Request Body: -{ - "toLoanOfficerId":2, - "assignmentDate":"02 September 2014", - "locale":"en", - "dateFormat":"dd MMMM yyyy", - "fromLoanOfficerId":"" -} - - -{ - "officeId": 2, - "clientId": 6, - "loanId" : 3, - "resourceId": 3 -} - -
-
- -   -
-
-

Unassign a Loan Officer

-

Allows you to unassign the Loan Officer.

-
-
- POST https://Domain Name/api/v1/loans/{loanId}?command=unassignLoanOfficer - POST clients/1?command=unassignLoanOfficer -Content-Type: application/json -Request Body: -{ - "unassignedDate":"15 September 2014", - "locale":"en", - "dateFormat":"dd MMMM yyyy" -} - - -{ - "officeId":2, - "clientId":6, - "loanId":3, - "resourceId":3 -} - -
-
- -   -
-
-

Reject Loan Application

- - - - - - - -
Mandatory Fields
rejectedOnDate
-
-
- -POST https://DomainName/api/v1/loans/{loanId}?command=reject - - -POST loans/1?command=reject -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "rejectedOnDate": "20 September 2011", - "note": "Loan rejection reason." -} - - -{ - "officeId": 1, - "clientId": 1, - "loanId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 500, - "code": "loanStatusType.rejected", - "value": "Rejected", - "pendingApproval": false, - "waitingForDisbursal": false, - "active": false, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "rejectedOnDate": "20 September 2011", - "closedOnDate": "20 September 2011" - } -} - -
-
+
+   +
+
+

Apache Fineract API Documentation

+

Apache Fineract is a secure, multi-tenanted microfinance platform.

+

+ The goal of the Apache Fineract API is to empower developers to build apps + on top of the Apache Fineract Platform. The reference app + (username: mifos, password: password) works on the same demo + 'tenant' as the interactive links in this documentation. +

+

+ The API is organized around REST. +

+

+ The API is designed to have:
- predictable, + resource-oriented URLs
- to use HTTP response codes to + indicate API errors
- to use built-in HTTP features, like + HTTP authentication and HTTP verbs, which can be understood by + off-the-shelf HTTP clients. +

+

+ JSON is + returned in all responses from the API, including errors. +

+

+ Much of the API presentation and design ideas are owed to the + excellent Apigee "Web API Design" eBook/PDF and the + very good Stripe + API reference. +

+
+
-   -
-
-

Applicant Withdraws from Loan Application

- - - - - - - -
Mandatory Fields
withdrawnOnDate
-
-
- -POST https://DomainName/api/v1/loans/{loanId}?command=withdrawnByApplicant - - -POST loans/1?command=withdrawnByApplicant -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "withdrawnOnDate": "20 September 2011", - "note": "Reason loan applicant withdrew from application." -} - - -{ - "officeId": 1, - "clientId": 1, - "loanId": 2, - "resourceId": 2, - "changes": { - "status": { - "id": 400, - "code": "loanStatusType.withdrawn.by.client", - "value": "Withdrawn by applicant", - "pendingApproval": false, - "waitingForDisbursal": false, - "active": false, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "withdrawnOnDate": "20 September 2011", - "closedOnDate": "20 September 2011" - } -} - -
-
+   +
+
+

Try The API From Your Browser

+

GET (read) examples can be run directly from this + documentation. It is just a matter of clicking a link. Most + browsers display the output on the same page (or another tab if + you right click and select that option). Internet Explorer will + probably treat the output as if you wanted to download a file. In + that case just elect to open the output in a text editor.

+

+ If you want to check out the POST, PUT and DELETE (update) + examples a good approach is to take a moment to install a REST + plugin for your browser e.g. RESTClient for FireFox +

+ The REST plugins will allow you to: +
    +
  • Select the "Verb" (e.g. POST)
  • +
  • Enter the resource name (e.g. offices)
  • +
  • Add a header to indicate you are sending + JSON data as part of the request body (Content-Type: + application/json) +
  • +
  • Add a header to indicate your 'tenant' + (X-Mifos-Platform-TenantId: default) +
  • +
  • Paste the example JSON into a Request Body
  • +
  • Send the Request (and receive a Response)
  • +
+
+
-   -
-
-

Disburse Loan

- - - - - - - -
Mandatory Fields
actualDisbursementDate
-
- - - - - - - -
Optional Fields
transactionAmount,fixedEmiAmount
-
-
- -POST https://DomainName/api/v1/loans/{loanId}?command=disburse - - -POST loans/1?command=disburse -Content-Type: application/json -Request Body: -{ - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "transactionAmount":10000, - "fixedEmiAmount""1100, - "actualDisbursementDate": "14 May 2013", - "paymentTypeId": "12", - "note": "", - "accountNumber": "accno123", - "checkNumber": "chec123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123" -} - - -{ - "officeId": 1, - "clientId": 1, - "loanId": 1, - "resourceId": 1, - "changes": { - "accountNumber": "accno123", - "checkNumber": "chec123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123", - "status": { - "id": 300, - "code": "loanStatusType.active", - "value": "Active", - "pendingApproval": false, - "waitingForDisbursal": false, - "active": true, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "actualDisbursementDate": "14 May 2013", - "transactionAmount":10000 - } -} - -
-
+   +
+
+

Generic Options

+

Convenience Templates

+

There are a list of convenience resources (see Template + menu option). These resources end with "/template" and can be + useful when building maintenance user interface screens for client + applications. The template data returned may consist of any or all + of: +

    +
  • Field Defaults
  • +
  • Allowed Value Lists
  • +
+

+

+ Also, many "Retrieve a" type resources (Retrieve a Client for example) allow + the parameter option "template=true". This appends any "Allowed + Value Lists" which can be useful when building update + functionality. +

+ +

Restrict Returned Fields

+

Parameter "fields={fieldlist}" can be used on GET requests + to restrict the fields returned.

+

Normal Request:

+
offices/1
+

+

Request (restricting fields returned):

+
offices/1?fields=id,name
+

+

Pretty JSON Formatting

+

Parameter "pretty=true" can be used to display JSON from GET + requests in an easy-to-read format. This parameter is used in this + documentation.

+

Easy-to-read JSON output for POSTs, PUTs and DELETEs will + available in the REST plugin you use e.g. RESTClient for FireFox

+

Normal Request (with pretty printing/formatting):

+
offices/1?pretty=true
+

+
-   -
-
-

Disburse Loan To Savings Account

- - - - - - - -
Mandatory Fields
actualDisbursementDate
-
- - - - - - - -
Optional Fields
transactionAmount,fixedEmiAmount
-
-
- -POST https://DomainName/api/v1/loans/{loanId}?command=disburseToSavings - - -POST loans/1?command=disburse -Content-Type: application/json -Request Body: -{ - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "transactionAmount":10000, - "fixedEmiAmount""1100, - "actualDisbursementDate": "14 May 2013", - "note": "" - - -{ - "officeId": 1, - "clientId": 1, - "loanId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 300, - "code": "loanStatusType.active", - "value": "Active", - "pendingApproval": false, - "waitingForDisbursal": false, - "active": true, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "actualDisbursementDate": "14 May 2013", - "transactionAmount":10000 - } -} - -
-
+
-  -
-
-

Undo Loan Disbursal

-
-
- -POST https://DomainName/api/v1/loans/{loanId}?command=undoDisbursal - - -POST loans/1?command=undoDisbursal -Content-Type: application/json -{ - "note": "Some comment" -} - - -{ - "officeId": 1, - "clientId": 1, - "loanId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 200, - "code": "loanStatusType.approved", - "value": "Approved", - "pendingApproval": false, - "waitingForDisbursal": true, - "active": false, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "actualDisbursementDate": "" - } -} - -
-
- - -  -
-
-

Submit new GLIM Application

-

Allows you to Submit the GLIM Application. GLIM Application should be in Pending state.

- - - - - - - -
Mandatory Fields
interestRatePerPeriod, expectedDisbursementDate, clientId, groupId, productId, totalLoan, loanType, interestType, - principal, charges, transactionProcessingStrategyCode, submittedOnDate, amortizationType, repaymentFrequencyType, - loanTermFrequencyType, loanTermFrequency, repaymentEvery, numberOfRepayments, interestCalculationPeriodType, - isParentAccount, locale,dateFormat
- -
-
- -https://DomainName/fineract-provider/api/v1/loans - - -POST: loans -Content-Type: application/json -Request Body: -{ - "interestRatePerPeriod":"2", - "expectedDisbursementDate":"10 June 2020", - "productId":"1", - "loanType":"glim", - "dateFormat":"dd MMMM yyyy", - "groupId":"1", - "clientId":"2", - "totalLoan":"10", - "interestType":"0", - "locale":"en_GB", - "principal":"1000.00", - "charges":[], - "transactionProcessingStrategyCode":"mifos-standard-strategy", - "submittedOnDate":"10 June 2020", - "amortizationType":"1", - "repaymentFrequencyType":"2", - "loanTermFrequencyType":"2", - "loanTermFrequency":"10", - "repaymentEvery":"1", - "numberOfRepayments":"10", - "interestCalculationPeriodType":"1", - "isParentAccount":"1" -} - - - -{ - "officeId": 1, - "groupId": 1, - "clientId": 2, - "loanId": 2, - "resourceId": 2, - "glimId": 1 -} - -
-
- -  -
-
-

Approve GLIM Application

-

Allows you to Approve the GLIM Application.

- - - - - - - -
Mandatory Fields
loanId, approvedOnDate, dateFormat, locale, glimPrincipal
-
-
- -POST https://DomainName/fineract-provider/api/v1/loans/glimAccount/{glimId}?command=approve - - -POST: loans/glimAccount/1?command=approve -Content-Type: application/json -Request Body: -{ -"approvalFormData":[ - { - "loanId":2, - "approvedOnDate": "12 June 2020", - "dateFormat":"dd MMMM yyyy", - "locale":"en" - } - ], -"glimPrincipal":1000, -"locale"="en" -} - - - -{ - "officeId": 1, - "groupId": 1, - "clientId": 2, - "loanId": 2, - "resourceId": 2, - "changes": { - "status": { - "id": 200, - "code": "loanStatusType.approved", - "value": "Approved", - "pendingApproval": false, - "waitingForDisbursal": true, - "active": false, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "approvedOnDate": "12 June 2020" - } -} - -
-
- -  -
-
-

Undo approval GLIM Application

-

Allows you to undoApprove the GLIM Application. GLIM application should be in Approved state.

- - - - - - - -
Optional Fields
note
-
-
- -POST https://DomainName/fineract-provider/api/v1/loans/glimAccount/{glimId}?command=undoapproval - - -POST: loans/glimAccount/1?command=undoapproval -Content-Type: application/json -Request Body: -{ - "note":"Undoapproving glim application due to some reasons" -} - - - -{ - "officeId": 1, - "groupId": 1, - "clientId": 2, - "loanId": 2, - "resourceId": 2, - "changes": { - "status": { - "id": 100, - "code": "loanStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "pendingApproval": true, - "waitingForDisbursal": false, - "active": false, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "approvedOnDate": "" - } -} - -
-
- -  -
-
-

Reject GLIM Application

-

Allows you to reject the GLIM Application. GLIM application should be in pending state

- - - - - - - -
Mandatory Fields
rejectedOnDate, dateFormat, locale
- -
-
- -POST https://DomainName/fineract-provider/api/v1/loans/glimAccount/{glimId}?command=reject - - -POST: loans/glimAccount/1?command=reject -Content-Type: application/json -Request Body: -{ - "rejectedOnDate":"12 June 2020", - "dateFormat":"dd MMMM yyyy", - "locale":"en" -} - - - -{ - "officeId": 1, - "groupId": 1, - "clientId": 2, - "loanId": 2, - "resourceId": 2, - "changes": { - "status": { - "id": 500, - "code": "loanStatusType.rejected", - "value": "Rejected", - "pendingApproval": false, - "waitingForDisbursal": false, - "active": false, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "rejectedOnDate": "12 June 2020", - "closedOnDate": "12 June 2020" - } - } - -
-
- -  -
-
-

Disburse GLIM Application

-

Allows you to disburse the GLIM Application, GLIM Account should be in Approved state.

- - - - - - - -
Mandatory Fields
actualDisbursementDate, dateFormat, locale
- -
-
- -POST https://DomainName/fineract-provider/api/v1/loans/glimAccount/{glimId}?command=disburse - - -POST: loans/glimAccount/2?command=disburse -Content-Type: application/json -Request Body: -{ - "actualDisbursementDate":"12 June 2020", - "dateFormat":"dd MMMM yyyy", - "locale":"en" -} - - - -{ - "officeId": 1, - "groupId": 1, - "clientId": 2, - "loanId": 3, - "resourceId": 3, - "changes": { - "status": { - "id": 300, - "code": "loanStatusType.active", - "value": "Active", - "pendingApproval": false, - "waitingForDisbursal": false, - "active": true, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "actualDisbursementDate": "12 June 2020" - } -} - -
-
+   +
+
+

Creating and Updating

+

When you want to 'Create a ...' you have to at least supply + the mandatory fields. The mandatory fields are listed in this + documentation under the relevant 'Create a ...' heading.

+ +

When you want to 'Update a ...' you can update individual + fields or a combination of fields (subject to data integrity + rules).

+
-  -
-
-

Undo Disbursal GLIM Application

-

Allows you to undoDisburse the GLIM Application. GLIM application should be in Disburse state

- - - - - - - -
Optional Fields
note
-
-
- -POST https://DomainName/fineract-provider/api/v1/loans/glimAccount/{glimId}?command=undodisbursal - - -POST: loans/glimAccount/2?command=undodisbursal -Content-Type: application/json -Request Body: -{ - "note":"undoDisbursal due to some reasons." -} - - - -{ - "officeId": 1, - "groupId": 1, - "clientId": 2, - "loanId": 3, - "resourceId": 3, - "changes": { - "status": { - "id": 200, - "code": "loanStatusType.approved", - "value": "Approved", - "pendingApproval": false, - "waitingForDisbursal": true, - "active": false, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "actualDisbursementDate": "" - } -} - -
-
- -  -
-
-

Repayment GLIM Application

-

Allows you to repayment the GLIM Application, GLIM Application should be in Disburse state.

- - - - - - - -
Mandatory Fields
loanId, transactionDate, dateFormat, locale, transactionAmount
-
-
- -POST https://DomainName/fineract-provider/api/v1/loans/glimAccount/{glimId}?command=glimrepayment - - -POST: loans/glimAccount/2?command=glimrepayment -Content-Type: application/json -Request Body: -{ - "formDataArray":[ - { - "loanId":3, - "transactionDate":"12 June 2020", - "dateFormat":"dd MMMM yyyy", - "locale":"en", - "transactionAmount":"1000" - } - ] -} - - - -{ - "officeId": 1, - "groupId": 1, - "clientId": 2, - "loanId": 3, - "resourceId": 3, - "changes": { - "transactionDate": "12 June 2020", - "transactionAmount": "1000", - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "paymentTypeId": "" - } -} - -
-
+
-   -
-
-

Delete a Loan Application

-

- Note: Only loans in "Submitted and awaiting approval" - status can be deleted. -

-
-
- -DELETE https://DomainName/api/v1/loans/{loanId} - - -DELETE loans/1 -Content-Type: application/json -No Request Body: - - -{ - "officeId": 1, - "clientId": 1, - "loanId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

Loan Transactions

-

Capabilities include loan repayment's, interest waivers and the ability to 'adjust' an existing transaction. An 'adjustment' of a transaction is really a 'reversal' of existing transaction followed by creation of a new transaction with the provided details.

- - - - - - - - - - - - - - - - -
Field Descriptions
transactionAmount
The amount of the transaction.
transactionDate
The date of the transaction.
-
-
+   +
+
+

Updating Dates and Numbers

+

Dates

+

+ Dates are returned in GET requests as an array e.g. [ 2007, 4, + 11]. However, the API accepts them as strings in POST and PUT + requests. If there are any dates in your POST or PUT requests, you + need to provide the "locale" and "dateFormat". This can be any + date pattern supported by Joda-Time. + This capability can help you when saving data in your client + application as you shouldn't need to do any date format conversion + prior to issuing your POST or PUT request. +

+ JSON examples: + { + "locale": "en_US", + "dateFormat": "dd MMMM yyyy", + "openingDate": "01 July 2007" + } -   -
-
-

Retrieve Loan Transaction Template

-

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
  • -
-

-
Arguments
-
-
command
-
- String mandatory, case-insensitive -
-
- 'repayment'
"date" is set to the date of the - first outstanding installment.
"total" "amount" is set - to the amount outstanding. -
-
- 'waiver'
"date" is set to the current date.
- "total" "amount" is set to the remaining loan principal - outstanding. The amount that can be waived is limited to the - loan's inArrearsTolerance -
-
- 'refundbycash'
"date" is set to the current date
- "total" "amount" is set - to the total amount paid in advance. -
-
- 'foreclosure'
"transaction date" is set to the current date by default
- "transaction amount" is set - to the sum of total loan outstanding principal - and total Interest/ Fee/ Charges / Penalties - till foreclosure date. -
-
-

Example Request:

-
loans/1/transactions/template?command=repayment
-
-
- -GET https://DomainName/api/v1/loans/{loanId}/transactions/template" - - -{ - "transactionType": { - "id": 2, - "code": "loanTransactionType.repayment", - "value": "Repayment" - }, - "date": [ - 2009, - 8, - 1 - ], - "total": { - "currencyCode": "XOF", - "digitsAfterDecimal": 0, - "inMultiplesOf": 0, - "amount": 471, - "defaultName": "CFA Franc BCEAO", - "nameCode": "currency.XOF", - "displaySymbol": "CFA", - "zero": false, - "greaterThanZero": true, - "displaySymbolValue": "471 CFA" - } -} - -
-
+ { + "locale": "en_US", + "dateFormat": "yyyy-MM-dd", + "openingDate": "2007-03-21" + } +
+

Numbers

+

You must provide a "locale" when updating numbers. Numbers + are not "Ids" or "Types" but are typically money amounts or + percentages that relate to loans. In any case, the API will send + back an error message if you forget.

+ JSON examples: + { + "locale": "en_US", + "principal": "240,400.88" + } + { + "locale": "fr_CH", + "principal": "240 400.88" + } + +
-   -
-
-

Make a Repayment

-
-
- -POST https://DomainName/api/v1/loans/{loanId}/transactions?command=repayment - - -POST loans/5/transactions?command=repayment -Content-Type: application/json -Request Body: -{ - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "transactionDate": "14 May 2013", - "transactionAmount": "500.00", - "paymentTypeId": "12", - "note": "check payment", - "accountNumber": "acc123", - "checkNumber": "che123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123" -} - - -{ - "officeId": 1, - "clientId": 1, - "loanId": 5, - "resourceId": 564, - "changes": { - "transactionDate": "14 May 2013", - "transactionAmount": "500.00", - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "note": "check payment", - "accountNumber": "acc123", - "checkNumber": "che123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123" - } -} - -
-
+
-   -
-
-

Make a Refund of an Active Loan by Cash

-
-
- -POST https://DomainName/api/v1/loans/{loanId}/transactions?command=refundByCash - - -POST loans/5/transactions?command=refundByCash -Content-Type: application/json -Request Body: -{ - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "transactionDate": "14 May 2013", - "transactionAmount": "500.00", - "paymentTypeId": "12" -} - - -{ - "officeId": 1, - "clientId": 1, - "loanId": 5, - "resourceId": 564, - "changes": { - "transactionDate": "14 May 2013", - "transactionAmount": "500.00", - "locale": "en", - "dateFormat": "dd MMMM yyyy - } -} - -
-
+   +
+
+

Field Descriptions

+

+ Most fields are self-explanatory. Fields that aren't are described + under the relevant resource heading e.g. AUTHENTICATION +

-   -
-
-

Foreclosure of an Active Loan

-
-
- -POST https://DomainName/api/v1/loans/{loanId}/transactions?command=foreclosure - - -POST loans/5/transactions?command=foreclosure -Content-Type: application/json -Request Body: -{ - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "transactionDate": "10 December 2012", - "note": "Customer Death" -} - - -{ - "changes": { - "note": "Foreclosure Made!!!", - "eventAmount": 7573.76, - "transactionDate": [2012, - 12, - 10], - "transactions": [15818] - }, - "loanId": 5 -} - -
-
+
+
-   -
-
-

Waive Interest

-
-
- -POST https://DomainName/api/v1/loans/{loanId}/transactions?command=waiveInterest - - -POST loans/5/transactions?command=waiveInterest -Content-Type: application/json -Request Body: -{ - "locale": "en_GB", - "dateFormat": "dd MMMM yyyy", - "transactionDate": "14 May 2012", - "transactionAmount": "400", - "note": "Optional note related to the waiving of interest." -} - - -{ - "officeId": 1, - "clientId": 1, - "loanId": 5, - "resourceId": 5, - "changes": { - "transactionDate": "14 May 2012", - "transactionAmount": "400", - "locale": "en_GB", - "dateFormat": "dd MMMM yyyy", - "note": "Optional note related to the interest waiver." - } -} - -
-
+   +
+
+

Authentication Overview

+

+ Authentication to the API can be configured to be supported via HTTP + Basic Auth or OAuth2. +

+ +

+ Default authentication is using HTTP Basic Auth. Oauth2 can be enabled by using + -Psecurity=oauth option on gradle build command , refer + the platform setup + wiki for additional details. +

+

+ Optionally, two-factor authentication can be enabled by using + -Ptwofactor=enabled on gradle build. + Details of the authentication workflow with two-factor authentication enabled can be found here. +

+

+ The platform has been configured to reject plain HTTP requests and + to expect all API requests to be made over HTTPS. All + requests must be authenticated. +

+
+
+
+
-   -
-
-

Write-off Loan

-
-
- - POST https://DomainName/api/v1/loans/{loanId}/transactions?command=writeoff - - - POST loans/70/transactions?command=writeoff - Content-Type: application/json - Request Body: - { - "locale": "en_GB", - "dateFormat": "dd MMMM yyyy", - "transactionDate": "14 May 2012", - "note": "Write-off note" - } - - - { - "officeId": 1, - "clientId": 7, - "loanId": 70, - "resourceId": 442, - "changes": { - "transactionDate": "1 March 2012", - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "status": { - "id": 601, - "code": "loanStatusType.closed.written.off", - "value": "Closed (written off)", - "pendingApproval": false, - "waitingForDisbursal": false, - "active": false, - "closedObligationsMet": false, - "closedWrittenOff": true, - "closedRescheduled": false, - "closed": true, - "overpaid": false - }, - "closedOnDate": "1 March 2012", - "writtenOffOnDate": "1 March 2012", - "note": "Write-off note" - } - } +   +
+
+

Authentication HTTP Basic

+

+ Authentication to the API occurs via HTTP + Basic Auth. +

-
-
- -   -
-
-

Make Recovery Payment

-

This API allows collecting recovery payments for written-off loans

-
-
- -POST https://DomainName/api/v1/loans/{loanId}/transactions?command=recoverypayment - - -POST loans/5/transactions?command=recoverypayment -Content-Type: application/json -Request Body: -{ - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "transactionDate": "14 May 2013", - "transactionAmount": "500.00", - "paymentTypeId": "12", - "note": "check payment", - "accountNumber": "acc123", - "checkNumber": "che123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123" -} - - -{ - "officeId": 1, - "clientId": 1, - "loanId": 5, - "resourceId": 564, - "changes": { - "transactionDate": "14 May 2013", - "transactionAmount": "500.00", - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "note": "check payment", - "accountNumber": "acc123", - "checkNumber": "che123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123" - } -} - -
-
- +
+ + // A Javascript/Jquery example of how to login to Apache Fineract and use its api. + // Typically, the javascript application would + // 1) Display a login page to retrieve the username and password. + // 2) Send the username and password to a function + // such as setBasicAuthKey below which sets the HTTP Basic Auth key. + // 3) The HTTP Basic Auth key is used in all subsequent requests + // (see the function executeAjaxRequest below). + + function setBasicAuthKey(username, password) { + + var jqxhr = $.ajax({ + url : "authentication?username=" + username + "&password=" + password, + type : 'POST', + contentType : "application/json; charset=utf-8", + dataType : 'json', + data : "{}", + cache : false, + success : function(data, textStatus, jqXHR) { + basicAuthKey = data.base64EncodedAuthenticationKey; + }, + error : function(jqXHR, textStatus, errorThrown) { + //error processing + } + }); + } - + function executeAjaxRequest(url, verbType, jsonData, basicAuthKey, successFunction, errorFunction) { + var jqxhr = $.ajax({ + url : url, + type : verbType, //POST, GET, PUT or DELETE + contentType : "application/json; charset=utf-8", + dataType : 'json', + data : jsonData, + cache : false, + beforeSend : function(xhr) { + xhr.setRequestHeader("Authorization", "Basic " + basicAuthKey); + }, + success : successFunction, + error : errorFunction + }); + } + +
+
-   -
-
-

Undo Loan Write-off Transaction

-
-
- - POST https://DomainName/api/v1/loans/{loanId}/transactions?command=undowriteoff - - - POST loans/70/transactions?command=undowriteoff - Content-Type: application/json - Request Body: - { } - - +   +
+
+

Authentication Oauth2

+

+ Authentication to the API occurs via OAuth2. + 'Resource Owner Password Credentials Grant' type is used. +

- { - "officeId": 1, - "clientId": 1, - "loanId": 22 - } -
-
+
+ + // A Javascript/JQuery example of how to login to Apache Fineract and use its API. + // Typically, the JavaScript application would: + // 1) Display a login page to retrieve the username and password. + // 2) Send the username, password, client_id , grant_type and client_secret to a function + // such as getOauthToken() below which POSTs these as x-www-form-urlencoded (but NOT in the URL, see + FINERACT-629) + // and stores the token in a global variable. + // 3) The HTTP bearer Auth key is used in all subsequent requests + // (see the function executeAjaxRequest() below). + + function getOauthToken(username, password) { + + var jqxhr = $.ajax({ + url : "URL of the authentication server", + type : 'POST', + dataType : 'json', + data : { + username: credentials.username, + password: credentials.password, + client_id: "community-app", + grant_type: "password", + client_secret: "123" + }, + cache : false, + success : function(data, textStatus, jqXHR) { + authKey = data.access_token; + }, + error : function(jqXHR, textStatus, errorThrown) { + //error processing + } + }); + } + function executeAjaxRequest(url, verbType, jsonData, authKey, successFunction, errorFunction) { + var jqxhr = $.ajax({ + url : url, + type : verbType, //POST, GET, PUT or DELETE + contentType : "application/json; charset=utf-8", + dataType : 'json', + data : jsonData, + cache : false, + beforeSend : function(xhr) { + xhr.setRequestHeader("Authorization", "bearer " + authKey); + }, + success : successFunction, + error : errorFunction + }); + } + +
+
+   +
+
+

Two-Factor Authentication

+

+ Two-Factor authentication is supported by requesting & verifying + one-time passwords(OTP). OTPs are sent via SMS & email. +

+

+ Two-factor authentication is disabled by default. + More information on how to enable TFA can be found here. +

+

+ Two-factor authentication workflow: +

    +
  1. User authticates via BasicAuth / oAauth.
  2. +
  3. Client requests a list of supported OTP delivery methods for the authenticated user(Get Delivery Methods). +
  4. +
  5. User selects an OTP delivery method and client sends a request for OTP(Request OTP). +
  6. +
  7. User receives an OTP and the client sends it for verification(Validate + OTP). +
  8. +
  9. If the OTP is valid, an access token is returned
  10. +
  11. The access token is sent in following requestes to the server as a header Fineract-Platform-TFA-Token +
  12. +
  13. On session end, the access token should be invalidatedInvalidate + Access Token). +
  14. +
+

+

+ Two-Factor authentication and delivery methods can be configured via + the /twofactor/configure endpoint. +

+
+
-   -
-
-

Pre-Close template

-

This Api retrieves pre closure details of loan

-
-
- - POST https://DomainName/api/v1/loans/{loanId}/transactions?command=prepayLoan or
- - https://DomainName/api/v1/loans/{loanId}/transactions?command=prepayLoan&dateFormat=dd+MMMM+yyyy&locale=en&transactionDate=02+April+2015 -
- - POST loans/70/transactions?command=prepayLoan - Content-Type: application/json - Request Body: - { } - - - - { - "amount":7765.28, - "principalPortion":7573.76, - "interestPortion":191.52, - "feeChargesPortion":0.00, - "penaltyChargesPortion":0.00 - } - -
+
-   -
-
-

Retrieve a Transaction Details

-

Example Request:

-
loans/5/transactions/3
-
-
- -GET https://DomainName/api/v1/loans/{loanId}/transactions/{transactionId} - - -{ - "id": 3, - "type": { - "id": 2, - "code": "loanTransactionType.repayment", - "value": "Repayment", - "disbursement": false, - "repaymentAtDisbursement": false, - "repayment": true, - "contra": false, - "waiveInterest": false, - "waiveCharges": false, - "writeOff": false, - "recoveryRepayment": false - }, - "date": [ - 2012, - 5, - 14 - ], - "manuallyReversed": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 559.88, - "interestPortion": 559.88, - "loanChargePaidByList": [ - { - "id": 29, - "amount": 138.700000, - "installmentNumber": 0, - "chargeId": 7, - "transactionId": 35, - "name": "Late Penalty Charge" - } - ] -} - -
-
+   +
+
+

Get Delivery Methods

+

Returns a list of possible OTP delivery methods for the current user.

+

Requires first-factor authenticated user.

+
+
+ GET https://DomainName/api/v1/twofactor + + [ + { + "name": "sms", + "target": "08888888888" + }, + { + "name": "email", + "target": "user@example.com" + } + ] +
+
-   -
-
-

Adjust a Transaction

-

Note: there is no need to specify command={transactionType} parameter.

- - - - - - - -
Mandatory Fields
transactionDate, transactionAmount
-
-
- -POST https://DomainName/api/v1/loans/{loanId}/transactions/{transactionId} - - -POST loans/1/transactions/2 -Content-Type: application/json -Request Body: -{ - "locale": "en_GB", - "dateFormat": "dd MMMM yyyy", - "transactionDate": "25 May 2012", - "transactionAmount": "50,000.00", - "note": "An optional note about why your adjusting or changing the transaction." -} - - -{ - "resourceId": 16 -} - -
-
+   +
+
+

Request OTP

+

Requests an OTP.

+

Requires first-factor authenticated user.

+
Arguments
+
+
deliveryMethod
+
+ String mandatory, the delivery method name +
+
extendedToken
+
+ boolean optional, whether to request an extended token, default false +
+
+
+
+ POST + https://DomainName/api/v1/twofactor?deliveryMethod=sms&extendedToken=false + + { + "requestTime": 1500000000000, + "tokenLiveTimeInSec": 300, + "extendedAccessToken": false, + "deliveryMethod": { + "name": "sms", + "target": "08888888888" + } + } +
+
- +   +
+
+

Validate OTP

+

Validates an OTP. If the OTP is valid, an access token is created.

+

The returned access token is later sent as a header Fineract-Platform-TFA-Token.

+

Requires first-factor authenticated user.

+
Arguments
+
+
token
+
+ String mandatory, the OTP to validate +
+
+
+
+ POST https://DomainName/api/v1/twofactor/validate?token=YYYYY + + { + "token": "cb0bb6e33fc540709d50a16eb2e555f9", + "validFrom": 1501530702801, + "validTo": 1501617102801 + } +
+
-   -
-
-

Guarantors

-

A person who guarantees to pay for someone else's debt - if he or she should default on a loan obligation. A guarantor acts as a co-signor of sorts. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
guarantorType
Identifies if the guarantor is - an existing Client, Staff member or an external - individual
- Refer Retrieve - Guarantor Details Template for complete - details -
entityId
The identifier for guarantors - who are an existing Client of Staff member. -
firstname
Guarantors first name -
lastname
Guarantors last name -
officeName
Name of the office with which the internal guarantors are associated -
addressLine1, addressLine2, city, state, zip, - country, mobileNumber, housePhoneNumber, comment, - dob
Address, contact and date of - birth details of an external guarantor -
savingsId
Guarantors Savings Account on which Amount will be blocked -
amount
Guarantee amount which will be blocked on savings account. -
-
-
+   +
+
+

Invalidate Access Token

+

Invalidates an access token.

+

Two factor access tokens should be invalidated on logout.

+

Requires fully authenticated user.

+
+
+ POST https://DomainName/api/v1/twofactor/invalidate + + { + "token": "cb0bb6e33fc540709d50a16eb2e555f9" + } + + { + "resourceIdentifier": "cb0bb6e33fc540709d50a16eb2e555f9" + } +
+
-   -
-
-

List Guarantors

-

Example Requests:

-
loans/1/guarantors
-
-
-
loans/1/guarantors?fields=firstname,lastname
-
-
- -GET https://DomainName/api/v1/loans/{loanId}/guarantors - - -[ - { - "id": 1, - "loanId": 1, - "guarantorType": { - "id": 1, - "code": "guarantor.existing.customer", - "value": "CUSTOMER" - }, - "firstname": "Declan", - "lastname": "Browne", - "officeName": "Head Office", - "joinedDate": [ - 2009, - 1, - 4 - ] - } -] - -
-
+   +
+
+

Batch API

+ +

+ 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,..}..]}. +

-   -
-
-

Retrieve Guarantors Details Template

-

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:

-
loans/1/guarantors/template
-
loans/1/guarantors/accounts/template?clientId=1
-
-
- -GET https://DomainName/api/v1/loans/{loanId}/guarantors/template - - -{ - "guarantorType": { - "id": 1, - "code": "guarantor.existing.customer", - "value": "CUSTOMER" - }, - "guarantorTypeOptions": [ - { - "id": 1, - "code": "guarantor.existing.customer", - "value": "CUSTOMER" - }, - { - "id": 2, - "code": "guarantor.staff", - "value": "STAFF" - }, - { - "id": 3, - "code": "guarantor.external", - "value": "EXTERNAL" - } - ] -} - - -GET https://DomainName/api/v1/loans/{loanId}/guarantors/accounts/template?clientId={clientId} - - -{ - "guarantorType": { - "id": 1, - "code": "guarantor.existing.customer", - "value": "CUSTOMER" - }, - "status": false, - "accountLinkingOptions": [ - { - "id": 1, - "accountNo": "000000001", - "clientId": 3, - "clientName": "Client_FirstName_UUV18 Client_LastName_9T2D", - "productId": 1, - "productName": "FIXED_DEPOSIT_PRODUCT_U0NS9T", - "fieldOfficerId": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 4, - "inMultiplesOf": 100, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - } - ] -} - -
-
+
+
+ + POST https://DomainName/api/v1/batches + + + POST batches + Content-Type: application/json Request Body: + [ + { + "requestId":1, + "relativeUrl":"clients", + "method":"POST", + "headers":[ + { + "name":"Content-type", + "value":"text/html" + } + ], + "body":"{ + \"officeId\": 1, + \"firstname\": \"Petra\", + \"lastname\": \"Yton\", + \"externalId\": \"ex_externalId1\", + \"dateFormat\": \"dd MMMM yyyy\", + \"locale\": \"en\", + \"active\": true, + \"activationDate\": \"04 March 2009\", + \"submittedOnDate\": \"04 March 2009\" + }" + }, + { + "requestId":2, + "relativeUrl":"loans", + "method":"POST", + "headers":[ + { + "name":"Content-type", + "value":"text/html" + } + ], + "reference":1, + "body":"{ \"dateFormat\": \"dd MMMM yyyy\", + \"locale\": \"en_GB\", + \"clientId\": \"$.clientId\", + \"productId\": 26, + \"principal\": \"10,000.00\", + \"loanTermFrequency\": 12, + \"loanTermFrequencyType\": 2, + \"loanType\": \"individual\", + \"numberOfRepayments\": 10, + \"repaymentEvery\": 1, + \"repaymentFrequencyType\": 2, + \"interestRatePerPeriod\": 10, + \"amortizationType\": 1, + \"interestType\": 0, + \"interestCalculationPeriodType\": 1, + \"transactionProcessingStrategyCode\": \"mifos-standard-strategy\", + \"expectedDisbursementDate\": \"10 Jun 2013\", + \"submittedOnDate\": \"10 Jun 2013\" + }" + }, + { + "requestId":3, + "relativeUrl":"loans/$.loanId/charges", + "method":"POST", + "reference":2, + "headers":[ + { + "name":"Content-type", + "value":"text/html" + } + ], + "body":"{ + \"chargeId\": \"2\", + \"locale\": \"en\", + \"amount\": \"100\", + \"dateFormat\": \"dd MMMM yyyy\", + \"dueDate\": \"29 April 2013\" + }" + }, + { + "requestId":4, + "relativeUrl":"loans/$.loanId/charges", + "method":"GET", + "reference":2, + "headers":[ + { + "name":"Content-type", + "value":"text/html" + } + ], + "body":"{}" + } + ] + + + [ + { + "requestId":1, + "statusCode":200, + "headers":[ + { + "name":"Content-type", + "value":"text/html" + }, + { + "name":"X-Mifos-Platform-TenantId", + "value":"text/html" + } + ], + "body":"{\"officeId\":1,\"clientId\":909,\"resourceId\":909}" + }, + { + "requestId":2, + "statusCode":200, + "headers":[ + { + "name":"Content-type", + "value":"text/html" + } + ], + "body":"{\"officeId\":1,\"clientId\":909,\"loanId\":212,\"resourceId\":212}" + }, + { + "requestId":3, + "statusCode":200, + "headers":[ + { + "name":"Content-type", + "value":"text/html" + } + ], + "body":"{\"officeId\":1,\"clientId\":909,\"loanId\":212,\"resourceId\":155}" + }, + { + "requestId":4, + "statusCode":200, + "headers":[ + { + "name":"Content-type", + "value":"text/html" + } + ], + "body":"[ + { + \"id\":155, + \"chargeId\":2, + \"name\":\"Charge_Loans_GEQJC5\", + \"chargeTimeType\":{ + \"id\":1, + \"code\":\"chargeTimeType.disbursement\", + \"value\":\"Disbursement\" + }, + \"chargeCalculationType\":{ + \"id\":2, + \"code\":\"chargeCalculationType.percent.of.amount\", + \"value\":\"% Amount\" + }, + \"percentage\":100.000000, + \"amountPercentageAppliedTo\":10000.000000, + \"currency\":{ + \"code\":\"USD\", + \"name\":\"USDollar\", + \"decimalPlaces\":2, + \"displaySymbol\":\"$\", + \"nameCode\":\"currency.USD\", + \"displayLabel\":\"US Dollar ($)\" + }, + \"amount\":10000.000000, + \"amountPaid\":0, + \"amountWaived\":0, + \"amountWrittenOff\":0, + \"amountOutstanding\":10000.000000, + \"amountOrPercentage\":100.000000, + \"penalty\":false, + \"chargePaymentMode\":{ + \"id\":0, + \"code\":\"chargepaymentmode.regular\", + \"value\":\"Regular\" + }, + \"paid\":false, + \"waived\":false, + \"chargePayable\":false + } + ]" + } + ] + +
-   -
-
-

Retrieve a Guarantor

-

Example Requests:

-
/loans/1/guarantors/1
-
-
-
/loans/1/guarantors/1
-
-
-
/loans/1/guarantors/1?fields=firstname
-
-
- -GET https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId} - - -{ - "id": 1, - "loanId": 1, - "guarantorType": { - "id": 1, - "code": "guarantor.existing.customer", - "value": "CUSTOMER" - }, - "firstname": "Declan", - "officeName": "Head Office", - "joinedDate": [ - 2009, - 1, - 4 - ] -} - -
-
+
-   -
-
-

Create a Guarantor

-

- Note: You may associate any number of Guarantors - to a Loan. The mandatory fields would vary based - on the "guarantorType"
-

- - - - - - - - - - - - - -
Mandatory Fields - for "internal" guarantors
guarantorTypeId, entityId
Mandatory Fields for "external" guarantors
guarantorTypeId, firstname, lastname
- - - - - - - -
Optional Fields - for "internal" guarantors
savingsId, amount
-
-
- -POST https://DomainName/api/v1//loans/{loanId}}/guarantors - - -POST /loans/1/guarantors -Content-Type: application/json -Request Body: -{ - guarantorTypeId:3, - firstname:Lyndon, - lastname:Johnson -} - - -{ - "officeId": 2, - "loanId": 1, - "resourceId": 9 -} - - -POST /loans/1/guarantors -Content-Type: application/json -Request Body: -{ - guarantorTypeId:1, - entityId:2 -} - - -{ - "officeId": 2, - "loanId": 1, - "resourceId": 10 -} - -
-
+   +
+
+

Batch requests in a single transaction

-   -
-
-

Update a Guarantor

-
-
- -PUT https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId} - - -PUT loans/1/guarantors/1 -Content-Type: application/json -Request Body: -{ - entityId:1 -} - - -{ - "officeId": 1, - "resourceId": 1, - "changes": { - "entityId": 1 - } -} - -
-
+

+ 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. +

-   -
-
-

Remove a Guarantor

-

- Note: A guarantor can be removed only from loans that are not yet approved. -

-
-
- -DELETE https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId} -DELETE https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId}?guarantorFundingId={guarantorFundingId} - +

+ 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. +

- -DELETE loans/1/guarantors/1 -DELETE loans/1/guarantors/1?guarantorFundingId=1 -Content-Type: application/json -No Request Body: - - -{ - "officeId": 2, - "loanId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

Loan Collateral

-

In lending agreements, collateral is a borrower's pledge of specific property to a lender, - to secure repayment of a loan. The collateral serves as protection for a lender against a - borrower's default - that is, any borrower failing to pay the principal and interest under - the terms of a loan obligation. If a borrower does default on a loan (due to insolvency - or other event), that borrower forfeits (gives up) the property pledged as collateral - - and the lender then becomes the owner of the collateral -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
type
Identifies the type of a collateral
- Ex: Gold, property etc (permitted types can be configured using - Code Values for - the Code LoanCollateral)
- Refer Retrieve - Collateral Details Template for complete - details -
value
The market value of a Collateral. -
description
Description for the collateral -
currency
Details of the currency used - to estimate the value of a Collateral. - The currency defaults to the currency of the - Loan for which this Collateral serves as a - guarantee -
-
-
+
+
+ + POST https://DomainName/api/v1/batches?enclosingTransaction=true + + + POST batches + Content-Type: application/json Request Body: + [ + { + "requestId":1, + "relativeUrl":"clients", + "method":"POST", + "headers":[ + { + "name":"Content-type", + "value":"text/html" + }, + { + "name":"X-Mifos-Platform-TenantId", + "value":"text/html" + } + ], + "body":"{ + \"officeId\": 1, + \"firstname\": \"Petra\", + \"lastname\": \"Yton\", + \"externalId\": \"externalId_4\", + \"dateFormat\": \"dd MMMM yyyy\", + \"locale\": \"en\", \"active\": true, + \"activationDate\": \"04 March 2009\", + \"submittedOnDate\": \"04 March 2009\" + }" + }, + { + "requestId":2, + "relativeUrl":"savingsaccounts", + "method":"POST", + "reference":1, + "headers":[ + { + "name":"Content-type", + "value":"text/html" + } + ], + "body":"{ + \"clientId\": \"$.clientId\", + \"productId\": 1, + \"locale\": \"en\", + \"dateFormat\": \"dd MMMM yyyy\", + \"submittedOnDate\": \"01 March 2011\" + }" + } + ] + + + Successful transaction response: + [ + { + "requestId":1, + "statusCode":200, + "headers":[ + { + "name":"Content-type", + "value":"text/html" + }, + { + "name":"X-Mifos-Platform-TenantId", + "value":"text/html" + } + ], + "body":"{\"officeId\":1,\"clientId\":922,\"resourceId\":922}" + }, + { + "requestId":2, + "statusCode":200, + "headers":[ + { + "name":"Content-type", + "value":"text/html" + } + ], + "body":"{\"officeId\":1,\"clientId\":922,\"savingsId\":116,\"resourceId\":116}" + } + ] + -   -
-
-

List Loan Collaterals

-

Example Requests:

-
loans/1/collaterals
-
-
-
loans/1/collaterals?fields=value,description
-
-
- -GET https://DomainName/api/v1/loans/{loanId}/collaterals - - -[ - { - "id": 12, - "type": { - "id": 8, - "name": "Gold" - }, - "value": 50000, - "description": "24 Carat Gold chain weighing 12 grams", - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - } -] - -
-
+
-   -
-
-

Retrieve Collateral Details Template

-

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:

-
loans/1/collaterals/template
-
-
- -GET https://DomainName/api/v1/loans/{loanId}/collaterals/template - - -{ - "allowedCollateralTypes": [ - { - "id": 9, - "name": "Silver", - "position": 0 - }, - { - "id": 8, - "name": "Gold", - "position": 0 - }, - { - "id": 10, - "name": "Property", - "position": 0 - } - ] -} - -
-
+
-   -
-
-

Retrieve a Collateral

-

Example Requests:

-
/loans/1/collaterals/1
-
-
-
/loans/1/collaterals/1?fields=value,description
-
-
- -GET https://DomainName/api/v1/loans/{loanId}/collaterals/{guarantorId} - - -{ - "id": 12, - "type": { - "id": 8, - "name": "Gold" - }, - "value": 50000, - "description": "24 Carat Gold chain weighing 12 grams", - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } -} -
-
+   +
+
+

Batch API Errors

+ +

+ In Batch API without "enclosingTransaction=true", if one of the response is erroneous, then an + appropriate status code will be set for that request and the error message will be returned in it's + "body", while all other requests will return successful response with a status code of "200". +

-   -
-
-

Create a Collateral

-

- Note: Currently, Collaterals may be added only before a Loan - is approved
-

- - - - - - - -
Mandatory Fields - for "internal" collaterals
collateralTypeId
-
-
- -POST https://DomainName/api/v1//loans/{loanId}/collaterals - - -POST /loans/1/collaterals -Content-Type: application/json -Request Body: -{ - collateralTypeId:9, -} - - -{ - "loanId": 1, - "resourceId": 12 -} - - -POST /loans/1/collaterals -Content-Type: application/json -Request Body: -{ - "collateralTypeId":"8", - "value": "50000", - "dateFormat":"dd MMMM yyyy", - "locale": "en", - "description": "24 Carat Gold chain weighing 12 grams" -} - - -{ - "loanId": 1, - "resourceId": 13 -} - -
+
-   -
-
-

Update a Collateral

-
-
- -PUT https://DomainName/api/v1/loans/{loanId}/collaterals/{collateralId} - - -PUT loans/1/collaterals/12 -Content-Type: application/json -Request Body: -{ -"description": "22 Carat Gold chain weighing 12 grams" -} - - -{ - "loanId": 1, - "resourceId": 12, - "changes": { - "description": "22 Carat Gold chain weighing 12 grams" - } -} - -
-
+   +
+
+

Available Command Strategies

-   -
-
-

Remove a Collateral

-

- Note: A collateral can only be removed from Loans that are not yet approved. -

-
-
- -DELETE https://DomainName/api/v1/loans/{loanId}/collaterals/{collateralId} - - -DELETE loans/1/collaterals/13 -Content-Type: application/json -No Request Body: - - -{ - "loanId": 1, - "resourceId": 13 -} - -
-
+

+ These are the currently available command strategies within the Mifos Batch API. So, these listed + operations can be executed using a Batch Request. +

- -   -
-
-

Loan Charges

-

Its typical for MFIs to add extra costs for their loan products. They - can be either Fees or Penalties.

-

Loan Charges are instances of Charges and - represent either fees and penalties for loan products. Refer Charges - for documentation of the various properties of a charge, Only additional properties ( - specific to the context of a Charge being associated with a Loan) are - described here

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
amountPaid
The Total amount which has been paid for this Charge -
amountWaived
The Total amount that has been waived for this Charge -
amountWrittenOff
Total amount written off from this Charge -
amountOutstanding
The Total outstanding amount for this Charge -
-
-
+
+ +
-   -
-
-

List Loan Charges

-

Example Requests:

-
loans/1/charges
-
-
-
loans/1/charges?fields=name,amountOrPercentage
-
-
- -GET https://DomainName/api/v1/loans/{loanId}/charges - - -[ - { - "id": 1, - "chargeId": 1, - "name": "Loan Processing fee", - "chargeTimeType": { - "id": 1, - "code": "chargeTimeType.disbursement", - "value": "Disbursement" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "percentage": 0, - "amountPercentageAppliedTo": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100, - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 100, - "amountOrPercentage": 100, - "penalty": false - }, - { - "id": 7, - "chargeId": 2, - "name": "Collection Fee", - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "dueDate": [ - 2013, - 3, - 29 - ], - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "percentage": 0, - "amountPercentageAppliedTo": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100, - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 100, - "amountOrPercentage": 100, - "penalty": false - } -] - -
-
+   +
+
+

Errors

-   -
-
-

Retrieve Loan Charges Template

-

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:

-
loans/1/charges/template
-
-
- -GET https://DomainName/api/v1/loans/{loanId}/charges/template - - -{ - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "chargeOptions": [ - { - "id": 2, - "name": "Collection Fee", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100, - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - } - }, - { - "id": 3, - "name": "Late payment penalty", - "active": true, - "penalty": true, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 1, - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - } - }, - { - "id": 1, - "name": "Loan Processing fee", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100, - "chargeTimeType": { - "id": 1, - "code": "chargeTimeType.disbursement", - "value": "Disbursement" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - } - } - ], - "penalty": false -} - -
-
+

All errors are returned in JSON.

-   -
-
-

Retrieve a Loan Charge

-

Example Requests:

-
/loans/1/charges/1
-
-
-
/loans/1/charges/1?fields=name,amountOrPercentage
-
-
- -GET https://DomainName/api/v1/loans/{loanId}/charges/{chargeId} - - -{ - "id": 1, - "chargeId": 1, - "name": "Loan Processing fee", - "chargeTimeType": { - "id": 1, - "code": "chargeTimeType.disbursement", - "value": "Disbursement" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "percentage": 0, - "amountPercentageAppliedTo": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100, - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 100, - "amountOrPercentage": 100, - "penalty": false -} -
-
+
+
+
HTTP Status Code Summary
+
    +
  • 200 OK - Everything Worked.
  • +
  • 400 Bad Request - Invalid Parameter or + Data Integrity Issue. +
  • +
  • 401 Authentication Error.
  • +
  • 403 Unauthorized Request.
  • +
  • 404 Resource Not Found
  • +
  • 500 Platform Internal Server Error.
  • +
+
+
+ + Error Message returned when attempting to create an Office without passing any parameters + { + "developerMessage": "The request was invalid. This typically will happen due to validation errors + which are provided.", + "developerDocLink": "https://github.com/openMF/mifosx/wiki/HTTP-API-Error-codes", + "httpStatusCode": "400", + "defaultUserMessage": "Validation errors exist.", + "userMessageGlobalisationCode": "validation.msg.validation.errors.exist", + "errors": [ + { + "developerMessage": "The parameter name cannot be blank.", + "defaultUserMessage": "The parameter name cannot be blank.", + "userMessageGlobalisationCode": "validation.msg.office.name.cannot.be.blank", + "parameterName": "name", + "value": null, + "args": [] + }, + { + "developerMessage": "The parameter openingDate cannot be blank.", + "defaultUserMessage": "The parameter openingDate cannot be blank.", + "userMessageGlobalisationCode": "validation.msg.office.openingDate.cannot.be.blank", + "parameterName": "openingDate", "value": null, "args": [] + }, + { + "developerMessage": "The parameter parentId cannot be blank.", + "defaultUserMessage": "The parameter parentId cannot be blank.", + "userMessageGlobalisationCode": + "validation.msg.office.parentId.cannot.be.blank", "parameterName": + "parentId", "value": null, "args": [] + } + ] + } + +
+
+   +
+
+

Self Service API Overview

+

+ Self Service APIs are a set of APIs with restricted data scope. Functional specifications and design + can be viewed + here. +

+ +

+ While creating a user, user can be tagged as self service user. Also you + can associate + clients that this user has access to. Data scope is restricted to these linked clients. +

+

+ A self service user shall have access to only self service APIs. Self service APIs cannot be + accessed by non-self service user. Vice-versa is also true. +

+
+
-   -
-
-

Create a Loan Charge

- - - - - - - -
Mandatory Fields - for Loan Charges
chargeId, amount, dueDate
-
-
- -POST https://DomainName/api/v1/loans/{loanId}/charges - - -POST /loans/1/charges -Content-Type: application/json -Request Body: -{ - "chargeId": "2", - "locale": "en", - "amount": "100", - "dateFormat": "dd MMMM yyyy", - "dueDate": "29 April 2013" -} - - -{ - "officeId": 1, - "clientId": 1, - "loanId": 1, - "resourceId": 31 -} - -
+
+ +   +
+
+

Clients

+

Clients are people and businesses that have applied (or may apply) to an MFI for loans.

+

Clients can be created in Pending or straight into Active state.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
accountNo
If provided during client creation, its + value is set as account no. for client account, otherwise an + auto generated account no. is put in place based on the + configured strategy. +
externalId
A place to put an external reference for + this client e.g. The ID another system uses.
If + provided, it must be unique. +
active
Indicates whether this client is to be created as active client. If + active=true, then activationDate must be provided. If active=false, then the client + is created as pending. +
activationDate
The date on which the client became active. +
firstname
Facility to break up name into parts + suitable for humans. +
middlename
Facility to break up name into parts + suitable for humans. +
lastname
Facility to break up name into parts + suitable for humans. +
fullname
Facility to set name of a client or + business that doesn't suit the firstname,middlename,lastname + structure. +
mobileNo
Optional: unique mobile number that is used by SMS or Mobile Money + functionality. +
staffId
The staffId of the staff member dealing with the client office. The staff + member is not specifically the loan officer. +
savingsProductId
Optional: Default overdraft savings account of client +
datatables
Facility to enrich client details. +
+
+
-   -
-
-

Update a Loan Charge

-

Currently Loan Charges may be updated only if the Loan - is not yet approved -

-
-
- -PUT https://DomainName/api/v1/loans/{loanId}/charges/{chargeId} - - -PUT loans/1/charges/12 -Content-Type: application/json -Request Body: -{ - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "amount": "60", - "dueDate": "27 March 2013" -} - - -{ - "officeId": 1, - "clientId": 1, - "loanId": 1, - "resourceId": 6, - "changes": { - "dueDate": "27 March 2013", - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "amount": 60.0 - } -} - -
-
+   +
+
+

Retrieve Client Details Template

+

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
  • +
+

+
Arguments
+
+
officeId
+
+ Integer optional +
+
staffInSelectedOfficeOnly
+
+ Boolean optional +
+
Defaults to false if not provided. If staffInSelectedOfficeOnly=true only staff + who are associated with the selected branch are returned. +
+
commandParam
+
+ String optional +
+
If commandParam=close retrieves all closureReasons which are associated with + "ClientClosureReason" value. +
+
+

Example Request:

+
clients/template
+
+
+ + GET https://DomainName/api/v1/clients/template + + + { + "activationDate":[2014,3,4], + "officeId":1, + "officeOptions":[{ + "id":1, + "name":"Head Office", + "nameDecorated":"Head Office" + }], + "staffOptions":[{ + "id":1, + "firstname":"xyz", + "lastname":"sjs", + "displayName":"sjs, xyz", + "officeId":1, + "officeName":"Head Office", + "isLoanOfficer":true, + "isActive":true + }], + "savingProductOptions":[{ + "id":4, + "name":"account overdraft", + "withdrawalFeeForTransfers":false, + "allowOverdraft":false + }], + "datatables": [{ + "applicationTableName": "m_client", + "registeredTableName": "Address Details", + "columnHeaderData": [{ + "columnName": "client_id", + "columnType": "bigint", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": false, + "isColumnPrimaryKey": true, + "columnValues": [] + }, + { + "columnName": "State", + "columnType": "varchar", + "columnLength": 25, + "columnDisplayType": "STRING", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "COUNTRY_cd_Country", + "columnType": "int", + "columnLength": 0, + "columnDisplayType": "CODELOOKUP", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [{ + "id": 17, + "value": "India", + "score": 0 + }], + "columnCode": "COUNTRY" + }] + }, + { + "applicationTableName": "m_client", + "registeredTableName": "Client Timeline", + "columnHeaderData": [{ + "columnName": "client_id", + "columnType": "bigint", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": false, + "isColumnPrimaryKey": true, + "columnValues": [] + }, + { + "columnName": "Approval Data", + "columnType": "date", + "columnLength": 0, + "columnDisplayType": "DATE", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [] + }] + }] + } + +
-   -
-
-

Pay Loan Charge

-

Loan Charge will be paid if the loan is linked with a savings account -

-
-
- -POST https://DomainName/api/v1/loans/{loanId}/charges/{chargeId}?command=pay - - -POST loans/1/charges/12?command=pay -Content-Type: application/json -Request Body: -{ - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "transactionDate": "19 September 2013" -} - - +
+ + GET https://DomainName/api/v1/clients/template + + + { + "activationDate":[2014,3,4], + "officeId":1, + "officeOptions":[{ + "id":1, + "name":"Head Office", + "nameDecorated":"Head Office" + }], + "staffOptions":[{ + "id":1, + "firstname":"xyz", + "lastname":"sjs", + "displayName":"sjs, xyz", + "officeId":1, + "officeName":"Head Office", + "isLoanOfficer":true, + "isActive":true + }], + "savingProductOptions":[{ + "id":4, + "name":"account overdraft", + "withdrawalFeeForTransfers":false, + "allowOverdraft":false + }], + "datatables": [{ + "applicationTableName": "m_client", + "registeredTableName": "Address Details", + "columnHeaderData": [{ + "columnName": "client_id", + "columnType": "bigint", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": false, + "isColumnPrimaryKey": true, + "columnValues": [] + }, + { + "columnName": "State", + "columnType": "varchar", + "columnLength": 25, + "columnDisplayType": "STRING", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "COUNTRY_cd_Country", + "columnType": "int", + "columnLength": 0, + "columnDisplayType": "CODELOOKUP", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [{ + "id": 17, + "value": "India", + "score": 0 + }], + "columnCode": "COUNTRY" + }] + }, + { + "applicationTableName": "m_client", + "registeredTableName": "Client Timeline", + "columnHeaderData": [{ + "columnName": "client_id", + "columnType": "bigint", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": false, + "isColumnPrimaryKey": true, + "columnValues": [] + }, + { + "columnName": "Approval Data", + "columnType": "date", + "columnLength": 0, + "columnDisplayType": "DATE", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [] + }] + }] + } + +
+
+

if address is enabled

+ + GET https://DomainName/api/v1/clients/template + + - { - "officeId": 1, - "clientId": 1, - "loanId": 6, - "savingsId": 1, - "resourceId": 12 - } - -
-
-   -
-
-

Delete a Loan Charge

-

- Note:Currently, A Loan Charge may only be removed from Loans that are not - yet approved. -

-
-
- -DELETE https://DomainName/api/v1/loans/{loanId}/charges/{chargeId} - - -DELETE loans/1/charges/2 -Content-Type: application/json -No Request Body: - - -{ - "officeId": 1, - "clientId": 1, - "loanId": 1, - "resourceId": 2 -} - -
-
+ { + "activationDate": + [ + 2016, + 8, + 11 + ], + "officeId": 1, + "officeOptions": + [ + { + "id": 1, + "name": "Head Office", + "nameDecorated": "Head Office" + } + ], + "savingProductOptions": + [ + ], + "genderOptions": + [ + { + "id": 748, + "name": "Female", + "position": 1, + "isActive": true + }, + { + "id": 749, + "name": "Male", + "position": 2, + "isActive": true + } + ], + "clientTypeOptions": + [ + { + "id": 761, + "name": "JLG", + "position": 1, + "description": "", + "isActive": true + }, + { + "id": 760, + "name": "individual", + "position": 2, + "description": "", + "isActive": true + } + ], + "clientClassificationOptions": + [ + ], + "clientNonPersonConstitutionOptions": + [ + ], + "clientNonPersonMainBusinessLineOptions": + [ + ], + "clientLegalFormOptions": + [ + { + "id": 1, + "code": "legalFormType.person", + "value": "PERSON" + }, + { + "id": 2, + "code": "legalFormType.entity", + "value": "ENTITY" + } + ], + "address": + { + "countryIdOptions": + [ + { + "id": 802, + "name": "INDIA", + "position": 1, + "isActive": true + }, + { + "id": 803, + "name": "BANGLADESH", + "position": 2, + "isActive": true + }, + { + "id": 807, + "name": "UNITED STATES", + "position": 3, + "isActive": true + } + ], + "stateProvinceIdOptions": + [ + { + "id": 800, + "name": "MAHARASHTRA", + "position": 1, + "isActive": true + }, + { + "id": 801, + "name": "GUJRAT", + "position": 2, + "isActive": true + } + ], + "addressTypeIdOptions": + [ + { + "id": 804, + "name": "PERMANENT ADDRESS", + "position": 1, + "isActive": true + }, + { + "id": 805, + "name": "OFFICE ADDRESS", + "position": 2, + "isActive": true + }, + { + "id": 806, + "name": "CURRENT ADDRESS", + "position": 3, + "isActive": true + } + ] + }, + "isAddressEnabled": true + }, + "datatables": [{ + "applicationTableName": "m_client", + "registeredTableName": "Address Details", + "columnHeaderData": [{ + "columnName": "client_id", + "columnType": "bigint", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": false, + "isColumnPrimaryKey": true, + "columnValues": [] + }, + { + "columnName": "State", + "columnType": "varchar", + "columnLength": 25, + "columnDisplayType": "STRING", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "COUNTRY_cd_Country", + "columnType": "int", + "columnLength": 0, + "columnDisplayType": "CODELOOKUP", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [{ + "id": 17, + "value": "India", + "score": 0 + }], + "columnCode": "COUNTRY" + }] + }, + { + "applicationTableName": "m_client", + "registeredTableName": "Client Timeline", + "columnHeaderData": [{ + "columnName": "client_id", + "columnType": "bigint", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": false, + "isColumnPrimaryKey": true, + "columnValues": [] + }, + { + "columnName": "Approval Data", + "columnType": "date", + "columnLength": 0, + "columnDisplayType": "DATE", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [] + }] + }] - -  -
-
-

Loan Rescheduling

-

Loan rescheduling provides the ability to give clients extra grace periods, extend loan term by adding extra installments and adjust the interest rate of a loan.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
loanId
The ID of the loan to be rescheduled.
rescheduleFromDate
Due date of the start point (installment) of the rescheduling.
graceOnPrincipal
Number of installments to be added with zero principal.
graceOnInterest
Number of installments to be added with zero interest.
extraTerms
Number of installments to be added after the last loan repayment schedule installment.
recalculateInterest
If recalculateInterest="true", the total interest amount of the loan is recalculated. If recalculateInterest="false", the total interest amount remains the same.
newInterestRate
New interest rate to be used in calculating the interest amount for each rescheduled period/installment.
adjustedDueDate
New due date for the start point (installment) of the rescheduling.
rescheduleReasonId
The ID of the code value that indicates the reason for rescheduling the loan.
rescheduleReasonComment
Text provided as extra reason for the rescheduling of the loan.
submittedOnDate
The date on which the loan reschedule request was made.
-
-
-   -
-
-

Create a Loan Reschedule Request

- - - - - - - -
Mandatory Fields
loanId, rescheduleFromDate, rescheduleReasonId, submittedOnDate,
- graceOnPrincipal OR graceOnInterest OR extraTerms OR newInterestRate OR adjustedDueDate -
-
- - - - - - - -
Optional Fields
recalculateInterest, rescheduleReasonComment
-
-
- -POST https://DomainName/api/v1/rescheduleloans - - -POST rescheduleloans -Content-Type: application/json Request Body: -{ - "loanId": 1, - "graceOnPrincipal": 2, - "graceOnInterest": 3, - "extraTerms": 2, - "rescheduleFromDate": "04 December 2014", - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "recalculateInterest": true, - "submittedOnDate": "04 September 2014", - "newInterestRate" : 28, - "rescheduleReasonId": 1 -} - - -{ - "loanId": 1, - "resourceId": 1 -} - -
-
- -POST rescheduleloans -Content-Type: application/json Request Body: -{ - "loanId": 1, - "graceOnPrincipal": 2, - "rescheduleFromDate": "25 December 2013", - "adjustedDueDate": "31 December 2013", - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "submittedOnDate": "04 September 2013", - "rescheduleReasonComment" : "Client has gone AWOL", - "rescheduleReasonId": 1 -} - - -{ - "loanId": 1, - "resourceId": 1 -} - -
-
-   -
-
-

Retrieve a Loan Reschedule Request

-

Example Requests:

-
rescheduleloans/1
-
-
- -GET https://DomainName/api/v1/rescheduleloans/{requestId} - - -{ - "id": 1, - "loanId": 1, - "clientId": 1, - "clientName": "test test", - "loanAccountNumber": "000000001", - "statusEnum": { - "id": 100, - "code": "loanStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "pendingApproval": true, - "approved": false, - "rejected": false - }, - "rescheduleFromInstallment": 5, - "rescheduleFromDate": [ - 2013, - 12, - 25 - ], - "recalculateInterest": false, - "rescheduleReasonCodeValue": { - "id": 1, - "name": "Passport", - "isActive": false - }, - "timeline": { - "submittedOnDate": [ - 2013, - 9, - 4 - ], - "submittedByUsername": "mifos", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator" - }, - "rescheduleReasonComment": "Client has gone AWOL", - "loanTermVariationsData": [ - { - "id": 13, - "termType": { - "id": 4, - "code": "loanTermType.dueDate", - "value": "dueDate" - }, - "termVariationApplicableFrom": [ - 2013, - 12, - 25 - ], - "dateValue": [ - 2013, - 12, - 31 - ], - "isSpecificToInstallment": false - }, - { - "id": 14, - "termType": { - "id": 8, - "code": "loanTermType.graceOnPrincipal", - "value": "graceOnPrincipal" - }, - "termVariationApplicableFrom": [ - 2013, - 12, - 25 - ], - "decimalValue": 2, - "isSpecificToInstallment": false - } - ] -} - -
-
-   -
-
-

Retrieve a Preview of The New Loan Repayment Schedule

-

Example Requests:

-
rescheduleloans/1?command=previewLoanReschedule
-
-
- -GET https://DomainName/api/v1/rescheduleloans/{requestId}?command=previewLoanReschedule - - + +
+
- "currency": { - "code": "KES", - "name": "Kenyan Shilling", - "decimalPlaces": 0, - "inMultiplesOf": 10, - "displaySymbol": "KSh", - "nameCode": "currency.KES", - "displayLabel": "Kenyan Shilling (KSh)" - }, - "loanTermInDays": 182, - "totalPrincipalDisbursed": 10000, - "totalPrincipalExpected": 10000, - "totalPrincipalPaid": 900.000000, - "totalInterestCharged": 960, - "totalFeeChargesCharged": 0.000000, - "totalPenaltyChargesCharged": 2500.000000, - "totalRepaymentExpected": 13460, - "totalOutstanding": 12060.000000, - "periods": [ - { - "period": 1, - "fromDate": [ - 2013, - 11, - 8 - ], - "dueDate": [ - 2013, - 11, - 8 - ], - "daysInPeriod": 0, - "principalOriginalDue": 0, - "principalDue": 0, - "principalOutstanding": 0, - "principalLoanBalanceOutstanding": 10000, - "interestOriginalDue": 0, - "interestDue": 0, - "interestOutstanding": 0, - "feeChargesDue": 0, - "penaltyChargesDue": 0, - "totalOriginalDueForPeriod": 0, - "totalDueForPeriod": 0, - "totalPaidForPeriod": 0, - "totalOutstandingForPeriod": 0, - "totalOverdue": 0, - "totalActualCostOfLoanForPeriod": 0 - }, - ... - ... - { - "period": 30, - "fromDate": [ - 2014, - 5, - 23 - ], - "dueDate": [ - 2014, - 5, - 30 - ], - "daysInPeriod": 7, - "principalOriginalDue": 300, - "principalDue": 300, - "principalOutstanding": 300, - "principalLoanBalanceOutstanding": 0, - "interestOriginalDue": 130, - "interestDue": 130, - "interestOutstanding": 130, - "feeChargesDue": 0, - "penaltyChargesDue": 0, - "totalOriginalDueForPeriod": 430, - "totalDueForPeriod": 430, - "totalPaidForPeriod": 0, - "totalOutstandingForPeriod": 430, - "totalOverdue": 430, - "totalActualCostOfLoanForPeriod": 130 - } - ] -} -
-
-
-   -
-
-

Reject a Loan Reschedule Request

-
-
- POST https://DomainName/api/v1/rescheduleloans/{requestId}?command=reject - POST rescheduleloans/1?command=reject -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "rejectedOnDate": "11 September 2014" -} - - -{ - "loanId": 1, - "resourceId": 1, - "changes": { - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "rejectedOnDate": "11 September 2014", - "rejectedByUserId": 1 - } -} - -
-
-   -
-
-

Approve a Loan Reschedule Request

-

Rescheduling of a loan happens once a loan reschedule request is approved.

-
-
- POST https://DomainName/api/v1/rescheduleloans/{requestId}?command=approve - POST rescheduleloans/1?command=approve -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "approvedOnDate": "11 September 2014" -} - - -{ - "loanId": 1, - "resourceId": 1, - "changes": { - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "approvedOnDate": "11 September 2014", - "approvedByUserId": 1 - } -} - -
-
+   +
+
+

Create a Client

+

+ Note:
1. You can enter either:
+ firstname/middlename/lastname - for a person (middlename is + optional) OR
fullname - for a business or organisation + (or person known by one name).
+ 2. If address is enable(enable-address=true), then additional field
+ called address has to be passed. + +

+ + + + + + + +
+
Mandatory Fields
+
firstname and lastname OR fullname,
officeId,
active=true and activationDate OR + active=false,
+ if(address enabled) address +
+
+ + + + + + + +
+
Optional Fields
+
groupId, externalId, accountNo, staffId, mobileNo, savingsProductId, genderId, clientTypeId, + clientClassificationId +
+
+
+ + POST https://DomainName/api/v1/clients + + + POST clients + Content-Type: application/json Request Body: + { + "officeId": 1, + "firstname": "Petra", + "lastname": "Yton", + "externalId": "786YYH7", + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "active": true, + "activationDate": "04 March 2009", + "submittedOnDate":"04 March 2009", + "savingsProductId" : 4, + "datatables": [{ + "registeredTableName": "Family Details", + "data": { + "locale": "en", + "Number of members": "5", + "Number of dependents": "3", + "No of Children": "2", + "Date of verification": "14 December 2016", + "dateFormat": "dd MMMM yyyy" + } + }, + { + "registeredTableName": "Residency Address", + "data": { + "locale": "en", + "Address Line": "Basavana Gudi Road", + "Street": "Gandhi Bazaar", + "Landmark": "Aashrama", + "COUNTRY_cd_Country": 17, + "STATE_cd_State": "7", + "DISTRICT_cd_District": "13", + "Pincode": "560040" + } + }] + } + + + { + "officeId": 1, + "clientId": 1, + "resourceId": 1, + "savingsId": 10 + } + +
+
+ +

if address is enabled

+ POST https://DomainName/api/v1/clients +
+ + POST clients + Content-Type: application/json Request Body: + { + "firstname": "Petra", + "lastname": "Yton", + "externalId": "786YYH7", + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "active": true, + "activationDate": "04 March 2009", + "submittedOnDate":"04 March 2009", + "officeId":1, + "address":[ + { + "addressTypeId": 805, + "isActive": true, + "street": "rapchik", + "stateProvinceId": 800, + "countryId": 802 + } + ] + } + + + { + "officeId": 1, + "clientId": 1, + "resourceId": 1, + "savingsId": 10 + } + +
+
+ + POST clients + Content-Type: application/json + Request Body: + { + "officeId": 1, + "fullname": "Client of group", + "groupId": 1, + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "active": true, + "activationDate": "04 March 2009" + } + + + { + "officeId": 1, + "groupId": 1, + "clientId": 2, + "resourceId": 2 + } + +
+
- -  -
-
-

Loan Rescheduling

-

Loan Term Variations provides the ability to change due dates, amounts and number of instalments before loan approval.

- - - - - - - - - - - - - - - - - -
Field Descriptions
loanId
The ID of the loan to be modified.
exceptions
contains exception data for variations(modifiedinstallments,newinstallments and deletedinstallments described below)
-

Exception object fields

-

Modifiedinstallments Array fields

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
dueDate
Schedule dueDate for which this exception should be applied.
modifiedDueDate
this is the exception data to move the due date to specified date for a instalment
installmentAmount
new instalment amount(principal+interest) for the specified instalment. supported only for interest method declining with equal instalments Amortization
principal
new Principal amount for the specified instalment. supported only for interest method declining with equal instalments Amortization and for Flat loans.
-

newinstallments Array fields

- - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
dueDate
Schedule dueDate for inserting new instalment.
installmentAmount
new instalment amount(principal+interest) for the new instalment. supported only for interest method declining with equal instalments Amortization
principal
new Principal amount for the new instalment. supported only for interest method declining with equal instalments Amortization and for Flat loans.
-

deletedinstallments Array fields

- - - - - - - - - - -
Field Descriptions
dueDate
Schedule dueDate for removing specific instalment.
-
-
+   +
+
+

Activate a Client

+

Clients can be created in a Pending state. This API exists to enable client activation (for + when a client becomes an approved member of the financial Institution).

+

If the client happens to be already active this API will result in an error.

+
+
+ POST https://Domain + Name/api/v1/clients/{clientId}?command=activate + POST clients/1?command=activate + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "activationDate": "01 March 2011" + } + + + { + "officeId": 1, + "clientId": 1, + "resourceId": 1 + } + +
+
+   +
+
+

Close a Client

+

Clients can be closed if they do not have any non-closed loans/savingsAccount. This API exists to + close a client .

+

If the client have any active loans/savingsAccount this API will result in an error.

+
+
+ POST https://Domain Name/api/v1/clients/{clientId}?command=close + POST clients/1?command=close + Content-Type: application/json + Request Body: + { + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "closureDate":"25 June 2013", + "closureReasonId":"11" + } + + + { + "clientId":15, + "resourceId":15 + } + +
+
+   +
+
+

Reject a Client

+

Clients can be rejected when client is in pending for activation status.

+

If the client is any other status, this API throws an error.

+ + + + + + + +
+
Mandatory Fields
+
rejectionDate, rejectionReasonId
+
+
+
+ POST https://Domain + Name/api/v1/clients/{clientId}?command=reject + POST clients/1?command=reject + Content-Type: application/json + Request Body: + { + "rejectionDate":"28 November 2014", + "rejectionReasonId":16, + "locale":"en", + "dateFormat":"dd MMMM yyyy" + } + + + { + "clientId":15, + "resourceId":15 + } + +
+
-   -
-
-

Calculate loan repayment schedule based on Loan term variations

- - - - - - - -
Mandatory Fields
exceptions,locale,dateFormat
-
-
- -POST https://DomainName/api/v1/loans/1/schedule?command=calculateLoanSchedule - - -POST loans/{loanIdd}/schedule?command=calculateLoanSchedule -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "exceptions": { - "modifiedinstallments": [{ - "dueDate": '01 April 2016', - "modifiedDueDate": '05 April 2016' - }, - { - "dueDate": '05 January 2016', - "modifiedDueDate": '01 January 2016' - }], - "deletedinstallments": [{ - "dueDate": "01 October 2016" - }], - newinstallments: [{ - dueDate: '10 October 2016', - installmentAmount: '1000' -}] - } -} - - -{ - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "loanTermInDays": 12, - "totalPrincipalDisbursed": 10000, - "totalPrincipalExpected": 10000, - "totalInterestCharged": 1340.98, - "totalFeeChargesCharged": 0, - "totalPenaltyChargesCharged": 0, - "totalRepaymentExpected": 11340.98, - "periods": [{ - "period": 1, - "fromDate": [2015, - 11, - 1], - "dueDate": [2015, - 12, - 1], - "daysInPeriod": 30, - "principalOriginalDue": 745.6, - "principalDue": 745.6, - "principalOutstanding": 745.6, - "principalLoanBalanceOutstanding": 9254.4, - "interestOriginalDue": 200, - "interestDue": 200, - "interestOutstanding": 200, - "feeChargesDue": 0, - "penaltyChargesDue": 0, - "totalOriginalDueForPeriod": 945.6, - "totalDueForPeriod": 945.6, - "totalPaidForPeriod": 0, - "totalOutstandingForPeriod": 945.6, - "totalOverdue": 945.6, - "totalActualCostOfLoanForPeriod": 200 - }, - { - "period": 2, - "fromDate": [2015, - 12, - 1], - "dueDate": [2016, - 1, - 1], - "daysInPeriod": 31, - "principalOriginalDue": 814.91, - "principalDue": 814.91, - "principalOutstanding": 814.91, - "principalLoanBalanceOutstanding": 8439.49, - "interestOriginalDue": 185.09, - "interestDue": 185.09, - "interestOutstanding": 185.09, - "feeChargesDue": 0, - "penaltyChargesDue": 0, - "totalOriginalDueForPeriod": 1000, - "totalDueForPeriod": 1000, - "totalPaidForPeriod": 0, - "totalOutstandingForPeriod": 1000, - "totalActualCostOfLoanForPeriod": 185.09 - }, - { - "period": 3, - "fromDate": [2016, - 1, - 1], - "dueDate": [2016, - 2, - 1], - "daysInPeriod": 31, - "principalOriginalDue": 770.75, - "principalDue": 770.75, - "principalOutstanding": 770.75, - "principalLoanBalanceOutstanding": 7668.74, - "interestOriginalDue": 168.79, - "interestDue": 168.79, - "interestOutstanding": 168.79, - "feeChargesDue": 0, - "penaltyChargesDue": 0, - "totalOriginalDueForPeriod": 939.54, - "totalDueForPeriod": 939.54, - "totalPaidForPeriod": 0, - "totalOutstandingForPeriod": 939.54, - "totalActualCostOfLoanForPeriod": 168.79 - }, - { - "period": 4, - "fromDate": [2016, - 2, - 1], - "dueDate": [2016, - 3, - 5], - "daysInPeriod": 33, - "principalOriginalDue": 786.17, - "principalDue": 786.17, - "principalOutstanding": 786.17, - "principalLoanBalanceOutstanding": 6882.57, - "interestOriginalDue": 153.37, - "interestDue": 153.37, - "interestOutstanding": 153.37, - "feeChargesDue": 0, - "penaltyChargesDue": 0, - "totalOriginalDueForPeriod": 939.54, - "totalDueForPeriod": 939.54, - "totalPaidForPeriod": 0, - "totalOutstandingForPeriod": 939.54, - "totalActualCostOfLoanForPeriod": 153.37 - }, - { - "period": 5, - "fromDate": [2016, - 3, - 5], - "dueDate": [2016, - 4, - 5], - "daysInPeriod": 31, - "principalOriginalDue": 801.89, - "principalDue": 801.89, - "principalOutstanding": 801.89, - "principalLoanBalanceOutstanding": 6080.68, - "interestOriginalDue": 137.65, - "interestDue": 137.65, - "interestOutstanding": 137.65, - "feeChargesDue": 0, - "penaltyChargesDue": 0, - "totalOriginalDueForPeriod": 939.54, - "totalDueForPeriod": 939.54, - "totalPaidForPeriod": 0, - "totalOutstandingForPeriod": 939.54, - "totalActualCostOfLoanForPeriod": 137.65 - }, - { - "period": 6, - "fromDate": [2016, - 4, - 5], - "dueDate": [2016, - 5, - 1], - "daysInPeriod": 26, - "principalOriginalDue": 817.93, - "principalDue": 817.93, - "principalOutstanding": 817.93, - "principalLoanBalanceOutstanding": 5262.75, - "interestOriginalDue": 121.61, - "interestDue": 121.61, - "interestOutstanding": 121.61, - "feeChargesDue": 0, - "penaltyChargesDue": 0, - "totalOriginalDueForPeriod": 939.54, - "totalDueForPeriod": 939.54, - "totalPaidForPeriod": 0, - "totalOutstandingForPeriod": 939.54, - "totalActualCostOfLoanForPeriod": 121.61 - }, - { - "period": 7, - "fromDate": [2016, - 5, - 1], - "dueDate": [2016, - 6, - 1], - "daysInPeriod": 31, - "principalOriginalDue": 834.28, - "principalDue": 834.28, - "principalOutstanding": 834.28, - "principalLoanBalanceOutstanding": 4428.47, - "interestOriginalDue": 105.26, - "interestDue": 105.26, - "interestOutstanding": 105.26, - "feeChargesDue": 0, - "penaltyChargesDue": 0, - "totalOriginalDueForPeriod": 939.54, - "totalDueForPeriod": 939.54, - "totalPaidForPeriod": 0, - "totalOutstandingForPeriod": 939.54, - "totalActualCostOfLoanForPeriod": 105.26 - }, - { - "period": 8, - "fromDate": [2016, - 6, - 1], - "dueDate": [2016, - 7, - 1], - "daysInPeriod": 30, - "principalOriginalDue": 850.97, - "principalDue": 850.97, - "principalOutstanding": 850.97, - "principalLoanBalanceOutstanding": 3577.5, - "interestOriginalDue": 88.57, - "interestDue": 88.57, - "interestOutstanding": 88.57, - "feeChargesDue": 0, - "penaltyChargesDue": 0, - "totalOriginalDueForPeriod": 939.54, - "totalDueForPeriod": 939.54, - "totalPaidForPeriod": 0, - "totalOutstandingForPeriod": 939.54, - "totalActualCostOfLoanForPeriod": 88.57 - }, - { - "period": 9, - "fromDate": [2016, - 7, - 1], - "dueDate": [2016, - 8, - 1], - "daysInPeriod": 31, - "principalOriginalDue": 867.99, - "principalDue": 867.99, - "principalOutstanding": 867.99, - "principalLoanBalanceOutstanding": 2709.51, - "interestOriginalDue": 71.55, - "interestDue": 71.55, - "interestOutstanding": 71.55, - "feeChargesDue": 0, - "penaltyChargesDue": 0, - "totalOriginalDueForPeriod": 939.54, - "totalDueForPeriod": 939.54, - "totalPaidForPeriod": 0, - "totalOutstandingForPeriod": 939.54, - "totalActualCostOfLoanForPeriod": 71.55 - }, - { - "period": 10, - "fromDate": [2016, - 8, - 1], - "dueDate": [2016, - 9, - 1], - "daysInPeriod": 31, - "principalOriginalDue": 885.35, - "principalDue": 885.35, - "principalOutstanding": 885.35, - "principalLoanBalanceOutstanding": 1824.16, - "interestOriginalDue": 54.19, - "interestDue": 54.19, - "interestOutstanding": 54.19, - "feeChargesDue": 0, - "penaltyChargesDue": 0, - "totalOriginalDueForPeriod": 939.54, - "totalDueForPeriod": 939.54, - "totalPaidForPeriod": 0, - "totalOutstandingForPeriod": 939.54, - "totalActualCostOfLoanForPeriod": 54.19 - }, - { - "period": 11, - "fromDate": [2016, - 9, - 1], - "dueDate": [2016, - 10, - 10], - "daysInPeriod": 39, - "principalOriginalDue": 903.05, - "principalDue": 903.05, - "principalOutstanding": 903.05, - "principalLoanBalanceOutstanding": 921.11, - "interestOriginalDue": 36.48, - "interestDue": 36.48, - "interestOutstanding": 36.48, - "feeChargesDue": 0, - "penaltyChargesDue": 0, - "totalOriginalDueForPeriod": 939.53, - "totalDueForPeriod": 939.53, - "totalPaidForPeriod": 0, - "totalOutstandingForPeriod": 939.53, - "totalActualCostOfLoanForPeriod": 36.48 - }, - { - "period": 12, - "fromDate": [2016, - 10, - 10], - "dueDate": [2016, - 11, - 1], - "daysInPeriod": 22, - "principalOriginalDue": 921.11, - "principalDue": 921.11, - "principalOutstanding": 921.11, - "principalLoanBalanceOutstanding": 0, - "interestOriginalDue": 18.42, - "interestDue": 18.42, - "interestOutstanding": 18.42, - "feeChargesDue": 0, - "penaltyChargesDue": 0, - "totalOriginalDueForPeriod": 939.53, - "totalDueForPeriod": 939.53, - "totalPaidForPeriod": 0, - "totalOutstandingForPeriod": 939.53, - "totalActualCostOfLoanForPeriod": 18.42 - }] -} - -
-
+   +
+
+

Withdraw a Client

+

Client applications can be withdrawn when client is in a pending for activation status.

+

If the client is any other status, this API throws an error.

+ + + + + + + +
+
Mandatory Fields
+
withdrawalDate, withdrawalReasonId
+
+
+
+ POST https://Domain + Name/api/v1/clients/{clientId}?command=withdraw + POST clients/1?command=withdraw + Content-Type: application/json + Request Body: + { + "withdrawalDate":"28 November 2014", + "withdrawalReasonId":17, + "locale":"en", + "dateFormat":"dd MMMM yyyy" + } + + + { + "officeId":1, + "clientId":15, + "resourceId":15 + } + +
+
-   -
-
-

Updates loan repayment schedule based on Loan term variations

- - - - - - - -
Mandatory Fields
exceptions,locale,dateFormat
-
-
- -POST https://DomainName/api/v1/loans/1/schedule?command=addVariations - - -POST loans/{loanIdd}/schedule?command=addVariations -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "exceptions": { - "modifiedinstallments": [{ - "dueDate": '01 April 2016', - "modifiedDueDate": '05 April 2016' - }, - { - "dueDate": '05 January 2016', - "modifiedDueDate": '01 January 2016' - }], - "deletedinstallments": [{ - "dueDate": "01 October 2016" - }], - newinstallments: [{ - dueDate: '10 October 2016', - installmentAmount: '1000' -}] - } -} - - -{ - "loanId": 1, - "changes": { - "loanTermVariations": [{ - "id": 21, - "termType": { - "id": 4, - "code": "loanTermType.dueDate", - "value": "dueDate" - }, - "termVariationApplicableFrom": [2016, - 1, - 1], - "dateValue": [2016, - 1, - 10], - "isSpecificToInstallment": true - }, - { - "id": 22, - "termType": { - "id": 3, - "code": "loanTermType.principalAmount", - "value": "principalAmount" - }, - "termVariationApplicableFrom": [2016, - 1, - 10], - "decimalValue": 1100, - "isSpecificToInstallment": true - }, - { - "id": 23, - "termType": { - "id": 3, - "code": "loanTermType.principalAmount", - "value": "principalAmount" - }, - "termVariationApplicableFrom": [2016, - 8, - 1], - "decimalValue": 1000, - "isSpecificToInstallment": true - }, - { - "id": 24, - "termType": { - "id": 5, - "code": "loanTermType.dueDate", - "value": "insertInstallment" - }, - "termVariationApplicableFrom": [2016, - 8, - 15], - "decimalValue": 900, - "isSpecificToInstallment": true - }] - } -} - -
-
+   +
+
+

Reactivate a Client

+

Clients can be reactivated after they have been closed.

+

Trying to reactivate a client in any other state throws an error.

+ + + + + + + +
+
Mandatory Fields
+
reactivationDate
+
+
+
+ POST https://Domain + Name/api/v1/clients/{clientId}?command=reactivate + POST clients/1?command=reactivate -   -
-
-

Updates loan repayment schedule by removing Loan term variations

- - - - - - - -
Mandatory Fields
-
-
- -POST https://DomainName/api/v1/loans/1/schedule?command=deleteVariations - - -POST loans/{loanIdd}/schedule?command=deleteVariations -Content-Type: application/json -Request Body: -{} - - -{ - "loanId": 1, - "changes": { - "removedEntityIds": [{ - 21,22}] - } -} - -
-
+ Content-Type: application/json + Request Body: + { + "reactivationDate":"28 November 2014", + "locale":"en", + "dateFormat":"dd MMMM yyyy" + } +
+ + { + "clientId":15, + "resourceId":15 + } + +
+
- - -   -
-
-

Offices

-

Offices are used to model an MFIs structure. A hierarchical - representation of offices is supported. There will always be at - least one office (which represents the MFI or an MFIs head - office). All subsequent offices added must have a parent office.

- - - - - - - - - - - - - - - - -
Field Descriptions
externalId
A place to put an external reference for - this office e.g. The ID another system uses for it.
If - provided, it must be unique. -
hierarchy
This field is a system generated - convenience field. It can't be set.
It uses "dot - notation" to define where an office stands in the office - hierarchy.
For example, the system default office (id = - 1) has a hierarchy value of '.'
An office (id = 12) - placed directly underneath this default office has a hierarchy - value of '.12.'
And if a further office (id = 78) is - placed directly under office (id = 12) its hierarchy value is - '.12.78.'
-
The hierarchy value is useful when you need to display - offices in 'hierarchy' order (perhaps indented in a drop down - list box). -
-
-
+   +
+
+

UndoReject a Client

+

Clients can be reactivated after they have been rejected.

+

Trying to reactivate a client in any other state throws an error.

+ + + + + + + +
+
Mandatory Fields
+
reopenedDate
+
+
+
+ POST https://Domain + Name/api/v1/clients/{clientId}?command=UndoRejection + POST clients/1?command=UndoRejection -   -
-
-

List Offices

-

Example Requests:

-
offices
-
-
-
offices?fields=id,name,openingDate
-
-
- -GET https://DomainName/api/v1/offices - - -[ - { - "id": 1, - "name": "Head Office", - "nameDecorated": "Head Office", - "externalId": "1", - "openingDate": [ - 2009, - 1, - 1 - ], - "hierarchy": "." - } -] - -
-
+ Content-Type: application/json + Request Body: + { + "reopenedDate":"28 November 2014", + "locale":"en", + "dateFormat":"dd MMMM yyyy" + } +
+ + { -   -
-
-

Retrieve Office Details Template

-

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:

-
offices/template
-
-
- -GET https://DomainName/api/v1/offices/template - - -{ - "openingDate": [ - 2013, - 2, - 4 - ], - "allowedParents": [ - { - "id": 1, - "name": "Head Office", - "nameDecorated": "Head Office" - } - ] -} - -
-
+ "clientId":15, + "resourceId":15 + } +
+
+
-   -
-
-

Retrieve an Office

-

Example Requests:

-
offices/1
-
-
-
offices/1?template=true
-
-
-
offices/1?fields=id,name,parentName
-
-
- -GET https://DomainName/api/v1/offices/1 - - -{ - "id": 1, - "name": "Head Office", - "nameDecorated": "Head Office", - "externalId": "1", - "openingDate": [ - 2009, - 1, - 1 - ], - "hierarchy": "." -} - -
-
+   +
+
+

UndoWithdraw a Client

+

Clients can be reactivated after they have been withdrawn.

+

Trying to reactivate a client in any other state throws an error.

+ + + + + + + +
+
Mandatory Fields
+
reopenedDate
+
+
+
+ POST https://Domain + Name/api/v1/clients/{clientId}?command=UndoWithdrawal + POST clients/1?command=UndoWithdrawal + Content-Type: application/json + Request Body: + { + "reopenedDate":"28 November 2014", + "locale":"en", + "dateFormat":"dd MMMM yyyy" + } + + + { -   -
-
-

Create an Office

- - - - - - - -
Mandatory Fields
name, openingDate, parentId
-
-
- -POST https://DomainName/api/v1/offices - - -POST offices -Content-Type: application/json -Request Body: -{ - "name": "Example New Branch", - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "openingDate": "01 July 2007", - "parentId": 2, - "externalId": "SYS54-88" -} - - -{ - "officeId": 3, - "resourceId": 3 -} - -
-
+ "clientId":15, + "resourceId":15 + } +
+
+
+   +
+
+

Assign a Staff

+

Allows you to assign a Staff for existed Client.

+

The selected Staff should belong to the same office (or an officer higher up in the hierarchy) + as the Client he manages.

+
+
+ POST https://Domain + Name/api/v1/clients/{clientId}?command=assignStaff + POST clients/1?command=assignStaff + Content-Type: application/json + Request Body: + { + "staffId": "1" + } + + + { + "officeId": 1, + "clientId": 1, + "resourceId": 1, + "changes": {"staffId":1} + } + +
+
-   -
-
-

Update Office

-
-
- -PUT https://DomainName/api/v1/offices/{officeId} - - -PUT offices/1 -Content-Type: application/json -Request Body: -{ - "name": "Name is updated" -} - - -{ - "officeId": 1, - "resourceId": 1, - "changes": { - "name": "Name is updated" - } -} - -
-
- +   +
+
+

Unassign a Staff

+

Allows you to unassign the Staff assigned to a Client.

+
+
+ POST https://Domain + Name/api/v1/clients/{clientId}?command=unassignStaff + POST clients/1?command=unassignStaff + Content-Type: application/json + Request Body: + { + "staffId":"1" + } + + + { + "officeId": 1, + "clientId": 1, + "resourceId": 1, + "changes": {"staffId":1} + } + +
+
- -   -
-
-

Loan Products

-

A Loan product is a template that is used when creating a - loan. Much of the template definition can be overridden during - loan creation.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
name
Name associated with loan product on system.
shortName
Short name associated with a loan product.
- An abbreviated version of the name, used in reports or menus where space is limited, such as Collection Sheets. -
description
For providing helpful description of product offering.
fundId
For associating a loan product with a given fund by default.
includeInBorrowerCycle
It is a flag, Used to denote whether the loans should include in loan cycle counter or not.
useBorrowerCycle
It is a flag, Used to denote whether the loans should depend on
borrower loan cycle counter or not.
currencyCode
A three letter ISO code of currency.
digitsAfterDecimal
Override the currency default value for digitsAfterDecimal.
inMultiplesOf
Override the default value for rounding currency to multiples of value provided.
installmentAmountInMultiplesOf
Override the default value for rounding instalment amount to multiples of value provided.
principal
The loan amount to be disbursed to through loan.
numberOfRepayments
Number of installments to repay.
- Used like: numberOfRepayments Every repaymentEvery - repaymentFrequencyType
e.g. 10 (repayments) Every 12 Weeks -
repaymentEvery
Used like: numberOfRepayments Every - repaymentEvery repaymentFrequencyType
e.g. 10 - (repayments) Every 12 Weeks -
repaymentFrequencyType
Used like: numberOfRepayments Every - repaymentEvery repaymentFrequencyType
e.g. 10 - (repayments) Every 12 Weeks
- Example Values: 0=Days, 1=Weeks, 2=Months -
interestRatePerPeriod
Interest Rate.
Used like: - interestRatePerPeriod % interestRateFrequencyType - interestType
- e.g. 12.0000% Per year - Declining Balance -
interestRateFrequencyType
Used like: interestRatePerPeriod% - interestRateFrequencyType - interestType
e.g. 12.0000% - Per year - Declining Balance
- Example Values: 2=Per month, 3=Per year -
amortizationType
Example Values: 0=Equal - principle payments, 1=Equal installments
interestType
Used like: interestRatePerPeriod% - interestRateFrequencyType - interestType
e.g. 12.0000% - Per year - Declining Balance
- Example Values: 0=Declining Balance, 1=Flat -
interestCalculationPeriodType
Example Values: 0=Daily, 1=Same as repayment period
allowPartialPeriodInterestCalculation
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) -
inArrearsTolerance
The amount that can be 'waived' at end - of all loan payments because it is too small to worry about.
- This is also the tolerance amount assessed when determining if a - loan is in arrears. -
principalVariationsForBorrowerCycle,interestRateVariationsForBorrowerCycle,
numberOfRepaymentVariationsForBorrowerCycle
Variations for loan, based on borrower cycle number -
minimumDaysBetweenDisbursalAndFirstRepayment
The minimum number of days allowed between a Loan disbursal and its first repayment. -
principalThresholdForLastInstalment
Field represents percentage of current instalment principal amount for comparing against principal outstanding to add another repayment instalment. If the outstanding principal amount is less then calculated amount, remaining outstanding amount will be added to current instalment. Default value for multi disburse loan is 50% and non-multi disburse loan is 0% -
canDefineInstallmentAmount
if provided as true, then fixed instalment amount can be provided from loan account. -
transactionProcessingStrategyCode
-An enumeration that indicates the type of transaction processing strategy to be used. This relates to functionality that is also known as Payment Application Logic. - -

A number of out of the box approaches exist, some are custom to specific MFIs, some are more general and indicate the order in which payments are processed.

- -

Refer to the Payment Application Logic / Transaction Processing Strategy section in the appendix for more detailed overview of each available payment application logic provided out of the box.

- -List of current approaches:
-
    -
  • 1 = Mifos style (Similar to Old Mifos)
  • -
  • 2 = Heavensfamily (Custom MFI approach)
  • -
  • 3 = Creocore (Custom MFI approach)
  • -
  • 4 = RBI (India)
  • -
  • 5 = Principal Interest Penalties Fees Order
  • -
  • 6 = Interest Principal Penalties Fees Order
  • -
  • 7 = Early Payment Strategy
  • -
-
graceOnPrincipalPayment
Optional: Integer - represents the number of repayment periods that grace should apply to the principal component of a repayment period. -
graceOnInterestPayment
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. -
graceOnInterestCharged
Optional: Integer - represents the number of repayment periods that should be interest-free. -
graceOnArrearsAgeing
Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAgeing days overdue. -
overdueDaysForNPA
Optional: Integer - represents the maximum number of days a Loan may - be overdue before being classified as a NPA (non performing asset) -
accountMovesOutOfNPAOnlyOnArrearsCompletion
Optional: Boolean - if provided as true, Loan Account moves out of NPA state only when all arrears are cleared -
accountingRule
Specifies if accounting is enabled for the particular - product and the type of the accounting rule to be used - Example Values:1=NONE, 2=CASH_BASED, 3=ACCRUAL_PERIODIC, 4=ACCRUAL_UPFRONT
isInterestRecalculationEnabled
It is a flag, Used to denote whether interest recalculation is enabled or disabled for the particular product
daysInYearType
Specifies the number of days in a year.
- Example Values:1=ACTUAL(Actual number of days in year), 360=360 DAYS, 364=364 DAYS(52 WEEKS), 365=365 DAYS
daysInMonthType
Specifies the number of days in a month.
- Example Values:1=ACTUAL(Actual number of days in month), 30=30 DAYS
interestRecalculationCompoundingMethod
Specifies which amount portion should be added to principal for interest recalculation.
- Example Values:0=NONE(Only on principal), 1=INTEREST(Principal+Interest), 2=FEE(Principal+Fee), 3=FEE And INTEREST (Principal+Fee+Interest)
rescheduleStrategyMethod
Specifies what action should perform on loan repayment schedule for advance payments.
- Example Values:1=Reschedule next repayments, 2=Reduce number of installments, 3=Reduce EMI amount, 4=Adjust last, unpaid period
recalculationCompoundingFrequencyType
Specifies effective date from which the compounding of interest or fee amounts will be considered in recalculation on late payment.
- Example Values:1=Same as repayment period, 2=Daily, 3=Weekly, 4=Monthly
recalculationCompoundingFrequencyInterval
Specifies compounding frequency interval for interest recalculation.
-
recalculationCompoundingFrequencyDate
Specifies compounding frequency start date for interest recalculation.
-
recalculationRestFrequencyType
Specifies effective date from which the late or advanced payment amounts will be considered in recalculation.
- Example Values:1=Same as repayment period, 2=Daily, 3=Weekly, 4=Monthly
recalculationRestFrequencyInterval
Specifies rest frequency interval for interest recalculation.
-
recalculationRestFrequencyDate
Specifies rest frequency start date for interest recalculation.
-
preClosureInterestCalculationStrategy
Specifies applicable days for interest calculation on pre closure of a loan.
- Example Values:1=Calculate till pre closure date, 2=Calculate till rest frequency date
isArrearsBasedOnOriginalSchedule
If Specified as true, arrears will be identified based on original schedule.
-
allowAttributeOverrides
Specifies if select attributes may be overridden for individual loan accounts.
-
-
-
+   +
+
+

Update Default Savings Account

+

Allows you to modify or assign a default savings account for an existing Client.

+

The selected savings account should be one among the existing savings account for a particular + customer.

+
+
+ POST https://Domain + Name/api/v1/clients/{clientId}?command=updateSavingsAccount + POST clients/1?command=updateSavingsAccount + Content-Type: application/json + Request Body: + { + "savingsAccountId": "22" + } + + + { + "officeId":1, + "clientId":1, + "resourceId":1 + ,"changes":{ + "savingsAccountId":22 + } + } + +
+
-   -
-
-

List Loan Products

-

Example Requests:

-
loanproducts
-
-
-
loanproducts?fields=name,description,interestRateFrequencyType,amortizationType
-
-
- -GET https://DomainName/api/v1/loanproducts - - -[ - { - "id": 1, - "name": "personal loan product", - "shortName": "pe1", - "includeInBorrowerCycle": false, - "useBorrowerCycle": false, - "startDate": [ - 2013, - 9, - 2 - ], - "closeDate": [ - 2014, - 2, - 7 - ], - "status": "loanProduct.active", - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 0, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "principal": 10000.000000, - "minPrincipal": 5000.000000, - "maxPrincipal": 15000.000000, - "numberOfRepayments": 10, - "minNumberOfRepayments": 5, - "maxNumberOfRepayments": 15, - "repaymentEvery": 7, - "repaymentFrequencyType": { - "id": 0, - "code": "repaymentFrequency.periodFrequencyType.days", - "value": "Days" - }, - "interestRatePerPeriod": 15.000000, - "interestRateFrequencyType": { - "id": 3, - "code": "interestRateFrequency.periodFrequencyType.years", - "value": "Per year" - }, - "annualInterestRate": 15.000000, - "amortizationType": { - "id": 1, - "code": "amortizationType.equal.installments", - "value": "Equal installments" - }, - "interestType": { - "id": 1, - "code": "interestType.flat", - "value": "Flat" - }, - "interestCalculationPeriodType": { - "id": 1, - "code": "interestCalculationPeriodType.same.as.repayment.period", - "value": "Same as repayment period" - }, - "transactionProcessingStrategyCode": "mifos-standard-strategy", - "transactionProcessingStrategyName": "Mifos style", - "principalVariationsForBorrowerCycle": [], - "interestRateVariationsForBorrowerCycle": [], - "numberOfRepaymentVariationsForBorrowerCycle": [], - "daysInMonthType": { - "id": 30, - "code": "DaysInMonthType.days360", - "value": "30 Days" - }, - "daysInYearType": { - "id": 360, - "code": "DaysInYearType.days360", - "value": "360 Days" - }, - "isInterestRecalculationEnabled": true, - "interestRecalculationData": { - "id": 3, - "productId": 1, - "interestRecalculationCompoundingType": { - "id": 2, - "code": "interestRecalculationCompoundingMethod.fee", - "value": "Fee" - }, - "recalculationCompoundingFrequencyType": { - "id":1, - "code":"interestRecalculationFrequencyType.same.as.repayment.period", - "value":"Same as repayment period" - }, - "rescheduleStrategyType": { - "id": 2, - "code": "loanRescheduleStrategyMethod.reduce.number.of.installments", - "value": "Reduce number of installments" - }, - "recalculationRestFrequencyType": { - "id":1, - "code":"interestRecalculationFrequencyType.same.as.repayment.period", - "value":"Same as repayment period" - }, - "preClosureInterestCalculationStrategy": { - "id":1, - "code":"loanPreClosureInterestCalculationStrategy.tillPreClosureDate", - "value":"Till preclose Date" - }, - "isArrearsBasedOnOriginalSchedule" : true - }, - "accountingRule": { - "id": 2, - "code": "accountingRuleType.cash", - "value": "CASH BASED" - }, - "principalThresholdForLastInstalment":0 - } -] - -
-
+   +
+
+

Propose a Client Transfer

+

Allows you to propose the transfer of a Client to a different Office on a specific + date, if loan or savings transaction not present from proposed transfer date to current date.

+
+
+ POST https://Domain + Name/api/v1/clients/{clientId}?command=proposeTransfer + POST clients/1?command=proposeTransfer + Content-Type: application/json + Request Body: + { + "transferDate":"28 August 2018", + "destinationOfficeId":"2", + "note":"Client Relocating to Bangalore" + } + + + { + "clientId": 2, + "resourceId": 2 + } -   -
-
-

Retrieve Loan Product Details Template

-

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:

-
loanproducts/template
-
-
- -GET https://DomainName/api/v1/loanproducts/template - - -{ - "includeInBorrowerCycle": false, - "useBorrowerCycle": false, - "currency": { - "code": "", - "name": "", - "decimalPlaces": 0, - "inMultiplesOf": 0, - "displaySymbol": "", - "nameCode": "", - "displayLabel": " []" - }, - "repaymentFrequencyType": { - "id": 2, - "code": "repaymentFrequency.periodFrequencyType.months", - "value": "Months" - }, - "interestRateFrequencyType": { - "id": 2, - "code": "interestRateFrequency.periodFrequencyType.months", - "value": "Per month" - }, - "amortizationType": { - "id": 1, - "code": "amortizationType.equal.installments", - "value": "Equal installments" - }, - "interestType": { - "id": 0, - "code": "interestType.declining.balance", - "value": "Declining Balance" - }, - "interestCalculationPeriodType": { - "id": 1, - "code": "interestCalculationPeriodType.same.as.repayment.period", - "value": "Same as repayment period" - }, - "principalVariationsForBorrowerCycle": [], - "interestRateVariationsForBorrowerCycle": [], - "numberOfRepaymentVariationsForBorrowerCycle": [], - "accountingRule": { - "id": 1, - "code": "accountingRuleType.none", - "value": "NONE" - }, - "daysInMonthType": { - "id": 1, - "code": "DaysInMonthType.actual", - "value": "Actual" - }, - "daysInYearType": { - "id": 1, - "code": "DaysInYearType.actual", - "value": "Actual" - }, - "isInterestRecalculationEnabled": false, - "interestRecalculationData": { - "interestRecalculationCompoundingType": { - "id": 0, - "code": "interestRecalculationCompoundingMethod.none", - "value": "None" - }, - "rescheduleStrategyType": { - "id": 3, - "code": "loanRescheduleStrategyMethod.reduce.emi.amount", - "value": "Reduce EMI amount" - },"preClosureInterestCalculationStrategy": { - "id":1, - "code":"loanPreClosureInterestCalculationStrategy.tillPreClosureDate", - "value":"Till preclose Date" - } - }, - "paymentTypeOptions": [ - { - "id": 10, - "name": "check", - "position": 1 - } - ], - "currencyOptions": [ - { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - ], - "repaymentFrequencyTypeOptions": [ - { - "id": 0, - "code": "repaymentFrequency.periodFrequencyType.days", - "value": "Days" - }, - { - "id": 1, - "code": "repaymentFrequency.periodFrequencyType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "repaymentFrequency.periodFrequencyType.months", - "value": "Months" - } - ], - "preClosureInterestCalculationStrategyOptions": [ - { - "id":1, - "code":"loanPreClosureInterestCalculationStrategy.tillPreClosureDate", - "value":"Till preclose Date" - }, - { - "id":2, - "code":"loanPreClosureInterestCalculationStrategy.tillRestFrequencyDate", - "value":"Till rest Frequency Date" - } - ], - "interestRateFrequencyTypeOptions": [ - { - "id": 2, - "code": "interestRateFrequency.periodFrequencyType.months", - "value": "Per month" - }, - { - "id": 3, - "code": "interestRateFrequency.periodFrequencyType.years", - "value": "Per year" - } - ], - "amortizationTypeOptions": [ - { - "id": 1, - "code": "amortizationType.equal.installments", - "value": "Equal installments" - }, - { - "id": 0, - "code": "amortizationType.equal.principal", - "value": "Equal principal payments" - } - ], - "interestTypeOptions": [ - { - "id": 1, - "code": "interestType.flat", - "value": "Flat" - }, - { - "id": 0, - "code": "interestType.declining.balance", - "value": "Declining Balance" - } - ], - "interestCalculationPeriodTypeOptions": [ - { - "id": 0, - "code": "interestCalculationPeriodType.daily", - "value": "Daily" - }, - { - "id": 1, - "code": "interestCalculationPeriodType.same.as.repayment.period", - "value": "Same as repayment period" - } - ], - "transactionProcessingStrategyOptions": [ - { - "id": 1, - "code": "mifos-standard-strategy", - "name": "Penalties, Fees, Interest, Principal order" - }, - { - "id": 2, - "code": "heavensfamily-strategy", - "name": "HeavensFamily Unique" - }, - { - "id": 3, - "code": "creocore-strategy", - "name": "Creocore Unique" - }, - { - "id": 4, - "code": "rbi-india-strategy", - "name": "Overdue/Due Fee/Int,Principal" - }, - { - "id": 5, - "code": "principal-interest-penalties-fees-order-strategy", - "name": "Principal Interest Penalties Fees Order" - }, - { - "id": 6, - "code": "interest-principal-penalties-fees-order-strategy", - "name": "Interest Principal Penalties Fees Order" - } - ], - "chargeOptions": [ - { - "id": 5, - "name": "des charge", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100.000000, - "chargeTimeType": { - "id": 1, - "code": "chargeTimeType.disbursement", - "value": "Disbursement" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - }, - { - "id": 1, - "name": "flat install", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 50.000000, - "chargeTimeType": { - "id": 8, - "code": "chargeTimeType.instalmentFee", - "value": "Instalment Fee" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - }, - { - "id": 9, - "name": "install amt+int", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 5.000000, - "chargeTimeType": { - "id": 8, - "code": "chargeTimeType.instalmentFee", - "value": "Instalment Fee" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - "chargeCalculationType": { - "id": 3, - "code": "chargeCalculationType.percent.of.amount.and.interest", - "value": "% Loan Amount + Interest" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - }, - { - "id": 10, - "name": "install int", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 5.000000, - "chargeTimeType": { - "id": 8, - "code": "chargeTimeType.instalmentFee", - "value": "Instalment Fee" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - "chargeCalculationType": { - "id": 4, - "code": "chargeCalculationType.percent.of.interest", - "value": "% Interest" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - }, - { - "id": 2, - "name": "install per", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 5.000000, - "chargeTimeType": { - "id": 8, - "code": "chargeTimeType.instalmentFee", - "value": "Instalment Fee" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - "chargeCalculationType": { - "id": 2, - "code": "chargeCalculationType.percent.of.amount", - "value": "% Amount" - }, - "chargePaymentMode": { - "id": 1, - "code": "chargepaymentmode.accounttransfer", - "value": "Account transfer" - } - }, - { - "id": 8, - "name": "spe int", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 5.000000, - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - "chargeCalculationType": { - "id": 4, - "code": "chargeCalculationType.percent.of.interest", - "value": "% Interest" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - }, - { - "id": 4, - "name": "specific acc transfer", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100.000000, - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 1, - "code": "chargepaymentmode.accounttransfer", - "value": "Account transfer" - } - }, - { - "id": 7, - "name": "specific amt+int", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 5.000000, - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - "chargeCalculationType": { - "id": 3, - "code": "chargeCalculationType.percent.of.amount.and.interest", - "value": "% Loan Amount + Interest" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - }, - { - "id": 3, - "name": "specific per", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 5.000000, - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - "chargeCalculationType": { - "id": 2, - "code": "chargeCalculationType.percent.of.amount", - "value": "% Amount" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - }, - { - "id": 6, - "name": "xyz", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 50.000000, - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 1, - "code": "chargepaymentmode.accounttransfer", - "value": "Account transfer" - } - } - ], - "accountingRuleOptions": [ - { - "id": 1, - "code": "accountingRuleType.none", - "value": "NONE" - }, - { - "id": 2, - "code": "accountingRuleType.cash", - "value": "CASH BASED" - }, - { - "id": 3, - "code": "accountingRuleType.accrual", - "value": "ACCRUAL BASED" - } - ], - "accountingMappingOptions": { - "liabilityAccountOptions": [ - { - "id": 11, - "name": "over payment", - "glCode": "13", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 2, - "code": "accountType.liability", - "value": "LIABILITY" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "over payment", - "tagId": { - "id": 0 - }, - "organizationRunningBalance": 0 - }, - ], - "assetAccountOptions": [ - { - "id": 1, - "name": "fund source", - "glCode": "01", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "fund source", - "tagId": { - "id": 0 - }, - "organizationRunningBalance": -60000 - }, - { - "id": 2, - "name": "Loan portfolio", - "glCode": "02", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "Loan portfolio", - "tagId": { - "id": 0 - }, - "organizationRunningBalance": 60000 - }, - { - "id": 3, - "name": "transfers", - "glCode": "03", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "transfers", - "tagId": { - "id": 0 - }, - "organizationRunningBalance": 0 - }, - ], - "expenseAccountOptions": [ - { - "id": 10, - "name": "loans written off 2", - "glCode": "12", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 5, - "code": "accountType.expense", - "value": "EXPENSE" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "loans written off 2", - "tagId": { - "id": 0 - }, - "organizationRunningBalance": 0 - } - ], - "incomeAccountOptions": [ - { - "id": 4, - "name": "income from interest", - "glCode": "04", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 4, - "code": "accountType.income", - "value": "INCOME" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "income from interest", - "tagId": { - "id": 0 - }, - "organizationRunningBalance": 19 - }, - { - "id": 8, - "name": "income from fees 2", - "glCode": "10", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 4, - "code": "accountType.income", - "value": "INCOME" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "income from fees 2", - "tagId": { - "id": 0 - }, - "organizationRunningBalance": 0 - }, - { - "id": 9, - "name": "income from penalities 2", - "glCode": "11", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 4, - "code": "accountType.income", - "value": "INCOME" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "income from penalities 2", - "tagId": { - "id": 0 - }, - "organizationRunningBalance": 0 - } - ] - }, - "valueConditionTypeOptions": [ - { - "id": 2, - "code": "LoanProductValueConditionType.equal", - "value": "equals" - }, - { - "id": 3, - "code": "LoanProductValueConditionType.greterthan", - "value": "greter than" - } - ], - "daysInMonthTypeOptions": [{ - "id": 1, - "code": "DaysInMonthType.actual", - "value": "Actual" - }, - { - "id": 30, - "code": "DaysInMonthType.days360", - "value": "30 Days" - }], - "daysInYearTypeOptions": [{ - "id": 1, - "code": "DaysInYearType.actual", - "value": "Actual" - }, - { - "id": 360, - "code": "DaysInYearType.days360", - "value": "360 Days" - }, - { - "id": 364, - "code": "DaysInYearType.days364", - "value": "364 Days" - }, - { - "id": 365, - "code": "DaysInYearType.days365", - "value": "365 Days" - }], - "interestRecalculationCompoundingTypeOptions": [{ - "id": 0, - "code": "interestRecalculationCompoundingMethod.none", - "value": "None" - }, - { - "id": 2, - "code": "interestRecalculationCompoundingMethod.fee", - "value": "Fee" - }, - { - "id": 1, - "code": "interestRecalculationCompoundingMethod.interest", - "value": "Interest" - }, - { - "id": 3, - "code": "interestRecalculationCompoundingMethod.interest.and.fee", - "value": "Fee and Interest" - }], - "rescheduleStrategyTypeOptions": [{ - "id": 3, - "code": "loanRescheduleStrategyMethod.reduce.emi.amount", - "value": "Reduce EMI amount" - }, - { - "id": 2, - "code": "loanRescheduleStrategyMethod.reduce.number.of.installments", - "value": "Reduce number of installments" - }, - { - "id": 1, - "code": "loanRescheduleStrategyMethod.reschedule.next.repayments", - "value": "Reschedule next repayments" - }], - "interestRecalculationFrequencyTypeOptions": [ - { - "id":1, - "code":"interestRecalculationFrequencyType.same.as.repayment.period", - "value":"Same as repayment period" - }, - { - "id":2, - "code":"interestRecalculationFrequencyType.daily", - "value":"Daily" - }, - { - "id":3, - "code":"interestRecalculationFrequencyType.weekly", - "value":"Weekly" - }, - { - "id":4, - "code":"interestRecalculationFrequencyType.monthly", - "value":"Monthly" - }] -} - -
-
- -   -
-
-

Retrieve a Loan Product

-

Example Requests:

-
loanproducts/1
-
-
-
loanproducts/1?template=true
-
-
-
loanproducts/1?fields=name,description,numberOfRepayments
-
-
- -GET https://DomainName/api/v1/loanproducts/{productId} - - -{ - "id": 11, - "name": "advanced accounting", - "shortName": "ad11", - "includeInBorrowerCycle": true, - "useBorrowerCycle": true, - "status": "loanProduct.active", - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 0, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "principal": 10000.000000, - "minPrincipal": 2000.000000, - "maxPrincipal": 15000.000000, - "numberOfRepayments": 7, - "repaymentEvery": 7, - "repaymentFrequencyType": { - "id": 0, - "code": "repaymentFrequency.periodFrequencyType.days", - "value": "Days" - }, - "interestRatePerPeriod": 5.000000, - "interestRateFrequencyType": { - "id": 2, - "code": "interestRateFrequency.periodFrequencyType.months", - "value": "Per month" - }, - "annualInterestRate": 60.000000, - "amortizationType": { - "id": 1, - "code": "amortizationType.equal.installments", - "value": "Equal installments" - }, - "interestType": { - "id": 0, - "code": "interestType.declining.balance", - "value": "Declining Balance" - }, - "interestCalculationPeriodType": { - "id": 1, - "code": "interestCalculationPeriodType.same.as.repayment.period", - "value": "Same as repayment period" - }, - "transactionProcessingStrategyCode": "mifos-standard-strategy", - "transactionProcessingStrategyName": "Mifos style", - "charges": [], - "principalVariationsForBorrowerCycle": [ - { - "id": 21, - "borrowerCycleNumber": 1, - "paramType": { - "id": 1, - "code": "LoanProductParamType.principal", - "value": "principal" - }, - "valueConditionType": { - "id": 2, - "code": "LoanProductValueConditionType.equal", - "value": "equals" - }, - "minValue": 2000.000000, - "maxValue": 20000.000000, - "defaultValue": 15000.000000 - }, - { - "id": 20, - "borrowerCycleNumber": 1, - "paramType": { - "id": 1, - "code": "LoanProductParamType.principal", - "value": "principal" - }, - "valueConditionType": { - "id": 3, - "code": "LoanProductValueConditionType.greterthan", - "value": "greter than" - }, - "minValue": 3000.000000, - "maxValue": 25000.000000, - "defaultValue": 20000.000000 - } - ], - "interestRateVariationsForBorrowerCycle": [], - "numberOfRepaymentVariationsForBorrowerCycle": [], - "accountingRule": { - "id": 2, - "code": "accountingRuleType.cash", - "value": "CASH BASED" - }, - "accountingMappings": { - "fundSourceAccount": { - "id": 1, - "name": "fund source", - "glCode": "01" - }, - "loanPortfolioAccount": { - "id": 2, - "name": "Loan portfolio", - "glCode": "02" - }, - "transfersInSuspenseAccount": { - "id": 3, - "name": "transfers", - "glCode": "03" - }, - "interestOnLoanAccount": { - "id": 4, - "name": "income from interest", - "glCode": "04" - }, - "incomeFromFeeAccount": { - "id": 8, - "name": "income from fees 2", - "glCode": "10" - }, - "incomeFromPenaltyAccount": { - "id": 9, - "name": "income from penalities 2", - "glCode": "11" - }, - "writeOffAccount": { - "id": 10, - "name": "loans written off 2", - "glCode": "12" - }, - "overpaymentLiabilityAccount": { - "id": 11, - "name": "over payment", - "glCode": "13" - } - }, - "paymentChannelToFundSourceMappings": [ - { - "paymentType": { - "id": 10, - "name": "check" - }, - "fundSourceAccount": { - "id": 1, - "name": "fund source", - "glCode": "01" - } - } - ], - "feeToIncomeAccountMappings": [ - { - "charge": { - "id": 1, - "name": "flat install", - "active": false, - "penalty": false - }, - "incomeAccount": { - "id": 8, - "name": "income from fees 2", - "glCode": "10" - } - }, - { - "charge": { - "id": 2, - "name": "install per", - "active": false, - "penalty": false - }, - "incomeAccount": { - "id": 4, - "name": "income from interest", - "glCode": "04" - } - }, - { - "charge": { - "id": 5, - "name": "des charge", - "active": false, - "penalty": false - }, - "incomeAccount": { - "id": 9, - "name": "income from penalities 2", - "glCode": "11" - } - }, - "multiDisburseLoan":true,"maxTrancheCount":3,"outstandingLoanBalance":36000.000000, - "overdueDaysForNPA":2, - "principalThresholdForLastInstalment":50 - ] -} - -
-
-   -
-
-

Create a Loan Product

-

Depending of the Accounting Rule (accountingRule) selected, - additional fields with details of the appropriate Ledger Account - identifiers would need to be passed in. -

+
+
+
-

Refer - MifosX Accounting Specs Draft for more details regarding the - significance of the selected accounting rule -

+   +
+
+

Withdraw a Client Transfer

+

Allows you to withdraw the proposed transfer of a Client to a different Office.

+

Withdrawal can happen only if the destination Branch (to which the transfer was + proposed) has not already + accepted the transfer proposal.

+
+
+ POST https://Domain + Name/api/v1/clients/{clientId}?command=withdrawTransfer + POST clients/1?command=withdrawTransfer + Content-Type: application/json + Request Body: + { + "note":"Sorry, data entry error" + } + + + { + "clientId": 2, + "resourceId": 2 + } - - - - - - - -
Mandatory Fields
name, shortName, currencyCode, digitsAfterDecimal, inMultiplesOf, principal, - numberOfRepayments, repaymentEvery, repaymentFrequencyType, - interestRatePerPeriod, interestRateFrequencyType, amortizationType, interestType, - interestCalculationPeriodType, transactionProcessingStrategyCode, - accountingRule, isInterestRecalculationEnabled, daysInYearType, daysInMonthType
- - - - - - - -
Optional Fields
inArrearsTolerance, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, graceOnArrearsAgeing, charges, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, includeInBorrowerCycle, - useBorrowerCycle,principalVariationsForBorrowerCycle, - numberOfRepaymentVariationsForBorrowerCycle, - interestRateVariationsForBorrowerCycle, - multiDisburseLoan,maxTrancheCount, - outstandingLoanBalance,overdueDaysForNPA,holdGuaranteeFunds, principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, canDefineInstallmentAmount, installmentAmountInMultiplesOf, allowAttributeOverrides, allowPartialPeriodInterestCalculation, rates -
- - - - - - - -
Additional Mandatory Fields for Cash(2) based accounting
fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, - incomeFromFeeAccountId, incomeFromPenaltyAccountId, - writeOffAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId
- - - - - - - -
Additional Mandatory Fields for periodic (3) and upfront (4)accrual accounting
fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, - incomeFromFeeAccountId, incomeFromPenaltyAccountId, - writeOffAccountId, receivableInterestAccountId, receivableFeeAccountId, - receivablePenaltyAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId
- - - - - - - -
Additional Mandatory Fields if interest recalculation is enabled(true)
interestRecalculationCompoundingMethod, rescheduleStrategyMethod, recalculationRestFrequencyType
- - - - - - - -
Additional Optional Fields if interest recalculation is enabled(true)
isArrearsBasedOnOriginalSchedule, preClosureInterestCalculationStrategy
- - - - - - - -
Additional Optional Fields if interest recalculation is enabled(true) and recalculationRestFrequencyType is not same as repayment period
recalculationRestFrequencyInterval, recalculationRestFrequencyDate
- - - - - - - -
Additional Optional Fields if interest recalculation is enabled(true) and interestRecalculationCompoundingMethod is enabled
recalculationCompoundingFrequencyType
- - - - - - - -
Additional Optional Fields if interest recalculation is enabled(true) and interestRecalculationCompoundingMethod is enabled and - recalculationCompoundingFrequencyType is not same as repayment period
recalculationCompoundingFrequencyInterval, recalculationCompoundingFrequencyDate
- - - - - - - -
Additional Mandatory Fields if Hold Guarantee funds is enabled(true)
mandatoryGuarantee
- - - - - - - -
Additional Optional Fields if Hold Guarantee funds is enabled(true)
minimumGuaranteeFromOwnFunds,minimumGuaranteeFromGuarantor
-
-
- -POST https://DomainName/api/v1/loanproducts - - -POST loanproducts -Content-Type: application/json -Request Body: -{"currencyCode":"USD", -"includeInBorrowerCycle":"true", -"useBorrowerCycle":true, -"digitsAfterDecimal":"2", -"inMultiplesOf":"0", -"repaymentFrequencyType":0, -"interestRateFrequencyType":2, -"amortizationType":1, -"interestType":0, -"interestCalculationPeriodType":1, -"transactionProcessingStrategyCode":"mifos-standard-strategy", -"principalVariationsForBorrowerCycle":[], -"interestRateVariationsForBorrowerCycle":[], -"numberOfRepaymentVariationsForBorrowerCycle":[ - { - "valueConditionType":2, - "borrowerCycleNumber":"1", - "minValue":"5", - "defaultValue":"10", - "maxValue":"15" - }, - { - "valueConditionType":3, - "borrowerCycleNumber":"1", - "minValue":"7", - "defaultValue":"15", - "maxValue":"20" - } -], -"allowAttributeOverrides": - {amortizationType : true, - interestType : true, - transactionProcessingStrategyCode : false, - interestCalculationPeriodType : true, - inArrearsTolerance : false, - repaymentEvery : true, - graceOnPrincipalAndInterestPayment : true, - graceOnArrearsAgeing : true}, - -"accountingRule":"2", -"name":"product 5", -"shortName":"prd5", -"principal":"5000", -"numberOfRepayments":"7", -"repaymentEvery":"7", -"interestRatePerPeriod":"5", -"paymentChannelToFundSourceMappings":[], -"feeToIncomeAccountMappings":[], -"penaltyToIncomeAccountMappings":[], -"charges":[], -"overdueDaysForNPA":2, -"dateFormat":"dd MMMM yyyy", -"locale":"en", -"fundSourceAccountId":1, -"loanPortfolioAccountId":2, -"transfersInSuspenseAccountId":3, -"interestOnLoanAccountId":4, -"incomeFromFeeAccountId":8, -"incomeFromPenaltyAccountId":9, -"writeOffAccountId":10, -"overpaymentLiabilityAccountId":11, -"daysInMonthType":1, -"daysInYearType":1, -"isInterestRecalculationEnabled":"false", -"holdGuaranteeFunds":"false", -"principalThresholdForLastInstallment":20 -} - - -{ - "resourceId": 1 -} - - -POST loanproducts -Content-Type: application/json -Request Body: -{ - "name": "LP Cash Accounting", - "shortName": "LPCA", - "currencyCode": "USD", - "locale": "en_GB", - "digitsAfterDecimal": "2", - "inMultiplesOf": 0, - "principal": "100,000.00", - "numberOfRepayments": "12", - "repaymentEvery": "1", - "repaymentFrequencyType": 2, - "transactionProcessingStrategyCode": "mifos-standard-strategy", - "interestRatePerPeriod": "1.75", - "interestRateFrequencyType": 2, - "amortizationType": 1, - "interestType": 0, - "interestCalculationPeriodType": 1, - "daysInMonthType":1, - "daysInYearType":1, - "isInterestRecalculationEnabled":"true", - "interestRecalculationCompoundingMethod":"0", - "rescheduleStrategyMethod":"3", - "recalculationRestFrequencyType":"1", - "preClosureInterestCalculationStrategy":1, - "accountingRule":"2", - "fundSourceAccountId":"4", - "loanPortfolioAccountId":"8", - "interestOnLoanAccountId":"34", - "incomeFromFeeAccountId":"37", - "incomeFromPenaltyAccountId":"35", - "writeOffAccountId":"41", - "transfersInSuspenseAccountId":"4", - "overpaymentLiabilityAccountId":"2", - "paymentChannelToFundSourceMappings": [ - { - "paymentTypeId": "11", - "fundSourceAccountId": "11" - } - ], - "feeToIncomeAccountMappings": [ - { - "chargeId": "1", - "incomeAccountId": "5" - }, - { - "chargeId": "2", - "incomeAccountId": "8" - } - ], - "penaltyToIncomeAccountMappings": [ - { - "chargeId": "6", - "incomeAccountId": "9" - } - ] - -} - - -{ - "resourceId": 2 -} - - -POST loanproducts -Content-Type: application/json -Request Body: -{ - "name": "LP Accrual Accounting", - "shortName": "LPAA", - "currencyCode": "USD", - "locale": "en_GB", - "digitsAfterDecimal": "2", - "inMultiplesOf": 0, - "principal": "100,000.00", - "numberOfRepayments": "12", - "repaymentEvery": "1", - "repaymentFrequencyType": 2, - "transactionProcessingStrategyCode": "mifos-standard-strategy", - "interestRatePerPeriod": "1.75", - "interestRateFrequencyType": 2, - "amortizationType": 1, - "interestType": 0, - "interestCalculationPeriodType": 1, - "daysInMonthType":1, - "daysInYearType":1, - "isInterestRecalculationEnabled":"false", - "accountingRule":"3", - "fundSourceAccountId":"4", - "loanPortfolioAccountId":"8", - "receivableInterestAccountId":"9", - "receivableFeeAccountId":"11", - "receivablePenaltyAccountId":"10", - "interestOnLoanAccountId":"34", - "incomeFromFeeAccountId":"37", - "incomeFromPenaltyAccountId":"35", - "overpaymentLiabilityAccountId":"2", - "writeOffAccountId":"41" -} - - -{ - "resourceId": 3 -} - + +
+
-
-
+   +
+
+

Reject a Client Transfer

+

Allows the Destination Branch to reject the proposed Client + Transfer.

+
+
+ POST https://Domain + Name/api/v1/clients/{clientId}?command=rejectTransfer + POST clients/1?command=rejectTransfer + Content-Type: application/json + Request Body: + { + "note":"We cannot accept tranfers of clients having loans with less than 1 repayment left" + } + + + { + "clientId": 2, + "resourceId": 2 + } -   -
-
-

Update a Loan Product

-
-
- -PUT https://DomainName/api/v1/loanproducts/{loanId} - - -PUT loanproducts/1 -Content-Type: application/json -Request Body: -{ - "locale": "en_GB", - "principal": "70,000.00" -} - - -{ - "resourceId": 1, - "changes": { - "principal": 70000, - "locale": "en_GB" - } -} - - -PUT loanproducts/3 -Content-Type: application/json -Request Body: -{ - "locale": "en", - "isInterestRecalculationEnabled":"true", - "interestRecalculationCompoundingMethod":"0", - "rescheduleStrategyMethod":"3", - "recalculationRestFrequencyType":"1" -} - - -{ - "resourceId": 1, - "changes": { - "locale": "en", - "isInterestRecalculationEnabled":"true", - "interestRecalculationCompoundingMethod":"0", - "rescheduleStrategyMethod":"3", - "recalculationRestFrequencyType":"1" - } -} - -
-
- - -   -
-
-

Loan Products Mix

-

If you have the appropriate permissions, you can decide which types of products a given client or group can mix. In this way, you can restrict clients from having active loans accounts of different products at the same time.

- - - - - - - - - - - -
Field Descriptions
restrictedProducts
List of productIds to create a product mix
-
-
+
+
+
-   -
-
-

List Loan Product Mix

-

Example Requests:

-
loanproducts?associations=productMixes
-
-
- -GET https://DomainName/api/v1/loanproducts?associations=productMixes - - -[ - { - "productId": 1, - "productName": "Personal Loan", - "restrictedProducts": [ - { - "id": 2, - "name": "Joint Loan", - "includeInBorrowerCycle": false - }, - { - "id": 5, - "name": "Primary Loan", - "includeInBorrowerCycle": false - }, - { - "id": 3, - "name": "Daily Loan", - "includeInBorrowerCycle": false - } - ], - "allowedProducts": [ - { - "id": 1, - "name": "Personal Loan", - "includeInBorrowerCycle": false - }, - { - "id": 6, - "name": "Personal Loan -2", - "includeInBorrowerCycle": false - }, - { - "id": 4, - "name": "Weekly Loan", - "includeInBorrowerCycle": false - } - ] - }, - { - "productId": 2, - "productName": "Joint Loan", - "restrictedProducts": [ - { - "id": 1, - "name": "Personal Loan", - "includeInBorrowerCycle": false - }, - { - "id": 6, - "name": "Personal Loan -2", - "includeInBorrowerCycle": false - } - ], - "allowedProducts": [ - { - "id": 3, - "name": "Daily Loan", - "includeInBorrowerCycle": false - }, - { - "id": 2, - "name": "Joint Loan", - "includeInBorrowerCycle": false - }, - { - "id": 5, - "name": "Primary Loan", - "includeInBorrowerCycle": false - }, - { - "id": 4, - "name": "Weekly Loan", - "includeInBorrowerCycle": false - } - ] - } -] - -
-
+   +
+
+

Accept a Client Transfer

+

Allows the Destination Branch to accept the proposed Client + Transfer.

+

The destination branch may also choose to link this client to a group (in which case, any existing + active JLG loan of the client is rescheduled to match the meeting frequency of the group) and loan + Officer at the time of accepting + the transfer.

+
+
+ POST https://Domain + Name/api/v1/clients/{clientId}?command=acceptTransfer + POST clients/1?command=acceptTransfer + Content-Type: application/json + Request Body: + { + "destinationGroupId":"13", + "staffId":"1", + "note":"Due Diligence done and all documents received" + } + + + { + "clientId": 2, + "resourceId": 2 + } -   -
-
-

Retrieve Product Mix Details Template

-

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:

-

This request gets all the products details for which productmix is not defined.

-
-
loanproducts/template?isProductMixTemplate=true
-

-

This request gets the productmix details for the specific loanproduct.

-
-
loanproducts/5/productmix
-
-
loanproducts/5/productmix?template=true
-
-
- -GET https://DomainName/api/v1/loanproducts/template?isProductMixTemplate=true - - -{ - "productOptions": [ - { - "id": 5, - "name": "Primary Loan" - }, - { - "id": 4, - "name": "Weekly Loan" - } - ] -} - - -GET https://DomainName/api/v1/loanproducts/5/productmix - - -{ - "restrictedProducts": [ - { - "id": 1, - "name": "Personal Loan", - "includeInBorrowerCycle": false - } - ], - "allowedProducts": [ - { - "id": 3, - "name": "Daily Loan", - "includeInBorrowerCycle": false - }, - { - "id": 2, - "name": "Joint Loan", - "includeInBorrowerCycle": false - }, - { - "id": 6, - "name": "Personal Loan -2", - "includeInBorrowerCycle": false - }, - { - "id": 5, - "name": "Primary Loan", - "includeInBorrowerCycle": false - }, - { - "id": 4, - "name": "Weekly Loan", - "includeInBorrowerCycle": false - } - ] -} - -
-
+
+
+
-   -
-
-

Retrieve Loan Product Mix

-

Example Requests:

-
loanproducts/5/productmix
-
-
- -GET https://DomainName/api/v1/loanproducts/5/productmix - - -{ - "restrictedProducts": [ - { - "id": 1, - "name": "Personal Loan", - "includeInBorrowerCycle": false - } - ], - "allowedProducts": [ - { - "id": 3, - "name": "Daily Loan", - "includeInBorrowerCycle": false - }, - { - "id": 2, - "name": "Joint Loan", - "includeInBorrowerCycle": false - }, - { - "id": 6, - "name": "Personal Loan -2", - "includeInBorrowerCycle": false - }, - { - "id": 5, - "name": "Primary Loan", - "includeInBorrowerCycle": false - }, - { - "id": 4, - "name": "Weekly Loan", - "includeInBorrowerCycle": false - } - ] -} - -
-
- -   -
-
-

Create a Loan Product Mix

- - - - - - - - -
Mandatory Fields
restrictedProducts
-
-
- -POST https://DomainName/api/v1/loanproducts/5/productmix - - -POST loanproducts/{productId}/productmix -Content-Type: application/json -Request Body: -{"restrictedProducts":["1"]} - - -{ - "changes":{ - "restrictedProductsForMix":[1], - "removedProductsForMix":[] - }, - "productId":5 -} - -
-
-   -
-
-

Update a Loan Product Mix

-
-
- -PUT https://DomainName/api/v1/loanproducts/{productId}/productmix - - -PUT loanproducts/5/productmix -Content-Type: application/json -Request Body: -{ - "restrictedProducts":["3"] -} - - -{ - "changes": { - "restrictedProductsForMix": [3], - "removedProductsForMix": [1] - }, - "productId": 5 -} - -
-
+   +
+
+

Propose and Accept a Client Transfer

+

Abstraction over the Propose and Accept Client Transfer API's which enable a user + with Data Scope over both the Target and Destination Branches to directly + transfer a Client to the destination Office.

+
+
+ POST https://Domain + Name/api/v1/clients/{clientId}?command=proposeAndAcceptTransfer + POST clients/1?command=proposeTransfer + Content-Type: application/json + Request Body: + { + "destinationOfficeId":"2", + "destinationGroupId":"13", + "staffId":"1", + "note":"Client Relocating to Bangalore" + } + + + { + "clientId": 2, + "resourceId": 2 + } -   -
-
-

Delete a Loan Product Mix

-
-
- -DELETE https://DomainName/api/v1/loanproducts/{productId}/productmix - - -DELETE loanproducts/5/productmix - - -{ - "changes": { - "removedProductsForMix": [3] - }, - "productId": 5 -} - -
-
- - - -   -
-
-

Holidays

-

Some MFI's span large regions where different branch offices might observe different holidays. They need the ability to define holidays for specific branch offices and be able to set the repayment rule to follow during those holidays. -

-

- The reschedule of repayments to repaymentsRescheduledTo date during defined holidays is turned on/off by enabling/disabling reschedule-repayments-on-holidays in Global configurations. -

-

Allow Repayment transactions on a defined holidays is turned on/off by enabling/disabling allow-transactions-on-holiday in Global configurations. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
name
Name of the holiday. -
fromDate
The date on holiday begins. -
toDate
The date on holiday ends. -
repaymentsRescheduledTo
Date to which repayments will be rescheduled when repayments date falls on a defined holiday. e.g. A holiday is defined on 25th of October 2013 with repaymentsRescheduledTo date to 26th of October 2013 and any loans with repayments date on 25th of October 2013 will be rescheduled to 26th of October 2013. -
officeId
The officeId represents the office to which holiday is applied. -
-
-
- -   -
-
-

List Holidays

-

Example Requests:

-
holidays?officeId=1
-
-
-
-
- -GET https://DomainName/api/v1/holidays?officeId=1 - - -[ -{ - "id": 1, - "name": "Good Friday", - "fromDate": [ - 2013, - 10, - 25 - ], - "toDate": [ - 2013, - 10, - 25 - ], - "repaymentsScheduleTo": [ - 2013, - 10, - 26 - ], - "status": { - "id": 100, - "code": "holidayStatusType.pending.for.activation", - "value": "Pending for activation" - } -} -] - -
-
- -   -
-
-

Create a Holiday

- - - - - - - -
Mandatory Fields
name, description, fromDate, toDate, repaymentsRescheduledTo, offices
-
-
- -POST https://DomainName/api/v1/holidays - - -POST holidays -Content-Type: application/json -Request Body: -{ -"name": "Good Friday", -"description": "Good Friday", -"dateFormat": "dd MMMM yyyy", -"locale": "en", -"fromDate": "25 October 2013", -"toDate": "25 October 2013", -"repaymentsRescheduledTo": "26 October 2013", -"offices": [ - {"officeId":"1"}, - {"officeId":"2"} -] -} - - -{ -"resourceId": 1 -} - -
-
- -   -
-
-

Activate a Holiday

-

Always Holidays are created in pending state. This API allows to activate a holiday.

-

Only the active holidays are considered for rescheduling the loan repayment.

-
-
- -POST https://DomainName/api/v1/holidays/{holidayId}?command=activate - - -POST holidays -Content-Type: application/json -Request Body: -{ -} - - -{ -"resourceId": 1 -} - -
-
- -   -
-
-

Retrieve a Holiday

-

Example Requests:

-
holidays/1
-
-
-
- -GET https://DomainName/api/v1/holidays/{holidayId} - - -{ - "id": 1, - "name": "Good Friday", - "fromDate": [ - 2013, - 10, - 25 - ], - "toDate": [ - 2013, - 10, - 25 - ], - "repaymentsRescheduledTo": [ - 2013, - 10, - 26 - ], - "status": { - "id": 100, - "code": "holidayStatusType.active", - "value": "Active" - } -} - -
-
-   -
-
-

Update a Holiday

-

If a holiday is in pending state (created and not activated) then all fields are allowed to modify. Once holidays become active only name and descriptions are allowed to modify.

-
-
- -PUT https://DomainName/api/v1/holidays/{holidayId} - - -PUT holidays/1 -Content-Type: application/json -Request Body: -{ - name:"Independence day", - description: "Holiday for Independence day celebration" -} - - -{ - "resourceId": 1, - "changes": { - "name": "Independence day", - "description": "Holiday for Independence day celebration" - } -} - -
-
+
+
+
-   -
-
-

Delete a Holiday

-

This API allows to delete a holiday. This is a soft delete the deleted holiday status is marked as deleted.

-
-
- -DELETE https://DomainName/api/v1/holidays/{holidayId} - - -DELETE holidays/1 -Content-Type: application/json -Request Body: -{ -} - - -{ - "resourceId": 1 -} - -
-
- - - -   -
-
-

Working days

-

The days of the week that are workdays. -

-

- Rescheduling of repayments when it falls on a non-working is turned on /off by enable/disable reschedule-future-repayments parameter in Global configurations. -

-

- Allow transactions on non-working days is configurable by enabling/disbaling the allow-transactions-on-non_workingday parameter in Global configurations. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Mandotory Field Descriptions
recurrence
Recurrence pattern
repaymentRescheduleType
repayment reschedule type .Options listed on the schedule for repayments on non-working days -
extendTermForDailyRepayments
Extend the term for loans following a daily repayment schedule.Expects boolean value true/false
locale
locale must be provided.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Schedule for repayments on non-working day
Same day
The repayments schedule for same day regardless of it's a non-working day. -
Next workday
The repayments reschedule to next working day. e.g. if a repayment falls on a non-working day will be rescheduled to next available working day. -
Previous workday
The repayments reschedule to previous working day. e.g. if a repayment falls on a non-working day will be rescheduled to previous available working day. -
Next scheduled meeting
The repayments reschduled to next scheduled meeting. -
-
-
-   -
-
-

Working Days Template

-

This is a convenience resource. It can be useful when - building maintenance user interface screens for working days. -

-

Example Request:

-
workingdays/template
-
-
- -GET https://DomainName/api/v1/workingdays/template - - -{ - "repaymentRescheduleOptions": [ - { - "id": 1, - "code": "RepaymentRescheduleType.same.day", - "value": "same day" - }, - { - "id": 4, - "code": "RepaymentRescheduleType.move.to.previous.working.day", - "value": "move to previous working day" - }, - { - "id": 3, - "code": "RepaymentRescheduleType.move.to.next.repayment.meeting.day", - "value": "move to next repayment meeting day" - }, - { - "id": 2, - "code": "RepaymentRescheduleType.move.to.next.working.day", - "value": "move to next working day" - } - ] -} - -
-
-   -
-
-

List Working days

-

Example Requests:

-
workingdays
-
-
-
-
- -GET https://DomainName/api/v1/workingdays - - -[ - { - "id": 1, - "recurrence": "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR", - "repaymentRescheduleType": { - "id": 4, - "code": "RepaymentRescheduleType.move.to.next.working.day", - "value": "move to next working day" - } - "extendTermForDailyRepayments" : true - } -] - -
-
-   -
-
-

Update a Working Day

- - - - - - - -
Mandatory Fields
recurrence,repaymentRescheduleType,extendTermForDailyRepayments,locale
-
-
- -PUT https://DomainName/api/v1/Workingdays/1 - - -PUT holidays -Content-Type: application/json -Request Body: -{ -"recurrence": "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,SU", -"locale": "en", -"repaymentsRescheduledType": 4, -"extendTermForDailyRepayments": false -} - - -{ -"resourceId": 1 -} - -
-
- +   +
+
+

Retrieve a Client

+

Example Requests:

+
clients/1
+
+
+
clients/1?template=true
+
+
+
clients/1?fields=id,displayName,officeName
+
+
+ + GET https://DomainName/api/v1/clients/{clientId} + + + { + "id": 27, + "accountNo": "000000027", + "status": { + "id": 300, + "code": "clientStatusType.active", + "value": "Active" + }, + "active": true, + "activationDate": [ + 2013, + 1, + 1 + ], + "firstname": "savings", + "lastname": "test", + "displayName": "savings test", + "officeId": 1, + "officeName": "Head Office", + "timeline": { + "submittedOnDate": [ + 2013, + 1, + 1 + ], + "submittedByUsername": "mifos", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator", + "activatedOnDate": [ + 2013, + 1, + 1 + ], + "activatedByUsername": "mifos", + "activatedByFirstname": "App", + "activatedByLastname": "Administrator" + }, + "savingsProductId": 4, + "savingsProductName": "account overdraft", + "groups": [] + } + +
+
- -   -
-
-

Currency

-

Application related configuration around viewing/updating - the currencies permitted for use within the MFI.

-
-
+   +
+
+

List Clients

+

The list capability of clients can support pagination and sorting.

+
Optional Arguments
+
+
offset
+
+ Integer optional, defaults to 0 +
+
Indicates the result from which pagination starts
+ +
limit
+
+ Integer optional, defaults to 200 +
+
Restricts the size of results returned. To override the default and return all entries you must + explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1 +
+ +
orderBy
+
+ String optional, one of displayName, accountNo, officeId, officeName +
+
Orders results by the indicated field.
+ +
sortBy
+
+ String optional, one of ASC, DESC +
+
Indicates what way to order results if orderBy is used.
+ +
officeId
+
+ Integer optional +
+
Provides the ability to restrict list of clients returned based on the office they are + associated with. +
+
underHierarchy
+
+ String optional +
+
Use the office hierarchy string to return all clients under a given hierarchy.
+ +
displayName
+
+ String optional +
+
Use displayName of clients to restrict results.
+ +
firstName
+
+ String optional +
+
Use firstName of clients to restrict results.
+ +
lastName
+
+ String optional +
+
Use lastName of clients to restrict results.
+ +
externalId
+
+ String optional +
+
Use externalId of clients to restrict results.
+ +
orphansOnly
+
+ Boolean optional, defaults to false +
+
Use orphansOnly as true to list clients which are not associated to any group/parent.
+
+

Example Requests:

+
clients
+
+
clients?fields=displayName,officeName,timeline
+
+
clients?offset=10&limit=50
+
+
clients?orderBy=displayName&sortOrder=DESC
+
+
+ + GET https://DomainName/api/v1/clients + + + { + "totalFilteredRecords": 2, + "pageItems": [ + { + "id": 1, + "accountNo": "000000001", + "status": { + "id": 300, + "code": "clientStatusType.active", + "value": "Active" + }, + "active": true, + "activationDate": [ + 2013, + 3, + 1 + ], + "fullname": "Small shop", + "displayName": "Small shop", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 2, + "accountNo": "000000002", + "status": { + "id": 100, + "code": "clientStatusType.pending", + "value": "Pending" + }, + "active": false, + "fullname": "Home Farm Produce", + "displayName": "Home Farm Produce", + "officeId": 1, + "officeName": "Head Office" + } + ] + } + +
+
-   -
-
-

Retrieve Currency Configuration

-

Returns the list of currencies permitted for use AND the - list of currencies not selected (but available for selection).

-

Example Requests:

-
currencies
-
-
-
currencies?fields=selectedCurrencyOptions
-
-
- -GET https://DomainName/api/v1/currencies - - -{ - "selectedCurrencyOptions": [ - { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - ], - "currencyOptions": [ - { - "code": "AFN", - "name": "Afghanistan Afghani", - "decimalPlaces": 2, - "nameCode": "currency.AFN", - "displayLabel": "Afghanistan Afghani [AFN]" - }, - { - "code": "ALL", - "name": "Albanian Lek", - "decimalPlaces": 2, - "nameCode": "currency.ALL", - "displayLabel": "Albanian Lek [ALL]" - }, - { - "code": "ZWD", - "name": "Zimbabwe Dollar", - "decimalPlaces": 2, - "nameCode": "currency.ZWD", - "displayLabel": "Zimbabwe Dollar [ZWD]" - } - ] -} - -
-
+   +
+
+

Update a Client

+

Note:You can update any of the basic attributes of a client (but not its associations) using + this API.

+

Changing the relationship between a client and its office is not supported through this API. An API + specific to handling transfers of clients between offices is available for the same.

+

The relationship between a client and a group must be removed through the Groups API.

+
+
+ + PUT https://DomainName/api/v1/clients/{clientId} + + + PUT clients/1 + Content-Type: application/json + Request Body: + { + "externalId": "786444UUUYYH7" + } + + + { + "officeId": 1, + "clientId": 1, + "resourceId": 1, + "changes": { + "externalId": "786444UUUYYH7" + } + } + +
+
-   -
-
-

Update Currency Configuration

-

Updates the list of currencies permitted for use.

-
-
- -PUT https://DomainName/api/v1/currencies - - -PUT currencies -Content-Type: application/json -Request Body: -{ - "currencies": [ - "KES", - "BND", - "LBP", - "GHC", - "USD", - "XOF", - "AED", - "AMD" - ] -} - - -{ - "currencies": [ - "KES", - "BND", - "LBP", - "GHC", - "USD", - "XOF", - "AED", - "AMD" - ] -} - -
-
+   +
+
+

Delete a Client

+

If a client is in Pending state, you are allowed to Delete it. The delete is a 'hard + delete' and cannot be recovered from. Once clients become active or have loans or savings associated + with them, you cannot delete the client but you may Close the client if they have left the + program.

+
+
+ + DELETE https://DomainName/api/v1/clients/{clientId} + + + DELETE clients/3 + Content-Type: application/json + + + { + "officeId": 1, + "clientId": 3, + "resourceId": 3 + } + +
+
-   -
-
-

Global Configuration

-

Global configuration related to set of supported enable/disable configurations:

-
    -
  1. maker-checker - defaults to false - if true turns on maker-checker functionality
  2. -
  3. reschedule-future-repayments - defaults to false - if true reschedules repayemnts which falls on a non-working day to configured repayment rescheduling rule
  4. -
  5. allow-transactions-on-non_workingday - defaults to false - if true allows transactions on non-working days
  6. -
  7. reschedule-repayments-on-holidays - defaults to false - if true reschedules repayemnts which falls on a non-working day to defined reschedule date
  8. -
  9. allow-transactions-on-holiday - defaults to false - if true allows transactions on holidays
  10. -
  11. savings-interest-posting-current-period-end - Set it at the database level before any savings interest is posted. When set as false(default), interest will be posted on the first date of next period. If set as true, interest will be posted on last date of current period. There is no difference in the interest amount posted.
  12. -
  13. financial-year-beginning-month - Set it at the database level before any savings interest is posted. Allowed values 1 - 12 (January - December). Interest posting periods are evaluated based on this configuration.
  14. -
  15. meetings-mandatory-for-jlg-loans - if set to true, enforces all JLG loans to follow a meeting schedule belonging to either the parent group or Center.
  16. -
  17. max-login-retry-attempts - defaults to 5 - when enabled, limits failed login attempts and locks the user after N failed attempts.
  18. -
-
-
+   +
+
+

Retrieve client accounts overview

+

+ An example of how a loan portfolio summary can be provided. This + is requested in a specific use case of the community application.
It is quite reasonable to add + resources like this to simplify User Interface development. +

+

Example Requests:

+
clients/1/accounts
+
+
+
clients/1/accounts?fields=loanAccounts,savingsAccounts
+
+
+ + GET https://DomainName/api/v1/clients/{clientId}/accounts + + + { + "loanAccounts": [ + { + "id": 1, + "accountNo": "000000001", + "externalId": "456", + "productId": 1, + "productName": "TestOne", + "status": { + "id": 300, + "code": "loanStatusType.active", + "value": "Active", + "pendingApproval": false, + "waitingForDisbursal": false, + "active": true, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "loanType": { + "id": 1, + "code": "loanType.individual", + "value": "Individual" + }, + "loanCycle": 1 + } + ], + "savingsAccounts": [ + { + "id": 7, + "accountNo": "000000007", + "productId": 2, + "productName": "Other product", + "status": { + "id": 100, + "code": "savingsAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + }, + { + "id": 6, + "accountNo": "000000006", + "productId": 1, + "productName": "Passbook Savings", + "status": { + "id": 300, + "code": "savingsAccountStatusType.active", + "value": "Active", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": true, + "closed": false + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "accountBalance": 1828.03 + }, + { + "id": 5, + "accountNo": "000000005", + "productId": 1, + "productName": "Passbook Savings", + "status": { + "id": 400, + "code": "savingsAccountStatusType.withdrawn.by.applicant", + "value": "Withdrawn by applicant", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "withdrawnByApplicant": true, + "active": false, + "closed": true + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + } + ] + } +
+
-   -
-
-

Retrieve Global Configuration

-

Returns the list global enable/disable configurations.

-

Example Requests:

-
configurations
-
-
- -GET https://DomainName/api/v1/configurations - - -{ - "globalConfiguration": [ - { - "name": "maker-checker", - "enabled": true, - "value": 0, - "id": 1 - }, - { - "name": "amazon-S3", - "enabled": false, - "value": 0, - "id": 2 - }, - ] -} - -
-
+ +   +
+
+

Entity Field Configuration

+

Entity Field configuration API is a generic and extensible
+ wherein various entities and subentities can be related.
+ It gives the user an ability to enable/disable fields,
add regular expression for validation. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
entity
Entity to which relationship is to be established +
subentity
Entity which uses/relies on other entity for addional description +
field
Field of the Enity which is to be configured +
validation_regex
Regular expression for validating field's data +
is_enabled
This is used to enable/disable field +
is_mandatory
This is used to make field mandatory +
+
+
+   +
+
+ + GET https://DomainName/api/v1/fieldconfiguration/{entity} + + + [ + { + "fieldConfigurationId": 1, + "entity": "ADDRESS", + "subentity": "CLIENT", + "field": "addressType", + "is_enabled": true, + "is_mandatory": false, + "validation_regex": "" + }, + { + "fieldConfigurationId": 2, + "entity": "ADDRESS", + "subentity": "CLIENT", + "field": "street", + "is_enabled": true, + "is_mandatory": true, + "validation_regex": "" + }, + { + "fieldConfigurationId": 3, + "entity": "ADDRESS", + "subentity": "CLIENT", + "field": "addressLine1", + "is_enabled": true, + "is_mandatory": false, + "validation_regex": "" + }, + { + "fieldConfigurationId": 4, + "entity": "ADDRESS", + "subentity": "CLIENT", + "field": "addressLine2", + "is_enabled": true, + "is_mandatory": false, + "validation_regex": "" + }, + { + "fieldConfigurationId": 5, + "entity": "ADDRESS", + "subentity": "CLIENT", + "field": "addressLine3", + "is_enabled": true, + "is_mandatory": false, + "validation_regex": "" + } + ] + +
+
-  -
-
-

Retrieve Global Configuration

-

Returns a global enable/disable configurations.

-

Example Requests:

-
configurations/1
-
-
- -GET https://DomainName/api/v1/configurations/1 - - - { - "name": "maker-checker", - "enabled": true, - "value": 0, - "id": 1 - } - -
-
-   -
-
-

Retrieve Global Configuration for surveys

-

Returns the list global enable/disable survey configurations.

-

Example Requests:

-
configurations/survey
-
-
- - GET https://DomainName/api/v1/configurations/survey - - - { - "ppi_kenya_2005": [ - { - "name": "maker-checker", - "enabled": true, - "value": 0, - "id": 1 - }, - { - "name": "ppi_tanzania_20012", - "enabled": false, - "value": 0, - "id": 2 - }, - ] - } - -
-
- -   -
-
-

Update Global Configuration

-

Updates an enable/disable global configuration item.

-
-
- -PUT https://DomainName/api/v1/configurations/9 - - -PUT configurations -Content-Type: application/json -Request Body: { - "enabled":"true", - "value":2 + +   +
+
+

Client Address

+

Address module is an optional module and can be configured
+ into the system by using GlobalConfiguration setting: enable-address.
+ In order to activate Address module, we need to enable the configuration,
+ enable-address by setting its value to true. +

+ + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
addressTypeId
Address module has the ability to store
+ multiple types of address of clients.addressTypeId is basically a code whose
value + are used to store the different types of addresses. +
street,addressLine1,addressLine2,addressLine3,townVillage,city,
+ countyDistrict,stateProvinceId,
+ countryId,postalCode,latitude,longitude,createdBy,createdOn,
+ updatedBy,updatedOn +
The above are the fields of address
+ which are configurable using settings stored for each field in
+ m_field_configuration table. +
+
+
- } -
- -{ - "resourceId": 9, - "changes": { - "enabled": true - } -} -
-
+   +
+
+

List all addresses for a Client

+

Example Requests:

+
client/1/addresses
+
+
+
clients/1/addresses?status=false,true&&type=1,2,3
-   -
-
-

Cache

-

The following settings are possible for cache: -

    -
  • No Caching: caching turned off
  • -
  • Single node: caching on for single instance deployments of platorm (works for multiple tenants but only one tomcat)
  • -
-

-

By default caching is set to No Caching. Switching between caches results in the cache been clear e.g. from Single node to No cache and back again would clear down the single node cache.

-
-
- -   -
-
-

Retrieve Cache Types

-

Returns the list of caches.

-

Example Requests:

-
caches
-
-
- -GET https://DomainName/api/v1/caches - - -[ - { - "cacheType": { - "id": 1, - "code": "cacheType.noCache", - "value": "No cache" - }, - "enabled": true - }, - { - "cacheType": { - "id": 2, - "code": "cacheType.singleNode", - "value": "Single node" - }, - "enabled": false - }, - { - "cacheType": { - "id": 3, - "code": "cacheType.multiNode", - "value": "Multi node" - }, - "enabled": false - } -] - -
-
- -   -
-
-

Switch Cache

-

Switches the cache to chosen one.

-
-
- -PUT https://DomainName/api/v1/caches - - -PUT caches -Content-Type: application/json -Request Body: -{ - "cacheType": 2 -} - - -{ - "changes": { - "cacheType": 2 - } -} - -
-
-   -
-
-

Hooks

-

Hooks are a mechanism to trigger custom code on the occurence of events.

-

Each template during hook creation represents custom behaviour on what actions should be taken on the triggering of a registered event for a hook. The action taken might be firing a HTTP request to another server or execute internal code. -

-

In order for MifosX to send webhook payloads, your server needs to be accessible from the Internet. MifosX will send along a few HTTP headers to differentiate between event types.

-

X-Mifos-Entity - The entity type that was triggered.
- X-Mifos-Action - The action triggered on the entity type.
- X-Mifos-Platform-TenantId - The tenant which experienced the event.

-
-
+
+
+ + GET https://DomainName/api/v1/client/{clientid}/addresses + + + [ + { + "client_id": 111755, + "addressType": "PERMANENT ADDRESS", + "addressId": 14, + "addressTypeId": 804, + "isActive": false, + "street": "anki's home", + "addressLine1": "test123", + "addressLine2": "iuyt", + "addressLine3": "", + "townVillage": "", + "city": "mumbai", + "countyDistrict": "", + "stateProvinceId": 801, + "countryName": "UNITED STATES", + "stateName": "GUJRAT", + "countryId": 807, + "postalCode": "400095", + "createdBy": "", + "updatedBy": "" + }, + { + "client_id": 111755, + "addressType": "PERMANENT ADDRESS", + "addressId": 17, + "addressTypeId": 804, + "isActive": false, + "street": "anki's home", + "addressLine1": "", + "addressLine2": "", + "addressLine3": "", + "townVillage": "", + "city": "", + "countyDistrict": "", + "stateProvinceId": 800, + "countryName": "INDIA", + "stateName": "MAHARASHTRA", + "countryId": 802, + "postalCode": "", + "createdBy": "", + "updatedBy": "" + }, + { + "client_id": 111755, + "addressType": "OFFICE ADDRESS", + "addressId": 18, + "addressTypeId": 805, + "isActive": false, + "street": "anki's office", + "addressLine1": "", + "addressLine2": "", + "addressLine3": "", + "townVillage": "", + "city": "", + "countyDistrict": "", + "stateProvinceId": 0, + "countryId": 0, + "postalCode": "", + "createdBy": "", + "updatedBy": "" + } + ] + +
-   -
-
-

Create a Hook

-

The following parameters can be passed for the creation of a hook :- -

    -
  • name - string - Required. The name of the template that is being called. (See /hooks/template for the list of valid hook names.)
  • -
  • isActive - boolean - Determines whether the hook is actually triggered.
  • -
  • events - array - Determines what events the hook is triggered for. -
  • -
  • config - hash - Required. Key/value pairs to provide settings for this hook. These settings vary between the templates.
  • -
  • templateId - Optional. The UGD template ID associated with the same entity (client or loan).
  • -

      -
-
- -POST https://DomainName/api/v1/hooks - - -POST hooks -Content-Type: application/json -Request Body: -{ - "name": "Web", - "isActive": true, - "displayName": "Kremlin", - "templateId": 1, - "events": [ - { - "actionName": "DISBURSE", - "entityName": "LOAN" - }, - { - "actionName": "REPAYMENT", - "entityName": "LOAN" - } - ], - "config": { - "Payload URL": "http://example.com/webhook", - "Content Type": "json" - } -} - - -{ - "resourceId": 4 -} - -
-
+
+ + GET https://DomainName/api/v1/client/{clientid}/addresses?type=804&&status=false + + + [ + { + "client_id": 111755, + "addressType": "PERMANENT ADDRESS", + "addressId": 14, + "addressTypeId": 804, + "isActive": false, + "street": "anki's home", + "addressLine1": "test123", + "addressLine2": "iuyt", + "addressLine3": "", + "townVillage": "", + "city": "mumbai", + "countyDistrict": "", + "stateProvinceId": 801, + "countryName": "UNITED STATES", + "stateName": "GUJRAT", + "countryId": 807, + "postalCode": "400095", + "createdBy": "", + "updatedBy": "" + } + } + ] + +
+
-   -
-
-

Retrieve Hooks

-

Returns the list of hooks.

-

Example Requests:

-
hooks
-
-
- -GET https://DomainName/api/v1/hooks - - -[ - { - "id": 1, - "name": "Web", - "displayName": "Kremlin", - "isActive": true, - "createdAt": [2014, 9, 16], - "updatedAt": [2014, 9, 16], - "templateId": 1, - "templateName": "My UGD", - "events": [ - { - "actionName": "DISBURSE", - "entityName": "LOAN" - }, - { - "actionName": "REPAYMENT", - "entityName": "LOAN" - } - ], - "config": [ - { - "fieldName": "Content Type", - "fieldValue": "json" - }, - { - "fieldName": "Payload URL", - "fieldValue": "https://abc.com/api" - } - ] - } -] - -
-
+   +
+
+

Create an address for a Client

+ + + + + + + +
+
Mandatory Fields
+
type and clientId +
+
+
+ + POST https://DomainName/api/v1/client/{clientId}/addresses?type={addressTypeId} + + + POST client/1/address?type=805 + Content-Type: application/json Request Body: + { + "street":"Ipca", + "addressLine1":"Kandivali", + "addressLine2":"plot47", + "addressLine3":"charkop", + "city":"Mumbai", + "stateProvinceId":800, + "countryId":802, + "postalCode":"400064" + } + + + { + "resourceId":15 + } + +
+
-   -
-
-

Retrieve a Hook

-

Returns the details of a Hook.

-

Example Requests:

-
hooks/1
-
-
- -GET https://DomainName/api/v1/hooks/{hookId} - - -{ - "id": 1, - "name": "Web", - "displayName": "Kremlin", - "isActive": true, - "createdAt": [2014, 9, 16], - "updatedAt": [2014, 9, 16], - "templateId": 1, - "templateName": "My UGD", - "events": [ - { - "actionName": "DISBURSE", - "entityName": "LOAN" - }, - { - "actionName": "REPAYMENT", - "entityName": "LOAN" - } - ], - "config": [ - { - "fieldName": "Content Type", - "fieldValue": "json" - }, - { - "fieldName": "Payload URL", - "fieldValue": "https://abc.com/api" - } - ] -} - -
-
+   +
+
+

update an address for a Client

+

All the address fields can be updated by using update client address API.

+ + + + + + + +
+
Mandatory Fields
+
type and addressId +
+
+
+ + PUT https://DomainName/api/v1/client/{clientId}/addresses?type={addressTypeId} + + + POST client/1/addresses?type=805 + Content-Type: application/json Request Body: + { + "addressId":67, + "street":"goldensource" + } + + + { + "resourceId":67 + } + +
+
-   -
-
-

Update a Hook

-

Updates the details of a hook.

-
-
- -PUT https://DomainName/api/v1/hooks/{hookId} - - -PUT hooks/4 -Content-Type: application/json -Request Body: -{ - "name": "Web", - "isActive": true, - "displayName": "Local SMS Provider", - "events": [ - { - "actionName": "DISBURSE", - "entityName": "LOAN" - } - ], - "config": { - "Payload URL": "http://changed.com/sms", - "Content Type": "json" - } -} - - -{ - "resourceId": 4, - "changes": { - "displayName": "Local SMS Provider", - "events": [ - { - "actionName": "DISBURSE", - "entityName": "LOAN" - } - ], - "config": { - "Payload URL": "http://changed.com/sms", - "Content Type": "json" - } - } -} - -
-
+ +   +
+
+

Client Identifiers

+

Client Identifiers refer to documents that are + used to uniquely identify a customer.
+ Ex: Drivers License, Passport, Ration card etc +

+ + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
documentKey
Number/String used to uniquely identify a particular + document (Driving License number for a driving license etc) +
documentType
Type of the identification document + (License, Passport Etc) +
description
Any user comments to be associated + with the Client Identifier +
+
+
-   -
-
-

Delete a Hook

-

Deletes a hook.

-
-
- -DELETE https://DomainName/api/v1/hooks/{hookId} - - -DELETE hooks/4 -Content-Type: application/json - - -{ - "resourceId": 4 -} - -
-
+   +
+
+

List all Identifiers for a Client

+

Example Requests:

+
clients/1/identifiers
+
+
+
clients/1/identifiers?fields=documentKey,documentType,description
+
+
+ + GET https://DomainName/api/v1/clients/{clientId}/identifiers + + + [ + { + "id": 2, + "clientId": 1, + "documentType": { + "id": 3, + "name": "Drivers License" + }, + "documentKey": "12345", + "description": "Issued in the year 2--7" + } + ] + +
+
-   -
-
-

Retrieve Hooks Template

-

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:

-
hooks/template
-
-
- -GET https://DomainName/api/v1/hooks/template - - -{ - "templates": [ - { - "name": "Web", - "schema": [ - { - "fieldName": "Content Type", - "fieldType": "string", - "optional": true, - "placeholder": "json / form" - }, - { - "fieldName": "Payload URL", - "fieldType": "string", - "optional": false - } - ] - }, - { - },... - ], - "groupings": [ - { - "name": "jobs", - "entities": [ - { - "name": "SCHEDULER", - "actions": ["EXECUTEJOB", "UPDATE"] - }, - { - },... - ] - }, - { - },... - ] -} - -
-
+   +
+
+

Retrieve Client Identifier Details Template

+

This is a convenience resource useful for + 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:

+
clients/1/identifiers/template
+
+
+ + GET https://DomainName/api/v1/clients/{clientId}/identifiers/template + + + { + "allowedDocumentTypes": [ + { + "id": 1, + "name": "Passport", + "position": 0 + }, + { + "id": 2, + "name": "Id", + "position": 0 + }, + { + "id": 3, + "name": "Drivers License", + "position": 0 + }, + { + "id": 4, + "name": "Any Other Id Type", + "position": 0 + } + ] + } + +
+
-   -
-
-

Codes

-

Code and code values: Codes represent a specific category of - data, their code values are a specific instance of that category.

-

- Codes are mostly system defined which means the code itself - comes out of the box and cannot be modified however its code values - can be. e.g. 'Customer Identifier', it defaults to a code value of - 'Passport' but could be 'Drivers License, National Id' etc -

-

-
-   -
-
-

Create a Code

-

Creates a code. Codes created through api are always 'user - defined' and so system defined is marked as false.

-
-
- -POST https://DomainName/api/v1/codes - - -POST codes -Content-Type: application/json -Request Body: -{ - "name": "MyNewCode" -} - - -{ - "resourceId": 4 -} - -
-
+   +
+
+

Retrieve a Client Identifier

+

Example Requests:

+
clients/1/identifier/2
+
+
+
clients/1/identifier/2?template=true
+
+
+
clients/1/identifiers/2?fields=documentKey,documentType,description
+
+
+ + GET https://DomainName/api/v1/clients/{clientId}/identifiers/{identifierId} + + + { + "id": 2, + "clientId": 1, + "documentType": { + "id": 3, + "name": "Drivers License" + }, + "documentKey": "12345", + "description": "Issued in 2007" + } + +
+
-   -
-
-

Retrieve Codes

-

Returns the list of codes.

-

Example Requests:

-
codes
-
-
- -GET https://DomainName/api/v1/codes - - -[ - { - "id": 1, - "name": "Customer Identifier", - "systemDefined": true - }, - { - "id": 2, - "name": "Gender", - "systemDefined": true - }, - { - "id": 3, - "name": "Education", - "systemDefined": true - } -] - -
-
+   +
+
+

Create an Identifier for a Client

+ + + + + + + +
+
Mandatory Fields
+
documentKey, documentTypeId +
+
+
+ + POST https://DomainName/api/v1/clients/{clientId}/identifiers + + + POST clients/1/identifiers + Content-Type: application/json + Request Body: + { + "documentTypeId":"1", + "documentKey":"KA-54677", + "description":"Document has been verified" + } + + + { + "officeId": 1, + "clientId": 1, + "resourceId": 3 + } + +
+
-   -
-
-

Retrieve a Code

-

Returns the details of a Code.

-

Example Requests:

-
codes/1
-
-
- -GET https://DomainName/api/v1/codes/{codeId} - - -{ - "id": 1, - "name": "Customer Identifier", - "systemDefined": true -} - -
-
+   +
+
+

Update a Client Identifier

+
+
+ + PUT https://DomainName/api/v1/clients/{clientId}/identifiers/{identifierId} + + + PUT clients/1/identifiers/3 + Content-Type: application/json + Request Body: + { + "documentTypeId":"4", + "documentKey":"KA-94667", + "description":"Document has been updated" + } + + + { + "officeId": 1, + "clientId": 1, + "resourceId": 3, + "changes": { + "documentTypeId": 4, + "documentKey": "KA-94667", + "description": "Document has been updated" + } + } + +
+
-   -
-
-

Update a Code

-

Updates the details of a code if it is not system defined.

-
-
- -PUT https://DomainName/api/v1/codes/{codeId} - - -PUT codes/4 -Content-Type: application/json -Request Body: -{ - "name": "MyNewCode(changed)" -} - - -{ - "resourceId": 4, - "changes": { - "name": "MyNewCode(changed)" - } -} - -
-
+   +
+
+

Delete a Client Identifier

+
+
+ + DELETE https://DomainName/api/v1/clients/{clientId}/identifiers/{identifierId} + + + DELETE clients/1/identifiers/3 + Content-Type: application/json + No Request Body: + + + { + "officeId": 1, + "clientId": 1, + "resourceId": 3 + } + +
+
-   -
-
-

Delete a Code

-

Deletes a code if it is not system defined.

-
-
- -DELETE https://DomainName/api/v1/codes/{codeId} - - -DELETE codes/4 -Content-Type: application/json - - -{ - "resourceId": 4 -} - -
-
+ - -   -
-
-

Code Values

-

Code and code values: Codes represent a specific category of - data, their code values are a specific instance of that category.

-

- Codes are mostly system defined which means the code itself - comes out of the box and cannot be modified however its code values - can be. e.g. 'Customer Identifier', it defaults to a code value of - 'Passport' but could be 'Drivers License, National Id' etc -

-

-
+   +
+
+

Images

+

The current API provides support for the addition of a single + image for entities like Client (URL pattern /clients) and Staff (URL pattern + /staff.)
+ Allowed formats: JPEG (.jpg or .jpeg), GIF (.gif) and PNG (.png). +

+

The API supports two different Approaches for manipulating Images. +

    +
  • Data URI's: + For easier manipulation by Javascript clients etc in supported Browsers. +
  • +
  • + Multi-part form data: + Images can be uploaded using Multi part forms and downloaded as regular binary files. +
  • +
    +
+
-   -
-
-

Create a Code Value

-
-
- -POST https://DomainName/api/v1/codes/1/codevalues - - -POST codes/1/codevalues -Content-Type: application/json -Request Body: -{ - "name":"Ration Card", - "description: "Ration card information", - "position":"1" -} - - -{ - "resourceId": 4 -} - -
-
+   +
+
+

Get Entity Image (DATA URI)

+

Optional arguments are identical to those of Get Image + associated with an Entity (Binary file).

+

Example Requests:

+
clients/1/images
+
staff/1/images
+
+
+
+ + GET https://DomainName/api/v1/clients/{clientId}/images + Accept: text/plain -   -
-
-

List Code Values

-

Returns the list of Code Values for a given Code

-

Example Requests:

-
codes/1/codevalues
-
-
- -GET https://DomainName/api/v1/codes/{codeId}/codevalues - - -[ - { - "id": 1, - "name": "Passport", - "description: "Passport information", - "position": 0 - }, - { - "id": 2, - "name": "Id", - "description: "ID information", - "position": 0 - }, - { - "id": 3, - "name": "Drivers License", - "description: "Drivers License information", - "position": 0 - }, - { - "id": 4, - "name": "Any Other Id Type", - "description: "Any Other Id Type information", - "position": 0 - }, - { - "id": 5, - "name": "Ration Card", - "description: "Ration Card information", - "position": 1 - } -] - -
-
+
+ + data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ + bWFnZVJlYWR5ccllPAAAAJ1JREFUeNpi+P//PwMIA4E9EG8E4idQDGLbw+WhiiqA+D8OXAFVAzbp + DxBvB2JLIGaGYkuoGEjOhhFIHAbij0BdPgxYACMj42ogJQpifwBiXSDeC8JIbt4LxSC5DyxQjTeB + +BeaYb+Q5EBOAVutCzMJHUNNPADzzDokiYdAfAmJvwLkGeTgWQfyKZICS6hYBTwc0QL8ORSjBDhA + gAEAOg13B6R/SAgAAAAASUVORK5CYII= + +
+
-   -
-
-

Retrieve a Code Value

-

Returns the details of a Code Value

-

Example Requests:

-
codes/1/codevalues/1
-
-
- -GET https://DomainName/api/v1/codes/{codeId}/codevalues/{codevalueId} - - -{ - "id": 1, - "name": "Passport", - "description: "Passport information", - "position": 0 -} - -
-
+   +
+
+

Get Image associated with an Entity (Binary file).

+
Optional Arguments
+
+
output
+
+ String optional one of octet or inline_octet +
+
The query parameter overrides the "Accept" Header and sets the Media Type to + "application/octet-stream"
+ octet : Returns the image binary file as an attachment. The Content-Disposition + header is set to attachment;filename=somefile.ext
+ inline_octet :The Content-Disposition header is set to inline;filename=somefile.ext +
+
maxWidth
+
+ Integer optional +
+
Triggers resizing of the image to the defined width
+ +
maxHeight
+
+
+ Integer optional +
+ +
Triggers resizing of the image to the defined height
+ + +
+
+
+ + GET https://DomainName/api/v1/clients/{clientId}/images + Accept: application/octet-stream + + + GET clients/1/images + Accept: application/octet-stream + + + Not shown: The corresponding binary (image) file + +
+
-   -
-
-

Update a Code Value

-

Updates the details of a code value.

-
-
- -PUT https://DomainName/api/v1/codes/{codeId}/codevalues/{codevalueId} - - -PUT codes/1/codevalues/1 -Content-Type: application/json -Request Body: -{ - "name": "Indian Passport", - "description": "Indian Passport information", - "position":2 -} - - -{ - "resourceId": 1, - "changes": - { - "name": "Indian Passport", - "description": "Indian Passport information", - "position": 2 - } -} - -
-
+   +
+
+

Upload an Image for an Entity (Data URI)

+
+
+ + POST https://DomainName/api/v1/clients/{clientId}/images + + + POST clients/1/images + Content-Type: text/plain + Request Body: + data:image/png;base64,iVBORw0KGgoAA + AANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0l + EQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6 + P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC + + + { + "resourceId": 1, + "changes": {}, + "resourceIdentifier": "1" + } + +
+
-   -
-
-

Delete a Code Value

-

Deletes a code value

-
-
- -DELETE https://DomainName/api/v1/codes/{codeId}/codevalues/{codevalueId} - - -DELETE codes/1/codevalues/5 -Content-Type: application/json - - -{ - "resourceId": 5 -} - -
-
- - - -   -
-
-

Audits

-

Every non-read Mifos API request is audited. A fully processed request can - not be changed or deleted. See maker checker api for situations where an audit is not - fully processed.

- - Permissions: To search and look at audit entries a user needs to be attached to a role - that has one of the ALL_FUNCTIONS, ALL_FUNCTIONS_READ or READ_AUDIT permissions.

- - Data Scope: A user can only see audits that are within their data scope. However, - 'head office' users can see all audits including those that aren't office/branch related - e.g. Loan Product changes. -

-

-
- -   -
-
-

List Audits

-

Get a 200 list of audits that match the criteria supplied and sorted by audit id in descending order, - and are within the requestors' data scope. Also it supports pagination and sorting

-
Arguments
-
-
actionName
-
optional
-
Examples: CREATE, UPDATE, DISBURSE
- -
entityName
-
optional
-
Examples: CLIENT, LOAN, FUND
- -
resourceId
-
optional, - The id value of the entityName -
- -
makerId
-
optional, - The id value of the application user creating the entry -
+   +
+
+

Upload an Image for an Entity (Multi-part Form data)

+ + + + + + + +
+
Mandatory Fields
+
file +
+

+ The form should contain a required named body part with the + name "file".

+ If you are using a HTML form, a snippet like + <input type="file" name="file"></input> + can be used for uploading the image file. +

+
+
+ + POST https://DomainName/api/v1/clients/{clientId}/images + + + POST clients/1/images + Content-Type: multipart/form-data + Request Body: Not shown + + + { + "resourceId": 1, + "changes": {}, + "resourceIdentifier": "1" + } + +
+
-
makerDateTimeFrom
-
optional, - Get entries created on or after this -
-
Example: 2013-04-10 08:00:00
+   +
+
+

Update a Image associated with an Entity (Data URI)

+
+
+ + PUT https://DomainName/api/v1/clients/{clientId}/images + + + PUT clients/1/images + Content-Type: text/plain + Request Body: + data:image/png;base64,iVBORw0KGgoAA + AANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0l + EQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6 + P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC + + + { + "resourceId": 1, + "changes": {}, + "resourceIdentifier": "1" + } + +
+
-
makerDateTimeTo
-
optional, - Get entries created on or before this -
-
Example: 2013-05-10 08:00:00
+   +
+
+

Update an Entity's Image (Multi-part Form data)

+ + + + + + + +
+
Mandatory Fields
+
file +
+

+ The form should contain a required named body part with the + name "file".

+ If you are using a HTML form, a snippet like + <input type="file" name="file"></input> + can be used for uploading the image file. +

+
+
+ + PUT https://DomainName/api/v1/clients/{clientId}/images + + + PUT clients/1/images + Content-Type: multipart/form-data + Request Body: Not shown + +
+
-
checkerId
-
optional, - The id value of the application user that checked (approved) the entry -
+   +
+
+

Delete an Entity's Image

+
+
+ + DELETE https://DomainName/api/v1/clients/{clientId}/images + + + DELETE clients/1/images + Content-Type: application/json + No Request Body: + + + { + "resourceId": 1, + "changes": {}, + "resourceIdentifier": "1" + } + +
+
-
checkerDateTimeFrom
-
optional, - Get entries checked on or after this -
-
Example: 2013-04-10 08:00:00
+ +   +
+
+

Centers

+

Centers along with Groups are used to provided a distinctive banking distribution + channel used in microfinance. Its common in areas such as Southern Asia to use Centers and Group as + administrative units in grameen style lending. Typically groups will contain one to five + people and centers themselves will be made of anywhere between 2-10 groups. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
externalId
A place to put an external reference for this center e.g. The ID another + system uses. If provided, it must be unique. +
name
Name given to the Center.
active
Indicates whether this center is to be created as active. If + active=true, then activationDate must be provided. If active=false, then the center + is created as pending. +
activationDate
The date on which the center became active. +
officeId
The officeId of the office/branch this center is administrated through.
staffId
The staffId of the staff member dealing with this center. The staff member + is not specifically the loan officer. +
groupMembers
The array of groupIds to indicate what groups are part of this center.
+
+
-
checkerDateTimeTo
-
optional, - Get entries checked on or before this -
-
Example: 2013-05-10 18:00:00
+   +
+
+

Retrieve a Center Template

+

Example Requests:

+
centers/template
+
+
centers/template?officeId=2
+
+
+ + GET https://DomainName/fineract-provider/api/v1/centers/template + + + { + "active": false, + "activationDate": [ + 2013, + 4, + 18 + ], + "officeId": 1, + "officeOptions": [ + { + "id": 1, + "name": "Head Office", + "nameDecorated": "Head Office" + }, + { + "id": 2, + "name": "Branch Office 1", + "nameDecorated": "....Branch Office 1" + } + ], + "staffOptions": [ + { + "id": 1, + "displayName": "C, Mike" + } + ], + "groupMembersOptions": [ + { + "id": 1, + "name": "First Group", + "externalId": "000-1A", + "officeId": 1, + "officeName": "Head Office", + "hierarchy": ".1." + }, + { + "id": 2, + "name": "Pending Group", + "officeId": 1, + "officeName": "Head Office", + "hierarchy": ".2." + } + ] + } + +
+
+ + GET https://DomainName/fineract-provider/api/v1/centers/template?officeId=2 + + + { + "active": false, + "activationDate": [ + 2013, + 4, + 18 + ], + "officeId": 2, + "officeOptions": [ + { + "id": 1, + "name": "Head Office", + "nameDecorated": "Head Office" + }, + { + "id": 2, + "name": "Branch Office 1", + "nameDecorated": "....Branch Office 1" + } + ], + "staffOptions": [ + { + "id": 2, + "displayName": "D, Mary" + }, + { + "id": 3, + "displayName": "P, Paul" + } + ] + } + +
+
-
processingResult
-
optional, - The enum value of the processing status -
-
values:
- 0: Invalid
- 1: processed
- 2: awaiting.approval
- 3: rejected -
- -
officeId
-
optional, - The id value of the office/branch associated with the entry (if there is one) -
+   +
+
+

Create a Center

+ + + + + + + +
+
Mandatory Fields
+
name, officeId, active, activationDate (if active=true)
+
+ + + + + + + +
+
Optional Fields
+
externalId, staffId, groupMembers
+
+
+

Create a center as pending with no association to groupMembers.

+ + POST https://DomainName/fineract-provider/api/v1/centers + + + POST centers + Content-Type: application/json Request Body: + { + "name": "First Center (No groups)", + "officeId": 1, + "active": false + } + + + { + "officeId": 1, + "groupId": 8, + "resourceId": 8 + } + +
-
groupId
-
optional, - The id value of the group associated with the entry (if there is one). - A group is a general idea and may be a Center, a Group, a Communal Bank or other. -
+
+

Create a center as active with no association to groupMembers.

+ + POST https://DomainName/fineract-provider/api/v1/centers + + + POST centers + Content-Type: application/json Request Body: + { + "name": "centerwithgroup", + "officeId": 1, + "groupMembers": ["7"], + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "active": true, + "activationDate": "01 March 2011" + } + + + { + "officeId": 1, + "groupId": 9, + "resourceId": 9 + } + +
+
-
clientId
-
optional, - The id value of the client associated with the entry (if there is one) -
+   +
+
+

Activate a Center

+

Centers can be created in a Pending state. This API exists to enable center activation.

+

If the center happens to be already active, this API will result in an error.

+
+
+ POST https://Domain + Name/api/v1/centers/{centerId}?command=activate + POST centers/1?command=activate + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "activationDate": "01 March 2011" + } + + + { + "officeId": 1, + "groupId": 1, + "resourceId": 1 + } + +
+
-
loanId
-
optional, - The id value of the loan associated with the entry (if there is one) -
+   +
+
+

Close a Center

+

Centers can be closed if they don't have any non-closed groups or saving accounts.

+

If the Center has any active groups or savings accounts, this API will result in an error.

+
+
+ POST https://Domain Name/api/v1/centers/{centerId}?command=close + POST centers/1?command=close + Content-Type: application/json + Request Body: + { + "closureReasonId": 32, + "closureDate": "05 May 2014", + "locale": "en", + "dateFormat": "dd MMMM yyyy" + } + + + { + "resourceId": 1 + } + +
+
-
savingsAccountId
-
optional, - The id value of the savings account associated with the entry (if there is one) -
+   +
+
+

Associate Groups

+

This API allows associating existing groups to a center.

+

The groups are listed from the office to which the center is associated.

+

If group(s) is already associated with a center, this API will result in an error.

+
-
includeJson
-
optional, - Values are true, false. Default is false. -
-
paged
-
- Boolean optional, defaults to false -
-
If paged is true then results will be paginated.
- -
offset
-
- Integer optional, defaults to 0 -
-
Indicates from what result to start from.
- -
limit
-
- Integer optional, defaults to 200 -
-
Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- -
orderBy
-
- String optional, one of id, actionName, entityName, resourceId, subresourceId, madeOnDate, checkedOnDate, officeName, groupName, clientName, loanAccountNo, savingsAccountNo -
-
Orders the results by the field indicated.
- -
sortBy
-
- String optional, one of ASC, DESC -
-
Indicates what way to order results if orderBy is used.
- -
-

Example Requests:

-
audits

-
audits?fields=madeOnDate,maker,processingResult

-
audits?makerDateTimeFrom=2013-03-25 08:00:00&makerDateTimeTo=2013-04-04 18:00:00

-
audits?officeId=1

-
audits?officeId=1&includeJson=true
-
-
- -GET https://DomainName/api/v1/audits - - -[ - { - "id": 671, - "actionName": "PERMISSIONS", - "entityName": "ROLE", - "resourceId": 6, - "maker": "keithwoodlock", - "madeOnDate": 1365014262000, - "processingResult": "processed" - }, - { - "id": 670, - "actionName": "CREATE", - "entityName": "CLIENTNOTE", - "resourceId": 287, - "maker": "keithwoodlock", - "madeOnDate": 1365014204000, - "processingResult": "awaiting.approval", - "officeName": "my office", - "clientName": "gg ggg" - }, - { - "id": 668, - "actionName": "UPDATE", - "entityName": "PERMISSION", - "maker": "keithwoodlock", - "madeOnDate": 1365014186000, - "processingResult": "processed" - }, - { - "id": 667, - "actionName": "CREATE", - "entityName": "CLIENTNOTE", - "resourceId": 286, - "maker": "keithwoodlock", - "madeOnDate": 1365014169000, - "processingResult": "processed", - "officeName": "my office name", - "clientName": "gg ggg" - }, - { - "id": 666, - "actionName": "CREATE", - "entityName": "CLIENT", - "resourceId": 363, - "maker": "keithwoodlock", - "madeOnDate": 1365012843000, - "processingResult": "awaiting.approval", - "officeName": "my office name" - }, - { - "id": 657, - "actionName": "CREATE", - "entityName": "CLIENT", - "resourceId": 362, - "maker": "ii", - "madeOnDate": 1364953928000, - "checker": "ii", - "checkedOnDate": 1365010060000, - "processingResult": "processed", - "officeName": "my office name", - "clientName": "gg ggg" - }, - { - "id": 645, - "actionName": "CREATE", - "entityName": "LOAN", - "resourceId": 373, - "maker": "keithwoodlock", - "madeOnDate": 1364860260000, - "checker": "keithwoodlock", - "checkedOnDate": 1364861222000, - "processingResult": "processed", - "officeName": "another office", - "clientName": "another client", - "loanAccountNo": "000000373" - },... - ] - - -GET https://DomainName/api/v1/audits?paged=true&limit=5 - - -{ - "totalFilteredRecords": 30, - "pageItems": [ - { - "id": 671, - "actionName": "PERMISSIONS", - "entityName": "ROLE", - "resourceId": 6, - "maker": "keithwoodlock", - "madeOnDate": 1365014262000, - "processingResult": "processed" - }, - { - "id": 670, - "actionName": "CREATE", - "entityName": "CLIENTNOTE", - "resourceId": 287, - "maker": "keithwoodlock", - "madeOnDate": 1365014204000, - "processingResult": "awaiting.approval", - "officeName": "my office", - "clientName": "gg ggg" - }, - { - "id": 668, - "actionName": "UPDATE", - "entityName": "PERMISSION", - "maker": "keithwoodlock", - "madeOnDate": 1365014186000, - "processingResult": "processed" - }, - { - "id": 667, - "actionName": "CREATE", - "entityName": "CLIENTNOTE", - "resourceId": 286, - "maker": "keithwoodlock", - "madeOnDate": 1365014169000, - "processingResult": "processed", - "officeName": "my office name", - "clientName": "gg ggg" - }, - { - "id": 666, - "actionName": "CREATE", - "entityName": "CLIENT", - "resourceId": 363, - "maker": "keithwoodlock", - "madeOnDate": 1365012843000, - "processingResult": "awaiting.approval", - "officeName": "my office name" - } - ] -} - -
-
+
+ POST https://Domain + Name/api/v1/centers/{centerId}?command=associateGroups + POST centers/1?command=associateGroups + Content-Type: application/json + Request Body: + { + "grouptMembers":[1,2] + } + + + { + "officeId": 1, + "groupId": 1, + "resourceId": 1, + "grouptMembers": [1,2] + } + +
+
-   -
-
-

Audit Search Template

-

This is a convenience resource. It can be useful when - building an Audit Search UI. "appUsers" are data scoped to - the office/branch the requestor is associated with. -

-

Example Requests:

-
audits/searchtemplate
-
audits/searchtemplate?fields=actionNames
-
-
- -GET https://DomainName/api/v1/audits/searchtemplate - - -{ - "appUsers": [ - { - "id": 30, - "username": "user 1" - }, - { - "id": 28, - "username": "user 2" - }, - { - "id": 35, - "username": "user 3" - },... - ], - "actionNames": [ - "CREATE", - "DELETE", - "UPDATE", - "ACTIVATE", - "ADJUST", - "APPROVALUNDO", - "APPROVE", - "APPROVEINPAST", - "BULKREASSIGN", - "CALCULATEINTEREST", - "CLOSE", - "CLOSEASRESCHEDULED", - "CREATEHISTORIC", - "DEPOSIT", - "DEREGISTER", - "DISBURSALUNDO", - "DISBURSE", - "DISBURSEINPAST", - "INTEREST", - "PERMISSIONS", - "REGISTER", - "REJECT",... - ], - "entityNames": [ - "CALENDAR", - "CENTER", - "CHARGE", - "CLIENT", - "CLIENTIDENTIFIER", - "CLIENTIMAGE", - "CLIENTNOTE", - "CODE", - "CODEVALUE", - "COLLATERAL", - "CONFIGURATION", - "CURRENCY", - "DATATABLE", - "DEPOSITACCOUNT", - "DEPOSITNOTE", - "DEPOSITPRODUCT", - "DOCUMENT", - "FUND", - "GLACCOUNT", - "GLCLOSURE", - "GROUP", - "GROUPNOTE",... - ], - "processingResults": [ - { - "id": 0, - "processingResult": "invalid" - }, - { - "id": 1, - "processingResult": "processed" - }, - { - "id": 2, - "processingResult": "awaiting.approval" - }, - { - "id": 3, - "processingResult": "rejected" - } - ] -} - -
-
+   +
+
+

Disassociate Groups

+

This API allows to disassociate groups from a center.

+
+
+ POST https://Domain + Name/api/v1/centers/{centerId}?command=disassociateGroups + POST center/1?command=disassociateGroups + Content-Type: application/json + Request Body: + { + "grouptMembers":[1,2] + } + + + { + "officeId": 1, + "groupId": 1, + "resourceId": 1, + "grouptMembers": [1,2] + } + +
+
-   -
-
-

Retrieve an Audit Entry

-

-

Example Requests:

-
audits/20
-
audits/20?fields=madeOnDate,maker,processingResult
-
-
- -GET https://DomainName/api/v1/audits - - -{ - "id": 20, - "actionName": "REPAYMENT", - "entityName": "LOAN", - "resourceId": 868, - "maker": "dataentry1", - "madeOnDate": 1358449025000, - "processingResult": "processed", - "commandAsJson": "{\"transactionDate\":\"28 September 2012\",\"transactionAmount\":\"1,967.00\",\"locale\":\"en\",\"dateFormat\":\"dd MMMM yyyy\"}", - "officeName": "another office", - "clientName": "another client", - "loanAccountNo": "23" -} - -
-
+   +
+
+

Retrieve Center accounts overview

+

+ An example of how a savings summary for a Center can be provided. This + is requested in a specific use case of the reference application.
It is quite reasonable to add + resources like this to simplify User Interface development. +

+

Example Requests:

+
centers/9/accounts
+
+
+ + GET https://DomainName/api/v1/centers/{centerId}/accounts + + + { + "savingsAccounts": [{ + "id": 16, + "accountNo": "000000016", + "productId": 1, + "productName": "Voluntary savings", + "status": { + "id": 100, + "code": "savingsAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false, + "prematureClosed": false, + "transferInProgress": false, + "transferOnHold": false + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "accountType": { + "id": 2, + "code": "accountType.group", + "value": "Group" + }, + "timeline": { + "submittedOnDate": [2014,5,1], + "submittedByUsername": "mifos", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator" + }, + "depositType": { + "id": 100, + "code": "depositAccountType.savingsDeposit", + "value": "Savings" + } + }] + } + +
+
- - -   -
-
-

Account number format

-

Account number preferences are used to describe custom formats for account numbers associated with Customer, Loan and Savings accounts. -

- - - - - - - - - - - - - - - - - -
Field Descriptions
accountType
Identifies the type of the Account for which the Account number format applies
- Refer Retrieve - Account number formats Template for complete - details -
prefixType
Identifies a custom prefix for the account number -
- Refer Retrieve - Account number formats Template for complete - details -
-
-
- -   -
-
-

List Account number formats

-

Example Requests:

-
accountnumberformats
-
-
-
accountnumberformats?fields=accountType,prefixType
-
-
- -GET https://DomainName/api/v1/accountnumberformats - - -[ - { - "id": 2, - "accountType": - { - "id": 1, - "code": "accountType.client", - "value": "CLIENT" - }, - "prefixType": - { - "id": 101, - "code": "accountNumberPrefixType.clientType", - "value": "CLIENT_TYPE" - } - }, - { - "id": 3, - "accountType": - { - "id": 2, - "code": "accountType.loan", - "value": "LOAN" - }, - "prefixType": - { - "id": 201, - "code": "accountNumberPrefixType.loanProductShortName", - "value": "LOAN_PRODUCT_SHORT_NAME" - } - } -] - -
-
- -   -
-
-

Retrieve Account number format Template

-

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:

-
accountnumberformats/template
-
-
- -GET https://DomainName/api/v1/accountnumberformats/template - - - - - { - "accountTypeOptions": - [ - { - "id": 1, - "code": "accountType.client", - "value": "CLIENT" - }, - { - "id": 2, - "code": "accountType.loan", - "value": "LOAN" - }, - { - "id": 3, - "code": "accountType.savings", - "value": "SAVINGS" - }, - { - "id": 4, - "code": "accountType.center", - "value": "CENTER" - }, - { - "id": 5, - "code": "accountType.group", - "value": "GROUP" - } - ], - "prefixTypeOptions": - { - "accountType.loan": - [ - { - "id": 201, - "code": "accountNumberPrefixType.loanProductShortName", - "value": "LOAN_PRODUCT_SHORT_NAME" - }, - { - "id": 1, - "code": "accountNumberPrefixType.officeName", - "value": "OFFICE_NAME" - } - ], - "accountType.client": - [ - { - "id": 1, - "code": "accountNumberPrefixType.officeName", - "value": "OFFICE_NAME" - }, - { - "id": 101, - "code": "accountNumberPrefixType.clientType", - "value": "CLIENT_TYPE" - } - ], - "accountType.savings": - [ - { - "id": 301, - "code": "accountNumberPrefixType.savingsProductShortName", - "value": "SAVINGS_PRODUCT_SHORT_NAME" - }, - { - "id": 1, - "code": "accountNumberPrefixType.officeName", - "value": "OFFICE_NAME" - } - ], - "accountType.center": - [ - { - "id": 1, - "code": "accountNumberPrefixType.officeName", - "value": "OFFICE_NAME" - } - ], - "accountType.group": - [ - { - "id": 1, - "code": "accountNumberPrefixType.officeName", - "value": "OFFICE_NAME" - }, - ] - } - } +   +
+
+

Generate Collection Sheet

+

This Api retrieves repayment details of all jlg loans under a center as on a specified meeting + date.

+
+
+ POST https://Domain + Name/api/v1/centers/{centerId}?command=generateCollectionSheet + POST centers/10?command=generateCollectionSheet + Content-Type: application/json + Request Body: + { + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "calendarId":6, + "transactionDate":"04 May 2014" + } + + + { + "dueDate": [2014,5,4], + "loanProducts": [{ + "id": 1, + "name": "IGL", + "includeInBorrowerCycle": false, + "useBorrowerCycle": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "principalVariationsForBorrowerCycle": [], + "interestRateVariationsForBorrowerCycle": [], + "numberOfRepaymentVariationsForBorrowerCycle": [] + }], + "groups": [{ + "groupId": 1, + "groupName": "Group 1", + "staffId": 1, + "staffName": "A, Aliya", + "levelId": 2, + "levelName": "Group", + "clients": [{ + "clientId": 10, + "clientName": "saving acc", + "loans": [{ + "loanId": 10, + "accountId": "000000010", + "accountStatusId": 300, + "productShortName": "IGL", + "productId": 1, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "principalDue": 1200.000000, + "principalPaid": 0.000000, + "interestDue": 21.360000, + "interestPaid": 0.000000, + "totalDue": 1221.360000 + }], + "attendanceType": { + "id": 0, + "code": "attendanceType.invalid", + "value": "Invalid" + } + }] + }], + "attendanceTypeOptions": [{ + "id": 1, + "code": "attendanceType.present", + "value": "Present" + }, + { + "id": 2, + "code": "attendanceType.absent", + "value": "Absent" + }, + { + "id": 3, + "code": "attendanceType.approved", + "value": "Approved" + }, + { + "id": 4, + "code": "attendanceType.leave", + "value": "Leave" + }, + { + "id": 5, + "code": "attendanceType.late", + "value": "Late" + }] + } + +
+
+   +
+
+

Generate Individual Collection Sheet

+

This Api retrieves repayment details of all individual loans under a office as on a specified meeting + date.

+
+
+ POST https://Domain + Name/api/v1/collectionsheet?command=generateCollectionSheet + POST collectionsheet?command=generateCollectionSheet + Content-Type: application/json + Request Body: + { + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "transactionDate":"15 January 2015", + "officeId":3 + } + + + { + "dueDate": [ + 2015, + 1, + 15 + ], + "clients": [ + { + "clientId": 74, + "clientName": "guarantee test", + "loans": [ + { + "loanId": 307, + "accountId": "000000307", + "accountStatusId": 300, + "productShortName": "pr", + "productId": 60, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "principalDue": 1126.23, + "principalPaid": 8873.77, + "interestDue": 0, + "interestPaid": 504.95, + "totalDue": 1126.23 + } + ], + "savings": [ + { + "savingsId": 213, + "accountId": "000000213", + "accountStatusId": 300, + "productName": "11", + "productId": 30, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "dueAmount": 2000 + } + ] + } + ], + "paymentTypeOptions": [ + { + "id": 19, + "name": "receipt", + "position": 1, + "description": "rec" + }, + { + "id": 20, + "name": "check", + "position": 2, + "description": "che" + } + ] + } + +
+
-
-
-
-   -
-
-

Retrieve an Account number format

-

Example Requests:

-
accountnumberformats/1
-
-
-
accountnumberformats/1?template=true
-
-
-
accountnumberformats/1?fields=accountType,prefixType
-
-
- -GET https://DomainName/api/v1/accountnumberformats/{accountnumberformatId} - - +   +
+
+

Save Collection Sheet

+

This Api allows the loan officer to perform bulk repayments of JLG loans for a center on a given + meeting date.

+
+
+ POST https://Domain + Name/api/v1/centers/{centerId}?command=saveCollectionSheet + POST centers/10?command=saveCollectionSheet + { + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "calendarId": 6, + "transactionDate": "04 May 2014", + "actualDisbursementDate": "04 May 2014", + "clientsAttendance": [], + "bulkDisbursementTransactions": [], + "bulkRepaymentTransactions": [{ + "loanId": 10, + "transactionAmount": 1221.36 + }] + } + + + { + "groupId": 10, + "resourceId": 10, + "changes": { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "loanTransactions": [10], + "SavingsTransactions": [] + } + } + +
+
-{ - "id": 2, - "accountType": - { - "id": 1, - "code": "accountType.client", - "value": "CLIENT" - }, - "prefixType": - { - "id": 101, - "code": "accountNumberPrefixType.clientType", - "value": "CLIENT_TYPE" - } -} +   +
+
+

Save Collection Sheet

+

This Api allows the loan officer to perform bulk repayments of individual loans and deposit of + mandatory savings on a given meeting date.

+
+
+ POST https://Domain + Name/api/v1/collectionsheet?command=saveCollectionSheet + POST collectionsheet?command=saveCollectionSheet + { + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "transactionDate": "04 May 2014", + "actualDisbursementDate": "04 May 2014", + "bulkDisbursementTransactions": [], + "bulkRepaymentTransactions": [{ + "loanId": 10, + "transactionAmount": 1221.36, + "paymentTypeId":19, + "receiptNumber":"1245356" + }], + "bulkSavingsDueTransactions":[] + } + + + { + "groupId": 10, + "resourceId": 10, + "changes": { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "loanTransactions": [15], + "SavingsTransactions": [] - -
-
+ } + } +
+
+
-   -
-
-

Create an Account number format

-

- Note: You may associate a single Account number format for a given account type
-

- - - - - - - -
Mandatory Fields - for Account number formats
accountType
-
-
- -POST https://DomainName/api/v1/accountnumberformats - - -POST /accountnumberformats -Content-Type: application/json -Request Body: -{ - accountType :1, - prefixType: 101 -} - - -{ - "resourceId": 4 -} - - -POST /accountnumberformats -Content-Type: application/json -Request Body: -{ - accountType :2, - prefixType: 201 -} - - -{ - "resourceId": 5 -} - -
+   +
+
+

Update a Center

+
+
+ + PUT https://DomainName/fineract-provider/api/v1/centers/{centerId} + + + PUT centers/8 + Content-Type: application/json + Request Body: + { + "name": "First Center (No groups)" + } + + + { + "officeId": 1, + "groupId": 8, + "resourceId": 8, + "changes": { + "name": "First Center (No groups) - modified" + } + } +
+
-   -
-
-

Update an Account number format

-
-
- -PUT https://DomainName/api/v1/accountnumberformats/{accountnumberformatId} - - -PUT accountnumberformats/2 -Content-Type: application/json -Request Body: -{ - prefixType:1 -} - - -{ - "resourceId": 2, - "changes": - { - "prefixType": "OFFICE_NAME" - } -} +   +
+
+

Delete a Center

+

A Center can be deleted if it is in pending state and has no association - groups, loans or + savings.

+
+
+ + POST https://DomainName/fineract-provider/api/v1/centers/{centerId} + + + DELETE centers/8 + + + { + "resourceId":1, + "changes":{} + } + +
+
-
-
-
+   +
+
+

Retrieve a Center

+

Example Requests:

+
centers/1
+
+
centers/1?associations=groupMembers
+
+
+

Retrieve an existing center with no groups information.

+ + GET https://DomainName/fineract-provider/api/v1/centers/8 + + + { + "id": 8, + "status": { + "id": 100, + "code": "groupingStatusType.pending", + "value": "Pending" + }, + "active": false, + "name": "First Center (No groups)", + "officeId": 1, + "officeName": "Head Office", + "hierarchy": ".8." + } + +
+
+

Retrieve an existing center without the details of group associations.

+ + GET https://DomainName/fineract-provider/api/v1/centers/9 + + + { + "id": 9, + "status": { + "id": 300, + "code": "groupingStatusType.active", + "value": "Active" + }, + "active": true, + "activationDate": [ + 2011, + 3, + 1 + ], + "name": "centerwithgroup", + "officeId": 1, + "officeName": "Head Office", + "hierarchy": ".9." + } + +
+
-   -
-
-

Delete an Account number format

-

- Note: Account numbers created while this format was active would remain unchanged. -

-
-
- -DELETE https://DomainName/api/v1/accountnumberformats/{accountnumberformatId} - - -DELETE accountnumberformats/2 -Content-Type: application/json -No Request Body: - - -{ - "resourceId": 2 -} +   +
+
+

List Centers

+

The default implementation supports pagination and sorting with the default pagination + size set to 200 records. The parameter limit with value -1 will return all entries. +

+
Optional Arguments
+
+
paged
+
+ Boolean optional, defaults to false +
+
If paged is true then results will be paginated.
+
offset
+
+ Integer optional, defaults to 0 +
+
Indicates from what result to start from.
+ +
limit
+
+ Integer optional, defaults to 200 +
+
Restricts the size of results returned. To override the default and return all entries you must + explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1 +
+ +
orderBy
+
+ String optional, one of displayName, accountNo, officeId, officeName +
+
Orders the results by the field indicated.
+ +
sortBy
+
+ String optional, one of ASC, DESC +
+
Indicates what way to order results if orderBy is used.
+ +
officeId
+
+ Integer optional +
+
Provides ability to restrict list of centers returned based on the office there associated + with. +
+
underHierarchy
+
+ String optional +
+
Use the office hierarchy string to return all centers under a given hierarchy.
+ +
name
+
+ String optional +
+
Use name of centers to restrict results.
+ +
externalId
+
+ String optional +
+
Use externalId of center to restrict results.
+ +
+

Example Requests:

+
centers
+
+
centers?fields=name,officeName,joinedDate
+
+
centers?offset=10&limit=50
+
+
centers?orderBy=name&sortOrder=DESC
+
+
+ + GET https://DomainName/fineract-provider/api/v1/centers?paged=true + + + { + "totalFilteredRecords": 2, + "pageItems": [ + { + "id": 2, + "status": { + "id": 100, + "code": "groupingStatusType.pending", + "value": "Pending" + }, + "active": false, + "name": "Center 1", + "officeId": 1, + "officeName": "Head Office", + "hierarchy": ".2." + }, + { + "id": 3, + "status": { + "id": 100, + "code": "groupingStatusType.pending", + "value": "Pending" + }, + "active": false, + "name": "Center 2", + "officeId": 1, + "officeName": "Head Office", + "hierarchy": ".3." + } + ] + } + +
+
+ -
-
-
+ +   +
+
+

Groups

+

Groups are used to provide a distinctive banking distribution channel used in microfinances + throughout the world. The Group is an administrative unit. It can contain as few as 5 people or as + many as 40 depending on how its used.

+ +

Different styles of group lending - Joint-Liability Group, Grameen Model (Center-Group), Self-Help + Groups, Village/Communal Banks)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
name
Name given to the Group.
externalId
A place to put an external reference for this group e.g. The ID another + system uses. If provided, it must be unique. +
officeId
The officeId of the office/branch this group is administrated through.
active
Indicates whether this group is to be created as active. If + active=true, then activationDate must be provided. If active=false, then the group is + created as pending. +
activationDate
The date on which the group became active. +
staffId
The staffId of the staff member dealing with this group. The staff member is + not specifically the loan officer. The staff member must be assigned to the same office as + this group. +
clientMembers
The individual client members that make up the group. The clients must be + assigned to the same office as this group. +
calendarId
The identifier of the calendar to which the transaction is linked with.
transactionDate
The date on which the transaction took place.
role
The role to be assigned to a client.
actualDisbursementDate
The date on which the actual disbursement took place.
clientsAttendance
The clients attendance.
bulkRepaymentTransaction
The details of any bulk repayment transactions.
bulkDisbursementTransactions
The details of any bulk disbursement transactions.
datatables
Facility to enrich group details. +
+
+
- -   -
-
-

Maker Checker (or 4-eye) functionality

-

Apache Fineract Maker Checker functionality allows an MFI to define transactions - as having a maker and a checker phase. One user enters, deletes or changes data. - Then, another user that has "Checker" rights for that transaction, can inspect - and approve the data. -

- -

By default, Maker Checker functionality is disabled. - See Update Global Configuration to enable/disable - Maker Checker functionality at a global level. -

- -

- Additionally, Maker Checker functionality for each transaction (permission) is disabled by default. - see Enable/Disable Permissions for Maker Checker to enable/disable - Maker Checker functionality at a transaction (permission) level. -

- -

- Finally, to give checking rights to a user (via a role associated with the user) see - Update a Role's Permissions -

-

For example,
- -{ - "permissions":{ - "CREATE_GUARANTOR_CHECKER":true, - "CREATE_CLIENT_CHECKER":true - } -} - -
- will give checking rights for CREATE_GUARANTOR and CREATE_CLIENT

-

Alternatively, the special permissions ALL_FUNCTIONS or CHECKER_SUPER_USER will give blanket - checking rights. -

-

- When a user "makes" an entry that is enabled for Maker Checker, it is audited and the audit status - is set to a value of 2 (awaiting.approval). -

- - Checkers can only Check and approve entries that they have been permitted to check.

- - Checkers can only Check and approve entries that are within their data scope. However, - 'head office' Checkers can Check and approve all entries - including those that aren't office/branch related (as long as they have the Checker permissions) - e.g. Loan Product changes. -

-

-
- -   -
-
-

List Maker Checker Entries

-

Get a list of entries that can be checked by the requestor that match the criteria supplied.

-
Arguments
-
-
actionName
-
optional
-
Examples: CREATE, UPDATE, DISBURSE
- -
entityName
-
optional
-
Examples: CLIENT, LOAN, FUND
- -
resourceId
-
optional, - The id value of the entityName -
- -
makerId
-
optional, - The id value of the application user creating the entry -
+   +
+
+

Retrieve Group Template

+

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
  • +
+

+
Arguments
+
+
officeId
+
+ Integer optional +
+
centerId
+
+ Integer optional +
+
staffInSelectedOfficeOnly
+
+ Boolean optional +
+
Defaults to false if not provided. If staffInSelectedOfficeOnly=true only staff + who are associated with the selected branch are returned. +
+
+ +

Example Requests:

+
groups/template
+
+
groups/template?officeId=2
+
+
groups/template?centerId=1
+
+
groups/template?centerId=1&staffInSelectedOfficeOnly=true
+
+
+
+

Template to create a standard group

+ + GET https://DomainName/fineract-provider/api/v1/groups/template + + + { + "officeId": 1, + "officeOptions": [ + { + "id": 1, + "name": "Head Office", + "nameDecorated": "Head Office" + }, + { + "id": 2, + "name": "Branch Office 1", + "nameDecorated": "....Branch Office 1" + } + ], + "staffOptions": [ + { + "id": 1, + "displayName": "C, Mike" + } + ], + "clientOptions": [ + { + "id": 1, + "displayName": "Petra Yton", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 2, + "displayName": "Small shop business", + "officeId": 1, + "officeName": "Head Office" + } + ], + "datatables": [{ + "applicationTableName": "m_group", + "registeredTableName": "Group Activation Data", + "columnHeaderData": [{ + "columnName": "group_id", + "columnType": "bigint", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": false, + "isColumnPrimaryKey": true, + "columnValues": [] + }, + { + "columnName": "GROUPROLE_cd_Ctry", + "columnType": "int", + "columnLength": 0, + "columnDisplayType": "CODELOOKUP", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [{ + "id": 13, + "value": "Leader", + "score": 0 + }, + { + "id": 16, + "value": "Leader1", + "score": 0 + }, + { + "id": 14, + "value": "Collector", + "score": 0 + }], + "columnCode": "GROUPROLE" + }] + }, + { + "applicationTableName": "m_group", + "registeredTableName": "Group Enrichment", + "columnHeaderData": [{ + "columnName": "group_id", + "columnType": "bigint", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": false, + "isColumnPrimaryKey": true, + "columnValues": [] + }, + { + "columnName": "name", + "columnType": "varchar", + "columnLength": 15, + "columnDisplayType": "STRING", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] + }] + }] + } + +
+
+

Template to create a standard group with specific office known. This will return only staffOptions + and clientMembersOptions relevant for the chosen office.

+ + GET https://DomainName/fineract-provider/api/v1/groups/template?officeId=2 + + + { + "officeId": 2, + "officeOptions": [ + { + "id": 1, + "name": "Head Office", + "nameDecorated": "Head Office" + }, + { + "id": 2, + "name": "Branch Office 1", + "nameDecorated": "....Branch Office 1" + } + ], + "staffOptions": [ + { + "id": 2, + "displayName": "D, Mary" + }, + { + "id": 3, + "displayName": "P, Paul" + } + ] + } + +
+
+

Template to create a group for an existing center. As an existing center will be assigned to an + office, this will return only staffOptions and clientMembersOptions relevant for the chosen + center/office.

+ + GET https://DomainName/fineract-provider/api/v1/groups/template?centerId=1 + + -
makerDateTimeFrom
-
optional, - Get entries created on or after this -
-
Example: 2013-04-10 08:00:00
+
+
+
-
makerDateTimeTo
-
optional, - Get entries created on or before this -
-
Example: 2013-05-10 08:00:00
+   +
+
+

Create a Group

+ + + + + + + +
+
Mandatory Fields
+
name, officeId, active, activationDate (if active=true)
+
+ + + + + + + +
+
Optional Fields
+
externalId, staffId, clientMembers
+
+
+ + POST https://DomainName/fineract-provider/api/v1/groups + + + POST groups + Content-Type: application/json Request Body: + { + "officeId":"1", + "name":"Pending Group", + "active": false + } + + + { + "officeId": 1, + "groupId": 2, + "resourceId": 2 + } + + + POST groups + Content-Type: application/json Request Body: + { + "officeId":"1", + "name":"First Group", + "externalId": "000-1A", + "clientMembers": ["1"], + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "active": true, + "activationDate": "04 March 2009", + "submittedOnDate":"04 March 2009", + "datatables": [{ + "registeredTableName": "Address Details", + "data": { + "locale": "en", + "COUNTRY_cd_Country": 17 + } + }, + { + "registeredTableName": "Group Activation Data", + "data": { + "locale": "en", + "GROUPROLE_cd_Ctry": 13, + "Date": "01 December 2016", + "dateFormat": "dd MMMM yyyy" + } + }] + } + + + { + "officeId": 1, + "groupId": 1, + "resourceId": 1 + } + +
+
-
officeId
-
optional, - The id value of the office/branch associated with the entry (if there is one) -
+   +
+
+

Activate a Group

+

Groups can be created in a Pending state. This API exists to enable group activation.

+

If the group happens to be already active this API will result in an error.

+ + + + + + + +
+
Mandatory Fields
+
activationDate
+
+
+
+ POST https://Domain + Name/api/v1/groups/{groupId}?command=activate + POST groups/1?command=activate + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "activationDate": "01 March 2011" + } + + + { + "officeId": 1, + "groupId": 1, + "resourceId": 1 + } + +
+
-
groupId
-
optional, - The id value of the group associated with the entry (if there is one). - A group is a general idea and may be a Center, a Group, a Communal Bank or other. -
+   +
+
+

Associate Clients

+

This API allows to associate existing clients to a group.

+

The clients are listed from the office to which the group is associated.

+

If client(s) is already associated with group then API will result in an error.

+ + + + + + + +
+
Mandatory Fields
+
clientMembers
+
+
-
clientId
-
optional, - The id value of the client associated with the entry (if there is one) -
+
+ POST https://Domain + Name/api/v1/groups/{groupId}?command=associateClients + POST groups/1?command=associateClients + Content-Type: application/json + Request Body: + { + "clientMembers":[1,2] + } + + + { + "officeId": 1, + "groupId": 1, + "resourceId": 1, + "clientMembers": [1,2] + } + +
+
+   +
+
+

Disassociate Clients

+

This API allows to disassociate clients from a group.

+

Disassociating a client with active joint liability group loans results in an error.

+ + + + + + + +
+
Mandatory Fields
+
clientMembers
+
+
-
loanId
-
optional, - The id value of the loan associated with the entry (if there is one) -
+
+ POST https://Domain + Name/api/v1/groups/{groupId}?command=disassociateClients + POST groups/1?command=disassociateClients + Content-Type: application/json + Request Body: + { + "clientMembers":[1,2] + } + + + { + "officeId": 1, + "groupId": 1, + "resourceId": 1, + "clientMembers": [1,2] + } + +
+
-
savingsAccountId
-
optional, - The id value of the savings account associated with the entry (if there is one) -
+   +
+
+

Transfer Clients across groups

+

This API allows to transfer clients from one group to another

+ + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
destinationGroupId
The identifier of the group to which the clients are to be transferred ( + has to be in the same branch as the source Group). +
clients
Identifiers of all clients who need to be transferred +
inheritDestinationGroupLoanOfficer
Flag specifies if the transferred clients (and all their active loans) + should be linked to the assigned loan officer for the group +
+
+ + + + + + + +
+
Mandatory Fields
+
destinationGroupId, clients
+
+ + + + + + + +
+
Optional Fields
+
inheritDestinationGroupLoanOfficer (defaults to true), transferActiveLoans (defaults to + true) +
+
-
includeJson
-
optional, - Values are true, false. Default is false. -
- -
-

Example Requests:

-
makercheckers

-
makercheckers?fields=madeOnDate,maker,processingResult

-
makercheckers?makerDateTimeFrom=2013-03-25 08:00:00&makerDateTimeTo=2013-04-04 18:00:00

-
makercheckers?officeId=1

-
makercheckers?officeId=1&includeJson=true
-
-
- -GET https://DomainName/api/v1/makercheckers - - -[ - { - "id": 654, - "actionName": "CREATE", - "entityName": "LOANPRODUCT", - "resourceId": 15, - "maker": "keithwoodlock", - "madeOnDate": 1364924512000, - "processingResult": "awaiting.approval" - }, - { - "id": 666, - "actionName": "CREATE", - "entityName": "CLIENT", - "resourceId": 363, - "maker": "keithwoodlock", - "madeOnDate": 1365012843000, - "processingResult": "awaiting.approval", - "officeName": "my office name" - }, - { - "id": 670, - "actionName": "CREATE", - "entityName": "CLIENTNOTE", - "resourceId": 287, - "maker": "keithwoodlock", - "madeOnDate": 1365014204000, - "processingResult": "awaiting.approval", - "officeName": "my office name", - "clientName": "gg ggg" - } -] - -
-
-   -
-
-

Maker Checker Search Template

-

This is a convenience resource. It can be useful when - building a Checker Inbox UI. "appUsers" are data scoped to - the office/branch the requestor is associated with. - "actionNames" and "entityNames" returned are those that the - requestor has Checker approval permissions for. -

-

Example Requests:

-
makercheckers/searchtemplate
-
makercheckers/searchtemplate?fields=entityNames
-
-
- -GET https://DomainName/api/v1/audits/searchtemplate - - -{ - "appUsers": [ - { - "id": 30, - "username": "user 1" - }, - { - "id": 28, - "username": "user 2" - }, - { - "id": 35, - "username": "user 3" - },... - ], - "actionNames": [ - "CREATE", - "DELETE", - "UPDATE", - "ACTIVATE", - "ADJUST", - "APPROVALUNDO", - "APPROVE",... - ], - "entityNames": [ - "CALENDAR", - "CENTER", - "CHARGE", - "CLIENT", - "CLIENTIDENTIFIER",... - ] -} - -
-
+
-   -
-
-

Approve Maker Checker Entry

-
-
- -POST https://DomainName/api/v1/makercheckers/{auditId}?command=approve - - -POST makercheckers/1?command=approve -Content-Type: application/json - - { "auditId": 1 } -
-
-   -
-
-

Reject Maker Checker Entry

-
-
- -POST https://DomainName/api/v1/makercheckers/{auditId}?command=reject - - -POST makercheckers/1?command=reject -Content-Type: application/json - - { "auditId": 1 } -
-
+ POST https://Domain + Name/api/v1/groups/{groupId}?command=transferClients + POST groups/1?command=transferClients + Content-Type: application/json + Request Body: + { + destinationGroupId:2, + clients:[{id:1}] + } + + + { + "resourceId": 1 + } -   -
-
-

Delete Maker Checker Entry

-
-
- -DELETE https://DomainName/api/v1/makercheckers/{auditId} - - -DELETE makercheckers/1 -Content-Type: application/json - - { "auditId": 1 } -
-
- -   -
-
-

MIFOSX-BATCH JOBS

-

Batch jobs (also known as cron jobs on Unix-based systems) are a series of back-end jobs executed on a computer at a particular time defined in job's cron expression. -

- -

At any point, you can view the list of batch jobs scheduled to run along with other details specific to each job. Manually you can execute the jobs at any point of time. -

-

The scheduler status can be either "Active" or "Standby". If the scheduler status is Active, it indicates that all batch jobs are running/ will run as per the specified schedule.If the scheduler status is Standby, it will ensure all scheduled batch runs are suspended. -

-
-
+
+
+
-   -
-
-

Retrieve Scheduler Jobs

-

Returns the list of jobs.

-

Example Requests:

-
jobs
-
-
- -GET https://DomainName/api/v1/jobs - - -[ - { - "jobId": 1, - "displayName": "Update loan Summary", - "cronExpression": "0 0 22 1/1 * ? *", - "active": false, - "currentlyRunning": false, - "lastRunHistory": { - "version": 17, - "jobRunStartTime": "Jul 26, 2013 1:38:26 PM", - "jobRunEndTime": "Jul 26, 2013 1:38:26 PM", - "status": "success", - "triggerType": "application" - } - }, - { - "jobId": 2, - "displayName": "Update Loan Arrears Ageing", - "nextRunTime": "Jul 27, 2013 12:01:00 AM", - "cronExpression": "0 1 0 1/1 * ? *", - "active": true, - "currentlyRunning": false, - "lastRunHistory": { - "version": 18, - "jobRunStartTime": "Jul 26, 2013 4:05:32 PM", - "jobRunEndTime": "Jul 26, 2013 4:05:32 PM", - "status": "success", - "triggerType": "application" - } - }, - { - "jobId": 3, - "displayName": "Update Loan Paid In Advance", - "nextRunTime": "Jul 27, 2013 12:05:00 AM", - "cronExpression": "0 5 0 1/1 * ? *", - "active": true, - "currentlyRunning": false, - "lastRunHistory": { - "version": 16, - "jobRunStartTime": "Jul 26, 2013 4:15:47 PM", - "jobRunEndTime": "Jul 26, 2013 4:15:47 PM", - "status": "success", - "triggerType": "application" - } - }, - { - "jobId": 4, - "displayName": "Apply Annual Fee For Savings", - "nextRunTime": "Jul 26, 2013 10:20:00 PM", - "cronExpression": "0 20 22 1/1 * ? *", - "active": true, - "currentlyRunning": false, - "lastRunHistory": { - "version": 11, - "jobRunStartTime": "Jul 26, 2013 12:00:37 PM", - "jobRunEndTime": "Jul 26, 2013 12:00:38 PM", - "status": "success - "triggerType": "application" - } - }, - { - "jobId": 5, - "displayName": "Apply Holidays To Loans", - "nextRunTime": "Jul 27, 2013 12:00:00 PM", - "cronExpression": "0 0 12 * * ?", - "active": true, - "currentlyRunning": false, - "lastRunHistory": { - "version": 16, - "jobRunStartTime": "Jul 26, 2013 4:31:54 PM", - "jobRunEndTime": "Jul 26, 2013 4:31:55 PM", - "status": "success", - "triggerType": "application" - } - } -] +   +
+
+

Generate Collection Sheet

+

This API retrieves repayment details of all jlg loans of all members of a group on a specified + meeting date.

+
+ + + + + + + +
+
Mandatory Fields
+
calendarId, transactionDate
+
+
+ POST https://Domain + Name/api/v1/groups/{groupId}?command=generateCollectionSheet + POST groups/1?command=generateCollectionSheet + Content-Type: application/json + Request Body: + { + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "calendarId":6, + "transactionDate":"04 May 2014" + } + + + { + "dueDate": [2014,5,4], + "loanProducts": [{ + "id": 1, + "name": "IGL", + "includeInBorrowerCycle": false, + "useBorrowerCycle": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "principalVariationsForBorrowerCycle": [], + "interestRateVariationsForBorrowerCycle": [], + "numberOfRepaymentVariationsForBorrowerCycle": [] + }], + "groups": [{ + "groupId": 1, + "groupName": "Group 1", + "staffId": 1, + "staffName": "A, Aliya", + "levelId": 2, + "levelName": "Group", + "clients": [{ + "clientId": 10, + "clientName": "saving acc", + "loans": [{ + "loanId": 10, + "accountId": "000000010", + "accountStatusId": 300, + "productShortName": "IGL", + "productId": 1, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "principalDue": 1200.000000, + "principalPaid": 0.000000, + "interestDue": 21.360000, + "interestPaid": 0.000000, + "totalDue": 1221.360000 + }], + "attendanceType": { + "id": 0, + "code": "attendanceType.invalid", + "value": "Invalid" + } + }] + }], + "attendanceTypeOptions": [{ + "id": 1, + "code": "attendanceType.present", + "value": "Present" + }, + { + "id": 2, + "code": "attendanceType.absent", + "value": "Absent" + }, + { + "id": 3, + "code": "attendanceType.approved", + "value": "Approved" + }, + { + "id": 4, + "code": "attendanceType.leave", + "value": "Leave" + }, + { + "id": 5, + "code": "attendanceType.late", + "value": "Late" + }] + } + +
+
-
-
-
- -   -
-
-

Retrieve a Job

-

Returns the details of a Job.

-

Example Requests:

-
jobs/5
-
-
- -GET https://DomainName/api/v1/jobs/{jobId} - - -https://localhost:8443/fineract-provider/api/v1/jobs/5 -{ - "jobId": 5, - "displayName": "Apply Holidays To Loans", - "nextRunTime": "Jul 27, 2013 12:00:00 PM", - "cronExpression": "0 0 12 * * ?", - "active": true, - "currentlyRunning": false, - "lastRunHistory": { - "version": 16, - "jobRunStartTime": "Jul 26, 2013 4:31:54 PM", - "jobRunEndTime": "Jul 26, 2013 4:31:55 PM", - "status": "success", - "triggerType": "application" - } -} - -
-
- -   -
-
-

Update a Job

-

Updates the details of a job.

-
-
- -PUT https://DomainName/api/v1/jobs/{jobId} - - -PUT jobs/1 -Content-Type: application/json -{ - "displayName":"Update loan Summary", - "cronExpression":"0 0 22 1/1 * ? *", - "active":"true" -} -
-
- -   -
-
-

Run a Job

-

Manually Execute Specific Job.

-
-
- -POST https://DomainName/api/v1/jobs/{jobId}?command=executeJob - - -POST jobs/1?command=executeJob - -
-
- -   -
-
-

Retrieve Job Run History

-

Example Requests:

-
jobs/5/runhistory?offset=0&limit=200
-
-
- -GET https://DomainName/api/v1/jobs/{jobid}/runhistory?offset=0&limit=200 - - -{ - "totalFilteredRecords": 8, - "pageItems": [ - { - "version": 1, - "jobRunStartTime": "Jul 16, 2013 12:00:00 PM", - "jobRunEndTime": "Jul 16, 2013 12:00:00 PM", - "status": "success", - "triggerType": "cron" - }, - { - "version": 2, - "jobRunStartTime": "Jul 17, 2013 12:00:00 PM", - "jobRunEndTime": "Jul 17, 2013 12:00:00 PM", - "status": "success", - "triggerType": "cron" - }, - { - "version": 3, - "jobRunStartTime": "Jul 18, 2013 12:00:00 PM", - "jobRunEndTime": "Jul 18, 2013 12:00:01 PM", - "status": "success", - "triggerType": "cron" - }, - { - "version": 4, - "jobRunStartTime": "Jul 19, 2013 12:00:00 PM", - "jobRunEndTime": "Jul 19, 2013 12:00:00 PM", - "status": "success", - "triggerType": "cron" - }, - { - "version": 5, - "jobRunStartTime": "Jul 20, 2013 11:16:07 AM", - "jobRunEndTime": "Jul 20, 2013 11:16:07 AM", - "status": "success", - "triggerType": "application" - }, - { - "version": 6, - "jobRunStartTime": "Jul 20, 2013 11:35:05 AM", - "jobRunEndTime": "Jul 20, 2013 11:35:05 AM", - "status": "success", - "triggerType": "application" - }, - { - "version": 7, - "jobRunStartTime": "Jul 20, 2013 12:00:00 PM", - "jobRunEndTime": "Jul 20, 2013 12:00:00 PM", - "status": "success", - "triggerType": "cron" - }, - { - "version": 8, - "jobRunStartTime": "Jul 22, 2013 12:00:00 PM", - "jobRunEndTime": "Jul 22, 2013 12:00:00 PM", - "status": "success", - "triggerType": "cron" - } - ] -} - -
-
- -   -
-
-

Retrieve Scheduler Status

-

Returns the scheduler status.

-

Example Requests:

-
scheduler
-
-
- -GET https://DomainName/api/v1/scheduler - - -https://localhost:8443/fineract-provider/api/v1/scheduler -{ - "active": true -} - -
-
- -   -
-
-

Activate Scheduler Jobs

-

Activates the scheduler job service.

-
-
- -POST https://DomainName/api/v1/scheduler?command=start - - -POST scheduler?command=start - -
-
+   +
+
+

Save Collection Sheet

+

This api allows the loan officer to perform bulk repayments of JLG loans for a group on its meeting + date.

+ + + + + + + +
+
Mandatory Fields
+
calendarId, transactionDate, actualDisbursementDate
+
+ + + + + + + +
+
Optional Fields
+
clientsAttendance, bulkRepaymentTransaction, bulkDisbursementTransactions
+
+
+ POST https://Domain + Name/api/v1/groups/{groupId}?command=saveCollectionSheet + POST groups/1?command=saveCollectionSheet + { + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "calendarId": 6, + "transactionDate": "04 May 2014", + "actualDisbursementDate": "04 May 2014", + "clientsAttendance": [], + "bulkDisbursementTransactions": [], + "bulkRepaymentTransactions": [{ + "loanId": 10, + "transactionAmount": 1221.36 + }] + } + + + { + "groupId": 1, + "resourceId": 1, + "changes": { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "bulkTransations": { + "loanId": 10, + "transactionAmount": 1221.36, + "transactionDate": [2014,5,4] + } + } + } + +
+
-   -
-
-

Suspend Scheduler Jobs

-

Suspends the scheduler job service.

-
-
- -POST https://DomainName/api/v1/scheduler?command=stop - - -POST scheduler?command=stop - -
-
+   +
+
+

Unassign a Staff

+

Allows you to unassign the Staff.

+ + + + + + + +
+
Mandatory Fields
+
staffId
+
+
+ POST https://Domain + Name/api/v1/groups/{groupId}?command=unassignStaff + POST groups/1?command=unassignStaff + Content-Type: application/json + Request Body: + { + "staffId":"1" + } + + + { + "officeId": 1, + "groupId": 1, + "resourceId": 1, + "changes": {} + } + +
+
-   -
-
-

External Services

-

External Services Configuration related to set of supported configurations for third party services like Amazon S3 and SMTP:

-
    -
  1. S3 (Amazon S3):
  2. -
  3. s3_access_key -
  4. -
  5. s3_bucket_name -
  6. -
  7. s3_secret_key -
  8. -

    -
  9. SMTP (Email Service):
  10. -
  11. username -
  12. -
  13. password -
  14. -
  15. host -
  16. -
  17. port -
  18. -
  19. useTLS -
  20. - -
-
-
+   +
+
+

Assign a Staff

+

Allows you to assign Staff to an existing Group.

+

The selected Staff should be belong to the same office (or an office higher up in the hierarchy) as + this group

+ + + + + + + +
+
Mandatory Fields
+
staffId
+ + + + + + + + + + +
+
Optional Fields
+
inheritStaffForClientAccounts
Optional: Boolean if true all members of the group (i.e all clients with + active loans and savings ) will inherit the staffId +
+
+
+ POST https://Domain + Name/api/v1/groups/{groupId}?command=assignStaff + POST groups/1?command=assignStaff + Content-Type: application/json + Request Body: + { + "staffId": "1" + } + + + { + "officeId": 1, + "groupId": 1, + "resourceId": 1, + "changes": {"staffId":1} + } + +
+
-   -
-
-

Retrieve External Services Configuration

-

Returns a external Service configurations based on the Service Name.

-

Service Names supported are S3 and SMTP.

-

Example Requests:

-
externalservice/SMTP
-
-
- -GET https://DomainName/api/v1/externalservice/{serviceName} - - +   +
+
+

Close a Group

+

This API exists to close a group. Groups can be closed if they don't have any non-closed + clients/loans/savingsAccounts.

+

If the group has any active clients/loans/savingsAccount, this API will result in an error.

+
+
+ POST https://Domain Name/api/v1/groups/{groupId}?command=close + POST groups/1?command=close + Content-Type: application/json + Request Body: + { + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "closureDate":"25 June 2013", + "closureReasonId":"30" + } + + + { + "groupId": 1, + "resourceId": 1 + } + +
+
+   +
+
+

Assign a Role

+

Allows you to assign a Role to an existing member of a group.

+

We can define the different roles applicable to group members by adding code values to the + pre-defined system code GROUPROLE. Example:Group leader etc.

+ + + + + + + +
+
Mandatory Fields
+
clientId, role
+
+
+ POST https://Domain + Name/api/v1/groups/{groupId}?command=assignRole + POST groups/1?command=assignRole + Content-Type: application/json + Request Body: + { + "clientId": "1", + "role":30 + } + + + { + "clientId": 1, + "groupId": 1, + "resourceId": 1 + } + +
+
- [ - { - "name": "username", - "value": "test@mifos.com" - }, - { - "name": "password", - "value": "XXXX" - }, - { - "name": "host", - "value": "smtp.gmail.com" - }, - { - "name": "port", - "value": "25" - }, - { - "name": "useTLS", - "value": "true" - } - ] +   +
+
+

Unassign a Role

+

Allows you to unassign Roles associated tp Group members.

+
+
+ POST https://Domain + Name/api/v1/groups/{groupId}?command=unassignRole&roleId=1 + POST groups/1?command=unassignRole&roleId=1 + Content-Type: application/json + Request Body: + {} + + + { + "clientId": 1, + "groupId": 1, + "resourceId": 1 + } + +
+
+   +
+
+

Update a Role

+

Allows you to update the member Role.

+ + + + + + + +
+
Mandatory Fields
+
role
+
+
+ POST https://Domain + Name/api/v1/groups/{groupId}?command=updateRole&roleId=2 + POST groups/1?command=updateRole&roleId=2 + Content-Type: application/json + Request Body: + { + "role":"31" + } + + + { + "groupId": 1, + "resourceId": 2, + "changes":{"role":31} + } + +
+
-
-
-
+   +
+
+

Retrieve a Group

+

Retrieve group information.

+
+
associations
+
+ String optional +
+
+ One of, or comma separated of clientMembers, activeClientMembers, groupRoles, calendars, collectionMeetingCalendar +
+ or all for all associations. +
+
staffInSelectedOfficeOnly
+
+ Boolean optional, defaults to false +
+
If staffInSelectedOfficeOnly=true only staff + who are associated with the selected branch are returned. +
+
roleId
+
+ Long optional +
+
If present, will retrieve group role information
+
+

Example Requests:

+
groups/1
+
+
groups/1?associations=clientMembers
+
+
+

Group without any associations.

+ + GET https://DomainName/fineract-provider/api/v1/groups/1 + + + { + "id": 1, + "name": "First Group", + "externalId": "000-1A", + "officeId": 1, + "officeName": "Head Office", + "hierarchy": ".1.", + "timeline": { + "activatedOnDate": [ + 2013, + 11, + 14 + ], + "activatedByUsername": "mifos", + "activatedByFirstname": "App", + "activatedByLastname": "Administrator" + } + } + +
+
+

Group along with all its Clients.

+ + GET https://DomainName/fineract-provider/api/v1/groups/1?associations=clientMembers + + + { + "id": 1, + "name": "First Group", + "externalId": "000-1A", + "officeId": 1, + "officeName": "Head Office", + "hierarchy": ".1.", + "timeline": { + "activatedOnDate": [ + 2013, + 11, + 14 + ], + "activatedByUsername": "mifos", + "activatedByFirstname": "App", + "activatedByLastname": "Administrator" + }, + "clientMembers": [ + { + "id": 1, + "accountNo": "000000001", + "externalId": "786YYH7", + "activationDate": [ + 2009, + 3, + 4 + ], + "firstname": "Petra", + "lastname": "Yton", + "displayName": "Petra Yton", + "officeId": 1, + "officeName": "Head Office" + } + ] + } + +
+
-   -
-
-

Update External Service

-

Updates the external Service Configuration for a Service Name.

-
-
- -PUT https://DomainName/api/v1/externalservice/{serviceName} - - -PUT externalservice/S3 -Content-Type: application/json -{ - "username" : "test@mifos.org" - "password" : "XXXX" -} - -
-
- - - -   -
-
-

Credit Bureau Configuration

-

Credit Bureau Configuration maintains the configurations of respective Integrated Credit Bureau :

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
CreditBureauId
Id assigned to the Integrated Credit Bureau.
organisationCreditBureauId
Id assigned to the created Alias of the Integrated Credit Bureau.
configurationKey
configurationKey is the name of the parameter which is assigned for fetching the configurations.
value
value is the name of the parameter which is assigned to the configurationKey.
creditBureauConfigurationId
creditBureauConfigurationId is the Id of the configurationKey-value pair of Credit Bureau Configuration.
description
Description of the specific credit bureau configuration.
-
-
- -   -
-
-

Get Integrated Credit Bureau

-

Get Information of the Integrated Credit Bureau.

- -
-
- -GET https://DomainName/fineract-provider/api/v1/CreditBureauConfiguration - - -GET CreditBureauConfiguration - - -{ - "creditBureauId": 1, - "creditBureauName": "THITSAWORKS", - "country": "Myanmar", - "productName": "1", - "creditBureauSummary": "1 - THITSAWORKS - Myanmar", - "implementationKey": 1 -}] - -
-
- -   -
-
-

Create a Credit Bureau Configuration

-

Create a Credit Bureau Configuration.

- - - - - - - -
Mandatory Fields
creditBureauId, configkey
-
- - - - - - - -
Optional Fields
value, description
-
-
- -POST https://DomainName/fineract-provider/api/v1/CreditBureauConfiguration/configuration/{creditBureauId} - - -POST CreditBureauConfiguration/configuration/1 -Content-Type: application/json -Request Body: -{ -"configkey":"configurationkey", -"value":"value of the key", -"description":"description of the configuration" -} - - -{ - "resourceId": 10 -} - -
-
- -   -
-
-

Get Credit Bureau Configuration

-

Get Credit Bureau Configuration.

- - - - - - - -
Mandatory Fields
organisationCreditBureauId
-
-
-
- -GET https://DomainName/fineract-provider/api/v1/CreditBureauConfiguration/config/{organisationCreditBureauId} - - -GET CreditBureauConfiguration/config/1 - - -[{ - "creditBureauConfigurationId": 1, - "configurationKey": "Password", - "value": "password", - "organizationCreditBureauId": 1, - "description": "password of the CreditBureauId:1" -}, { - "creditBureauConfigurationId": 2, - "configurationKey": "SubscriptionId", - "value": "subscriptionId", - "organizationCreditBureauId": 1, - "description": "subscriptionId of the CreditBureauId:1" -} - -
-
- -   -
-
-

Update a Credit Bureau Configuration

-

Update a Credit Bureau Configuration.

- - - - - - - -
Mandatory Fields
configurationId, value
-
- - - - - - - -
Optional Fields
description
-
-
- -PUT https://DomainName/fineract-provider/api/v1/CreditBureauConfiguration/configuration/{configurationId} - - -PUT CreditBureauConfiguration/configuration/10 -Content-Type: application/json -Request Body: -{ -"value":"changing value of the key", -"description":"changing the description" -} - - -{ - "resourceId": 10, - "changes": { - "value": "changing value of the key", - "description": "changing the description" - } -} - -
-
- -   -
-
-

Post Organisation Credit Bureau

-

Creating the Alias of the Integrated Credit Bureau with the different names with the Active status.

- - - - - - - -
Mandatory Fields
alias,creditBureauId
-
- - - - - - - -
Optional Fields
isActive
-
-
- -POST https://DomainName/fineract-provider/api/v1/CreditBureauConfiguration/organisationCreditBureau/{organisationCreditBureauId} - - -POST CreditBureauConfiguration/organisationCreditBureau/1 -Content-Type: application/json: -{ -"alias":"CreditBureau of Thitsaworks", -"isActive":false, -"creditBureauId":"1" -} - - -{ - "resourceId": 1 -} - -
-
- -   -
-
-

Get Organisation Credit Bureau

-

Organisation Credit Bureau is the Alias of the Integrated Credit Bureau.

-
-
- -GET https://DomainName/fineract-provider/api/v1/CreditBureauConfiguration/organisationCreditBureau - - -GET CreditBureauConfiguration/organisationCreditBureau - - -[{ - "organisationCreditBureauId": 1, - "alias": "CreditBureau of Thitsaworks", - "creditBureauId": 1, - "creditBureauName": "THITSAWORKS", - "creditBureauProduct": "1", - "creditBureauCountry": "Myanmar", - "creditBureauSummary": "1 - THITSAWORKS - Myanmar", - "isActive": false -}] - -
-
- - -   -
-
-

Update Organisational Credit Bureau

-

Update Organisational Credit Bureau.

- - - - - - - -
Mandatory Fields
creditBureauId
-
- - - - - - - -
Optional Fields
isActive
-
-
- -PUT CreditBureauConfiguration/configuration/organisationCreditBureau - - -PUT CreditBureauConfiguration/organisationCreditBureau -Content-Type: application/json: -{ -"creditBureauId":"1", -"isActive":true -} - - -{ - "resourceId": 1 -} - -
-
- -   -
-
-

Post Credit Bureau-LoanProduct Mapping

-

Mapping of the Credit Bureau with Loan Products.

- - - - - - - -
Mandatory Fields
loanProductId, isCreditcheckMandatory, skipCreditcheckInFailure, isActive, stalePeriod, locale
-
- -
-
- -POST https://DomainName/fineract-provider/api/v1/CreditBureauConfiguration/mappings/{CreditBureauId} - - -POST CreditBureauConfiguration/mappings/1 -Content-Type: application/json: -{ -"loanProductId":"1", -"isCreditcheckMandatory":true, -"skipCreditcheckInFailure":true, -"isActive":true, -"stalePeriod":"5", -"locale":"en" -} - - -{ - "resourceId": 1 -} - -
-
- -   -
-
-

Get All Credit Bureau Mappings

-

Get All Credit Bureau - Loan Product Mappings.

-
-
- -GET https://DomainName/fineract-provider/api/v1/CreditBureauConfiguration/mappings - - -GET CreditBureauConfiguration/mappings - - -[{ - "creditbureauLoanProductMappingId": 1, - "organisationCreditBureauId": 1, - "alias": "CreditBureau of Thitsaworks", - "creditbureauSummary": "1 - THITSAWORKS - Myanmar", - "loanProductName": "LOAN_PRODUCT_MYANMAR", - "loanProductId": 1, - "isCreditCheckMandatory": true, - "skipCrediCheckInFailure": true, - "stalePeriod": 5, - "isActive": true -}] -
-
- - - -   -
-
-

Update Credit Bureau-Loan Product Mapping

-

Update Credit Bureau-Loan Product Mapping.

- - - - - - - -
Mandatory Fields
creditbureauLoanProductMappingId, isActive
-
-
- -PUT https://DomainName/fineract-provider/api/v1/CreditBureauConfiguration/mappings - - -PUT CreditBureauConfiguration/mappings -Content-Type: application/json: -{ -"creditbureauLoanProductMappingId":1, -"isActive":false -} - - -{ - "resourceId": 1 -} - -
-
- - - - - -   -
-
-

ThitsaWorks Credit Bureau Integration

-

ThitsaWorks Credit Bureau Integration fetches the Credit Report from the ThitsaWorks :

- - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
creditBureauId
Id assigned to the Integrated Credit Bureau.
params
params is the Map parameter which has specific keys,values which are required to fetch the credit Reports.
- NRC: to fetch ThitsaWorks Credit Reports.
creditReportNumber
creditReportNumber is the general term to access the Credit Reports.
-
-
- -   -
-
-

Fetch Credit Report

-

Fetches the Credit Report.

- - - - - - - -
Mandatory Fields
NRC, creditBureauID
-
- -
-
- -POST https://DomainName/fineract-provider/api/v1/creditBureauIntegration/creditReport - - -POST creditBureauIntegration/creditReport -Content-Type: application/json -{ -"NRC":"12/KaMaRa(N)253429", -"creditBureauID":"1" -} - - -{ - "creditBureauReportData":{ - "name":"Lwin Moe", - "gender":"", - "address":"", - "creditScore":{ - "Score":"N/A", - "Class":"N/A", - "Note":"" - }, - "borrowerInfo":{ - "MainIdentifier":"1113294790", - "Name":"Lwin Moe", - "NRC":"12/KaMaRa(N)253429", - "Gender":"", - "DOB":"1990-12-25,1990-01-20", - "FatherName":"", - "Address":"", - "LastUpdateDtm":"Jul 8 2020 3:57PM", - "PrintedDtm":"Dec 16 2020 4:46AM" - } - } -} - -
-
- -   -
-
-

Get Saved Credit Report Information

-

Gets Saved Credit Report Information to download the credit Report which are stored in database.

- - - - - - - -
Mandatory Fields
creditBureauID
-
- -
-
- -GET https://DomainName/fineract-provider/api/v1/creditBureauIntegration/creditReport/{creditBureauId} - - -GET creditBureauIntegration/creditReport/1 - - -[{ - "id": 3, - "creditBureauId": 1, - "nrc": "12/MaGaDa(N)253426" -}, { - "id": 4, - "creditBureauId": 1, - "nrc": "12/KaMaRa(N)253426" -}] - -
-
- - - - -   -
-
-

Two-Factor Configuration

-

The following section describes the way to configure two-factor authentication

-

Two-Factor Authentication has to be enabled by either building with Gradle arguments - -Ptwofactor=enabled or enabling the twofactor profile via env. variable -

-

In order for SMS to be enabled an SMS bridge has to be setup with the message-gateway service.

-
-
+ +   +
+
+

Retrieve Group accounts overview

+

+ Retrieves details of all Loan and Savings accounts associated with this group. +

+

Example Requests:

+
groups/1/accounts
+
+
+
groups/1/accounts?fields=loanAccounts,savingsAccounts,memberLoanAccounts,
+ memberSavingsAccounts
+
+ + GET https://DomainName/api/v1/groups/{groupId}/accounts + + + { + "loanAccounts": [ + { + "id": 3, + "accountNo": "000000003", + "productId": 3, + "productName": "daily product", + "status": { + "id": 100, + "code": "loanStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "pendingApproval": true, + "waitingForDisbursal": false, + "active": false, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "loanType": { + "id": 2, + "code": "accountType.group", + "value": "Group" + } + } + ], + "savingsAccounts": [ + { + "id": 9, + "accountNo": "000000009", + "productId": 1, + "productName": "p_sav", + "status": { + "id": 100, + "code": "savingsAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "accountType": { + "id": 2, + "code": "accountType.group", + "value": "Group" + } + }, + { + "id": 4, + "accountNo": "000000004", + "productId": 1, + "productName": "p_sav", + "status": { + "id": 300, + "code": "savingsAccountStatusType.active", + "value": "Active", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": true, + "closed": false + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "accountType": { + "id": 2, + "code": "accountType.group", + "value": "Group" + } + } + ], + "memberLoanAccounts": [ + { + "id": 4, + "accountNo": "000000004", + "productId": 1, + "productName": "testLoan", + "status": { + "id": 200, + "code": "loanStatusType.approved", + "value": "Approved", + "pendingApproval": false, + "waitingForDisbursal": true, + "active": false, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "loanType": { + "id": 3, + "code": "accountType.jlg", + "value": "JLG" + } + }, + { + "id": 7, + "accountNo": "000000007", + "productId": 2, + "productName": "weekly product", + "status": { + "id": 100, + "code": "loanStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "pendingApproval": true, + "waitingForDisbursal": false, + "active": false, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "loanType": { + "id": 3, + "code": "accountType.jlg", + "value": "JLG" + } + } + ], + "memberSavingsAccounts": [ + { + "id": 3, + "accountNo": "000000003", + "productId": 1, + "productName": "p_sav", + "status": { + "id": 100, + "code": "savingsAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "accountType": { + "id": 3, + "code": "accountType.jlg", + "value": "JLG" + } + }, + { + "id": 10, + "accountNo": "000000010", + "productId": 1, + "productName": "p_sav", + "status": { + "id": 100, + "code": "savingsAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "accountType": { + "id": 3, + "code": "accountType.jlg", + "value": "JLG" + } + } + ] + } + +
+
+ -   -
-
-

Retrieve Two-Factor Configuration

-

Returns available two-factor configuration.

-
-
- GET https://DomainName/api/v1/twofactor/configure - - -{ - "otp-delivery-email-body": "Hello {{username}}.\n\nYour OTP login token is {{token}}.", - "otp-delivery-sms-enable": true, - "otp-delivery-sms-provider": 6, - "otp-delivery-email-subject": "Fineract Two-Factor Authentication Token", - "otp-token-length": 5, - "access-token-live-time-extended": 604800, - "otp-delivery-email-enable": true, - "otp-token-live-time": 300, - "otp-delivery-sms-text": "Your authentication token for Fineract is {{token}}.", - "access-token-live-time": 86400 -} - -
+   +
+
+

Update a Group

+
+
+ + PUT https://DomainName/fineract-provider/api/v1/groups/{groupid} + + + PUT groups/1 + Content-Type: application/json + Request Body: + { + "name": "First Group (changed)" + } + + + { + "officeId": 1, + "groupId": 1, + "resourceId": 1, + "changes": { + "name": "First Group (changed)" + } + } +
+
-   -
-
-

Update Two-Factor Configuration

-

Update two-factor configuration.

-
-
- PUT https://DomainName/api/v1/twofactor/configure - - -{ - "otp-delivery-sms-provider": 7 - "otp-delivery-sms-enable": false -} - - -{ - "changes": { - "otp-delivery-sms-enable": false, - "otp-delivery-sms-provider": 7 - } -} - -
+   +
+
+

Delete a Group

+

A group can be deleted if it is in pending state and has no associations - clients, loans or + savings

+
+
+ + POST https://DomainName/fineract-provider/api/v1/groups/{groupid} + + + DELETE groups/2 + + + { + "officeId": 1, + "groupId": 2, + "resourceId": 2 + } +
+
- -   -
-
-

Funds

-
-
+   +
+
+

List Groups

+

The default implementation of listing Groups returns 200 entries with support for pagination + and sorting. Using the parameter limit with value -1 returns all entries.

+
Optional Arguments
+
+
paged
+
+ Boolean optional, defaults to false +
+
If paged is true then results will be paginated.
+
offset
+
+ Integer optional, defaults to 0 +
+
Indicates from what result to start from.
+ +
limit
+
+ Integer optional, defaults to 200 +
+
Restricts the size of results returned. To override the default and return all entries you must + explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1 +
+ +
orderBy
+
+ String optional, one of displayName, accountNo, officeId, officeName +
+
Orders the results by the field indicated.
+ +
sortBy
+
+ String optional, one of ASC, DESC +
+
Indicates what way to order results if orderBy is used.
+ +
officeId
+
+ Integer optional +
+
Provides ability to restrict list of groups returned based on the office there associated + with. +
+
underHierarchy
+
+ String optional +
+
Use the office hierarchy string to return all groups under a given hierarchy.
+ +
name
+
+ String optional +
+
Use name of groups to restrict results.
+ +
externalId
+
+ String optional +
+
Use externalId of groups to restrict results.
+ +
orphansOnly
+
+ Boolean optional, defaults to false +
+
Use orphansOnly as true to list groups which are not associated to any center/parent.
+
+

Example Requests:

+
groups
+
+
groups?fields=name,officeName,joinedDate
+
+
groups?offset=10&limit=50
+
+
groups?orderBy=name&sortOrder=DESC
+
+
+ + GET https://DomainName/fineract-provider/api/v1/groups?paged=true + + + { + "totalFilteredRecords": 2, + "pageItems": [ + { + "id": 4, + "name": "AnotherGroup", + "status": { + "id": 100, + "code": "clientStatusType.pending", + "value": "Pending" + }, + "active": false, + "officeId": 1, + "officeName": "Head Office", + "hierarchy": ".4." + } + ] + } + +
+
+ -   -
-
-

Create a Fund

-

Creates a fund.

-
-
- -POST https://DomainName/api/v1/funds - - -POST funds -Content-Type: application/json -Request Body: -{ - "name": "EU Agri Fund" -} - - -{ - "resourceId": 1 -} - -
-
+ +   +
+
+

Retrieve a GSIM Application

+

Associations: String optional + One of, or comma separated of GSIM Applications or all for all associations +

-   -
-
-

Retrieve Funds

-

Returns the list of funds.

-

Example Requests:

-
funds
-
-
- -GET https://DomainName/api/v1/funds - - -[ - { - "id": 1, - "name": "EU Agri Fund" - } -] - -
-
+
+
+ + GET https://DomainName/fineract-provider/api/v1/groups/{groupId}/gsimaccounts + -   -
-
-

Retrieve a Fund

-

Returns the details of a Fund.

-

Example Requests:

-
funds/1
-
-
- -GET https://DomainName/api/v1/funds/{fundId} - - -{ - "id": 1, - "name": "EU Agri Fund" -} - -
-
- -   -
-
-

Update a Fund

-

Updates the details of a fund.

-
-
- -PUT https://DomainName/api/v1/funds/{fundId} - - -PUT funds/1 -Content-Type: application/json -Request Body: -{ - "name": "EU Agri Fund (2010-2020)" -} - - -{ - "resourceId": 1, - "changes": { - "name": "EU Agri Fund (2010-2020)" - } -} - -
-
- - -   -
-
-

Staff

-

Allows you to model staff members. At present the key role - of significance is whether this staff member is a loan officer or - not.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
firstname
First Name of the new Employee.
lastname
Last Name of the new Employee. -
externalId
ID to put an external reference for an Employee.
mobileNo
Mobile number of an Employee. -
isLoanOfficer
Indicates whether the employee account is to be created as Loan Officer. If isLoanOfficer=true, then the employee is Loan Officer. If isLoanOfficer=false, then the employee is - not Loan Officer. -
isActive
Indicates whether the employee account is to be created as Active. If isActive=true, then employee is active. If isActive=false, then employee is inactive.
-
-
- - -   -
-
-

Create a staff member

-

Creates a staff member.

- - - - - - - -
Mandatory Fields
officeId, firstname, lastname
-
- - - - - - - -
Optional Fields
isLoanOfficer, isActive
-
-
- -POST https://DomainName/api/v1/staff - - -POST staff -Content-Type: application/json -Request Body: -{ - "officeId": 1, - "firstname": "John", - "lastname": "Doe", - "isLoanOfficer": "true", - "externalId": "17H", - "mobileNo": "+353851239876", - "isActive": "true", - "joiningDate": "01 January 2009", - "locale":"en", - "dateFormat":"dd MMMM yyyy" -} - - -{ - "officeId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

Retrieve Staff

-

Returns the list of staff members.

-

Example Requests:

-
staff
-
-
- -GET https://DomainName/api/v1/staff - - -[ - { - "id": 1, - "firstname": "John", - "lastname": "Doe", - "displayName": "Doe, John", - "officeId": 1, - "officeName": "Head Office", - "isLoanOfficer": true, - "externalId": "17H", - "isActive": "true", - "joiningDate":[2009,8,1] - } -] - -
-
-   -
-
-

Retrieve a Staff Member

-

Returns the details of a Staff Member.

-

Example Requests:

-
staff/1
-
-
- GET https://DomainName/api/v1/staff/{staffId} - -{ - "id": 1, - "firstname": "John", - "lastname": "Doe", - "displayName": "Doe, John", - "officeId": 1, - "officeName": "Head Office", - "isLoanOfficer": true, - "externalId": "17H", - "isActive": "true", - "joiningDate":[2009,8,1] -} - -
-
+ + [{ + "gsimId": 1, + "groupId": 1, + "accountNumber": "000000006", + "childGSIMAccounts": [], + "parentBalance": 2500.000000, + "savingsStatus": "SUBMITTED_AND_PENDING_APPROVAL" + }, + { + "gsimId": 8, + "groupId": 1, + "accountNumber": "000000014", + "childGSIMAccounts": [{ + "id": 14, + "displayName": "(1) qwe poi", + "accountNo": "0000000141", + "productId": 1, + "productName": "productrial", + "shortProductName": "Ipro", + "status": { + "id": 400, + "code": "savingsAccountStatusType.withdrawn.by.applicant", + "value": "Withdrawn by applicant", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "withdrawnByApplicant": true, + "active": false, + "closed": true, + "prematureClosed": false, + "transferInProgress": false, + "transferOnHold": false, + "matured": false + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "accountType": { + "id": 0, + "code": "accountType.invalid", + "value": "Invalid" + }, + "timeline": { + "submittedOnDate": [2020, 6, 3], + "submittedByUsername": "mifos", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator", + "withdrawnOnDate": [2020, 6, 3], + "withdrawnByUsername": "mifos", + "withdrawnByFirstname": "App", + "withdrawnByLastname": "Administrator", + "closedOnDate": [2020, 6, 3], + "closedByUsername": "mifos", + "closedByFirstname": "App", + "closedByLastname": "Administrator" + }, + "subStatus": { + "id": 0, + "code": "SavingsAccountSubStatusEnum.none", + "value": "None", + "none": true, + "inactive": false, + "dormant": false, + "escheat": false, + "block": false, + "blockCredit": false, + "blockDebit": false + }, + "depositType": { + "id": 100, + "code": "depositAccountType.savingsDeposit", + "value": "Savings" + } + }], + "parentBalance": 0.000000, + "savingsStatus": "SUBMITTED_AND_PENDING_APPROVAL" + }, { + "gsimId": 10, + "groupId": 1, + "accountNumber": "000000016", + "childGSIMAccounts": [{ + "id": 16, + "displayName": "(1) qwe poi", + "accountNo": "0000000161", + "productId": 1, + "productName": "productrial", + "shortProductName": "Ipro", + "status": { + "id": 600, + "code": "savingsAccountStatusType.closed", + "value": "Closed", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": true, + "prematureClosed": false, + "transferInProgress": false, + "transferOnHold": false, + "matured": false + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "accountType": { + "id": 0, + "code": "accountType.invalid", + "value": "Invalid" + }, + "timeline": { + "submittedOnDate": [2020, 6, 3], + "submittedByUsername": "mifos", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator", + "approvedOnDate": [2020, 6, 4], + "approvedByUsername": "mifos", + "approvedByFirstname": "App", + "approvedByLastname": "Administrator", + "activatedOnDate": [2020, 6, 4], + "closedOnDate": [2020, 6, 4], + "closedByUsername": "mifos", + "closedByFirstname": "App", + "closedByLastname": "Administrator" + }, + "subStatus": { + "id": 0, + "code": "SavingsAccountSubStatusEnum.none", + "value": "None", + "none": true, + "inactive": false, + "dormant": false, + "escheat": false, + "block": false, + "blockCredit": false, + "blockDebit": false + }, + "lastActiveTransactionDate": [2020, 6, 4], + "depositType": { + "id": 100, + "code": "depositAccountType.savingsDeposit", + "value": "Savings" + } + }], + "parentBalance": 0.000000, + "savingsStatus": "CLOSED_OBLIGATIONS_MET" + }] -   -
-
-

Retrieve a Staff by status

-

Returns the details of a Staff based on status.

-

By default it Returns all the ACTIVE Staff.

-

If status=INACTIVE, then it returns all INACTIVE Staff.

-

and for status=ALL, it Returns both ACTIVE and INACTIVE Staff.

-

Example Requests:

-
staff?status=active
-
-
- GET https://DomainName/api/v1/staff?status={ACTIVE|INACTIVE|ALL} - -{ - "id": 1, - "firstname": "John", - "lastname": "Doe", - "displayName": "Doe, John", - "officeId": 1, - "officeName": "Head Office", - "isLoanOfficer": true, - "externalId": "17H", - "isActive": "true", - "joiningDate":[2009,8,1] -} - -
-
+
+
+
-   -
-
-

Update a Staff Member

-

Updates the details of a staff member.

-
-
- -PUT https://DomainName/api/v1/staff/{staffId} - - -PUT staff/1 -Content-Type: application/json -Request Body: -{ - "isLoanOfficer": "false", - "externalId": "17Hbb" -} - - -{ - "officeId": 1, - "resourceId": 1, - "changes": { - "isLoanOfficer": false, - "externalId": "17Hbb" - } -} - -
-
+ + +   +
+
+

Retrieve a GLIM Application

+

Associations: String optional + One of, or comma separated of GLIM Applications or all for all associations +

- -  -
-
-

Charges

-

- Its typical for MFIs to add extra costs for their financial - products. These are typically Fees or Penalties. -

-

A Charge on fineract platform is what we use to model both Fees and Penalties.

-

At present we support defining charges for use with Client accounts and both loan and saving products.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
name
Name associated with this charge.
chargeAppliesTo
Enumeration for indicating whether charge is to be applicable for loans, savings or clients.
- 1=Loans, - 2=Savings, - 3=Client -

Once a charge definiton has been created, this attribute cannot be changed at any point.

-
active
Boolean flag determines if the charge is currently active.
penalty
Boolean flag determines if the charge is a penalty. If false the charge is considered a Fee
currencyCode
A three letter ISO code of currency.
chargeCalculationType
Enumeration for indicating whether charge amount is flat or percentage based:
- 1=Flat, - 2=% of Amount -

Used in combination with amount parameter e.g 1 % of Amount or 3.50 Flat

-

For loans, % of Amount refers to the loan principal disbursed.

-

For savings, % of Amount can be used with 'withrawal fees' and refers to the amount withdrawn.

-
amount
The charge amount. Used in combination with chargeCalculationType parameter. e.g 1 % of Amount or 3.50 Flat
minCap
Optional: Can be used when a '% of Amount' value is used for chargeCalculationType. -

Used to enforce a minimum charge amount in cases where the calculated amount is less than the minimum amount provided.

-

e.g. A 2% fee with a minimum cap of 500:
- In case of a 5000 loan, the 2% is 100, and therefore automatically 500 is used as the value of the charge. -

-
maxCap
Optional: Can be used when a '% of Amount' value is used for chargeCalculationType. -

Used to enforce a maximum charge amount in cases where the calculated amount is greater than the maximum amount provided.

-

e.g. A 2% fee, with a maximum of 2000.:
- In case of a 150000 loan, the 2% adds up to 3000 charge, and therefore the maximum cap of 2000 will be used. -

-
chargeTimeType
An enumeration indicating the time at which the charge becomes due:
-

- 1 = Disbursement : Applicable for loans and deducted at the time of loan disbursement.
- 2 = Specified Due Date : Adhoc charge can be applied for loans and savings on a specified due date.
- 3 = Savings Activation : This charge is applicable for savings account and charged at the time of account activation. This charge will be autodeducted once the account is activated with sufficient opening balance.
- 5 = Withdrawal fee : Charge applied to every withdrawal of savings account.
- 6 = Annual Fee : Recurring charge applied annually for savings on a specified Month and day. see feeOnMonthDay
- 7 = Monthly Fee : Recurring charge applied on regular interval of months for savings. see feeOnMonthDay and feeInterval -

-
chargePaymentMode
Applicable to loan charges only: Enumeration for indicating whether charge is to be paid through an Account Transfer from savings or through Regular payment mode.
- 0=Regular, - 1=Account Transfer -
feeOnMonthDay
Used along with monthDayFormat to indicate the recurring charge due date starting on a given day of the month and follow specified feeInterval. e.g. fee due date starting on 10 May with feeInterval of two (2) months then a recurring fee on 10th of every two months is applied to savings account. monthDayFormat indicates day and month formatting used e.g. "dd MMM" for 10 May
- This field is mandatory if chargeTimeType is of type Monthly Fee -
feeInterval
Fee to be applied on a specified interval.
- This field is mandatory if chargeTimeType is of type Monthly Fee or feeFrequency is selcted -
feeFrequency
This field is Optional Used to indicate the recurring(days,weeks,months and Years) charge due date starting on system calculated date for overdue penalty.
incomeAccount
This field is Optional and can be used only when a charge is applied to a Client. It indicates the Income or Liability account which gets - credited when a payment is made on this charge
-
-
+
+
+ + GET https://DomainName/fineract-provider/api/v1/groups/{groupId}/glimaccounts + -   -
-
-

Retrieve Charge Template

-

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:

-
charges/template
-
-
- -GET https://DomainName/api/v1/charges/template - - -{ - "active": false, - "penalty": false, - "currencyOptions": [ - { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - ], - "chargeCalculationTypeOptions": [ - { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - { - "id": 2, - "code": "chargeCalculationType.percent.of.amount", - "value": "% Amount" - }, - { - "id": 3, - "code": "chargeCalculationType.percent.of.amount.and.interest", - "value": "% Loan Amount + Interest" - }, - { - "id": 4, - "code": "chargeCalculationType.percent.of.interest", - "value": "% Interest" - } - ], - "chargeAppliesToOptions": [ - { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - { - "id": 2, - "code": "chargeAppliesTo.savings", - "value": "Savings" - } - ], - "chargeTimeTypeOptions": [ - { - "id": 1, - "code": "chargeTimeType.disbursement", - "value": "Disbursement" - }, - { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - { - "id": 3, - "code": "chargeTimeType.savingsActivation", - "value": "Savings Activation" - }, - { - "id": 5, - "code": "chargeTimeType.withdrawalFee", - "value": "Withdrawal Fee" - }, - { - "id": 6, - "code": "chargeTimeType.annualFee", - "value": "Annual Fee" - }, - { - "id": 7, - "code": "chargeTimeType.monthlyFee", - "value": "Monthly Fee" - }, - { - "id": 8, - "code": "chargeTimeType.instalmentFee", - "value": "Instalment Fee" - }, - { - "id": 9, - "code": "chargeTimeType.overdueInstallment", - "value": "overdue fees" - }, - { - "id": 10, - "code": "chargeTimeType.overdraftFee", - "value": "Overdraft Fee" - } - ], - "chargePaymetModeOptions": [ - { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - }, - { - "id": 1, - "code": "chargepaymentmode.accounttransfer", - "value": "Account transfer" - } - ], - "loanChargeCalculationTypeOptions": [ - { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - { - "id": 2, - "code": "chargeCalculationType.percent.of.amount", - "value": "% Amount" - }, - { - "id": 3, - "code": "chargeCalculationType.percent.of.amount.and.interest", - "value": "% Loan Amount + Interest" - }, - { - "id": 4, - "code": "chargeCalculationType.percent.of.interest", - "value": "% Interest" - } - ], - "loanChargeTimeTypeOptions": [ - { - "id": 1, - "code": "chargeTimeType.disbursement", - "value": "Disbursement" - }, - { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - { - "id": 8, - "code": "chargeTimeType.instalmentFee", - "value": "Instalment Fee" - }, - { - "id": 9, - "code": "chargeTimeType.overdueInstallment", - "value": "overdue fees" - } - ], - "savingsChargeCalculationTypeOptions": [ - { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - { - "id": 2, - "code": "chargeCalculationType.percent.of.amount", - "value": "% Amount" - } - ], - "savingsChargeTimeTypeOptions": [ - { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - { - "id": 3, - "code": "chargeTimeType.savingsActivation", - "value": "Savings Activation" - }, - { - "id": 5, - "code": "chargeTimeType.withdrawalFee", - "value": "Withdrawal Fee" - }, - { - "id": 6, - "code": "chargeTimeType.annualFee", - "value": "Annual Fee" - }, - { - "id": 7, - "code": "chargeTimeType.monthlyFee", - "value": "Monthly Fee" - }, - { - "id": 10, - "code": "chargeTimeType.overdraftFee", - "value": "Overdraft Fee" - } - ], - "feeFrequencyOptions": [ - { - "id": 0, - "code": "loanTermFrequency.periodFrequencyType.days", - "value": "Days" - }, - { - "id": 1, - "code": "loanTermFrequency.periodFrequencyType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "loanTermFrequency.periodFrequencyType.months", - "value": "Months" - }, - { - "id": 3, - "code": "loanTermFrequency.periodFrequencyType.years", - "value": "Years" - } - ] -} - -
-
- -   -
-
-

Create/Define a Charge

-

Define a new charge that can later be associated with loans and savings through their respective product definitions or directly on each account instance.

-
-
- -POST https://DomainName/api/v1/charges - - -POST charges -Content-Type: application/json -Request Body: -{ -"name": "Loan service fee", -"chargeAppliesTo": 1, -"currencyCode": "USD", -"locale": "en", -"amount": "230.56", -"chargeTimeType": "1", -"chargeCalculationType": "1", -"chargePaymentMode": "1", -"active": true -} - - -{ -"resourceId": 1 -} - - -POST charges -Content-Type: application/json -Request Body: -{ -"locale": "en", -"name": "Default Penalty", -"amount": "2", -"currencyCode": "USD", -"chargeAppliesTo": "1", -"chargeTimeType": "2", -"chargeCalculationType": "2", -"chargePaymentMode": "1", -"active": "true", -"penalty": "true", -"minCap": 50.00, -"maxCap": 100.00 -} - - -{ -"resourceId": 4 -} - - - -POST charges -Content-Type: application/json -Request Body: -{ -"locale": "en", -"name": "Annuaul Fee", -"amount": "20", -"currencyCode": "USD", -"chargeAppliesTo": "2", -"chargeTimeType": "6", -"chargeCalculationType": "1", -"chargePaymentMode": "1", -"active": "true", -"penalty": "false" -} - - -{ -"resourceId": 5 -} - - -POST charges -Content-Type: application/json -Request Body: -{ -"locale": "en", -"name": "Quarterly Fee", -"amount": "5", -"currencyCode": "USD", -"chargeAppliesTo": "2", -"chargeTimeType": "7", -"feeOnMonthDay": "10 May", -"monthDayFormat": "dd MMM", -"feeInterval": "4", -"chargeCalculationType": "1", -"active": "true", -"penalty": "false" -} - - -{ -"resourceId": 6 -} - - -POST charges -Content-Type: application/json -Request Body: -{ - "chargeAppliesTo":1, - "feeFrequency":1, - "feeInterval":"2", - "name":"overdue charge", - "currencyCode":"USD", - "chargeTimeType":9, - "chargeCalculationType":1, - "chargePaymentMode":0, - "amount":"50", - "active":true, - "penalty":"true", - "locale":"en", - "monthDayFormat":"dd MMM" -} - - -{ -"resourceId": 7 -} - - -POST charges -Content-Type: application/json -Request Body: -{ - "chargeAppliesTo": 2, - "name": "Weekly Fee", - "currencyCode": "USD", - "chargeTimeType": 11, - "chargeCalculationType": 1, - "feeInterval": "1", - "amount": "10", - "active": true, - "locale": "en" -} - - -{ - "resourceId": 8 -} - -
-
- -   -
-
-

Retrieve Charges

-

Returns the list of defined charges.

-

Example Requests:

-
charges
-
-
- -GET https://DomainName/api/v1/charges - - -[ - { - "id": 1, - "name": "Loan service fee", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 230.56, - "chargeTimeType": { - "id": 1, - "code": "chargeTimeType.disbursement", - "value": "Disbursement" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode":{ - "id":1, - "code":"chargepaymentmode.accounttransfer", - "value":"Account transfer" - } - }, - { - "id": 54, - "chargeId": 12, - "name": "Loan service fee 2", - "chargeTimeType": { - "id": 1, - "code": "chargeTimeType.disbursement", - "value": "Disbursement" - }, - "chargeCalculationType": { - "id": 2, - "code": "chargeCalculationType.percent.of.amount", - "value": "% Amount" - }, - "percentage": 2.000000, - "amountPercentageAppliedTo": 14000.000000, - "currency": { - "code": "KES", - "name": "Kenyan Shilling", - "decimalPlaces": 2, - "displaySymbol": "KSh", - "nameCode": "currency.KES", - "displayLabel": "Kenyan Shilling (KSh)" - }, - "amount": 500.000000, - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 500.000000, - "amountOrPercentage": 2.000000, - "penalty": false, - "chargePaymentMode": { - "id": 1, - "code": "chargepaymentmode.accounttransfer", - "value": "Account transfer" - }, - "paid": false, - "waived": false, - "chargePayable": true, - "minCap": 500.000000, - "maxCap": 1000.000000 - }, -] - -
-
+ + [{ + "glimId": 1, + "groupId": 1, + "accountNumber": "000000002", + "childGLIMAccounts": [{ + "id": 2, + "accountNo": "0000000021", + "parentAccountNumber": "000000002", + "productId": 1, + "productName": "loanp1", + "shortProductName": "LP1", + "status": { + "id": 500, + "code": "loanStatusType.rejected", + "value": "Rejected", + "pendingApproval": false, + "waitingForDisbursal": false, + "active": false, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "loanType": { + "id": 4, + "code": "accountType.glim", + "value": "GLIM" + }, + "timeline": { + "submittedOnDate": [2020, 6, 10], + "submittedByUsername": "mifos", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator", + "rejectedOnDate": [2020, 6, 12], + "rejectedByUsername": "mifos", + "rejectedByFirstname": "App", + "rejectedByLastname": "Administrator", + "expectedDisbursementDate": [2020, 6, 10], + "closedOnDate": [2020, 6, 12], + "closedByUsername": "mifos", + "closedByFirstname": "App", + "closedByLastname": "Administrator", + "expectedMaturityDate": [2021, 4, 10], + "writeOffByUsername": "mifos", + "writeOffByFirstname": "App", + "writeOffByLastname": "Administrator" + }, + "inArrears": false + }], + "parentPrincipalAmount": 10.000000, + "loanStatus": "SUBMITTED_AND_PENDING_APPROVAL" + },{ + "glimId": 2, + "groupId": 1, + "accountNumber": "000000003", + "childGLIMAccounts": [{ + "id": 3, + "accountNo": "0000000031", + "parentAccountNumber": "000000003", + "productId": 1, + "productName": "loanp1", + "shortProductName": "LP1", + "status": { + "id": 200, + "code": "loanStatusType.approved", + "value": "Approved", + "pendingApproval": false, + "waitingForDisbursal": true, + "active": false, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "loanType": { + "id": 4, + "code": "accountType.glim", + "value": "GLIM" + }, + "timeline": { + "submittedOnDate": [2020, 6, 10], + "submittedByUsername": "mifos", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator", + "approvedOnDate": [2020, 6, 12], + "approvedByUsername": "mifos", + "approvedByFirstname": "App", + "approvedByLastname": "Administrator", + "expectedDisbursementDate": [2020, 6, 10], + "expectedMaturityDate": [2021, 4, 10] + }, + "inArrears": false + }], + "parentPrincipalAmount": 10.000000, + "loanStatus": "SUBMITTED_AND_PENDING_APPROVAL" + }] + +
+
-   -
-
-

Retrieve a Charge

-

Returns the details of a defined Charge.

-

Example Requests:

-
charges/1
-
-
- -GET https://DomainName/api/v1/charges/{chargeId} - - -{ - "id": 1, - "name": "Loan service fee", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 230.56, - "chargeTimeType": { - "id": 1, - "code": "chargeTimeType.disbursement", - "value": "Disbursement" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode":{ - "id":1, - "code":"chargepaymentmode.accounttransfer", - "value":"Account transfer" - } -} - -
-
+ -   -
-
-

Update a Charge

-

Updates the details of a Charge.

-
-
- -PUT https://DomainName/api/v1/charges/{chargeId} - - -PUT charges/1 -Content-Type: application/json -Request Body: -{ - "name": "Loan service fee(changed)" -} - - -{ - "resourceId": 1, - "changes": { - "name": "Loan service fee(changed)" - } -} - -
-
-   -
-
-

Delete a Charge

-

Deletes a Charge.

-
-
- -DELETE https://DomainName/api/v1/charges/{chargeId} - - -DELETE charges/1 -Content-Type: application/json - - { "resourceId": 1 } -
-
+ - -   -
-
-

Accounting Rules

-

- 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

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
name
Name of the accounting rule
description
A description of the accounting rule.
officeId
An Optional Office for this accounting rule is applicable.
accountToDebit
ID of the target account to be Debited
accountToCredit
ID of the target account to be Credited
debitTags
A list of accounting Tags. Any Ledger account with this tag can serve as the - account to be debited.
This parameter is optional, if accountToDebit present in the request params
creditTags
A list of accounting Tags. Any Ledger account with this tag can serve as the - account to be credited.
This parameter is optional, if accountToCredit present in the request params
allowMultipleDebitEntries
Allows passing multiple debit entries for the accounting rule
allowMultipleCreditEntries
Allows passing multiple credit entries for the accounting rule
paymentTypeId
Allows passing multiple credit entries for the accounting rule
-
-
-   -
-
-

Retrieve Accounting Rule Details Template

-

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
-
-
- -GET https://DomainName/api/v1/accountingrules/template - - -{ - "systemDefined": false, - "allowedOffices": [{ - "id": 1, - "name": "Head Office", - "nameDecorated": "Head Office" - }], - "allowedAccounts": [{ - "id": 21, - "name": "Cash 2", - "parentId": 18, - "glCode": "20011", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "description": "Cash", - "nameDecorated": "............Cash 2", - "tagId": { - "id": 10, - "name": "asset tag" - } - }, - { - "id": 9, - "name": "Employee Salary", - "parentId": 8, - "glCode": "456674", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 5, - "code": "accountType.expense", - "value": "EXPENSE" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "Employee Salary", - "tagId": { - "id": 14, - "name": "Expenses Tag" - } - }] -} - -
-
+ -   -
-
-

Create/Define a Accounting rule

-

Define a new Accounting rule.

- - - - - - - -
Mandatory Fields
name, officeId,
accountToDebit OR debitTags,
accountToCredit OR creditTags.
-
-
- - - - - - - -
Optional Fields
description
-
-
- -POST https://DomainName/api/v1/accountingrules - - -POST accountingrules -Content-Type: application/json -Request Body: -{ - "name": "test", - "officeId": "1", - "accountToDebit": "21", - "accountToCredit": "9", - "description": "Employee salary" -} - - -{ - "officeId":1, - "resourceId":1 -} - - -POST accountingrules -Content-Type: application/json -Request Body: -{ - "name": "fordocs", - "officeId": "1", - "debitTags": ["10","11"], - "allowMultipleDebitEntries": "true", - "creditTags": ["12","13"], - "allowMultipleCreditEntries": "true", - "description": "for api docs" -} - - -{ - "officeId":1, - "resourceId":2 -} - - -POST accountingrules -Content-Type: application/json -Request Body: -{ - "name": "test123", - "officeId": "1", - "accountToDebit": "21", - "creditTags": ["12", "13"], - "allowMultipleCreditEntries": "false", - "description": "Employee salary" -} - - -{ - "officeId":1, - "resourceId":3 -} - - -POST accountingrules -Content-Type: application/json -Request Body: -{ - "name": "fordocstest", - "officeId": "1", - "debitTags": ["10","11"], - "allowMultipleDebitEntries": "false", - "accountToCredit": "9", - "description": "for api docs" -} - - -{ - "officeId":1, - "resourceId":4 -} - -
-
+ +   +
+
+

Loans

+

The API concept of loans models the loan application process and the loan + contract/monitoring process.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
accountNo
The account no. associated with this loan. Is auto generated if not provided + at loan application creation time. +
externalId
A place to put an external reference for + this loan e.g. The ID another system uses.
If provided, + it must be unique. +
fundId
Optional: For associating a loan with a given fund.
loanOfficerId
Optional: For associating a loan with a given staff member who is a loan + officer. +
loanPurposeId
Optional: For marking a loan with a given loan purpose option. Loan purposes + are configurable and can be setup by system admin through code/code values screens. +
principal
The loan amount to be disbursed to through loan.
loanTermFrequency
The length of loan term
Used like: + loanTermFrequency loanTermFrequencyType
e.g. 12 Months +
loanTermFrequencyType
The loan term period to use. Used like: + loanTermFrequency loanTermFrequencyType
e.g. 12 Months + Example Values: 0=Days, 1=Weeks, 2=Months, 3=Years +
numberOfRepayments
Number of installments to repay.
+ Used like: numberOfRepayments Every repaymentEvery + repaymentFrequencyType
e.g. 10 (repayments) Every 12 Weeks +
repaymentEvery
Used like: numberOfRepayments Every + repaymentEvery repaymentFrequencyType
e.g. 10 + (repayments) Every 12 Weeks +
repaymentFrequencyType
Used like: numberOfRepayments Every + repaymentEvery repaymentFrequencyType
e.g. 10 + (repayments) Every 12 Weeks
+ Example Values: 0=Days, 1=Weeks, 2=Months +
interestRatePerPeriod
Interest Rate.
Used like: + interestRatePerPeriod % interestRateFrequencyType - interestType
+ e.g. 12.0000% Per year - Declining Balance +
interestRateFrequencyType
Used like: interestRatePerPeriod% + interestRateFrequencyType - interestType
e.g. 12.0000% + Per year - Declining Balance
+ Example Values: 2=Per month, 3=Per year +
graceOnPrincipalPayment
Optional: Integer - represents the number of repayment periods that grace + should apply to the principal component of a repayment period. +
graceOnInterestPayment
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. +
graceOnInterestCharged
Optional: Integer - represents the number of repayment periods that should + be interest-free. +
graceOnArrearsAgeing
Optional: Integer - Used in Arrears calculation to only take into account + loans that are more than graceOnArrearsAgeing days overdue. +
interestChargedFromDate
Optional: Date - The date from with interest is to start being charged.
expectedDisbursementDate
The proposed disbursement date of the loan so a proposed repayment + schedule can be provided. +
submittedOnDate
The date the loan application was submitted by applicant.
linkAccountId
The Savings Account id for linking with loan account for payments.
amortizationType
Example Values: 0=Equal + principle payments, 1=Equal installments +
interestType
Used like: interestRatePerPeriod% + interestRateFrequencyType - interestType
e.g. 12.0000% + Per year - Declining Balance
+ Example Values: 0=Declining Balance, 1=Flat +
interestCalculationPeriodType
Example Values: 0=Daily, 1=Same as repayment period
allowPartialPeriodInterestCalculation
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) +
inArrearsTolerance
The amount that can be 'waived' at end + of all loan payments because it is too small to worry about.
+ This is also the tolerance amount assessed when determining if a + loan is in arrears. +
transactionProcessingStrategyCode
+ An enumeration that indicates the type of transaction processing strategy to be used. This + relates to functionality that is also known as Payment Application Logic. + +

A number of out of the box approaches exist, some are custom to specific MFIs, some are + more general and indicate the order in which payments are processed.

+ +

Refer to the Payment Application Logic / Transaction + Processing Strategy section in the appendix for more detailed overview of each + available payment application logic provided out of the box.

+ + List of current approaches:
+
    +
  • 1 = Mifos style (Similar to Old Mifos)
  • +
  • 2 = Heavensfamily (Custom MFI approach)
  • +
  • 3 = Creocore (Custom MFI approach)
  • +
  • 4 = RBI (India)
  • +
  • 5 = Principal Interest Penalties Fees Order
  • +
  • 6 = Interest Principal Penalties Fees Order
  • +
  • 7 = Early Payment Strategy
  • +
+ + +
loanType
To represent different type of loans.
+ At present there are three type of loans are supported. +
Available loan types: +
    +
  1. individual: Loan given to individual member
  2. +
  3. group: Loan given to group as a whole
  4. +
  5. jlg: Joint liability group loan given to members in a group on individual + basis. JLG loan can be given to one or more members in a group. +
  6. +
+
recalculationRestFrequencyDate
Specifies rest frequency start date for interest recalculation. This date + must be before or equal to disbursement date +
recalculationCompoundingFrequencyDate
Specifies compounding frequency start date for interest recalculation. This + date must be equal to disbursement date +
+
+
-   -
-
-

Retrieve Accounting Rules

-

Returns the list of defined accounting rules.

-

Example Requests:

-
accountingrules
-
-
- -GET https://DomainName/api/v1/accountingrules - - -[{ - "id": 1, - "officeId": 1, - "officeName": "Head Office", - "name": "test", - "description": "Employee salary", - "systemDefined": false, - "debitAccountHead": { - "id": 21, - "name": "Cash 2", - "glCode": "20011", - "disabled": false, - "manualEntriesAllowed": false - }, - "creditAccountHead": { - "id": 9, - "name": "Employee Salary", - "glCode": "456674", - "disabled": false, - "manualEntriesAllowed": false - } -}, -{ - "id": 2, - "officeId": 1, - "officeName": "Head Office", - "name": "A L1", - "description": "aafff", - "systemDefined": false, - "debitAccountHead": { - "id": 3, - "name": "A L", - "glCode": "10003", - "disabled": false, - "manualEntriesAllowed": false - }, - "creditAccountHead": { - "id": 4, - "name": "car loan", - "glCode": "10004", - "disabled": false, - "manualEntriesAllowed": false - } -}] - -
-
- -   -
-
-

Retrieve a Accounting rule

-

Returns the details of a defined Accounting rule.

-

Example Requests:

-
accountingrules/1
-
-
- -GET https://DomainName/api/v1/accountingrules/{accountingruleId} - - -{ - "id": 1, - "officeId": 1, - "officeName": "Head Office", - "name": "test", - "description": "Employee salary", - "systemDefined": false, - "debitAccountHead": { - "id": 21, - "name": "Cash 2", - "glCode": "20011", - "disabled": false, - "manualEntriesAllowed": false - }, - "creditAccountHead": { - "id": 9, - "name": "Employee Salary", - "glCode": "456674", - "disabled": false, - "manualEntriesAllowed": false - } -} - -
-
- -   -
-
-

Update a Accounting Rule

-

Updates the details of a Accounting rule.

-
-
- -PUT https://DomainName/api/v1/accountingrules/{accountingruleId} - - -PUT accountingrules/1 -Content-Type: application/json -Request Body: -{ - "name": "Employee Salary posting rule" -} - - -{ - "resourceId": 1, - "changes": { - "name": "Employee Salary posting rule" - } -} - -
-
- -   -
-
-

Delete a Accounting Rule

-

Deletes a Accounting rule.

-
-
- -DELETE https://DomainName/api/v1/accountingrules/{accountingruleId} - - -DELETE accountingrules/1 -Content-Type: application/json - - { "resourceId": 1 } -
-
- - -   -
-
-

Savings Product:

-

An MFIs savings product offerings are modeled using this API.

-

When creating savings accounts, the details from the savings product are used to auto fill details of the savings account application process.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
name
The name of the product offering.
shortName
Shortname associated with a saving product.
- An abbreviated version of the name, used in reports or menus where space is limited. -
description
A description of the product offering.
currencyCode
Three letter ISO code representing currency.
digitsAfterDecimal
Override the currency default value for digitsAfterDecimal.
inMultiplesOf
Override the default value for rounding currency to multiples of provided value.
nominalAnnualInterestRate
The default interest rate set when creating savings accounts of this type of product. e.g. 5% Per year - It number here is always expressed as the Nominal APR.
interestCompoundingPeriodType
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end of month)
interestPostingPeriodType
The period at which interest rate is posted or credited to savings account. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, 30th Sep, 31st Dec)
interestCalculationType
The interest calculation method used: 1=Daily Balance or 2=Average Daily Balance
interestCalculationDaysInYearType
The setting for number of days in year to use: 360=360 Days, 365=365 Days
minRequiredOpeningBalance
Optional: If provided, sets the minimum deposit amount required to open a savings account e.g. 2,000
lockinPeriodFrequency
Optional: If provided, used along with lockinPeriodFrequencyType to indicate the length of time that the savings account is 'locked in' and withdrawals are not allowed. e.g. 6 Months
lockinPeriodFrequencyType
Optional: If provided, used along with lockinPeriodFrequency to indicate the length of time that the savings account is 'locked in' and withdrawals are not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. 6 Months
withdrawalFeeForTransfers
Optional: Used along with withdrawalFeeAmount to indicate whether the withdrawal fee should be applied on the account for account transfers .
accountingRule
Specifies if accounting is enabled for the particular - product and the type of the accounting rule to be used - Example Values:1=NONE,2=CASH_BASED
allowOverdraft
Optional: If provided, depending on the value mark the savings account as overdraft account
overdraftLimit
Optional: If provided, sets the maximum allowed overdraft amount for a savings account e.g. 5,000 else set the limit as zero
minBalanceForInterestCalculation
Optional: If provided, balance must be greater than provided value for calculation of interest e.g. 5,000
enforceMinRequiredBalance
Optional: If set to true, validates that the account balance does not - fall below minRequiredBalance
minRequiredBalance
Optional: If provided, sets an indicator of the minimum required balance of the savings account e.g. 5,000 else set the limit as zero. Note that enforceMinRequiredBalance determines if the minimum required balance is enforced
withHoldTax
Optional: If provided, sets an indicator for applying withhold tax on interest posting for savings account
taxGroupId
Optional: If withhold tax set as true, with hold tax will be applied as per the tax group provided
-
-
- -   -
-
-

Retrieve Savings Product Template

-

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: +   +

+
+

Retrieve Loan Details Template

+

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
  • +
  • Field Defaults
  • +
  • Allowed Value Lists
-

-

Example Request:

-
savingsproducts/template
-
-
- GET https://Domain Name/api/v1/savingsproducts/template - -{ - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "interestCompoundingPeriodType": { - "id": 1, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", - "value": "Daily" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsInterestPostingPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "accountingRule": { - "id": 1, - "code": "accountingRuleType.none", - "value": "NONE" - }, - "currencyOptions": [ - { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - ], - "interestCompoundingPeriodTypeOptions": [ - { - "id": 1, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", - "value": "Daily" - }, - { - "id": 2, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.weekly", - "value": "Weekly" - }, - { - "id": 3, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.biweekly", - "value": "Bi-Weekly" - }, - { - "id": 4, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", - "value": "Monthly" - }, - { - "id": 5, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.quarterly", - "value": "Quarterly" - }, - { - "id": 6, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.biannual", - "value": "Semi-Annual" - }, - { - "id": 7, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.annual", - "value": "Annually" - }, - { - "id": 8, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.nocompounding", - "value": "No Compounding - Simple Interest" - } - ], - "interestPostingPeriodTypeOptions": [ - { - "id": 4, - "code": "savings.interest.posting.period.savingsInterestPostingPeriodType.monthly", - "value": "Monthly" - }, - { - "id": 5, - "code": "savings.interest.posting.period.savingsInterestPostingPeriodType.quarterly", - "value": "Quarterly" - }, - { - "id": 6, - "code": "savings.interest.posting.period.savingsInterestPostingPeriodType.biannual", - "value": "Semi-Annual" - }, - { - "id": 7, - "code": "savings.interest.posting.period.savingsInterestPostingPeriodType.annual", - "value": "Annually" - } - ], - "interestCalculationTypeOptions": [ - { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - { - "id": 2, - "code": "savingsInterestCalculationType.averagedailybalance", - "value": "Average Daily Balance" - } - ], - "interestCalculationDaysInYearTypeOptions": [ - { - "id": 360, - "code": "savingsInterestCalculationDaysInYearType.days360", - "value": "360 Days" - }, - { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - } - ], - "lockinPeriodFrequencyTypeOptions": [ - { - "id": 0, - "code": "savings.lockin.savingsPeriodFrequencyType.days", - "value": "Days" - }, - { - "id": 1, - "code": "savings.lockin.savingsPeriodFrequencyType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "savings.lockin.savingsPeriodFrequencyType.months", - "value": "Months" - }, - { - "id": 3, - "code": "savings.lockin.savingsPeriodFrequencyType.years", - "value": "Years" - } - ], - "withdrawalFeeTypeOptions": [ - { - "id": 1, - "code": "savingsWithdrawalFeesType.flat", - "value": "Flat" - }, - { - "id": 2, - "code": "savingsWithdrawalFeesType.percent.of.amount", - "value": "% of Amount" - } - ], - "paymentTypeOptions": [ - { - "id": 14, - "name": "Wire Transfer", - "position": 0 - }, - { - "id": 13, - "name": "Cash", - "position": 1 - } - ], - "accountingRuleOptions": [ - { - "id": 1, - "code": "accountingRuleType.none", - "value": "NONE" - }, - { - "id": 2, - "code": "accountingRuleType.cash", - "value": "CASH BASED" - }, - { - "id": 3, - "code": "accountingRuleType.accrual", - "value": "ACCRUAL BASED" - } - ], - "accountingMappingOptions": { - "liabilityAccountOptions": [ - { - "id": 15, - "name": "Savings Control", - "glCode": "50001", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 2, - "code": "accountType.liability", - "value": "LIABILITY" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "Savings Control", - "tagId": { - "id": 0 - } - } - ], - "assetAccountOptions": [ - { - "id": 2, - "name": "Cash", - "glCode": "100001", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "tagId": {} - }, - { - "id": 16, - "name": "Savings Reference", - "glCode": "100007", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "Savings Reference", - "tagId": { - "id": 0 - } - }, - { - "id": 12, - "name": "HDFC Rajajinagar", - "glCode": "100015", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "tagId": {} - }, - { - "id": 1, - "name": "Loan Portfolio", - "glCode": "10003", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "tagId": {} - }, - { - "id": 7, - "name": "Interest Receivable", - "glCode": "10005", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "tagId": {} - }, - { - "id": 8, - "name": "Penalties Receivable", - "glCode": "10008", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "tagId": {} - }, - { - "id": 9, - "name": "Fee Receivable", - "glCode": "10009", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "tagId": {} - } - ], - "expenseAccountOptions": [ - { - "id": 6, - "name": "Write Off Expenses", - "glCode": "60001", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 5, - "code": "accountType.expense", - "value": "EXPENSE" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "tagId": {} - }, - { - "id": 13, - "name": "Employee Salary", - "glCode": "60002", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 5, - "code": "accountType.expense", - "value": "EXPENSE" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "tagId": {} - }, - { - "id": 18, - "name": "Interest On Savings", - "glCode": "60003", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 5, - "code": "accountType.expense", - "value": "EXPENSE" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "Interest On Savings", - "tagId": { - "id": 0 - } - } - ], - "incomeAccountOptions": [ - { - "id": 3, - "name": "Income from Interest", - "glCode": "40001", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 4, - "code": "accountType.income", - "value": "INCOME" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "tagId": {} - }, - { - "id": 4, - "name": "Income from Fees", - "glCode": "40002", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 4, - "code": "accountType.income", - "value": "INCOME" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "tagId": {} - }, - { - "id": 5, - "name": "Income from Penalties", - "glCode": "40004", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 4, - "code": "accountType.income", - "value": "INCOME" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "tagId": {} - } - ] - }, - "chargeOptions" : [ { "active" : true, - "amount" : 200, - "chargeAppliesTo" : { "code" : "chargeAppliesTo.savings", - "id" : 2, - "value" : "Savings" - }, - "chargeCalculationType" : { "code" : "chargeCalculationType.flat", - "id" : 1, - "value" : "Flat" - }, - "chargePaymentMode" : { "code" : "chargepaymentmode.regular", - "id" : 0, - "value" : "chargepaymentmode.regular" - }, - "chargeTimeType" : { "code" : "chargeTimeType.specifiedDueDate", - "id" : 2, - "value" : "Specified due date" - }, - "currency" : { "code" : "USD", - "decimalPlaces" : 2, - "displayLabel" : "US Dollar ($)", - "displaySymbol" : "$", - "name" : "US Dollar", - "nameCode" : "currency.USD" - }, - "id" : 4, - "name" : "Savings charge 1", - "penalty" : false - }, - { "active" : true, - "amount" : 300, - "chargeAppliesTo" : { "code" : "chargeAppliesTo.savings", - "id" : 2, - "value" : "Savings" - }, - "chargeCalculationType" : { "code" : "chargeCalculationType.flat", - "id" : 1, - "value" : "Flat" - }, - "chargePaymentMode" : { "code" : "chargepaymentmode.regular", - "id" : 0, - "value" : "chargepaymentmode.regular" - }, - "chargeTimeType" : { "code" : "chargeTimeType.specifiedDueDate", - "id" : 2, - "value" : "Specified due date" - }, - "currency" : { "code" : "USD", - "decimalPlaces" : 2, - "displayLabel" : "US Dollar ($)", - "displaySymbol" : "$", - "name" : "US Dollar", - "nameCode" : "currency.USD" - }, - "id" : 5, - "name" : "Savings charge 2", - "penalty" : false - } - ] -} - -
-
- -   -
-
-

Entity-Datatable Checks

-

This defines Entity-Datatable Check.

- - - - - - - - - - - - - - - -
Field Descriptions
entity
The entity to which the Entity-Datatable Check to be attached.
status
The action to be attached to an Entity-Datatable Check.
datatableName
Name of the datatable on which the Entity-Datatable Check to be imposed.
productId
Optional: The product to be associated with an entity.
-
-
- -   -
-
-

Create Entity-Datatable Checks

- - - - - -
Mandatory Fields
entity, status, datatableName
-
- - - - - -
Non-Mandatory Fields
productId
-
- -
- POST https://Domain Name/api/v1/entityDatatableChecks - POST entitydatatablechecks -Content-Type: application/json -Request Body: -{ -"entity": "m_loan", -"status": 100, -"datatableName": "Additional Details", -"productId": 1 -} - - - -{ -"resourceId": 1 -} - - -
-
- -   -
-
-

List Entity-Datatable Checks

-

The list capability of Entity-Datatable Checks can support pagination.

-
Optional Arguments
-
-
offset
-
- Integer optional, defaults to 0 -
-
Indicates the result from which pagination starts
- -
limit
-
- Integer optional, defaults to 200 -
-
Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
-
-

Example Request:

-
entityDatatableChecks?offset=0&limit=15
-
-
- GET https://DomainName/api/v1/entityDatatableChecks?offset=0&limit=15 - - -{ -"totalFilteredRecords": 15, -"pageItems": [{ -"id": 45, -"entity": "m_client", -"status": { -"id": 100, -"code": "CREATE", -"value": "CREATE" -}, -"datatableName": "Client Personal Details", -"systemDefined": false, -"order": 45 -}, -{ -"id": 48, -"entity": "m_group", -"status": { -"id": 100, -"code": "CREATE", -"value": "CREATE" -}, -"datatableName": "Group Activation Details", -"systemDefined": false, -"order": 48 -}, ...] -} - -
-
- -   -
-
-

Retrieve Entity-Datatable Checks Template

-

This is a convenience resource useful for - building maintenance user interface screens for Entity-Datatable Checks - applications. The template data returned consists of: -

    -
  • Allowed Value Lists
  • -
-

-

Example Request:

-
entityDatatableChecks/template
-
-
- GET https://DomainName/api/v1/entityDatatableChecks/template - - -{ -"entities": ["m_client", -"m_loan", -"m_group", -"m_savings_account"], -"statusClient": [{ -"name": "CREATE", -"code": 100 -}, -{ -"name": "ACTIVATE", -"code": 300 -}, -{ -"name": "CLOSE", -"code": 600 -}], -"statusGroup": [{ -"name": "CREATE", -"code": 100 -}, -{ -"name": "ACTIVATE", -"code": 300 -}, -{ -"name": "CLOSE", -"code": 600 -}], -"statusSavings": [{ -"name": "CREATE", -"code": 100 -}, -{ -"name": "APPROVE", -"code": 200 -}, -{ -"name": "ACTIVATE", -"code": 300 -}, -{ -"name": "WITHDRAWN", -"code": 400 -}, -{ -"name": "REJECTED", -"code": 500 -}, -{ -"name": "CLOSE", -"code": 600 -}], -"statusLoans": [{ -"name": "CREATE", -"code": 100 -}, -{ -"name": "APPROVE", -"code": 200 -}, -{ -"name": "ACTIVATE", -"code": 300 -}, -{ -"name": "WITHDRAWN", -"code": 400 -}, -{ -"name": "REJECTED", -"code": 500 -}, -{ -"name": "WRITE_OFF", -"code": 601 -}], -"datatables": [{ -"entity": "m_group", -"dataTableName": "Address Details" -}, -{ -"entity": "m_client", -"dataTableName": "CACT" -}, -{ -"entity": "m_client", -"dataTableName": "Family_Details" -}], -"loanProductDatas": [{ -"id": 1, -"name": "Sakhi Shakthi", -"includeInBorrowerCycle": false, -"useBorrowerCycle": false, -"isLinkedToFloatingInterestRates": false, -"isFloatingInterestRateCalculationAllowed": false, -"allowVariableInstallments": false, -"isInterestRecalculationEnabled": false, -"canDefineInstallmentAmount": false, -"principalVariationsForBorrowerCycle": [], -"interestRateVariationsForBorrowerCycle": [], -"numberOfRepaymentVariationsForBorrowerCycle": [], -"canUseForTopup": false, -"holdGuaranteeFunds": false, -"accountMovesOutOfNPAOnlyOnArrearsCompletion": false, -"syncExpectedWithDisbursementDate": false -}, -{ -"id": 2, -"name": "MEL One", -"includeInBorrowerCycle": false, -"useBorrowerCycle": false, -"isLinkedToFloatingInterestRates": false, -"isFloatingInterestRateCalculationAllowed": false, -"allowVariableInstallments": false, -"isInterestRecalculationEnabled": false, -"canDefineInstallmentAmount": false, -"principalVariationsForBorrowerCycle": [], -"interestRateVariationsForBorrowerCycle": [], -"numberOfRepaymentVariationsForBorrowerCycle": [], -"canUseForTopup": false, -"holdGuaranteeFunds": false, -"accountMovesOutOfNPAOnlyOnArrearsCompletion": false, -"syncExpectedWithDisbursementDate": false -}], -"savingsProductDatas": [{ -"id": 1, -"name": "Deposit Account", -"withdrawalFeeForTransfers": false, -"allowOverdraft": false, -"enforceMinRequiredBalance": false, -"withHoldTax": false -}, -{ -"id": 2, -"name": "Savings Account One", -"withdrawalFeeForTransfers": false, -"allowOverdraft": false, -"enforceMinRequiredBalance": false, -"withHoldTax": false -}] -} - -
-
- -   -
-
-

Delete Entity-Datatable Checks

-

- Deletes an existing Entity-Datatable Check -

-
- -
- DELETE https://Domain Name/api/v1/entityDatatableChecks/{entityDatatableCheckId} - -{ -"resourceId": 1 -} - -
-
- -   -
-
-

Create a SMS Campaign

- - - - - -
Mandatory Fields
campaignName, campaignType, triggerType, providerId, runReportId, message
-
- - - - - -
Mandatory Fields for Cash based on selected report id
paramValue in json format
-
-
- - POST https://Domain Name/api/v1/smscampaigns - POST smscampaigns -Content-Type: application/json -Request Body: -{ -"campaignName": "Savings Deposit Campaign", -"campaignType": "SMS", -"triggerType": 3, -"providerId": 2, -"runReportId": 180, -"paramValue": "{"officeId":1,"loanOfficerId":-1,"transactionId":1,"reportName":"Savings Deposit"}", -"message": "Hello {fullName} your account is credited with {depositAmount} on {transactionDate}", -} - - - -{ - "resourceId": 1 -} - - -
-
- -  -
-
-

List SMS Campaigns

- - - - - -
Mandatory Fields
-

Example Requests:

-
smscampaigns
-
-
- - GET https://Domain Name/api/v1/smscampaigns - - -[{ - "id": 1, - "campaignName": "Savings Deposit Campaign" - "campaignType": "SMS", - "triggerType": 3, - "providerId": 2, - "runReportId": 180, - "reportName" : "Savings Deposit", - "paramValue": "{"officeId":1,"loanOfficerId":-1,"transactionId":1,"reportName":"Savings Deposit"}", - "message": "Hello {fullName} your account is credited with {depositAmount} on {transactionDate}", - "status" : { "id":"","code":"","value":""} - -}] - -
-
- -  -
-
-

Retrieve a SMS Campaign

-

Example Requests:

-
smscampaigns/1
-

-
smscampaigns/1?template=true
-

-
smscampaigns/template
-
- -
- GET https://Domain Name/api/v1/smscampaigns/1 - -{ - "id": 1, - "campaignName": "Savings Deposit Campaign" - "campaignType": "SMS", - "triggerType": 3, - "providerId": 2, - "runReportId": 180, - "reportName" : "Savings Deposit", - "paramValue": "{"officeId":1,"loanOfficerId":-1,"transactionId":1,"reportName":"Savings Deposit"}", - "message": "Hello {fullName} your account is credited with {depositAmount} on {transactionDate}", - "status" : { "id":"","code":"","value":""} -} -In case of Scheduled Campaign -{ - "id": 1, - "campaignName": "Savings Deposit Campaign" - "campaignType": "SMS", - "triggerType": 3, - "providerId": 2, - "runReportId": 180, - "reportName" : "Savings Deposit", - "paramValue": "{"officeId":1,"loanOfficerId":-1,"transactionId":1,"reportName":"Savings Deposit"}", - "message": "Hello {fullName} your account is credited with {depositAmount} on {transactionDate}", - "status" : { "id":"","code":"","value":""}, - "nextTriggerDate": "22 Jan 2017", - "lastTriggerDate": "22 Jan 2016", - "recurrenceStartDate":"22 Jan 2016", - "recurrence": "YEARLY" -} - - - smscampaigns/1?template=true - - { - "id": 1, - "campaignName": "Savings Deposit Campaign" - "campaignType": "SMS", - "triggerType": 3, - "providerId": 2, - "runReportId": 180, - "reportName" : "Savings Deposit", - "paramValue": "{"officeId":1,"loanOfficerId":-1,"transactionId":1,"reportName":"Savings Deposit"}", - "message": "Hello {fullName} your account is credited with {depositAmount} on {transactionDate}", - "status" : { "id":"","code":"","value":""} - - "smsProviderOptions": [{ - "id": 1, - "tenantId": "1", - "phoneNo": "+XXXXXXXXXX", - "providerName": "Twilio SMS Provider", - "providerDescription": "Twilio, just for testing" - }], - "businessRulesOptions": [ - { - "reportId": 166, - "reportName": "Active Clients", - "reportType": "SMS", - "reportSubType": "NonTriggered", - "reportDescription": "All clients with the status ‘Active’", - "reportParamName": { - "Office": "OfficeIdSelectOne", - "Loan Officer": "loanOfficerIdSelectAll" - } - } - ], - "triggerTypeOptions": [ - {"id": 1,"code": "triggerType.direct", "value": "Direct"}, - {"id": 2, "code": "triggerType.schedule","value": "Scheduled"}, - {"id": 3,"code": "triggerType.triggered","value": "Triggered"} - ], - "months": [ - { "id": 1, "code": "JANUARY", "value": "JANUARY" }, - { "id": 2, "code": "FEBRUARY", "value": "FEBRUARY" }, - { "id": 3, "code": "MARCH", "value": "MARCH" }, - { "id": 4, "code": "APRIL", "value": "APRIL" }, - { "id": 5, "code": "MAY", "value": "MAY" }, - { "id": 6, "code": "JUNE", "value": "JUNE" }, - { "id": 7, "code": "JULY", "value": "JULY" }, - { "id": 8, "code": "AUGUST", "value": "AUGUST" }, - { "id": 9, "code": "SEPTEMBER", "value": "SEPTEMBER"}, - { "id": 10, "code": "OCTOBER", "value": "OCTOBER"}, - { "id": 11, "code": "NOVEMBER", "value": "NOVEMBER" } - ], - "weekDays": [ - { "id": 1, "code": "calendarWeekDaysType.monday", "value": "MO" }, - { "id": 2, "code": "calendarWeekDaysType.tuesday", "value": "TU" }, - { "id": 3, "code": "calendarWeekDaysType.wednesday", "value": "WE" }, - { "id": 4, "code": "calendarWeekDaysType.thursday", "value": "TH"}, - { "id": 5, "code": "calendarWeekDaysType.friday", "value": "FR" }, - { "id": 6, "code": "calendarWeekDaysType.saturday", "value": "SA" }, - { "id": 7, "code": "calendarWeekDaysType.sunday", "value": "SU" } - ], - "frequencyTypeOptions": [ - { "id": 1, "code": "calendarFrequencyType.daily", "value": "DAILY" }, - { "id": 2, "code": "calendarFrequencyType.weekly", "value": "WEEKLY"}, - { "id": 3, "code": "calendarFrequencyType.monthly", "value": "MONTHLY"}, - { "id": 4, "code": "calendarFrequencyType.yearly", "value": "YEARLY" } - ], - "periodFrequencyOptions": [ - { "id": 0, "code": "periodFrequencyType.days", "value": "DAYS" }, - { "id": 1, "code": "periodFrequencyType.weeks", "value": "WEEKS" }, - { "id": 2, "code": "periodFrequencyType.months", "value": "MONTHS" }, - { "id": 3, "code": "periodFrequencyType.years", "value": "YEARS" } - ] -} - -smscampaigns/template - - { - "smsProviderOptions": [{ - "id": 1, - "tenantId": "1", - "phoneNo": "+XXXXXXXXXX", - "providerName": "Twilio SMS Provider", - "providerDescription": "Twilio, just for testing" - }], - "businessRulesOptions": [ - { - "reportId": 166, - "reportName": "Active Clients", - "reportType": "SMS", - "reportSubType": "NonTriggered", - "reportDescription": "All clients with the status ‘Active’", - "reportParamName": { - "Office": "OfficeIdSelectOne", - "Loan Officer": "loanOfficerIdSelectAll" - } - } - ], - "triggerTypeOptions": [ - {"id": 1,"code": "triggerType.direct", "value": "Direct"}, - {"id": 2, "code": "triggerType.schedule","value": "Scheduled"}, - {"id": 3,"code": "triggerType.triggered","value": "Triggered"} - ], - "months": [ - { "id": 1, "code": "JANUARY", "value": "JANUARY" }, - { "id": 2, "code": "FEBRUARY", "value": "FEBRUARY" }, - { "id": 3, "code": "MARCH", "value": "MARCH" }, - { "id": 4, "code": "APRIL", "value": "APRIL" }, - { "id": 5, "code": "MAY", "value": "MAY" }, - { "id": 6, "code": "JUNE", "value": "JUNE" }, - { "id": 7, "code": "JULY", "value": "JULY" }, - { "id": 8, "code": "AUGUST", "value": "AUGUST" }, - { "id": 9, "code": "SEPTEMBER", "value": "SEPTEMBER"}, - { "id": 10, "code": "OCTOBER", "value": "OCTOBER"}, - { "id": 11, "code": "NOVEMBER", "value": "NOVEMBER" } - ], - "weekDays": [ - { "id": 1, "code": "calendarWeekDaysType.monday", "value": "MO" }, - { "id": 2, "code": "calendarWeekDaysType.tuesday", "value": "TU" }, - { "id": 3, "code": "calendarWeekDaysType.wednesday", "value": "WE" }, - { "id": 4, "code": "calendarWeekDaysType.thursday", "value": "TH"}, - { "id": 5, "code": "calendarWeekDaysType.friday", "value": "FR" }, - { "id": 6, "code": "calendarWeekDaysType.saturday", "value": "SA" }, - { "id": 7, "code": "calendarWeekDaysType.sunday", "value": "SU" } - ], - "frequencyTypeOptions": [ - { "id": 1, "code": "calendarFrequencyType.daily", "value": "DAILY" }, - { "id": 2, "code": "calendarFrequencyType.weekly", "value": "WEEKLY"}, - { "id": 3, "code": "calendarFrequencyType.monthly", "value": "MONTHLY"}, - { "id": 4, "code": "calendarFrequencyType.yearly", "value": "YEARLY" } - ], - "periodFrequencyOptions": [ - { "id": 0, "code": "periodFrequencyType.days", "value": "DAYS" }, - { "id": 1, "code": "periodFrequencyType.weeks", "value": "WEEKS" }, - { "id": 2, "code": "periodFrequencyType.months", "value": "MONTHS" }, - { "id": 3, "code": "periodFrequencyType.years", "value": "YEARS" } - ] -} - - - - +

+
Arguments
+
+
templateType
+
+ String mandatory, allowed values are individual, group, jlg, jlgbulk +
+
+
templateType value decides the required template data for creating a new loan application. + +
+
+
'individual': Loan template data for creating individual loans. +
+
+ 'group': Loan template data for creating a group loan (loan given to group as a whole). +
+
+ 'jlg': Loan template data for creating a Joint liability group loan for a client. +
+
+ 'jlgbulk': Loan template data for creating a Joint liability group loan for multiple + clients at a time in a group. +
+
clientId
+
+ Integer mandatory +
+
+
Optional Arguments
+
+
productId
+
+ Integer optional +
+
If entered, productId, productName and selectedProduct + fields are returned. +
+ +
staffInSelectedOfficeOnly
+
+ Boolean optional +
+
Defaults to false if not provided. If staffInSelectedOfficeOnly=true only loan + officers + who are associated with the selected branch are returned. +
+
activeOnly
+
+ Boolean optional +
+
Defaults to false if not provided. If activeOnly=true only active loan products + are returned. +
+
+

Example Requests:

+
loans/template?templateType=individual&clientId=1
+
+
+
loans/template?templateType=individual&clientId=1&productId=1
+
+
+ + GET https://DomainName/api/v1/loans/template?templateType=individual&clientId=1 + + + { + "clientId": 1, + "clientName": "Kampala first Client", + "clientOfficeId": 2, + "timeline": { + "expectedDisbursementDate": [ + 2013, + 3, + 8 + ] + }, + "productOptions": [ + { + "id": 1, + "name": "Kampala Product (with cash accounting)" + } + ] + } + + + GET https://DomainName/api/v1/loans/template?templateType=individual&clientId=1&productId=1 + + + { + "clientId": 1, + "clientName": "Kampala first Client", + "clientOfficeId": 2, + "loanProductId": 1, + "loanProductName": "Kampala Product (with cash accounting)", + "loanProductDescription": "Typical Kampala loan product with cash accounting enabled for testing.", + "currency": { + "code": "UGX", + "name": "Uganda Shilling", + "decimalPlaces": 2, + "displaySymbol": "USh", + "nameCode": "currency.UGX", + "displayLabel": "Uganda Shilling (USh)" + }, + "principal": 1000000, + "termFrequency": 12, + "termPeriodFrequencyType": { + "id": 2, + "code": "repaymentFrequency.periodFrequencyType.months", + "value": "Months" + }, + "numberOfRepayments": 12, + "repaymentEvery": 1, + "repaymentFrequencyType": { + "id": 2, + "code": "repaymentFrequency.periodFrequencyType.months", + "value": "Months" + }, + "interestRatePerPeriod": 24, + "interestRateFrequencyType": { + "id": 3, + "code": "interestRateFrequency.periodFrequencyType.years", + "value": "Per year" + }, + "annualInterestRate": 24, + "amortizationType": { + "id": 1, + "code": "amortizationType.equal.installments", + "value": "Equal installments" + }, + "interestType": { + "id": 1, + "code": "interestType.flat", + "value": "Flat" + }, + "interestCalculationPeriodType": { + "id": 1, + "code": "interestCalculationPeriodType.same.as.repayment.period", + "value": "Same as repayment period" + }, + "transactionProcessingStrategyCode": "mifos-standard-strategy", + "timeline": { + "expectedDisbursementDate": [ + 2013, + 3, + 8 + ] + }, + "daysInMonthType": { + "id": 30, + "code": "DaysInMonthType.days360", + "value": "30 Days" + }, + "daysInYearType": { + "id": 360, + "code": "DaysInYearType.days360", + "value": "360 Days" + }, + "isInterestRecalculationEnabled": true, + "interestRecalculationData": { + "interestRecalculationCompoundingType": { + "id": 2, + "code": "interestRecalculationCompoundingMethod.fee", + "value": "Fee" + }, + "recalculationCompoundingFrequencyType": { + "id":1, + "code":"interestRecalculationFrequencyType.same.as.repayment.period", + "value":"Same as repayment period" + }, + "rescheduleStrategyType": { + "id": 2, + "code": "loanRescheduleStrategyMethod.reduce.number.of.installments", + "value": "Reduce number of installments" + }, + "recalculationRestFrequencyType": { + "id":1, + "code":"interestRecalculationFrequencyType.same.as.repayment.period", + "value":"Same as repayment period" + } + } + "charges": [], + "productOptions": [ + { + "id": 1, + "name": "Kampala Product (with cash accounting)" + } + ], + "loanOfficerOptions": [ + { + "id": 2, + "firstname": "Kampala", + "lastname": "LoanOfficer", + "displayName": "LoanOfficer, Kampala", + "officeId": 2, + "officeName": "Uganda (Kampala)", + "isLoanOfficer": true + } + ], + "loanPurposeOptions": [ + { + "id": 20, + "name": "option.Agriculture", + "position": 1 + }, + { + "id": 21, + "name": "option.Manufacturing", + "position": 20 + }, + { + "id": 22, + "name": "option.HousingImprovement", + "position": 21 + } + ], + "termFrequencyTypeOptions": [ + { + "id": 0, + "code": "loanTermFrequency.periodFrequencyType.days", + "value": "Days" + }, + { + "id": 1, + "code": "loanTermFrequency.periodFrequencyType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "loanTermFrequency.periodFrequencyType.months", + "value": "Months" + }, + { + "id": 3, + "code": "loanTermFrequency.periodFrequencyType.years", + "value": "Years" + } + ], + "repaymentFrequencyTypeOptions": [ + { + "id": 0, + "code": "repaymentFrequency.periodFrequencyType.days", + "value": "Days" + }, + { + "id": 1, + "code": "repaymentFrequency.periodFrequencyType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "repaymentFrequency.periodFrequencyType.months", + "value": "Months" + } + ], + "interestRateFrequencyTypeOptions": [ + { + "id": 2, + "code": "interestRateFrequency.periodFrequencyType.months", + "value": "Per month" + }, + { + "id": 3, + "code": "interestRateFrequency.periodFrequencyType.years", + "value": "Per year" + } + ], + "amortizationTypeOptions": [ + { + "id": 1, + "code": "amortizationType.equal.installments", + "value": "Equal installments" + }, + { + "id": 0, + "code": "amortizationType.equal.principal", + "value": "Equal principle payments" + } + ], + "interestTypeOptions": [ + { + "id": 1, + "code": "interestType.flat", + "value": "Flat" + }, + { + "id": 0, + "code": "interestType.declining.balance", + "value": "Declining Balance" + } + ], + "interestCalculationPeriodTypeOptions": [ + { + "id": 0, + "code": "interestCalculationPeriodType.daily", + "value": "Daily" + }, + { + "id": 1, + "code": "interestCalculationPeriodType.same.as.repayment.period", + "value": "Same as repayment period" + } + ], + "transactionProcessingStrategyOptions": [ + { + "id": 2, + "code": "heavensfamily-strategy", + "name": "Heavensfamily" + } + ], + "chargeOptions": [ + { + "id": 1, + "name": "Bank Fee (per installment)", + "active": true, + "penalty": false, + "currency": { + "code": "UGX", + "name": "Uganda Shilling", + "decimalPlaces": 2, + "displaySymbol": "USh", + "nameCode": "currency.UGX", + "displayLabel": "Uganda Shilling (USh)" + }, + "amount": 1500, + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + } + } + ], + "loanCollateralOptions": [ + { + "id": 17, + "name": "option.House", + "position": 1 + }, + { + "id": 18, + "name": "option.Television", + "position": 17 + }, + { + "id": 19, + "name": "option.Gold", + "position": 18 + } + ], + "accountLinkingOptions":[ + { + "id":1, + "accountNo":"000000001", + "clientId":1, + "clientName":"pramod nuthakki", + "productId":1, + "productName":"pramod sav", + "fieldOfficerId":0, + "currency":{"code":"USD","name":"US + Dollar","decimalPlaces":2,"displaySymbol":"$","nameCode":"currency.USD","displayLabel":"US Dollar + ($)"} + } + ], + "datatables": [{ + "applicationTableName": "m_loan", + "registeredTableName": "loan_balance", + "columnHeaderData": [{ + "columnName": "loan_id", + "columnType": "bigint", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": false, + "isColumnPrimaryKey": true, + "columnValues": [] + }, + { + "columnName": "account_number", + "columnType": "varchar", + "columnLength": 25, + "columnDisplayType": "STRING", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "Balance", + "columnType": "decimal", + "columnLength": 0, + "columnDisplayType": "DECIMAL", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [] + }] + }, + { + "applicationTableName": "m_loan", + "registeredTableName": "Loan Enrichment", + "columnHeaderData": [{ + "columnName": "loan_id", + "columnType": "bigint", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": false, + "isColumnPrimaryKey": true, + "columnValues": [] + }, + { + "columnName": "Activation Date", + "columnType": "date", + "columnLength": 0, + "columnDisplayType": "DATE", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] + }] + }] + } + +
-
-  -
-
-

Update a Campaign

-
-
- PUT https://Domain Name/api/v1/smscampaigns/{campaignId} - POST smscampaigns/1 -Content-Type: application/json -Request Body: -{ - "message": "Hello your savings account {savingsAccountNo} debited with {withdrawAmount}" - -} - - -{ - "resourceId": 1, - "changes": { - "message": "Hello your savings account {savingsAccountNo} debited with {withdrawAmount}" - } -} - -
-
- -  -
-
-

Delete a SMS Campaign

-

- Note: Only closed SMS Campaigns can be - deleted -

+   +
+
+

Retrieve a Loan

+

+ Note: template=true parameter doesn't apply to this resource. +

+
Arguments
+
+
associations
+
+ optional, Either 'all' or a comma separated list of + loan 'associations' (itemised below). +
+
exclude
+
+ optional, 'all' and a comma separated list of + loan associations (itemised below) as 'exclude'. +
+
+
Associations are just extra pieces of data that you + might or might not want to retrieve.
+
+
+
+ 'all': Gets all association data. +
+
+ 'repaymentSchedule': Loan schedule data. +
+
+ 'originalSchedule': Loan schedule data without interest recalculations. +
+
+ 'futureSchedule': Loan schedule data from today date(will be displayed only for interest + first repayment strategy processors) +
+
+ 'transactions': Loan transactions data. +
+
+ 'charges': Loan charges data. +
+
+ 'guarantors': Loan guarantors data. +
+
+ 'collateral': Loan collateral data. +
+
+

Example Requests:

+
loans/1
+
+
+
loans/1?fields=id,principal,annualInterestRate
+
+
+
loans/1?associations=all
+
+
loans/1?associations=all&exclude=guarantors
+
+
+
+ loans/1?fields=id,principal,annualInterestRate&associations=repaymentSchedule,transactions
-
- -DELETE https://DomainName/api/v1/smscampaigns/{campaignId} - - -DELETE smscampaigns/1 -Content-Type: application/json -No Request Body: - - -{ - "resourceId": 1, - "changes": {} -} - -
-
- -  -
-
-

Activates SMS Campaign

- -
-
- POST https://Domain Name/api/v1/smscampaigns/{campaignId}?command=activate - POST smscampaigns/1?command=activate -Content-Type: application/json -Request Body: -{ -"activationDate":"01 May 2016", -"locale":"en", -"dateFormat":"dd MMMM yyyy" -} - - -{ - - "resourceId": 1, - "changes": { - "status": { - "id": 300, - "code": "smsCampaignStatus.active", - "value": "active", - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "activationDate": "01 May 2016" - } -} - -
-
- -  -
-
-

Deactivates SMS Campaign

- -
-
- POST https://Domain Name/api/v1/smscampaigns/{campaignId}?command=close - POST smscampaigns/1?command=close -Content-Type: application/json -Request Body: -{ -"closureDate":"01 May 2016", -"locale":"en", -"dateFormat":"dd MMMM yyyy" -} - - -{ - "resourceId": 1, - "changes": { - "status": { - "id": 600, - "code": "smsCampaignStatus.closed", - "value": "closed", - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "closureDate": "01 May 2016" - } -} - -
-
- -  -
-
-

Reactivates SMS Campaign

- -
-
- POST https://Domain Name/api/v1/smscampaigns/{campaignId}?command=reactivate - POST smscampaigns/1?command=reactivate -Content-Type: application/json -Request Body: -{ -"activationDate":"01 May 2016", -"locale":"en", -"dateFormat":"dd MMMM yyyy" -} - - -{ - - "resourceId": 1, - "changes": { - "status": { - "id": 300, - "code": "smsCampaignStatus.active", - "value": "active", - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "activationDate": "01 May 2016" - } -} - -
-
- -  -
-
-

Create a Share Product

- - - - - -
Mandatory Fields
name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, locale, - totalShares, unitPrice, nominalShares,allowDividendCalculationForInactiveClients,accountingRule
-
- - - - - -
Mandatory Fields for Cash based accounting (accountingRule = 2)
shareReferenceId, shareSuspenseId, shareEquityId, incomeFromFeeAccountId
-
- - - -
Optional Fields
sharesIssued, minimumShares, maximumShares, minimumActivePeriodForDividends, minimumactiveperiodFrequencyType, - lockinPeriodFrequency, lockinPeriodFrequencyType, marketPricePeriods, chargesSelected
-
-
- - POST https://Domain Name/api/v1/products/share - POST shareproducts -Content-Type: application/json -Request Body: -{ -"name": "Share Product", -"shortName": "SP", -"description": "Description", -"currencyCode": "USD", -"digitsAfterDecimal": 2, -"inMultiplesOf": "1", -"locale": "en", -"totalShares": "1000", -"sharesIssued": "1000", -"unitPrice": "1", -"minimumShares": "10", -"nominalShares": "20", -"maximumShares": "30", -"minimumActivePeriodForDividends": "1", -"minimumactiveperiodFrequencyType": 0, -"lockinPeriodFrequency": "1", -"lockinPeriodFrequencyType": 1, -"allowDividendCalculationForInactiveClients": "true", -"marketPricePeriods": [{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "fromDate": "04 May 2016", - "shareValue": "2" -}], -"chargesSelected": [{ - "id": 20 -}], -"accountingRule": "1" -} - - - -{ - "resourceId": 1 -} - - POST shareproducts -Content-Type: application/json -Request Body: -{ -"name": "Share Product", -"shortName": "SP", -"description": "Description", -"currencyCode": "USD", -"digitsAfterDecimal": 2, -"inMultiplesOf": "1", -"locale": "en", -"totalShares": "100000", -"sharesIssued": "100000", -"unitPrice": "1", -"minimumShares": "1000", -"nominalShares": "2000", -"maximumShares": "5000", -"minimumActivePeriodForDividends": "1", -"minimumactiveperiodFrequencyType": 0, -"lockinPeriodFrequency": "1", -"lockinPeriodFrequencyType": 1, -"allowDividendCalculationForInactiveClients": "true", -"marketPricePeriods": [{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "fromDate": "04 May 2016", - "shareValue": "2" -}], -"chargesSelected": [{ - "id": 20 -}], -"accountingRule": "2", -"shareReferenceId": 5, -"shareSuspenseId": 8, -"shareEquityId": 66, -"incomeFromFeeAccountId": 2 -} - - -{ - "resourceId": 1 -} - -
-
- -  -
-
-

Retrieve a Share Product

-

Example Requests:

-
products/share/1
-

-
products/share/1?template=true
-
-
- GET https://Domain Name/api/v1/products/share/1 - -{ - "id": 1, - "name": "Share Product", - "shortName": "SP", - "description": "SP", - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 100, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "totalShares": 100, - "totalSharesIssued": 50, - "unitPrice": 1.00, - "shareCapital": 50.00, - "minimumShares": 1, - "nominalShares": 10, - "maximumShares": 50, - "marketPrice": [ - { - "id": 4, - "fromDate": "Feb 1, 2016", - "shareValue": 1.00 - }, - { - "id": 5, - "fromDate": "May 3, 2016", - "shareValue": 5.00 - }], - "charges": [{ - "id": 20, - "name": "Share Account Activation Flat", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 1.000000, - "chargeTimeType": { - "id": 13, - "code": "chargeTimeType.activation", - "value": "Share Account Activate" - }, - "chargeAppliesTo": { - "id": 4, - "code": "chargeAppliesTo.shares", - "value": "Shares" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - }], - "allowDividendCalculationForInactiveClients": true, - "lockinPeriod": 1, - "lockPeriodTypeEnum": { - "id": 0, - "value": "Days" - }, - "minimumActivePeriod": 1, - "minimumActivePeriodForDividendsTypeEnum": { - "id": 0, - "value": "Days" - }, - "accountingRule": { - "id": 2, - "code": "accountingRuleType.cash", - "value": "CASH BASED" - }, - "accountingMappings": { - "shareReferenceId": { - "id": 1, - "name": "ACCOUNT_NAME_1FJBQ", - "glCode": "ASSET_ED1461237837829" - }, - "incomeFromFeeAccountId": { - "id": 14, - "name": "ACCOUNT_NAME_1FJBQ", - "glCode": "INCOME_OY1461237869836" - }, - "shareEquityId": { - "id": 66, - "name": "Equity Account", - "glCode": "EQUITY1" - }, - "shareSuspenseId": { - "id": 8, - "name": "ACCOUNT_NAME_1FJBQ", - "glCode": "LIABILITY_MA1461237860198" - } - }, - "currencyOptions": [{ - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }], - "chargeOptions": [{ - "id": 20, - "name": "Share Account Activation Flat", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 1.000000, - "chargeTimeType": { - "id": 13, - "code": "chargeTimeType.activation", - "value": "Share Account Activate" - }, - "chargeAppliesTo": { - "id": 4, - "code": "chargeAppliesTo.shares", - "value": "Shares" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - }, - { - "id": 21, - "name": "Share Purchase %", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 0.500000, - "chargeTimeType": { - "id": 14, - "code": "chargeTimeType.sharespurchase", - "value": "Share Purchase" - }, - "chargeAppliesTo": { - "id": 4, - "code": "chargeAppliesTo.shares", - "value": "Shares" - }, - "chargeCalculationType": { - "id": 2, - "code": "chargeCalculationType.percent.of.amount", - "value": "% Amount" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - } - ], - "minimumActivePeriodFrequencyTypeOptions": [{ - "id": 0, - "code": "savings.lockin.sharePeriodFrequencyType.days", - "value": "Days" - }], - "lockinPeriodFrequencyTypeOptions": [{ - "id": 0, - "code": "savings.lockin.sharePeriodFrequencyType.days", - "value": "Days" - }, - { - "id": 1, - "code": "savings.lockin.sharePeriodFrequencyType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "savings.lockin.sharePeriodFrequencyType.months", - "value": "Months" - }, - { - "id": 3, - "code": "savings.lockin.sharePeriodFrequencyType.years", - "value": "Years" - }], - "accountingMappingOptions": { - "liabilityAccountOptions": [{ - "id": 4, - "name": "ACCOUNT_NAME_1FJBQ", - "glCode": "LIABILITY_2T1461237838897", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 2, - "code": "accountType.liability", - "value": "LIABILITY" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "description": "DEFAULT_DESCRIPTION", - "nameDecorated": "ACCOUNT_NAME_1FJBQ", - "tagId": { - "id": 0, - "isActive": false - } - }], - "assetAccountOptions": [{ - "id": 1, - "name": "ACCOUNT_NAME_1FJBQ", - "glCode": "ASSET_ED1461237837829", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "description": "DEFAULT_DESCRIPTION", - "nameDecorated": "ACCOUNT_NAME_1FJBQ", - "tagId": { - "id": 0, - "isActive": false - } - }], - "incomeAccountOptions": [{ - "id": 2, - "name": "ACCOUNT_NAME_1FJBQ", - "glCode": "INCOME_9O1461237838422", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 4, - "code": "accountType.income", - "value": "INCOME" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "description": "DEFAULT_DESCRIPTION", - "nameDecorated": "ACCOUNT_NAME_1FJBQ", - "tagId": { - "id": 0, - "isActive": false - } - }], - "equityAccountOptions": [{ - "id": 66, - "name": "Equity Account", - "glCode": "EQUITY1", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 3, - "code": "accountType.equity", - "value": "EQUITY" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "Equity Account", - "tagId": { - "id": 0, - "isActive": false - } - }] - } -} - +
+
+ + GET https://DomainName/api/v1/loans/{loanId} + + + { + "id": 1, + "accountNo": "000000001", + "status": { + "id": 300, + "code": "loanStatusType.active", + "value": "Active", + "pendingApproval": false, + "waitingForDisbursal": false, + "active": true, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "clientId": 1, + "clientName": "Kampala first Client", + "clientOfficeId": 2, + "loanProductId": 1, + "loanProductName": "Kampala Product (with cash accounting)", + "loanProductDescription": "Typical Kampala loan product with cash accounting enabled for testing.", + "loanPurposeId": 22, + "loanPurposeName": "option.HousingImprovement", + "loanOfficerId": 2, + "loanOfficerName": "LoanOfficer, Kampala", + "loanType": { + "id": 1, + "code": "loanType.individual", + "value": "Individual" + }, + "currency": { + "code": "UGX", + "name": "Uganda Shilling", + "decimalPlaces": 2, + "displaySymbol": "USh", + "nameCode": "currency.UGX", + "displayLabel": "Uganda Shilling (USh)" + }, + "principal": 1000000, + "termFrequency": 12, + "termPeriodFrequencyType": { + "id": 2, + "code": "termFrequency.periodFrequencyType.months", + "value": "Months" + }, + "numberOfRepayments": 12, + "repaymentEvery": 1, + "repaymentFrequencyType": { + "id": 2, + "code": "repaymentFrequency.periodFrequencyType.months", + "value": "Months" + }, + "interestRatePerPeriod": 24, + "interestRateFrequencyType": { + "id": 3, + "code": "interestRateFrequency.periodFrequencyType.years", + "value": "Per year" + }, + "annualInterestRate": 24, + "amortizationType": { + "id": 1, + "code": "amortizationType.equal.installments", + "value": "Equal installments" + }, + "interestType": { + "id": 1, + "code": "interestType.flat", + "value": "Flat" + }, + "interestCalculationPeriodType": { + "id": 1, + "code": "interestCalculationPeriodType.same.as.repayment.period", + "value": "Same as repayment period" + }, + "transactionProcessingStrategyCode": "mifos-standard-strategy", + "timeline": { + "submittedOnDate": [ + 2012, + 4, + 3 + ], + "submittedByUsername": "admin", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator", + "approvedOnDate": [ + 2012, + 4, + 3 + ], + "approvedByUsername": "admin", + "approvedByFirstname": "App", + "approvedByLastname": "Administrator", + "expectedDisbursementDate": [ + 2012, + 4, + 10 + ], + "actualDisbursementDate": [ + 2012, + 4, + 10 + ], + "disbursedByUsername": "admin", + "disbursedByFirstname": "App", + "disbursedByLastname": "Administrator", + "expectedMaturityDate": [ + 2013, + 4, + 10 + ] + }, + "summary": { + "currency": { + "code": "UGX", + "name": "Uganda Shilling", + "decimalPlaces": 2, + "displaySymbol": "USh", + "nameCode": "currency.UGX", + "displayLabel": "Uganda Shilling (USh)" + }, + "principalDisbursed": 1000000, + "principalPaid": 0, + "principalWrittenOff": 0, + "principalOutstanding": 1000000, + "principalOverdue": 833333.3, + "interestCharged": 240000, + "interestPaid": 0, + "interestWaived": 0, + "interestWrittenOff": 0, + "interestOutstanding": 240000, + "interestOverdue": 200000, + "feeChargesCharged": 18000, + "feeChargesDueAtDisbursementCharged": 0, + "feeChargesPaid": 0, + "feeChargesWaived": 0, + "feeChargesWrittenOff": 0, + "feeChargesOutstanding": 18000, + "feeChargesOverdue": 15000, + "penaltyChargesCharged": 0, + "penaltyChargesPaid": 0, + "penaltyChargesWaived": 0, + "penaltyChargesWrittenOff": 0, + "penaltyChargesOutstanding": 0, + "penaltyChargesOverdue": 0, + "totalExpectedRepayment": 1258000, + "totalRepayment": 0, + "totalExpectedCostOfLoan": 258000, + "totalCostOfLoan": 0, + "totalWaived": 0, + "totalWrittenOff": 0, + "totalOutstanding": 1258000, + "totalOverdue": 1048333.3, + "overdueSinceDate": [ + 2012, + 5, + 10 + ], + "linkedAccount":{ + "id":1, + "accountNo":"000000001" + }, + "disbursementDetails":[{"id":71,"expectedDisbursementDate":[2013,11,1],"principal":22000.000000,"approvedPrincipal":22000.000000}], + "fixedEmiAmount":1100.000000, + "maxOutstandingLoanBalance":35000, + "canDisburse":false, + "emiAmountVariations": [], + "inArrears": true, + "isNPA":false, + "overdueCharges": [ + { + "id": 20, + "name": "overdraft penality", + "active": true, + "penalty": true, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 3.000000, + "chargeTimeType": { + "id": 9, + "code": "chargeTimeType.overdueInstallment", + "value": "overdue fees" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + "chargeCalculationType": { + "id": 2, + "code": "chargeCalculationType.percent.of.amount", + "value": "% Amount" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + }, + "feeInterval": 2, + "feeFrequency": { + "id": 1, + "code": "feeFrequencyperiodFrequencyType.weeks", + "value": "Weeks" + } + } + ] + } + } + +
-
-  -
-
-

Update a Share Product

-
-
- PUT https://Domain Name/api/v1/products/share/{productId} - POST shareproducts/1 -Content-Type: application/json -Request Body: -{ - "description": "Share Product Description.", - "locale": "en", - "unitPrice": "5.0" -} - - -{ - "resourceId": 1, - "changes": { - "description": "Share Product Description.", - "unitPrice": 5.0, - "locale": "en" - } -} - +   +
+
+

List Loans

+

The list capability of loans can support pagination and sorting.

+
Optional Arguments
+
+
offset
+
+ Integer optional, defaults to 0 +
+
Indicates from what result to start from.
+ +
limit
+
+ Integer optional, defaults to 200 +
+
Restricts the size of results returned. To override the default and return all entries you must + explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1 +
+ +
orderBy
+
+ String optional, one of displayName, accountNo, officeId, officeName +
+
Orders the results by the field indicated.
+ +
sortBy
+
+ String optional, one of ASC, DESC +
+
Indicates what way to order results if orderBy is used.
+ +
officeId
+
+ Integer optional +
+
Provides ability to restrict list of loans returned based on the office there associated with. +
+ +
underHierarchy
+
+ String optional +
+
Use the office hierarchy string to return all loans under a given hierarchy.
+ +
accountNo
+
+ String optional +
+
Use account no. of loans to restrict results.
+ +
clientId
+
+ String optional +
+
Use client ID of loans to restrict results.
+ +
associations
+
String optional, + Comma separated list of recurring loan 'associations' (itemized below). +
+
+
+ Associations are just extra pieces of data that you might or might not want to retrieve.
+
+
+
+ 'summary': Gets loan account summarry related information. +
+ +
externalId
+
+ String optional +
+
Use externalId of loan to restrict results.
+ +
+

Example Requests:

+
loans
+
+
loans?fields=accountNo
+
+
loans?offset=10&limit=50
+
+
loans?orderBy=accountNo&sortOrder=DESC
+
+
+ + GET https://DomainName/fineract-provider/api/v1/loans + + + { + "totalFilteredRecords": 1, + "pageItems": [ + { + "id": 1, + "accountNo": "000000001", + "status": { + "id": 300, + "code": "loanStatusType.active", + "value": "Active", + "pendingApproval": false, + "waitingForDisbursal": false, + "active": true, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "clientId": 1, + "clientName": "Change To IndividualName", + "clientOfficeId": 1, + "loanProductId": 1, + "loanProductName": "AgriCredit", + "loanProductDescription": "test", + "loanType": { + "id": 1, + "code": "loanType.individual", + "value": "Individual" + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "principal": 10000, + "termFrequency": 12, + "termPeriodFrequencyType": { + "id": 2, + "code": "termFrequency.periodFrequencyType.months", + "value": "Months" + }, + "numberOfRepayments": 12, + "repaymentEvery": 1, + "repaymentFrequencyType": { + "id": 2, + "code": "repaymentFrequency.periodFrequencyType.months", + "value": "Months" + }, + "interestRatePerPeriod": 2, + "interestRateFrequencyType": { + "id": 2, + "code": "interestRateFrequency.periodFrequencyType.months", + "value": "Per month" + }, + "annualInterestRate": 24, + "amortizationType": { + "id": 1, + "code": "amortizationType.equal.installments", + "value": "Equal installments" + }, + "interestType": { + "id": 0, + "code": "interestType.declining.balance", + "value": "Declining Balance" + }, + "interestCalculationPeriodType": { + "id": 1, + "code": "interestCalculationPeriodType.same.as.repayment.period", + "value": "Same as repayment period" + }, + "transactionProcessingStrategyCode": "mifos-standard-strategy", + "timeline": { + "submittedOnDate": [ + 2012, + 6, + 1 + ], + "submittedByUsername": "mifos", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator", + "approvedOnDate": [ + 2012, + 6, + 1 + ], + "approvedByUsername": "mifos", + "approvedByFirstname": "App", + "approvedByLastname": "Administrator", + "expectedDisbursementDate": [ + 2012, + 6, + 1 + ], + "actualDisbursementDate": [ + 2012, + 6, + 1 + ], + "disbursedByUsername": "mifos", + "disbursedByFirstname": "App", + "disbursedByLastname": "Administrator", + "expectedMaturityDate": [ + 2013, + 6, + 1 + ] + }, + "linkedAccount":{ + "id":1, + "accountNo":"000000001" + }, + "summary": { + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "principalDisbursed": 10000, + "principalPaid": 3073.07, + "principalWrittenOff": 0, + "principalOutstanding": 6926.93, + "principalOverdue": 5999.92, + "interestCharged": 1347.15, + "interestPaid": 709.33, + "interestWaived": 0, + "interestWrittenOff": 0, + "interestOutstanding": 637.82, + "interestOverdue": 619.28, + "feeChargesCharged": 0, + "feeChargesDueAtDisbursementCharged": 0, + "feeChargesPaid": 0, + "feeChargesWaived": 0, + "feeChargesWrittenOff": 0, + "feeChargesOutstanding": 0, + "feeChargesOverdue": 0, + "penaltyChargesCharged": 0, + "penaltyChargesPaid": 0, + "penaltyChargesWaived": 0, + "penaltyChargesWrittenOff": 0, + "penaltyChargesOutstanding": 0, + "penaltyChargesOverdue": 0, + "totalExpectedRepayment": 11347.15, + "totalRepayment": 3782.4, + "totalExpectedCostOfLoan": 1347.15, + "totalCostOfLoan": 709.33, + "totalWaived": 0, + "totalWrittenOff": 0, + "totalOutstanding": 7564.75, + "totalOverdue": 6619.2, + "overdueSinceDate": [ + 2012, + 11, + 1 + ] + }, + "feeChargesAtDisbursementCharged": 0, + "inArrears":false, + "isNPA":false + } + ] + } + +
-
- -  -
-
-

List Share Products

- - - - - -
Mandatory Fields
limit, offset
-

Example Requests:

-
shareproducts
-
-
- - GET https://Domain Name/api/v1/products/share?limit=10&offset=0 - - -{ - "totalFilteredRecords": 1, - "pageItems": [{ - "id": 1, - "name": "Share Product", - "shortName": "Share Product Description", - "totalShares": 100 - }] -} - -
-
-   -
-
-

Create a Savings Product

- - - - - -
Mandatory Fields
name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, nominalAnnualInterestRate, - interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType,accountingRule
-
- - - - - -
Mandatory Fields for Cash based accounting (accountingRule = 2)
savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId
-
- - - -
Optional Fields
minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType, withdrawalFeeForTransfers, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, charges, allowOverdraft, overdraftLimit, minBalanceForInterestCalculation,withHoldTax,taxGroupId
-
-
- POST https://Domain Name/api/v1/savingsproducts - POST savingsproducts -Content-Type: application/json -Request Body: -{ - "name": "Passbook Savings", - "shortName": "PBSV", - "description": "Daily compounding using Daily Balance, 5% per year, 365 days in year", - "currencyCode": "USD", - "digitsAfterDecimal": 2, - "inMultiplesOf": 0, - "locale": "en", - "nominalAnnualInterestRate": "5.0", - "interestCompoundingPeriodType": 1, - "interestPostingPeriodType":4, - "interestCalculationType": 1, - "interestCalculationDaysInYearType": "365", - "accountingRule":"1", - "charges":[{"id":"1"}] -} - - -{ - "resourceId": 1 -} - - POST savingsproducts -Content-Type: application/json -Request Body: -{ - "locale": "en", - "name": "New Passbook Savings ", - "shortName": "NPBS", - "description": "A savings product", - "currencyCode": "USD", - "digitsAfterDecimal": "2", - "inMultiplesOf": 0, - "nominalAnnualInterestRate": "15", - "interestCompoundingPeriodType": "1", - "interestPostingPeriodType": "4", - "interestCalculationType": "1", - "interestCalculationDaysInYearType": "365", - "minRequiredOpeningBalance": "50", - "allowOverdraft":true, - "overdraftLimit":5000, - "minBalanceForInterestCalculation":5000, - "minRequiredBalance":20, - "enforceMinRequiredBalance":true, - "lockinPeriodFrequency": "4", - "lockinPeriodFrequencyType": "1", - "withdrawalFeeForTransfers":false, - "accountingRule": "2", - "charges":[{"id":"1"},{"id":3}] - "savingsReferenceAccountId": "16", - "transfersInSuspenseAccountId": "16", - "savingsControlAccountId": "15", - "interestOnSavingsAccountId": "18", - "incomeFromFeeAccountId": "4", - "incomeFromPenaltyAccountId": "4", - "feeToIncomeAccountMappings":[ - { - "chargeId":"6", - "incomeAccountId":"16" - } - ], - "penaltyToIncomeAccountMappings":[ - { - "chargeId":"4", - "incomeAccountId":"15" - } - ], - "paymentChannelToFundSourceMappings": [ - { - "paymentTypeId": "14", - "fundSourceAccountId": "2" - } - ] -} - - -{ - "resourceId": 1 -} - +   +
+
+

Retrieve GLIM Application

+

Allows you to retrieve the GLIM Application.

+
+
+ + GET https://DomainName/fineract-provider/api/v1/loans/glimAccount/{glimId} + + + [ + { + "glimId": 1, + "groupId": 1, + "clientId": 2, + "clientName": "client1 qwe", + "childLoanId": 2, + "parentAccountNo": "000000002", + "parentPrincipalAmount": 10.000000, + "childLoanAccountNo": "0000000021", + "childPrincipalAmount": 1000.000000 + } + ] + +
-
-   -
-
-

Retrieve a Savings Product

-

Example Requests:

-
savingsproducts/1
-

-
savingsproducts/1?template=true
-

-
savingsproducts/1?fields=name,description
-
-
- GET https://Domain Name/api/v1/savingsproducts/1 - -{ - "id": 1, - "name": "savings product", - "shortName": "sa1", - "description": "gtasga", - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "nominalAnnualInterestRate": 5.000000, - "interestCompoundingPeriodType": { - "id": 1, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", - "value": "Daily" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "withdrawalFeeForTransfers": false, - "accountingRule": { - "id": 2, - "code": "accountingRuleType.cash", - "value": "CASH BASED" - }, - "accountingMappings": { - "savingsReferenceAccount": { - "id": 12, - "name": "savings ref", - "glCode": "20" - }, - "incomeFromFeeAccount": { - "id": 16, - "name": "income from savings fee", - "glCode": "24" - }, - "incomeFromPenaltyAccount": { - "id": 17, - "name": "income from sav penalites", - "glCode": "25" - }, - "interestOnSavingsAccount": { - "id": 15, - "name": "interest on savings", - "glCode": "23" - }, - "savingsControlAccount": { - "id": 13, - "name": "savings ref tool kit", - "glCode": "21" - }, - "transfersInSuspenseAccount": { - "id": 14, - "name": "saving transfers", - "glCode": "22" - } - }, - "paymentChannelToFundSourceMappings": [ - { - "paymentType": { - "id": 10, - "name": "check" - }, - "fundSourceAccount": { - "id": 12, - "name": "savings ref", - "glCode": "20" - } - } - ], - "feeToIncomeAccountMappings": [ - { - "charge": { - "id": 11, - "name": "sav charge", - "active": false, - "penalty": false - }, - "incomeAccount": { - "id": 16, - "name": "income from savings fee", - "glCode": "24" - } - } - ], - "penaltyToIncomeAccountMappings": [ - { - "charge": { - "id": 12, - "name": "sav 2", - "active": false, - "penalty": true - }, - "incomeAccount": { - "id": 17, - "name": "income from sav penalites", - "glCode": "25" - } - } - ], - "charges": [] -} - +   +
+
+

Modify a loan application

+

Loan 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.

+
+
+ PUT https://Domain Name/api/v1/loans/{loanId} + PUT loans/1 + Content-Type: application/json + No Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "productId": 1, + "principal": "5000", + "loanTermFrequency": 10, + "loanTermFrequencyType": 0, + "numberOfRepayments": 10, + "repaymentEvery": 1, + "repaymentFrequencyType": 0, + "interestRatePerPeriod": 2, + "interestType": 0, + "interestCalculationPeriodType": 0, + "amortizationType": 1, + "expectedDisbursementDate": "04 March 2014", + "transactionProcessingStrategyCode": "mifos-standard-strategy" + } + + + { + "officeId": 2, + "clientId": 1, + "loanId": 1, + "resourceId": 1, + "changes": { + "principal": 5000, + "locale": "en" + } + } + +
-
-   -
-
-

Update a Savings Product

-
-
- PUT https://Domain Name/api/v1/savingsproducts/{productId} - POST savingsproducts/1 -Content-Type: application/json -Request Body: -{ - "description": "Passbook Savings Lite.", - "locale": "en", - "interestRate": "5.73" -} - - -{ - "resourceId": 1, - "changes": { - "description": "Passbook Savings Lite.", - "interestRate": 5.73, - "locale": "en" - } -} - +   +
+
+

Calculate loan repayment schedule

+ + + + + + + +
+
Mandatory Fields
+
productId, principal, loanTermFrequency, + loanTermFrequencyType, numberOfRepayments, repaymentEvery, + repaymentFrequencyType, interestRatePerPeriod, + amortizationType, interestType, + interestCalculationPeriodType, expectedDisbursementDate, + transactionProcessingStrategyCode +
+
+
+ + POST https://DomainName/api/v1/loans?command=calculateLoanSchedule + + + POST loans?command=calculateLoanSchedule + Content-Type: application/json + Request Body: + { + "dateFormat": "dd MMMM yyyy", + "locale": "en_GB", + "productId": 1, + "principal": "100,000.00", + "loanTermFrequency": 12, + "loanTermFrequencyType": 2, + "numberOfRepayments": 12, + "repaymentEvery": 1, + "repaymentFrequencyType": 2, + "interestRatePerPeriod": 2, + "amortizationType": 1, + "interestType": 0, + "interestCalculationPeriodType": 1, + "expectedDisbursementDate": "20 September 2011", + "transactionProcessingStrategyCode": "mifos-standard-strategy" + } + + + { + "currency": { + "code": "UGX", + "name": "Uganda Shilling", + "decimalPlaces": 2, + "displaySymbol": "USh", + "nameCode": "currency.UGX", + "displayLabel": "Uganda Shilling (USh)" + }, + "loanTermInDays": 366, + "totalPrincipalDisbursed": 100000, + "totalPrincipalExpected": 100000, + "totalPrincipalPaid": 0, + "totalInterestCharged": 13471.52, + "totalFeeChargesCharged": 0, + "totalPenaltyChargesCharged": 0, + "totalWaived": 0, + "totalWrittenOff": 0, + "totalRepaymentExpected": 113471.52, + "totalRepayment": 0, + "totalOutstanding": 0, + "periods": [ + { + "period": 0, + "dueDate": [ + 2011, + 9, + 20 + ], + "principalDisbursed": 100000, + "principalLoanBalanceOutstanding": 100000, + "feeChargesDue": 0, + "feeChargesOutstanding": 0, + "totalOriginalDueForPeriod": 0, + "totalDueForPeriod": 0, + "totalOutstandingForPeriod": 0, + "totalOverdue": 0, + "totalActualCostOfLoanForPeriod": 0 + }, + { + "period": 1, + "fromDate": [ + 2011, + 9, + 20 + ], + "dueDate": [ + 2011, + 10, + 20 + ], + "daysInPeriod": 30, + "principalOriginalDue": 7455.96, + "principalDue": 7455.96, + "principalOutstanding": 7455.96, + "principalLoanBalanceOutstanding": 92544.04, + "interestOriginalDue": 2000, + "interestDue": 2000, + "interestOutstanding": 2000, + "feeChargesDue": 0, + "penaltyChargesDue": 0, + "totalOriginalDueForPeriod": 9455.96, + "totalDueForPeriod": 9455.96, + "totalPaidForPeriod": 0, + "totalOutstandingForPeriod": 9455.96, + "totalOverdue": 9455.96, + "totalActualCostOfLoanForPeriod": 2000 + }, + ... + ... + { + "period": 12, + "fromDate": [ + 2012, + 8, + 20 + ], + "dueDate": [ + 2012, + 9, + 20 + ], + "daysInPeriod": 31, + "principalOriginalDue": 9270.56, + "principalDue": 9270.56, + "principalOutstanding": 9270.56, + "principalLoanBalanceOutstanding": 0, + "interestOriginalDue": 185.4, + "interestDue": 185.4, + "interestOutstanding": 185.4, + "feeChargesDue": 0, + "penaltyChargesDue": 0, + "totalOriginalDueForPeriod": 9455.96, + "totalDueForPeriod": 9455.96, + "totalPaidForPeriod": 0, + "totalOutstandingForPeriod": 9455.96, + "totalOverdue": 9455.96, + "totalActualCostOfLoanForPeriod": 185.4 + } + ] + } + +
-
-   -
-
-

Delete a Savings Product

-
-
- -DELETE https://Domain Name/api/v1/savingsproducts/{productId} - - -DELETE savingsproducts/1 -Content-Type: application/json - - -{ - "resourceId": 1 -} - -
-
- -   -
-
-

List Savings Products

-

Example Requests:

-
savingsproducts
-

-
savingsproducts?fields=name
-
-
- GET https://Domain Name/api/v1/savingsproducts - -[ - { - "id": 1, - "name": "Savings product", - "shortName": "sa1", - "description": "gtasga", - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "nominalAnnualInterestRate": 5.000000, - "interestCompoundingPeriodType": { - "id": 1, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", - "value": "Daily" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "withdrawalFeeForTransfers": false, - "accountingRule": { - "id": 2, - "code": "accountingRuleType.cash", - "value": "CASH BASED" - } - } -] -
-
- - - -   -
-
-

Fixed Deposit Product:

-

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.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
name
The name of the product offering.
shortName
Shortname associated with a fixed deposit product.
- An abbreviated version of the name, used in reports or menus where space is limited. -
description
A description of the product offering.
currencyCode
Three letter ISO code representing currency.
digitsAfterDecimal
Override the currency default value for digitsAfterDecimal.
inMultiplesOf
Override the default value for rounding currency to multiples of provided value.
interestCompoundingPeriodType
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end of month)
interestPostingPeriodType
The period at which interest rate is posted or credited to fixed deposit account. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, 30th Sep, 31st Dec)
interestCalculationType
The interest calculation method used: 1=Daily Balance or 2=Average Daily Balance
interestCalculationDaysInYearType
The setting for number of days in year to use: 360=360 Days, 365=365 Days
lockinPeriodFrequency
Optional: If provided, used along with lockinPeriodFrequencyType to indicate the length of time that the fixed deposit account is 'locked in' and premature closure is not allowed. e.g. 2 Months
lockinPeriodFrequencyType
Optional: If provided, used along with lockinPeriodFrequency to indicate the length of time that the fixed deposit account is 'locked in' and premature closure is not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. 2 Months
minDepositTerm
This is used along with minDepositTermTypeId to define allowed minimum deposit term for creating a fixed deposit account using this product. e.g. 6 Months
minDepositTermTypeId
Used along with minDepositTerm to define allowed minimum deposit term for creating a fixed deposit account using this product. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. 6 Months -
maxDepositTerm
Optional: If provided, used along with maxDepositTermTypeId to define allowed maximum deposit term for creating a fixed deposit account using this product. e.g. 3 Years
maxDepositTermTypeId
Optional: If provided, used along with maxDepositTerm to define allowed maximum deposit term for creating a fixed deposit account using this product. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. 3 Years -
inMultiplesOfDepositTerm
Optional: If provided, used along with inMultiplesOfDepositTermTypeId to indicate the allowed deposit periods after minimum deposit period. e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after minimum deposit of 6 Months should be 9 Months.
inMultiplesOfDepositTermTypeId
Optional: If provided, used along with inMultiplesOfDepositTerm to indicate the allowed deposit periods after minimum deposit period. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after minimum deposit of 6 Months should be 9 Months. -
preClosurePenalApplicable
Optional: expects boolean value true/false, If provided as true then must provide preClosurePenalInterest and preClosurePenalInterestOnTypeId.
preClosurePenalInterest
Optional: Must provide when preClosurePenalApplicable is true. Used along with preClosurePenalInterestOnTypeId to apply a penalalty on top of applicable interest rate for Pre-mature closure of accounts. e.g. “1%” means 1% less than the interest rate applicable.
preClosurePenalInterestOnTypeId
Optional: Must provide when preClosurePenalApplicable is true. Used along with preClosurePenalInterest to decide what should be the applicable interest rate to which penalalty can be applied on Pre-mature closure of accounts. 1=Whole Term, 2=Till Premature withdrawal e.g. “1%” means 1% less than the interest rate applicable till premature withdrawal.
accountingRule
Specifies if accounting is enabled for the particular - product and the type of the accounting rule to be used - Example Values:1=NONE,2=CASH_BASED
withHoldTax
Optional: If provided, sets an indicator for applying withhold tax on interest posting for savings account
taxGroupId
Optional: If withhold tax set as true, with hold tax will be applied as per the tax group provided
-
-
- -   -
-
-

Create a Fixed Deposit Product

- - - - - -
Mandatory Fields
name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, - interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minDepositTerm, minDepositTermTypeId, accountingRule
-
- - - - - -
Mandatory Fields for Cash based accounting (accountingRule = 2)
savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId
-
- - - -
Optional Fields
lockinPeriodFrequency, lockinPeriodFrequencyType, maxDepositTerm, maxDepositTermTypeId, inMultiplesOfDepositTerm, inMultiplesOfDepositTermTypeId, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, charges, charts, , withHoldTax, taxGroupId
-
-
- POST https://Domain Name/api/v1/fixeddepositproducts - POST fixeddepositproducts -Content-Type: application/json -Request Body: -{ - "name": "Fixed deposit product", - "shortName": "FD01", - "description": "Daily compounding using Daily Balance, 5% per year, 365 days in year", - "currencyCode": "USD", - "digitsAfterDecimal": 2, - "inMultiplesOf": 0, - "locale": "en", - "interestCompoundingPeriodType": 1, - "interestPostingPeriodType":4, - "interestCalculationType": 1, - "interestCalculationDaysInYearType": "365", - "accountingRule":"1", - "preClosurePenalApplicable":"true", - "preClosurePenalInterest":"1.75", - "preClosurePenalInterestOnTypeId":1, - "minDepositTerm":1, - "minDepositTermTypeId":1, - "maxDepositTerm":5, - "maxDepositTermTypeId":3, - "charts":[ - { - "fromDate": "01 Jan 2014", - "locale":"en", - "dateFormat":"dd MMMM yyyy", - "dateFormat":"dd MMMM yyyy", - "chartSlabs":[ - { - "description":"from 0 to 90 days", - "periodType":"1", - "fromPeriod":"0", - "toPeriod":"90", - "annualInterestRate":"4.5" - } - ] - } - ] -} - - -{ - "resourceId": 1 -} - +   +
+
+

Submit a new Loan Application

+ + + + + + + +
+
Mandatory Fields
+
clientId, productId, principal, loanTermFrequency, + loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery, + repaymentFrequencyType, interestRatePerPeriod, + amortizationType, interestType, + interestCalculationPeriodType, transactionProcessingStrategyCode, + expectedDisbursementDate, submittedOnDate, loanType +
+
+ + + + + + + +
+
Additional Mandatory Fields if interest recalculation is + enabled for product and Rest frequency not same as repayment period +
+
recalculationRestFrequencyDate
+ + + + + + + +
+
Additional Mandatory Fields if interest recalculation with + interest/fee compounding is enabled for product and compounding frequency not same as + repayment period +
+
recalculationCompoundingFrequencyDate
+ + + + + + + +
+
Additional Mandatory Field if Entity-Datatable Check is + enabled for the entity of type loan. +
+
datatables
+
+ + + + + + + +
+
Optional Fields
+
graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, + allowPartialPeriodInterestCalculation, + fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, + createStandingInstructionAtDisbursement (requires linkedAccountId if set to true), + daysInYearType +
+
+
+ + POST https://DomainName/api/v1/loans + + + POST loans + Content-Type: application/json + Request Body: + { + "dateFormat": "dd MMMM yyyy", + "locale": "en_GB", + "clientId": 1, + "productId": 1, + "principal": "10,000.00", + "loanTermFrequency": 12, + "loanTermFrequencyType": 2, + "loanType": "individual", + "numberOfRepayments": 10, + "repaymentEvery": 1, + "repaymentFrequencyType": 2, + "interestRatePerPeriod": 10, + "amortizationType": 1, + "interestType": 0, + "interestCalculationPeriodType": 1, + "transactionProcessingStrategyCode": "mifos-standard-strategy", + "expectedDisbursementDate": "10 Jun 2013", + "submittedOnDate": "10 Jun 2013", + "linkAccountId" : "1", + "fixedEmiAmount":1100, + "maxOutstandingLoanBalance":"35000", + "daysInYearType":1, + "disbursementData":[{"expectedDisbursementDate":"01 November 2013", + "principal":22000,"approvedPrincipal":22000}], + "datatables": [{ + "registeredTableName": "loan_balance", + "data": { + "locale": "en", + "account_number": "0000001", + "Balance": "3300.00", + "DateField": "01 December 2016 00:00", + "dateFormat": "dd MMMM yyyy HH:mm", + "DateTimeField": "01 December 2016 12:00" + } + }, + { + "registeredTableName": "Date Loan Field", + "data": { + "locale": "en", + "Activation Date": "01 December 2016 00:00", + "dateFormat": "dd MMMM yyyy HH:mm" + } + }] + } + + + { + "officeId": 1, + "clientId": 1, + "loanId": 1, + "resourceId": 1 + } + +
-
-   -
-
-

Retrieve a Fixed Deposit Product

-

Example Requests:

-
fixeddepositproducts/1
-

-
fixeddepositproducts/1?template=true
-

-
fixeddepositproducts/1?fields=name,description
-
-
- GET https://Domain Name/api/v1/fixeddepositproducts/1 - -{ - "id": 1, - "name": "Fixed deposit product", - "shortName": "FD01", - "description": "Daily compounding using Daily Balance, 5% per year, 365 days in year", - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "interestCompoundingPeriodType": { - "id": 1, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", - "value": "Daily" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "accountingMappings": { - "savingsReferenceAccount": { - "id": 12, - "name": "savings ref", - "glCode": "20" - }, - "incomeFromFeeAccount": { - "id": 16, - "name": "income from savings fee", - "glCode": "24" - }, - "incomeFromPenaltyAccount": { - "id": 17, - "name": "income from sav penalites", - "glCode": "25" - }, - "interestOnSavingsAccount": { - "id": 15, - "name": "interest on savings", - "glCode": "23" - }, - "savingsControlAccount": { - "id": 13, - "name": "savings ref tool kit", - "glCode": "21" - }, - "transfersInSuspenseAccount": { - "id": 14, - "name": "saving transfers", - "glCode": "22" - } - }, - "feeToIncomeAccountMappings": [ - { - "charge": { - "id": 11, - "name": "sav charge", - "active": false, - "penalty": false - }, - "incomeAccount": { - "id": 16, - "name": "income from savings fee", - "glCode": "24" - } - } - ], - "penaltyToIncomeAccountMappings": [ - { - "charge": { - "id": 12, - "name": "sav 2", - "active": false, - "penalty": true - }, - "incomeAccount": { - "id": 17, - "name": "income from sav penalites", - "glCode": "25" - } - } - ], - "preClosurePenalApplicable":"true", - "preClosurePenalInterest":"1.75", - "preClosurePenalInterestOnType": { - "id": 1, - "code": "preClosurePenalInterestOnType.wholeTerm", - "value": "Whole term" - }, - "minDepositTerm":1, - "minDepositTermType": { - "id": 1, - "code": "deposit.term.savingsPeriodFrequencyType.weeks", - "value": "Weeks" - }, - "maxDepositTerm":5, - "maxDepositTermType": { - "id": 3, - "code": "deposit.term.savingsPeriodFrequencyType.years", - "value": "Years" - }, - "activeChart": { - "id": 8, - "fromDate": [ - 2014, - 1, - 1 - ], - "savingsProductId": 8, - "savingsProductName": "Fixed deposit product", - "chartSlabs": [ - { - "id": 18, - "description": "from 0 to 90 days", - "periodType": { - "id": 1, - "code": "interestChartPeriodType.weeks", - "value": "Weeks" - }, - "fromPeriod": 0, - "toPeriod": 90, - "annualInterestRate": 4.5, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - } - ], - "periodTypes": [ - { - "id": 0, - "code": "interestChartPeriodType.days", - "value": "Days" - }, - { - "id": 1, - "code": "interestChartPeriodType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "interestChartPeriodType.months", - "value": "Months" - }, - { - "id": 3, - "code": "interestChartPeriodType.years", - "value": "Years" - } - ] - } -} - +   +
+
+

Approve Loan Application

+ + + + + + + +
+
Mandatory Fields
+
approvedOnDate
+
+ + + + + + + + + + +
+
Optional Fields
+
approvedLoanAmount
expectedDisbursementDate
+
+
+ + POST https://DomainName/api/v1/loans/{loanId}?command=approve + + + POST loans/1?command=approve + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "approvedOnDate": "20 September 2011", + "expectedDisbursementDate" : "20 September 2011", + "note": "Loan approval note", + "disbursementData" : [{ id=226, principal="5", expectedDisbursementDate="20 September 2011"}, + { id=227, principal="91", expectedDisbursementDate="21 September 2011"}] + } + + + { + "officeId": 1, + "clientId": 1, + "loanId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 200, + "code": "loanStatusType.approved", + "value": "Approved", + "pendingApproval": false, + "waitingForDisbursal": true, + "active": false, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "approvedOnDate": "20 September 2011", + "note": "Loan approval note" + } + } + +
-
-   -
-
-

Update a Fixed Deposit Product

-
-
- PUT https://Domain Name/api/v1/fixeddepositproducts/{productId} - POST fixeddepositproducts/1 -Content-Type: application/json -Request Body: -{ - "description": "Fixed deposit product new offerings", - "locale": "en", - "minDepositTerm":5, - "minDepositTermTypeId":1, -} - - -{ - "resourceId": 1, - "changes": { - "description": "Fixed deposit product new offerings", - "minDepositTerm": 5 - } -} - -
-
-   -
-
-

Delete a Fixed Deposit Product

-
-
- -DELETE https://Domain Name/api/v1/fixeddepositdproducts/{productId} - - -DELETE fixeddepositdproducts/1 -Content-Type: application/json - - -{ - "resourceId": 1 -} - -
-
- -   -
-
-

List Fixed Deposit Products

-

Example Requests:

-
fixeddepositproducts
-

-
fixeddepositproducts?fields=name
-
-
- GET https://Domain Name/api/v1/fixeddepositproducts - -[ - { - "id": 3, - "name": "FD01", - "shortName": "FD01", - "description": "FD01", - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "preClosurePenalApplicable": false, - "minDepositTerm": 3, - "maxDepositTerm": 4, - "minDepositTermType": { - "id": 2, - "code": "deposit.term.savingsPeriodFrequencyType.months", - "value": "Months" - }, - "maxDepositTermType": { - "id": 3, - "code": "deposit.term.savingsPeriodFrequencyType.years", - "value": "Years" - }, - "nominalAnnualInterestRate": 0, - "interestCompoundingPeriodType": { - "id": 4, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "accountingRule": { - "id": 1, - "code": "accountingRuleType.none", - "value": "NONE" - } - } -] -
-
- - - -   -
-
-

Recurring Deposit Product:

-

Recurring Deposits are a special kind of Term Deposits offered by MFI's. The Recurring Deposit Products (aka RD) product offerings are modeled using this API.

-

Recurring Deposits help people with regular incomes to deposit a fixed amount every month (specified recurring frequency) into their Recurring Deposit account.

-

When creating recurring deposit accounts, the details from the recurring deposit product are used to auto fill details of the recurring deposit account application process.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - e.g. 2 Months - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
name
The name of the product offering.
shortName
Shortname associated with a recurring deposit product.
- An abbreviated version of the name, used in reports or menus where space is limited. -
description
A description of the product offering.
currencyCode
Three letter ISO code representing currency.
digitsAfterDecimal
Override the currency default value for digitsAfterDecimal.
inMultiplesOf
Override the default value for rounding currency to multiples of provided value.
interestCompoundingPeriodType
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end of month)
interestPostingPeriodType
The period at which interest rate is posted or credited to recurring deposit account. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, 30th Sep, 31st Dec)
interestCalculationType
The interest calculation method used: 1=Daily Balance or 2=Average Daily Balance
interestCalculationDaysInYearType
The setting for number of days in year to use: 360=360 Days, 365=365 Days
lockinPeriodFrequency
Optional: If provided, used along with lockinPeriodFrequencyType to indicate the length of time that the recurring deposit account is 'locked in' and premature closure is not allowed. e.g. 2 Months
lockinPeriodFrequencyType
recurringDepositFrequency
The frequency for depositing a fixed amount to recurring deposit account.
recurringDepositFrequencyTypeId
Used along with recurringDepositFrequency to define frequency for depositing a fixed amount to recurring deposit account. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. deposit every 1 Months -
minDepositTerm
This is used along with minDepositTermTypeId to define allowed minimum deposit term for creating a recurring deposit account using this product. e.g. 6 Months
minDepositTermTypeId
Used along with minDepositTerm to define allowed minimum deposit term for creating a recurring deposit account using this product. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. 6 Months -
maxDepositTerm
Optional: If provided, used along with maxDepositTermTypeId to define allowed maximum deposit term for creating a recurring deposit account using this product. e.g. 3 Years
maxDepositTermTypeId
Optional: If provided, used along with maxDepositTerm to define allowed maximum deposit term for creating a recurring deposit account using this product. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. 3 Years -
inMultiplesOfDepositTerm
Optional: If provided, used along with inMultiplesOfDepositTermTypeId to indicate the allowed deposit periods after minimum deposit period. e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after minimum deposit of 6 Months should be 9 Months.
inMultiplesOfDepositTermTypeId
Optional: If provided, used along with inMultiplesOfDepositTerm to indicate the allowed deposit periods after minimum deposit period. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after minimum deposit of 6 Months should be 9 Months. -
preClosurePenalApplicable
Optional: expects boolean value true/false, If provided as true then must provide preClosurePenalInterest and preClosurePenalInterestOnTypeId.
preClosurePenalInterest
Optional: Must provide when preClosurePenalApplicable is true. Used along with preClosurePenalInterestOnTypeId to apply a penalalty on top of applicable interest rate for Pre-mature closure of accounts. e.g. “1%” means 1% less than the interest rate applicable.
preClosurePenalInterestOnTypeId
Optional: Must provide when preClosurePenalApplicable is true. Used along with preClosurePenalInterest to decide what should be the applicable interest rate to which penalalty can be applied on Pre-mature closure of accounts. 1=Whole Term, 2=Till Premature withdrawal e.g. “1%” means 1% less than the interest rate applicable till premature withdrawal.
accountingRule
Specifies if accounting is enabled for the particular - product and the type of the accounting rule to be used - Example Values:1=NONE,2=CASH_BASED
withHoldTax
Optional: If provided, sets an indicator for applying withhold tax on interest posting for savings account
taxGroupId
Optional: If withhold tax set as true, with hold tax will be applied as per the tax group provided
-
-
- -   -
-
-

Create a Recurring Deposit Product

- - - - - -
Mandatory Fields
name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, - interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minDepositTerm, minDepositTermTypeId, recurringDepositFrequency, recurringDepositFrequencyTypeId, accountingRule, depositAmount
-
- - - - - -
Mandatory Fields for Cash based accounting (accountingRule = 2)
savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId
-
- - - -
Optional Fields
lockinPeriodFrequency, lockinPeriodFrequencyType, maxDepositTerm, maxDepositTermTypeId, inMultiplesOfDepositTerm, inMultiplesOfDepositTermTypeId, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, charges, charts, minDepositAmount, maxDepositAmount, withHoldTax, taxGroupId
-
-
- POST https://Domain Name/api/v1/recurringdepositproducts - POST recurringdepositproducts -Content-Type: application/json -Request Body: -{ - "name": "Recurring deposit product", - "shortName": "RD01", - "description": "Daily compounding using Daily Balance, 5% per year, 365 days in year", - "currencyCode": "USD", - "digitsAfterDecimal": 2, - "inMultiplesOf": 0, - "locale": "en", - "interestCompoundingPeriodType": 1, - "interestPostingPeriodType":4, - "interestCalculationType": 1, - "interestCalculationDaysInYearType": "365", - "accountingRule":"1", - "recurringDepositFrequency":1, - "recurringDepositFrequencyTypeId":2, - "preClosurePenalApplicable":"true", - "preClosurePenalInterest":"1.75", - "preClosurePenalInterestOnTypeId":1, - "minDepositTerm":1, - "minDepositTermTypeId":1, - "maxDepositTerm":5, - "maxDepositTermTypeId":3, - depositAmount: "10000", - minDepositAmount: "100", - maxDepositAmount: "1000000", - "charts":[ - { - "fromDate": "01 Jan 2014", - "locale":"en", - "dateFormat":"dd MMMM yyyy", - "dateFormat":"dd MMMM yyyy", - "chartSlabs":[ - { - "description":"from 0 to 90 days", - "periodType":"1", - "fromPeriod":"0", - "toPeriod":"90", - "annualInterestRate":"4.5" - } - ] - } - ] -} - - -{ - "resourceId": 1 -} - -
-
+   +
+
+

Recover Loan Guarantee

+
+
+ + POST https://DomainName/api/v1/loans/{loanId}?command=recoverGuarantees + + + POST loans/1?command=approve + Content-Type: application/json + No Request Body: + + + { -   -
-
-

Retrieve a Recurring Deposit Product

-

Example Requests:

-
recurringdepositproducts/1
-

-
recurringdepositproducts/1?template=true
-

-
recurringdepositproducts/1?fields=name,description
-
-
- GET https://Domain Name/api/v1/recurringdepositproducts/1 - -{ - "id": 1, - "name": "Recurring deposit product", - "shortName": "RD01", - "description": "Daily compounding using Daily Balance, 5% per year, 365 days in year", - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "interestCompoundingPeriodType": { - "id": 1, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", - "value": "Daily" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "accountingMappings": { - "savingsReferenceAccount": { - "id": 12, - "name": "savings ref", - "glCode": "20" - }, - "incomeFromFeeAccount": { - "id": 16, - "name": "income from savings fee", - "glCode": "24" - }, - "incomeFromPenaltyAccount": { - "id": 17, - "name": "income from sav penalites", - "glCode": "25" - }, - "interestOnSavingsAccount": { - "id": 15, - "name": "interest on savings", - "glCode": "23" - }, - "savingsControlAccount": { - "id": 13, - "name": "savings ref tool kit", - "glCode": "21" - }, - "transfersInSuspenseAccount": { - "id": 14, - "name": "saving transfers", - "glCode": "22" - } - }, - "feeToIncomeAccountMappings": [ - { - "charge": { - "id": 11, - "name": "sav charge", - "active": false, - "penalty": false - }, - "incomeAccount": { - "id": 16, - "name": "income from savings fee", - "glCode": "24" - } - } - ], - "penaltyToIncomeAccountMappings": [ - { - "charge": { - "id": 12, - "name": "sav 2", - "active": false, - "penalty": true - }, - "incomeAccount": { - "id": 17, - "name": "income from sav penalites", - "glCode": "25" - } - } - ], - "recurringDepositFrequency":1, - "recurringDepositFrequencyType": { - "id": 2, - "code": "recurring.deposit.savingsPeriodFrequencyType.months", - "value": "Months" - }, - "minDepositAmount":100.00, - "depositAmount":10000.00, - "maxDepositAmount":1000000.00, - "preClosurePenalApplicable":"true", - "preClosurePenalInterest":"1.75", - "preClosurePenalInterestOnType": { - "id": 1, - "code": "preClosurePenalInterestOnType.wholeTerm", - "value": "Whole term" - }, - "minDepositTerm":1, - "minDepositTermType": { - "id": 1, - "code": "deposit.term.savingsPeriodFrequencyType.weeks", - "value": "Weeks" - }, - "maxDepositTerm":5, - "maxDepositTermType": { - "id": 3, - "code": "deposit.term.savingsPeriodFrequencyType.years", - "value": "Years" - }, - "activeChart": { - "id": 8, - "fromDate": [ - 2014, - 1, - 1 - ], - "savingsProductId": 8, - "savingsProductName": "Fixed deposit product", - "chartSlabs": [ - { - "id": 18, - "description": "from 0 to 90 days", - "periodType": { - "id": 1, - "code": "interestChartPeriodType.weeks", - "value": "Weeks" - }, - "fromPeriod": 0, - "toPeriod": 90, - "annualInterestRate": 4.5, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - } - ], - "periodTypes": [ - { - "id": 0, - "code": "interestChartPeriodType.days", - "value": "Days" - }, - { - "id": 1, - "code": "interestChartPeriodType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "interestChartPeriodType.months", - "value": "Months" - }, - { - "id": 3, - "code": "interestChartPeriodType.years", - "value": "Years" - } - ] - } -} - + "loanId": 1 + } + +
-
-   -
-
-

Update a Recurring Deposit Product

-
-
- PUT https://Domain Name/api/v1/recurringdepositproducts/{productId} - POST recurringdepositproducts/1 -Content-Type: application/json -Request Body: -{ - "description": "Recurring deposit product new offerings", - "locale": "en", - "minDepositTerm":5, - "minDepositTermTypeId":1, -} - - -{ - "resourceId": 1, - "changes": { - "description": "Recurring deposit product new offerings", - "minDepositTerm": 5 - } -} - +   +
+
+

Undo Loan Application Approval

+
+
+ + POST https://DomainName/api/v1/loans/{loanId}?command=undoApproval + + + POST loans/1?command=undoApproval + Content-Type: application/json + Request Body: + { + "note": "Loan undo approval note" + } + + + { + "officeId": 1, + "clientId": 1, + "loanId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 100, + "code": "loanStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "pendingApproval": true, + "waitingForDisbursal": false, + "active": false, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "approvedOnDate": "" + } + } + +
-
-   -
-
-

Delete a Recurring Deposit Product

-
-
- -DELETE https://Domain Name/api/v1/recurringdepositdproducts/{productId} - - -DELETE recurringdepositdproducts/1 -Content-Type: application/json - - -{ - "resourceId": 1 -} - -
-
- -   -
-
-

List Recuring Deposit Products

-

Example Requests:

-
recurringdepositproducts
-

-
recurringdepositproducts?fields=name
-
-
- GET https://Domain Name/api/v1/recurringdepositproducts - -[ - { - "id": 3, - "name": "RD01", - "shortName": "RD01", - "description": "RD01", - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "recurringDepositFrequency":1, - "recurringDepositFrequencyType": { - "id": 2, - "code": "recurring.deposit.savingsPeriodFrequencyType.months", - "value": "Months" - }, - "preClosurePenalApplicable": false, - "minDepositTerm": 3, - "maxDepositTerm": 4, - "minDepositTermType": { - "id": 2, - "code": "deposit.term.savingsPeriodFrequencyType.months", - "value": "Months" - }, - "maxDepositTermType": { - "id": 3, - "code": "deposit.term.savingsPeriodFrequencyType.years", - "value": "Years" - }, - "interestCompoundingPeriodType": { - "id": 4, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "accountingRule": { - "id": 1, - "code": "accountingRuleType.none", - "value": "NONE" - } - } -] +   +
+
+

Assign a Loan Officer

+

Allows you to assign Loan Officer for existing Loan.

+
+
+ POST https://Domain + Name/api/v1/loans/{loanId}?command=assignLoanOfficer + POST loans/1?command=assignLoanOfficer + Content-Type: application/json + Request Body: + { + "toLoanOfficerId":2, + "assignmentDate":"02 September 2014", + "locale":"en", + "dateFormat":"dd MMMM yyyy", + "fromLoanOfficerId":"" + } + + + { + "officeId": 2, + "clientId": 6, + "loanId" : 3, + "resourceId": 3 + } + +
-
- - - -  -
-
-

Share Account:

-

Share accounts are instances of a praticular share product created for an individual. - An application process around the creation of accounts is also supported.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Starting StateActionResultant State
-SubmitSubmitted and pending approval
Submitted and pending approvalRejectClosed - Rejected
Submitted and pending approvalApproveApproved
ApprovedUndo ApprovalSubmitted and pending approval
ApprovedActivateActive
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
clientId
The client you are creating the share account for. clientId must be provided.
productId
The id of the product used for this share account. The share account inherits the selected currency of the product and possibly other details if not overridden in the share account creation request.
accountNo
The account no. associated with this account. Is auto generated if not provided at creation time.
externalId
A place to put an external reference for this share account useful in migrations e.g. The ID another system uses. If provided, it must be unique.
submittedOnDate
submittedOnDate must be provided when initially creating share account application. locale and dateFormat parameters must be provided with this.
savingsAccountId
The saving account id in which dividend amount should be posted.
minimumActivePeriod
Optional: If provided, used along with minimumActivePeriodFrequencyType to indicate the length of time that the share account for considering dividends. e.g. 60 Days
minimumActivePeriodFrequencyType
Optional: If provided, used along with minimumActivePeriod to indicate the length of time that the share account for considering dividends. 0=Days - e.g. 60 Days
lockinPeriodFrequency
Optional: If provided, used along with lockinPeriodFrequencyType to indicate the length of time that the shares is 'locked in' and redeems are not allowed. e.g. 6 Months
lockinPeriodFrequencyType
Optional: If provided, used along with lockinPeriodFrequency to indicate the length of time that the shares is 'locked in' and redeems are not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. 6 Months
applicationDate
Application date on which the first shares purchase should be considerd.
requestedShares
-
-
- -  -
-
-

Retrieve Share Account Template:

-

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
  • -
-

-

Arguments

-
-
clientId
-
Integer mandatory
-
productId
-
Integer optional
-
If entered, productId, productName and selectedProduct fields are returned.
-
-

Example Requests:

-
accounts/share/template?clientId=1
-

-
accounts/share/template?clientId=1&productId=1
-
-
- GET https://Domain Name/api/v1/accounts/share/template?clientId={clientId} - -{ - "clientId": 7, - "clientName": "Client Name", - "productOptions": [{ - "id": 1, - "name": "Share Product", - "shortName": "SP", - "totalShares": 100 - }] -} - -
- -
- GET https://Domain Name/api/v1/accounts/share/template?clientId={clientId}&productId={productId} - -{ - "clientId": 7, - "clientName": "Client Name", - "defaultShares": 100, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 100, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "currentMarketPrice": 5.00, - "charges": [{ - "chargeId": 20, - "name": "Share Account Activation Flat", - "chargeTimeType": { - "id": 13, - "code": "chargeTimeType.activation", - "value": "Share Account Activate" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "amount": 1.000000, - - }], - "lockinPeriodFrequencyTypeOptions": [{ - "id": 0, - "code": "savings.lockin.sharePeriodFrequencyType.days", - "value": "Days" - }, - { - "id": 1, - "code": "savings.lockin.sharePeriodFrequencyType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "savings.lockin.sharePeriodFrequencyType.months", - "value": "Months" - }, - { - "id": 3, - "code": "savings.lockin.sharePeriodFrequencyType.years", - "value": "Years" - }], - "minimumActivePeriodFrequencyTypeOptions": [{ - "id": 0, - "code": "savings.lockin.sharePeriodFrequencyType.days", - "value": "Days" - }], - "clientSavingsAccounts": [{ - "id": 13, - "accountNo": "000000013", - "depositType": { - "id": 100, - "code": "depositAccountType.savingsDeposit", - "value": "Savings" - } - }] -} - -
-
-  -
-
-

Submit new share application

-
- - - -
Mandatory Fields
clientId, productId, submittedDate, savingsAccountId, requestedShares, applicationDate
-
- - - -
Optional Fields
accountNo, externalId
-
- - - - -
Inherited from Product (if not provided)
minimumActivePeriod, minimumActivePeriodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType
-
-
-

Minimal request: accountNo auto generated, remaining details inherited from savings product.

- POST https://Domain Name/api/v1/accounts/share - POST savingsaccount -Content-Type: application/json -Request Body: -{ - "clientId": "7", - "productId": 1, - - "requestedShares": 100, - "externalId": "1", - "submittedDate": "01 May 2016", - "minimumActivePeriod": "1", - "minimumActivePeriodFrequencyType": 0, - "lockinPeriodFrequency": "1", - "lockinPeriodFrequencyType": 0, - "applicationDate": "01 May 2016", - "allowDividendCalculationForInactiveClients": true, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "charges": [{ - "chargeId": 20, - "amount": 1 - }, - { - "chargeId": 21, - "amount": 0.5 - }, - { - "chargeId": 23, - "amount": 2 - }], - - "savingsAccountId": 13 -} - - -{ - "resourceId": 1 -} - -
-
- -  -
-
-

Approve share application

-

Approves share application so long as its in 'Submitted and pending approval' state.

-
-
- POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=approve - POST shareaccount/1?command=approve -Content-Type: application/json -Request Body: -{ -"note":"notes", -"approvedDate":"01 May 2016", -"locale":"en", -"dateFormat":"dd MMMM yyyy" -} - - -{ - - "resourceId": 1, - "changes": { - "status": { - "id": 200, - "code": "shareAccountStatusType.approved", - "value": "Approved", - "submittedAndPendingApproval": false, - "approved": true, - "rejected": false, - "active": false, - "closed": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "approvedDate": "01 May 2016" - } -} - -
-
- -  -
-
-

Undo approval share application

-

Will move 'approved' share application back to 'Submitted and pending approval' state.

-
-
- POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=undoApproval - POST shareaccount/1?command=undoApproval -Content-Type: application/json -Request Body: -{ -} - - -{ - - "resourceId": 1, - "changes": { - "status": { - "id": 100, - "code": "shareAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "active": false, - "closed": false - }, - "approvedOnDate": "" - } -} - -
-
+   +
+
+

Unassign a Loan Officer

+

Allows you to unassign the Loan Officer.

+
+
+ POST https://Domain + Name/api/v1/loans/{loanId}?command=unassignLoanOfficer + POST clients/1?command=unassignLoanOfficer + Content-Type: application/json + Request Body: + { + "unassignedDate":"15 September 2014", + "locale":"en", + "dateFormat":"dd MMMM yyyy" + } + + + { + "officeId":2, + "clientId":6, + "loanId":3, + "resourceId":3 + } + +
+
-  -
-
-

Reject share application

-

Rejects share application so long as its in 'Submitted and pending approval' state.

-
-
- POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=reject - POST shareaccount/1?command=reject -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "rejectedDate": "03 March 2013" -} - - -{ - - "resourceId": 1, - "changes": { - "status": { - "id": 500, - "code": "shareAccountStatusType.rejected", - "value": "Rejected", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": true, - "active": false, - "closed": true - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "rejectedDate": "03 March 2013", - "closedDate": "03 March 2013" - } -} - -
-
+   +
+
+

Reject Loan Application

+ + + + + + + +
+
Mandatory Fields
+
rejectedOnDate
+
+
+ + POST https://DomainName/api/v1/loans/{loanId}?command=reject + + + POST loans/1?command=reject + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "rejectedOnDate": "20 September 2011", + "note": "Loan rejection reason." + } + + + { + "officeId": 1, + "clientId": 1, + "loanId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 500, + "code": "loanStatusType.rejected", + "value": "Rejected", + "pendingApproval": false, + "waitingForDisbursal": false, + "active": false, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "rejectedOnDate": "20 September 2011", + "closedOnDate": "20 September 2011" + } + } + +
+
-  -
-
-

Activate a share account

-

Results in an approved share application being converted into an 'active' share account.

-
-
- POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=activate - POST shareaccount/1?command=activate -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "activatedDate": "01 March 2013" -} - - -{ - "resourceId": 1, - "changes": { - "status": { - "id": 300, - "code": "shareAccountStatusType.active", - "value": "Active", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "active": true, - "closed": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "activatedDate": "01 March 2013" - } -} - -
-
+   +
+
+

Applicant Withdraws from Loan Application

+ + + + + + + +
+
Mandatory Fields
+
withdrawnOnDate
+
+
+ + POST https://DomainName/api/v1/loans/{loanId}?command=withdrawnByApplicant + + + POST loans/1?command=withdrawnByApplicant + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "withdrawnOnDate": "20 September 2011", + "note": "Reason loan applicant withdrew from application." + } + + + { + "officeId": 1, + "clientId": 1, + "loanId": 2, + "resourceId": 2, + "changes": { + "status": { + "id": 400, + "code": "loanStatusType.withdrawn.by.client", + "value": "Withdrawn by applicant", + "pendingApproval": false, + "waitingForDisbursal": false, + "active": false, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "withdrawnOnDate": "20 September 2011", + "closedOnDate": "20 September 2011" + } + } + +
+
-  -
-
-

Close a share account

-

Results in an Activated share application being converted into an 'closed' share account.

-

closedDate is closure date of share account

- - - - - - - -
Mandatory Fields
dateFormat,locale,closedDate
-
- -
-
- POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=close - POST shareaccount/5?command=close -Content-Type: application/json -Request Body: -{ - "dateFormat":"dd MMMM yyyy", - "locale":"en", - "closedDate":"26 August 2013", - "note":"close note" -} - - -{ - - "resourceId":5, - "changes":{ - "status":{ - "id":600, - "code":"shareAccountStatusType.closed", - "value":"Closed", - "submittedAndPendingApproval":false, - "approved":false, - "rejected":false, - "active":false, - "closed":true - }, - "locale":"en", - "dateFormat":"dd MMMM yyyy", - "closedOnDate":"26 August 2013", - "note":"close note" - } -} - - -
-
+   +
+
+

Disburse Loan

+ + + + + + + +
+
Mandatory Fields
+
actualDisbursementDate
+
+ + + + + + + +
+
Optional Fields
+
transactionAmount,fixedEmiAmount
+
+
+ + POST https://DomainName/api/v1/loans/{loanId}?command=disburse + + + POST loans/1?command=disburse + Content-Type: application/json + Request Body: + { + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "transactionAmount":10000, + "fixedEmiAmount""1100, + "actualDisbursementDate": "14 May 2013", + "paymentTypeId": "12", + "note": "", + "accountNumber": "accno123", + "checkNumber": "chec123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123" + } + + + { + "officeId": 1, + "clientId": 1, + "loanId": 1, + "resourceId": 1, + "changes": { + "accountNumber": "accno123", + "checkNumber": "chec123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123", + "status": { + "id": 300, + "code": "loanStatusType.active", + "value": "Active", + "pendingApproval": false, + "waitingForDisbursal": false, + "active": true, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "actualDisbursementDate": "14 May 2013", + "transactionAmount":10000 + } + } + +
+
-  -
-
-

Apply additional shares on a share account

-

requestedDate is requsted date of share purchase

-

requestedShares is number of shares to be purchase

- - - - - - - - -
Mandatory Fields
dateFormat,locale,requestedDate, requestedShares
-
- -
-
- POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=applyadditionalshares - POST shareaccount/5?command=applyadditionalshares -Content-Type: application/json -Request Body: -{ - "requestedDate": "04 May 2016", - "requestedShares": "10", - "locale": "en", - "dateFormat": "dd MMMM yyyy" -} - - -{ - - "resourceId":5, -} - - -
-
+   +
+
+

Disburse Loan To Savings Account

+ + + + + + + +
+
Mandatory Fields
+
actualDisbursementDate
+
+ + + + + + + +
+
Optional Fields
+
transactionAmount,fixedEmiAmount
+
+
+ + POST https://DomainName/api/v1/loans/{loanId}?command=disburseToSavings + + + POST loans/1?command=disburse + Content-Type: application/json + Request Body: + { + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "transactionAmount":10000, + "fixedEmiAmount""1100, + "actualDisbursementDate": "14 May 2013", + "note": "" + + + { + "officeId": 1, + "clientId": 1, + "loanId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 300, + "code": "loanStatusType.active", + "value": "Active", + "pendingApproval": false, + "waitingForDisbursal": false, + "active": true, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "actualDisbursementDate": "14 May 2013", + "transactionAmount":10000 + } + } + +
+
-  -
-
-

Approve additional shares request on a share account

-

requestedShares is Share purchase transaction ids

- - - - - - - - -
Mandatory Fields
requestedShares
-
- -
-
- POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=approveadditionalshares - POST shareaccount/5?command=approveadditionalshares -Content-Type: application/json -Request Body: -{ - "requestedShares": [{ - "id": 34 - }] -} - - -{ - - "resourceId":5, -} - - -
-
+   +
+
+

Undo Loan Disbursal

+
+
+ + POST https://DomainName/api/v1/loans/{loanId}?command=undoDisbursal + + + POST loans/1?command=undoDisbursal + Content-Type: application/json + { + "note": "Some comment" + } + + + { + "officeId": 1, + "clientId": 1, + "loanId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 200, + "code": "loanStatusType.approved", + "value": "Approved", + "pendingApproval": false, + "waitingForDisbursal": true, + "active": false, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "actualDisbursementDate": "" + } + } + +
+
+ -  -
-
-

Reject additional shares request on a share account

-

requestedShares is Share purchase transaction ids

- - - - - - - - -
Mandatory Fields
requestedShares
-
- -
-
- POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=rejectadditionalshares - POST shareaccount/5?command=rejectadditionalshares -Content-Type: application/json -Request Body: -{ - "requestedShares":[{"id":35}] -} - - -{ - - "resourceId":5, -} - - -
-
+   +
+
+

Submit new GLIM Application

+

Allows you to Submit the GLIM Application. GLIM Application should be in Pending state.

+ + + + + + + +
+
Mandatory Fields
+
interestRatePerPeriod, expectedDisbursementDate, clientId, groupId, productId, totalLoan, + loanType, interestType, + principal, charges, transactionProcessingStrategyCode, submittedOnDate, amortizationType, + repaymentFrequencyType, + loanTermFrequencyType, loanTermFrequency, repaymentEvery, numberOfRepayments, + interestCalculationPeriodType, + isParentAccount, locale,dateFormat +
-  -
-
-

Redeem shares on a share account

-

Results redeem some/all shares from share account.

-

requestedDate is requsted date of shares redeem

-

requestedShares is number of shares to be redeemed

- - - - - - - - -
Mandatory Fields
dateFormat,locale,requestedDate,requestedShares
-
- -
-
- POST https://Domain Name/api/v1/accounts/share/{shareAccountId}?command=redeemshares - POST shareaccount/5?command=redeemshares -Content-Type: application/json -Request Body: -{ - "requestedDate": "04 May 2016", - "requestedShares": "4", - "locale": "en", - "dateFormat": "dd MMMM yyyy" -} - - -{ - - "resourceId":5, -} - - -
-
+
+
+ + https://DomainName/fineract-provider/api/v1/loans + + + POST: loans + Content-Type: application/json + Request Body: + { + "interestRatePerPeriod":"2", + "expectedDisbursementDate":"10 June 2020", + "productId":"1", + "loanType":"glim", + "dateFormat":"dd MMMM yyyy", + "groupId":"1", + "clientId":"2", + "totalLoan":"10", + "interestType":"0", + "locale":"en_GB", + "principal":"1000.00", + "charges":[], + "transactionProcessingStrategyCode":"mifos-standard-strategy", + "submittedOnDate":"10 June 2020", + "amortizationType":"1", + "repaymentFrequencyType":"2", + "loanTermFrequencyType":"2", + "loanTermFrequency":"10", + "repaymentEvery":"1", + "numberOfRepayments":"10", + "interestCalculationPeriodType":"1", + "isParentAccount":"1" + } + -  -
-
-

List share applications/accounts

-

Example Requests:

-
shareaccount
- -
-
- GET https://Domain Name/api/v1/accounts/share - -{ - "totalFilteredRecords": 1, - "pageItems": [ - { - "id": 1, - "accountNo": "000000001", - "clientId": 1, - "clientName": "Client Name", - "productId": 1, - "productName": "Share Product Name", - - "status": { - "id": 100, - "code": "shareAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "active": false, - "closed": false - }, - "timeline": { - "submittedOnDate": [ - 2013, - 3, - 1 - ] - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "purchasedShares" : [ - {"id":1, - "purchasedDate":"01 May 2013", - "numberOfShares": 10, - "purchasedPrice": 5 - } - ], - - "summary": { - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - } - } - ] -} - + + { + "officeId": 1, + "groupId": 1, + "clientId": 2, + "loanId": 2, + "resourceId": 2, + "glimId": 1 + } + +
-
-  -
-
-

Retrieve a share application/account:

- -

Example Requests :

-
shareaccount/1
-
-
- GET https://DomainName/api/v1/accounts/share/{accountId} - -{ - "id": 2, - "accountNo": "000000002", - "savingsAccountNumber": "000000013", - "clientId": 7, - "clientName": "Client_FirstName_2KX8C Client_LastName_NWNG", - "productId": 1, - "productName": "Share Product", - "status": { - "id": 300, - "code": "shareAccountStatusType.active", - "value": "Active", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "active": true, - "closed": false - }, - "timeline": { - "submittedOnDate": [2016, - 4, - 1], - "submittedByUsername": "mifos", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator", - "approvedDate": [2016, - 4, - 1], - "approvedByUsername": "mifos", - "approvedByFirstname": "App", - "approvedByLastname": "Administrator", - "activatedDate": [2016, - 4, - 1] - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 100, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "summary": { - "id": 2, - "accountNo": "000000002", - "totalApprovedShares": 1, - "totalPendingForApprovalShares": 0, - "productId": 1, - "productName": "Conflux Share Product", - "status": { - "id": 300, - "code": "shareAccountStatusType.active", - "value": "Active", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "active": true, - "closed": false - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 100, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "timeline": { - "submittedOnDate": [2016, - 4, - 1], - "submittedByUsername": "mifos", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator", - "approvedDate": [2016, - 4, - 1], - "approvedByUsername": "mifos", - "approvedByFirstname": "App", - "approvedByLastname": "Administrator", - "activatedDate": [2016, - 4, - 1] - } - }, - "purchasedShares": [{ - "id": 6, - "accountId": 2, - "purchasedDate": [2016, - 4, - 1], - "numberOfShares": 10, - "purchasedPrice": 0.50, - "status": { - "id": 300, - "code": "purchasedSharesStatusType.approved", - "value": "Approved" - }, - "type": { - "id": 500, - "code": "purchasedSharesType.purchased", - "value": "Purchase" - }, - "amount": 5.05, - "chargeAmount": 0.05, - "amountPaid": 5.05 - }, - { - "id": 7, - "accountId": 2, - "purchasedDate": [2016, - 4, - 21], - "status": { - "id": 300, - "code": "purchasedSharesStatusType.approved", - "value": "Approved" - }, - "type": { - "id": 700, - "code": "charge.payment", - "value": "Charge Payment" - }, - "amount": 1.00, - "chargeAmount": 0, - "amountPaid": 1.00 - }, - { - "id": 8, - "accountId": 2, - "purchasedDate": [2016, - 4, - 2], - "numberOfShares": 5, - "purchasedPrice": 0.50, - "status": { - "id": 300, - "code": "purchasedSharesStatusType.approved", - "value": "Approved" - }, - "type": { - "id": 600, - "code": "purchasedSharesType.redeemed", - "value": "Redeem" - }, - "amount": 2.45, - "chargeAmount": 0.05, - "amountPaid": 2.45 - }, - { - "id": 9, - "accountId": 2, - "purchasedDate": [2016, - 4, - 3], - "numberOfShares": 10, - "purchasedPrice": 0.50, - "status": { - "id": 300, - "code": "purchasedSharesStatusType.approved", - "value": "Approved" - }, - "type": { - "id": 500, - "code": "purchasedSharesType.purchased", - "value": "Purchase" - }, - "amount": 5.05, - "chargeAmount": 0.05, - "amountPaid": 5.05 - }, - { - "id": 10, - "accountId": 2, - "purchasedDate": [2016, - 4, - 4], - "numberOfShares": 5, - "purchasedPrice": 0.50, - "status": { - "id": 300, - "code": "purchasedSharesStatusType.approved", - "value": "Approved" - }, - "type": { - "id": 500, - "code": "purchasedSharesType.purchased", - "value": "Purchase" - }, - "amount": 2.52, - "chargeAmount": 0.02, - "amountPaid": 2.52 - }, - { - "id": 11, - "accountId": 2, - "purchasedDate": [2016, - 4, - 5], - "numberOfShares": 15, - "purchasedPrice": 0.50, - "status": { - "id": 300, - "code": "purchasedSharesStatusType.approved", - "value": "Approved" - }, - "type": { - "id": 600, - "code": "purchasedSharesType.redeemed", - "value": "Redeem" - }, - "amount": 7.35, - "chargeAmount": 0.15, - "amountPaid": 7.35 - }, - { - "id": 31, - "accountId": 2, - "purchasedDate": [2016, - 5, - 4], - "numberOfShares": 4, - "purchasedPrice": 5.00, - "status": { - "id": 300, - "code": "purchasedSharesStatusType.approved", - "value": "Approved" - }, - "type": { - "id": 600, - "code": "purchasedSharesType.redeemed", - "value": "Redeem" - }, - "amount": 19.60, - "chargeAmount": 0.40, - "amountPaid": 19.60 - }], - "savingsAccountId": 13, - "currentMarketPrice": 5.00, - "lockinPeriod": 1, - "lockPeriodTypeEnum": { - "id": 0, - "code": "savings.lockin.sharePeriodFrequencyType.days", - "value": "Days" - }, - "minimumActivePeriod": 1, - "minimumActivePeriodTypeEnum": { - "id": 0, - "code": "savings.lockin.sharePeriodFrequencyType.days", - "value": "Days" - }, - "allowDividendCalculationForInactiveClients": true, - "charges": [{ - "id": 9, - "chargeId": 20, - "accountId": 2, - "name": "Share Account Activation Flat", - "chargeTimeType": { - "id": 13, - "code": "chargeTimeType.activation", - "value": "Share Account Activate" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "percentage": 0, - "amountPercentageAppliedTo": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 1.000000, - "amountPaid": 1.000000, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 0.000000, - "amountOrPercentage": 1.000000, - "isActive": true - }, - { - "id": 7, - "chargeId": 21, - "accountId": 2, - "name": "Share Purchase %", - "chargeTimeType": { - "id": 14, - "code": "chargeTimeType.sharespurchase", - "value": "Share Purchase" - }, - "chargeCalculationType": { - "id": 2, - "code": "chargeCalculationType.percent.of.amount", - "value": "% Amount" - }, - "percentage": 1.000000, - "amountPercentageAppliedTo": 12.500000, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 0.120000, - "amountPaid": 0.120000, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 0.000000, - "amountOrPercentage": 1.000000, - "isActive": true - }, - { - "id": 8, - "chargeId": 23, - "accountId": 2, - "name": "Share Redeem %", - "chargeTimeType": { - "id": 15, - "code": "chargeTimeType.sharesredeem", - "value": "Share Redeem" - }, - "chargeCalculationType": { - "id": 2, - "code": "chargeCalculationType.percent.of.amount", - "value": "% Amount" - }, - "percentage": 2.000000, - "amountPercentageAppliedTo": 30.000000, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 0.600000, - "amountPaid": 0.600000, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 0.000000, - "amountOrPercentage": 2.000000, - "isActive": true - }], - "dividends": [] -} - -
-
+   +
+
+

Approve GLIM Application

+

Allows you to Approve the GLIM Application.

+ + + + + + + +
+
Mandatory Fields
+
loanId, approvedOnDate, dateFormat, locale, glimPrincipal
+
+
+ + POST https://DomainName/fineract-provider/api/v1/loans/glimAccount/{glimId}?command=approve + + + POST: loans/glimAccount/1?command=approve + Content-Type: application/json + Request Body: + { + "approvalFormData":[ + { + "loanId":2, + "approvedOnDate": "12 June 2020", + "dateFormat":"dd MMMM yyyy", + "locale":"en" + } + ], + "glimPrincipal":1000, + "locale"="en" + } + -  -
-
-

Modify a share application

-

Share 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

-
-
- PUT https://Domain Name/api/v1/accounts/share/{accountsId} - PUT shareaccount/1 -Content-Type: application/json -No Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "applicationDate": "01 April 2016", - "requestedShares": "20", -} - - -{ - - "resourceId": 1, - "changes": { - "dateFormat": "dd MMMM yyyy", - "applicationDate": "01 April 2016", - "requestedShares": "20", - "locale": "en" - } -} - -
-
- - -   -
-
-

Savings Account:

-

Savings accounts are instances of a praticular savings product created for an individual or group. An application process around the creation of accounts is also supported.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Starting StateActionResultant State
-SubmitSubmitted and pending approval
Submitted and pending approvalRejectClosed - Rejected
Submitted and pending approvalWithdrawn by ApplicantClosed - Withdrawn by Applicant
Submitted and pending approvalApproveApproved
ApprovedUndo ApprovalSubmitted and pending approval
ApprovedActivateActive
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
clientId
The client you are creating the savings account for. Either clientId or groupId must be provided.
groupId
The group you are creating the savings account for. Either clientId or groupId must be provided.
productId
The id of the product used for this savings account. The savings account inherits the selected currency of the product and possibly other details if not overridden in the savings account creation request.
accountNo
The account no. associated with this loan. Is auto generated if not provided at creation time.
externalId
A place to put an external reference for this savings account useful in migrations e.g. The ID another system uses. If provided, it must be unique.
submittedOnDate
submittedOnDate must be provided when initially creating savings account application. locale and dateFormat parameters must be provided with this.
nominalAnnualInterestRate
The interest rate set for savings account e.g. 5% Per year - It is always expressed as the Nominal APR.
interestCompoundingPeriodType
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end of month)
interestPostingPeriodType
The period at which interest rate is posted or credited to savings account. The actual crediting or posting transaction is date as occurring on the day after the end of the period. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, 30th Sep, 31st Dec), 7=Annually (at end of calendar year 31st Dec)
interestCalculationType
The interest calculation method used: 1=Daily Balance or 2=Average Daily Balance
interestCalculationDaysInYearType
The setting for number of days in year to use: 360=360 Days, 365=365 Days
minRequiredOpeningBalance
Optional: If provided, sets the minimum deposit amount required to open a savings account e.g. 2,000
lockinPeriodFrequency
Optional: If provided, used along with lockinPeriodFrequencyType to indicate the length of time that the savings account is 'locked in' and withdrawals are not allowed. e.g. 6 Months
lockinPeriodFrequencyType
Optional: If provided, used along with lockinPeriodFrequency to indicate the length of time that the savings account is 'locked in' and withdrawals are not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. 6 Months
withdrawalFeeForTransfers
Optional: Used along with withdrawalFeeAmount to indicate whether the withdrawal fee should be applied on the account for account transfers .
allowOverdraft
Optional: If provided, depending on the value mark the savings account as overdraft account
overdraftLimit
Optional: If provided, sets the maximum allowed overdraft amount for a savings account e.g. 5,000 else set the limit as zero
withHoldTax
Optional: If tax group provided at product level, will allow to Enable or disable withhold tax on interest posting for savings account
datatables
Additional Mandatory Field if Entity-Datatable Check is enabled for the entity of type Savings.
-
-
- -   -
-
-

Retrieve Savings Account Template:

-

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
  • -
-

-

Arguments

-
-
clientId
-
Integer mandatory
-
productId
-
Integer optional
-
If entered, productId, productName and selectedProduct fields are returned.
-
-

Example Requests:

-
savingsaccounts/template?clientId=1
-

-
savingsaccounts/template?clientId=1&productId=1
-
-
- GET https://Domain Name/api/v1/savingsaccounts/template?clientId={clientId} - -{ - "clientId": 1, - "clientName": "small business", - "productOptions": [ - { - "id": 1, - "name": "Passbook Savings" - } - ] -} - -
- -
- GET https://Domain Name/api/v1/savingsaccounts/template?clientId={clientId}&productId={productId} - -{ - "clientId": 1, - "clientName": "small business", - "savingsProductId": 1, - "savingsProductName": "Passbook Savings", - "timeline": {}, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "nominalAnnualInterestRate": 5, - "interestCompoundingPeriodType": { - "id": 1, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", - "value": "Daily" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "productOptions": [ - { - "id": 1, - "name": "Passbook Savings" - } - ], - "fieldOfficerOptions": [ - { - "id": 3, - "firstname": "Mrs.", - "lastname": "loanofficerB1", - "displayName": "loanofficerB1, Mrs.", - "officeId": 2, - "officeName": "branch 1", - "isLoanOfficer": true - }, - { - "id": 1, - "firstname": "Mr.", - "lastname": "loanofficerHO", - "displayName": "loanofficerHO, Mr.", - "officeId": 1, - "officeName": "branch 1", - "isLoanOfficer": true - } - ], - "interestCompoundingPeriodTypeOptions": [ - { - "id": 1, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", - "value": "Daily" - }, - { - "id": 4, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", - "value": "Monthly" - } - ], - "interestPostingPeriodTypeOptions": [ - { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - { - "id": 5, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.quarterly", - "value": "Quarterly" - }, - { - "id": 7, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.annual", - "value": "Annually" - } - ], - "interestCalculationTypeOptions": [ - { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - { - "id": 2, - "code": "savingsInterestCalculationType.averagedailybalance", - "value": "Average Daily Balance" - } - ], - "interestCalculationDaysInYearTypeOptions": [ - { - "id": 360, - "code": "savingsInterestCalculationDaysInYearType.days360", - "value": "360 Days" - }, - { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - } - ], - "lockinPeriodFrequencyTypeOptions": [ - { - "id": 0, - "code": "savings.lockin.savingsPeriodFrequencyType.days", - "value": "Days" - }, - { - "id": 1, - "code": "savings.lockin.savingsPeriodFrequencyType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "savings.lockin.savingsPeriodFrequencyType.months", - "value": "Months" - }, - { - "id": 3, - "code": "savings.lockin.savingsPeriodFrequencyType.years", - "value": "Years" - } - ], - "withdrawalFeeTypeOptions": [ - { - "id": 1, - "code": "savingsWithdrawalFeesType.flat", - "value": "Flat" - }, - { - "id": 2, - "code": "savingsWithdrawalFeesType.percent.of.amount", - "value": "% of Amount" - } - ], - "chargeOptions": [ - { - "id": 4, - "name": "Savings charge 1", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 200, - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeAppliesTo": { - "id": 2, - "code": "chargeAppliesTo.savings", - "value": "Savings" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "chargepaymentmode.regular" - } - }, - { - "id": 5, - "name": "Savings charge 2", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 300, - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeAppliesTo": { - "id": 2, - "code": "chargeAppliesTo.savings", - "value": "Savings" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "chargepaymentmode.regular" - } - }, - { - "id": 6, - "name": "Annual fee", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 50, - "chargeTimeType": { - "id": 6, - "code": "chargeTimeType.annualFee", - "value": "Annual Fee" - }, - "chargeAppliesTo": { - "id": 2, - "code": "chargeAppliesTo.savings", - "value": "Savings" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - }, - { - "id": 7, - "name": "Quarterly fee", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 5, - "chargeTimeType": { - "id": 7, - "code": "chargeTimeType.monthlyFee", - "value": "Monthly Fee" - }, - "chargeAppliesTo": { - "id": 2, - "code": "chargeAppliesTo.savings", - "value": "Savings" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - }, - "feeOnMonthDay": [ - 10, - 5 - ], - "feeInterval": 4 - } - ], - "datatables": [{ - "applicationTableName": "m_savings_account", - "registeredTableName": "Savings Address Enrichment", - "columnHeaderData": [{ - "columnName": "savings_account_id", - "columnType": "bigint", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": false, - "isColumnPrimaryKey": true, - "columnValues": [] - }, - { - "columnName": "Name", - "columnType": "varchar", - "columnLength": 25, - "columnDisplayType": "STRING", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "COUNTRY_cd_country details", - "columnType": "int", - "columnLength": 0, - "columnDisplayType": "CODELOOKUP", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [{ - "id": 17, - "value": "India", - "score": 0 - }], - "columnCode": "COUNTRY" - }] - }] -} - -
-
- -   -
-
-

Submit new savings application

-
- - - -
Mandatory Fields
clientId or groupId, productId, submittedOnDate
-
- - - -
Optional Fields
accountNo, externalId, fieldOfficerId
-
- - - - -
Inherited from Product (if not provided)
nominalAnnualInterestRate, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType, withdrawalFeeForTransfers, allowOverdraft, overdraftLimit, withHoldTax
-
- - - - - - - -
Additional Mandatory Field if Entity-Datatable Check is enabled for the entity of type Savings.
datatables
-
-
-

Minimal request: accountNo auto generated, remaining details inherited from savings product.

- POST https://Domain Name/api/v1/savingsaccounts - POST savingsaccount -Content-Type: application/json -Request Body: -{ - "clientId": 1, - "productId": 1, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "submittedOnDate": "01 March 2011" -} - -

Minimal request: accountNo provided (must be unique), remaining details inherited from savings product.

- POST savingsaccount -Content-Type: application/json -Request Body: -{ - "clientId": 1, - "productId": 1, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "submittedOnDate": "01 March 2011", - "accountNo": "SA000023", - "externalId": "SYS-23" -} - -

Full request: accountNo provided (must be unique), remaining details override details from savings product (except currency).

- POST savingsaccount -Content-Type: application/json -Request Body: -{ - "clientId": 1, - "productId": 1, - "fieldOfficerId": 1, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "submittedOnDate": "01 March 2013", - "accountNo": "SA000023", - "externalId": "SYS-23", - "nominalAnnualInterestRate": "5.65", - "interestCompoundingPeriodType": 1, - "interestPostingPeriodType": 4, - "interestCalculationType": 1, - "interestCalculationDaysInYearType": 365, - "minRequiredOpeningBalance": "1,000", - "lockinPeriodFrequency": 6, - "lockinPeriodFrequencyType": 2, - "allowOverdraft":true, - "overdraftLimit":5000, - "charges":[{"id":"1"}], - "datatables": [{ - "registeredTableName": "Savings Enrichment", - "data": { - "locale": "en", - "Name": "Raj", - "COUNTRY_cd_country details": 17 - } - }, - { - "registeredTableName": "SavingsDataTableCreate", - "data": { - "locale": "en", - "Volume": "25", - "CurrentTimestamp": "01 December 2016 12:44", - "dateFormat": "dd MMMM yyyy HH:mm", - "DateData": "01 December 2016 00:00" - } - }] -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1 -} - -
-
- -  -
-
-

Approve savings application

-

Approves savings application so long as its in 'Submitted and pending approval' state.

-
-
- POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=approve - POST savingsaccount/1?command=approve -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "approvedOnDate": "01 March 2013" -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 200, - "code": "savingsAccountStatusType.approved", - "value": "Approved", - "submittedAndPendingApproval": false, - "approved": true, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "approvedOnDate": "02 March 2013" - } -} - -
-
- -   -
-
-

Undo approval savings application

-

Will move 'approved' savings application back to 'Submitted and pending approval' state.

-
-
- POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=undoApproval - POST savingsaccount/1?command=undoApproval -Content-Type: application/json -Request Body: -{ -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 100, - "code": "savingsAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false - }, - "approvedOnDate": "" - } -} - -
-
- -  -
-
-

Assign Savings Officer

-

Allows you to assign Savings Officer for existing Savings Account.

-
-
- POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=assignSavingsOfficer - POST savingsaccounts/1?command=assignSavingsOfficer -Content-Type: application/json -Request Body: -{ - assignmentDate : "04 September 2014", - dateFormat : "dd MMMM yyyy", - fromSavingsOfficerId : "", - locale : "en", - toSavingsOfficerId : 2 -} - - -{ - "officeId":2, - "savingsId":8, - "resourceId":8, - "changes":{"savingsOfficerId":2} -} - -
-
- -   -
-
-

Unassign Savings Officer

-

Allows you to unassign the Savings Officer.

-
-
- POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=unassignSavingsOfficer - POST savingsaccounts/1?command=unassignSavingsOfficer -Content-Type: application/json -Request Body: -{ - dateFormat : "dd MMMM yyyy", - locale : "en", - unassignedDate : "05 September 2014" -} - - -{ - "officeId":2, - "clientId":8, - "resourceId":8, - "changes":{} -} - -
-
- -   -
-
-

Reject savings application

-

Rejects savings application so long as its in 'Submitted and pending approval' state.

-
-
- POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=reject - POST savingsaccount/1?command=reject -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "rejectedOnDate": "03 March 2013" -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 500, - "code": "savingsAccountStatusType.rejected", - "value": "Rejected", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": true, - "withdrawnByApplicant": false, - "active": false, - "closed": true - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "rejectedOnDate": "03 March 2013", - "closedOnDate": "03 March 2013" - } -} - -
-
- -   -
-
-

Withdraw savings application

-

Used when an applicant withdraws from the savings application. It must be in 'Submitted and pending approval' state.

-
-
- POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=withdrawnByApplicant - POST savingsaccount/1?command=withdrawnByApplicant -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "withdrawnOnDate": "03 March 2013" -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 400, - "code": "savingsAccountStatusType.withdrawn.by.applicant", - "value": "Withdrawn by applicant", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "withdrawnByApplicant": true, - "active": false, - "closed": true - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "withdrawnOnDate": "03 March 2013", - "closedOnDate": "03 March 2013" - } -} - -
-
- -   -
-
-

Activate a savings account

-

Results in an approved savings application being converted into an 'active' savings account.

-
-
- POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=activate - POST savingsaccount/1?command=activate -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "activatedOnDate": "01 March 2013" -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 300, - "code": "savingsAccountStatusType.active", - "value": "Active", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": true, - "closed": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "activatedOnDate": "01 March 2013" - } -} - -
-
- -   -
-
-

Close a savings account

-

Results in an Activated savings application being converted into an 'closed' savings account.

-

closedOnDate is closure date of savings account

-

withdrawBalance is a boolean value, true value of this field performs a withdrawal transaction with account's running balance.

- - - - - - - -
Mandatory Fields
dateFormat,locale,closedOnDate
-
- - - - - - - -
Optional Fields
note, withdrawBalance, paymentTypeId, accountNumber, checkNumber, routingCode, receiptNumber, bankNumber
-
-
- POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=close - POST savingsaccount/5?command=close -Content-Type: application/json -Request Body: -{ - "dateFormat":"dd MMMM yyyy", - "locale":"en", - "closedOnDate":"26 August 2013", - "note":"close note" -} - - -{ - "officeId":1, - "clientId":1, - "savingsId":5, - "resourceId":5, - "changes":{ - "status":{ - "id":600, - "code":"savingsAccountStatusType.closed", - "value":"Closed", - "submittedAndPendingApproval":false, - "approved":false, - "rejected":false, - "withdrawnByApplicant":false, - "active":false, - "closed":true - }, - "locale":"en", - "dateFormat":"dd MMMM yyyy", - "closedOnDate":"26 August 2013", - "note":"close note" - } -} - - POST savingsaccount/5?command=close -Content-Type: application/json -Request Body: -{ - "dateFormat":"dd MMMM yyyy", - "locale":"en", - "closedOnDate":"26 August 2013", - "note":"close note", - "withdrawBalance":true, - "paymentTypeId": "14", - "accountNumber": "acc123", - "checkNumber": "che123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123" -} - - -{ - "officeId":1, - "clientId":1, - "savingsId":5, - "resourceId":5, - "changes":{ - "accountNumber": "acc123", - "checkNumber": "che123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123", - "status":{ - "id":600, - "code":"savingsAccountStatusType.closed", - "value":"Closed", - "submittedAndPendingApproval":false, - "approved":false, - "rejected":false, - "withdrawnByApplicant":false, - "active":false, - "closed":true - }, - "locale":"en", - "dateFormat":"dd MMMM yyyy", - "closedOnDate":"26 August 2013", - "note":"close note" - } -} - -
-
- -   -
-
-

Calculate Interest on Savings Account

-

- Calculates interest earned on a savings account based on todays date. It does not attempt to post or credit the interest on the account. That is responsibility of the Post Interest API that will likely be called by overnight process. -

-
-
- POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=calculateInterest - POST savingsaccount/1?command=calculateInterest -Content-Type: application/json -Request Body: -{ -} - - -{ - "officeId": 1, - "clientId": 1, - "savingsId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

Post Interest on Savings Account

-

- Calculates and Posts interest earned on a savings account based on todays date and whether an interest posting or crediting event is due. -

-
-
- POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=postInterest - POST savingsaccount/1?command=postInterest -Content-Type: application/json -Request Body: -{ -} - - -{ - "officeId": 1, - "clientId": 1, - "savingsId": 1, - "resourceId": 1 -} - -
-
-  -
-
-

Block Savings Account

-

- Blocks Savings account from all types of credit and debit transactions -

-
-
- POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=block - POST savingsaccount/1?command=block -Content-Type: application/json -Request Body: -{ -} - - -{ - "officeId":1, - "clientId":1, - "savingsId":1, - "resourceId":1, - "changes":{ - "subStatus":{ - "id":400, - "code":"SavingsAccountSubStatusEnum.block", - "value":"Block", - "none":false, - "inactive":false, - "dormant":false, - "escheat":false, - "block":true, - "blockCredit":false, - "blockDebit":false - } - } -} - -
-
- -  -
-
-

Unblock Savings Account

-

- Unblock a blocked account. On unblocking account, user can perform debit and credit transactions -

-
-
- POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=unblock - POST savingsaccount/1?command=unblock -Content-Type: application/json -Request Body: -{ -} - - -{ - "officeId":1, - "clientId":1, - "savingsId":1, - "resourceId":1, - "changes":{ - "subStatus":{ - "id":0, - "code":"SavingsAccountSubStatusEnum.none", - "value":"None", - "none":true, - "inactive":false, - "dormant":false, - "escheat":false, - "block":false, - "blockCredit":false, - "blockDebit":false - } - } -} - -
-
- -  -
-
-

Block Savings Account Credit transactions

-

- Savings account will be blocked from all types of credit transactions. -

-
-
- POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=blockCredit - POST savingsaccount/1?command=blockCredit -Content-Type: application/json -Request Body: -{ -} - - -{ - "officeId":1, - "clientId":1, - "savingsId":1, - "resourceId":1, - "changes":{ - "subStatus":{ - "id":500, - "code":"SavingsAccountSubStatusEnum.blockcredit", - "value":"BlockCredit", - "none":false, - "inactive":false, - "dormant":false, - "escheat":false, - "block":false, - "blockCredit":true, - "blockDebit":false - } - } -} - -
-
- -  -
-
-

Unblock Savings Account Credit transactions

-

It unblocks the Saving account's credit operations. Now all types of credits can be transacted to Savings account -

-
-
- POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=unblockCredit - POST savingsaccount/1?command=unblockCredit -Content-Type: application/json -Request Body: -{ -} - - -{ - "officeId":1, - "clientId":1, - "savingsId":1, - "resourceId":1, - "changes":{ - "subStatus":{ - "id":0, - "code":"SavingsAccountSubStatusEnum.none", - "value":"None", - "none":true, - "inactive":false, - "dormant":false, - "escheat":false, - "block":false, - "blockCredit":false, - "blockDebit":false - } - } -} - -
-
- - -  -
-
-

Block Savings Account Debit transactions

-

All types of debit operations from Savings account wil be blocked

-
-
- POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=blockDebit - POST savingsaccount/1?command=blockDebit -Content-Type: application/json -Request Body: -{ -} - - -{ - "officeId":1, - "clientId":1, - "savingsId":1, - "resourceId":1, - "changes":{ - "subStatus":{ - "id":600, - "code":"SavingsAccountSubStatusEnum.blockdebit", - "value":"BlockDebit", - "none":false, - "inactive":false, - "dormant":false, - "escheat":false, - "block":false, - "blockCredit":false, - "blockDebit":true - } - } -} - -
-
- -  -
-
-

Unblock Savings Account debit transactions

-

It unblocks the Saving account's debit operations. Now all types of debits can be transacted from Savings account -

-
-
- POST https://Domain Name/api/v1/savingsaccounts/{savingsId}?command=unblockDebit - POST savingsaccount/1?command=unblockDebit -Content-Type: application/json -Request Body: -{ -} - - -{ - "officeId":1, - "clientId":1, - "savingsId":1, - "resourceId":1, - "changes":{ - "subStatus":{ - "id":0, - "code":"SavingsAccountSubStatusEnum.none", - "value":"None", - "none":true, - "inactive":false, - "dormant":false, - "escheat":false, - "block":false, - "blockCredit":false, - "blockDebit":false - } - } -} - -
-
- -  -
-
-

Submit New GSIM

-

The API concept of GSIM models the Group Savings Individual Monitoring system and the process of maintaining the savings of groups.

- - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
gsimId
The gsimId associated with the account is Auto Generated and it is pass through route-parameters while taking actions on that specific GSIM Account.
isGSIM
isGSIM is a boolean value, which is included when a savings account will be child account of a GSIM.
childAccountId
childAccountId is the Id of Savings Account linked to the GSIM Account(ParentAccount).
-
-
- -POST https://DomainName/fineract-provider/api/v1/savingsaccounts/gsim - - -{ - "clientArray":[ - { - "clientId":2, - "groupId":1, - "productId":"1", - "submittedOnDate":"10 June 2020", - "dateFormat":"dd MMMM yyyy", - "locale":"en", - "isParentAccount":1, - "isGSIM":true, - "applicationId":1234 - }, - { - "clientId":5, - "groupId":1, - "productId":"1", - "submittedOnDate":"10 June 2020", - "dateFormat":"dd MMMM yyyy", - "locale":"en", - "isParentAccount":1, - "isGSIM":true, - "applicationId":1234 - } - ] -} - - - - -{ - "officeId": 1, - "groupId": 1, - "clientId": 5, - "savingsId": 2, - "resourceId": 2, - "gsimId": 2 -} - -
-
+ + { + "officeId": 1, + "groupId": 1, + "clientId": 2, + "loanId": 2, + "resourceId": 2, + "changes": { + "status": { + "id": 200, + "code": "loanStatusType.approved", + "value": "Approved", + "pendingApproval": false, + "waitingForDisbursal": true, + "active": false, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "approvedOnDate": "12 June 2020" + } + } + +
+
-  -
-
-

Approve GSIM application

-

Approves GSIM application so long as its in 'Submitted and pending approval' state.

- - - - - - - -
Mandatory Fields
approvedOnDate, dateFormat, locale
-
-
- -POST https://DomainName/fineract-provider/api/v1/savingsaccounts/gsimcommands/{gsimId}?command=approve - - - -{ - "approvedOnDate": "03 June 2020", - "dateFormat":"dd MMMM yyyy", - "locale":"en" -} - - - -{ - "officeId": 1, - "groupId": 2, - "clientId": 4, - "savingsId": 13, - "resourceId": 13, - "changes": { - "status": { - "id": 200, - "code": "savingsAccountStatusType.approved", - "value": "Approved", - "submittedAndPendingApproval": false, - "approved": true, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false, - "prematureClosed": false, - "transferInProgress": false, - "transferOnHold": false, - "matured": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "approvedOnDate": "03 June 2020" - } -} - -
+   +
+
+

Undo approval GLIM Application

+

Allows you to undoApprove the GLIM Application. GLIM application should be in Approved state.

+ + + + + + + +
+
Optional Fields
+
note
+
+ + POST https://DomainName/fineract-provider/api/v1/loans/glimAccount/{glimId}?command=undoapproval + + + POST: loans/glimAccount/1?command=undoapproval + Content-Type: application/json + Request Body: + { + "note":"Undoapproving glim application due to some reasons" + } + -  -
-
-

UndoApproval GSIM application

-

Will move 'approved' GSIM application back to 'Submitted and pending approval' state.

- - - - - - - -
Optional Fields
note
+ + { + "officeId": 1, + "groupId": 1, + "clientId": 2, + "loanId": 2, + "resourceId": 2, + "changes": { + "status": { + "id": 100, + "code": "loanStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "pendingApproval": true, + "waitingForDisbursal": false, + "active": false, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "approvedOnDate": "" + } + } + +
-
- -POST https://DomainName/fineract-provider/api/v1/savingsaccounts/gsimcommands/{gsimId}?command=undoapproval - - -{ - “note”:”GSIM Application Undo Approval Note” -} - - -{ - "officeId": 1, - "groupId": 2, - "clientId": 4, - "savingsId": 13, - "resourceId": 13, - "changes": { - "status": { - "id": 100, - "code": "savingsAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false, - "prematureClosed": false, - "transferInProgress": false, - "transferOnHold": false, - "matured": false - }, - "approvedOnDate": "" - } -} - -
-
- -  -
-
-

Reject GSIM application

-

Rejects GSIM application so long as its in 'Submitted and pending approval' state.

- - - - - - - -
Mandatory Fields
rejectedOnDate, dateFormat, locale
-
-
- -https://DomainName/fineract-provider/api/v1/savingsaccounts/gsimcommands/{gsimId}?command=reject - - Associations: String optional One of, or comma separated of GSIM Applications or all for all associations -POST: savingsaccounts/gsimcommands/7?command=reject -Content-Type: application/json -Request Body: -{ - "rejectedOnDate": "03 June 2020", - "dateFormat":"dd MMMM yyyy", - "locale":"en", - "note":"rejection due to some reason" -} - - - - -{ - "officeId": 1, - "groupId": 2, - "clientId": 4, - "savingsId": 13, - "resourceId": 13, - "changes": { - "status": { - "id": 500, - "code": "savingsAccountStatusType.rejected", - "value": "Rejected", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": true, - "withdrawnByApplicant": false, - "active": false, - "closed": true, - "prematureClosed": false, - "transferInProgress": false, - "transferOnHold": false, - "matured": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "rejectedOnDate": "03 June 2020", - "closedOnDate": "03 June 2020", - "note": "rejection due to some reason" - } -} - -
-
- -  -
-
-

Withdraw GSIM application

-

Used when an applicant withdraws from the GSIM application. It must be in 'Submitted and pending approval' state.

- - - - - - - - -
Mandatory Fields
withdrawnOnDate, dateFormat, locale
-
-
- -https://DomainName/fineract-provider/api/v1/savingsaccounts/gsimcommands/{gsimId}?command=withdrawnByApplicant - - -POST: /savingsaccounts/gsimcommands/1?command=withdrawnOnDate -Content-Type: application/json -Request Body: -{ - "withdrawnOnDate": "03 June 2020", - "dateFormat":"dd MMMM yyyy", - "locale":"en", - "note":"withdrawal by applicant" -} - - - -{ - "officeId": 1, - "groupId": 1, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 400, - "code": "savingsAccountStatusType.withdrawn.by.applicant", - "value": "Withdrawn by applicant", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "withdrawnByApplicant": true, - "active": false, - "closed": true, - "prematureClosed": false, - "transferInProgress": false, - "transferOnHold": false, - "matured": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "withdrawnOnDate": "03 June 2020", - "closedOnDate": "03 June 2020", - "note": "withdrawal by applicant" - } -} - -
-
- -  -
-
-

Activate a GSIM Application

-

Results in an approved GSIM application being converted into an 'active' savings account.

- - - - - - - -
Mandatory Fields
activatedOnDate, dateFormat, locale
+   +
+
+

Reject GLIM Application

+

Allows you to reject the GLIM Application. GLIM application should be in pending state

+ + + + + + + +
+
Mandatory Fields
+
rejectedOnDate, dateFormat, locale
-
-
- -https://DomainName/fineract-provider/api/v1/savingsaccounts/gsimcommands/{gsimId}?command=activate - - -POST: /savingsaccounts/gsimcommands/10?command=activate -Content-Type: application/json -Request Body: -{ - "activatedOnDate": "03 June 2020", - "dateFormat":"dd MMMM yyyy", - "locale":"en" -} - - - - -{ - "officeId": 1, - "groupId": 1, - "clientId": 1, - "savingsId": 16, - "resourceId": 16, - "changes": { - "status": { - "id": 300, - "code": "savingsAccountStatusType.active", - "value": "Active", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": true, - "closed": false, - "prematureClosed": false, - "transferInProgress": false, - "transferOnHold": false, - "matured": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "activatedOnDate": "03 June 2020" - } -} - -
-
- -  -
-
-

Close a GSIM Application

-

Results in an Activated savings application being converted into an 'closed' savings account.

- - - - - - - -
Mandatory Fields
closedOnDate, dateFormat, locale
+
+
+ + POST https://DomainName/fineract-provider/api/v1/loans/glimAccount/{glimId}?command=reject + + + POST: loans/glimAccount/1?command=reject + Content-Type: application/json + Request Body: + { + "rejectedOnDate":"12 June 2020", + "dateFormat":"dd MMMM yyyy", + "locale":"en" + } + -
-
- -https://DomainName/fineract-provider/api/v1/savingsaccounts/gsimcommands/{gsimId}?command=close - - -POST: savingsaccounts/gsimcommands/10?command=close -Content-Type: application/json -Request Body: -{ - "closedOnDate": "04 June 2020", - "dateFormat":"dd MMMM yyyy", - "locale":"en" -} - - -{ - "officeId": 1, - "groupId": 1, - "clientId": 1, - "savingsId": 16, - "resourceId": 16, - "changes": { - "status": { - "id": 600, - "code": "savingsAccountStatusType.closed", - "value": "Closed", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": true, - "prematureClosed": false, - "transferInProgress": false, - "transferOnHold": false, - "matured": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "closedOnDate": "04 June 2020" - } -} - -
-
- - -   -
-
-

List savings applications/accounts

-

Example Requests:

-
savingsaccounts
-

-
savingsaccounts?fields=name
-
-
- GET https://Domain Name/api/v1/savingsaccounts - -{ - "totalFilteredRecords": 1, - "pageItems": [ - { - "id": 1, - "accountNo": "000000001", - "clientId": 1, - "clientName": "small business", - "savingsProductId": 1, - "savingsProductName": "Passbook Savings", - "fieldOfficerId": 0, - "status": { - "id": 100, - "code": "savingsAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false - }, - "timeline": { - "submittedOnDate": [ - 2013, - 3, - 1 - ] - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "nominalAnnualInterestRate": 5, - "interestCompoundingPeriodType": { - "id": 1, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", - "value": "Daily" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "summary": { - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "accountBalance": 0 - } - } - ] -} - + + { + "officeId": 1, + "groupId": 1, + "clientId": 2, + "loanId": 2, + "resourceId": 2, + "changes": { + "status": { + "id": 500, + "code": "loanStatusType.rejected", + "value": "Rejected", + "pendingApproval": false, + "waitingForDisbursal": false, + "active": false, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "rejectedOnDate": "12 June 2020", + "closedOnDate": "12 June 2020" + } + } + +
-
-   -
-
-

Retrieve a savings application/account:

-

Arguments

-
-
associations
-
optional, Either 'all' or a comma separated list of savings 'associations' (itemized below).
-

Associations are just extra pieces of data that you might or might not want to retrieve.

-
'all': Gets data related to all associations e.g. ?associations=all.
-
'transactions': Gets data related to transactions on the account e.g. ?associations=transactions
-
'charges':Savings Account charges data.
-
-

Example Requests :

-
savingsaccounts/1
-

-
savingsaccounts/1?associations=all
-
-
- GET https://DomainName/api/v1/savingsaccounts/{accountId} - -{ - "id": 1, - "accountNo": "000000001", - "clientId": 1, - "clientName": "small business", - "savingsProductId": 1, - "savingsProductName": "Passbook Savings", - "fieldOfficerId": 0, - "status": { - "id": 100, - "code": "savingsAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false - }, - "timeline": { - "submittedOnDate": [ - 2013, - 3, - 1 - ] - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "nominalAnnualInterestRate": 5, - "interestCompoundingPeriodType": { - "id": 1, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", - "value": "Daily" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "summary": { - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "accountBalance": 0, - "availableBalance": 0 - } -} - -
-
- -   -
-
-

Modify a savings application

-

Savings 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

-
-
- PUT https://Domain Name/api/v1/savingsaccounts/{accountsId} - PUT savingsaccounts/1 -Content-Type: application/json -No Request Body: -{ - "locale": "en", - "nominalAnnualInterestRate": "5.9999999999" -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "nominalAnnualInterestRate": 5.9999999999, - "locale": "en" - } -} - -
-
- -   -
-
-

Modify savings account withhold tax applicability

-

Savings application's withhold tax can be modified when in 'Active' state. Once the application is activated, can modify the account withhold tax to post tax or vice-versa

-
-
- PUT https://Domain Name/api/v1/savingsaccounts/{accountsId}?command=updateWithHoldTax - PUT savingsaccounts/1?command=updateWithHoldTax -Content-Type: application/json -No Request Body: - { - "withHoldTax": false - } - - - { - "savingsId": 138, - "resourceId": 138, - "changes": { - "withHoldTax": false - } - } - -
-
-   -
-
-

Modify a GSIM Application

-

Allows you to modify the GSIM Application by updating groupId, clientId, productId.

- - - - - - - -
Mandatory Fields
groupId, clientId, productId
+   +
+
+

Disburse GLIM Application

+

Allows you to disburse the GLIM Application, GLIM Account should be in Approved state.

+ + + + + + + +
+
Mandatory Fields
+
actualDisbursementDate, dateFormat, locale
-
-
- -https://DomainName/fineract-provider/api/v1/savingsaccounts/gsim/{gsimId} - - -PUT: savingsaccounts/gsim/6 -Content-Type: application/json -Request Body: -{ - "groupId": 2, - "clientId": 3, - "productId":2 -} - +
+
+ + POST https://DomainName/fineract-provider/api/v1/loans/glimAccount/{glimId}?command=disburse + + + POST: loans/glimAccount/2?command=disburse + Content-Type: application/json + Request Body: + { + "actualDisbursementDate":"12 June 2020", + "dateFormat":"dd MMMM yyyy", + "locale":"en" + } + - -{ - "officeId": 1, - "groupId": 2, - "clientId": 3, - "savingsId": 12, - "resourceId": 12, - "changes": { - "clientId": 3, - "productId": 2 - } -} - -
+ + { + "officeId": 1, + "groupId": 1, + "clientId": 2, + "loanId": 3, + "resourceId": 3, + "changes": { + "status": { + "id": 300, + "code": "loanStatusType.active", + "value": "Active", + "pendingApproval": false, + "waitingForDisbursal": false, + "active": true, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "actualDisbursementDate": "12 June 2020" + } + } +
+
-   -
-
-

Delete a savings application

-

At present we support hard delete of savings 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 savings account.

-
-
- DELETE https://Domain Name/api/v1/savingsaccounts/{accountsId} - DELETE savingsaccounts/1 -Content-Type: application/json -No Request Body: - - -{ - "officeId": 1, - "clientId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

Savings Account Transactions:

-

Transactions possible on a savings account.

- - - - - - - - -
Field Descriptions
transactionDate
The date of the transaction.
transactionAmount
The amount of the transaction.
-
-
- -   -
-
-

Retrieve Savings Account Transaction Template:

-

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 Requests:

-
savingsaccounts/1/transactions/template
-
-
-
- GET https://Domain Name/api/v1/savingsaccounts/{accountId}/transactions/template - - -{ - "accountId": 1, - "accountNo": "000000001", - "date": [ - 2013, - 5, - 27 - ], - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "paymentTypeOptions": [ - { - "id": 14, - "name": "Wire Transfer", - "position": 0 - }, - { - "id": 13, - "name": "Cash", - "position": 1 - } - ] -} - -
-
- -  -
-
-

Retrieve Savings Account Transaction:

-

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 Requests:

-
savingsaccounts/1/transactions/1
-
-
-
- GET https://Domain Name/api/v1/savingsaccounts/{accountId}/transactions/{transactionId} - - -{ - "id": 1, - "transactionType": { - "id": 2, - "code": "savingsAccountTransactionType.withdrawal", - "value": "Withdrawal", - "deposit": false, - "withdrawal": true, - "interestPosting": false, - "feeDeduction": false - }, - "accountId": 1, - "accountNo": "000000001", - "date": [ - 2013, - 8, - 7 - ], - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 0, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "paymentDetailData": { - "id": 62, - "paymentType": { - "id": 11, - "name": "cash" - }, - "accountNumber": "", - "checkNumber": "", - "routingCode": "", - "receiptNumber": "", - "bankNumber": "" - }, - "amount": 5000, - "runningBalance": 0, - "reversed": true -} - -
-
- -   -
-
-

Deposit Transaction

-
-
- POST https://Domain Name/api/v1/savingsaccounts/{accountsId}/transactions?command=deposit - POST savingsaccounts/1/transactions?command=deposit -Content-Type: application/json -No Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "transactionDate": "27 May 2013", - "transactionAmount": "500", - "paymentTypeId": "14", - "accountNumber": "acc123", - "checkNumber": "che123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123" -} - - -{ - "officeId": 1, - "clientId": 2, - "savingsId": 1, - "resourceId": 47, - "changes": { - "accountNumber": "acc123", - "checkNumber": "che123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123" - } -} - -
-
- -   -
-
-

GSIM Deposit Transaction

-
-
- POST -https://DomainName/fineract-provider/api/v1 /savingsaccounts/{savingsId}/transactions?command=gsimDeposit - - POST : savingsaccounts/1/transactions?command=gsimDeposit -Content-Type: application/json -No Request Body: -{ - savingsArray:[ - { - "transactionDate":"04 June 2020", - "dateFormat"="dd MMMM yyyy", - "locale"="en", - "transactionAmount":2500, - "paymentTypeId":1, - "childAccountId":1 - } - ] -} +   +
+
+

Undo Disbursal GLIM Application

+

Allows you to undoDisburse the GLIM Application. GLIM application should be in Disburse state

+ + + + + + + +
+
Optional Fields
+
note
+
+
+ + POST https://DomainName/fineract-provider/api/v1/loans/glimAccount/{glimId}?command=undodisbursal + + + POST: loans/glimAccount/2?command=undodisbursal + Content-Type: application/json + Request Body: + { + "note":"undoDisbursal due to some reasons." + } + - - - { - "officeId": 1, - "groupId": 1, - "savingsId": 1, - "resourceId": 26, - "changes": {} - } + + { + "officeId": 1, + "groupId": 1, + "clientId": 2, + "loanId": 3, + "resourceId": 3, + "changes": { + "status": { + "id": 200, + "code": "loanStatusType.approved", + "value": "Approved", + "pendingApproval": false, + "waitingForDisbursal": true, + "active": false, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "actualDisbursementDate": "" + } + } + +
+
- -
+   +
+
+

Repayment GLIM Application

+

Allows you to repayment the GLIM Application, GLIM Application should be in Disburse state.

+ + + + + + + +
+
Mandatory Fields
+
loanId, transactionDate, dateFormat, locale, transactionAmount
+
+ + POST https://DomainName/fineract-provider/api/v1/loans/glimAccount/{glimId}?command=glimrepayment + + + POST: loans/glimAccount/2?command=glimrepayment + Content-Type: application/json + Request Body: + { + "formDataArray":[ + { + "loanId":3, + "transactionDate":"12 June 2020", + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "transactionAmount":"1000" + } + ] + } + -   -
-
-

Withdrawal Transaction

-
-
- POST https://Domain Name/api/v1/savingsaccounts/{accountsId}/transactions?command=withdrawal - POST savingsaccounts/1/transactions?command=withdrawal -Content-Type: application/json -No Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "transactionDate": "27 May 2013", - "transactionAmount": "500", - "paymentTypeId": "14", - "accountNumber": "acc123", - "checkNumber": "che123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123" -} - - -{ - "officeId": 1, - "clientId": 2, - "savingsId": 1, - "resourceId": 48, - "changes": { - "accountNumber": "acc123", - "checkNumber": "che123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123" - } -} - -
-
- -   -
-
-

Adjust Transaction

-

This command modifies the given transaction.

-
-
- POST https://Domain Name/api/v1/savingsaccounts/{accountsId}/transactions/{transactionId}?command=modify - POST savingsaccounts/1/transactions/1?command=modify -Content-Type: application/json -No Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "transactionDate": "27 May 2013", - "transactionAmount": "500", - "paymentTypeId": "14", - "accountNumber": "acc123", - "checkNumber": "che123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123" -} - - -{ - "officeId": 1, - "clientId": 2, - "savingsId": 1, - "resourceId": 48, - "changes": { - "accountNumber": "acc123", - "checkNumber": "che123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123" - } -} - -
-
- - -   -
-
-

Undo transaction

-

This command reverses the given transaction.

-
-
- POST https://Domain Name/api/v1/savingsaccounts/{accountsId}/transactions/{transactionId}?command=undo - POST savingsaccounts/1/transactions/1?command=undo -Content-Type: application/json -No Request Body: -{ -} - - -{ - "officeId": 1, - "clientId": 2, - "savingsId": 1, - "resourceId": 1 -} - -
-
-  -
-
-

Hold Amount

-

Hold amount enables the user to hold/block/lien the specified amount from the account

-
-
- POST https://Domain Name/api/v1/savingsaccounts/4/transactions?command=holdAmount - POST savingsaccounts/4/transactions?command=holdAmount -Content-Type: application/json -Request Body: -{ - transactionDate:"15 June 2017", - transactionAmount:"200", - locale:"en", - dateFormat:"dd MMMM yyyy" -} - - -{ - "officeId":1, - "clientId":2, - "savingsId":4, - "resourceId":35 -} - -
-
-  -
-
-

Release Amount

-

Release amount removes the hold/block/lien already placed on an amount in the account.

-
-
- POST https://Domain Name/api/v1/savingsaccounts/4/transactions/35?command=releaseAmount - POST savingsaccounts/4/transactions/35?command=releaseAmount -Content-Type: application/json -No Request Body: -{ - -} - - -{ - "officeId":1, - "clientId":2, - "savingsId":4, - "resourceId":36 -} - -
-
- - - - -   -
-
-

Savings Charges

-

Its typical for MFIs to add maintenance and operating charges. They can be either Fees or Penalties. -

-

Savings Charges are instances of Charges and - represent either fees and penalties for savings products. Refer Charges - for documentation of the various properties of a charge, Only additional properties ( - specific to the context of a Charge being associated with a Savings account) are - described here

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
amountPaid
The Total amount which has been paid for this Charge -
amountWaived
The Total amount that has been waived for this Charge -
amountWrittenOff
Total amount written off from this Charge -
amountOutstanding
The Total outstanding amount for this Charge -
-
-
+ + { + "officeId": 1, + "groupId": 1, + "clientId": 2, + "loanId": 3, + "resourceId": 3, + "changes": { + "transactionDate": "12 June 2020", + "transactionAmount": "1000", + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "paymentTypeId": "" + } + } + +
+
-   -
-
-

List Savings Charges

-

Example Requests:

-
savingsaccounts/1/charges
-
-
savingsaccounts/1/charges?chargeStatus=all
-
-
savingsaccounts/1/charges?chargeStatus=inactive
-
-
savingsaccounts/1/charges?chargeStatus=active
-
-
savingsaccounts/1/charges?fields=name,amountOrPercentage
-
-
- -GET https://DomainName/api/v1/savingsaccounts/{accountId}/charges - - -[ - { - "id": 1, - "chargeId": 3, - "accountId": 57, - "name": "Savings account maintenance fee", - "chargeTimeType": { - "id": 1, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "percentage": 0, - "amountPercentageAppliedTo": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100, - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 100, - "amountOrPercentage": 100, - "penalty": false - }, - { - "id": 2, - "chargeId": 4, - "accountId": 57, - "name": "Pass book Fee", - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "dueDate": [ - 2013, - 3, - 29 - ], - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "percentage": 0, - "amountPercentageAppliedTo": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100, - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 100, - "amountOrPercentage": 100, - "penalty": false - }, - { - "id": 9, - "chargeId": 4, - "accountId": 57, - "name": "Withdrawal fee percentage", - "chargeTimeType": { - "id": 5, - "code": "chargeTimeType.withdrawalFee", - "value": "Withdrawal Fee" - }, - "chargeCalculationType": { - "id": 2, - "code": "chargeCalculationType.percent.of.amount", - "value": "% Amount" - }, - "percentage": 0.25, - "amountPercentageAppliedTo": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 0, - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 0, - "amountOrPercentage": 0.25, - "penalty": false - }, - { - "id": 10, - "chargeId": 6, - "accountId": 57, - "name": "Annual fee - INR", - "chargeTimeType": { - "id": 6, - "code": "chargeTimeType.annualFee", - "value": "Annual Fee" - }, - "feeOnMonthDay": [ - 10, - 9 - ], - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "percentage": 0, - "amountPercentageAppliedTo": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 50, - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 50, - "amountOrPercentage": 50, - "penalty": false - } -] - -
-
+   +
+
+

Delete a Loan Application

+

+ Note: Only loans in "Submitted and awaiting approval" + status can be deleted. +

+
+
+ + DELETE https://DomainName/api/v1/loans/{loanId} + + + DELETE loans/1 + Content-Type: application/json + No Request Body: + + + { + "officeId": 1, + "clientId": 1, + "loanId": 1, + "resourceId": 1 + } + +
+
-   -
-
-

Retrieve Savings Charges Template

-

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:

-
savingsaccounts/1/charges/template
-
-
- -GET https://DomainName/api/v1/savingsaccounts/{accountId}/charges/template - - -{ - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "chargeOptions": [ - { - "id": 2, - "name": "Passbook Fee", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100, - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.savings", - "value": "Savings" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - } - }, - { - "id": 3, - "name": "Chequebook fee", - "active": true, - "penalty": true, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 1, - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.savings", - "value": "Savings" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - } - }, - { - "id": 6, - "name": "Annual fee", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 50, - "chargeTimeType": { - "id": 6, - "code": "chargeTimeType.annualFee", - "value": "Annual Fee" - }, - "chargeAppliesTo": { - "id": 2, - "code": "chargeAppliesTo.savings", - "value": "Savings" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - } - ], - "penalty": false -} - -
-
+ +   +
+
+

Loan Transactions

+

Capabilities include loan repayment's, interest waivers and the ability to 'adjust' an existing + transaction. An 'adjustment' of a transaction is really a 'reversal' of existing transaction + followed by creation of a new transaction with the provided details.

+ + + + + + + + + + + + + + + + +
+
Field Descriptions
+
transactionAmount
The amount of the transaction.
transactionDate
The date of the transaction.
+
+
-   -
-
-

Retrieve a Savings account Charge

-

Example Requests:

-
/savingsaccounts/1/charges/5
-
-
-
/savingsaccounts/1/charges/5?fields=name,amountOrPercentage
-
-
- -GET https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId} - - -{ - "id": 1, - "chargeId": 1, - "name": "Passbook fee", - "chargeTimeType": { - "id": 1, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "percentage": 0, - "amountPercentageAppliedTo": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100, - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 100, - "amountOrPercentage": 100, - "penalty": false -} -
-
+   +
+
+

Retrieve Loan Transaction Template

+

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
  • +
+

+
Arguments
+
+
command
+
+ String mandatory, case-insensitive +
+
+ 'repayment'
"date" is set to the date of the + first outstanding installment.
"total" "amount" is set + to the amount outstanding. +
+
+ 'waiver'
"date" is set to the current date.
+ "total" "amount" is set to the remaining loan principal + outstanding. The amount that can be waived is limited to the + loan's inArrearsTolerance +
+
+ 'refundbycash'
"date" is set to the current date
+ "total" "amount" is set + to the total amount paid in advance. +
+
+ 'foreclosure'
"transaction date" is set to the current date by default
+ "transaction amount" is set + to the sum of total loan outstanding principal + and total Interest/ Fee/ Charges / Penalties + till foreclosure date. +
+
+

Example Request:

+
loans/1/transactions/template?command=repayment
+
+
+ + GET https://DomainName/api/v1/loans/{loanId}/transactions/template" + + + { + "transactionType": { + "id": 2, + "code": "loanTransactionType.repayment", + "value": "Repayment" + }, + "date": [ + 2009, + 8, + 1 + ], + "total": { + "currencyCode": "XOF", + "digitsAfterDecimal": 0, + "inMultiplesOf": 0, + "amount": 471, + "defaultName": "CFA Franc BCEAO", + "nameCode": "currency.XOF", + "displaySymbol": "CFA", + "zero": false, + "greaterThanZero": true, + "displaySymbolValue": "471 CFA" + } + } + +
+
-   -
-
-

Create a Savings account Charge

- - - - - - - - - - - - - - - - - - - -
Mandatory Fields - for Savings account Charges
chargeId, amount
Mandatory Fields - for Savings account Charges of Specified due date type
chargeId, amount, dueDate, dateFormat, locale
Mandatory Fields - for Savings account Charges of Annual fee type
chargeId, amount, feeOnMonthDay, monthDayFormat, locale
-
-
- -POST https://DomainName/api/v1/savingsaccounts/{accountId}/charges - - -POST /savingsaccounts/1/charges -Content-Type: application/json -Request Body: -{ - "chargeId": "2", - "locale": "en", - "amount": "100", - "dateFormat": "dd MMMM yyyy", - "dueDate": "29 April 2013" -} - - -{ - "officeId": 1, - "clientId": 1, - "savingsId": 1, - "resourceId": 6 -} - - -POST /savingsaccounts/1/charges -Content-Type: application/json -Request Body: -{ - "chargeId": "2", - "locale": "en", - "amount": "25", - "monthDayFormat": "dd MMMM", - "feeOnMonthDay": "09 October" -} - - -{ - "officeId": 1, - "clientId": 1, - "savingsId": 1, - "resourceId": 7 -} - -
+   +
+
+

Make a Repayment

+
+
+ + POST https://DomainName/api/v1/loans/{loanId}/transactions?command=repayment + + + POST loans/5/transactions?command=repayment + Content-Type: application/json + Request Body: + { + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "transactionDate": "14 May 2013", + "transactionAmount": "500.00", + "paymentTypeId": "12", + "note": "check payment", + "accountNumber": "acc123", + "checkNumber": "che123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123" + } + + + { + "officeId": 1, + "clientId": 1, + "loanId": 5, + "resourceId": 564, + "changes": { + "transactionDate": "14 May 2013", + "transactionAmount": "500.00", + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "note": "check payment", + "accountNumber": "acc123", + "checkNumber": "che123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123" + } + } +
+
-   -
-
-

Update a Savings account Charge

-

Currently Savings account Charges may be updated only if the Savings account - is not yet approved. -

-
-
- -PUT https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId} - - -PUT savingsaccounts/1/charges/6 -Content-Type: application/json -Request Body: -{ - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "amount": "60", - "dueDate": "27 March 2013" -} - - -{ - "officeId": 1, - "clientId": 1, - "savingsId": 1, - "resourceId": 6, - "changes": { - "dueDate": "27 March 2013", - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "amount": 60.0 - } -} - -
-
+   +
+
+

Make a Refund of an Active Loan by Cash

+
+
+ + POST https://DomainName/api/v1/loans/{loanId}/transactions?command=refundByCash + + + POST loans/5/transactions?command=refundByCash + Content-Type: application/json + Request Body: + { + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "transactionDate": "14 May 2013", + "transactionAmount": "500.00", + "paymentTypeId": "12" + } + + + { + "officeId": 1, + "clientId": 1, + "loanId": 5, + "resourceId": 564, + "changes": { + "transactionDate": "14 May 2013", + "transactionAmount": "500.00", + "locale": "en", + "dateFormat": "dd MMMM yyyy + } + } + +
+
-   -
-
-

Delete a Savings account Charge

-

- Note:Currently, A Savings account Charge may only be removed from Savings that are not - yet approved. -

-
-
- -DELETE https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId} - - -DELETE savingsaccounts/1/charges/2 -Content-Type: application/json -No Request Body: - - -{ - "officeId": 1, - "clientId": 1, - "savingsId": 1, - "resourceId": 2 -} - -
-
+   +
+
+

Foreclosure of an Active Loan

+
+
+ + POST https://DomainName/api/v1/loans/{loanId}/transactions?command=foreclosure + + + POST loans/5/transactions?command=foreclosure + Content-Type: application/json + Request Body: + { + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "transactionDate": "10 December 2012", + "note": "Customer Death" + } + + + { + "changes": { + "note": "Foreclosure Made!!!", + "eventAmount": 7573.76, + "transactionDate": [2012, + 12, + 10], + "transactions": [15818] + }, + "loanId": 5 + } + +
+
-   -
-
-

Pay a Savings account Charge

-

- An active charge will be paid when savings account is active and having sufficient balance. -

-
-
- -POST https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=paycharge - - -POST savingsaccounts/1/charges/2?command=paycharge -Content-Type: application/json -Request Body: -{ - "dateFormat": "dd MMMM yyyy", - "locale": "en", - "amount": "60", - "dueDate": "12 September 2013" -} - - -{ - "officeId": 1, - "clientId": 1, - "savingsId": 1, - "resourceId": 2 -} - -
-
- -   -
-
-

Waive off a Savings account Charge

-

- Outstanding charge amount will be waived off. -

-
-
- -POST https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=waive - - -POST savingsaccounts/1/charges/2?command=waive -Content-Type: application/json -No Request Body: - - -{ - "officeId": 1, - "clientId": 1, - "savingsId": 1, - "resourceId": 2 -} - -
-
- -   -
-
-

Inactivate a Savings account Charge

-

- A charge will be allowed to inactivate when savings account is active and not having any dues as of today. If charge is overpaid, corresponding charge payment transactions will be reversed. -

-
-
- -POST https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=inactivate - - -POST savingsaccounts/1/charges/2?command=inactivate -Content-Type: application/json -No Request Body: - - -{ - "officeId": 1, - "clientId": 1, - "savingsId": 1, - "resourceId": 2 -} - -
-
- - - -   -
-
-

Fixed Deposit Account:

-

Fixed Deposit accounts are instances of a praticular fixed deposit product created. An application process around the creation of accounts is also supported.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Starting StateActionResultant State
-SubmitSubmitted and pending approval
Submitted and pending approvalRejectClosed - Rejected
Submitted and pending approvalWithdrawn by ApplicantClosed - Withdrawn by Applicant
Submitted and pending approvalApproveApproved
ApprovedUndo ApprovalSubmitted and pending approval
ApprovedActivateActive
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
clientId
The client you are creating the fixed deposit account for. Either clientId or groupId must be provided.
groupId
The group you are creating the fixed deposit account for. Either clientId or groupId must be provided.
productId
The id of the product used for this fixed deposit account. The fixed deposit account inherits the selected currency of the product and possibly other details if not overridden in the fixed deposit account creation request.
accountNo
The account no. associated with this fixed deposit. Is auto generated if not provided at creation time.
externalId
A place to put an external reference for this fixed deposit account useful in migrations e.g. The ID another system uses. If provided, it must be unique.
submittedOnDate
submittedOnDate must be provided when initially creating fixed deposit account application. locale and dateFormat parameters must be provided with this.
interestCompoundingPeriodType
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end of month)
interestPostingPeriodType
The period at which interest rate is posted or credited to fixed deposit account. The actual crediting or posting transaction is date as occurring on the day after the end of the period. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, 30th Sep, 31st Dec), 7=Annually (at end of calendar year 31st Dec)
interestCalculationType
The interest calculation method used: 1=Daily Balance or 2=Average Daily Balance
interestCalculationDaysInYearType
The setting for number of days in year to use: 360=360 Days, 365=365 Days
lockinPeriodFrequency
Optional: If provided, used along with lockinPeriodFrequencyType to indicate the length of time that the fixed deposit account is 'locked in' and withdrawals are not allowed. e.g. 6 Months
lockinPeriodFrequencyType
Optional: If provided, used along with lockinPeriodFrequency to indicate the length of time that the fixed deposit account is 'locked in' and withdrawals are not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. 6 Months
depositAmount
The fixed deposit amount for which interest is provided on maturity.
depositPeriod
Used along with depositPeriodFrequencyId to define term for which amount is deposited in fixed deposit. e.g. 6 Months
depositPeriodFrequencyId
Used along with depositPeriod to define term for which amount is deposited in fixed deposit. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. 6 Months -
minDepositTerm
This is used along with minDepositTermTypeId to define allowed minimum deposit term for creating a fixed deposit account using this product. e.g. 6 Months
minDepositTermTypeId
Used along with minDepositTerm to define allowed minimum deposit term for creating a fixed deposit account using this product. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. 6 Months -
maxDepositTerm
Optional: If provided, used along with maxDepositTermTypeId to define allowed maximum deposit term for creating a fixed deposit account using this product. e.g. 3 Years
maxDepositTermTypeId
Optional: If provided, used along with maxDepositTerm to define allowed maximum deposit term for creating a fixed deposit account using this product. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. 3 Years -
inMultiplesOfDepositTerm
Optional: If provided, used along with inMultiplesOfDepositTermTypeId to indicate the allowed deposit periods after minimum deposit period. e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after minimum deposit of 6 Months should be 9 Months.
inMultiplesOfDepositTermTypeId
Optional: If provided, used along with inMultiplesOfDepositTerm to indicate the allowed deposit periods after minimum deposit period. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after minimum deposit of 6 Months should be 9 Months. -
preClosurePenalApplicable
Optional: expects boolean value true/false, If provided as true then must provide preClosurePenalInterest and preClosurePenalInterestOnTypeId.
preClosurePenalInterest
Optional: Must provide when preClosurePenalApplicable is true. Used along with preClosurePenalInterestOnTypeId to apply a penalalty on top of applicable interest rate for Pre-mature closure of accounts. e.g. “1%” means 1% less than the interest rate applicable.
preClosurePenalInterestOnTypeId
Optional: Must provide when preClosurePenalApplicable is true. Used along with preClosurePenalInterest to decide what should be the applicable interest rate to which penalalty can be applied on Pre-mature closure of accounts. 1=Whole Term, 2=Till Premature withdrawal e.g. “1%” means 1% less than the interest rate applicable till premature withdrawal.
withHoldTax
Optional: If tax group provided at product level, will allow to Enable or disable withhold tax on interest posting for savings account
-
-
- -   -
-
-

Retrieve Fixed Deposit Account Template:

-

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 Lists
  • -
-

-

Arguments

-
-
clientId
-
Integer mandatory
-
productId
-
Integer optional
-
If entered, productId, productName and selectedProduct fields are returned.
-
-

Example Requests:

-
fixeddepositaccounts/template?clientId=1
-

-
fixeddepositaccounts/template?clientId=1&productId=1
-
-
- GET https://Domain Name/api/v1/fixeddepositaccounts/template?clientId={clientId} - -{ - "clientId": 1, - "clientName": "small business", - "productOptions": [ - { - "id": 1, - "name": "Passbook Savings" - } - ] -} - -
- -
- GET https://Domain Name/api/v1/fixeddepositaccounts/template?clientId={clientId}&productId={productId} - -{ - "clientId": 1, - "clientName": "small business", - "savingsProductId": 1, - "savingsProductName": "Passbook Savings", - "timeline": {}, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "nominalAnnualInterestRate": 5, - "interestCompoundingPeriodType": { - "id": 1, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", - "value": "Daily" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "productOptions": [ - { - "id": 1, - "name": "Passbook Savings" - } - ], - "fieldOfficerOptions": [ - { - "id": 3, - "firstname": "Mrs.", - "lastname": "loanofficerB1", - "displayName": "loanofficerB1, Mrs.", - "officeId": 2, - "officeName": "branch 1", - "isLoanOfficer": true - }, - { - "id": 1, - "firstname": "Mr.", - "lastname": "loanofficerHO", - "displayName": "loanofficerHO, Mr.", - "officeId": 1, - "officeName": "branch 1", - "isLoanOfficer": true - } - ], - "interestCompoundingPeriodTypeOptions": [ - { - "id": 1, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", - "value": "Daily" - }, - { - "id": 4, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", - "value": "Monthly" - } - ], - "interestPostingPeriodTypeOptions": [ - { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - { - "id": 5, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.quarterly", - "value": "Quarterly" - }, - { - "id": 7, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.annual", - "value": "Annually" - } - ], - "interestCalculationTypeOptions": [ - { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - { - "id": 2, - "code": "savingsInterestCalculationType.averagedailybalance", - "value": "Average Daily Balance" - } - ], - "interestCalculationDaysInYearTypeOptions": [ - { - "id": 360, - "code": "savingsInterestCalculationDaysInYearType.days360", - "value": "360 Days" - }, - { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - } - ], - "lockinPeriodFrequencyTypeOptions": [ - { - "id": 0, - "code": "savings.lockin.savingsPeriodFrequencyType.days", - "value": "Days" - }, - { - "id": 1, - "code": "savings.lockin.savingsPeriodFrequencyType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "savings.lockin.savingsPeriodFrequencyType.months", - "value": "Months" - }, - { - "id": 3, - "code": "savings.lockin.savingsPeriodFrequencyType.years", - "value": "Years" - } - ], - "withdrawalFeeTypeOptions": [ - { - "id": 1, - "code": "savingsWithdrawalFeesType.flat", - "value": "Flat" - }, - { - "id": 2, - "code": "savingsWithdrawalFeesType.percent.of.amount", - "value": "% of Amount" - } - ], - "chargeOptions": [ - { - "id": 4, - "name": "Savings charge 1", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 200, - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeAppliesTo": { - "id": 2, - "code": "chargeAppliesTo.savings", - "value": "Savings" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "chargepaymentmode.regular" - } - }, - { - "id": 5, - "name": "Savings charge 2", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 300, - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeAppliesTo": { - "id": 2, - "code": "chargeAppliesTo.savings", - "value": "Savings" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "chargepaymentmode.regular" - } - }, - { - "id": 6, - "name": "Annual fee", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 50, - "chargeTimeType": { - "id": 6, - "code": "chargeTimeType.annualFee", - "value": "Annual Fee" - }, - "chargeAppliesTo": { - "id": 2, - "code": "chargeAppliesTo.savings", - "value": "Savings" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - }, - { - "id": 7, - "name": "Quarterly fee", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 5, - "chargeTimeType": { - "id": 7, - "code": "chargeTimeType.monthlyFee", - "value": "Monthly Fee" - }, - "chargeAppliesTo": { - "id": 2, - "code": "chargeAppliesTo.savings", - "value": "Savings" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - }, - "feeOnMonthDay": [ - 10, - 5 - ], - "feeInterval": 4 - } - ] -} - -
-
- -   -
-
-

Submit 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 )
-
- - - - -
Inherited from Product (if not provided)
interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, lockinPeriodFrequency, lockinPeriodFrequencyType, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, charts, withHoldTax
-
-
-

Minimal request: accountNo auto generated, remaining details inherited from fixed deposit product.

- POST https://Domain Name/api/v1/fixeddepositaccounts - POST fixeddepositaccount -Content-Type: application/json -Request Body: -{ - "clientId": 1, - "productId": 1, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "submittedOnDate": "01 March 2014", - "depositAmount":"5000", - "depositPeriod":"6", - "depositPeriodFrequencyId":"2" -} - -

Minimal request: accountNo provided (must be unique), remaining details inherited from fixed deposit product.

- POST fixeddepositaccount -Content-Type: application/json -Request Body: -{ - "clientId": 1, - "productId": 1, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "submittedOnDate": "01 March 2014", - "depositAmount":"5000", - "depositPeriod":"6", - "depositPeriodFrequencyId":"2", - "accountNo": "FD000023", - "externalId": "FD-23" -} - -

Full request: accountNo provided (must be unique), remaining details override details from fixed deposit product (except currency).

- POST savingsaccount -Content-Type: application/json -Request Body: -{ - "clientId": 1, - "productId": 1, - "fieldOfficerId": 1, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "submittedOnDate": "01 March 2014", - "accountNo": "FD000024", - "externalId": "FD-24", - "interestCompoundingPeriodType": 1, - "interestPostingPeriodType": 4, - "interestCalculationType": 1, - "interestCalculationDaysInYearType": 365, - "depositAmount":"5000", - "depositPeriod":"6", - "depositPeriodFrequencyId":"2", - "lockinPeriodFrequency": 6, - "lockinPeriodFrequencyType": 2, - "charges":[{"id":"1"}] -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

Approve fixed deposit application

-

Approves fixed deposit application so long as its in 'Submitted and pending approval' state.

-
-
- POST https://Domain Name/api/v1/fixeddepositaccounts/{accountId}?command=approve - POST fixeddepositaccounts/1?command=approve -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "approvedOnDate": "01 March 2013" -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 200, - "code": "savingsAccountStatusType.approved", - "value": "Approved", - "submittedAndPendingApproval": false, - "approved": true, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "approvedOnDate": "01 March 2013" - } -} - -
-
- -   -
-
-

Undo approval fixed deposit application

-

Will move 'approved' fixed deposit application back to 'Submitted and pending approval' state.

-
-
- POST https://Domain Name/api/v1/fixeddepositaccounts/{accountId}?command=undoApproval - POST fixeddepositaccounts/1?command=undoApproval -Content-Type: application/json -Request Body: -{ -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 100, - "code": "savingsAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false - }, - "approvedOnDate": "" - } -} - -
-
- -   -
-
-

Reject fixed deposit application

-

Rejects fixed deposit application so long as its in 'Submitted and pending approval' state.

-
-
- POST https://Domain Name/api/v1/fixeddepositaccounts/{accountId}?command=reject - POST fixeddepositaccounts/1?command=reject -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "rejectedOnDate": "03 March 2013" -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 500, - "code": "savingsAccountStatusType.rejected", - "value": "Rejected", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": true, - "withdrawnByApplicant": false, - "active": false, - "closed": true - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "rejectedOnDate": "03 March 2013", - "closedOnDate": "03 March 2013" - } -} - -
-
- -   -
-
-

Withdraw fixed deposit application

-

Used when an applicant withdraws from the fixed deposit application. It must be in 'Submitted and pending approval' state.

-
-
- POST https://Domain Name/api/v1/fixeddepositaccounts/{savingsId}?command=withdrawnByApplicant - POST savingsaccount/1?command=withdrawnByApplicant -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "withdrawnOnDate": "03 March 2013" -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 400, - "code": "savingsAccountStatusType.withdrawn.by.applicant", - "value": "Withdrawn by applicant", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "withdrawnByApplicant": true, - "active": false, - "closed": true - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "withdrawnOnDate": "03 March 2013", - "closedOnDate": "03 March 2013" - } -} - -
-
- -   -
-
-

Activate a fixed deposit account

-

Results in an approved fixed deposit application being converted into an 'active' fixed deposit account.

-
-
- POST https://Domain Name/api/v1/fixeddepositaccounts/{accountId}?command=activate - POST savingsaccount/1?command=activate -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "activatedOnDate": "01 March 2013" -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 300, - "code": "savingsAccountStatusType.active", - "value": "Active", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": true, - "closed": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "activatedOnDate": "01 March 2013" - } -} - -
-
- -   -
-
-

Close a fixed deposit account

-

Results in a Matured fixed deposit account being converted into a 'closed' fixed deposit account.

On account close allowed actions are.

- - - - - - - - - - - - - - - - - - - - - - - - - -
Action on CloseResult
Withdraw Deposit                     Matured amount withdrawn and paid to client
Transfer to SavingsMatured amount transfered to specified savings account.
                     
Re-InvestCreate new Fixed deposit application with matured amount as deposit amount.
-
-
- POST https://Domain Name/api/v1/fixeddepositaccounts/{accountId}?command=close - POST fixeddepositaccounts/1?command=close -Content-Type: application/json -Request Body: - { - "dateFormat":"dd MMMM yyyy", - "locale":"en", - "closedOnDate":"19 April 2014", - "note":"Closing and transfering amount to savings", - "onAccountClosureId":"200", - "toSavingsAccountId":1, - "transferDescription":"Transfered matured amount to savings account" - } - - -{ -"officeId":1, -"clientId":1, -"savingsId":5, -"resourceId":5, -"changes":{ - "status":{ - "id":600, - "code":"savingsAccountStatusType.closed", - "value":"Closed", - "submittedAndPendingApproval":false, - "approved":false, - "rejected":false, - "withdrawnByApplicant":false, - "active":false, - "closed":true - }, - "locale":"en", - "dateFormat":"dd MMMM yyyy", - "closedOnDate":"19 April 2014", - "note":"Closing and transfering amount to savings" - } -} - -
-
- -   -
-
-

Premature Close a fixed deposit account

-

Results in an Active fixed deposit account being converted into a 'Premature Closed' fixed deposit account with options to withdraw prematured amount. (premature amount is calculated using interest rate chart applicable along with penal interest if any.)

On account premature closure allowed actions are.

- - - - - - - - - - - - - - - - - -
Action on Premature CloseResult
Withdraw Deposit                     Matured amount withdrawn and paid to client
Transfer to SavingsMatured amount transfered to specified savings account.
-
-
- POST https://Domain Name/api/v1/fixeddepositaccounts/{accountId}?command=prematureClose - POST fixeddepositaccounts/1?command=prematureClose -Content-Type: application/json -Request Body: - { - "dateFormat":"dd MMMM yyyy", - "locale":"en", - "closedOnDate":"19 April 2014", - "note":"Close and transfer amount to savings", - "onAccountClosureId":"200", - "toSavingsAccountId":1, - "transferDescription":"Transfered matured amount to savings account" - } - - -{ - "officeId": 1, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 700, - "code": "savingsAccountStatusType.pre.mature.closure", - "value": "Premature Closed", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false, - "prematureClosed": true, - "transferInProgress": false, - "transferOnHold": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "closedOnDate": "19 April 2014", - "note": "Close and transfer amount to savings" - } -} - -
-
- -   -
-
-

Calculate Premature amount on Fixed deposit account

-

Calculate premature amount on fixed deposit account till premature close date. Premature amount is calculated based on interest chart and penal interest applicable.

-
-
- POST https://Domain Name/api/v1/fixeddepositaccounts/{accountId}?command=calculatePrematureAmount - POST fixeddepositaccounts/1?command=calculatePrematureAmount -Content-Type: application/json -Request Body: - { - "dateFormat":"dd MMMM yyyy", - "locale":"en", - "closedOnDate":"19 April 2014" - } - - -{ - "maturityAmount": 100.65, - "savingsAccounts": [ - { - "id": 1, - "accountNo": "000000001", - "clientId": 1, - "clientName": "Sangamesh N", - "savingsProductId": 1, - "savingsProductName": "FD-0001" - } - ], - "onAccountClosureOptions": [ - { - "id": 100, - "code": "depositAccountClosureType.withdrawDeposit", - "value": "Withdra Deposit" - }, - { - "id": 200, - "code": "depositAccountClosureType.transferToSavings", - "value": "Transfer to Savings" - }, - { - "id": 300, - "code": "depositAccountClosureType.reinvest", - "value": "Re-Invest" - } - ], - "paymentTypeOptions": [], - "id": 12, - "depositType": { - "id": 300, - "code": "depositAccountType.recurringDeposit", - "value": "Recurring Deposit" - } -} - -
-
- -   -
-
-

Calculate Interest on Fixed Deposit Account

-

- Calculates interest earned on a fixed deposit account based on todays date. It does not attempt to post or credit the interest on the account. That is responsibility of the Post Interest API that will likely be called by overnight process. -

-
-
- POST https://Domain Name/api/v1/fixeddepositaccounts/{accountId}?command=calculateInterest - POST fixeddepositaccount/1?command=calculateInterest -Content-Type: application/json -Request Body: -{ -} - - -{ - "officeId": 1, - "clientId": 1, - "savingsId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

Post Interest on Fixed Deposit Account

-

- Calculates and Posts interest earned on a fixed deposit account based on todays date and whether an interest posting or crediting event is due. -

-
-
- POST https://Domain Name/api/v1/fixeddepositaccounts/{accountId}?command=postInterest - POST fixeddepositaccount/1?command=postInterest -Content-Type: application/json -Request Body: -{ -} - - -{ - "officeId": 1, - "clientId": 1, - "savingsId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

List Fixed deposit applications/accounts

-

Example Requests:

-
fixeddepositaccounts
-

-
fixeddepositaccounts?fields=name
-
-
- GET https://Domain Name/api/v1/fixeddepositaccounts - -[ - { - "id": 1, - "accountNo": "000000001", - "clientId": 1, - "clientName": "Sangamesh N", - "savingsProductId": 3, - "savingsProductName": "FD01", - "fieldOfficerId": 0, - "status": { - "id": 100, - "code": "savingsAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false, - "prematureClosed": false, - "transferInProgress": false, - "transferOnHold": false - }, - "timeline": { - "submittedOnDate": [ - 2014, - 3, - 1 - ], - "submittedByUsername": "mifos", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator" - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "interestCompoundingPeriodType": { - "id": 4, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "summary": { - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "accountBalance": 0 - }, - "interestFreePeriodApplicable": false, - "preClosurePenalApplicable": false, - "minDepositTerm": 3, - "maxDepositTerm": 4, - "minDepositTermType": { - "id": 2, - "code": "deposit.term.savingsPeriodFrequencyType.months", - "value": "Months" - }, - "maxDepositTermType": { - "id": 3, - "code": "deposit.term.savingsPeriodFrequencyType.years", - "value": "Years" - }, - "depositAmount": 5000, - "maturityAmount": 5140.25, - "maturityDate": [ - 2014, - 9, - 1 - ], - "depositPeriod": 6, - "depositPeriodFrequency": { - "id": 2, - "code": "deposit.period.savingsPeriodFrequencyType.months", - "value": "Months" - } - } -] - - +   +
+
+

Waive Interest

+
+
+ + POST https://DomainName/api/v1/loans/{loanId}/transactions?command=waiveInterest + + + POST loans/5/transactions?command=waiveInterest + Content-Type: application/json + Request Body: + { + "locale": "en_GB", + "dateFormat": "dd MMMM yyyy", + "transactionDate": "14 May 2012", + "transactionAmount": "400", + "note": "Optional note related to the waiving of interest." + } + + + { + "officeId": 1, + "clientId": 1, + "loanId": 5, + "resourceId": 5, + "changes": { + "transactionDate": "14 May 2012", + "transactionAmount": "400", + "locale": "en_GB", + "dateFormat": "dd MMMM yyyy", + "note": "Optional note related to the interest waiver." + } + } + +
-
-   -
-
-

Retrieve a fixed deposit application/account:

-

Arguments

-
-
associations
-
optional, Either 'all' or a comma separated list of fixed deposit 'associations' (itemized below).
-

Associations are just extra pieces of data that you might or might not want to retrieve.

-
'all': Gets data related to all associations e.g. ?associations=all.
-
'transactions': Gets data related to transactions on the account e.g. ?associations=transactions
-
'charges':fixed deposit Account charges data.
-
-

Example Requests :

-
fixeddepositaccounts/1
-

-
fixeddepositaccounts/1?associations=all
-
-
- GET https://DomainName/api/v1/fixeddepositaccounts/{accountId} - -{ - "id": 1, - "accountNo": "FD000023", - "externalId": "FD-23", - "clientId": 1, - "clientName": "Sangamesh N", - "savingsProductId": 3, - "savingsProductName": "FD01", - "fieldOfficerId": 0, - "status": { - "id": 100, - "code": "savingsAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false, - "prematureClosed": false, - "transferInProgress": false, - "transferOnHold": false - }, - "timeline": { - "submittedOnDate": [ - 2014, - 3, - 1 - ], - "submittedByUsername": "mifos", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator" - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "interestCompoundingPeriodType": { - "id": 4, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "interestFreePeriodApplicable": false, - "preClosurePenalApplicable": false, - "minDepositTerm": 3, - "maxDepositTerm": 4, - "minDepositTermType": { - "id": 2, - "code": "deposit.term.savingsPeriodFrequencyType.months", - "value": "Months" - }, - "maxDepositTermType": { - "id": 3, - "code": "deposit.term.savingsPeriodFrequencyType.years", - "value": "Years" - }, - "depositAmount": 5000, - "maturityAmount": 5140.25, - "maturityDate": [ - 2014, - 9, - 1 - ], - "depositPeriod": 6, - "depositPeriodFrequency": { - "id": 2, - "code": "deposit.period.savingsPeriodFrequencyType.months", - "value": "Months" - }, - "summary": { - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "accountBalance": 0 - }, - "accountChart": { - "id": 4, - "fromDate": [ - 2013, - 10, - 2 - ], - "accountId": 5, - "accountNumber": "FD000023", - "chartSlabs": [ - { - "id": 13, - "periodType": { - "id": 0, - "code": "interestChartPeriodType.days", - "value": "Days" - }, - "fromPeriod": 181, - "toPeriod": 365, - "annualInterestRate": 5.5, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - }, - { - "id": 12, - "periodType": { - "id": 0, - "code": "interestChartPeriodType.days", - "value": "Days" - }, - "fromPeriod": 1, - "toPeriod": 180, - "annualInterestRate": 5, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - }, - { - "id": 11, - "periodType": { - "id": 0, - "code": "interestChartPeriodType.days", - "value": "Days" - }, - "fromPeriod": 366, - "annualInterestRate": 6, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - } - ], - "periodTypes": [ - { - "id": 0, - "code": "interestChartPeriodType.days", - "value": "Days" - }, - { - "id": 1, - "code": "interestChartPeriodType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "interestChartPeriodType.months", - "value": "Months" - }, - { - "id": 3, - "code": "interestChartPeriodType.years", - "value": "Years" - } - ] - } -} - -
-
- -   -
-
-

Modify a fixed deposit application

-

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

-
-
- PUT https://Domain Name/api/v1/fixeddepositaccounts/{accountId} - PUT fixeddepositaccounts/1 -Content-Type: application/json -No Request Body: -{ - "locale": "en", - "depositAmount": 6000 -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "depositAmount": 6000, - "locale": "en" - } -} - -
-
- -   -
-
-

Delete a fixed deposit application

-

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.

-
-
- DELETE https://Domain Name/api/v1/fixeddepositaccounts/{accountsId} - DELETE fixeddepositaccounts/1 -Content-Type: application/json -No Request Body: - - -{ - "officeId": 1, - "clientId": 1, - "resourceId": 1 -} - -
-
- - - - -   -
-
-

Recurring Deposit Account:

-

Recurring Deposit accounts are instances of a praticular recurring deposit product created. An application process around the creation of accounts is also supported.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Starting StateActionResultant State
-SubmitSubmitted and pending approval
Submitted and pending approvalRejectClosed - Rejected
Submitted and pending approvalWithdrawn by ApplicantClosed - Withdrawn by Applicant
Submitted and pending approvalApproveApproved
ApprovedUndo ApprovalSubmitted and pending approval
ApprovedActivateActive
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
clientId
The client you are creating the recurring deposit account for. Either clientId or groupId must be provided.
groupId
The group you are creating the recurring deposit account for. Either clientId or groupId must be provided.
productId
The id of the product used for this recurring deposit account. The recurring deposit account inherits the selected currency of the product and possibly other details if not overridden in the recurring deposit account creation request.
accountNo
The account no. associated with this recurring deposit. Is auto generated if not provided at creation time.
externalId
A place to put an external reference for this recurring deposit account useful in migrations e.g. The ID another system uses. If provided, it must be unique.
submittedOnDate
submittedOnDate must be provided when initially creating recurring deposit account application. locale and dateFormat parameters must be provided with this.
interestCompoundingPeriodType
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end of month)
interestPostingPeriodType
The period at which interest rate is posted or credited to recurring deposit account. The actual crediting or posting transaction is date as occurring on the day after the end of the period. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, 30th Sep, 31st Dec), 7=Annually (at end of calendar year 31st Dec)
interestCalculationType
The interest calculation method used: 1=Daily Balance or 2=Average Daily Balance
interestCalculationDaysInYearType
The setting for number of days in year to use: 360=360 Days, 365=365 Days
lockinPeriodFrequency
Optional: If provided, used along with lockinPeriodFrequencyType to indicate the length of time that the recurring deposit account is 'locked in' and withdrawals are not allowed. e.g. 6 Months
lockinPeriodFrequencyType
Optional: If provided, used along with lockinPeriodFrequency to indicate the length of time that the recurring deposit account is 'locked in' and withdrawals are not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. 6 Months
recurringDepositAmount
The recurring deposit amount to be deposited regularly on a specified by deposit frequency.
recurringDepositFrequency
Used along with recurringDepositFrequencyTypeId to define the frequency at which recurringDepositAmount to be deposited into RD account. e.g. 6 Months
recurringDepositFrequencyTypeId
Used along with recurringDepositFrequency to define the frequency at which recurringDepositAmount to be deposited into RD account. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. 6 Months -
depositPeriod
Used along with depositPeriodFrequencyId to define term for which amount is deposited in recurring deposit. e.g. 6 Months
depositPeriodFrequencyId
Used along with depositPeriod to define term for which amount is deposited in recurring deposit. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. 6 Months -
minDepositTerm
This is used along with minDepositTermTypeId to define allowed minimum deposit term for creating a recurring deposit account using this product. e.g. 6 Months
minDepositTermTypeId
Used along with minDepositTerm to define allowed minimum deposit term for creating a recurring deposit account using this product. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. 6 Months -
maxDepositTerm
Optional: If provided, used along with maxDepositTermTypeId to define allowed maximum deposit term for creating a recurring deposit account using this product. e.g. 3 Years
maxDepositTermTypeId
Optional: If provided, used along with maxDepositTerm to define allowed maximum deposit term for creating a recurring deposit account using this product. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. 3 Years -
inMultiplesOfDepositTerm
Optional: If provided, used along with inMultiplesOfDepositTermTypeId to indicate the allowed deposit periods after minimum deposit period. e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after minimum deposit of 6 Months should be 9 Months.
inMultiplesOfDepositTermTypeId
Optional: If provided, used along with inMultiplesOfDepositTerm to indicate the allowed deposit periods after minimum deposit period. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after minimum deposit of 6 Months should be 9 Months. -
preClosurePenalApplicable
Optional: expects boolean value true/false, If provided as true then must provide preClosurePenalInterest and preClosurePenalInterestOnTypeId.
preClosurePenalInterest
Optional: Must provide when preClosurePenalApplicable is true. Used along with preClosurePenalInterestOnTypeId to apply a penalalty on top of applicable interest rate for Pre-mature closure of accounts. e.g. “1%” means 1% less than the interest rate applicable.
preClosurePenalInterestOnTypeId
Optional: Must provide when preClosurePenalApplicable is true. Used along with preClosurePenalInterest to decide what should be the applicable interest rate to which penalalty can be applied on Pre-mature closure of accounts. 1=Whole Term, 2=Till Premature withdrawal e.g. “1%” means 1% less than the interest rate applicable till premature withdrawal.
withHoldTax
Optional: If tax group provided at product level, will allow to Enable or disable withhold tax on interest posting for savings account
-
-
- -   -
-
-

Retrieve recurring Deposit Account Template:

-

This is a convenience resource. It can be useful when building maintenance user interface screens for recurring deposit applications. The template data returned consists of any or all of: -

    -
  • Field Defaults
  • -
  • Allowed Value Lists
  • -
-

-

Arguments

-
-
clientId
-
Integer mandatory
-
productId
-
Integer optional
-
If entered, productId, productName and selectedProduct fields are returned.
-
-

Example Requests:

-
fixeddepositaccounts/template?clientId=1
-

-
fixeddepositaccounts/template?clientId=1&productId=1
-
-
- GET https://Domain Name/api/v1/fixeddepositaccounts/template?clientId={clientId} - -{ - "clientId": 1, - "clientName": "small business", - "productOptions": [ - { - "id": 1, - "name": "Passbook Savings" - } - ] -} - -
- -
- GET https://Domain Name/api/v1/fixeddepositaccounts/template?clientId={clientId}&productId={productId} - -{ - "clientId": 1, - "clientName": "small business", - "savingsProductId": 1, - "savingsProductName": "Passbook Savings", - "timeline": {}, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "nominalAnnualInterestRate": 5, - "interestCompoundingPeriodType": { - "id": 1, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", - "value": "Daily" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "productOptions": [ - { - "id": 1, - "name": "Passbook Savings" - } - ], - "fieldOfficerOptions": [ - { - "id": 3, - "firstname": "Mrs.", - "lastname": "loanofficerB1", - "displayName": "loanofficerB1, Mrs.", - "officeId": 2, - "officeName": "branch 1", - "isLoanOfficer": true - }, - { - "id": 1, - "firstname": "Mr.", - "lastname": "loanofficerHO", - "displayName": "loanofficerHO, Mr.", - "officeId": 1, - "officeName": "branch 1", - "isLoanOfficer": true - } - ], - "interestCompoundingPeriodTypeOptions": [ - { - "id": 1, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", - "value": "Daily" - }, - { - "id": 4, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", - "value": "Monthly" - } - ], - "interestPostingPeriodTypeOptions": [ - { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - { - "id": 5, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.quarterly", - "value": "Quarterly" - }, - { - "id": 7, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.annual", - "value": "Annually" - } - ], - "interestCalculationTypeOptions": [ - { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - { - "id": 2, - "code": "savingsInterestCalculationType.averagedailybalance", - "value": "Average Daily Balance" - } - ], - "interestCalculationDaysInYearTypeOptions": [ - { - "id": 360, - "code": "savingsInterestCalculationDaysInYearType.days360", - "value": "360 Days" - }, - { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - } - ], - "lockinPeriodFrequencyTypeOptions": [ - { - "id": 0, - "code": "savings.lockin.savingsPeriodFrequencyType.days", - "value": "Days" - }, - { - "id": 1, - "code": "savings.lockin.savingsPeriodFrequencyType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "savings.lockin.savingsPeriodFrequencyType.months", - "value": "Months" - }, - { - "id": 3, - "code": "savings.lockin.savingsPeriodFrequencyType.years", - "value": "Years" - } - ], - "withdrawalFeeTypeOptions": [ - { - "id": 1, - "code": "savingsWithdrawalFeesType.flat", - "value": "Flat" - }, - { - "id": 2, - "code": "savingsWithdrawalFeesType.percent.of.amount", - "value": "% of Amount" - } - ], - "chargeOptions": [ - { - "id": 4, - "name": "Savings charge 1", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 200, - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeAppliesTo": { - "id": 2, - "code": "chargeAppliesTo.savings", - "value": "Savings" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "chargepaymentmode.regular" - } - }, - { - "id": 5, - "name": "Savings charge 2", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 300, - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeAppliesTo": { - "id": 2, - "code": "chargeAppliesTo.savings", - "value": "Savings" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "chargepaymentmode.regular" - } - }, - { - "id": 6, - "name": "Annual fee", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 50, - "chargeTimeType": { - "id": 6, - "code": "chargeTimeType.annualFee", - "value": "Annual Fee" - }, - "chargeAppliesTo": { - "id": 2, - "code": "chargeAppliesTo.savings", - "value": "Savings" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - }, - { - "id": 7, - "name": "Quarterly fee", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 5, - "chargeTimeType": { - "id": 7, - "code": "chargeTimeType.monthlyFee", - "value": "Monthly Fee" - }, - "chargeAppliesTo": { - "id": 2, - "code": "chargeAppliesTo.savings", - "value": "Savings" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - }, - "feeOnMonthDay": [ - 10, - 5 - ], - "feeInterval": 4 - } - ] -} - -
-
- -   -
-
-

Submit new recurring deposit application

-
- - - -
Mandatory Fields
clientId or groupId, productId, submittedOnDate, depositPeriod, depositPeriodFrequencyId, recurringFrequency, recurringFrequencyType, depositAmount,isCalendarInherited, mandatoryRecommendedDepositAmount
-
- - - -
Optional Fields
accountNo, externalId, fieldOfficerId, expectedFirstDepositOnDate, allowWithdrawal, adjustAdvanceTowardsFuturePayments, isMandatoryDeposit
-
- - - - -
Inherited from Product (if not provided)
interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, lockinPeriodFrequency, lockinPeriodFrequencyType, preClosurePenalApplicable, preClosurePenalInterest, preClosurePenalInterestOnTypeId, charts, withHoldTax
-
-
-

Minimal request: accountNo auto generated, remaining details inherited from recurring deposit product.

- POST https://Domain Name/api/v1/recurringdepositaccounts - POST recurringdepositaccounts -Content-Type: application/json -Request Body: -{ - "clientId": 1, - "productId": 1, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "submittedOnDate": "02 June 2014", - "depositPeriod":"20", - "depositPeriodFrequencyId":"1", - "depositAmount":10000, - "isCalendarInherited":false, - "recurringFrequency":"2", - "recurringFrequencyType":1, - "mandatoryRecommendedDepositAmount":"2000" -} - -

Minimal request: accountNo provided (must be unique), remaining details inherited from recurring deposit product.

- POST recurringdepositaccounts -Content-Type: application/json -Request Body: -{ - "clientId": 1, - "productId": 1, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "submittedOnDate": "02 June 2014", - "depositPeriod":"20", - "depositPeriodFrequencyId":"1", - "depositAmount":10000, - "isCalendarInherited":false, - "recurringFrequency":"2", - "recurringFrequencyType":1, - "mandatoryRecommendedDepositAmount":"2000", - "accountNo": "RD000023", - "externalId": "RD-23", - "expectedFirstDepositOnDate": "02 June 2014", - "allowWithdrawal":false, - "adjustAdvanceTowardsFuturePayments":false, - "isMandatoryDeposit":false - -} - -

Full request: accountNo provided (must be unique), remaining details override details from recurring deposit product (except currency).

- POST recurringdepositaccounts -Content-Type: application/json -Request Body: -{ - "clientId": 1, - "productId": 1, - "fieldOfficerId": 1, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "submittedOnDate": "02 June 2014", - "depositPeriod":"20", - "depositPeriodFrequencyId":"1", - "depositAmount":10000, - "isCalendarInherited":false, - "recurringFrequency":"2", - "recurringFrequencyType":1, - "mandatoryRecommendedDepositAmount":"2000", - "accountNo": "RD000023", - "externalId": "RD-23", - "expectedFirstDepositOnDate": "02 June 2014", - "allowWithdrawal":false, - "adjustAdvanceTowardsFuturePayments":false, - "isMandatoryDeposit":false, - "interestCompoundingPeriodType": 1, - "interestPostingPeriodType": 4, - "interestCalculationType": 1, - "interestCalculationDaysInYearType": 365, - "lockinPeriodFrequency": 6, - "lockinPeriodFrequencyType": 2, - "charges":[{"id":"1"}] -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

Approve recurring deposit application

-

Approves recurring deposit application so long as its in 'Submitted and pending approval' state.

-
-
- POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=approve - POST recurringdepositaccounts/1?command=approve -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "approvedOnDate": "01 March 2014" -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 200, - "code": "savingsAccountStatusType.approved", - "value": "Approved", - "submittedAndPendingApproval": false, - "approved": true, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "approvedOnDate": "01 March 2014" - } -} - -
-
- -   -
-
-

Undo approval recurring deposit application

-

Will move 'approved' recurring deposit application back to 'Submitted and pending approval' state.

-
-
- POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=undoApproval - POST recurringdepositaccounts/1?command=undoApproval -Content-Type: application/json -Request Body: -{ -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 100, - "code": "savingsAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false - }, - "approvedOnDate": "" - } -} - -
-
- -   -
-
-

Reject recurring deposit application

-

Rejects recurring deposit application so long as its in 'Submitted and pending approval' state.

-
-
- POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=reject - POST recurringdepositaccounts/1?command=reject -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "rejectedOnDate": "03 March 2014" -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 500, - "code": "savingsAccountStatusType.rejected", - "value": "Rejected", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": true, - "withdrawnByApplicant": false, - "active": false, - "closed": true - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "rejectedOnDate": "03 March 2014", - "closedOnDate": "03 March 2014" - } -} - -
-
- -   -
-
-

Withdraw recurring deposit application

-

Used when an applicant withdraws from the recurring deposit application. It must be in 'Submitted and pending approval' state.

-
-
- POST https://Domain Name/api/v1/recurringdepositaccounts/{savingsId}?command=withdrawnByApplicant - POST recurringdepositaccounts/1?command=withdrawnByApplicant -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "withdrawnOnDate": "03 March 2014" -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 400, - "code": "savingsAccountStatusType.withdrawn.by.applicant", - "value": "Withdrawn by applicant", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "withdrawnByApplicant": true, - "active": false, - "closed": true - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "withdrawnOnDate": "03 March 2014", - "closedOnDate": "03 March 2014" - } -} - -
-
- -   -
-
-

Activate a recurring deposit account

-

Results in an approved recurring deposit application being converted into an 'active' recurring deposit account.

-
-
- POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=activate - POST recurringdepositaccounts/1?command=activate -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "activatedOnDate": "01 March 2013" -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 300, - "code": "savingsAccountStatusType.active", - "value": "Active", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": true, - "closed": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "activatedOnDate": "01 March 2013" - } -} - -
-
- -   -
-
-

Update the recommended deposit amount for a recurring deposit account

-

Updates the recommended deposit amount for a RD account as on the effective date.

-
-
- POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=updateDepositAmount - POST recurringdepositaccounts/4?command=updateDepositAmount -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "effectiveDate": "01 Dec 2014" - "mandatoryRecommendedDepositAmount": 398 -} - - - -{ - "officeId": 1, - "clientId": 6, - "savingsId": 4, - "resourceId": 4, - "changes": - { - "mandatoryRecommendedDepositAmount": 398 - } -} - - -
-
- - -   -
-
-

Close a recurring deposit account

-

Results in a Matured recurring deposit account being converted into a 'closed' recurring deposit account.

On account close allowed actions are.

- - - - - - - - - - - - - - - - - - - - - - - - - -
Action on CloseResult
Withdraw Deposit                     Matured amount withdrawn and paid to client
Transfer to SavingsMatured amount transfered to specified savings account.
                     
Re-InvestCreate new Fixed deposit application with matured amount as deposit amount.
-
-
- POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=close - POST recurringdepositaccounts/1?command=close -Content-Type: application/json -Request Body: - { - "dateFormat":"dd MMMM yyyy", - "locale":"en", - "closedOnDate":"19 April 2014", - "note":"Closing and transfering amount to savings", - "onAccountClosureId":"100", - "transferDescription":"Transfered matured amount to savings account" - } - - -{ -"officeId":1, -"clientId":1, -"savingsId":5, -"resourceId":5, -"changes":{ - "status":{ - "id":600, - "code":"savingsAccountStatusType.closed", - "value":"Closed", - "submittedAndPendingApproval":false, - "approved":false, - "rejected":false, - "withdrawnByApplicant":false, - "active":false, - "closed":true - }, - "locale":"en", - "dateFormat":"dd MMMM yyyy", - "closedOnDate":"19 April 2014", - "note":"Closing and transfering amount to savings" - } -} - -
-
- -   -
-
-

Premature Close a recurring deposit account

-

Results in an Active recurring deposit account being converted into a 'Premature Closed' recurring deposit account with options to withdraw prematured amount. (premature amount is calculated using interest rate chart applicable along with penal interest if any.)

On account premature closure allowed actions are.

- - - - - - - - - - - - - - - - - -
Action on Premature CloseResult
Withdraw Deposit                     Matured amount withdrawn and paid to client
Transfer to SavingsMatured amount transfered to a savings account.
-
-
- POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=prematureClose - POST recurringdepositaccounts/1?command=prematureClose -Content-Type: application/json -Request Body: - { - "dateFormat":"dd MMMM yyyy", - "locale":"en", - "closedOnDate":"19 April 2014", - "note":"Close and transfer amount to savings", - "onAccountClosureId":"200", - "toSavingsAccountId":1, - "transferDescription":"Transfered matured amount to savings account" - } - - -{ - "officeId": 1, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "status": { - "id": 700, - "code": "savingsAccountStatusType.pre.mature.closure", - "value": "Premature Closed", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false, - "prematureClosed": true, - "transferInProgress": false, - "transferOnHold": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "closedOnDate": "19 April 2014", - "note": "Close and transfer amount to savings" - } -} - -
-
- -   -
-
-

Calculate Premature amount on Recurring deposit account

-

Calculate premature amount on recurring deposit till premature close date. Premature amount is calculated based on interest chart and penal interest applicable if any.

-
-
- POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=calculatePrematureAmount - POST recurringdepositaccounts/1?command=calculatePrematureAmount -Content-Type: application/json -Request Body: - { - "dateFormat":"dd MMMM yyyy", - "locale":"en", - "closedOnDate":"19 April 2014" - } - - -{ - "maturityAmount": 100.65, - "savingsAccounts": [ - { - "id": 1, - "accountNo": "000000001", - "clientId": 1, - "clientName": "Sangamesh N", - "savingsProductId": 1, - "savingsProductName": "sa", - "fieldOfficerId": 0, - "status": { - "id": 300, - "code": "savingsAccountStatusType.active", - "value": "Active", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": true, - "closed": false, - "prematureClosed": false, - "transferInProgress": false, - "transferOnHold": false - }, - "timeline": { - "submittedOnDate": [ - 2014, - 1, - 1 - ], - "submittedByUsername": "mifos", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator", - "approvedOnDate": [ - 2014, - 1, - 1 - ], - "approvedByUsername": "mifos", - "approvedByFirstname": "App", - "approvedByLastname": "Administrator", - "activatedOnDate": [ - 2014, - 1, - 1 - ] - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "nominalAnnualInterestRate": 5, - "interestCompoundingPeriodType": { - "id": 4, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "minRequiredOpeningBalance": 5000, - "withdrawalFeeForTransfers": false, - "allowOverdraft": false, - "summary": { - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "totalDeposits": 13353.41, - "totalInterestEarned": 107.79, - "totalInterestPosted": 76.74, - "accountBalance": 13430.15 - } - } - ], - "onAccountClosureOptions": [ - { - "id": 100, - "code": "depositAccountClosureType.withdrawDeposit", - "value": "Withdra Deposit" - }, - { - "id": 200, - "code": "depositAccountClosureType.transferToSavings", - "value": "Transfer to Savings" - }, - { - "id": 300, - "code": "depositAccountClosureType.reinvest", - "value": "Re-Invest" - } - ], - "paymentTypeOptions": [], - "id": 12, - "depositType": { - "id": 300, - "code": "depositAccountType.recurringDeposit", - "value": "Recurring Deposit" - } -} - -
-
- -   -
-
-

Calculate Interest on recurring Deposit Account

-

- Calculates interest earned on a recurring deposit account based on todays date. It does not attempt to post or credit the interest on the account. That is responsibility of the Post Interest API that will likely be called by overnight process. -

-
-
- POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=calculateInterest - POST recurringdepositaccounts/1?command=calculateInterest -Content-Type: application/json -Request Body: -{ -} - - -{ - "officeId": 1, - "clientId": 1, - "savingsId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

Post Interest on recurring Deposit Account

-

- Calculates and Posts interest earned on a recurring deposit account based on todays date and whether an interest posting or crediting event is due. -

-
-
- POST https://Domain Name/api/v1/recurringdepositaccounts/{accountId}?command=postInterest - POST recurringdepositaccounts/1?command=postInterest -Content-Type: application/json -Request Body: -{ -} - - -{ - "officeId": 1, - "clientId": 1, - "savingsId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

List Fixed deposit applications/accounts

-

Example Requests:

-
recurringdepositaccounts
-

-
recurringdepositaccounts?fields=name
-
-
- GET https://Domain Name/api/v1/recurringdepositaccounts - -[ - { - "id": 1, - "accountNo": "000000001", - "clientId": 1, - "clientName": "Sangamesh N", - "savingsProductId": 3, - "savingsProductName": "RD01", - "fieldOfficerId": 0, - "status": { - "id": 100, - "code": "savingsAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false, - "prematureClosed": false, - "transferInProgress": false, - "transferOnHold": false - }, - "timeline": { - "submittedOnDate": [ - 2014, - 3, - 1 - ], - "submittedByUsername": "mifos", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator" - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "interestCompoundingPeriodType": { - "id": 4, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "summary": { - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "accountBalance": 0 - }, - "depositAmount": 1150, - "maturityAmount": 252.59, - "maturityDate": [ - 2014, - 4, - 3 - ], - "recurringDepositAmount": 100, - "recurringDepositFrequency": 1, - "recurringDepositFrequencyType": { - "id": 2, - "code": "recurring.deposit.savingsPeriodFrequencyType.months", - "value": "Months" - }, - "preClosurePenalApplicable": false, - "minDepositTerm": 3, - "maxDepositTerm": 4, - "minDepositTermType": { - "id": 2, - "code": "deposit.term.savingsPeriodFrequencyType.months", - "value": "Months" - }, - "maxDepositTermType": { - "id": 3, - "code": "deposit.term.savingsPeriodFrequencyType.years", - "value": "Years" - }, - "depositAmount": 5000, - "maturityAmount": 5140.25, - "maturityDate": [ - 2014, - 9, - 1 - ], - "depositPeriod": 6, - "depositPeriodFrequency": { - "id": 2, - "code": "deposit.period.savingsPeriodFrequencyType.months", - "value": "Months" - } - } -] - - -
-
-   -
-
-

Retrieve a recurring deposit application/account:

-

Arguments

-
-
associations
-
optional, Either 'all' or a comma separated list of recurring deposit 'associations' (itemized below).
-

Associations are just extra pieces of data that you might or might not want to retrieve.

-
'all': Gets data related to all associations e.g. ?associations=all.
-
'transactions': Gets data related to transactions on the account e.g. ?associations=transactions
-
'charges':recurring deposit Account charges data.
-
-

Example Requests :

-
recurringdepositaccounts/1
-

-
recurringdepositaccounts/1?associations=all
-
-
- GET https://DomainName/api/v1/recurringdepositaccounts/{accountId} - -{ - "id": 1, - "accountNo": "RD000023", - "externalId": "RD-23", - "clientId": 1, - "clientName": "Sangamesh N", - "savingsProductId": 3, - "savingsProductName": "RD01", - "fieldOfficerId": 0, - "status": { - "id": 100, - "code": "savingsAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false, - "prematureClosed": false, - "transferInProgress": false, - "transferOnHold": false - }, - "timeline": { - "submittedOnDate": [ - 2014, - 3, - 1 - ], - "submittedByUsername": "mifos", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator" - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "interestCompoundingPeriodType": { - "id": 4, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "preClosurePenalApplicable": false, - "minDepositTerm": 3, - "maxDepositTerm": 4, - "minDepositTermType": { - "id": 2, - "code": "deposit.term.savingsPeriodFrequencyType.months", - "value": "Months" - }, - "maxDepositTermType": { - "id": 3, - "code": "deposit.term.savingsPeriodFrequencyType.years", - "value": "Years" - }, - "recurringDepositAmount": 100, - "recurringDepositFrequency": 1, - "expectedFirstDepositOnDate": [ - 2014, - 4, - 2 - ], - "recurringDepositFrequencyType": { - "id": 2, - "code": "recurring.deposit.savingsPeriodFrequencyType.months", - "value": "Months" - }, - "depositPeriod": 6, - "depositPeriodFrequency": { - "id": 2, - "code": "deposit.period.savingsPeriodFrequencyType.months", - "value": "Months" - }, - "summary": { - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "accountBalance": 0 - }, - "accountChart": { - "id": 4, - "fromDate": [ - 2013, - 10, - 2 - ], - "accountId": 5, - "accountNumber": "RD000023", - "chartSlabs": [ - { - "id": 13, - "periodType": { - "id": 0, - "code": "interestChartPeriodType.days", - "value": "Days" - }, - "fromPeriod": 181, - "toPeriod": 365, - "annualInterestRate": 5.5, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - }, - { - "id": 12, - "periodType": { - "id": 0, - "code": "interestChartPeriodType.days", - "value": "Days" - }, - "fromPeriod": 1, - "toPeriod": 180, - "annualInterestRate": 5, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - }, - { - "id": 11, - "periodType": { - "id": 0, - "code": "interestChartPeriodType.days", - "value": "Days" - }, - "fromPeriod": 366, - "annualInterestRate": 6, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - } - ], - "periodTypes": [ - { - "id": 0, - "code": "interestChartPeriodType.days", - "value": "Days" - }, - { - "id": 1, - "code": "interestChartPeriodType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "interestChartPeriodType.months", - "value": "Months" - }, - { - "id": 3, - "code": "interestChartPeriodType.years", - "value": "Years" - } - ] - } -} - -
-
- -   -
-
-

Modify a recurring deposit application

-

Recurring 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

-
-
- PUT https://Domain Name/api/v1/recurringdepositaccounts/{accountId} - PUT recurringdepositaccounts/1 -Content-Type: application/json -No Request Body: -{ - "locale": "en", - "depositAmount": 6000 -} - - -{ - "officeId": 2, - "clientId": 1, - "savingsId": 1, - "resourceId": 1, - "changes": { - "depositAmount": 6000, - "locale": "en" - } -} - -
-
- -   -
-
-

Delete a recurring deposit application

-

At present we support hard delete of recurring 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 recurring deposit account.

-
-
- DELETE https://Domain Name/api/v1/recurringdepositaccounts/{accountsId} - DELETE recurringdepositaccounts/1 -Content-Type: application/json -No Request Body: - - -{ - "officeId": 1, - "clientId": 1, - "resourceId": 1 -} - -
-
-   -
-
-

Recurring Deposit Account Transactions:

-

Transactions possible on a recurring deposit account.

- - - - - - - - -
Field Descriptions
transactionDate
The date of the transaction.
transactionAmount
The amount of the transaction.
-
-
- -   -
-
-

Retrieve Recurring Deposit Account Transaction Template:

-

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 Requests:

-
recurringdepositaccounts/1/transactions/template?command=deposit
-
-
recurringdepositaccounts/1/transactions/template?command=withdrawal
-
-
- GET https://Domain Name/api/v1/recurringdepositaccounts/{accountId}/transactions/template?command=deposit - - -{ - "id": 1, - "transactionType": { - "id": 1, - "code": "savingsAccountTransactionType.deposit", - "value": "Deposit", - "deposit": true, - "withdrawal": false, - "interestPosting": false, - "feeDeduction": false, - "initiateTransfer": false, - "approveTransfer": false, - "withdrawTransfer": false, - "rejectTransfer": false, - "overdraftInterest": false, - "writtenoff": false, - "overdraftFee": true - }, - "accountId": 1, - "accountNo": "000000001", - "date": [ - 2014, - 6, - 25 - ], - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 4, - "inMultiplesOf": 100, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100000.000000, - "reversed": false, - "paymentTypeOptions": [] -} - -
-
- -  -
-
-

Retrieve Recurring Deposit Account Transaction:

-

Example Requests:

-
recurringdepositaccounts/1/transactions/1
-
-
-
- GET https://Domain Name/api/v1/recurringdepositaccounts/{accountId}/transactions/{transactionId} - - -{ - "id": 1, - "transactionType": { - "id": 2, - "code": "savingsAccountTransactionType.withdrawal", - "value": "Withdrawal", - "deposit": false, - "withdrawal": true, - "interestPosting": false, - "feeDeduction": false - }, - "accountId": 1, - "accountNo": "000000001", - "date": [ - 2013, - 8, - 7 - ], - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 0, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "paymentDetailData": { - "id": 62, - "paymentType": { - "id": 11, - "name": "cash" - }, - "accountNumber": "", - "checkNumber": "", - "routingCode": "", - "receiptNumber": "", - "bankNumber": "" - }, - "amount": 5000, - "runningBalance": 0, - "reversed": true -} - -
-
- -   -
-
-

Deposit Transaction

-
-
- POST https://Domain Name/api/v1/recurringdepositaccounts/{accountsId}/transactions?command=deposit - POST recurringdepositaccounts/1/transactions?command=deposit -Content-Type: application/json -No Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "transactionDate": "27 May 2013", - "transactionAmount": "500", - "paymentTypeId": "14", - "accountNumber": "acc123", - "checkNumber": "che123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123" -} - - -{ - "officeId": 1, - "clientId": 2, - "savingsId": 1, - "resourceId": 47, - "changes": { - "accountNumber": "acc123", - "checkNumber": "che123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123" - } -} - -
-
- -   -
-
-

Withdrawal Transaction

-
-
- POST https://Domain Name/api/v1/recurringdepositaccounts/{accountsId}/transactions?command=withdrawal - POST recurringdepositaccounts/1/transactions?command=withdrawal -Content-Type: application/json -No Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "transactionDate": "27 May 2013", - "transactionAmount": "500", - "paymentTypeId": "14", - "accountNumber": "acc123", - "checkNumber": "che123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123" -} - - -{ - "officeId": 1, - "clientId": 2, - "savingsId": 1, - "resourceId": 48, - "changes": { - "accountNumber": "acc123", - "checkNumber": "che123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123" - } -} - -
-
- -   -
-
-

Adjust Transaction

-

This command modifies the given transaction.

-
-
- POST https://Domain Name/api/v1/recurringdepositaccounts/{accountsId}/transactions/{transactionId}?command=modify - POST recurringdepositaccounts/1/transactions/1?command=modify -Content-Type: application/json -No Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "transactionDate": "27 May 2013", - "transactionAmount": "500", - "paymentTypeId": "14", - "accountNumber": "acc123", - "checkNumber": "che123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123" -} - - -{ - "officeId": 1, - "clientId": 2, - "savingsId": 1, - "resourceId": 48, - "changes": { - "accountNumber": "acc123", - "checkNumber": "che123", - "routingCode": "rou123", - "receiptNumber": "rec123", - "bankNumber": "ban123" - } -} - -
-
- -   -
-
-

Undo transaction

-

This command reverses the given transaction.

-
-
- POST https://Domain Name/api/v1/recurringdepositaccounts/{accountsId}/transactions/{transactionId}?command=undo - POST recurringdepositaccounts/1/transactions/1?command=undo -Content-Type: application/json -No Request Body: -{ -} - - -{ - "officeId": 1, - "clientId": 2, - "savingsId": 1, - "resourceId": 1 -} - -
-
- - - -  -
-
-

Account Transfers:

-

Ability to be able to transfer monetary funds from one account to another.

-

Note: At present only savings account to savings account transfers are supported.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Mandatory Parameters
fromOfficeId
The id of the office/branch from which the transfer is made.
fromClientId
The id of the client from which the transfer is made.
fromAccountType
The type of account from which the transfer is made. 1=Loan Account, 2=Savings Account
fromAccountId
The id of the account from which the transfer is made.
toOfficeId
The id of the office/branch to which the transfer is made.
toClientId
The id of the client to which the transfer is made.
toAccountType
The type of account to which the transfer is made. 1=Loan Account, 2=Savings Account
toAccountId
The id of the account to which the transfer is made. The accouont must be active and must have the same currency as that of the selected fromAccountId.
transferDate
The date of the transfer. Requires dateFormat and locale parameters.
transferAmount
The amount of the transfer. Requires locale parameter.
transferDescription
Description of the transfer itself.
-
-
- -   -
-
-

Retrieve Account Transfer Template:

-

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 Requests:

-
accounttransfers/template?fromAccountType=2&fromOfficeId=1
-
-
accounttransfers/template?fromAccountType=2&fromOfficeId=1&fromClientId=1
-
-
accounttransfers/template?fromClientId=1&fromAccountType=2&fromAccountId=1
-
-
-
- GET https://Domain Name/api/v1/accounttransfers/template?fromAccountType=2&fromOfficeId=1 - - -{ - "transferAmount": 0, - "transferDate": [ - 2013, - 8, - 15 - ], - "fromOffice": { - "id": 1, - "name": "HO", - "nameDecorated": "HO", - "externalId": "1", - "openingDate": [ - 2009, - 1, - 1 - ], - "hierarchy": "." - }, - "fromAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "fromOfficeOptions": [ - { - "id": 1, - "name": "HO", - "nameDecorated": "HO" - }, - { - "id": 2, - "name": "Branch 1", - "nameDecorated": "....Branch 1" - } - ], - "fromClientOptions": [ - { - "id": 1, - "displayName": "Small shop", - "officeId": 1, - "officeName": "HO" - }, - { - "id": 3, - "displayName": "Third client", - "officeId": 1, - "officeName": "HO" - } - ], - "fromAccountTypeOptions": [ - { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - } - ], - "toOfficeOptions": [ - { - "id": 1, - "name": "HO", - "nameDecorated": "HO" - }, - { - "id": 2, - "name": "Branch 1", - "nameDecorated": "....Branch 1" - } - ], - "toAccountTypeOptions": [ - { - "id": 1, - "code": "accountType.loan", - "value": "Loan Account" - }, - { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - } - ] -} - -
- -
- GET https://Domain Name/api/v1/accounttransfers/template?fromAccountType=2&fromOfficeId=1&fromClientId=1 - - -{ - "transferAmount": 0, - "transferDate": [ - 2013, - 8, - 15 - ], - "fromOffice": { - "id": 1, - "name": "HO", - "nameDecorated": "HO", - "externalId": "1", - "openingDate": [ - 2009, - 1, - 1 - ], - "hierarchy": "." - }, - "fromClient": { - "id": 1, - "accountNo": "000000001", - "status": { - "id": 300, - "code": "clientStatusType.active", - "value": "Active" - }, - "active": true, - "activationDate": [ - 2013, - 3, - 1 - ], - "fullname": "Small shop", - "displayName": "Small shop", - "officeId": 1, - "officeName": "HO", - "groups": [] - }, - "fromAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "fromOfficeOptions": [ - { - "id": 1, - "name": "HO", - "nameDecorated": "HO" - }, - { - "id": 2, - "name": "Branch 1", - "nameDecorated": "....Branch 1" - } - ], - "fromClientOptions": [ - { - "id": 1, - "displayName": "Small shop", - "officeId": 1, - "officeName": "HO" - }, - { - "id": 3, - "displayName": "Third client", - "officeId": 1, - "officeName": "HO" - } - ], - "fromAccountTypeOptions": [ - { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - } - ], - "fromAccountOptions": [ - { - "id": 1, - "accountNo": "000000001", - "clientId": 1, - "clientName": "Small shop", - "productId": 1, - "productName": "Passbook", - "fieldOfficerId": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - }, - { - "id": 3, - "accountNo": "000000003", - "clientId": 1, - "clientName": "Small shop", - "productId": 2, - "productName": "Shilling product", - "fieldOfficerId": 0, - "currency": { - "code": "KES", - "name": "Kenyan Shilling", - "decimalPlaces": 0, - "inMultiplesOf": 0, - "displaySymbol": "KSh", - "nameCode": "currency.KES", - "displayLabel": "Kenyan Shilling (KSh)" - } - } - ], - "toOfficeOptions": [ - { - "id": 1, - "name": "HO", - "nameDecorated": "HO" - }, - { - "id": 2, - "name": "Branch 1", - "nameDecorated": "....Branch 1" - } - ], - "toAccountTypeOptions": [ - { - "id": 1, - "code": "accountType.loan", - "value": "Loan Account" - }, - { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - } - ] -} - -
- -
- GET https://Domain Name/api/v1/accounttransfers/template?fromClientId=1&fromAccountType=2&fromAccountId=1 - - -{ - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "transferAmount": 0, - "transferDate": [ - 2013, - 8, - 15 - ], - "fromOffice": { - "id": 1, - "name": "HO", - "nameDecorated": "HO", - "externalId": "1", - "openingDate": [ - 2009, - 1, - 1 - ], - "hierarchy": "." - }, - "fromClient": { - "id": 1, - "accountNo": "000000001", - "status": { - "id": 300, - "code": "clientStatusType.active", - "value": "Active" - }, - "active": true, - "activationDate": [ - 2013, - 3, - 1 - ], - "fullname": "Small shop", - "displayName": "Small shop", - "officeId": 1, - "officeName": "HO", - "groups": [] - }, - "fromAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "fromAccount": { - "id": 1, - "accountNo": "000000001", - "clientId": 1, - "clientName": "Small shop", - "productId": 1, - "productName": "Passbook", - "fieldOfficerId": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - }, - "fromOfficeOptions": [ - { - "id": 1, - "name": "HO", - "nameDecorated": "HO" - }, - { - "id": 2, - "name": "Branch 1", - "nameDecorated": "....Branch 1" - } - ], - "fromClientOptions": [ - { - "id": 1, - "displayName": "Small shop", - "officeId": 1, - "officeName": "HO" - }, - { - "id": 3, - "displayName": "Third client", - "officeId": 1, - "officeName": "HO" - } - ], - "fromAccountTypeOptions": [ - { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - } - ], - "fromAccountOptions": [ - { - "id": 1, - "accountNo": "000000001", - "clientId": 1, - "clientName": "Small shop", - "productId": 1, - "productName": "Passbook", - "fieldOfficerId": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - }, - { - "id": 3, - "accountNo": "000000003", - "clientId": 1, - "clientName": "Small shop", - "productId": 2, - "productName": "Shilling product", - "fieldOfficerId": 0, - "currency": { - "code": "KES", - "name": "Kenyan Shilling", - "decimalPlaces": 0, - "inMultiplesOf": 0, - "displaySymbol": "KSh", - "nameCode": "currency.KES", - "displayLabel": "Kenyan Shilling (KSh)" - } - } - ], - "toOfficeOptions": [ - { - "id": 1, - "name": "HO", - "nameDecorated": "HO" - }, - { - "id": 2, - "name": "Branch 1", - "nameDecorated": "....Branch 1" - } - ], - "toAccountTypeOptions": [ - { - "id": 1, - "code": "accountType.loan", - "value": "Loan Account" - }, - { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - } - ] -} - -
- -
- -   -
-
-

Create new Transfer

-

Ability to create new transfer of monetary funds from one account to another.

-
-
- POST https://Domain Name/api/v1/accounttransfers - POST accounttransfers/ -Content-Type: application/json -No Request Body: -{ -"fromOfficeId": 1, -"fromClientId": 1, -"fromAccountType": 2, -"fromAccountId": 1, -"toOfficeId": 1, -"toClientId": 1, -"toAccountType": 2, -"toAccountId": 2, -"dateFormat": "dd MMMM yyyy", -"locale": "en", -"transferDate": "01 August 2011", -"transferAmount": "112.45", -"transferDescription": "A description of the transfer" -} - - -{ - "savingsId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

List account transfers

-

Example Requests:

-
accounttransfers
-
-
-
- GET https://Domain Name/api/v1/accounttransfers - -{ - "totalFilteredRecords": 4, - "pageItems": [ - { - "id": 1, - "reversed": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "transferAmount": 200, - "transferDate": [ - 2013, - 4, - 1 - ], - "transferDescription": "pay off loan from savings.", - "fromOffice": { - "id": 1, - "name": "HO" - }, - "fromClient": { - "id": 1, - "displayName": "Small shop", - "officeId": 1, - "officeName": "HO" - }, - "fromAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "fromAccount": { - "id": 1, - "accountNo": "000000001" - }, - "toOffice": { - "id": 1, - "name": "HO" - }, - "toClient": { - "id": 1, - "displayName": "Small shop", - "officeId": 1, - "officeName": "HO" - }, - "toAccountType": { - "id": 1, - "code": "accountType.loan", - "value": "Loan Account" - }, - "toAccount": { - "id": 1, - "accountNo": "000000001" - } - }, - { - "id": 2, - "reversed": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "transferAmount": 112.45, - "transferDate": [ - 2013, - 6, - 1 - ], - "transferDescription": "A description of the transfer", - "fromOffice": { - "id": 1, - "name": "HO" - }, - "fromClient": { - "id": 1, - "displayName": "Small shop", - "officeId": 1, - "officeName": "HO" - }, - "fromAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "fromAccount": { - "id": 1, - "accountNo": "000000001" - }, - "toOffice": { - "id": 1, - "name": "HO" - }, - "toClient": { - "id": 1, - "displayName": "Small shop", - "officeId": 1, - "officeName": "HO" - }, - "toAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "toAccount": { - "id": 3, - "accountNo": "000000003" - } - }, - { - "id": 3, - "reversed": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "transferAmount": 112.45, - "transferDate": [ - 2013, - 6, - 1 - ], - "transferDescription": "A description of the transfer", - "fromOffice": { - "id": 1, - "name": "HO" - }, - "fromClient": { - "id": 1, - "displayName": "Small shop", - "officeId": 1, - "officeName": "HO" - }, - "fromAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "fromAccount": { - "id": 1, - "accountNo": "000000001" - }, - "toOffice": { - "id": 1, - "name": "HO" - }, - "toClient": { - "id": 1, - "displayName": "Small shop", - "officeId": 1, - "officeName": "HO" - }, - "toAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "toAccount": { - "id": 3, - "accountNo": "000000003" - } - }, - { - "id": 4, - "reversed": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "transferAmount": 112.45, - "transferDate": [ - 2013, - 6, - 1 - ], - "transferDescription": "A description of the transfer", - "fromOffice": { - "id": 1, - "name": "HO" - }, - "fromClient": { - "id": 1, - "displayName": "Small shop", - "officeId": 1, - "officeName": "HO" - }, - "fromAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "fromAccount": { - "id": 1, - "accountNo": "000000001" - }, - "toOffice": { - "id": 1, - "name": "HO" - }, - "toClient": { - "id": 1, - "displayName": "Small shop", - "officeId": 1, - "officeName": "HO" - }, - "toAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "toAccount": { - "id": 3, - "accountNo": "000000003" - } - } - ] -} - -
-
+   +
+
+

Write-off Loan

+
+
+ + POST https://DomainName/api/v1/loans/{loanId}/transactions?command=writeoff + + + POST loans/70/transactions?command=writeoff + Content-Type: application/json + Request Body: + { + "locale": "en_GB", + "dateFormat": "dd MMMM yyyy", + "transactionDate": "14 May 2012", + "note": "Write-off note" + } + + + { + "officeId": 1, + "clientId": 7, + "loanId": 70, + "resourceId": 442, + "changes": { + "transactionDate": "1 March 2012", + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "status": { + "id": 601, + "code": "loanStatusType.closed.written.off", + "value": "Closed (written off)", + "pendingApproval": false, + "waitingForDisbursal": false, + "active": false, + "closedObligationsMet": false, + "closedWrittenOff": true, + "closedRescheduled": false, + "closed": true, + "overpaid": false + }, + "closedOnDate": "1 March 2012", + "writtenOffOnDate": "1 March 2012", + "note": "Write-off note" + } + } -   -
-
-

Retrieve account transfer:

-

Example Requests :

-
accounttransfers/1
-
-
-
- GET https://DomainName/api/v1/accounttransfers/{transferId} - -{ - "id": 1, - "reversed": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "transferAmount": 200, - "transferDate": [ - 2013, - 4, - 1 - ], - "transferDescription": "pay off loan from savings.", - "fromOffice": { - "id": 1, - "name": "HO" - }, - "fromClient": { - "id": 1, - "displayName": "Small shop", - "officeId": 1, - "officeName": "HO" - }, - "fromAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "fromAccount": { - "id": 1, - "accountNo": "000000001" - }, - "toOffice": { - "id": 1, - "name": "HO" - }, - "toClient": { - "id": 1, - "displayName": "Small shop", - "officeId": 1, - "officeName": "HO" - }, - "toAccountType": { - "id": 1, - "code": "accountType.loan", - "value": "Loan Account" - }, - "toAccount": { - "id": 1, - "accountNo": "000000001" - } -} - -
-
- -   -
-
-

Retrieve Refund of an Active Loan by Transfer Template:

-

Example Requests :

-
accounttransfers/templateRefundByTransfer?fromAccountId=2&fromAccountType=1& - toAccountId=1&toAccountType=2&toClientId=1&toOfficeId=1
-
-
-
- GET https://DomainName/api/v1/accounttransfers/templateRefundByTransfer - -{ -   "currency": { -      "code": "USD", -      "name": "US Dollar", -      "decimalPlaces": 0, -      "inMultiplesOf": 0, -      "displaySymbol": "$", -      "nameCode": "currency.USD", -      "displayLabel": "US Dollar ($)" -   }, -   "transferAmount": 130, -   "transferDate": [ -      2014, -      11, -      1 -   ], -   "fromOffice": { -      "id": 1, -      "name": "Head Office", -      "nameDecorated": "Head Office", -      "externalId": "1", -      "openingDate": [ -         2009, -         1, -         1 -      ], -      "hierarchy": "." -   }, -   "fromClient": { -      "id": 1, -      "accountNo": "000000001", -      "status": { -         "id": 300, -         "code": "clientStatusType.active", -         "value": "Active" -      }, -      "active": true, -      "activationDate": [ -         2012, -         2, -         1 -      ], -      "firstname": "Daniel", -      "lastname": "Owusu", -      "displayName": "Daniel Owusu", -      "gender": {}, -      "clientType": {}, -      "clientClassification": {}, -      "officeId": 1, -      "officeName": "Head Office", -      "timeline": { -         "submittedOnDate": [ -            2012, -            2, -            1 -         ], -         "submittedByUsername": "mifos", -         "submittedByFirstname": "App", -         "submittedByLastname": "Administrator", -         "activatedOnDate": [ -            2012, -            2, -            1 -         ], -         "activatedByUsername": "mifos", -         "activatedByFirstname": "App", -         "activatedByLastname": "Administrator" -      }, -      "groups": [] -   }, -   "fromAccountType": { -      "id": 1, -      "code": "accountType.loan", -      "value": "Loan Account" -   }, -   "fromAccount": { -      "id": 2, -      "accountNo": "000000002", -      "clientId": 1, -      "clientName": "Daniel Owusu", -      "productId": 1, -      "productName": "CTRL", -      "fieldOfficerId": 0, -      "currency": { -         "code": "USD", -         "name": "US Dollar", -         "decimalPlaces": 0, -         "inMultiplesOf": 0, -         "displaySymbol": "$", -         "nameCode": "currency.USD", -         "displayLabel": "US Dollar ($)" -      }, -      "amtForTransfer": 130 -   }, -   "toOffice": { -      "id": 1, -      "name": "Head Office", -      "nameDecorated": "Head Office", -      "externalId": "1", -      "openingDate": [ -         2009, -         1, -         1 -      ], -      "hierarchy": "." -   }, -   "toClient": { -      "id": 1, -      "displayName": "Daniel Owusu", -      "officeId": 1, -      "officeName": "Head Office" -   }, -   "toAccountType": { -      "id": 2, -      "code": "accountType.savings", -      "value": "Savings Account" -   }, -   "toAccount": { -      "id": 1, -      "accountNo": "000000001", -      "clientId": 1, -      "clientName": "Daniel Owusu", -      "productId": 1, -      "productName": "TEST", -      "fieldOfficerId": 0, -      "currency": { -         "code": "USD", -         "name": "US Dollar", -         "decimalPlaces": 0, -         "inMultiplesOf": 0, -         "displaySymbol": "$", -         "nameCode": "currency.USD", -         "displayLabel": "US Dollar ($)" -      } -   }, -   "fromOfficeOptions": [ -      { -         "id": 1, -         "name": "Head Office", -         "nameDecorated": "Head Office" -      } -   ], -   "fromClientOptions": [ -      { -         "id": 1, -         "displayName": "Daniel Owusu", -         "officeId": 1, -         "officeName": "Head Office" -      } -   ], -   "fromAccountTypeOptions": [ -      { -         "id": 2, -         "code": "accountType.savings", -         "value": "Savings Account" -      }, -      { -         "id": 1, -         "code": "accountType.loan", -         "value": "Loan Account" -      } -   ], -   "fromAccountOptions": [ -      { -         "id": 2, -         "accountNo": "000000002", -         "clientId": 1, -         "clientName": "Daniel Owusu", -         "productId": 1, -         "productName": "CTRL", -         "fieldOfficerId": 0, -         "currency": { -            "code": "USD", -            "name": "US Dollar", -            "decimalPlaces": 0, -            "inMultiplesOf": 0, -            "displaySymbol": "$", -            "nameCode": "currency.USD", -            "displayLabel": "US Dollar ($)" -         } -      } -   ], -   "toOfficeOptions": [ -      { -         "id": 1, -         "name": "Head Office", -         "nameDecorated": "Head Office" -      } -   ], -   "toClientOptions": [ -      { -         "id": 1, -         "displayName": "Daniel Owusu", -         "officeId": 1, -         "officeName": "Head Office" -      } -   ], -   "toAccountTypeOptions": [ -      { -         "id": 2, -         "code": "accountType.savings", -         "value": "Savings Account" -      } -   ], -   "toAccountOptions": [ -      { -         "id": 1, -         "accountNo": "000000001", -         "clientId": 1, -         "clientName": "Daniel Owusu", -         "productId": 1, -         "productName": "TEST", -         "fieldOfficerId": 0, -         "currency": { -            "code": "USD", -            "name": "US Dollar", -            "decimalPlaces": 0, -            "inMultiplesOf": 0, -            "displaySymbol": "$", -            "nameCode": "currency.USD", -            "displayLabel": "US Dollar ($)" -         } -      } -   ] -} - -
-
- - -   -
-
-

Refund of an Active Loan by Transfer

-

Ability to refund an active loan by transferring to a savings account.

-
-
- POST https://Domain Name/api/v1/accounttransfers - POST refundByTransfer/ -Content-Type: application/json -No Request Body: -{ - "fromAccountId": "2", - "fromAccountType": 1, - "toOfficeId": 1, - "toClientId": 1, - "toAccountType": 2, - "toAccountId": 1, - "transferAmount": 130, - "transferDate": "31 October 2014", - "transferDescription": "Transfer refund to my savings account", - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "fromClientId": 1, - "fromOfficeId": 1 - -} - - -{ - "savingsId": 1, - "resourceId": 1 -} - -
-
- - - - -  -
-
-

Standing Instructions

-

Standing instructions (or standing orders) refer to instructions a bank account holder ("the payer") gives to his or her bank to pay a set amount at regular intervals to another's ("the payee's") account.

-

Note: At present only savings account to savings account and savings account to Loan account transfers are permitted.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Mandatory Parameters
name
A name for this Standing Instruction
fromOfficeId
The id of the office/branch from which the transfer is made.
fromClientId
The id of the client (payer) who makes the transfer
fromAccountType
The type of account from which the transfer is made. 1=Loan Account, 2=Savings Account
fromAccountId
The id of the account from which the transfer is made.
toOfficeId
The id of the office/branch to which the transfer is made.
toClientId
The id of the client (payee), to whose account the transfer is made.
toAccountType
The type of account to which the transfer is made. 1=Loan Account, 2=Savings Account
toAccountId
The id of the account to which the transfer is made. The account must be active and must be in the same currency as that of the selected fromAccountId.
priority
The priority of instruction while executing instructions. 1= URGENT,2 = HIGH, 3 = MEDIUM, 4 = LOW
transferType
Identifies the source and destination account types. 1=Account Transfer(savings to savings), 2=Loan Repayment
instructionType
Determines the amount to be transferred while executing a standing instruction. 1. FIXED, 2.DUES
status
The Standing instruction state. 1. Active, 2.Disabled, 3.Deleted
recurrenceType
Determines the recurrence of this standing instruction, can be either 1. Periodic or 2.As per dues
validFrom
The Standing instruction's Start date.
- - - - - - - - - - - - - - - - - - - -
Optional Parameters
amount
Transfer amount while running the instruction. must be provided if the selected instructionType is fixed
validTill
The Standing instruction's end date.
recurrenceFrequency
The recurrence frequency of a Standing instruction's execution. Must be provided if the recurrenceType is Periodic. 0 = days, 1 = weekly, 2 = monthly, 3 = yearly
recurrenceInterval
The recurrence interval of a standing instruction execution, determines the recurrence schedule when combined with recurrenceFrequency. Must be provided if the recurrenceType is periodic
recurrenceOnMonthDay
The Month and Day of recurrence. Must be provided if the recurrenceFrequency is monthly or yearly
-
-
- -   -
-
-

Retrieve Standing Instruction Template:

-

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 Requests:

-
standinginstructions/template?fromAccountType=2&fromOfficeId=1
-
-
standinginstructions/template?fromAccountType=2&fromOfficeId=1&fromClientId=1&transferType=1
-
-
standinginstructions/template?fromClientId=1&fromAccountType=2&fromAccountId=1&transferType=1
-
-
-
- GET https://Domain Name/api/v1/standinginstructions/template?fromAccountType=2&fromOfficeId=1 - - - { - "fromOffice": { - "id": 1, - "name": "Head Office", - "nameDecorated": "Head Office", - "externalId": "1", - "openingDate": [ - 2009, - 1, - 1 - ], - "hierarchy": "." - }, - "fromAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "fromOfficeOptions": [ - { - "id": 1, - "name": "Head Office", - "nameDecorated": "Head Office" - } - ], - "fromClientOptions": [ - { - "id": 1, - "displayName": "Client_FirstName_2VRAG Client_LastName_9QCY", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 20, - "displayName": "Client_FirstName_9KYLE Client_LastName_I0GJ", - "officeId": 1, - "officeName": "Head Office" - } - ], - "fromAccountTypeOptions": [ - { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - { - "id": 1, - "code": "accountType.loan", - "value": "Loan Account" - } - ], - "toOfficeOptions": [ - { - "id": 1, - "name": "Head Office", - "nameDecorated": "Head Office" - } - ], - "toAccountTypeOptions": [ - { - "id": 1, - "code": "accountType.loan", - "value": "Loan Account" - }, - { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - } - ], - "transferTypeOptions": [ - { - "id": 1, - "code": "accountTransferType.account.transfer", - "value": "Account Transfer" - }, - { - "id": 2, - "code": "accountTransferType.loan.repayment", - "value": "Loan Repayment" - } - ], - "statusOptions": [ - { - "id": 1, - "code": "standingInstructionStatus.active", - "value": "Active" - }, - { - "id": 2, - "code": "standingInstructionStatus.disabled", - "value": "Disabled" - } - ], - "instructionTypeOptions": [ - { - "id": 1, - "code": "standingInstructionType.fixed", - "value": "Fixed" - }, - { - "id": 2, - "code": "standingInstructionType.dues", - "value": "Dues" - } - ], - "priorityOptions": [ - { - "id": 1, - "code": "standingInstructionPriority.urgent", - "value": "Urgent Priority" - }, - { - "id": 2, - "code": "standingInstructionPriority.high", - "value": "High Priority" - }, - { - "id": 3, - "code": "standingInstructionPriority.medium", - "value": "Medium Priority" - }, - { - "id": 4, - "code": "standingInstructionPriority.low", - "value": "Low Priority" - } - ], - "recurrenceTypeOptions": [ - { - "id": 1, - "code": "accountTransferRecurrenceType.periodic", - "value": "Periodic Recurrence" - }, - { - "id": 2, - "code": "accountTransferRecurrenceType.as.per.dues", - "value": "As Per Dues Recurrence" - } - ], - "recurrenceFrequencyOptions": [ - { - "id": 0, - "code": "frequencyperiodFrequencyType.days", - "value": "Days" - }, - { - "id": 1, - "code": "frequencyperiodFrequencyType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "frequencyperiodFrequencyType.months", - "value": "Months" - }, - { - "id": 3, - "code": "frequencyperiodFrequencyType.years", - "value": "Years" - } - ] -} - -
- -
- GET https://Domain Name/api/v1/standinginstructions/template?fromAccountType=2&fromOfficeId=1&fromClientId=1&transferType=1 - - - { - "fromOffice": { - "id": 1, - "name": "Head Office", - "nameDecorated": "Head Office", - "externalId": "1", - "openingDate": [ - 2009, - 1, - 1 - ], - "hierarchy": "." - }, - "fromClient": { - "id": 1, - "accountNo": "000000001", - "externalId": "ID_UTMYOEQ", - "status": { - "id": 300, - "code": "clientStatusType.active", - "value": "Active" - }, - "active": true, - "activationDate": [ - 2011, - 1, - 1 - ], - "firstname": "Client_FirstName_2VRAG", - "lastname": "Client_LastName_9QCY", - "displayName": "Client_FirstName_2VRAG Client_LastName_9QCY", - "officeId": 1, - "officeName": "Head Office", - "timeline": { - "submittedOnDate": [ - 2011, - 1, - 1 - ], - "submittedByUsername": "mifos", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator", - "activatedOnDate": [ - 2011, - 1, - 1 - ], - "activatedByUsername": "mifos", - "activatedByFirstname": "App", - "activatedByLastname": "Administrator" - }, - "groups": [] - }, - "fromAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "fromOfficeOptions": [ - { - "id": 1, - "name": "Head Office", - "nameDecorated": "Head Office" - } - ], - "fromClientOptions": [ - { - "id": 1, - "displayName": "Client_FirstName_2VRAG Client_LastName_9QCY", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 2, - "displayName": "Client_FirstName_ZYDN2 Client_LastName_XVOP", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 3, - "displayName": "Client_FirstName_89LYT Client_LastName_4EY6", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 4, - "displayName": "Client_FirstName_PRCBG Client_LastName_JZU2", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 5, - "displayName": "Client_FirstName_J37GR Client_LastName_1T3X", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 6, - "displayName": "Client_FirstName_ZVHM2 Client_LastName_RUGS", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 7, - "displayName": "Client_FirstName_RBALP Client_LastName_437P", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 8, - "displayName": "Client_FirstName_R7M4V Client_LastName_Q5ED", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 9, - "displayName": "Client_FirstName_WIBDE Client_LastName_U91T", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 10, - "displayName": "Client_FirstName_26QJT Client_LastName_BEHD", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 11, - "displayName": "Client_FirstName_W071M Client_LastName_L7Z2", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 12, - "displayName": "Client_FirstName_QUHDJ Client_LastName_S4C5", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 13, - "displayName": "Client_FirstName_MNP4W Client_LastName_J8Y3", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 14, - "displayName": "Client_FirstName_TL6I8 Client_LastName_5YHG", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 15, - "displayName": "Client_FirstName_LUTBO Client_LastName_DITS", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 16, - "displayName": "Client_FirstName_UE39Z Client_LastName_PUWZ", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 17, - "displayName": "Client_FirstName_M8SD2 Client_LastName_J6QK", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 18, - "displayName": "Client_FirstName_SG8NF Client_LastName_BM1J", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 19, - "displayName": "Client_FirstName_BW0C8 Client_LastName_LGV9", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 20, - "displayName": "Client_FirstName_9KYLE Client_LastName_I0GJ", - "officeId": 1, - "officeName": "Head Office" - } - ], - "fromAccountTypeOptions": [ - { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - } - ], - "fromAccountOptions": [], - "toOfficeOptions": [ - { - "id": 1, - "name": "Head Office", - "nameDecorated": "Head Office" - } - ], - "toAccountTypeOptions": [ - { - "id": 1, - "code": "accountType.loan", - "value": "Loan Account" - } - ], - "transferTypeOptions": [ - { - "id": 1, - "code": "accountTransferType.account.transfer", - "value": "Account Transfer" - }, - { - "id": 2, - "code": "accountTransferType.loan.repayment", - "value": "Loan Repayment" - } - ], - "statusOptions": [ - { - "id": 1, - "code": "standingInstructionStatus.active", - "value": "Active" - }, - { - "id": 2, - "code": "standingInstructionStatus.disabled", - "value": "Disabled" - } - ], - "instructionTypeOptions": [ - { - "id": 1, - "code": "standingInstructionType.fixed", - "value": "Fixed" - }, - { - "id": 2, - "code": "standingInstructionType.dues", - "value": "Dues" - } - ], - "priorityOptions": [ - { - "id": 1, - "code": "standingInstructionPriority.urgent", - "value": "Urgent Priority" - }, - { - "id": 2, - "code": "standingInstructionPriority.high", - "value": "High Priority" - }, - { - "id": 3, - "code": "standingInstructionPriority.medium", - "value": "Medium Priority" - }, - { - "id": 4, - "code": "standingInstructionPriority.low", - "value": "Low Priority" - } - ], - "recurrenceTypeOptions": [ - { - "id": 1, - "code": "accountTransferRecurrenceType.periodic", - "value": "Periodic Recurrence" - }, - { - "id": 2, - "code": "accountTransferRecurrenceType.as.per.dues", - "value": "As Per Dues Recurrence" - } - ], - "recurrenceFrequencyOptions": [ - { - "id": 0, - "code": "frequencyperiodFrequencyType.days", - "value": "Days" - }, - { - "id": 1, - "code": "frequencyperiodFrequencyType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "frequencyperiodFrequencyType.months", - "value": "Months" - }, - { - "id": 3, - "code": "frequencyperiodFrequencyType.years", - "value": "Years" - } - ] -} - -
- -
- GET https://Domain Name/api/v1/standinginstructions/template?fromAccountType=2&fromOfficeId=1&fromClientId=1&transferType=2&fromAccountId=1 - - -{ - "fromOffice": { - "id": 1, - "name": "Head Office", - "nameDecorated": "Head Office", - "externalId": "1", - "openingDate": [ - 2009, - 1, - 1 - ], - "hierarchy": "." - }, - "fromClient": { - "id": 3, - "accountNo": "000000003", - "externalId": "ID_ECEAKAP", - "status": { - "id": 300, - "code": "clientStatusType.active", - "value": "Active" - }, - "active": true, - "activationDate": [ - 2011, - 3, - 4 - ], - "firstname": "Client_FirstName_89LYT", - "lastname": "Client_LastName_4EY6", - "displayName": "Client_FirstName_89LYT Client_LastName_4EY6", - "officeId": 1, - "officeName": "Head Office", - "timeline": { - "submittedOnDate": [ - 2011, - 3, - 4 - ], - "submittedByUsername": "mifos", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator", - "activatedOnDate": [ - 2011, - 3, - 4 - ], - "activatedByUsername": "mifos", - "activatedByFirstname": "App", - "activatedByLastname": "Administrator" - }, - "groups": [] - }, - "fromAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "fromAccount": { - "id": 1, - "accountNo": "000000001", - "clientId": 3, - "clientName": "Client_FirstName_89LYT Client_LastName_4EY6", - "productId": 1, - "productName": "SAVINGS_PRODUCT_MVA619", - "fieldOfficerId": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 4, - "inMultiplesOf": 0, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - }, - "fromOfficeOptions": [ - { - "id": 1, - "name": "Head Office", - "nameDecorated": "Head Office" - } - ], - "fromClientOptions": [ - { - "id": 1, - "displayName": "Client_FirstName_2VRAG Client_LastName_9QCY", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 2, - "displayName": "Client_FirstName_ZYDN2 Client_LastName_XVOP", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 3, - "displayName": "Client_FirstName_89LYT Client_LastName_4EY6", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 4, - "displayName": "Client_FirstName_PRCBG Client_LastName_JZU2", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 5, - "displayName": "Client_FirstName_J37GR Client_LastName_1T3X", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 6, - "displayName": "Client_FirstName_ZVHM2 Client_LastName_RUGS", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 7, - "displayName": "Client_FirstName_RBALP Client_LastName_437P", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 8, - "displayName": "Client_FirstName_R7M4V Client_LastName_Q5ED", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 9, - "displayName": "Client_FirstName_WIBDE Client_LastName_U91T", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 10, - "displayName": "Client_FirstName_26QJT Client_LastName_BEHD", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 11, - "displayName": "Client_FirstName_W071M Client_LastName_L7Z2", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 12, - "displayName": "Client_FirstName_QUHDJ Client_LastName_S4C5", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 13, - "displayName": "Client_FirstName_MNP4W Client_LastName_J8Y3", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 14, - "displayName": "Client_FirstName_TL6I8 Client_LastName_5YHG", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 15, - "displayName": "Client_FirstName_LUTBO Client_LastName_DITS", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 16, - "displayName": "Client_FirstName_UE39Z Client_LastName_PUWZ", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 17, - "displayName": "Client_FirstName_M8SD2 Client_LastName_J6QK", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 18, - "displayName": "Client_FirstName_SG8NF Client_LastName_BM1J", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 19, - "displayName": "Client_FirstName_BW0C8 Client_LastName_LGV9", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 20, - "displayName": "Client_FirstName_9KYLE Client_LastName_I0GJ", - "officeId": 1, - "officeName": "Head Office" - } - ], - "fromAccountTypeOptions": [ - { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - } - ], - "fromAccountOptions": [ - { - "id": 1, - "accountNo": "000000001", - "clientId": 3, - "clientName": "Client_FirstName_89LYT Client_LastName_4EY6", - "productId": 1, - "productName": "SAVINGS_PRODUCT_MVA619", - "fieldOfficerId": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 4, - "inMultiplesOf": 0, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - } - ], - "toOfficeOptions": [ - { - "id": 1, - "name": "Head Office", - "nameDecorated": "Head Office" - } - ], - "toAccountTypeOptions": [ - { - "id": 1, - "code": "accountType.loan", - "value": "Loan Account" - } - ], - "transferTypeOptions": [ - { - "id": 1, - "code": "accountTransferType.account.transfer", - "value": "Account Transfer" - }, - { - "id": 2, - "code": "accountTransferType.loan.repayment", - "value": "Loan Repayment" - } - ], - "statusOptions": [ - { - "id": 1, - "code": "standingInstructionStatus.active", - "value": "Active" - }, - { - "id": 2, - "code": "standingInstructionStatus.disabled", - "value": "Disabled" - } - ], - "instructionTypeOptions": [ - { - "id": 1, - "code": "standingInstructionType.fixed", - "value": "Fixed" - }, - { - "id": 2, - "code": "standingInstructionType.dues", - "value": "Dues" - } - ], - "priorityOptions": [ - { - "id": 1, - "code": "standingInstructionPriority.urgent", - "value": "Urgent Priority" - }, - { - "id": 2, - "code": "standingInstructionPriority.high", - "value": "High Priority" - }, - { - "id": 3, - "code": "standingInstructionPriority.medium", - "value": "Medium Priority" - }, - { - "id": 4, - "code": "standingInstructionPriority.low", - "value": "Low Priority" - } - ], - "recurrenceTypeOptions": [ - { - "id": 1, - "code": "accountTransferRecurrenceType.periodic", - "value": "Periodic Recurrence" - }, - { - "id": 2, - "code": "accountTransferRecurrenceType.as.per.dues", - "value": "As Per Dues Recurrence" - } - ], - "recurrenceFrequencyOptions": [ - { - "id": 0, - "code": "frequencyperiodFrequencyType.days", - "value": "Days" - }, - { - "id": 1, - "code": "frequencyperiodFrequencyType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "frequencyperiodFrequencyType.months", - "value": "Months" - }, - { - "id": 3, - "code": "frequencyperiodFrequencyType.years", - "value": "Years" - } - ] -} - -
- -
- -   -
-
-

Create new Standing Instruction

-

Ability to create new instruction for transfer of monetary funds from one account to another.

-
-
- POST https://Domain Name/api/v1/standinginstructions - POST standinginstructions/ -Content-Type: application/json -No Request Body: -{ - "fromOfficeId":1, - "fromClientId":1, - "fromAccountType":2, - "name":"standing instruction", - "transferType":1, - "priority":2, - "status":1, - "fromAccountId":1, - "toOfficeId":1, - "toClientId":1, - "toAccountType":2, - "toAccountId":3, - "instructionType":1, - "amount":"221", - "validFrom":"08 April 2014", - "recurrenceType":1, - "recurrenceInterval":"1", - "recurrenceFrequency":2, - "locale":"en", - "dateFormat":"dd MMMM yyyy", - "recurrenceOnMonthDay":"02 April", - "monthDayFormat":"dd MMMM" -} - - -{ - -"clientId":1, -"resourceId":65 -} - -
-
- -   -
-
-

Update Standing Instruction

-

Ability to modify existing instruction for transfer of monetary funds from one account to another.

-
-
- PUT https://Domain Name/api/v1/standinginstructions/1?command=update - PUT standinginstructions/1?command=update -Content-Type: application/json -No Request Body: -{ - "recurrenceInterval":"2" -} - - -{ - "resourceId":20, - "changes":{ - "recurrenceInterval":2 - } -} - -
-
- -   -
-
-

Delete Standing Instruction

-

Ability to modify existing instruction for transfer of monetary funds from one account to another.

-
-
- PUT https://Domain Name/api/v1/standinginstructions/1?command=delete - PUT standinginstructions/1?command=delete -Content-Type: application/json -No Request Body: -{ - -} - - -{ - "resourceId":20, - "changes":{ - "status":3 - } -} - -
-
- -   -
-
-

List Standing Instructions

-

Example Requests:

-
standinginstructions
-
-
-
- GET https://Domain Name/api/v1/standinginstructions - -{ - "totalFilteredRecords": 2, - "pageItems": [ - { - "id": 1, - "accountDetailId": 6, - "name": "test standing", - "fromOffice": { - "id": 1, - "name": "Head Office" - }, - "fromClient": { - "id": 1, - "displayName": "Test test", - "officeId": 1, - "officeName": "Head Office" - }, - "fromAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "fromAccount": { - "id": 14, - "accountNo": "000000014", - "productId": 1, - "productName": "savings old" - }, - "toOffice": { - "id": 1, - "name": "Head Office" - }, - "toClient": { - "id": 1, - "displayName": "Test test", - "officeId": 1, - "officeName": "Head Office" - }, - "toAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "toAccount": { - "id": 3, - "accountNo": "000000003", - "productId": 4, - "productName": "account overdraft" - }, - "transferType": { - "id": 1, - "code": "accountTransferType.account.transfer", - "value": "Account Transfer" - }, - "priority": { - "id": 3, - "code": "standingInstructionPriority.medium", - "value": "Medium Priority" - }, - "instructionType": { - "id": 1, - "code": "standingInstructionType.fixed", - "value": "Fixed" - }, - "status": { - "id": 3, - "code": "standingInstructionStatus.deleted", - "value": "Deleted" - }, - "amount": 150.000000, - "validFrom": [ - 2014, - 4, - 3 - ], - "recurrenceType": { - "id": 1, - "code": "accountTransferRecurrenceType.periodic", - "value": "Periodic Recurrence" - }, - "recurrenceFrequency": { - "id": 2, - "code": "recurrenceperiodFrequencyType.months", - "value": "Months" - }, - "recurrenceInterval": 1, - "recurrenceOnMonthDay": [ - 4, - 3 - ] - }, - { - "id": 2, - "accountDetailId": 7, - "name": "test standing 2", - "fromOffice": { - "id": 1, - "name": "Head Office" - }, - "fromClient": { - "id": 1, - "displayName": "Test test", - "officeId": 1, - "officeName": "Head Office" - }, - "fromAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "fromAccount": { - "id": 14, - "accountNo": "000000014", - "productId": 1, - "productName": "savings old" - }, - "toOffice": { - "id": 1, - "name": "Head Office" - }, - "toClient": { - "id": 1, - "displayName": "Test test", - "officeId": 1, - "officeName": "Head Office" - }, - "toAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "toAccount": { - "id": 3, - "accountNo": "000000003", - "productId": 4, - "productName": "account overdraft" - }, - "transferType": { - "id": 1, - "code": "accountTransferType.account.transfer", - "value": "Account Transfer" - }, - "priority": { - "id": 2, - "code": "standingInstructionPriority.high", - "value": "High Priority" - }, - "instructionType": { - "id": 1, - "code": "standingInstructionType.fixed", - "value": "Fixed" - }, - "status": { - "id": 3, - "code": "standingInstructionStatus.deleted", - "value": "Deleted" - }, - "amount": 100.000000, - "validFrom": [ - 2014, - 4, - 3 - ], - "recurrenceType": { - "id": 1, - "code": "accountTransferRecurrenceType.periodic", - "value": "Periodic Recurrence" - }, - "recurrenceFrequency": { - "id": 2, - "code": "recurrenceperiodFrequencyType.months", - "value": "Months" - }, - "recurrenceInterval": 1, - "recurrenceOnMonthDay": [ - 2, - 1 - ] - } - ] -} + +
-
- -   -
-
-

Retrieve Standing Instruction:

-

Example Requests :

-
standinginstructions/1
-
-
-
- GET https://DomainName/api/v1/standinginstructions/{standingInstructionId} - -{ - "id": 1, - "accountDetailId": 6, - "name": "test standing", - "fromOffice": { - "id": 1, - "name": "Head Office" - }, - "fromClient": { - "id": 1, - "displayName": "Test test", - "officeId": 1, - "officeName": "Head Office" - }, - "fromAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "fromAccount": { - "id": 14, - "accountNo": "000000014", - "productId": 1, - "productName": "savings old" - }, - "toOffice": { - "id": 1, - "name": "Head Office" - }, - "toClient": { - "id": 1, - "displayName": "Test test", - "officeId": 1, - "officeName": "Head Office" - }, - "toAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "toAccount": { - "id": 3, - "accountNo": "000000003", - "productId": 4, - "productName": "account overdraft" - }, - "transferType": { - "id": 1, - "code": "accountTransferType.account.transfer", - "value": "Account Transfer" - }, - "priority": { - "id": 3, - "code": "standingInstructionPriority.medium", - "value": "Medium Priority" - }, - "instructionType": { - "id": 1, - "code": "standingInstructionType.fixed", - "value": "Fixed" - }, - "status": { - "id": 3, - "code": "standingInstructionStatus.deleted", - "value": "Deleted" - }, - "amount": 150.000000, - "validFrom": [ - 2014, - 4, - 3 - ], - "recurrenceType": { - "id": 1, - "code": "accountTransferRecurrenceType.periodic", - "value": "Periodic Recurrence" - }, - "recurrenceFrequency": { - "id": 2, - "code": "recurrenceperiodFrequencyType.months", - "value": "Months" - }, - "recurrenceInterval": 1, - "recurrenceOnMonthDay": [ - 4, - 3 - ] -} - -
-
- -   -
-
-

Standing Instructions Logged History:

-

The list capability of history can support pagination and sorting.

-
Optional Arguments
-
-
offset
-
- Integer optional, defaults to 0 -
-
Indicates from what result to start from.
- -
limit
-
- Integer optional, defaults to 200 -
-
Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- -
orderBy
-
- String optional, one of name,standingInstructionId -
-
Orders the results by the field indicated.
- -
sortBy
-
- String optional, one of ASC, DESC -
-
Indicates what way to order results if orderBy is used.
- -
clientId
-
- Integer optional -
-
Use clientId of clients to restrict results.
- -
clientName
-
- String optional -
-
Use displayName of clients to restrict results.
- -
fromAccountId
-
- Integer optional -
-
Use fromAccountId of standing instruction transaction to restrict results. fromAccountId is id of fromAccountType.
- -
fromAccountType
-
- Integer optional -
-
Use fromAccountType of standing instruction transaction to restrict results. fromAccountType is enum value entity type Ex:Loan Account:1, Savings Account:2
- -
transferType
-
- Integer optional -
-
Use transferType of standing instruction transaction to restrict results. transferType is enum value transfer type Ex:Loan Repayment:2, Account Transfer:1
- -
fromDate
-
- Dateoptional -
-
Filters for transactions whose entry Date is greater than or equal to the passed in Date -
-
toDate
-
- Date optional -
-
Filters for transactions whose entry Date is lesser than or equal to the passed in Date -
- -
-

Example Requests :

-
standinginstructionrunhistory
-
-
standinginstructionrunhistory?orderBy=name&sortOrder=DESC
-
-
standinginstructionrunhistory?offset=10&limit=50
-
-
-
- GET https://DomainName/api/v1/standinginstructionrunhistory - -{ - "totalFilteredRecords": 2, - "pageItems": [ - { - "standingInstructionId": 1, - "name": "ACC Transfer", - "fromOffice": { - "id": 1, - "name": "Head Office" - }, - "fromClient": { - "id": 1, - "displayName": "Test client", - "officeId": 1, - "officeName": "Head Office" - }, - "fromAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "fromAccount": { - "id": 2, - "accountNo": "000000002", - "productId": 1, - "productName": "General Savings" - }, - "toAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "toAccount": { - "id": 1, - "accountNo": "000000001", - "productId": 1, - "productName": "General Savings" - }, - "toOffice": { - "id": 1, - "name": "Head Office" - }, - "toClient": { - "id": 1, - "displayName": "Test client", - "officeId": 1, - "officeName": "Head Office" - }, - "amount": 10, - "status": "success", - "executionTime": [ - 2014, - 6, - 30 - ], - "errorLog": "" - }, - { - "standingInstructionId": 2, - "name": "Pay overdues", - "fromOffice": { - "id": 1, - "name": "Head Office" - }, - "fromClient": { - "id": 1, - "displayName": "Test client", - "officeId": 1, - "officeName": "Head Office" - }, - "fromAccountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "fromAccount": { - "id": 1, - "accountNo": "000000001", - "productId": 1, - "productName": "General Savings" - }, - "toAccountType": { - "id": 1, - "code": "accountType.loan", - "value": "Loan Account" - }, - "toAccount": { - "id": 1, - "accountNo": "000000001", - "productId": 1, - "productName": "Daily Loan" - }, - "toOffice": { - "id": 1, - "name": "Head Office" - }, - "toClient": { - "id": 1, - "displayName": "Test client", - "officeId": 1, - "officeName": "Head Office" - }, - "amount": 7038.01, - "status": "success", - "executionTime": [ - 2014, - 6, - 30 - ], - "errorLog": "" - } - ] -} - -
-
- - - - -   -
-
-

Data Tables

-

The datatables API allows you to plug-in your own tables - (MySql) that have a relationship to a Apache Fineract core table. For - example, you might want to add some extra client fields and record - information about each of the clients' family members. Via the API - you can create, read, update and delete entries for each - 'plugged-in' table. The API checks for permission and for 'data - scoping' (only data within the users' office hierarchy can be - managed by the user).

-

The Apache Fineract Reference App uses a JQuery plug-in called - stretchydatatables (which in turn uses this datatables resource) - to provide a pretty flexible CRUD (Create, Read, Update, Delete) - User Interface.

-

- More - Documentation -

-
-
- -   -
-
-

Create Data Table

-

Create a new data table and registers it with the Apache Fineract Core application - table.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
Mandatory - datatableName
The name of the Data Table.
Mandatory - apptableName
- Application table name. Must be one of the following: -
    -
  • m_client
  • -
  • m_group
  • -
  • m_loan
  • -
  • m_office
  • -
  • m_saving_account
  • -
  • m_product_loan
  • -
  • m_savings_product
  • -
-
Mandatory - columns
An array of columns in the new Data Table.
Optional - multiRow
Allows to create multiple entries in the Data Table. Optional, defaults to false. - If this property is not provided Data Table will allow only one entry. -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions - columns
Mandatory - name
Name of the created column. Can contain only alphanumeric characters, underscores and spaces, but cannot start with a number. Cannot start or end with an underscore or space.
Mandatory - type
- Column type. Must be one of the following: -
    -
  • Boolean
  • -
  • Date
  • -
  • DateTime
  • -
  • Decimal
  • -
  • Dropdown
  • -
  • Number
  • -
  • String
  • -
  • Text
  • -
-
Mandatory [type = Dropdown] - code
Used in Code Value fields. Column name becomes: code_cd_name. Mandatory if using type Dropdown, otherwise an error is returned.
Optional - mandatory
Determines whether this column must have a value in every entry. Optional, defaults to false.
Mandatory [type = String] - length
Length of the text field. Mandatory if type String is used, otherwise an error is returned.
-
-
- -POST https://DomainName/api/v1/datatables - - -POST https://DomainName/api/v1/datatables - -Content-Type: application/json -Request Body: -{ - "datatableName": "extra_client_details", - "apptableName": "m_client", - "columns": [ - { - "name": "Gender", - "type": "Dropdown", - "code": "Gender" - }, - { - "name": "Some Decimal", - "type": "Decimal", - "mandatory": true - }, - { - "name": "Birth Date", - "type": "Date" - }, - { - "name": "Question 2", - "type": "String", - "length": 100, - "mandatory": false - } - ] -} - - -{ - "resourceIdentifier": "extra_client_details" -} - + +   +
+
+

Make Recovery Payment

+

This API allows collecting recovery payments for written-off loans

+
+
+ + POST https://DomainName/api/v1/loans/{loanId}/transactions?command=recoverypayment + -POST https://DomainName/api/v1/datatables - -Content-Type: application/json -Request Body: -{ - "datatableName": "client_address", - "apptableName": "m_client", - "multiRow":"true", - "columns": [ - { - "name": "Address1", - "type": "String", - "length": 100, - "mandatory": true - }, - { - "name": "Address2", - "length": 100, - "type": "String" - } - ] -} - - -{ - "resourceIdentifier": "client_address" -} + POST loans/5/transactions?command=recoverypayment + Content-Type: application/json + Request Body: + { + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "transactionDate": "14 May 2013", + "transactionAmount": "500.00", + "paymentTypeId": "12", + "note": "check payment", + "accountNumber": "acc123", + "checkNumber": "che123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123" + } + + { + "officeId": 1, + "clientId": 1, + "loanId": 5, + "resourceId": 564, + "changes": { + "transactionDate": "14 May 2013", + "transactionAmount": "500.00", + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "note": "check payment", + "accountNumber": "acc123", + "checkNumber": "che123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123" + } + } + +
+
-
-
- -   -
-
-

List Data Tables

-

Lists registered data tables and the Apache Fineract Core - application table they are registered to.

- -
Arguments
-
-
apptable
-
- optional -
-
The Apache Fineract core application table.
-
-

Example Requests:

-
datatables?apptable=m_client
-
-
-
datatables
-
-
- -GET https://DomainName/api/v1/datatables - - -[ - { - "applicationTableName": "m_client", - "registeredTableName": "extra_client_details", - "columnHeaderData": [ - { - "columnName": "client_id", - "columnType": "bigint", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": false, - "isColumnPrimaryKey": true, - "columnValues": [] - }, - { - "columnName": "Gender_cd_Question", - "columnType": "int", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "Some Decimal", - "columnType": "decimal", - "columnLength": 0, - "columnDisplayType": "DECIMAL", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "Birth Date", - "columnType": "date", - "columnLength": 0, - "columnDisplayType": "DATE", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [] - } - ] - } -] - -
-
-   -
-
-

Retrieve Data Table Details

-

Lists a registered data table details and the Apache Fineract Core - application table they are registered to.

-
-
- -GET https://DomainName/api/v1/datatables/{datatable} - - -{ - "applicationTableName": "m_client", - "registeredTableName": "extra_client_details", - "columnHeaderData": [ - { - "columnName": "client_id", - "columnType": "bigint", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": false, - "isColumnPrimaryKey": true, - "columnValues": [] - }, - { - "columnName": "Gender_cd_Question", - "columnType": "int", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "Some Decimal", - "columnType": "decimal", - "columnLength": 0, - "columnDisplayType": "DECIMAL", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "Birth Date", - "columnType": "date", - "columnLength": 0, - "columnDisplayType": "DATE", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [] - } - ] -} - -
-
+ -   -
-
-

Update Data Table

-

Modifies fields of a data table. If the apptableName parameter is passed, - data table is deregistered and registered with the new application table.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
Optional - apptableName
- Application table name. Only necessary if changing the application table this Data Table is registered to. Must be one of the following: -
    -
  • m_client
  • -
  • m_group
  • -
  • m_loan
  • -
  • m_office
  • -
  • m_saving_account
  • -
-
Optional - dropColumns
An array of columns to be deleted from the Data Table.
Optional - addColumns
An array of columns to be added to the Data Table.
Optional - changeColumns
An array of columns to be changed in the Data Table.
- - - - - - - - - - -
Field Descriptions - dropColumns
Mandatory - name
Requires a full name of the deleted column to be provided.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions - addColumns
Mandatory - name
Name of the created column. Can contain only alphanumeric characters, underscores and spaces, but cannot start with a number. Cannot start or end with an underscore or space.
Mandatory - type
- Column type. Must be one of the following: -
    -
  • Boolean
  • -
  • Date
  • -
  • DateTime
  • -
  • Decimal
  • -
  • Dropdown
  • -
  • Number
  • -
  • String
  • -
  • Text
  • -
-
Mandatory [type = Dropdown] - code
Used in Code Value fields. Column name becomes: code_cd_name. Mandatory if using type Dropdown, otherwise an error is returned.
Optional - mandatory
Determines whether this column must have a value in every entry. Optional, defaults to false.
Mandatory [type = String] - length
Length of the text field. Mandatory if type String is used, otherwise an error is returned.
Optional - after
Only used when re-ordering Data Table columns. Requires a full column name to be provided.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions - changeColumns
Mandatory - name
Name of the created column. Can contain only alphanumeric characters, underscores and spaces, but cannot start with a number. Cannot start or end with an underscore or space.
Optional - newName
New name of the created column. Can contain only alphanumeric characters, underscores and spaces, but cannot start with a number. Cannot start or end with an underscore or space.
Mandatory [type = Dropdown] - code
Used in Code Value fields. Column name becomes: code_cd_name. Mandatory if using type Dropdown, otherwise an error is returned.
Optional [type = Dropdown] - newCode
Used in Code Value fields. Column name becomes: code_cd_name. Optional if using type Dropdown, otherwise an error is returned.
Optional - mandatory
Determines whether this column must have a value in every entry. Optional, defaults to false.
Mandatory [type = String] - length
Length of the text field. Mandatory if type String is used, otherwise an error is returned.
Optional - after
Only used when re-ordering Data Table columns. Requires a full column name to be provided.
-
-
- -PUT https://DomainName/api/v1/datatables/{datatables} - - -PUT https://DomainName/api/v1/datatables/extra_client_details +   +
+
+

Undo Loan Write-off Transaction

+
+
+ + POST https://DomainName/api/v1/loans/{loanId}/transactions?command=undowriteoff + + + POST loans/70/transactions?command=undowriteoff + Content-Type: application/json + Request Body: + { } + + -Content-Type: application/json -Request Body: -{ - "apptableName": "m_client", - "dropColumns": [ - { - "name": "Gender_cd_Question" - } - ], - "addColumns": [ - { - "name": "Question", - "type": "Dropdown", - "code": "Gender", - "mandatory": true - }, - { - "name": "Some Number", - "type": "Number", - "after": "Some Field" - } - ], - "changeColumns": [ - { - "name": "Question", - "newName": "Question 2", - "mandatory": true, - "code": "Gender", - "newCode": "Gender2" - } - ] -} - - -{ - "resourceIdentifier": "extra_client_details" -} - -
-
+ { + "officeId": 1, + "clientId": 1, + "loanId": 22 + } +
+
+
-   -
-
-

Delete Data Table

-

Deletes a data table and deregisters it from the Apache Fineract Core - application table.

-
-
- -DELETE https://DomainName/api/v1/datatables/{datatables} - - -DELETE https://DomainName/api/v1/datatables/extra_client_details -Content-Type: application/json -No Request Body - - -{ - "resourceIdentifier": "extra_client_details" -} - +   +
+
+

Pre-Close template

+

This Api retrieves pre closure details of loan

+
+ + POST https://DomainName/api/v1/loans/{loanId}/transactions?command=prepayLoan or
-
-   -
-
-

Register Data Table

-

Registers a data table with the Apache Fineract Core application - table. This allows the data table to be maintained through the - API. - In case the datatable is a PPI (survey table), a parameter category should be pass along with the request. - The API currently support one category (200) -

-
-
- -POST https://DomainName/api/v1/datatables/register/{datatable}/{apptable} - - -POST datatables/register/extra_client_details/m_client + https://DomainName/api/v1/loans/{loanId}/transactions?command=prepayLoan&dateFormat=dd+MMMM+yyyy&locale=en&transactionDate=02+April+2015 + + + POST loans/70/transactions?command=prepayLoan + Content-Type: application/json + Request Body: + { } + + -Content-Type: application/json -Request Body: -{} - - -{ - "resourceIdentifier": "extra_client_details" -} - -
-
+ { + "amount":7765.28, + "principalPortion":7573.76, + "interestPortion":191.52, + "feeChargesPortion":0.00, + "penaltyChargesPortion":0.00 + } +
+
+
-   -
-
-

Deregister Data Table

-

Deregisters a data table. It will no longer be available - through the API.

-
-
- -POST https://DomainName/api/v1/datatables/deregister/{datatable} - - -POST datatables/deregister/extra_client_details - -Content-Type: application/json -Request Body: -{} - - -{ - "resourceIdentifier": "extra_client_details" -} - -
-
- - -   -
-
-

Create Entry in Data Table

-

Adds a row to the data table.

-

Note that the default datatable UI functionality converts - any field name containing spaces to underscores when using the - API. This means the field name "Business Description" is - considered the same as "Business_Description". So you shouldn't - have both "versions" in any data table.

-
-
- -POST https://DomainName/api/v1/datatables/{datatable}/{apptableId} - - -POST datatables/extra_client_details/1 +   +
+
+

Retrieve a Transaction Details

+

Example Request:

+
loans/5/transactions/3
+
+
+ + GET https://DomainName/api/v1/loans/{loanId}/transactions/{transactionId} + + + { + "id": 3, + "type": { + "id": 2, + "code": "loanTransactionType.repayment", + "value": "Repayment", + "disbursement": false, + "repaymentAtDisbursement": false, + "repayment": true, + "contra": false, + "waiveInterest": false, + "waiveCharges": false, + "writeOff": false, + "recoveryRepayment": false + }, + "date": [ + 2012, + 5, + 14 + ], + "manuallyReversed": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 559.88, + "interestPortion": 559.88, + "loanChargePaidByList": [ + { + "id": 29, + "amount": 138.700000, + "installmentNumber": 0, + "chargeId": 7, + "transactionId": 35, + "name": "Late Penalty Charge" + } + ] + } + +
+
-Content-Type: application/json -Request Body: -{ - "Business Description": "Livestock sales", - "Comment": "First comment made", - "Education_cv": "Primary", - "Gender_cd": "6", - "Highest Rate Paid": "8.5", - "Next Visit": "01 October 2012", - "Years in Business": "5", - "dateFormat": "dd MMMM yyyy", - "locale": "en" -} -
- -{ - "resourceId": 1 -} - -
-
+   +
+
+

Adjust a Transaction

+

Note: there is no need to specify command={transactionType} parameter.

+ + + + + + + +
+
Mandatory Fields
+
transactionDate, transactionAmount
+
+
+ + POST https://DomainName/api/v1/loans/{loanId}/transactions/{transactionId} + + + POST loans/1/transactions/2 + Content-Type: application/json + Request Body: + { + "locale": "en_GB", + "dateFormat": "dd MMMM yyyy", + "transactionDate": "25 May 2012", + "transactionAmount": "50,000.00", + "note": "An optional note about why your adjusting or changing the transaction." + } + + + { + "resourceId": 16 + } + +
+
-   -
-
-

Retrieve Entry(s) from Data Table

-

- Gets the entry (if it exists) for data tables that are one to one - with the application table.
Gets the entries (if they - exist) for data tables that are one to many with the application - table. -

-

Note: The 'fields' parameter is not available for - datatables.

- -
Arguments
-
-
order
-
- optional -
-
Specifies the order in which data is returned.
-
genericResultSet
-
- optional, defaults to false -
-
If 'true' an optimised JSON format is returned suitable for tabular display of data. - This format is used by the default data tables UI functionality.
-
- -

Example Requests:

-
datatables/extra_client_details/1
-
-
-
datatables/extra_family_details/1?order=`Date of Birth` desc
-
-
-
datatables/extra_client_details/1?genericResultSet=true
-
-
- -GET https://DomainName/api/v1/datatables/{datatable}/{apptableId}?genericResultSet=true - - -{ - "columnHeaders": [ - { - "columnName": "client_id", - "columnType": "bigint", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": false, - "isColumnPrimaryKey": true, - "columnValues": [] - }, - { - "columnName": "Business Description", - "columnType": "varchar", - "columnLength": 100, - "columnDisplayType": "STRING", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "Years in Business", - "columnType": "int", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "Gender_cd", - "columnType": "int", - "columnLength": 0, - "columnDisplayType": "CODELOOKUP", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [ - { - "id": 5, - "value": "option.Male" - }, - { - "id": 6, - "value": "option.Female" - } - ] - }, - { - "columnName": "Education_cv", - "columnType": "varchar", - "columnLength": 60, - "columnDisplayType": "CODEVALUE", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [ - { - "id": 9, - "value": "Primary" - }, - { - "id": 10, - "value": "Secondary" - }, - { - "id": 11, - "value": "University" - } - ] - }, - { - "columnName": "Next Visit", - "columnType": "date", - "columnLength": 0, - "columnDisplayType": "DATE", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "Highest Rate Paid", - "columnType": "decimal", - "columnLength": 0, - "columnDisplayType": "DECIMAL", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "Comment", - "columnType": "text", - "columnLength": 65535, - "columnDisplayType": "TEXT", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [] - } - ], - "data": [ - { - "row": [ - "1", - "Livestock sales", - "5", - "6", - "Primary", - "2012-10-01", - "8.500000", - "First\tcomment made" - ] - } - ] -} - -
-
+ +   +
+
+

Guarantors

+

A person who guarantees to pay for someone else's debt + if he or she should default on a loan obligation. A guarantor acts as a co-signor of sorts. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
guarantorType
Identifies if the guarantor is + an existing Client, Staff member or an external + individual
+ Refer Retrieve + Guarantor Details Template for complete + details +
entityId
The identifier for guarantors + who are an existing Client of Staff member. +
firstname
Guarantors first name +
lastname
Guarantors last name +
officeName
Name of the office with which the internal guarantors are associated +
addressLine1, addressLine2, city, state, zip, + country, mobileNumber, housePhoneNumber, comment, + dob +
Address, contact and date of + birth details of an external guarantor +
savingsId
Guarantors Savings Account on which Amount will be blocked +
amount
Guarantee amount which will be blocked on savings account. +
+
+
-   -
-
-

Update Entry in Data Table (One to One)

-

Updates the row (if it exists) of the data table.

-
-
- -PUT https://DomainName/api/v1/datatables/{datatable}/{apptableId} - - -PUT datatables/extra_client_details/1 +   +
+
+

List Guarantors

+

Example Requests:

+
loans/1/guarantors
+
+
+
loans/1/guarantors?fields=firstname,lastname
+
+
+ + GET https://DomainName/api/v1/loans/{loanId}/guarantors + + + [ + { + "id": 1, + "loanId": 1, + "guarantorType": { + "id": 1, + "code": "guarantor.existing.customer", + "value": "CUSTOMER" + }, + "firstname": "Declan", + "lastname": "Browne", + "officeName": "Head Office", + "joinedDate": [ + 2009, + 1, + 4 + ] + } + ] + +
+
-Content-Type: application/json -Request Body: -{ - "Business Description": "Livestock sales updated", -} -
- -{ - "resourceId": 1, - "changes": { - "Business Description": "Livestock sales updated" - } -} - -
-
+   +
+
+

Retrieve Guarantors Details Template

+

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:

+
loans/1/guarantors/template
+
loans/1/guarantors/accounts/template?clientId=1
+
+
+ + GET https://DomainName/api/v1/loans/{loanId}/guarantors/template + + + { + "guarantorType": { + "id": 1, + "code": "guarantor.existing.customer", + "value": "CUSTOMER" + }, + "guarantorTypeOptions": [ + { + "id": 1, + "code": "guarantor.existing.customer", + "value": "CUSTOMER" + }, + { + "id": 2, + "code": "guarantor.staff", + "value": "STAFF" + }, + { + "id": 3, + "code": "guarantor.external", + "value": "EXTERNAL" + } + ] + } + + + GET https://DomainName/api/v1/loans/{loanId}/guarantors/accounts/template?clientId={clientId} + + + { + "guarantorType": { + "id": 1, + "code": "guarantor.existing.customer", + "value": "CUSTOMER" + }, + "status": false, + "accountLinkingOptions": [ + { + "id": 1, + "accountNo": "000000001", + "clientId": 3, + "clientName": "Client_FirstName_UUV18 Client_LastName_9T2D", + "productId": 1, + "productName": "FIXED_DEPOSIT_PRODUCT_U0NS9T", + "fieldOfficerId": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 4, + "inMultiplesOf": 100, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + } + ] + } + +
+
-   -
-
-

Update Entry in Data Table (One to Many)

-

Updates the row (if it exists) of the data table.

-
-
- -PUT https://DomainName/api/v1/datatables/{datatable}/{apptableId}/{datatableId} - - -PUT datatables/Extra Family Details Data/1/2 +   +
+
+

Retrieve a Guarantor

+

Example Requests:

+
/loans/1/guarantors/1
+
+
+
/loans/1/guarantors/1
+
+
+
/loans/1/guarantors/1?fields=firstname
+
+
+ + GET https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId} + + + { + "id": 1, + "loanId": 1, + "guarantorType": { + "id": 1, + "code": "guarantor.existing.customer", + "value": "CUSTOMER" + }, + "firstname": "Declan", + "officeName": "Head Office", + "joinedDate": [ + 2009, + 1, + 4 + ] + } + +
+
-Content-Type: application/json -Request Body: -{ - "Date of Birth": "01 June 1982", - Education_cdHighest: "5", - Name: "June", - "Other Notes": "More\nnotes", - "Points Score": "20", - dateFormat: "dd MMMM yyyy", - locale: "en" -} -
- { "resourceId": 1 } -
-
+   +
+
+

Create a Guarantor

+

+ Note: You may associate any number of Guarantors + to a Loan. The mandatory fields would vary based + on the "guarantorType"
+

+ + + + + + + + + + + + + +
+
Mandatory Fields + for "internal" guarantors +
+
guarantorTypeId, entityId
+
Mandatory Fields for "external" guarantors
+
guarantorTypeId, firstname, lastname
+ + + + + + + +
+
Optional Fields + for "internal" guarantors +
+
savingsId, amount
+
+
+ + POST https://DomainName/api/v1//loans/{loanId}}/guarantors + + + POST /loans/1/guarantors + Content-Type: application/json + Request Body: + { + guarantorTypeId:3, + firstname:Lyndon, + lastname:Johnson + } + + + { + "officeId": 2, + "loanId": 1, + "resourceId": 9 + } + + + POST /loans/1/guarantors + Content-Type: application/json + Request Body: + { + guarantorTypeId:1, + entityId:2 + } + + + { + "officeId": 2, + "loanId": 1, + "resourceId": 10 + } + +
+
-   -
-
-

Delete Entry(s) in Data Table

-

- Deletes the entry (if it exists) for data tables that are one-to-one with the application table.
Deletes the entries (if they exist) for data tables that are one-to-many with the application table. -

-
-
- -DELETE https://DomainName/api/v1/datatables/{datatable}/{apptableId} - - -DELETE datatables/extra_client_details/1 +   +
+
+

Update a Guarantor

+
+
+ + PUT https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId} + + + PUT loans/1/guarantors/1 + Content-Type: application/json + Request Body: + { + entityId:1 + } + + + { + "officeId": 1, + "resourceId": 1, + "changes": { + "entityId": 1 + } + } + +
+
-Content-Type: application/json -Request Body: -{} -
- -{ - "resourceId": 1 -} - -
-
+   +
+
+

Remove a Guarantor

+

+ Note: A guarantor can be removed only from loans that are not yet approved. +

+
+
+ + DELETE https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId} + DELETE + https://DomainName/api/v1/loans/{loanId}/guarantors/{guarantorId}?guarantorFundingId={guarantorFundingId} + -   -
-
-

Delete Entry in Datatable (One to Many)

-

Deletes the entry (if it exists) for data tables that are - one to many with the application table.

-
-
- -DELETE https://DomainName/api/v1/datatables/{datatable}/{apptableId}/{datatableId} - - -DELETE datatables/extra_family_details/1/2 + + DELETE loans/1/guarantors/1 + DELETE loans/1/guarantors/1?guarantorFundingId=1 + Content-Type: application/json + No Request Body: + + + { + "officeId": 2, + "loanId": 1, + "resourceId": 1 + } + +
+
+ +   +
+
+

Loan Collateral

+

In lending agreements, collateral is a borrower's pledge of specific property to a lender, + to secure repayment of a loan. The collateral serves as protection for a lender against a + borrower's default - that is, any borrower failing to pay the principal and interest under + the terms of a loan obligation. If a borrower does default on a loan (due to insolvency + or other event), that borrower forfeits (gives up) the property pledged as collateral + - and the lender then becomes the owner of the collateral +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
type
Identifies the type of a collateral
+ Ex: Gold, property etc (permitted types can be configured using + Code Values for + the Code LoanCollateral)
+ Refer Retrieve + Collateral Details Template for complete + details +
value
The market value of a Collateral. +
description
Description for the collateral +
currency
Details of the currency used + to estimate the value of a Collateral. + The currency defaults to the currency of the + Loan for which this Collateral serves as a + guarantee +
+
+
-Content-Type: application/json -Request Body: -{} -
- -{ - "resourceId": 1 -} - -
-
- - - - -   -
-
-

Retrieve surveys

-

Retrieve surveys. This allows to retrieve the list of survey tables registered . -

-
-
- - GET https://DomainName/api/v1/survey/ - - - GET survey/ - - Content-Type: application/json - Request Body: - {} - - - [ - { - "datatableData": { - "applicationTableName": "m_client", - "registeredTableName": "ppi_kenya_2005", - "columnHeaderData": [ - { - "columnName": "id", - "columnType": "bigint", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": false, - "isColumnPrimaryKey": true, - "columnValues": [] - }, - { - "columnName": "client_id", - "columnType": "int", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "ppi_household_members_cd_q1_householdmembers", - "columnType": "int", - "columnLength": 0, - "columnDisplayType": "CODELOOKUP", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [ - { - "id": 167, - "value": "Nine or More", - "score": 0 - }, - { - "id": 168, - "value": "Seven or eight", - "score": 5 - }, - { - "id": 169, - "value": "Six", - "score": 8 - }, - - ], - "columnCode": "ppi_household_members" - }, - { - "columnName": "date", - "columnType": "datetime", - "columnLength": 0, - "columnDisplayType": "DATETIME", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - } - ] - }, - "enabled": false - }, - { - "datatableData": { - "applicationTableName": "m_client", - "registeredTableName": "ppi_tanzania_20012", - "columnHeaderData": [ - { - "columnName": "id", - "columnType": "bigint", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": false, - "isColumnPrimaryKey": true, - "columnValues": [] - }, - { - "columnName": "client_id", - "columnType": "int", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "ppi_youngerthan17_cd_q1_youngerthan17", - "columnType": "int", - "columnLength": 0, - "columnDisplayType": "CODELOOKUP", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [ - { - "id": 204, - "value": "four or More", - "score": 0 - }, - - ], - "columnCode": "ppi_youngerthan17" - }, - ], - "columnCode": "ppi_how_many_tables" - }, - ] - }, - "enabled": true - } - ] - -
-
- - -   -
-
-

Retrieve survey

-

Lists a registered survey table details and the Apache Fineract Core application table they are registered to. -

-
-
- - GET https://DomainName/api/v1/survey/ppi_kenya_2005 - - - GET survey/{surveyName} - - Content-Type: application/json - Request Body: - {} - - - { - "applicationTableName": "m_client", - "registeredTableName": "extra_client_details", - "columnHeaderData": [ - { - "columnName": "client_id", - "columnType": "bigint", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": false, - "isColumnPrimaryKey": true, - "columnValues": [] - }, - { - "columnName": "Gender_cd_Question", - "columnType": "int", - "columnLength": 0, - "columnDisplayType": "INTEGER", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "Some Decimal", - "columnType": "decimal", - "columnLength": 0, - "columnDisplayType": "DECIMAL", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "Birth Date", - "columnType": "date", - "columnLength": 0, - "columnDisplayType": "DATE", - "isColumnNullable": true, - "isColumnPrimaryKey": false, - "columnValues": [] - } - enabled:false - ] - } - -
-
- -   -
-
-

Create an entry in the survey table

-

Insert and entry in a survey table (full fill the survey). - -

-
-
- - POST https://DomainName/api/v1/survey/ppi_kenya_2005/87 - - - POST survey/{surveyName}/{clientId} - - Content-Type: application/json - Request Body: - { - - ppi_household_members_cd_q1_householdmembers : 167, - ppi_highestschool_cd_q2_highestschool : 174 , - ppi_businessoccupation_cd_q3_businessoccupation : 180, - ppi_habitablerooms_cd_q4_habitablerooms :184, - ppi_floortype_cd_q5_floortype : 188, - ppi_lightingsource_cd_q6_lightingsource :190, - ppi_irons_cd_q7_irons:193, - ppi_mosquitonets_cd_q8_mosquitonets:195, - ppi_towels_cd_q9_towels:198, - ppi_fryingpans_cd_q10_fryingpans:201, - date:"2014-12-02 20:30:00", - dateFormat:"Y-m-d H:i:s", - locale:"en_GB" - - } - - - { - "officeId": 2, - "clientId": 87, - "resourceId": 87 - } - -
-
- - - - - -   -
-
-

Notes

-

Notes API allows to enter notes for supported resources.

- - - - - - - - - - - -
Field Descriptions
note
A simple text note created for supported resources.
-
-
- - - - - - - -
Supported Resources
- Client -
- Loan -
- Group -
- Savings Account -
-
-
- -   -
-
-

Add a Resource Note

-

Adds a new note to a supported resource.

- - - - - - - -
Mandatory Fields
note
-

Example Requests:

-
clients/1/notes
-
-
-
groups/1/notes
-
-
- -POST https://DomainName/api/v1/{resource}/{resourceId}/notes - - -POST clients/1/notes -Content-Type: application/json -Request Body: -{ - "note": "a note about the client" -} - - -{ - "officeId": 1, - "clientId": 1, - "resourceId": 76 -} - -
-
- -   -
-
-

Retrieve a Resource's Notes

-

- Note: Notes are returned in descending createOn order. -

-

Example Requests:

-
clients/2/notes
-
-
-
groups/2/notes?fields=note,createdOn,createdByUsername
-
-
- -GET https://DomainName/api/v1/{resource}/{resourceId}/notes - - -[ - { - "id": 2, - "clientId": 1, - "noteType": { - "id": 100, - "code": "noteType.client", - "value": "Client note" - }, - "note": "First note edited", - "createdById": 1, - "createdByUsername": "mifos", - "createdOn": 1342498505000, - "updatedById": 1, - "updatedByUsername": "mifos", - "updatedOn": 1342498517000 - } -] - -
-
+   +
+
+

List Loan Collaterals

+

Example Requests:

+
loans/1/collaterals
+
+
+
loans/1/collaterals?fields=value,description
+
+
+ + GET https://DomainName/api/v1/loans/{loanId}/collaterals + + + [ + { + "id": 12, + "type": { + "id": 8, + "name": "Gold" + }, + "value": 50000, + "description": "24 Carat Gold chain weighing 12 grams", + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + } + ] + +
+
-   -
-
-

Retrieve a Resource Note

-

Example Requests:

-
clients/1/notes/76
-
-
-
groups/1/notes/20
-
-
-
clients/1/notes/76?fields=note,createdOn,createdByUsername
-
-
-
groups/1/notes/20?fields=note,createdOn,createdByUsername
-
-
- -GET https://DomainName/api/v1/{resource}/{resourceId}/notes/{noteId} - - -{ - "id": 76, - "clientId": 1, - "noteType": { - "id": 100, - "code": "noteType.client", - "value": "Client note" - }, - "note": "a note about the client", - "createdById": 1, - "createdByUsername": "mifos", - "createdOn": 1359463135000, - "updatedById": 1, - "updatedByUsername": "mifos", - "updatedOn": 1359463135000 -} - -
-
+   +
+
+

Retrieve Collateral Details Template

+

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:

+
loans/1/collaterals/template
+
+
+ + GET https://DomainName/api/v1/loans/{loanId}/collaterals/template + + + { + "allowedCollateralTypes": [ + { + "id": 9, + "name": "Silver", + "position": 0 + }, + { + "id": 8, + "name": "Gold", + "position": 0 + }, + { + "id": 10, + "name": "Property", + "position": 0 + } + ] + } + +
+
-   -
-
-

Update a Resource Note

-
-
- -PUT https://DomainName/api/v1/{resource}/{resourceId}/notes/{noteId} - - -PUT clients/1/notes/76 -Content-Type: application/json -Request Body: -{ - "note": "and here the note is updated nicely." -} - - -{ - "officeId": 1, - "clientId": 1, - "resourceId": 76, - "changes": { - "note": "and here the note is updated nicely." - } -} - -
-
+   +
+
+

Retrieve a Collateral

+

Example Requests:

+
/loans/1/collaterals/1
+
+
+
/loans/1/collaterals/1?fields=value,description
+
+
+ + GET https://DomainName/api/v1/loans/{loanId}/collaterals/{guarantorId} + + + { + "id": 12, + "type": { + "id": 8, + "name": "Gold" + }, + "value": 50000, + "description": "24 Carat Gold chain weighing 12 grams", + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + } +
+
-   -
-
-

Delete a Resource Note

-
-
- -DELETE https://DomainName/api/v1/{resource}/{resourceId}/notes/{noteId} - - -DELETE clients/1/notes/76 -Content-Type: application/json -No Request Body: - - -{ - "resourceId": 76 -} - -
-
+   +
+
+

Create a Collateral

+

+ Note: Currently, Collaterals may be added only before a Loan + is approved
+

+ + + + + + + +
+
Mandatory Fields + for "internal" collaterals +
+
collateralTypeId
+
+
+ + POST https://DomainName/api/v1//loans/{loanId}/collaterals + + + POST /loans/1/collaterals + Content-Type: application/json + Request Body: + { + collateralTypeId:9, + } + + + { + "loanId": 1, + "resourceId": 12 + } + + + POST /loans/1/collaterals + Content-Type: application/json + Request Body: + { + "collateralTypeId":"8", + "value": "50000", + "dateFormat":"dd MMMM yyyy", + "locale": "en", + "description": "24 Carat Gold chain weighing 12 grams" + } + + + { + "loanId": 1, + "resourceId": 13 + } + +
+
- +   +
+
+

Update a Collateral

+
+
+ + PUT https://DomainName/api/v1/loans/{loanId}/collaterals/{collateralId} + + + PUT loans/1/collaterals/12 + Content-Type: application/json + Request Body: + { + "description": "22 Carat Gold chain weighing 12 grams" + } + + + { + "loanId": 1, + "resourceId": 12, + "changes": { + "description": "22 Carat Gold chain weighing 12 grams" + } + } + +
+
- -   -
-
-

Documents

-

Multiple Documents (a combination of a name, description - and a file) may be attached to different Entities - like Clients, Groups, Staff, Loans, Savings and Client - Identifiers in the system -

-

Note: The currently allowed Entities are -

    -
  • Clients: URL Pattern as clients
  • -
  • Staff: URL Pattern as staff
  • -
  • Loans: URL Pattern as loans
  • -
  • Savings: URL Pattern as savings
  • -
  • Client Identifiers: URL Pattern as client_identifiers
  • -
  • Groups: URL Pattern as groups
  • -
-

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
parentEntityType
The type of the Entity - with which this document is associated -
parentEntityId
The ID of the entity (client, - loan etc) with which this document is - associated
name
User Defined name for the - document, need not be the same as the name - of the file associated with the document -
fileName
The name of the file associated - with this document
size
The size (in bytes) of the file - associated with this document
type
Mime Type of the file - associated with this document -
description
A description of this document -
-
-
+   +
+
+

Remove a Collateral

+

+ Note: A collateral can only be removed from Loans that are not yet approved. +

+
+
+ + DELETE https://DomainName/api/v1/loans/{loanId}/collaterals/{collateralId} + + + DELETE loans/1/collaterals/13 + Content-Type: application/json + No Request Body: + + + { + "loanId": 1, + "resourceId": 13 + } + +
+
-   -
-
-

List documents

-

Example Requests:

-
clients/1/documents
-
-
client_identifiers/1/documents
-
-
loans/1/documents?fields=name,description
-
-
- -GET https://DomainName/api/v1/{entityType}/{entityId}/documents - - -[ - { - "id": 1, - "parentEntityType": "clients", - "parentEntityId": 1, - "name": "Client Details Form ", - "fileName": "CGAP.pdf", - "size": 5246719, - "type": "application/pdf", - "description": "A signed form signed by new member" - } -] - -
-
+ +   +
+
+

Loan Charges

+

Its typical for MFIs to add extra costs for their loan products. They + can be either Fees or Penalties.

+

Loan Charges are instances of Charges and + represent either fees and penalties for loan products. Refer Charges + for documentation of the various properties of a charge, Only additional properties ( + specific to the context of a Charge being associated with a Loan) are + described here

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
amountPaid
The Total amount which has been paid for this Charge +
amountWaived
The Total amount that has been waived for this Charge +
amountWrittenOff
Total amount written off from this Charge +
amountOutstanding
The Total outstanding amount for this Charge +
+
+
-   -
-
-

Retrieve a Document

-

Example Requests:

-
clients/1/documents/1
-
-
-
loans/1/documents/1
-
-
-
client_identifiers/1/documents/1?fields=name,description
-
-
- -GET https://DomainName/api/v1/documents/{clientId} - - -{ - "id": 1, - "parentEntityType": "clients", - "parentEntityId": 1, - "name": "Client Details Form ", - "fileName": "CGAP.pdf", - "size": 5246719, - "type": "application/pdf", - "description": "A signed form signed by new member" -} - -
-
+   +
+
+

List Loan Charges

+

Example Requests:

+
loans/1/charges
+
+
+
loans/1/charges?fields=name,amountOrPercentage
+
+
+ + GET https://DomainName/api/v1/loans/{loanId}/charges + + + [ + { + "id": 1, + "chargeId": 1, + "name": "Loan Processing fee", + "chargeTimeType": { + "id": 1, + "code": "chargeTimeType.disbursement", + "value": "Disbursement" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "percentage": 0, + "amountPercentageAppliedTo": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100, + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 100, + "amountOrPercentage": 100, + "penalty": false + }, + { + "id": 7, + "chargeId": 2, + "name": "Collection Fee", + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "dueDate": [ + 2013, + 3, + 29 + ], + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "percentage": 0, + "amountPercentageAppliedTo": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100, + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 100, + "amountOrPercentage": 100, + "penalty": false + } + ] + +
+
-   -
-
-

Create a Document

-

- Note: A document is created using a Multi-part form upload -
- - - - - - - - - - - - - - - - - - - - - - -
Body Parts
name
Name or summary of the document -
description
Description of the document -
file
The file to be uploaded -
-

- - - - - - - -
Mandatory Fields
file and description
-
-
- -POST https://DomainName/api/v1/{entityType}/{entityId}/documents - - -POST clients/1/documents -Content-Type: multipart/form-data -Request Body: -Not Shown (multi-part form data) - - -{ - "resourceId":3, - "resourceIdentifier":"3" -} - -
-
- -   -
-
-

Update a Document

-

- Note: A document is updated using a Multi-part form upload -
- - - - - - - - - - - - - - - - - - - - - - -
Body Parts
name
Name or summary of the document -
description
Description of the document -
file
The file to be uploaded -
-

-
-
- -PUT https://DomainName/api/v1/{entityType}/{entityId}/documents/{documentId} - - -PUT clients/1/documents/1 -Content-Type: multipart/form-data -Request Body: -Not Shown (multi-part form data) - - -{ - "resourceId":3, - "changes":{}, - "resourceIdentifier":"3" -} - -
-
- -   -
-
-

Retrieve Binary File associated with Document

-

Request used to download the file associated with the document

-

Example Requests:

-
clients/1/documents/1/attachment
-
-
-
loans/1/documents/1/attachment
-
-
- -GET https://DomainName/api/v1/{entityType}/{entityId}/documents/{documentId}/attachment - - -Not Shown: The corresponding Binary file - -
-
- -   -
-
-

Remove a Document

-
-
- -DELETE https://DomainName/api/v1/{entityType}/{entityId}/documents/{documentId} - - -DELETE clients/1/documents/1 -Content-Type: application/json -No Request Body: - - -{ - "resourceId":1, - "changes":{}, - "resourceIdentifier":"1" -} - -
-
- -DELETE https://DomainName/api/v1/{entityType}/{entityId}/documents/{documentId} - - -DELETE loans/1/documents/1 -Content-Type: application/json -No Request Body: - - -{ - "resourceId":1, - "changes":{}, - "resourceIdentifier":"1" -} - -
+   +
+
+

Retrieve Loan Charges Template

+

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:

+
loans/1/charges/template
+
+
+ + GET https://DomainName/api/v1/loans/{loanId}/charges/template + + + { + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "chargeOptions": [ + { + "id": 2, + "name": "Collection Fee", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100, + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + } + }, + { + "id": 3, + "name": "Late payment penalty", + "active": true, + "penalty": true, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 1, + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + } + }, + { + "id": 1, + "name": "Loan Processing fee", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100, + "chargeTimeType": { + "id": 1, + "code": "chargeTimeType.disbursement", + "value": "Disbursement" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + } + } + ], + "penalty": false + } + +
+
-
+   +
+
+

Retrieve a Loan Charge

+

Example Requests:

+
/loans/1/charges/1
+
+
+
/loans/1/charges/1?fields=name,amountOrPercentage
+
+
+ + GET https://DomainName/api/v1/loans/{loanId}/charges/{chargeId} + + + { + "id": 1, + "chargeId": 1, + "name": "Loan Processing fee", + "chargeTimeType": { + "id": 1, + "code": "chargeTimeType.disbursement", + "value": "Disbursement" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "percentage": 0, + "amountPercentageAppliedTo": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100, + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 100, + "amountOrPercentage": 100, + "penalty": false + } +
+
+   +
+
+

Create a Loan Charge

+ + + + + + + +
+
Mandatory Fields + for Loan Charges +
+
chargeId, amount, dueDate
+
+
+ + POST https://DomainName/api/v1/loans/{loanId}/charges + + + POST /loans/1/charges + Content-Type: application/json + Request Body: + { + "chargeId": "2", + "locale": "en", + "amount": "100", + "dateFormat": "dd MMMM yyyy", + "dueDate": "29 April 2013" + } + + + { + "officeId": 1, + "clientId": 1, + "loanId": 1, + "resourceId": 31 + } + +
+
- -   -
-
-

Reports

-

- Non-core reports can be added, updated and deleted. -

-

- Core reports (supplied at installation/upgrade time) can only have their "useReport" updated. - "useReport" is used, for example, in the reference UI report page to 'show'/'not show' reports. - Reports that have useReport set to false can still be run. - Reports only used for workflow purposes are examples of reports that would have their useReport set to false. -

-

- Placeholders can be put in the reportSql to act as parameters. They have the format ${paramName}. - The runreports api will translate the value of any query parameter beginning R_ with the equivalent placeholder.
- e.g. query parameter R_myName=john will replace ${myName} with john -

-

- There is a special 'automatic' placeholder ${currentUserHierarchy} - if this is included in reportSql - it gets replaced by the requesting users' office hierarchy value. This enables data scoping.
- Usage example "where o.hierarchy like CONCAT('${currentUserHierarchy}', '%')" -

-

- Note:
- The reports api allows parameters (not just placeholders in reportSql) to be associated with reports. - These associated parameters are only required to allow the reference UI reporting functionality implement - user-friendly parameter input. -

-
-
+   +
+
+

Update a Loan Charge

+

Currently Loan Charges may be updated only if the Loan + is not yet approved +

+
+
+ + PUT https://DomainName/api/v1/loans/{loanId}/charges/{chargeId} + + + PUT loans/1/charges/12 + Content-Type: application/json + Request Body: + { + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "amount": "60", + "dueDate": "27 March 2013" + } + + + { + "officeId": 1, + "clientId": 1, + "loanId": 1, + "resourceId": 6, + "changes": { + "dueDate": "27 March 2013", + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "amount": 60.0 + } + } + +
+
-   -
-
-

Retrieve Report Template

-

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:

-
reports/template
-
-
- -GET https://DomainName/api/v1/reports/template - - -{ - "allowedReportTypes": [ - "Table", - "Pentaho", - "Chart" - ], - "allowedReportSubTypes": [ - "Bar", - "Pie" - ], - "allowedParameters": [ - { - "id": 1, - "parameterName": "startDateSelect" - }, - { - "id": 2, - "parameterName": "endDateSelect" - }, - { - "id": 3, - "parameterName": "obligDateTypeSelect" - }, - { - "id": 5, - "parameterName": "OfficeIdSelectOne" - }, - { - "id": 6, - "parameterName": "loanOfficerIdSelectAll" - }, - { - "id": 10, - "parameterName": "currencyIdSelectAll" - }, - { - "id": 20, - "parameterName": "fundIdSelectAll" - }, - { - "id": 25, - "parameterName": "loanProductIdSelectAll" - }, - { - "id": 26, - "parameterName": "loanPurposeIdSelectAll" - }, - { - "id": 100, - "parameterName": "parTypeSelect" - } - ] -} - -
-
+   +
+
+

Pay Loan Charge

+

Loan Charge will be paid if the loan is linked with a savings account +

+
+
+ + POST https://DomainName/api/v1/loans/{loanId}/charges/{chargeId}?command=pay + + + POST loans/1/charges/12?command=pay + Content-Type: application/json + Request Body: + { + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "transactionDate": "19 September 2013" + } + + -   -
-
-

Create a Report

-
-
- -POST https://DomainName/api/v1/reports - - -POST reports -Content-Type: application/json -Request Body: -{ - "reportName":"Completely New Report", - "reportType":"Table", - "reportSubType":"", - "reportCategory":"Loan", - "useReport":"false", - "description":"Just\nAn\nExample", - "reportSql":"select 'very good sql' as AComment", - "reportParameters":[{"id":"","parameterId":"5","reportParameterName":""},{"id":"","parameterId":"6","reportParameterName":""}] -} - - -{ - "resourceId": 132 -} - -
-
-   -
-
-

List Reports

-

Lists all reports and their parameters.

+ { + "officeId": 1, + "clientId": 1, + "loanId": 6, + "savingsId": 1, + "resourceId": 12 + } -

Example Request:

-
reports
-
-
- -GET https://DomainName/api/v1/reports - - -[ - { - "id": 1, - "reportName": "Client Listing", - "reportType": "Table", - "reportCategory": "Client", - "description": "Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \u0027one to one\u0027 additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\u0027d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\u0027t \n\nhave that client browser/memory impact).", - "coreReport": true, - "useReport": true, - "reportParameters": [ - { - "id": 1, - "parameterId": 5, - "parameterName": "OfficeIdSelectOne" - } - ] - }, - { - "id": 2, - "reportName": "Client Loans Listing", - "reportType": "Table", - "reportCategory": "Client", - "description": "Individual Client Report\n\nPretty \n\nwide report that lists the basic details of client loans. \n\nCan be run for any size MFI but you\u0027d expect it only to be run within a branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\u0027t have that client browser/memory impact).", - "coreReport": false, - "useReport": true, - "reportParameters": [ - { - "id": 2, - "parameterId": 5, - "parameterName": "OfficeIdSelectOne" - }, - { - "id": 3, - "parameterId": 6, - "parameterName": "loanOfficerIdSelectAll" - }, - { - "id": 4, - "parameterId": 10, - "parameterName": "currencyIdSelectAll" - }, - { - "id": 5, - "parameterId": 20, - "parameterName": "fundIdSelectAll" - }, - { - "id": 6, - "parameterId": 25, - "parameterName": "loanProductIdSelectAll" - }, - { - "id": 7, - "parameterId": 26, - "parameterName": "loanPurposeIdSelectAll" - } - ] - },... - ] - -
-
- - -   -
-
-

Retrieve a Report

-

Example Requests:

-
reports/1


-
reports/1?template=true
-
-
- -GET https://DomainName/api/v1/reports/{id} - - -{ - "id": 1, - "reportName": "Client Listing", - "reportType": "Table", - "reportCategory": "Client", - "description": "Individual Client Report\r\n\r\nLists the small number of defined fields on the client table. Would expect to copy this \n\nreport and add any \u0027one to one\u0027 additional data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\u0027d expect it only to be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, there is probably is a limit of about 20/50k clients returned for html display (export to excel doesn\u0027t \n\nhave that client browser/memory impact).", - "reportSql": "select \nconcat(repeat(\"..\", \n ((LENGTH(ounder.`hierarchy`) - LENGTH(REPLACE(ounder.`hierarchy`, \u0027.\u0027, \u0027\u0027)) - 1))), ounder.`name`) as \"Office/Branch\",\n c.account_no as \"Client Account No.\", \nc.display_name as \"Name\", \nr.enum_message_property as \"Status\",\nc.activation_date as \"Activation\", c.external_id as \"External Id\"\nfrom m_office o \njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, \u0027%\u0027)\nand ounder.hierarchy like concat(\u0027${currentUserHierarchy}\u0027, \u0027%\u0027)\njoin m_client c on c.office_id \u003d ounder.id\nleft join r_enum_value r on r.enum_name \u003d \u0027status_enum\u0027 and r.enum_id \u003d c.status_enum\nwhere o.id \u003d ${officeId}\norder by ounder.hierarchy, c.account_no", - "coreReport": true, - "useReport": true, - "reportParameters": [ - { - "id": 1, - "parameterId": 5, - "parameterName": "OfficeIdSelectOne" - } - ] -} - -
-
- -   -
-
-

Update a Report

-

- Only the useReport value can be updated for core reports. -

-
-
- -PUT https://DomainName/api/v1/reports/{id} - - -PUT reports/129 -Content-Type: application/json -Request Body: -{ - "reportName": "New rpt name", - "reportParameters": [ - { - "id": 194, - "parameterId": 5, - "reportParameterName": "m" - } - ] -} - - -{ - "resourceId": 129, - "changes": { - "reportName": "New rpt name", - "reportParameters": "[{\"id\":194,\"parameterId\":5,\"reportParameterName\":\"m\"}]" - } -} - -
-
- - -   -
-
-

Delete a Report

-

- Only non-core reports can be deleted. -

-
-
- -DELETE https://DomainName/api/v1/reports/{id} - - -DELETE reports/100 -Content-Type: application/json -Request Body: -{} - - -{ - "resourceId": 100 -} - -
-
- - -   -
-
-

Run Reports

-
-
-   -
-
-

Running a Report

-

This resource allows you to run and receive output from pre-defined Apache Fineract reports.

-

Reports can also be used to provide data for searching and workflow functionality.

-

- The default output is a JSON formatted "Generic Resultset". The Generic Resultset contains - Column Heading as well as Data information. However, you can - export to CSV format by simply adding "&exportCSV=true" to the end - of your URL.

-

If Pentaho reports have been pre-defined, they can also be - run through this resource. Pentaho reports can return HTML, PDF or - CSV formats.

-

The Apache Fineract reference application uses a - JQuery plugin called stretchyreporting which, itself, uses this - reports resource to provide a pretty flexible reporting User - Interface (UI).

-
Arguments
-
-
R_'parameter names' ...
-
- optional, No defaults -
-
The number and names of the parameters depend on the - specific report and how it has been configured. R_officeId is an - example parameter name.
-
Note: the prefix R_ stands for Reporting
-
genericResultSet
-
- optional, defaults to true -
-
If 'true' an optimised JSON format is returned suitable for tabular display of data. -
If 'false' a simple JSON format is returned. -
parameterType
-
- optional, The only valid value is 'true'. If any - other value is provided the argument will be ignored -
-
Determines whether the request looks in the list of - reports or the list of parameters for its data. Doesn't apply to - Pentaho reports.
-
exportCSV
-
- optional, The only valid value is 'true'. If any - other value is provided the argument will be ignored -
-
Output will be delivered as a CSV file instead of JSON. - Doesn't apply to Pentaho reports.
-
output-type
-
- optional, Defaults to HTML. -
-
Valid Values are HTML, XLS, XSLX, CSV and PDF for html, Excel, Excel 2007+, - CSV and PDF formats respectively.
-
Only applies to Pentaho reports.
-
locale
-
- optional -
-
Any valid locale Ex: en_US, en_IN, fr_FR etc
-
Only applies to Pentaho reports.
-
-

Example Requests:

-
runreports/Client%20Listing?R_officeId=1
-
-
-
runreports/Client%20Listing?R_officeId=1&exportCSV=true
-
-
-
runreports/OfficeIdSelectOne?R_officeId=1&parameterType=true
-
-
-
runreports/OfficeIdSelectOne?R_officeId=1&parameterType=true&exportCSV=true
-
-
-
runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=HTML&R_officeId=1
-
-
-
runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=XLS&R_officeId=1
-
-
-
runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=CSV&R_officeId=1
-
-
-
runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=PDF&R_officeId=1
-
-
- -GET https://DomainName/api/v1/runreports/{reportName} - - -{ - "columnHeaders": [ - { - "columnName": "Office/Branch", - "columnType": "VARCHAR", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "Client Account No.", - "columnType": "VARCHAR", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "Name", - "columnType": "VARCHAR", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "Joined", - "columnType": "DATE", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "External Id", - "columnType": "VARCHAR", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - } - ], - "data": [ - { - "row": [ - "Head Office", - "000000001", - "Petra Yton", - "2009-03-04", - "786YYH7" - ] - }, - { - "row": [ - "Head Office", - "000000002", - "Keith(changed) Yton", - "2009-03-04", - null - ] - }, - { - "row": [ - "Head Office", - "000000003", - "Jorge lastname", - "2013-02-05", - null - ] - } - ] -} - -
-
- - -   -
-
-

Report Mailing Jobs

-

This resource allows you to create a scheduled job that runs a report and sents it by email to specified email addresses.

-

The scheduled job can be configured to run once or on a regular basis (once a day, twice a week, etc).

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
name
The name of the report mailing job. It must be unique.
description
Optional: Description of the report mailing job.
startDateTime
Date and time to start the report mailing job.
stretchyReportId
The identifier of the stretchy report to be sent.
emailRecipients
Comma separated report recipient email addresses.
emailSubject
The subject of the email to be sent.
emailMessage
The body of the email to be sent.
emailAttachmentFileFormatId
The Enum constant id of the email attachment file format.
recurrence
Rule or repeating pattern for recurring events. See - http://www.kanzaki.com/docs/ical/rrule.html
isActive
Indicates whether or not the scheduler should be created as active.
stretchyReportParamMap
Optional: A map of the stretchy report parameter names to values.
-
-
- -   -
-
-

Retrieve Report Mailing Job Details Template

-

This is a convenience resource. It can be useful when - building maintenance user interface screens for report mailing job - applications. The template data returned consists of any or all - of: -

    -
  • Field Defaults
  • -
  • Allowed Value Lists
  • -
-

-

Example Request:

-
reportmailingjobs/template
-
-
- -GET https://DomainName/api/v1/reportmailingjobs/template - - -{ - "isActive": false, - "emailAttachmentFileFormatOptions": [ - { - "id": 1, - "code": "ReportMailingJobEmailAttachmentFileFormat.xls", - "value": "xls" - }, - { - "id": 2, - "code": "ReportMailingJobEmailAttachmentFileFormat.pdf", - "value": "pdf" - }, - { - "id": 3, - "code": "ReportMailingJobEmailAttachmentFileFormat.csv", - "value": "csv" - } - ], - "stretchyReportParamDateOptions": [ - { - "id": 1, - "code": "reportMailingJobStretchyReportParamDateOption.today", - "value": "today" - }, - { - "id": 2, - "code": "reportMailingJobStretchyReportParamDateOption.yesterday", - "value": "yesterday" - }, - { - "id": 3, - "code": "reportMailingJobStretchyReportParamDateOption.tomorrow", - "value": "tomorrow" - } - ] -} - -
-
- -   -
-
-

Retrieve a Report Mailing Job

-

Example Requests:

-
reportmailingjobs/1
-
-
-
reportmailingjobs/1?template=true
-
-
- -GET https://DomainName/api/v1/reportmailingjobs/{id} - - -{ - "id": 1, - "name": "Client Numbers Report", - "description": "Client Numbers Report", - "startDateTime": 1469627093000, - "recurrence": "", - "timeline": { - "createdOnDate": [ - 2016, - 7, - 27 - ], - "createdByUsername": "musoni", - "createdByFirstname": "firstname", - "createdByLastname": "lastname" - }, - "emailRecipients": "info@musonisystem.com", - "emailSubject": "Client Numbers Report", - "emailMessage": "Client Numbers Report", - "emailAttachmentFileFormat": { - "id": 1, - "code": "ReportMailingJobEmailAttachmentFileFormat.xls", - "value": "xls" - }, - "stretchyReport": { - "id": 120, - "reportName": "Client Numbers Report", - "reportType": "Pentaho", - "reportCategory": "Client", - "description": "", - "coreReport": false, - "useReport": true - }, - "stretchyReportParamMap": "{\"startDate\":\"2016-07-01\",\"endDate\":\"2016-08-02\",\"selectOffice\":\"1\",\"environementUrl\":\"environementUrl\"}", - "nextRunDateTime": 1469627093000, - "numberOfRuns": 0, - "isActive": true, - "runAsUserId": 1 -} - -
-
- -   -
-
-

List Report Mailing Jobs

-

Example Requests:

-
reportmailingjobs
-
-
- -GET https://DomainName/api/v1/reportmailingjobs - - -[ - { - "id": 1, - "name": "Client Numbers Report", - "description": "Client Numbers Report", - "startDateTime": 1469627093000, - "recurrence": "", - "timeline": { - "createdOnDate": [ - 2016, - 7, - 27 - ], - "createdByUsername": "musoni", - "createdByFirstname": "firstname", - "createdByLastname": "lastname" - }, - "emailRecipients": "info@musonisystem.com", - "emailSubject": "Client Numbers Report", - "emailMessage": "Client Numbers Report", - "emailAttachmentFileFormat": { - "id": 1, - "code": "ReportMailingJobEmailAttachmentFileFormat.xls", - "value": "xls" - }, - "stretchyReport": { - "id": 120, - "reportName": "Client Numbers Report", - "reportType": "Pentaho", - "reportCategory": "Client", - "description": "", - "coreReport": false, - "useReport": true - }, - "stretchyReportParamMap": "{\"startDate\":\"2016-07-01\",\"endDate\":\"2016-08-02\",\"selectOffice\":\"1\",\"environementUrl\":\"environementUrl\"}", - "nextRunDateTime": 1469627093000, - "numberOfRuns": 0, - "isActive": true, - "runAsUserId": 1 - } -] - -
-
- -   -
-
-

List Report Mailing Job History

-

The list capability of report mailing job history can support pagination and sorting.

-
Optional Arguments
-
-
offset
-
- Integer optional, defaults to 0 -
-
Indicates the result from which pagination starts
- -
limit
-
- Integer optional, defaults to 200 -
-
Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- -
orderBy
-
- String optional, one of startDateTime, endDateTime, status -
-
Orders results by the indicated field.
- -
sortBy
-
- String optional, one of ASC, DESC -
-
Indicates what way to order results if orderBy is used.
-
-

Example Requests:

-
reportmailingjobrunhistory/1
-
-
- -GET https://DomainName/api/v1/reportmailingjobrunhistory/{reportMailingJobId} - - -[ - { - "id": 1, - "reportMailingJobId": 1, - "startDateTime": 1469627093000", - "endDateTime": 1469627093050, - "status": "success", - "errorMessage": "", - "errorLog": "" - } -] - -
-
- -   -
-
-

Create a Report Mailing Job

- - - - - - - -
Mandatory Fields
name, startDateTime, stretchyReportId, emailRecipients, emailSubject, emailMessage, emailAttachmentFileFormatId, recurrence, isActive
-
- - - - - - - -
Optional Fields
description, stretchyReportParamMap
-
-
- -POST https://DomainName/api/v1/reportmailingjobs - - -POST reportmailingjobs -Content-Type: application/json Request Body: -{ - "locale": "en_GB", - "dateFormat": "dd-MM-yyyy HH:mm:ss", - "name": "Client Numbers Report", - "description": "Client Numbers Report", - "startDateTime": "02-08-2016 11:34:18", - "stretchyReportId": "120", - "emailRecipients": "info@musonisystem.com", - "emailSubject": "Client Numbers Report", - "emailMessage": "Client Numbers Report", - "emailAttachmentFileFormatId": "1", - "recurrence": "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,WE,FR", - "isActive": true, - "stretchyReportParamMap": "{\"startDate\":\"2016-07-01\",\"endDate\":\"2016-08-02\",\"selectOffice\":\"1\",\"environementUrl\":\"environementUrl\"}" -} - - -{ - "resourceId": 1 -} - -
-
- -   -
-
-

Update a Report Mailing Job

-
-
- -PUT https://DomainName/api/v1/reportmailingjobs/{id} - - -PUT reportmailingjobs/1 -Content-Type: application/json -Request Body: -{ - "locale": "en_GB", - "dateFormat": "dd-MM-yyyy HH:mm:ss", - "startDateTime": "10-08-2016 23:30:00" -} - - - -{ - "resourceId": 1, - "changes": { - "startDateTime": "10-08-2016 23:30:00" - } -} - -
-
- -   -
-
-

Delete a Report Mailing Job

-
-
- -DELETE https://DomainName/api/v1/reportmailingjobs/{id} - - -DELETE reportmailingjobs/1 -Content-Type: application/json - - -{ - "resourceId": 1 -} - -
-
- - -   -
-
-

Authentication HTTP Basic

-

An API capability that allows client applications to verify - authentication details using HTTP Basic Authentication.

- - - - - - - - - - - -
Field Descriptions
base64EncodedAuthenticationKey
HTTP Basic Auth key. See Authentication Overview for - an example of its use. -
-
-
- -   -
-
-

Verify authentication

-

Authenticates the credentials provided and returns the set roles and permissions allowed.

-
-
- -POST https://DomainName/api/v1/authentication - - -POST authentication -Content-Type: application/json -Request Body -{ - "username": "mifos", - "password": "password" -} - -

Example response of autentication for user that is not linked with any staff.

- -{ - "username": "mifos", - "userId": 1, - "base64EncodedAuthenticationKey": "bWlmb3M6cGFzc3dvcmQ=", - "authenticated": true, - "officeId": 1, - "officeName": "Head Office", - "roles": [ - { - "id": 1, - "name": "Super user", - "description": "This role provides all application permissions." - } - ], - "permissions": [ - "ALL_FUNCTIONS" - ] -} - -

Example response of autentication for user that is linked with a staff member and role.

- -{ - "username": "mifos", - "userId": 1, - "base64EncodedAuthenticationKey": "bWlmb3M6cGFzc3dvcmQ=", - "authenticated": true, - "officeId": 1, - "officeName": "Head Office", - "staffId": 1, - "staffDisplayName": "Director, Program", - "organisationalRole": { - "id": 100, - "code": "staffOrganisationalRoleType.programDirector", - "value": "Program Director" - }, - "roles": [ - { - "id": 1, - "name": "Super user", - "description": "This role provides all application permissions." - } - ], - "permissions": [ - "ALL_FUNCTIONS" - ] -} - +
+
+
+   +
+
+

Delete a Loan Charge

+

+ Note:Currently, A Loan Charge may only be removed from Loans that are not + yet approved. +

+
+
+ + DELETE https://DomainName/api/v1/loans/{loanId}/charges/{chargeId} + + + DELETE loans/1/charges/2 + Content-Type: application/json + No Request Body: + + + { + "officeId": 1, + "clientId": 1, + "loanId": 1, + "resourceId": 2 + } + +
+
+ +   +
+
+

Loan Rescheduling

+

Loan rescheduling provides the ability to give clients extra grace periods, extend loan term by + adding extra installments and adjust the interest rate of a loan.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
loanId
The ID of the loan to be rescheduled.
rescheduleFromDate
Due date of the start point (installment) of the rescheduling.
graceOnPrincipal
Number of installments to be added with zero principal.
graceOnInterest
Number of installments to be added with zero interest.
extraTerms
Number of installments to be added after the last loan repayment schedule + installment. +
recalculateInterest
If recalculateInterest="true", the total interest amount of the loan is + recalculated. If recalculateInterest="false", the total interest amount remains the same. +
newInterestRate
New interest rate to be used in calculating the interest amount for each + rescheduled period/installment. +
adjustedDueDate
New due date for the start point (installment) of the rescheduling.
rescheduleReasonId
The ID of the code value that indicates the reason for rescheduling the + loan. +
rescheduleReasonComment
Text provided as extra reason for the rescheduling of the loan.
submittedOnDate
The date on which the loan reschedule request was made.
+
+
+   +
+
+

Create a Loan Reschedule Request

+ + + + + + + +
+
Mandatory Fields
+
loanId, rescheduleFromDate, rescheduleReasonId, submittedOnDate,
+ graceOnPrincipal OR graceOnInterest OR extraTerms OR newInterestRate OR adjustedDueDate +
+
+ + + + + + + +
+
Optional Fields
+
recalculateInterest, rescheduleReasonComment
+
+
+ + POST https://DomainName/api/v1/rescheduleloans + + + POST rescheduleloans + Content-Type: application/json Request Body: + { + "loanId": 1, + "graceOnPrincipal": 2, + "graceOnInterest": 3, + "extraTerms": 2, + "rescheduleFromDate": "04 December 2014", + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "recalculateInterest": true, + "submittedOnDate": "04 September 2014", + "newInterestRate" : 28, + "rescheduleReasonId": 1 + } + + + { + "loanId": 1, + "resourceId": 1 + } + +
+
+ + POST rescheduleloans + Content-Type: application/json Request Body: + { + "loanId": 1, + "graceOnPrincipal": 2, + "rescheduleFromDate": "25 December 2013", + "adjustedDueDate": "31 December 2013", + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "submittedOnDate": "04 September 2013", + "rescheduleReasonComment" : "Client has gone AWOL", + "rescheduleReasonId": 1 + } + + + { + "loanId": 1, + "resourceId": 1 + } + +
+
+   +
+
+

Retrieve a Loan Reschedule Request

+

Example Requests:

+
rescheduleloans/1
+
+
+ + GET https://DomainName/api/v1/rescheduleloans/{requestId} + + + { + "id": 1, + "loanId": 1, + "clientId": 1, + "clientName": "test test", + "loanAccountNumber": "000000001", + "statusEnum": { + "id": 100, + "code": "loanStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "pendingApproval": true, + "approved": false, + "rejected": false + }, + "rescheduleFromInstallment": 5, + "rescheduleFromDate": [ + 2013, + 12, + 25 + ], + "recalculateInterest": false, + "rescheduleReasonCodeValue": { + "id": 1, + "name": "Passport", + "isActive": false + }, + "timeline": { + "submittedOnDate": [ + 2013, + 9, + 4 + ], + "submittedByUsername": "mifos", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator" + }, + "rescheduleReasonComment": "Client has gone AWOL", + "loanTermVariationsData": [ + { + "id": 13, + "termType": { + "id": 4, + "code": "loanTermType.dueDate", + "value": "dueDate" + }, + "termVariationApplicableFrom": [ + 2013, + 12, + 25 + ], + "dateValue": [ + 2013, + 12, + 31 + ], + "isSpecificToInstallment": false + }, + { + "id": 14, + "termType": { + "id": 8, + "code": "loanTermType.graceOnPrincipal", + "value": "graceOnPrincipal" + }, + "termVariationApplicableFrom": [ + 2013, + 12, + 25 + ], + "decimalValue": 2, + "isSpecificToInstallment": false + } + ] + } + +
+
+   +
+
+

Retrieve a Preview of The New Loan Repayment Schedule

+

Example Requests:

+
rescheduleloans/1?command=previewLoanReschedule
+
+
+ + GET https://DomainName/api/v1/rescheduleloans/{requestId}?command=previewLoanReschedule + + + "currency": { + "code": "KES", + "name": "Kenyan Shilling", + "decimalPlaces": 0, + "inMultiplesOf": 10, + "displaySymbol": "KSh", + "nameCode": "currency.KES", + "displayLabel": "Kenyan Shilling (KSh)" + }, + "loanTermInDays": 182, + "totalPrincipalDisbursed": 10000, + "totalPrincipalExpected": 10000, + "totalPrincipalPaid": 900.000000, + "totalInterestCharged": 960, + "totalFeeChargesCharged": 0.000000, + "totalPenaltyChargesCharged": 2500.000000, + "totalRepaymentExpected": 13460, + "totalOutstanding": 12060.000000, + "periods": [ + { + "period": 1, + "fromDate": [ + 2013, + 11, + 8 + ], + "dueDate": [ + 2013, + 11, + 8 + ], + "daysInPeriod": 0, + "principalOriginalDue": 0, + "principalDue": 0, + "principalOutstanding": 0, + "principalLoanBalanceOutstanding": 10000, + "interestOriginalDue": 0, + "interestDue": 0, + "interestOutstanding": 0, + "feeChargesDue": 0, + "penaltyChargesDue": 0, + "totalOriginalDueForPeriod": 0, + "totalDueForPeriod": 0, + "totalPaidForPeriod": 0, + "totalOutstandingForPeriod": 0, + "totalOverdue": 0, + "totalActualCostOfLoanForPeriod": 0 + }, + ... + ... + { + "period": 30, + "fromDate": [ + 2014, + 5, + 23 + ], + "dueDate": [ + 2014, + 5, + 30 + ], + "daysInPeriod": 7, + "principalOriginalDue": 300, + "principalDue": 300, + "principalOutstanding": 300, + "principalLoanBalanceOutstanding": 0, + "interestOriginalDue": 130, + "interestDue": 130, + "interestOutstanding": 130, + "feeChargesDue": 0, + "penaltyChargesDue": 0, + "totalOriginalDueForPeriod": 430, + "totalDueForPeriod": 430, + "totalPaidForPeriod": 0, + "totalOutstandingForPeriod": 430, + "totalOverdue": 430, + "totalActualCostOfLoanForPeriod": 130 + } + ] + } + +
+
+   +
+
+

Reject a Loan Reschedule Request

+
+
+ POST + https://DomainName/api/v1/rescheduleloans/{requestId}?command=reject + POST rescheduleloans/1?command=reject + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "rejectedOnDate": "11 September 2014" + } + + + { + "loanId": 1, + "resourceId": 1, + "changes": { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "rejectedOnDate": "11 September 2014", + "rejectedByUserId": 1 + } + } + +
+
+   +
+
+

Approve a Loan Reschedule Request

+

Rescheduling of a loan happens once a loan reschedule request is approved.

+
+
+ POST + https://DomainName/api/v1/rescheduleloans/{requestId}?command=approve + POST rescheduleloans/1?command=approve + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "approvedOnDate": "11 September 2014" + } + + + { + "loanId": 1, + "resourceId": 1, + "changes": { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "approvedOnDate": "11 September 2014", + "approvedByUserId": 1 + } + } + +
+
- -POST authentication?username=mifos&password=fail -Content-Type: application/json -No Request Body - - -{ - "developerMessage": "Invalid authentication details were passed in api request.", - "developerDocLink": "https://github.com/openMF/mifosx/wiki/HTTP-API-Error-codes", - "httpStatusCode": "401", - "defaultUserMessage": "Unauthenticated. Please login.", - "userMessageGlobalisationCode": "error.msg.not.authenticated", - "errors": [] -} - -
-
+ +   +
+
+

Loan Rescheduling

+

Loan Term Variations provides the ability to change due dates, amounts and number of instalments + before loan approval.

+ + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
loanId
The ID of the loan to be modified.
exceptions
contains exception data for variations(modifiedinstallments,newinstallments + and deletedinstallments described below) +
+

Exception object fields

+

Modifiedinstallments Array fields

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
dueDate
Schedule dueDate for which this exception should be applied.
modifiedDueDate
this is the exception data to move the due date to specified date for a + instalment +
installmentAmount
new instalment amount(principal+interest) for the specified instalment. + supported only for interest method declining with equal instalments Amortization +
principal
new Principal amount for the specified instalment. supported only for + interest method declining with equal instalments Amortization and for Flat loans. +
+

newinstallments Array fields

+ + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
dueDate
Schedule dueDate for inserting new instalment.
installmentAmount
new instalment amount(principal+interest) for the new instalment. supported + only for interest method declining with equal instalments Amortization +
principal
new Principal amount for the new instalment. supported only for interest + method declining with equal instalments Amortization and for Flat loans. +
+

deletedinstallments Array fields

+ + + + + + + + + + +
+
Field Descriptions
+
dueDate
Schedule dueDate for removing specific instalment.
+
+
-   -
-
-

Authentication Oauth2

-

An API capability that allows client applications to fetch current user details details using Oauth2.

-
-
-   -
-
-

Fetch authenticated user details

-

checks the Authentication and returns the set roles and permissions allowed.

-
-
- -GET https://DomainName/api/v1/userdetails - - -GET userdetails -Content-Type: application/json -No Request Body - -

Example response of authenticated user user that is not linked with any staff.

- -{ - "username": "mifos", - "userId": 1, - "accessToken": "bWlmb3M6cGFzc3dvcmQ=", - "authenticated": true, - "officeId": 1, - "officeName": "Head Office", - "roles": [ - { - "id": 1, - "name": "Super user", - "description": "This role provides all application permissions." - } - ], - "permissions": [ - "ALL_FUNCTIONS" - ] -} - -

Example response of authenticated user that is linked with a staff member and role.

- -{ - "username": "mifos", - "userId": 1, - "accessToken": "bWlmb3M6cGFzc3dvcmQ=", - "authenticated": true, - "officeId": 1, - "officeName": "Head Office", - "staffId": 1, - "staffDisplayName": "Director, Program", - "organisationalRole": { - "id": 100, - "code": "staffOrganisationalRoleType.programDirector", - "value": "Program Director" - }, - "roles": [ - { - "id": 1, - "name": "Super user", - "description": "This role provides all application permissions." - } - ], - "permissions": [ - "ALL_FUNCTIONS" - ] -} - +   +
+
+

Calculate loan repayment schedule based on Loan term variations

+ + + + + + + +
+
Mandatory Fields
+
exceptions,locale,dateFormat
+
+
+ + POST https://DomainName/api/v1/loans/1/schedule?command=calculateLoanSchedule + + + POST loans/{loanIdd}/schedule?command=calculateLoanSchedule + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "exceptions": { + "modifiedinstallments": [{ + "dueDate": '01 April 2016', + "modifiedDueDate": '05 April 2016' + }, + { + "dueDate": '05 January 2016', + "modifiedDueDate": '01 January 2016' + }], + "deletedinstallments": [{ + "dueDate": "01 October 2016" + }], + newinstallments: [{ + dueDate: '10 October 2016', + installmentAmount: '1000' + }] + } + } + + + { + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "loanTermInDays": 12, + "totalPrincipalDisbursed": 10000, + "totalPrincipalExpected": 10000, + "totalInterestCharged": 1340.98, + "totalFeeChargesCharged": 0, + "totalPenaltyChargesCharged": 0, + "totalRepaymentExpected": 11340.98, + "periods": [{ + "period": 1, + "fromDate": [2015, + 11, + 1], + "dueDate": [2015, + 12, + 1], + "daysInPeriod": 30, + "principalOriginalDue": 745.6, + "principalDue": 745.6, + "principalOutstanding": 745.6, + "principalLoanBalanceOutstanding": 9254.4, + "interestOriginalDue": 200, + "interestDue": 200, + "interestOutstanding": 200, + "feeChargesDue": 0, + "penaltyChargesDue": 0, + "totalOriginalDueForPeriod": 945.6, + "totalDueForPeriod": 945.6, + "totalPaidForPeriod": 0, + "totalOutstandingForPeriod": 945.6, + "totalOverdue": 945.6, + "totalActualCostOfLoanForPeriod": 200 + }, + { + "period": 2, + "fromDate": [2015, + 12, + 1], + "dueDate": [2016, + 1, + 1], + "daysInPeriod": 31, + "principalOriginalDue": 814.91, + "principalDue": 814.91, + "principalOutstanding": 814.91, + "principalLoanBalanceOutstanding": 8439.49, + "interestOriginalDue": 185.09, + "interestDue": 185.09, + "interestOutstanding": 185.09, + "feeChargesDue": 0, + "penaltyChargesDue": 0, + "totalOriginalDueForPeriod": 1000, + "totalDueForPeriod": 1000, + "totalPaidForPeriod": 0, + "totalOutstandingForPeriod": 1000, + "totalActualCostOfLoanForPeriod": 185.09 + }, + { + "period": 3, + "fromDate": [2016, + 1, + 1], + "dueDate": [2016, + 2, + 1], + "daysInPeriod": 31, + "principalOriginalDue": 770.75, + "principalDue": 770.75, + "principalOutstanding": 770.75, + "principalLoanBalanceOutstanding": 7668.74, + "interestOriginalDue": 168.79, + "interestDue": 168.79, + "interestOutstanding": 168.79, + "feeChargesDue": 0, + "penaltyChargesDue": 0, + "totalOriginalDueForPeriod": 939.54, + "totalDueForPeriod": 939.54, + "totalPaidForPeriod": 0, + "totalOutstandingForPeriod": 939.54, + "totalActualCostOfLoanForPeriod": 168.79 + }, + { + "period": 4, + "fromDate": [2016, + 2, + 1], + "dueDate": [2016, + 3, + 5], + "daysInPeriod": 33, + "principalOriginalDue": 786.17, + "principalDue": 786.17, + "principalOutstanding": 786.17, + "principalLoanBalanceOutstanding": 6882.57, + "interestOriginalDue": 153.37, + "interestDue": 153.37, + "interestOutstanding": 153.37, + "feeChargesDue": 0, + "penaltyChargesDue": 0, + "totalOriginalDueForPeriod": 939.54, + "totalDueForPeriod": 939.54, + "totalPaidForPeriod": 0, + "totalOutstandingForPeriod": 939.54, + "totalActualCostOfLoanForPeriod": 153.37 + }, + { + "period": 5, + "fromDate": [2016, + 3, + 5], + "dueDate": [2016, + 4, + 5], + "daysInPeriod": 31, + "principalOriginalDue": 801.89, + "principalDue": 801.89, + "principalOutstanding": 801.89, + "principalLoanBalanceOutstanding": 6080.68, + "interestOriginalDue": 137.65, + "interestDue": 137.65, + "interestOutstanding": 137.65, + "feeChargesDue": 0, + "penaltyChargesDue": 0, + "totalOriginalDueForPeriod": 939.54, + "totalDueForPeriod": 939.54, + "totalPaidForPeriod": 0, + "totalOutstandingForPeriod": 939.54, + "totalActualCostOfLoanForPeriod": 137.65 + }, + { + "period": 6, + "fromDate": [2016, + 4, + 5], + "dueDate": [2016, + 5, + 1], + "daysInPeriod": 26, + "principalOriginalDue": 817.93, + "principalDue": 817.93, + "principalOutstanding": 817.93, + "principalLoanBalanceOutstanding": 5262.75, + "interestOriginalDue": 121.61, + "interestDue": 121.61, + "interestOutstanding": 121.61, + "feeChargesDue": 0, + "penaltyChargesDue": 0, + "totalOriginalDueForPeriod": 939.54, + "totalDueForPeriod": 939.54, + "totalPaidForPeriod": 0, + "totalOutstandingForPeriod": 939.54, + "totalActualCostOfLoanForPeriod": 121.61 + }, + { + "period": 7, + "fromDate": [2016, + 5, + 1], + "dueDate": [2016, + 6, + 1], + "daysInPeriod": 31, + "principalOriginalDue": 834.28, + "principalDue": 834.28, + "principalOutstanding": 834.28, + "principalLoanBalanceOutstanding": 4428.47, + "interestOriginalDue": 105.26, + "interestDue": 105.26, + "interestOutstanding": 105.26, + "feeChargesDue": 0, + "penaltyChargesDue": 0, + "totalOriginalDueForPeriod": 939.54, + "totalDueForPeriod": 939.54, + "totalPaidForPeriod": 0, + "totalOutstandingForPeriod": 939.54, + "totalActualCostOfLoanForPeriod": 105.26 + }, + { + "period": 8, + "fromDate": [2016, + 6, + 1], + "dueDate": [2016, + 7, + 1], + "daysInPeriod": 30, + "principalOriginalDue": 850.97, + "principalDue": 850.97, + "principalOutstanding": 850.97, + "principalLoanBalanceOutstanding": 3577.5, + "interestOriginalDue": 88.57, + "interestDue": 88.57, + "interestOutstanding": 88.57, + "feeChargesDue": 0, + "penaltyChargesDue": 0, + "totalOriginalDueForPeriod": 939.54, + "totalDueForPeriod": 939.54, + "totalPaidForPeriod": 0, + "totalOutstandingForPeriod": 939.54, + "totalActualCostOfLoanForPeriod": 88.57 + }, + { + "period": 9, + "fromDate": [2016, + 7, + 1], + "dueDate": [2016, + 8, + 1], + "daysInPeriod": 31, + "principalOriginalDue": 867.99, + "principalDue": 867.99, + "principalOutstanding": 867.99, + "principalLoanBalanceOutstanding": 2709.51, + "interestOriginalDue": 71.55, + "interestDue": 71.55, + "interestOutstanding": 71.55, + "feeChargesDue": 0, + "penaltyChargesDue": 0, + "totalOriginalDueForPeriod": 939.54, + "totalDueForPeriod": 939.54, + "totalPaidForPeriod": 0, + "totalOutstandingForPeriod": 939.54, + "totalActualCostOfLoanForPeriod": 71.55 + }, + { + "period": 10, + "fromDate": [2016, + 8, + 1], + "dueDate": [2016, + 9, + 1], + "daysInPeriod": 31, + "principalOriginalDue": 885.35, + "principalDue": 885.35, + "principalOutstanding": 885.35, + "principalLoanBalanceOutstanding": 1824.16, + "interestOriginalDue": 54.19, + "interestDue": 54.19, + "interestOutstanding": 54.19, + "feeChargesDue": 0, + "penaltyChargesDue": 0, + "totalOriginalDueForPeriod": 939.54, + "totalDueForPeriod": 939.54, + "totalPaidForPeriod": 0, + "totalOutstandingForPeriod": 939.54, + "totalActualCostOfLoanForPeriod": 54.19 + }, + { + "period": 11, + "fromDate": [2016, + 9, + 1], + "dueDate": [2016, + 10, + 10], + "daysInPeriod": 39, + "principalOriginalDue": 903.05, + "principalDue": 903.05, + "principalOutstanding": 903.05, + "principalLoanBalanceOutstanding": 921.11, + "interestOriginalDue": 36.48, + "interestDue": 36.48, + "interestOutstanding": 36.48, + "feeChargesDue": 0, + "penaltyChargesDue": 0, + "totalOriginalDueForPeriod": 939.53, + "totalDueForPeriod": 939.53, + "totalPaidForPeriod": 0, + "totalOutstandingForPeriod": 939.53, + "totalActualCostOfLoanForPeriod": 36.48 + }, + { + "period": 12, + "fromDate": [2016, + 10, + 10], + "dueDate": [2016, + 11, + 1], + "daysInPeriod": 22, + "principalOriginalDue": 921.11, + "principalDue": 921.11, + "principalOutstanding": 921.11, + "principalLoanBalanceOutstanding": 0, + "interestOriginalDue": 18.42, + "interestDue": 18.42, + "interestOutstanding": 18.42, + "feeChargesDue": 0, + "penaltyChargesDue": 0, + "totalOriginalDueForPeriod": 939.53, + "totalDueForPeriod": 939.53, + "totalPaidForPeriod": 0, + "totalOutstandingForPeriod": 939.53, + "totalActualCostOfLoanForPeriod": 18.42 + }] + } + +
+
+   +
+
+

Updates loan repayment schedule based on Loan term variations

+ + + + + + + +
+
Mandatory Fields
+
exceptions,locale,dateFormat
+
+
+ + POST https://DomainName/api/v1/loans/1/schedule?command=addVariations + + + POST loans/{loanIdd}/schedule?command=addVariations + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "exceptions": { + "modifiedinstallments": [{ + "dueDate": '01 April 2016', + "modifiedDueDate": '05 April 2016' + }, + { + "dueDate": '05 January 2016', + "modifiedDueDate": '01 January 2016' + }], + "deletedinstallments": [{ + "dueDate": "01 October 2016" + }], + newinstallments: [{ + dueDate: '10 October 2016', + installmentAmount: '1000' + }] + } + } + + + { + "loanId": 1, + "changes": { + "loanTermVariations": [{ + "id": 21, + "termType": { + "id": 4, + "code": "loanTermType.dueDate", + "value": "dueDate" + }, + "termVariationApplicableFrom": [2016, + 1, + 1], + "dateValue": [2016, + 1, + 10], + "isSpecificToInstallment": true + }, + { + "id": 22, + "termType": { + "id": 3, + "code": "loanTermType.principalAmount", + "value": "principalAmount" + }, + "termVariationApplicableFrom": [2016, + 1, + 10], + "decimalValue": 1100, + "isSpecificToInstallment": true + }, + { + "id": 23, + "termType": { + "id": 3, + "code": "loanTermType.principalAmount", + "value": "principalAmount" + }, + "termVariationApplicableFrom": [2016, + 8, + 1], + "decimalValue": 1000, + "isSpecificToInstallment": true + }, + { + "id": 24, + "termType": { + "id": 5, + "code": "loanTermType.dueDate", + "value": "insertInstallment" + }, + "termVariationApplicableFrom": [2016, + 8, + 15], + "decimalValue": 900, + "isSpecificToInstallment": true + }] + } + } + +
+
+   +
+
+

Updates loan repayment schedule by removing Loan term variations

+ + + + + + + +
+
Mandatory Fields
+
+
+
+ + POST https://DomainName/api/v1/loans/1/schedule?command=deleteVariations + + + POST loans/{loanIdd}/schedule?command=deleteVariations + Content-Type: application/json + Request Body: + {} + + + { + "loanId": 1, + "changes": { + "removedEntityIds": [{ + 21,22}] + } + } + +
+
-
-
- -   -
-
-

Users

-

An API capability to support administration of application users.

-
-
+ + +   +
+
+

Offices

+

Offices are used to model an MFIs structure. A hierarchical + representation of offices is supported. There will always be at + least one office (which represents the MFI or an MFIs head + office). All subsequent offices added must have a parent office.

+ + + + + + + + + + + + + + + + +
+
Field Descriptions
+
externalId
A place to put an external reference for + this office e.g. The ID another system uses for it.
If + provided, it must be unique. +
hierarchy
This field is a system generated + convenience field. It can't be set.
It uses "dot + notation" to define where an office stands in the office + hierarchy.
For example, the system default office (id = + 1) has a hierarchy value of '.'
An office (id = 12) + placed directly underneath this default office has a hierarchy + value of '.12.'
And if a further office (id = 78) is + placed directly under office (id = 12) its hierarchy value is + '.12.78.'
+
The hierarchy value is useful when you need to display + offices in 'hierarchy' order (perhaps indented in a drop down + list box). +
+
+
-   -
-
-

Retrieve list of users

-

Example Requests:

-
users
-
-
-
users?fields=id,username,email,officeName
-
-
- -GET https://DomainName/api/v1/users - - -[ - { - "id": 1, - "username": "mifos", - "officeId": 1, - "officeName": "Head Office", - "firstname": "App", - "lastname": "Administrator", - "email": "demomfi@mifos.org", - "passwordNeverExpires": false, - "staff": { - "id": 1, - "firstname": "Test", - "lastname": "123", - "displayName": "123, Test", - "mobileNo": "12312312", - "officeId": 1, - "officeName": "Head Office", - "isLoanOfficer": true, - "isActive": true - } - "selectedRoles": [ - { - "id": 1, - "name": "Super user", - "description": "This role provides all application permissions." - } - ] - } -] - -
-
+   +
+
+

List Offices

+

Example Requests:

+
offices
+
+
+
offices?fields=id,name,openingDate
+
+
+ + GET https://DomainName/api/v1/offices + + + [ + { + "id": 1, + "name": "Head Office", + "nameDecorated": "Head Office", + "externalId": "1", + "openingDate": [ + 2009, + 1, + 1 + ], + "hierarchy": "." + } + ] + +
+
-   -
-
-

Retrieve User Details Template

-

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:

-
users/template
-
-
- -GET https://DomainName/api/v1/users/template - - -{ - "allowedOffices": [ - { - "id": 1, - "name": "Head Office", - "nameDecorated": "Head Office" - } - ], - "availableRoles": [ - { - "id": 1, - "name": "Super user", - "description": "This role provides all application permissions." - }, - { - "id": 2, - "name": "Self Service User", - "description": "self service user role", - "disabled": false - } - ], - "selfServiceRoles": [ - { - "id": 2, - "name": "Self Service User", - "description": "self service user role", - "disabled": false - } - ] -} - -
-
+   +
+
+

Retrieve Office Details Template

+

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:

+
offices/template
+
+
+ + GET https://DomainName/api/v1/offices/template + + + { + "openingDate": [ + 2013, + 2, + 4 + ], + "allowedParents": [ + { + "id": 1, + "name": "Head Office", + "nameDecorated": "Head Office" + } + ] + } + +
+
-   -
-
-

Retrieve a User

-

Example Requests:

-
users/1
-
-
-
users/1?template=true
-
-
-
users/1?fields=username,officeName
-
-
- -GET https://DomainName/api/v1/users/{userId} - - -{ - "id": 1, - "username": "mifos", - "officeId": 1, - "officeName": "Head Office", - "firstname": "App", - "lastname": "Administrator", - "email": "demomfi@mifos.org", - "passwordNeverExpires": true, - "staff": { - "id": 1, - "firstname": "Test", - "lastname": "123", - "displayName": "123, Test", - "mobileNo": "12312312", - "officeId": 1, - "officeName": "Head Office", - "isLoanOfficer": true, - "isActive": true - } - "availableRoles": [], - "selectedRoles": [ - { - "id": 1, - "name": "Super user", - "description": "This role provides all application permissions." - } - ] -} - -
-
+   +
+
+

Retrieve an Office

+

Example Requests:

+
offices/1
+
+
+
offices/1?template=true
+
+
+
offices/1?fields=id,name,parentName
+
+
+ + GET https://DomainName/api/v1/offices/1 + + + { + "id": 1, + "name": "Head Office", + "nameDecorated": "Head Office", + "externalId": "1", + "openingDate": [ + 2009, + 1, + 1 + ], + "hierarchy": "." + } + +
+
-   -
-
-

Create a User

-

Adds new application user.

-

- Note: Password information is not required (or processed). - Password details at present are auto-generated and then sent to - the email account given (which is why it can take a few seconds to - complete). -

- - - - - - - -
Mandatory Fields
username, firstname, lastname, email, officeId, roles, sendPasswordToEmail
-
- - - - - - - -
Optional Fields
staffId,passwordNeverExpires,isSelfServiceUser,clients
-
-
- -POST https://DomainName/api/v1/users - - -POST users -Content-Type: application/json -Request body: -{ - "username": "newuser", - "firstname": "Test", - "lastname": "User", - "email": "whatever@mifos.org", - "officeId": 1, - "staffId": 1, - "roles": [2,3], - "sendPasswordToEmail": true -} - - -{ - "officeId": 1, - "resourceId": 11 -} - - -POST users -Content-Type: application/json -Request body: -{ - "username": "newuser", - "firstname": "Test", - "lastname": "User", - "email": "whatever@mifos.org", - "officeId": 1, - "staffId": 1, - "roles": [2,3], - "sendPasswordToEmail": false, - "password": "123", - "repeatPassword": "123" -} - - -{ - "officeId": 1, - "resourceId": 12 -} - - -POST https://DomainName/api/v1/users - - -POST users -Content-Type: application/json -Request body: -{ - "username": "newuser", - "firstname": "Test", - "lastname": "User", - "email": "whatever@mifos.org", - "officeId": 1, - "staffId": 1, - "roles": [2,3], - "sendPasswordToEmail": true, - "isSelfServiceUser": true, - "clients": [1,2,3] -} - - -{ - "officeId": 1, - "resourceId": 11 -} - -
-
+   +
+
+

Create an Office

+ + + + + + + +
+
Mandatory Fields
+
name, openingDate, parentId
+
+
+ + POST https://DomainName/api/v1/offices + + + POST offices + Content-Type: application/json + Request Body: + { + "name": "Example New Branch", + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "openingDate": "01 July 2007", + "parentId": 2, + "externalId": "SYS54-88" + } + + + { + "officeId": 3, + "resourceId": 3 + } + +
+
-   -
-
-

Change the password of a User

-

- Note: When updating a password you must provide the - repeatPassword parameter also. -

-
-
- -POST https://DomainName/api/v1/users/{userId)/pwd - - -POST users/3/pwd -Content-Type: application/json -Request body: -{ - "password": "window75", - "repeatPassword": "window75" -} - - -{ - "officeId": 1, - "resourceId": 3, - "changes": { - "passwordEncoded": "abc3326b1bb376351c7baeb4175f5e0504e33aadf6a158474a6d71de1befae51" - } -} - -
+   +
+
+

Update Office

+
+
+ + PUT https://DomainName/api/v1/offices/{officeId} + + + PUT offices/1 + Content-Type: application/json + Request Body: + { + "name": "Name is updated" + } + + + { + "officeId": 1, + "resourceId": 1, + "changes": { + "name": "Name is updated" + } + } +
+
+ -   -
-
-

Update a User

-

- Note: When updating a password you must provide the - repeatPassword parameter also. -

-
-
- -PUT https://DomainName/api/v1/users/{userId) - - -PUT users/3 -Content-Type: application/json -Request body: -{ - "firstname": "Test", - "password": "window75", - "repeatPassword": "window75" -} - - -{ - "officeId": 1, - "resourceId": 3, - "changes": { - "firstname": "Test" - } -} - -
-
+ +   +
+
+

Loan Products

+

A Loan product is a template that is used when creating a + loan. Much of the template definition can be overridden during + loan creation.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
name
Name associated with loan product on system.
shortName
Short name associated with a loan product.
+ An abbreviated version of the name, used in reports or menus where space is limited, such as + Collection Sheets. +
description
For providing helpful description of product offering.
fundId
For associating a loan product with a given fund by default.
includeInBorrowerCycle
It is a flag, Used to denote whether the loans should include in loan cycle + counter or not. +
useBorrowerCycle
It is a flag, Used to denote whether the loans should depend on
borrower + loan cycle counter or not. +
currencyCode
A three letter ISO code of currency.
digitsAfterDecimal
Override the currency default value for digitsAfterDecimal.
inMultiplesOf
Override the default value for rounding currency to multiples of value + provided. +
installmentAmountInMultiplesOf
Override the default value for rounding instalment amount to multiples of + value provided. +
principal
The loan amount to be disbursed to through loan.
numberOfRepayments
Number of installments to repay.
+ Used like: numberOfRepayments Every repaymentEvery + repaymentFrequencyType
e.g. 10 (repayments) Every 12 Weeks +
repaymentEvery
Used like: numberOfRepayments Every + repaymentEvery repaymentFrequencyType
e.g. 10 + (repayments) Every 12 Weeks +
repaymentFrequencyType
Used like: numberOfRepayments Every + repaymentEvery repaymentFrequencyType
e.g. 10 + (repayments) Every 12 Weeks
+ Example Values: 0=Days, 1=Weeks, 2=Months +
interestRatePerPeriod
Interest Rate.
Used like: + interestRatePerPeriod % interestRateFrequencyType - interestType
+ e.g. 12.0000% Per year - Declining Balance +
interestRateFrequencyType
Used like: interestRatePerPeriod% + interestRateFrequencyType - interestType
e.g. 12.0000% + Per year - Declining Balance
+ Example Values: 2=Per month, 3=Per year +
amortizationType
Example Values: 0=Equal + principle payments, 1=Equal installments +
interestType
Used like: interestRatePerPeriod% + interestRateFrequencyType - interestType
e.g. 12.0000% + Per year - Declining Balance
+ Example Values: 0=Declining Balance, 1=Flat +
interestCalculationPeriodType
Example Values: 0=Daily, 1=Same as repayment period
allowPartialPeriodInterestCalculation
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) +
inArrearsTolerance
The amount that can be 'waived' at end + of all loan payments because it is too small to worry about.
+ This is also the tolerance amount assessed when determining if a + loan is in arrears. +
principalVariationsForBorrowerCycle,interestRateVariationsForBorrowerCycle,
numberOfRepaymentVariationsForBorrowerCycle +
Variations for loan, based on borrower cycle number +
minimumDaysBetweenDisbursalAndFirstRepayment
The minimum number of days allowed between a Loan disbursal and its first + repayment. +
principalThresholdForLastInstalment
Field represents percentage of current instalment principal amount for + comparing against principal outstanding to add another repayment instalment. If the + outstanding principal amount is less then calculated amount, remaining outstanding amount + will be added to current instalment. Default value for multi disburse loan is 50% and + non-multi disburse loan is 0% +
canDefineInstallmentAmount
if provided as true, then fixed instalment amount can be provided from loan + account. +
transactionProcessingStrategyCode
+ An enumeration that indicates the type of transaction processing strategy to be used. This + relates to functionality that is also known as Payment Application Logic. + +

A number of out of the box approaches exist, some are custom to specific MFIs, some are + more general and indicate the order in which payments are processed.

+ +

Refer to the Payment Application Logic / Transaction + Processing Strategy section in the appendix for more detailed overview of each + available payment application logic provided out of the box.

+ + List of current approaches:
+
    +
  • 1 = Mifos style (Similar to Old Mifos)
  • +
  • 2 = Heavensfamily (Custom MFI approach)
  • +
  • 3 = Creocore (Custom MFI approach)
  • +
  • 4 = RBI (India)
  • +
  • 5 = Principal Interest Penalties Fees Order
  • +
  • 6 = Interest Principal Penalties Fees Order
  • +
  • 7 = Early Payment Strategy
  • +
+
graceOnPrincipalPayment
Optional: Integer - represents the number of repayment periods that grace + should apply to the principal component of a repayment period. +
graceOnInterestPayment
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. +
graceOnInterestCharged
Optional: Integer - represents the number of repayment periods that should + be interest-free. +
graceOnArrearsAgeing
Optional: Integer - Used in Arrears calculation to only take into account + loans that are more than graceOnArrearsAgeing days overdue. +
overdueDaysForNPA
Optional: Integer - represents the maximum number of days a Loan may + be overdue before being classified as a NPA (non performing asset) +
accountMovesOutOfNPAOnlyOnArrearsCompletion
Optional: Boolean - if provided as true, Loan Account moves out of NPA state + only when all arrears are cleared +
accountingRule
Specifies if accounting is enabled for the particular + product and the type of the accounting rule to be used + Example Values:1=NONE, 2=CASH_BASED, 3=ACCRUAL_PERIODIC, 4=ACCRUAL_UPFRONT +
isInterestRecalculationEnabled
It is a flag, Used to denote whether interest recalculation is enabled or + disabled for the particular product +
daysInYearType
Specifies the number of days in a year.
+ Example Values:1=ACTUAL(Actual number of days in year), 360=360 DAYS, 364=364 + DAYS(52 WEEKS), 365=365 DAYS +
daysInMonthType
Specifies the number of days in a month.
+ Example Values:1=ACTUAL(Actual number of days in month), 30=30 DAYS +
interestRecalculationCompoundingMethod
Specifies which amount portion should be added to principal for interest + recalculation.
+ Example Values:0=NONE(Only on principal), 1=INTEREST(Principal+Interest), + 2=FEE(Principal+Fee), 3=FEE And INTEREST (Principal+Fee+Interest) +
rescheduleStrategyMethod
Specifies what action should perform on loan repayment schedule for advance + payments.
+ Example Values:1=Reschedule next repayments, 2=Reduce number of installments, + 3=Reduce EMI amount, 4=Adjust last, unpaid period +
recalculationCompoundingFrequencyType
Specifies effective date from which the compounding of interest or fee + amounts will be considered in recalculation on late payment.
+ Example Values:1=Same as repayment period, 2=Daily, 3=Weekly, 4=Monthly +
recalculationCompoundingFrequencyInterval
Specifies compounding frequency interval for interest recalculation.
+
recalculationCompoundingFrequencyDate
Specifies compounding frequency start date for interest recalculation.
+
recalculationRestFrequencyType
Specifies effective date from which the late or advanced payment amounts + will be considered in recalculation.
+ Example Values:1=Same as repayment period, 2=Daily, 3=Weekly, 4=Monthly +
recalculationRestFrequencyInterval
Specifies rest frequency interval for interest recalculation.
+
recalculationRestFrequencyDate
Specifies rest frequency start date for interest recalculation.
+
preClosureInterestCalculationStrategy
Specifies applicable days for interest calculation on pre closure of a loan.
+ Example Values:1=Calculate till pre closure date, 2=Calculate till rest + frequency date +
isArrearsBasedOnOriginalSchedule
If Specified as true, arrears will be identified based on original schedule.
+
allowAttributeOverrides
Specifies if select attributes may be overridden for individual loan + accounts.
+
+
+
-   -
-
-

Delete a User

-

Removes the user and the associated roles and permissions.

-
-
- -DELETE https://DomainName/api/v1/users/{userId} - - -DELETE users/20 -Content-Type: application/json -No Request Body - - -{ - "officeId": 1, - "resourceId": 20, - "changes": {} -} - -
-
- - - -   -
-
-

Roles

-

An API capability to support management of application roles for user administration.

-
-
- -   -
-
-

List Roles

-

Example Requests:

-
roles
-
-
-
roles?fields=name
-
-
- -GET https://DomainName/api/v1/roles - - -[ - { - "id": 1, - "name": "Super user", - "description": "This role provides all application permissions." - } -] - -
-
- - -   -
-
-

Delete a Role

-

Description : Delete the role in case role is not associated with any users.

-
-
- -DELETE https://DomainName/api/v1/roles/{roleId} - - -DELETE roles/20 -Content-Type: application/json -No Request Body - - -{ - "resourceId":1 -} - -
-
- -   -
-
-

Retrieve a Role

-

Example Requests:

-
roles/1
-
-
-
roles/1?fields=name
-
-
- -GET https://DomainName/api/v1/roles/{roleId} - - -{ - "id": 1, - "name": "Super user", - "description": "This role provides all application permissions." -} - -
-
- -   -
-
-

Create a New Role

- - - - - - - -
Mandatory Fields
name, description
-
-
- -POST https://DomainName/api/v1/roles - - -POST roles -Content-Type: application/json -Request body: -{ - "name": "Another Role Name", - "description": "A description outlining the purpose of this role in relation to the application." -} - - { "resourceId": 2} -
-
- -   -
-
-

Update a Role

-
-
- -PUT https://DomainName/api/v1/roles/{roleId} - - -PUT roles/1 -Content-Type: application/json -Request body: -{ - "description": "some description(changed)" -} - - -{ - "resourceId": 1, - "changes": { - "description": "some description(changed)" - } -} - -
-
- -   -
-
-

Retrieve a Role's Permissions

-

Example Requests:

-
roles/1/permissions
-
-
- -GET https://DomainName/api/v1/roles/{roleId}/permissions - - -{ - "id": 1, - "name": "Super user", - "description": "This role provides all application permissions.", - "permissionUsageData": [ - { - "grouping": "authorisation", - "code": "READ_PERMISSION", - "entityName": "PERMISSION", - "actionName": "READ", - "selected": false - }, - ... - { - "grouping": "transaction_loan", - "code": "WRITEOFF_LOAN_CHECKER", - "entityName": "LOAN", - "actionName": "WRITEOFF", - "selected": false - } - ] -} - -
-
- -   -
-
-

Enable Role

-

Description : Enable role in case role is disabled.

-
-
- -POST https://DomainName/api/v1/roles/{roleId}?command=enable - - -POST roles/1?command=enable -Content-Type: application/json -No Request Body - - -{ - "resourceId":1 -} - -
-
- -   -
-
-

Disable Role

-

Description : Disable the role in case role is not associated with any users.

-
-
- -POST https://DomainName/api/v1/roles/{roleId}?command=disable - - -POST roles/1?command=disable -Content-Type: application/json -No Request Body - - -{ - "resourceId":1 -} - -
-
- -   -
-
-

Update a Role's Permissions

-
-
- -PUT https://DomainName/api/v1/roles/{roleId}/permissions - - -PUT roles/8 -Content-Type: application/json -Request body: -{ - "permissions": { - "ALL_FUNCTIONS_READ": "true" - } -} - - -{ - "resourceId": 8, - "changes": { - "permissions": { - "ALL_FUNCTIONS_READ": true - } - } -} - -
-
- - -   -
-
-

Permissions

-

An API capability to support management of application permissions for user administration.

-

There is no Apache Fineract functionality for creating or deleting permissions. Permissions come pre-installed.

-

Permissions are not updated, except in the case of enabling or disabling non-read transactions for - Maker Checker functionality

-
-
- -   -
-
-

List Application Permissions

-
Arguments
-
-
makerCheckerable
-
optional, - Values are true, false. Default is false. -

If makerCheckerable=false or not supplied then a list of application permissions is returned. The "selected" - attribute is always true in this case. -

-

If makerCheckerable=true then the "selected" attribute shows whether the permission is - enabled for Maker Check functionality. -

-

- Note: Each Apache Fineract transaction is associated with a permission. -

-
-
-

Example Requests:

-
permissions


-
permissions?makerCheckerable=true


-
permissions?fields=grouping,code
-
-
- -GET https://DomainName/api/v1/permissions - - -[ - { - "grouping": "authorisation", - "code": "READ_PERMISSION", - "entityName": "PERMISSION", - "actionName": "READ", - "selected": true - }, - .... - { - "grouping": "transaction_loan", - "code": "WRITEOFF_LOAN", - "entityName": "LOAN", - "actionName": "WRITEOFF", - "selected": true - } -] - -
-
- -   -
-
-

Enable/Disable Permissions for Maker Checker

-
-
- -PUT https://DomainName/api/v1/permissions - - -PUT permissions -Content-Type: application/json -Request Body: -{ - "permissions":{ - "CREATE_GUARANTOR":true, - "CREATE_CLIENT":true - } -} - -
-
- - -   -
-
-

Password preferences

-

This API enables management of password policy for user administration.

-

There is no Apache Fineract functionality for creating a validation policy. The validation policies come pre-installed.

-

Validation policies may be updated

-
-
- -   -
-
-

List Application Password validation policies

-
Arguments
-
- - -
-

Example Requests:

-
passwordpreferences


-
-
- -GET https://DomainName/api/v1/passwordpreferences/template - - -[ -{ -"id": 1, -"description": "Password must be at least 1 character and not more that 50 characters long", -"active": true, -"key" : "simple" -}, -{ -"id": 2, -"description": "Password must be at least 6 characters, no more than 50 characters long, must include at least one upper case letter, one lower case letter, one numeric digit and no space", -"active": false, -"key" : "secure" -} -] - -
- -
- -GET https://DomainName/api/v1/passwordpreferences/ - - -{ -"id": 1, -"description": "Password most be at least 1 character and not more that 50 characters long", -"active": true, -"key" : "simple" -} - -
-
- -   -
-
-

Update password preferences

-
-
- -PUT https://DomainName/api/v1/passwordpreferences/ - - -PUT passwordpreferences -Content-Type: application/json -Request Body: -{ - "validationPolicyId" : 1, -} - -
-
- -   -
-
-

General Ledger Account

-

Ledger accounts represent an Individual account within an Organizations Chart - Of Accounts(COA) and are assigned a name and unique number by which they can - be identified.
- All transactions relating to a company's assets, liabilities, owners' equity, - revenue and expenses are recorded against these accounts -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
name
The name of the account
glCode
The ledger code associated with the - Account
These codes are mandatory and should be unique within - an organization
disabled
A boolean flag that indicates whether an account - is currently in use
type
Classifies the account into one of the following Types -
Asset: represent the different types of economic resources - owned or controlled by business, common examples of Asset accounts are cash, - cash in bank, building, inventory, prepaid rent, goodwill, accounts receivable
- Liability: represent the different types of economic obligations - by a business, such as accounts payable, bank loan, bonds payable
- Income: represent the company's gross earnings and common examples - include Interest Income, Sales and Service revenue
- Expense: represent the company's expenditures to enable itself to - operate. Common examples are electricity and water, rentals, depreciation, - doubtful accounts, insurance.
- Equity: represent the residual equity of a business (after - deducting from Assets all the liabilities) including Retained Earnings - and Appropriations

- The options are fully listed in Retrieve - General Ledger Accounts Template. -
usage
Determines how the account shall be used
- "Header" accounts specify the title of a group of accounts. They are used - only for grouping together detail accounts that have a similar purpose; that is, detail accounts - are assigned to specific header accounts -
- "Detail" accounts may have transactions logged against them

- The options are fully listed in Retrieve - General Ledger Accounts Template. -
manualEntriesAllowed
Specifies if manual entries can be made - against this account using the - Create Journal Entries API
description
Human understandable description for the Ledger Account -
parentId
To assign a parent for this GLAccount -
tagId
Used for tagging the Account Heads, based on GLAccount types. -
-
-
- -   -
-
-

List General Ledger Accounts

-
Arguments
-
-
type
-
- Integer optional -
-
manualEntriesAllowed
-
- boolean optional -
-
usage
-
- Integer optional -
-
disabled
-
- boolean optional -
-
parentId
-
- Long optional -
-
tagId
-
- Long optional -
-
-

Example Requests:

-
glaccounts
-
-
-
glaccounts?type=1&manualEntriesAllowed=true&usage=1&disabled=false
-
-
glaccounts?fetchRunningBalance=true
-
-
- -GET https://DomainName/api/v1/glaccounts - - -[ - { - "id": 16, - "name": "Cash", - "parentId": 1, - "glCode": "100001", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "description": "Desc", - "nameDecorated": "....Cash", - "tagId": { - "id": 10, - "name": "asset tag" - }, - "organizationRunningBalance": 118437, - }, - { - "id": 15, - "name": "Fund Source For Loan", - "glCode": "100002", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "description": "Desc", - "organizationRunningBalance": 118437, - } -] - -
-
- -   -
-
-

Retrieve GL Accounts Template

-

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:

-
glaccounts/template
-
glaccounts/template?type=1
-
- type is optional and integer value from 1 to 5.
-


1.Assets -
2.Liabilities -
3.Equity -
4.Income -
5.Expenses

-
-
- -GET https://DomainName/api/v1/glaccounts/template
-GET https://DomainName/api/v1/glaccounts/template?type=1 -
- -{ - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "accountTypeOptions": [ - { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - { - "id": 2, - "code": "accountType.liability", - "value": "LIABILITY" - }, - { - "id": 3, - "code": "accountType.equity", - "value": "EQUITY" - }, - { - "id": 4, - "code": "accountType.income", - "value": "INCOME" - }, - { - "id": 5, - "code": "accountType.expense", - "value": "EXPENSE" - } - ], - "usageOptions": [ - { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - { - "id": 2, - "code": "accountUsage.header", - "value": "HEADER" - } - ], - "assetHeaderAccountOptions": [ - { - "id": 1, - "name": "Two wheeler loan", - "glCode": "10001", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 2, - "code": "accountUsage.header", - "value": "HEADER" - }, - "nameDecorated": "Two wheeler loan", - "tagId": { - "id": 10, - "name": "asset tag" - } - }, - { - "id": 2, - "name": "VEHICLE LOAN", - "parentId": 1, - "glCode": "10002", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 2, - "code": "accountUsage.header", - "value": "HEADER" - }, - "nameDecorated": "....VEHICLE LOAN", - "tagId": { - "id": 10, - "name": "asset tag" - } - } - ], - "liabilityHeaderAccountOptions": [ - { - "id": 15, - "name": "liabilitieschild", - "glCode": "ltchild", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 2, - "code": "accountType.liability", - "value": "LIABILITY" - }, - "usage": { - "id": 2, - "code": "accountUsage.header", - "value": "HEADER" - }, - "nameDecorated": "liabilitieschild", - "tagId": { - "id": 11, - "name": "liability tag" - } - } - ], - "equityHeaderAccountOptions": [ - { - "id": 13, - "name": "testajax", - "glCode": "12345678", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 3, - "code": "accountType.equity", - "value": "EQUITY" - }, - "usage": { - "id": 2, - "code": "accountUsage.header", - "value": "HEADER" - }, - "nameDecorated": "testajax", - "tagId": { - "id": 12, - "name": "Equity tag" - } - } - ], - "expenseHeaderAccountOptions": [ - { - "id": 8, - "name": "Salary", - "glCode": "450098", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 5, - "code": "accountType.expense", - "value": "EXPENSE" - }, - "usage": { - "id": 2, - "code": "accountUsage.header", - "value": "HEADER" - }, - "nameDecorated": "Salary", - "tagId": { - "id": 14, - "name": "Expenses Tag" - } - } - ], - "allowedAssetsTagOptions": [ - { - "id": 10, - "name": "asset tag", - "position": 0 - } - ], - "allowedLiabilitiesTagOptions": [ - { - "id": 11, - "name": "liability tag", - "position": 0 - } - ], - "allowedEquityTagOptions": [ - { - "id": 12, - "name": "Equity tag", - "position": 0 - } - ], - "allowedIncomeTagOptions": [ - { - "id": 13, - "name": "Income Tag", - "position": 0 - } - ], - "allowedExpensesTagOptions": [ - { - "id": 14, - "name": "Expenses Tag", - "position": 0 - } - ] -} - +   +
+
+

List Loan Products

+

Example Requests:

+
loanproducts
+
+
+
loanproducts?fields=name,description,interestRateFrequencyType,amortizationType
- - -   -
-
-

Retrieve a General Ledger Account

-

Example Requests:

-
glaccounts/1
-
-
-
glaccounts/1?template=true
-
-
-
glaccounts/1?fields=name,glCode
-
-
-
glaccounts/1?fetchRunningBalance=true
-
-
- -GET https://DomainName/api/v1/glaccounts/{glaccountsId} - - -{ - "id": 1, - "name": "Cash", - "glCode": "100001", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset1", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "description": "Desc", - "organizationRunningBalance": 118437, -} - -
-
- -   -
-
-

Create a General Ledger Account

-

- Note: You may optionally - create Hierarchical Chart of Accounts by using the "parentId" - property of an Account
-

- - - - - - - -
Mandatory Fields
name, glCode, type, usage and manualEntriesAllowed -
-
-
- -POST https://DomainName/api/v1/glaccounts - - -POST glaccounts -Content-Type: application/json -Request Body: -{ - "name": "Cash at Bangalore", - "glCode": "100017", - "manualEntriesAllowed": true, - "type": 1, - "tagId": "10", - "parentId": "18", - "usage": 1, - "description": "Cash at Bangalore Branch" -} - - -{ - "resourceId": 22 -} - -
-
- -   -
-
-

Update a General Ledger Account

-
-
- -PUT https://DomainName/api/v1/glaccounts/{glaccountId} - - -PUT glaccounts/22 -Content-Type: application/json -Request Body: -{ - "name": "Cash at Bangalore rural" -} - - -{ - "resourceId": 22, - "changes": { - "name": "Cash at Bangalore rural" - } -} - -
-
- -PUT glaccounts/1 -Content-Type: application/json -Request Body: -{ - "disabled": true -} - - -{ - "resourceId": 1, - "changes": { - "disabled": true - } -} - -
-
- -   -
-
-

Delete a General Ledger Account

-

- Note: Only Ledger Accounts against which no transactions have been logged - (either manually or by the loan or Savings portfolio) can be deleted. -

-
-
- -DELETE https://DomainName/api/v1/glaccounts/{glaccountId} - - -DELETE glaccounts/1 -Content-Type: application/json -No Request Body: - - -{ - "resourceId": 1, - "changes": {} -} - -
-
- -   -
-
-

Accounting Closure

-

An accounting closure indicates that no more journal - entries may be logged (or reversed) in the system, - either manually or via the portfolio with an entry date - prior to the defined closure date -

- - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
closingDate
The date for which the - accounting closure is defined
officeId
The identifer of the branch for - which accounting has been closed
comments
Description associated with an - Accounting closure
-
-
- -   -
-
-

List Accounting closures

-

Example Requests:

-
glclosures
-
-
-
-
- -GET https://DomainName/api/v1/glclosures - - -[ - { - "id": 7, - "officeId": 1, - "officeName": "Head Office", - "closingDate": [ - 2013, - 1, - 2 - ], - "deleted": false, - "createdDate": [ - 2013, - 1, - 3 - ], - "lastUpdatedDate": [ - 2013, - 1, - 3 - ], - "createdByUserId": 1, - "createdByUsername": "mifos", - "lastUpdatedByUserId": 1, - "lastUpdatedByUsername": "mifos", - "comments": "closed", - }, - { - "id": 6, - "officeId": 1, - "officeName": "Head Office", - "closingDate": [ - 2012, - 12, - 13 - ], - "deleted": false, - "createdDate": [ - 2012, - 12, - 14 - ], - "lastUpdatedDate": [ - 2012, - 12, - 14 - ], - "createdByUserId": 1, - "createdByUsername": "mifos", - "lastUpdatedByUserId": 1, - "lastUpdatedByUsername": "mifos", - "comments": "hello", - } -] - -
-
- -   -
-
-

Retrieve an Accounting Closure

-

Example Requests:

-
glclosures/1
-
-
-
/glclosures/1?fields=officeName,closingDate
-
-
- -GET https://DomainName/api/v1/glclosures/{glclosureId} - - -{ - "id": 7, - "officeId": 1, - "officeName": "Head Office", - "closingDate": [ - 2013, - 1, - 2 - ], - "deleted": false, - "createdDate": [ - 2013, - 1, - 3 - ], - "lastUpdatedDate": [ - 2013, - 1, - 3 - ], - "createdByUserId": 1, - "createdByUsername": "mifos", - "lastUpdatedByUserId": 1, - "lastUpdatedByUsername": "mifos", - "comments": "closed", -} - -
-
- -   -
-
-

Create an Accounting Closure

- - - - - - - -
Mandatory Fields
officeId,closingDate -
-
-
- -POST https://DomainName/api/v1/glclosures - - -POST glclosures -Content-Type: application/json -Request Body: -{ - "officeId": 1, - "closingDate": "06 December 2012", - "comments": "The accountants are heading for a carribean vacation", - "locale": "en" , - "dateFormat": "dd MMMM yyyy" -} - - -{ - "officeId": 1, - "resourceId": 9 -} - -
-
- -   -
-
-

Update an Accounting closure

-

Once an accounting closure is created, only the comments associated with it may be edited -

-
-
- -PUT https://DomainName/api/v1/glclosures/{glclosureId} - - -PUT glclosures/1 -Content-Type: application/json -Request Body: -{ - "comments": "All transactions verified by Johnny Cash" -} - - -{ - "officeId": 1, - "resourceId": 1, - "changes": { - "comments": "All transactions verified by Johnny Cash" - } -} - -
-
- -   -
-
-

Delete an accounting closure

-

- Note: Only the latest accounting closure - associated with a branch may be deleted. -

-
-
- -DELETE https://DomainName/api/v1/glclosures/{glclosureId} - - -DELETE glclosures/1 -Content-Type: application/json -No Request Body: - - -{ - "officeId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

Journal Entries

-

A journal entry refers to the logging of - transactions against general ledger accounts. A journal - entry may consist of several line items, each of which is either a "debit" or a "credit". The total amount of the - debits must equal the total amount of the credits or the - journal entry is said to be "unbalanced"

- A journal entry directly changes the account balances on - the general ledger -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
officeId
The identifier of the office ( - cost center) at which the financial activity - occured
currencyCode
A three letter ISO code of currency.
glAccountId
The identifier of the account ( - Ledger Account) against which this journal entry - was made -
transactionDate
The target date for which this - entry was recorded
amount
The Monetary amount associated - with this entry -
comments
A description associated with - this entry
entryType
Either a Credit(1) or a Debit(2)
transactionId
A unique Identifier for a set - of related Credit and Debit entries that make up - a "balanced" jounral Entry. For a manual entry, - this feild is a unique string.
- For a system generated entry, the combination - of transactionId and entityId is unique -
manualEntry
Flag determines if an entry is - generated by the portfolio (posted automatically by - the system during the lifecycle of loan or saving - products) or manually created by using the Create (Balanced) Journal - Entries API -
reversed
Flag determines if this manual - journal entry has been reversed using the Reverse a Journal Entry - API.
- Note: A journal entry is reversed by logging debits - for all credits that make up the Journal entry and - vice-versa -
referenceNumber
An additional field that is used to store additional information about the entry (Ex: chequeNo) -
accountingRule
Denotes the accounting rule id for posting journal entries. -
officeRunningBalance
Describes office balance after the journal entry for the Ledger Account. -
organizationRunningBalance
Describes complete organization balances after the journal entry for the Ledger Account. -
runningBalanceComputed
Describes whether account balances computed for the journal entry. -
transactionDetails
Additional details of transaction like payment details and notes . -
paymentTypeId
Maps to a Code value of a system defined Code with the name "PaymentType". This is used to optionally identify the mode of payment (Ex: checks, Cash etc) associated with a Journal Entry -
accountNumber, checkNumber, routingCode, receiptNumber, bankNumber
Various properties associated with a payment type -
-
+
+ + GET https://DomainName/api/v1/loanproducts + + + [ + { + "id": 1, + "name": "personal loan product", + "shortName": "pe1", + "includeInBorrowerCycle": false, + "useBorrowerCycle": false, + "startDate": [ + 2013, + 9, + 2 + ], + "closeDate": [ + 2014, + 2, + 7 + ], + "status": "loanProduct.active", + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "principal": 10000.000000, + "minPrincipal": 5000.000000, + "maxPrincipal": 15000.000000, + "numberOfRepayments": 10, + "minNumberOfRepayments": 5, + "maxNumberOfRepayments": 15, + "repaymentEvery": 7, + "repaymentFrequencyType": { + "id": 0, + "code": "repaymentFrequency.periodFrequencyType.days", + "value": "Days" + }, + "interestRatePerPeriod": 15.000000, + "interestRateFrequencyType": { + "id": 3, + "code": "interestRateFrequency.periodFrequencyType.years", + "value": "Per year" + }, + "annualInterestRate": 15.000000, + "amortizationType": { + "id": 1, + "code": "amortizationType.equal.installments", + "value": "Equal installments" + }, + "interestType": { + "id": 1, + "code": "interestType.flat", + "value": "Flat" + }, + "interestCalculationPeriodType": { + "id": 1, + "code": "interestCalculationPeriodType.same.as.repayment.period", + "value": "Same as repayment period" + }, + "transactionProcessingStrategyCode": "mifos-standard-strategy", + "transactionProcessingStrategyName": "Mifos style", + "principalVariationsForBorrowerCycle": [], + "interestRateVariationsForBorrowerCycle": [], + "numberOfRepaymentVariationsForBorrowerCycle": [], + "daysInMonthType": { + "id": 30, + "code": "DaysInMonthType.days360", + "value": "30 Days" + }, + "daysInYearType": { + "id": 360, + "code": "DaysInYearType.days360", + "value": "360 Days" + }, + "isInterestRecalculationEnabled": true, + "interestRecalculationData": { + "id": 3, + "productId": 1, + "interestRecalculationCompoundingType": { + "id": 2, + "code": "interestRecalculationCompoundingMethod.fee", + "value": "Fee" + }, + "recalculationCompoundingFrequencyType": { + "id":1, + "code":"interestRecalculationFrequencyType.same.as.repayment.period", + "value":"Same as repayment period" + }, + "rescheduleStrategyType": { + "id": 2, + "code": "loanRescheduleStrategyMethod.reduce.number.of.installments", + "value": "Reduce number of installments" + }, + "recalculationRestFrequencyType": { + "id":1, + "code":"interestRecalculationFrequencyType.same.as.repayment.period", + "value":"Same as repayment period" + }, + "preClosureInterestCalculationStrategy": { + "id":1, + "code":"loanPreClosureInterestCalculationStrategy.tillPreClosureDate", + "value":"Till preclose Date" + }, + "isArrearsBasedOnOriginalSchedule" : true + }, + "accountingRule": { + "id": 2, + "code": "accountingRuleType.cash", + "value": "CASH BASED" + }, + "principalThresholdForLastInstalment":0 + } + ] +
+
-   -
-
-

List Journal Entries

-

The list capability of journal entries can support pagination and sorting.

-
Optional Arguments
-
-
offset
-
- Integer optional, defaults to 0 -
-
Indicates from what result to start from.
- -
limit
-
- Integer optional, defaults to 200 -
-
Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- -
orderBy
-
- String optional, one of displayName, accountNo, officeId, officeName -
-
Orders the results by the field indicated.
- -
sortBy
-
- String optional, one of ASC, DESC -
-
Indicates what way to order results if orderBy is used.
- -
officeId
-
- Integer optional -
-
Provides ability to restrict list of centers returned based on the office there associated with.
- -
glAccountId
-
- Integer optional -
-
manualEntriesOnly
-
- Boolean optional -
-
Flag determines if only manually created journal entries - are to be returned( journal entries created by - the system during lifecycle of loan or saving - products etc shall be excluded) -
- Set to "false" by default if not passed in explicity -
-
fromDate
-
- Dateoptional -
-
Filters for Journal entries whose entry Date - is greater than or equal to the passed in Date -
-
toDate
-
- Date optional -
-
Filters for Journal entries whose entry Date - is lesser than or equal to the passed in Date -
-
transactionId
-
- String optional -
-
transactionDetails
-
- Boolean optional -
-
Flag determines if additional transactional details - to be returned(like payment details and notes). -
-
runningBalance
-
- Boolean optional -
-
Flag determines whether running balances - to be returned -
-
loanId
-
- Integer optional -
-
Provides ability to restrict journal entries based on the loan they are associated with -
-
savingsId
-
- Integer optional -
-
Provides ability to restrict journal entries based on the savings account they are associated with -
-
-

Example Requests:

-
journalentries
-
-
journalentries?transactionId=PB37X8Y21EQUY4S
-
-
journalentries?officeId=1&manualEntriesOnly=true&fromDate=1 July 2013&toDate=15 July 2013&dateFormat=dd MMMM yyyy&locale=en
-
-
journalentries?fields=officeName,glAccountName,transactionDate
-
-
journalentries?offset=10&limit=50
-
-
journalentries?orderBy=transactionId&sortOrder=DESC
-
-
journalentries?runningBalance=true
-
-
journalentries?transactionDetails=true
-
-
journalentries?loanId=12
-
-
journalentries?savingsId=24
-
-
- -GET https://DomainName/api/v1/journalentries?transactionId=PB37X8Y21EQUY4S - - -{ - "totalFilteredRecords": 24, - "pageItems": [ - { - "id": 1, - "officeId": 1, - "officeName": "Head Office", - "glAccountName": "ACCOUNT_NAME_WTYRB", - "glAccountId": 98, - "glAccountCode": "ASSET_C01367768735188", - "glAccountType": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "transactionDate": [ - 2011, - 3, - 4 - ], - "entryType": { - "id": 2, - "code": "journalEntrytType.debit", - "value": "DEBIT" - }, - "amount": 10000, - "transactionId": "33", - "manualEntry": false, - "entityType": { - "id": 1, - "code": "productType.loan", - "value": "LOAN" - }, - "entityId": 7, - "createdByUserId": 1, - "createdDate": [ - 2013, - 5, - 5 - ], - "createdByUserName": "mifos", - "reversed": false, - }, - { - "id": 2, - "officeId": 1, - "officeName": "Head Office", - "glAccountName": "ACCOUNT_NAME_WTYRB", - "glAccountId": 98, - "glAccountCode": "ASSET_C01367768735188", - "glAccountType": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "transactionDate": [ - 2011, - 3, - 4 - ], - "entryType": { - "id": 1, - "code": "journalEntryType.credit", - "value": "CREDIT" - }, - "amount": 10000, - "transactionId": "33", - "manualEntry": false, - "entityType": { - "id": 1, - "code": "productType.loan", - "value": "LOAN" - }, - "entityId": 7, - "createdByUserId": 1, - "createdDate": [ - 2013, - 5, - 5 - ], - "createdByUserName": "mifos", - "reversed": false, - - } - ] -} - -
+   +
+
+

Retrieve Loan Product Details Template

+

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:

+
loanproducts/template
- -   -
-
-

Create "Balanced" Journal Entries

-

- Note: A Balanced (simple) Journal entry would - have atleast one "Debit" and one "Credit" entry whose - amounts are equal
- Compound Journal entries may have "n" debits and "m" - credits where both "m" and "n" are greater than 0 - and the net sum or all debits and credits are equal -
-

- - - - - - - - - - - - - - - - - - - - - - -
Mandatory Fields
officeId, transactionDate -
credits
Details of the credits contained - in the journal entry. Each credit entry contains - the following items
- glAccountId: Identifier of the general ledger - account against which the credit entry shall be - made
- amount: Amount of money credited -
- comments: Optional description associated with - a credit entry - . -
debits
Details of the debits contained - in the journal entry. Each debit entry contains the - following items
- glAccountId: Identifier of the general ledger account - against which the debit entry shall be - made
- amount: Amount of money debited -
- comments: Optional description associated with - a debit entry - . -
-
- - - - - - - -
Optional Fields
paymentTypeId, accountNumber, checkNumber, routingCode, receiptNumber, bankNumber
-
-
- -POST https://DomainName/api/v1/journalentries - - -POST journalentries -Content-Type: application/json -Request Body: -{ -"officeId": 1, -"transactionDate": "06 December 2012", -"comments": "Gifts for staff", -"locale": "en" , -"currencyCode": "USD", -"dateFormat": "dd MMMM yyyy", -"credits":[{"glAccountId":1, - "amount":5000}, - {"glAccountId":2, - "amount":5000} - ], -"debits":[{"glAccountId":3, - "amount":5000}, - {"glAccountId":4, - "amount":5000} - ], -"paymentTypeId": "12", -"accountNumber": "accno123", -"checkNumber": "chec123", -"routingCode": "rou123", -"receiptNumber": "rec123", -"bankNumber": "ban123" -} - - -{ - "officeId": 1, - "transactionId": "DNEEMS2LPD0NJ9O" -} - - -POST https://DomainName/api/v1/journalentries - - -POST journalentries -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "officeId": "1", - "transactionDate": "23 May 2013", - "referenceNumber": "547", - "currencyCode": "USD", - "comments": "asdf", - "accountingRule": "2", - "amount": "547" -} - - -{ - "officeId":1, - "transactionId":"RS9MCISID4WK1ZM" -} - - -POST https://DomainName/api/v1/journalentries - - -POST journalentries -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "officeId": "1", - "transactionDate": "23 May 2013", - "referenceNumber": "547", - "comments": "asdf", - "accountingRule": "2", - "credits":[{"glAccountId":1, - "amount":5000}, - {"glAccountId":2, - "amount":5000} - ], - "debits":[{"glAccountId":3, - "amount":5000}, - {"glAccountId":4, - "amount":5000} - ] -} - - -{ - "officeId":1, - "transactionId":"RS9MCISID4WK1ZM" -} - - -POST https://DomainName/api/v1/journalentries - - -POST journalentries -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "officeId": "1", - "transactionDate": "23 May 2013", - "referenceNumber": "547", - "comments": "asdf", - "accountingRule": "3", - "credits":[{"glAccountId":1, - "amount":5000}, - {"glAccountId":2, - "amount":5000} - ], - "amount": "10000" -} - - -{ - "officeId":1, - "transactionId":"RS9MCISID4WK1ZM" -} +
+ + GET https://DomainName/api/v1/loanproducts/template + + + { + "includeInBorrowerCycle": false, + "useBorrowerCycle": false, + "currency": { + "code": "", + "name": "", + "decimalPlaces": 0, + "inMultiplesOf": 0, + "displaySymbol": "", + "nameCode": "", + "displayLabel": " []" + }, + "repaymentFrequencyType": { + "id": 2, + "code": "repaymentFrequency.periodFrequencyType.months", + "value": "Months" + }, + "interestRateFrequencyType": { + "id": 2, + "code": "interestRateFrequency.periodFrequencyType.months", + "value": "Per month" + }, + "amortizationType": { + "id": 1, + "code": "amortizationType.equal.installments", + "value": "Equal installments" + }, + "interestType": { + "id": 0, + "code": "interestType.declining.balance", + "value": "Declining Balance" + }, + "interestCalculationPeriodType": { + "id": 1, + "code": "interestCalculationPeriodType.same.as.repayment.period", + "value": "Same as repayment period" + }, + "principalVariationsForBorrowerCycle": [], + "interestRateVariationsForBorrowerCycle": [], + "numberOfRepaymentVariationsForBorrowerCycle": [], + "accountingRule": { + "id": 1, + "code": "accountingRuleType.none", + "value": "NONE" + }, + "daysInMonthType": { + "id": 1, + "code": "DaysInMonthType.actual", + "value": "Actual" + }, + "daysInYearType": { + "id": 1, + "code": "DaysInYearType.actual", + "value": "Actual" + }, + "isInterestRecalculationEnabled": false, + "interestRecalculationData": { + "interestRecalculationCompoundingType": { + "id": 0, + "code": "interestRecalculationCompoundingMethod.none", + "value": "None" + }, + "rescheduleStrategyType": { + "id": 3, + "code": "loanRescheduleStrategyMethod.reduce.emi.amount", + "value": "Reduce EMI amount" + },"preClosureInterestCalculationStrategy": { + "id":1, + "code":"loanPreClosureInterestCalculationStrategy.tillPreClosureDate", + "value":"Till preclose Date" + } + }, + "paymentTypeOptions": [ + { + "id": 10, + "name": "check", + "position": 1 + } + ], + "currencyOptions": [ + { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + ], + "repaymentFrequencyTypeOptions": [ + { + "id": 0, + "code": "repaymentFrequency.periodFrequencyType.days", + "value": "Days" + }, + { + "id": 1, + "code": "repaymentFrequency.periodFrequencyType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "repaymentFrequency.periodFrequencyType.months", + "value": "Months" + } + ], + "preClosureInterestCalculationStrategyOptions": [ + { + "id":1, + "code":"loanPreClosureInterestCalculationStrategy.tillPreClosureDate", + "value":"Till preclose Date" + }, + { + "id":2, + "code":"loanPreClosureInterestCalculationStrategy.tillRestFrequencyDate", + "value":"Till rest Frequency Date" + } + ], + "interestRateFrequencyTypeOptions": [ + { + "id": 2, + "code": "interestRateFrequency.periodFrequencyType.months", + "value": "Per month" + }, + { + "id": 3, + "code": "interestRateFrequency.periodFrequencyType.years", + "value": "Per year" + } + ], + "amortizationTypeOptions": [ + { + "id": 1, + "code": "amortizationType.equal.installments", + "value": "Equal installments" + }, + { + "id": 0, + "code": "amortizationType.equal.principal", + "value": "Equal principal payments" + } + ], + "interestTypeOptions": [ + { + "id": 1, + "code": "interestType.flat", + "value": "Flat" + }, + { + "id": 0, + "code": "interestType.declining.balance", + "value": "Declining Balance" + } + ], + "interestCalculationPeriodTypeOptions": [ + { + "id": 0, + "code": "interestCalculationPeriodType.daily", + "value": "Daily" + }, + { + "id": 1, + "code": "interestCalculationPeriodType.same.as.repayment.period", + "value": "Same as repayment period" + } + ], + "transactionProcessingStrategyOptions": [ + { + "id": 1, + "code": "mifos-standard-strategy", + "name": "Penalties, Fees, Interest, Principal order" + }, + { + "id": 2, + "code": "heavensfamily-strategy", + "name": "HeavensFamily Unique" + }, + { + "id": 3, + "code": "creocore-strategy", + "name": "Creocore Unique" + }, + { + "id": 4, + "code": "rbi-india-strategy", + "name": "Overdue/Due Fee/Int,Principal" + }, + { + "id": 5, + "code": "principal-interest-penalties-fees-order-strategy", + "name": "Principal Interest Penalties Fees Order" + }, + { + "id": 6, + "code": "interest-principal-penalties-fees-order-strategy", + "name": "Interest Principal Penalties Fees Order" + } + ], + "chargeOptions": [ + { + "id": 5, + "name": "des charge", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100.000000, + "chargeTimeType": { + "id": 1, + "code": "chargeTimeType.disbursement", + "value": "Disbursement" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + }, + { + "id": 1, + "name": "flat install", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 50.000000, + "chargeTimeType": { + "id": 8, + "code": "chargeTimeType.instalmentFee", + "value": "Instalment Fee" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + }, + { + "id": 9, + "name": "install amt+int", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 5.000000, + "chargeTimeType": { + "id": 8, + "code": "chargeTimeType.instalmentFee", + "value": "Instalment Fee" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + "chargeCalculationType": { + "id": 3, + "code": "chargeCalculationType.percent.of.amount.and.interest", + "value": "% Loan Amount + Interest" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + }, + { + "id": 10, + "name": "install int", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 5.000000, + "chargeTimeType": { + "id": 8, + "code": "chargeTimeType.instalmentFee", + "value": "Instalment Fee" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + "chargeCalculationType": { + "id": 4, + "code": "chargeCalculationType.percent.of.interest", + "value": "% Interest" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + }, + { + "id": 2, + "name": "install per", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 5.000000, + "chargeTimeType": { + "id": 8, + "code": "chargeTimeType.instalmentFee", + "value": "Instalment Fee" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + "chargeCalculationType": { + "id": 2, + "code": "chargeCalculationType.percent.of.amount", + "value": "% Amount" + }, + "chargePaymentMode": { + "id": 1, + "code": "chargepaymentmode.accounttransfer", + "value": "Account transfer" + } + }, + { + "id": 8, + "name": "spe int", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 5.000000, + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + "chargeCalculationType": { + "id": 4, + "code": "chargeCalculationType.percent.of.interest", + "value": "% Interest" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + }, + { + "id": 4, + "name": "specific acc transfer", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100.000000, + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 1, + "code": "chargepaymentmode.accounttransfer", + "value": "Account transfer" + } + }, + { + "id": 7, + "name": "specific amt+int", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 5.000000, + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + "chargeCalculationType": { + "id": 3, + "code": "chargeCalculationType.percent.of.amount.and.interest", + "value": "% Loan Amount + Interest" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + }, + { + "id": 3, + "name": "specific per", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 5.000000, + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + "chargeCalculationType": { + "id": 2, + "code": "chargeCalculationType.percent.of.amount", + "value": "% Amount" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + }, + { + "id": 6, + "name": "xyz", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 50.000000, + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 1, + "code": "chargepaymentmode.accounttransfer", + "value": "Account transfer" + } + } + ], + "accountingRuleOptions": [ + { + "id": 1, + "code": "accountingRuleType.none", + "value": "NONE" + }, + { + "id": 2, + "code": "accountingRuleType.cash", + "value": "CASH BASED" + }, + { + "id": 3, + "code": "accountingRuleType.accrual", + "value": "ACCRUAL BASED" + } + ], + "accountingMappingOptions": { + "liabilityAccountOptions": [ + { + "id": 11, + "name": "over payment", + "glCode": "13", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 2, + "code": "accountType.liability", + "value": "LIABILITY" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "over payment", + "tagId": { + "id": 0 + }, + "organizationRunningBalance": 0 + }, + ], + "assetAccountOptions": [ + { + "id": 1, + "name": "fund source", + "glCode": "01", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "fund source", + "tagId": { + "id": 0 + }, + "organizationRunningBalance": -60000 + }, + { + "id": 2, + "name": "Loan portfolio", + "glCode": "02", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "Loan portfolio", + "tagId": { + "id": 0 + }, + "organizationRunningBalance": 60000 + }, + { + "id": 3, + "name": "transfers", + "glCode": "03", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "transfers", + "tagId": { + "id": 0 + }, + "organizationRunningBalance": 0 + }, + ], + "expenseAccountOptions": [ + { + "id": 10, + "name": "loans written off 2", + "glCode": "12", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 5, + "code": "accountType.expense", + "value": "EXPENSE" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "loans written off 2", + "tagId": { + "id": 0 + }, + "organizationRunningBalance": 0 + } + ], + "incomeAccountOptions": [ + { + "id": 4, + "name": "income from interest", + "glCode": "04", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 4, + "code": "accountType.income", + "value": "INCOME" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "income from interest", + "tagId": { + "id": 0 + }, + "organizationRunningBalance": 19 + }, + { + "id": 8, + "name": "income from fees 2", + "glCode": "10", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 4, + "code": "accountType.income", + "value": "INCOME" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "income from fees 2", + "tagId": { + "id": 0 + }, + "organizationRunningBalance": 0 + }, + { + "id": 9, + "name": "income from penalities 2", + "glCode": "11", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 4, + "code": "accountType.income", + "value": "INCOME" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "income from penalities 2", + "tagId": { + "id": 0 + }, + "organizationRunningBalance": 0 + } + ] + }, + "valueConditionTypeOptions": [ + { + "id": 2, + "code": "LoanProductValueConditionType.equal", + "value": "equals" + }, + { + "id": 3, + "code": "LoanProductValueConditionType.greterthan", + "value": "greter than" + } + ], + "daysInMonthTypeOptions": [{ + "id": 1, + "code": "DaysInMonthType.actual", + "value": "Actual" + }, + { + "id": 30, + "code": "DaysInMonthType.days360", + "value": "30 Days" + }], + "daysInYearTypeOptions": [{ + "id": 1, + "code": "DaysInYearType.actual", + "value": "Actual" + }, + { + "id": 360, + "code": "DaysInYearType.days360", + "value": "360 Days" + }, + { + "id": 364, + "code": "DaysInYearType.days364", + "value": "364 Days" + }, + { + "id": 365, + "code": "DaysInYearType.days365", + "value": "365 Days" + }], + "interestRecalculationCompoundingTypeOptions": [{ + "id": 0, + "code": "interestRecalculationCompoundingMethod.none", + "value": "None" + }, + { + "id": 2, + "code": "interestRecalculationCompoundingMethod.fee", + "value": "Fee" + }, + { + "id": 1, + "code": "interestRecalculationCompoundingMethod.interest", + "value": "Interest" + }, + { + "id": 3, + "code": "interestRecalculationCompoundingMethod.interest.and.fee", + "value": "Fee and Interest" + }], + "rescheduleStrategyTypeOptions": [{ + "id": 3, + "code": "loanRescheduleStrategyMethod.reduce.emi.amount", + "value": "Reduce EMI amount" + }, + { + "id": 2, + "code": "loanRescheduleStrategyMethod.reduce.number.of.installments", + "value": "Reduce number of installments" + }, + { + "id": 1, + "code": "loanRescheduleStrategyMethod.reschedule.next.repayments", + "value": "Reschedule next repayments" + }], + "interestRecalculationFrequencyTypeOptions": [ + { + "id":1, + "code":"interestRecalculationFrequencyType.same.as.repayment.period", + "value":"Same as repayment period" + }, + { + "id":2, + "code":"interestRecalculationFrequencyType.daily", + "value":"Daily" + }, + { + "id":3, + "code":"interestRecalculationFrequencyType.weekly", + "value":"Weekly" + }, + { + "id":4, + "code":"interestRecalculationFrequencyType.monthly", + "value":"Monthly" + }] + } + +
+
+ +   +
+
+

Retrieve a Loan Product

+

Example Requests:

+
loanproducts/1
+
+
+
loanproducts/1?template=true
+
+
+
loanproducts/1?fields=name,description,numberOfRepayments
+
+
+ + GET https://DomainName/api/v1/loanproducts/{productId} + + + { + "id": 11, + "name": "advanced accounting", + "shortName": "ad11", + "includeInBorrowerCycle": true, + "useBorrowerCycle": true, + "status": "loanProduct.active", + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "principal": 10000.000000, + "minPrincipal": 2000.000000, + "maxPrincipal": 15000.000000, + "numberOfRepayments": 7, + "repaymentEvery": 7, + "repaymentFrequencyType": { + "id": 0, + "code": "repaymentFrequency.periodFrequencyType.days", + "value": "Days" + }, + "interestRatePerPeriod": 5.000000, + "interestRateFrequencyType": { + "id": 2, + "code": "interestRateFrequency.periodFrequencyType.months", + "value": "Per month" + }, + "annualInterestRate": 60.000000, + "amortizationType": { + "id": 1, + "code": "amortizationType.equal.installments", + "value": "Equal installments" + }, + "interestType": { + "id": 0, + "code": "interestType.declining.balance", + "value": "Declining Balance" + }, + "interestCalculationPeriodType": { + "id": 1, + "code": "interestCalculationPeriodType.same.as.repayment.period", + "value": "Same as repayment period" + }, + "transactionProcessingStrategyCode": "mifos-standard-strategy", + "transactionProcessingStrategyName": "Mifos style", + "charges": [], + "principalVariationsForBorrowerCycle": [ + { + "id": 21, + "borrowerCycleNumber": 1, + "paramType": { + "id": 1, + "code": "LoanProductParamType.principal", + "value": "principal" + }, + "valueConditionType": { + "id": 2, + "code": "LoanProductValueConditionType.equal", + "value": "equals" + }, + "minValue": 2000.000000, + "maxValue": 20000.000000, + "defaultValue": 15000.000000 + }, + { + "id": 20, + "borrowerCycleNumber": 1, + "paramType": { + "id": 1, + "code": "LoanProductParamType.principal", + "value": "principal" + }, + "valueConditionType": { + "id": 3, + "code": "LoanProductValueConditionType.greterthan", + "value": "greter than" + }, + "minValue": 3000.000000, + "maxValue": 25000.000000, + "defaultValue": 20000.000000 + } + ], + "interestRateVariationsForBorrowerCycle": [], + "numberOfRepaymentVariationsForBorrowerCycle": [], + "accountingRule": { + "id": 2, + "code": "accountingRuleType.cash", + "value": "CASH BASED" + }, + "accountingMappings": { + "fundSourceAccount": { + "id": 1, + "name": "fund source", + "glCode": "01" + }, + "loanPortfolioAccount": { + "id": 2, + "name": "Loan portfolio", + "glCode": "02" + }, + "transfersInSuspenseAccount": { + "id": 3, + "name": "transfers", + "glCode": "03" + }, + "interestOnLoanAccount": { + "id": 4, + "name": "income from interest", + "glCode": "04" + }, + "incomeFromFeeAccount": { + "id": 8, + "name": "income from fees 2", + "glCode": "10" + }, + "incomeFromPenaltyAccount": { + "id": 9, + "name": "income from penalities 2", + "glCode": "11" + }, + "writeOffAccount": { + "id": 10, + "name": "loans written off 2", + "glCode": "12" + }, + "overpaymentLiabilityAccount": { + "id": 11, + "name": "over payment", + "glCode": "13" + } + }, + "paymentChannelToFundSourceMappings": [ + { + "paymentType": { + "id": 10, + "name": "check" + }, + "fundSourceAccount": { + "id": 1, + "name": "fund source", + "glCode": "01" + } + } + ], + "feeToIncomeAccountMappings": [ + { + "charge": { + "id": 1, + "name": "flat install", + "active": false, + "penalty": false + }, + "incomeAccount": { + "id": 8, + "name": "income from fees 2", + "glCode": "10" + } + }, + { + "charge": { + "id": 2, + "name": "install per", + "active": false, + "penalty": false + }, + "incomeAccount": { + "id": 4, + "name": "income from interest", + "glCode": "04" + } + }, + { + "charge": { + "id": 5, + "name": "des charge", + "active": false, + "penalty": false + }, + "incomeAccount": { + "id": 9, + "name": "income from penalities 2", + "glCode": "11" + } + }, + "multiDisburseLoan":true,"maxTrancheCount":3,"outstandingLoanBalance":36000.000000, + "overdueDaysForNPA":2, + "principalThresholdForLastInstalment":50 + ] + } + +
+
+ +   +
+
+

Create a Loan Product

+

Depending of the Accounting Rule (accountingRule) selected, + additional fields with details of the appropriate Ledger Account + identifiers would need to be passed in. +

+ +

Refer + MifosX Accounting Specs Draft for more details regarding the + significance of the selected accounting rule +

+ + + + + + + + +
+
Mandatory Fields
+
name, shortName, currencyCode, digitsAfterDecimal, inMultiplesOf, principal, + numberOfRepayments, repaymentEvery, repaymentFrequencyType, + interestRatePerPeriod, interestRateFrequencyType, amortizationType, interestType, + interestCalculationPeriodType, transactionProcessingStrategyCode, + accountingRule, isInterestRecalculationEnabled, daysInYearType, daysInMonthType +
+ + + + + + + +
+
Optional Fields
+
inArrearsTolerance, graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, + graceOnArrearsAgeing, charges, paymentChannelToFundSourceMappings, + feeToIncomeAccountMappings, penaltyToIncomeAccountMappings, includeInBorrowerCycle, + useBorrowerCycle,principalVariationsForBorrowerCycle, + numberOfRepaymentVariationsForBorrowerCycle, + interestRateVariationsForBorrowerCycle, + multiDisburseLoan,maxTrancheCount, + outstandingLoanBalance,overdueDaysForNPA,holdGuaranteeFunds, + principalThresholdForLastInstalment, accountMovesOutOfNPAOnlyOnArrearsCompletion, + canDefineInstallmentAmount, installmentAmountInMultiplesOf, allowAttributeOverrides, + allowPartialPeriodInterestCalculation, rates +
+ + + + + + + +
+
Additional Mandatory Fields for Cash(2) based accounting
+
fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, + incomeFromFeeAccountId, incomeFromPenaltyAccountId, + writeOffAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId +
+ + + + + + + +
+
Additional Mandatory Fields for periodic (3) and upfront + (4)accrual accounting +
+
fundSourceAccountId, loanPortfolioAccountId, interestOnLoanAccountId, + incomeFromFeeAccountId, incomeFromPenaltyAccountId, + writeOffAccountId, receivableInterestAccountId, receivableFeeAccountId, + receivablePenaltyAccountId, transfersInSuspenseAccountId, overpaymentLiabilityAccountId +
+ + + + + + + +
+
Additional Mandatory Fields if interest recalculation is + enabled(true) +
+
interestRecalculationCompoundingMethod, rescheduleStrategyMethod, + recalculationRestFrequencyType +
+ + + + + + + +
+
Additional Optional Fields if interest recalculation is + enabled(true) +
+
isArrearsBasedOnOriginalSchedule, preClosureInterestCalculationStrategy
+ + + + + + + +
+
Additional Optional Fields if interest recalculation is + enabled(true) and recalculationRestFrequencyType is not same as repayment period +
+
recalculationRestFrequencyInterval, recalculationRestFrequencyDate
+ + + + + + + +
+
Additional Optional Fields if interest recalculation is + enabled(true) and interestRecalculationCompoundingMethod is enabled +
+
recalculationCompoundingFrequencyType
+ + + + + + + +
+
Additional Optional Fields if interest recalculation is + enabled(true) and interestRecalculationCompoundingMethod is enabled and + recalculationCompoundingFrequencyType is not same as repayment period +
+
recalculationCompoundingFrequencyInterval, recalculationCompoundingFrequencyDate
+ + + + + + + +
+
Additional Mandatory Fields if Hold Guarantee funds is + enabled(true) +
+
mandatoryGuarantee
+ + + + + + + +
+
Additional Optional Fields if Hold Guarantee funds is + enabled(true) +
+
minimumGuaranteeFromOwnFunds,minimumGuaranteeFromGuarantor
+
+
+ + POST https://DomainName/api/v1/loanproducts + + + POST loanproducts + Content-Type: application/json + Request Body: + {"currencyCode":"USD", + "includeInBorrowerCycle":"true", + "useBorrowerCycle":true, + "digitsAfterDecimal":"2", + "inMultiplesOf":"0", + "repaymentFrequencyType":0, + "interestRateFrequencyType":2, + "amortizationType":1, + "interestType":0, + "interestCalculationPeriodType":1, + "transactionProcessingStrategyCode":"mifos-standard-strategy", + "principalVariationsForBorrowerCycle":[], + "interestRateVariationsForBorrowerCycle":[], + "numberOfRepaymentVariationsForBorrowerCycle":[ + { + "valueConditionType":2, + "borrowerCycleNumber":"1", + "minValue":"5", + "defaultValue":"10", + "maxValue":"15" + }, + { + "valueConditionType":3, + "borrowerCycleNumber":"1", + "minValue":"7", + "defaultValue":"15", + "maxValue":"20" + } + ], + "allowAttributeOverrides": + {amortizationType : true, + interestType : true, + transactionProcessingStrategyCode : false, + interestCalculationPeriodType : true, + inArrearsTolerance : false, + repaymentEvery : true, + graceOnPrincipalAndInterestPayment : true, + graceOnArrearsAgeing : true}, + + "accountingRule":"2", + "name":"product 5", + "shortName":"prd5", + "principal":"5000", + "numberOfRepayments":"7", + "repaymentEvery":"7", + "interestRatePerPeriod":"5", + "paymentChannelToFundSourceMappings":[], + "feeToIncomeAccountMappings":[], + "penaltyToIncomeAccountMappings":[], + "charges":[], + "overdueDaysForNPA":2, + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "fundSourceAccountId":1, + "loanPortfolioAccountId":2, + "transfersInSuspenseAccountId":3, + "interestOnLoanAccountId":4, + "incomeFromFeeAccountId":8, + "incomeFromPenaltyAccountId":9, + "writeOffAccountId":10, + "overpaymentLiabilityAccountId":11, + "daysInMonthType":1, + "daysInYearType":1, + "isInterestRecalculationEnabled":"false", + "holdGuaranteeFunds":"false", + "principalThresholdForLastInstallment":20 + } + + + { + "resourceId": 1 + } + + + POST loanproducts + Content-Type: application/json + Request Body: + { + "name": "LP Cash Accounting", + "shortName": "LPCA", + "currencyCode": "USD", + "locale": "en_GB", + "digitsAfterDecimal": "2", + "inMultiplesOf": 0, + "principal": "100,000.00", + "numberOfRepayments": "12", + "repaymentEvery": "1", + "repaymentFrequencyType": 2, + "transactionProcessingStrategyCode": "mifos-standard-strategy", + "interestRatePerPeriod": "1.75", + "interestRateFrequencyType": 2, + "amortizationType": 1, + "interestType": 0, + "interestCalculationPeriodType": 1, + "daysInMonthType":1, + "daysInYearType":1, + "isInterestRecalculationEnabled":"true", + "interestRecalculationCompoundingMethod":"0", + "rescheduleStrategyMethod":"3", + "recalculationRestFrequencyType":"1", + "preClosureInterestCalculationStrategy":1, + "accountingRule":"2", + "fundSourceAccountId":"4", + "loanPortfolioAccountId":"8", + "interestOnLoanAccountId":"34", + "incomeFromFeeAccountId":"37", + "incomeFromPenaltyAccountId":"35", + "writeOffAccountId":"41", + "transfersInSuspenseAccountId":"4", + "overpaymentLiabilityAccountId":"2", + "paymentChannelToFundSourceMappings": [ + { + "paymentTypeId": "11", + "fundSourceAccountId": "11" + } + ], + "feeToIncomeAccountMappings": [ + { + "chargeId": "1", + "incomeAccountId": "5" + }, + { + "chargeId": "2", + "incomeAccountId": "8" + } + ], + "penaltyToIncomeAccountMappings": [ + { + "chargeId": "6", + "incomeAccountId": "9" + } + ] + + } + + + { + "resourceId": 2 + } + + + POST loanproducts + Content-Type: application/json + Request Body: + { + "name": "LP Accrual Accounting", + "shortName": "LPAA", + "currencyCode": "USD", + "locale": "en_GB", + "digitsAfterDecimal": "2", + "inMultiplesOf": 0, + "principal": "100,000.00", + "numberOfRepayments": "12", + "repaymentEvery": "1", + "repaymentFrequencyType": 2, + "transactionProcessingStrategyCode": "mifos-standard-strategy", + "interestRatePerPeriod": "1.75", + "interestRateFrequencyType": 2, + "amortizationType": 1, + "interestType": 0, + "interestCalculationPeriodType": 1, + "daysInMonthType":1, + "daysInYearType":1, + "isInterestRecalculationEnabled":"false", + "accountingRule":"3", + "fundSourceAccountId":"4", + "loanPortfolioAccountId":"8", + "receivableInterestAccountId":"9", + "receivableFeeAccountId":"11", + "receivablePenaltyAccountId":"10", + "interestOnLoanAccountId":"34", + "incomeFromFeeAccountId":"37", + "incomeFromPenaltyAccountId":"35", + "overpaymentLiabilityAccountId":"2", + "writeOffAccountId":"41" + } + + + { + "resourceId": 3 + } + + +
+
+ +   +
+
+

Update a Loan Product

+
+
+ + PUT https://DomainName/api/v1/loanproducts/{loanId} + + + PUT loanproducts/1 + Content-Type: application/json + Request Body: + { + "locale": "en_GB", + "principal": "70,000.00" + } + + + { + "resourceId": 1, + "changes": { + "principal": 70000, + "locale": "en_GB" + } + } + + + PUT loanproducts/3 + Content-Type: application/json + Request Body: + { + "locale": "en", + "isInterestRecalculationEnabled":"true", + "interestRecalculationCompoundingMethod":"0", + "rescheduleStrategyMethod":"3", + "recalculationRestFrequencyType":"1" + } + + + { + "resourceId": 1, + "changes": { + "locale": "en", + "isInterestRecalculationEnabled":"true", + "interestRecalculationCompoundingMethod":"0", + "rescheduleStrategyMethod":"3", + "recalculationRestFrequencyType":"1" + } + } + +
+
+ + + +   +
+
+

Loan Products Mix

+

If you have the appropriate permissions, you can decide which types of products a given client or + group can mix. In this way, you can restrict clients from having active loans accounts of different + products at the same time.

+ + + + + + + + + + + +
+
Field Descriptions
+
restrictedProducts
List of productIds to create a product mix
+
+
+ +   +
+
+

List Loan Product Mix

+

Example Requests:

+
loanproducts?associations=productMixes
+
+
+ + GET https://DomainName/api/v1/loanproducts?associations=productMixes + + + [ + { + "productId": 1, + "productName": "Personal Loan", + "restrictedProducts": [ + { + "id": 2, + "name": "Joint Loan", + "includeInBorrowerCycle": false + }, + { + "id": 5, + "name": "Primary Loan", + "includeInBorrowerCycle": false + }, + { + "id": 3, + "name": "Daily Loan", + "includeInBorrowerCycle": false + } + ], + "allowedProducts": [ + { + "id": 1, + "name": "Personal Loan", + "includeInBorrowerCycle": false + }, + { + "id": 6, + "name": "Personal Loan -2", + "includeInBorrowerCycle": false + }, + { + "id": 4, + "name": "Weekly Loan", + "includeInBorrowerCycle": false + } + ] + }, + { + "productId": 2, + "productName": "Joint Loan", + "restrictedProducts": [ + { + "id": 1, + "name": "Personal Loan", + "includeInBorrowerCycle": false + }, + { + "id": 6, + "name": "Personal Loan -2", + "includeInBorrowerCycle": false + } + ], + "allowedProducts": [ + { + "id": 3, + "name": "Daily Loan", + "includeInBorrowerCycle": false + }, + { + "id": 2, + "name": "Joint Loan", + "includeInBorrowerCycle": false + }, + { + "id": 5, + "name": "Primary Loan", + "includeInBorrowerCycle": false + }, + { + "id": 4, + "name": "Weekly Loan", + "includeInBorrowerCycle": false + } + ] + } + ] + +
+
+ +   +
+
+

Retrieve Product Mix Details Template

+

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:

+

This request gets all the products details for which productmix is not defined.

+
+
loanproducts/template?isProductMixTemplate=true
+

+

This request gets the productmix details for the specific loanproduct.

+
+
loanproducts/5/productmix
+
+
loanproducts/5/productmix?template=true
+ +
+
+ + GET https://DomainName/api/v1/loanproducts/template?isProductMixTemplate=true + + + { + "productOptions": [ + { + "id": 5, + "name": "Primary Loan" + }, + { + "id": 4, + "name": "Weekly Loan" + } + ] + } + + + GET https://DomainName/api/v1/loanproducts/5/productmix + + + { + "restrictedProducts": [ + { + "id": 1, + "name": "Personal Loan", + "includeInBorrowerCycle": false + } + ], + "allowedProducts": [ + { + "id": 3, + "name": "Daily Loan", + "includeInBorrowerCycle": false + }, + { + "id": 2, + "name": "Joint Loan", + "includeInBorrowerCycle": false + }, + { + "id": 6, + "name": "Personal Loan -2", + "includeInBorrowerCycle": false + }, + { + "id": 5, + "name": "Primary Loan", + "includeInBorrowerCycle": false + }, + { + "id": 4, + "name": "Weekly Loan", + "includeInBorrowerCycle": false + } + ] + } + +
+
+ +   +
+
+

Retrieve Loan Product Mix

+

Example Requests:

+
loanproducts/5/productmix
+
+
+ + GET https://DomainName/api/v1/loanproducts/5/productmix + + + { + "restrictedProducts": [ + { + "id": 1, + "name": "Personal Loan", + "includeInBorrowerCycle": false + } + ], + "allowedProducts": [ + { + "id": 3, + "name": "Daily Loan", + "includeInBorrowerCycle": false + }, + { + "id": 2, + "name": "Joint Loan", + "includeInBorrowerCycle": false + }, + { + "id": 6, + "name": "Personal Loan -2", + "includeInBorrowerCycle": false + }, + { + "id": 5, + "name": "Primary Loan", + "includeInBorrowerCycle": false + }, + { + "id": 4, + "name": "Weekly Loan", + "includeInBorrowerCycle": false + } + ] + } + +
+
+ +   +
+
+

Create a Loan Product Mix

+ + + + + + + + +
+
Mandatory Fields
+
restrictedProducts
+
+
+ + POST https://DomainName/api/v1/loanproducts/5/productmix + + + POST loanproducts/{productId}/productmix + Content-Type: application/json + Request Body: + {"restrictedProducts":["1"]} + + + { + "changes":{ + "restrictedProductsForMix":[1], + "removedProductsForMix":[] + }, + "productId":5 + } + +
+
+ +   +
+
+

Update a Loan Product Mix

+
+
+ + PUT https://DomainName/api/v1/loanproducts/{productId}/productmix + + + PUT loanproducts/5/productmix + Content-Type: application/json + Request Body: + { + "restrictedProducts":["3"] + } + + + { + "changes": { + "restrictedProductsForMix": [3], + "removedProductsForMix": [1] + }, + "productId": 5 + } + +
+
+ +   +
+
+

Delete a Loan Product Mix

+
+
+ + DELETE https://DomainName/api/v1/loanproducts/{productId}/productmix + + + DELETE loanproducts/5/productmix + + + { + "changes": { + "removedProductsForMix": [3] + }, + "productId": 5 + } + +
+
+ + + +   +
+
+

Holidays

+

Some MFI's span large regions where different branch offices might observe different holidays. They + need the ability to define holidays for specific branch offices and be able to set the repayment + rule to follow during those holidays. +

+

+ The reschedule of repayments to repaymentsRescheduledTo date during defined holidays is + turned on/off by enabling/disabling reschedule-repayments-on-holidays in Global configurations. +

+

Allow Repayment transactions on a defined holidays is turned on/off by enabling/disabling + allow-transactions-on-holiday in Global configurations. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
name
Name of the holiday. +
fromDate
The date on holiday begins. +
toDate
The date on holiday ends. +
repaymentsRescheduledTo
Date to which repayments will be rescheduled when repayments date falls on a + defined holiday. e.g. A holiday is defined on 25th of October 2013 with + repaymentsRescheduledTo date to 26th of October 2013 and any loans with repayments date on + 25th of October 2013 will be rescheduled to 26th of October 2013. +
officeId
The officeId represents the office to which holiday is applied. +
+
+
+ +   +
+
+

List Holidays

+

Example Requests:

+
holidays?officeId=1
+
+
+
+
+ + GET https://DomainName/api/v1/holidays?officeId=1 + + + [ + { + "id": 1, + "name": "Good Friday", + "fromDate": [ + 2013, + 10, + 25 + ], + "toDate": [ + 2013, + 10, + 25 + ], + "repaymentsScheduleTo": [ + 2013, + 10, + 26 + ], + "status": { + "id": 100, + "code": "holidayStatusType.pending.for.activation", + "value": "Pending for activation" + } + } + ] + +
+
+ +   +
+
+

Create a Holiday

+ + + + + + + +
+
Mandatory Fields
+
name, description, fromDate, toDate, repaymentsRescheduledTo, offices
+
+
+ + POST https://DomainName/api/v1/holidays + + + POST holidays + Content-Type: application/json + Request Body: + { + "name": "Good Friday", + "description": "Good Friday", + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "fromDate": "25 October 2013", + "toDate": "25 October 2013", + "repaymentsRescheduledTo": "26 October 2013", + "offices": [ + {"officeId":"1"}, + {"officeId":"2"} + ] + } + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

Activate a Holiday

+

Always Holidays are created in pending state. This API allows to activate a holiday.

+

Only the active holidays are considered for rescheduling the loan repayment.

+
+
+ + POST https://DomainName/api/v1/holidays/{holidayId}?command=activate + + + POST holidays + Content-Type: application/json + Request Body: + { + } + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

Retrieve a Holiday

+

Example Requests:

+
holidays/1
+
+
+
+ + GET https://DomainName/api/v1/holidays/{holidayId} + + + { + "id": 1, + "name": "Good Friday", + "fromDate": [ + 2013, + 10, + 25 + ], + "toDate": [ + 2013, + 10, + 25 + ], + "repaymentsRescheduledTo": [ + 2013, + 10, + 26 + ], + "status": { + "id": 100, + "code": "holidayStatusType.active", + "value": "Active" + } + } + +
+
+ +   +
+
+

Update a Holiday

+

If a holiday is in pending state (created and not activated) then all fields are allowed to modify. + Once holidays become active only name and descriptions are allowed to modify.

+
+
+ + PUT https://DomainName/api/v1/holidays/{holidayId} + + + PUT holidays/1 + Content-Type: application/json + Request Body: + { + name:"Independence day", + description: "Holiday for Independence day celebration" + } + + + { + "resourceId": 1, + "changes": { + "name": "Independence day", + "description": "Holiday for Independence day celebration" + } + } + +
+
+ +   +
+
+

Delete a Holiday

+

This API allows to delete a holiday. This is a soft delete the deleted holiday status is marked as + deleted.

+
+
+ + DELETE https://DomainName/api/v1/holidays/{holidayId} + + + DELETE holidays/1 + Content-Type: application/json + Request Body: + { + } + + + { + "resourceId": 1 + } + +
+
+ + + +   +
+
+

Working days

+

The days of the week that are workdays. +

+

+ Rescheduling of repayments when it falls on a non-working is turned on /off by enable/disable + reschedule-future-repayments parameter in Global configurations. +

+

+ Allow transactions on non-working days is configurable by enabling/disbaling the + allow-transactions-on-non_workingday parameter in Global + configurations. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Mandotory Field Descriptions
+
recurrence
Recurrence pattern
repaymentRescheduleType
repayment reschedule type .Options listed on the schedule for repayments on + non-working days +
extendTermForDailyRepayments
Extend the term for loans following a daily repayment schedule.Expects + boolean value true/false +
locale
locale must be provided.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Schedule for repayments on non-working day
+
Same day
The repayments schedule for same day regardless of it's a non-working day. +
Next workday
The repayments reschedule to next working day. e.g. if a repayment falls on + a non-working day will be rescheduled to next available working day. +
Previous workday
The repayments reschedule to previous working day. e.g. if a repayment falls + on a non-working day will be rescheduled to previous available working day. +
Next scheduled meeting
The repayments reschduled to next scheduled meeting. +
+
+
+   +
+
+

Working Days Template

+

This is a convenience resource. It can be useful when + building maintenance user interface screens for working days. +

+

Example Request:

+
workingdays/template
+
+
+ + GET https://DomainName/api/v1/workingdays/template + + + { + "repaymentRescheduleOptions": [ + { + "id": 1, + "code": "RepaymentRescheduleType.same.day", + "value": "same day" + }, + { + "id": 4, + "code": "RepaymentRescheduleType.move.to.previous.working.day", + "value": "move to previous working day" + }, + { + "id": 3, + "code": "RepaymentRescheduleType.move.to.next.repayment.meeting.day", + "value": "move to next repayment meeting day" + }, + { + "id": 2, + "code": "RepaymentRescheduleType.move.to.next.working.day", + "value": "move to next working day" + } + ] + } + +
+
+   +
+
+

List Working days

+

Example Requests:

+
workingdays
+
+
+
+
+ + GET https://DomainName/api/v1/workingdays + + + [ + { + "id": 1, + "recurrence": "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR", + "repaymentRescheduleType": { + "id": 4, + "code": "RepaymentRescheduleType.move.to.next.working.day", + "value": "move to next working day" + } + "extendTermForDailyRepayments" : true + } + ] + +
+
+   +
+
+

Update a Working Day

+ + + + + + + +
+
Mandatory Fields
+
recurrence,repaymentRescheduleType,extendTermForDailyRepayments,locale
+
+
+ + PUT https://DomainName/api/v1/Workingdays/1 + + + PUT holidays + Content-Type: application/json + Request Body: + { + "recurrence": "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,TU,WE,TH,SU", + "locale": "en", + "repaymentsRescheduledType": 4, + "extendTermForDailyRepayments": false + } + + + { + "resourceId": 1 + } + +
+
+ + + + +   +
+
+

Currency

+

Application related configuration around viewing/updating + the currencies permitted for use within the MFI.

+
+
+ +   +
+
+

Retrieve Currency Configuration

+

Returns the list of currencies permitted for use AND the + list of currencies not selected (but available for selection).

+

Example Requests:

+
currencies
+
+
+
currencies?fields=selectedCurrencyOptions
+
+
+ + GET https://DomainName/api/v1/currencies + + + { + "selectedCurrencyOptions": [ + { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + ], + "currencyOptions": [ + { + "code": "AFN", + "name": "Afghanistan Afghani", + "decimalPlaces": 2, + "nameCode": "currency.AFN", + "displayLabel": "Afghanistan Afghani [AFN]" + }, + { + "code": "ALL", + "name": "Albanian Lek", + "decimalPlaces": 2, + "nameCode": "currency.ALL", + "displayLabel": "Albanian Lek [ALL]" + }, + { + "code": "ZWD", + "name": "Zimbabwe Dollar", + "decimalPlaces": 2, + "nameCode": "currency.ZWD", + "displayLabel": "Zimbabwe Dollar [ZWD]" + } + ] + } + +
+
+ +   +
+
+

Update Currency Configuration

+

Updates the list of currencies permitted for use.

+
+
+ + PUT https://DomainName/api/v1/currencies + + + PUT currencies + Content-Type: application/json + Request Body: + { + "currencies": [ + "KES", + "BND", + "LBP", + "GHC", + "USD", + "XOF", + "AED", + "AMD" + ] + } + + + { + "currencies": [ + "KES", + "BND", + "LBP", + "GHC", + "USD", + "XOF", + "AED", + "AMD" + ] + } + +
+
+ +   +
+
+

Global Configuration

+

Global configuration related to set of supported enable/disable configurations:

+
    +
  1. maker-checker - defaults to false - if true turns on maker-checker functionality
  2. +
  3. reschedule-future-repayments - defaults to false - if true reschedules repayemnts which + falls on a non-working day to configured repayment rescheduling + rule
  4. +
  5. allow-transactions-on-non_workingday - defaults to false - if true allows transactions on + non-working days +
  6. +
  7. reschedule-repayments-on-holidays - defaults to false - if true reschedules repayemnts + which falls on a non-working day to defined reschedule date
  8. +
  9. allow-transactions-on-holiday - defaults to false - if true allows transactions on holidays
  10. +
  11. savings-interest-posting-current-period-end - Set it at the database level before any + savings interest is posted. When set as false(default), interest will be posted on the first + date of next period. If set as true, interest will be posted on last date of current period. + There is no difference in the interest amount posted. +
  12. +
  13. financial-year-beginning-month - Set it at the database level before any savings interest + is posted. Allowed values 1 - 12 (January - December). Interest posting periods are evaluated + based on this configuration. +
  14. +
  15. meetings-mandatory-for-jlg-loans - if set to true, enforces all JLG loans to follow a + meeting schedule belonging to either the parent group or Center. +
  16. +
  17. max-login-retry-attempts - defaults to 5 - when enabled, limits failed login attempts and + locks the user after N failed attempts. +
  18. +
+
+
+ +   +
+
+

Retrieve Global Configuration

+

Returns the list global enable/disable configurations.

+

Example Requests:

+
configurations
+
+
+ + GET https://DomainName/api/v1/configurations + + + { + "globalConfiguration": [ + { + "name": "maker-checker", + "enabled": true, + "value": 0, + "id": 1 + }, + { + "name": "amazon-S3", + "enabled": false, + "value": 0, + "id": 2 + }, + ] + } + +
+
+ +   +
+
+

Retrieve Global Configuration

+

Returns a global enable/disable configurations.

+

Example Requests:

+
configurations/1
+
+
+ + GET https://DomainName/api/v1/configurations/1 + + + { + "name": "maker-checker", + "enabled": true, + "value": 0, + "id": 1 + } + +
+
+ +   +
+
+

Retrieve Global Configuration for surveys

+

Returns the list global enable/disable survey configurations.

+

Example Requests:

+
configurations/survey
+
+
+ + GET https://DomainName/api/v1/configurations/survey + + + { + "ppi_kenya_2005": [ + { + "name": "maker-checker", + "enabled": true, + "value": 0, + "id": 1 + }, + { + "name": "ppi_tanzania_20012", + "enabled": false, + "value": 0, + "id": 2 + }, + ] + } + +
+
+ +   +
+
+

Update Global Configuration

+

Updates an enable/disable global configuration item.

+
+
+ + PUT https://DomainName/api/v1/configurations/9 + + + PUT configurations + Content-Type: application/json + Request Body: { + "enabled":"true", + "value":2 + + } + + + { + "resourceId": 9, + "changes": { + "enabled": true + } + } +
+
+ +   +
+
+

Cache

+

The following settings are possible for cache: +

    +
  • No Caching: caching turned off
  • +
  • Single node: caching on for single instance deployments of platorm (works for multiple + tenants but only one tomcat) +
  • +
+

+

By default caching is set to No Caching. Switching between caches results in the cache been + clear e.g. from Single node to No cache and back again would clear down the single + node cache.

+
+
+ +   +
+
+

Retrieve Cache Types

+

Returns the list of caches.

+

Example Requests:

+
caches
+
+
+ + GET https://DomainName/api/v1/caches + + + [ + { + "cacheType": { + "id": 1, + "code": "cacheType.noCache", + "value": "No cache" + }, + "enabled": true + }, + { + "cacheType": { + "id": 2, + "code": "cacheType.singleNode", + "value": "Single node" + }, + "enabled": false + }, + { + "cacheType": { + "id": 3, + "code": "cacheType.multiNode", + "value": "Multi node" + }, + "enabled": false + } + ] + +
+
+ +   +
+
+

Switch Cache

+

Switches the cache to chosen one.

+
+
+ + PUT https://DomainName/api/v1/caches + + + PUT caches + Content-Type: application/json + Request Body: + { + "cacheType": 2 + } + + + { + "changes": { + "cacheType": 2 + } + } + +
+
+   +
+
+

Hooks

+

Hooks are a mechanism to trigger custom code on the occurence of events.

+

Each template during hook creation represents custom behaviour on what actions should be taken on the + triggering of a registered event for a hook. The action taken might be firing a HTTP request to + another server or execute internal code. +

+

In order for MifosX to send webhook payloads, your server needs to be accessible from the Internet. + MifosX will send along a few HTTP headers to differentiate between event types.

+

X-Mifos-Entity - The entity type that was triggered.
+ X-Mifos-Action - The action triggered on the entity type.
+ X-Mifos-Platform-TenantId - The tenant which experienced the event.

+
+
+ +   +
+
+

Create a Hook

+

The following parameters can be passed for the creation of a hook :- +

    +
  • name - string - Required. The name of the template that is being called. (See /hooks/template + for the list of valid hook names.) +
  • +
  • isActive - boolean - Determines whether the hook is actually triggered.
  • +
  • events - array - Determines what events the hook is triggered for. +
  • +
  • config - hash - Required. Key/value pairs to provide settings for this hook. These settings + vary between the templates. +
  • +
  • templateId - Optional. The UGD template ID associated with the same entity (client or loan). +
  • +

      +
+
+ + POST https://DomainName/api/v1/hooks + + + POST hooks + Content-Type: application/json + Request Body: + { + "name": "Web", + "isActive": true, + "displayName": "Kremlin", + "templateId": 1, + "events": [ + { + "actionName": "DISBURSE", + "entityName": "LOAN" + }, + { + "actionName": "REPAYMENT", + "entityName": "LOAN" + } + ], + "config": { + "Payload URL": "http://example.com/webhook", + "Content Type": "json" + } + } + + + { + "resourceId": 4 + } + +
+
+ +   +
+
+

Retrieve Hooks

+

Returns the list of hooks.

+

Example Requests:

+
hooks
+
+
+ + GET https://DomainName/api/v1/hooks + + + [ + { + "id": 1, + "name": "Web", + "displayName": "Kremlin", + "isActive": true, + "createdAt": [2014, 9, 16], + "updatedAt": [2014, 9, 16], + "templateId": 1, + "templateName": "My UGD", + "events": [ + { + "actionName": "DISBURSE", + "entityName": "LOAN" + }, + { + "actionName": "REPAYMENT", + "entityName": "LOAN" + } + ], + "config": [ + { + "fieldName": "Content Type", + "fieldValue": "json" + }, + { + "fieldName": "Payload URL", + "fieldValue": "https://abc.com/api" + } + ] + } + ] + +
+
+ +   +
+
+

Retrieve a Hook

+

Returns the details of a Hook.

+

Example Requests:

+
hooks/1
+
+
+ + GET https://DomainName/api/v1/hooks/{hookId} + + + { + "id": 1, + "name": "Web", + "displayName": "Kremlin", + "isActive": true, + "createdAt": [2014, 9, 16], + "updatedAt": [2014, 9, 16], + "templateId": 1, + "templateName": "My UGD", + "events": [ + { + "actionName": "DISBURSE", + "entityName": "LOAN" + }, + { + "actionName": "REPAYMENT", + "entityName": "LOAN" + } + ], + "config": [ + { + "fieldName": "Content Type", + "fieldValue": "json" + }, + { + "fieldName": "Payload URL", + "fieldValue": "https://abc.com/api" + } + ] + } + +
+
+ +   +
+
+

Update a Hook

+

Updates the details of a hook.

+
+
+ + PUT https://DomainName/api/v1/hooks/{hookId} + + + PUT hooks/4 + Content-Type: application/json + Request Body: + { + "name": "Web", + "isActive": true, + "displayName": "Local SMS Provider", + "events": [ + { + "actionName": "DISBURSE", + "entityName": "LOAN" + } + ], + "config": { + "Payload URL": "http://changed.com/sms", + "Content Type": "json" + } + } + + + { + "resourceId": 4, + "changes": { + "displayName": "Local SMS Provider", + "events": [ + { + "actionName": "DISBURSE", + "entityName": "LOAN" + } + ], + "config": { + "Payload URL": "http://changed.com/sms", + "Content Type": "json" + } + } + } + +
+
+ +   +
+
+

Delete a Hook

+

Deletes a hook.

+
+
+ + DELETE https://DomainName/api/v1/hooks/{hookId} + + + DELETE hooks/4 + Content-Type: application/json + + + { + "resourceId": 4 + } + +
+
+ +   +
+
+

Retrieve Hooks Template

+

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:

+
hooks/template
+
+
+ + GET https://DomainName/api/v1/hooks/template + + + { + "templates": [ + { + "name": "Web", + "schema": [ + { + "fieldName": "Content Type", + "fieldType": "string", + "optional": true, + "placeholder": "json / form" + }, + { + "fieldName": "Payload URL", + "fieldType": "string", + "optional": false + } + ] + }, + { + },... + ], + "groupings": [ + { + "name": "jobs", + "entities": [ + { + "name": "SCHEDULER", + "actions": ["EXECUTEJOB", "UPDATE"] + }, + { + },... + ] + }, + { + },... + ] + } + +
+
+ +   +
+
+

Codes

+

Code and code values: Codes represent a specific category of + data, their code values are a specific instance of that category.

+

+ Codes are mostly system defined which means the code itself + comes out of the box and cannot be modified however its code values + can be. e.g. 'Customer Identifier', it defaults to a code value of + 'Passport' but could be 'Drivers License, National Id' etc +

+

+
+ +   +
+
+

Create a Code

+

Creates a code. Codes created through api are always 'user + defined' and so system defined is marked as false.

+
+
+ + POST https://DomainName/api/v1/codes + + + POST codes + Content-Type: application/json + Request Body: + { + "name": "MyNewCode" + } + + + { + "resourceId": 4 + } + +
+
+ +   +
+
+

Retrieve Codes

+

Returns the list of codes.

+

Example Requests:

+
codes
+
+
+ + GET https://DomainName/api/v1/codes + + + [ + { + "id": 1, + "name": "Customer Identifier", + "systemDefined": true + }, + { + "id": 2, + "name": "Gender", + "systemDefined": true + }, + { + "id": 3, + "name": "Education", + "systemDefined": true + } + ] + +
+
+ +   +
+
+

Retrieve a Code

+

Returns the details of a Code.

+

Example Requests:

+
codes/1
+
+
+ + GET https://DomainName/api/v1/codes/{codeId} + + + { + "id": 1, + "name": "Customer Identifier", + "systemDefined": true + } + +
+
+ +   +
+
+

Update a Code

+

Updates the details of a code if it is not system defined.

+
+
+ + PUT https://DomainName/api/v1/codes/{codeId} + + + PUT codes/4 + Content-Type: application/json + Request Body: + { + "name": "MyNewCode(changed)" + } + + + { + "resourceId": 4, + "changes": { + "name": "MyNewCode(changed)" + } + } + +
+
+ +   +
+
+

Delete a Code

+

Deletes a code if it is not system defined.

+
+
+ + DELETE https://DomainName/api/v1/codes/{codeId} + + + DELETE codes/4 + Content-Type: application/json + + + { + "resourceId": 4 + } + +
+
+ + +   +
+
+

Code Values

+

Code and code values: Codes represent a specific category of + data, their code values are a specific instance of that category.

+

+ Codes are mostly system defined which means the code itself + comes out of the box and cannot be modified however its code values + can be. e.g. 'Customer Identifier', it defaults to a code value of + 'Passport' but could be 'Drivers License, National Id' etc +

+

+
+ +   +
+
+

Create a Code Value

+
+
+ + POST https://DomainName/api/v1/codes/1/codevalues + + + POST codes/1/codevalues + Content-Type: application/json + Request Body: + { + "name":"Ration Card", + "description: "Ration card information", + "position":"1" + } + + + { + "resourceId": 4 + } + +
+
+ +   +
+
+

List Code Values

+

Returns the list of Code Values for a given Code

+

Example Requests:

+
codes/1/codevalues
+
+
+ + GET https://DomainName/api/v1/codes/{codeId}/codevalues + + + [ + { + "id": 1, + "name": "Passport", + "description: "Passport information", + "position": 0 + }, + { + "id": 2, + "name": "Id", + "description: "ID information", + "position": 0 + }, + { + "id": 3, + "name": "Drivers License", + "description: "Drivers License information", + "position": 0 + }, + { + "id": 4, + "name": "Any Other Id Type", + "description: "Any Other Id Type information", + "position": 0 + }, + { + "id": 5, + "name": "Ration Card", + "description: "Ration Card information", + "position": 1 + } + ] + +
+
+ +   +
+
+

Retrieve a Code Value

+

Returns the details of a Code Value

+

Example Requests:

+
codes/1/codevalues/1
+
+
+ + GET https://DomainName/api/v1/codes/{codeId}/codevalues/{codevalueId} + + + { + "id": 1, + "name": "Passport", + "description: "Passport information", + "position": 0 + } + +
+
+ +   +
+
+

Update a Code Value

+

Updates the details of a code value.

+
+
+ + PUT https://DomainName/api/v1/codes/{codeId}/codevalues/{codevalueId} + + + PUT codes/1/codevalues/1 + Content-Type: application/json + Request Body: + { + "name": "Indian Passport", + "description": "Indian Passport information", + "position":2 + } + + + { + "resourceId": 1, + "changes": + { + "name": "Indian Passport", + "description": "Indian Passport information", + "position": 2 + } + } + +
+
+ +   +
+
+

Delete a Code Value

+

Deletes a code value

+
+
+ + DELETE https://DomainName/api/v1/codes/{codeId}/codevalues/{codevalueId} + + + DELETE codes/1/codevalues/5 + Content-Type: application/json + + + { + "resourceId": 5 + } + +
+
+ + + +   +
+
+

Audits

+

Every non-read Mifos API request is audited. A fully processed request can + not be changed or deleted. See maker checker api for situations where an audit is not + fully processed.

+ + Permissions: To search and look at audit entries a user needs to be attached to a role + that has one of the ALL_FUNCTIONS, ALL_FUNCTIONS_READ or READ_AUDIT permissions.

+ + Data Scope: A user can only see audits that are within their data scope. However, + 'head office' users can see all audits including those that aren't office/branch related + e.g. Loan Product changes. +

+

+
+ +   +
+
+

List Audits

+

Get a 200 list of audits that match the criteria supplied and sorted by audit id in descending order, + and are within the requestors' data scope. Also it supports pagination and sorting

+
Arguments
+
+
actionName
+
optional
+
Examples: CREATE, UPDATE, DISBURSE
+ +
entityName
+
optional
+
Examples: CLIENT, LOAN, FUND
+ +
resourceId
+
optional, + The id value of the entityName +
+ +
makerId
+
optional, + The id value of the application user creating the entry +
+ +
makerDateTimeFrom
+
optional, + Get entries created on or after this +
+
Example: 2013-04-10 08:00:00
+ +
makerDateTimeTo
+
optional, + Get entries created on or before this +
+
Example: 2013-05-10 08:00:00
+ +
checkerId
+
optional, + The id value of the application user that checked (approved) the entry +
+ +
checkerDateTimeFrom
+
optional, + Get entries checked on or after this +
+
Example: 2013-04-10 08:00:00
+ +
checkerDateTimeTo
+
optional, + Get entries checked on or before this +
+
Example: 2013-05-10 18:00:00
+ +
processingResult
+
optional, + The enum value of the processing status +
+
values:
+ 0: Invalid
+ 1: processed
+ 2: awaiting.approval
+ 3: rejected +
+ +
officeId
+
optional, + The id value of the office/branch associated with the entry (if there is one) +
+ +
groupId
+
optional, + The id value of the group associated with the entry (if there is one). + A group is a general idea and may be a Center, a Group, a Communal Bank or other. +
+ +
clientId
+
optional, + The id value of the client associated with the entry (if there is one) +
+ +
loanId
+
optional, + The id value of the loan associated with the entry (if there is one) +
+ +
savingsAccountId
+
optional, + The id value of the savings account associated with the entry (if there is one) +
+ +
includeJson
+
optional, + Values are true, false. Default is false. +
+
paged
+
+ Boolean optional, defaults to false +
+
If paged is true then results will be paginated.
+ +
offset
+
+ Integer optional, defaults to 0 +
+
Indicates from what result to start from.
+ +
limit
+
+ Integer optional, defaults to 200 +
+
Restricts the size of results returned. To override the default and return all entries you must + explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1 +
+ +
orderBy
+
+ String optional, one of id, actionName, entityName, resourceId, subresourceId, madeOnDate, checkedOnDate, officeName, groupName, clientName, loanAccountNo, savingsAccountNo +
+
Orders the results by the field indicated.
+ +
sortBy
+
+ String optional, one of ASC, DESC +
+
Indicates what way to order results if orderBy is used.
+ +
+

Example Requests:

+
audits
+
+
audits?fields=madeOnDate,maker,processingResult
+
+
audits?makerDateTimeFrom=2013-03-25 08:00:00&makerDateTimeTo=2013-04-04 18:00:00 +
+
+
audits?officeId=1
+
+
audits?officeId=1&includeJson=true
+
+
+ + GET https://DomainName/api/v1/audits + + + [ + { + "id": 671, + "actionName": "PERMISSIONS", + "entityName": "ROLE", + "resourceId": 6, + "maker": "keithwoodlock", + "madeOnDate": 1365014262000, + "processingResult": "processed" + }, + { + "id": 670, + "actionName": "CREATE", + "entityName": "CLIENTNOTE", + "resourceId": 287, + "maker": "keithwoodlock", + "madeOnDate": 1365014204000, + "processingResult": "awaiting.approval", + "officeName": "my office", + "clientName": "gg ggg" + }, + { + "id": 668, + "actionName": "UPDATE", + "entityName": "PERMISSION", + "maker": "keithwoodlock", + "madeOnDate": 1365014186000, + "processingResult": "processed" + }, + { + "id": 667, + "actionName": "CREATE", + "entityName": "CLIENTNOTE", + "resourceId": 286, + "maker": "keithwoodlock", + "madeOnDate": 1365014169000, + "processingResult": "processed", + "officeName": "my office name", + "clientName": "gg ggg" + }, + { + "id": 666, + "actionName": "CREATE", + "entityName": "CLIENT", + "resourceId": 363, + "maker": "keithwoodlock", + "madeOnDate": 1365012843000, + "processingResult": "awaiting.approval", + "officeName": "my office name" + }, + { + "id": 657, + "actionName": "CREATE", + "entityName": "CLIENT", + "resourceId": 362, + "maker": "ii", + "madeOnDate": 1364953928000, + "checker": "ii", + "checkedOnDate": 1365010060000, + "processingResult": "processed", + "officeName": "my office name", + "clientName": "gg ggg" + }, + { + "id": 645, + "actionName": "CREATE", + "entityName": "LOAN", + "resourceId": 373, + "maker": "keithwoodlock", + "madeOnDate": 1364860260000, + "checker": "keithwoodlock", + "checkedOnDate": 1364861222000, + "processingResult": "processed", + "officeName": "another office", + "clientName": "another client", + "loanAccountNo": "000000373" + },... + ] + + + GET https://DomainName/api/v1/audits?paged=true&limit=5 + + + { + "totalFilteredRecords": 30, + "pageItems": [ + { + "id": 671, + "actionName": "PERMISSIONS", + "entityName": "ROLE", + "resourceId": 6, + "maker": "keithwoodlock", + "madeOnDate": 1365014262000, + "processingResult": "processed" + }, + { + "id": 670, + "actionName": "CREATE", + "entityName": "CLIENTNOTE", + "resourceId": 287, + "maker": "keithwoodlock", + "madeOnDate": 1365014204000, + "processingResult": "awaiting.approval", + "officeName": "my office", + "clientName": "gg ggg" + }, + { + "id": 668, + "actionName": "UPDATE", + "entityName": "PERMISSION", + "maker": "keithwoodlock", + "madeOnDate": 1365014186000, + "processingResult": "processed" + }, + { + "id": 667, + "actionName": "CREATE", + "entityName": "CLIENTNOTE", + "resourceId": 286, + "maker": "keithwoodlock", + "madeOnDate": 1365014169000, + "processingResult": "processed", + "officeName": "my office name", + "clientName": "gg ggg" + }, + { + "id": 666, + "actionName": "CREATE", + "entityName": "CLIENT", + "resourceId": 363, + "maker": "keithwoodlock", + "madeOnDate": 1365012843000, + "processingResult": "awaiting.approval", + "officeName": "my office name" + } + ] + } + +
+
+ +   +
+
+

Audit Search Template

+

This is a convenience resource. It can be useful when + building an Audit Search UI. "appUsers" are data scoped to + the office/branch the requestor is associated with. +

+

Example Requests:

+
audits/searchtemplate
+
audits/searchtemplate?fields=actionNames
+
+
+ + GET https://DomainName/api/v1/audits/searchtemplate + + + { + "appUsers": [ + { + "id": 30, + "username": "user 1" + }, + { + "id": 28, + "username": "user 2" + }, + { + "id": 35, + "username": "user 3" + },... + ], + "actionNames": [ + "CREATE", + "DELETE", + "UPDATE", + "ACTIVATE", + "ADJUST", + "APPROVALUNDO", + "APPROVE", + "APPROVEINPAST", + "BULKREASSIGN", + "CALCULATEINTEREST", + "CLOSE", + "CLOSEASRESCHEDULED", + "CREATEHISTORIC", + "DEPOSIT", + "DEREGISTER", + "DISBURSALUNDO", + "DISBURSE", + "DISBURSEINPAST", + "INTEREST", + "PERMISSIONS", + "REGISTER", + "REJECT",... + ], + "entityNames": [ + "CALENDAR", + "CENTER", + "CHARGE", + "CLIENT", + "CLIENTIDENTIFIER", + "CLIENTIMAGE", + "CLIENTNOTE", + "CODE", + "CODEVALUE", + "COLLATERAL", + "CONFIGURATION", + "CURRENCY", + "DATATABLE", + "DEPOSITACCOUNT", + "DEPOSITNOTE", + "DEPOSITPRODUCT", + "DOCUMENT", + "FUND", + "GLACCOUNT", + "GLCLOSURE", + "GROUP", + "GROUPNOTE",... + ], + "processingResults": [ + { + "id": 0, + "processingResult": "invalid" + }, + { + "id": 1, + "processingResult": "processed" + }, + { + "id": 2, + "processingResult": "awaiting.approval" + }, + { + "id": 3, + "processingResult": "rejected" + } + ] + } + +
+
+ + +   +
+
+

Retrieve an Audit Entry

+

+

Example Requests:

+
audits/20
+
audits/20?fields=madeOnDate,maker,processingResult
+
+
+ + GET https://DomainName/api/v1/audits + + + { + "id": 20, + "actionName": "REPAYMENT", + "entityName": "LOAN", + "resourceId": 868, + "maker": "dataentry1", + "madeOnDate": 1358449025000, + "processingResult": "processed", + "commandAsJson": "{\"transactionDate\":\"28 September + 2012\",\"transactionAmount\":\"1,967.00\",\"locale\":\"en\",\"dateFormat\":\"dd MMMM yyyy\"}", + "officeName": "another office", + "clientName": "another client", + "loanAccountNo": "23" + } + +
+
+ + + +   +
+
+

Account number format

+

Account number preferences are used to describe custom formats for account numbers associated with + Customer, Loan and Savings accounts. +

+ + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
accountType
Identifies the type of the Account for which the Account number format + applies
+ Refer Retrieve + Account number formats Template for complete + details +
prefixType
Identifies a custom prefix for the account number +
+ Refer Retrieve + Account number formats Template for complete + details +
+
+
+ +   +
+
+

List Account number formats

+

Example Requests:

+
accountnumberformats
+
+
+
accountnumberformats?fields=accountType,prefixType
+
+
+ + GET https://DomainName/api/v1/accountnumberformats + + + [ + { + "id": 2, + "accountType": + { + "id": 1, + "code": "accountType.client", + "value": "CLIENT" + }, + "prefixType": + { + "id": 101, + "code": "accountNumberPrefixType.clientType", + "value": "CLIENT_TYPE" + } + }, + { + "id": 3, + "accountType": + { + "id": 2, + "code": "accountType.loan", + "value": "LOAN" + }, + "prefixType": + { + "id": 201, + "code": "accountNumberPrefixType.loanProductShortName", + "value": "LOAN_PRODUCT_SHORT_NAME" + } + } + ] + +
+
+ +   +
+
+

Retrieve Account number format Template

+

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:

+
accountnumberformats/template
+
+
+ + GET https://DomainName/api/v1/accountnumberformats/template + + + + + { + "accountTypeOptions": + [ + { + "id": 1, + "code": "accountType.client", + "value": "CLIENT" + }, + { + "id": 2, + "code": "accountType.loan", + "value": "LOAN" + }, + { + "id": 3, + "code": "accountType.savings", + "value": "SAVINGS" + }, + { + "id": 4, + "code": "accountType.center", + "value": "CENTER" + }, + { + "id": 5, + "code": "accountType.group", + "value": "GROUP" + } + ], + "prefixTypeOptions": + { + "accountType.loan": + [ + { + "id": 201, + "code": "accountNumberPrefixType.loanProductShortName", + "value": "LOAN_PRODUCT_SHORT_NAME" + }, + { + "id": 1, + "code": "accountNumberPrefixType.officeName", + "value": "OFFICE_NAME" + } + ], + "accountType.client": + [ + { + "id": 1, + "code": "accountNumberPrefixType.officeName", + "value": "OFFICE_NAME" + }, + { + "id": 101, + "code": "accountNumberPrefixType.clientType", + "value": "CLIENT_TYPE" + } + ], + "accountType.savings": + [ + { + "id": 301, + "code": "accountNumberPrefixType.savingsProductShortName", + "value": "SAVINGS_PRODUCT_SHORT_NAME" + }, + { + "id": 1, + "code": "accountNumberPrefixType.officeName", + "value": "OFFICE_NAME" + } + ], + "accountType.center": + [ + { + "id": 1, + "code": "accountNumberPrefixType.officeName", + "value": "OFFICE_NAME" + } + ], + "accountType.group": + [ + { + "id": 1, + "code": "accountNumberPrefixType.officeName", + "value": "OFFICE_NAME" + }, + ] + } + } + + + +
+
+ +   +
+
+

Retrieve an Account number format

+

Example Requests:

+
accountnumberformats/1
+
+
+
accountnumberformats/1?template=true
+
+
+
accountnumberformats/1?fields=accountType,prefixType
+
+
+ + GET https://DomainName/api/v1/accountnumberformats/{accountnumberformatId} + + + + { + "id": 2, + "accountType": + { + "id": 1, + "code": "accountType.client", + "value": "CLIENT" + }, + "prefixType": + { + "id": 101, + "code": "accountNumberPrefixType.clientType", + "value": "CLIENT_TYPE" + } + } + + +
+
+ +   +
+
+

Create an Account number format

+

+ Note: You may associate a single Account number format for a given account type
+

+ + + + + + + +
+
Mandatory Fields + for Account number formats +
+
accountType
+
+
+ + POST https://DomainName/api/v1/accountnumberformats + + + POST /accountnumberformats + Content-Type: application/json + Request Body: + { + accountType :1, + prefixType: 101 + } + + + { + "resourceId": 4 + } + + + + POST /accountnumberformats + Content-Type: application/json + Request Body: + { + accountType :2, + prefixType: 201 + } + + + { + "resourceId": 5 + } + +
+
+ +   +
+
+

Update an Account number format

+
+
+ + PUT https://DomainName/api/v1/accountnumberformats/{accountnumberformatId} + + + PUT accountnumberformats/2 + Content-Type: application/json + Request Body: + { + prefixType:1 + } + + + { + "resourceId": 2, + "changes": + { + "prefixType": "OFFICE_NAME" + } + } + + +
+
+ +   +
+
+

Delete an Account number format

+

+ Note: Account numbers created while this format was active would remain unchanged. +

+
+
+ + DELETE https://DomainName/api/v1/accountnumberformats/{accountnumberformatId} + + + DELETE accountnumberformats/2 + Content-Type: application/json + No Request Body: + + + { + "resourceId": 2 + } + + +
+
+ + +   +
+
+

Maker Checker (or 4-eye) functionality

+

Apache Fineract Maker Checker functionality allows an MFI to define transactions + as having a maker and a checker phase. One user enters, deletes or changes data. + Then, another user that has "Checker" rights for that transaction, can inspect + and approve the data. +

+ +

By default, Maker Checker functionality is disabled. + See Update Global Configuration to enable/disable + Maker Checker functionality at a global level. +

+ +

+ Additionally, Maker Checker functionality for each transaction (permission) is disabled by default. + see Enable/Disable Permissions for Maker Checker to enable/disable + Maker Checker functionality at a transaction (permission) level. +

+ +

+ Finally, to give checking rights to a user (via a role associated with the user) see + Update a Role's Permissions +

+

For example,
+ + { + "permissions":{ + "CREATE_GUARANTOR_CHECKER":true, + "CREATE_CLIENT_CHECKER":true + } + } +
+ will give checking rights for CREATE_GUARANTOR and CREATE_CLIENT

+

Alternatively, the special permissions ALL_FUNCTIONS or CHECKER_SUPER_USER will give blanket + checking rights. +

+

+ When a user "makes" an entry that is enabled for Maker Checker, it is audited and the audit status + is set to a value of 2 (awaiting.approval). +

+ + Checkers can only Check and approve entries that they have been permitted to check.

+ + Checkers can only Check and approve entries that are within their data scope. However, + 'head office' Checkers can Check and approve all entries + including those that aren't office/branch related (as long as they have the Checker permissions) + e.g. Loan Product changes. +

+

+
+ +   +
+
+

List Maker Checker Entries

+

Get a list of entries that can be checked by the requestor that match the criteria supplied.

+
Arguments
+
+
actionName
+
optional
+
Examples: CREATE, UPDATE, DISBURSE
+ +
entityName
+
optional
+
Examples: CLIENT, LOAN, FUND
+ +
resourceId
+
optional, + The id value of the entityName +
+ +
makerId
+
optional, + The id value of the application user creating the entry +
+ +
makerDateTimeFrom
+
optional, + Get entries created on or after this +
+
Example: 2013-04-10 08:00:00
+ +
makerDateTimeTo
+
optional, + Get entries created on or before this +
+
Example: 2013-05-10 08:00:00
+ +
officeId
+
optional, + The id value of the office/branch associated with the entry (if there is one) +
+ +
groupId
+
optional, + The id value of the group associated with the entry (if there is one). + A group is a general idea and may be a Center, a Group, a Communal Bank or other. +
+ +
clientId
+
optional, + The id value of the client associated with the entry (if there is one) +
+ +
loanId
+
optional, + The id value of the loan associated with the entry (if there is one) +
+ +
savingsAccountId
+
optional, + The id value of the savings account associated with the entry (if there is one) +
+ +
includeJson
+
optional, + Values are true, false. Default is false. +
+ +
+

Example Requests:

+
makercheckers
+
+
makercheckers?fields=madeOnDate,maker,processingResult
+
+
makercheckers?makerDateTimeFrom=2013-03-25 08:00:00&makerDateTimeTo=2013-04-04 + 18:00:00 +
+
+
makercheckers?officeId=1
+
+
makercheckers?officeId=1&includeJson=true
+
+
+ + GET https://DomainName/api/v1/makercheckers + + + [ + { + "id": 654, + "actionName": "CREATE", + "entityName": "LOANPRODUCT", + "resourceId": 15, + "maker": "keithwoodlock", + "madeOnDate": 1364924512000, + "processingResult": "awaiting.approval" + }, + { + "id": 666, + "actionName": "CREATE", + "entityName": "CLIENT", + "resourceId": 363, + "maker": "keithwoodlock", + "madeOnDate": 1365012843000, + "processingResult": "awaiting.approval", + "officeName": "my office name" + }, + { + "id": 670, + "actionName": "CREATE", + "entityName": "CLIENTNOTE", + "resourceId": 287, + "maker": "keithwoodlock", + "madeOnDate": 1365014204000, + "processingResult": "awaiting.approval", + "officeName": "my office name", + "clientName": "gg ggg" + } + ] + +
+
+ +   +
+
+

Maker Checker Search Template

+

This is a convenience resource. It can be useful when + building a Checker Inbox UI. "appUsers" are data scoped to + the office/branch the requestor is associated with. + "actionNames" and "entityNames" returned are those that the + requestor has Checker approval permissions for. +

+

Example Requests:

+
makercheckers/searchtemplate
+
makercheckers/searchtemplate?fields=entityNames
+
+
+ + GET https://DomainName/api/v1/audits/searchtemplate + + + { + "appUsers": [ + { + "id": 30, + "username": "user 1" + }, + { + "id": 28, + "username": "user 2" + }, + { + "id": 35, + "username": "user 3" + },... + ], + "actionNames": [ + "CREATE", + "DELETE", + "UPDATE", + "ACTIVATE", + "ADJUST", + "APPROVALUNDO", + "APPROVE",... + ], + "entityNames": [ + "CALENDAR", + "CENTER", + "CHARGE", + "CLIENT", + "CLIENTIDENTIFIER",... + ] + } + +
+
+ +   +
+
+

Approve Maker Checker Entry

+
+
+ + POST https://DomainName/api/v1/makercheckers/{auditId}?command=approve + + + POST makercheckers/1?command=approve + Content-Type: application/json + + { "auditId": 1 } +
+
+   +
+
+

Reject Maker Checker Entry

+
+
+ + POST https://DomainName/api/v1/makercheckers/{auditId}?command=reject + + + POST makercheckers/1?command=reject + Content-Type: application/json + + { "auditId": 1 } +
+
+ +   +
+
+

Delete Maker Checker Entry

+
+
+ + DELETE https://DomainName/api/v1/makercheckers/{auditId} + + + DELETE makercheckers/1 + Content-Type: application/json + + { "auditId": 1 } +
+
+ + +   +
+
+

MIFOSX-BATCH JOBS

+

Batch jobs (also known as cron jobs on Unix-based systems) are a series of back-end jobs executed on + a computer at a particular time defined in job's cron expression. +

+ +

At any point, you can view the list of batch jobs scheduled to run along with other details specific + to each job. Manually you can execute the jobs at any point of time. +

+

The scheduler status can be either "Active" or "Standby". If the scheduler status is Active, it + indicates that all batch jobs are running/ will run as per the specified schedule.If the scheduler + status is Standby, it will ensure all scheduled batch runs are suspended. +

+
+
+ +   +
+
+

Retrieve Scheduler Jobs

+

Returns the list of jobs.

+

Example Requests:

+
jobs
+
+
+ + GET https://DomainName/api/v1/jobs + + + [ + { + "jobId": 1, + "displayName": "Update loan Summary", + "cronExpression": "0 0 22 1/1 * ? *", + "active": false, + "currentlyRunning": false, + "lastRunHistory": { + "version": 17, + "jobRunStartTime": "Jul 26, 2013 1:38:26 PM", + "jobRunEndTime": "Jul 26, 2013 1:38:26 PM", + "status": "success", + "triggerType": "application" + } + }, + { + "jobId": 2, + "displayName": "Update Loan Arrears Ageing", + "nextRunTime": "Jul 27, 2013 12:01:00 AM", + "cronExpression": "0 1 0 1/1 * ? *", + "active": true, + "currentlyRunning": false, + "lastRunHistory": { + "version": 18, + "jobRunStartTime": "Jul 26, 2013 4:05:32 PM", + "jobRunEndTime": "Jul 26, 2013 4:05:32 PM", + "status": "success", + "triggerType": "application" + } + }, + { + "jobId": 3, + "displayName": "Update Loan Paid In Advance", + "nextRunTime": "Jul 27, 2013 12:05:00 AM", + "cronExpression": "0 5 0 1/1 * ? *", + "active": true, + "currentlyRunning": false, + "lastRunHistory": { + "version": 16, + "jobRunStartTime": "Jul 26, 2013 4:15:47 PM", + "jobRunEndTime": "Jul 26, 2013 4:15:47 PM", + "status": "success", + "triggerType": "application" + } + }, + { + "jobId": 4, + "displayName": "Apply Annual Fee For Savings", + "nextRunTime": "Jul 26, 2013 10:20:00 PM", + "cronExpression": "0 20 22 1/1 * ? *", + "active": true, + "currentlyRunning": false, + "lastRunHistory": { + "version": 11, + "jobRunStartTime": "Jul 26, 2013 12:00:37 PM", + "jobRunEndTime": "Jul 26, 2013 12:00:38 PM", + "status": "success + "triggerType": "application" + } + }, + { + "jobId": 5, + "displayName": "Apply Holidays To Loans", + "nextRunTime": "Jul 27, 2013 12:00:00 PM", + "cronExpression": "0 0 12 * * ?", + "active": true, + "currentlyRunning": false, + "lastRunHistory": { + "version": 16, + "jobRunStartTime": "Jul 26, 2013 4:31:54 PM", + "jobRunEndTime": "Jul 26, 2013 4:31:55 PM", + "status": "success", + "triggerType": "application" + } + } + ] + + +
+
+ +   +
+
+

Retrieve a Job

+

Returns the details of a Job.

+

Example Requests:

+
jobs/5
+
+
+ + GET https://DomainName/api/v1/jobs/{jobId} + + + https://localhost:8443/fineract-provider/api/v1/jobs/5 + { + "jobId": 5, + "displayName": "Apply Holidays To Loans", + "nextRunTime": "Jul 27, 2013 12:00:00 PM", + "cronExpression": "0 0 12 * * ?", + "active": true, + "currentlyRunning": false, + "lastRunHistory": { + "version": 16, + "jobRunStartTime": "Jul 26, 2013 4:31:54 PM", + "jobRunEndTime": "Jul 26, 2013 4:31:55 PM", + "status": "success", + "triggerType": "application" + } + } + +
+
+ +   +
+
+

Update a Job

+

Updates the details of a job.

+
+
+ + PUT https://DomainName/api/v1/jobs/{jobId} + + + PUT jobs/1 + Content-Type: application/json + { + "displayName":"Update loan Summary", + "cronExpression":"0 0 22 1/1 * ? *", + "active":"true" + } +
+
+ +   +
+
+

Run a Job

+

Manually Execute Specific Job.

+
+
+ + POST https://DomainName/api/v1/jobs/{jobId}?command=executeJob + + + POST jobs/1?command=executeJob + +
+
+ +   +
+
+

Retrieve Job Run History

+

Example Requests:

+
jobs/5/runhistory?offset=0&limit=200
+
+
+ + GET https://DomainName/api/v1/jobs/{jobid}/runhistory?offset=0&limit=200 + + + { + "totalFilteredRecords": 8, + "pageItems": [ + { + "version": 1, + "jobRunStartTime": "Jul 16, 2013 12:00:00 PM", + "jobRunEndTime": "Jul 16, 2013 12:00:00 PM", + "status": "success", + "triggerType": "cron" + }, + { + "version": 2, + "jobRunStartTime": "Jul 17, 2013 12:00:00 PM", + "jobRunEndTime": "Jul 17, 2013 12:00:00 PM", + "status": "success", + "triggerType": "cron" + }, + { + "version": 3, + "jobRunStartTime": "Jul 18, 2013 12:00:00 PM", + "jobRunEndTime": "Jul 18, 2013 12:00:01 PM", + "status": "success", + "triggerType": "cron" + }, + { + "version": 4, + "jobRunStartTime": "Jul 19, 2013 12:00:00 PM", + "jobRunEndTime": "Jul 19, 2013 12:00:00 PM", + "status": "success", + "triggerType": "cron" + }, + { + "version": 5, + "jobRunStartTime": "Jul 20, 2013 11:16:07 AM", + "jobRunEndTime": "Jul 20, 2013 11:16:07 AM", + "status": "success", + "triggerType": "application" + }, + { + "version": 6, + "jobRunStartTime": "Jul 20, 2013 11:35:05 AM", + "jobRunEndTime": "Jul 20, 2013 11:35:05 AM", + "status": "success", + "triggerType": "application" + }, + { + "version": 7, + "jobRunStartTime": "Jul 20, 2013 12:00:00 PM", + "jobRunEndTime": "Jul 20, 2013 12:00:00 PM", + "status": "success", + "triggerType": "cron" + }, + { + "version": 8, + "jobRunStartTime": "Jul 22, 2013 12:00:00 PM", + "jobRunEndTime": "Jul 22, 2013 12:00:00 PM", + "status": "success", + "triggerType": "cron" + } + ] + } + +
+
+ +   +
+
+

Retrieve Scheduler Status

+

Returns the scheduler status.

+

Example Requests:

+
scheduler
+
+
+ + GET https://DomainName/api/v1/scheduler + + + https://localhost:8443/fineract-provider/api/v1/scheduler + { + "active": true + } + +
+
+ +   +
+
+

Activate Scheduler Jobs

+

Activates the scheduler job service.

+
+
+ + POST https://DomainName/api/v1/scheduler?command=start + + + POST scheduler?command=start + +
+
+ +   +
+
+

Suspend Scheduler Jobs

+

Suspends the scheduler job service.

+
+
+ + POST https://DomainName/api/v1/scheduler?command=stop + + + POST scheduler?command=stop + +
+
+ +   +
+
+

External Services

+

External Services Configuration related to set of supported configurations for third party services + like Amazon S3 and SMTP:

+
    +
  1. S3 (Amazon S3):
  2. +
  3. s3_access_key -
  4. +
  5. s3_bucket_name -
  6. +
  7. s3_secret_key -
  8. +

    +
  9. SMTP (Email Service):
  10. +
  11. username -
  12. +
  13. password -
  14. +
  15. host -
  16. +
  17. port -
  18. +
  19. useTLS -
  20. + +
+
+
+ +   +
+
+

Retrieve External Services Configuration

+

Returns a external Service configurations based on the Service Name.

+

Service Names supported are S3 and SMTP.

+

Example Requests:

+
externalservice/SMTP
+
+
+ + GET https://DomainName/api/v1/externalservice/{serviceName} + + + + + [ + { + "name": "username", + "value": "test@mifos.com" + }, + { + "name": "password", + "value": "XXXX" + }, + { + "name": "host", + "value": "smtp.gmail.com" + }, + { + "name": "port", + "value": "25" + }, + { + "name": "useTLS", + "value": "true" + } + ] + + + +
+
+ +   +
+
+

Update External Service

+

Updates the external Service Configuration for a Service Name.

+
+
+ + PUT https://DomainName/api/v1/externalservice/{serviceName} + + + PUT externalservice/S3 + Content-Type: application/json + { + "username" : "test@mifos.org" + "password" : "XXXX" + } + +
+
+ + + +   +
+
+

Credit Bureau Configuration

+

Credit Bureau Configuration maintains the configurations of respective Integrated Credit Bureau :

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
CreditBureauId
Id assigned to the Integrated Credit Bureau.
organisationCreditBureauId
Id assigned to the created Alias of the Integrated Credit Bureau.
configurationKey
configurationKey is the name of the parameter which is assigned for fetching + the configurations. +
value
value is the name of the parameter which is assigned to the + configurationKey. +
creditBureauConfigurationId
creditBureauConfigurationId is the Id of the configurationKey-value pair of + Credit Bureau Configuration. +
description
Description of the specific credit bureau configuration.
+
+
+ +   +
+
+

Get Integrated Credit Bureau

+

Get Information of the Integrated Credit Bureau.

+ +
+
+ + GET https://DomainName/fineract-provider/api/v1/CreditBureauConfiguration + + + GET CreditBureauConfiguration + + + { + "creditBureauId": 1, + "creditBureauName": "THITSAWORKS", + "country": "Myanmar", + "productName": "1", + "creditBureauSummary": "1 - THITSAWORKS - Myanmar", + "implementationKey": 1 + }] + +
+
+ +   +
+
+

Create a Credit Bureau Configuration

+

Create a Credit Bureau Configuration.

+ + + + + + + +
+
Mandatory Fields
+
creditBureauId, configkey
+
+ + + + + + + +
+
Optional Fields
+
value, description
+
+
+ + POST + https://DomainName/fineract-provider/api/v1/CreditBureauConfiguration/configuration/{creditBureauId} + + + POST CreditBureauConfiguration/configuration/1 + Content-Type: application/json + Request Body: + { + "configkey":"configurationkey", + "value":"value of the key", + "description":"description of the configuration" + } + + + { + "resourceId": 10 + } + +
+
+ +   +
+
+

Get Credit Bureau Configuration

+

Get Credit Bureau Configuration.

+ + + + + + + +
+
Mandatory Fields
+
organisationCreditBureauId
+
+
+
+ + GET + https://DomainName/fineract-provider/api/v1/CreditBureauConfiguration/config/{organisationCreditBureauId} + + + GET CreditBureauConfiguration/config/1 + + + [{ + "creditBureauConfigurationId": 1, + "configurationKey": "Password", + "value": "password", + "organizationCreditBureauId": 1, + "description": "password of the CreditBureauId:1" + }, { + "creditBureauConfigurationId": 2, + "configurationKey": "SubscriptionId", + "value": "subscriptionId", + "organizationCreditBureauId": 1, + "description": "subscriptionId of the CreditBureauId:1" + } + +
+
+ +   +
+
+

Update a Credit Bureau Configuration

+

Update a Credit Bureau Configuration.

+ + + + + + + +
+
Mandatory Fields
+
configurationId, value
+
+ + + + + + + +
+
Optional Fields
+
description
+
+
+ + PUT + https://DomainName/fineract-provider/api/v1/CreditBureauConfiguration/configuration/{configurationId} + + + PUT CreditBureauConfiguration/configuration/10 + Content-Type: application/json + Request Body: + { + "value":"changing value of the key", + "description":"changing the description" + } + + + { + "resourceId": 10, + "changes": { + "value": "changing value of the key", + "description": "changing the description" + } + } + +
+
+ +   +
+
+

Post Organisation Credit Bureau

+

Creating the Alias of the Integrated Credit Bureau with the different names with the Active + status.

+ + + + + + + +
+
Mandatory Fields
+
alias,creditBureauId
+
+ + + + + + + +
+
Optional Fields
+
isActive
+
+
+ + POST + https://DomainName/fineract-provider/api/v1/CreditBureauConfiguration/organisationCreditBureau/{organisationCreditBureauId} + + + POST CreditBureauConfiguration/organisationCreditBureau/1 + Content-Type: application/json: + { + "alias":"CreditBureau of Thitsaworks", + "isActive":false, + "creditBureauId":"1" + } + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

Get Organisation Credit Bureau

+

Organisation Credit Bureau is the Alias of the Integrated Credit Bureau.

+
+
+ + GET https://DomainName/fineract-provider/api/v1/CreditBureauConfiguration/organisationCreditBureau + + + GET CreditBureauConfiguration/organisationCreditBureau + + + [{ + "organisationCreditBureauId": 1, + "alias": "CreditBureau of Thitsaworks", + "creditBureauId": 1, + "creditBureauName": "THITSAWORKS", + "creditBureauProduct": "1", + "creditBureauCountry": "Myanmar", + "creditBureauSummary": "1 - THITSAWORKS - Myanmar", + "isActive": false + }] + +
+
+ + +   +
+
+

Update Organisational Credit Bureau

+

Update Organisational Credit Bureau.

+ + + + + + + +
+
Mandatory Fields
+
creditBureauId
+
+ + + + + + + +
+
Optional Fields
+
isActive
+
+
+ + PUT CreditBureauConfiguration/configuration/organisationCreditBureau + + + PUT CreditBureauConfiguration/organisationCreditBureau + Content-Type: application/json: + { + "creditBureauId":"1", + "isActive":true + } + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

Post Credit Bureau-LoanProduct Mapping

+

Mapping of the Credit Bureau with Loan Products.

+ + + + + + + +
+
Mandatory Fields
+
loanProductId, isCreditcheckMandatory, skipCreditcheckInFailure, isActive, stalePeriod, + locale +
+
+ +
+
+ + POST https://DomainName/fineract-provider/api/v1/CreditBureauConfiguration/mappings/{CreditBureauId} + + + POST CreditBureauConfiguration/mappings/1 + Content-Type: application/json: + { + "loanProductId":"1", + "isCreditcheckMandatory":true, + "skipCreditcheckInFailure":true, + "isActive":true, + "stalePeriod":"5", + "locale":"en" + } + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

Get All Credit Bureau Mappings

+

Get All Credit Bureau - Loan Product Mappings.

+
+
+ + GET https://DomainName/fineract-provider/api/v1/CreditBureauConfiguration/mappings + + + GET CreditBureauConfiguration/mappings + + + [{ + "creditbureauLoanProductMappingId": 1, + "organisationCreditBureauId": 1, + "alias": "CreditBureau of Thitsaworks", + "creditbureauSummary": "1 - THITSAWORKS - Myanmar", + "loanProductName": "LOAN_PRODUCT_MYANMAR", + "loanProductId": 1, + "isCreditCheckMandatory": true, + "skipCrediCheckInFailure": true, + "stalePeriod": 5, + "isActive": true + }] +
+
+ + +   +
+
+

Update Credit Bureau-Loan Product Mapping

+

Update Credit Bureau-Loan Product Mapping.

+ + + + + + + +
+
Mandatory Fields
+
creditbureauLoanProductMappingId, isActive
+
+
+ + PUT https://DomainName/fineract-provider/api/v1/CreditBureauConfiguration/mappings + + + PUT CreditBureauConfiguration/mappings + Content-Type: application/json: + { + "creditbureauLoanProductMappingId":1, + "isActive":false + } + + + { + "resourceId": 1 + } + +
+
+ + + + + +   +
+
+

ThitsaWorks Credit Bureau Integration

+

ThitsaWorks Credit Bureau Integration fetches the Credit Report from the ThitsaWorks :

+ + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
creditBureauId
Id assigned to the Integrated Credit Bureau.
params
params is the Map parameter which has specific keys,values which are + required to fetch the credit Reports.
+ NRC: to fetch ThitsaWorks Credit Reports. +
creditReportNumber
creditReportNumber is the general term to access the Credit Reports.
+
+
+ +   +
+
+

Fetch Credit Report

+

Fetches the Credit Report.

+ + + + + + + +
+
Mandatory Fields
+
NRC, creditBureauID
+
+ +
+
+ + POST https://DomainName/fineract-provider/api/v1/creditBureauIntegration/creditReport + + + POST creditBureauIntegration/creditReport + Content-Type: application/json + { + "NRC":"12/KaMaRa(N)253429", + "creditBureauID":"1" + } + + + { + "creditBureauReportData":{ + "name":"Lwin Moe", + "gender":"", + "address":"", + "creditScore":{ + "Score":"N/A", + "Class":"N/A", + "Note":"" + }, + "borrowerInfo":{ + "MainIdentifier":"1113294790", + "Name":"Lwin Moe", + "NRC":"12/KaMaRa(N)253429", + "Gender":"", + "DOB":"1990-12-25,1990-01-20", + "FatherName":"", + "Address":"", + "LastUpdateDtm":"Jul 8 2020 3:57PM", + "PrintedDtm":"Dec 16 2020 4:46AM" + } + } + } + +
+
+ +   +
+
+

Get Saved Credit Report Information

+

Gets Saved Credit Report Information to download the credit Report which are stored in database.

+ + + + + + + +
+
Mandatory Fields
+
creditBureauID
+
+ +
+
+ + GET + https://DomainName/fineract-provider/api/v1/creditBureauIntegration/creditReport/{creditBureauId} + + + GET creditBureauIntegration/creditReport/1 + + + [{ + "id": 3, + "creditBureauId": 1, + "nrc": "12/MaGaDa(N)253426" + }, { + "id": 4, + "creditBureauId": 1, + "nrc": "12/KaMaRa(N)253426" + }] + +
+
+ + + + +   +
+
+

Two-Factor Configuration

+

The following section describes the way to configure two-factor authentication

+

Two-Factor Authentication has to be enabled by either building with Gradle arguments + -Ptwofactor=enabled or enabling the twofactor profile via env. variable +

+

In order for SMS to be enabled an SMS bridge has to be setup with the message-gateway service.

+
+
+
+
+ +   +
+
+

Retrieve Two-Factor Configuration

+

Returns available two-factor configuration.

+
+
+ GET https://DomainName/api/v1/twofactor/configure + + + { + "otp-delivery-email-body": "Hello {{username}}.\n\nYour OTP login token is {{token}}.", + "otp-delivery-sms-enable": true, + "otp-delivery-sms-provider": 6, + "otp-delivery-email-subject": "Fineract Two-Factor Authentication Token", + "otp-token-length": 5, + "access-token-live-time-extended": 604800, + "otp-delivery-email-enable": true, + "otp-token-live-time": 300, + "otp-delivery-sms-text": "Your authentication token for Fineract is {{token}}.", + "access-token-live-time": 86400 + } + +
+
+ +   +
+
+

Update Two-Factor Configuration

+

Update two-factor configuration.

+
+
+ PUT https://DomainName/api/v1/twofactor/configure + + + { + "otp-delivery-sms-provider": 7 + "otp-delivery-sms-enable": false + } + + + { + "changes": { + "otp-delivery-sms-enable": false, + "otp-delivery-sms-provider": 7 + } + } + +
+
+ + +   +
+
+

Funds

+
+
+ +   +
+
+

Create a Fund

+

Creates a fund.

+
+
+ + POST https://DomainName/api/v1/funds + + + POST funds + Content-Type: application/json + Request Body: + { + "name": "EU Agri Fund" + } + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

Retrieve Funds

+

Returns the list of funds.

+

Example Requests:

+
funds
+
+
+ + GET https://DomainName/api/v1/funds + + + [ + { + "id": 1, + "name": "EU Agri Fund" + } + ] + +
+
+ +   +
+
+

Retrieve a Fund

+

Returns the details of a Fund.

+

Example Requests:

+
funds/1
+
+
+ + GET https://DomainName/api/v1/funds/{fundId} + + + { + "id": 1, + "name": "EU Agri Fund" + } + +
+
+ +   +
+
+

Update a Fund

+

Updates the details of a fund.

+
+
+ + PUT https://DomainName/api/v1/funds/{fundId} + + + PUT funds/1 + Content-Type: application/json + Request Body: + { + "name": "EU Agri Fund (2010-2020)" + } + + + { + "resourceId": 1, + "changes": { + "name": "EU Agri Fund (2010-2020)" + } + } + +
+
+ + +   +
+
+

Staff

+

Allows you to model staff members. At present the key role + of significance is whether this staff member is a loan officer or + not.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
firstname
First Name of the new Employee.
lastname
Last Name of the new Employee. +
externalId
ID to put an external reference for an Employee.
mobileNo
Mobile number of an Employee. +
isLoanOfficer
Indicates whether the employee account is to be created as Loan + Officer. If isLoanOfficer=true, then the employee is Loan Officer. If + isLoanOfficer=false, then the employee is + not Loan Officer. +
isActive
Indicates whether the employee account is to be created as Active. If + isActive=true, then employee is active. If isActive=false, then employee is inactive. +
+
+
+ + +   +
+
+

Create a staff member

+

Creates a staff member.

+ + + + + + + +
+
Mandatory Fields
+
officeId, firstname, lastname
+
+ + + + + + + +
+
Optional Fields
+
isLoanOfficer, isActive
+
+
+ + POST https://DomainName/api/v1/staff + + + POST staff + Content-Type: application/json + Request Body: + { + "officeId": 1, + "firstname": "John", + "lastname": "Doe", + "isLoanOfficer": "true", + "externalId": "17H", + "mobileNo": "+353851239876", + "isActive": "true", + "joiningDate": "01 January 2009", + "locale":"en", + "dateFormat":"dd MMMM yyyy" + } + + + { + "officeId": 1, + "resourceId": 1 + } + +
+
+ +   +
+
+

Retrieve Staff

+

Returns the list of staff members.

+

Example Requests:

+
staff
+
+
+ + GET https://DomainName/api/v1/staff + + + [ + { + "id": 1, + "firstname": "John", + "lastname": "Doe", + "displayName": "Doe, John", + "officeId": 1, + "officeName": "Head Office", + "isLoanOfficer": true, + "externalId": "17H", + "isActive": "true", + "joiningDate":[2009,8,1] + } + ] + +
+
+ +   +
+
+

Retrieve a Staff Member

+

Returns the details of a Staff Member.

+

Example Requests:

+
staff/1
+
+
+ GET https://DomainName/api/v1/staff/{staffId} + + { + "id": 1, + "firstname": "John", + "lastname": "Doe", + "displayName": "Doe, John", + "officeId": 1, + "officeName": "Head Office", + "isLoanOfficer": true, + "externalId": "17H", + "isActive": "true", + "joiningDate":[2009,8,1] + } + +
+
+ +   +
+
+

Retrieve a Staff by status

+

Returns the details of a Staff based on status.

+

By default it Returns all the ACTIVE Staff.

+

If status=INACTIVE, then it returns all INACTIVE Staff.

+

and for status=ALL, it Returns both ACTIVE and INACTIVE Staff.

+

Example Requests:

+
staff?status=active
+
+
+ GET https://DomainName/api/v1/staff?status={ACTIVE|INACTIVE|ALL} + + { + "id": 1, + "firstname": "John", + "lastname": "Doe", + "displayName": "Doe, John", + "officeId": 1, + "officeName": "Head Office", + "isLoanOfficer": true, + "externalId": "17H", + "isActive": "true", + "joiningDate":[2009,8,1] + } + +
+
+ +   +
+
+

Update a Staff Member

+

Updates the details of a staff member.

+
+
+ + PUT https://DomainName/api/v1/staff/{staffId} + + + PUT staff/1 + Content-Type: application/json + Request Body: + { + "isLoanOfficer": "false", + "externalId": "17Hbb" + } + + + { + "officeId": 1, + "resourceId": 1, + "changes": { + "isLoanOfficer": false, + "externalId": "17Hbb" + } + } + +
+
+ + + +   +
+
+

Charges

+

+ Its typical for MFIs to add extra costs for their financial + products. These are typically Fees or Penalties. +

+

A Charge on fineract platform is what we use to model both Fees and + Penalties.

+

At present we support defining charges for use with Client accounts and both loan and saving + products.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
name
Name associated with this charge.
chargeAppliesTo
Enumeration for indicating whether charge is to be applicable for loans, + savings or clients.
+ 1=Loans, + 2=Savings, + 3=Client +

Once a charge definiton has been created, this attribute cannot be changed at any + point.

+
active
Boolean flag determines if the charge is currently active.
penalty
Boolean flag determines if the charge is a penalty. If false the + charge is considered a Fee
currencyCode
A three letter ISO code of currency.
chargeCalculationType
Enumeration for indicating whether charge amount is flat or percentage + based:
+ 1=Flat, + 2=% of Amount +

Used in combination with amount parameter e.g 1 % of Amount or 3.50 + Flat

+

For loans, % of Amount refers to the loan principal disbursed.

+

For savings, % of Amount can be used with 'withrawal fees' and refers to the amount + withdrawn.

+
amount
The charge amount. Used in combination with chargeCalculationType + parameter. e.g 1 % of Amount or 3.50 Flat +
minCap
Optional: Can be used when a '% of Amount' value is used for chargeCalculationType. +

Used to enforce a minimum charge amount in cases where the calculated amount is less than + the minimum amount provided.

+

e.g. A 2% fee with a minimum cap of 500:
+ In case of a 5000 loan, the 2% is 100, and therefore automatically 500 is used as the + value of the charge. +

+
maxCap
Optional: Can be used when a '% of Amount' value is used for chargeCalculationType. +

Used to enforce a maximum charge amount in cases where the calculated amount is greater + than the maximum amount provided.

+

e.g. A 2% fee, with a maximum of 2000.:
+ In case of a 150000 loan, the 2% adds up to 3000 charge, and therefore the maximum cap + of 2000 will be used. +

+
chargeTimeType
An enumeration indicating the time at which the charge becomes due:
+

+ 1 = Disbursement : Applicable for loans and deducted at the time of loan + disbursement.
+ 2 = Specified Due Date : Adhoc charge can be applied for loans and savings on a + specified due date.
+ 3 = Savings Activation : This charge is applicable for savings account and charged at + the time of account activation. This charge will be autodeducted once the account is + activated with sufficient opening balance.
+ 5 = Withdrawal fee : Charge applied to every withdrawal of savings account.
+ 6 = Annual Fee : Recurring charge applied annually for savings on a specified Month and + day. see feeOnMonthDay
+ 7 = Monthly Fee : Recurring charge applied on regular interval of months for savings. + see feeOnMonthDay and feeInterval +

+
chargePaymentMode
Applicable to loan charges only: Enumeration for indicating whether + charge is to be paid through an Account Transfer from savings or through + Regular payment mode.
+ 0=Regular, + 1=Account Transfer +
feeOnMonthDay
Used along with monthDayFormat to indicate the recurring charge due + date starting on a given day of the month and follow specified feeInterval. e.g. fee + due date starting on 10 May with feeInterval of two (2) months then a + recurring fee on 10th of every two months is applied to savings account. + monthDayFormat indicates day and month formatting used e.g. "dd MMM" for 10 May
+ This field is mandatory if chargeTimeType is of type Monthly Fee +
feeInterval
Fee to be applied on a specified interval.
+ This field is mandatory if chargeTimeType is of type Monthly Fee or feeFrequency + is selcted +
feeFrequency
This field is Optional Used to indicate the recurring(days,weeks,months and + Years) charge due date starting on system calculated date for overdue penalty.
incomeAccount
This field is Optional and can be used only when a charge is applied to a + Client. It indicates the Income or Liability account which gets + credited when a payment is made on this charge
+
+
+ +   +
+
+

Retrieve Charge Template

+

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:

+
charges/template
+
+
+ + GET https://DomainName/api/v1/charges/template + + + { + "active": false, + "penalty": false, + "currencyOptions": [ + { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + ], + "chargeCalculationTypeOptions": [ + { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + { + "id": 2, + "code": "chargeCalculationType.percent.of.amount", + "value": "% Amount" + }, + { + "id": 3, + "code": "chargeCalculationType.percent.of.amount.and.interest", + "value": "% Loan Amount + Interest" + }, + { + "id": 4, + "code": "chargeCalculationType.percent.of.interest", + "value": "% Interest" + } + ], + "chargeAppliesToOptions": [ + { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + { + "id": 2, + "code": "chargeAppliesTo.savings", + "value": "Savings" + } + ], + "chargeTimeTypeOptions": [ + { + "id": 1, + "code": "chargeTimeType.disbursement", + "value": "Disbursement" + }, + { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + { + "id": 3, + "code": "chargeTimeType.savingsActivation", + "value": "Savings Activation" + }, + { + "id": 5, + "code": "chargeTimeType.withdrawalFee", + "value": "Withdrawal Fee" + }, + { + "id": 6, + "code": "chargeTimeType.annualFee", + "value": "Annual Fee" + }, + { + "id": 7, + "code": "chargeTimeType.monthlyFee", + "value": "Monthly Fee" + }, + { + "id": 8, + "code": "chargeTimeType.instalmentFee", + "value": "Instalment Fee" + }, + { + "id": 9, + "code": "chargeTimeType.overdueInstallment", + "value": "overdue fees" + }, + { + "id": 10, + "code": "chargeTimeType.overdraftFee", + "value": "Overdraft Fee" + } + ], + "chargePaymetModeOptions": [ + { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + }, + { + "id": 1, + "code": "chargepaymentmode.accounttransfer", + "value": "Account transfer" + } + ], + "loanChargeCalculationTypeOptions": [ + { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + { + "id": 2, + "code": "chargeCalculationType.percent.of.amount", + "value": "% Amount" + }, + { + "id": 3, + "code": "chargeCalculationType.percent.of.amount.and.interest", + "value": "% Loan Amount + Interest" + }, + { + "id": 4, + "code": "chargeCalculationType.percent.of.interest", + "value": "% Interest" + } + ], + "loanChargeTimeTypeOptions": [ + { + "id": 1, + "code": "chargeTimeType.disbursement", + "value": "Disbursement" + }, + { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + { + "id": 8, + "code": "chargeTimeType.instalmentFee", + "value": "Instalment Fee" + }, + { + "id": 9, + "code": "chargeTimeType.overdueInstallment", + "value": "overdue fees" + } + ], + "savingsChargeCalculationTypeOptions": [ + { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + { + "id": 2, + "code": "chargeCalculationType.percent.of.amount", + "value": "% Amount" + } + ], + "savingsChargeTimeTypeOptions": [ + { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + { + "id": 3, + "code": "chargeTimeType.savingsActivation", + "value": "Savings Activation" + }, + { + "id": 5, + "code": "chargeTimeType.withdrawalFee", + "value": "Withdrawal Fee" + }, + { + "id": 6, + "code": "chargeTimeType.annualFee", + "value": "Annual Fee" + }, + { + "id": 7, + "code": "chargeTimeType.monthlyFee", + "value": "Monthly Fee" + }, + { + "id": 10, + "code": "chargeTimeType.overdraftFee", + "value": "Overdraft Fee" + } + ], + "feeFrequencyOptions": [ + { + "id": 0, + "code": "loanTermFrequency.periodFrequencyType.days", + "value": "Days" + }, + { + "id": 1, + "code": "loanTermFrequency.periodFrequencyType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "loanTermFrequency.periodFrequencyType.months", + "value": "Months" + }, + { + "id": 3, + "code": "loanTermFrequency.periodFrequencyType.years", + "value": "Years" + } + ] + } + +
+
+ +   +
+
+

Create/Define a Charge

+

Define a new charge that can later be associated with loans and savings through their respective + product definitions or directly on each account instance.

+
+
+ + POST https://DomainName/api/v1/charges + + + POST charges + Content-Type: application/json + Request Body: + { + "name": "Loan service fee", + "chargeAppliesTo": 1, + "currencyCode": "USD", + "locale": "en", + "amount": "230.56", + "chargeTimeType": "1", + "chargeCalculationType": "1", + "chargePaymentMode": "1", + "active": true + } + + + { + "resourceId": 1 + } + + + POST charges + Content-Type: application/json + Request Body: + { + "locale": "en", + "name": "Default Penalty", + "amount": "2", + "currencyCode": "USD", + "chargeAppliesTo": "1", + "chargeTimeType": "2", + "chargeCalculationType": "2", + "chargePaymentMode": "1", + "active": "true", + "penalty": "true", + "minCap": 50.00, + "maxCap": 100.00 + } + + + { + "resourceId": 4 + } + + + + POST charges + Content-Type: application/json + Request Body: + { + "locale": "en", + "name": "Annuaul Fee", + "amount": "20", + "currencyCode": "USD", + "chargeAppliesTo": "2", + "chargeTimeType": "6", + "chargeCalculationType": "1", + "chargePaymentMode": "1", + "active": "true", + "penalty": "false" + } + + + { + "resourceId": 5 + } + + + POST charges + Content-Type: application/json + Request Body: + { + "locale": "en", + "name": "Quarterly Fee", + "amount": "5", + "currencyCode": "USD", + "chargeAppliesTo": "2", + "chargeTimeType": "7", + "feeOnMonthDay": "10 May", + "monthDayFormat": "dd MMM", + "feeInterval": "4", + "chargeCalculationType": "1", + "active": "true", + "penalty": "false" + } + + + { + "resourceId": 6 + } + + + POST charges + Content-Type: application/json + Request Body: + { + "chargeAppliesTo":1, + "feeFrequency":1, + "feeInterval":"2", + "name":"overdue charge", + "currencyCode":"USD", + "chargeTimeType":9, + "chargeCalculationType":1, + "chargePaymentMode":0, + "amount":"50", + "active":true, + "penalty":"true", + "locale":"en", + "monthDayFormat":"dd MMM" + } + + + { + "resourceId": 7 + } + + + POST charges + Content-Type: application/json + Request Body: + { + "chargeAppliesTo": 2, + "name": "Weekly Fee", + "currencyCode": "USD", + "chargeTimeType": 11, + "chargeCalculationType": 1, + "feeInterval": "1", + "amount": "10", + "active": true, + "locale": "en" + } + + + { + "resourceId": 8 + } + +
+
+ +   +
+
+

Retrieve Charges

+

Returns the list of defined charges.

+

Example Requests:

+
charges
+
+
+ + GET https://DomainName/api/v1/charges + + + [ + { + "id": 1, + "name": "Loan service fee", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 230.56, + "chargeTimeType": { + "id": 1, + "code": "chargeTimeType.disbursement", + "value": "Disbursement" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode":{ + "id":1, + "code":"chargepaymentmode.accounttransfer", + "value":"Account transfer" + } + }, + { + "id": 54, + "chargeId": 12, + "name": "Loan service fee 2", + "chargeTimeType": { + "id": 1, + "code": "chargeTimeType.disbursement", + "value": "Disbursement" + }, + "chargeCalculationType": { + "id": 2, + "code": "chargeCalculationType.percent.of.amount", + "value": "% Amount" + }, + "percentage": 2.000000, + "amountPercentageAppliedTo": 14000.000000, + "currency": { + "code": "KES", + "name": "Kenyan Shilling", + "decimalPlaces": 2, + "displaySymbol": "KSh", + "nameCode": "currency.KES", + "displayLabel": "Kenyan Shilling (KSh)" + }, + "amount": 500.000000, + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 500.000000, + "amountOrPercentage": 2.000000, + "penalty": false, + "chargePaymentMode": { + "id": 1, + "code": "chargepaymentmode.accounttransfer", + "value": "Account transfer" + }, + "paid": false, + "waived": false, + "chargePayable": true, + "minCap": 500.000000, + "maxCap": 1000.000000 + }, + ] + +
+
+ +   +
+
+

Retrieve a Charge

+

Returns the details of a defined Charge.

+

Example Requests:

+
charges/1
+
+
+ + GET https://DomainName/api/v1/charges/{chargeId} + + + { + "id": 1, + "name": "Loan service fee", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 230.56, + "chargeTimeType": { + "id": 1, + "code": "chargeTimeType.disbursement", + "value": "Disbursement" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode":{ + "id":1, + "code":"chargepaymentmode.accounttransfer", + "value":"Account transfer" + } + } + +
+
+ +   +
+
+

Update a Charge

+

Updates the details of a Charge.

+
+
+ + PUT https://DomainName/api/v1/charges/{chargeId} + + + PUT charges/1 + Content-Type: application/json + Request Body: + { + "name": "Loan service fee(changed)" + } + + + { + "resourceId": 1, + "changes": { + "name": "Loan service fee(changed)" + } + } + +
+
+ +   +
+
+

Delete a Charge

+

Deletes a Charge.

+
+
+ + DELETE https://DomainName/api/v1/charges/{chargeId} + + + DELETE charges/1 + Content-Type: application/json + + { "resourceId": 1 } +
+
+ + +   +
+
+

Accounting Rules

+

+ 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

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
name
Name of the accounting rule
description
A description of the accounting rule.
officeId
An Optional Office for this accounting rule is applicable.
accountToDebit
ID of the target account to be Debited
accountToCredit
ID of the target account to be Credited
debitTags
A list of accounting Tags. Any Ledger account with this tag can serve as the + account to be debited.
This parameter is optional, if accountToDebit present in + the request params +
creditTags
A list of accounting Tags. Any Ledger account with this tag can serve as the + account to be credited.
This parameter is optional, if accountToCredit present in + the request params +
allowMultipleDebitEntries
Allows passing multiple debit entries for the accounting rule
allowMultipleCreditEntries
Allows passing multiple credit entries for the accounting rule
paymentTypeId
Allows passing multiple credit entries for the accounting rule
+
+
+ +   +
+
+

Retrieve Accounting Rule Details Template

+

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
+
+
+ + GET https://DomainName/api/v1/accountingrules/template + + + { + "systemDefined": false, + "allowedOffices": [{ + "id": 1, + "name": "Head Office", + "nameDecorated": "Head Office" + }], + "allowedAccounts": [{ + "id": 21, + "name": "Cash 2", + "parentId": 18, + "glCode": "20011", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "description": "Cash", + "nameDecorated": "............Cash 2", + "tagId": { + "id": 10, + "name": "asset tag" + } + }, + { + "id": 9, + "name": "Employee Salary", + "parentId": 8, + "glCode": "456674", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 5, + "code": "accountType.expense", + "value": "EXPENSE" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "Employee Salary", + "tagId": { + "id": 14, + "name": "Expenses Tag" + } + }] + } + +
+
+ +   +
+
+

Create/Define a Accounting rule

+

Define a new Accounting rule.

+ + + + + + + +
+
Mandatory Fields
+
name, officeId,
accountToDebit OR debitTags,
accountToCredit OR creditTags.
+
+
+ + + + + + + +
+
Optional Fields
+
description
+
+
+ + POST https://DomainName/api/v1/accountingrules + + + POST accountingrules + Content-Type: application/json + Request Body: + { + "name": "test", + "officeId": "1", + "accountToDebit": "21", + "accountToCredit": "9", + "description": "Employee salary" + } + + + { + "officeId":1, + "resourceId":1 + } + + + POST accountingrules + Content-Type: application/json + Request Body: + { + "name": "fordocs", + "officeId": "1", + "debitTags": ["10","11"], + "allowMultipleDebitEntries": "true", + "creditTags": ["12","13"], + "allowMultipleCreditEntries": "true", + "description": "for api docs" + } + + + { + "officeId":1, + "resourceId":2 + } + + + POST accountingrules + Content-Type: application/json + Request Body: + { + "name": "test123", + "officeId": "1", + "accountToDebit": "21", + "creditTags": ["12", "13"], + "allowMultipleCreditEntries": "false", + "description": "Employee salary" + } + + + { + "officeId":1, + "resourceId":3 + } + + + POST accountingrules + Content-Type: application/json + Request Body: + { + "name": "fordocstest", + "officeId": "1", + "debitTags": ["10","11"], + "allowMultipleDebitEntries": "false", + "accountToCredit": "9", + "description": "for api docs" + } + + + { + "officeId":1, + "resourceId":4 + } + +
+
+ +   +
+
+

Retrieve Accounting Rules

+

Returns the list of defined accounting rules.

+

Example Requests:

+
accountingrules
+
+
+ + GET https://DomainName/api/v1/accountingrules + + + [{ + "id": 1, + "officeId": 1, + "officeName": "Head Office", + "name": "test", + "description": "Employee salary", + "systemDefined": false, + "debitAccountHead": { + "id": 21, + "name": "Cash 2", + "glCode": "20011", + "disabled": false, + "manualEntriesAllowed": false + }, + "creditAccountHead": { + "id": 9, + "name": "Employee Salary", + "glCode": "456674", + "disabled": false, + "manualEntriesAllowed": false + } + }, + { + "id": 2, + "officeId": 1, + "officeName": "Head Office", + "name": "A L1", + "description": "aafff", + "systemDefined": false, + "debitAccountHead": { + "id": 3, + "name": "A L", + "glCode": "10003", + "disabled": false, + "manualEntriesAllowed": false + }, + "creditAccountHead": { + "id": 4, + "name": "car loan", + "glCode": "10004", + "disabled": false, + "manualEntriesAllowed": false + } + }] + +
+
+ +   +
+
+

Retrieve a Accounting rule

+

Returns the details of a defined Accounting rule.

+

Example Requests:

+
accountingrules/1
+
+
+ + GET https://DomainName/api/v1/accountingrules/{accountingruleId} + + + { + "id": 1, + "officeId": 1, + "officeName": "Head Office", + "name": "test", + "description": "Employee salary", + "systemDefined": false, + "debitAccountHead": { + "id": 21, + "name": "Cash 2", + "glCode": "20011", + "disabled": false, + "manualEntriesAllowed": false + }, + "creditAccountHead": { + "id": 9, + "name": "Employee Salary", + "glCode": "456674", + "disabled": false, + "manualEntriesAllowed": false + } + } + +
+
+ +   +
+
+

Update a Accounting Rule

+

Updates the details of a Accounting rule.

+
+
+ + PUT https://DomainName/api/v1/accountingrules/{accountingruleId} + + + PUT accountingrules/1 + Content-Type: application/json + Request Body: + { + "name": "Employee Salary posting rule" + } + + + { + "resourceId": 1, + "changes": { + "name": "Employee Salary posting rule" + } + } + +
+
+ +   +
+
+

Delete a Accounting Rule

+

Deletes a Accounting rule.

+
+
+ + DELETE https://DomainName/api/v1/accountingrules/{accountingruleId} + + + DELETE accountingrules/1 + Content-Type: application/json + + { "resourceId": 1 } +
+
+ + +   +
+
+

Savings Product:

+

An MFIs savings product offerings are modeled using this API.

+

When creating savings accounts, the details from the savings product are used to auto fill details of + the savings account application process.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
name
The name of the product offering.
shortName
Shortname associated with a saving product.
+ An abbreviated version of the name, used in reports or menus where space is limited. +
description
A description of the product offering.
currencyCode
Three letter ISO code representing currency.
digitsAfterDecimal
Override the currency default value for digitsAfterDecimal.
inMultiplesOf
Override the default value for rounding currency to multiples of provided + value. +
nominalAnnualInterestRate
The default interest rate set when creating savings accounts of this type of + product. e.g. 5% Per year - It number here is always expressed as the Nominal APR. +
interestCompoundingPeriodType
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end + of month) +
interestPostingPeriodType
The period at which interest rate is posted or credited to savings account. + 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, 30th Sep, + 31st Dec) +
interestCalculationType
The interest calculation method used: 1=Daily Balance or 2=Average Daily + Balance +
interestCalculationDaysInYearType
The setting for number of days in year to use: 360=360 Days, 365=365 Days +
minRequiredOpeningBalance
Optional: If provided, sets the minimum deposit amount required to + open a savings account e.g. 2,000
lockinPeriodFrequency
Optional: If provided, used along with + lockinPeriodFrequencyType to indicate the length of time that the savings account is + 'locked in' and withdrawals are not allowed. e.g. 6 Months +
lockinPeriodFrequencyType
Optional: If provided, used along with lockinPeriodFrequency + to indicate the length of time that the savings account is 'locked in' and withdrawals are + not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years + e.g. 6 Months
withdrawalFeeForTransfers
Optional: Used along with withdrawalFeeAmount to indicate + whether the withdrawal fee should be applied on the account for account transfers . +
accountingRule
Specifies if accounting is enabled for the particular + product and the type of the accounting rule to be used + Example Values:1=NONE,2=CASH_BASED +
allowOverdraft
Optional: If provided, depending on the value mark the savings + account as overdraft account +
overdraftLimit
Optional: If provided, sets the maximum allowed overdraft amount for + a savings account e.g. 5,000 else set the limit as zero +
minBalanceForInterestCalculation
Optional: If provided, balance must be greater than provided value + for calculation of interest e.g. 5,000
enforceMinRequiredBalance
Optional: If set to true, validates that the account + balance does not + fall below minRequiredBalance
minRequiredBalance
Optional: If provided, sets an indicator of the minimum required + balance of the savings account e.g. 5,000 else set the limit as zero. Note that + enforceMinRequiredBalance determines if the minimum required balance is + enforced +
withHoldTax
Optional: If provided, sets an indicator for applying withhold tax on + interest posting for savings account +
taxGroupId
Optional: If withhold tax set as true, with hold tax will be applied + as per the tax group provided +
+
+
+ +   +
+
+

Retrieve Savings Product Template

+

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:

+
savingsproducts/template
+
+
+ GET https://Domain Name/api/v1/savingsproducts/template + + { + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "interestCompoundingPeriodType": { + "id": 1, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", + "value": "Daily" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsInterestPostingPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "accountingRule": { + "id": 1, + "code": "accountingRuleType.none", + "value": "NONE" + }, + "currencyOptions": [ + { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + ], + "interestCompoundingPeriodTypeOptions": [ + { + "id": 1, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", + "value": "Daily" + }, + { + "id": 2, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.weekly", + "value": "Weekly" + }, + { + "id": 3, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.biweekly", + "value": "Bi-Weekly" + }, + { + "id": 4, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", + "value": "Monthly" + }, + { + "id": 5, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.quarterly", + "value": "Quarterly" + }, + { + "id": 6, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.biannual", + "value": "Semi-Annual" + }, + { + "id": 7, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.annual", + "value": "Annually" + }, + { + "id": 8, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.nocompounding", + "value": "No Compounding - Simple Interest" + } + ], + "interestPostingPeriodTypeOptions": [ + { + "id": 4, + "code": "savings.interest.posting.period.savingsInterestPostingPeriodType.monthly", + "value": "Monthly" + }, + { + "id": 5, + "code": "savings.interest.posting.period.savingsInterestPostingPeriodType.quarterly", + "value": "Quarterly" + }, + { + "id": 6, + "code": "savings.interest.posting.period.savingsInterestPostingPeriodType.biannual", + "value": "Semi-Annual" + }, + { + "id": 7, + "code": "savings.interest.posting.period.savingsInterestPostingPeriodType.annual", + "value": "Annually" + } + ], + "interestCalculationTypeOptions": [ + { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + { + "id": 2, + "code": "savingsInterestCalculationType.averagedailybalance", + "value": "Average Daily Balance" + } + ], + "interestCalculationDaysInYearTypeOptions": [ + { + "id": 360, + "code": "savingsInterestCalculationDaysInYearType.days360", + "value": "360 Days" + }, + { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + } + ], + "lockinPeriodFrequencyTypeOptions": [ + { + "id": 0, + "code": "savings.lockin.savingsPeriodFrequencyType.days", + "value": "Days" + }, + { + "id": 1, + "code": "savings.lockin.savingsPeriodFrequencyType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "savings.lockin.savingsPeriodFrequencyType.months", + "value": "Months" + }, + { + "id": 3, + "code": "savings.lockin.savingsPeriodFrequencyType.years", + "value": "Years" + } + ], + "withdrawalFeeTypeOptions": [ + { + "id": 1, + "code": "savingsWithdrawalFeesType.flat", + "value": "Flat" + }, + { + "id": 2, + "code": "savingsWithdrawalFeesType.percent.of.amount", + "value": "% of Amount" + } + ], + "paymentTypeOptions": [ + { + "id": 14, + "name": "Wire Transfer", + "position": 0 + }, + { + "id": 13, + "name": "Cash", + "position": 1 + } + ], + "accountingRuleOptions": [ + { + "id": 1, + "code": "accountingRuleType.none", + "value": "NONE" + }, + { + "id": 2, + "code": "accountingRuleType.cash", + "value": "CASH BASED" + }, + { + "id": 3, + "code": "accountingRuleType.accrual", + "value": "ACCRUAL BASED" + } + ], + "accountingMappingOptions": { + "liabilityAccountOptions": [ + { + "id": 15, + "name": "Savings Control", + "glCode": "50001", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 2, + "code": "accountType.liability", + "value": "LIABILITY" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "Savings Control", + "tagId": { + "id": 0 + } + } + ], + "assetAccountOptions": [ + { + "id": 2, + "name": "Cash", + "glCode": "100001", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "tagId": {} + }, + { + "id": 16, + "name": "Savings Reference", + "glCode": "100007", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "Savings Reference", + "tagId": { + "id": 0 + } + }, + { + "id": 12, + "name": "HDFC Rajajinagar", + "glCode": "100015", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "tagId": {} + }, + { + "id": 1, + "name": "Loan Portfolio", + "glCode": "10003", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "tagId": {} + }, + { + "id": 7, + "name": "Interest Receivable", + "glCode": "10005", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "tagId": {} + }, + { + "id": 8, + "name": "Penalties Receivable", + "glCode": "10008", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "tagId": {} + }, + { + "id": 9, + "name": "Fee Receivable", + "glCode": "10009", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "tagId": {} + } + ], + "expenseAccountOptions": [ + { + "id": 6, + "name": "Write Off Expenses", + "glCode": "60001", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 5, + "code": "accountType.expense", + "value": "EXPENSE" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "tagId": {} + }, + { + "id": 13, + "name": "Employee Salary", + "glCode": "60002", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 5, + "code": "accountType.expense", + "value": "EXPENSE" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "tagId": {} + }, + { + "id": 18, + "name": "Interest On Savings", + "glCode": "60003", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 5, + "code": "accountType.expense", + "value": "EXPENSE" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "Interest On Savings", + "tagId": { + "id": 0 + } + } + ], + "incomeAccountOptions": [ + { + "id": 3, + "name": "Income from Interest", + "glCode": "40001", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 4, + "code": "accountType.income", + "value": "INCOME" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "tagId": {} + }, + { + "id": 4, + "name": "Income from Fees", + "glCode": "40002", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 4, + "code": "accountType.income", + "value": "INCOME" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "tagId": {} + }, + { + "id": 5, + "name": "Income from Penalties", + "glCode": "40004", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 4, + "code": "accountType.income", + "value": "INCOME" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "tagId": {} + } + ] + }, + "chargeOptions" : [ { "active" : true, + "amount" : 200, + "chargeAppliesTo" : { "code" : "chargeAppliesTo.savings", + "id" : 2, + "value" : "Savings" + }, + "chargeCalculationType" : { "code" : "chargeCalculationType.flat", + "id" : 1, + "value" : "Flat" + }, + "chargePaymentMode" : { "code" : "chargepaymentmode.regular", + "id" : 0, + "value" : "chargepaymentmode.regular" + }, + "chargeTimeType" : { "code" : "chargeTimeType.specifiedDueDate", + "id" : 2, + "value" : "Specified due date" + }, + "currency" : { "code" : "USD", + "decimalPlaces" : 2, + "displayLabel" : "US Dollar ($)", + "displaySymbol" : "$", + "name" : "US Dollar", + "nameCode" : "currency.USD" + }, + "id" : 4, + "name" : "Savings charge 1", + "penalty" : false + }, + { "active" : true, + "amount" : 300, + "chargeAppliesTo" : { "code" : "chargeAppliesTo.savings", + "id" : 2, + "value" : "Savings" + }, + "chargeCalculationType" : { "code" : "chargeCalculationType.flat", + "id" : 1, + "value" : "Flat" + }, + "chargePaymentMode" : { "code" : "chargepaymentmode.regular", + "id" : 0, + "value" : "chargepaymentmode.regular" + }, + "chargeTimeType" : { "code" : "chargeTimeType.specifiedDueDate", + "id" : 2, + "value" : "Specified due date" + }, + "currency" : { "code" : "USD", + "decimalPlaces" : 2, + "displayLabel" : "US Dollar ($)", + "displaySymbol" : "$", + "name" : "US Dollar", + "nameCode" : "currency.USD" + }, + "id" : 5, + "name" : "Savings charge 2", + "penalty" : false + } + ] + } + +
+
+ +   +
+
+

Entity-Datatable Checks

+

This defines Entity-Datatable Check.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
entity
The entity to which the Entity-Datatable Check to be attached.
status
The action to be attached to an Entity-Datatable Check.
datatableName
Name of the datatable on which the Entity-Datatable Check to be imposed. +
productId
Optional: The product to be associated with an entity.
+
+
+ +   +
+
+

Create Entity-Datatable Checks

+ + + + + + + +
+
Mandatory Fields
+
entity, status, datatableName
+
+ + + + + + + +
+
Non-Mandatory Fields
+
productId
+
+ +
+ POST https://Domain Name/api/v1/entityDatatableChecks + POST entitydatatablechecks + Content-Type: application/json + Request Body: + { + "entity": "m_loan", + "status": 100, + "datatableName": "Additional Details", + "productId": 1 + } + + + + { + "resourceId": 1 + } + + +
+
+ +   +
+
+

List Entity-Datatable Checks

+

The list capability of Entity-Datatable Checks can support pagination.

+
Optional Arguments
+
+
offset
+
+ Integer optional, defaults to 0 +
+
Indicates the result from which pagination starts
+ +
limit
+
+ Integer optional, defaults to 200 +
+
Restricts the size of results returned. To override the default and return all entries you must + explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1 +
+
+

Example Request:

+
entityDatatableChecks?offset=0&limit=15
+
+
+ GET https://DomainName/api/v1/entityDatatableChecks?offset=0&limit=15 + + + { + "totalFilteredRecords": 15, + "pageItems": [{ + "id": 45, + "entity": "m_client", + "status": { + "id": 100, + "code": "CREATE", + "value": "CREATE" + }, + "datatableName": "Client Personal Details", + "systemDefined": false, + "order": 45 + }, + { + "id": 48, + "entity": "m_group", + "status": { + "id": 100, + "code": "CREATE", + "value": "CREATE" + }, + "datatableName": "Group Activation Details", + "systemDefined": false, + "order": 48 + }, ...] + } + +
+
+ +   +
+
+

Retrieve Entity-Datatable Checks Template

+

This is a convenience resource useful for + building maintenance user interface screens for Entity-Datatable Checks + applications. The template data returned consists of: +

    +
  • Allowed Value Lists
  • +
+

+

Example Request:

+
entityDatatableChecks/template
+
+
+ GET https://DomainName/api/v1/entityDatatableChecks/template + + + { + "entities": ["m_client", + "m_loan", + "m_group", + "m_savings_account"], + "statusClient": [{ + "name": "CREATE", + "code": 100 + }, + { + "name": "ACTIVATE", + "code": 300 + }, + { + "name": "CLOSE", + "code": 600 + }], + "statusGroup": [{ + "name": "CREATE", + "code": 100 + }, + { + "name": "ACTIVATE", + "code": 300 + }, + { + "name": "CLOSE", + "code": 600 + }], + "statusSavings": [{ + "name": "CREATE", + "code": 100 + }, + { + "name": "APPROVE", + "code": 200 + }, + { + "name": "ACTIVATE", + "code": 300 + }, + { + "name": "WITHDRAWN", + "code": 400 + }, + { + "name": "REJECTED", + "code": 500 + }, + { + "name": "CLOSE", + "code": 600 + }], + "statusLoans": [{ + "name": "CREATE", + "code": 100 + }, + { + "name": "APPROVE", + "code": 200 + }, + { + "name": "ACTIVATE", + "code": 300 + }, + { + "name": "WITHDRAWN", + "code": 400 + }, + { + "name": "REJECTED", + "code": 500 + }, + { + "name": "WRITE_OFF", + "code": 601 + }], + "datatables": [{ + "entity": "m_group", + "dataTableName": "Address Details" + }, + { + "entity": "m_client", + "dataTableName": "CACT" + }, + { + "entity": "m_client", + "dataTableName": "Family_Details" + }], + "loanProductDatas": [{ + "id": 1, + "name": "Sakhi Shakthi", + "includeInBorrowerCycle": false, + "useBorrowerCycle": false, + "isLinkedToFloatingInterestRates": false, + "isFloatingInterestRateCalculationAllowed": false, + "allowVariableInstallments": false, + "isInterestRecalculationEnabled": false, + "canDefineInstallmentAmount": false, + "principalVariationsForBorrowerCycle": [], + "interestRateVariationsForBorrowerCycle": [], + "numberOfRepaymentVariationsForBorrowerCycle": [], + "canUseForTopup": false, + "holdGuaranteeFunds": false, + "accountMovesOutOfNPAOnlyOnArrearsCompletion": false, + "syncExpectedWithDisbursementDate": false + }, + { + "id": 2, + "name": "MEL One", + "includeInBorrowerCycle": false, + "useBorrowerCycle": false, + "isLinkedToFloatingInterestRates": false, + "isFloatingInterestRateCalculationAllowed": false, + "allowVariableInstallments": false, + "isInterestRecalculationEnabled": false, + "canDefineInstallmentAmount": false, + "principalVariationsForBorrowerCycle": [], + "interestRateVariationsForBorrowerCycle": [], + "numberOfRepaymentVariationsForBorrowerCycle": [], + "canUseForTopup": false, + "holdGuaranteeFunds": false, + "accountMovesOutOfNPAOnlyOnArrearsCompletion": false, + "syncExpectedWithDisbursementDate": false + }], + "savingsProductDatas": [{ + "id": 1, + "name": "Deposit Account", + "withdrawalFeeForTransfers": false, + "allowOverdraft": false, + "enforceMinRequiredBalance": false, + "withHoldTax": false + }, + { + "id": 2, + "name": "Savings Account One", + "withdrawalFeeForTransfers": false, + "allowOverdraft": false, + "enforceMinRequiredBalance": false, + "withHoldTax": false + }] + } + +
+
+ +   +
+
+

Delete Entity-Datatable Checks

+

+ Deletes an existing Entity-Datatable Check +

+
+ +
+ DELETE https://Domain + Name/api/v1/entityDatatableChecks/{entityDatatableCheckId} + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

Create a SMS Campaign

+ + + + + + + +
+
Mandatory Fields
+
campaignName, campaignType, triggerType, providerId, runReportId, message
+
+ + + + + + + +
+
Mandatory Fields for Cash based on selected report id
+
paramValue in json format
+
+
+ + POST https://Domain Name/api/v1/smscampaigns + POST smscampaigns + Content-Type: application/json + Request Body: + { + "campaignName": "Savings Deposit Campaign", + "campaignType": "SMS", + "triggerType": 3, + "providerId": 2, + "runReportId": 180, + "paramValue": "{"officeId":1,"loanOfficerId":-1,"transactionId":1,"reportName":"Savings Deposit"}", + "message": "Hello {fullName} your account is credited with {depositAmount} on {transactionDate}", + } + + + + { + "resourceId": 1 + } + + +
+
+ +   +
+
+

List SMS Campaigns

+ + + + + + + +
+
Mandatory Fields
+
+

Example Requests:

+
smscampaigns
+
+
+ + GET https://Domain Name/api/v1/smscampaigns + + + [{ + "id": 1, + "campaignName": "Savings Deposit Campaign" + "campaignType": "SMS", + "triggerType": 3, + "providerId": 2, + "runReportId": 180, + "reportName" : "Savings Deposit", + "paramValue": "{"officeId":1,"loanOfficerId":-1,"transactionId":1,"reportName":"Savings Deposit"}", + "message": "Hello {fullName} your account is credited with {depositAmount} on {transactionDate}", + "status" : { "id":"","code":"","value":""} + + }] + +
+
+ +   +
+
+

Retrieve a SMS Campaign

+

Example Requests:

+
smscampaigns/1
+

+
smscampaigns/1?template=true
+

+
smscampaigns/template
+
+ +
+ GET https://Domain Name/api/v1/smscampaigns/1 + + { + "id": 1, + "campaignName": "Savings Deposit Campaign" + "campaignType": "SMS", + "triggerType": 3, + "providerId": 2, + "runReportId": 180, + "reportName" : "Savings Deposit", + "paramValue": "{"officeId":1,"loanOfficerId":-1,"transactionId":1,"reportName":"Savings Deposit"}", + "message": "Hello {fullName} your account is credited with {depositAmount} on {transactionDate}", + "status" : { "id":"","code":"","value":""} + } + In case of Scheduled Campaign + { + "id": 1, + "campaignName": "Savings Deposit Campaign" + "campaignType": "SMS", + "triggerType": 3, + "providerId": 2, + "runReportId": 180, + "reportName" : "Savings Deposit", + "paramValue": "{"officeId":1,"loanOfficerId":-1,"transactionId":1,"reportName":"Savings Deposit"}", + "message": "Hello {fullName} your account is credited with {depositAmount} on {transactionDate}", + "status" : { "id":"","code":"","value":""}, + "nextTriggerDate": "22 Jan 2017", + "lastTriggerDate": "22 Jan 2016", + "recurrenceStartDate":"22 Jan 2016", + "recurrence": "YEARLY" + } + + + smscampaigns/1?template=true + + { + "id": 1, + "campaignName": "Savings Deposit Campaign" + "campaignType": "SMS", + "triggerType": 3, + "providerId": 2, + "runReportId": 180, + "reportName" : "Savings Deposit", + "paramValue": "{"officeId":1,"loanOfficerId":-1,"transactionId":1,"reportName":"Savings Deposit"}", + "message": "Hello {fullName} your account is credited with {depositAmount} on {transactionDate}", + "status" : { "id":"","code":"","value":""} + + "smsProviderOptions": [{ + "id": 1, + "tenantId": "1", + "phoneNo": "+XXXXXXXXXX", + "providerName": "Twilio SMS Provider", + "providerDescription": "Twilio, just for testing" + }], + "businessRulesOptions": [ + { + "reportId": 166, + "reportName": "Active Clients", + "reportType": "SMS", + "reportSubType": "NonTriggered", + "reportDescription": "All clients with the status ‘Active’", + "reportParamName": { + "Office": "OfficeIdSelectOne", + "Loan Officer": "loanOfficerIdSelectAll" + } + } + ], + "triggerTypeOptions": [ + {"id": 1,"code": "triggerType.direct", "value": "Direct"}, + {"id": 2, "code": "triggerType.schedule","value": "Scheduled"}, + {"id": 3,"code": "triggerType.triggered","value": "Triggered"} + ], + "months": [ + { "id": 1, "code": "JANUARY", "value": "JANUARY" }, + { "id": 2, "code": "FEBRUARY", "value": "FEBRUARY" }, + { "id": 3, "code": "MARCH", "value": "MARCH" }, + { "id": 4, "code": "APRIL", "value": "APRIL" }, + { "id": 5, "code": "MAY", "value": "MAY" }, + { "id": 6, "code": "JUNE", "value": "JUNE" }, + { "id": 7, "code": "JULY", "value": "JULY" }, + { "id": 8, "code": "AUGUST", "value": "AUGUST" }, + { "id": 9, "code": "SEPTEMBER", "value": "SEPTEMBER"}, + { "id": 10, "code": "OCTOBER", "value": "OCTOBER"}, + { "id": 11, "code": "NOVEMBER", "value": "NOVEMBER" } + ], + "weekDays": [ + { "id": 1, "code": "calendarWeekDaysType.monday", "value": "MO" }, + { "id": 2, "code": "calendarWeekDaysType.tuesday", "value": "TU" }, + { "id": 3, "code": "calendarWeekDaysType.wednesday", "value": "WE" }, + { "id": 4, "code": "calendarWeekDaysType.thursday", "value": "TH"}, + { "id": 5, "code": "calendarWeekDaysType.friday", "value": "FR" }, + { "id": 6, "code": "calendarWeekDaysType.saturday", "value": "SA" }, + { "id": 7, "code": "calendarWeekDaysType.sunday", "value": "SU" } + ], + "frequencyTypeOptions": [ + { "id": 1, "code": "calendarFrequencyType.daily", "value": "DAILY" }, + { "id": 2, "code": "calendarFrequencyType.weekly", "value": "WEEKLY"}, + { "id": 3, "code": "calendarFrequencyType.monthly", "value": "MONTHLY"}, + { "id": 4, "code": "calendarFrequencyType.yearly", "value": "YEARLY" } + ], + "periodFrequencyOptions": [ + { "id": 0, "code": "periodFrequencyType.days", "value": "DAYS" }, + { "id": 1, "code": "periodFrequencyType.weeks", "value": "WEEKS" }, + { "id": 2, "code": "periodFrequencyType.months", "value": "MONTHS" }, + { "id": 3, "code": "periodFrequencyType.years", "value": "YEARS" } + ] + } + + smscampaigns/template + + { + "smsProviderOptions": [{ + "id": 1, + "tenantId": "1", + "phoneNo": "+XXXXXXXXXX", + "providerName": "Twilio SMS Provider", + "providerDescription": "Twilio, just for testing" + }], + "businessRulesOptions": [ + { + "reportId": 166, + "reportName": "Active Clients", + "reportType": "SMS", + "reportSubType": "NonTriggered", + "reportDescription": "All clients with the status ‘Active’", + "reportParamName": { + "Office": "OfficeIdSelectOne", + "Loan Officer": "loanOfficerIdSelectAll" + } + } + ], + "triggerTypeOptions": [ + {"id": 1,"code": "triggerType.direct", "value": "Direct"}, + {"id": 2, "code": "triggerType.schedule","value": "Scheduled"}, + {"id": 3,"code": "triggerType.triggered","value": "Triggered"} + ], + "months": [ + { "id": 1, "code": "JANUARY", "value": "JANUARY" }, + { "id": 2, "code": "FEBRUARY", "value": "FEBRUARY" }, + { "id": 3, "code": "MARCH", "value": "MARCH" }, + { "id": 4, "code": "APRIL", "value": "APRIL" }, + { "id": 5, "code": "MAY", "value": "MAY" }, + { "id": 6, "code": "JUNE", "value": "JUNE" }, + { "id": 7, "code": "JULY", "value": "JULY" }, + { "id": 8, "code": "AUGUST", "value": "AUGUST" }, + { "id": 9, "code": "SEPTEMBER", "value": "SEPTEMBER"}, + { "id": 10, "code": "OCTOBER", "value": "OCTOBER"}, + { "id": 11, "code": "NOVEMBER", "value": "NOVEMBER" } + ], + "weekDays": [ + { "id": 1, "code": "calendarWeekDaysType.monday", "value": "MO" }, + { "id": 2, "code": "calendarWeekDaysType.tuesday", "value": "TU" }, + { "id": 3, "code": "calendarWeekDaysType.wednesday", "value": "WE" }, + { "id": 4, "code": "calendarWeekDaysType.thursday", "value": "TH"}, + { "id": 5, "code": "calendarWeekDaysType.friday", "value": "FR" }, + { "id": 6, "code": "calendarWeekDaysType.saturday", "value": "SA" }, + { "id": 7, "code": "calendarWeekDaysType.sunday", "value": "SU" } + ], + "frequencyTypeOptions": [ + { "id": 1, "code": "calendarFrequencyType.daily", "value": "DAILY" }, + { "id": 2, "code": "calendarFrequencyType.weekly", "value": "WEEKLY"}, + { "id": 3, "code": "calendarFrequencyType.monthly", "value": "MONTHLY"}, + { "id": 4, "code": "calendarFrequencyType.yearly", "value": "YEARLY" } + ], + "periodFrequencyOptions": [ + { "id": 0, "code": "periodFrequencyType.days", "value": "DAYS" }, + { "id": 1, "code": "periodFrequencyType.weeks", "value": "WEEKS" }, + { "id": 2, "code": "periodFrequencyType.months", "value": "MONTHS" }, + { "id": 3, "code": "periodFrequencyType.years", "value": "YEARS" } + ] + } + + + + +
+
+ +   +
+
+

Update a Campaign

+
+
+ PUT https://Domain Name/api/v1/smscampaigns/{campaignId} + POST smscampaigns/1 + Content-Type: application/json + Request Body: + { + "message": "Hello your savings account {savingsAccountNo} debited with {withdrawAmount}" + + } + + + { + "resourceId": 1, + "changes": { + "message": "Hello your savings account {savingsAccountNo} debited with {withdrawAmount}" + } + } + +
+
+ +   +
+
+

Delete a SMS Campaign

+

+ Note: Only closed SMS Campaigns can be + deleted +

+
+
+ + DELETE https://DomainName/api/v1/smscampaigns/{campaignId} + + + DELETE smscampaigns/1 + Content-Type: application/json + No Request Body: + + + { + "resourceId": 1, + "changes": {} + } + +
+
+ +   +
+
+

Activates SMS Campaign

+ +
+
+ POST https://Domain + Name/api/v1/smscampaigns/{campaignId}?command=activate + POST smscampaigns/1?command=activate + Content-Type: application/json + Request Body: + { + "activationDate":"01 May 2016", + "locale":"en", + "dateFormat":"dd MMMM yyyy" + } + + + { + + "resourceId": 1, + "changes": { + "status": { + "id": 300, + "code": "smsCampaignStatus.active", + "value": "active", + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "activationDate": "01 May 2016" + } + } + +
+
+ +   +
+
+

Deactivates SMS Campaign

+ +
+
+ POST https://Domain + Name/api/v1/smscampaigns/{campaignId}?command=close + POST smscampaigns/1?command=close + Content-Type: application/json + Request Body: + { + "closureDate":"01 May 2016", + "locale":"en", + "dateFormat":"dd MMMM yyyy" + } + + + { + "resourceId": 1, + "changes": { + "status": { + "id": 600, + "code": "smsCampaignStatus.closed", + "value": "closed", + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "closureDate": "01 May 2016" + } + } + +
+
+ +   +
+
+

Reactivates SMS Campaign

+ +
+
+ POST https://Domain + Name/api/v1/smscampaigns/{campaignId}?command=reactivate + POST smscampaigns/1?command=reactivate + Content-Type: application/json + Request Body: + { + "activationDate":"01 May 2016", + "locale":"en", + "dateFormat":"dd MMMM yyyy" + } + + + { + + "resourceId": 1, + "changes": { + "status": { + "id": 300, + "code": "smsCampaignStatus.active", + "value": "active", + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "activationDate": "01 May 2016" + } + } + +
+
+ +   +
+
+

Create a Share Product

+ + + + + + + +
+
Mandatory Fields
+
name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, locale, + totalShares, unitPrice, + nominalShares,allowDividendCalculationForInactiveClients,accountingRule +
+
+ + + + + + + +
+
Mandatory Fields for Cash based accounting (accountingRule = + 2) +
+
shareReferenceId, shareSuspenseId, shareEquityId, incomeFromFeeAccountId
+
+ + + + + + +
+
Optional Fields
+
sharesIssued, minimumShares, maximumShares, minimumActivePeriodForDividends, + minimumactiveperiodFrequencyType, + lockinPeriodFrequency, lockinPeriodFrequencyType, marketPricePeriods, chargesSelected +
+
+
+ + POST https://Domain Name/api/v1/products/share + POST shareproducts + Content-Type: application/json + Request Body: + { + "name": "Share Product", + "shortName": "SP", + "description": "Description", + "currencyCode": "USD", + "digitsAfterDecimal": 2, + "inMultiplesOf": "1", + "locale": "en", + "totalShares": "1000", + "sharesIssued": "1000", + "unitPrice": "1", + "minimumShares": "10", + "nominalShares": "20", + "maximumShares": "30", + "minimumActivePeriodForDividends": "1", + "minimumactiveperiodFrequencyType": 0, + "lockinPeriodFrequency": "1", + "lockinPeriodFrequencyType": 1, + "allowDividendCalculationForInactiveClients": "true", + "marketPricePeriods": [{ + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "fromDate": "04 May 2016", + "shareValue": "2" + }], + "chargesSelected": [{ + "id": 20 + }], + "accountingRule": "1" + } + + + + { + "resourceId": 1 + } + + POST shareproducts + Content-Type: application/json + Request Body: + { + "name": "Share Product", + "shortName": "SP", + "description": "Description", + "currencyCode": "USD", + "digitsAfterDecimal": 2, + "inMultiplesOf": "1", + "locale": "en", + "totalShares": "100000", + "sharesIssued": "100000", + "unitPrice": "1", + "minimumShares": "1000", + "nominalShares": "2000", + "maximumShares": "5000", + "minimumActivePeriodForDividends": "1", + "minimumactiveperiodFrequencyType": 0, + "lockinPeriodFrequency": "1", + "lockinPeriodFrequencyType": 1, + "allowDividendCalculationForInactiveClients": "true", + "marketPricePeriods": [{ + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "fromDate": "04 May 2016", + "shareValue": "2" + }], + "chargesSelected": [{ + "id": 20 + }], + "accountingRule": "2", + "shareReferenceId": 5, + "shareSuspenseId": 8, + "shareEquityId": 66, + "incomeFromFeeAccountId": 2 + } + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

Retrieve a Share Product

+

Example Requests:

+
products/share/1
+

+
products/share/1?template=true
+
+
+ GET https://Domain Name/api/v1/products/share/1 + + { + "id": 1, + "name": "Share Product", + "shortName": "SP", + "description": "SP", + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 100, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "totalShares": 100, + "totalSharesIssued": 50, + "unitPrice": 1.00, + "shareCapital": 50.00, + "minimumShares": 1, + "nominalShares": 10, + "maximumShares": 50, + "marketPrice": [ + { + "id": 4, + "fromDate": "Feb 1, 2016", + "shareValue": 1.00 + }, + { + "id": 5, + "fromDate": "May 3, 2016", + "shareValue": 5.00 + }], + "charges": [{ + "id": 20, + "name": "Share Account Activation Flat", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 1.000000, + "chargeTimeType": { + "id": 13, + "code": "chargeTimeType.activation", + "value": "Share Account Activate" + }, + "chargeAppliesTo": { + "id": 4, + "code": "chargeAppliesTo.shares", + "value": "Shares" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + }], + "allowDividendCalculationForInactiveClients": true, + "lockinPeriod": 1, + "lockPeriodTypeEnum": { + "id": 0, + "value": "Days" + }, + "minimumActivePeriod": 1, + "minimumActivePeriodForDividendsTypeEnum": { + "id": 0, + "value": "Days" + }, + "accountingRule": { + "id": 2, + "code": "accountingRuleType.cash", + "value": "CASH BASED" + }, + "accountingMappings": { + "shareReferenceId": { + "id": 1, + "name": "ACCOUNT_NAME_1FJBQ", + "glCode": "ASSET_ED1461237837829" + }, + "incomeFromFeeAccountId": { + "id": 14, + "name": "ACCOUNT_NAME_1FJBQ", + "glCode": "INCOME_OY1461237869836" + }, + "shareEquityId": { + "id": 66, + "name": "Equity Account", + "glCode": "EQUITY1" + }, + "shareSuspenseId": { + "id": 8, + "name": "ACCOUNT_NAME_1FJBQ", + "glCode": "LIABILITY_MA1461237860198" + } + }, + "currencyOptions": [{ + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }], + "chargeOptions": [{ + "id": 20, + "name": "Share Account Activation Flat", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 1.000000, + "chargeTimeType": { + "id": 13, + "code": "chargeTimeType.activation", + "value": "Share Account Activate" + }, + "chargeAppliesTo": { + "id": 4, + "code": "chargeAppliesTo.shares", + "value": "Shares" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + }, + { + "id": 21, + "name": "Share Purchase %", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 0.500000, + "chargeTimeType": { + "id": 14, + "code": "chargeTimeType.sharespurchase", + "value": "Share Purchase" + }, + "chargeAppliesTo": { + "id": 4, + "code": "chargeAppliesTo.shares", + "value": "Shares" + }, + "chargeCalculationType": { + "id": 2, + "code": "chargeCalculationType.percent.of.amount", + "value": "% Amount" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + } + ], + "minimumActivePeriodFrequencyTypeOptions": [{ + "id": 0, + "code": "savings.lockin.sharePeriodFrequencyType.days", + "value": "Days" + }], + "lockinPeriodFrequencyTypeOptions": [{ + "id": 0, + "code": "savings.lockin.sharePeriodFrequencyType.days", + "value": "Days" + }, + { + "id": 1, + "code": "savings.lockin.sharePeriodFrequencyType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "savings.lockin.sharePeriodFrequencyType.months", + "value": "Months" + }, + { + "id": 3, + "code": "savings.lockin.sharePeriodFrequencyType.years", + "value": "Years" + }], + "accountingMappingOptions": { + "liabilityAccountOptions": [{ + "id": 4, + "name": "ACCOUNT_NAME_1FJBQ", + "glCode": "LIABILITY_2T1461237838897", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 2, + "code": "accountType.liability", + "value": "LIABILITY" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "description": "DEFAULT_DESCRIPTION", + "nameDecorated": "ACCOUNT_NAME_1FJBQ", + "tagId": { + "id": 0, + "isActive": false + } + }], + "assetAccountOptions": [{ + "id": 1, + "name": "ACCOUNT_NAME_1FJBQ", + "glCode": "ASSET_ED1461237837829", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "description": "DEFAULT_DESCRIPTION", + "nameDecorated": "ACCOUNT_NAME_1FJBQ", + "tagId": { + "id": 0, + "isActive": false + } + }], + "incomeAccountOptions": [{ + "id": 2, + "name": "ACCOUNT_NAME_1FJBQ", + "glCode": "INCOME_9O1461237838422", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 4, + "code": "accountType.income", + "value": "INCOME" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "description": "DEFAULT_DESCRIPTION", + "nameDecorated": "ACCOUNT_NAME_1FJBQ", + "tagId": { + "id": 0, + "isActive": false + } + }], + "equityAccountOptions": [{ + "id": 66, + "name": "Equity Account", + "glCode": "EQUITY1", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 3, + "code": "accountType.equity", + "value": "EQUITY" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "Equity Account", + "tagId": { + "id": 0, + "isActive": false + } + }] + } + } + +
+
+ +   +
+
+

Update a Share Product

+
+
+ PUT https://Domain Name/api/v1/products/share/{productId} + POST shareproducts/1 + Content-Type: application/json + Request Body: + { + "description": "Share Product Description.", + "locale": "en", + "unitPrice": "5.0" + } + + + { + "resourceId": 1, + "changes": { + "description": "Share Product Description.", + "unitPrice": 5.0, + "locale": "en" + } + } + +
+
+ +   +
+
+

List Share Products

+ + + + + + + +
+
Mandatory Fields
+
limit, offset
+

Example Requests:

+
shareproducts
+
+
+ + GET https://Domain Name/api/v1/products/share?limit=10&offset=0 + + + { + "totalFilteredRecords": 1, + "pageItems": [{ + "id": 1, + "name": "Share Product", + "shortName": "Share Product Description", + "totalShares": 100 + }] + } + +
+
+ +   +
+
+

Create a Savings Product

+ + + + + + + +
+
Mandatory Fields
+
name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, + nominalAnnualInterestRate, + interestCompoundingPeriodType, interestCalculationType, + interestCalculationDaysInYearType,accountingRule +
+
+ + + + + + + +
+
Mandatory Fields for Cash based accounting (accountingRule = + 2) +
+
savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, + incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId +
+
+ + + + + + +
+
Optional Fields
+
minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType, + withdrawalFeeForTransfers, paymentChannelToFundSourceMappings, feeToIncomeAccountMappings, + penaltyToIncomeAccountMappings, charges, allowOverdraft, overdraftLimit, + minBalanceForInterestCalculation,withHoldTax,taxGroupId +
+
+
+ POST https://Domain Name/api/v1/savingsproducts + POST savingsproducts + Content-Type: application/json + Request Body: + { + "name": "Passbook Savings", + "shortName": "PBSV", + "description": "Daily compounding using Daily Balance, 5% per year, 365 days in year", + "currencyCode": "USD", + "digitsAfterDecimal": 2, + "inMultiplesOf": 0, + "locale": "en", + "nominalAnnualInterestRate": "5.0", + "interestCompoundingPeriodType": 1, + "interestPostingPeriodType":4, + "interestCalculationType": 1, + "interestCalculationDaysInYearType": "365", + "accountingRule":"1", + "charges":[{"id":"1"}] + } + + + { + "resourceId": 1 + } + + POST savingsproducts + Content-Type: application/json + Request Body: + { + "locale": "en", + "name": "New Passbook Savings ", + "shortName": "NPBS", + "description": "A savings product", + "currencyCode": "USD", + "digitsAfterDecimal": "2", + "inMultiplesOf": 0, + "nominalAnnualInterestRate": "15", + "interestCompoundingPeriodType": "1", + "interestPostingPeriodType": "4", + "interestCalculationType": "1", + "interestCalculationDaysInYearType": "365", + "minRequiredOpeningBalance": "50", + "allowOverdraft":true, + "overdraftLimit":5000, + "minBalanceForInterestCalculation":5000, + "minRequiredBalance":20, + "enforceMinRequiredBalance":true, + "lockinPeriodFrequency": "4", + "lockinPeriodFrequencyType": "1", + "withdrawalFeeForTransfers":false, + "accountingRule": "2", + "charges":[{"id":"1"},{"id":3}] + "savingsReferenceAccountId": "16", + "transfersInSuspenseAccountId": "16", + "savingsControlAccountId": "15", + "interestOnSavingsAccountId": "18", + "incomeFromFeeAccountId": "4", + "incomeFromPenaltyAccountId": "4", + "feeToIncomeAccountMappings":[ + { + "chargeId":"6", + "incomeAccountId":"16" + } + ], + "penaltyToIncomeAccountMappings":[ + { + "chargeId":"4", + "incomeAccountId":"15" + } + ], + "paymentChannelToFundSourceMappings": [ + { + "paymentTypeId": "14", + "fundSourceAccountId": "2" + } + ] + } + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

Retrieve a Savings Product

+

Example Requests:

+
savingsproducts/1
+

+
savingsproducts/1?template=true
+

+
savingsproducts/1?fields=name,description
+
+
+ GET https://Domain Name/api/v1/savingsproducts/1 + + { + "id": 1, + "name": "savings product", + "shortName": "sa1", + "description": "gtasga", + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "nominalAnnualInterestRate": 5.000000, + "interestCompoundingPeriodType": { + "id": 1, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", + "value": "Daily" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "withdrawalFeeForTransfers": false, + "accountingRule": { + "id": 2, + "code": "accountingRuleType.cash", + "value": "CASH BASED" + }, + "accountingMappings": { + "savingsReferenceAccount": { + "id": 12, + "name": "savings ref", + "glCode": "20" + }, + "incomeFromFeeAccount": { + "id": 16, + "name": "income from savings fee", + "glCode": "24" + }, + "incomeFromPenaltyAccount": { + "id": 17, + "name": "income from sav penalites", + "glCode": "25" + }, + "interestOnSavingsAccount": { + "id": 15, + "name": "interest on savings", + "glCode": "23" + }, + "savingsControlAccount": { + "id": 13, + "name": "savings ref tool kit", + "glCode": "21" + }, + "transfersInSuspenseAccount": { + "id": 14, + "name": "saving transfers", + "glCode": "22" + } + }, + "paymentChannelToFundSourceMappings": [ + { + "paymentType": { + "id": 10, + "name": "check" + }, + "fundSourceAccount": { + "id": 12, + "name": "savings ref", + "glCode": "20" + } + } + ], + "feeToIncomeAccountMappings": [ + { + "charge": { + "id": 11, + "name": "sav charge", + "active": false, + "penalty": false + }, + "incomeAccount": { + "id": 16, + "name": "income from savings fee", + "glCode": "24" + } + } + ], + "penaltyToIncomeAccountMappings": [ + { + "charge": { + "id": 12, + "name": "sav 2", + "active": false, + "penalty": true + }, + "incomeAccount": { + "id": 17, + "name": "income from sav penalites", + "glCode": "25" + } + } + ], + "charges": [] + } + +
+
+ +   +
+
+

Update a Savings Product

+
+
+ PUT https://Domain Name/api/v1/savingsproducts/{productId} + POST savingsproducts/1 + Content-Type: application/json + Request Body: + { + "description": "Passbook Savings Lite.", + "locale": "en", + "interestRate": "5.73" + } + + + { + "resourceId": 1, + "changes": { + "description": "Passbook Savings Lite.", + "interestRate": 5.73, + "locale": "en" + } + } + +
+
+ +   +
+
+

Delete a Savings Product

+
+
+ + DELETE https://Domain Name/api/v1/savingsproducts/{productId} + + + DELETE savingsproducts/1 + Content-Type: application/json + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

List Savings Products

+

Example Requests:

+
savingsproducts
+

+
savingsproducts?fields=name
+
+
+ GET https://Domain Name/api/v1/savingsproducts + + [ + { + "id": 1, + "name": "Savings product", + "shortName": "sa1", + "description": "gtasga", + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "nominalAnnualInterestRate": 5.000000, + "interestCompoundingPeriodType": { + "id": 1, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", + "value": "Daily" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "withdrawalFeeForTransfers": false, + "accountingRule": { + "id": 2, + "code": "accountingRuleType.cash", + "value": "CASH BASED" + } + } + ] +
+
+ + + +   +
+
+

Fixed Deposit Product:

+

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.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
name
The name of the product offering.
shortName
Shortname associated with a fixed deposit product.
+ An abbreviated version of the name, used in reports or menus where space is limited. +
description
A description of the product offering.
currencyCode
Three letter ISO code representing currency.
digitsAfterDecimal
Override the currency default value for digitsAfterDecimal.
inMultiplesOf
Override the default value for rounding currency to multiples of provided + value. +
interestCompoundingPeriodType
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end + of month) +
interestPostingPeriodType
The period at which interest rate is posted or credited to fixed deposit + account. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, + 30th Sep, 31st Dec) +
interestCalculationType
The interest calculation method used: 1=Daily Balance or 2=Average Daily + Balance +
interestCalculationDaysInYearType
The setting for number of days in year to use: 360=360 Days, 365=365 Days +
lockinPeriodFrequency
Optional: If provided, used along with + lockinPeriodFrequencyType to indicate the length of time that the fixed deposit + account is 'locked in' and premature closure is not allowed. e.g. 2 Months +
lockinPeriodFrequencyType
Optional: If provided, used along with lockinPeriodFrequency + to indicate the length of time that the fixed deposit account is 'locked in' and premature + closure is not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years + e.g. 2 Months
minDepositTerm
This is used along with minDepositTermTypeId to define allowed + minimum deposit term for creating a fixed deposit account using this product. e.g. 6 + Months +
minDepositTermTypeId
Used along with minDepositTerm to define allowed minimum deposit + term for creating a fixed deposit account using this product. 0=Days, 1=Weeks, 2=Months, + 3=Years + e.g. 6 Months +
maxDepositTerm
Optional: If provided, used along with maxDepositTermTypeId to + define allowed maximum deposit term for creating a fixed deposit account using this product. + e.g. 3 Years +
maxDepositTermTypeId
Optional: If provided, used along with maxDepositTerm to + define allowed maximum deposit term for creating a fixed deposit account using this product. + 0=Days, 1=Weeks, 2=Months, 3=Years + e.g. 3 Years +
inMultiplesOfDepositTerm
Optional: If provided, used along with inMultiplesOfDepositTermTypeId + to indicate the allowed deposit periods after minimum deposit period. e.g. If + inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after + minimum deposit of 6 Months should be 9 Months.
inMultiplesOfDepositTermTypeId
Optional: If provided, used along with + inMultiplesOfDepositTerm to indicate the allowed deposit periods after minimum + deposit period. 0=Days, 1=Weeks, 2=Months, 3=Years + e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period + after minimum deposit of 6 Months should be 9 Months. +
preClosurePenalApplicable
Optional: expects boolean value true/false, If provided as true then + must provide preClosurePenalInterest and preClosurePenalInterestOnTypeId. +
preClosurePenalInterest
Optional: Must provide when preClosurePenalApplicable is true. + Used along with preClosurePenalInterestOnTypeId to apply a penalalty on top of + applicable interest rate for Pre-mature closure of accounts. e.g. “1%” means 1% less than + the interest rate applicable. +
preClosurePenalInterestOnTypeId
Optional: Must provide when preClosurePenalApplicable is true. + Used along with preClosurePenalInterest to decide what should be the applicable + interest rate to which penalalty can be applied on Pre-mature closure of accounts. 1=Whole + Term, 2=Till Premature withdrawal e.g. “1%” means 1% less than the interest rate applicable + till premature withdrawal. +
accountingRule
Specifies if accounting is enabled for the particular + product and the type of the accounting rule to be used + Example Values:1=NONE,2=CASH_BASED +
withHoldTax
Optional: If provided, sets an indicator for applying withhold tax on + interest posting for savings account +
taxGroupId
Optional: If withhold tax set as true, with hold tax will be applied + as per the tax group provided +
+
+
+ +   +
+
+

Create a Fixed Deposit Product

+ + + + + + + +
+
Mandatory Fields
+
name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, + interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, + minDepositTerm, minDepositTermTypeId, accountingRule +
+
+ + + + + + + +
+
Mandatory Fields for Cash based accounting (accountingRule = + 2) +
+
savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, + incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId +
+
+ + + + + + +
+
Optional Fields
+
lockinPeriodFrequency, lockinPeriodFrequencyType, maxDepositTerm, maxDepositTermTypeId, + inMultiplesOfDepositTerm, inMultiplesOfDepositTermTypeId, preClosurePenalApplicable, + preClosurePenalInterest, preClosurePenalInterestOnTypeId, feeToIncomeAccountMappings, + penaltyToIncomeAccountMappings, charges, charts, , withHoldTax, taxGroupId +
+
+
+ POST https://Domain Name/api/v1/fixeddepositproducts + POST fixeddepositproducts + Content-Type: application/json + Request Body: + { + "name": "Fixed deposit product", + "shortName": "FD01", + "description": "Daily compounding using Daily Balance, 5% per year, 365 days in year", + "currencyCode": "USD", + "digitsAfterDecimal": 2, + "inMultiplesOf": 0, + "locale": "en", + "interestCompoundingPeriodType": 1, + "interestPostingPeriodType":4, + "interestCalculationType": 1, + "interestCalculationDaysInYearType": "365", + "accountingRule":"1", + "preClosurePenalApplicable":"true", + "preClosurePenalInterest":"1.75", + "preClosurePenalInterestOnTypeId":1, + "minDepositTerm":1, + "minDepositTermTypeId":1, + "maxDepositTerm":5, + "maxDepositTermTypeId":3, + "charts":[ + { + "fromDate": "01 Jan 2014", + "locale":"en", + "dateFormat":"dd MMMM yyyy", + "dateFormat":"dd MMMM yyyy", + "chartSlabs":[ + { + "description":"from 0 to 90 days", + "periodType":"1", + "fromPeriod":"0", + "toPeriod":"90", + "annualInterestRate":"4.5" + } + ] + } + ] + } + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

Retrieve a Fixed Deposit Product

+

Example Requests:

+
fixeddepositproducts/1
+

+
fixeddepositproducts/1?template=true
+

+
fixeddepositproducts/1?fields=name,description
+
+
+ GET https://Domain Name/api/v1/fixeddepositproducts/1 + + { + "id": 1, + "name": "Fixed deposit product", + "shortName": "FD01", + "description": "Daily compounding using Daily Balance, 5% per year, 365 days in year", + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "interestCompoundingPeriodType": { + "id": 1, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", + "value": "Daily" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "accountingMappings": { + "savingsReferenceAccount": { + "id": 12, + "name": "savings ref", + "glCode": "20" + }, + "incomeFromFeeAccount": { + "id": 16, + "name": "income from savings fee", + "glCode": "24" + }, + "incomeFromPenaltyAccount": { + "id": 17, + "name": "income from sav penalites", + "glCode": "25" + }, + "interestOnSavingsAccount": { + "id": 15, + "name": "interest on savings", + "glCode": "23" + }, + "savingsControlAccount": { + "id": 13, + "name": "savings ref tool kit", + "glCode": "21" + }, + "transfersInSuspenseAccount": { + "id": 14, + "name": "saving transfers", + "glCode": "22" + } + }, + "feeToIncomeAccountMappings": [ + { + "charge": { + "id": 11, + "name": "sav charge", + "active": false, + "penalty": false + }, + "incomeAccount": { + "id": 16, + "name": "income from savings fee", + "glCode": "24" + } + } + ], + "penaltyToIncomeAccountMappings": [ + { + "charge": { + "id": 12, + "name": "sav 2", + "active": false, + "penalty": true + }, + "incomeAccount": { + "id": 17, + "name": "income from sav penalites", + "glCode": "25" + } + } + ], + "preClosurePenalApplicable":"true", + "preClosurePenalInterest":"1.75", + "preClosurePenalInterestOnType": { + "id": 1, + "code": "preClosurePenalInterestOnType.wholeTerm", + "value": "Whole term" + }, + "minDepositTerm":1, + "minDepositTermType": { + "id": 1, + "code": "deposit.term.savingsPeriodFrequencyType.weeks", + "value": "Weeks" + }, + "maxDepositTerm":5, + "maxDepositTermType": { + "id": 3, + "code": "deposit.term.savingsPeriodFrequencyType.years", + "value": "Years" + }, + "activeChart": { + "id": 8, + "fromDate": [ + 2014, + 1, + 1 + ], + "savingsProductId": 8, + "savingsProductName": "Fixed deposit product", + "chartSlabs": [ + { + "id": 18, + "description": "from 0 to 90 days", + "periodType": { + "id": 1, + "code": "interestChartPeriodType.weeks", + "value": "Weeks" + }, + "fromPeriod": 0, + "toPeriod": 90, + "annualInterestRate": 4.5, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + } + ], + "periodTypes": [ + { + "id": 0, + "code": "interestChartPeriodType.days", + "value": "Days" + }, + { + "id": 1, + "code": "interestChartPeriodType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "interestChartPeriodType.months", + "value": "Months" + }, + { + "id": 3, + "code": "interestChartPeriodType.years", + "value": "Years" + } + ] + } + } + +
+
+ +   +
+
+

Update a Fixed Deposit Product

+
+
+ PUT https://Domain Name/api/v1/fixeddepositproducts/{productId} + POST fixeddepositproducts/1 + Content-Type: application/json + Request Body: + { + "description": "Fixed deposit product new offerings", + "locale": "en", + "minDepositTerm":5, + "minDepositTermTypeId":1, + } + + + { + "resourceId": 1, + "changes": { + "description": "Fixed deposit product new offerings", + "minDepositTerm": 5 + } + } + +
+
+ +   +
+
+

Delete a Fixed Deposit Product

+
+
+ + DELETE https://Domain Name/api/v1/fixeddepositdproducts/{productId} + + + DELETE fixeddepositdproducts/1 + Content-Type: application/json + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

List Fixed Deposit Products

+

Example Requests:

+
fixeddepositproducts
+

+
fixeddepositproducts?fields=name
+
+
+ GET https://Domain Name/api/v1/fixeddepositproducts + + [ + { + "id": 3, + "name": "FD01", + "shortName": "FD01", + "description": "FD01", + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "preClosurePenalApplicable": false, + "minDepositTerm": 3, + "maxDepositTerm": 4, + "minDepositTermType": { + "id": 2, + "code": "deposit.term.savingsPeriodFrequencyType.months", + "value": "Months" + }, + "maxDepositTermType": { + "id": 3, + "code": "deposit.term.savingsPeriodFrequencyType.years", + "value": "Years" + }, + "nominalAnnualInterestRate": 0, + "interestCompoundingPeriodType": { + "id": 4, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "accountingRule": { + "id": 1, + "code": "accountingRuleType.none", + "value": "NONE" + } + } + ] +
+
+ + + +   +
+
+

Recurring Deposit Product:

+

Recurring Deposits are a special kind of Term Deposits offered by MFI's. The Recurring Deposit + Products (aka RD) product offerings are modeled using this API.

+

Recurring Deposits help people with regular incomes to deposit a fixed amount every month (specified + recurring frequency) into their Recurring Deposit account.

+

When creating recurring deposit accounts, the details from the recurring deposit product are used to + auto fill details of the recurring deposit account application process.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + e.g. 2 Months + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
name
The name of the product offering.
shortName
Shortname associated with a recurring deposit product.
+ An abbreviated version of the name, used in reports or menus where space is limited. +
description
A description of the product offering.
currencyCode
Three letter ISO code representing currency.
digitsAfterDecimal
Override the currency default value for digitsAfterDecimal.
inMultiplesOf
Override the default value for rounding currency to multiples of provided + value. +
interestCompoundingPeriodType
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end + of month) +
interestPostingPeriodType
The period at which interest rate is posted or credited to recurring deposit + account. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, + 30th Sep, 31st Dec) +
interestCalculationType
The interest calculation method used: 1=Daily Balance or 2=Average Daily + Balance +
interestCalculationDaysInYearType
The setting for number of days in year to use: 360=360 Days, 365=365 Days +
lockinPeriodFrequency
Optional: If provided, used along with + lockinPeriodFrequencyType to indicate the length of time that the recurring deposit + account is 'locked in' and premature closure is not allowed. e.g. 2 Months +
lockinPeriodFrequencyType
recurringDepositFrequency
The frequency for depositing a fixed amount to recurring deposit account. +
recurringDepositFrequencyTypeId
Used along with recurringDepositFrequency to define frequency for + depositing a fixed amount to recurring deposit account. 0=Days, 1=Weeks, 2=Months, 3=Years + e.g. deposit every 1 Months +
minDepositTerm
This is used along with minDepositTermTypeId to define allowed + minimum deposit term for creating a recurring deposit account using this product. e.g. + 6 Months +
minDepositTermTypeId
Used along with minDepositTerm to define allowed minimum deposit + term for creating a recurring deposit account using this product. 0=Days, 1=Weeks, 2=Months, + 3=Years + e.g. 6 Months +
maxDepositTerm
Optional: If provided, used along with maxDepositTermTypeId to + define allowed maximum deposit term for creating a recurring deposit account using this + product. e.g. 3 Years +
maxDepositTermTypeId
Optional: If provided, used along with maxDepositTerm to + define allowed maximum deposit term for creating a recurring deposit account using this + product. 0=Days, 1=Weeks, 2=Months, 3=Years + e.g. 3 Years +
inMultiplesOfDepositTerm
Optional: If provided, used along with inMultiplesOfDepositTermTypeId + to indicate the allowed deposit periods after minimum deposit period. e.g. If + inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after + minimum deposit of 6 Months should be 9 Months.
inMultiplesOfDepositTermTypeId
Optional: If provided, used along with + inMultiplesOfDepositTerm to indicate the allowed deposit periods after minimum + deposit period. 0=Days, 1=Weeks, 2=Months, 3=Years + e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period + after minimum deposit of 6 Months should be 9 Months. +
preClosurePenalApplicable
Optional: expects boolean value true/false, If provided as true then + must provide preClosurePenalInterest and preClosurePenalInterestOnTypeId. +
preClosurePenalInterest
Optional: Must provide when preClosurePenalApplicable is true. + Used along with preClosurePenalInterestOnTypeId to apply a penalalty on top of + applicable interest rate for Pre-mature closure of accounts. e.g. “1%” means 1% less than + the interest rate applicable. +
preClosurePenalInterestOnTypeId
Optional: Must provide when preClosurePenalApplicable is true. + Used along with preClosurePenalInterest to decide what should be the applicable + interest rate to which penalalty can be applied on Pre-mature closure of accounts. 1=Whole + Term, 2=Till Premature withdrawal e.g. “1%” means 1% less than the interest rate applicable + till premature withdrawal. +
accountingRule
Specifies if accounting is enabled for the particular + product and the type of the accounting rule to be used + Example Values:1=NONE,2=CASH_BASED +
withHoldTax
Optional: If provided, sets an indicator for applying withhold tax on + interest posting for savings account +
taxGroupId
Optional: If withhold tax set as true, with hold tax will be applied + as per the tax group provided +
+
+
+ +   +
+
+

Create a Recurring Deposit Product

+ + + + + + + +
+
Mandatory Fields
+
name, shortName, description, currencyCode, digitsAfterDecimal,inMultiplesOf, + interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, + minDepositTerm, minDepositTermTypeId, recurringDepositFrequency, + recurringDepositFrequencyTypeId, accountingRule, depositAmount +
+
+ + + + + + + +
+
Mandatory Fields for Cash based accounting (accountingRule = + 2) +
+
savingsReferenceAccountId, savingsControlAccountId, interestOnSavingsAccountId, + incomeFromFeeAccountId, transfersInSuspenseAccountId, incomeFromPenaltyAccountId +
+
+ + + + + + +
+
Optional Fields
+
lockinPeriodFrequency, lockinPeriodFrequencyType, maxDepositTerm, maxDepositTermTypeId, + inMultiplesOfDepositTerm, inMultiplesOfDepositTermTypeId, preClosurePenalApplicable, + preClosurePenalInterest, preClosurePenalInterestOnTypeId, feeToIncomeAccountMappings, + penaltyToIncomeAccountMappings, charges, charts, minDepositAmount, maxDepositAmount, + withHoldTax, taxGroupId +
+
+
+ POST https://Domain Name/api/v1/recurringdepositproducts + POST recurringdepositproducts + Content-Type: application/json + Request Body: + { + "name": "Recurring deposit product", + "shortName": "RD01", + "description": "Daily compounding using Daily Balance, 5% per year, 365 days in year", + "currencyCode": "USD", + "digitsAfterDecimal": 2, + "inMultiplesOf": 0, + "locale": "en", + "interestCompoundingPeriodType": 1, + "interestPostingPeriodType":4, + "interestCalculationType": 1, + "interestCalculationDaysInYearType": "365", + "accountingRule":"1", + "recurringDepositFrequency":1, + "recurringDepositFrequencyTypeId":2, + "preClosurePenalApplicable":"true", + "preClosurePenalInterest":"1.75", + "preClosurePenalInterestOnTypeId":1, + "minDepositTerm":1, + "minDepositTermTypeId":1, + "maxDepositTerm":5, + "maxDepositTermTypeId":3, + depositAmount: "10000", + minDepositAmount: "100", + maxDepositAmount: "1000000", + "charts":[ + { + "fromDate": "01 Jan 2014", + "locale":"en", + "dateFormat":"dd MMMM yyyy", + "dateFormat":"dd MMMM yyyy", + "chartSlabs":[ + { + "description":"from 0 to 90 days", + "periodType":"1", + "fromPeriod":"0", + "toPeriod":"90", + "annualInterestRate":"4.5" + } + ] + } + ] + } + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

Retrieve a Recurring Deposit Product

+

Example Requests:

+
recurringdepositproducts/1
+

+
recurringdepositproducts/1?template=true
+

+
recurringdepositproducts/1?fields=name,description
+
+
+ GET https://Domain Name/api/v1/recurringdepositproducts/1 + + { + "id": 1, + "name": "Recurring deposit product", + "shortName": "RD01", + "description": "Daily compounding using Daily Balance, 5% per year, 365 days in year", + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "interestCompoundingPeriodType": { + "id": 1, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", + "value": "Daily" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "accountingMappings": { + "savingsReferenceAccount": { + "id": 12, + "name": "savings ref", + "glCode": "20" + }, + "incomeFromFeeAccount": { + "id": 16, + "name": "income from savings fee", + "glCode": "24" + }, + "incomeFromPenaltyAccount": { + "id": 17, + "name": "income from sav penalites", + "glCode": "25" + }, + "interestOnSavingsAccount": { + "id": 15, + "name": "interest on savings", + "glCode": "23" + }, + "savingsControlAccount": { + "id": 13, + "name": "savings ref tool kit", + "glCode": "21" + }, + "transfersInSuspenseAccount": { + "id": 14, + "name": "saving transfers", + "glCode": "22" + } + }, + "feeToIncomeAccountMappings": [ + { + "charge": { + "id": 11, + "name": "sav charge", + "active": false, + "penalty": false + }, + "incomeAccount": { + "id": 16, + "name": "income from savings fee", + "glCode": "24" + } + } + ], + "penaltyToIncomeAccountMappings": [ + { + "charge": { + "id": 12, + "name": "sav 2", + "active": false, + "penalty": true + }, + "incomeAccount": { + "id": 17, + "name": "income from sav penalites", + "glCode": "25" + } + } + ], + "recurringDepositFrequency":1, + "recurringDepositFrequencyType": { + "id": 2, + "code": "recurring.deposit.savingsPeriodFrequencyType.months", + "value": "Months" + }, + "minDepositAmount":100.00, + "depositAmount":10000.00, + "maxDepositAmount":1000000.00, + "preClosurePenalApplicable":"true", + "preClosurePenalInterest":"1.75", + "preClosurePenalInterestOnType": { + "id": 1, + "code": "preClosurePenalInterestOnType.wholeTerm", + "value": "Whole term" + }, + "minDepositTerm":1, + "minDepositTermType": { + "id": 1, + "code": "deposit.term.savingsPeriodFrequencyType.weeks", + "value": "Weeks" + }, + "maxDepositTerm":5, + "maxDepositTermType": { + "id": 3, + "code": "deposit.term.savingsPeriodFrequencyType.years", + "value": "Years" + }, + "activeChart": { + "id": 8, + "fromDate": [ + 2014, + 1, + 1 + ], + "savingsProductId": 8, + "savingsProductName": "Fixed deposit product", + "chartSlabs": [ + { + "id": 18, + "description": "from 0 to 90 days", + "periodType": { + "id": 1, + "code": "interestChartPeriodType.weeks", + "value": "Weeks" + }, + "fromPeriod": 0, + "toPeriod": 90, + "annualInterestRate": 4.5, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + } + ], + "periodTypes": [ + { + "id": 0, + "code": "interestChartPeriodType.days", + "value": "Days" + }, + { + "id": 1, + "code": "interestChartPeriodType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "interestChartPeriodType.months", + "value": "Months" + }, + { + "id": 3, + "code": "interestChartPeriodType.years", + "value": "Years" + } + ] + } + } + +
+
+ +   +
+
+

Update a Recurring Deposit Product

+
+
+ PUT https://Domain + Name/api/v1/recurringdepositproducts/{productId} + POST recurringdepositproducts/1 + Content-Type: application/json + Request Body: + { + "description": "Recurring deposit product new offerings", + "locale": "en", + "minDepositTerm":5, + "minDepositTermTypeId":1, + } + + + { + "resourceId": 1, + "changes": { + "description": "Recurring deposit product new offerings", + "minDepositTerm": 5 + } + } + +
+
+ +   +
+
+

Delete a Recurring Deposit Product

+
+
+ + DELETE https://Domain Name/api/v1/recurringdepositdproducts/{productId} + + + DELETE recurringdepositdproducts/1 + Content-Type: application/json + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

List Recuring Deposit Products

+

Example Requests:

+
recurringdepositproducts
+

+
recurringdepositproducts?fields=name
+
+
+ GET https://Domain Name/api/v1/recurringdepositproducts + + [ + { + "id": 3, + "name": "RD01", + "shortName": "RD01", + "description": "RD01", + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "recurringDepositFrequency":1, + "recurringDepositFrequencyType": { + "id": 2, + "code": "recurring.deposit.savingsPeriodFrequencyType.months", + "value": "Months" + }, + "preClosurePenalApplicable": false, + "minDepositTerm": 3, + "maxDepositTerm": 4, + "minDepositTermType": { + "id": 2, + "code": "deposit.term.savingsPeriodFrequencyType.months", + "value": "Months" + }, + "maxDepositTermType": { + "id": 3, + "code": "deposit.term.savingsPeriodFrequencyType.years", + "value": "Years" + }, + "interestCompoundingPeriodType": { + "id": 4, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "accountingRule": { + "id": 1, + "code": "accountingRuleType.none", + "value": "NONE" + } + } + ] +
+
+ + + +   +
+
+

Share Account:

+

Share accounts are instances of a praticular share product created for an individual. + An application process around the creation of accounts is also supported.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Starting StateActionResultant State
-SubmitSubmitted and pending approval
Submitted and pending approvalRejectClosed - Rejected
Submitted and pending approvalApproveApproved
ApprovedUndo ApprovalSubmitted and pending approval
ApprovedActivateActive
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
clientId
The client you are creating the share account for. clientId must be + provided. +
productId
The id of the product used for this share account. The share account inherits + the selected currency of the product and possibly other details if not overridden + in the share account creation request. +
accountNo
The account no. associated with this account. Is auto generated if not + provided at creation time. +
externalId
A place to put an external reference for this share account useful in + migrations e.g. The ID another system uses. If provided, it must be unique. +
submittedOnDate
submittedOnDate must be provided when initially creating share + account application. locale and dateFormat parameters must be provided with + this. +
savingsAccountId
The saving account id in which dividend amount should be posted.
minimumActivePeriod
Optional: If provided, used along with minimumActivePeriodFrequencyType + to indicate the length of time that the share account for considering dividends. e.g. + 60 Days +
minimumActivePeriodFrequencyType
Optional: If provided, used along with minimumActivePeriod to + indicate the length of time that the share account for considering dividends. 0=Days + e.g. 60 Days
lockinPeriodFrequency
Optional: If provided, used along with + lockinPeriodFrequencyType to indicate the length of time that the shares is 'locked + in' and redeems are not allowed. e.g. 6 Months +
lockinPeriodFrequencyType
Optional: If provided, used along with lockinPeriodFrequency + to indicate the length of time that the shares is 'locked in' and redeems are not allowed. + 0=Days, 1=Weeks, 2=Months, 3=Years + e.g. 6 Months
applicationDate
Application date on which the first shares purchase should be considerd. +
requestedShares
+
+
+ +   +
+
+

Retrieve Share Account Template:

+

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
  • +
+

+

Arguments

+
+
clientId
+
Integer mandatory
+
productId
+
Integer optional
+
If entered, productId, productName and selectedProduct fields are returned.
+
+

Example Requests:

+
accounts/share/template?clientId=1
+

+
accounts/share/template?clientId=1&productId=1
+
+
+ GET https://Domain + Name/api/v1/accounts/share/template?clientId={clientId} + + { + "clientId": 7, + "clientName": "Client Name", + "productOptions": [{ + "id": 1, + "name": "Share Product", + "shortName": "SP", + "totalShares": 100 + }] + } + +
+ +
+ GET https://Domain + Name/api/v1/accounts/share/template?clientId={clientId}&productId={productId} + + { + "clientId": 7, + "clientName": "Client Name", + "defaultShares": 100, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 100, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "currentMarketPrice": 5.00, + "charges": [{ + "chargeId": 20, + "name": "Share Account Activation Flat", + "chargeTimeType": { + "id": 13, + "code": "chargeTimeType.activation", + "value": "Share Account Activate" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "amount": 1.000000, + + }], + "lockinPeriodFrequencyTypeOptions": [{ + "id": 0, + "code": "savings.lockin.sharePeriodFrequencyType.days", + "value": "Days" + }, + { + "id": 1, + "code": "savings.lockin.sharePeriodFrequencyType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "savings.lockin.sharePeriodFrequencyType.months", + "value": "Months" + }, + { + "id": 3, + "code": "savings.lockin.sharePeriodFrequencyType.years", + "value": "Years" + }], + "minimumActivePeriodFrequencyTypeOptions": [{ + "id": 0, + "code": "savings.lockin.sharePeriodFrequencyType.days", + "value": "Days" + }], + "clientSavingsAccounts": [{ + "id": 13, + "accountNo": "000000013", + "depositType": { + "id": 100, + "code": "depositAccountType.savingsDeposit", + "value": "Savings" + } + }] + } + +
+
+ +   +
+
+

Submit new share application

+
+ + + + + + + +
+
Mandatory Fields
+
clientId, productId, submittedDate, savingsAccountId, requestedShares, applicationDate
+
+ + + + + + + +
+
Optional Fields
+
accountNo, externalId
+
+ + + + + + + +
+
Inherited from Product (if not provided)
+
minimumActivePeriod, minimumActivePeriodFrequencyType, lockinPeriodFrequency, + lockinPeriodFrequencyType +
+
+
+

Minimal request: accountNo auto generated, remaining details inherited from savings product.

+ POST https://Domain Name/api/v1/accounts/share + POST savingsaccount + Content-Type: application/json + Request Body: + { + "clientId": "7", + "productId": 1, + + "requestedShares": 100, + "externalId": "1", + "submittedDate": "01 May 2016", + "minimumActivePeriod": "1", + "minimumActivePeriodFrequencyType": 0, + "lockinPeriodFrequency": "1", + "lockinPeriodFrequencyType": 0, + "applicationDate": "01 May 2016", + "allowDividendCalculationForInactiveClients": true, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "charges": [{ + "chargeId": 20, + "amount": 1 + }, + { + "chargeId": 21, + "amount": 0.5 + }, + { + "chargeId": 23, + "amount": 2 + }], + + "savingsAccountId": 13 + } + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

Approve share application

+

Approves share application so long as its in 'Submitted and pending approval' state.

+
+
+ POST https://Domain + Name/api/v1/accounts/share/{shareAccountId}?command=approve + POST shareaccount/1?command=approve + Content-Type: application/json + Request Body: + { + "note":"notes", + "approvedDate":"01 May 2016", + "locale":"en", + "dateFormat":"dd MMMM yyyy" + } + + + { + + "resourceId": 1, + "changes": { + "status": { + "id": 200, + "code": "shareAccountStatusType.approved", + "value": "Approved", + "submittedAndPendingApproval": false, + "approved": true, + "rejected": false, + "active": false, + "closed": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "approvedDate": "01 May 2016" + } + } + +
+
+ +   +
+
+

Undo approval share application

+

Will move 'approved' share application back to 'Submitted and pending approval' state.

+
+
+ POST https://Domain + Name/api/v1/accounts/share/{shareAccountId}?command=undoApproval + POST shareaccount/1?command=undoApproval + Content-Type: application/json + Request Body: + { + } + + + { + + "resourceId": 1, + "changes": { + "status": { + "id": 100, + "code": "shareAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "active": false, + "closed": false + }, + "approvedOnDate": "" + } + } + +
+
+ +   +
+
+

Reject share application

+

Rejects share application so long as its in 'Submitted and pending approval' state.

+
+
+ POST https://Domain + Name/api/v1/accounts/share/{shareAccountId}?command=reject + POST shareaccount/1?command=reject + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "rejectedDate": "03 March 2013" + } + + + { + + "resourceId": 1, + "changes": { + "status": { + "id": 500, + "code": "shareAccountStatusType.rejected", + "value": "Rejected", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": true, + "active": false, + "closed": true + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "rejectedDate": "03 March 2013", + "closedDate": "03 March 2013" + } + } + +
+
+ +   +
+
+

Activate a share account

+

Results in an approved share application being converted into an 'active' share account.

+
+
+ POST https://Domain + Name/api/v1/accounts/share/{shareAccountId}?command=activate + POST shareaccount/1?command=activate + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "activatedDate": "01 March 2013" + } + + + { + "resourceId": 1, + "changes": { + "status": { + "id": 300, + "code": "shareAccountStatusType.active", + "value": "Active", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "active": true, + "closed": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "activatedDate": "01 March 2013" + } + } + +
+
+ +   +
+
+

Close a share account

+

Results in an Activated share application being converted into an 'closed' share account.

+

closedDate is closure date of share account

+ + + + + + + +
+
Mandatory Fields
+
dateFormat,locale,closedDate
+
+ +
+
+ POST https://Domain + Name/api/v1/accounts/share/{shareAccountId}?command=close + POST shareaccount/5?command=close + Content-Type: application/json + Request Body: + { + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "closedDate":"26 August 2013", + "note":"close note" + } + + + { + + "resourceId":5, + "changes":{ + "status":{ + "id":600, + "code":"shareAccountStatusType.closed", + "value":"Closed", + "submittedAndPendingApproval":false, + "approved":false, + "rejected":false, + "active":false, + "closed":true + }, + "locale":"en", + "dateFormat":"dd MMMM yyyy", + "closedOnDate":"26 August 2013", + "note":"close note" + } + } + + +
+
+ +   +
+
+

Apply additional shares on a share account

+

requestedDate is requsted date of share purchase

+

requestedShares is number of shares to be purchase

+ + + + + + + + +
+
Mandatory Fields
+
dateFormat,locale,requestedDate, requestedShares
+
+ +
+
+ POST https://Domain + Name/api/v1/accounts/share/{shareAccountId}?command=applyadditionalshares + POST shareaccount/5?command=applyadditionalshares + Content-Type: application/json + Request Body: + { + "requestedDate": "04 May 2016", + "requestedShares": "10", + "locale": "en", + "dateFormat": "dd MMMM yyyy" + } + + + { + + "resourceId":5, + } + + +
+
+ +   +
+
+

Approve additional shares request on a share account

+

requestedShares is Share purchase transaction ids

+ + + + + + + + +
+
Mandatory Fields
+
requestedShares
+
+ +
+
+ POST https://Domain + Name/api/v1/accounts/share/{shareAccountId}?command=approveadditionalshares + POST shareaccount/5?command=approveadditionalshares + Content-Type: application/json + Request Body: + { + "requestedShares": [{ + "id": 34 + }] + } + + + { + + "resourceId":5, + } + + +
+
+ +   +
+
+

Reject additional shares request on a share account

+

requestedShares is Share purchase transaction ids

+ + + + + + + + +
+
Mandatory Fields
+
requestedShares
+
+ +
+
+ POST https://Domain + Name/api/v1/accounts/share/{shareAccountId}?command=rejectadditionalshares + POST shareaccount/5?command=rejectadditionalshares + Content-Type: application/json + Request Body: + { + "requestedShares":[{"id":35}] + } + + + { + + "resourceId":5, + } + + +
+
+ +   +
+
+

Redeem shares on a share account

+

Results redeem some/all shares from share account.

+

requestedDate is requsted date of shares redeem

+

requestedShares is number of shares to be redeemed

+ + + + + + + + +
+
Mandatory Fields
+
dateFormat,locale,requestedDate,requestedShares
+
+ +
+
+ POST https://Domain + Name/api/v1/accounts/share/{shareAccountId}?command=redeemshares + POST shareaccount/5?command=redeemshares + Content-Type: application/json + Request Body: + { + "requestedDate": "04 May 2016", + "requestedShares": "4", + "locale": "en", + "dateFormat": "dd MMMM yyyy" + } + + + { + + "resourceId":5, + } + + +
+
+ +   +
+
+

List share applications/accounts

+

Example Requests:

+
shareaccount
+ +
+
+ GET https://Domain Name/api/v1/accounts/share + + { + "totalFilteredRecords": 1, + "pageItems": [ + { + "id": 1, + "accountNo": "000000001", + "clientId": 1, + "clientName": "Client Name", + "productId": 1, + "productName": "Share Product Name", + + "status": { + "id": 100, + "code": "shareAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "active": false, + "closed": false + }, + "timeline": { + "submittedOnDate": [ + 2013, + 3, + 1 + ] + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "purchasedShares" : [ + {"id":1, + "purchasedDate":"01 May 2013", + "numberOfShares": 10, + "purchasedPrice": 5 + } + ], + + "summary": { + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + } + } + ] + } + +
+
+ +   +
+
+

Retrieve a share application/account:

+ +

Example Requests :

+
shareaccount/1
+
+
+ GET https://DomainName/api/v1/accounts/share/{accountId} + + { + "id": 2, + "accountNo": "000000002", + "savingsAccountNumber": "000000013", + "clientId": 7, + "clientName": "Client_FirstName_2KX8C Client_LastName_NWNG", + "productId": 1, + "productName": "Share Product", + "status": { + "id": 300, + "code": "shareAccountStatusType.active", + "value": "Active", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "active": true, + "closed": false + }, + "timeline": { + "submittedOnDate": [2016, + 4, + 1], + "submittedByUsername": "mifos", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator", + "approvedDate": [2016, + 4, + 1], + "approvedByUsername": "mifos", + "approvedByFirstname": "App", + "approvedByLastname": "Administrator", + "activatedDate": [2016, + 4, + 1] + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 100, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "summary": { + "id": 2, + "accountNo": "000000002", + "totalApprovedShares": 1, + "totalPendingForApprovalShares": 0, + "productId": 1, + "productName": "Conflux Share Product", + "status": { + "id": 300, + "code": "shareAccountStatusType.active", + "value": "Active", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "active": true, + "closed": false + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 100, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "timeline": { + "submittedOnDate": [2016, + 4, + 1], + "submittedByUsername": "mifos", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator", + "approvedDate": [2016, + 4, + 1], + "approvedByUsername": "mifos", + "approvedByFirstname": "App", + "approvedByLastname": "Administrator", + "activatedDate": [2016, + 4, + 1] + } + }, + "purchasedShares": [{ + "id": 6, + "accountId": 2, + "purchasedDate": [2016, + 4, + 1], + "numberOfShares": 10, + "purchasedPrice": 0.50, + "status": { + "id": 300, + "code": "purchasedSharesStatusType.approved", + "value": "Approved" + }, + "type": { + "id": 500, + "code": "purchasedSharesType.purchased", + "value": "Purchase" + }, + "amount": 5.05, + "chargeAmount": 0.05, + "amountPaid": 5.05 + }, + { + "id": 7, + "accountId": 2, + "purchasedDate": [2016, + 4, + 21], + "status": { + "id": 300, + "code": "purchasedSharesStatusType.approved", + "value": "Approved" + }, + "type": { + "id": 700, + "code": "charge.payment", + "value": "Charge Payment" + }, + "amount": 1.00, + "chargeAmount": 0, + "amountPaid": 1.00 + }, + { + "id": 8, + "accountId": 2, + "purchasedDate": [2016, + 4, + 2], + "numberOfShares": 5, + "purchasedPrice": 0.50, + "status": { + "id": 300, + "code": "purchasedSharesStatusType.approved", + "value": "Approved" + }, + "type": { + "id": 600, + "code": "purchasedSharesType.redeemed", + "value": "Redeem" + }, + "amount": 2.45, + "chargeAmount": 0.05, + "amountPaid": 2.45 + }, + { + "id": 9, + "accountId": 2, + "purchasedDate": [2016, + 4, + 3], + "numberOfShares": 10, + "purchasedPrice": 0.50, + "status": { + "id": 300, + "code": "purchasedSharesStatusType.approved", + "value": "Approved" + }, + "type": { + "id": 500, + "code": "purchasedSharesType.purchased", + "value": "Purchase" + }, + "amount": 5.05, + "chargeAmount": 0.05, + "amountPaid": 5.05 + }, + { + "id": 10, + "accountId": 2, + "purchasedDate": [2016, + 4, + 4], + "numberOfShares": 5, + "purchasedPrice": 0.50, + "status": { + "id": 300, + "code": "purchasedSharesStatusType.approved", + "value": "Approved" + }, + "type": { + "id": 500, + "code": "purchasedSharesType.purchased", + "value": "Purchase" + }, + "amount": 2.52, + "chargeAmount": 0.02, + "amountPaid": 2.52 + }, + { + "id": 11, + "accountId": 2, + "purchasedDate": [2016, + 4, + 5], + "numberOfShares": 15, + "purchasedPrice": 0.50, + "status": { + "id": 300, + "code": "purchasedSharesStatusType.approved", + "value": "Approved" + }, + "type": { + "id": 600, + "code": "purchasedSharesType.redeemed", + "value": "Redeem" + }, + "amount": 7.35, + "chargeAmount": 0.15, + "amountPaid": 7.35 + }, + { + "id": 31, + "accountId": 2, + "purchasedDate": [2016, + 5, + 4], + "numberOfShares": 4, + "purchasedPrice": 5.00, + "status": { + "id": 300, + "code": "purchasedSharesStatusType.approved", + "value": "Approved" + }, + "type": { + "id": 600, + "code": "purchasedSharesType.redeemed", + "value": "Redeem" + }, + "amount": 19.60, + "chargeAmount": 0.40, + "amountPaid": 19.60 + }], + "savingsAccountId": 13, + "currentMarketPrice": 5.00, + "lockinPeriod": 1, + "lockPeriodTypeEnum": { + "id": 0, + "code": "savings.lockin.sharePeriodFrequencyType.days", + "value": "Days" + }, + "minimumActivePeriod": 1, + "minimumActivePeriodTypeEnum": { + "id": 0, + "code": "savings.lockin.sharePeriodFrequencyType.days", + "value": "Days" + }, + "allowDividendCalculationForInactiveClients": true, + "charges": [{ + "id": 9, + "chargeId": 20, + "accountId": 2, + "name": "Share Account Activation Flat", + "chargeTimeType": { + "id": 13, + "code": "chargeTimeType.activation", + "value": "Share Account Activate" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "percentage": 0, + "amountPercentageAppliedTo": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 1.000000, + "amountPaid": 1.000000, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 0.000000, + "amountOrPercentage": 1.000000, + "isActive": true + }, + { + "id": 7, + "chargeId": 21, + "accountId": 2, + "name": "Share Purchase %", + "chargeTimeType": { + "id": 14, + "code": "chargeTimeType.sharespurchase", + "value": "Share Purchase" + }, + "chargeCalculationType": { + "id": 2, + "code": "chargeCalculationType.percent.of.amount", + "value": "% Amount" + }, + "percentage": 1.000000, + "amountPercentageAppliedTo": 12.500000, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 0.120000, + "amountPaid": 0.120000, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 0.000000, + "amountOrPercentage": 1.000000, + "isActive": true + }, + { + "id": 8, + "chargeId": 23, + "accountId": 2, + "name": "Share Redeem %", + "chargeTimeType": { + "id": 15, + "code": "chargeTimeType.sharesredeem", + "value": "Share Redeem" + }, + "chargeCalculationType": { + "id": 2, + "code": "chargeCalculationType.percent.of.amount", + "value": "% Amount" + }, + "percentage": 2.000000, + "amountPercentageAppliedTo": 30.000000, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 0.600000, + "amountPaid": 0.600000, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 0.000000, + "amountOrPercentage": 2.000000, + "isActive": true + }], + "dividends": [] + } + +
+
+ +   +
+
+

Modify a share application

+

Share 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

+
+
+ PUT https://Domain Name/api/v1/accounts/share/{accountsId} + PUT shareaccount/1 + Content-Type: application/json + No Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "applicationDate": "01 April 2016", + "requestedShares": "20", + } + + + { + + "resourceId": 1, + "changes": { + "dateFormat": "dd MMMM yyyy", + "applicationDate": "01 April 2016", + "requestedShares": "20", + "locale": "en" + } + } + +
+
+ + +   +
+
+

Savings Account:

+

Savings accounts are instances of a praticular savings product created for an individual or group. An + application process around the creation of accounts is also supported.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Starting StateActionResultant State
-SubmitSubmitted and pending approval
Submitted and pending approvalRejectClosed - Rejected
Submitted and pending approvalWithdrawn by ApplicantClosed - Withdrawn by Applicant
Submitted and pending approvalApproveApproved
ApprovedUndo ApprovalSubmitted and pending approval
ApprovedActivateActive
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
clientId
The client you are creating the savings account for. Either clientId + or groupId must be provided. +
groupId
The group you are creating the savings account for. Either clientId + or groupId must be provided. +
productId
The id of the product used for this savings account. The savings account inherits + the selected currency of the product and possibly other details if not overridden + in the savings account creation request. +
accountNo
The account no. associated with this loan. Is auto generated if not provided + at creation time. +
externalId
A place to put an external reference for this savings account useful in + migrations e.g. The ID another system uses. If provided, it must be unique. +
submittedOnDate
submittedOnDate must be provided when initially creating savings + account application. locale and dateFormat parameters must be provided with + this. +
nominalAnnualInterestRate
The interest rate set for savings account e.g. 5% Per year - It is + always expressed as the Nominal APR. +
interestCompoundingPeriodType
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end + of month) +
interestPostingPeriodType
The period at which interest rate is posted or credited to savings account. + The actual crediting or posting transaction is date as occurring on the day after the end of + the period. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, + 30th Sep, 31st Dec), 7=Annually (at end of calendar year 31st Dec) +
interestCalculationType
The interest calculation method used: 1=Daily Balance or 2=Average Daily + Balance +
interestCalculationDaysInYearType
The setting for number of days in year to use: 360=360 Days, 365=365 Days +
minRequiredOpeningBalance
Optional: If provided, sets the minimum deposit amount required to + open a savings account e.g. 2,000
lockinPeriodFrequency
Optional: If provided, used along with + lockinPeriodFrequencyType to indicate the length of time that the savings account is + 'locked in' and withdrawals are not allowed. e.g. 6 Months +
lockinPeriodFrequencyType
Optional: If provided, used along with lockinPeriodFrequency + to indicate the length of time that the savings account is 'locked in' and withdrawals are + not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years + e.g. 6 Months
withdrawalFeeForTransfers
Optional: Used along with withdrawalFeeAmount to indicate + whether the withdrawal fee should be applied on the account for account transfers . +
allowOverdraft
Optional: If provided, depending on the value mark the savings + account as overdraft account +
overdraftLimit
Optional: If provided, sets the maximum allowed overdraft amount for + a savings account e.g. 5,000 else set the limit as zero +
withHoldTax
Optional: If tax group provided at product level, will allow to + Enable or disable withhold tax on interest posting for savings account +
datatables
Additional Mandatory Field if Entity-Datatable Check is enabled for the + entity of type Savings. +
+
+
+ +   +
+
+

Retrieve Savings Account Template:

+

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
  • +
+

+

Arguments

+
+
clientId
+
Integer mandatory
+
productId
+
Integer optional
+
If entered, productId, productName and selectedProduct fields are returned.
+
+

Example Requests:

+
savingsaccounts/template?clientId=1
+

+
savingsaccounts/template?clientId=1&productId=1
+
+
+ GET https://Domain + Name/api/v1/savingsaccounts/template?clientId={clientId} + + { + "clientId": 1, + "clientName": "small business", + "productOptions": [ + { + "id": 1, + "name": "Passbook Savings" + } + ] + } + +
+ +
+ GET https://Domain + Name/api/v1/savingsaccounts/template?clientId={clientId}&productId={productId} + + { + "clientId": 1, + "clientName": "small business", + "savingsProductId": 1, + "savingsProductName": "Passbook Savings", + "timeline": {}, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "nominalAnnualInterestRate": 5, + "interestCompoundingPeriodType": { + "id": 1, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", + "value": "Daily" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "productOptions": [ + { + "id": 1, + "name": "Passbook Savings" + } + ], + "fieldOfficerOptions": [ + { + "id": 3, + "firstname": "Mrs.", + "lastname": "loanofficerB1", + "displayName": "loanofficerB1, Mrs.", + "officeId": 2, + "officeName": "branch 1", + "isLoanOfficer": true + }, + { + "id": 1, + "firstname": "Mr.", + "lastname": "loanofficerHO", + "displayName": "loanofficerHO, Mr.", + "officeId": 1, + "officeName": "branch 1", + "isLoanOfficer": true + } + ], + "interestCompoundingPeriodTypeOptions": [ + { + "id": 1, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", + "value": "Daily" + }, + { + "id": 4, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", + "value": "Monthly" + } + ], + "interestPostingPeriodTypeOptions": [ + { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + { + "id": 5, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.quarterly", + "value": "Quarterly" + }, + { + "id": 7, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.annual", + "value": "Annually" + } + ], + "interestCalculationTypeOptions": [ + { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + { + "id": 2, + "code": "savingsInterestCalculationType.averagedailybalance", + "value": "Average Daily Balance" + } + ], + "interestCalculationDaysInYearTypeOptions": [ + { + "id": 360, + "code": "savingsInterestCalculationDaysInYearType.days360", + "value": "360 Days" + }, + { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + } + ], + "lockinPeriodFrequencyTypeOptions": [ + { + "id": 0, + "code": "savings.lockin.savingsPeriodFrequencyType.days", + "value": "Days" + }, + { + "id": 1, + "code": "savings.lockin.savingsPeriodFrequencyType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "savings.lockin.savingsPeriodFrequencyType.months", + "value": "Months" + }, + { + "id": 3, + "code": "savings.lockin.savingsPeriodFrequencyType.years", + "value": "Years" + } + ], + "withdrawalFeeTypeOptions": [ + { + "id": 1, + "code": "savingsWithdrawalFeesType.flat", + "value": "Flat" + }, + { + "id": 2, + "code": "savingsWithdrawalFeesType.percent.of.amount", + "value": "% of Amount" + } + ], + "chargeOptions": [ + { + "id": 4, + "name": "Savings charge 1", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 200, + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeAppliesTo": { + "id": 2, + "code": "chargeAppliesTo.savings", + "value": "Savings" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "chargepaymentmode.regular" + } + }, + { + "id": 5, + "name": "Savings charge 2", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 300, + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeAppliesTo": { + "id": 2, + "code": "chargeAppliesTo.savings", + "value": "Savings" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "chargepaymentmode.regular" + } + }, + { + "id": 6, + "name": "Annual fee", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 50, + "chargeTimeType": { + "id": 6, + "code": "chargeTimeType.annualFee", + "value": "Annual Fee" + }, + "chargeAppliesTo": { + "id": 2, + "code": "chargeAppliesTo.savings", + "value": "Savings" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + }, + { + "id": 7, + "name": "Quarterly fee", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 5, + "chargeTimeType": { + "id": 7, + "code": "chargeTimeType.monthlyFee", + "value": "Monthly Fee" + }, + "chargeAppliesTo": { + "id": 2, + "code": "chargeAppliesTo.savings", + "value": "Savings" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + }, + "feeOnMonthDay": [ + 10, + 5 + ], + "feeInterval": 4 + } + ], + "datatables": [{ + "applicationTableName": "m_savings_account", + "registeredTableName": "Savings Address Enrichment", + "columnHeaderData": [{ + "columnName": "savings_account_id", + "columnType": "bigint", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": false, + "isColumnPrimaryKey": true, + "columnValues": [] + }, + { + "columnName": "Name", + "columnType": "varchar", + "columnLength": 25, + "columnDisplayType": "STRING", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "COUNTRY_cd_country details", + "columnType": "int", + "columnLength": 0, + "columnDisplayType": "CODELOOKUP", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [{ + "id": 17, + "value": "India", + "score": 0 + }], + "columnCode": "COUNTRY" + }] + }] + } + +
+
+ +   +
+
+

Submit new savings application

+
+ + + + + + + +
+
Mandatory Fields
+
clientId or groupId, productId, submittedOnDate
+
+ + + + + + + +
+
Optional Fields
+
accountNo, externalId, fieldOfficerId
+
+ + + + + + + +
+
Inherited from Product (if not provided)
+
nominalAnnualInterestRate, interestCompoundingPeriodType, interestCalculationType, + interestCalculationDaysInYearType, minRequiredOpeningBalance, lockinPeriodFrequency, + lockinPeriodFrequencyType, withdrawalFeeForTransfers, allowOverdraft, overdraftLimit, + withHoldTax +
+
+ + + + + + + +
+
Additional Mandatory Field if Entity-Datatable Check is + enabled for the entity of type Savings. +
+
datatables
+
+
+

Minimal request: accountNo auto generated, remaining details inherited from savings product.

+ POST https://Domain Name/api/v1/savingsaccounts + POST savingsaccount + Content-Type: application/json + Request Body: + { + "clientId": 1, + "productId": 1, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "submittedOnDate": "01 March 2011" + } + +

Minimal request: accountNo provided (must be unique), remaining details inherited from savings + product.

+ POST savingsaccount + Content-Type: application/json + Request Body: + { + "clientId": 1, + "productId": 1, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "submittedOnDate": "01 March 2011", + "accountNo": "SA000023", + "externalId": "SYS-23" + } + +

Full request: accountNo provided (must be unique), remaining details override details from savings + product (except currency).

+ POST savingsaccount + Content-Type: application/json + Request Body: + { + "clientId": 1, + "productId": 1, + "fieldOfficerId": 1, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "submittedOnDate": "01 March 2013", + "accountNo": "SA000023", + "externalId": "SYS-23", + "nominalAnnualInterestRate": "5.65", + "interestCompoundingPeriodType": 1, + "interestPostingPeriodType": 4, + "interestCalculationType": 1, + "interestCalculationDaysInYearType": 365, + "minRequiredOpeningBalance": "1,000", + "lockinPeriodFrequency": 6, + "lockinPeriodFrequencyType": 2, + "allowOverdraft":true, + "overdraftLimit":5000, + "charges":[{"id":"1"}], + "datatables": [{ + "registeredTableName": "Savings Enrichment", + "data": { + "locale": "en", + "Name": "Raj", + "COUNTRY_cd_country details": 17 + } + }, + { + "registeredTableName": "SavingsDataTableCreate", + "data": { + "locale": "en", + "Volume": "25", + "CurrentTimestamp": "01 December 2016 12:44", + "dateFormat": "dd MMMM yyyy HH:mm", + "DateData": "01 December 2016 00:00" + } + }] + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1 + } + +
+
+ +   +
+
+

Approve savings application

+

Approves savings application so long as its in 'Submitted and pending approval' state.

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{savingsId}?command=approve + POST savingsaccount/1?command=approve + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "approvedOnDate": "01 March 2013" + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 200, + "code": "savingsAccountStatusType.approved", + "value": "Approved", + "submittedAndPendingApproval": false, + "approved": true, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "approvedOnDate": "02 March 2013" + } + } + +
+
+ +   +
+
+

Undo approval savings application

+

Will move 'approved' savings application back to 'Submitted and pending approval' state.

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{savingsId}?command=undoApproval + POST savingsaccount/1?command=undoApproval + Content-Type: application/json + Request Body: + { + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 100, + "code": "savingsAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false + }, + "approvedOnDate": "" + } + } + +
+
+ +   +
+
+

Assign Savings Officer

+

Allows you to assign Savings Officer for existing Savings Account.

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{savingsId}?command=assignSavingsOfficer + POST savingsaccounts/1?command=assignSavingsOfficer + Content-Type: application/json + Request Body: + { + assignmentDate : "04 September 2014", + dateFormat : "dd MMMM yyyy", + fromSavingsOfficerId : "", + locale : "en", + toSavingsOfficerId : 2 + } + + + { + "officeId":2, + "savingsId":8, + "resourceId":8, + "changes":{"savingsOfficerId":2} + } + +
+
+ +   +
+
+

Unassign Savings Officer

+

Allows you to unassign the Savings Officer.

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{savingsId}?command=unassignSavingsOfficer + POST savingsaccounts/1?command=unassignSavingsOfficer + Content-Type: application/json + Request Body: + { + dateFormat : "dd MMMM yyyy", + locale : "en", + unassignedDate : "05 September 2014" + } + + + { + "officeId":2, + "clientId":8, + "resourceId":8, + "changes":{} + } + +
+
+ +   +
+
+

Reject savings application

+

Rejects savings application so long as its in 'Submitted and pending approval' state.

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{savingsId}?command=reject + POST savingsaccount/1?command=reject + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "rejectedOnDate": "03 March 2013" + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 500, + "code": "savingsAccountStatusType.rejected", + "value": "Rejected", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": true, + "withdrawnByApplicant": false, + "active": false, + "closed": true + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "rejectedOnDate": "03 March 2013", + "closedOnDate": "03 March 2013" + } + } + +
+
+ +   +
+
+

Withdraw savings application

+

Used when an applicant withdraws from the savings application. It must be in 'Submitted and pending + approval' state.

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{savingsId}?command=withdrawnByApplicant + POST savingsaccount/1?command=withdrawnByApplicant + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "withdrawnOnDate": "03 March 2013" + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 400, + "code": "savingsAccountStatusType.withdrawn.by.applicant", + "value": "Withdrawn by applicant", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "withdrawnByApplicant": true, + "active": false, + "closed": true + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "withdrawnOnDate": "03 March 2013", + "closedOnDate": "03 March 2013" + } + } + +
+
+ +   +
+
+

Activate a savings account

+

Results in an approved savings application being converted into an 'active' savings account.

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{savingsId}?command=activate + POST savingsaccount/1?command=activate + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "activatedOnDate": "01 March 2013" + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 300, + "code": "savingsAccountStatusType.active", + "value": "Active", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": true, + "closed": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "activatedOnDate": "01 March 2013" + } + } + +
+
+ +   +
+
+

Close a savings account

+

Results in an Activated savings application being converted into an 'closed' savings account.

+

closedOnDate is closure date of savings account

+

withdrawBalance is a boolean value, true value of this field performs a withdrawal transaction + with account's running balance.

+ + + + + + + +
+
Mandatory Fields
+
dateFormat,locale,closedOnDate
+
+ + + + + + + +
+
Optional Fields
+
note, withdrawBalance, paymentTypeId, accountNumber, checkNumber, routingCode, + receiptNumber, bankNumber +
+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{savingsId}?command=close + POST savingsaccount/5?command=close + Content-Type: application/json + Request Body: + { + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "closedOnDate":"26 August 2013", + "note":"close note" + } + + + { + "officeId":1, + "clientId":1, + "savingsId":5, + "resourceId":5, + "changes":{ + "status":{ + "id":600, + "code":"savingsAccountStatusType.closed", + "value":"Closed", + "submittedAndPendingApproval":false, + "approved":false, + "rejected":false, + "withdrawnByApplicant":false, + "active":false, + "closed":true + }, + "locale":"en", + "dateFormat":"dd MMMM yyyy", + "closedOnDate":"26 August 2013", + "note":"close note" + } + } + + POST savingsaccount/5?command=close + Content-Type: application/json + Request Body: + { + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "closedOnDate":"26 August 2013", + "note":"close note", + "withdrawBalance":true, + "paymentTypeId": "14", + "accountNumber": "acc123", + "checkNumber": "che123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123" + } + + + { + "officeId":1, + "clientId":1, + "savingsId":5, + "resourceId":5, + "changes":{ + "accountNumber": "acc123", + "checkNumber": "che123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123", + "status":{ + "id":600, + "code":"savingsAccountStatusType.closed", + "value":"Closed", + "submittedAndPendingApproval":false, + "approved":false, + "rejected":false, + "withdrawnByApplicant":false, + "active":false, + "closed":true + }, + "locale":"en", + "dateFormat":"dd MMMM yyyy", + "closedOnDate":"26 August 2013", + "note":"close note" + } + } + +
+
+ +   +
+
+

Calculate Interest on Savings Account

+

+ Calculates interest earned on a savings account based on todays date. It does not attempt to post + or credit the interest on the account. That is responsibility of the Post Interest API that will likely be called by + overnight process. +

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{savingsId}?command=calculateInterest + POST savingsaccount/1?command=calculateInterest + Content-Type: application/json + Request Body: + { + } + + + { + "officeId": 1, + "clientId": 1, + "savingsId": 1, + "resourceId": 1 + } + +
+
+ +   +
+
+

Post Interest on Savings Account

+

+ Calculates and Posts interest earned on a savings account based on todays date and whether an + interest posting or crediting event is due. +

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{savingsId}?command=postInterest + POST savingsaccount/1?command=postInterest + Content-Type: application/json + Request Body: + { + } + + + { + "officeId": 1, + "clientId": 1, + "savingsId": 1, + "resourceId": 1 + } + +
+
+   +
+
+

Block Savings Account

+

+ Blocks Savings account from all types of credit and debit transactions +

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{savingsId}?command=block + POST savingsaccount/1?command=block + Content-Type: application/json + Request Body: + { + } + + + { + "officeId":1, + "clientId":1, + "savingsId":1, + "resourceId":1, + "changes":{ + "subStatus":{ + "id":400, + "code":"SavingsAccountSubStatusEnum.block", + "value":"Block", + "none":false, + "inactive":false, + "dormant":false, + "escheat":false, + "block":true, + "blockCredit":false, + "blockDebit":false + } + } + } + +
+
+ +   +
+
+

Unblock Savings Account

+

+ Unblock a blocked account. On unblocking account, user can perform debit and credit transactions +

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{savingsId}?command=unblock + POST savingsaccount/1?command=unblock + Content-Type: application/json + Request Body: + { + } + + + { + "officeId":1, + "clientId":1, + "savingsId":1, + "resourceId":1, + "changes":{ + "subStatus":{ + "id":0, + "code":"SavingsAccountSubStatusEnum.none", + "value":"None", + "none":true, + "inactive":false, + "dormant":false, + "escheat":false, + "block":false, + "blockCredit":false, + "blockDebit":false + } + } + } + +
+
+ +   +
+
+

Block Savings Account Credit transactions

+

+ Savings account will be blocked from all types of credit transactions. +

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{savingsId}?command=blockCredit + POST savingsaccount/1?command=blockCredit + Content-Type: application/json + Request Body: + { + } + + + { + "officeId":1, + "clientId":1, + "savingsId":1, + "resourceId":1, + "changes":{ + "subStatus":{ + "id":500, + "code":"SavingsAccountSubStatusEnum.blockcredit", + "value":"BlockCredit", + "none":false, + "inactive":false, + "dormant":false, + "escheat":false, + "block":false, + "blockCredit":true, + "blockDebit":false + } + } + } + +
+
+ +   +
+
+

Unblock Savings Account Credit transactions

+

It unblocks the Saving account's credit operations. Now all types of credits can be transacted to + Savings account +

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{savingsId}?command=unblockCredit + POST savingsaccount/1?command=unblockCredit + Content-Type: application/json + Request Body: + { + } + + + { + "officeId":1, + "clientId":1, + "savingsId":1, + "resourceId":1, + "changes":{ + "subStatus":{ + "id":0, + "code":"SavingsAccountSubStatusEnum.none", + "value":"None", + "none":true, + "inactive":false, + "dormant":false, + "escheat":false, + "block":false, + "blockCredit":false, + "blockDebit":false + } + } + } + +
+
+ + +   +
+
+

Block Savings Account Debit transactions

+

All types of debit operations from Savings account wil be blocked

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{savingsId}?command=blockDebit + POST savingsaccount/1?command=blockDebit + Content-Type: application/json + Request Body: + { + } + + + { + "officeId":1, + "clientId":1, + "savingsId":1, + "resourceId":1, + "changes":{ + "subStatus":{ + "id":600, + "code":"SavingsAccountSubStatusEnum.blockdebit", + "value":"BlockDebit", + "none":false, + "inactive":false, + "dormant":false, + "escheat":false, + "block":false, + "blockCredit":false, + "blockDebit":true + } + } + } + +
+
+ +   +
+
+

Unblock Savings Account debit transactions

+

It unblocks the Saving account's debit operations. Now all types of debits can be transacted from + Savings account +

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{savingsId}?command=unblockDebit + POST savingsaccount/1?command=unblockDebit + Content-Type: application/json + Request Body: + { + } + + + { + "officeId":1, + "clientId":1, + "savingsId":1, + "resourceId":1, + "changes":{ + "subStatus":{ + "id":0, + "code":"SavingsAccountSubStatusEnum.none", + "value":"None", + "none":true, + "inactive":false, + "dormant":false, + "escheat":false, + "block":false, + "blockCredit":false, + "blockDebit":false + } + } + } + +
+
+ +   +
+
+

Submit New GSIM

+

The API concept of GSIM models the Group Savings Individual Monitoring system and the + process of maintaining the savings of groups.

+ + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
gsimId
The gsimId associated with the account is Auto Generated and it is pass + through route-parameters while taking actions on that specific GSIM Account. +
isGSIM
isGSIM is a boolean value, which is included when a savings account will be + child account of a GSIM. +
childAccountId
childAccountId is the Id of Savings Account linked to the GSIM + Account(ParentAccount). +
+
+
+ + POST https://DomainName/fineract-provider/api/v1/savingsaccounts/gsim + + + { + "clientArray":[ + { + "clientId":2, + "groupId":1, + "productId":"1", + "submittedOnDate":"10 June 2020", + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "isParentAccount":1, + "isGSIM":true, + "applicationId":1234 + }, + { + "clientId":5, + "groupId":1, + "productId":"1", + "submittedOnDate":"10 June 2020", + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "isParentAccount":1, + "isGSIM":true, + "applicationId":1234 + } + ] + } + + + + + { + "officeId": 1, + "groupId": 1, + "clientId": 5, + "savingsId": 2, + "resourceId": 2, + "gsimId": 2 + } + +
+
+ +   +
+
+

Approve GSIM application

+

Approves GSIM application so long as its in 'Submitted and pending approval' state.

+ + + + + + + +
+
Mandatory Fields
+
approvedOnDate, dateFormat, locale
+
+
+ + POST + https://DomainName/fineract-provider/api/v1/savingsaccounts/gsimcommands/{gsimId}?command=approve + + + + { + "approvedOnDate": "03 June 2020", + "dateFormat":"dd MMMM yyyy", + "locale":"en" + } + + + + { + "officeId": 1, + "groupId": 2, + "clientId": 4, + "savingsId": 13, + "resourceId": 13, + "changes": { + "status": { + "id": 200, + "code": "savingsAccountStatusType.approved", + "value": "Approved", + "submittedAndPendingApproval": false, + "approved": true, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false, + "prematureClosed": false, + "transferInProgress": false, + "transferOnHold": false, + "matured": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "approvedOnDate": "03 June 2020" + } + } + +
+
+ +   +
+
+

UndoApproval GSIM application

+

Will move 'approved' GSIM application back to 'Submitted and pending approval' state.

+ + + + + + + +
+
Optional Fields
+
note
+
+
+ + POST + https://DomainName/fineract-provider/api/v1/savingsaccounts/gsimcommands/{gsimId}?command=undoapproval + + + { + “note”:”GSIM Application Undo Approval Note” + } + + + { + "officeId": 1, + "groupId": 2, + "clientId": 4, + "savingsId": 13, + "resourceId": 13, + "changes": { + "status": { + "id": 100, + "code": "savingsAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false, + "prematureClosed": false, + "transferInProgress": false, + "transferOnHold": false, + "matured": false + }, + "approvedOnDate": "" + } + } + +
+
+ +   +
+
+

Reject GSIM application

+

Rejects GSIM application so long as its in 'Submitted and pending approval' state.

+ + + + + + + +
+
Mandatory Fields
+
rejectedOnDate, dateFormat, locale
+ +
+
+ + https://DomainName/fineract-provider/api/v1/savingsaccounts/gsimcommands/{gsimId}?command=reject + + Associations: String optional One of, or comma separated of GSIM + Applications or all for all associations + POST: savingsaccounts/gsimcommands/7?command=reject + Content-Type: application/json + Request Body: + { + "rejectedOnDate": "03 June 2020", + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "note":"rejection due to some reason" + } + + + + + { + "officeId": 1, + "groupId": 2, + "clientId": 4, + "savingsId": 13, + "resourceId": 13, + "changes": { + "status": { + "id": 500, + "code": "savingsAccountStatusType.rejected", + "value": "Rejected", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": true, + "withdrawnByApplicant": false, + "active": false, + "closed": true, + "prematureClosed": false, + "transferInProgress": false, + "transferOnHold": false, + "matured": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "rejectedOnDate": "03 June 2020", + "closedOnDate": "03 June 2020", + "note": "rejection due to some reason" + } + } + +
+
+ +   +
+
+

Withdraw GSIM application

+

Used when an applicant withdraws from the GSIM application. It must be in 'Submitted and pending + approval' state.

+ + + + + + + + +
+
Mandatory Fields
+
withdrawnOnDate, dateFormat, locale
+
+
+ + https://DomainName/fineract-provider/api/v1/savingsaccounts/gsimcommands/{gsimId}?command=withdrawnByApplicant + + + POST: /savingsaccounts/gsimcommands/1?command=withdrawnOnDate + Content-Type: application/json + Request Body: + { + "withdrawnOnDate": "03 June 2020", + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "note":"withdrawal by applicant" + } + + + + { + "officeId": 1, + "groupId": 1, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 400, + "code": "savingsAccountStatusType.withdrawn.by.applicant", + "value": "Withdrawn by applicant", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "withdrawnByApplicant": true, + "active": false, + "closed": true, + "prematureClosed": false, + "transferInProgress": false, + "transferOnHold": false, + "matured": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "withdrawnOnDate": "03 June 2020", + "closedOnDate": "03 June 2020", + "note": "withdrawal by applicant" + } + } + +
+
+ +   +
+
+

Activate a GSIM Application

+

Results in an approved GSIM application being converted into an 'active' savings account.

+ + + + + + + +
+
Mandatory Fields
+
activatedOnDate, dateFormat, locale
+ +
+
+ + https://DomainName/fineract-provider/api/v1/savingsaccounts/gsimcommands/{gsimId}?command=activate + + + POST: /savingsaccounts/gsimcommands/10?command=activate + Content-Type: application/json + Request Body: + { + "activatedOnDate": "03 June 2020", + "dateFormat":"dd MMMM yyyy", + "locale":"en" + } + + + + + { + "officeId": 1, + "groupId": 1, + "clientId": 1, + "savingsId": 16, + "resourceId": 16, + "changes": { + "status": { + "id": 300, + "code": "savingsAccountStatusType.active", + "value": "Active", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": true, + "closed": false, + "prematureClosed": false, + "transferInProgress": false, + "transferOnHold": false, + "matured": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "activatedOnDate": "03 June 2020" + } + } + +
+
+ +   +
+
+

Close a GSIM Application

+

Results in an Activated savings application being converted into an 'closed' savings account.

+ + + + + + + +
+
Mandatory Fields
+
closedOnDate, dateFormat, locale
+ +
+
+ + https://DomainName/fineract-provider/api/v1/savingsaccounts/gsimcommands/{gsimId}?command=close + + + POST: savingsaccounts/gsimcommands/10?command=close + Content-Type: application/json + Request Body: + { + "closedOnDate": "04 June 2020", + "dateFormat":"dd MMMM yyyy", + "locale":"en" + } + + + { + "officeId": 1, + "groupId": 1, + "clientId": 1, + "savingsId": 16, + "resourceId": 16, + "changes": { + "status": { + "id": 600, + "code": "savingsAccountStatusType.closed", + "value": "Closed", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": true, + "prematureClosed": false, + "transferInProgress": false, + "transferOnHold": false, + "matured": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "closedOnDate": "04 June 2020" + } + } + +
+
+ + +   +
+
+

List savings applications/accounts

+

Example Requests:

+
savingsaccounts
+

+
savingsaccounts?fields=name
+
+
+ GET https://Domain Name/api/v1/savingsaccounts + + { + "totalFilteredRecords": 1, + "pageItems": [ + { + "id": 1, + "accountNo": "000000001", + "clientId": 1, + "clientName": "small business", + "savingsProductId": 1, + "savingsProductName": "Passbook Savings", + "fieldOfficerId": 0, + "status": { + "id": 100, + "code": "savingsAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false + }, + "timeline": { + "submittedOnDate": [ + 2013, + 3, + 1 + ] + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "nominalAnnualInterestRate": 5, + "interestCompoundingPeriodType": { + "id": 1, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", + "value": "Daily" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "summary": { + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "accountBalance": 0 + } + } + ] + } + +
+
+ +   +
+
+

Retrieve a savings application/account:

+

Arguments

+
+
associations
+
optional, Either 'all' or a comma separated list of savings 'associations' (itemized below). +
+

Associations are just extra pieces of data that you might or might not want to retrieve.

+
+
'all': Gets data related to all associations e.g. ?associations=all.
+
'transactions': Gets data related to transactions on the account e.g. + ?associations=transactions +
+
'charges':Savings Account charges data.
+
+

Example Requests :

+
savingsaccounts/1
+

+
savingsaccounts/1?associations=all
+
+
+ GET https://DomainName/api/v1/savingsaccounts/{accountId} + + { + "id": 1, + "accountNo": "000000001", + "clientId": 1, + "clientName": "small business", + "savingsProductId": 1, + "savingsProductName": "Passbook Savings", + "fieldOfficerId": 0, + "status": { + "id": 100, + "code": "savingsAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false + }, + "timeline": { + "submittedOnDate": [ + 2013, + 3, + 1 + ] + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "nominalAnnualInterestRate": 5, + "interestCompoundingPeriodType": { + "id": 1, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", + "value": "Daily" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "summary": { + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "accountBalance": 0, + "availableBalance": 0 + } + } + +
+
+ +   +
+
+

Modify a savings application

+

Savings 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

+
+
+ PUT https://Domain Name/api/v1/savingsaccounts/{accountsId} + PUT savingsaccounts/1 + Content-Type: application/json + No Request Body: + { + "locale": "en", + "nominalAnnualInterestRate": "5.9999999999" + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "nominalAnnualInterestRate": 5.9999999999, + "locale": "en" + } + } + +
+
+ +   +
+
+

Modify savings account withhold tax applicability

+

Savings application's withhold tax can be modified when in 'Active' state. Once the application is + activated, can modify the account withhold tax to post tax or vice-versa

+
+
+ PUT https://Domain + Name/api/v1/savingsaccounts/{accountsId}?command=updateWithHoldTax + PUT savingsaccounts/1?command=updateWithHoldTax + Content-Type: application/json + No Request Body: + { + "withHoldTax": false + } + + + { + "savingsId": 138, + "resourceId": 138, + "changes": { + "withHoldTax": false + } + } + +
+
+   +
+
+

Modify a GSIM Application

+

Allows you to modify the GSIM Application by updating groupId, clientId, productId.

+ + + + + + + +
+
Mandatory Fields
+
groupId, clientId, productId
+ +
+
+ + https://DomainName/fineract-provider/api/v1/savingsaccounts/gsim/{gsimId} + + + PUT: savingsaccounts/gsim/6 + Content-Type: application/json + Request Body: + { + "groupId": 2, + "clientId": 3, + "productId":2 + } + + + + { + "officeId": 1, + "groupId": 2, + "clientId": 3, + "savingsId": 12, + "resourceId": 12, + "changes": { + "clientId": 3, + "productId": 2 + } + } + +
+
+ +   +
+
+

Delete a savings application

+

At present we support hard delete of savings 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 savings account.

+
+
+ DELETE https://Domain Name/api/v1/savingsaccounts/{accountsId} + DELETE savingsaccounts/1 + Content-Type: application/json + No Request Body: + + + { + "officeId": 1, + "clientId": 1, + "resourceId": 1 + } + +
+
+ +   +
+
+

Savings Account Transactions:

+

Transactions possible on a savings account.

+ + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
transactionDate
The date of the transaction.
transactionAmount
The amount of the transaction.
+
+
+ +   +
+
+

Retrieve Savings Account Transaction Template:

+

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 Requests:

+
savingsaccounts/1/transactions/template
+
+
+
+ GET https://Domain + Name/api/v1/savingsaccounts/{accountId}/transactions/template + + + { + "accountId": 1, + "accountNo": "000000001", + "date": [ + 2013, + 5, + 27 + ], + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "paymentTypeOptions": [ + { + "id": 14, + "name": "Wire Transfer", + "position": 0 + }, + { + "id": 13, + "name": "Cash", + "position": 1 + } + ] + } + +
+
+ +   +
+
+

Retrieve Savings Account Transaction:

+

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 Requests:

+
savingsaccounts/1/transactions/1
+
+
+
+ GET https://Domain + Name/api/v1/savingsaccounts/{accountId}/transactions/{transactionId} + + + { + "id": 1, + "transactionType": { + "id": 2, + "code": "savingsAccountTransactionType.withdrawal", + "value": "Withdrawal", + "deposit": false, + "withdrawal": true, + "interestPosting": false, + "feeDeduction": false + }, + "accountId": 1, + "accountNo": "000000001", + "date": [ + 2013, + 8, + 7 + ], + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "paymentDetailData": { + "id": 62, + "paymentType": { + "id": 11, + "name": "cash" + }, + "accountNumber": "", + "checkNumber": "", + "routingCode": "", + "receiptNumber": "", + "bankNumber": "" + }, + "amount": 5000, + "runningBalance": 0, + "reversed": true + } + +
+
+ +   +
+
+

Deposit Transaction

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{accountsId}/transactions?command=deposit + POST savingsaccounts/1/transactions?command=deposit + Content-Type: application/json + No Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "transactionDate": "27 May 2013", + "transactionAmount": "500", + "paymentTypeId": "14", + "accountNumber": "acc123", + "checkNumber": "che123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123" + } + + + { + "officeId": 1, + "clientId": 2, + "savingsId": 1, + "resourceId": 47, + "changes": { + "accountNumber": "acc123", + "checkNumber": "che123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123" + } + } + +
+
+ +   +
+
+

GSIM Deposit Transaction

+
+
+ POST + https://DomainName/fineract-provider/api/v1 + /savingsaccounts/{savingsId}/transactions?command=gsimDeposit + + POST : savingsaccounts/1/transactions?command=gsimDeposit + Content-Type: application/json + No Request Body: + { + savingsArray:[ + { + "transactionDate":"04 June 2020", + "dateFormat"="dd MMMM yyyy", + "locale"="en", + "transactionAmount":2500, + "paymentTypeId":1, + "childAccountId":1 + } + ] + } + + + + { + "officeId": 1, + "groupId": 1, + "savingsId": 1, + "resourceId": 26, + "changes": {} + } + + +
+
+ +   +
+
+

Withdrawal Transaction

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{accountsId}/transactions?command=withdrawal + POST savingsaccounts/1/transactions?command=withdrawal + Content-Type: application/json + No Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "transactionDate": "27 May 2013", + "transactionAmount": "500", + "paymentTypeId": "14", + "accountNumber": "acc123", + "checkNumber": "che123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123" + } + + + { + "officeId": 1, + "clientId": 2, + "savingsId": 1, + "resourceId": 48, + "changes": { + "accountNumber": "acc123", + "checkNumber": "che123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123" + } + } + +
+
+ +   +
+
+

Adjust Transaction

+

This command modifies the given transaction.

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{accountsId}/transactions/{transactionId}?command=modify + POST savingsaccounts/1/transactions/1?command=modify + Content-Type: application/json + No Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "transactionDate": "27 May 2013", + "transactionAmount": "500", + "paymentTypeId": "14", + "accountNumber": "acc123", + "checkNumber": "che123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123" + } + + + { + "officeId": 1, + "clientId": 2, + "savingsId": 1, + "resourceId": 48, + "changes": { + "accountNumber": "acc123", + "checkNumber": "che123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123" + } + } + +
+
+ + +   +
+
+

Undo transaction

+

This command reverses the given transaction.

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/{accountsId}/transactions/{transactionId}?command=undo + POST savingsaccounts/1/transactions/1?command=undo + Content-Type: application/json + No Request Body: + { + } + + + { + "officeId": 1, + "clientId": 2, + "savingsId": 1, + "resourceId": 1 + } + +
+
+   +
+
+

Hold Amount

+

Hold amount enables the user to hold/block/lien the specified amount from the account

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/4/transactions?command=holdAmount + POST savingsaccounts/4/transactions?command=holdAmount + Content-Type: application/json + Request Body: + { + transactionDate:"15 June 2017", + transactionAmount:"200", + locale:"en", + dateFormat:"dd MMMM yyyy" + } + + + { + "officeId":1, + "clientId":2, + "savingsId":4, + "resourceId":35 + } + +
+
+   +
+
+

Release Amount

+

Release amount removes the hold/block/lien already placed on an amount in the account.

+
+
+ POST https://Domain + Name/api/v1/savingsaccounts/4/transactions/35?command=releaseAmount + POST savingsaccounts/4/transactions/35?command=releaseAmount + Content-Type: application/json + No Request Body: + { + + } + + + { + "officeId":1, + "clientId":2, + "savingsId":4, + "resourceId":36 + } + +
+
+ + + + +   +
+
+

Savings Charges

+

Its typical for MFIs to add maintenance and operating charges. They can be either Fees or Penalties. +

+

Savings Charges are instances of Charges and + represent either fees and penalties for savings products. Refer Charges + for documentation of the various properties of a charge, Only additional properties ( + specific to the context of a Charge being associated with a Savings account) are + described here

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
amountPaid
The Total amount which has been paid for this Charge +
amountWaived
The Total amount that has been waived for this Charge +
amountWrittenOff
Total amount written off from this Charge +
amountOutstanding
The Total outstanding amount for this Charge +
+
+
+ +   +
+
+

List Savings Charges

+

Example Requests:

+
savingsaccounts/1/charges
+
+
savingsaccounts/1/charges?chargeStatus=all
+
+
savingsaccounts/1/charges?chargeStatus=inactive
+
+
savingsaccounts/1/charges?chargeStatus=active
+
+
savingsaccounts/1/charges?fields=name,amountOrPercentage
+
+
+ + GET https://DomainName/api/v1/savingsaccounts/{accountId}/charges + + + [ + { + "id": 1, + "chargeId": 3, + "accountId": 57, + "name": "Savings account maintenance fee", + "chargeTimeType": { + "id": 1, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "percentage": 0, + "amountPercentageAppliedTo": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100, + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 100, + "amountOrPercentage": 100, + "penalty": false + }, + { + "id": 2, + "chargeId": 4, + "accountId": 57, + "name": "Pass book Fee", + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "dueDate": [ + 2013, + 3, + 29 + ], + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "percentage": 0, + "amountPercentageAppliedTo": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100, + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 100, + "amountOrPercentage": 100, + "penalty": false + }, + { + "id": 9, + "chargeId": 4, + "accountId": 57, + "name": "Withdrawal fee percentage", + "chargeTimeType": { + "id": 5, + "code": "chargeTimeType.withdrawalFee", + "value": "Withdrawal Fee" + }, + "chargeCalculationType": { + "id": 2, + "code": "chargeCalculationType.percent.of.amount", + "value": "% Amount" + }, + "percentage": 0.25, + "amountPercentageAppliedTo": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 0, + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 0, + "amountOrPercentage": 0.25, + "penalty": false + }, + { + "id": 10, + "chargeId": 6, + "accountId": 57, + "name": "Annual fee - INR", + "chargeTimeType": { + "id": 6, + "code": "chargeTimeType.annualFee", + "value": "Annual Fee" + }, + "feeOnMonthDay": [ + 10, + 9 + ], + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "percentage": 0, + "amountPercentageAppliedTo": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 50, + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 50, + "amountOrPercentage": 50, + "penalty": false + } + ] + +
+
+ +   +
+
+

Retrieve Savings Charges Template

+

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:

+
savingsaccounts/1/charges/template
+
+
+ + GET https://DomainName/api/v1/savingsaccounts/{accountId}/charges/template + + + { + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "chargeOptions": [ + { + "id": 2, + "name": "Passbook Fee", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100, + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.savings", + "value": "Savings" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + } + }, + { + "id": 3, + "name": "Chequebook fee", + "active": true, + "penalty": true, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 1, + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.savings", + "value": "Savings" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + } + }, + { + "id": 6, + "name": "Annual fee", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 50, + "chargeTimeType": { + "id": 6, + "code": "chargeTimeType.annualFee", + "value": "Annual Fee" + }, + "chargeAppliesTo": { + "id": 2, + "code": "chargeAppliesTo.savings", + "value": "Savings" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + } + ], + "penalty": false + } + +
+
+ +   +
+
+

Retrieve a Savings account Charge

+

Example Requests:

+
/savingsaccounts/1/charges/5
+
+
+
/savingsaccounts/1/charges/5?fields=name,amountOrPercentage
+
+
+ + GET https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId} + + + { + "id": 1, + "chargeId": 1, + "name": "Passbook fee", + "chargeTimeType": { + "id": 1, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "percentage": 0, + "amountPercentageAppliedTo": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100, + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 100, + "amountOrPercentage": 100, + "penalty": false + } +
+
+ +   +
+
+

Create a Savings account Charge

+ + + + + + + + + + + + + + + + + + + +
+
Mandatory Fields + for Savings account Charges +
+
chargeId, amount
+
Mandatory Fields + for Savings account Charges of Specified due date type +
+
chargeId, amount, dueDate, dateFormat, locale
+
Mandatory Fields + for Savings account Charges of Annual fee type +
+
chargeId, amount, feeOnMonthDay, monthDayFormat, locale
+
+
+ + POST https://DomainName/api/v1/savingsaccounts/{accountId}/charges + + + POST /savingsaccounts/1/charges + Content-Type: application/json + Request Body: + { + "chargeId": "2", + "locale": "en", + "amount": "100", + "dateFormat": "dd MMMM yyyy", + "dueDate": "29 April 2013" + } + + + { + "officeId": 1, + "clientId": 1, + "savingsId": 1, + "resourceId": 6 + } + + + POST /savingsaccounts/1/charges + Content-Type: application/json + Request Body: + { + "chargeId": "2", + "locale": "en", + "amount": "25", + "monthDayFormat": "dd MMMM", + "feeOnMonthDay": "09 October" + } + + + { + "officeId": 1, + "clientId": 1, + "savingsId": 1, + "resourceId": 7 + } + +
+
+ +   +
+
+

Update a Savings account Charge

+

Currently Savings account Charges may be updated only if the Savings account + is not yet approved. +

+
+
+ + PUT https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId} + + + PUT savingsaccounts/1/charges/6 + Content-Type: application/json + Request Body: + { + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "amount": "60", + "dueDate": "27 March 2013" + } + + + { + "officeId": 1, + "clientId": 1, + "savingsId": 1, + "resourceId": 6, + "changes": { + "dueDate": "27 March 2013", + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "amount": 60.0 + } + } + +
+
+ +   +
+
+

Delete a Savings account Charge

+

+ Note:Currently, A Savings account Charge may only be removed from Savings that are not + yet approved. +

+
+
+ + DELETE https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId} + + + DELETE savingsaccounts/1/charges/2 + Content-Type: application/json + No Request Body: + + + { + "officeId": 1, + "clientId": 1, + "savingsId": 1, + "resourceId": 2 + } + +
+
+ +   +
+
+

Pay a Savings account Charge

+

+ An active charge will be paid when savings account is active and having sufficient balance. +

+
+
+ + POST + https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=paycharge + + + POST savingsaccounts/1/charges/2?command=paycharge + Content-Type: application/json + Request Body: + { + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "amount": "60", + "dueDate": "12 September 2013" + } + + + { + "officeId": 1, + "clientId": 1, + "savingsId": 1, + "resourceId": 2 + } + +
+
+ +   +
+
+

Waive off a Savings account Charge

+

+ Outstanding charge amount will be waived off. +

+
+
+ + POST + https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=waive + + + POST savingsaccounts/1/charges/2?command=waive + Content-Type: application/json + No Request Body: + + + { + "officeId": 1, + "clientId": 1, + "savingsId": 1, + "resourceId": 2 + } + +
+
+ +   +
+
+

Inactivate a Savings account Charge

+

+ A charge will be allowed to inactivate when savings account is active and not having any dues as of + today. If charge is overpaid, corresponding charge payment transactions will be reversed. +

+
+
+ + POST + https://DomainName/api/v1/savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=inactivate + + + POST savingsaccounts/1/charges/2?command=inactivate + Content-Type: application/json + No Request Body: + + + { + "officeId": 1, + "clientId": 1, + "savingsId": 1, + "resourceId": 2 + } + +
+
+ + + + +   +
+
+

Fixed Deposit Account:

+

Fixed Deposit accounts are instances of a praticular fixed deposit product created. An application + process around the creation of accounts is also supported.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Starting StateActionResultant State
-SubmitSubmitted and pending approval
Submitted and pending approvalRejectClosed - Rejected
Submitted and pending approvalWithdrawn by ApplicantClosed - Withdrawn by Applicant
Submitted and pending approvalApproveApproved
ApprovedUndo ApprovalSubmitted and pending approval
ApprovedActivateActive
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
clientId
The client you are creating the fixed deposit account for. Either clientId + or groupId must be provided. +
groupId
The group you are creating the fixed deposit account for. Either + clientId or groupId must be provided. +
productId
The id of the product used for this fixed deposit account. The fixed deposit + account inherits the selected currency of the product and possibly other details + if not overridden in the fixed deposit account creation request. +
accountNo
The account no. associated with this fixed deposit. Is auto generated if not + provided at creation time. +
externalId
A place to put an external reference for this fixed deposit account useful + in migrations e.g. The ID another system uses. If provided, it must be unique. +
submittedOnDate
submittedOnDate must be provided when initially creating fixed + deposit account application. locale and dateFormat parameters must be provided + with this. +
interestCompoundingPeriodType
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end + of month) +
interestPostingPeriodType
The period at which interest rate is posted or credited to fixed deposit + account. The actual crediting or posting transaction is date as occurring on the day after + the end of the period. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st + Mar, 30th Jun, 30th Sep, 31st Dec), 7=Annually (at end of calendar year 31st Dec) +
interestCalculationType
The interest calculation method used: 1=Daily Balance or 2=Average Daily + Balance +
interestCalculationDaysInYearType
The setting for number of days in year to use: 360=360 Days, 365=365 Days +
lockinPeriodFrequency
Optional: If provided, used along with + lockinPeriodFrequencyType to indicate the length of time that the fixed deposit + account is 'locked in' and withdrawals are not allowed. e.g. 6 Months +
lockinPeriodFrequencyType
Optional: If provided, used along with lockinPeriodFrequency + to indicate the length of time that the fixed deposit account is 'locked in' and withdrawals + are not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years + e.g. 6 Months
depositAmount
The fixed deposit amount for which interest is provided on maturity.
depositPeriod
Used along with depositPeriodFrequencyId to define term for which + amount is deposited in fixed deposit. e.g. 6 Months +
depositPeriodFrequencyId
Used along with depositPeriod to define term for which amount is + deposited in fixed deposit. 0=Days, 1=Weeks, 2=Months, 3=Years + e.g. 6 Months +
minDepositTerm
This is used along with minDepositTermTypeId to define allowed + minimum deposit term for creating a fixed deposit account using this product. e.g. 6 + Months +
minDepositTermTypeId
Used along with minDepositTerm to define allowed minimum deposit + term for creating a fixed deposit account using this product. 0=Days, 1=Weeks, 2=Months, + 3=Years + e.g. 6 Months +
maxDepositTerm
Optional: If provided, used along with maxDepositTermTypeId to + define allowed maximum deposit term for creating a fixed deposit account using this product. + e.g. 3 Years +
maxDepositTermTypeId
Optional: If provided, used along with maxDepositTerm to + define allowed maximum deposit term for creating a fixed deposit account using this product. + 0=Days, 1=Weeks, 2=Months, 3=Years + e.g. 3 Years +
inMultiplesOfDepositTerm
Optional: If provided, used along with inMultiplesOfDepositTermTypeId + to indicate the allowed deposit periods after minimum deposit period. e.g. If + inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after + minimum deposit of 6 Months should be 9 Months.
inMultiplesOfDepositTermTypeId
Optional: If provided, used along with + inMultiplesOfDepositTerm to indicate the allowed deposit periods after minimum + deposit period. 0=Days, 1=Weeks, 2=Months, 3=Years + e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period + after minimum deposit of 6 Months should be 9 Months. +
preClosurePenalApplicable
Optional: expects boolean value true/false, If provided as true then + must provide preClosurePenalInterest and preClosurePenalInterestOnTypeId. +
preClosurePenalInterest
Optional: Must provide when preClosurePenalApplicable is true. + Used along with preClosurePenalInterestOnTypeId to apply a penalalty on top of + applicable interest rate for Pre-mature closure of accounts. e.g. “1%” means 1% less than + the interest rate applicable. +
preClosurePenalInterestOnTypeId
Optional: Must provide when preClosurePenalApplicable is true. + Used along with preClosurePenalInterest to decide what should be the applicable + interest rate to which penalalty can be applied on Pre-mature closure of accounts. 1=Whole + Term, 2=Till Premature withdrawal e.g. “1%” means 1% less than the interest rate applicable + till premature withdrawal. +
withHoldTax
Optional: If tax group provided at product level, will allow to + Enable or disable withhold tax on interest posting for savings account +
+
+
+ +   +
+
+

Retrieve Fixed Deposit Account Template:

+

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 Lists
  • +
+

+

Arguments

+
+
clientId
+
Integer mandatory
+
productId
+
Integer optional
+
If entered, productId, productName and selectedProduct fields are returned.
+
+

Example Requests:

+
fixeddepositaccounts/template?clientId=1
+

+
fixeddepositaccounts/template?clientId=1&productId=1
+
+
+ GET https://Domain + Name/api/v1/fixeddepositaccounts/template?clientId={clientId} + + { + "clientId": 1, + "clientName": "small business", + "productOptions": [ + { + "id": 1, + "name": "Passbook Savings" + } + ] + } + +
+ +
+ GET https://Domain + Name/api/v1/fixeddepositaccounts/template?clientId={clientId}&productId={productId} + + { + "clientId": 1, + "clientName": "small business", + "savingsProductId": 1, + "savingsProductName": "Passbook Savings", + "timeline": {}, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "nominalAnnualInterestRate": 5, + "interestCompoundingPeriodType": { + "id": 1, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", + "value": "Daily" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "productOptions": [ + { + "id": 1, + "name": "Passbook Savings" + } + ], + "fieldOfficerOptions": [ + { + "id": 3, + "firstname": "Mrs.", + "lastname": "loanofficerB1", + "displayName": "loanofficerB1, Mrs.", + "officeId": 2, + "officeName": "branch 1", + "isLoanOfficer": true + }, + { + "id": 1, + "firstname": "Mr.", + "lastname": "loanofficerHO", + "displayName": "loanofficerHO, Mr.", + "officeId": 1, + "officeName": "branch 1", + "isLoanOfficer": true + } + ], + "interestCompoundingPeriodTypeOptions": [ + { + "id": 1, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", + "value": "Daily" + }, + { + "id": 4, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", + "value": "Monthly" + } + ], + "interestPostingPeriodTypeOptions": [ + { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + { + "id": 5, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.quarterly", + "value": "Quarterly" + }, + { + "id": 7, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.annual", + "value": "Annually" + } + ], + "interestCalculationTypeOptions": [ + { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + { + "id": 2, + "code": "savingsInterestCalculationType.averagedailybalance", + "value": "Average Daily Balance" + } + ], + "interestCalculationDaysInYearTypeOptions": [ + { + "id": 360, + "code": "savingsInterestCalculationDaysInYearType.days360", + "value": "360 Days" + }, + { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + } + ], + "lockinPeriodFrequencyTypeOptions": [ + { + "id": 0, + "code": "savings.lockin.savingsPeriodFrequencyType.days", + "value": "Days" + }, + { + "id": 1, + "code": "savings.lockin.savingsPeriodFrequencyType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "savings.lockin.savingsPeriodFrequencyType.months", + "value": "Months" + }, + { + "id": 3, + "code": "savings.lockin.savingsPeriodFrequencyType.years", + "value": "Years" + } + ], + "withdrawalFeeTypeOptions": [ + { + "id": 1, + "code": "savingsWithdrawalFeesType.flat", + "value": "Flat" + }, + { + "id": 2, + "code": "savingsWithdrawalFeesType.percent.of.amount", + "value": "% of Amount" + } + ], + "chargeOptions": [ + { + "id": 4, + "name": "Savings charge 1", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 200, + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeAppliesTo": { + "id": 2, + "code": "chargeAppliesTo.savings", + "value": "Savings" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "chargepaymentmode.regular" + } + }, + { + "id": 5, + "name": "Savings charge 2", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 300, + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeAppliesTo": { + "id": 2, + "code": "chargeAppliesTo.savings", + "value": "Savings" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "chargepaymentmode.regular" + } + }, + { + "id": 6, + "name": "Annual fee", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 50, + "chargeTimeType": { + "id": 6, + "code": "chargeTimeType.annualFee", + "value": "Annual Fee" + }, + "chargeAppliesTo": { + "id": 2, + "code": "chargeAppliesTo.savings", + "value": "Savings" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + }, + { + "id": 7, + "name": "Quarterly fee", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 5, + "chargeTimeType": { + "id": 7, + "code": "chargeTimeType.monthlyFee", + "value": "Monthly Fee" + }, + "chargeAppliesTo": { + "id": 2, + "code": "chargeAppliesTo.savings", + "value": "Savings" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + }, + "feeOnMonthDay": [ + 10, + 5 + ], + "feeInterval": 4 + } + ] + } + +
+
+ +   +
+
+

Submit 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 ) +
+
+ + + + + + + +
+
Inherited from Product (if not provided)
+
interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, + lockinPeriodFrequency, lockinPeriodFrequencyType, preClosurePenalApplicable, + preClosurePenalInterest, preClosurePenalInterestOnTypeId, charts, withHoldTax +
+
+
+

Minimal request: accountNo auto generated, remaining details inherited from fixed deposit + product.

+ POST https://Domain Name/api/v1/fixeddepositaccounts + POST fixeddepositaccount + Content-Type: application/json + Request Body: + { + "clientId": 1, + "productId": 1, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "submittedOnDate": "01 March 2014", + "depositAmount":"5000", + "depositPeriod":"6", + "depositPeriodFrequencyId":"2" + } + +

Minimal request: accountNo provided (must be unique), remaining details inherited from fixed deposit + product.

+ POST fixeddepositaccount + Content-Type: application/json + Request Body: + { + "clientId": 1, + "productId": 1, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "submittedOnDate": "01 March 2014", + "depositAmount":"5000", + "depositPeriod":"6", + "depositPeriodFrequencyId":"2", + "accountNo": "FD000023", + "externalId": "FD-23" + } + +

Full request: accountNo provided (must be unique), remaining details override details from fixed + deposit product (except currency).

+ POST savingsaccount + Content-Type: application/json + Request Body: + { + "clientId": 1, + "productId": 1, + "fieldOfficerId": 1, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "submittedOnDate": "01 March 2014", + "accountNo": "FD000024", + "externalId": "FD-24", + "interestCompoundingPeriodType": 1, + "interestPostingPeriodType": 4, + "interestCalculationType": 1, + "interestCalculationDaysInYearType": 365, + "depositAmount":"5000", + "depositPeriod":"6", + "depositPeriodFrequencyId":"2", + "lockinPeriodFrequency": 6, + "lockinPeriodFrequencyType": 2, + "charges":[{"id":"1"}] + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1 + } + +
+
+ +   +
+
+

Approve fixed deposit application

+

Approves fixed deposit application so long as its in 'Submitted and pending approval' state.

+
+
+ POST https://Domain + Name/api/v1/fixeddepositaccounts/{accountId}?command=approve + POST fixeddepositaccounts/1?command=approve + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "approvedOnDate": "01 March 2013" + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 200, + "code": "savingsAccountStatusType.approved", + "value": "Approved", + "submittedAndPendingApproval": false, + "approved": true, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "approvedOnDate": "01 March 2013" + } + } + +
+
+ +   +
+
+

Undo approval fixed deposit application

+

Will move 'approved' fixed deposit application back to 'Submitted and pending approval' state.

+
+
+ POST https://Domain + Name/api/v1/fixeddepositaccounts/{accountId}?command=undoApproval + POST fixeddepositaccounts/1?command=undoApproval + Content-Type: application/json + Request Body: + { + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 100, + "code": "savingsAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false + }, + "approvedOnDate": "" + } + } + +
+
+ +   +
+
+

Reject fixed deposit application

+

Rejects fixed deposit application so long as its in 'Submitted and pending approval' state.

+
+
+ POST https://Domain + Name/api/v1/fixeddepositaccounts/{accountId}?command=reject + POST fixeddepositaccounts/1?command=reject + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "rejectedOnDate": "03 March 2013" + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 500, + "code": "savingsAccountStatusType.rejected", + "value": "Rejected", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": true, + "withdrawnByApplicant": false, + "active": false, + "closed": true + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "rejectedOnDate": "03 March 2013", + "closedOnDate": "03 March 2013" + } + } + +
+
+ +   +
+
+

Withdraw fixed deposit application

+

Used when an applicant withdraws from the fixed deposit application. It must be in 'Submitted and + pending approval' state.

+
+
+ POST https://Domain + Name/api/v1/fixeddepositaccounts/{savingsId}?command=withdrawnByApplicant + POST savingsaccount/1?command=withdrawnByApplicant + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "withdrawnOnDate": "03 March 2013" + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 400, + "code": "savingsAccountStatusType.withdrawn.by.applicant", + "value": "Withdrawn by applicant", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "withdrawnByApplicant": true, + "active": false, + "closed": true + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "withdrawnOnDate": "03 March 2013", + "closedOnDate": "03 March 2013" + } + } + +
+
+ +   +
+
+

Activate a fixed deposit account

+

Results in an approved fixed deposit application being converted into an 'active' fixed deposit + account.

+
+
+ POST https://Domain + Name/api/v1/fixeddepositaccounts/{accountId}?command=activate + POST savingsaccount/1?command=activate + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "activatedOnDate": "01 March 2013" + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 300, + "code": "savingsAccountStatusType.active", + "value": "Active", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": true, + "closed": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "activatedOnDate": "01 March 2013" + } + } + +
+
+ +   +
+
+

Close a fixed deposit account

+

Results in a Matured fixed deposit account being converted into a 'closed' fixed deposit account.

+

On account close allowed actions are.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Action on CloseResult
Withdraw Deposit                     Matured amount withdrawn and paid to client
Transfer to SavingsMatured amount transfered to specified savings account.
                     
Re-InvestCreate new Fixed deposit application with matured amount as deposit amount.
+
+
+ POST https://Domain + Name/api/v1/fixeddepositaccounts/{accountId}?command=close + POST fixeddepositaccounts/1?command=close + Content-Type: application/json + Request Body: + { + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "closedOnDate":"19 April 2014", + "note":"Closing and transfering amount to savings", + "onAccountClosureId":"200", + "toSavingsAccountId":1, + "transferDescription":"Transfered matured amount to savings account" + } + + + { + "officeId":1, + "clientId":1, + "savingsId":5, + "resourceId":5, + "changes":{ + "status":{ + "id":600, + "code":"savingsAccountStatusType.closed", + "value":"Closed", + "submittedAndPendingApproval":false, + "approved":false, + "rejected":false, + "withdrawnByApplicant":false, + "active":false, + "closed":true + }, + "locale":"en", + "dateFormat":"dd MMMM yyyy", + "closedOnDate":"19 April 2014", + "note":"Closing and transfering amount to savings" + } + } + +
+
+ +   +
+
+

Premature Close a fixed deposit account

+

Results in an Active fixed deposit account being converted into a 'Premature Closed' fixed deposit + account with options to withdraw prematured amount. (premature amount is calculated using interest + rate chart applicable along with penal interest if any.)

+

On account premature closure allowed actions are.

+ + + + + + + + + + + + + + + + + +
Action on Premature CloseResult
Withdraw Deposit                     Matured amount withdrawn and paid to client
Transfer to SavingsMatured amount transfered to specified savings account.
+
+
+ POST https://Domain + Name/api/v1/fixeddepositaccounts/{accountId}?command=prematureClose + POST fixeddepositaccounts/1?command=prematureClose + Content-Type: application/json + Request Body: + { + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "closedOnDate":"19 April 2014", + "note":"Close and transfer amount to savings", + "onAccountClosureId":"200", + "toSavingsAccountId":1, + "transferDescription":"Transfered matured amount to savings account" + } + + + { + "officeId": 1, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 700, + "code": "savingsAccountStatusType.pre.mature.closure", + "value": "Premature Closed", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false, + "prematureClosed": true, + "transferInProgress": false, + "transferOnHold": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "closedOnDate": "19 April 2014", + "note": "Close and transfer amount to savings" + } + } + +
+
+ +   +
+
+

Calculate Premature amount on Fixed deposit account

+

Calculate premature amount on fixed deposit account till premature close date. Premature amount is + calculated based on interest chart and penal interest applicable.

+
+
+ POST https://Domain + Name/api/v1/fixeddepositaccounts/{accountId}?command=calculatePrematureAmount + POST fixeddepositaccounts/1?command=calculatePrematureAmount + Content-Type: application/json + Request Body: + { + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "closedOnDate":"19 April 2014" + } + + + { + "maturityAmount": 100.65, + "savingsAccounts": [ + { + "id": 1, + "accountNo": "000000001", + "clientId": 1, + "clientName": "Sangamesh N", + "savingsProductId": 1, + "savingsProductName": "FD-0001" + } + ], + "onAccountClosureOptions": [ + { + "id": 100, + "code": "depositAccountClosureType.withdrawDeposit", + "value": "Withdra Deposit" + }, + { + "id": 200, + "code": "depositAccountClosureType.transferToSavings", + "value": "Transfer to Savings" + }, + { + "id": 300, + "code": "depositAccountClosureType.reinvest", + "value": "Re-Invest" + } + ], + "paymentTypeOptions": [], + "id": 12, + "depositType": { + "id": 300, + "code": "depositAccountType.recurringDeposit", + "value": "Recurring Deposit" + } + } + +
+
+ +   +
+
+

Calculate Interest on Fixed Deposit Account

+

+ Calculates interest earned on a fixed deposit account based on todays date. It does not attempt to + post or credit the interest on the account. That is responsibility of the Post Interest API that will likely be called by overnight + process. +

+
+
+ POST https://Domain + Name/api/v1/fixeddepositaccounts/{accountId}?command=calculateInterest + POST fixeddepositaccount/1?command=calculateInterest + Content-Type: application/json + Request Body: + { + } + + + { + "officeId": 1, + "clientId": 1, + "savingsId": 1, + "resourceId": 1 + } + +
+
+ +   +
+
+

Post Interest on Fixed Deposit Account

+

+ Calculates and Posts interest earned on a fixed deposit account based on todays date and whether an + interest posting or crediting event is due. +

+
+
+ POST https://Domain + Name/api/v1/fixeddepositaccounts/{accountId}?command=postInterest + POST fixeddepositaccount/1?command=postInterest + Content-Type: application/json + Request Body: + { + } + + + { + "officeId": 1, + "clientId": 1, + "savingsId": 1, + "resourceId": 1 + } + +
+
+ +   +
+
+

List Fixed deposit applications/accounts

+

Example Requests:

+
fixeddepositaccounts
+

+
fixeddepositaccounts?fields=name
+
+
+ GET https://Domain Name/api/v1/fixeddepositaccounts + + [ + { + "id": 1, + "accountNo": "000000001", + "clientId": 1, + "clientName": "Sangamesh N", + "savingsProductId": 3, + "savingsProductName": "FD01", + "fieldOfficerId": 0, + "status": { + "id": 100, + "code": "savingsAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false, + "prematureClosed": false, + "transferInProgress": false, + "transferOnHold": false + }, + "timeline": { + "submittedOnDate": [ + 2014, + 3, + 1 + ], + "submittedByUsername": "mifos", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator" + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "interestCompoundingPeriodType": { + "id": 4, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "summary": { + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "accountBalance": 0 + }, + "interestFreePeriodApplicable": false, + "preClosurePenalApplicable": false, + "minDepositTerm": 3, + "maxDepositTerm": 4, + "minDepositTermType": { + "id": 2, + "code": "deposit.term.savingsPeriodFrequencyType.months", + "value": "Months" + }, + "maxDepositTermType": { + "id": 3, + "code": "deposit.term.savingsPeriodFrequencyType.years", + "value": "Years" + }, + "depositAmount": 5000, + "maturityAmount": 5140.25, + "maturityDate": [ + 2014, + 9, + 1 + ], + "depositPeriod": 6, + "depositPeriodFrequency": { + "id": 2, + "code": "deposit.period.savingsPeriodFrequencyType.months", + "value": "Months" + } + } + ] + + +
+
+ +   +
+
+

Retrieve a fixed deposit application/account:

+

Arguments

+
+
associations
+
optional, Either 'all' or a comma separated list of fixed deposit 'associations' (itemized below). +
+

Associations are just extra pieces of data that you might or might not want to retrieve.

+
+
'all': Gets data related to all associations e.g. ?associations=all.
+
'transactions': Gets data related to transactions on the account e.g. + ?associations=transactions +
+
'charges':fixed deposit Account charges data.
+
+

Example Requests :

+
fixeddepositaccounts/1
+

+
fixeddepositaccounts/1?associations=all
+
+
+ GET https://DomainName/api/v1/fixeddepositaccounts/{accountId} + + { + "id": 1, + "accountNo": "FD000023", + "externalId": "FD-23", + "clientId": 1, + "clientName": "Sangamesh N", + "savingsProductId": 3, + "savingsProductName": "FD01", + "fieldOfficerId": 0, + "status": { + "id": 100, + "code": "savingsAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false, + "prematureClosed": false, + "transferInProgress": false, + "transferOnHold": false + }, + "timeline": { + "submittedOnDate": [ + 2014, + 3, + 1 + ], + "submittedByUsername": "mifos", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator" + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "interestCompoundingPeriodType": { + "id": 4, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "interestFreePeriodApplicable": false, + "preClosurePenalApplicable": false, + "minDepositTerm": 3, + "maxDepositTerm": 4, + "minDepositTermType": { + "id": 2, + "code": "deposit.term.savingsPeriodFrequencyType.months", + "value": "Months" + }, + "maxDepositTermType": { + "id": 3, + "code": "deposit.term.savingsPeriodFrequencyType.years", + "value": "Years" + }, + "depositAmount": 5000, + "maturityAmount": 5140.25, + "maturityDate": [ + 2014, + 9, + 1 + ], + "depositPeriod": 6, + "depositPeriodFrequency": { + "id": 2, + "code": "deposit.period.savingsPeriodFrequencyType.months", + "value": "Months" + }, + "summary": { + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "accountBalance": 0 + }, + "accountChart": { + "id": 4, + "fromDate": [ + 2013, + 10, + 2 + ], + "accountId": 5, + "accountNumber": "FD000023", + "chartSlabs": [ + { + "id": 13, + "periodType": { + "id": 0, + "code": "interestChartPeriodType.days", + "value": "Days" + }, + "fromPeriod": 181, + "toPeriod": 365, + "annualInterestRate": 5.5, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + }, + { + "id": 12, + "periodType": { + "id": 0, + "code": "interestChartPeriodType.days", + "value": "Days" + }, + "fromPeriod": 1, + "toPeriod": 180, + "annualInterestRate": 5, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + }, + { + "id": 11, + "periodType": { + "id": 0, + "code": "interestChartPeriodType.days", + "value": "Days" + }, + "fromPeriod": 366, + "annualInterestRate": 6, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + } + ], + "periodTypes": [ + { + "id": 0, + "code": "interestChartPeriodType.days", + "value": "Days" + }, + { + "id": 1, + "code": "interestChartPeriodType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "interestChartPeriodType.months", + "value": "Months" + }, + { + "id": 3, + "code": "interestChartPeriodType.years", + "value": "Years" + } + ] + } + } + +
+
+ +   +
+
+

Modify a fixed deposit application

+

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

+
+
+ PUT https://Domain Name/api/v1/fixeddepositaccounts/{accountId} + PUT fixeddepositaccounts/1 + Content-Type: application/json + No Request Body: + { + "locale": "en", + "depositAmount": 6000 + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "depositAmount": 6000, + "locale": "en" + } + } + +
+
+ +   +
+
+

Delete a fixed deposit application

+

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.

+
+
+ DELETE https://Domain + Name/api/v1/fixeddepositaccounts/{accountsId} + DELETE fixeddepositaccounts/1 + Content-Type: application/json + No Request Body: + + + { + "officeId": 1, + "clientId": 1, + "resourceId": 1 + } + +
+
+ + + + +   +
+
+

Recurring Deposit Account:

+

Recurring Deposit accounts are instances of a praticular recurring deposit product created. An + application process around the creation of accounts is also supported.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Starting StateActionResultant State
-SubmitSubmitted and pending approval
Submitted and pending approvalRejectClosed - Rejected
Submitted and pending approvalWithdrawn by ApplicantClosed - Withdrawn by Applicant
Submitted and pending approvalApproveApproved
ApprovedUndo ApprovalSubmitted and pending approval
ApprovedActivateActive
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
clientId
The client you are creating the recurring deposit account for. Either clientId + or groupId must be provided. +
groupId
The group you are creating the recurring deposit account for. Either clientId + or groupId must be provided. +
productId
The id of the product used for this recurring deposit account. The recurring + deposit account inherits the selected currency of the product and possibly other + details if not overridden in the recurring deposit account creation request. +
accountNo
The account no. associated with this recurring deposit. Is auto generated if + not provided at creation time. +
externalId
A place to put an external reference for this recurring deposit account + useful in migrations e.g. The ID another system uses. If provided, it must be unique. +
submittedOnDate
submittedOnDate must be provided when initially creating recurring + deposit account application. locale and dateFormat parameters must be provided + with this. +
interestCompoundingPeriodType
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end + of month) +
interestPostingPeriodType
The period at which interest rate is posted or credited to recurring deposit + account. The actual crediting or posting transaction is date as occurring on the day after + the end of the period. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st + Mar, 30th Jun, 30th Sep, 31st Dec), 7=Annually (at end of calendar year 31st Dec) +
interestCalculationType
The interest calculation method used: 1=Daily Balance or 2=Average Daily + Balance +
interestCalculationDaysInYearType
The setting for number of days in year to use: 360=360 Days, 365=365 Days +
lockinPeriodFrequency
Optional: If provided, used along with + lockinPeriodFrequencyType to indicate the length of time that the recurring deposit + account is 'locked in' and withdrawals are not allowed. e.g. 6 Months +
lockinPeriodFrequencyType
Optional: If provided, used along with lockinPeriodFrequency + to indicate the length of time that the recurring deposit account is 'locked in' and + withdrawals are not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years + e.g. 6 Months
recurringDepositAmount
The recurring deposit amount to be deposited regularly on a specified by + deposit frequency. +
recurringDepositFrequency
Used along with recurringDepositFrequencyTypeId to define the + frequency at which recurringDepositAmount to be deposited into RD account. e.g. + 6 Months +
recurringDepositFrequencyTypeId
Used along with recurringDepositFrequency to define the frequency at + which recurringDepositAmount to be deposited into RD account. 0=Days, 1=Weeks, + 2=Months, 3=Years + e.g. 6 Months +
depositPeriod
Used along with depositPeriodFrequencyId to define term for which + amount is deposited in recurring deposit. e.g. 6 Months +
depositPeriodFrequencyId
Used along with depositPeriod to define term for which amount is + deposited in recurring deposit. 0=Days, 1=Weeks, 2=Months, 3=Years + e.g. 6 Months +
minDepositTerm
This is used along with minDepositTermTypeId to define allowed + minimum deposit term for creating a recurring deposit account using this product. e.g. + 6 Months +
minDepositTermTypeId
Used along with minDepositTerm to define allowed minimum deposit + term for creating a recurring deposit account using this product. 0=Days, 1=Weeks, 2=Months, + 3=Years + e.g. 6 Months +
maxDepositTerm
Optional: If provided, used along with maxDepositTermTypeId to + define allowed maximum deposit term for creating a recurring deposit account using this + product. e.g. 3 Years +
maxDepositTermTypeId
Optional: If provided, used along with maxDepositTerm to + define allowed maximum deposit term for creating a recurring deposit account using this + product. 0=Days, 1=Weeks, 2=Months, 3=Years + e.g. 3 Years +
inMultiplesOfDepositTerm
Optional: If provided, used along with inMultiplesOfDepositTermTypeId + to indicate the allowed deposit periods after minimum deposit period. e.g. If + inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period after + minimum deposit of 6 Months should be 9 Months.
inMultiplesOfDepositTermTypeId
Optional: If provided, used along with + inMultiplesOfDepositTerm to indicate the allowed deposit periods after minimum + deposit period. 0=Days, 1=Weeks, 2=Months, 3=Years + e.g. If inMultiplesOfDepositTerm is 3 Months then the next allowed deposit period + after minimum deposit of 6 Months should be 9 Months. +
preClosurePenalApplicable
Optional: expects boolean value true/false, If provided as true then + must provide preClosurePenalInterest and preClosurePenalInterestOnTypeId. +
preClosurePenalInterest
Optional: Must provide when preClosurePenalApplicable is true. + Used along with preClosurePenalInterestOnTypeId to apply a penalalty on top of + applicable interest rate for Pre-mature closure of accounts. e.g. “1%” means 1% less than + the interest rate applicable. +
preClosurePenalInterestOnTypeId
Optional: Must provide when preClosurePenalApplicable is true. + Used along with preClosurePenalInterest to decide what should be the applicable + interest rate to which penalalty can be applied on Pre-mature closure of accounts. 1=Whole + Term, 2=Till Premature withdrawal e.g. “1%” means 1% less than the interest rate applicable + till premature withdrawal. +
withHoldTax
Optional: If tax group provided at product level, will allow to + Enable or disable withhold tax on interest posting for savings account +
+
+
+ +   +
+
+

Retrieve recurring Deposit Account Template:

+

This is a convenience resource. It can be useful when building maintenance user interface screens for + recurring deposit applications. The template data returned consists of any or all of: +

    +
  • Field Defaults
  • +
  • Allowed Value Lists
  • +
+

+

Arguments

+
+
clientId
+
Integer mandatory
+
productId
+
Integer optional
+
If entered, productId, productName and selectedProduct fields are returned.
+
+

Example Requests:

+
fixeddepositaccounts/template?clientId=1
+

+
fixeddepositaccounts/template?clientId=1&productId=1
+
+
+ GET https://Domain + Name/api/v1/fixeddepositaccounts/template?clientId={clientId} + + { + "clientId": 1, + "clientName": "small business", + "productOptions": [ + { + "id": 1, + "name": "Passbook Savings" + } + ] + } + +
+ +
+ GET https://Domain + Name/api/v1/fixeddepositaccounts/template?clientId={clientId}&productId={productId} + + { + "clientId": 1, + "clientName": "small business", + "savingsProductId": 1, + "savingsProductName": "Passbook Savings", + "timeline": {}, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "nominalAnnualInterestRate": 5, + "interestCompoundingPeriodType": { + "id": 1, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", + "value": "Daily" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "productOptions": [ + { + "id": 1, + "name": "Passbook Savings" + } + ], + "fieldOfficerOptions": [ + { + "id": 3, + "firstname": "Mrs.", + "lastname": "loanofficerB1", + "displayName": "loanofficerB1, Mrs.", + "officeId": 2, + "officeName": "branch 1", + "isLoanOfficer": true + }, + { + "id": 1, + "firstname": "Mr.", + "lastname": "loanofficerHO", + "displayName": "loanofficerHO, Mr.", + "officeId": 1, + "officeName": "branch 1", + "isLoanOfficer": true + } + ], + "interestCompoundingPeriodTypeOptions": [ + { + "id": 1, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", + "value": "Daily" + }, + { + "id": 4, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", + "value": "Monthly" + } + ], + "interestPostingPeriodTypeOptions": [ + { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + { + "id": 5, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.quarterly", + "value": "Quarterly" + }, + { + "id": 7, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.annual", + "value": "Annually" + } + ], + "interestCalculationTypeOptions": [ + { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + { + "id": 2, + "code": "savingsInterestCalculationType.averagedailybalance", + "value": "Average Daily Balance" + } + ], + "interestCalculationDaysInYearTypeOptions": [ + { + "id": 360, + "code": "savingsInterestCalculationDaysInYearType.days360", + "value": "360 Days" + }, + { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + } + ], + "lockinPeriodFrequencyTypeOptions": [ + { + "id": 0, + "code": "savings.lockin.savingsPeriodFrequencyType.days", + "value": "Days" + }, + { + "id": 1, + "code": "savings.lockin.savingsPeriodFrequencyType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "savings.lockin.savingsPeriodFrequencyType.months", + "value": "Months" + }, + { + "id": 3, + "code": "savings.lockin.savingsPeriodFrequencyType.years", + "value": "Years" + } + ], + "withdrawalFeeTypeOptions": [ + { + "id": 1, + "code": "savingsWithdrawalFeesType.flat", + "value": "Flat" + }, + { + "id": 2, + "code": "savingsWithdrawalFeesType.percent.of.amount", + "value": "% of Amount" + } + ], + "chargeOptions": [ + { + "id": 4, + "name": "Savings charge 1", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 200, + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeAppliesTo": { + "id": 2, + "code": "chargeAppliesTo.savings", + "value": "Savings" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "chargepaymentmode.regular" + } + }, + { + "id": 5, + "name": "Savings charge 2", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 300, + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeAppliesTo": { + "id": 2, + "code": "chargeAppliesTo.savings", + "value": "Savings" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "chargepaymentmode.regular" + } + }, + { + "id": 6, + "name": "Annual fee", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 50, + "chargeTimeType": { + "id": 6, + "code": "chargeTimeType.annualFee", + "value": "Annual Fee" + }, + "chargeAppliesTo": { + "id": 2, + "code": "chargeAppliesTo.savings", + "value": "Savings" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + }, + { + "id": 7, + "name": "Quarterly fee", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 5, + "chargeTimeType": { + "id": 7, + "code": "chargeTimeType.monthlyFee", + "value": "Monthly Fee" + }, + "chargeAppliesTo": { + "id": 2, + "code": "chargeAppliesTo.savings", + "value": "Savings" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + }, + "feeOnMonthDay": [ + 10, + 5 + ], + "feeInterval": 4 + } + ] + } + +
+
+ +   +
+
+

Submit new recurring deposit application

+
+ + + + + + + +
+
Mandatory Fields
+
clientId or groupId, productId, submittedOnDate, depositPeriod, depositPeriodFrequencyId, + recurringFrequency, recurringFrequencyType, depositAmount,isCalendarInherited, + mandatoryRecommendedDepositAmount +
+
+ + + + + + + +
+
Optional Fields
+
accountNo, externalId, fieldOfficerId, expectedFirstDepositOnDate, allowWithdrawal, + adjustAdvanceTowardsFuturePayments, isMandatoryDeposit +
+
+ + + + + + + +
+
Inherited from Product (if not provided)
+
interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, + lockinPeriodFrequency, lockinPeriodFrequencyType, preClosurePenalApplicable, + preClosurePenalInterest, preClosurePenalInterestOnTypeId, charts, withHoldTax +
+
+
+

Minimal request: accountNo auto generated, remaining details inherited from recurring deposit + product.

+ POST https://Domain Name/api/v1/recurringdepositaccounts + POST recurringdepositaccounts + Content-Type: application/json + Request Body: + { + "clientId": 1, + "productId": 1, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "submittedOnDate": "02 June 2014", + "depositPeriod":"20", + "depositPeriodFrequencyId":"1", + "depositAmount":10000, + "isCalendarInherited":false, + "recurringFrequency":"2", + "recurringFrequencyType":1, + "mandatoryRecommendedDepositAmount":"2000" + } + +

Minimal request: accountNo provided (must be unique), remaining details inherited from recurring + deposit product.

+ POST recurringdepositaccounts + Content-Type: application/json + Request Body: + { + "clientId": 1, + "productId": 1, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "submittedOnDate": "02 June 2014", + "depositPeriod":"20", + "depositPeriodFrequencyId":"1", + "depositAmount":10000, + "isCalendarInherited":false, + "recurringFrequency":"2", + "recurringFrequencyType":1, + "mandatoryRecommendedDepositAmount":"2000", + "accountNo": "RD000023", + "externalId": "RD-23", + "expectedFirstDepositOnDate": "02 June 2014", + "allowWithdrawal":false, + "adjustAdvanceTowardsFuturePayments":false, + "isMandatoryDeposit":false + + } + +

Full request: accountNo provided (must be unique), remaining details override details from recurring + deposit product (except currency).

+ POST recurringdepositaccounts + Content-Type: application/json + Request Body: + { + "clientId": 1, + "productId": 1, + "fieldOfficerId": 1, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "submittedOnDate": "02 June 2014", + "depositPeriod":"20", + "depositPeriodFrequencyId":"1", + "depositAmount":10000, + "isCalendarInherited":false, + "recurringFrequency":"2", + "recurringFrequencyType":1, + "mandatoryRecommendedDepositAmount":"2000", + "accountNo": "RD000023", + "externalId": "RD-23", + "expectedFirstDepositOnDate": "02 June 2014", + "allowWithdrawal":false, + "adjustAdvanceTowardsFuturePayments":false, + "isMandatoryDeposit":false, + "interestCompoundingPeriodType": 1, + "interestPostingPeriodType": 4, + "interestCalculationType": 1, + "interestCalculationDaysInYearType": 365, + "lockinPeriodFrequency": 6, + "lockinPeriodFrequencyType": 2, + "charges":[{"id":"1"}] + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1 + } + +
+
+ +   +
+
+

Approve recurring deposit application

+

Approves recurring deposit application so long as its in 'Submitted and pending approval' state.

+
+
+ POST https://Domain + Name/api/v1/recurringdepositaccounts/{accountId}?command=approve + POST recurringdepositaccounts/1?command=approve + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "approvedOnDate": "01 March 2014" + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 200, + "code": "savingsAccountStatusType.approved", + "value": "Approved", + "submittedAndPendingApproval": false, + "approved": true, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "approvedOnDate": "01 March 2014" + } + } + +
+
+ +   +
+
+

Undo approval recurring deposit application

+

Will move 'approved' recurring deposit application back to 'Submitted and pending approval' + state.

+
+
+ POST https://Domain + Name/api/v1/recurringdepositaccounts/{accountId}?command=undoApproval + POST recurringdepositaccounts/1?command=undoApproval + Content-Type: application/json + Request Body: + { + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 100, + "code": "savingsAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false + }, + "approvedOnDate": "" + } + } + +
+
+ +   +
+
+

Reject recurring deposit application

+

Rejects recurring deposit application so long as its in 'Submitted and pending approval' state.

+
+
+ POST https://Domain + Name/api/v1/recurringdepositaccounts/{accountId}?command=reject + POST recurringdepositaccounts/1?command=reject + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "rejectedOnDate": "03 March 2014" + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 500, + "code": "savingsAccountStatusType.rejected", + "value": "Rejected", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": true, + "withdrawnByApplicant": false, + "active": false, + "closed": true + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "rejectedOnDate": "03 March 2014", + "closedOnDate": "03 March 2014" + } + } + +
+
+ +   +
+
+

Withdraw recurring deposit application

+

Used when an applicant withdraws from the recurring deposit application. It must be in 'Submitted and + pending approval' state.

+
+
+ POST https://Domain + Name/api/v1/recurringdepositaccounts/{savingsId}?command=withdrawnByApplicant + POST recurringdepositaccounts/1?command=withdrawnByApplicant + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "withdrawnOnDate": "03 March 2014" + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 400, + "code": "savingsAccountStatusType.withdrawn.by.applicant", + "value": "Withdrawn by applicant", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "withdrawnByApplicant": true, + "active": false, + "closed": true + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "withdrawnOnDate": "03 March 2014", + "closedOnDate": "03 March 2014" + } + } + +
+
+ +   +
+
+

Activate a recurring deposit account

+

Results in an approved recurring deposit application being converted into an 'active' recurring + deposit account.

+
+
+ POST https://Domain + Name/api/v1/recurringdepositaccounts/{accountId}?command=activate + POST recurringdepositaccounts/1?command=activate + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "activatedOnDate": "01 March 2013" + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 300, + "code": "savingsAccountStatusType.active", + "value": "Active", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": true, + "closed": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "activatedOnDate": "01 March 2013" + } + } + +
+
+ +   +
+
+

Update the recommended deposit amount for a recurring deposit account

+

Updates the recommended deposit amount for a RD account as on the effective date.

+
+
+ POST https://Domain + Name/api/v1/recurringdepositaccounts/{accountId}?command=updateDepositAmount + POST recurringdepositaccounts/4?command=updateDepositAmount + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "effectiveDate": "01 Dec 2014" + "mandatoryRecommendedDepositAmount": 398 + } + + + + { + "officeId": 1, + "clientId": 6, + "savingsId": 4, + "resourceId": 4, + "changes": + { + "mandatoryRecommendedDepositAmount": 398 + } + } + + +
+
+ + +   +
+
+

Close a recurring deposit account

+

Results in a Matured recurring deposit account being converted into a 'closed' recurring deposit + account.

+

On account close allowed actions are.

+ + + + + + + + + + + + + + + + + + + + + + + + + +
Action on CloseResult
Withdraw Deposit                     Matured amount withdrawn and paid to client
Transfer to SavingsMatured amount transfered to specified savings account.
                     
Re-InvestCreate new Fixed deposit application with matured amount as deposit amount.
+
+
+ POST https://Domain + Name/api/v1/recurringdepositaccounts/{accountId}?command=close + POST recurringdepositaccounts/1?command=close + Content-Type: application/json + Request Body: + { + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "closedOnDate":"19 April 2014", + "note":"Closing and transfering amount to savings", + "onAccountClosureId":"100", + "transferDescription":"Transfered matured amount to savings account" + } + + + { + "officeId":1, + "clientId":1, + "savingsId":5, + "resourceId":5, + "changes":{ + "status":{ + "id":600, + "code":"savingsAccountStatusType.closed", + "value":"Closed", + "submittedAndPendingApproval":false, + "approved":false, + "rejected":false, + "withdrawnByApplicant":false, + "active":false, + "closed":true + }, + "locale":"en", + "dateFormat":"dd MMMM yyyy", + "closedOnDate":"19 April 2014", + "note":"Closing and transfering amount to savings" + } + } + +
+
+ +   +
+
+

Premature Close a recurring deposit account

+

Results in an Active recurring deposit account being converted into a 'Premature Closed' recurring + deposit account with options to withdraw prematured amount. (premature amount is calculated using + interest rate chart applicable along with penal interest if any.)

+

On account premature closure allowed actions are.

+ + + + + + + + + + + + + + + + + +
Action on Premature CloseResult
Withdraw Deposit                     Matured amount withdrawn and paid to client
Transfer to SavingsMatured amount transfered to a savings account.
+
+
+ POST https://Domain + Name/api/v1/recurringdepositaccounts/{accountId}?command=prematureClose + POST recurringdepositaccounts/1?command=prematureClose + Content-Type: application/json + Request Body: + { + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "closedOnDate":"19 April 2014", + "note":"Close and transfer amount to savings", + "onAccountClosureId":"200", + "toSavingsAccountId":1, + "transferDescription":"Transfered matured amount to savings account" + } + + + { + "officeId": 1, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "status": { + "id": 700, + "code": "savingsAccountStatusType.pre.mature.closure", + "value": "Premature Closed", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false, + "prematureClosed": true, + "transferInProgress": false, + "transferOnHold": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "closedOnDate": "19 April 2014", + "note": "Close and transfer amount to savings" + } + } + +
+
+ +   +
+
+

Calculate Premature amount on Recurring deposit account

+

Calculate premature amount on recurring deposit till premature close date. Premature amount is + calculated based on interest chart and penal interest applicable if any.

+
+
+ POST https://Domain + Name/api/v1/recurringdepositaccounts/{accountId}?command=calculatePrematureAmount + POST recurringdepositaccounts/1?command=calculatePrematureAmount + Content-Type: application/json + Request Body: + { + "dateFormat":"dd MMMM yyyy", + "locale":"en", + "closedOnDate":"19 April 2014" + } + + + { + "maturityAmount": 100.65, + "savingsAccounts": [ + { + "id": 1, + "accountNo": "000000001", + "clientId": 1, + "clientName": "Sangamesh N", + "savingsProductId": 1, + "savingsProductName": "sa", + "fieldOfficerId": 0, + "status": { + "id": 300, + "code": "savingsAccountStatusType.active", + "value": "Active", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": true, + "closed": false, + "prematureClosed": false, + "transferInProgress": false, + "transferOnHold": false + }, + "timeline": { + "submittedOnDate": [ + 2014, + 1, + 1 + ], + "submittedByUsername": "mifos", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator", + "approvedOnDate": [ + 2014, + 1, + 1 + ], + "approvedByUsername": "mifos", + "approvedByFirstname": "App", + "approvedByLastname": "Administrator", + "activatedOnDate": [ + 2014, + 1, + 1 + ] + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "nominalAnnualInterestRate": 5, + "interestCompoundingPeriodType": { + "id": 4, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "minRequiredOpeningBalance": 5000, + "withdrawalFeeForTransfers": false, + "allowOverdraft": false, + "summary": { + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "totalDeposits": 13353.41, + "totalInterestEarned": 107.79, + "totalInterestPosted": 76.74, + "accountBalance": 13430.15 + } + } + ], + "onAccountClosureOptions": [ + { + "id": 100, + "code": "depositAccountClosureType.withdrawDeposit", + "value": "Withdra Deposit" + }, + { + "id": 200, + "code": "depositAccountClosureType.transferToSavings", + "value": "Transfer to Savings" + }, + { + "id": 300, + "code": "depositAccountClosureType.reinvest", + "value": "Re-Invest" + } + ], + "paymentTypeOptions": [], + "id": 12, + "depositType": { + "id": 300, + "code": "depositAccountType.recurringDeposit", + "value": "Recurring Deposit" + } + } + +
+
+ +   +
+
+

Calculate Interest on recurring Deposit Account

+

+ Calculates interest earned on a recurring deposit account based on todays date. It does not attempt + to post or credit the interest on the account. That is responsibility of the Post Interest API that will likely be called by overnight + process. +

+
+
+ POST https://Domain + Name/api/v1/recurringdepositaccounts/{accountId}?command=calculateInterest + POST recurringdepositaccounts/1?command=calculateInterest + Content-Type: application/json + Request Body: + { + } + + + { + "officeId": 1, + "clientId": 1, + "savingsId": 1, + "resourceId": 1 + } + +
+
+ +   +
+
+

Post Interest on recurring Deposit Account

+

+ Calculates and Posts interest earned on a recurring deposit account based on todays date and whether + an interest posting or crediting event is due. +

+
+
+ POST https://Domain + Name/api/v1/recurringdepositaccounts/{accountId}?command=postInterest + POST recurringdepositaccounts/1?command=postInterest + Content-Type: application/json + Request Body: + { + } + + + { + "officeId": 1, + "clientId": 1, + "savingsId": 1, + "resourceId": 1 + } + +
+
+ +   +
+
+

List Fixed deposit applications/accounts

+

Example Requests:

+
recurringdepositaccounts
+

+
recurringdepositaccounts?fields=name
+
+
+ GET https://Domain Name/api/v1/recurringdepositaccounts + + [ + { + "id": 1, + "accountNo": "000000001", + "clientId": 1, + "clientName": "Sangamesh N", + "savingsProductId": 3, + "savingsProductName": "RD01", + "fieldOfficerId": 0, + "status": { + "id": 100, + "code": "savingsAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false, + "prematureClosed": false, + "transferInProgress": false, + "transferOnHold": false + }, + "timeline": { + "submittedOnDate": [ + 2014, + 3, + 1 + ], + "submittedByUsername": "mifos", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator" + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "interestCompoundingPeriodType": { + "id": 4, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "summary": { + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "accountBalance": 0 + }, + "depositAmount": 1150, + "maturityAmount": 252.59, + "maturityDate": [ + 2014, + 4, + 3 + ], + "recurringDepositAmount": 100, + "recurringDepositFrequency": 1, + "recurringDepositFrequencyType": { + "id": 2, + "code": "recurring.deposit.savingsPeriodFrequencyType.months", + "value": "Months" + }, + "preClosurePenalApplicable": false, + "minDepositTerm": 3, + "maxDepositTerm": 4, + "minDepositTermType": { + "id": 2, + "code": "deposit.term.savingsPeriodFrequencyType.months", + "value": "Months" + }, + "maxDepositTermType": { + "id": 3, + "code": "deposit.term.savingsPeriodFrequencyType.years", + "value": "Years" + }, + "depositAmount": 5000, + "maturityAmount": 5140.25, + "maturityDate": [ + 2014, + 9, + 1 + ], + "depositPeriod": 6, + "depositPeriodFrequency": { + "id": 2, + "code": "deposit.period.savingsPeriodFrequencyType.months", + "value": "Months" + } + } + ] + + +
+
+ +   +
+
+

Retrieve a recurring deposit application/account:

+

Arguments

+
+
associations
+
optional, Either 'all' or a comma separated list of recurring deposit 'associations' (itemized below). +
+

Associations are just extra pieces of data that you might or might not want to retrieve.

+
+
'all': Gets data related to all associations e.g. ?associations=all.
+
'transactions': Gets data related to transactions on the account e.g. + ?associations=transactions +
+
'charges':recurring deposit Account charges data.
+
+

Example Requests :

+
recurringdepositaccounts/1
+

+
recurringdepositaccounts/1?associations=all
+
+
+ GET + https://DomainName/api/v1/recurringdepositaccounts/{accountId} + + { + "id": 1, + "accountNo": "RD000023", + "externalId": "RD-23", + "clientId": 1, + "clientName": "Sangamesh N", + "savingsProductId": 3, + "savingsProductName": "RD01", + "fieldOfficerId": 0, + "status": { + "id": 100, + "code": "savingsAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false, + "prematureClosed": false, + "transferInProgress": false, + "transferOnHold": false + }, + "timeline": { + "submittedOnDate": [ + 2014, + 3, + 1 + ], + "submittedByUsername": "mifos", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator" + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "interestCompoundingPeriodType": { + "id": 4, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "preClosurePenalApplicable": false, + "minDepositTerm": 3, + "maxDepositTerm": 4, + "minDepositTermType": { + "id": 2, + "code": "deposit.term.savingsPeriodFrequencyType.months", + "value": "Months" + }, + "maxDepositTermType": { + "id": 3, + "code": "deposit.term.savingsPeriodFrequencyType.years", + "value": "Years" + }, + "recurringDepositAmount": 100, + "recurringDepositFrequency": 1, + "expectedFirstDepositOnDate": [ + 2014, + 4, + 2 + ], + "recurringDepositFrequencyType": { + "id": 2, + "code": "recurring.deposit.savingsPeriodFrequencyType.months", + "value": "Months" + }, + "depositPeriod": 6, + "depositPeriodFrequency": { + "id": 2, + "code": "deposit.period.savingsPeriodFrequencyType.months", + "value": "Months" + }, + "summary": { + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "accountBalance": 0 + }, + "accountChart": { + "id": 4, + "fromDate": [ + 2013, + 10, + 2 + ], + "accountId": 5, + "accountNumber": "RD000023", + "chartSlabs": [ + { + "id": 13, + "periodType": { + "id": 0, + "code": "interestChartPeriodType.days", + "value": "Days" + }, + "fromPeriod": 181, + "toPeriod": 365, + "annualInterestRate": 5.5, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + }, + { + "id": 12, + "periodType": { + "id": 0, + "code": "interestChartPeriodType.days", + "value": "Days" + }, + "fromPeriod": 1, + "toPeriod": 180, + "annualInterestRate": 5, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + }, + { + "id": 11, + "periodType": { + "id": 0, + "code": "interestChartPeriodType.days", + "value": "Days" + }, + "fromPeriod": 366, + "annualInterestRate": 6, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + } + ], + "periodTypes": [ + { + "id": 0, + "code": "interestChartPeriodType.days", + "value": "Days" + }, + { + "id": 1, + "code": "interestChartPeriodType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "interestChartPeriodType.months", + "value": "Months" + }, + { + "id": 3, + "code": "interestChartPeriodType.years", + "value": "Years" + } + ] + } + } + +
+
+ +   +
+
+

Modify a recurring deposit application

+

Recurring 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

+
+
+ PUT https://Domain + Name/api/v1/recurringdepositaccounts/{accountId} + PUT recurringdepositaccounts/1 + Content-Type: application/json + No Request Body: + { + "locale": "en", + "depositAmount": 6000 + } + + + { + "officeId": 2, + "clientId": 1, + "savingsId": 1, + "resourceId": 1, + "changes": { + "depositAmount": 6000, + "locale": "en" + } + } + +
+
+ +   +
+
+

Delete a recurring deposit application

+

At present we support hard delete of recurring 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 recurring deposit account.

+
+
+ DELETE https://Domain + Name/api/v1/recurringdepositaccounts/{accountsId} + DELETE recurringdepositaccounts/1 + Content-Type: application/json + No Request Body: + + + { + "officeId": 1, + "clientId": 1, + "resourceId": 1 + } + +
+
+   +
+
+

Recurring Deposit Account Transactions:

+

Transactions possible on a recurring deposit account.

+ + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
transactionDate
The date of the transaction.
transactionAmount
The amount of the transaction.
+
+
+ +   +
+
+

Retrieve Recurring Deposit Account Transaction Template:

+

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 Requests:

+
recurringdepositaccounts/1/transactions/template?command=deposit
+
+
recurringdepositaccounts/1/transactions/template?command=withdrawal
+
+
+ GET https://Domain + Name/api/v1/recurringdepositaccounts/{accountId}/transactions/template?command=deposit + + + { + "id": 1, + "transactionType": { + "id": 1, + "code": "savingsAccountTransactionType.deposit", + "value": "Deposit", + "deposit": true, + "withdrawal": false, + "interestPosting": false, + "feeDeduction": false, + "initiateTransfer": false, + "approveTransfer": false, + "withdrawTransfer": false, + "rejectTransfer": false, + "overdraftInterest": false, + "writtenoff": false, + "overdraftFee": true + }, + "accountId": 1, + "accountNo": "000000001", + "date": [ + 2014, + 6, + 25 + ], + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 4, + "inMultiplesOf": 100, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100000.000000, + "reversed": false, + "paymentTypeOptions": [] + } + +
+
+ +   +
+
+

Retrieve Recurring Deposit Account Transaction:

+

Example Requests:

+
recurringdepositaccounts/1/transactions/1
+
+
+
+ GET https://Domain + Name/api/v1/recurringdepositaccounts/{accountId}/transactions/{transactionId} + + + { + "id": 1, + "transactionType": { + "id": 2, + "code": "savingsAccountTransactionType.withdrawal", + "value": "Withdrawal", + "deposit": false, + "withdrawal": true, + "interestPosting": false, + "feeDeduction": false + }, + "accountId": 1, + "accountNo": "000000001", + "date": [ + 2013, + 8, + 7 + ], + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "paymentDetailData": { + "id": 62, + "paymentType": { + "id": 11, + "name": "cash" + }, + "accountNumber": "", + "checkNumber": "", + "routingCode": "", + "receiptNumber": "", + "bankNumber": "" + }, + "amount": 5000, + "runningBalance": 0, + "reversed": true + } + +
+
+ +   +
+
+

Deposit Transaction

+
+
+ POST https://Domain + Name/api/v1/recurringdepositaccounts/{accountsId}/transactions?command=deposit + POST recurringdepositaccounts/1/transactions?command=deposit + Content-Type: application/json + No Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "transactionDate": "27 May 2013", + "transactionAmount": "500", + "paymentTypeId": "14", + "accountNumber": "acc123", + "checkNumber": "che123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123" + } + + + { + "officeId": 1, + "clientId": 2, + "savingsId": 1, + "resourceId": 47, + "changes": { + "accountNumber": "acc123", + "checkNumber": "che123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123" + } + } + +
+
+ +   +
+
+

Withdrawal Transaction

+
+
+ POST https://Domain + Name/api/v1/recurringdepositaccounts/{accountsId}/transactions?command=withdrawal + POST recurringdepositaccounts/1/transactions?command=withdrawal + Content-Type: application/json + No Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "transactionDate": "27 May 2013", + "transactionAmount": "500", + "paymentTypeId": "14", + "accountNumber": "acc123", + "checkNumber": "che123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123" + } + + + { + "officeId": 1, + "clientId": 2, + "savingsId": 1, + "resourceId": 48, + "changes": { + "accountNumber": "acc123", + "checkNumber": "che123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123" + } + } + +
+
+ +   +
+
+

Adjust Transaction

+

This command modifies the given transaction.

+
+
+ POST https://Domain + Name/api/v1/recurringdepositaccounts/{accountsId}/transactions/{transactionId}?command=modify + POST recurringdepositaccounts/1/transactions/1?command=modify + Content-Type: application/json + No Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "transactionDate": "27 May 2013", + "transactionAmount": "500", + "paymentTypeId": "14", + "accountNumber": "acc123", + "checkNumber": "che123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123" + } + + + { + "officeId": 1, + "clientId": 2, + "savingsId": 1, + "resourceId": 48, + "changes": { + "accountNumber": "acc123", + "checkNumber": "che123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123" + } + } + +
+
+ +   +
+
+

Undo transaction

+

This command reverses the given transaction.

+
+
+ POST https://Domain + Name/api/v1/recurringdepositaccounts/{accountsId}/transactions/{transactionId}?command=undo + POST recurringdepositaccounts/1/transactions/1?command=undo + Content-Type: application/json + No Request Body: + { + } + + + { + "officeId": 1, + "clientId": 2, + "savingsId": 1, + "resourceId": 1 + } + +
+
+ + + +   +
+
+

Account Transfers:

+

Ability to be able to transfer monetary funds from one account to another.

+

Note: At present only savings account to savings account transfers are supported.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Mandatory Parameters
+
fromOfficeId
The id of the office/branch from which the transfer is made.
fromClientId
The id of the client from which the transfer is made.
fromAccountType
The type of account from which the transfer is made. 1=Loan Account, + 2=Savings Account +
fromAccountId
The id of the account from which the transfer is made.
toOfficeId
The id of the office/branch to which the transfer is made.
toClientId
The id of the client to which the transfer is made.
toAccountType
The type of account to which the transfer is made. 1=Loan Account, 2=Savings + Account +
toAccountId
The id of the account to which the transfer is made. The accouont must be + active and must have the same currency as that of the selected fromAccountId. +
transferDate
The date of the transfer. Requires dateFormat and locale + parameters. +
transferAmount
The amount of the transfer. Requires locale parameter.
transferDescription
Description of the transfer itself.
+
+
+ +   +
+
+

Retrieve Account Transfer Template:

+

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 Requests:

+
accounttransfers/template?fromAccountType=2&fromOfficeId=1
+
+
accounttransfers/template?fromAccountType=2&fromOfficeId=1&fromClientId=1
+
+
accounttransfers/template?fromClientId=1&fromAccountType=2&fromAccountId=1
+
+
+
+ GET https://Domain + Name/api/v1/accounttransfers/template?fromAccountType=2&fromOfficeId=1 + + + { + "transferAmount": 0, + "transferDate": [ + 2013, + 8, + 15 + ], + "fromOffice": { + "id": 1, + "name": "HO", + "nameDecorated": "HO", + "externalId": "1", + "openingDate": [ + 2009, + 1, + 1 + ], + "hierarchy": "." + }, + "fromAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "fromOfficeOptions": [ + { + "id": 1, + "name": "HO", + "nameDecorated": "HO" + }, + { + "id": 2, + "name": "Branch 1", + "nameDecorated": "....Branch 1" + } + ], + "fromClientOptions": [ + { + "id": 1, + "displayName": "Small shop", + "officeId": 1, + "officeName": "HO" + }, + { + "id": 3, + "displayName": "Third client", + "officeId": 1, + "officeName": "HO" + } + ], + "fromAccountTypeOptions": [ + { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + } + ], + "toOfficeOptions": [ + { + "id": 1, + "name": "HO", + "nameDecorated": "HO" + }, + { + "id": 2, + "name": "Branch 1", + "nameDecorated": "....Branch 1" + } + ], + "toAccountTypeOptions": [ + { + "id": 1, + "code": "accountType.loan", + "value": "Loan Account" + }, + { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + } + ] + } + +
+ +
+ GET https://Domain + Name/api/v1/accounttransfers/template?fromAccountType=2&fromOfficeId=1&fromClientId=1 + + + { + "transferAmount": 0, + "transferDate": [ + 2013, + 8, + 15 + ], + "fromOffice": { + "id": 1, + "name": "HO", + "nameDecorated": "HO", + "externalId": "1", + "openingDate": [ + 2009, + 1, + 1 + ], + "hierarchy": "." + }, + "fromClient": { + "id": 1, + "accountNo": "000000001", + "status": { + "id": 300, + "code": "clientStatusType.active", + "value": "Active" + }, + "active": true, + "activationDate": [ + 2013, + 3, + 1 + ], + "fullname": "Small shop", + "displayName": "Small shop", + "officeId": 1, + "officeName": "HO", + "groups": [] + }, + "fromAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "fromOfficeOptions": [ + { + "id": 1, + "name": "HO", + "nameDecorated": "HO" + }, + { + "id": 2, + "name": "Branch 1", + "nameDecorated": "....Branch 1" + } + ], + "fromClientOptions": [ + { + "id": 1, + "displayName": "Small shop", + "officeId": 1, + "officeName": "HO" + }, + { + "id": 3, + "displayName": "Third client", + "officeId": 1, + "officeName": "HO" + } + ], + "fromAccountTypeOptions": [ + { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + } + ], + "fromAccountOptions": [ + { + "id": 1, + "accountNo": "000000001", + "clientId": 1, + "clientName": "Small shop", + "productId": 1, + "productName": "Passbook", + "fieldOfficerId": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + }, + { + "id": 3, + "accountNo": "000000003", + "clientId": 1, + "clientName": "Small shop", + "productId": 2, + "productName": "Shilling product", + "fieldOfficerId": 0, + "currency": { + "code": "KES", + "name": "Kenyan Shilling", + "decimalPlaces": 0, + "inMultiplesOf": 0, + "displaySymbol": "KSh", + "nameCode": "currency.KES", + "displayLabel": "Kenyan Shilling (KSh)" + } + } + ], + "toOfficeOptions": [ + { + "id": 1, + "name": "HO", + "nameDecorated": "HO" + }, + { + "id": 2, + "name": "Branch 1", + "nameDecorated": "....Branch 1" + } + ], + "toAccountTypeOptions": [ + { + "id": 1, + "code": "accountType.loan", + "value": "Loan Account" + }, + { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + } + ] + } + +
+ +
+ GET https://Domain + Name/api/v1/accounttransfers/template?fromClientId=1&fromAccountType=2&fromAccountId=1 + + + { + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "transferAmount": 0, + "transferDate": [ + 2013, + 8, + 15 + ], + "fromOffice": { + "id": 1, + "name": "HO", + "nameDecorated": "HO", + "externalId": "1", + "openingDate": [ + 2009, + 1, + 1 + ], + "hierarchy": "." + }, + "fromClient": { + "id": 1, + "accountNo": "000000001", + "status": { + "id": 300, + "code": "clientStatusType.active", + "value": "Active" + }, + "active": true, + "activationDate": [ + 2013, + 3, + 1 + ], + "fullname": "Small shop", + "displayName": "Small shop", + "officeId": 1, + "officeName": "HO", + "groups": [] + }, + "fromAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "fromAccount": { + "id": 1, + "accountNo": "000000001", + "clientId": 1, + "clientName": "Small shop", + "productId": 1, + "productName": "Passbook", + "fieldOfficerId": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + }, + "fromOfficeOptions": [ + { + "id": 1, + "name": "HO", + "nameDecorated": "HO" + }, + { + "id": 2, + "name": "Branch 1", + "nameDecorated": "....Branch 1" + } + ], + "fromClientOptions": [ + { + "id": 1, + "displayName": "Small shop", + "officeId": 1, + "officeName": "HO" + }, + { + "id": 3, + "displayName": "Third client", + "officeId": 1, + "officeName": "HO" + } + ], + "fromAccountTypeOptions": [ + { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + } + ], + "fromAccountOptions": [ + { + "id": 1, + "accountNo": "000000001", + "clientId": 1, + "clientName": "Small shop", + "productId": 1, + "productName": "Passbook", + "fieldOfficerId": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + }, + { + "id": 3, + "accountNo": "000000003", + "clientId": 1, + "clientName": "Small shop", + "productId": 2, + "productName": "Shilling product", + "fieldOfficerId": 0, + "currency": { + "code": "KES", + "name": "Kenyan Shilling", + "decimalPlaces": 0, + "inMultiplesOf": 0, + "displaySymbol": "KSh", + "nameCode": "currency.KES", + "displayLabel": "Kenyan Shilling (KSh)" + } + } + ], + "toOfficeOptions": [ + { + "id": 1, + "name": "HO", + "nameDecorated": "HO" + }, + { + "id": 2, + "name": "Branch 1", + "nameDecorated": "....Branch 1" + } + ], + "toAccountTypeOptions": [ + { + "id": 1, + "code": "accountType.loan", + "value": "Loan Account" + }, + { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + } + ] + } + +
+ +
+ +   +
+
+

Create new Transfer

+

Ability to create new transfer of monetary funds from one account to another.

+
+
+ POST https://Domain Name/api/v1/accounttransfers + POST accounttransfers/ + Content-Type: application/json + No Request Body: + { + "fromOfficeId": 1, + "fromClientId": 1, + "fromAccountType": 2, + "fromAccountId": 1, + "toOfficeId": 1, + "toClientId": 1, + "toAccountType": 2, + "toAccountId": 2, + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "transferDate": "01 August 2011", + "transferAmount": "112.45", + "transferDescription": "A description of the transfer" + } + + + { + "savingsId": 1, + "resourceId": 1 + } + +
+
+ +   +
+
+

List account transfers

+

Example Requests:

+
accounttransfers
+
+
+
+ GET https://Domain Name/api/v1/accounttransfers + + { + "totalFilteredRecords": 4, + "pageItems": [ + { + "id": 1, + "reversed": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "transferAmount": 200, + "transferDate": [ + 2013, + 4, + 1 + ], + "transferDescription": "pay off loan from savings.", + "fromOffice": { + "id": 1, + "name": "HO" + }, + "fromClient": { + "id": 1, + "displayName": "Small shop", + "officeId": 1, + "officeName": "HO" + }, + "fromAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "fromAccount": { + "id": 1, + "accountNo": "000000001" + }, + "toOffice": { + "id": 1, + "name": "HO" + }, + "toClient": { + "id": 1, + "displayName": "Small shop", + "officeId": 1, + "officeName": "HO" + }, + "toAccountType": { + "id": 1, + "code": "accountType.loan", + "value": "Loan Account" + }, + "toAccount": { + "id": 1, + "accountNo": "000000001" + } + }, + { + "id": 2, + "reversed": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "transferAmount": 112.45, + "transferDate": [ + 2013, + 6, + 1 + ], + "transferDescription": "A description of the transfer", + "fromOffice": { + "id": 1, + "name": "HO" + }, + "fromClient": { + "id": 1, + "displayName": "Small shop", + "officeId": 1, + "officeName": "HO" + }, + "fromAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "fromAccount": { + "id": 1, + "accountNo": "000000001" + }, + "toOffice": { + "id": 1, + "name": "HO" + }, + "toClient": { + "id": 1, + "displayName": "Small shop", + "officeId": 1, + "officeName": "HO" + }, + "toAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "toAccount": { + "id": 3, + "accountNo": "000000003" + } + }, + { + "id": 3, + "reversed": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "transferAmount": 112.45, + "transferDate": [ + 2013, + 6, + 1 + ], + "transferDescription": "A description of the transfer", + "fromOffice": { + "id": 1, + "name": "HO" + }, + "fromClient": { + "id": 1, + "displayName": "Small shop", + "officeId": 1, + "officeName": "HO" + }, + "fromAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "fromAccount": { + "id": 1, + "accountNo": "000000001" + }, + "toOffice": { + "id": 1, + "name": "HO" + }, + "toClient": { + "id": 1, + "displayName": "Small shop", + "officeId": 1, + "officeName": "HO" + }, + "toAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "toAccount": { + "id": 3, + "accountNo": "000000003" + } + }, + { + "id": 4, + "reversed": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "transferAmount": 112.45, + "transferDate": [ + 2013, + 6, + 1 + ], + "transferDescription": "A description of the transfer", + "fromOffice": { + "id": 1, + "name": "HO" + }, + "fromClient": { + "id": 1, + "displayName": "Small shop", + "officeId": 1, + "officeName": "HO" + }, + "fromAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "fromAccount": { + "id": 1, + "accountNo": "000000001" + }, + "toOffice": { + "id": 1, + "name": "HO" + }, + "toClient": { + "id": 1, + "displayName": "Small shop", + "officeId": 1, + "officeName": "HO" + }, + "toAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "toAccount": { + "id": 3, + "accountNo": "000000003" + } + } + ] + } + +
+
+ +   +
+
+

Retrieve account transfer:

+

Example Requests :

+
accounttransfers/1
+
+
+
+ GET https://DomainName/api/v1/accounttransfers/{transferId} + + { + "id": 1, + "reversed": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "transferAmount": 200, + "transferDate": [ + 2013, + 4, + 1 + ], + "transferDescription": "pay off loan from savings.", + "fromOffice": { + "id": 1, + "name": "HO" + }, + "fromClient": { + "id": 1, + "displayName": "Small shop", + "officeId": 1, + "officeName": "HO" + }, + "fromAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "fromAccount": { + "id": 1, + "accountNo": "000000001" + }, + "toOffice": { + "id": 1, + "name": "HO" + }, + "toClient": { + "id": 1, + "displayName": "Small shop", + "officeId": 1, + "officeName": "HO" + }, + "toAccountType": { + "id": 1, + "code": "accountType.loan", + "value": "Loan Account" + }, + "toAccount": { + "id": 1, + "accountNo": "000000001" + } + } + +
+
+ +   +
+
+

Retrieve Refund of an Active Loan by Transfer Template:

+

Example Requests :

+
accounttransfers/templateRefundByTransfer?fromAccountId=2&fromAccountType=1& + toAccountId=1&toAccountType=2&toClientId=1&toOfficeId=1 +
+
+
+
+ GET + https://DomainName/api/v1/accounttransfers/templateRefundByTransfer + + { +    "currency": { +       "code": "USD", +       "name": "US Dollar", +       "decimalPlaces": 0, +       "inMultiplesOf": 0, +       "displaySymbol": "$", +       "nameCode": "currency.USD", +       "displayLabel": "US Dollar ($)" +    }, +    "transferAmount": 130, +    "transferDate": [ +       2014, +       11, +       1 +    ], +    "fromOffice": { +       "id": 1, +       "name": "Head Office", +       "nameDecorated": "Head Office", +       "externalId": "1", +       "openingDate": [ +          2009, +          1, +          1 +       ], +       "hierarchy": "." +    }, +    "fromClient": { +       "id": 1, +       "accountNo": "000000001", +       "status": { +          "id": 300, +          "code": "clientStatusType.active", +          "value": "Active" +       }, +       "active": true, +       "activationDate": [ +          2012, +          2, +          1 +       ], +       "firstname": "Daniel", +       "lastname": "Owusu", +       "displayName": "Daniel Owusu", +       "gender": {}, +       "clientType": {}, +       "clientClassification": {}, +       "officeId": 1, +       "officeName": "Head Office", +       "timeline": { +          "submittedOnDate": [ +             2012, +             2, +             1 +          ], +          "submittedByUsername": "mifos", +          "submittedByFirstname": "App", +          "submittedByLastname": "Administrator", +          "activatedOnDate": [ +             2012, +             2, +             1 +          ], +          "activatedByUsername": "mifos", +          "activatedByFirstname": "App", +          "activatedByLastname": "Administrator" +       }, +       "groups": [] +    }, +    "fromAccountType": { +       "id": 1, +       "code": "accountType.loan", +       "value": "Loan Account" +    }, +    "fromAccount": { +       "id": 2, +       "accountNo": "000000002", +       "clientId": 1, +       "clientName": "Daniel Owusu", +       "productId": 1, +       "productName": "CTRL", +       "fieldOfficerId": 0, +       "currency": { +          "code": "USD", +          "name": "US Dollar", +          "decimalPlaces": 0, +          "inMultiplesOf": 0, +          "displaySymbol": "$", +          "nameCode": "currency.USD", +          "displayLabel": "US Dollar ($)" +       }, +       "amtForTransfer": 130 +    }, +    "toOffice": { +       "id": 1, +       "name": "Head Office", +       "nameDecorated": "Head Office", +       "externalId": "1", +       "openingDate": [ +          2009, +          1, +          1 +       ], +       "hierarchy": "." +    }, +    "toClient": { +       "id": 1, +       "displayName": "Daniel Owusu", +       "officeId": 1, +       "officeName": "Head Office" +    }, +    "toAccountType": { +       "id": 2, +       "code": "accountType.savings", +       "value": "Savings Account" +    }, +    "toAccount": { +       "id": 1, +       "accountNo": "000000001", +       "clientId": 1, +       "clientName": "Daniel Owusu", +       "productId": 1, +       "productName": "TEST", +       "fieldOfficerId": 0, +       "currency": { +          "code": "USD", +          "name": "US Dollar", +          "decimalPlaces": 0, +          "inMultiplesOf": 0, +          "displaySymbol": "$", +          "nameCode": "currency.USD", +          "displayLabel": "US Dollar ($)" +       } +    }, +    "fromOfficeOptions": [ +       { +          "id": 1, +          "name": "Head Office", +          "nameDecorated": "Head Office" +       } +    ], +    "fromClientOptions": [ +       { +          "id": 1, +          "displayName": "Daniel Owusu", +          "officeId": 1, +          "officeName": "Head Office" +       } +    ], +    "fromAccountTypeOptions": [ +       { +          "id": 2, +          "code": "accountType.savings", +          "value": "Savings Account" +       }, +       { +          "id": 1, +          "code": "accountType.loan", +          "value": "Loan Account" +       } +    ], +    "fromAccountOptions": [ +       { +          "id": 2, +          "accountNo": "000000002", +          "clientId": 1, +          "clientName": "Daniel Owusu", +          "productId": 1, +          "productName": "CTRL", +          "fieldOfficerId": 0, +          "currency": { +             "code": "USD", +             "name": "US Dollar", +             "decimalPlaces": 0, +             "inMultiplesOf": 0, +             "displaySymbol": "$", +             "nameCode": "currency.USD", +             "displayLabel": "US Dollar ($)" +          } +       } +    ], +    "toOfficeOptions": [ +       { +          "id": 1, +          "name": "Head Office", +          "nameDecorated": "Head Office" +       } +    ], +    "toClientOptions": [ +       { +          "id": 1, +          "displayName": "Daniel Owusu", +          "officeId": 1, +          "officeName": "Head Office" +       } +    ], +    "toAccountTypeOptions": [ +       { +          "id": 2, +          "code": "accountType.savings", +          "value": "Savings Account" +       } +    ], +    "toAccountOptions": [ +       { +          "id": 1, +          "accountNo": "000000001", +          "clientId": 1, +          "clientName": "Daniel Owusu", +          "productId": 1, +          "productName": "TEST", +          "fieldOfficerId": 0, +          "currency": { +             "code": "USD", +             "name": "US Dollar", +             "decimalPlaces": 0, +             "inMultiplesOf": 0, +             "displaySymbol": "$", +             "nameCode": "currency.USD", +             "displayLabel": "US Dollar ($)" +          } +       } +    ] + } + +
+
+ + +   +
+
+

Refund of an Active Loan by Transfer

+

Ability to refund an active loan by transferring to a savings account.

+
+
+ POST https://Domain Name/api/v1/accounttransfers + POST refundByTransfer/ + Content-Type: application/json + No Request Body: + { + "fromAccountId": "2", + "fromAccountType": 1, + "toOfficeId": 1, + "toClientId": 1, + "toAccountType": 2, + "toAccountId": 1, + "transferAmount": 130, + "transferDate": "31 October 2014", + "transferDescription": "Transfer refund to my savings account", + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "fromClientId": 1, + "fromOfficeId": 1 + + } + + + { + "savingsId": 1, + "resourceId": 1 + } + +
+
+ + + + +   +
+
+

Standing Instructions

+

Standing instructions (or standing orders) refer to instructions a bank account holder ("the payer") + gives to his or her bank to pay a set amount at regular intervals to another's ("the payee's") + account.

+

Note: At present only savings account to savings account and savings account to Loan account + transfers are permitted.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Mandatory Parameters
+
name
A name for this Standing Instruction
fromOfficeId
The id of the office/branch from which the transfer is made.
fromClientId
The id of the client (payer) who makes the transfer
fromAccountType
The type of account from which the transfer is made. 1=Loan Account, + 2=Savings Account +
fromAccountId
The id of the account from which the transfer is made.
toOfficeId
The id of the office/branch to which the transfer is made.
toClientId
The id of the client (payee), to whose account the transfer is made.
toAccountType
The type of account to which the transfer is made. 1=Loan Account, 2=Savings + Account +
toAccountId
The id of the account to which the transfer is made. The account must be active + and must be in the same currency as that of the selected fromAccountId. +
priority
The priority of instruction while executing instructions. 1= URGENT,2 = + HIGH, 3 = MEDIUM, 4 = LOW +
transferType
Identifies the source and destination account types. 1=Account + Transfer(savings to savings), 2=Loan Repayment +
instructionType
Determines the amount to be transferred while executing a standing + instruction. 1. FIXED, 2.DUES +
status
The Standing instruction state. 1. Active, 2.Disabled, 3.Deleted
recurrenceType
Determines the recurrence of this standing instruction, can be either 1. + Periodic or 2.As per dues +
validFrom
The Standing instruction's Start date.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Optional Parameters
+
amount
Transfer amount while running the instruction. must be provided if the + selected instructionType is fixed +
validTill
The Standing instruction's end date.
recurrenceFrequency
The recurrence frequency of a Standing instruction's execution. Must be + provided if the recurrenceType is Periodic. 0 = days, 1 = weekly, 2 = monthly, 3 = + yearly +
recurrenceInterval
The recurrence interval of a standing instruction execution, determines the + recurrence schedule when combined with recurrenceFrequency. Must be provided if the + recurrenceType is periodic +
recurrenceOnMonthDay
The Month and Day of recurrence. Must be provided if the recurrenceFrequency + is monthly or yearly +
+
+
+ +   +
+
+

Retrieve Standing Instruction Template:

+

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 Requests:

+
standinginstructions/template?fromAccountType=2&fromOfficeId=1
+
+
+ standinginstructions/template?fromAccountType=2&fromOfficeId=1&fromClientId=1&transferType=1 +
+
+
+ standinginstructions/template?fromClientId=1&fromAccountType=2&fromAccountId=1&transferType=1 +
+
+
+
+ GET https://Domain + Name/api/v1/standinginstructions/template?fromAccountType=2&fromOfficeId=1 + + + { + "fromOffice": { + "id": 1, + "name": "Head Office", + "nameDecorated": "Head Office", + "externalId": "1", + "openingDate": [ + 2009, + 1, + 1 + ], + "hierarchy": "." + }, + "fromAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "fromOfficeOptions": [ + { + "id": 1, + "name": "Head Office", + "nameDecorated": "Head Office" + } + ], + "fromClientOptions": [ + { + "id": 1, + "displayName": "Client_FirstName_2VRAG Client_LastName_9QCY", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 20, + "displayName": "Client_FirstName_9KYLE Client_LastName_I0GJ", + "officeId": 1, + "officeName": "Head Office" + } + ], + "fromAccountTypeOptions": [ + { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + { + "id": 1, + "code": "accountType.loan", + "value": "Loan Account" + } + ], + "toOfficeOptions": [ + { + "id": 1, + "name": "Head Office", + "nameDecorated": "Head Office" + } + ], + "toAccountTypeOptions": [ + { + "id": 1, + "code": "accountType.loan", + "value": "Loan Account" + }, + { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + } + ], + "transferTypeOptions": [ + { + "id": 1, + "code": "accountTransferType.account.transfer", + "value": "Account Transfer" + }, + { + "id": 2, + "code": "accountTransferType.loan.repayment", + "value": "Loan Repayment" + } + ], + "statusOptions": [ + { + "id": 1, + "code": "standingInstructionStatus.active", + "value": "Active" + }, + { + "id": 2, + "code": "standingInstructionStatus.disabled", + "value": "Disabled" + } + ], + "instructionTypeOptions": [ + { + "id": 1, + "code": "standingInstructionType.fixed", + "value": "Fixed" + }, + { + "id": 2, + "code": "standingInstructionType.dues", + "value": "Dues" + } + ], + "priorityOptions": [ + { + "id": 1, + "code": "standingInstructionPriority.urgent", + "value": "Urgent Priority" + }, + { + "id": 2, + "code": "standingInstructionPriority.high", + "value": "High Priority" + }, + { + "id": 3, + "code": "standingInstructionPriority.medium", + "value": "Medium Priority" + }, + { + "id": 4, + "code": "standingInstructionPriority.low", + "value": "Low Priority" + } + ], + "recurrenceTypeOptions": [ + { + "id": 1, + "code": "accountTransferRecurrenceType.periodic", + "value": "Periodic Recurrence" + }, + { + "id": 2, + "code": "accountTransferRecurrenceType.as.per.dues", + "value": "As Per Dues Recurrence" + } + ], + "recurrenceFrequencyOptions": [ + { + "id": 0, + "code": "frequencyperiodFrequencyType.days", + "value": "Days" + }, + { + "id": 1, + "code": "frequencyperiodFrequencyType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "frequencyperiodFrequencyType.months", + "value": "Months" + }, + { + "id": 3, + "code": "frequencyperiodFrequencyType.years", + "value": "Years" + } + ] + } + +
+ +
+ GET https://Domain + Name/api/v1/standinginstructions/template?fromAccountType=2&fromOfficeId=1&fromClientId=1&transferType=1 + + + { + "fromOffice": { + "id": 1, + "name": "Head Office", + "nameDecorated": "Head Office", + "externalId": "1", + "openingDate": [ + 2009, + 1, + 1 + ], + "hierarchy": "." + }, + "fromClient": { + "id": 1, + "accountNo": "000000001", + "externalId": "ID_UTMYOEQ", + "status": { + "id": 300, + "code": "clientStatusType.active", + "value": "Active" + }, + "active": true, + "activationDate": [ + 2011, + 1, + 1 + ], + "firstname": "Client_FirstName_2VRAG", + "lastname": "Client_LastName_9QCY", + "displayName": "Client_FirstName_2VRAG Client_LastName_9QCY", + "officeId": 1, + "officeName": "Head Office", + "timeline": { + "submittedOnDate": [ + 2011, + 1, + 1 + ], + "submittedByUsername": "mifos", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator", + "activatedOnDate": [ + 2011, + 1, + 1 + ], + "activatedByUsername": "mifos", + "activatedByFirstname": "App", + "activatedByLastname": "Administrator" + }, + "groups": [] + }, + "fromAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "fromOfficeOptions": [ + { + "id": 1, + "name": "Head Office", + "nameDecorated": "Head Office" + } + ], + "fromClientOptions": [ + { + "id": 1, + "displayName": "Client_FirstName_2VRAG Client_LastName_9QCY", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 2, + "displayName": "Client_FirstName_ZYDN2 Client_LastName_XVOP", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 3, + "displayName": "Client_FirstName_89LYT Client_LastName_4EY6", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 4, + "displayName": "Client_FirstName_PRCBG Client_LastName_JZU2", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 5, + "displayName": "Client_FirstName_J37GR Client_LastName_1T3X", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 6, + "displayName": "Client_FirstName_ZVHM2 Client_LastName_RUGS", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 7, + "displayName": "Client_FirstName_RBALP Client_LastName_437P", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 8, + "displayName": "Client_FirstName_R7M4V Client_LastName_Q5ED", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 9, + "displayName": "Client_FirstName_WIBDE Client_LastName_U91T", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 10, + "displayName": "Client_FirstName_26QJT Client_LastName_BEHD", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 11, + "displayName": "Client_FirstName_W071M Client_LastName_L7Z2", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 12, + "displayName": "Client_FirstName_QUHDJ Client_LastName_S4C5", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 13, + "displayName": "Client_FirstName_MNP4W Client_LastName_J8Y3", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 14, + "displayName": "Client_FirstName_TL6I8 Client_LastName_5YHG", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 15, + "displayName": "Client_FirstName_LUTBO Client_LastName_DITS", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 16, + "displayName": "Client_FirstName_UE39Z Client_LastName_PUWZ", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 17, + "displayName": "Client_FirstName_M8SD2 Client_LastName_J6QK", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 18, + "displayName": "Client_FirstName_SG8NF Client_LastName_BM1J", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 19, + "displayName": "Client_FirstName_BW0C8 Client_LastName_LGV9", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 20, + "displayName": "Client_FirstName_9KYLE Client_LastName_I0GJ", + "officeId": 1, + "officeName": "Head Office" + } + ], + "fromAccountTypeOptions": [ + { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + } + ], + "fromAccountOptions": [], + "toOfficeOptions": [ + { + "id": 1, + "name": "Head Office", + "nameDecorated": "Head Office" + } + ], + "toAccountTypeOptions": [ + { + "id": 1, + "code": "accountType.loan", + "value": "Loan Account" + } + ], + "transferTypeOptions": [ + { + "id": 1, + "code": "accountTransferType.account.transfer", + "value": "Account Transfer" + }, + { + "id": 2, + "code": "accountTransferType.loan.repayment", + "value": "Loan Repayment" + } + ], + "statusOptions": [ + { + "id": 1, + "code": "standingInstructionStatus.active", + "value": "Active" + }, + { + "id": 2, + "code": "standingInstructionStatus.disabled", + "value": "Disabled" + } + ], + "instructionTypeOptions": [ + { + "id": 1, + "code": "standingInstructionType.fixed", + "value": "Fixed" + }, + { + "id": 2, + "code": "standingInstructionType.dues", + "value": "Dues" + } + ], + "priorityOptions": [ + { + "id": 1, + "code": "standingInstructionPriority.urgent", + "value": "Urgent Priority" + }, + { + "id": 2, + "code": "standingInstructionPriority.high", + "value": "High Priority" + }, + { + "id": 3, + "code": "standingInstructionPriority.medium", + "value": "Medium Priority" + }, + { + "id": 4, + "code": "standingInstructionPriority.low", + "value": "Low Priority" + } + ], + "recurrenceTypeOptions": [ + { + "id": 1, + "code": "accountTransferRecurrenceType.periodic", + "value": "Periodic Recurrence" + }, + { + "id": 2, + "code": "accountTransferRecurrenceType.as.per.dues", + "value": "As Per Dues Recurrence" + } + ], + "recurrenceFrequencyOptions": [ + { + "id": 0, + "code": "frequencyperiodFrequencyType.days", + "value": "Days" + }, + { + "id": 1, + "code": "frequencyperiodFrequencyType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "frequencyperiodFrequencyType.months", + "value": "Months" + }, + { + "id": 3, + "code": "frequencyperiodFrequencyType.years", + "value": "Years" + } + ] + } + +
+ +
+ GET https://Domain + Name/api/v1/standinginstructions/template?fromAccountType=2&fromOfficeId=1&fromClientId=1&transferType=2&fromAccountId=1 + + + { + "fromOffice": { + "id": 1, + "name": "Head Office", + "nameDecorated": "Head Office", + "externalId": "1", + "openingDate": [ + 2009, + 1, + 1 + ], + "hierarchy": "." + }, + "fromClient": { + "id": 3, + "accountNo": "000000003", + "externalId": "ID_ECEAKAP", + "status": { + "id": 300, + "code": "clientStatusType.active", + "value": "Active" + }, + "active": true, + "activationDate": [ + 2011, + 3, + 4 + ], + "firstname": "Client_FirstName_89LYT", + "lastname": "Client_LastName_4EY6", + "displayName": "Client_FirstName_89LYT Client_LastName_4EY6", + "officeId": 1, + "officeName": "Head Office", + "timeline": { + "submittedOnDate": [ + 2011, + 3, + 4 + ], + "submittedByUsername": "mifos", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator", + "activatedOnDate": [ + 2011, + 3, + 4 + ], + "activatedByUsername": "mifos", + "activatedByFirstname": "App", + "activatedByLastname": "Administrator" + }, + "groups": [] + }, + "fromAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "fromAccount": { + "id": 1, + "accountNo": "000000001", + "clientId": 3, + "clientName": "Client_FirstName_89LYT Client_LastName_4EY6", + "productId": 1, + "productName": "SAVINGS_PRODUCT_MVA619", + "fieldOfficerId": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 4, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + }, + "fromOfficeOptions": [ + { + "id": 1, + "name": "Head Office", + "nameDecorated": "Head Office" + } + ], + "fromClientOptions": [ + { + "id": 1, + "displayName": "Client_FirstName_2VRAG Client_LastName_9QCY", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 2, + "displayName": "Client_FirstName_ZYDN2 Client_LastName_XVOP", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 3, + "displayName": "Client_FirstName_89LYT Client_LastName_4EY6", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 4, + "displayName": "Client_FirstName_PRCBG Client_LastName_JZU2", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 5, + "displayName": "Client_FirstName_J37GR Client_LastName_1T3X", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 6, + "displayName": "Client_FirstName_ZVHM2 Client_LastName_RUGS", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 7, + "displayName": "Client_FirstName_RBALP Client_LastName_437P", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 8, + "displayName": "Client_FirstName_R7M4V Client_LastName_Q5ED", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 9, + "displayName": "Client_FirstName_WIBDE Client_LastName_U91T", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 10, + "displayName": "Client_FirstName_26QJT Client_LastName_BEHD", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 11, + "displayName": "Client_FirstName_W071M Client_LastName_L7Z2", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 12, + "displayName": "Client_FirstName_QUHDJ Client_LastName_S4C5", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 13, + "displayName": "Client_FirstName_MNP4W Client_LastName_J8Y3", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 14, + "displayName": "Client_FirstName_TL6I8 Client_LastName_5YHG", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 15, + "displayName": "Client_FirstName_LUTBO Client_LastName_DITS", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 16, + "displayName": "Client_FirstName_UE39Z Client_LastName_PUWZ", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 17, + "displayName": "Client_FirstName_M8SD2 Client_LastName_J6QK", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 18, + "displayName": "Client_FirstName_SG8NF Client_LastName_BM1J", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 19, + "displayName": "Client_FirstName_BW0C8 Client_LastName_LGV9", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 20, + "displayName": "Client_FirstName_9KYLE Client_LastName_I0GJ", + "officeId": 1, + "officeName": "Head Office" + } + ], + "fromAccountTypeOptions": [ + { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + } + ], + "fromAccountOptions": [ + { + "id": 1, + "accountNo": "000000001", + "clientId": 3, + "clientName": "Client_FirstName_89LYT Client_LastName_4EY6", + "productId": 1, + "productName": "SAVINGS_PRODUCT_MVA619", + "fieldOfficerId": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 4, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + } + ], + "toOfficeOptions": [ + { + "id": 1, + "name": "Head Office", + "nameDecorated": "Head Office" + } + ], + "toAccountTypeOptions": [ + { + "id": 1, + "code": "accountType.loan", + "value": "Loan Account" + } + ], + "transferTypeOptions": [ + { + "id": 1, + "code": "accountTransferType.account.transfer", + "value": "Account Transfer" + }, + { + "id": 2, + "code": "accountTransferType.loan.repayment", + "value": "Loan Repayment" + } + ], + "statusOptions": [ + { + "id": 1, + "code": "standingInstructionStatus.active", + "value": "Active" + }, + { + "id": 2, + "code": "standingInstructionStatus.disabled", + "value": "Disabled" + } + ], + "instructionTypeOptions": [ + { + "id": 1, + "code": "standingInstructionType.fixed", + "value": "Fixed" + }, + { + "id": 2, + "code": "standingInstructionType.dues", + "value": "Dues" + } + ], + "priorityOptions": [ + { + "id": 1, + "code": "standingInstructionPriority.urgent", + "value": "Urgent Priority" + }, + { + "id": 2, + "code": "standingInstructionPriority.high", + "value": "High Priority" + }, + { + "id": 3, + "code": "standingInstructionPriority.medium", + "value": "Medium Priority" + }, + { + "id": 4, + "code": "standingInstructionPriority.low", + "value": "Low Priority" + } + ], + "recurrenceTypeOptions": [ + { + "id": 1, + "code": "accountTransferRecurrenceType.periodic", + "value": "Periodic Recurrence" + }, + { + "id": 2, + "code": "accountTransferRecurrenceType.as.per.dues", + "value": "As Per Dues Recurrence" + } + ], + "recurrenceFrequencyOptions": [ + { + "id": 0, + "code": "frequencyperiodFrequencyType.days", + "value": "Days" + }, + { + "id": 1, + "code": "frequencyperiodFrequencyType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "frequencyperiodFrequencyType.months", + "value": "Months" + }, + { + "id": 3, + "code": "frequencyperiodFrequencyType.years", + "value": "Years" + } + ] + } + +
+ +
+ +   +
+
+

Create new Standing Instruction

+

Ability to create new instruction for transfer of monetary funds from one account to another.

+
+
+ POST https://Domain Name/api/v1/standinginstructions + POST standinginstructions/ + Content-Type: application/json + No Request Body: + { + "fromOfficeId":1, + "fromClientId":1, + "fromAccountType":2, + "name":"standing instruction", + "transferType":1, + "priority":2, + "status":1, + "fromAccountId":1, + "toOfficeId":1, + "toClientId":1, + "toAccountType":2, + "toAccountId":3, + "instructionType":1, + "amount":"221", + "validFrom":"08 April 2014", + "recurrenceType":1, + "recurrenceInterval":"1", + "recurrenceFrequency":2, + "locale":"en", + "dateFormat":"dd MMMM yyyy", + "recurrenceOnMonthDay":"02 April", + "monthDayFormat":"dd MMMM" + } + + + { + + "clientId":1, + "resourceId":65 + } + +
+
+ +   +
+
+

Update Standing Instruction

+

Ability to modify existing instruction for transfer of monetary funds from one account to + another.

+
+
+ PUT https://Domain + Name/api/v1/standinginstructions/1?command=update + PUT standinginstructions/1?command=update + Content-Type: application/json + No Request Body: + { + "recurrenceInterval":"2" + } + + + { + "resourceId":20, + "changes":{ + "recurrenceInterval":2 + } + } + +
+
+ +   +
+
+

Delete Standing Instruction

+

Ability to modify existing instruction for transfer of monetary funds from one account to + another.

+
+
+ PUT https://Domain + Name/api/v1/standinginstructions/1?command=delete + PUT standinginstructions/1?command=delete + Content-Type: application/json + No Request Body: + { + + } + + + { + "resourceId":20, + "changes":{ + "status":3 + } + } + +
+
+ +   +
+
+

List Standing Instructions

+

Example Requests:

+
standinginstructions
+
+
+
+ GET https://Domain Name/api/v1/standinginstructions + + { + "totalFilteredRecords": 2, + "pageItems": [ + { + "id": 1, + "accountDetailId": 6, + "name": "test standing", + "fromOffice": { + "id": 1, + "name": "Head Office" + }, + "fromClient": { + "id": 1, + "displayName": "Test test", + "officeId": 1, + "officeName": "Head Office" + }, + "fromAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "fromAccount": { + "id": 14, + "accountNo": "000000014", + "productId": 1, + "productName": "savings old" + }, + "toOffice": { + "id": 1, + "name": "Head Office" + }, + "toClient": { + "id": 1, + "displayName": "Test test", + "officeId": 1, + "officeName": "Head Office" + }, + "toAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "toAccount": { + "id": 3, + "accountNo": "000000003", + "productId": 4, + "productName": "account overdraft" + }, + "transferType": { + "id": 1, + "code": "accountTransferType.account.transfer", + "value": "Account Transfer" + }, + "priority": { + "id": 3, + "code": "standingInstructionPriority.medium", + "value": "Medium Priority" + }, + "instructionType": { + "id": 1, + "code": "standingInstructionType.fixed", + "value": "Fixed" + }, + "status": { + "id": 3, + "code": "standingInstructionStatus.deleted", + "value": "Deleted" + }, + "amount": 150.000000, + "validFrom": [ + 2014, + 4, + 3 + ], + "recurrenceType": { + "id": 1, + "code": "accountTransferRecurrenceType.periodic", + "value": "Periodic Recurrence" + }, + "recurrenceFrequency": { + "id": 2, + "code": "recurrenceperiodFrequencyType.months", + "value": "Months" + }, + "recurrenceInterval": 1, + "recurrenceOnMonthDay": [ + 4, + 3 + ] + }, + { + "id": 2, + "accountDetailId": 7, + "name": "test standing 2", + "fromOffice": { + "id": 1, + "name": "Head Office" + }, + "fromClient": { + "id": 1, + "displayName": "Test test", + "officeId": 1, + "officeName": "Head Office" + }, + "fromAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "fromAccount": { + "id": 14, + "accountNo": "000000014", + "productId": 1, + "productName": "savings old" + }, + "toOffice": { + "id": 1, + "name": "Head Office" + }, + "toClient": { + "id": 1, + "displayName": "Test test", + "officeId": 1, + "officeName": "Head Office" + }, + "toAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "toAccount": { + "id": 3, + "accountNo": "000000003", + "productId": 4, + "productName": "account overdraft" + }, + "transferType": { + "id": 1, + "code": "accountTransferType.account.transfer", + "value": "Account Transfer" + }, + "priority": { + "id": 2, + "code": "standingInstructionPriority.high", + "value": "High Priority" + }, + "instructionType": { + "id": 1, + "code": "standingInstructionType.fixed", + "value": "Fixed" + }, + "status": { + "id": 3, + "code": "standingInstructionStatus.deleted", + "value": "Deleted" + }, + "amount": 100.000000, + "validFrom": [ + 2014, + 4, + 3 + ], + "recurrenceType": { + "id": 1, + "code": "accountTransferRecurrenceType.periodic", + "value": "Periodic Recurrence" + }, + "recurrenceFrequency": { + "id": 2, + "code": "recurrenceperiodFrequencyType.months", + "value": "Months" + }, + "recurrenceInterval": 1, + "recurrenceOnMonthDay": [ + 2, + 1 + ] + } + ] + } +
+
+ +   +
+
+

Retrieve Standing Instruction:

+

Example Requests :

+
standinginstructions/1
+
+
+
+ GET + https://DomainName/api/v1/standinginstructions/{standingInstructionId} + + { + "id": 1, + "accountDetailId": 6, + "name": "test standing", + "fromOffice": { + "id": 1, + "name": "Head Office" + }, + "fromClient": { + "id": 1, + "displayName": "Test test", + "officeId": 1, + "officeName": "Head Office" + }, + "fromAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "fromAccount": { + "id": 14, + "accountNo": "000000014", + "productId": 1, + "productName": "savings old" + }, + "toOffice": { + "id": 1, + "name": "Head Office" + }, + "toClient": { + "id": 1, + "displayName": "Test test", + "officeId": 1, + "officeName": "Head Office" + }, + "toAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "toAccount": { + "id": 3, + "accountNo": "000000003", + "productId": 4, + "productName": "account overdraft" + }, + "transferType": { + "id": 1, + "code": "accountTransferType.account.transfer", + "value": "Account Transfer" + }, + "priority": { + "id": 3, + "code": "standingInstructionPriority.medium", + "value": "Medium Priority" + }, + "instructionType": { + "id": 1, + "code": "standingInstructionType.fixed", + "value": "Fixed" + }, + "status": { + "id": 3, + "code": "standingInstructionStatus.deleted", + "value": "Deleted" + }, + "amount": 150.000000, + "validFrom": [ + 2014, + 4, + 3 + ], + "recurrenceType": { + "id": 1, + "code": "accountTransferRecurrenceType.periodic", + "value": "Periodic Recurrence" + }, + "recurrenceFrequency": { + "id": 2, + "code": "recurrenceperiodFrequencyType.months", + "value": "Months" + }, + "recurrenceInterval": 1, + "recurrenceOnMonthDay": [ + 4, + 3 + ] + } + +
+
+ +   +
+
+

Standing Instructions Logged History:

+

The list capability of history can support pagination and sorting.

+
Optional Arguments
+
+
offset
+
+ Integer optional, defaults to 0 +
+
Indicates from what result to start from.
+ +
limit
+
+ Integer optional, defaults to 200 +
+
Restricts the size of results returned. To override the default and return all entries you must + explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1 +
+ +
orderBy
+
+ String optional, one of name,standingInstructionId +
+
Orders the results by the field indicated.
+ +
sortBy
+
+ String optional, one of ASC, DESC +
+
Indicates what way to order results if orderBy is used.
+ +
clientId
+
+ Integer optional +
+
Use clientId of clients to restrict results.
+ +
clientName
+
+ String optional +
+
Use displayName of clients to restrict results.
+ +
fromAccountId
+
+ Integer optional +
+
Use fromAccountId of standing instruction transaction to restrict results. fromAccountId is id + of fromAccountType. +
+ +
fromAccountType
+
+ Integer optional +
+
Use fromAccountType of standing instruction transaction to restrict results. fromAccountType is + enum value entity type Ex:Loan Account:1, Savings Account:2 +
+ +
transferType
+
+ Integer optional +
+
Use transferType of standing instruction transaction to restrict results. transferType is enum + value transfer type Ex:Loan Repayment:2, Account Transfer:1 +
+ +
fromDate
+
+ Dateoptional +
+
Filters for transactions whose entry Date is greater than or equal to the passed in Date +
+
toDate
+
+ Date optional +
+
Filters for transactions whose entry Date is lesser than or equal to the passed in Date +
+ +
+

Example Requests :

+
standinginstructionrunhistory
+
+
standinginstructionrunhistory?orderBy=name&sortOrder=DESC
+
+
standinginstructionrunhistory?offset=10&limit=50
+
+
+
+ GET https://DomainName/api/v1/standinginstructionrunhistory + + { + "totalFilteredRecords": 2, + "pageItems": [ + { + "standingInstructionId": 1, + "name": "ACC Transfer", + "fromOffice": { + "id": 1, + "name": "Head Office" + }, + "fromClient": { + "id": 1, + "displayName": "Test client", + "officeId": 1, + "officeName": "Head Office" + }, + "fromAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "fromAccount": { + "id": 2, + "accountNo": "000000002", + "productId": 1, + "productName": "General Savings" + }, + "toAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "toAccount": { + "id": 1, + "accountNo": "000000001", + "productId": 1, + "productName": "General Savings" + }, + "toOffice": { + "id": 1, + "name": "Head Office" + }, + "toClient": { + "id": 1, + "displayName": "Test client", + "officeId": 1, + "officeName": "Head Office" + }, + "amount": 10, + "status": "success", + "executionTime": [ + 2014, + 6, + 30 + ], + "errorLog": "" + }, + { + "standingInstructionId": 2, + "name": "Pay overdues", + "fromOffice": { + "id": 1, + "name": "Head Office" + }, + "fromClient": { + "id": 1, + "displayName": "Test client", + "officeId": 1, + "officeName": "Head Office" + }, + "fromAccountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "fromAccount": { + "id": 1, + "accountNo": "000000001", + "productId": 1, + "productName": "General Savings" + }, + "toAccountType": { + "id": 1, + "code": "accountType.loan", + "value": "Loan Account" + }, + "toAccount": { + "id": 1, + "accountNo": "000000001", + "productId": 1, + "productName": "Daily Loan" + }, + "toOffice": { + "id": 1, + "name": "Head Office" + }, + "toClient": { + "id": 1, + "displayName": "Test client", + "officeId": 1, + "officeName": "Head Office" + }, + "amount": 7038.01, + "status": "success", + "executionTime": [ + 2014, + 6, + 30 + ], + "errorLog": "" + } + ] + } + +
+
+ + + + +   +
+
+

Data Tables

+

The datatables API allows you to plug-in your own tables + (MySql) that have a relationship to a Apache Fineract core table. For + example, you might want to add some extra client fields and record + information about each of the clients' family members. Via the API + you can create, read, update and delete entries for each + 'plugged-in' table. The API checks for permission and for 'data + scoping' (only data within the users' office hierarchy can be + managed by the user).

+

The Apache Fineract Reference App uses a JQuery plug-in called + stretchydatatables (which in turn uses this datatables resource) + to provide a pretty flexible CRUD (Create, Read, Update, Delete) + User Interface.

+

+ More + Documentation +

+
+
+ +   +
+
+

Create Data Table

+

Create a new data table and registers it with the Apache Fineract Core application + table.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
Mandatory - datatableName
The name of the Data Table.
Mandatory - apptableName
+ Application table name. Must be one of the following: +
    +
  • m_client
  • +
  • m_group
  • +
  • m_loan
  • +
  • m_office
  • +
  • m_saving_account
  • +
  • m_product_loan
  • +
  • m_savings_product
  • +
+
Mandatory - columns
An array of columns in the new Data Table.
Optional - multiRow
Allows to create multiple entries in the Data Table. Optional, defaults to + false. + If this property is not provided Data Table will allow only one entry. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions - columns
+
Mandatory - name
Name of the created column. Can contain only alphanumeric characters, + underscores and spaces, but cannot start with a number. Cannot start or end with an + underscore or space. +
Mandatory - type
+ Column type. Must be one of the following: +
    +
  • Boolean
  • +
  • Date
  • +
  • DateTime
  • +
  • Decimal
  • +
  • Dropdown
  • +
  • Number
  • +
  • String
  • +
  • Text
  • +
+
Mandatory [type = Dropdown] - code
Used in Code Value fields. Column name becomes: code_cd_name. + Mandatory if using type Dropdown, otherwise an error is returned. +
Optional - mandatory
Determines whether this column must have a value in every entry. Optional, + defaults to false. +
Mandatory [type = String] - length
Length of the text field. Mandatory if type String is used, otherwise an + error is returned. +
+
+
+ + POST https://DomainName/api/v1/datatables + + + POST https://DomainName/api/v1/datatables + + Content-Type: application/json + Request Body: + { + "datatableName": "extra_client_details", + "apptableName": "m_client", + "columns": [ + { + "name": "Gender", + "type": "Dropdown", + "code": "Gender" + }, + { + "name": "Some Decimal", + "type": "Decimal", + "mandatory": true + }, + { + "name": "Birth Date", + "type": "Date" + }, + { + "name": "Question 2", + "type": "String", + "length": 100, + "mandatory": false + } + ] + } + + + { + "resourceIdentifier": "extra_client_details" + } + + + POST https://DomainName/api/v1/datatables + + Content-Type: application/json + Request Body: + { + "datatableName": "client_address", + "apptableName": "m_client", + "multiRow":"true", + "columns": [ + { + "name": "Address1", + "type": "String", + "length": 100, + "mandatory": true + }, + { + "name": "Address2", + "length": 100, + "type": "String" + } + ] + } + + + { + "resourceIdentifier": "client_address" + } + + +
+
+ +   +
+
+

List Data Tables

+

Lists registered data tables and the Apache Fineract Core + application table they are registered to.

+ +
Arguments
+
+
apptable
+
+ optional +
+
The Apache Fineract core application table.
+
+

Example Requests:

+
datatables?apptable=m_client
+
+
+
datatables
+
+
+ + GET https://DomainName/api/v1/datatables + + + [ + { + "applicationTableName": "m_client", + "registeredTableName": "extra_client_details", + "columnHeaderData": [ + { + "columnName": "client_id", + "columnType": "bigint", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": false, + "isColumnPrimaryKey": true, + "columnValues": [] + }, + { + "columnName": "Gender_cd_Question", + "columnType": "int", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "Some Decimal", + "columnType": "decimal", + "columnLength": 0, + "columnDisplayType": "DECIMAL", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "Birth Date", + "columnType": "date", + "columnLength": 0, + "columnDisplayType": "DATE", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [] + } + ] + } + ] + +
+
+ +   +
+
+

Retrieve Data Table Details

+

Lists a registered data table details and the Apache Fineract Core + application table they are registered to.

+
+
+ + GET https://DomainName/api/v1/datatables/{datatable} + + + { + "applicationTableName": "m_client", + "registeredTableName": "extra_client_details", + "columnHeaderData": [ + { + "columnName": "client_id", + "columnType": "bigint", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": false, + "isColumnPrimaryKey": true, + "columnValues": [] + }, + { + "columnName": "Gender_cd_Question", + "columnType": "int", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "Some Decimal", + "columnType": "decimal", + "columnLength": 0, + "columnDisplayType": "DECIMAL", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "Birth Date", + "columnType": "date", + "columnLength": 0, + "columnDisplayType": "DATE", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [] + } + ] + } + +
+
+ +   +
+
+

Update Data Table

+

Modifies fields of a data table. If the apptableName parameter is passed, + data table is deregistered and registered with the new application table.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
Optional - apptableName
+ Application table name. Only necessary if changing the application table this Data Table is + registered to. Must be one of the following: +
    +
  • m_client
  • +
  • m_group
  • +
  • m_loan
  • +
  • m_office
  • +
  • m_saving_account
  • +
+
Optional - dropColumns
An array of columns to be deleted from the Data Table.
Optional - addColumns
An array of columns to be added to the Data Table.
Optional - changeColumns
An array of columns to be changed in the Data Table.
+ + + + + + + + + + +
+
Field Descriptions - dropColumns
+
Mandatory - name
Requires a full name of the deleted column to be provided.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions - addColumns
+
Mandatory - name
Name of the created column. Can contain only alphanumeric characters, + underscores and spaces, but cannot start with a number. Cannot start or end with an + underscore or space. +
Mandatory - type
+ Column type. Must be one of the following: +
    +
  • Boolean
  • +
  • Date
  • +
  • DateTime
  • +
  • Decimal
  • +
  • Dropdown
  • +
  • Number
  • +
  • String
  • +
  • Text
  • +
+
Mandatory [type = Dropdown] - code
Used in Code Value fields. Column name becomes: code_cd_name. + Mandatory if using type Dropdown, otherwise an error is returned. +
Optional - mandatory
Determines whether this column must have a value in every entry. Optional, + defaults to false. +
Mandatory [type = String] - length
Length of the text field. Mandatory if type String is used, otherwise an + error is returned. +
Optional - after
Only used when re-ordering Data Table columns. Requires a full column name + to be provided. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions - changeColumns
+
Mandatory - name
Name of the created column. Can contain only alphanumeric characters, + underscores and spaces, but cannot start with a number. Cannot start or end with an + underscore or space. +
Optional - newName
New name of the created column. Can contain only alphanumeric characters, + underscores and spaces, but cannot start with a number. Cannot start or end with an + underscore or space. +
Mandatory [type = Dropdown] - code
Used in Code Value fields. Column name becomes: code_cd_name. + Mandatory if using type Dropdown, otherwise an error is returned. +
Optional [type = Dropdown] - newCode
Used in Code Value fields. Column name becomes: code_cd_name. + Optional if using type Dropdown, otherwise an error is returned. +
Optional - mandatory
Determines whether this column must have a value in every entry. Optional, + defaults to false. +
Mandatory [type = String] - length
Length of the text field. Mandatory if type String is used, otherwise an + error is returned. +
Optional - after
Only used when re-ordering Data Table columns. Requires a full column name + to be provided. +
+
+
+ + PUT https://DomainName/api/v1/datatables/{datatables} + + + PUT https://DomainName/api/v1/datatables/extra_client_details + + Content-Type: application/json + Request Body: + { + "apptableName": "m_client", + "dropColumns": [ + { + "name": "Gender_cd_Question" + } + ], + "addColumns": [ + { + "name": "Question", + "type": "Dropdown", + "code": "Gender", + "mandatory": true + }, + { + "name": "Some Number", + "type": "Number", + "after": "Some Field" + } + ], + "changeColumns": [ + { + "name": "Question", + "newName": "Question 2", + "mandatory": true, + "code": "Gender", + "newCode": "Gender2" + } + ] + } + + + { + "resourceIdentifier": "extra_client_details" + } + +
+
+ +   +
+
+

Delete Data Table

+

Deletes a data table and deregisters it from the Apache Fineract Core + application table.

+
+
+ + DELETE https://DomainName/api/v1/datatables/{datatables} + + + DELETE https://DomainName/api/v1/datatables/extra_client_details + + Content-Type: application/json + No Request Body + + + { + "resourceIdentifier": "extra_client_details" + } + +
+ +
+   +
+
+

Register Data Table

+

Registers a data table with the Apache Fineract Core application + table. This allows the data table to be maintained through the + API. + In case the datatable is a PPI (survey table), a parameter category should be pass along with the + request. + The API currently support one category (200) +

+
+
+ + POST https://DomainName/api/v1/datatables/register/{datatable}/{apptable} + + + POST datatables/register/extra_client_details/m_client + + Content-Type: application/json + Request Body: + {} + + + { + "resourceIdentifier": "extra_client_details" + } + +
+
+ +   +
+
+

Deregister Data Table

+

Deregisters a data table. It will no longer be available + through the API.

+
+
+ + POST https://DomainName/api/v1/datatables/deregister/{datatable} + + + POST datatables/deregister/extra_client_details + + Content-Type: application/json + Request Body: + {} + + + { + "resourceIdentifier": "extra_client_details" + } + +
+
+ + +   +
+
+

Create Entry in Data Table

+

Adds a row to the data table.

+

Note that the default datatable UI functionality converts + any field name containing spaces to underscores when using the + API. This means the field name "Business Description" is + considered the same as "Business_Description". So you shouldn't + have both "versions" in any data table.

+
+
+ + POST https://DomainName/api/v1/datatables/{datatable}/{apptableId} + + + POST datatables/extra_client_details/1 + + Content-Type: application/json + Request Body: + { + "Business Description": "Livestock sales", + "Comment": "First comment made", + "Education_cv": "Primary", + "Gender_cd": "6", + "Highest Rate Paid": "8.5", + "Next Visit": "01 October 2012", + "Years in Business": "5", + "dateFormat": "dd MMMM yyyy", + "locale": "en" + } + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

Retrieve Entry(s) from Data Table

+

+ Gets the entry (if it exists) for data tables that are one to one + with the application table.
Gets the entries (if they + exist) for data tables that are one to many with the application + table. +

+

Note: The 'fields' parameter is not available for + datatables.

+ +
Arguments
+
+
order
+
+ optional +
+
Specifies the order in which data is returned.
+
genericResultSet
+
+ optional, defaults to false +
+
If 'true' an optimised JSON format is returned suitable for tabular display of data. + This format is used by the default data tables UI functionality. +
+
+ +

Example Requests:

+
datatables/extra_client_details/1
+
+
+
datatables/extra_family_details/1?order=`Date of Birth` desc
+
+
+
datatables/extra_client_details/1?genericResultSet=true
+
+
+ + GET https://DomainName/api/v1/datatables/{datatable}/{apptableId}?genericResultSet=true + + + { + "columnHeaders": [ + { + "columnName": "client_id", + "columnType": "bigint", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": false, + "isColumnPrimaryKey": true, + "columnValues": [] + }, + { + "columnName": "Business Description", + "columnType": "varchar", + "columnLength": 100, + "columnDisplayType": "STRING", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "Years in Business", + "columnType": "int", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "Gender_cd", + "columnType": "int", + "columnLength": 0, + "columnDisplayType": "CODELOOKUP", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [ + { + "id": 5, + "value": "option.Male" + }, + { + "id": 6, + "value": "option.Female" + } + ] + }, + { + "columnName": "Education_cv", + "columnType": "varchar", + "columnLength": 60, + "columnDisplayType": "CODEVALUE", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [ + { + "id": 9, + "value": "Primary" + }, + { + "id": 10, + "value": "Secondary" + }, + { + "id": 11, + "value": "University" + } + ] + }, + { + "columnName": "Next Visit", + "columnType": "date", + "columnLength": 0, + "columnDisplayType": "DATE", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "Highest Rate Paid", + "columnType": "decimal", + "columnLength": 0, + "columnDisplayType": "DECIMAL", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "Comment", + "columnType": "text", + "columnLength": 65535, + "columnDisplayType": "TEXT", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [] + } + ], + "data": [ + { + "row": [ + "1", + "Livestock sales", + "5", + "6", + "Primary", + "2012-10-01", + "8.500000", + "First\tcomment made" + ] + } + ] + } + +
+
+ + +   +
+
+

Update Entry in Data Table (One to One)

+

Updates the row (if it exists) of the data table.

+
+
+ + PUT https://DomainName/api/v1/datatables/{datatable}/{apptableId} + + + PUT datatables/extra_client_details/1 + + Content-Type: application/json + Request Body: + { + "Business Description": "Livestock sales updated", + } + + + { + "resourceId": 1, + "changes": { + "Business Description": "Livestock sales updated" + } + } + +
+
+ +   +
+
+

Update Entry in Data Table (One to Many)

+

Updates the row (if it exists) of the data table.

+
+
+ + PUT https://DomainName/api/v1/datatables/{datatable}/{apptableId}/{datatableId} + + + PUT datatables/Extra Family Details Data/1/2 + + Content-Type: application/json + Request Body: + { + "Date of Birth": "01 June 1982", + Education_cdHighest: "5", + Name: "June", + "Other Notes": "More\nnotes", + "Points Score": "20", + dateFormat: "dd MMMM yyyy", + locale: "en" + } + + { "resourceId": 1 } +
+
+ +   +
+
+

Delete Entry(s) in Data Table

+

+ Deletes the entry (if it exists) for data tables that are one-to-one with the application table. +
Deletes the entries (if they exist) for data tables that are one-to-many with the application + table. +

+
+
+ + DELETE https://DomainName/api/v1/datatables/{datatable}/{apptableId} + + + DELETE datatables/extra_client_details/1 + + Content-Type: application/json + Request Body: + {} + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

Delete Entry in Datatable (One to Many)

+

Deletes the entry (if it exists) for data tables that are + one to many with the application table.

+
+
+ + DELETE https://DomainName/api/v1/datatables/{datatable}/{apptableId}/{datatableId} + + + DELETE datatables/extra_family_details/1/2 + + Content-Type: application/json + Request Body: + {} + + + { + "resourceId": 1 + } + +
+
+ + + + +   +
+
+

Retrieve surveys

+

Retrieve surveys. This allows to retrieve the list of survey tables registered . +

+
+
+ + GET https://DomainName/api/v1/survey/ + + + GET survey/ + + Content-Type: application/json + Request Body: + {} + + + [ + { + "datatableData": { + "applicationTableName": "m_client", + "registeredTableName": "ppi_kenya_2005", + "columnHeaderData": [ + { + "columnName": "id", + "columnType": "bigint", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": false, + "isColumnPrimaryKey": true, + "columnValues": [] + }, + { + "columnName": "client_id", + "columnType": "int", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "ppi_household_members_cd_q1_householdmembers", + "columnType": "int", + "columnLength": 0, + "columnDisplayType": "CODELOOKUP", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [ + { + "id": 167, + "value": "Nine or More", + "score": 0 + }, + { + "id": 168, + "value": "Seven or eight", + "score": 5 + }, + { + "id": 169, + "value": "Six", + "score": 8 + }, + + ], + "columnCode": "ppi_household_members" + }, + { + "columnName": "date", + "columnType": "datetime", + "columnLength": 0, + "columnDisplayType": "DATETIME", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] + } + ] + }, + "enabled": false + }, + { + "datatableData": { + "applicationTableName": "m_client", + "registeredTableName": "ppi_tanzania_20012", + "columnHeaderData": [ + { + "columnName": "id", + "columnType": "bigint", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": false, + "isColumnPrimaryKey": true, + "columnValues": [] + }, + { + "columnName": "client_id", + "columnType": "int", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "ppi_youngerthan17_cd_q1_youngerthan17", + "columnType": "int", + "columnLength": 0, + "columnDisplayType": "CODELOOKUP", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [ + { + "id": 204, + "value": "four or More", + "score": 0 + }, + + ], + "columnCode": "ppi_youngerthan17" + }, + ], + "columnCode": "ppi_how_many_tables" + }, + ] + }, + "enabled": true + } + ] + +
+
+ + +   +
+
+

Retrieve survey

+

Lists a registered survey table details and the Apache Fineract Core application table they are + registered to. +

+
+
+ + GET https://DomainName/api/v1/survey/ppi_kenya_2005 + + + GET survey/{surveyName} + + Content-Type: application/json + Request Body: + {} + + + { + "applicationTableName": "m_client", + "registeredTableName": "extra_client_details", + "columnHeaderData": [ + { + "columnName": "client_id", + "columnType": "bigint", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": false, + "isColumnPrimaryKey": true, + "columnValues": [] + }, + { + "columnName": "Gender_cd_Question", + "columnType": "int", + "columnLength": 0, + "columnDisplayType": "INTEGER", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "Some Decimal", + "columnType": "decimal", + "columnLength": 0, + "columnDisplayType": "DECIMAL", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "Birth Date", + "columnType": "date", + "columnLength": 0, + "columnDisplayType": "DATE", + "isColumnNullable": true, + "isColumnPrimaryKey": false, + "columnValues": [] + } + enabled:false + ] + } + +
+
+ +   +
+
+

Create an entry in the survey table

+

Insert and entry in a survey table (full fill the survey). + +

+
+
+ + POST https://DomainName/api/v1/survey/ppi_kenya_2005/87 + + + POST survey/{surveyName}/{clientId} + + Content-Type: application/json + Request Body: + { + + ppi_household_members_cd_q1_householdmembers : 167, + ppi_highestschool_cd_q2_highestschool : 174 , + ppi_businessoccupation_cd_q3_businessoccupation : 180, + ppi_habitablerooms_cd_q4_habitablerooms :184, + ppi_floortype_cd_q5_floortype : 188, + ppi_lightingsource_cd_q6_lightingsource :190, + ppi_irons_cd_q7_irons:193, + ppi_mosquitonets_cd_q8_mosquitonets:195, + ppi_towels_cd_q9_towels:198, + ppi_fryingpans_cd_q10_fryingpans:201, + date:"2014-12-02 20:30:00", + dateFormat:"Y-m-d H:i:s", + locale:"en_GB" + + } + + + { + "officeId": 2, + "clientId": 87, + "resourceId": 87 + } + +
+
+ + + + + +   +
+
+

Notes

+

Notes API allows to enter notes for supported resources.

+ + + + + + + + + + + +
+
Field Descriptions
+
note
A simple text note created for supported resources.
+
+
+ + + + + + + +
+
Supported Resources
+
+ Client +
+ Loan +
+ Group +
+ Savings Account +
+
+
+ +   +
+
+

Add a Resource Note

+

Adds a new note to a supported resource.

+ + + + + + + +
+
Mandatory Fields
+
note
+

Example Requests:

+
clients/1/notes
+
+
+
groups/1/notes
+
+
+ + POST https://DomainName/api/v1/{resource}/{resourceId}/notes + + + POST clients/1/notes + Content-Type: application/json + Request Body: + { + "note": "a note about the client" + } + + + { + "officeId": 1, + "clientId": 1, + "resourceId": 76 + } + +
+
+ +   +
+
+

Retrieve a Resource's Notes

+

+ Note: Notes are returned in descending createOn order. +

+

Example Requests:

+
clients/2/notes
+
+
+
groups/2/notes?fields=note,createdOn,createdByUsername
+
+
+ + GET https://DomainName/api/v1/{resource}/{resourceId}/notes + + + [ + { + "id": 2, + "clientId": 1, + "noteType": { + "id": 100, + "code": "noteType.client", + "value": "Client note" + }, + "note": "First note edited", + "createdById": 1, + "createdByUsername": "mifos", + "createdOn": 1342498505000, + "updatedById": 1, + "updatedByUsername": "mifos", + "updatedOn": 1342498517000 + } + ] + +
+
+ +   +
+
+

Retrieve a Resource Note

+

Example Requests:

+
clients/1/notes/76
+
+
+
groups/1/notes/20
+
+
+
clients/1/notes/76?fields=note,createdOn,createdByUsername
+
+
+
groups/1/notes/20?fields=note,createdOn,createdByUsername
+
+
+ + GET https://DomainName/api/v1/{resource}/{resourceId}/notes/{noteId} + + + { + "id": 76, + "clientId": 1, + "noteType": { + "id": 100, + "code": "noteType.client", + "value": "Client note" + }, + "note": "a note about the client", + "createdById": 1, + "createdByUsername": "mifos", + "createdOn": 1359463135000, + "updatedById": 1, + "updatedByUsername": "mifos", + "updatedOn": 1359463135000 + } + +
+
+ +   +
+
+

Update a Resource Note

+
+
+ + PUT https://DomainName/api/v1/{resource}/{resourceId}/notes/{noteId} + + + PUT clients/1/notes/76 + Content-Type: application/json + Request Body: + { + "note": "and here the note is updated nicely." + } + + + { + "officeId": 1, + "clientId": 1, + "resourceId": 76, + "changes": { + "note": "and here the note is updated nicely." + } + } + +
+
+ +   +
+
+

Delete a Resource Note

+
+
+ + DELETE https://DomainName/api/v1/{resource}/{resourceId}/notes/{noteId} + + + DELETE clients/1/notes/76 + Content-Type: application/json + No Request Body: + + + { + "resourceId": 76 + } + +
+
+ + + + +   +
+
+

Documents

+

Multiple Documents (a combination of a name, description + and a file) may be attached to different Entities + like Clients, Groups, Staff, Loans, Savings and Client + Identifiers in the system +

+

Note: The currently allowed Entities are +

    +
  • Clients: URL Pattern as clients
  • +
  • Staff: URL Pattern as staff
  • +
  • Loans: URL Pattern as loans
  • +
  • Savings: URL Pattern as savings
  • +
  • Client Identifiers: URL Pattern as client_identifiers
  • +
  • Groups: URL Pattern as groups
  • +
+

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
parentEntityType
The type of the Entity + with which this document is associated +
parentEntityId
The ID of the entity (client, + loan etc) with which this document is + associated +
name
User Defined name for the + document, need not be the same as the name + of the file associated with the document +
fileName
The name of the file associated + with this document +
size
The size (in bytes) of the file + associated with this document +
type
Mime Type of the file + associated with this document +
description
A description of this document +
+
+
+ +   +
+
+

List documents

+

Example Requests:

+
clients/1/documents
+
+
client_identifiers/1/documents
+
+
loans/1/documents?fields=name,description
+
+
+ + GET https://DomainName/api/v1/{entityType}/{entityId}/documents + + + [ + { + "id": 1, + "parentEntityType": "clients", + "parentEntityId": 1, + "name": "Client Details Form ", + "fileName": "CGAP.pdf", + "size": 5246719, + "type": "application/pdf", + "description": "A signed form signed by new member" + } + ] + +
+
+ +   +
+
+

Retrieve a Document

+

Example Requests:

+
clients/1/documents/1
+
+
+
loans/1/documents/1
+
+
+
client_identifiers/1/documents/1?fields=name,description
+
+
+ + GET https://DomainName/api/v1/documents/{clientId} + + + { + "id": 1, + "parentEntityType": "clients", + "parentEntityId": 1, + "name": "Client Details Form ", + "fileName": "CGAP.pdf", + "size": 5246719, + "type": "application/pdf", + "description": "A signed form signed by new member" + } + +
+
+ +   +
+
+

Create a Document

+

+ Note: A document is created using a Multi-part form upload +
+ + + + + + + + + + + + + + + + + + + + + + +
+
Body Parts
+
name
Name or summary of the document +
description
Description of the document +
file
The file to be uploaded +
+

+ + + + + + + +
+
Mandatory Fields
+
file and description
+
+
+ + POST https://DomainName/api/v1/{entityType}/{entityId}/documents + + + POST clients/1/documents + Content-Type: multipart/form-data + Request Body: + Not Shown (multi-part form data) + + + { + "resourceId":3, + "resourceIdentifier":"3" + } + +
+
+ +   +
+
+

Update a Document

+

+ Note: A document is updated using a Multi-part form upload +
+ + + + + + + + + + + + + + + + + + + + + + +
+
Body Parts
+
name
Name or summary of the document +
description
Description of the document +
file
The file to be uploaded +
+

+
+
+ + PUT https://DomainName/api/v1/{entityType}/{entityId}/documents/{documentId} + + + PUT clients/1/documents/1 + Content-Type: multipart/form-data + Request Body: + Not Shown (multi-part form data) + + + { + "resourceId":3, + "changes":{}, + "resourceIdentifier":"3" + } + +
+
+ +   +
+
+

Retrieve Binary File associated with Document

+

Request used to download the file associated with the document

+

Example Requests:

+
clients/1/documents/1/attachment
+
+
+
loans/1/documents/1/attachment
+
+
+ + GET https://DomainName/api/v1/{entityType}/{entityId}/documents/{documentId}/attachment + + + Not Shown: The corresponding Binary file + +
+
+ +   +
+
+

Remove a Document

+
+
+ + DELETE https://DomainName/api/v1/{entityType}/{entityId}/documents/{documentId} + + + DELETE clients/1/documents/1 + Content-Type: application/json + No Request Body: + + + { + "resourceId":1, + "changes":{}, + "resourceIdentifier":"1" + } + +
+
+ + DELETE https://DomainName/api/v1/{entityType}/{entityId}/documents/{documentId} + + + DELETE loans/1/documents/1 + Content-Type: application/json + No Request Body: + + + { + "resourceId":1, + "changes":{}, + "resourceIdentifier":"1" + } + +
+ +
+ + + +   +
+
+

Reports

+

+ Non-core reports can be added, updated and deleted. +

+

+ Core reports (supplied at installation/upgrade time) can only have their "useReport" updated. + "useReport" is used, for example, in the reference UI report page to 'show'/'not show' reports. + Reports that have useReport set to false can still be run. + Reports only used for workflow purposes are examples of reports that would have their useReport set + to false. +

+

+ Placeholders can be put in the reportSql to act as parameters. They have the format ${paramName}. + The runreports api will translate the value of any query parameter beginning R_ with the equivalent + placeholder.
+ e.g. query parameter R_myName=john will replace ${myName} with john +

+

+ There is a special 'automatic' placeholder ${currentUserHierarchy} - if this is included in + reportSql + it gets replaced by the requesting users' office hierarchy value. This enables data scoping.
+ Usage example "where o.hierarchy like CONCAT('${currentUserHierarchy}', '%')" +

+

+ Note:
+ The reports api allows parameters (not just placeholders in reportSql) to be associated with + reports. + These associated parameters are only required to allow the reference UI reporting functionality + implement + user-friendly parameter input. +

+
+
+ +   +
+
+

Retrieve Report Template

+

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:

+
reports/template
+
+
+ + GET https://DomainName/api/v1/reports/template + + + { + "allowedReportTypes": [ + "Table", + "Pentaho", + "Chart" + ], + "allowedReportSubTypes": [ + "Bar", + "Pie" + ], + "allowedParameters": [ + { + "id": 1, + "parameterName": "startDateSelect" + }, + { + "id": 2, + "parameterName": "endDateSelect" + }, + { + "id": 3, + "parameterName": "obligDateTypeSelect" + }, + { + "id": 5, + "parameterName": "OfficeIdSelectOne" + }, + { + "id": 6, + "parameterName": "loanOfficerIdSelectAll" + }, + { + "id": 10, + "parameterName": "currencyIdSelectAll" + }, + { + "id": 20, + "parameterName": "fundIdSelectAll" + }, + { + "id": 25, + "parameterName": "loanProductIdSelectAll" + }, + { + "id": 26, + "parameterName": "loanPurposeIdSelectAll" + }, + { + "id": 100, + "parameterName": "parTypeSelect" + } + ] + } + +
+
+ +   +
+
+

Create a Report

+
+
+ + POST https://DomainName/api/v1/reports + + + POST reports + Content-Type: application/json + Request Body: + { + "reportName":"Completely New Report", + "reportType":"Table", + "reportSubType":"", + "reportCategory":"Loan", + "useReport":"false", + "description":"Just\nAn\nExample", + "reportSql":"select 'very good sql' as AComment", + "reportParameters":[{"id":"","parameterId":"5","reportParameterName":""},{"id":"","parameterId":"6","reportParameterName":""}] + } + + + { + "resourceId": 132 + } + +
+
+ +   +
+
+

List Reports

+

Lists all reports and their parameters.

+ +

Example Request:

+
reports
+
+
+ + GET https://DomainName/api/v1/reports + + + [ + { + "id": 1, + "reportName": "Client Listing", + "reportType": "Table", + "reportCategory": "Client", + "description": "Individual Client Report\r\n\r\nLists the small number of defined fields on the + client table. Would expect to copy this \n\nreport and add any \u0027one to one\u0027 additional + data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\u0027d expect it only to + be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, there is + probably is a limit of about 20/50k clients returned for html display (export to excel doesn\u0027t + \n\nhave that client browser/memory impact).", + "coreReport": true, + "useReport": true, + "reportParameters": [ + { + "id": 1, + "parameterId": 5, + "parameterName": "OfficeIdSelectOne" + } + ] + }, + { + "id": 2, + "reportName": "Client Loans Listing", + "reportType": "Table", + "reportCategory": "Client", + "description": "Individual Client Report\n\nPretty \n\nwide report that lists the basic details of + client loans. \n\nCan be run for any size MFI but you\u0027d expect it only to be run within a + branch for larger ones. \n\nThere is probably is a limit of about 20/50k clients returned for html + display (export to excel doesn\u0027t have that client browser/memory impact).", + "coreReport": false, + "useReport": true, + "reportParameters": [ + { + "id": 2, + "parameterId": 5, + "parameterName": "OfficeIdSelectOne" + }, + { + "id": 3, + "parameterId": 6, + "parameterName": "loanOfficerIdSelectAll" + }, + { + "id": 4, + "parameterId": 10, + "parameterName": "currencyIdSelectAll" + }, + { + "id": 5, + "parameterId": 20, + "parameterName": "fundIdSelectAll" + }, + { + "id": 6, + "parameterId": 25, + "parameterName": "loanProductIdSelectAll" + }, + { + "id": 7, + "parameterId": 26, + "parameterName": "loanPurposeIdSelectAll" + } + ] + },... + ] + +
+
+ + +   +
+
+

Retrieve a Report

+

Example Requests:

+
reports/1
+

+
reports/1?template=true
+
+
+ + GET https://DomainName/api/v1/reports/{id} + + + { + "id": 1, + "reportName": "Client Listing", + "reportType": "Table", + "reportCategory": "Client", + "description": "Individual Client Report\r\n\r\nLists the small number of defined fields on the + client table. Would expect to copy this \n\nreport and add any \u0027one to one\u0027 additional + data for specific tenant needs.\r\n\r\nCan be run for any size MFI but you\u0027d expect it only to + be run within a branch for \n\nlarger ones. Depending on how many columns are displayed, there is + probably is a limit of about 20/50k clients returned for html display (export to excel doesn\u0027t + \n\nhave that client browser/memory impact).", + "reportSql": "select \nconcat(repeat(\"..\", \n ((LENGTH(ounder.`hierarchy`) - + LENGTH(REPLACE(ounder.`hierarchy`, \u0027.\u0027, \u0027\u0027)) - 1))), ounder.`name`) as + \"Office/Branch\",\n c.account_no as \"Client Account No.\", \nc.display_name as \"Name\", + \nr.enum_message_property as \"Status\",\nc.activation_date as \"Activation\", c.external_id as + \"External Id\"\nfrom m_office o \njoin m_office ounder on ounder.hierarchy like concat(o.hierarchy, + \u0027%\u0027)\nand ounder.hierarchy like concat(\u0027${currentUserHierarchy}\u0027, + \u0027%\u0027)\njoin m_client c on c.office_id \u003d ounder.id\nleft join r_enum_value r on + r.enum_name \u003d \u0027status_enum\u0027 and r.enum_id \u003d c.status_enum\nwhere o.id \u003d + ${officeId}\norder by ounder.hierarchy, c.account_no", + "coreReport": true, + "useReport": true, + "reportParameters": [ + { + "id": 1, + "parameterId": 5, + "parameterName": "OfficeIdSelectOne" + } + ] + } + +
+
+ +   +
+
+

Update a Report

+

+ Only the useReport value can be updated for core reports. +

+
+
+ + PUT https://DomainName/api/v1/reports/{id} + + + PUT reports/129 + Content-Type: application/json + Request Body: + { + "reportName": "New rpt name", + "reportParameters": [ + { + "id": 194, + "parameterId": 5, + "reportParameterName": "m" + } + ] + } + + + { + "resourceId": 129, + "changes": { + "reportName": "New rpt name", + "reportParameters": "[{\"id\":194,\"parameterId\":5,\"reportParameterName\":\"m\"}]" + } + } + +
+
+ + +   +
+
+

Delete a Report

+

+ Only non-core reports can be deleted. +

+
+
+ + DELETE https://DomainName/api/v1/reports/{id} + + + DELETE reports/100 + Content-Type: application/json + Request Body: + {} + + + { + "resourceId": 100 + } + +
+
+ + +   +
+
+

Run Reports

+
+
+   +
+
+

Running a Report

+

This resource allows you to run and receive output from pre-defined Apache Fineract reports.

+

Reports can also be used to provide data for searching and workflow functionality.

+

+ The default output is a JSON formatted "Generic Resultset". The Generic Resultset contains + Column Heading as well as Data information. However, you can + export to CSV format by simply adding "&exportCSV=true" to the end + of your URL.

+

If Pentaho reports have been pre-defined, they can also be + run through this resource. Pentaho reports can return HTML, PDF or + CSV formats.

+

The Apache Fineract reference application uses a + JQuery plugin called stretchyreporting which, itself, uses this + reports resource to provide a pretty flexible reporting User + Interface (UI).

+
Arguments
+
+
R_'parameter names' ...
+
+ optional, No defaults +
+
The number and names of the parameters depend on the + specific report and how it has been configured. R_officeId is an + example parameter name. +
+
Note: the prefix R_ stands for Reporting
+
genericResultSet
+
+ optional, defaults to true +
+
If 'true' an optimised JSON format is returned suitable for tabular display of data. +
If 'false' a simple JSON format is returned. +
parameterType
+
+ optional, The only valid value is 'true'. If any + other value is provided the argument will be ignored +
+
Determines whether the request looks in the list of + reports or the list of parameters for its data. Doesn't apply to + Pentaho reports. +
+
exportCSV
+
+ optional, The only valid value is 'true'. If any + other value is provided the argument will be ignored +
+
Output will be delivered as a CSV file instead of JSON. + Doesn't apply to Pentaho reports. +
+
output-type
+
+ optional, Defaults to HTML. +
+
Valid Values are HTML, XLS, XSLX, CSV and PDF for html, Excel, Excel 2007+, + CSV and PDF formats respectively. +
+
Only applies to Pentaho reports.
+
locale
+
+ optional +
+
Any valid locale Ex: en_US, en_IN, fr_FR etc
+
Only applies to Pentaho reports.
+
+

Example Requests:

+
runreports/Client%20Listing?R_officeId=1
+
+
+
runreports/Client%20Listing?R_officeId=1&exportCSV=true
+
+
+
runreports/OfficeIdSelectOne?R_officeId=1&parameterType=true
+
+
+
runreports/OfficeIdSelectOne?R_officeId=1&parameterType=true&exportCSV=true
+
+
+
+ runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=HTML&R_officeId=1 +
+
+
+
+ runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=XLS&R_officeId=1 +
+
+
+
+ runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=CSV&R_officeId=1 +
+
+
+
+ runreports/Expected%20Payments%20By%20Date%20-%20Formatted?R_endDate=2013-04-30&R_loanOfficerId=-1&R_officeId=1&R_startDate=2013-04-16&output-type=PDF&R_officeId=1 +
+
+
+ + GET https://DomainName/api/v1/runreports/{reportName} + + + { + "columnHeaders": [ + { + "columnName": "Office/Branch", + "columnType": "VARCHAR", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "Client Account No.", + "columnType": "VARCHAR", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "Name", + "columnType": "VARCHAR", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "Joined", + "columnType": "DATE", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] + }, + { + "columnName": "External Id", + "columnType": "VARCHAR", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] + } + ], + "data": [ + { + "row": [ + "Head Office", + "000000001", + "Petra Yton", + "2009-03-04", + "786YYH7" + ] + }, + { + "row": [ + "Head Office", + "000000002", + "Keith(changed) Yton", + "2009-03-04", + null + ] + }, + { + "row": [ + "Head Office", + "000000003", + "Jorge lastname", + "2013-02-05", + null + ] + } + ] + } + +
+
+ + +   +
+
+

Report Mailing Jobs

+

This resource allows you to create a scheduled job that runs a report and sents it by email to + specified email addresses.

+

The scheduled job can be configured to run once or on a regular basis (once a day, twice a week, + etc).

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
name
The name of the report mailing job. It must be unique.
description
Optional: Description of the report mailing job.
startDateTime
Date and time to start the report mailing job.
stretchyReportId
The identifier of the stretchy report to be sent.
emailRecipients
Comma separated report recipient email addresses.
emailSubject
The subject of the email to be sent.
emailMessage
The body of the email to be sent.
emailAttachmentFileFormatId
The Enum constant id of the email attachment file format.
recurrence
Rule or repeating pattern for recurring events. See - http://www.kanzaki.com/docs/ical/rrule.html +
isActive
Indicates whether or not the scheduler should be created as active.
stretchyReportParamMap
Optional: A map of the stretchy report parameter names to values.
+
+
+ +   +
+
+

Retrieve Report Mailing Job Details Template

+

This is a convenience resource. It can be useful when + building maintenance user interface screens for report mailing job + applications. The template data returned consists of any or all + of: +

    +
  • Field Defaults
  • +
  • Allowed Value Lists
  • +
+

+

Example Request:

+
reportmailingjobs/template
+
+
+ + GET https://DomainName/api/v1/reportmailingjobs/template + + + { + "isActive": false, + "emailAttachmentFileFormatOptions": [ + { + "id": 1, + "code": "ReportMailingJobEmailAttachmentFileFormat.xls", + "value": "xls" + }, + { + "id": 2, + "code": "ReportMailingJobEmailAttachmentFileFormat.pdf", + "value": "pdf" + }, + { + "id": 3, + "code": "ReportMailingJobEmailAttachmentFileFormat.csv", + "value": "csv" + } + ], + "stretchyReportParamDateOptions": [ + { + "id": 1, + "code": "reportMailingJobStretchyReportParamDateOption.today", + "value": "today" + }, + { + "id": 2, + "code": "reportMailingJobStretchyReportParamDateOption.yesterday", + "value": "yesterday" + }, + { + "id": 3, + "code": "reportMailingJobStretchyReportParamDateOption.tomorrow", + "value": "tomorrow" + } + ] + } + +
+
+ +   +
+
+

Retrieve a Report Mailing Job

+

Example Requests:

+
reportmailingjobs/1
+
+
+
reportmailingjobs/1?template=true
+
+
+ + GET https://DomainName/api/v1/reportmailingjobs/{id} + + + { + "id": 1, + "name": "Client Numbers Report", + "description": "Client Numbers Report", + "startDateTime": 1469627093000, + "recurrence": "", + "timeline": { + "createdOnDate": [ + 2016, + 7, + 27 + ], + "createdByUsername": "musoni", + "createdByFirstname": "firstname", + "createdByLastname": "lastname" + }, + "emailRecipients": "info@musonisystem.com", + "emailSubject": "Client Numbers Report", + "emailMessage": "Client Numbers Report", + "emailAttachmentFileFormat": { + "id": 1, + "code": "ReportMailingJobEmailAttachmentFileFormat.xls", + "value": "xls" + }, + "stretchyReport": { + "id": 120, + "reportName": "Client Numbers Report", + "reportType": "Pentaho", + "reportCategory": "Client", + "description": "", + "coreReport": false, + "useReport": true + }, + "stretchyReportParamMap": + "{\"startDate\":\"2016-07-01\",\"endDate\":\"2016-08-02\",\"selectOffice\":\"1\",\"environementUrl\":\"environementUrl\"}", + "nextRunDateTime": 1469627093000, + "numberOfRuns": 0, + "isActive": true, + "runAsUserId": 1 + } + +
+
+ +   +
+
+

List Report Mailing Jobs

+

Example Requests:

+
reportmailingjobs
+
+
+ + GET https://DomainName/api/v1/reportmailingjobs + + + [ + { + "id": 1, + "name": "Client Numbers Report", + "description": "Client Numbers Report", + "startDateTime": 1469627093000, + "recurrence": "", + "timeline": { + "createdOnDate": [ + 2016, + 7, + 27 + ], + "createdByUsername": "musoni", + "createdByFirstname": "firstname", + "createdByLastname": "lastname" + }, + "emailRecipients": "info@musonisystem.com", + "emailSubject": "Client Numbers Report", + "emailMessage": "Client Numbers Report", + "emailAttachmentFileFormat": { + "id": 1, + "code": "ReportMailingJobEmailAttachmentFileFormat.xls", + "value": "xls" + }, + "stretchyReport": { + "id": 120, + "reportName": "Client Numbers Report", + "reportType": "Pentaho", + "reportCategory": "Client", + "description": "", + "coreReport": false, + "useReport": true + }, + "stretchyReportParamMap": + "{\"startDate\":\"2016-07-01\",\"endDate\":\"2016-08-02\",\"selectOffice\":\"1\",\"environementUrl\":\"environementUrl\"}", + "nextRunDateTime": 1469627093000, + "numberOfRuns": 0, + "isActive": true, + "runAsUserId": 1 + } + ] + +
+
+ +   +
+
+

List Report Mailing Job History

+

The list capability of report mailing job history can support pagination and + sorting.

+
Optional Arguments
+
+
offset
+
+ Integer optional, defaults to 0 +
+
Indicates the result from which pagination starts
+ +
limit
+
+ Integer optional, defaults to 200 +
+
Restricts the size of results returned. To override the default and return all entries you must + explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1 +
+ +
orderBy
+
+ String optional, one of startDateTime, endDateTime, status +
+
Orders results by the indicated field.
+ +
sortBy
+
+ String optional, one of ASC, DESC +
+
Indicates what way to order results if orderBy is used.
+
+

Example Requests:

+
reportmailingjobrunhistory/1
+
+
+ + GET https://DomainName/api/v1/reportmailingjobrunhistory/{reportMailingJobId} + + + [ + { + "id": 1, + "reportMailingJobId": 1, + "startDateTime": 1469627093000", + "endDateTime": 1469627093050, + "status": "success", + "errorMessage": "", + "errorLog": "" + } + ] + +
+
+ +   +
+
+

Create a Report Mailing Job

+ + + + + + + +
+
Mandatory Fields
+
name, startDateTime, stretchyReportId, emailRecipients, emailSubject, emailMessage, + emailAttachmentFileFormatId, recurrence, isActive +
+
+ + + + + + + +
+
Optional Fields
+
description, stretchyReportParamMap
+
+
+ + POST https://DomainName/api/v1/reportmailingjobs + + + POST reportmailingjobs + Content-Type: application/json Request Body: + { + "locale": "en_GB", + "dateFormat": "dd-MM-yyyy HH:mm:ss", + "name": "Client Numbers Report", + "description": "Client Numbers Report", + "startDateTime": "02-08-2016 11:34:18", + "stretchyReportId": "120", + "emailRecipients": "info@musonisystem.com", + "emailSubject": "Client Numbers Report", + "emailMessage": "Client Numbers Report", + "emailAttachmentFileFormatId": "1", + "recurrence": "FREQ=WEEKLY;INTERVAL=1;BYDAY=MO,WE,FR", + "isActive": true, + "stretchyReportParamMap": + "{\"startDate\":\"2016-07-01\",\"endDate\":\"2016-08-02\",\"selectOffice\":\"1\",\"environementUrl\":\"environementUrl\"}" + } + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

Update a Report Mailing Job

+
+
+ + PUT https://DomainName/api/v1/reportmailingjobs/{id} + + + PUT reportmailingjobs/1 + Content-Type: application/json + Request Body: + { + "locale": "en_GB", + "dateFormat": "dd-MM-yyyy HH:mm:ss", + "startDateTime": "10-08-2016 23:30:00" + } + + + + { + "resourceId": 1, + "changes": { + "startDateTime": "10-08-2016 23:30:00" + } + } + +
+
+ +   +
+
+

Delete a Report Mailing Job

+
+
+ + DELETE https://DomainName/api/v1/reportmailingjobs/{id} + + + DELETE reportmailingjobs/1 + Content-Type: application/json + + + { + "resourceId": 1 + } + +
+
+ + +   +
+
+

Authentication HTTP Basic

+

An API capability that allows client applications to verify + authentication details using HTTP Basic Authentication.

+ + + + + + + + + + + +
+
Field Descriptions
+
base64EncodedAuthenticationKey
HTTP Basic Auth key. See Authentication Overview for + an example of its use. +
+
+
+ +   +
+
+

Verify authentication

+

Authenticates the credentials provided and returns the set roles and permissions allowed.

+
+
+ + POST https://DomainName/api/v1/authentication + + + POST authentication + Content-Type: application/json + Request Body + { + "username": "mifos", + "password": "password" + } + +

Example response of autentication for user that is not linked with any staff.

+ + { + "username": "mifos", + "userId": 1, + "base64EncodedAuthenticationKey": "bWlmb3M6cGFzc3dvcmQ=", + "authenticated": true, + "officeId": 1, + "officeName": "Head Office", + "roles": [ + { + "id": 1, + "name": "Super user", + "description": "This role provides all application permissions." + } + ], + "permissions": [ + "ALL_FUNCTIONS" + ] + } + +

Example response of autentication for user that is linked with a staff member and role.

+ + { + "username": "mifos", + "userId": 1, + "base64EncodedAuthenticationKey": "bWlmb3M6cGFzc3dvcmQ=", + "authenticated": true, + "officeId": 1, + "officeName": "Head Office", + "staffId": 1, + "staffDisplayName": "Director, Program", + "organisationalRole": { + "id": 100, + "code": "staffOrganisationalRoleType.programDirector", + "value": "Program Director" + }, + "roles": [ + { + "id": 1, + "name": "Super user", + "description": "This role provides all application permissions." + } + ], + "permissions": [ + "ALL_FUNCTIONS" + ] + } + + + + + POST authentication?username=mifos&password=fail + Content-Type: application/json + No Request Body + + + { + "developerMessage": "Invalid authentication details were passed in api request.", + "developerDocLink": "https://github.com/openMF/mifosx/wiki/HTTP-API-Error-codes", + "httpStatusCode": "401", + "defaultUserMessage": "Unauthenticated. Please login.", + "userMessageGlobalisationCode": "error.msg.not.authenticated", + "errors": [] + } + +
+
+ +   +
+
+

Authentication Oauth2

+

An API capability that allows client applications to fetch current user details details using + Oauth2.

+
+
+ +   +
+
+

Fetch authenticated user details

+

checks the Authentication and returns the set roles and permissions allowed.

+
+
+ + GET https://DomainName/api/v1/userdetails + + + GET userdetails + Content-Type: application/json + No Request Body + +

Example response of authenticated user user that is not linked with any staff.

+ + { + "username": "mifos", + "userId": 1, + "accessToken": "bWlmb3M6cGFzc3dvcmQ=", + "authenticated": true, + "officeId": 1, + "officeName": "Head Office", + "roles": [ + { + "id": 1, + "name": "Super user", + "description": "This role provides all application permissions." + } + ], + "permissions": [ + "ALL_FUNCTIONS" + ] + } + +

Example response of authenticated user that is linked with a staff member and role.

+ + { + "username": "mifos", + "userId": 1, + "accessToken": "bWlmb3M6cGFzc3dvcmQ=", + "authenticated": true, + "officeId": 1, + "officeName": "Head Office", + "staffId": 1, + "staffDisplayName": "Director, Program", + "organisationalRole": { + "id": 100, + "code": "staffOrganisationalRoleType.programDirector", + "value": "Program Director" + }, + "roles": [ + { + "id": 1, + "name": "Super user", + "description": "This role provides all application permissions." + } + ], + "permissions": [ + "ALL_FUNCTIONS" + ] + } + + + +
+
+ + +   +
+
+

Users

+

An API capability to support administration of application users.

+
+
+ +   +
+
+

Retrieve list of users

+

Example Requests:

+
users
+
+
+
users?fields=id,username,email,officeName
+
+
+ + GET https://DomainName/api/v1/users + + + [ + { + "id": 1, + "username": "mifos", + "officeId": 1, + "officeName": "Head Office", + "firstname": "App", + "lastname": "Administrator", + "email": "demomfi@mifos.org", + "passwordNeverExpires": false, + "staff": { + "id": 1, + "firstname": "Test", + "lastname": "123", + "displayName": "123, Test", + "mobileNo": "12312312", + "officeId": 1, + "officeName": "Head Office", + "isLoanOfficer": true, + "isActive": true + } + "selectedRoles": [ + { + "id": 1, + "name": "Super user", + "description": "This role provides all application permissions." + } + ] + } + ] + +
+
+ +   +
+
+

Retrieve User Details Template

+

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:

+
users/template
+
+
+ + GET https://DomainName/api/v1/users/template + + + { + "allowedOffices": [ + { + "id": 1, + "name": "Head Office", + "nameDecorated": "Head Office" + } + ], + "availableRoles": [ + { + "id": 1, + "name": "Super user", + "description": "This role provides all application permissions." + }, + { + "id": 2, + "name": "Self Service User", + "description": "self service user role", + "disabled": false + } + ], + "selfServiceRoles": [ + { + "id": 2, + "name": "Self Service User", + "description": "self service user role", + "disabled": false + } + ] + } + +
+
+ +   +
+
+

Retrieve a User

+

Example Requests:

+
users/1
+
+
+
users/1?template=true
+
+
+
users/1?fields=username,officeName
+
+
+ + GET https://DomainName/api/v1/users/{userId} + + + { + "id": 1, + "username": "mifos", + "officeId": 1, + "officeName": "Head Office", + "firstname": "App", + "lastname": "Administrator", + "email": "demomfi@mifos.org", + "passwordNeverExpires": true, + "staff": { + "id": 1, + "firstname": "Test", + "lastname": "123", + "displayName": "123, Test", + "mobileNo": "12312312", + "officeId": 1, + "officeName": "Head Office", + "isLoanOfficer": true, + "isActive": true + } + "availableRoles": [], + "selectedRoles": [ + { + "id": 1, + "name": "Super user", + "description": "This role provides all application permissions." + } + ] + } + +
+
+ +   +
+
+

Create a User

+

Adds new application user.

+

+ Note: Password information is not required (or processed). + Password details at present are auto-generated and then sent to + the email account given (which is why it can take a few seconds to + complete). +

+ + + + + + + +
+
Mandatory Fields
+
username, firstname, lastname, email, officeId, roles, sendPasswordToEmail
+
+ + + + + + + +
+
Optional Fields
+
staffId,passwordNeverExpires,isSelfServiceUser,clients
+
+
+ + POST https://DomainName/api/v1/users + + + POST users + Content-Type: application/json + Request body: + { + "username": "newuser", + "firstname": "Test", + "lastname": "User", + "email": "whatever@mifos.org", + "officeId": 1, + "staffId": 1, + "roles": [2,3], + "sendPasswordToEmail": true + } + + + { + "officeId": 1, + "resourceId": 11 + } + + + POST users + Content-Type: application/json + Request body: + { + "username": "newuser", + "firstname": "Test", + "lastname": "User", + "email": "whatever@mifos.org", + "officeId": 1, + "staffId": 1, + "roles": [2,3], + "sendPasswordToEmail": false, + "password": "123", + "repeatPassword": "123" + } + + + { + "officeId": 1, + "resourceId": 12 + } + + + POST https://DomainName/api/v1/users + + + POST users + Content-Type: application/json + Request body: + { + "username": "newuser", + "firstname": "Test", + "lastname": "User", + "email": "whatever@mifos.org", + "officeId": 1, + "staffId": 1, + "roles": [2,3], + "sendPasswordToEmail": true, + "isSelfServiceUser": true, + "clients": [1,2,3] + } + + + { + "officeId": 1, + "resourceId": 11 + } + +
+
+ +   +
+
+

Change the password of a User

+

+ Note: When updating a password you must provide the + repeatPassword parameter also. +

+
+
+ + POST https://DomainName/api/v1/users/{userId)/pwd + + + POST users/3/pwd + Content-Type: application/json + Request body: + { + "password": "window75", + "repeatPassword": "window75" + } + + + { + "officeId": 1, + "resourceId": 3, + "changes": { + "passwordEncoded": "abc3326b1bb376351c7baeb4175f5e0504e33aadf6a158474a6d71de1befae51" + } + } + +
+
+ +   +
+
+

Update a User

+

+ Note: When updating a password you must provide the + repeatPassword parameter also. +

+
+
+ + PUT https://DomainName/api/v1/users/{userId) + + + PUT users/3 + Content-Type: application/json + Request body: + { + "firstname": "Test", + "password": "window75", + "repeatPassword": "window75" + } + + + { + "officeId": 1, + "resourceId": 3, + "changes": { + "firstname": "Test" + } + } + +
+
+ +   +
+
+

Delete a User

+

Removes the user and the associated roles and permissions.

+
+
+ + DELETE https://DomainName/api/v1/users/{userId} + + + DELETE users/20 + Content-Type: application/json + No Request Body + + + { + "officeId": 1, + "resourceId": 20, + "changes": {} + } + +
+
+ + + +   +
+
+

Roles

+

An API capability to support management of application roles for user administration.

+
+
+ +   +
+
+

List Roles

+

Example Requests:

+
roles
+
+
+
roles?fields=name
+
+
+ + GET https://DomainName/api/v1/roles + + + [ + { + "id": 1, + "name": "Super user", + "description": "This role provides all application permissions." + } + ] + +
+
+ + +   +
+
+

Delete a Role

+

Description : Delete the role in case role is not associated with any users.

+
+
+ + DELETE https://DomainName/api/v1/roles/{roleId} + + + DELETE roles/20 + Content-Type: application/json + No Request Body + + + { + "resourceId":1 + } + +
+
+ +   +
+
+

Retrieve a Role

+

Example Requests:

+
roles/1
+
+
+
roles/1?fields=name
+
+
+ + GET https://DomainName/api/v1/roles/{roleId} + + + { + "id": 1, + "name": "Super user", + "description": "This role provides all application permissions." + } + +
+
+ +   +
+
+

Create a New Role

+ + + + + + + +
+
Mandatory Fields
+
name, description
+
+
+ + POST https://DomainName/api/v1/roles + + + POST roles + Content-Type: application/json + Request body: + { + "name": "Another Role Name", + "description": "A description outlining the purpose of this role in relation to the application." + } + + { "resourceId": 2} +
+
+ +   +
+
+

Update a Role

+
+
+ + PUT https://DomainName/api/v1/roles/{roleId} + + + PUT roles/1 + Content-Type: application/json + Request body: + { + "description": "some description(changed)" + } + + + { + "resourceId": 1, + "changes": { + "description": "some description(changed)" + } + } + +
+
+ +   +
+
+

Retrieve a Role's Permissions

+

Example Requests:

+
roles/1/permissions
+
+
+ + GET https://DomainName/api/v1/roles/{roleId}/permissions + + + { + "id": 1, + "name": "Super user", + "description": "This role provides all application permissions.", + "permissionUsageData": [ + { + "grouping": "authorisation", + "code": "READ_PERMISSION", + "entityName": "PERMISSION", + "actionName": "READ", + "selected": false + }, + ... + { + "grouping": "transaction_loan", + "code": "WRITEOFF_LOAN_CHECKER", + "entityName": "LOAN", + "actionName": "WRITEOFF", + "selected": false + } + ] + } + +
+
+ +   +
+
+

Enable Role

+

Description : Enable role in case role is disabled.

+
+
+ + POST https://DomainName/api/v1/roles/{roleId}?command=enable + + + POST roles/1?command=enable + Content-Type: application/json + No Request Body + + + { + "resourceId":1 + } + +
+
+ +   +
+
+

Disable Role

+

Description : Disable the role in case role is not associated with any users.

+
+
+ + POST https://DomainName/api/v1/roles/{roleId}?command=disable + + + POST roles/1?command=disable + Content-Type: application/json + No Request Body + + + { + "resourceId":1 + } + +
+
+ +   +
+
+

Update a Role's Permissions

+
+
+ + PUT https://DomainName/api/v1/roles/{roleId}/permissions + + + PUT roles/8 + Content-Type: application/json + Request body: + { + "permissions": { + "ALL_FUNCTIONS_READ": "true" + } + } + + + { + "resourceId": 8, + "changes": { + "permissions": { + "ALL_FUNCTIONS_READ": true + } + } + } + +
+
+ + +   +
+
+

Permissions

+

An API capability to support management of application permissions for user administration.

+

There is no Apache Fineract functionality for creating or deleting permissions. Permissions come + pre-installed.

+

Permissions are not updated, except in the case of enabling or disabling non-read transactions for + Maker Checker functionality

+
+
+ +   +
+
+

List Application Permissions

+
Arguments
+
+
makerCheckerable
+
optional, + Values are true, false. Default is false. +

If makerCheckerable=false or not supplied then a list of application permissions is returned. + The "selected" + attribute is always true in this case. +

+

If makerCheckerable=true then the "selected" attribute shows whether the permission is + enabled for Maker Check functionality. +

+

+ Note: Each Apache Fineract transaction is associated with a permission. +

+
+
+

Example Requests:

+
permissions
+

+
permissions?makerCheckerable=true
+

+
permissions?fields=grouping,code
+
+
+ + GET https://DomainName/api/v1/permissions + + + [ + { + "grouping": "authorisation", + "code": "READ_PERMISSION", + "entityName": "PERMISSION", + "actionName": "READ", + "selected": true + }, + .... + { + "grouping": "transaction_loan", + "code": "WRITEOFF_LOAN", + "entityName": "LOAN", + "actionName": "WRITEOFF", + "selected": true + } + ] + +
+
+ +   +
+
+

Enable/Disable Permissions for Maker Checker

+
+
+ + PUT https://DomainName/api/v1/permissions + + + PUT permissions + Content-Type: application/json + Request Body: + { + "permissions":{ + "CREATE_GUARANTOR":true, + "CREATE_CLIENT":true + } + } + +
+
+ + +   +
+
+

Password preferences

+

This API enables management of password policy for user administration.

+

There is no Apache Fineract functionality for creating a validation policy. The validation policies + come pre-installed.

+

Validation policies may be updated

+
+
+ +   +
+
+

List Application Password validation policies

+
Arguments
+
+ + +
+

Example Requests:

+
passwordpreferences
+

+
+
+ + GET https://DomainName/api/v1/passwordpreferences/template + + + [ + { + "id": 1, + "description": "Password must be at least 1 character and not more that 50 characters long", + "active": true, + "key" : "simple" + }, + { + "id": 2, + "description": "Password must be at least 6 characters, no more than 50 characters long, must + include at least one upper case letter, one lower case letter, one numeric digit and no space", + "active": false, + "key" : "secure" + } + ] + +
+ +
+ + GET https://DomainName/api/v1/passwordpreferences/ + + + { + "id": 1, + "description": "Password most be at least 1 character and not more that 50 characters long", + "active": true, + "key" : "simple" + } + +
+
+ +   +
+
+

Update password preferences

+
+
+ + PUT https://DomainName/api/v1/passwordpreferences/ + + + PUT passwordpreferences + Content-Type: application/json + Request Body: + { + "validationPolicyId" : 1, + } + +
+
+ +   +
+
+

General Ledger Account

+

Ledger accounts represent an Individual account within an Organizations Chart + Of Accounts(COA) and are assigned a name and unique number by which they can + be identified.
+ All transactions relating to a company's assets, liabilities, owners' equity, + revenue and expenses are recorded against these accounts +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
name
The name of the account
glCode
The ledger code associated with the + Account
These codes are mandatory and should be unique within + an organization +
disabled
A boolean flag that indicates whether an account + is currently in use +
type
Classifies the account into one of the following Types +
Asset: represent the different types of economic resources + owned or controlled by business, common examples of Asset accounts are cash, + cash in bank, building, inventory, prepaid rent, goodwill, accounts receivable
+ Liability: represent the different types of economic obligations + by a business, such as accounts payable, bank loan, bonds payable
+ Income: represent the company's gross earnings and common examples + include Interest Income, Sales and Service revenue
+ Expense: represent the company's expenditures to enable itself to + operate. Common examples are electricity and water, rentals, depreciation, + doubtful accounts, insurance.
+ Equity: represent the residual equity of a business (after + deducting from Assets all the liabilities) including Retained Earnings + and Appropriations

+ The options are fully listed in Retrieve + General Ledger Accounts Template. +
usage
Determines how the account shall be used
+ "Header" accounts specify the title of a group of accounts. They are used + only for grouping together detail accounts that have a similar purpose; that is, detail + accounts + are assigned to specific header accounts +
+ "Detail" accounts may have transactions logged against them

+ The options are fully listed in Retrieve + General Ledger Accounts Template. +
manualEntriesAllowed
Specifies if manual entries can be made + against this account using the + Create Journal Entries API
description
Human understandable description for the Ledger Account +
parentId
To assign a parent for this GLAccount +
tagId
Used for tagging the Account Heads, based on GLAccount types. +
+
+
+ +   +
+
+

List General Ledger Accounts

+
Arguments
+
+
type
+
+ Integer optional +
+
manualEntriesAllowed
+
+ boolean optional +
+
usage
+
+ Integer optional +
+
disabled
+
+ boolean optional +
+
parentId
+
+ Long optional +
+
tagId
+
+ Long optional +
+
+

Example Requests:

+
glaccounts
+
+
+
glaccounts?type=1&manualEntriesAllowed=true&usage=1&disabled=false
+
+
glaccounts?fetchRunningBalance=true
+
+
+ + GET https://DomainName/api/v1/glaccounts + + + [ + { + "id": 16, + "name": "Cash", + "parentId": 1, + "glCode": "100001", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "description": "Desc", + "nameDecorated": "....Cash", + "tagId": { + "id": 10, + "name": "asset tag" + }, + "organizationRunningBalance": 118437, + }, + { + "id": 15, + "name": "Fund Source For Loan", + "glCode": "100002", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "description": "Desc", + "organizationRunningBalance": 118437, + } + ] + +
+
+ +   +
+
+

Retrieve GL Accounts Template

+

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:

+
glaccounts/template
+
glaccounts/template?type=1
+
+ type is optional and integer value from 1 to 5.
+


1.Assets +
2.Liabilities +
3.Equity +
4.Income +
5.Expenses

+
+
+ + GET https://DomainName/api/v1/glaccounts/template
+ GET https://DomainName/api/v1/glaccounts/template?type=1 +
+ + { + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "accountTypeOptions": [ + { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + { + "id": 2, + "code": "accountType.liability", + "value": "LIABILITY" + }, + { + "id": 3, + "code": "accountType.equity", + "value": "EQUITY" + }, + { + "id": 4, + "code": "accountType.income", + "value": "INCOME" + }, + { + "id": 5, + "code": "accountType.expense", + "value": "EXPENSE" + } + ], + "usageOptions": [ + { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + { + "id": 2, + "code": "accountUsage.header", + "value": "HEADER" + } + ], + "assetHeaderAccountOptions": [ + { + "id": 1, + "name": "Two wheeler loan", + "glCode": "10001", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 2, + "code": "accountUsage.header", + "value": "HEADER" + }, + "nameDecorated": "Two wheeler loan", + "tagId": { + "id": 10, + "name": "asset tag" + } + }, + { + "id": 2, + "name": "VEHICLE LOAN", + "parentId": 1, + "glCode": "10002", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 2, + "code": "accountUsage.header", + "value": "HEADER" + }, + "nameDecorated": "....VEHICLE LOAN", + "tagId": { + "id": 10, + "name": "asset tag" + } + } + ], + "liabilityHeaderAccountOptions": [ + { + "id": 15, + "name": "liabilitieschild", + "glCode": "ltchild", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 2, + "code": "accountType.liability", + "value": "LIABILITY" + }, + "usage": { + "id": 2, + "code": "accountUsage.header", + "value": "HEADER" + }, + "nameDecorated": "liabilitieschild", + "tagId": { + "id": 11, + "name": "liability tag" + } + } + ], + "equityHeaderAccountOptions": [ + { + "id": 13, + "name": "testajax", + "glCode": "12345678", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 3, + "code": "accountType.equity", + "value": "EQUITY" + }, + "usage": { + "id": 2, + "code": "accountUsage.header", + "value": "HEADER" + }, + "nameDecorated": "testajax", + "tagId": { + "id": 12, + "name": "Equity tag" + } + } + ], + "expenseHeaderAccountOptions": [ + { + "id": 8, + "name": "Salary", + "glCode": "450098", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 5, + "code": "accountType.expense", + "value": "EXPENSE" + }, + "usage": { + "id": 2, + "code": "accountUsage.header", + "value": "HEADER" + }, + "nameDecorated": "Salary", + "tagId": { + "id": 14, + "name": "Expenses Tag" + } + } + ], + "allowedAssetsTagOptions": [ + { + "id": 10, + "name": "asset tag", + "position": 0 + } + ], + "allowedLiabilitiesTagOptions": [ + { + "id": 11, + "name": "liability tag", + "position": 0 + } + ], + "allowedEquityTagOptions": [ + { + "id": 12, + "name": "Equity tag", + "position": 0 + } + ], + "allowedIncomeTagOptions": [ + { + "id": 13, + "name": "Income Tag", + "position": 0 + } + ], + "allowedExpensesTagOptions": [ + { + "id": 14, + "name": "Expenses Tag", + "position": 0 + } + ] + } + +
+
+ + +   +
+
+

Retrieve a General Ledger Account

+

Example Requests:

+
glaccounts/1
+
+
+
glaccounts/1?template=true
+
+
+
glaccounts/1?fields=name,glCode
+
+
+
glaccounts/1?fetchRunningBalance=true
+
+
+ + GET https://DomainName/api/v1/glaccounts/{glaccountsId} + + + { + "id": 1, + "name": "Cash", + "glCode": "100001", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset1", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "description": "Desc", + "organizationRunningBalance": 118437, + } + +
+
+ +   +
+
+

Create a General Ledger Account

+

+ Note: You may optionally + create Hierarchical Chart of Accounts by using the "parentId" + property of an Account
+

+ + + + + + + +
+
Mandatory Fields
+
name, glCode, type, usage and manualEntriesAllowed +
+
+
+ + POST https://DomainName/api/v1/glaccounts + + + POST glaccounts + Content-Type: application/json + Request Body: + { + "name": "Cash at Bangalore", + "glCode": "100017", + "manualEntriesAllowed": true, + "type": 1, + "tagId": "10", + "parentId": "18", + "usage": 1, + "description": "Cash at Bangalore Branch" + } + + + { + "resourceId": 22 + } + +
+
+ +   +
+
+

Update a General Ledger Account

+
+
+ + PUT https://DomainName/api/v1/glaccounts/{glaccountId} + + + PUT glaccounts/22 + Content-Type: application/json + Request Body: + { + "name": "Cash at Bangalore rural" + } + + + { + "resourceId": 22, + "changes": { + "name": "Cash at Bangalore rural" + } + } + +
+
+ + PUT glaccounts/1 + Content-Type: application/json + Request Body: + { + "disabled": true + } + + + { + "resourceId": 1, + "changes": { + "disabled": true + } + } + +
+
+ +   +
+
+

Delete a General Ledger Account

+

+ Note: Only Ledger Accounts against which no transactions have been logged + (either manually or by the loan or Savings portfolio) can be deleted. +

+
+
+ + DELETE https://DomainName/api/v1/glaccounts/{glaccountId} + + + DELETE glaccounts/1 + Content-Type: application/json + No Request Body: + + + { + "resourceId": 1, + "changes": {} + } + +
+
+ +   +
+
+

Accounting Closure

+

An accounting closure indicates that no more journal + entries may be logged (or reversed) in the system, + either manually or via the portfolio with an entry date + prior to the defined closure date +

+ + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
closingDate
The date for which the + accounting closure is defined +
officeId
The identifer of the branch for + which accounting has been closed +
comments
Description associated with an + Accounting closure +
+
+
+ +   +
+
+

List Accounting closures

+

Example Requests:

+
glclosures
+
+
+
+
+ + GET https://DomainName/api/v1/glclosures + + + [ + { + "id": 7, + "officeId": 1, + "officeName": "Head Office", + "closingDate": [ + 2013, + 1, + 2 + ], + "deleted": false, + "createdDate": [ + 2013, + 1, + 3 + ], + "lastUpdatedDate": [ + 2013, + 1, + 3 + ], + "createdByUserId": 1, + "createdByUsername": "mifos", + "lastUpdatedByUserId": 1, + "lastUpdatedByUsername": "mifos", + "comments": "closed", + }, + { + "id": 6, + "officeId": 1, + "officeName": "Head Office", + "closingDate": [ + 2012, + 12, + 13 + ], + "deleted": false, + "createdDate": [ + 2012, + 12, + 14 + ], + "lastUpdatedDate": [ + 2012, + 12, + 14 + ], + "createdByUserId": 1, + "createdByUsername": "mifos", + "lastUpdatedByUserId": 1, + "lastUpdatedByUsername": "mifos", + "comments": "hello", + } + ] + +
+
+ +   +
+
+

Retrieve an Accounting Closure

+

Example Requests:

+
glclosures/1
+
+
+
/glclosures/1?fields=officeName,closingDate
+
+
+ + GET https://DomainName/api/v1/glclosures/{glclosureId} + + + { + "id": 7, + "officeId": 1, + "officeName": "Head Office", + "closingDate": [ + 2013, + 1, + 2 + ], + "deleted": false, + "createdDate": [ + 2013, + 1, + 3 + ], + "lastUpdatedDate": [ + 2013, + 1, + 3 + ], + "createdByUserId": 1, + "createdByUsername": "mifos", + "lastUpdatedByUserId": 1, + "lastUpdatedByUsername": "mifos", + "comments": "closed", + } + +
+
+ +   +
+
+

Create an Accounting Closure

+ + + + + + + +
+
Mandatory Fields
+
officeId,closingDate +
+
+
+ + POST https://DomainName/api/v1/glclosures + + + POST glclosures + Content-Type: application/json + Request Body: + { + "officeId": 1, + "closingDate": "06 December 2012", + "comments": "The accountants are heading for a carribean vacation", + "locale": "en" , + "dateFormat": "dd MMMM yyyy" + } + + + { + "officeId": 1, + "resourceId": 9 + } + +
+
+ +   +
+
+

Update an Accounting closure

+

Once an accounting closure is created, only the comments associated with it may be edited +

+
+
+ + PUT https://DomainName/api/v1/glclosures/{glclosureId} + + + PUT glclosures/1 + Content-Type: application/json + Request Body: + { + "comments": "All transactions verified by Johnny Cash" + } + + + { + "officeId": 1, + "resourceId": 1, + "changes": { + "comments": "All transactions verified by Johnny Cash" + } + } + +
+
+ +   +
+
+

Delete an accounting closure

+

+ Note: Only the latest accounting closure + associated with a branch may be deleted. +

+
+
+ + DELETE https://DomainName/api/v1/glclosures/{glclosureId} + + + DELETE glclosures/1 + Content-Type: application/json + No Request Body: + + + { + "officeId": 1, + "resourceId": 1 + } + +
+
+ +   +
+
+

Journal Entries

+

A journal entry refers to the logging of + transactions against general ledger accounts. A journal + entry may consist of several line items, each of which is either a "debit" or a "credit". The total + amount of the + debits must equal the total amount of the credits or the + journal entry is said to be "unbalanced"

+ A journal entry directly changes the account balances on + the general ledger +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
officeId
The identifier of the office ( + cost center) at which the financial activity + occured +
currencyCode
A three letter ISO code of currency.
glAccountId
The identifier of the account ( + Ledger Account) against which this journal entry + was made +
transactionDate
The target date for which this + entry was recorded +
amount
The Monetary amount associated + with this entry +
comments
A description associated with + this entry +
entryType
Either a Credit(1) or a Debit(2)
transactionId
A unique Identifier for a set + of related Credit and Debit entries that make up + a "balanced" jounral Entry. For a manual entry, + this feild is a unique string.
+ For a system generated entry, the combination + of transactionId and entityId is unique +
manualEntry
Flag determines if an entry is + generated by the portfolio (posted automatically by + the system during the lifecycle of loan or saving + products) or manually created by using the Create (Balanced) Journal + Entries API +
reversed
Flag determines if this manual + journal entry has been reversed using the Reverse a Journal Entry + API.
+ Note: A journal entry is reversed by logging debits + for all credits that make up the Journal entry and + vice-versa +
referenceNumber
An additional field that is used to store additional information about the + entry (Ex: chequeNo) +
accountingRule
Denotes the accounting rule id for posting journal entries. +
officeRunningBalance
Describes office balance after the journal entry for the Ledger Account. +
organizationRunningBalance
Describes complete organization balances after the journal entry for the + Ledger Account. +
runningBalanceComputed
Describes whether account balances computed for the journal entry. +
transactionDetails
Additional details of transaction like payment details and notes . +
paymentTypeId
Maps to a Code value of a system + defined Code with the name "PaymentType". This is used to optionally identify + the mode of payment (Ex: checks, Cash etc) associated with a Journal Entry +
accountNumber, checkNumber, routingCode, receiptNumber, bankNumber
Various properties associated with a payment type +
+
+
+ +   +
+
+

List Journal Entries

+

The list capability of journal entries can support pagination and sorting.

+
Optional Arguments
+
+
offset
+
+ Integer optional, defaults to 0 +
+
Indicates from what result to start from.
+ +
limit
+
+ Integer optional, defaults to 200 +
+
Restricts the size of results returned. To override the default and return all entries you must + explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1 +
+ +
orderBy
+
+ String optional, one of displayName, accountNo, officeId, officeName +
+
Orders the results by the field indicated.
+ +
sortBy
+
+ String optional, one of ASC, DESC +
+
Indicates what way to order results if orderBy is used.
+ +
officeId
+
+ Integer optional +
+
Provides ability to restrict list of centers returned based on the office there associated + with. +
+ +
glAccountId
+
+ Integer optional +
+
manualEntriesOnly
+
+ Boolean optional +
+
Flag determines if only manually created journal entries + are to be returned( journal entries created by + the system during lifecycle of loan or saving + products etc shall be excluded) +
+ Set to "false" by default if not passed in explicity +
+
fromDate
+
+ Dateoptional +
+
Filters for Journal entries whose entry Date + is greater than or equal to the passed in Date +
+
toDate
+
+ Date optional +
+
Filters for Journal entries whose entry Date + is lesser than or equal to the passed in Date +
+
transactionId
+
+ String optional +
+
transactionDetails
+
+ Boolean optional +
+
Flag determines if additional transactional details + to be returned(like payment details and notes). +
+
runningBalance
+
+ Boolean optional +
+
Flag determines whether running balances + to be returned +
+
loanId
+
+ Integer optional +
+
Provides ability to restrict journal entries based on the loan they are associated with +
+
savingsId
+
+ Integer optional +
+
Provides ability to restrict journal entries based on the savings account they are associated + with +
+
+

Example Requests:

+
journalentries
+
+
journalentries?transactionId=PB37X8Y21EQUY4S
+
+
journalentries?officeId=1&manualEntriesOnly=true&fromDate=1 July 2013&toDate=15 July + 2013&dateFormat=dd MMMM yyyy&locale=en
+
+
journalentries?fields=officeName,glAccountName,transactionDate
+
+
journalentries?offset=10&limit=50
+
+
journalentries?orderBy=transactionId&sortOrder=DESC
+
+
journalentries?runningBalance=true
+
+
journalentries?transactionDetails=true
+
+
journalentries?loanId=12
+
+
journalentries?savingsId=24
+
+
+ + GET https://DomainName/api/v1/journalentries?transactionId=PB37X8Y21EQUY4S + + + { + "totalFilteredRecords": 24, + "pageItems": [ + { + "id": 1, + "officeId": 1, + "officeName": "Head Office", + "glAccountName": "ACCOUNT_NAME_WTYRB", + "glAccountId": 98, + "glAccountCode": "ASSET_C01367768735188", + "glAccountType": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "transactionDate": [ + 2011, + 3, + 4 + ], + "entryType": { + "id": 2, + "code": "journalEntrytType.debit", + "value": "DEBIT" + }, + "amount": 10000, + "transactionId": "33", + "manualEntry": false, + "entityType": { + "id": 1, + "code": "productType.loan", + "value": "LOAN" + }, + "entityId": 7, + "createdByUserId": 1, + "createdDate": [ + 2013, + 5, + 5 + ], + "createdByUserName": "mifos", + "reversed": false, + }, + { + "id": 2, + "officeId": 1, + "officeName": "Head Office", + "glAccountName": "ACCOUNT_NAME_WTYRB", + "glAccountId": 98, + "glAccountCode": "ASSET_C01367768735188", + "glAccountType": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "transactionDate": [ + 2011, + 3, + 4 + ], + "entryType": { + "id": 1, + "code": "journalEntryType.credit", + "value": "CREDIT" + }, + "amount": 10000, + "transactionId": "33", + "manualEntry": false, + "entityType": { + "id": 1, + "code": "productType.loan", + "value": "LOAN" + }, + "entityId": 7, + "createdByUserId": 1, + "createdDate": [ + 2013, + 5, + 5 + ], + "createdByUserName": "mifos", + "reversed": false, + + } + ] + } + +
+
+ +   +
+
+

Create "Balanced" Journal Entries

+

+ Note: A Balanced (simple) Journal entry would + have atleast one "Debit" and one "Credit" entry whose + amounts are equal
+ Compound Journal entries may have "n" debits and "m" + credits where both "m" and "n" are greater than 0 + and the net sum or all debits and credits are equal +
+

+ + + + + + + + + + + + + + + + + + + + + + +
+
Mandatory Fields
+
officeId, transactionDate +
credits
Details of the credits contained + in the journal entry. Each credit entry contains + the following items
+ glAccountId: Identifier of the general ledger + account against which the credit entry shall be + made
+ amount: Amount of money credited +
+ comments: Optional description associated with + a credit entry + . +
debits
Details of the debits contained + in the journal entry. Each debit entry contains the + following items
+ glAccountId: Identifier of the general ledger account + against which the debit entry shall be + made
+ amount: Amount of money debited +
+ comments: Optional description associated with + a debit entry + . +
+
+ + + + + + + +
+
Optional Fields
+
paymentTypeId, accountNumber, checkNumber, routingCode, receiptNumber, bankNumber
+
+
+ + POST https://DomainName/api/v1/journalentries + + + POST journalentries + Content-Type: application/json + Request Body: + { + "officeId": 1, + "transactionDate": "06 December 2012", + "comments": "Gifts for staff", + "locale": "en" , + "currencyCode": "USD", + "dateFormat": "dd MMMM yyyy", + "credits":[{"glAccountId":1, + "amount":5000}, + {"glAccountId":2, + "amount":5000} + ], + "debits":[{"glAccountId":3, + "amount":5000}, + {"glAccountId":4, + "amount":5000} + ], + "paymentTypeId": "12", + "accountNumber": "accno123", + "checkNumber": "chec123", + "routingCode": "rou123", + "receiptNumber": "rec123", + "bankNumber": "ban123" + } + + + { + "officeId": 1, + "transactionId": "DNEEMS2LPD0NJ9O" + } + + + POST https://DomainName/api/v1/journalentries + + + POST journalentries + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "officeId": "1", + "transactionDate": "23 May 2013", + "referenceNumber": "547", + "currencyCode": "USD", + "comments": "asdf", + "accountingRule": "2", + "amount": "547" + } + + + { + "officeId":1, + "transactionId":"RS9MCISID4WK1ZM" + } + + + POST https://DomainName/api/v1/journalentries + + + POST journalentries + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "officeId": "1", + "transactionDate": "23 May 2013", + "referenceNumber": "547", + "comments": "asdf", + "accountingRule": "2", + "credits":[{"glAccountId":1, + "amount":5000}, + {"glAccountId":2, + "amount":5000} + ], + "debits":[{"glAccountId":3, + "amount":5000}, + {"glAccountId":4, + "amount":5000} + ] + } + + + { + "officeId":1, + "transactionId":"RS9MCISID4WK1ZM" + } + + + POST https://DomainName/api/v1/journalentries + + + POST journalentries + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "officeId": "1", + "transactionDate": "23 May 2013", + "referenceNumber": "547", + "comments": "asdf", + "accountingRule": "3", + "credits":[{"glAccountId":1, + "amount":5000}, + {"glAccountId":2, + "amount":5000} + ], + "amount": "10000" + } + + + { + "officeId":1, + "transactionId":"RS9MCISID4WK1ZM" + } + +
+
+ +   +
+
+

Update Running balances for Journal Entries

+

+ This API calculates the running balances for office. If office ID not provided this API calculates + running balances for all offices. +
+

+ + + + + + + +
+
Mandatory Fields
+
officeId +
+
+
+ + POST https://DomainName/api/v1/journalentries?command=updateRunningBalance + + + POST journalentries?command=updateRunningBalance + Content-Type: application/json + Request Body: + { + "officeId": 1, + } + + + { + "officeId": 1, + } + + +
+
+ + +   +
+
+

Retrieve a single Entry

+

Example Requests:

+
journalentries/1
+
+
+
+
journalentries/1?fields=officeName,glAccountId,entryType,amount
+
+
journalentries/1?runningBalance=true
+
+
journalentries/1?transactionDetails=true
+
+
+ + GET https://DomainName/api/v1/journalentries/{entryId} + + + { + "id": 1, + "officeId": 2, + "officeName": "sub branch 1", + "glAccountName": "Income from interest", + "glAccountId": 14, + "glAccountCode": "400001", + "glAccountType": { + "id": 4, + "code": "accountType.income", + "value": "INCOME" + }, + "transactionDate": [ + 2012, + 11, + 2 + ], + "entryType": { + "id": 1, + "code": "journalEntryType.credit", + "value": "CREDIT" + }, + "amount": 900, + "transactionId": "13", + "manualEntry": true, + "createdByUserId": 1, + "createdDate": [ + 2012, + 11, + 2 + ], + "createdByUserName": "mifos", + "reversed": false, + } + +
+
+ +   +
+
+

Reverse a Journal Entry

+

+ Note: A journal entry is reversed by logging debits + for all credits that constitute the Journal entry and + vice-versa. The transactionId of the "reversal Entry" is returned + as the methods response +

+
Arguments
+
+
command
+
+ String Mandatory, case-insensitive +
+
'reverse' : Reverse the Journal Entry
+
+
Optional Arguments
+
+
comments
+
+ String optional +
+
Optional string to be applied as a comment for the created reversal entry, + default comment is used if this field is not supplied +
+
+
+
+ + GET https://DomainName/api/v1/journalentries/{transactionId}?command=reverse + + + POST journalentries/C1MAE935K0IAEYA?command=reverse + Content-Type: application/json + + + { + "transactionId": "YFDYMPBVVI9TRJP" + } + +
+
+ + + +   +
+
+

Mapping Financial Activities to Accounts

+

+ Organization Level Financial Activities like Asset and Liability Transfer can be mapped to GL + Account. Integrated accounting takes these accounts into consideration when an Account transfer is + made between a savings to loan/savings account and vice-versa +

+ + + + + + + + + + + + + + + + +
+
Field Descriptions
+
financialActivityId
The identifier of the Financial Activity +
glAccountId
The identifier of a GL Account ( + Ledger Account) which shall be used as the default account for the selected Financial + Activity +
+
+
+ +   +
+
+

List Financial Activities to Accounts Mappings

+

Example Requests:

+
financialactivityaccounts
+
+
+ + GET https://DomainName/api/v1/financialactivityaccounts + + + + [ + { + "id": 1, + "financialActivityData": { + "id": 200, + "name": "liabilityTransfer", + "mappedGLAccountType": "LIABILITY" + }, + "glAccountData": { + "id": 55, + "name": "Liability Transfer (Temp)", + "glCode": "220004-Temp" + } + }, + { + "id": 2, + "financialActivityData": { + "id": 100, + "name": "assetTransfer", + "mappedGLAccountType": "ASSET" + }, + "glAccountData": { + "id": 33, + "name": "Petty Cash", + "glCode": "20302" + } + } + ] + +
+
+ +   +
+
+

Create a new Financial Activity to Accounts Mapping

+ + + + + + + + +
+
Mandatory Fields
+
financialActivityId, glAccountId +
+
+ +
+
+ + POST https://DomainName/api/v1/financialactivityaccounts + + + POST financialactivityaccounts + Content-Type: application/json + Request Body: + { + "financialActivityId": 200, + "glAccountId":2 + } + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

Update a Financial Activity to Account Mapping

+

+ the API updates the Ledger account linked to a Financial Activity +
+

+ +
+
+ + PUT https://DomainName/api/v1/financialactivityaccounts/{financialactivityaccountId} + + + PUT financialactivityaccounts + Content-Type: application/json + Request Body: + { + "financialActivityId": 200, + "glAccountId":3 + } + + + { + "resourceId": 2, + "changes": { + "glAccountId": 3 + } + } + + +
+
+ + +   +
+
+

Retrieve a Financial Activity to Account Mapping

+

Example Requests:

+
financialactivityaccounts/1
+
+
+
+ + GET https://DomainName/api/v1/financialactivityaccounts/{financialactivityaccountId} + + + { + "id": 1, + "financialActivityData": { + "id": 200, + "name": "liabilityTransfer", + "mappedGLAccountType": "LIABILITY" + }, + "glAccountData": { + "id": 55, + "name": "Liability Transfer (Temp)", + "glCode": "220004-Temp" + } + } + +
+
+ +   +
+
+

Delete a Financial Activity to Account Mapping

+
+
+ + DELETE https://DomainName/api/v1/financialactivityaccounts/{financialactivityaccountId} + + + DELETE financialactivityaccounts/1? + Content-Type: application/json + + + { + "resourceId": "2" + } + +
+
+ + + + +   +
+
+

Periodic Accrual Accounting

+

+ Periodic Accrual is to accrue the loan income till the specific date or till batch job scheduled + time. +

+ + + + + + + + + + + +
+
Field Descriptions
+
tillDate
which specifies periodic accruals should happen till the given Date +
+
+
+ + +   +
+
+

Executes Periodic Accrual Accounting

+ + + + + + + + +
+
Mandatory Fields
+
tillDate +
+
+ +
+
+ + POST https://DomainName/api/v1/runaccruals + + + POST financialactivityaccounts + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "tillDate":"04 June 2014" + } + + + +
+
+ + +   +
+
+

Provisioning Entries

+

This defines the Provisioning Entries for all active loan products + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
date
Date on which day provisioning entries should be created +
createjournalentries
+ Boolean variable whether to add journal entries for generated provisioning entries +
+

+
+ +   +
+
+

Create new Provisioning Entries

+

Creates a new Provisioning Entries

+ + + + + + + + + + + + + +
+
Mandatory Fields
+
date
dateFormat
locale
+ + + + + + + +
+
Optional Fields
+
createjournalentries
+
+
+ + POST https://DomainName/api/v1/provisioningentries + + + POST provisioningentries + Content-Type: application/json + Request Body: + { + "date":"16 October 2015", + "locale":"en", + "dateFormat":"dd MMMM yyyy", + "createjournalentries":true + } + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

List all Provisioning Entries

+

List all Provisioning Entries

+ +
+
+ + GET https://DomainName/api/v1/provisioningentries + + + GET provisioningentries + Content-Type: application/json + Request Body: + { + + } + + + {[ + {"id":1, "journalEntry":true, "createdUser":"mifos", "createdDate":"16 October 2014"}, + {"id":2, "journalEntry":true, "createdUser":"mifos", "createdDate":"16 October 2015"} + ] + } + +
+
+ +   +
+
+

Retrieves a Provisioning Entry

+

Returns the details of a generated Provisioning Entry.

+ +
+
+ + GET https://DomainName/api/v1/provisioningentries/{privisioningEntryId} + + + GET provisioningentries + Content-Type: application/json + Request Body: + { + + } + + + { + "id":1, + "journalEntry":true, + "createdUser":"mifos", + "createdDate":"16 October 2014", + "provisioningEntries":[ + {"historyId":1, + "officeId:":1 + "officeName:":"Head Office", + "currencyCode:":"USD", + "productId:":12, + "productName:":"Loan Product Name1", + "categoryId":4, + "categoryName":"LOSS", + "amountReserved":63098.29, + "liabilityAccount":4, + "liabilityCode":"Liability Account Name", + "expenseAccount":6, + "expenseCode":"Expense Account Name" + }, + {"id":2, + "journalEntry":true, + "createdUser":"mifos", + "createdDate":"16 October 2014", + "provisioningEntries":[ + {"historyId":1, + "officeId:":2 + "officeName:":"Branch Office", + "currencyCode:":"USD", + "productId:":12, + "productName:":"Loan Product Name1", + "categoryId":2, + "categoryName":"SUB-STANDARD", + "amountReserved":63098.29, + "liabilityAccount":1, + "liabilityCode":"Liability Account Name", + "expenseAccount":2, + "expenseCode":"Expense Account Name" + } + ] + + } + +
+
+ + +   +
+
+

Recreates Provisioning Entry

+

Recreates Provisioning Entry.

+ +
+
+ + POST + https://DomainName/api/v1/provisioningentries/{privisioningEntryId}?command=recreateprovisioningentry + + + POST provisioningentries + Content-Type: application/json + Request Body: + { + "command":"recreateprovisioningentry" + } + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

Retrieves a Provisioning Entry

+

Returns the details of a generated Provisioning Entry.

+ +
+
+ + POST https://DomainName/api/v1/provisioningentries/{privisioningEntryId}?command=createjournalentry + + + POST provisioningentries + Content-Type: application/json + Request Body: + { + "command":"createjournalentry" + } + + + + { + "resourceId": 1 + } + +
+
+ + + + + +   +
+
+

Search

+

Search API allows to search scoped resources clients, loans and groups on specified fields.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Scoped Resources
+
+
Scoped fields
+
ClientDisplay Name
Account Number
External Id
LoanAccount Number
Client IdentifiersDocument Key
GroupName
Account Number
External Id
+
+
+   +
+
+

Search Resources

+

Example Requests:

+
search?query=000000001
+
+
search?query=Petra&resource=clients,groups
+
+
search?query=Petra&resource=clients,groups&exactMatch=true
+
+ + + + + + + + + + + + + + + + + +
+
Parameters
+
+
Description
+
+ query +
(mandatory) +
+ String which is searched on scoped resources +
+ resource +
(non-mandatory) +
+ Scoped resources on which search can be performed. If there is no resource parameter passed + then search will be performed on all scoped resources. +
+ exactMatch +
(non-mandatory) +
+ Scoped resources on which search can be performed. If there is no exactMatch parameter + passed then search will be performed for all partial matches scoped + resources. +
+
+ + + + + + + + + + +
+
Order of Search results
+
+ List exact match results in following order +
    +
  1. 1. Clients
  2. +
  3. 2. Loans
  4. +
  5. 3. Client Identifiers
  6. +
  7. 4. Groups
  8. +
+
+ List partial match results in following order +
    +
  1. 1. Clients
  2. +
  3. 2. Loans
  4. +
  5. 3. Client Identifiers
  6. +
  7. 4. Groups
  8. +
+
+
+
+ + GET https://DomainName/api/v1/search?query=000000111 + + + [ + { + "entityId": 111, + "entityAccountNo": "000000111", + "entityName": "12-A Flat Loan", + "entityType": "LOAN", + "parentId": 65, + "parentName": "aaaa aaaaa", + "parentType": "client" + } + ] + + + + GET https://DomainName/api/v1/search?query=000000001&exactMatch=true + + + [{ + "entityId": 1, + "entityAccountNo": "000000001", + "entityExternalId": "ID_JKZGEXF", + "entityName": "Group_Name_HVCU5", + "entityType": "GROUP", + "parentId": 1, + "parentName": "Head Office", + "entityStatus": { + "id": 300, + "code": "groupingStatusType.active", + "value": "Active" + } + }, + { + "entityId": 1, + "entityAccountNo": "000000001", + "entityExternalId": "ID_UOZAGPZ", + "entityName": "Client_FirstName_KJ5B6 Client_LastName_KDGX", + "entityType": "CLIENT", + "parentId": 1, + "parentName": "Head Office", + "entityStatus": { + "id": 300, + "code": "clientStatusType.active", + "value": "Active" + } + }] + +
+
+   +
+
+

Advance Search

+

AdHoc Query search supported parameters and field descriptions

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
entities
Entities to be included for search.(presently support added only for + loans)
loanStatus
Loan status values to be included for search.
+ Supported loan status:["all","active","overpaid","closed","writeoff"] +
loanProducts
Array of loanproduct ids. +
offices
Array of office ids. +
loanDateOption
Date condition name for search query.
+ Supported values "approvalDate" or "createdDate" or "disbursalDate". +
loanFromDate
Start date for 'loanDateOption' in 'yyyy-MM-dd' format.
loanToDate
End date for 'loanDateOption' in 'yyyy-MM-dd' format.
includeOutStandingAmountPercentage
It is a Boolean value, allows to search percentage of loan outstanding + amount with in a given range +
outStandingAmountPercentageCondition
Condition type for outstanding amount percentage. + Supported values: between or <= or >= or < or > or =
+ When 'outStandingAmountPercentageCondition' is between required fields minOutStandingAmountPercentage + and maxOutStandingAmountPercentage +
minOutStandingAmountPercentage
Minimum percentage of outstanding amount.
Mandatory when + 'outStandingAmountPercentageCondition' type is 'between' +
maxOutStandingAmountPercentage
Maximum percentage of outstanding amount.
Mandatory when + 'outStandingAmountPercentageCondition' type is 'between' +
outStandingAmountPercentage
Percentage of outstanding amount for search.
Mandatory when + 'outStandingAmountPercentageCondition' type is otherthan 'between' +
includeOutstandingAmount
Boolean value, allows user to search loan outstanding amount with in a given + range +
outstandingAmountCondition
Condition type to search outstanding amount. + Supported values: between or <= or >= or < or > or =
+ When 'outstandingAmountCondition' is between required fields + minOutStandingAmount and maxOutStandingAmount +
minOutStandingAmount
Minimum value of outstanding amount for outstandingAmountCondition type + between.
Mandatory when 'outstandingAmountCondition' type is 'between' +
maxOutStandingAmount
Maximum value of outstanding amount for outstandingAmountCondition type + between.
Mandatory when 'outstandingAmountCondition' type is 'between' +
outStandingAmount
Default value of outstanding amount for search.
Mandatory when + 'outstandingAmountCondition' type is otherthan 'between' +
+
+
+   +
+
+

AdHoc Query Search

+

+ AdHocQuery search has more search options, it is a POST request, it uses request body to send + search parameters
+

+ + + + + + + +
+
Mandatory Fields
+
entities
+
+ + + + + + + +
+
Optional Fields
+
+ loanStatus, loanProducts, offices, loanDateOption, loanFromDate, loanToDate,
includeOutStandingAmountPercentage, + outStandingAmountPercentageCondition,
+ minOutStandingAmountPercentage and maxOutStandingAmountPercentage OR + outStandingAmountPercentage,
includeOutstandingAmount, outstandingAmountCondition,
+ minOutstandingAmount and maxOutstandingAmount OR outstandingAmount +
+
+
+ + POST https://DomainName/api/v1/search/advance + + + POST search/advance + Content-Type: application/json Request Body: + { + "locale": "en", + "dateFormat": "yyyy-MM-dd", + "entities": ["loans"], + "loanStatus": ["all","active","overpaid"], + "loanProducts": ["65","97","73","82"], + "offices": ["1","10","100"], + "loanDateOption": "approvalDate", + "loanFromDate": "2013-01-01", + "loanToDate": "2014-01-27", + "includeOutStandingAmountPercentage": true, + "outStandingAmountPercentageCondition": "<=", + "outStandingAmountPercentage": "80", + "includeOutstandingAmount": true, + "outstandingAmountCondition": "between", + "minOutstandingAmount": "100", + "maxOutstandingAmount": "10000" + } + + + [{ + "officeName": "HFC", + "loanProductName": "01 BC3M", + "count": 86, + "loanOutStanding": 5692.41, + "percentage": 76.4 + }, + { + "officeName": "keithoffice", + "loanProductName": "IGL", + "count": 3, + "loanOutStanding": 4168.23, + "percentage": 56.9 + }, + { + "officeName": "Rio", + "loanProductName": "IGL", + "count": 1, + "loanOutStanding": 1681.12, + "percentage": 55.56 + }] + +
+
+ + + +   +
+
+

Interest Rate Chart

+

This defines an interest rate scheme that can be associated to a term deposit product. This will have + a slab (band or range) of deposit periods and the associated interest rates applicable along with + incentives for each band.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
name
Name of the interest rate chart. +
description
+ Description of Interest rate chart. +
fromDate
+ Date from when the chart is valid. The fromDate is mandatory and used to find out applicable + interest rate chart for Accounts creation (FD & RD accounts). There should not be any + overlapping of fromDate and endDate of charts for a product. +
endDate
+ Validity end date of the chart. This is optional, if not provided means it is the current + chart applicable. +
+
+
+ +   +
+
+

Create a Chart

+

Creats a new chart which can be attached to a term deposit products (FD or RD).

+ + + + + + + +
+
Mandatory Fields
+
fromDate
+ + + + + + + +
+
Optional Fields
+
name, description and endDate
+ +
+
+ + POST https://DomainName/api/v1/interestratecharts + + + POST interestratecharts + Content-Type: application/json + Request Body: + { + "name": "Chart - 2014", + "description": "This chart is applicable for year 2014", + "type": "Document", + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "fromDate": "01 Jan 2014" + } + + + { + "resourceId": 1 + } + +
+
+ +   +
+
+

Retrieve all Charts

+

Retrieve list of charts associated with a term deposit product(FD or RD).

+
Arguments
+
+
productId
+
+ Integer mandatory +
+
Retrieves Interest rate charts to a deposit product.
+
+

Example Requests:

+
interestratecharts?productId=1
+
+
+
+ + GET https://DomainName/api/v1/interestratecharts?productId={productId) + + + [ + { + "id": 1, + "fromDate": [ + 2014, + 1, + 1 + ], + "savingsProductId": 1, + "savingsProductName": "Fixed Deposit Product 001", + "chartSlabs": [ + { + "id": 1, + "periodType": { + "id": 0, + "code": "interestChartPeriodType.days", + "value": "Days" + }, + "fromPeriod": 1, + "annualInterestRate": 6, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + } + ] + } + ] +
+
-   -
-
-

Update Running balances for Journal Entries

-

- This API calculates the running balances for office. If office ID not provided this API calculates running balances for all offices. -
-

- - - - - - - -
Mandatory Fields
officeId -
-
-
- -POST https://DomainName/api/v1/journalentries?command=updateRunningBalance - - -POST journalentries?command=updateRunningBalance -Content-Type: application/json -Request Body: -{ -"officeId": 1, -} - - -{ - "officeId": 1, -} - +   +
+
+

Retrieve a Chart

-
+

Example Requests:

+
interestratecharts/1
+
+
+ + GET https://DomainName/api/v1/interestratecharts/{chartId} + + + { + "id": 1, + "fromDate": [ + 2014, + 1, + 1 + ], + "savingsProductId": 1, + "savingsProductName": "Fixed Deposit Product 001", + "chartSlabs": [ + { + "id": 1, + "periodType": { + "id": 0, + "code": "interestChartPeriodType.days", + "value": "Days" + }, + "fromPeriod": 1, + "annualInterestRate": 6, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + } + ] + } +
+
+   +
+
+

Update a Chart

+

+

+
+ + PUT https://DomainName/api/v1/interestratecharts/{chartId} + + + PUT interestratecharts/1 + Content-Type: application/json + Request Body: + { + "name": "Interest rate chart for 2014", + "description": "Interest rate chart for 2014", + } + + + { + "resourceId": 1 + } + +
+
-   -
-
-

Retrieve a single Entry

-

Example Requests:

-
journalentries/1
-
-
-
-
journalentries/1?fields=officeName,glAccountId,entryType,amount
-
-
journalentries/1?runningBalance=true
-
-
journalentries/1?transactionDetails=true
-
-
- -GET https://DomainName/api/v1/journalentries/{entryId} - - -{ - "id": 1, - "officeId": 2, - "officeName": "sub branch 1", - "glAccountName": "Income from interest", - "glAccountId": 14, - "glAccountCode": "400001", - "glAccountType": { - "id": 4, - "code": "accountType.income", - "value": "INCOME" - }, - "transactionDate": [ - 2012, - 11, - 2 - ], - "entryType": { - "id": 1, - "code": "journalEntryType.credit", - "value": "CREDIT" - }, - "amount": 900, - "transactionId": "13", - "manualEntry": true, - "createdByUserId": 1, - "createdDate": [ - 2012, - 11, - 2 - ], - "createdByUserName": "mifos", - "reversed": false, -} - -
+   +
+
+

Delete a Chart

+
+
+ + DELETE https://DomainName/api/v1/interestratecharts/{chartId} + + + DELETE interestratecharts/1 + Content-Type: application/json + No Request Body: + + + { + "resourceId": 1 + } +
+
-   -
-
-

Reverse a Journal Entry

-

- Note: A journal entry is reversed by logging debits - for all credits that constitute the Journal entry and - vice-versa. The transactionId of the "reversal Entry" is returned - as the methods response -

-
Arguments
-
-
command
-
- String Mandatory, case-insensitive -
-
'reverse' : Reverse the Journal Entry
-
-
Optional Arguments
-
-
comments
-
- String optional -
-
Optional string to be applied as a comment for the created reversal entry, - default comment is used if this field is not supplied
-
-
-
- -GET https://DomainName/api/v1/journalentries/{transactionId}?command=reverse - - -POST journalentries/C1MAE935K0IAEYA?command=reverse -Content-Type: application/json - - -{ - "transactionId": "YFDYMPBVVI9TRJP" -} - -
+   +
+
+

Retrieve Chart Details Template

+

This is a convenience resource. It can be useful when + building maintenance user interface screens for creating a chart. + The template data returned consists of any or all + of: +

    +
  • Field Defaults
  • +
  • Allowed Value Lists
  • +
+

+ +

Example Request:

+
interestratecharts/template
+
+
+ + GET https://DomainName/api/v1/interestratecharts/template + + + { + "periodTypes": [ + { + "id": 0, + "code": "interestChartPeriodType.days", + "value": "Days" + }, + { + "id": 1, + "code": "interestChartPeriodType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "interestChartPeriodType.months", + "value": "Months" + }, + { + "id": 3, + "code": "interestChartPeriodType.years", + "value": "Years" + } + ] + } +
+
- + -  -
-
-

Mapping Financial Activities to Accounts

-

- Organization Level Financial Activities like Asset and Liability Transfer can be mapped to GL Account. Integrated accounting takes these accounts into consideration when an Account transfer is made between a savings to loan/savings account and vice-versa -

- - - - - - - - - - - - - - - - -
Field Descriptions
financialActivityId
The identifier of the Financial Activity -
glAccountId
The identifier of a GL Account ( - Ledger Account) which shall be used as the default account for the selected Financial Activity -
-
+ +   +
+
+

Interest Rate Slab (A.K.A interest bands)

+

The slabs a.k.a interest bands are associated with Interest Rate Chart. These bands allow to define + different interest rates for different deposit term periods.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
periodType
The period type is used to define the different deposit term intervals. + 0=Daily, 1=Weekly, 2=Monthly, 3=Yearly +
fromPeriod
Start of the period for defining deposit term interval. +
e.g. for 1 day to 180 days applicable interest rate is 5% +
then startPeriod=1, endPeriod=180 and periodType=0 +
toPeriod
End of the period for defining deposit term interval. +
e.g. for 1 day to 180 days applicable interest rate is 5% +
annualInterestRate
The applicable annual interest rate for defined term interval +
description
+ provide a description about the slab. +
incentives
+ Represents incentives on interest for a perticular period. +
+
-   -
-
-

List Financial Activities to Accounts Mappings

-

Example Requests:

-
financialactivityaccounts
-
-
- -GET https://DomainName/api/v1/financialactivityaccounts - - - -[ - { - "id": 1, - "financialActivityData": { - "id": 200, - "name": "liabilityTransfer", - "mappedGLAccountType": "LIABILITY" - }, - "glAccountData": { - "id": 55, - "name": "Liability Transfer (Temp)", - "glCode": "220004-Temp" - } - }, - { - "id": 2, - "financialActivityData": { - "id": 100, - "name": "assetTransfer", - "mappedGLAccountType": "ASSET" - }, - "glAccountData": { - "id": 33, - "name": "Petty Cash", - "glCode": "20302" - } - } -] - -
+   +
+
+

Create a Slab

+

Creats a new interest rate slab for an interest rate chart.

+ + + + + + + +
+
Mandatory Fields
+
periodType, fromPeriod, annualInterestRate
+ + + + + + + +
+
Optional Fields
+
toPeriod and description
+

Example Requests:

+
interestratecharts/1/chartslabs
+
+
+ + POST https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs + + + POST interestratecharts/{chartId}/chartslabs + Content-Type: application/json + Request Body: + { + "periodType": "0", + "fromPeriod": "1", + "toPeriod": "180", + "annualInterestRate": "5", + "description": "5% interest from 1 day till 180 days of deposit", + "locale":"en", + "incentives":[{ + "entityType":"2", + "attributeName":2, + "conditionType":2, + "attributeValue":11, + "incentiveType":3, + "amount":"-1" + }] + } + + + { + "resourceId": 1 + } +
+
-   -
-
-

Create a new Financial Activity to Accounts Mapping

- - - - - - - +   +
+
+

Retrieve all Slabs

+

Retrieve list of slabs associated with a chart

-
Mandatory Fields
financialActivityId, glAccountId -
-
+

Example Requests:

+
interestratecharts/1/chartslabs
+
+
+
+ + GET https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs + + + [ + { + "id": 1, + "description": "5% interest from 1 day till 180 days of deposit", + "periodType": { + "id": 0, + "code": "interestChartPeriodType.days", + "value": "Days" + }, + "fromPeriod": 1, + "toPeriod": 180, + "annualInterestRate": 5, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "incentives":[{ + "id":1, + "entityType":{"id":2,"code":"InterestIncentiveEntityType.customer","value":"Customer"}, + "attributeName":{"id":2,"code":"InterestIncentiveAttributeName.gender","value":"Gender"}, + "conditionType":{"id":2,"code":"incentiveConditionType.equal","value":"equal"}, + "attributeValue":"11","attributeValueDesc":"FEMALE", + "incentiveType":{"id":3,"code":"InterestIncentiveType.incentive","value":"Incentive"}, + "amount":-1.000000 + }] + } + ] + +
+
-
-
- -POST https://DomainName/api/v1/financialactivityaccounts - - -POST financialactivityaccounts -Content-Type: application/json -Request Body: -{ -"financialActivityId": 200, -"glAccountId":2 -} - - -{ - "resourceId": 1 -} - -
+   +
+
+

Retrieve a Slab

+

Retrieve a slab associated with an Interest rate chart

+ +

Example Requests:

+
interestratecharts/1/chartslabs/1
+
+
+ + GET https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs/{slabId} + + + { + "id": 1, + "description": "changed to 6% interest ", + "periodType": { + "id": 0, + "code": "interestChartPeriodType.days", + "value": "Days" + }, + "fromPeriod": 1, + "toPeriod": 180, + "annualInterestRate": 6, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "incentives":[{ + "id":1, + "entityType":{"id":2,"code":"InterestIncentiveEntityType.customer","value":"Customer"}, + "attributeName":{"id":2,"code":"InterestIncentiveAttributeName.gender","value":"Gender"}, + "conditionType":{"id":2,"code":"incentiveConditionType.equal","value":"equal"}, + "attributeValue":"11","attributeValueDesc":"FEMALE", + "incentiveType":{"id":3,"code":"InterestIncentiveType.incentive","value":"Incentive"}, + "amount":-1.000000 + }] + } + +
+
+ +   +
+
+

Update a Slab

+
+
+ + PUT https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs/{slabId} + + + PUT interestratecharts/1/chartslabs/1 + Content-Type: application/json + Request Body: + { + "annualInterestRate": "6", + "description": "Interest rate changed to 6%", + } + + + { + "resourceId": 1, + "changes": { + "description": "Interest rate changed to 6%", + "annualInterestRate": 6 + } + } + +
+
+ +   +
+
+

Delete a Slab

+

Delete a Slab from a chart

+
+
+ + DELETE https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs/{slabId} + + + DELETE interestratecharts/1/chartslabs/1 + Content-Type: application/json + No Request Body: + + + { + "resourceId": 1 + } + +
+
+ + + + +   +
+
+

Teller Cash Management

+

Teller cash management which will allow an organization to manage their cash transactions at branches + or head office more effectively.

+
+
+   +
+
+

List all tellers

+

Retrieves list tellers.


+
+
+ + GET https://DomainName/api/v1/tellers + + + [ + { + "id": 3, + "officeId": 1, + "debitAccountId": 0, + "creditAccountId": 0, + "name": "Teller3", + "description": "cash handling", + "startDate": [ + 2015, + 2, + 1 + ], + "status": "ACTIVE", + "officeName": "Head Office" + }, + { + "id": 2, + "officeId": 1, + "debitAccountId": 0, + "creditAccountId": 0, + "name": "Teller2", + "description": "abcc", + "startDate": [ + 2015, + 2, + 19 + ], + "endDate": [ + 2015, + 3, + 30 + ], + "status": "ACTIVE", + "officeName": "Head Office" + }, + { + "id": 1, + "officeId": 1, + "debitAccountId": 0, + "creditAccountId": 0, + "name": "Teller1", + "description": "abc", + "startDate": [ + 2015, + 2, + 20 + ], + "status": "ACTIVE", + "officeName": "Head Office" + }, + { + "id": 4, + "officeId": 2, + "debitAccountId": 0, + "creditAccountId": 0, + "name": "Teller4", + "description": "cash handling", + "startDate": [ + 2015, + 2, + 1 + ], + "status": "ACTIVE", + "officeName": "Office1" + } + ] +
+
-   -
-
-

Update a Financial Activity to Account Mapping

-

- the API updates the Ledger account linked to a Financial Activity -
-

- -
-
- -PUT https://DomainName/api/v1/financialactivityaccounts/{financialactivityaccountId} - - -PUT financialactivityaccounts -Content-Type: application/json -Request Body: -{ -"financialActivityId": 200, -"glAccountId":3 -} - - -{ - "resourceId": 2, - "changes": { - "glAccountId": 3 - } -} - - -
+   +
+
+

Create teller

+

+ + + + + + + +
+
Mandatory Fields
+
Teller name, OfficeId, Description, Start Date, Status
+ + + + + + + +
+
Optional Fields
+
End Date
+


- - -   -
-
-

Retrieve a Financial Activity to Account Mapping

-

Example Requests:

-
financialactivityaccounts/1
-
-
-
- -GET https://DomainName/api/v1/financialactivityaccounts/{financialactivityaccountId} - - -{ - "id": 1, - "financialActivityData": { - "id": 200, - "name": "liabilityTransfer", - "mappedGLAccountType": "LIABILITY" - }, - "glAccountData": { - "id": 55, - "name": "Liability Transfer (Temp)", - "glCode": "220004-Temp" - } -} - -
+
+ + POST https://DomainName/api/v1/tellers + + + POST tellers + Content-Type: application/json + Request Body: + { + "officeId":2, + "name":"Teller4", + "description":"cash handling", + "status":300, + "locale":"en", + "dateFormat":"dd MMMM yyyy", + "startDate":"01 February 2015" + } + + + { + "officeId": 2, + "resourceId": 5 + } +
+
-   -
-
-

Delete a Financial Activity to Account Mapping

-
-
- -DELETE https://DomainName/api/v1/financialactivityaccounts/{financialactivityaccountId} - - -DELETE financialactivityaccounts/1? -Content-Type: application/json - - -{ - "resourceId": "2" -} - -
+   +
+
+

Retrieve tellers

+


- - - - -   -
-
-

Periodic Accrual Accounting

-

- Periodic Accrual is to accrue the loan income till the specific date or till batch job scheduled time. -

- - - - - - - - - - - -
Field Descriptions
tillDate
which specifies periodic accruals should happen till the given Date -
-
+
+ + GET https://DomainName/api/v1/tellers/5 + + + { + "id": 5, + "officeId": 2, + "debitAccountId": 0, + "creditAccountId": 0, + "name": "Teller5", + "description": "cash handling", + "startDate": [ + 2015, + 2, + 1 + ], + "status": "ACTIVE", + "officeName": "Office1" + } +
+
- - -   -
-
-

Executes Periodic Accrual Accounting

- - - - - - - - -
Mandatory Fields
tillDate -
-
- -
-
- -POST https://DomainName/api/v1/runaccruals - - -POST financialactivityaccounts -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "tillDate":"04 June 2014" -} - - - -
+   +
+
+

Update teller

+


+
+ + PUT https://DomainName/api/v1/tellers/{tellerId} + + + PUT tellers/5 + Content-Type: application/json + Request Body: + { + "name":"Teller5", + "officeId":2, + "description":"teller cash handling", + "status":300, + "endDate":"28 February 2015", + "startDate":"01 February 2015", + "locale":"en", + "dateFormat":"dd MMMM yyyy" + } + + + { + "officeId":2, + "resourceId":5, + "changes":{ + "description":"teller cash handling", + "endDate":"28 February 2015", + "dateFormat":"dd MMMM yyyy", + "locale":"en" + } + } + +
+
- -   -
-
-

Provisioning Entries

-

This defines the Provisioning Entries for all active loan products - - - - - - - - - - - - - - - - - -
Field Descriptions
date
Date on which day provisioning entries should be created -
createjournalentries
- Boolean variable whether to add journal entries for generated provisioning entries -
-

-
- -  
-

Create new Provisioning Entries

-

Creates a new Provisioning Entries

- - - - - - - - - - - - - -
Mandatory Fields
date
dateFormat
locale
- - - - - - - -
Optional Fields
createjournalentries
+

Delete Teller

+

- POST https://DomainName/api/v1/provisioningentries +DELETE https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs/{slabId} - POST provisioningentries - Content-Type: application/json - Request Body: - { - "date":"16 October 2015", - "locale":"en", - "dateFormat":"dd MMMM yyyy", - "createjournalentries":true - } +DELETE interestratecharts/1/chartslabs/1 +Content-Type: application/json +No Request Body: - { - "resourceId": 1 - } + { + "resourceId": 1 + }
+--> +   +
+
+

List Cashiers

+


+
+
+ + GET https://DomainName/api/v1/tellers/{tellerId}/cashiers + + + { + "tellerId": 1, + "tellerName": "Teller1", + "officeId": 1, + "officeName": "Head Office", + "cashiers": [ + { + "id": 1, + "tellerId": 1, + "staffId": 1, + "description": "", + "startDate": "Feb 20, 2015 12:00:00 AM", + "endDate": "Feb 27, 2015 12:00:00 AM", + "isFullDay": true, + "startTime": "", + "endTime": "", + "tellerName": "Teller1", + "staffName": "Staff1, Test" + } + ] + } + +
+
-   -
-
-

List all Provisioning Entries

-

List all Provisioning Entries

- -
-
- - GET https://DomainName/api/v1/provisioningentries - - - GET provisioningentries - Content-Type: application/json - Request Body: - { - - } - - - {[ - {"id":1, "journalEntry":true, "createdUser":"mifos", "createdDate":"16 October 2014"}, - {"id":2, "journalEntry":true, "createdUser":"mifos", "createdDate":"16 October 2015"} - ] - } - -
-
+   +
+
+

Create Cashiers

+

+ + + + + + + +
+
Mandatory Fields
+
Cashier/staff, Fromm Date, To Date, Full Day or From time and To time
+ + + + + + + +
+
Optional Fields
+
Description/Notes
+


+
+
+ + POST https://DomainName/api/v1/tellers/{tellerId}/cashiers + + + POST tellers/1/cashiers + { + "endDate":"28 February 2015", + "description":"Cashier created", + "isFullDay":true, + "staffId":3, + "locale":"en", + "dateFormat":"dd MMMM yyyy", + "startDate":"01 February 2015" + } + + + { + "resourceId":1, + "subResourceId":2 + } + +
+
-   -
-
-

Retrieves a Provisioning Entry

-

Returns the details of a generated Provisioning Entry.

+   +
+
+

Retrieve a cashier

+


+
+
+ + GET https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId} + + + { + "id": 1, + "tellerId": 1, + "staffId": 1, + "description": "", + "startDate": "Feb 20, 2015 12:00:00 AM", + "endDate": "Feb 27, 2015 12:00:00 AM", + "isFullDay": true, + "startTime": "", + "endTime": "", + "tellerName": "Teller1", + "staffName": "Staff1, Test" + } + +
+
-
-
- - GET https://DomainName/api/v1/provisioningentries/{privisioningEntryId} - - - GET provisioningentries - Content-Type: application/json - Request Body: - { - } - - - { - "id":1, - "journalEntry":true, - "createdUser":"mifos", - "createdDate":"16 October 2014", - "provisioningEntries":[ - {"historyId":1, - "officeId:":1 - "officeName:":"Head Office", - "currencyCode:":"USD", - "productId:":12, - "productName:":"Loan Product Name1", - "categoryId":4, - "categoryName":"LOSS", - "amountReserved":63098.29, - "liabilityAccount":4, - "liabilityCode":"Liability Account Name", - "expenseAccount":6, - "expenseCode":"Expense Account Name" - }, - {"id":2, - "journalEntry":true, - "createdUser":"mifos", - "createdDate":"16 October 2014", - "provisioningEntries":[ - {"historyId":1, - "officeId:":2 - "officeName:":"Branch Office", - "currencyCode:":"USD", - "productId:":12, - "productName:":"Loan Product Name1", - "categoryId":2, - "categoryName":"SUB-STANDARD", - "amountReserved":63098.29, - "liabilityAccount":1, - "liabilityCode":"Liability Account Name", - "expenseAccount":2, - "expenseCode":"Expense Account Name" - } - ] - - } - -
-
+   +
+
+

Update Cashier

+


+
+
+ + PUT https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId} + + + + PUT tellers/1/cashiers/1 + { + "endDate":"25 February 2015", + "description":"Cashier updated.", + "isFullDay":true, + "staffId":4, + "locale":"en", + "dateFormat":"dd MMMM yyyy", + "startDate":"01 February 2015" + } + + + { + "resourceId": 1, + "subResourceId": 1, + "changes": { + "description": "Cashier updated.", + "endDate": "25 February 2015", + "dateFormat": "dd MMMM yyyy", + "locale": "en" + } + } + +
+
-   -
-
-

Recreates Provisioning Entry

-

Recreates Provisioning Entry.

+   +
+
+

Delete Cashier

+

+
+
+ + DELETE tellers/{tellerId}/cashiers/{cashierId} + + + DELETE tellers/1/cashiers/3 + Content-Type: application/json + Request Body: + { + } + + + { + "resourceId": 3 + } + +
+
-
-
- - POST https://DomainName/api/v1/provisioningentries/{privisioningEntryId}?command=recreateprovisioningentry - - - POST provisioningentries - Content-Type: application/json - Request Body: - { - "command":"recreateprovisioningentry" - } - - - { - "resourceId": 1 - } - -
-
+   +
+
+

Find Cashiers

+


+
+
+ + GET https://DomainName/api/v1/tellers/{tellerId}/cashiers/template + + + { + "tellerId":1, + "officeId":1, + "officeName":"Head Office", + "tellerName":"Teller1", + "staffOptions":[ + { + "id":1, + "displayName":"Staff1, Test" + }, + { + "id":2, + "displayName":"Staff, 2" + }, + { + "id":3, + "displayName":"Staff, 3" + } + ] + } + +
+
-   -
-
-

Retrieves a Provisioning Entry

-

Returns the details of a generated Provisioning Entry.

-
-
- - POST https://DomainName/api/v1/provisioningentries/{privisioningEntryId}?command=createjournalentry - - - POST provisioningentries - Content-Type: application/json - Request Body: - { - "command":"createjournalentry" - } - +   +
+
+

Retrieve Cashier Transaction

+


+
+
+ + GET https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId}/transactions + + + [ + { + "id": 8, + "cashierId": 15, + "txnType": { + "id": 104, + "value": "Cash Out" + }, + "txnAmount": 10000, + "txnDate": "Feb 25, 2015 12:00:00 AM", + "entityId": 2, + "entityType": "loans", + "txnNote": "Disbursement, Loan:2-000000002,Client:1-Test 1", + "createdDate": "Feb 25, 2015 12:00:00 AM", + "officeId": 1, + "officeName": "Head Office", + "tellerId": 0, + "cashierName": "B, Ramesh" + }, + { + "id": 10, + "cashierId": 15, + "txnType": { + "id": 104, + "value": "Cash Out" + }, + "txnAmount": 8500, + "txnDate": "Feb 25, 2015 12:00:00 AM", + "entityId": 3, + "entityType": "loans", + "txnNote": "Disbursement, Loan:3-000000003,Client:3-Client 1", + "createdDate": "Feb 25, 2015 12:00:00 AM", + "officeId": 1, + "officeName": "Head Office", + "tellerId": 0, + "cashierName": "B, Ramesh" + }, + { + "id": 12, + "cashierId": 15, + "txnType": { + "id": 104, + "value": "Cash Out" + }, + "txnAmount": 10000, + "txnDate": "Feb 1, 2015 12:00:00 AM", + "entityId": 4, + "entityType": "loans", + "txnNote": "Disbursement, Loan:4-000000004,Client:4-Client 2", + "createdDate": "Feb 25, 2015 12:00:00 AM", + "officeId": 1, + "officeName": "Head Office", + "tellerId": 0, + "cashierName": "B, Ramesh" + }, + { + "id": 14, + "cashierId": 15, + "txnType": { + "id": 103, + "value": "Cash In" + }, + "txnAmount": 1266.52, + "txnDate": "Feb 1, 2015 12:00:00 AM", + "entityId": 4, + "entityType": "loans", + "txnNote": "Repayment, Loan:4-000000004,Client:4-Client 2", + "createdDate": "Feb 25, 2015 12:00:00 AM", + "officeId": 1, + "officeName": "Head Office", + "tellerId": 0, + "cashierName": "B, Ramesh" + }, + { + "id": 13, + "cashierId": 15, + "txnType": { + "id": 101, + "value": "Allocate Cash" + }, + "txnAmount": 50000, + "txnDate": "Feb 1, 2015 12:00:00 AM", + "entityId": 0, + "entityType": "", + "txnNote": "cash allocated on 1st Feb 2015", + "createdDate": "Feb 25, 2015 12:00:00 AM", + "officeId": 1, + "officeName": "Head Office", + "tellerId": 10, + "tellerName": "Ramesh(Teller/Cashier)", + "cashierName": "B, Ramesh" + }, + { + "id": 15, + "cashierId": 15, + "txnType": { + "id": 104, + "value": "Cash Out" + }, + "txnAmount": 10000, + "txnDate": "Feb 1, 2015 12:00:00 AM", + "entityId": 5, + "entityType": "loans", + "txnNote": "Disbursement, Loan:5-000000005,Client:5-Suresh D", + "createdDate": "Feb 25, 2015 12:00:00 AM", + "officeId": 1, + "officeName": "Head Office", + "tellerId": 0, + "cashierName": "B, Ramesh" + }, + { + "id": 17, + "cashierId": 15, + "txnType": { + "id": 103, + "value": "Cash In" + }, + "txnAmount": 1266.52, + "txnDate": "Feb 1, 2015 12:00:00 AM", + "entityId": 5, + "entityType": "loans", + "txnNote": "Repayment, Loan:5-000000005,Client:5-Suresh D", + "createdDate": "Feb 25, 2015 12:00:00 AM", + "officeId": 1, + "officeName": "Head Office", + "tellerId": 0, + "cashierName": "B, Ramesh" + }, + { + "id": 14, + "cashierId": 15, + "txnType": { + "id": 102, + "value": "Settle Cash" + }, + "txnAmount": 10000, + "txnDate": "Feb 1, 2015 12:00:00 AM", + "entityId": 0, + "entityType": "", + "txnNote": "cash settlement on 1 feb with 10k", + "createdDate": "Feb 25, 2015 12:00:00 AM", + "officeId": 1, + "officeName": "Head Office", + "tellerId": 10, + "tellerName": "Ramesh(Teller/Cashier)", + "cashierName": "B, Ramesh" + } + ] + +
+
- - { - "resourceId": 1 - } - -
-
+ +   +
+
+

Allocate Cash To Cashier

+

+ + + + + + + +
+
Mandatory Fields
+
Date, Amount, Currency, Notes/Comments
+


+
+
+ + POST https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId}/allocate + + + POST tellers/1/cashiers/1/allocate?command=allocate + { + "currencyCode":"USD", + "txnAmount":"5000", + "txnNote":"allocating cash", + "locale":"en", + "dateFormat":"dd MMMM yyyy", + "txnDate":"01 February 2015" + } + + + { + "resourceId":1, + "subResourceId":4 + } + +
+
- - -   -
-
-

Search

-

Search API allows to search scoped resources clients, loans and groups on specified fields.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Scoped Resources
Scoped fields
ClientDisplay Name
Account Number
External Id
LoanAccount Number
Client IdentifiersDocument Key
GroupName
Account Number
External Id
-
-
-   -
-
-

Search Resources

-

Example Requests:

-
search?query=000000001
-
-
search?query=Petra&resource=clients,groups
-
-
search?query=Petra&resource=clients,groups&exactMatch=true
-
- - - - - - - - - - - - - - - - - -
Parameters
Description
- query -
(mandatory) -
- String which is searched on scoped resources -
- resource -
(non-mandatory) -
- Scoped resources on which search can be performed. If there is no resource parameter passed then search will be performed on all scoped resources. -
- exactMatch -
(non-mandatory) -
- Scoped resources on which search can be performed. If there is no exactMatch parameter passed then search will be performed for all partial matches scoped resources. -
-
- - - - - - - - - - -
Order of Search results
- List exact match results in following order -
    -
  1. 1. Clients
  2. -
  3. 2. Loans
  4. -
  5. 3. Client Identifiers
  6. -
  7. 4. Groups
  8. -
-
- List partial match results in following order -
    -
  1. 1. Clients
  2. -
  3. 2. Loans
  4. -
  5. 3. Client Identifiers
  6. -
  7. 4. Groups
  8. -
-
-
-
- -GET https://DomainName/api/v1/search?query=000000111 - - -[ - { - "entityId": 111, - "entityAccountNo": "000000111", - "entityName": "12-A Flat Loan", - "entityType": "LOAN", - "parentId": 65, - "parentName": "aaaa aaaaa", - "parentType": "client" - } -] - +   +
+
+

Settle Cash From Cashier

+

+ + + + + + + +
+
Mandatory Fields
+
Date, Amount, Currency, Notes/Comments
+


+
+
+ + POST https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId}/settle + + + POST tellers/1/cashiers/1/settle?command=settle + { + "currencyCode":"USD", + "txnAmount":"2000", + "txnNote":"cash settlement", + "locale":"en", + "dateFormat":"dd MMMM yyyy", + "txnDate":"20 February 2015" + } + + + { + "resourceId":1, + "subResourceId":5 + } + +
+
- -GET https://DomainName/api/v1/search?query=000000001&exactMatch=true - - -[{ - "entityId": 1, - "entityAccountNo": "000000001", - "entityExternalId": "ID_JKZGEXF", - "entityName": "Group_Name_HVCU5", - "entityType": "GROUP", - "parentId": 1, - "parentName": "Head Office", - "entityStatus": { - "id": 300, - "code": "groupingStatusType.active", - "value": "Active" - } -}, -{ - "entityId": 1, - "entityAccountNo": "000000001", - "entityExternalId": "ID_UOZAGPZ", - "entityName": "Client_FirstName_KJ5B6 Client_LastName_KDGX", - "entityType": "CLIENT", - "parentId": 1, - "parentName": "Head Office", - "entityStatus": { - "id": 300, - "code": "clientStatusType.active", - "value": "Active" - } -}] - -
-
-   -
-
-

Advance Search

-

AdHoc Query search supported parameters and field descriptions

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
entities
Entities to be included for search.(presently support added only for loans)
loanStatus
Loan status values to be included for search.
- Supported loan status:["all","active","overpaid","closed","writeoff"] -
loanProducts
Array of loanproduct ids. -
offices
Array of office ids. -
loanDateOption
Date condition name for search query.
- Supported values "approvalDate" or "createdDate" or "disbursalDate". -
loanFromDate
Start date for 'loanDateOption' in 'yyyy-MM-dd' format.
loanToDate
End date for 'loanDateOption' in 'yyyy-MM-dd' format.
includeOutStandingAmountPercentage
It is a Boolean value, allows to search percentage of loan outstanding amount with in a given range
outStandingAmountPercentageCondition
Condition type for outstanding amount percentage. - Supported values: between or <= or >= or < or > or =
- When 'outStandingAmountPercentageCondition' is between required fields minOutStandingAmountPercentage and maxOutStandingAmountPercentage -
minOutStandingAmountPercentage
Minimum percentage of outstanding amount.
Mandatory when 'outStandingAmountPercentageCondition' type is 'between'
maxOutStandingAmountPercentage
Maximum percentage of outstanding amount.
Mandatory when 'outStandingAmountPercentageCondition' type is 'between'
outStandingAmountPercentage
Percentage of outstanding amount for search.
Mandatory when 'outStandingAmountPercentageCondition' type is otherthan 'between'
includeOutstandingAmount
Boolean value, allows user to search loan outstanding amount with in a given range
outstandingAmountCondition
Condition type to search outstanding amount. - Supported values: between or <= or >= or < or > or =
- When 'outstandingAmountCondition' is between required fields minOutStandingAmount and maxOutStandingAmount -
minOutStandingAmount
Minimum value of outstanding amount for outstandingAmountCondition type between.
Mandatory when 'outstandingAmountCondition' type is 'between'
maxOutStandingAmount
Maximum value of outstanding amount for outstandingAmountCondition type between.
Mandatory when 'outstandingAmountCondition' type is 'between'
outStandingAmount
Default value of outstanding amount for search.
Mandatory when 'outstandingAmountCondition' type is otherthan 'between'
-
-
-   -
-
-

AdHoc Query Search

-

- AdHocQuery search has more search options, it is a POST request, it uses request body to send search parameters
-

- - - - - - - -
Mandatory Fields
entities
-
- - - - - - - -
Optional Fields
- loanStatus, loanProducts, offices, loanDateOption, loanFromDate, loanToDate,
includeOutStandingAmountPercentage, outStandingAmountPercentageCondition,
- minOutStandingAmountPercentage and maxOutStandingAmountPercentage OR outStandingAmountPercentage,
includeOutstandingAmount, outstandingAmountCondition,
- minOutstandingAmount and maxOutstandingAmount OR outstandingAmount
-
-
- -POST https://DomainName/api/v1/search/advance - - -POST search/advance -Content-Type: application/json Request Body: -{ - "locale": "en", - "dateFormat": "yyyy-MM-dd", - "entities": ["loans"], - "loanStatus": ["all","active","overpaid"], - "loanProducts": ["65","97","73","82"], - "offices": ["1","10","100"], - "loanDateOption": "approvalDate", - "loanFromDate": "2013-01-01", - "loanToDate": "2014-01-27", - "includeOutStandingAmountPercentage": true, - "outStandingAmountPercentageCondition": "<=", - "outStandingAmountPercentage": "80", - "includeOutstandingAmount": true, - "outstandingAmountCondition": "between", - "minOutstandingAmount": "100", - "maxOutstandingAmount": "10000" -} - - -[{ - "officeName": "HFC", - "loanProductName": "01 BC3M", - "count": 86, - "loanOutStanding": 5692.41, - "percentage": 76.4 -}, -{ - "officeName": "keithoffice", - "loanProductName": "IGL", - "count": 3, - "loanOutStanding": 4168.23, - "percentage": 56.9 -}, -{ - "officeName": "Rio", - "loanProductName": "IGL", - "count": 1, - "loanOutStanding": 1681.12, - "percentage": 55.56 -}] - -
-
- - - -   -
-
-

Interest Rate Chart

-

This defines an interest rate scheme that can be associated to a term deposit product. This will have a slab (band or range) of deposit periods and the associated interest rates applicable along with incentives for each band.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
name
Name of the interest rate chart. -
description
- Description of Interest rate chart. -
fromDate
- Date from when the chart is valid. The fromDate is mandatory and used to find out applicable interest rate chart for Accounts creation (FD & RD accounts). There should not be any overlapping of fromDate and endDate of charts for a product. -
endDate
- Validity end date of the chart. This is optional, if not provided means it is the current chart applicable. -
-
-
+   +
+
+

Transactions Wtih Summary For Cashier

+


+
+
+ + GET https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId}/summaryandtransactions + + + { + "sumCashAllocation":7000.000000, + "sumInwardCash":0, + "sumOutwardCash":0, + "sumCashSettlement":50.000000, + "netCash":6950.000000, + "officeName":"Head Office", + "tellerId":1, + "tellerName":"Teller1", + "cashierId":1, + "cashierName":"Staff1, Test", + "cashierTransactions":[ + { + "id":2, + "cashierId":1, + "txnType":{ + "id":101, + "value":"Allocate Cash" + }, + "txnAmount":2000.000000, + "txnDate":"Feb 20, 2015 12:00:00 AM", + "entityId":0, + "entityType":"", + "txnNote":"aaaa", + "createdDate":"Feb 20, 2015 12:00:00 AM", + "officeId":1, + "officeName":"Head Office", + "tellerId":1, + "tellerName":"Teller1", + "cashierName":"Staff1, Test" + }, + { + "id":3, + "cashierId":1, + "txnType":{ + "id":102, + "value":"Settle Cash" + }, + "txnAmount":50.000000, + "txnDate":"Feb 20, 2015 12:00:00 AM", + "entityId":0, + "entityType":"", + "txnNote":"bbbbbb", + "createdDate":"Feb 20, 2015 12:00:00 AM", + "officeId":1, + "officeName":"Head Office", + "tellerId":1, + "tellerName":"Teller1", + "cashierName":"Staff1, Test" + }, + { + "id":4, + "cashierId":1, + "txnType":{ + "id":101, + "value":"Allocate Cash" + }, + "txnAmount":5000.000000, + "txnDate":"Feb 1, 2015 12:00:00 AM", + "entityId":0, + "entityType":"", + "txnNote":"allocating cash", + "createdDate":"Feb 23, 2015 12:00:00 AM", + "officeId":1, + "officeName":"Head Office", + "tellerId":1, + "tellerName":"Teller1", + "cashierName":"Staff1, Test" + } + ] + } + +
+
-   -
-
-

Create a Chart

-

Creats a new chart which can be attached to a term deposit products (FD or RD).

- - - - - - - -
Mandatory Fields
fromDate
- - - - - - - -
Optional Fields
name, description and endDate
-
-
- -POST https://DomainName/api/v1/interestratecharts - - -POST interestratecharts -Content-Type: application/json -Request Body: -{ - "name": "Chart - 2014", - "description": "This chart is applicable for year 2014", - "type": "Document", - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "fromDate": "01 Jan 2014" -} - - -{ - "resourceId": 1 -} - -
-
+   +
+
+

Retrieve Cashier Transaction Template

+


+
+
+ + GET https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId}/transactions/template + + + { + "cashierId":1, + "officeName":"Head Office", + "tellerId":1, + "tellerName":"Teller1", + "cashierName":"Staff1, Test", + "cashierData":{ + "id":1, + "tellerId":1, + "staffId":1, + "description":"", + "startDate":"Feb 20, 2015 12:00:00 AM", + "endDate":"Feb 27, 2015 12:00:00 AM", + "isFullDay":true, + "startTime":"", + "endTime":"", + "tellerName":"Teller1", + "staffName":"Staff1, Test" + }, + "startDate":"Feb 20, 2015 12:00:00 AM", + "endDate":"Feb 27, 2015 12:00:00 AM", + "currencyOptions":[ + { + "code":"USD", + "name":"US Dollar", + "decimalPlaces":2, + "displaySymbol":"$", + "nameCode":"currency.USD", + "displayLabel":"US Dollar ($)" + } + ] + } + +
+
-   -
-
-

Retrieve all Charts

-

Retrieve list of charts associated with a term deposit product(FD or RD).

-
Arguments
-
-
productId
-
- Integer mandatory -
-
Retrieves Interest rate charts to a deposit product.
-
-

Example Requests:

-
interestratecharts?productId=1
-
-
-
- -GET https://DomainName/api/v1/interestratecharts?productId={productId) - - -[ - { - "id": 1, - "fromDate": [ - 2014, - 1, - 1 - ], - "savingsProductId": 1, - "savingsProductName": "Fixed Deposit Product 001", - "chartSlabs": [ - { - "id": 1, - "periodType": { - "id": 0, - "code": "interestChartPeriodType.days", - "value": "Days" - }, - "fromPeriod": 1, - "annualInterestRate": 6, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - } - ] - } -] - -
-
-   -
-
-

Retrieve a Chart

+ + +   +
+
+

Payment Type

+

This defines the payment type + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
name
Name the payment type +
description
+ Description of payment type +
isCashPayment
+ Determines weather the payment type is cash or not. +
position
+ Can set the order in which the payment type should be displayed. +
+

+
+   +
+
+

Create a Payment Type

+

Creates a new Payment type

+ + + + + + + +
+
Mandatory Fields
+
name
+ + + + + + + +
+
Optional Fields
+
Description, isCashPayment,Position
+
+
+ + POST https://DomainName/api/v1/paymenttypes + + + POST paymenttype + Content-Type: application/json + Request Body: + { + "name":"cash", + "description":"cash payment type", + "isCashPayment":true, + "position":1 + } + + + { + "resourceId": 1 + } + +
+
+   +
+
+

Retrieve all Payment Types

+

Retrieve list of payment types

-

Example Requests:

-
interestratecharts/1
-
-
- -GET https://DomainName/api/v1/interestratecharts/{chartId} - - -{ - "id": 1, - "fromDate": [ - 2014, - 1, - 1 - ], - "savingsProductId": 1, - "savingsProductName": "Fixed Deposit Product 001", - "chartSlabs": [ - { - "id": 1, - "periodType": { - "id": 0, - "code": "interestChartPeriodType.days", - "value": "Days" - }, - "fromPeriod": 1, - "annualInterestRate": 6, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - } - ] -} - -
-
-   -
-
-

Update a Chart

-

-

-
- -PUT https://DomainName/api/v1/interestratecharts/{chartId} - - -PUT interestratecharts/1 -Content-Type: application/json -Request Body: -{ - "name": "Interest rate chart for 2014", - "description": "Interest rate chart for 2014", -} - - -{ - "resourceId": 1 -} - -
-
+
+
+
+ + GET https://DomainName/api/v1/paymenttypes + + + [ + { + "id": 24, + "name": "PTC", + "description": "Cash", + "isCashPayment": true, + "position": 0 + }, + { + "id": 25, + "name": "mPay", + "description": "not chash payment", + "isCashPayment": false, + "position": 0 + }, + { + "id": 26, + "name": "mPesa", + "description": "non cash payment", + "isCashPayment": false, + "position": 0 + }, + { + "id": 27, + "name": "Mobile Money", + "description": "money transferred through mobile", + "isCashPayment": false, + "position": 0 + }, + { + "id": 13, + "name": "cash", + "description": "cash Payment", + "isCashPayment": true, + "position": 1 + } + ] + +
+
+   +
+
+

Retrieve a Payment Type

+

Retrieves a payment type

+
+
+ + GET https://DomainName/api/v1/paymenttypes/{paymentTypeId} + + + { + "id": 13, + "name": "cash", + "description": "cash Payment", + "isCashPayment": true, + "position": 1 + } + +
+
+   +
+
+

Update a Payment Type

+
+
+ + PUT https://DomainName/api/v1/paymenttypes/{paymnetTypeId} + + + PUT /paymenttypes/13 + { + "name":"mPay", + "description":"not a cash payment type", + "isCashPayment":false, + "position":3 + } + + + { + "resourceId": 13 + } + +
+
+   +
+
+

Delete a Payment Type

+

Deletes payment type

+
+
+ + DELETE https://DomainName/api/v1/paymenttypes/{paymentTypeId} + + + DELETE paymnettypes/13 + Content-Type: application/json + No Request Body: + + + { + "resourceId": 13 + } + +
+
+ +   +
+
+

Provisioning Criteria

+

This defines the Provisioning Criteria + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
Provisioning Criteria Name
Name the Provisioning Criteria +
Loan Products
+ Select all loan products for which provisioning criteria to be associated +
Provisioning Categories
+ Define minimum, maximum, percentage, liability account, expense account for all provisioning + categories +
+

+
-   -
-
-

Delete a Chart

-
-
- -DELETE https://DomainName/api/v1/interestratecharts/{chartId} - - -DELETE interestratecharts/1 -Content-Type: application/json -No Request Body: - - -{ - "resourceId": 1 -} - -
-
+   +
+
+

Create a new Provisioning Criteria

+

Creates a new Provisioning Criteria

+ + + + + + + + + + +
+
Mandatory Fields
+
criteriaName
provisioningcriteria
+ + + + + + + +
+
Optional Fields
+
loanProducts
+
+
+ + POST https://DomainName/api/v1/provisioningcriteria + + + POST provisioningcriteria + Content-Type: application/json + Request Body: + { + "criteriaName":"High Risk Products Criteria", + "loanProducts": [ + {"id": 1, + "name": "LOAN_PRODUCT_3ODPK1", + "includeInBorrowerCycle": false}, + {"id": 2, + "name": "LOAN_PRODUCT_BXW8NC", + includeInBorrowerCycle": false} + ], + "provisioningcriteria": [ + {"categoryId": 1, + "categoryName": "STANDARD", + "minAge": 0, + "maxAge": 3, + "provisioningPercentage": 1, + "liabilityAccount": 8, + "expenseAccount": 14}, + {"categoryId": 2, + "categoryName": "SUB-STANDARD", + "minAge": 1, + "maxAge": 5, + "provisioningPercentage": 2, + "liabilityAccount": 13, + "expenseAccount": 13}, + {"categoryId": 3, + "categoryName": "DOUBTFUL", + "minAge": 2, + "maxAge": 6, + "provisioningPercentage": 3, + "liabilityAccount": 9, + "expenseAccount": 10}, + {"categoryId": 4, + "categoryName": "LOSS", + "minAge": 3, + "maxAge": 7, + "provisioningPercentage": 4, + "liabilityAccount": 10, + "expenseAccount": 9}] + } + + + { + "resourceId": 1 + } + +
+
+   +
+
+

Retrieves all created Provisioning Criterias

+

Retrieves all created Provisioning Criterias

+
+
+ + GET https://DomainName/api/v1/provisioningcriteria + + + GET provisioningcriteria + Content-Type: application/json + Request Body: + { + } + + + { + [ + {"criteriaId":1, + "criteriaName":"High Risk Products Criteria", + "createdBy":"mifos"}, + {"criteriaId":2, + "criteriaName":"Low Risk Products Criteria", + "createdBy":"mifos"} + ] + } + +
+
+   +
+
+

Retrieves a Provisioning Criteria

+

Retrieves a Provisioning Criteria

+
+
+ + GET https://DomainName/api/v1/provisioningcriteria/{criteriaId} + + + GET provisioningcriteria/{criteriaId} + Content-Type: application/json + Request Body: + { + } + + + { + "criteriaId":1 + "criteriaName":"High Risk Products Criteria", + "loanProducts": [ + {"id": 1, + "name": "LOAN_PRODUCT_3ODPK1", + "includeInBorrowerCycle": false}, + {"id": 2, + "name": "LOAN_PRODUCT_BXW8NC", + includeInBorrowerCycle": false} + ], + "provisioningcriteria": [ + {"categoryId": 1, + "categoryName": "STANDARD", + "minAge": 0, + "maxAge": 3, + "provisioningPercentage": 1, + "liabilityAccount": 8, + "expenseAccount": 14}, + {"categoryId": 2, + "categoryName": "SUB-STANDARD", + "minAge": 1, + "maxAge": 5, + "provisioningPercentage": 2, + "liabilityAccount": 13, + "expenseAccount": 13}, + {"categoryId": 3, + "categoryName": "DOUBTFUL", + "minAge": 2, + "maxAge": 6, + "provisioningPercentage": 3, + "liabilityAccount": 9, + "expenseAccount": 10}, + {"categoryId": 4, + "categoryName": "LOSS", + "minAge": 3, + "maxAge": 7, + "provisioningPercentage": 4, + "liabilityAccount": 10, + "expenseAccount": 9}] + } + +
+
+   +
+
+

Updates a new Provisioning Criteria

+

Updates a new Provisioning Criteria

+ + + + + + + +
+
Optional Fields
+
criteriaName, loanProducts, provisioningcriteria
+
+
+ + PUT https://DomainName/api/v1/provisioningcriteria/{criteriaId} + + + PUT provisioningcriteria/{criteriaId} + Content-Type: application/json + Request Body: + { + "criteriaName":"High Risk Products Criteria1", + "loanProducts": [ + {"id": 1, + "name": "LOAN_PRODUCT_3ODPK1", + "includeInBorrowerCycle": false}, + {"id": 2, + "name": "LOAN_PRODUCT_BXW8NC", + includeInBorrowerCycle": false} + ], + "provisioningcriteria": [ + {"categoryId": 1, + "categoryName": "STANDARD", + "minAge": 0, + "maxAge": 3, + "provisioningPercentage": 1, + "liabilityAccount": 8, + "expenseAccount": 14}, + {"categoryId": 2, + "categoryName": "SUB-STANDARD", + "minAge": 1, + "maxAge": 5, + "provisioningPercentage": 2, + "liabilityAccount": 13, + "expenseAccount": 13}, + {"categoryId": 3, + "categoryName": "DOUBTFUL", + "minAge": 2, + "maxAge": 6, + "provisioningPercentage": 3, + "liabilityAccount": 9, + "expenseAccount": 10}, + {"categoryId": 4, + "categoryName": "LOSS", + "minAge": 3, + "maxAge": 7, + "provisioningPercentage": 4, + "liabilityAccount": 10, + "expenseAccount": 9}] + } + + + { + "resourceId": 1, + "changes": { + "criteriaName": "High Risk Products Criteria1" + } + } + +
+
+   +
+
+

Deletes Provisioning Criteria

+

Deletes Provisioning Criteria

+
+
+ + DELETE https://DomainName/api/v1/provisioningcriteria/{criteriaId} + + + DELETE provisioningcriteria/{criteriaId} + Content-Type: application/json + Request Body: + { + } + + + { + "resourceId": 1, + } + +
+
+ + +   +
+
+

Floating Rates

+

This defines the Floating Rates

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
name
Name of the Floating Rate, must be unique +
isBaseLendingRate
+ Identifies the Floating Rate scheme to be Base Lending Rate. Only one scheme can be Base + Lending Rate at any given point of time. default is false. +
isActive
+ Identify if Floating Rate scheme is active or not. default is true. +
ratePeriods
+ Array of ratePeriod JSON objects as defined in below section. +
+

This defines the Floating Rates Periods

+ + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions for ratePeriods
+
fromDate
Start date from which this rate has to be considered. Should be a future + date. +
interestRate
+ Interest Rate applicable. +
isDifferentialToBaseLendingRate
+ If false, interestRate field is considered absolute. + If true, interestRate field is considered differential to Base Lending Rate as of the + startDate. + Cannot be used if there is no scheme defined as Base Lending Rate. +
+
+
-   -
-
-

Retrieve Chart Details Template

-

This is a convenience resource. It can be useful when - building maintenance user interface screens for creating a chart. - The template data returned consists of any or all - of: -

    -
  • Field Defaults
  • -
  • Allowed Value Lists
  • -
-

- -

Example Request:

-
interestratecharts/template
-
-
- -GET https://DomainName/api/v1/interestratecharts/template - - -{ - "periodTypes": [ - { - "id": 0, - "code": "interestChartPeriodType.days", - "value": "Days" - }, - { - "id": 1, - "code": "interestChartPeriodType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "interestChartPeriodType.months", - "value": "Months" - }, - { - "id": 3, - "code": "interestChartPeriodType.years", - "value": "Years" - } - ] -} - -
-
+   +
+
+

Create a new Floating Rate

+

Creates a new Floating Rate

+ + + + + + + +
+
Mandatory Fields
+
name
+ + + + + + + + + + + + + +
+
Optional Fields
+
isBaseLendingRate
isActive
ratePeriods
+
+
+ + POST https://DomainName/api/v1/floatingrates + + + POST floatingrates + Content-Type: application/json + Request Body: + { + "name":"Floating Rate 1", + "isBaseLendingRate":true, + "isActive":true, + "ratePeriods":[ + { + "fromDate":"19 November 2015", + "interestRate":10, + "locale":"en", + "dateFormat":"dd MMMM yyyy" + }, + { + "fromDate":"15 December 2015", + "interestRate":11, + "locale":"en", + "dateFormat":"dd MMMM yyyy" + } + ] + } + + + { + "resourceId": 1 + } + +
+
+   +
+
+

List Floating Rates

+

List Floating Rates

+
+
+ + GET https://DomainName/api/v1/floatingrates + + + GET floatingrates + Content-Type: application/json + + + { + [ + { + "id": 1, + "name": "Floating Rate 1", + "isBaseLendingRate": true, + "isActive": true, + "createdBy": "mifos", + "createdOn": "Nov 18, 2015", + "modifiedBy": "mifos", + "modifiedOn": "Nov 18, 2015" + }, + { + "id": 2, + "name": "Floating Rate 2", + "isBaseLendingRate": false, + "isActive": true, + "createdBy": "mifos", + "createdOn": "Nov 18, 2015", + "modifiedBy": "mifos", + "modifiedOn": "Nov 18, 2015" + } + ] + } + +
+
+   +
+
+

Retrieve Floating Rate

+

Retrieve Floating Rate

+
+
+ + GET https://DomainName/api/v1/floatingrates/1 + + + GET floatingrates + Content-Type: application/json + + + { + "id": 1, + "name": "Floating Rate 1", + "isBaseLendingRate": true, + "isActive": true, + "createdBy": "mifos", + "createdOn": "Nov 18, 2015", + "modifiedBy": "mifos", + "modifiedOn": "Nov 18, 2015", + "ratePeriods": + [ + { + "id": 1, + "fromDate": "Dec 15, 2015", + "interestRate": 11, + "isDifferentialToBaseLendingRate": false, + "isActive": true, + "createdBy": "mifos", + "createdOn": "Nov 18, 2015", + "modifiedBy": "mifos", + "modifiedOn": "Nov 18, 2015" + }, + { + "id": 2, + "fromDate": "Nov 19, 2015", + "interestRate": 10, + "isDifferentialToBaseLendingRate": false, + "isActive": true, + "createdBy": "mifos", + "createdOn": "Nov 18, 2015", + "modifiedBy": "mifos", + "modifiedOn": "Nov 18, 2015" + } + ] + } + +
+
+   +
+
+

Update Floating Rate

+

Updates new Floating Rate. Rate Periods in the past cannot be modified. + All the future rateperiods would be replaced with the new ratePeriods data sent.

+
+
+ + PUT https://DomainName/api/v1/floatingrates/1 + + + PUT floatingrates + Content-Type: application/json + Request Body: + { + "name":"Floating Rate 1", + "isBaseLendingRate":true, + "isActive":true, + "ratePeriods":[ + { + "fromDate":"19 November 2015", + "interestRate":10, + "locale":"en", + "dateFormat":"dd MMMM yyyy" + }, + { + "fromDate":"15 December 2015", + "interestRate":11, + "locale":"en", + "dateFormat":"dd MMMM yyyy" + } + ] + } + + + { + "resourceId": 1, + "changes": + { + "ratePeriods": "[ + { + "fromDate":"19 November 2015", + "interestRate":10, + "locale":"en", + "dateFormat":"dd MMMM yyyy" + }, + { + "fromDate":"15 December 2015", + "interestRate":11, + "locale":"en", + "dateFormat":"dd MMMM yyyy" + } + ]" + } + } + +
+
+ - - - -   -
-
-

Interest Rate Slab (A.K.A interest bands)

-

The slabs a.k.a interest bands are associated with Interest Rate Chart. These bands allow to define different interest rates for different deposit term periods.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
periodType
The period type is used to define the different deposit term intervals. 0=Daily, 1=Weekly, 2=Monthly, 3=Yearly -
fromPeriod
Start of the period for defining deposit term interval. -
e.g. for 1 day to 180 days applicable interest rate is 5% -
then startPeriod=1, endPeriod=180 and periodType=0 -
toPeriod
End of the period for defining deposit term interval. -
e.g. for 1 day to 180 days applicable interest rate is 5% -
annualInterestRate
The applicable annual interest rate for defined term interval -
description
- provide a description about the slab. -
incentives
- Represents incentives on interest for a perticular period. -
-
-
+ +   +
+
+

Tax Components

+

This defines the Tax Components

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
name
Name of the Tax component +
percentage
+ Percentage that should be applied on a amount as tax. +
debitAccountType
+ Debit Account type that should be applicable only for particular cases depending on + requirement ex with hold tax doesn't require debit account for the accounting operation. . +
debitAccountId
+ GL Account that should debited when tax applied. used only for particular cases depending on + requirement ex with hold tax doesn't require debit account for the accounting operation. . +
+ Credit Account type that should be applicable only for particular cases depending on + requirement ex with hold tax require credit account for the accounting operation. . +
debitAccountId
+ GL Account that should credited when tax applied. used only for particular cases depending + on requirement ex with hold tax require only credit account for the accounting operation. . +
startDate
+ Start date from which this tax component is applicable. +
+
+
-   -
-
-

Create a Slab

-

Creats a new interest rate slab for an interest rate chart.

- - - - - - - -
Mandatory Fields
periodType, fromPeriod, annualInterestRate
- - - - - - - -
Optional Fields
toPeriod and description
-

Example Requests:

-
interestratecharts/1/chartslabs
-
-
- -POST https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs - - -POST interestratecharts/{chartId}/chartslabs -Content-Type: application/json -Request Body: -{ - "periodType": "0", - "fromPeriod": "1", - "toPeriod": "180", - "annualInterestRate": "5", - "description": "5% interest from 1 day till 180 days of deposit", - "locale":"en", - "incentives":[{ - "entityType":"2", - "attributeName":2, - "conditionType":2, - "attributeValue":11, - "incentiveType":3, - "amount":"-1" - }] -} - - -{ - "resourceId": 1 -} - -
-
+   +
+
+

Create a new Tax Component

+

Creates a new Tax Component

+ + + + + + + + + + +
+
Mandatory Fields
+
name
percentage
+ + + + + + + + + + + + + + + + + + + +
+
Optional Fields
+
debitAccountType
debitAccountId
creditAccountType
creditAccountId
startDate
+
+
+ + POST https://DomainName/api/v1/taxes/component + + + POST taxes/component + Content-Type: application/json + Request Body: + { + "name": "tax component 1", + "percentage": "10", + "creditAccountType": 2, + "creditAccountId": 4, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "startDate": "11 April 2016" + } + + + { + "resourceId": 1 + } + +
+
+   +
+
+

List Tax Components

+

List Tax Components/p> +

+
+ + GET https://DomainName/api/v1/taxes/component + + + GET taxes/component + Content-Type: application/json + + + [{ + "id": 1, + "name": "tax component 1", + "percentage": 10.000000, + "creditAccountType": { + "id": 2, + "code": "accountType.liability", + "value": "LIABILITY" + }, + "creditAccount": { + "id": 4, + "name": "ACCOUNT_NAME_7BR9C", + "glCode": "LIABILITY_PA1460364665046" + }, + "startDate": [2016, + 4, + 11], + "taxComponentHistories": [{ -   -
-
-

Retrieve all Slabs

-

Retrieve list of slabs associated with a chart

+ }] + }, + { + "id": 2, + "name": "tax component 2", + "percentage": 10.000000, + "creditAccountType": { + "id": 2, + "code": "accountType.liability", + "value": "LIABILITY" + }, + "creditAccount": { + "id": 4, + "name": "ACCOUNT_NAME_7BR9C", + "glCode": "LIABILITY_PA1460364665046" + }, + "startDate": [2016, + 4, + 11], + "taxComponentHistories": [{ -

Example Requests:

-
interestratecharts/1/chartslabs
-
-
-
- -GET https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs - - -[ - { - "id": 1, - "description": "5% interest from 1 day till 180 days of deposit", - "periodType": { - "id": 0, - "code": "interestChartPeriodType.days", - "value": "Days" - }, - "fromPeriod": 1, - "toPeriod": 180, - "annualInterestRate": 5, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "incentives":[{ - "id":1, - "entityType":{"id":2,"code":"InterestIncentiveEntityType.customer","value":"Customer"}, - "attributeName":{"id":2,"code":"InterestIncentiveAttributeName.gender","value":"Gender"}, "conditionType":{"id":2,"code":"incentiveConditionType.equal","value":"equal"}, - "attributeValue":"11","attributeValueDesc":"FEMALE", - "incentiveType":{"id":3,"code":"InterestIncentiveType.incentive","value":"Incentive"}, - "amount":-1.000000 - }] - } -] - -
-
+ }] + }] +
+
+
+   +
+
+

Retrieve Tax Component

+

Retrieve Tax Component

+
+
+ + GET https://DomainName/api/v1/taxes/component/1 + + + GET taxes/component/1 + Content-Type: application/json + + + { + "id": 1, + "name": "tax component 1", + "percentage": 10.000000, + "creditAccountType": { + "id": 2, + "code": "accountType.liability", + "value": "LIABILITY" + }, + "creditAccount": { + "id": 4, + "name": "ACCOUNT_NAME_7BR9C", + "glCode": "LIABILITY_PA1460364665046" + }, + "startDate": [2016, + 4, + 11], + "taxComponentHistories": [{ -   -
-
-

Retrieve a Slab

-

Retrieve a slab associated with an Interest rate chart

+ }] + } +
+
+
+   +
+
+

Update Tax Component

+

Updates Tax component. Debit and credit account details cannot be modified. + All the future tax components would be replaced with the new percentage.

+
+
+ + PUT https://DomainName/api/v1/taxes/component/1 + + + PUT taxes/component/1 + Content-Type: application/json + Request Body: + { + "name": "tax component 2", + "percentage": "15", + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "startDate": "15 April 2016" + } + + + { + "resourceId": 1, + "changes": { + "percentage": 15, + "name": "tax component 2", + "startDate": [2016, + 4, + 15] + } + } + +
+
+ -

Example Requests:

-
interestratecharts/1/chartslabs/1
-
-
- -GET https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs/{slabId} - - -{ - "id": 1, - "description": "changed to 6% interest ", - "periodType": { - "id": 0, - "code": "interestChartPeriodType.days", - "value": "Days" - }, - "fromPeriod": 1, - "toPeriod": 180, - "annualInterestRate": 6, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "incentives":[{ - "id":1, - "entityType":{"id":2,"code":"InterestIncentiveEntityType.customer","value":"Customer"}, - "attributeName":{"id":2,"code":"InterestIncentiveAttributeName.gender","value":"Gender"}, "conditionType":{"id":2,"code":"incentiveConditionType.equal","value":"equal"}, - "attributeValue":"11","attributeValueDesc":"FEMALE", - "incentiveType":{"id":3,"code":"InterestIncentiveType.incentive","value":"Incentive"}, - "amount":-1.000000 - }] -} - -
-
+ +   +
+
+

Tax Group

+

This defines the Tax Group

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
name
Name of the Tax Group +
taxComponents
+ Array of tax components to be added part of tax group. +
id
+ Tax group and tax component mapping id. +
taxComponentId
+ Tax component id. +
startDate
+ Start date from which this tax component is applicable. +
endDate
+ End date from which this tax component is applicable. +
+
+
-   -
-
-

Update a Slab

-
-
- -PUT https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs/{slabId} - - -PUT interestratecharts/1/chartslabs/1 -Content-Type: application/json -Request Body: -{ - "annualInterestRate": "6", - "description": "Interest rate changed to 6%", -} - - -{ - "resourceId": 1, - "changes": { - "description": "Interest rate changed to 6%", - "annualInterestRate": 6 - } -} - -
-
+   +
+
+

Create a new Tax Group

+

Creates a new Tax Group

+ + + + + + + + + + +
+
Mandatory Fields
+
name
taxComponents
+ + + + + + + +
+
Mandatory Fields in taxComponents
+
taxComponentId
+ + + + + + + + + + + + + +
+
Optional Fields in taxComponents
+
id
startDate
endDate
+
+
+ + POST https://DomainName/api/v1/taxes/group + + + POST taxes/component + Content-Type: application/json + Request Body: + { + "name": "tax group 1", + "locale": "en", + "taxComponents": [{ + "taxComponentId": 7, + "startDate": "11 April 2016" + }], + "dateFormat": "dd MMMM yyyy" + } + + + { + "resourceId": 1 + } + +
+
+   +
+
+

List Tax Group

+

List Tax Group/p> +

+
+ + GET https://DomainName/api/v1/taxes/group + + + GET taxes/group + Content-Type: application/json + + + [{ + "id": 6, + "name": "Tax_component_Name_PAX65", + "taxAssociations": [{ + "id": 6, + "taxComponent": { + "id": 6, + "name": "Tax_component_Name_FPNXE" + }, + "startDate": [2013, + 1, + 1] + }] + }, + { + "id": 7, + "name": "tax group 1", + "taxAssociations": [{ + "id": 7, + "taxComponent": { + "id": 7, + "name": "tax component 2" + }, + "startDate": [2016, + 4, + 11] + }] + }] + +
+
+   +
+
+

Retrieve Tax Group

+

Retrieve Tax Group

+
+
+ + GET https://DomainName/api/v1/taxes/group/1 + + + GET taxes/group/1 + Content-Type: application/json + + + { + "id": 7, + "name": "tax group 1", + "taxAssociations": [{ + "id": 7, + "taxComponent": { + "id": 7, + "name": "tax component 2" + }, + "startDate": [2016, + 4, + 11] + }] + } + +
+
+   +
+
+

Update Tax Group

+

Updates Tax Group. Only end date can be up-datable and can insert new tax components.

+
+
+ + PUT https://DomainName/api/v1/taxes/group/1 + + + PUT taxes/group/1 + Content-Type: application/json + Request Body: + { + "name": "tax group 2", + "locale": "en", + "taxComponents": [{ + "id": 7, + "taxComponentId": 7, + "endDate": "22 April 2016" + }, + { + "taxComponentId": 6, + "startDate": "14 April 2016" + }], + "dateFormat": "dd MMMM yyyy" + } + + + { + "resourceId": 7, + "changes": { + "addComponents": [6], + "modifiedComponents": [{ + "endDate": "Apr 22, 2016 12:00:00 AM", + "taxComponentId": 7 + }], + "name": "tax group 2" + } + } + +
+
+ -   -
-
-

Delete a Slab

-

Delete a Slab from a chart

-
-
- -DELETE https://DomainName/api/v1/interestratecharts/{chartId}/chartslabs/{slabId} - - -DELETE interestratecharts/1/chartslabs/1 -Content-Type: application/json -No Request Body: - - -{ - "resourceId": 1 -} - -
-
+ +   +
+
+

Rates

+

This defines the Rates

+ + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
name
Name of Rate +
productApply
+ Enum value that defines to which entity the rate will be applicable. + Available options are: + 1=Loans + + Once a rate definition is created, this attribute cannot be changed at any point +
Active
+ Flag indicating if the rate is currently active +
+
+
+   +
+
+

Create a new Rate

+

Creates a new Rate

+ + + + + + + + + + + + + + + + +
+
Mandatory Fields
+
name
percentage
productApply
active
+
+
+ + POST https://DomainName/api/v1/rates + + + POST rates + Content-Type: application/json + Request Body: + { + "productApply":1, + "name":"Loan rate", + "percentage":"12", + "active":true, + "locale":"en" + } + + + { + "resourceId": 1 + } + +
+
+   +
+
+

List Rates

+

List Rates

+
+
+ + GET https://DomainName/api/v1/rates + + + GET rates + Content-Type: application/json + + + [ + { + "id":1, + "name":"Loan Rate", + "percentage":12.00, + "productApply":1, + "active":true + }, + { + "id":2, + "name":"Public Rate", + "percentage":30.00, + "productApply":1, + "active":true + }, + { + "id":3, + "name":"Private Rate", + "percentage":14.00, + "productApply":1, + "active":true + } + ] + +
+
+   +
+
+

Retrieve a Rate

+

Return the details of an existing Rate

+
+
+ + GET https://DomainName/api/v1/rates/{rateId} + + + GET rates/1 + Content-Type: application/json + + + { + "id":1, + "name":"Loan Rate", + "percentage":12.00, + "productApply":1, + "active":true + } + +
+
+   +
+
+

Update a Rate

+

Updates an existing Rate

+
+
+ + POST https://DomainName/api/v1/rates/{rateId} + + + POST rates/3 + Content-Type: application/json + Request Body: + { + "percentage":"17", + } + + + { + "resourceId":3, + "changes": + { + "percentage":17 + } + } + +
+
+ - + +   +
+
+

User Generated Documents

+

User Generated Documents(alternatively, Templates) are used for end-user features such as custom user + defined document generation (AKA UGD). They are based on {{ + moustache }} templates. Think of them as a sort of built-in "mail merge" functionality.

+ +

User Generated Documents (and other types of templates) can aggregate data from several Apache + Fineract back-end API calls via mappers. Mappers can even access non-Apache Fineract REST + services from other servers. UGDs can render such data in tables, show images, etc. TBD: Please + have a look at some of the Example UGDs included in Apache Fineract (or the Wiki page, for + now.).

+ +

UGDs can be assigned to an entity like client or loan and be of a type like + Document or SMS. The entity and type of a UGD is only there for the convenience of + user agents (UIs), in order to know where to show UGDs for the user (i.e. which tab). The Template + Engine back-end runner does not actually need this metadata.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
name
Describes the document which will be created. + It must be unique and appears listed in a tab at the assigned entity. +
type
+ For now only the types Document and SMS are supported. + In a next version, UGDs may be created for e-mails as well. +
entity
+ Indicates the primary resource reference. + UGDs may be filtered by entity and type so the relevant UGDs may be listed at the belonging + position. +
text
+ The actual UGD which may be any html-text containing mustache tags. +
mappers
+ By default one mapper is assigned to the UGD depending on the entity. + Mappers are used to create requests and get tags wich may be used in the UGD. + Also mappery are in order and may depend on the previous mappers. + For now mappers expect a response in JSON or plain/text. + JSON contains the keys and the values. + If the response is plain/text it can be accessed by {{$mapperskey.src}} +
+
+
- -   -
-
-

Teller Cash Management

-

Teller cash management which will allow an organization to manage their cash transactions at branches or head office more effectively.

-
-
-   -
-
-

List all tellers

-

Retrieves list tellers.


-
-
- - GET https://DomainName/api/v1/tellers - - - [ - { - "id": 3, - "officeId": 1, - "debitAccountId": 0, - "creditAccountId": 0, - "name": "Teller3", - "description": "cash handling", - "startDate": [ - 2015, - 2, - 1 - ], - "status": "ACTIVE", - "officeName": "Head Office" - }, - { - "id": 2, - "officeId": 1, - "debitAccountId": 0, - "creditAccountId": 0, - "name": "Teller2", - "description": "abcc", - "startDate": [ - 2015, - 2, - 19 - ], - "endDate": [ - 2015, - 3, - 30 - ], - "status": "ACTIVE", - "officeName": "Head Office" - }, - { - "id": 1, - "officeId": 1, - "debitAccountId": 0, - "creditAccountId": 0, - "name": "Teller1", - "description": "abc", - "startDate": [ - 2015, - 2, - 20 - ], - "status": "ACTIVE", - "officeName": "Head Office" - }, - { - "id": 4, - "officeId": 2, - "debitAccountId": 0, - "creditAccountId": 0, - "name": "Teller4", - "description": "cash handling", - "startDate": [ - 2015, - 2, - 1 - ], - "status": "ACTIVE", - "officeName": "Office1" - } - ] - -
-
+   +
+
+

Retrieve UGD Details Template

+

This is a convenience resource. It can be useful when + building maintenance user interface screens for UGDs. + The UGD data returned consists of any or all of: +

+
Arguments
+
+
name
+
+ String +
+
entity
+
+ String +
+
type
+
+ String +
+
text
+
+ String optional +
+
mappers
+
+ Mapper optional +
+
+

Example Request:

+
templates/template
+
+
+ + GET https://DomainName/api/v1/templates/template + + + { + "id": 1, + "name": "Test", + "entity": 1, + "type": 0, + "text": "This is a loan for {{loan.clientName}}", + "mappers": [ + { + "mappersorder": 0, + "mapperskey": "loan", + "mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}", + "id": 1 + } + ] + } + +
+
-   -
-
-

Create teller

-

- - - - - - - -
Mandatory Fields
Teller name, OfficeId, Description, Start Date, Status
- - - - - - - -
Optional Fields
End Date
-


-
-
- - POST https://DomainName/api/v1/tellers - - - POST tellers - Content-Type: application/json - Request Body: - { - "officeId":2, - "name":"Teller4", - "description":"cash handling", - "status":300, - "locale":"en", - "dateFormat":"dd MMMM yyyy", - "startDate":"01 February 2015" - } - - - { - "officeId": 2, - "resourceId": 5 - } - -
-
+   +
+
+

Add a UGD

+

Adds a new UGD.

+ + + + + + + +
+
Mandatory Fields
+
name
+

Example Requests:

+
templates/1
+
+
+ + POST https://DomainName/api/v1/templates + + + POST templates + Content-Type: application/json + Request Body: + { + "id": 1, + "name": "Test", + "entity": 1, + "type": 0, + "text": "This is a loan for {{loan.clientName}}", + "mappers": [ + { + "mappersorder": 0, + "mapperskey": "loan", + "mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}", + "id": 1 + } + ] + } + + + { + "resourceId": 1 + } + +
+
-   -
-
-

Retrieve tellers

-


-
-
- - GET https://DomainName/api/v1/tellers/5 - - - { - "id": 5, - "officeId": 2, - "debitAccountId": 0, - "creditAccountId": 0, - "name": "Teller5", - "description": "cash handling", - "startDate": [ - 2015, - 2, - 1 - ], - "status": "ACTIVE", - "officeName": "Office1" - } - -
-
+   +
+
+

Retrieve all UGDs

+ +

Example Requests:

+
templates
+
+

+ It is also possible to get specific UGDs by entity and type: +

+
templates?type=0&entity=0
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+
Entity
+
Id +
Type
+
Id
client0Document0
loan1E-Mail (not yet)1
SMS2
+
+
+ + GET https://DomainName/api/v1/templates + + + [ + { + "id": 1, + "name": "Test", + "entity": 1, + "type": 0, + "text": "This is a loan for {{loan.clientName}}", + "mappers": [ + { + "mappersorder": 0, + "mapperskey": "loan", + "mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}", + "id": 1 + } + ] + } + ] + +
+
-   -
-
-

Update teller

-


-
-
- - PUT https://DomainName/api/v1/tellers/{tellerId} - - - PUT tellers/5 - Content-Type: application/json - Request Body: - { - "name":"Teller5", - "officeId":2, - "description":"teller cash handling", - "status":300, - "endDate":"28 February 2015", - "startDate":"01 February 2015", - "locale":"en", - "dateFormat":"dd MMMM yyyy" - } - - - { - "officeId":2, - "resourceId":5, - "changes":{ - "description":"teller cash handling", - "endDate":"28 February 2015", - "dateFormat":"dd MMMM yyyy", - "locale":"en" - } - } - -
-
+   +
+
+

Retrieve a UGD

+

Example Requests:

+
templates/1
+
+
+ + GET https://DomainName/api/v1/templates/{Id} + + + { + "id": 1, + "name": "Test", + "entity": 1, + "type": 0, + "text": "This is a loan for {{loan.clientName}}", + "mappers": [ + { + "mappersorder": 0, + "mapperskey": "loan", + "mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}", + "id": 1 + } + ] + } + +
+
- -   -
-
-

List Cashiers

-


-
-
- - GET https://DomainName/api/v1/tellers/{tellerId}/cashiers - - - { - "tellerId": 1, - "tellerName": "Teller1", - "officeId": 1, - "officeName": "Head Office", - "cashiers": [ - { - "id": 1, - "tellerId": 1, - "staffId": 1, - "description": "", - "startDate": "Feb 20, 2015 12:00:00 AM", - "endDate": "Feb 27, 2015 12:00:00 AM", - "isFullDay": true, - "startTime": "", - "endTime": "", - "tellerName": "Teller1", - "staffName": "Staff1, Test" - } - ] - } - -
-
+   +
+
+

Update a UGD

+
+
+ + PUT https://DomainName/api/v1/templates/{templateId} + + + PUT templates/1 + Content-Type: application/json + Request Body: + { + "id": 1, + "name": "Test", + "entity": 1, + "type": 0, + "text": "This is a loan for {{loan.clientName}}", + "mappers": [ + { + "mappersorder": 0, + "mapperskey": "loan", + "mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}", + "id": 1 + } + ] + } + + + { + "resourceId": 1 + } + +
+
-   -
-
-

Create Cashiers

-

- - - - - - - -
Mandatory Fields
Cashier/staff, Fromm Date, To Date, Full Day or From time and To time
- - - - - - - -
Optional Fields
Description/Notes
-


-
-
- - POST https://DomainName/api/v1/tellers/{tellerId}/cashiers - - - POST tellers/1/cashiers - { - "endDate":"28 February 2015", - "description":"Cashier created", - "isFullDay":true, - "staffId":3, - "locale":"en", - "dateFormat":"dd MMMM yyyy", - "startDate":"01 February 2015" - } - - - { - "resourceId":1, - "subResourceId":2 - } - -
-
-   -
-
-

Retrieve a cashier

-


-
-
- - GET https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId} - - - { - "id": 1, - "tellerId": 1, - "staffId": 1, - "description": "", - "startDate": "Feb 20, 2015 12:00:00 AM", - "endDate": "Feb 27, 2015 12:00:00 AM", - "isFullDay": true, - "startTime": "", - "endTime": "", - "tellerName": "Teller1", - "staffName": "Staff1, Test" - } - -
-
+ +   +
+
+

Client Charges

+

It is typical for MFI's to directly associate charges with an implicit Client account. These + can be either fees or penalties

+

Client Charges are client specific instances of Charges. Refer Charges for documentation of the various properties of a charge, Only + additional properties ( + specific to the context of a Charge being associated with a Client account) are + described here

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
amountPaid
The total amount which has been paid for this Charge +
amountWaived
The total amount that has been waived for this Charge +
amountOutstanding
The Total outstanding amount for this Charge +
dueDate
it specifies the due date
+
+
-   -
-
-

Update Cashier

-


-
-
- - PUT https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId} - +   +
+
+

Client Transaction

+

Client Transactions refer to transactions made directly againt a Client's internal account. + Currently, these transactions are only created as a result of charge payments/waivers. You are + allowed to undo a transaction, however you cannot explicitly create one. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
id
This ia an unique Id associate with a Transaction. +
officeId
Identifier of the office in which the transaction was made
reversed
Boolean Flag that indicates if this transaction is reversed. +
amount
Transaction amount. +
currency
Details of the currency involved with the Transaction. Currently defaults + to the currency of the Client Charge this transaction pays +
date
Effective date of the transaction
+
+
+   +
+
+

List Client Transactions

+

The list capability of client transaction can support pagination.

+
Mandatory Arguments
+
+
offset
+
+ Integer Mandatory, defaults to 0 +
+
Indicates the result from which pagination starts
+ +
limit
+
+ Integer Mandatory, defaults to 200 +
+
Restricts the size of results returned. To override the default and return all entries you must + explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1 +
+
+

Example Requests:

+
clients/189/transactions
+
clients/189/transactions?offset=10&limit=50
+
+
+ + GET https://DomainName/api/v1/clients/{clientId}/transactions?limit=5&offset=0 + + + GET clients/226/transactions?limit=5&offset=0 + Content-Type: application/json + No Request Body: - - - PUT tellers/1/cashiers/1 - { - "endDate":"25 February 2015", - "description":"Cashier updated.", - "isFullDay":true, - "staffId":4, - "locale":"en", - "dateFormat":"dd MMMM yyyy", - "startDate":"01 February 2015" - } - - - { - "resourceId": 1, - "subResourceId": 1, - "changes": { - "description": "Cashier updated.", - "endDate": "25 February 2015", - "dateFormat": "dd MMMM yyyy", - "locale": "en" - } - } - -
-
+
+ + { + "totalFilteredRecords": 20, + "pageItems": [ + { + "id": 226, + "officeId": 1, + "officeName": "Head Office", + "type": { + "id": 1, + "code": "clientTransactionType.payCharge", + "value": "PAY_CHARGE" + }, + "date": [ + 2015, + 9, + 2 + ], + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 22, + "submittedOnDate": [ + 2015, + 9, + 2 + ], + "reversed": false + } + ] + } + +
+
-   -
-
-

Delete Cashier

-

-
-
- - DELETE tellers/{tellerId}/cashiers/{cashierId} - - - DELETE tellers/1/cashiers/3 - Content-Type: application/json - Request Body: - { - } - - - { - "resourceId": 3 - } - -
-
+   +
+
+

Retrieve a Client Transaction

+

Example Requests:

+
clients/1/transactions/1
+
+
+
clients/1/transactions/1?fields=id,officeName
+
+
+ + GET https://DomainName/api/v1/clients/{clientId}/transaction/{transactionId} + + + { + "id": 1, + "officeId": 1, + "officeName": "Head Office", + "type": { + "id": 1, + "code": "clientTransactionType.payCharge", + "value": "PAY_CHARGE" + }, + "date": [ + 2015, + 8, + 17 + ], + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 60.000000, + "submittedOnDate": [ + 2015, + 8, + 19 + ], + "reversed": true + } + +
+
+ +   +
+
+

Add Client Charge

+

+ This API associates a Client charge with an implicit Client account +

+ + + + + + + +
+
Mandatory Fields
+
chargeId and dueDate
+ + + + + + + +
+
Optional Fields
+
amount
+
+
+ + POST https://DomainName/api/v1/clients/{clientId}/charges + + + POST clients/226/charges + Content-Type: application/json + Request Body: + { + "amount" : "100", + "chargeId" : "226", + "dateFormat" : "dd MMMM yyyy", + "dueDate" : "01 September 2015", + "locale" : "en" + } + + + { + "officeId": 1, + "clientId": 189, + "resourceId":164 + } + +
+
+   +
+
+

List Client Charges

+ +

The list capability of client charges supports pagination.

+
Optional Arguments
+
+
offset
+
+ Integer Mandatory, defaults to 0 +
+
Indicates the result from which pagination starts
+ +
limit
+
+ Integer Mandatory, defaults to 200 +
+
Restricts the size of results returned. To override the default and return all entries you must + explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1 +
+ +
pendingPayment
+
+ String optional +
+
Filters charges that are pending payment (neither paid or waived).
+
+

Example Requests:

+
clients/1/charges
+
clients/1/charges?offset=0&limit=5
+
+
+ + GET https://DomainName/api/v1/clients/{clientId}/charges?limit=5&offset=0 + + + GET clients/1/charges?limit=5&offset=0 + Content-Type: application/json + No Request Body + + + { + "totalFilteredRecords": 4, + "pageItems": [ + { + "id": 5, + "clientId": 1, + "chargeId": 6, + "name": "Client Fees 2", + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "dueDate": [ + 2015, + 9, + 1 + ], + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 550.000000, + "amountPaid": 0.000000, + "amountWaived": 0.000000, + "amountWrittenOff": 0, + "amountOutstanding": 550.000000, + "penalty": false, + "isActive": true, + "isPaid": false, + "isWaived": false + }, + { + "id": 4, + "clientId": 1, + "chargeId": 5, + "name": "Client Fee 1", + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "dueDate": [ + 2015, + 8, + 31 + ], + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 120.000000, + "amountPaid": 0.000000, + "amountWaived": 120.000000, + "amountWrittenOff": 0, + "amountOutstanding": 120.000000, + "penalty": true, + "isActive": true, + "isPaid": false, + "isWaived": true + }, + { + "id": 3, + "clientId": 1, + "chargeId": 5, + "name": "Client Fee 1", + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "dueDate": [ + 2015, + 8, + 17 + ], + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100.000000, + "amountPaid": 0.000000, + "amountWaived": 100.000000, + "amountWrittenOff": 0, + "amountOutstanding": 0.000000, + "penalty": true, + "isActive": true, + "isPaid": false, + "isWaived": true + }, + { + "id": 2, + "clientId": 1, + "chargeId": 2, + "name": "Recurring savings Charge", + "chargeTimeType": { + "id": 7, + "code": "chargeTimeType.monthlyFee", + "value": "Monthly Fee" + }, + "dueDate": [ + 2015, + 8, + 17 + ], + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100.000000, + "amountPaid": 0, + "amountWaived": 100.000000, + "amountWrittenOff": 0, + "amountOutstanding": 0.000000, + "penalty": false, + "isActive": true, + "isPaid": false, + "isWaived": true + } + ] + } -   -
-
-

Find Cashiers

-


-
-
- - GET https://DomainName/api/v1/tellers/{tellerId}/cashiers/template - - - { - "tellerId":1, - "officeId":1, - "officeName":"Head Office", - "tellerName":"Teller1", - "staffOptions":[ - { - "id":1, - "displayName":"Staff1, Test" - }, - { - "id":2, - "displayName":"Staff, 2" - }, - { - "id":3, - "displayName":"Staff, 3" - } - ] - } - -
-
+
+
+
+   +
+
+

Retrieve a Client Charge

+
Arguments
+
+
associations
+
+ optional, Either 'all' or a comma separated list of + loan 'associations' (itemised below). +
+
+
Associations are just extra pieces of data that you + might or might not want to retrieve.
+
+
+
+ 'all': Gets all association data. +
+
+ 'transactions': Retrieves all transactions made on this client charge. +
+
+

Example Requests:

+
clients/1/charges/1
+
+
+
clients/1/charges/1?fields=name,id
+
+
+ + GET https://DomainName/api/v1/clients/{clientId}/charges/{clientChargeId} + + + { + "id": 3, + "clientId": 1, + "chargeId": 5, + "name": "Client Fee 1", + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "dueDate": [ + 2015, + 8, + 17 + ], + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100.000000, + "amountPaid": 0.000000, + "amountWaived": 100.000000, + "amountWrittenOff": 0, + "amountOutstanding": 0.000000, + "penalty": true, + "isActive": true, + "isPaid": false, + "isWaived": true + } + +
+
+   +
+
+

Delete a Client Charge

+

+ Deletes a Client Charge on which no transactions have taken place (either payments or waivers).

+
+
+ + DELETE https://DomainName/api/v1/clients/{clientId}/charges/{clientChargeId} + + + POST clients/189/charges/164 + Content-Type: application/json + No Request Body + + + { + "officeId": 1, + "clientId": 189, + "resourceId":164 + } + +
+
+   +
+
+

Pay a Client Charge

+

+
Pay either a part of or the entire due amount for a charge. +

+ + + + + + + +
+
Mandatory Fields
+
+ transactionDate and amount +
+
+
+
+ + POST https://DomainName/api/v1/clients/{clientId}/charges/{clientChargeId}?command=paycharge + + + POST clients/189/charges/157?command=payCharge + Content-Type: application/json + Request Body: + { -   -
-
-

Retrieve Cashier Transaction

-


-
-
- - GET https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId}/transactions - - - [ - { - "id": 8, - "cashierId": 15, - "txnType": { - "id": 104, - "value": "Cash Out" - }, - "txnAmount": 10000, - "txnDate": "Feb 25, 2015 12:00:00 AM", - "entityId": 2, - "entityType": "loans", - "txnNote": "Disbursement, Loan:2-000000002,Client:1-Test 1", - "createdDate": "Feb 25, 2015 12:00:00 AM", - "officeId": 1, - "officeName": "Head Office", - "tellerId": 0, - "cashierName": "B, Ramesh" - }, - { - "id": 10, - "cashierId": 15, - "txnType": { - "id": 104, - "value": "Cash Out" - }, - "txnAmount": 8500, - "txnDate": "Feb 25, 2015 12:00:00 AM", - "entityId": 3, - "entityType": "loans", - "txnNote": "Disbursement, Loan:3-000000003,Client:3-Client 1", - "createdDate": "Feb 25, 2015 12:00:00 AM", - "officeId": 1, - "officeName": "Head Office", - "tellerId": 0, - "cashierName": "B, Ramesh" - }, - { - "id": 12, - "cashierId": 15, - "txnType": { - "id": 104, - "value": "Cash Out" - }, - "txnAmount": 10000, - "txnDate": "Feb 1, 2015 12:00:00 AM", - "entityId": 4, - "entityType": "loans", - "txnNote": "Disbursement, Loan:4-000000004,Client:4-Client 2", - "createdDate": "Feb 25, 2015 12:00:00 AM", - "officeId": 1, - "officeName": "Head Office", - "tellerId": 0, - "cashierName": "B, Ramesh" - }, - { - "id": 14, - "cashierId": 15, - "txnType": { - "id": 103, - "value": "Cash In" - }, - "txnAmount": 1266.52, - "txnDate": "Feb 1, 2015 12:00:00 AM", - "entityId": 4, - "entityType": "loans", - "txnNote": "Repayment, Loan:4-000000004,Client:4-Client 2", - "createdDate": "Feb 25, 2015 12:00:00 AM", - "officeId": 1, - "officeName": "Head Office", - "tellerId": 0, - "cashierName": "B, Ramesh" - }, - { - "id": 13, - "cashierId": 15, - "txnType": { - "id": 101, - "value": "Allocate Cash" - }, - "txnAmount": 50000, - "txnDate": "Feb 1, 2015 12:00:00 AM", - "entityId": 0, - "entityType": "", - "txnNote": "cash allocated on 1st Feb 2015", - "createdDate": "Feb 25, 2015 12:00:00 AM", - "officeId": 1, - "officeName": "Head Office", - "tellerId": 10, - "tellerName": "Ramesh(Teller/Cashier)", - "cashierName": "B, Ramesh" - }, - { - "id": 15, - "cashierId": 15, - "txnType": { - "id": 104, - "value": "Cash Out" - }, - "txnAmount": 10000, - "txnDate": "Feb 1, 2015 12:00:00 AM", - "entityId": 5, - "entityType": "loans", - "txnNote": "Disbursement, Loan:5-000000005,Client:5-Suresh D", - "createdDate": "Feb 25, 2015 12:00:00 AM", - "officeId": 1, - "officeName": "Head Office", - "tellerId": 0, - "cashierName": "B, Ramesh" - }, - { - "id": 17, - "cashierId": 15, - "txnType": { - "id": 103, - "value": "Cash In" - }, - "txnAmount": 1266.52, - "txnDate": "Feb 1, 2015 12:00:00 AM", - "entityId": 5, - "entityType": "loans", - "txnNote": "Repayment, Loan:5-000000005,Client:5-Suresh D", - "createdDate": "Feb 25, 2015 12:00:00 AM", - "officeId": 1, - "officeName": "Head Office", - "tellerId": 0, - "cashierName": "B, Ramesh" - }, - { - "id": 14, - "cashierId": 15, - "txnType": { - "id": 102, - "value": "Settle Cash" - }, - "txnAmount": 10000, - "txnDate": "Feb 1, 2015 12:00:00 AM", - "entityId": 0, - "entityType": "", - "txnNote": "cash settlement on 1 feb with 10k", - "createdDate": "Feb 25, 2015 12:00:00 AM", - "officeId": 1, - "officeName": "Head Office", - "tellerId": 10, - "tellerName": "Ramesh(Teller/Cashier)", - "cashierName": "B, Ramesh" - } - ] - -
-
+ "amount":200, + "locale":"en", + "dateFormat":"dd MMMM yyyy", + "transactionDate":"01 September 2015" + } +
+ - + { + "officeId":1, + "clientId":189, + "resourceId":157, + "transactionId":"221" + } + +
+
+   +
+
+

Waive a Client Charge

+

+
This API provides the facility of waiving off the remaining amount on a client charge +

-   -
-
-

Allocate Cash To Cashier

-

- - - - - - - -
Mandatory Fields
Date, Amount, Currency, Notes/Comments
-


-
-
- - POST https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId}/allocate - - - POST tellers/1/cashiers/1/allocate?command=allocate - { - "currencyCode":"USD", - "txnAmount":"5000", - "txnNote":"allocating cash", - "locale":"en", - "dateFormat":"dd MMMM yyyy", - "txnDate":"01 February 2015" - } - - - { - "resourceId":1, - "subResourceId":4 - } - -
-
+
+
+ + POST https://DomainName/api/v1/clients/{clientId}/charges/{clientChargeId}?command=waive + + + POST clients/189/charges/157?command=waive + Content-Type: application/json + No Request Body + + + { + "clientId":"189", + "resourceId":157 + } + +
+
-   -
-
-

Settle Cash From Cashier

-

- - - - - - - -
Mandatory Fields
Date, Amount, Currency, Notes/Comments
-


-
-
- - POST https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId}/settle - - - POST tellers/1/cashiers/1/settle?command=settle - { - "currencyCode":"USD", - "txnAmount":"2000", - "txnNote":"cash settlement", - "locale":"en", - "dateFormat":"dd MMMM yyyy", - "txnDate":"20 February 2015" - } - - - { - "resourceId":1, - "subResourceId":5 - } - -
-
+   +
+
+

Undo a Client Transaction

+
+
+ + POST https://DomainName/api/v1/clients/{clientId}/transactions/{transactionId}?command=undo + + + POST clients/189/transactions/222?command=undo + Content-Type: application/json + No Request Body + + -   -
-
-

Transactions Wtih Summary For Cashier

-


-
-
- - GET https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId}/summaryandtransactions - - - { - "sumCashAllocation":7000.000000, - "sumInwardCash":0, - "sumOutwardCash":0, - "sumCashSettlement":50.000000, - "netCash":6950.000000, - "officeName":"Head Office", - "tellerId":1, - "tellerName":"Teller1", - "cashierId":1, - "cashierName":"Staff1, Test", - "cashierTransactions":[ - { - "id":2, - "cashierId":1, - "txnType":{ - "id":101, - "value":"Allocate Cash" - }, - "txnAmount":2000.000000, - "txnDate":"Feb 20, 2015 12:00:00 AM", - "entityId":0, - "entityType":"", - "txnNote":"aaaa", - "createdDate":"Feb 20, 2015 12:00:00 AM", - "officeId":1, - "officeName":"Head Office", - "tellerId":1, - "tellerName":"Teller1", - "cashierName":"Staff1, Test" - }, - { - "id":3, - "cashierId":1, - "txnType":{ - "id":102, - "value":"Settle Cash" - }, - "txnAmount":50.000000, - "txnDate":"Feb 20, 2015 12:00:00 AM", - "entityId":0, - "entityType":"", - "txnNote":"bbbbbb", - "createdDate":"Feb 20, 2015 12:00:00 AM", - "officeId":1, - "officeName":"Head Office", - "tellerId":1, - "tellerName":"Teller1", - "cashierName":"Staff1, Test" - }, - { - "id":4, - "cashierId":1, - "txnType":{ - "id":101, - "value":"Allocate Cash" - }, - "txnAmount":5000.000000, - "txnDate":"Feb 1, 2015 12:00:00 AM", - "entityId":0, - "entityType":"", - "txnNote":"allocating cash", - "createdDate":"Feb 23, 2015 12:00:00 AM", - "officeId":1, - "officeName":"Head Office", - "tellerId":1, - "tellerName":"Teller1", - "cashierName":"Staff1, Test" - } - ] - } - -
-
+ { + "officeId":1, + "clientId":189, + "resourceId":222 + } +
+
+
+ +   +
+
+

Delete a UGD

+
+
+ + DELETE https://DomainName/api/v1/templates/{templateId} + + + DELETE templates/1 + Content-Type: application/json + No Request Body: + + + { + "resourceId": 1 + } + +
+
+ + +   +
+
+

SPM API

+

+ The Apache Fineract SPM API provides the ability to create custom surveys to collect social + performance measurentment data or any additional questionnaire a financial institute want to + collect. +

+
+
+   +
+
+

Create a Survey

+

Adds a new survey to collect client related data.

+ + + + + + + +
+
Mandatory Fields
+
countryCode, key, name, questions, responses, sequenceNo, text, value
+
+
+ + POST https://DomainName/api/v1/surveys + + + POST surveys + Content-Type: application/json + Request Body: + { + "key":"ppi-kenya-2010", + "name":"PPI Survey for Kenya, version 2010", + "description":null, + "countryCode":"KE", + "validFrom":null, + "validTo":null, + "componentDatas": + [ + { + "key":"Household", + "text":"Information about the household.", + "description":null, + "sequenceNo":1 + } + ], + "questionDatas": + [ + { + "componentKey":"Household", + "key":"Familiy members", + "text":"How many persons live in the household?", + "description":null, + "sequenceNo":1, + "responseDatas": + [ + { + "text":"1 to 3", + "value":1, + "sequenceNo":1 + }, + { + "text":"3 to 7", + "value":5, + "sequenceNo":2 + }, + { + "text":"more than 7", + "value":13, + "sequenceNo":3 + } + ] + } + ] + } + + + 200 OK + +
+
+   +
+
+

List all Surveys

+
+
+ + GET https://DomainName/api/v1/surveys + + + GET surveys + Content-Type: application/json + No Request Body + + + [ + { + "id": 1, + "componentDatas": [ + { + "id": 1, + "key": "Household", + "text": "Information about the household.", + "description": null, + "sequenceNo": 1 + } + ], + "questionDatas": [ + { + "id": 1, + "responseDatas": [ + { + "id": 1, + "text": "1 to 3", + "value": 1, + "sequenceNo": 1 + }, + { + "id": 2, + "text": "3 to 7", + "value": 5, + "sequenceNo": 2 + }, + { + "id": 3, + "text": "more than 7", + "value": 13, + "sequenceNo": 3 + } + ], + "componentKey": "Household", + "key": "Familiy members", + "text": "How many persons live in the household?", + "description": null, + "sequenceNo": 1 + } + ], + "key": "ppi-kenya-2010", + "name": "PPI Survey for Kenya, version 2010", + "description": null, + "countryCode": "KE", + "validFrom": 1450047600000, + "validTo": 4607276399000 + } + ] + +
+
+   +
+
+

Retrieve a Survey

+
+
+ + GET https://DomainName/api/v1/surveys/1 + + + GET surveys/1 + Content-Type: application/json + No Request Body + + + { + "id": 1, + "componentDatas": [ + { + "id": 1, + "key": "Household", + "text": "Information about the household.", + "description": null, + "sequenceNo": 1 + } + ], + "questionDatas": [ + { + "id": 1, + "responseDatas": [ + { + "id": 1, + "text": "1 to 3", + "value": 1, + "sequenceNo": 1 + }, + { + "id": 2, + "text": "3 to 7", + "value": 5, + "sequenceNo": 2 + }, + { + "id": 3, + "text": "more than 7", + "value": 13, + "sequenceNo": 3 + } + ], + "componentKey": "Household", + "key": "Familiy members", + "text": "How many persons live in the household?", + "description": null, + "sequenceNo": 1 + } + ], + "key": "ppi-kenya-2010", + "name": "PPI Survey for Kenya, version 2010", + "description": null, + "countryCode": "KE", + "validFrom": 1450047600000, + "validTo": 4607276399000 + } + +
+
+   +
+
+

Deactivate Survey

+
+
+ + DELETE https://DomainName/api/v1/surveys/1 + + + DELETE surveys/1 + Content-Type: application/json + No Request Body + + + 200 OK + +
+
+   +
+
+

Create a Lookup Table entry

+

Add a new netry to a survey.

+ + + + + + + +
+
Mandatory Fields
+
key, score, validFrom, validTo
+
+
+ + POST https://DomainName/api/v1/surveys/1/lookuptables + + + POST surveys/1/lookuptables + Content-Type: application/json + Request Body: + { + "key": "test-table", + "description": null, + "entries": [ + { + "valueFrom": 0, + "valueTo": 25, + "score": 100 + }, + { + "valueFrom": 26, + "valueTo": 50, + "score": 50 + }, + { + "valueFrom": 51, + "valueTo": 75, + "score": 25 + }, + { + "valueFrom": 76, + "valueTo": 100, + "score": 0 + } + ] + } + + + 200 OK + +
+
+   +
+
+

List all Lookup Table entries

+

List all Lookup Table entries for a survey.

+
+
+ + GET https://DomainName/api/v1/surveys/1/lookuptables + + + GET surveys/1/lookuptables + Content-Type: application/json + No Request Body + + + [ + { + "key": "test-table", + "description": null, + "entries": [ + { + "valueFrom": 0, + "valueTo": 25, + "score": 100 + }, + { + "valueFrom": 26, + "valueTo": 50, + "score": 50 + }, + { + "valueFrom": 51, + "valueTo": 75, + "score": 25 + }, + { + "valueFrom": 76, + "valueTo": 100, + "score": 0 + } + ] + } + ] + +
+
+   +
+
+

Retrieve a Lookup Table entry

+

Retrieve a Lookup Table entry for a survey.

+
+
+ + GET https://DomainName/api/v1/surveys/1/lookuptables/1 + + + GET surveys/1/lookuptables/test-table + Content-Type: application/json + No Request Body + + + { + "key": "test-table", + "description": null, + "entries": [ + { + "valueFrom": 0, + "valueTo": 25, + "score": 100 + }, + { + "valueFrom": 26, + "valueTo": 50, + "score": 50 + }, + { + "valueFrom": 51, + "valueTo": 75, + "score": 25 + }, + { + "valueFrom": 76, + "valueTo": 100, + "score": 0 + } + ] + } + +
+
-   -
-
-

Retrieve Cashier Transaction Template

-


-
-
- - GET https://DomainName/api/v1/tellers/{tellerId}/cashiers/{cashierId}/transactions/template - - - { - "cashierId":1, - "officeName":"Head Office", - "tellerId":1, - "tellerName":"Teller1", - "cashierName":"Staff1, Test", - "cashierData":{ - "id":1, - "tellerId":1, - "staffId":1, - "description":"", - "startDate":"Feb 20, 2015 12:00:00 AM", - "endDate":"Feb 27, 2015 12:00:00 AM", - "isFullDay":true, - "startTime":"", - "endTime":"", - "tellerName":"Teller1", - "staffName":"Staff1, Test" - }, - "startDate":"Feb 20, 2015 12:00:00 AM", - "endDate":"Feb 27, 2015 12:00:00 AM", - "currencyOptions":[ - { - "code":"USD", - "name":"US Dollar", - "decimalPlaces":2, - "displaySymbol":"$", - "nameCode":"currency.USD", - "displayLabel":"US Dollar ($)" - } - ] - } - -
-
+   +
+
+

Create a Scorecard entry

+

Add a new netry to a survey.

+ + + + + + + +
+
Mandatory Fields
+
clientId, createdOn, questionId, responseId, staffId
+
+
+ + POST https://DomainName/api/v1/surveys/1/scorecards + + + POST surveys/1/scorecards + Content-Type: application/json + Request Body: + { + "userId": 1, + "clientId": 1, + "createdOn": 1451905784553, + "scorecardValues": + [ + { + "questionId": 1, + "responseId": 1, + "value": 0 + }, + { + "questionId": 2, + "responseId": 8, + "value": 0 + }, + { + "questionId": 3, + "responseId": 12, + "value": 7 + }, + { + "questionId": 4, + "responseId": 16, + "value": 4 + }, + { + "questionId": 5, + "responseId": 21, + "value": 2 + }, + { + "questionId": 6, + "responseId": 25, + "value": 2 + }, + { + "questionId": 7, + "responseId": 28, + "value": 3 + }, + { + "questionId": 8, + "responseId": 30, + "value": 6 + }, + { + "questionId": 9, + "responseId": 33, + "value": 4 + }, + { + "questionId": 10, + "responseId": 37, + "value": 7 + } + ] + } + + 200 OK + +
+
+   +
+
+

List all Scorecard entries

+

List all Scorecard entries for a survey.

+
+
+ + GET https://DomainName/api/v1/surveys/1/scorecards + + + GET surveys/1/scorecards + Content-Type: application/json + No Request Body + + + [ + { + "userId": 1, + "clientId": 1, + "createdOn": 1451905784553, + "scorecardValues": + [ + { + "questionId": 1, + "responseId": 1, + "value": 0 + }, + { + "questionId": 2, + "responseId": 8, + "value": 0 + }, + { + "questionId": 3, + "responseId": 12, + "value": 7 + }, + { + "questionId": 4, + "responseId": 16, + "value": 4 + }, + { + "questionId": 5, + "responseId": 21, + "value": 2 + }, + { + "questionId": 6, + "responseId": 25, + "value": 2 + }, + { + "questionId": 7, + "responseId": 28, + "value": 3 + }, + { + "questionId": 8, + "responseId": 30, + "value": 6 + }, + { + "questionId": 9, + "responseId": 33, + "value": 4 + }, + { + "questionId": 10, + "responseId": 37, + "value": 7 + } + ] + } + ] + +
+
+ + +
+
+

Self Service APIs

+
+
+   +
+
+

Verify authentication

+

Authenticates the credentials provided and returns the set roles and permissions allowed.

+
+
+ + POST https://DomainName/api/v1/self/authentication + + + POST self/authentication + Content-Type: application/json + Request Body + { + "username": "mifos", + "password": "password" + } + +

Example response of autentication for user

+ + { + "username": "mifos", + "userId": 1, + "base64EncodedAuthenticationKey": "bWlmb3M6cGFzc3dvcmQ=", + "authenticated": true, + "officeId": 1, + "officeName": "Head Office", + "staffId": 1, + "staffDisplayName": "Director, Program", + "organisationalRole": { + "id": 100, + "code": "staffOrganisationalRoleType.programDirector", + "value": "Program Director" + }, + "roles": [ + { + "id": 1, + "name": "Super user", + "description": "This role provides all application permissions." + } + ], + "permissions": [ + "ALL_FUNCTIONS" + ], + "isSelfServiceUser": true, + "clients": [1,2,3] + } + + + POST self/authentication?username=mifos&password=fail + Content-Type: application/json + No Request Body + + + { + "developerMessage": "Invalid authentication details were passed in api request.", + "developerDocLink": "https://github.com/openMF/mifosx/wiki/HTTP-API-Error-codes", + "httpStatusCode": "401", + "defaultUserMessage": "Unauthenticated. Please login.", + "userMessageGlobalisationCode": "error.msg.not.authenticated", + "errors": [] + } + +
+
+   +
+
+

Fetch authenticated user details

+

checks the Authentication and returns the set roles and permissions allowed.

+
+
+ + POST https://DomainName/api/v1/self/userdetails + + + POST self/userdetails + Content-Type: application/json + No Request Body + +

Example response of authenticated user.

+ + { + "username": "mifos", + "userId": 1, + "base64EncodedAuthenticationKey": "bWlmb3M6cGFzc3dvcmQ=", + "authenticated": true, + "officeId": 1, + "officeName": "Head Office", + "staffId": 1, + "staffDisplayName": "Director, Program", + "organisationalRole": { + "id": 100, + "code": "staffOrganisationalRoleType.programDirector", + "value": "Program Director" + }, + "roles": [ + { + "id": 1, + "name": "Super user", + "description": "This role provides all application permissions." + } + ], + "permissions": [ + "ALL_FUNCTIONS" + ], + "isSelfServiceUser": true, + "clients": [1,2,3] + } + - - -   -
-
-

Payment Type

-

This defines the payment type - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
name
Name the payment type -
description
- Description of payment type -
isCashPayment
- Determines weather the payment type is cash or not. -
position
- Can set the order in which the payment type should be displayed. -
-

-
-   -
-
-

Create a Payment Type

-

Creates a new Payment type

- - - - - - - -
Mandatory Fields
name
- - - - - - - -
Optional Fields
Description, isCashPayment,Position
-
-
- - POST https://DomainName/api/v1/paymenttypes - - - POST paymenttype - Content-Type: application/json - Request Body: - { - "name":"cash", - "description":"cash payment type", - "isCashPayment":true, - "position":1 - } - - - { - "resourceId": 1 - } - -
-
-   -
-
-

Retrieve all Payment Types

-

Retrieve list of payment types

+
+
+   +
+
+

Update User

+

This API can be used by Self Service user to update their own user information. Currently, "password" + and "repeatPassword" are the only parameters accepted.

+
+
+ + PUT https://DomainName/api/v1/self/user + + + PUT self/user + Content-Type: application/json -
-
-
- - GET https://DomainName/api/v1/paymenttypes - - - [ - { - "id": 24, - "name": "PTC", - "description": "Cash", - "isCashPayment": true, - "position": 0 - }, - { - "id": 25, - "name": "mPay", - "description": "not chash payment", - "isCashPayment": false, - "position": 0 - }, - { - "id": 26, - "name": "mPesa", - "description": "non cash payment", - "isCashPayment": false, - "position": 0 - }, - { - "id": 27, - "name": "Mobile Money", - "description": "money transferred through mobile", - "isCashPayment": false, - "position": 0 - }, - { - "id": 13, - "name": "cash", - "description": "cash Payment", - "isCashPayment": true, - "position": 1 - } - ] - -
-
-   -
-
-

Retrieve a Payment Type

-

Retrieves a payment type

-
-
- - GET https://DomainName/api/v1/paymenttypes/{paymentTypeId} - - - { - "id": 13, - "name": "cash", - "description": "cash Payment", - "isCashPayment": true, - "position": 1 - } - -
-
-   -
-
-

Update a Payment Type

-
-
- - PUT https://DomainName/api/v1/paymenttypes/{paymnetTypeId} - - - PUT /paymenttypes/13 - { - "name":"mPay", - "description":"not a cash payment type", - "isCashPayment":false, - "position":3 - } - - - { - "resourceId": 13 - } - -
-
-   -
-
-

Delete a Payment Type

-

Deletes payment type

-
-
- - DELETE https://DomainName/api/v1/paymenttypes/{paymentTypeId} - - - DELETE paymnettypes/13 - Content-Type: application/json - No Request Body: - - - { - "resourceId": 13 - } - -
-
- -   -
-
-

Provisioning Criteria

-

This defines the Provisioning Criteria - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
Provisioning Criteria Name
Name the Provisioning Criteria -
Loan Products
- Select all loan products for which provisioning criteria to be associated -
Provisioning Categories
- Define minimum, maximum, percentage, liability account, expense account for all provisioning categories -
-

-
+ { + "password":"Abcd1234", + "repeatPassword":"Abcd1234" + } +
+

Example response

+ + { + "officeId": 1, + "resourceId": 6, + "changes": { + "passwordEncoded": "6a72a630795be86fe926ce540fc45b6b922fe5ba130f185fe806a26b5e5efcdd" + } + } + +
+
-   -
-
-

Create a new Provisioning Criteria

-

Creates a new Provisioning Criteria

- - - - - - - - - - -
Mandatory Fields
criteriaName
provisioningcriteria
- - - - - - - -
Optional Fields
loanProducts
-
-
- - POST https://DomainName/api/v1/provisioningcriteria - - - POST provisioningcriteria - Content-Type: application/json - Request Body: - { - "criteriaName":"High Risk Products Criteria", - "loanProducts": [ - {"id": 1, - "name": "LOAN_PRODUCT_3ODPK1", - "includeInBorrowerCycle": false}, - {"id": 2, - "name": "LOAN_PRODUCT_BXW8NC", - includeInBorrowerCycle": false} - ], - "provisioningcriteria": [ - {"categoryId": 1, - "categoryName": "STANDARD", - "minAge": 0, - "maxAge": 3, - "provisioningPercentage": 1, - "liabilityAccount": 8, - "expenseAccount": 14}, - {"categoryId": 2, - "categoryName": "SUB-STANDARD", - "minAge": 1, - "maxAge": 5, - "provisioningPercentage": 2, - "liabilityAccount": 13, - "expenseAccount": 13}, - {"categoryId": 3, - "categoryName": "DOUBTFUL", - "minAge": 2, - "maxAge": 6, - "provisioningPercentage": 3, - "liabilityAccount": 9, - "expenseAccount": 10}, - {"categoryId": 4, - "categoryName": "LOSS", - "minAge": 3, - "maxAge": 7, - "provisioningPercentage": 4, - "liabilityAccount": 10, - "expenseAccount": 9}] - } - - - { - "resourceId": 1 - } - -
-
-   -
-
-

Retrieves all created Provisioning Criterias

-

Retrieves all created Provisioning Criterias

-
-
- - GET https://DomainName/api/v1/provisioningcriteria - - - GET provisioningcriteria - Content-Type: application/json - Request Body: - { - } - - - { - [ - {"criteriaId":1, - "criteriaName":"High Risk Products Criteria", - "createdBy":"mifos"}, - {"criteriaId":2, - "criteriaName":"Low Risk Products Criteria", - "createdBy":"mifos"} - ] - } - -
-
-   -
-
-

Retrieves a Provisioning Criteria

-

Retrieves a Provisioning Criteria

-
-
- - GET https://DomainName/api/v1/provisioningcriteria/{criteriaId} - - - GET provisioningcriteria/{criteriaId} - Content-Type: application/json - Request Body: - { - } - - - { - "criteriaId":1 - "criteriaName":"High Risk Products Criteria", - "loanProducts": [ - {"id": 1, - "name": "LOAN_PRODUCT_3ODPK1", - "includeInBorrowerCycle": false}, - {"id": 2, - "name": "LOAN_PRODUCT_BXW8NC", - includeInBorrowerCycle": false} - ], - "provisioningcriteria": [ - {"categoryId": 1, - "categoryName": "STANDARD", - "minAge": 0, - "maxAge": 3, - "provisioningPercentage": 1, - "liabilityAccount": 8, - "expenseAccount": 14}, - {"categoryId": 2, - "categoryName": "SUB-STANDARD", - "minAge": 1, - "maxAge": 5, - "provisioningPercentage": 2, - "liabilityAccount": 13, - "expenseAccount": 13}, - {"categoryId": 3, - "categoryName": "DOUBTFUL", - "minAge": 2, - "maxAge": 6, - "provisioningPercentage": 3, - "liabilityAccount": 9, - "expenseAccount": 10}, - {"categoryId": 4, - "categoryName": "LOSS", - "minAge": 3, - "maxAge": 7, - "provisioningPercentage": 4, - "liabilityAccount": 10, - "expenseAccount": 9}] - } - -
-
-   -
-
-

Updates a new Provisioning Criteria

-

Updates a new Provisioning Criteria

- - - - - - - -
Optional Fields
criteriaName, loanProducts, provisioningcriteria
-
-
- - PUT https://DomainName/api/v1/provisioningcriteria/{criteriaId} - - - PUT provisioningcriteria/{criteriaId} - Content-Type: application/json - Request Body: - { - "criteriaName":"High Risk Products Criteria1", - "loanProducts": [ - {"id": 1, - "name": "LOAN_PRODUCT_3ODPK1", - "includeInBorrowerCycle": false}, - {"id": 2, - "name": "LOAN_PRODUCT_BXW8NC", - includeInBorrowerCycle": false} - ], - "provisioningcriteria": [ - {"categoryId": 1, - "categoryName": "STANDARD", - "minAge": 0, - "maxAge": 3, - "provisioningPercentage": 1, - "liabilityAccount": 8, - "expenseAccount": 14}, - {"categoryId": 2, - "categoryName": "SUB-STANDARD", - "minAge": 1, - "maxAge": 5, - "provisioningPercentage": 2, - "liabilityAccount": 13, - "expenseAccount": 13}, - {"categoryId": 3, - "categoryName": "DOUBTFUL", - "minAge": 2, - "maxAge": 6, - "provisioningPercentage": 3, - "liabilityAccount": 9, - "expenseAccount": 10}, - {"categoryId": 4, - "categoryName": "LOSS", - "minAge": 3, - "maxAge": 7, - "provisioningPercentage": 4, - "liabilityAccount": 10, - "expenseAccount": 9}] - } - - - { - "resourceId": 1, - "changes": { - "criteriaName": "High Risk Products Criteria1" - } - } - -
-
-   -
-
-

Deletes Provisioning Criteria

-

Deletes Provisioning Criteria

-
-
- - DELETE https://DomainName/api/v1/provisioningcriteria/{criteriaId} - - - DELETE provisioningcriteria/{criteriaId} - Content-Type: application/json - Request Body: - { - } - - - { - "resourceId": 1, - } - -
-
- - -   -
-
-

Floating Rates

-

This defines the Floating Rates

- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
name
Name of the Floating Rate, must be unique -
isBaseLendingRate
- Identifies the Floating Rate scheme to be Base Lending Rate. Only one scheme can be Base Lending Rate at any given point of time. default is false. -
isActive
- Identify if Floating Rate scheme is active or not. default is true. -
ratePeriods
- Array of ratePeriod JSON objects as defined in below section. -
-

This defines the Floating Rates Periods

- - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions for ratePeriods
fromDate
Start date from which this rate has to be considered. Should be a future date. -
interestRate
- Interest Rate applicable. -
isDifferentialToBaseLendingRate
- If false, interestRate field is considered absolute. - If true, interestRate field is considered differential to Base Lending Rate as of the startDate. - Cannot be used if there is no scheme defined as Base Lending Rate. -
-
-
+   +
+
+

List Clients associated to the user

+

The list capability of clients can support pagination and sorting.

+
Optional Arguments
+
+
offset
+
+ Integer optional, defaults to 0 +
+
Indicates the result from which pagination starts
+ +
limit
+
+ Integer optional, defaults to 200 +
+
Restricts the size of results returned. To override the default and return all entries you must + explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1 +
+ +
orderBy
+
+ String optional, one of displayName, accountNo, officeId, officeName +
+
Orders results by the indicated field.
+ +
sortBy
+
+ String optional, one of ASC, DESC +
+
Indicates what way to order results if orderBy is used.
+ +
displayName
+
+ String optional +
+
Use displayName of clients to restrict results.
+ +
firstName
+
+ String optional +
+
Use firstName of clients to restrict results.
+ +
lastName
+
+ String optional +
+
Use lastName of clients to restrict results.
+ +
+

Example Requests:

+
self/clients
+
+
self/clients?fields=displayName,officeName
+
+
self/clients?offset=10&limit=50
+
+
self/clients?orderBy=displayName&sortOrder=DESC
+
+
+ + GET https://DomainName/api/v1/self/clients + + + { + "totalFilteredRecords": 2, + "pageItems": [ + { + "id": 1, + "accountNo": "000000001", + "status": { + "id": 300, + "code": "clientStatusType.active", + "value": "Active" + }, + "active": true, + "activationDate": [ + 2013, + 3, + 1 + ], + "fullname": "Small shop", + "displayName": "Small shop", + "officeId": 1, + "officeName": "Head Office" + }, + { + "id": 2, + "accountNo": "000000002", + "status": { + "id": 100, + "code": "clientStatusType.pending", + "value": "Pending" + }, + "active": false, + "fullname": "Home Farm Produce", + "displayName": "Home Farm Produce", + "officeId": 1, + "officeName": "Head Office" + } + ] + } + +
+
+ +   +
+
+

Retrieve a Client

+

Example Requests:

+
self/clients/1
+
+
self/clients/1?fields=id,displayName,officeName
+
+
+ + GET https://DomainName/api/v1/self/clients/{clientId} + + + { + "id": 27, + "accountNo": "000000027", + "status": { + "id": 300, + "code": "clientStatusType.active", + "value": "Active" + }, + "active": true, + "activationDate": [ + 2013, + 1, + 1 + ], + "firstname": "savings", + "lastname": "test", + "displayName": "savings test", + "officeId": 1, + "officeName": "Head Office", + "timeline": { + "submittedOnDate": [ + 2013, + 1, + 1 + ], + "submittedByUsername": "mifos", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator", + "activatedOnDate": [ + 2013, + 1, + 1 + ], + "activatedByUsername": "mifos", + "activatedByFirstname": "App", + "activatedByLastname": "Administrator" + }, + "savingsProductId": 4, + "savingsProductName": "account overdraft", + "groups": [] + } + +
+
+   +
+
+

Retrieve client accounts overview

+

+ An example of how a loan portfolio summary can be provided. This + is requested in a specific use case of the community application.
It is quite reasonable to add + resources like this to simplify User Interface development. +

+

Example Requests:

+
self/clients/1/accounts
+
+
+
self/clients/1/accounts?fields=loanAccounts,savingsAccounts
+
+
+ + GET https://DomainName/api/v1/self/clients/{clientId}/accounts + + + { + "loanAccounts": [ + { + "id": 1, + "accountNo": "000000001", + "externalId": "456", + "productId": 1, + "productName": "TestOne", + "status": { + "id": 300, + "code": "loanStatusType.active", + "value": "Active", + "pendingApproval": false, + "waitingForDisbursal": false, + "active": true, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "loanType": { + "id": 1, + "code": "loanType.individual", + "value": "Individual" + }, + "loanCycle": 1 + } + ], + "savingsAccounts": [ + { + "id": 7, + "accountNo": "000000007", + "productId": 2, + "productName": "Other product", + "status": { + "id": 100, + "code": "savingsAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + }, + { + "id": 6, + "accountNo": "000000006", + "productId": 1, + "productName": "Passbook Savings", + "status": { + "id": 300, + "code": "savingsAccountStatusType.active", + "value": "Active", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": true, + "closed": false + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "accountBalance": 1828.03 + }, + { + "id": 5, + "accountNo": "000000005", + "productId": 1, + "productName": "Passbook Savings", + "status": { + "id": 400, + "code": "savingsAccountStatusType.withdrawn.by.applicant", + "value": "Withdrawn by applicant", + "submittedAndPendingApproval": false, + "approved": false, + "rejected": false, + "withdrawnByApplicant": true, + "active": false, + "closed": true + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + } + ] + } + +
+
-   -
-
-

Create a new Floating Rate

-

Creates a new Floating Rate

- - - - - - - -
Mandatory Fields
name
- - - - - - - - - - - - - -
Optional Fields
isBaseLendingRate
isActive
ratePeriods
-
-
- - POST https://DomainName/api/v1/floatingrates - - - POST floatingrates - Content-Type: application/json - Request Body: - { - "name":"Floating Rate 1", - "isBaseLendingRate":true, - "isActive":true, - "ratePeriods":[ - { - "fromDate":"19 November 2015", - "interestRate":10, - "locale":"en", - "dateFormat":"dd MMMM yyyy" - }, - { - "fromDate":"15 December 2015", - "interestRate":11, - "locale":"en", - "dateFormat":"dd MMMM yyyy" - } - ] - } - - - { - "resourceId": 1 - } - -
-
-   -
-
-

List Floating Rates

-

List Floating Rates

-
-
- - GET https://DomainName/api/v1/floatingrates - - - GET floatingrates - Content-Type: application/json - - - { - [ - { - "id": 1, - "name": "Floating Rate 1", - "isBaseLendingRate": true, - "isActive": true, - "createdBy": "mifos", - "createdOn": "Nov 18, 2015", - "modifiedBy": "mifos", - "modifiedOn": "Nov 18, 2015" - }, - { - "id": 2, - "name": "Floating Rate 2", - "isBaseLendingRate": false, - "isActive": true, - "createdBy": "mifos", - "createdOn": "Nov 18, 2015", - "modifiedBy": "mifos", - "modifiedOn": "Nov 18, 2015" - } - ] - } - -
-
-   -
-
-

Retrieve Floating Rate

-

Retrieve Floating Rate

-
-
- - GET https://DomainName/api/v1/floatingrates/1 - - - GET floatingrates - Content-Type: application/json - - - { - "id": 1, - "name": "Floating Rate 1", - "isBaseLendingRate": true, - "isActive": true, - "createdBy": "mifos", - "createdOn": "Nov 18, 2015", - "modifiedBy": "mifos", - "modifiedOn": "Nov 18, 2015", - "ratePeriods": - [ - { - "id": 1, - "fromDate": "Dec 15, 2015", - "interestRate": 11, - "isDifferentialToBaseLendingRate": false, - "isActive": true, - "createdBy": "mifos", - "createdOn": "Nov 18, 2015", - "modifiedBy": "mifos", - "modifiedOn": "Nov 18, 2015" - }, - { - "id": 2, - "fromDate": "Nov 19, 2015", - "interestRate": 10, - "isDifferentialToBaseLendingRate": false, - "isActive": true, - "createdBy": "mifos", - "createdOn": "Nov 18, 2015", - "modifiedBy": "mifos", - "modifiedOn": "Nov 18, 2015" - } - ] - } - -
-
-   -
-
-

Update Floating Rate

-

Updates new Floating Rate. Rate Periods in the past cannot be modified. - All the future rateperiods would be replaced with the new ratePeriods data sent.

-
-
- - PUT https://DomainName/api/v1/floatingrates/1 - - - PUT floatingrates - Content-Type: application/json - Request Body: - { - "name":"Floating Rate 1", - "isBaseLendingRate":true, - "isActive":true, - "ratePeriods":[ - { - "fromDate":"19 November 2015", - "interestRate":10, - "locale":"en", - "dateFormat":"dd MMMM yyyy" - }, - { - "fromDate":"15 December 2015", - "interestRate":11, - "locale":"en", - "dateFormat":"dd MMMM yyyy" - } - ] - } - - - { - "resourceId": 1, - "changes": - { - "ratePeriods": "[ - { - "fromDate":"19 November 2015", - "interestRate":10, - "locale":"en", - "dateFormat":"dd MMMM yyyy" - }, - { - "fromDate":"15 December 2015", - "interestRate":11, - "locale":"en", - "dateFormat":"dd MMMM yyyy" - } - ]" - } - } - -
-
- +   +
+
+

Retrieve Client Image

+

Optional arguments are identical to those of Get Image + associated with an Entity (Binary file)

+

Example Requests:

+
self/clients/1/images
+
+
+
+ + GET https://DomainName/api/v1/self/clients/{clientId}/images + Accept: text/plain - -   -
-
-

Tax Components

-

This defines the Tax Components

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
name
Name of the Tax component -
percentage
- Percentage that should be applied on a amount as tax. -
debitAccountType
- Debit Account type that should be applicable only for particular cases depending on requirement ex with hold tax doesn't require debit account for the accounting operation. . -
debitAccountId
- GL Account that should debited when tax applied. used only for particular cases depending on requirement ex with hold tax doesn't require debit account for the accounting operation. . -
- Credit Account type that should be applicable only for particular cases depending on requirement ex with hold tax require credit account for the accounting operation. . -
debitAccountId
- GL Account that should credited when tax applied. used only for particular cases depending on requirement ex with hold tax require only credit account for the accounting operation. . -
startDate
- Start date from which this tax component is applicable. -
-
-
+
+ + data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ + bWFnZVJlYWR5ccllPAAAAJ1JREFUeNpi+P//PwMIA4E9EG8E4idQDGLbw+WhiiqA+D8OXAFVAzbp + DxBvB2JLIGaGYkuoGEjOhhFIHAbij0BdPgxYACMj42ogJQpifwBiXSDeC8JIbt4LxSC5DyxQjTeB + +BeaYb+Q5EBOAVutCzMJHUNNPADzzDokiYdAfAmJvwLkGeTgWQfyKZICS6hYBTwc0QL8ORSjBDhA + gAEAOg13B6R/SAgAAAAASUVORK5CYII= + +
+
-   -
-
-

Create a new Tax Component

-

Creates a new Tax Component

- - - - - - - - - - -
Mandatory Fields
name
percentage
- - - - - - - - - - - - - - - - - - - -
Optional Fields
debitAccountType
debitAccountId
creditAccountType
creditAccountId
startDate
-
-
- - POST https://DomainName/api/v1/taxes/component - - - POST taxes/component - Content-Type: application/json - Request Body: - { - "name": "tax component 1", - "percentage": "10", - "creditAccountType": 2, - "creditAccountId": 4, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "startDate": "11 April 2016" - } - - - { - "resourceId": 1 - } - -
-
-   -
-
-

List Tax Components

-

List Tax Components/p> -

-
- - GET https://DomainName/api/v1/taxes/component - - - GET taxes/component - Content-Type: application/json - - - [{ - "id": 1, - "name": "tax component 1", - "percentage": 10.000000, - "creditAccountType": { - "id": 2, - "code": "accountType.liability", - "value": "LIABILITY" - }, - "creditAccount": { - "id": 4, - "name": "ACCOUNT_NAME_7BR9C", - "glCode": "LIABILITY_PA1460364665046" - }, - "startDate": [2016, - 4, - 11], - "taxComponentHistories": [{ - - }] - }, - { - "id": 2, - "name": "tax component 2", - "percentage": 10.000000, - "creditAccountType": { - "id": 2, - "code": "accountType.liability", - "value": "LIABILITY" - }, - "creditAccount": { - "id": 4, - "name": "ACCOUNT_NAME_7BR9C", - "glCode": "LIABILITY_PA1460364665046" - }, - "startDate": [2016, - 4, - 11], - "taxComponentHistories": [{ - - }] - }] - -
-
-   -
-
-

Retrieve Tax Component

-

Retrieve Tax Component

-
-
- - GET https://DomainName/api/v1/taxes/component/1 - - - GET taxes/component/1 - Content-Type: application/json - - - { - "id": 1, - "name": "tax component 1", - "percentage": 10.000000, - "creditAccountType": { - "id": 2, - "code": "accountType.liability", - "value": "LIABILITY" - }, - "creditAccount": { - "id": 4, - "name": "ACCOUNT_NAME_7BR9C", - "glCode": "LIABILITY_PA1460364665046" - }, - "startDate": [2016, - 4, - 11], - "taxComponentHistories": [{ - - }] - } - -
-
-   -
-
-

Update Tax Component

-

Updates Tax component. Debit and credit account details cannot be modified. - All the future tax components would be replaced with the new percentage.

-
-
- - PUT https://DomainName/api/v1/taxes/component/1 - - - PUT taxes/component/1 - Content-Type: application/json - Request Body: - { - "name": "tax component 2", - "percentage": "15", - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "startDate": "15 April 2016" - } - - - { - "resourceId": 1, - "changes": { - "percentage": 15, - "name": "tax component 2", - "startDate": [2016, - 4, - 15] - } - } - -
-
- +   +
+
+

List Client Charges

+ +

The list capability of client charges supports pagination.

+
Optional Arguments
+
+
offset
+
+ Integer Mandatory, defaults to 0 +
+
Indicates the result from which pagination starts
+ +
limit
+
+ Integer Mandatory, defaults to 200 +
+
Restricts the size of results returned. To override the default and return all entries you must + explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1 +
+ +
pendingPayment
+
+ String optional +
+
Filters charges that are pending payment (neither paid or waived).
+ +
chargeStatus
+
+ String optional +
+
Filters charges according to the status.
+
+

Example Requests:

+
self/clients/1/charges
+
self/clients/1/charges?offset=0&limit=5
+
+
+ + GET https://DomainName/api/v1/self/clients/{clientId}/charges?limit=5&offset=0 + + + GET self/clients/1/charges?limit=5&offset=0 + Content-Type: application/json + No Request Body + + + { + "totalFilteredRecords": 4, + "pageItems": [ + { + "id": 5, + "clientId": 1, + "chargeId": 6, + "name": "Client Fees 2", + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "dueDate": [ + 2015, + 9, + 1 + ], + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 550.000000, + "amountPaid": 0.000000, + "amountWaived": 0.000000, + "amountWrittenOff": 0, + "amountOutstanding": 550.000000, + "penalty": false, + "isActive": true, + "isPaid": false, + "isWaived": false + }, + { + "id": 4, + "clientId": 1, + "chargeId": 5, + "name": "Client Fee 1", + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "dueDate": [ + 2015, + 8, + 31 + ], + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 120.000000, + "amountPaid": 0.000000, + "amountWaived": 120.000000, + "amountWrittenOff": 0, + "amountOutstanding": 120.000000, + "penalty": true, + "isActive": true, + "isPaid": false, + "isWaived": true + }, + { + "id": 3, + "clientId": 1, + "chargeId": 5, + "name": "Client Fee 1", + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "dueDate": [ + 2015, + 8, + 17 + ], + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100.000000, + "amountPaid": 0.000000, + "amountWaived": 100.000000, + "amountWrittenOff": 0, + "amountOutstanding": 0.000000, + "penalty": true, + "isActive": true, + "isPaid": false, + "isWaived": true + }, + { + "id": 2, + "clientId": 1, + "chargeId": 2, + "name": "Recurring savings Charge", + "chargeTimeType": { + "id": 7, + "code": "chargeTimeType.monthlyFee", + "value": "Monthly Fee" + }, + "dueDate": [ + 2015, + 8, + 17 + ], + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100.000000, + "amountPaid": 0, + "amountWaived": 100.000000, + "amountWrittenOff": 0, + "amountOutstanding": 0.000000, + "penalty": false, + "isActive": true, + "isPaid": false, + "isWaived": true + } + ] + } + + +
+
+   +
+
+

Retrieve a Client Charge

+
Arguments
+
+
associations
+
+ optional, a comma separated list of + 'associations' (itemised below). +
+
+
Associations are just extra pieces of data that you + might or might not want to retrieve.
+
+
+
+ 'transactions': Retrieves all transactions made on this client charge. +
+
+

Example Requests:

+
self/clients/1/charges/1
+
+
+
self/clients/1/charges/1?fields=name,id
+
+
+ + GET https://DomainName/api/v1/self/clients/{clientId}/charges/{clientChargeId} + + + { + "id": 3, + "clientId": 1, + "chargeId": 5, + "name": "Client Fee 1", + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "dueDate": [ + 2015, + 8, + 17 + ], + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100.000000, + "amountPaid": 0.000000, + "amountWaived": 100.000000, + "amountWrittenOff": 0, + "amountOutstanding": 0.000000, + "penalty": true, + "isActive": true, + "isPaid": false, + "isWaived": true + } + +
+
- -   -
-
-

Tax Group

-

This defines the Tax Group

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
name
Name of the Tax Group -
taxComponents
- Array of tax components to be added part of tax group. -
id
- Tax group and tax component mapping id. -
taxComponentId
- Tax component id. -
startDate
- Start date from which this tax component is applicable. -
endDate
- End date from which this tax component is applicable. -
-
-
+   +
+
+

List Client Transactions

+

The list capability of client transaction can support pagination.

+
Mandatory Arguments
+
+
offset
+
+ Integer Mandatory, defaults to 0 +
+
Indicates the result from which pagination starts
+ +
limit
+
+ Integer Mandatory, defaults to 200 +
+
Restricts the size of results returned. To override the default and return all entries you must + explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1 +
+
+

Example Requests:

+
self/clients/189/transactions
+
self/clients/189/transactions?offset=10&limit=50
+
+
+ + GET https://DomainName/api/v1/self/clients/{clientId}/transactions?limit=5&offset=0 + + + GET self/clients/226/transactions?limit=5&offset=0 + Content-Type: application/json + No Request Body: -   -
-
-

Create a new Tax Group

-

Creates a new Tax Group

- - - - - - - - - - -
Mandatory Fields
name
taxComponents
- - - - - - - -
Mandatory Fields in taxComponents
taxComponentId
- - - - - - - - - - - - - -
Optional Fields in taxComponents
id
startDate
endDate
-
-
- - POST https://DomainName/api/v1/taxes/group - - - POST taxes/component - Content-Type: application/json - Request Body: - { - "name": "tax group 1", - "locale": "en", - "taxComponents": [{ - "taxComponentId": 7, - "startDate": "11 April 2016" - }], - "dateFormat": "dd MMMM yyyy" - } - - - { - "resourceId": 1 - } - -
-
-   -
-
-

List Tax Group

-

List Tax Group/p> -

-
- - GET https://DomainName/api/v1/taxes/group - - - GET taxes/group - Content-Type: application/json - - - [{ - "id": 6, - "name": "Tax_component_Name_PAX65", - "taxAssociations": [{ - "id": 6, - "taxComponent": { - "id": 6, - "name": "Tax_component_Name_FPNXE" - }, - "startDate": [2013, - 1, - 1] - }] - }, - { - "id": 7, - "name": "tax group 1", - "taxAssociations": [{ - "id": 7, - "taxComponent": { - "id": 7, - "name": "tax component 2" - }, - "startDate": [2016, - 4, - 11] - }] - }] - -
-
-   -
-
-

Retrieve Tax Group

-

Retrieve Tax Group

-
-
- - GET https://DomainName/api/v1/taxes/group/1 - - - GET taxes/group/1 - Content-Type: application/json - - - { - "id": 7, - "name": "tax group 1", - "taxAssociations": [{ - "id": 7, - "taxComponent": { - "id": 7, - "name": "tax component 2" - }, - "startDate": [2016, - 4, - 11] - }] - } - -
-
-   -
-
-

Update Tax Group

-

Updates Tax Group. Only end date can be up-datable and can insert new tax components.

-
-
- - PUT https://DomainName/api/v1/taxes/group/1 - - - PUT taxes/group/1 - Content-Type: application/json - Request Body: - { - "name": "tax group 2", - "locale": "en", - "taxComponents": [{ - "id": 7, - "taxComponentId": 7, - "endDate": "22 April 2016" - }, - { - "taxComponentId": 6, - "startDate": "14 April 2016" - }], - "dateFormat": "dd MMMM yyyy" - } - - - { - "resourceId": 7, - "changes": { - "addComponents": [6], - "modifiedComponents": [{ - "endDate": "Apr 22, 2016 12:00:00 AM", - "taxComponentId": 7 - }], - "name": "tax group 2" - } - } - -
-
- - - -   -
-
-

Rates

-

This defines the Rates

- - - - - - - - - - - - - - - - - - - - - - -
-
Field Descriptions
-
name
Name of Rate -
productApply
- Enum value that defines to which entity the rate will be applicable. - Available options are: - 1=Loans + + + { + "totalFilteredRecords": 20, + "pageItems": [ + { + "id": 226, + "officeId": 1, + "officeName": "Head Office", + "type": { + "id": 1, + "code": "clientTransactionType.payCharge", + "value": "PAY_CHARGE" + }, + "date": [ + 2015, + 9, + 2 + ], + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 22, + "submittedOnDate": [ + 2015, + 9, + 2 + ], + "reversed": false + } + ] + } + + + + +   +
+
+

Retrieve a Client Transaction

+

Example Requests:

+
self/clients/1/transactions/1
+
+
+
self/clients/1/transactions/1?fields=id,officeName
+
+
+ + GET https://DomainName/api/v1/self/clients/{clientId}/transaction/{transactionId} + + + { + "id": 1, + "officeId": 1, + "officeName": "Head Office", + "type": { + "id": 1, + "code": "clientTransactionType.payCharge", + "value": "PAY_CHARGE" + }, + "date": [ + 2015, + 8, + 17 + ], + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 60.000000, + "submittedOnDate": [ + 2015, + 8, + 19 + ], + "reversed": true + } + +
+
+ +   +
+
+

Retrieve Loan Details Template

+

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
  • +
+

+
Arguments
+
+
templateType
+
+ String mandatory, only allowed value is individual +
+
+
templateType value decides the required template data for creating a new loan application. + +
+
+
'individual': Loan template data for creating individual loans. +
+
clientId
+
+ Integer mandatory +
+
+
Optional Arguments
+
+
productId
+
+ Integer optional +
+
If entered, productId, productName and selectedProduct + fields are returned. +
+ +
+

Example Requests:

+
self/loans/template?templateType=individual&clientId=1
+
+
+
self/loans/template?templateType=individual&clientId=1&productId=1
+
+
+ + GET https://DomainName/api/v1/self/loans/template?templateType=individual&clientId=1 + + + { + "clientId": 1, + "clientName": "Kampala first Client", + "clientOfficeId": 2, + "timeline": { + "expectedDisbursementDate": [ + 2013, + 3, + 8 + ] + }, + "productOptions": [ + { + "id": 1, + "name": "Kampala Product (with cash accounting)" + } + ] + } + + + GET https://DomainName/api/v1/self/loans/template?templateType=individual&clientId=1&productId=1 + + + { + "clientId": 1, + "clientName": "Kampala first Client", + "clientOfficeId": 2, + "loanProductId": 1, + "loanProductName": "Kampala Product (with cash accounting)", + "loanProductDescription": "Typical Kampala loan product with cash accounting enabled for testing.", + "currency": { + "code": "UGX", + "name": "Uganda Shilling", + "decimalPlaces": 2, + "displaySymbol": "USh", + "nameCode": "currency.UGX", + "displayLabel": "Uganda Shilling (USh)" + }, + "principal": 1000000, + "termFrequency": 12, + "termPeriodFrequencyType": { + "id": 2, + "code": "repaymentFrequency.periodFrequencyType.months", + "value": "Months" + }, + "numberOfRepayments": 12, + "repaymentEvery": 1, + "repaymentFrequencyType": { + "id": 2, + "code": "repaymentFrequency.periodFrequencyType.months", + "value": "Months" + }, + "interestRatePerPeriod": 24, + "interestRateFrequencyType": { + "id": 3, + "code": "interestRateFrequency.periodFrequencyType.years", + "value": "Per year" + }, + "annualInterestRate": 24, + "amortizationType": { + "id": 1, + "code": "amortizationType.equal.installments", + "value": "Equal installments" + }, + "interestType": { + "id": 1, + "code": "interestType.flat", + "value": "Flat" + }, + "interestCalculationPeriodType": { + "id": 1, + "code": "interestCalculationPeriodType.same.as.repayment.period", + "value": "Same as repayment period" + }, + "transactionProcessingStrategyCode": "mifos-standard-strategy", + "timeline": { + "expectedDisbursementDate": [ + 2013, + 3, + 8 + ] + }, + "daysInMonthType": { + "id": 30, + "code": "DaysInMonthType.days360", + "value": "30 Days" + }, + "daysInYearType": { + "id": 360, + "code": "DaysInYearType.days360", + "value": "360 Days" + }, + "isInterestRecalculationEnabled": true, + "interestRecalculationData": { + "interestRecalculationCompoundingType": { + "id": 2, + "code": "interestRecalculationCompoundingMethod.fee", + "value": "Fee" + }, + "recalculationCompoundingFrequencyType": { + "id":1, + "code":"interestRecalculationFrequencyType.same.as.repayment.period", + "value":"Same as repayment period" + }, + "rescheduleStrategyType": { + "id": 2, + "code": "loanRescheduleStrategyMethod.reduce.number.of.installments", + "value": "Reduce number of installments" + }, + "recalculationRestFrequencyType": { + "id":1, + "code":"interestRecalculationFrequencyType.same.as.repayment.period", + "value":"Same as repayment period" + } + } + "charges": [], + "productOptions": [ + { + "id": 1, + "name": "Kampala Product (with cash accounting)" + } + ], + "loanOfficerOptions": [ + { + "id": 2, + "firstname": "Kampala", + "lastname": "LoanOfficer", + "displayName": "LoanOfficer, Kampala", + "officeId": 2, + "officeName": "Uganda (Kampala)", + "isLoanOfficer": true + } + ], + "loanPurposeOptions": [ + { + "id": 20, + "name": "option.Agriculture", + "position": 1 + }, + { + "id": 21, + "name": "option.Manufacturing", + "position": 20 + }, + { + "id": 22, + "name": "option.HousingImprovement", + "position": 21 + } + ], + "termFrequencyTypeOptions": [ + { + "id": 0, + "code": "loanTermFrequency.periodFrequencyType.days", + "value": "Days" + }, + { + "id": 1, + "code": "loanTermFrequency.periodFrequencyType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "loanTermFrequency.periodFrequencyType.months", + "value": "Months" + }, + { + "id": 3, + "code": "loanTermFrequency.periodFrequencyType.years", + "value": "Years" + } + ], + "repaymentFrequencyTypeOptions": [ + { + "id": 0, + "code": "repaymentFrequency.periodFrequencyType.days", + "value": "Days" + }, + { + "id": 1, + "code": "repaymentFrequency.periodFrequencyType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "repaymentFrequency.periodFrequencyType.months", + "value": "Months" + } + ], + "interestRateFrequencyTypeOptions": [ + { + "id": 2, + "code": "interestRateFrequency.periodFrequencyType.months", + "value": "Per month" + }, + { + "id": 3, + "code": "interestRateFrequency.periodFrequencyType.years", + "value": "Per year" + } + ], + "amortizationTypeOptions": [ + { + "id": 1, + "code": "amortizationType.equal.installments", + "value": "Equal installments" + }, + { + "id": 0, + "code": "amortizationType.equal.principal", + "value": "Equal principle payments" + } + ], + "interestTypeOptions": [ + { + "id": 1, + "code": "interestType.flat", + "value": "Flat" + }, + { + "id": 0, + "code": "interestType.declining.balance", + "value": "Declining Balance" + } + ], + "interestCalculationPeriodTypeOptions": [ + { + "id": 0, + "code": "interestCalculationPeriodType.daily", + "value": "Daily" + }, + { + "id": 1, + "code": "interestCalculationPeriodType.same.as.repayment.period", + "value": "Same as repayment period" + } + ], + "transactionProcessingStrategyOptions": [ + { + "id": 2, + "code": "heavensfamily-strategy", + "name": "Heavensfamily" + } + ], + "chargeOptions": [ + { + "id": 1, + "name": "Bank Fee (per installment)", + "active": true, + "penalty": false, + "currency": { + "code": "UGX", + "name": "Uganda Shilling", + "decimalPlaces": 2, + "displaySymbol": "USh", + "nameCode": "currency.UGX", + "displayLabel": "Uganda Shilling (USh)" + }, + "amount": 1500, + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + } + } + ], + "loanCollateralOptions": [ + { + "id": 17, + "name": "option.House", + "position": 1 + }, + { + "id": 18, + "name": "option.Television", + "position": 17 + }, + { + "id": 19, + "name": "option.Gold", + "position": 18 + } + ], + "accountLinkingOptions":[ + { + "id":1, + "accountNo":"000000001", + "clientId":1, + "clientName":"pramod nuthakki", + "productId":1, + "productName":"pramod sav", + "fieldOfficerId":0, + "currency":{"code":"USD","name":"US + Dollar","decimalPlaces":2,"displaySymbol":"$","nameCode":"currency.USD","displayLabel":"US Dollar + ($)"} + } + ] + } + +
+
- Once a rate definition is created, this attribute cannot be changed at any point -
Active
- Flag indicating if the rate is currently active -
-
+   +
+
+

Calculate Loan Repayment Schedule

+ + + + + + + +
+
Mandatory Fields
+
productId, principal, loanTermFrequency, + loanTermFrequencyType, numberOfRepayments, repaymentEvery, + repaymentFrequencyType, interestRatePerPeriod, + amortizationType, interestType, + interestCalculationPeriodType, expectedDisbursementDate, + transactionProcessingStrategyCode +
-   -
-
-

Create a new Rate

-

Creates a new Rate

- - - - - - - - - - - - - - - - -
-
Mandatory Fields
-
name
percentage
productApply
active
-
-
- - POST https://DomainName/api/v1/rates - - - POST rates - Content-Type: application/json - Request Body: - { - "productApply":1, - "name":"Loan rate", - "percentage":"12", - "active":true, - "locale":"en" - } - - - { - "resourceId": 1 - } - -
+
+ + POST https://DomainName/api/v1/self/loans?command=calculateLoanSchedule + + + POST self/loans?command=calculateLoanSchedule + Content-Type: application/json + Request Body: + { + "dateFormat": "dd MMMM yyyy", + "locale": "en_GB", + "productId": 1, + "principal": "100,000.00", + "loanTermFrequency": 12, + "loanTermFrequencyType": 2, + "numberOfRepayments": 12, + "repaymentEvery": 1, + "repaymentFrequencyType": 2, + "interestRatePerPeriod": 2, + "amortizationType": 1, + "interestType": 0, + "interestCalculationPeriodType": 1, + "expectedDisbursementDate": "20 September 2011", + "transactionProcessingStrategyCode": "mifos-standard-strategy" + } + + + { + "currency": { + "code": "UGX", + "name": "Uganda Shilling", + "decimalPlaces": 2, + "displaySymbol": "USh", + "nameCode": "currency.UGX", + "displayLabel": "Uganda Shilling (USh)" + }, + "loanTermInDays": 366, + "totalPrincipalDisbursed": 100000, + "totalPrincipalExpected": 100000, + "totalPrincipalPaid": 0, + "totalInterestCharged": 13471.52, + "totalFeeChargesCharged": 0, + "totalPenaltyChargesCharged": 0, + "totalWaived": 0, + "totalWrittenOff": 0, + "totalRepaymentExpected": 113471.52, + "totalRepayment": 0, + "totalOutstanding": 0, + "periods": [ + { + "period": 0, + "dueDate": [ + 2011, + 9, + 20 + ], + "principalDisbursed": 100000, + "principalLoanBalanceOutstanding": 100000, + "feeChargesDue": 0, + "feeChargesOutstanding": 0, + "totalOriginalDueForPeriod": 0, + "totalDueForPeriod": 0, + "totalOutstandingForPeriod": 0, + "totalOverdue": 0, + "totalActualCostOfLoanForPeriod": 0 + }, + { + "period": 1, + "fromDate": [ + 2011, + 9, + 20 + ], + "dueDate": [ + 2011, + 10, + 20 + ], + "daysInPeriod": 30, + "principalOriginalDue": 7455.96, + "principalDue": 7455.96, + "principalOutstanding": 7455.96, + "principalLoanBalanceOutstanding": 92544.04, + "interestOriginalDue": 2000, + "interestDue": 2000, + "interestOutstanding": 2000, + "feeChargesDue": 0, + "penaltyChargesDue": 0, + "totalOriginalDueForPeriod": 9455.96, + "totalDueForPeriod": 9455.96, + "totalPaidForPeriod": 0, + "totalOutstandingForPeriod": 9455.96, + "totalOverdue": 9455.96, + "totalActualCostOfLoanForPeriod": 2000 + }, + ... + ... + { + "period": 12, + "fromDate": [ + 2012, + 8, + 20 + ], + "dueDate": [ + 2012, + 9, + 20 + ], + "daysInPeriod": 31, + "principalOriginalDue": 9270.56, + "principalDue": 9270.56, + "principalOutstanding": 9270.56, + "principalLoanBalanceOutstanding": 0, + "interestOriginalDue": 185.4, + "interestDue": 185.4, + "interestOutstanding": 185.4, + "feeChargesDue": 0, + "penaltyChargesDue": 0, + "totalOriginalDueForPeriod": 9455.96, + "totalDueForPeriod": 9455.96, + "totalPaidForPeriod": 0, + "totalOutstandingForPeriod": 9455.96, + "totalOverdue": 9455.96, + "totalActualCostOfLoanForPeriod": 185.4 + } + ] + } +
-   -
-
-

List Rates

-

List Rates

-
-
- - GET https://DomainName/api/v1/rates - - - GET rates - Content-Type: application/json - - - [ - { - "id":1, - "name":"Loan Rate", - "percentage":12.00, - "productApply":1, - "active":true - }, - { - "id":2, - "name":"Public Rate", - "percentage":30.00, - "productApply":1, - "active":true - }, - { - "id":3, - "name":"Private Rate", - "percentage":14.00, - "productApply":1, - "active":true - } - ] - -
+
+ + +   +
+
+

Submit a new Loan Application

+

Only individual loanType can be used by Self Service User

+ + + + + + + +
+
Mandatory Fields
+
clientId, productId, principal, loanTermFrequency, + loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery, + repaymentFrequencyType, interestRatePerPeriod, + amortizationType, interestType, + interestCalculationPeriodType, transactionProcessingStrategyCode, + expectedDisbursementDate, submittedOnDate, loanType +
+
+ + + + + + + +
+
Additional Mandatory Fields if interest recalculation is + enabled for product and Rest frequency not same as repayment period +
+
recalculationRestFrequencyDate
+ + + + + + + +
+
Additional Mandatory Fields if interest recalculation with + interest/fee compounding is enabled for product and compounding frequency not same as + repayment period +
+
recalculationCompoundingFrequencyDate
+
+ + + + + + + +
+
Optional Fields
+
graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, + allowPartialPeriodInterestCalculation, + fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, + createStandingInstructionAtDisbursement (requires linkedAccountId if set to true) +
-   -
-
-

Retrieve a Rate

-

Return the details of an existing Rate

-
-
- - GET https://DomainName/api/v1/rates/{rateId} - - - GET rates/1 - Content-Type: application/json - - - { - "id":1, - "name":"Loan Rate", - "percentage":12.00, - "productApply":1, - "active":true - } - -
+
+ + POST https://DomainName/api/v1/self/loans + + + POST self/loans + Content-Type: application/json + Request Body: + { + "dateFormat": "dd MMMM yyyy", + "locale": "en_GB", + "clientId": 1, + "productId": 1, + "principal": "10,000.00", + "loanTermFrequency": 12, + "loanTermFrequencyType": 2, + "loanType": "individual", + "numberOfRepayments": 10, + "repaymentEvery": 1, + "repaymentFrequencyType": 2, + "interestRatePerPeriod": 10, + "amortizationType": 1, + "interestType": 0, + "interestCalculationPeriodType": 1, + "transactionProcessingStrategyCode": "mifos-standard-strategy", + "expectedDisbursementDate": "10 Jun 2013", + "submittedOnDate": "10 Jun 2013", + "linkAccountId" : "1", + "fixedEmiAmount":1100, + "maxOutstandingLoanBalance":"35000", + "disbursementData":[{"expectedDisbursementDate":"01 November 2013", + "principal":22000,"approvedPrincipal":22000}] + } + + + { + "officeId": 1, + "clientId": 1, + "loanId": 1, + "resourceId": 1 + } +
-   -
-
-

Update a Rate

-

Updates an existing Rate

-
-
- - POST https://DomainName/api/v1/rates/{rateId} - - - POST rates/3 - Content-Type: application/json - Request Body: - { - "percentage":"17", - } - - - { - "resourceId":3, - "changes": - { - "percentage":17 - } - } - +
+   +
+
+

Retrieve a Loan

+
Arguments
+
+
associations
+
+ optional, a comma separated list of + loan 'associations' (itemised below). +
+
+
Associations are just extra pieces of data that you + might or might not want to retrieve.
+
+
+
+ 'repaymentSchedule': Loan schedule data. +
+
+ 'originalSchedule': Loan schedule data without interest recalculations. +
+
+ 'futureSchedule': Loan schedule data from today date(will be displayed only for interest + first repayment strategy processors) +
+
+ 'transactions': Loan transactions data. +
+
+ 'charges': Loan charges data. +
+
+ 'guarantors': Loan guarantors data. +
+
+ 'collateral': Loan collateral data. +
+
+ 'linkedAccount': Account linked to loan. +
+
+ 'multiDisburseDetails': Loan multi-disbursement details. +
+
+

Example Requests:

+
self/loans/1
+
+
+
self/loans/1?fields=id,principal,annualInterestRate
+
+
+
+ self/loans/1?fields=id,principal,annualInterestRate&associations=repaymentSchedule,transactions
- - - -   -
-
-

User Generated Documents

-

User Generated Documents(alternatively, Templates) are used for end-user features such as custom user defined document generation (AKA UGD). They are based on {{ moustache }} templates. Think of them as a sort of built-in "mail merge" functionality.

- -

User Generated Documents (and other types of templates) can aggregate data from several Apache Fineract back-end API calls via mappers. Mappers can even access non-Apache Fineract REST services from other servers. UGDs can render such data in tables, show images, etc. TBD: Please have a look at some of the Example UGDs included in Apache Fineract (or the Wiki page, for now.).

- -

UGDs can be assigned to an entity like client or loan and be of a type like Document or SMS. The entity and type of a UGD is only there for the convenience of user agents (UIs), in order to know where to show UGDs for the user (i.e. which tab). The Template Engine back-end runner does not actually need this metadata.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
name
Describes the document which will be created. - It must be unique and appears listed in a tab at the assigned entity.
type
- For now only the types Document and SMS are supported. - In a next version, UGDs may be created for e-mails as well. -
entity
- Indicates the primary resource reference. - UGDs may be filtered by entity and type so the relevant UGDs may be listed at the belonging position. -
text
- The actual UGD which may be any html-text containing mustache tags. -
mappers
- By default one mapper is assigned to the UGD depending on the entity. - Mappers are used to create requests and get tags wich may be used in the UGD. - Also mappery are in order and may depend on the previous mappers. - For now mappers expect a response in JSON or plain/text. - JSON contains the keys and the values. - If the response is plain/text it can be accessed by {{$mapperskey.src}} -
-
-
- -   -
-
-

Retrieve UGD Details Template

-

This is a convenience resource. It can be useful when - building maintenance user interface screens for UGDs. - The UGD data returned consists of any or all of: -

-
Arguments
-
-
name
-
- String -
-
entity
-
- String -
-
type
-
- String -
-
text
-
- String optional -
-
mappers
-
- Mapper optional -
-
-

Example Request:

-
templates/template
-
-
- -GET https://DomainName/api/v1/templates/template - - -{ - "id": 1, - "name": "Test", - "entity": 1, - "type": 0, - "text": "This is a loan for {{loan.clientName}}", - "mappers": [ - { - "mappersorder": 0, - "mapperskey": "loan", - "mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}", - "id": 1 - } - ] -} - -
-
- -   -
-
-

Add a UGD

-

Adds a new UGD.

- - - - - - - -
Mandatory Fields
name
-

Example Requests:

-
templates/1
-
-
- -POST https://DomainName/api/v1/templates - - -POST templates -Content-Type: application/json -Request Body: -{ - "id": 1, - "name": "Test", - "entity": 1, - "type": 0, - "text": "This is a loan for {{loan.clientName}}", - "mappers": [ - { - "mappersorder": 0, - "mapperskey": "loan", - "mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}", - "id": 1 - } - ] -} - - -{ - "resourceId": 1 -} - -
-
+
+ + GET https://DomainName/api/v1/self/loans/{loanId} + + + { + "id": 1, + "accountNo": "000000001", + "status": { + "id": 300, + "code": "loanStatusType.active", + "value": "Active", + "pendingApproval": false, + "waitingForDisbursal": false, + "active": true, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "clientId": 1, + "clientName": "Kampala first Client", + "clientOfficeId": 2, + "loanProductId": 1, + "loanProductName": "Kampala Product (with cash accounting)", + "loanProductDescription": "Typical Kampala loan product with cash accounting enabled for testing.", + "loanPurposeId": 22, + "loanPurposeName": "option.HousingImprovement", + "loanOfficerId": 2, + "loanOfficerName": "LoanOfficer, Kampala", + "loanType": { + "id": 1, + "code": "loanType.individual", + "value": "Individual" + }, + "currency": { + "code": "UGX", + "name": "Uganda Shilling", + "decimalPlaces": 2, + "displaySymbol": "USh", + "nameCode": "currency.UGX", + "displayLabel": "Uganda Shilling (USh)" + }, + "principal": 1000000, + "termFrequency": 12, + "termPeriodFrequencyType": { + "id": 2, + "code": "termFrequency.periodFrequencyType.months", + "value": "Months" + }, + "numberOfRepayments": 12, + "repaymentEvery": 1, + "repaymentFrequencyType": { + "id": 2, + "code": "repaymentFrequency.periodFrequencyType.months", + "value": "Months" + }, + "interestRatePerPeriod": 24, + "interestRateFrequencyType": { + "id": 3, + "code": "interestRateFrequency.periodFrequencyType.years", + "value": "Per year" + }, + "annualInterestRate": 24, + "amortizationType": { + "id": 1, + "code": "amortizationType.equal.installments", + "value": "Equal installments" + }, + "interestType": { + "id": 1, + "code": "interestType.flat", + "value": "Flat" + }, + "interestCalculationPeriodType": { + "id": 1, + "code": "interestCalculationPeriodType.same.as.repayment.period", + "value": "Same as repayment period" + }, + "transactionProcessingStrategyCode": "mifos-standard-strategy", + "timeline": { + "submittedOnDate": [ + 2012, + 4, + 3 + ], + "submittedByUsername": "admin", + "submittedByFirstname": "App", + "submittedByLastname": "Administrator", + "approvedOnDate": [ + 2012, + 4, + 3 + ], + "approvedByUsername": "admin", + "approvedByFirstname": "App", + "approvedByLastname": "Administrator", + "expectedDisbursementDate": [ + 2012, + 4, + 10 + ], + "actualDisbursementDate": [ + 2012, + 4, + 10 + ], + "disbursedByUsername": "admin", + "disbursedByFirstname": "App", + "disbursedByLastname": "Administrator", + "expectedMaturityDate": [ + 2013, + 4, + 10 + ] + }, + "summary": { + "currency": { + "code": "UGX", + "name": "Uganda Shilling", + "decimalPlaces": 2, + "displaySymbol": "USh", + "nameCode": "currency.UGX", + "displayLabel": "Uganda Shilling (USh)" + }, + "principalDisbursed": 1000000, + "principalPaid": 0, + "principalWrittenOff": 0, + "principalOutstanding": 1000000, + "principalOverdue": 833333.3, + "interestCharged": 240000, + "interestPaid": 0, + "interestWaived": 0, + "interestWrittenOff": 0, + "interestOutstanding": 240000, + "interestOverdue": 200000, + "feeChargesCharged": 18000, + "feeChargesDueAtDisbursementCharged": 0, + "feeChargesPaid": 0, + "feeChargesWaived": 0, + "feeChargesWrittenOff": 0, + "feeChargesOutstanding": 18000, + "feeChargesOverdue": 15000, + "penaltyChargesCharged": 0, + "penaltyChargesPaid": 0, + "penaltyChargesWaived": 0, + "penaltyChargesWrittenOff": 0, + "penaltyChargesOutstanding": 0, + "penaltyChargesOverdue": 0, + "totalExpectedRepayment": 1258000, + "totalRepayment": 0, + "totalExpectedCostOfLoan": 258000, + "totalCostOfLoan": 0, + "totalWaived": 0, + "totalWrittenOff": 0, + "totalOutstanding": 1258000, + "totalOverdue": 1048333.3, + "overdueSinceDate": [ + 2012, + 5, + 10 + ], + "linkedAccount":{ + "id":1, + "accountNo":"000000001" + }, + "disbursementDetails":[{"id":71,"expectedDisbursementDate":[2013,11,1],"principal":22000.000000,"approvedPrincipal":22000.000000}], + "fixedEmiAmount":1100.000000, + "maxOutstandingLoanBalance":35000, + "canDisburse":false, + "emiAmountVariations": [], + "inArrears": true, + "isNPA":false, + "overdueCharges": [ + { + "id": 20, + "name": "overdraft penality", + "active": true, + "penalty": true, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 3.000000, + "chargeTimeType": { + "id": 9, + "code": "chargeTimeType.overdueInstallment", + "value": "overdue fees" + }, + "chargeAppliesTo": { + "id": 1, + "code": "chargeAppliesTo.loan", + "value": "Loan" + }, + "chargeCalculationType": { + "id": 2, + "code": "chargeCalculationType.percent.of.amount", + "value": "% Amount" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + }, + "feeInterval": 2, + "feeFrequency": { + "id": 1, + "code": "feeFrequencyperiodFrequencyType.weeks", + "value": "Weeks" + } + } + ] + } + } + +
+
+ +   +
+
+

Update a Loan Application

+

Loan 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.

+
+
+ PUT https://Domain Name/api/v1/self/loans/{loanId} + PUT self/loans/1 + Content-Type: application/json + No Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "productId": 1, + "principal": "5000", + "loanTermFrequency": 10, + "loanTermFrequencyType": 0, + "numberOfRepayments": 10, + "repaymentEvery": 1, + "repaymentFrequencyType": 0, + "interestRatePerPeriod": 2, + "interestType": 0, + "interestCalculationPeriodType": 0, + "amortizationType": 1, + "expectedDisbursementDate": "04 March 2014", + "transactionProcessingStrategyCode": "mifos-standard-strategy" + } + + + { + "officeId": 2, + "clientId": 1, + "loanId": 1, + "resourceId": 1, + "changes": { + "principal": 5000, + "locale": "en" + } + } + +
+
+ +   +
+
+

Applicant Withdraws from Loan Application

+ + + + + + + +
+
Mandatory Fields
+
withdrawnOnDate
+
+
+ + POST https://DomainName/api/v1/self/loans/{loanId}?command=withdrawnByApplicant + + + POST self/loans/1?command=withdrawnByApplicant + Content-Type: application/json + Request Body: + { + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "withdrawnOnDate": "20 September 2011", + "note": "Reason loan applicant withdrew from application." + } + + + { + "officeId": 1, + "clientId": 1, + "loanId": 2, + "resourceId": 2, + "changes": { + "status": { + "id": 400, + "code": "loanStatusType.withdrawn.by.client", + "value": "Withdrawn by applicant", + "pendingApproval": false, + "waitingForDisbursal": false, + "active": false, + "closedObligationsMet": false, + "closedWrittenOff": false, + "closedRescheduled": false, + "closed": false, + "overpaid": false + }, + "locale": "en", + "dateFormat": "dd MMMM yyyy", + "withdrawnOnDate": "20 September 2011", + "closedOnDate": "20 September 2011" + } + } + +
+
+ +   +
+
+

Retrieve a Loan Transaction Details

+

Example Request:

+
self/loans/5/transactions/3
+
+
+ + GET https://DomainName/api/v1/self/loans/{loanId}/transactions/{transactionId} + + + { + "id": 3, + "type": { + "id": 2, + "code": "loanTransactionType.repayment", + "value": "Repayment", + "disbursement": false, + "repaymentAtDisbursement": false, + "repayment": true, + "contra": false, + "waiveInterest": false, + "waiveCharges": false, + "writeOff": false, + "recoveryRepayment": false + }, + "date": [ + 2012, + 5, + 14 + ], + "manuallyReversed": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 559.88, + "interestPortion": 559.88 + } + +
+
+ +   +
+
+

List Loan Charges

+

Example Requests:

+
self/loans/1/charges
+
+
+
self/loans/1/charges?fields=name,amountOrPercentage
+
+
+ + GET https://DomainName/api/v1/self/loans/{loanId}/charges + + + [ + { + "id": 1, + "chargeId": 1, + "name": "Loan Processing fee", + "chargeTimeType": { + "id": 1, + "code": "chargeTimeType.disbursement", + "value": "Disbursement" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "percentage": 0, + "amountPercentageAppliedTo": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100, + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 100, + "amountOrPercentage": 100, + "penalty": false + }, + { + "id": 7, + "chargeId": 2, + "name": "Collection Fee", + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "dueDate": [ + 2013, + 3, + 29 + ], + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "percentage": 0, + "amountPercentageAppliedTo": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100, + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 100, + "amountOrPercentage": 100, + "penalty": false + } + ] + +
+
-   -
-
-

Retrieve all UGDs

- -

Example Requests:

-
templates
-
-

- It is also possible to get specific UGDs by entity and type: -

-
templates?type=0&entity=0
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
Entity
Id
Type
Id
client0Document0
loan1E-Mail (not yet)1
SMS2
-
-
- -GET https://DomainName/api/v1/templates - - -[ - { - "id": 1, - "name": "Test", - "entity": 1, - "type": 0, - "text": "This is a loan for {{loan.clientName}}", - "mappers": [ - { - "mappersorder": 0, - "mapperskey": "loan", - "mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}", - "id": 1 - } - ] - } -] - -
-
+   +
+
+

Retrieve a Loan Charge

+

Example Requests:

+
self/loans/1/charges/1
+
+
+
self/loans/1/charges/1?fields=name,amountOrPercentage
+
+
+ + GET https://DomainName/api/v1/self/loans/{loanId}/charges/{chargeId} + + + { + "id": 1, + "chargeId": 1, + "name": "Loan Processing fee", + "chargeTimeType": { + "id": 1, + "code": "chargeTimeType.disbursement", + "value": "Disbursement" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "percentage": 0, + "amountPercentageAppliedTo": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100, + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 100, + "amountOrPercentage": 100, + "penalty": false + } +
+
-   -
-
-

Retrieve a UGD

-

Example Requests:

-
templates/1
-
-
- -GET https://DomainName/api/v1/templates/{Id} - - -{ - "id": 1, - "name": "Test", - "entity": 1, - "type": 0, - "text": "This is a loan for {{loan.clientName}}", - "mappers": [ - { - "mappersorder": 0, - "mapperskey": "loan", - "mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}", - "id": 1 - } - ] -} - -
-
-   -
-
-

Update a UGD

-
-
- -PUT https://DomainName/api/v1/templates/{templateId} - - -PUT templates/1 -Content-Type: application/json -Request Body: -{ - "id": 1, - "name": "Test", - "entity": 1, - "type": 0, - "text": "This is a loan for {{loan.clientName}}", - "mappers": [ - { - "mappersorder": 0, - "mapperskey": "loan", - "mappersvalue": "loans/{{loanId}}?associations=all&tenantIdentifier={{tenantIdentifier}}", - "id": 1 - } - ] -} - - -{ - "resourceId": 1 -} - -
-
+   +
+
+

Submit new savings application

+
+ + + + + + + +
+
Mandatory Fields
+
clientId, productId, submittedOnDate
+
+ + + + + + + +
+
Optional Fields
+
accountNo, externalId, fieldOfficerId
+
+ + + + + + + +
+
Inherited from Product (if not provided)
+
nominalAnnualInterestRate, interestCompoundingPeriodType, interestCalculationType, + interestCalculationDaysInYearType, minRequiredOpeningBalance, lockinPeriodFrequency, + lockinPeriodFrequencyType, withdrawalFeeForTransfers, allowOverdraft, overdraftLimit, + withHoldTax +
+
+
+
+

Minimal request: accountNo auto generated, remaining details inherited from savings product.

+ POST https://Domain Name/api/v1/self/savingsaccounts + POST self/savingsaccount + Content-Type: application/json + Request Body: + { + "productId":3, + "clientId":"14", + "locale":"en", + "dateFormat":"dd MMMM yyyy", + "submittedOnDate":"09 July 2018" + } + + + { + "officeId":1, + "clientId":14, + "savingsId":10, + "resourceId":10 + } + +

Full request:Below details override details from savings product (except currency).

+ POST self/savingsaccount + Content-Type: application/json + Request Body: + { + "productId":1, + "nominalAnnualInterestRate":9.5, + "minRequiredOpeningBalance":1000, + "lockinPeriodFrequency":1, + "withdrawalFeeForTransfers":true, + "allowOverdraft":true, + "overdraftLimit":"10000", + "nominalAnnualInterestRateOverdraft":"5", + "minOverdraftForInterestCalculation":"1000", + "enforceMinRequiredBalance":false, + "withHoldTax":false, + "interestCompoundingPeriodType":1, + "interestPostingPeriodType":4, + "interestCalculationType":1, + "interestCalculationDaysInYearType":365, + "lockinPeriodFrequencyType":1, + "fieldOfficerId":1, + "externalId":"126", + "submittedOnDate":"11 July 2018", + "locale":"en", + "dateFormat":"dd MMMM yyyy", + "monthDayFormat":"dd MMM", + "charges":[ + { + "chargeId":3, + "amount":2 + } + ], + "clientId":"14" + } + + + { + "officeId":1, + "clientId":14, + "savingsId":9, + "resourceId":9 + } + +
+
- -   -
-
-

Client Charges

-

It is typical for MFI's to directly associate charges with an implicit Client account. These - can be either fees or penalties

-

Client Charges are client specific instances of Charges. Refer Charges for documentation of the various properties of a charge, Only additional properties ( - specific to the context of a Charge being associated with a Client account) are - described here

- -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
amountPaid
The total amount which has been paid for this Charge -
amountWaived
The total amount that has been waived for this Charge -
amountOutstanding
The Total outstanding amount for this Charge -
dueDate
it specifies the due date
-
-
+   +
+
+

Retrieve a savings account:

+

Arguments

+
+
associations
+
optional, a comma separated list of savings 'associations' (itemized below).
+

Associations are just extra pieces of data that you might or might not want to retrieve.

+
+
'transactions': Gets data related to transactions on the account e.g. + ?associations=transactions +
+
'charges':Savings Account charges data.
+
+

Example Requests :

+
self/savingsaccounts/1
+

+
self/savingsaccounts/1?associations=transactions
+
+
+ GET https://DomainName/api/v1/self/savingsaccounts/{accountId} + + { + "id": 1, + "accountNo": "000000001", + "clientId": 1, + "clientName": "small business", + "savingsProductId": 1, + "savingsProductName": "Passbook Savings", + "fieldOfficerId": 0, + "status": { + "id": 100, + "code": "savingsAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "withdrawnByApplicant": false, + "active": false, + "closed": false + }, + "timeline": { + "submittedOnDate": [ + 2013, + 3, + 1 + ] + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "nominalAnnualInterestRate": 5, + "interestCompoundingPeriodType": { + "id": 1, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", + "value": "Daily" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "summary": { + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "accountBalance": 0 + } + } + +
+
-   -
-
-

Client Transaction

-

Client Transactions refer to transactions made directly againt a Client's internal account. Currently, these transactions are only created as a result of charge payments/waivers. You are allowed to undo a transaction, however you cannot explicitly create one. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
id
This ia an unique Id associate with a Transaction. -
officeId
Identifier of the office in which the transaction was made
reversed
Boolean Flag that indicates if this transaction is reversed. -
amount
Transaction amount. -
currency
Details of the currency involved with the Transaction. Currently defaults - to the currency of the Client Charge this transaction pays
date
Effective date of the transaction
-
-
-   -
-
-

List Client Transactions

-

The list capability of client transaction can support pagination.

-
Mandatory Arguments
-
-
offset
-
- Integer Mandatory, defaults to 0 -
-
Indicates the result from which pagination starts
- -
limit
-
- Integer Mandatory, defaults to 200 -
-
Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
-
-

Example Requests:

-
clients/189/transactions
-
clients/189/transactions?offset=10&limit=50
-
-
- -GET https://DomainName/api/v1/clients/{clientId}/transactions?limit=5&offset=0 - - -GET clients/226/transactions?limit=5&offset=0 -Content-Type: application/json -No Request Body: +   +
+
+

Modify a savings application

+

Savings 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

+
+
+ PUT https://Domain Name/api/v1/self/savingsaccounts/{accountsId} + PUT self/savingsaccounts/1 + Content-Type: application/json + No Request Body: + { + "productId":1, + "clientId":14 + } + + + { + "officeId": 1, + "clientId": 14, + "savingsId": 11, + "resourceId": 11, + "changes": { + "productId": 1 + } + } + +
+
-
- -{ - "totalFilteredRecords": 20, - "pageItems": [ - { - "id": 226, - "officeId": 1, - "officeName": "Head Office", - "type": { - "id": 1, - "code": "clientTransactionType.payCharge", - "value": "PAY_CHARGE" - }, - "date": [ - 2015, - 9, - 2 - ], - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 22, - "submittedOnDate": [ - 2015, - 9, - 2 - ], - "reversed": false - } - ] -} - -
-
+   +
+
+

Retrieve Savings Account Template:

+

Arguments

+
+
clientId
+
Integer mandatory
+
productId
+
Integer optional
+
If entered, productId, productName and selectedProduct fields are returned.
+
+

Example Requests:

+
self/savingsaccounts/template?clientId=14
+

+
self/savingsaccounts/template?clientId=14&productId=2
+
+
+ GET https://Domain + Name/api/v1/self/savingsaccounts/template?clientId={clientId} + + { + "clientId": 14, + "clientName": "Bheem", + "withdrawalFeeForTransfers": false, + "allowOverdraft": false, + "enforceMinRequiredBalance": false, + "withHoldTax": false, + "isDormancyTrackingActive": false, + "productOptions": [ + { + "id": 1, + "name": "Voluntary savings", + "withdrawalFeeForTransfers": false, + "allowOverdraft": false, + "enforceMinRequiredBalance": false, + "withHoldTax": false + }, + { + "id": 2, + "name": "Savings", + "withdrawalFeeForTransfers": false, + "allowOverdraft": false, + "enforceMinRequiredBalance": false, + "withHoldTax": false + }, + { + "id": 3, + "name": "Savings Product", + "withdrawalFeeForTransfers": false, + "allowOverdraft": false, + "enforceMinRequiredBalance": false, + "withHoldTax": false + } + ], + "chargeOptions": [ + { + "id": 3, + "name": "Saving Accounts Processing Fee", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 2, + "chargeTimeType": { + "id": 3, + "code": "chargeTimeType.savingsActivation", + "value": "Savings Activation" + }, + "chargeAppliesTo": { + "id": 2, + "code": "chargeAppliesTo.savings", + "value": "Savings" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + } + ] + } + +
-   -
-
-

Retrieve a Client Transaction

-

Example Requests:

-
clients/1/transactions/1
-
-
-
clients/1/transactions/1?fields=id,officeName
-
-
- -GET https://DomainName/api/v1/clients/{clientId}/transaction/{transactionId} - - -{ - "id": 1, - "officeId": 1, - "officeName": "Head Office", - "type": { - "id": 1, - "code": "clientTransactionType.payCharge", - "value": "PAY_CHARGE" - }, - "date": [ - 2015, - 8, - 17 - ], - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 60.000000, - "submittedOnDate": [ - 2015, - 8, - 19 - ], - "reversed": true -} - -
-
+
+ GET https://Domain + Name/api/v1/self/savingsaccounts/template?clientId={clientId}&productId={productId} + + { + "clientId": 14, + "clientName": "Bheem", + "savingsProductId": 2, + "savingsProductName": "Savings", + "timeline": {}, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "nominalAnnualInterestRate": 5, + "interestCompoundingPeriodType": { + "id": 1, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", + "value": "Daily" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "minRequiredOpeningBalance": 1000, + "withdrawalFeeForTransfers": false, + "allowOverdraft": false, + "enforceMinRequiredBalance": false, + "withHoldTax": false, + "isDormancyTrackingActive": false, + "charges": [], + "productOptions": [ + { + "id": 1, + "name": "Voluntary savings", + "withdrawalFeeForTransfers": false, + "allowOverdraft": false, + "enforceMinRequiredBalance": false, + "withHoldTax": false + }, + { + "id": 2, + "name": "Savings", + "withdrawalFeeForTransfers": false, + "allowOverdraft": false, + "enforceMinRequiredBalance": false, + "withHoldTax": false + }, + { + "id": 3, + "name": "Savings Product", + "withdrawalFeeForTransfers": false, + "allowOverdraft": false, + "enforceMinRequiredBalance": false, + "withHoldTax": false + } + ], + "fieldOfficerOptions": [ + { + "id": 1, + "firstname": "Aliya", + "lastname": "A", + "displayName": "A, Aliya", + "officeId": 1, + "officeName": "Head Office", + "isLoanOfficer": true, + "isActive": true + } + ], + "interestCompoundingPeriodTypeOptions": [ + { + "id": 1, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", + "value": "Daily" + }, + { + "id": 4, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", + "value": "Monthly" + }, + { + "id": 5, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.quarterly", + "value": "Quarterly" + }, + { + "id": 6, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.biannual", + "value": "Semi-Annual" + }, + { + "id": 7, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.annual", + "value": "Annually" + } + ], + "interestPostingPeriodTypeOptions": [ + { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + { + "id": 5, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.quarterly", + "value": "Quarterly" + }, + { + "id": 6, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.biannual", + "value": "BiAnnual" + }, + { + "id": 7, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.annual", + "value": "Annually" + } + ], + "interestCalculationTypeOptions": [ + { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + { + "id": 2, + "code": "savingsInterestCalculationType.averagedailybalance", + "value": "Average Daily Balance" + } + ], + "interestCalculationDaysInYearTypeOptions": [ + { + "id": 360, + "code": "savingsInterestCalculationDaysInYearType.days360", + "value": "360 Days" + }, + { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + } + ], + "lockinPeriodFrequencyTypeOptions": [ + { + "id": 0, + "code": "savings.lockin.savingsPeriodFrequencyType.days", + "value": "Days" + }, + { + "id": 1, + "code": "savings.lockin.savingsPeriodFrequencyType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "savings.lockin.savingsPeriodFrequencyType.months", + "value": "Months" + }, + { + "id": 3, + "code": "savings.lockin.savingsPeriodFrequencyType.years", + "value": "Years" + } + ], + "withdrawalFeeTypeOptions": [ + { + "id": 1, + "code": "savingsWithdrawalFeesType.flat", + "value": "Flat" + }, + { + "id": 2, + "code": "savingsWithdrawalFeesType.percent.of.amount", + "value": "% of Amount" + } + ], + "chargeOptions": [ + { + "id": 3, + "name": "Saving Accounts Processing Fee", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 2, + "chargeTimeType": { + "id": 3, + "code": "chargeTimeType.savingsActivation", + "value": "Savings Activation" + }, + "chargeAppliesTo": { + "id": 2, + "code": "chargeAppliesTo.savings", + "value": "Savings" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + } + ] + } + +
+
-   -
-
-

Add Client Charge

-

- This API associates a Client charge with an implicit Client account -

- - - - - - - -
Mandatory Fields
chargeId and dueDate
- - - - - - - -
Optional Fields
amount
-
-
- -POST https://DomainName/api/v1/clients/{clientId}/charges - - -POST clients/226/charges -Content-Type: application/json -Request Body: -{ - "amount" : "100", - "chargeId" : "226", - "dateFormat" : "dd MMMM yyyy", - "dueDate" : "01 September 2015", - "locale" : "en" -} - - -{ - "officeId": 1, - "clientId": 189, - "resourceId":164 -} - -
-
-   -
-
-

List Client Charges

- -

The list capability of client charges supports pagination.

-
Optional Arguments
-
-
offset
-
- Integer Mandatory, defaults to 0 -
-
Indicates the result from which pagination starts
- -
limit
-
- Integer Mandatory, defaults to 200 -
-
Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- -
pendingPayment
-
- String optional -
-
Filters charges that are pending payment (neither paid or waived).
-
-

Example Requests:

-
clients/1/charges
-
clients/1/charges?offset=0&limit=5
-
-
- -GET https://DomainName/api/v1/clients/{clientId}/charges?limit=5&offset=0 - - -GET clients/1/charges?limit=5&offset=0 -Content-Type: application/json -No Request Body - - -{ - "totalFilteredRecords": 4, - "pageItems": [ - { - "id": 5, - "clientId": 1, - "chargeId": 6, - "name": "Client Fees 2", - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "dueDate": [ - 2015, - 9, - 1 - ], - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 550.000000, - "amountPaid": 0.000000, - "amountWaived": 0.000000, - "amountWrittenOff": 0, - "amountOutstanding": 550.000000, - "penalty": false, - "isActive": true, - "isPaid": false, - "isWaived": false - }, - { - "id": 4, - "clientId": 1, - "chargeId": 5, - "name": "Client Fee 1", - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "dueDate": [ - 2015, - 8, - 31 - ], - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 120.000000, - "amountPaid": 0.000000, - "amountWaived": 120.000000, - "amountWrittenOff": 0, - "amountOutstanding": 120.000000, - "penalty": true, - "isActive": true, - "isPaid": false, - "isWaived": true - }, - { - "id": 3, - "clientId": 1, - "chargeId": 5, - "name": "Client Fee 1", - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "dueDate": [ - 2015, - 8, - 17 - ], - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100.000000, - "amountPaid": 0.000000, - "amountWaived": 100.000000, - "amountWrittenOff": 0, - "amountOutstanding": 0.000000, - "penalty": true, - "isActive": true, - "isPaid": false, - "isWaived": true - }, - { - "id": 2, - "clientId": 1, - "chargeId": 2, - "name": "Recurring savings Charge", - "chargeTimeType": { - "id": 7, - "code": "chargeTimeType.monthlyFee", - "value": "Monthly Fee" - }, - "dueDate": [ - 2015, - 8, - 17 - ], - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100.000000, - "amountPaid": 0, - "amountWaived": 100.000000, - "amountWrittenOff": 0, - "amountOutstanding": 0.000000, - "penalty": false, - "isActive": true, - "isPaid": false, - "isWaived": true - } - ] -} +   +
+
+

Retrieve Savings Account Transaction:

+

Example Requests:

+
self/savingsaccounts/1/transactions/1
+
+
+
+ GET + https://DomainName/api/v1/self/savingsaccounts/{accountId}/transactions/{transactionId} + + + { + "id": 1, + "transactionType": { + "id": 2, + "code": "savingsAccountTransactionType.withdrawal", + "value": "Withdrawal", + "deposit": false, + "withdrawal": true, + "interestPosting": false, + "feeDeduction": false + }, + "accountId": 1, + "accountNo": "000000001", + "date": [ + 2013, + 8, + 7 + ], + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "paymentDetailData": { + "id": 62, + "paymentType": { + "id": 11, + "name": "cash" + }, + "accountNumber": "", + "checkNumber": "", + "routingCode": "", + "receiptNumber": "", + "bankNumber": "" + }, + "amount": 5000, + "runningBalance": 0, + "reversed": true + } + +
+
-
-
-
-   -
-
-

Retrieve a Client Charge

-
Arguments
-
-
associations
-
- optional, Either 'all' or a comma separated list of - loan 'associations' (itemised below). -
-
-
Associations are just extra pieces of data that you - might or might not want to retrieve.
-
-
-
- 'all': Gets all association data. -
-
- 'transactions': Retrieves all transactions made on this client charge. -
-
-

Example Requests:

-
clients/1/charges/1
-
-
-
clients/1/charges/1?fields=name,id
-
-
- -GET https://DomainName/api/v1/clients/{clientId}/charges/{clientChargeId} - - -{ - "id": 3, - "clientId": 1, - "chargeId": 5, - "name": "Client Fee 1", - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "dueDate": [ - 2015, - 8, - 17 - ], - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100.000000, - "amountPaid": 0.000000, - "amountWaived": 100.000000, - "amountWrittenOff": 0, - "amountOutstanding": 0.000000, - "penalty": true, - "isActive": true, - "isPaid": false, - "isWaived": true -} - -
-
+   +
+
+

List Savings Charges

+

Example Requests:

+
self/savingsaccounts/1/charges
+
+
self/savingsaccounts/1/charges?chargeStatus=inactive
+
+
self/savingsaccounts/1/charges?fields=name,amountOrPercentage
+
+
+ + GET https://DomainName/api/v1/self/savingsaccounts/{accountId}/charges + + + [ + { + "id": 1, + "chargeId": 3, + "accountId": 57, + "name": "Savings account maintenance fee", + "chargeTimeType": { + "id": 1, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "percentage": 0, + "amountPercentageAppliedTo": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100, + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 100, + "amountOrPercentage": 100, + "penalty": false + }, + { + "id": 2, + "chargeId": 4, + "accountId": 57, + "name": "Pass book Fee", + "chargeTimeType": { + "id": 2, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "dueDate": [ + 2013, + 3, + 29 + ], + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "percentage": 0, + "amountPercentageAppliedTo": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100, + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 100, + "amountOrPercentage": 100, + "penalty": false + }, + { + "id": 9, + "chargeId": 4, + "accountId": 57, + "name": "Withdrawal fee percentage", + "chargeTimeType": { + "id": 5, + "code": "chargeTimeType.withdrawalFee", + "value": "Withdrawal Fee" + }, + "chargeCalculationType": { + "id": 2, + "code": "chargeCalculationType.percent.of.amount", + "value": "% Amount" + }, + "percentage": 0.25, + "amountPercentageAppliedTo": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 0, + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 0, + "amountOrPercentage": 0.25, + "penalty": false + }, + { + "id": 10, + "chargeId": 6, + "accountId": 57, + "name": "Annual fee - INR", + "chargeTimeType": { + "id": 6, + "code": "chargeTimeType.annualFee", + "value": "Annual Fee" + }, + "feeOnMonthDay": [ + 10, + 9 + ], + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "percentage": 0, + "amountPercentageAppliedTo": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 50, + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 50, + "amountOrPercentage": 50, + "penalty": false + } + ] + +
+
-   -
-
-

Delete a Client Charge

-

- Deletes a Client Charge on which no transactions have taken place (either payments or waivers).

-
-
- -DELETE https://DomainName/api/v1/clients/{clientId}/charges/{clientChargeId} - - -POST clients/189/charges/164 -Content-Type: application/json -No Request Body - - -{ - "officeId": 1, - "clientId": 189, - "resourceId":164 -} - -
-
-   -
-
-

Pay a Client Charge

-

-
Pay either a part of or the entire due amount for a charge. -

- - - - - - - -
Mandatory Fields
- transactionDate and amount -
-
-
-
- -POST https://DomainName/api/v1/clients/{clientId}/charges/{clientChargeId}?command=paycharge - - -POST clients/189/charges/157?command=payCharge -Content-Type: application/json -Request Body: -{ - - "amount":200, - "locale":"en", - "dateFormat":"dd MMMM yyyy", - "transactionDate":"01 September 2015" -} - - - -{ - "officeId":1, - "clientId":189, - "resourceId":157, - "transactionId":"221" -} - -
-
-   -
-
-

Waive a Client Charge

-

-
This API provides the facility of waiving off the remaining amount on a client charge -

+   +
+
+

Retrieve a Savings account Charge

+

Example Requests:

+
self/savingsaccounts/1/charges/5
+
+
+
self/savingsaccounts/1/charges/5?fields=name,amountOrPercentage
+
+
+ + GET https://DomainName/api/v1/self/savingsaccounts/{accountId}/charges/{savingsAccountChargeId} + + + { + "id": 1, + "chargeId": 1, + "name": "Passbook fee", + "chargeTimeType": { + "id": 1, + "code": "chargeTimeType.specifiedDueDate", + "value": "Specified due date" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "percentage": 0, + "amountPercentageAppliedTo": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 100, + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 100, + "amountOrPercentage": 100, + "penalty": false + } +
+
-
-
- -POST https://DomainName/api/v1/clients/{clientId}/charges/{clientChargeId}?command=waive - - -POST clients/189/charges/157?command=waive -Content-Type: application/json -No Request Body - - - -{ - "clientId":"189", - "resourceId":157 -} - -
-
+   +
+
+

Retrieve Account Transfer Template

+

Returns list of loan/savings accounts that can be used for account transfer

+

Example Requests:

+
self/accounttransfers/template
+
+
+ GET https://DomainName/api/v1/self/accounttransfers/template + + + { + "fromAccountOptions": [ + { + "accountId": 1, + "accountNo": "00000001", + "accountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "clientId": 1, + "clientName": "ABC", + "officeId": 1, + "officeName": "HEAD OFFICE" + }, + { + "accountId": 5, + "accountNo": "00000005", + "accountType": { + "id": 1, + "code": "accountType.loan", + "value": "Loan Account" + }, + "clientId": 2, + "clientName": "XYZ", + "officeId": 3, + "officeName": "REGIONAL OFFICE" + } + ], + "toAccountOptions": [ + { + "accountId": 1, + "accountNo": "00000001", + "accountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "clientId": 1, + "clientName": "ABC", + "officeId": 1, + "officeName": "HEAD OFFICE" + }, + { + "accountId": 5, + "accountNo": "00000005", + "accountType": { + "id": 1, + "code": "accountType.loan", + "value": "Loan Account" + }, + "clientId": 2, + "clientName": "XYZ", + "officeId": 3, + "officeName": "REGIONAL OFFICE" + } + ] -   -
-
-

Undo a Client Transaction

-
-
- -POST https://DomainName/api/v1/clients/{clientId}/transactions/{transactionId}?command=undo - - -POST clients/189/transactions/222?command=undo -Content-Type: application/json -No Request Body - - + } + +
+
-{ -"officeId":1, -"clientId":189, -"resourceId":222 -} -
-
-
- -   -
-
-

Delete a UGD

-
-
- -DELETE https://DomainName/api/v1/templates/{templateId} - - -DELETE templates/1 -Content-Type: application/json -No Request Body: - - -{ - "resourceId": 1 -} - -
-
+   +
+
+

Create new Transfer

+

Ability to create new transfer of monetary funds from one account to another.

+
+
+ POST https://DomainName/api/v1/self/accounttransfers + POST self/accounttransfers/ + Content-Type: application/json + No Request Body: + { + "fromOfficeId": 1, + "fromClientId": 1, + "fromAccountType": 2, + "fromAccountId": 1, + "toOfficeId": 1, + "toClientId": 1, + "toAccountType": 2, + "toAccountId": 2, + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "transferDate": "01 August 2011", + "transferAmount": "112.45", + "transferDescription": "A description of the transfer" + } + + + { + "savingsId": 1, + "resourceId": 1 + } + +
+
- - -   -
-
-

SPM API

-

- The Apache Fineract SPM API provides the ability to create custom surveys to collect social performance measurentment data or any additional questionnaire a financial institute want to collect. -

-
-
-   -
-
-

Create a Survey

-

Adds a new survey to collect client related data.

- - - - - - - -
Mandatory Fields
countryCode, key, name, questions, responses, sequenceNo, text, value
-
-
- -POST https://DomainName/api/v1/surveys - - -POST surveys -Content-Type: application/json -Request Body: -{ - "key":"ppi-kenya-2010", - "name":"PPI Survey for Kenya, version 2010", - "description":null, - "countryCode":"KE", - "validFrom":null, - "validTo":null, - "componentDatas": - [ - { - "key":"Household", - "text":"Information about the household.", - "description":null, - "sequenceNo":1 - } - ], - "questionDatas": - [ - { - "componentKey":"Household", - "key":"Familiy members", - "text":"How many persons live in the household?", - "description":null, - "sequenceNo":1, - "responseDatas": - [ - { - "text":"1 to 3", - "value":1, - "sequenceNo":1 - }, - { - "text":"3 to 7", - "value":5, - "sequenceNo":2 - }, - { - "text":"more than 7", - "value":13, - "sequenceNo":3 - } - ] - } - ] -} - - -200 OK - -
-
-   -
-
-

List all Surveys

-
-
- -GET https://DomainName/api/v1/surveys - - -GET surveys -Content-Type: application/json -No Request Body - - -[ - { - "id": 1, - "componentDatas": [ - { - "id": 1, - "key": "Household", - "text": "Information about the household.", - "description": null, - "sequenceNo": 1 - } - ], - "questionDatas": [ - { - "id": 1, - "responseDatas": [ - { - "id": 1, - "text": "1 to 3", - "value": 1, - "sequenceNo": 1 - }, - { - "id": 2, - "text": "3 to 7", - "value": 5, - "sequenceNo": 2 - }, - { - "id": 3, - "text": "more than 7", - "value": 13, - "sequenceNo": 3 - } - ], - "componentKey": "Household", - "key": "Familiy members", - "text": "How many persons live in the household?", - "description": null, - "sequenceNo": 1 - } - ], - "key": "ppi-kenya-2010", - "name": "PPI Survey for Kenya, version 2010", - "description": null, - "countryCode": "KE", - "validFrom": 1450047600000, - "validTo": 4607276399000 - } -] - -
-
-   -
-
-

Retrieve a Survey

-
-
- -GET https://DomainName/api/v1/surveys/1 - - -GET surveys/1 -Content-Type: application/json -No Request Body - - -{ - "id": 1, - "componentDatas": [ - { - "id": 1, - "key": "Household", - "text": "Information about the household.", - "description": null, - "sequenceNo": 1 - } - ], - "questionDatas": [ - { - "id": 1, - "responseDatas": [ - { - "id": 1, - "text": "1 to 3", - "value": 1, - "sequenceNo": 1 - }, - { - "id": 2, - "text": "3 to 7", - "value": 5, - "sequenceNo": 2 - }, - { - "id": 3, - "text": "more than 7", - "value": 13, - "sequenceNo": 3 - } - ], - "componentKey": "Household", - "key": "Familiy members", - "text": "How many persons live in the household?", - "description": null, - "sequenceNo": 1 - } - ], - "key": "ppi-kenya-2010", - "name": "PPI Survey for Kenya, version 2010", - "description": null, - "countryCode": "KE", - "validFrom": 1450047600000, - "validTo": 4607276399000 -} - -
-
-   -
-
-

Deactivate Survey

-
-
- -DELETE https://DomainName/api/v1/surveys/1 - - -DELETE surveys/1 -Content-Type: application/json -No Request Body - - -200 OK - -
-
-   -
-
-

Create a Lookup Table entry

-

Add a new netry to a survey.

- - - - - - - -
Mandatory Fields
key, score, validFrom, validTo
-
-
- -POST https://DomainName/api/v1/surveys/1/lookuptables - - -POST surveys/1/lookuptables -Content-Type: application/json -Request Body: -{ - "key": "test-table", - "description": null, - "entries": [ - { - "valueFrom": 0, - "valueTo": 25, - "score": 100 - }, - { - "valueFrom": 26, - "valueTo": 50, - "score": 50 - }, - { - "valueFrom": 51, - "valueTo": 75, - "score": 25 - }, - { - "valueFrom": 76, - "valueTo": 100, - "score": 0 - } - ] -} - - -200 OK - -
-
-   -
-
-

List all Lookup Table entries

-

List all Lookup Table entries for a survey.

-
-
- -GET https://DomainName/api/v1/surveys/1/lookuptables - - -GET surveys/1/lookuptables -Content-Type: application/json -No Request Body - - -[ - { - "key": "test-table", - "description": null, - "entries": [ - { - "valueFrom": 0, - "valueTo": 25, - "score": 100 - }, - { - "valueFrom": 26, - "valueTo": 50, - "score": 50 - }, - { - "valueFrom": 51, - "valueTo": 75, - "score": 25 - }, - { - "valueFrom": 76, - "valueTo": 100, - "score": 0 - } - ] - } -] - -
-
-   -
-
-

Retrieve a Lookup Table entry

-

Retrieve a Lookup Table entry for a survey.

-
-
- -GET https://DomainName/api/v1/surveys/1/lookuptables/1 - - -GET surveys/1/lookuptables/test-table -Content-Type: application/json -No Request Body - - -{ - "key": "test-table", - "description": null, - "entries": [ - { - "valueFrom": 0, - "valueTo": 25, - "score": 100 - }, - { - "valueFrom": 26, - "valueTo": 50, - "score": 50 - }, - { - "valueFrom": 51, - "valueTo": 75, - "score": 25 - }, - { - "valueFrom": 76, - "valueTo": 100, - "score": 0 - } - ] -} - -
-
- -   -
-
-

Create a Scorecard entry

-

Add a new netry to a survey.

- - - - - - - -
Mandatory Fields
clientId, createdOn, questionId, responseId, staffId
-
-
- -POST https://DomainName/api/v1/surveys/1/scorecards - - -POST surveys/1/scorecards -Content-Type: application/json -Request Body: -{ - "userId": 1, - "clientId": 1, - "createdOn": 1451905784553, - "scorecardValues": - [ - { - "questionId": 1, - "responseId": 1, - "value": 0 - }, - { - "questionId": 2, - "responseId": 8, - "value": 0 - }, - { - "questionId": 3, - "responseId": 12, - "value": 7 - }, - { - "questionId": 4, - "responseId": 16, - "value": 4 - }, - { - "questionId": 5, - "responseId": 21, - "value": 2 - }, - { - "questionId": 6, - "responseId": 25, - "value": 2 - }, - { - "questionId": 7, - "responseId": 28, - "value": 3 - }, - { - "questionId": 8, - "responseId": 30, - "value": 6 - }, - { - "questionId": 9, - "responseId": 33, - "value": 4 - }, - { - "questionId": 10, - "responseId": 37, - "value": 7 - } - ] -} - -200 OK - -
-
-   -
-
-

List all Scorecard entries

-

List all Scorecard entries for a survey.

-
-
- -GET https://DomainName/api/v1/surveys/1/scorecards - - -GET surveys/1/scorecards -Content-Type: application/json -No Request Body - - -[ - { - "userId": 1, - "clientId": 1, - "createdOn": 1451905784553, - "scorecardValues": - [ - { - "questionId": 1, - "responseId": 1, - "value": 0 - }, - { - "questionId": 2, - "responseId": 8, - "value": 0 - }, - { - "questionId": 3, - "responseId": 12, - "value": 7 - }, - { - "questionId": 4, - "responseId": 16, - "value": 4 - }, - { - "questionId": 5, - "responseId": 21, - "value": 2 - }, - { - "questionId": 6, - "responseId": 25, - "value": 2 - }, - { - "questionId": 7, - "responseId": 28, - "value": 3 - }, - { - "questionId": 8, - "responseId": 30, - "value": 6 - }, - { - "questionId": 9, - "responseId": 33, - "value": 4 - }, - { - "questionId": 10, - "responseId": 37, - "value": 7 - } - ] - } -] - -
-
- +   +
+
+

Beneficiary Third Party Transfer Template

+

Returns Account Type enumerations. Self User is expected to know office name and account number to be + able to add beneficiary.

+

Example Requests:

+
/self/beneficiaries/tpt/template
+
+
+ GET https://DomainName/api/v1/self/beneficiaries/tpt/template + + + { + "accountTypeOptions": + [ + { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + { + "id": 1, + "code": "accountType.loan", + "value": "Loan Account" + } + ] + } + +
+
- -
-
-

Self Service APIs

-
-
-   -
-
-

Verify authentication

-

Authenticates the credentials provided and returns the set roles and permissions allowed.

-
-
- -POST https://DomainName/api/v1/self/authentication - - -POST self/authentication -Content-Type: application/json -Request Body -{ - "username": "mifos", - "password": "password" -} - -

Example response of autentication for user

- -{ - "username": "mifos", - "userId": 1, - "base64EncodedAuthenticationKey": "bWlmb3M6cGFzc3dvcmQ=", - "authenticated": true, - "officeId": 1, - "officeName": "Head Office", - "staffId": 1, - "staffDisplayName": "Director, Program", - "organisationalRole": { - "id": 100, - "code": "staffOrganisationalRoleType.programDirector", - "value": "Program Director" - }, - "roles": [ - { - "id": 1, - "name": "Super user", - "description": "This role provides all application permissions." - } - ], - "permissions": [ - "ALL_FUNCTIONS" - ], - "isSelfServiceUser": true, - "clients": [1,2,3] -} - +   +
+
+

Add TPT Beneficiary

+

Api to add third party beneficiary linked to current user.

+

Parameter Definitions

+

name : Nick name for beneficiary, should be unique for an self service user

+

officeName : Office Name of beneficiary(not id)

+

accountNumber : Account Number of beneficiary(not id)

+

transferLimit : Each transfer initiated to this account will not exceed this amount

+

Example Requests:

+
/self/beneficiaries/tpt
+ + + + + + + +
+
Mandatory Fields
+
name, officeName, accountNumber, accountType
+
+ + + + + + + +
+
Optional Fields
+
transferLimit +
+
- -POST self/authentication?username=mifos&password=fail -Content-Type: application/json -No Request Body - - -{ - "developerMessage": "Invalid authentication details were passed in api request.", - "developerDocLink": "https://github.com/openMF/mifosx/wiki/HTTP-API-Error-codes", - "httpStatusCode": "401", - "defaultUserMessage": "Unauthenticated. Please login.", - "userMessageGlobalisationCode": "error.msg.not.authenticated", - "errors": [] -} - -
-
+
+ POST https://DomainName/api/v1/self/beneficiaries/tpt + + + POST self/beneficiaries/tpt + Content-Type: application/json + Request Body: + { + "locale": "en_GB", + "name": "beneficiary nick name", + "officeName": "HEAD OFFICE", + "accountNumber": "0000001", + "accountType": 1, + "transferLimit": 1000 -   -
-
-

Fetch authenticated user details

-

checks the Authentication and returns the set roles and permissions allowed.

-
-
- -POST https://DomainName/api/v1/self/userdetails - - -POST self/userdetails -Content-Type: application/json -No Request Body - -

Example response of authenticated user.

- -{ - "username": "mifos", - "userId": 1, - "base64EncodedAuthenticationKey": "bWlmb3M6cGFzc3dvcmQ=", - "authenticated": true, - "officeId": 1, - "officeName": "Head Office", - "staffId": 1, - "staffDisplayName": "Director, Program", - "organisationalRole": { - "id": 100, - "code": "staffOrganisationalRoleType.programDirector", - "value": "Program Director" - }, - "roles": [ - { - "id": 1, - "name": "Super user", - "description": "This role provides all application permissions." - } - ], - "permissions": [ - "ALL_FUNCTIONS" - ], - "isSelfServiceUser": true, - "clients": [1,2,3] -} - + } +
+ + { + "resourceId": 5 + } + +
+
-
-
+   +
+
+

Get All TPT Beneficiary

+

Api to get all third party beneficiary linked to current user.

+

Example Requests:

+
/self/beneficiaries/tpt
+
-   -
-
-

Update User

-

This API can be used by Self Service user to update their own user information. Currently, "password" and "repeatPassword" are the only parameters accepted.

-
-
- -PUT https://DomainName/api/v1/self/user - - -PUT self/user -Content-Type: application/json +
+ GET https://DomainName/api/v1/self/beneficiaries/tpt + + + GET self/beneficiaries/tpt + Content-Type: application/json + + + { + [ + { + "id": 1, + "name": "Client2Savings", + "officeName": "Test Office", + "clientName": "FN2 LN2", + "accountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "accountNumber": "000000002", + "transferLimit": 0 + }, + { + "id": 4, + "name": "Client2Loan", + "officeName": "Test Office", + "clientName": "FN2 LN2", + "accountType": { + "id": 1, + "code": "accountType.loan", + "value": "Loan Account" + }, + "accountNumber": "000000002", + "transferLimit": 1000 + }] + } + +
+
-{ - "password":"Abcd1234", - "repeatPassword":"Abcd1234" -} - -

Example response

- -{ - "officeId": 1, - "resourceId": 6, - "changes": { - "passwordEncoded": "6a72a630795be86fe926ce540fc45b6b922fe5ba130f185fe806a26b5e5efcdd" - } -} - -
-
+   +
+
+

Update TPT Beneficiary

+

Api to update third party beneficiary linked to current user.

+

Example Requests:

+
/self/beneficiaries/tpt/{beneficiaryId}
+
+ + + + + + + +
+
Optional Fields
+
name, transferLimit +
+
-   -
-
-

List Clients associated to the user

-

The list capability of clients can support pagination and sorting.

-
Optional Arguments
-
-
offset
-
- Integer optional, defaults to 0 -
-
Indicates the result from which pagination starts
- -
limit
-
- Integer optional, defaults to 200 -
-
Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- -
orderBy
-
- String optional, one of displayName, accountNo, officeId, officeName -
-
Orders results by the indicated field.
- -
sortBy
-
- String optional, one of ASC, DESC -
-
Indicates what way to order results if orderBy is used.
- -
displayName
-
- String optional -
-
Use displayName of clients to restrict results.
- -
firstName
-
- String optional -
-
Use firstName of clients to restrict results.
- -
lastName
-
- String optional -
-
Use lastName of clients to restrict results.
- -
-

Example Requests:

-
self/clients
-
-
self/clients?fields=displayName,officeName
-
-
self/clients?offset=10&limit=50
-
-
self/clients?orderBy=displayName&sortOrder=DESC
-
-
- -GET https://DomainName/api/v1/self/clients - - -{ - "totalFilteredRecords": 2, - "pageItems": [ - { - "id": 1, - "accountNo": "000000001", - "status": { - "id": 300, - "code": "clientStatusType.active", - "value": "Active" - }, - "active": true, - "activationDate": [ - 2013, - 3, - 1 - ], - "fullname": "Small shop", - "displayName": "Small shop", - "officeId": 1, - "officeName": "Head Office" - }, - { - "id": 2, - "accountNo": "000000002", - "status": { - "id": 100, - "code": "clientStatusType.pending", - "value": "Pending" - }, - "active": false, - "fullname": "Home Farm Produce", - "displayName": "Home Farm Produce", - "officeId": 1, - "officeName": "Head Office" - } - ] -} - -
-
+
+ PUT https://DomainName/api/v1/self/beneficiaries/tpt/{beneficiaryId} + + + PUT self/beneficiaries/tpt/5 + Content-Type: application/json + Request Body: + { + "name": "beneficiary nick name", + "transferLimit": 1000 -   -
-
-

Retrieve a Client

-

Example Requests:

-
self/clients/1
-
-
self/clients/1?fields=id,displayName,officeName
-
-
- -GET https://DomainName/api/v1/self/clients/{clientId} - - -{ - "id": 27, - "accountNo": "000000027", - "status": { - "id": 300, - "code": "clientStatusType.active", - "value": "Active" - }, - "active": true, - "activationDate": [ - 2013, - 1, - 1 - ], - "firstname": "savings", - "lastname": "test", - "displayName": "savings test", - "officeId": 1, - "officeName": "Head Office", - "timeline": { - "submittedOnDate": [ - 2013, - 1, - 1 - ], - "submittedByUsername": "mifos", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator", - "activatedOnDate": [ - 2013, - 1, - 1 - ], - "activatedByUsername": "mifos", - "activatedByFirstname": "App", - "activatedByLastname": "Administrator" - }, - "savingsProductId": 4, - "savingsProductName": "account overdraft", - "groups": [] -} - -
-
-   -
-
-

Retrieve client accounts overview

-

- An example of how a loan portfolio summary can be provided. This - is requested in a specific use case of the community application.
It is quite reasonable to add resources like this to simplify User Interface development. -

-

Example Requests:

-
self/clients/1/accounts
-
-
-
self/clients/1/accounts?fields=loanAccounts,savingsAccounts
-
-
- -GET https://DomainName/api/v1/self/clients/{clientId}/accounts - - -{ - "loanAccounts": [ - { - "id": 1, - "accountNo": "000000001", - "externalId": "456", - "productId": 1, - "productName": "TestOne", - "status": { - "id": 300, - "code": "loanStatusType.active", - "value": "Active", - "pendingApproval": false, - "waitingForDisbursal": false, - "active": true, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "loanType": { - "id": 1, - "code": "loanType.individual", - "value": "Individual" - }, - "loanCycle": 1 - } - ], - "savingsAccounts": [ - { - "id": 7, - "accountNo": "000000007", - "productId": 2, - "productName": "Other product", - "status": { - "id": 100, - "code": "savingsAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - }, - { - "id": 6, - "accountNo": "000000006", - "productId": 1, - "productName": "Passbook Savings", - "status": { - "id": 300, - "code": "savingsAccountStatusType.active", - "value": "Active", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": true, - "closed": false - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "accountBalance": 1828.03 - }, - { - "id": 5, - "accountNo": "000000005", - "productId": 1, - "productName": "Passbook Savings", - "status": { - "id": 400, - "code": "savingsAccountStatusType.withdrawn.by.applicant", - "value": "Withdrawn by applicant", - "submittedAndPendingApproval": false, - "approved": false, - "rejected": false, - "withdrawnByApplicant": true, - "active": false, - "closed": true - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - } - } - ] -} - -
-
+ } +
+ + { + "resourceId": 5, + "changes": { + "transferLimit": 1000, + "name": "Client22" + } + } + +
+
-   -
-
-

Retrieve Client Image

-

Optional arguments are identical to those of Get Image associated with an Entity (Binary file)

-

Example Requests:

-
self/clients/1/images
-
-
-
- -GET https://DomainName/api/v1/self/clients/{clientId}/images -Accept: text/plain +   +
+
+

Delete TPT Beneficiary

+

Api to delete third party beneficiary linked to current user.

+

Example Requests:

+
/self/beneficiaries/tpt/{beneficiaryId}
+
+ +
+ DELETE https://DomainName/api/v1/self/beneficiaries/tpt/{beneficiaryId} + + + DELETE self/beneficiaries/tpt/5 + Content-Type: application/json + + + { + "resourceId": 5 + } + +
+
-
- -data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJ -bWFnZVJlYWR5ccllPAAAAJ1JREFUeNpi+P//PwMIA4E9EG8E4idQDGLbw+WhiiqA+D8OXAFVAzbp -DxBvB2JLIGaGYkuoGEjOhhFIHAbij0BdPgxYACMj42ogJQpifwBiXSDeC8JIbt4LxSC5DyxQjTeB -+BeaYb+Q5EBOAVutCzMJHUNNPADzzDokiYdAfAmJvwLkGeTgWQfyKZICS6hYBTwc0QL8ORSjBDhA -gAEAOg13B6R/SAgAAAAASUVORK5CYII= - -
-
+   +
+
+

Third Party Account Transfer Template

+

Returns list of loan/savings accounts that can be used for third party account transfer

+

Example Requests:

+
self/accounttransfers/template?type="tpt"
+
+
+ GET https://DomainName/api/v1/self/accounttransfers/template?type="tpt" + + + { + "fromAccountOptions": [ + { + "accountId": 1, + "accountNo": "00000001", + "accountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "clientId": 1, + "clientName": "ABC", + "officeId": 1, + "officeName": "HEAD OFFICE" + }, + { + "accountId": 5, + "accountNo": "00000005", + "accountType": { + "id": 1, + "code": "accountType.loan", + "value": "Loan Account" + }, + "clientId": 2, + "clientName": "XYZ", + "officeId": 3, + "officeName": "REGIONAL OFFICE" + } + ], + "toAccountOptions": [ + { + "accountId": 2, + "accountNo": "00000002", + "accountType": { + "id": 2, + "code": "accountType.savings", + "value": "Savings Account" + }, + "clientId": 2, + "clientName": "ABC", + "officeId": 1, + "officeName": "HEAD OFFICE" + }, + { + "accountId": 6, + "accountNo": "00000006", + "accountType": { + "id": 1, + "code": "accountType.loan", + "value": "Loan Account" + }, + "clientId": 3, + "clientName": "XYZ", + "officeId": 4, + "officeName": "REGIONAL OFFICE" + } + ] -   -
-
-

List Client Charges

- -

The list capability of client charges supports pagination.

-
Optional Arguments
-
-
offset
-
- Integer Mandatory, defaults to 0 -
-
Indicates the result from which pagination starts
- -
limit
-
- Integer Mandatory, defaults to 200 -
-
Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
- -
pendingPayment
-
- String optional -
-
Filters charges that are pending payment (neither paid or waived).
- -
chargeStatus
-
- String optional -
-
Filters charges according to the status.
-
-

Example Requests:

-
self/clients/1/charges
-
self/clients/1/charges?offset=0&limit=5
-
-
- -GET https://DomainName/api/v1/self/clients/{clientId}/charges?limit=5&offset=0 - - -GET self/clients/1/charges?limit=5&offset=0 -Content-Type: application/json -No Request Body - - -{ - "totalFilteredRecords": 4, - "pageItems": [ - { - "id": 5, - "clientId": 1, - "chargeId": 6, - "name": "Client Fees 2", - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "dueDate": [ - 2015, - 9, - 1 - ], - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 550.000000, - "amountPaid": 0.000000, - "amountWaived": 0.000000, - "amountWrittenOff": 0, - "amountOutstanding": 550.000000, - "penalty": false, - "isActive": true, - "isPaid": false, - "isWaived": false - }, - { - "id": 4, - "clientId": 1, - "chargeId": 5, - "name": "Client Fee 1", - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "dueDate": [ - 2015, - 8, - 31 - ], - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 120.000000, - "amountPaid": 0.000000, - "amountWaived": 120.000000, - "amountWrittenOff": 0, - "amountOutstanding": 120.000000, - "penalty": true, - "isActive": true, - "isPaid": false, - "isWaived": true - }, - { - "id": 3, - "clientId": 1, - "chargeId": 5, - "name": "Client Fee 1", - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "dueDate": [ - 2015, - 8, - 17 - ], - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100.000000, - "amountPaid": 0.000000, - "amountWaived": 100.000000, - "amountWrittenOff": 0, - "amountOutstanding": 0.000000, - "penalty": true, - "isActive": true, - "isPaid": false, - "isWaived": true - }, - { - "id": 2, - "clientId": 1, - "chargeId": 2, - "name": "Recurring savings Charge", - "chargeTimeType": { - "id": 7, - "code": "chargeTimeType.monthlyFee", - "value": "Monthly Fee" - }, - "dueDate": [ - 2015, - 8, - 17 - ], - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100.000000, - "amountPaid": 0, - "amountWaived": 100.000000, - "amountWrittenOff": 0, - "amountOutstanding": 0.000000, - "penalty": false, - "isActive": true, - "isPaid": false, - "isWaived": true - } - ] -} + } + +
+
-
-
-
-   -
-
-

Retrieve a Client Charge

-
Arguments
-
-
associations
-
- optional, a comma separated list of - 'associations' (itemised below). -
-
-
Associations are just extra pieces of data that you - might or might not want to retrieve.
-
-
-
- 'transactions': Retrieves all transactions made on this client charge. -
-
-

Example Requests:

-
self/clients/1/charges/1
-
-
-
self/clients/1/charges/1?fields=name,id
-
-
- -GET https://DomainName/api/v1/self/clients/{clientId}/charges/{clientChargeId} - - -{ - "id": 3, - "clientId": 1, - "chargeId": 5, - "name": "Client Fee 1", - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "dueDate": [ - 2015, - 8, - 17 - ], - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100.000000, - "amountPaid": 0.000000, - "amountWaived": 100.000000, - "amountWrittenOff": 0, - "amountOutstanding": 0.000000, - "penalty": true, - "isActive": true, - "isPaid": false, - "isWaived": true -} - -
-
+   +
+
+

Third Party Account Transfer

+

Ability to create new third party transfer of monetary funds from one account to another.

+
+
+ POST https://DomainName/api/v1/self/accounttransfers?type="tpt" + POST self/accounttransfers?type="tpt" + Content-Type: application/json + No Request Body: + { + "fromOfficeId": 1, + "fromClientId": 1, + "fromAccountType": 2, + "fromAccountId": 1, + "toOfficeId": 1, + "toClientId": 2, + "toAccountType": 2, + "toAccountId": 2, + "dateFormat": "dd MMMM yyyy", + "locale": "en", + "transferDate": "01 August 2011", + "transferAmount": "112.45", + "transferDescription": "A description of the transfer" + } + + + { + "savingsId": 1, + "resourceId": 1 + } + +
+
-   -
-
-

List Client Transactions

-

The list capability of client transaction can support pagination.

-
Mandatory Arguments
-
-
offset
-
- Integer Mandatory, defaults to 0 -
-
Indicates the result from which pagination starts
- -
limit
-
- Integer Mandatory, defaults to 200 -
-
Restricts the size of results returned. To override the default and return all entries you must explicitly pass a non-positive integer value for limit e.g. limit=0, or limit=-1
-
-

Example Requests:

-
self/clients/189/transactions
-
self/clients/189/transactions?offset=10&limit=50
-
-
- -GET https://DomainName/api/v1/self/clients/{clientId}/transactions?limit=5&offset=0 - - -GET self/clients/226/transactions?limit=5&offset=0 -Content-Type: application/json -No Request Body: +   +
+
+

Retrieve Share Account Template:

+

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
  • +
+

+

Arguments

+
+
clientId
+
Integer mandatory
+
productId
+
Integer optional
+
If entered, productId, productName and selectedProduct fields are returned.
+
+

Example Requests:

+
self/shareaccounts/template?clientId=14
+

+
self/shareaccounts/template?clientId=14&productId=3
+
+
+ GET https://Domain + Name/api/v1/self/shareaccounts/template?clientId={clientId} + + { + "clientId": 14, + "productOptions": [ + { + "id": 3, + "name": "SP", + "shortName": "SP", + "totalShares": 1000 + }, + { + "id": 4, + "name": "Product1", + "shortName": "test", + "totalShares": 1000 + } + ], + "chargeOptions": [ + { + "id": 2, + "name": "Activation fee", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 2, + "chargeTimeType": { + "id": 14, + "code": "chargeTimeType.sharespurchase", + "value": "Share Purchase" + }, + "chargeAppliesTo": { + "id": 4, + "code": "chargeAppliesTo.shares", + "value": "Shares" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + } + ] + } + +
+ +
+ GET https://Domain + Name/api/v1/self/shareaccounts/template?clientId={clientId}&productId={productId} + + { + "clientId": 14, + "productOptions": [ + { + "id": 3, + "name": "SP", + "shortName": "SP", + "description": "SP1", + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "totalShares": 1000, + "totalSharesIssued": 900, + "unitPrice": 1, + "shareCapital": 900, + "minimumShares": 8, + "nominalShares": 500, + "maximumShares": 500, + "marketPrice": [], + "charges": [], + "allowDividendCalculationForInactiveClients": false, + "lockinPeriod": 50, + "lockPeriodTypeEnum": { + "id": 0, + "code": "shares.lockin.sharePeriodFrequencyType.days", + "value": "Days" + }, + "minimumActivePeriod": 10, + "minimumActivePeriodForDividendsTypeEnum": { + "id": 0, + "code": "shares.minimumactive.sharePeriodFrequencyType.days", + "value": "Days" + }, + "accountingRule": { + "id": 2, + "code": "accountingRuleType.cash", + "value": "CASH BASED" + }, + "accountingMappings": { + "shareReferenceId": { + "id": 32, + "name": "Cash In Hand", + "glCode": "20301" + }, + "incomeFromFeeAccountId": { + "id": 40, + "name": "Other Operating Income", + "glCode": "30105" + }, + "shareEquityId": { + "id": 56, + "name": "Share Equity", + "glCode": "00098" + }, + "shareSuspenseId": { + "id": 2, + "name": "Overpayment Liability", + "glCode": "10200" + } + }, + "currencyOptions": [ + { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + } + ], + "chargeOptions": [ + { + "id": 2, + "name": "Activation fee", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 2, + "chargeTimeType": { + "id": 14, + "code": "chargeTimeType.sharespurchase", + "value": "Share Purchase" + }, + "chargeAppliesTo": { + "id": 4, + "code": "chargeAppliesTo.shares", + "value": "Shares" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + } + ], + "minimumActivePeriodFrequencyTypeOptions": [ + { + "id": 0, + "code": "shares.lockin.sharePeriodFrequencyType.days", + "value": "Days" + } + ], + "lockinPeriodFrequencyTypeOptions": [ + { + "id": 0, + "code": "shares.lockin.sharePeriodFrequencyType.days", + "value": "Days" + }, + { + "id": 1, + "code": "shares.lockin.sharePeriodFrequencyType.weeks", + "value": "Weeks" + }, + { + "id": 2, + "code": "shares.lockin.sharePeriodFrequencyType.months", + "value": "Months" + }, + { + "id": 3, + "code": "shares.lockin.sharePeriodFrequencyType.years", + "value": "Years" + } + ], + "accountingMappingOptions": { + "liabilityAccountOptions": [ + { + "id": 30, + "name": "Recurring Deposits", + "parentId": 1, + "glCode": "10104", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 2, + "code": "accountType.liability", + "value": "LIABILITY" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "....Recurring Deposits", + "tagId": { + "id": 0, + "active": false, + "mandatory": false + } + }, + { + "id": 2, + "name": "Overpayment Liability", + "glCode": "10200", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 2, + "code": "accountType.liability", + "value": "LIABILITY" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "Overpayment Liability", + "tagId": { + "id": 0, + "active": false, + "mandatory": false + } + }, + { + "id": 55, + "name": "Liability Transfer (Temp)", + "glCode": "220004-Temp", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 2, + "code": "accountType.liability", + "value": "LIABILITY" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "description": "Temporary Liability account to track Account Transfers", + "nameDecorated": "Liability Transfer (Temp)", + "tagId": { + "id": 0, + "active": false, + "mandatory": false + } + } + ], + "assetAccountOptions": [ + { + "id": 31, + "name": "Furniture and Fixtures", + "parentId": 8, + "glCode": "20101", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "....Furniture and Fixtures", + "tagId": { + "id": 0, + "active": false, + "mandatory": false + } + }, + { + "id": 32, + "name": "Cash In Hand", + "parentId": 10, + "glCode": "20301", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "....Cash In Hand", + "tagId": { + "id": 0, + "active": false, + "mandatory": false + } + }, + { + "id": 33, + "name": "Petty Cash", + "parentId": 10, + "glCode": "20302", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "....Petty Cash", + "tagId": { + "id": 0, + "active": false, + "mandatory": false + } + }, + { + "id": 34, + "name": "Loans to Customers", + "parentId": 12, + "glCode": "20501", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "....Loans to Customers", + "tagId": { + "id": 0, + "active": false, + "mandatory": false + } + }, + { + "id": 35, + "name": "Current Account Overdrafts", + "parentId": 12, + "glCode": "20502", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "....Current Account Overdrafts", + "tagId": { + "id": 0, + "active": false, + "mandatory": false + } + }, + { + "id": 17, + "name": "Suspense Account", + "glCode": "9999", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 1, + "code": "accountType.asset", + "value": "ASSET" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "Suspense Account", + "tagId": { + "id": 0, + "active": false, + "mandatory": false + } + } + ], + "incomeAccountOptions": [ + { + "id": 54, + "name": "Loan Recovery (Temp)", + "glCode": "220002-Temp", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 4, + "code": "accountType.income", + "value": "INCOME" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "description": "Temporary account to track income from Loan recovery", + "nameDecorated": "Loan Recovery (Temp)", + "tagId": { + "id": 0, + "active": false, + "mandatory": false + } + }, + { + "id": 36, + "name": "Fees and Charges", + "parentId": 18, + "glCode": "30101", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 4, + "code": "accountType.income", + "value": "INCOME" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "....Fees and Charges", + "tagId": { + "id": 0, + "active": false, + "mandatory": false + } + }, + { + "id": 37, + "name": "Penalties", + "parentId": 18, + "glCode": "30102", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 4, + "code": "accountType.income", + "value": "INCOME" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "....Penalties", + "tagId": { + "id": 0, + "active": false, + "mandatory": false + } + }, + { + "id": 38, + "name": "Interest Received from Borrowers", + "parentId": 18, + "glCode": "30103", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 4, + "code": "accountType.income", + "value": "INCOME" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "....Interest Received from Borrowers", + "tagId": { + "id": 0, + "active": false, + "mandatory": false + } + }, + { + "id": 39, + "name": "Insurance Charges", + "parentId": 18, + "glCode": "30104", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 4, + "code": "accountType.income", + "value": "INCOME" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "....Insurance Charges", + "tagId": { + "id": 0, + "active": false, + "mandatory": false + } + }, + { + "id": 40, + "name": "Other Operating Income", + "parentId": 18, + "glCode": "30105", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 4, + "code": "accountType.income", + "value": "INCOME" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "....Other Operating Income", + "tagId": { + "id": 0, + "active": false, + "mandatory": false + } + } + ], + "equityAccountOptions": [ + { + "id": 56, + "name": "Share Equity", + "parentId": 25, + "glCode": "00098", + "disabled": false, + "manualEntriesAllowed": true, + "type": { + "id": 3, + "code": "accountType.equity", + "value": "EQUITY" + }, + "usage": { + "id": 1, + "code": "accountUsage.detail", + "value": "DETAIL" + }, + "nameDecorated": "....Share Equity", + "tagId": { + "id": 0, + "active": false, + "mandatory": false + } + } + ] + } + } + ], + "chargeOptions": [ + { + "id": 2, + "name": "Activation fee", + "active": true, + "penalty": false, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 2, + "chargeTimeType": { + "id": 14, + "code": "chargeTimeType.sharespurchase", + "value": "Share Purchase" + }, + "chargeAppliesTo": { + "id": 4, + "code": "chargeAppliesTo.shares", + "value": "Shares" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "chargePaymentMode": { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + } + ] + } + +
+
-
- -{ - "totalFilteredRecords": 20, - "pageItems": [ - { - "id": 226, - "officeId": 1, - "officeName": "Head Office", - "type": { - "id": 1, - "code": "clientTransactionType.payCharge", - "value": "PAY_CHARGE" - }, - "date": [ - 2015, - 9, - 2 - ], - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 22, - "submittedOnDate": [ - 2015, - 9, - 2 - ], - "reversed": false - } - ] -} - -
-
+   +
+
+

Submit new share application

+
+ + + + + + + +
+
Mandatory Fields
+
clientId, productId, submittedDate, savingsAccountId, requestedShares, applicationDate
+
+ + + + + + + +
+
Optional Fields
+
accountNo, externalId
+
+ + + + + + + +
+
Inherited from Product (if not provided)
+
minimumActivePeriod, minimumActivePeriodFrequencyType, lockinPeriodFrequency, + lockinPeriodFrequencyType +
+
+
+

Minimal request: accountNo auto generated, remaining details inherited from Share product.

+ POST https://Domain Name/api/v1/self/shareaccounts + POST Share Account + Content-Type: application/json + Request Body: + { + "productId":3, + "unitPrice":1, + "requestedShares":500, + "submittedDate":"31 July 2018", + "savingsAccountId":2, + "applicationDate":"31 July 2018", + "locale":"en", + "dateFormat":"dd MMMM yyyy", + "charges":[ + { + "chargeId":2, + "amount":2 + } + ], + "clientId":"14" + } + + + { + "resourceId": 12 + } + +
+
-   -
-
-

Retrieve a Client Transaction

-

Example Requests:

-
self/clients/1/transactions/1
-
-
-
self/clients/1/transactions/1?fields=id,officeName
-
-
- -GET https://DomainName/api/v1/self/clients/{clientId}/transaction/{transactionId} - - -{ - "id": 1, - "officeId": 1, - "officeName": "Head Office", - "type": { - "id": 1, - "code": "clientTransactionType.payCharge", - "value": "PAY_CHARGE" - }, - "date": [ - 2015, - 8, - 17 - ], - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 60.000000, - "submittedOnDate": [ - 2015, - 8, - 19 - ], - "reversed": true -} - -
-
+   +
+
+

Retrieve a share application/account:

-   -
-
-

Retrieve Loan Details Template

-

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
  • -
-

-
Arguments
-
-
templateType
-
- String mandatory, only allowed value is individual -
-
-
templateType value decides the required template data for creating a new loan application. - -
-
-
'individual': Loan template data for creating individual loans. -
-
clientId
-
- Integer mandatory -
-
-
Optional Arguments
-
-
productId
-
- Integer optional -
-
If entered, productId, productName and selectedProduct - fields are returned.
- -
-

Example Requests:

-
self/loans/template?templateType=individual&clientId=1
-
-
-
self/loans/template?templateType=individual&clientId=1&productId=1
-
-
- -GET https://DomainName/api/v1/self/loans/template?templateType=individual&clientId=1 - - -{ - "clientId": 1, - "clientName": "Kampala first Client", - "clientOfficeId": 2, - "timeline": { - "expectedDisbursementDate": [ - 2013, - 3, - 8 - ] - }, - "productOptions": [ - { - "id": 1, - "name": "Kampala Product (with cash accounting)" - } - ] -} - - -GET https://DomainName/api/v1/self/loans/template?templateType=individual&clientId=1&productId=1 - - -{ - "clientId": 1, - "clientName": "Kampala first Client", - "clientOfficeId": 2, - "loanProductId": 1, - "loanProductName": "Kampala Product (with cash accounting)", - "loanProductDescription": "Typical Kampala loan product with cash accounting enabled for testing.", - "currency": { - "code": "UGX", - "name": "Uganda Shilling", - "decimalPlaces": 2, - "displaySymbol": "USh", - "nameCode": "currency.UGX", - "displayLabel": "Uganda Shilling (USh)" - }, - "principal": 1000000, - "termFrequency": 12, - "termPeriodFrequencyType": { - "id": 2, - "code": "repaymentFrequency.periodFrequencyType.months", - "value": "Months" - }, - "numberOfRepayments": 12, - "repaymentEvery": 1, - "repaymentFrequencyType": { - "id": 2, - "code": "repaymentFrequency.periodFrequencyType.months", - "value": "Months" - }, - "interestRatePerPeriod": 24, - "interestRateFrequencyType": { - "id": 3, - "code": "interestRateFrequency.periodFrequencyType.years", - "value": "Per year" - }, - "annualInterestRate": 24, - "amortizationType": { - "id": 1, - "code": "amortizationType.equal.installments", - "value": "Equal installments" - }, - "interestType": { - "id": 1, - "code": "interestType.flat", - "value": "Flat" - }, - "interestCalculationPeriodType": { - "id": 1, - "code": "interestCalculationPeriodType.same.as.repayment.period", - "value": "Same as repayment period" - }, - "transactionProcessingStrategyCode": "mifos-standard-strategy", - "timeline": { - "expectedDisbursementDate": [ - 2013, - 3, - 8 - ] - }, - "daysInMonthType": { - "id": 30, - "code": "DaysInMonthType.days360", - "value": "30 Days" - }, - "daysInYearType": { - "id": 360, - "code": "DaysInYearType.days360", - "value": "360 Days" - }, - "isInterestRecalculationEnabled": true, - "interestRecalculationData": { - "interestRecalculationCompoundingType": { - "id": 2, - "code": "interestRecalculationCompoundingMethod.fee", - "value": "Fee" - }, - "recalculationCompoundingFrequencyType": { - "id":1, - "code":"interestRecalculationFrequencyType.same.as.repayment.period", - "value":"Same as repayment period" - }, - "rescheduleStrategyType": { - "id": 2, - "code": "loanRescheduleStrategyMethod.reduce.number.of.installments", - "value": "Reduce number of installments" - }, - "recalculationRestFrequencyType": { - "id":1, - "code":"interestRecalculationFrequencyType.same.as.repayment.period", - "value":"Same as repayment period" - } - } - "charges": [], - "productOptions": [ - { - "id": 1, - "name": "Kampala Product (with cash accounting)" - } - ], - "loanOfficerOptions": [ - { - "id": 2, - "firstname": "Kampala", - "lastname": "LoanOfficer", - "displayName": "LoanOfficer, Kampala", - "officeId": 2, - "officeName": "Uganda (Kampala)", - "isLoanOfficer": true - } - ], - "loanPurposeOptions": [ - { - "id": 20, - "name": "option.Agriculture", - "position": 1 - }, - { - "id": 21, - "name": "option.Manufacturing", - "position": 20 - }, - { - "id": 22, - "name": "option.HousingImprovement", - "position": 21 - } - ], - "termFrequencyTypeOptions": [ - { - "id": 0, - "code": "loanTermFrequency.periodFrequencyType.days", - "value": "Days" - }, - { - "id": 1, - "code": "loanTermFrequency.periodFrequencyType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "loanTermFrequency.periodFrequencyType.months", - "value": "Months" - }, - { - "id": 3, - "code": "loanTermFrequency.periodFrequencyType.years", - "value": "Years" - } - ], - "repaymentFrequencyTypeOptions": [ - { - "id": 0, - "code": "repaymentFrequency.periodFrequencyType.days", - "value": "Days" - }, - { - "id": 1, - "code": "repaymentFrequency.periodFrequencyType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "repaymentFrequency.periodFrequencyType.months", - "value": "Months" - } - ], - "interestRateFrequencyTypeOptions": [ - { - "id": 2, - "code": "interestRateFrequency.periodFrequencyType.months", - "value": "Per month" - }, - { - "id": 3, - "code": "interestRateFrequency.periodFrequencyType.years", - "value": "Per year" - } - ], - "amortizationTypeOptions": [ - { - "id": 1, - "code": "amortizationType.equal.installments", - "value": "Equal installments" - }, - { - "id": 0, - "code": "amortizationType.equal.principal", - "value": "Equal principle payments" - } - ], - "interestTypeOptions": [ - { - "id": 1, - "code": "interestType.flat", - "value": "Flat" - }, - { - "id": 0, - "code": "interestType.declining.balance", - "value": "Declining Balance" - } - ], - "interestCalculationPeriodTypeOptions": [ - { - "id": 0, - "code": "interestCalculationPeriodType.daily", - "value": "Daily" - }, - { - "id": 1, - "code": "interestCalculationPeriodType.same.as.repayment.period", - "value": "Same as repayment period" - } - ], - "transactionProcessingStrategyOptions": [ - { - "id": 2, - "code": "heavensfamily-strategy", - "name": "Heavensfamily" - } - ], - "chargeOptions": [ - { - "id": 1, - "name": "Bank Fee (per installment)", - "active": true, - "penalty": false, - "currency": { - "code": "UGX", - "name": "Uganda Shilling", - "decimalPlaces": 2, - "displaySymbol": "USh", - "nameCode": "currency.UGX", - "displayLabel": "Uganda Shilling (USh)" - }, - "amount": 1500, - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - } - } - ], - "loanCollateralOptions": [ - { - "id": 17, - "name": "option.House", - "position": 1 - }, - { - "id": 18, - "name": "option.Television", - "position": 17 - }, - { - "id": 19, - "name": "option.Gold", - "position": 18 - } - ], - "accountLinkingOptions":[ - { - "id":1, - "accountNo":"000000001", - "clientId":1, - "clientName":"pramod nuthakki", - "productId":1, - "productName":"pramod sav", - "fieldOfficerId":0, - "currency":{"code":"USD","name":"US Dollar","decimalPlaces":2,"displaySymbol":"$","nameCode":"currency.USD","displayLabel":"US Dollar ($)"} - } - ] -} - -
-
+

Example Requests :

+
self/shareaccounts/12
+
+
+ GET https://DomainName/api/v1/self/shareaccounts/{accountId} + + { + "id": 12, + "accountNo": "000000012", + "savingsAccountNumber": "000000002", + "clientId": 14, + "clientName": "Bheem", + "productId": 3, + "productName": "SP", + "status": { + "id": 100, + "code": "shareAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "active": false, + "closed": false + }, + "timeline": { + "submittedOnDate": [ + 2018, + 7, + 31 + ], + "submittedByUsername": "self", + "submittedByFirstname": "self", + "submittedByLastname": "self" + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "summary": { + "id": 12, + "accountNo": "000000012", + "totalApprovedShares": 0, + "totalPendingForApprovalShares": 500, + "productId": 3, + "productName": "SP", + "status": { + "id": 100, + "code": "shareAccountStatusType.submitted.and.pending.approval", + "value": "Submitted and pending approval", + "submittedAndPendingApproval": true, + "approved": false, + "rejected": false, + "active": false, + "closed": false + }, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "timeline": { + "submittedOnDate": [ + 2018, + 7, + 31 + ], + "submittedByUsername": "self", + "submittedByFirstname": "self", + "submittedByLastname": "self" + } + }, + "purchasedShares": [ + { + "id": 13, + "accountId": 12, + "purchasedDate": [ + 2018, + 7, + 31 + ], + "numberOfShares": 500, + "purchasedPrice": 1, + "status": { + "id": 100, + "code": "purchasedSharesStatusType.applied", + "value": "Pending Approval" + }, + "type": { + "id": 500, + "code": "purchasedSharesType.purchased", + "value": "Purchase" + }, + "amount": 502, + "chargeAmount": 2, + "amountPaid": 500 + } + ], + "savingsAccountId": 2, + "currentMarketPrice": 1, + "lockPeriodTypeEnum": { + "id": 4, + "code": "sharePeriodFrequencyType.invalid", + "value": "Invalid" + }, + "minimumActivePeriodTypeEnum": { + "id": 4, + "code": "sharePeriodFrequencyType.invalid", + "value": "Invalid" + }, + "allowDividendCalculationForInactiveClients": false, + "charges": [ + { + "id": 9, + "chargeId": 2, + "accountId": 12, + "name": "Activation fee", + "chargeTimeType": { + "id": 14, + "code": "chargeTimeType.sharespurchase", + "value": "Share Purchase" + }, + "chargeCalculationType": { + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" + }, + "percentage": 0, + "amountPercentageAppliedTo": 0, + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "amount": 2, + "amountPaid": 0, + "amountWaived": 0, + "amountWrittenOff": 0, + "amountOutstanding": 2, + "amountOrPercentage": 2, + "isActive": true + } + ], + "dividends": [] + } + +
+
-   -
-
-

Calculate Loan Repayment Schedule

- - - - - - - -
Mandatory Fields
productId, principal, loanTermFrequency, - loanTermFrequencyType, numberOfRepayments, repaymentEvery, - repaymentFrequencyType, interestRatePerPeriod, - amortizationType, interestType, - interestCalculationPeriodType, expectedDisbursementDate, - transactionProcessingStrategyCode
-
-
- -POST https://DomainName/api/v1/self/loans?command=calculateLoanSchedule - - -POST self/loans?command=calculateLoanSchedule -Content-Type: application/json -Request Body: -{ - "dateFormat": "dd MMMM yyyy", - "locale": "en_GB", - "productId": 1, - "principal": "100,000.00", - "loanTermFrequency": 12, - "loanTermFrequencyType": 2, - "numberOfRepayments": 12, - "repaymentEvery": 1, - "repaymentFrequencyType": 2, - "interestRatePerPeriod": 2, - "amortizationType": 1, - "interestType": 0, - "interestCalculationPeriodType": 1, - "expectedDisbursementDate": "20 September 2011", - "transactionProcessingStrategyCode": "mifos-standard-strategy" -} - - -{ - "currency": { - "code": "UGX", - "name": "Uganda Shilling", - "decimalPlaces": 2, - "displaySymbol": "USh", - "nameCode": "currency.UGX", - "displayLabel": "Uganda Shilling (USh)" - }, - "loanTermInDays": 366, - "totalPrincipalDisbursed": 100000, - "totalPrincipalExpected": 100000, - "totalPrincipalPaid": 0, - "totalInterestCharged": 13471.52, - "totalFeeChargesCharged": 0, - "totalPenaltyChargesCharged": 0, - "totalWaived": 0, - "totalWrittenOff": 0, - "totalRepaymentExpected": 113471.52, - "totalRepayment": 0, - "totalOutstanding": 0, - "periods": [ - { - "period": 0, - "dueDate": [ - 2011, - 9, - 20 - ], - "principalDisbursed": 100000, - "principalLoanBalanceOutstanding": 100000, - "feeChargesDue": 0, - "feeChargesOutstanding": 0, - "totalOriginalDueForPeriod": 0, - "totalDueForPeriod": 0, - "totalOutstandingForPeriod": 0, - "totalOverdue": 0, - "totalActualCostOfLoanForPeriod": 0 - }, - { - "period": 1, - "fromDate": [ - 2011, - 9, - 20 - ], - "dueDate": [ - 2011, - 10, - 20 - ], - "daysInPeriod": 30, - "principalOriginalDue": 7455.96, - "principalDue": 7455.96, - "principalOutstanding": 7455.96, - "principalLoanBalanceOutstanding": 92544.04, - "interestOriginalDue": 2000, - "interestDue": 2000, - "interestOutstanding": 2000, - "feeChargesDue": 0, - "penaltyChargesDue": 0, - "totalOriginalDueForPeriod": 9455.96, - "totalDueForPeriod": 9455.96, - "totalPaidForPeriod": 0, - "totalOutstandingForPeriod": 9455.96, - "totalOverdue": 9455.96, - "totalActualCostOfLoanForPeriod": 2000 - }, - ... - ... - { - "period": 12, - "fromDate": [ - 2012, - 8, - 20 - ], - "dueDate": [ - 2012, - 9, - 20 - ], - "daysInPeriod": 31, - "principalOriginalDue": 9270.56, - "principalDue": 9270.56, - "principalOutstanding": 9270.56, - "principalLoanBalanceOutstanding": 0, - "interestOriginalDue": 185.4, - "interestDue": 185.4, - "interestOutstanding": 185.4, - "feeChargesDue": 0, - "penaltyChargesDue": 0, - "totalOriginalDueForPeriod": 9455.96, - "totalDueForPeriod": 9455.96, - "totalPaidForPeriod": 0, - "totalOutstandingForPeriod": 9455.96, - "totalOverdue": 9455.96, - "totalActualCostOfLoanForPeriod": 185.4 - } - ] -} - -
-
+   +
+
+

List Guarantors

+

Example Requests:

+
self/loans/33/guarantors
+
+
+
+ + GET https://DomainName/api/v1/self/loans/{loanId}/guarantors + + + [ + { + "id":6, + "loanId":33, + "guarantorType":{ + "id":1, + "code":"guarantor.existing.customer", + "value":"CUSTOMER" + }, + "firstname":"Abhishek v", + "lastname":"M", + "entityId":12, + "officeName":"Head Office", + "joinedDate":[ + 2014, + 7, + 5 + ], + "guarantorFundingDetails":[ + { + "id":7, + "status":{ + "id":100, + "code":"guarantorFundStatusType.active", + "value":"ACTIVE" + }, + "savingsAccount":{ + "id":28, + "accountNo":"000000028" + }, + "amount":2000, + "amountReleased":0, + "amountRemaining":2000, + "amountTransfered":0, + "guarantorTransactions":[ + { + "id":6, + "onHoldTransactionData":{ + "id":6, + "amount":2000, + "transactionType":{ + "id":1, + "code":"deposutAccountOnHoldTransactionType.hold", + "value":"hold" + }, + "transactionDate":[ + 2018, + 10, + 10 + ], + "reversed":false, + "savingsId":0, + "loanId":0 + }, + "reversed":false + } + ] + } + ], + "status":true + }, + { + "id":7, + "loanId":33, + "clientRelationshipType":{ + "id":6, + "name":"Parent", + "active":false, + "mandatory":false + }, + "guarantorType":{ + "id":1, + "code":"guarantor.existing.customer", + "value":"CUSTOMER" + }, + "firstname":"Bheem", + "lastname":"Test", + "entityId":14, + "officeName":"Head Office", + "joinedDate":[ + 2013, + 7, + 3 + ], + "guarantorFundingDetails":[ + { + "id":8, + "status":{ + "id":100, + "code":"guarantorFundStatusType.active", + "value":"ACTIVE" + }, + "savingsAccount":{ + "id":37, + "accountNo":"000000037" + }, + "amount":1000, + "amountReleased":0, + "amountRemaining":1000, + "amountTransfered":0, + "guarantorTransactions":[ + { + "id":7, + "onHoldTransactionData":{ + "id":7, + "amount":1000, + "transactionType":{ + "id":1, + "code":"deposutAccountOnHoldTransactionType.hold", + "value":"hold" + }, + "transactionDate":[ + 2018, + 10, + 10 + ], + "reversed":false, + "savingsId":0, + "loanId":0 + }, + "reversed":false + } + ] + } + ], + "status":true + } + ] + +
+
+   +
+
+

Obligee List

+

Obligee list provides list of clients and other details, to whom the user has agreed to be a + guarantor.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
clientId
The client id of the self service user.
firstName, lastName, displayName
The first name, last name and display name of the obligee
accountNumber, loanAmount
The loan account number and principal amount of the obligee
guaranteeAmount, amountReleased, amountTransferred
Guranteed amount, released and transferred amount of the client
+ +

Example Requests:

+
self/clients/14/obligeedetails
+
+
+
+ + GET https://DomainName/api/v1/self/clients/{clientId}/obligeedetails + + + [ + { + "firstName":"App", + "lastName":"Test", + "displayName":"App Test", + "accountNumber":"000000005", + "loanAmount":50000, + "guaranteeAmount":10000, + "amountReleased":0, + "amountTransferred":0 + }, + { + "firstName":"App", + "lastName":"Test", + "displayName":"App Test", + "accountNumber":"000000005", + "loanAmount":50000, + "guaranteeAmount":5000, + "amountReleased":0, + "amountTransferred":0 + }, + { + "firstName":"App", + "lastName":"Test", + "displayName":"App Test", + "accountNumber":"000000006", + "loanAmount":50000, + "guaranteeAmount":10000, + "amountReleased":0, + "amountTransferred":0 + }, + { + "firstName":"Abhishek v", + "lastName":"M", + "displayName":"Abhishek v M", + "accountNumber":"000000032", + "loanAmount":10000, + "guaranteeAmount":1000, + "amountReleased":1000, + "amountTransferred":0 + }, + { + "firstName":"Abhishek v", + "lastName":"M", + "displayName":"Abhishek v M", + "accountNumber":"000000033", + "loanAmount":10000, + "guaranteeAmount":1000, + "amountReleased":0, + "amountTransferred":0 + } + ] + +
+
+   +
+
+

Upload client image (Data URI)

+
+
+ + POST https://DomainName/api/v1/self/clients/{clientId}/images + + + POST self/clients/14/images + Content-Type: text/plain + Request Body: + data:image/png;base64,iVBORw0KGgoAA + AANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0l + EQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6 + P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC + + + { + "resourceId": 14, + "changes": {}, + "resourceIdentifier": "14" + } + +
+
-   -
-
-

Submit a new Loan Application

-

Only individual loanType can be used by Self Service User

- - - - - - - -
Mandatory Fields
clientId, productId, principal, loanTermFrequency, - loanTermFrequencyType, loanType, numberOfRepayments, repaymentEvery, - repaymentFrequencyType, interestRatePerPeriod, - amortizationType, interestType, - interestCalculationPeriodType, transactionProcessingStrategyCode, - expectedDisbursementDate, submittedOnDate, loanType
-
- - - - - - - -
Additional Mandatory Fields if interest recalculation is enabled for product and Rest frequency not same as repayment period
recalculationRestFrequencyDate
- - - - - - - -
Additional Mandatory Fields if interest recalculation with interest/fee compounding is enabled for product and compounding frequency not same as repayment period
recalculationCompoundingFrequencyDate
-
- - - - - - - -
Optional Fields
graceOnPrincipalPayment, graceOnInterestPayment, graceOnInterestCharged, linkAccountId, allowPartialPeriodInterestCalculation, - fixedEmiAmount, maxOutstandingLoanBalance, disbursementData, graceOnArrearsAgeing, createStandingInstructionAtDisbursement (requires linkedAccountId if set to true) -
-
-
- -POST https://DomainName/api/v1/self/loans - - -POST self/loans -Content-Type: application/json -Request Body: -{ - "dateFormat": "dd MMMM yyyy", - "locale": "en_GB", - "clientId": 1, - "productId": 1, - "principal": "10,000.00", - "loanTermFrequency": 12, - "loanTermFrequencyType": 2, - "loanType": "individual", - "numberOfRepayments": 10, - "repaymentEvery": 1, - "repaymentFrequencyType": 2, - "interestRatePerPeriod": 10, - "amortizationType": 1, - "interestType": 0, - "interestCalculationPeriodType": 1, - "transactionProcessingStrategyCode": "mifos-standard-strategy", - "expectedDisbursementDate": "10 Jun 2013", - "submittedOnDate": "10 Jun 2013", - "linkAccountId" : "1", - "fixedEmiAmount":1100, - "maxOutstandingLoanBalance":"35000", - "disbursementData":[{"expectedDisbursementDate":"01 November 2013", - "principal":22000,"approvedPrincipal":22000}] -} - - -{ - "officeId": 1, - "clientId": 1, - "loanId": 1, - "resourceId": 1 -} - -
-
-   -
-
-

Retrieve a Loan

-
Arguments
-
-
associations
-
- optional, a comma separated list of - loan 'associations' (itemised below). -
-
-
Associations are just extra pieces of data that you - might or might not want to retrieve.
-
-
-
- 'repaymentSchedule': Loan schedule data. -
-
- 'originalSchedule': Loan schedule data without interest recalculations. -
-
- 'futureSchedule': Loan schedule data from today date(will be displayed only for interest first repayment strategy processors) -
-
- 'transactions': Loan transactions data. -
-
- 'charges': Loan charges data. -
-
- 'guarantors': Loan guarantors data. -
-
- 'collateral': Loan collateral data. -
-
- 'linkedAccount': Account linked to loan. -
-
- 'multiDisburseDetails': Loan multi-disbursement details. -
-
-

Example Requests:

-
self/loans/1
-
-
-
self/loans/1?fields=id,principal,annualInterestRate
-
-
-
self/loans/1?fields=id,principal,annualInterestRate&associations=repaymentSchedule,transactions
-
-
- -GET https://DomainName/api/v1/self/loans/{loanId} - - -{ - "id": 1, - "accountNo": "000000001", - "status": { - "id": 300, - "code": "loanStatusType.active", - "value": "Active", - "pendingApproval": false, - "waitingForDisbursal": false, - "active": true, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "clientId": 1, - "clientName": "Kampala first Client", - "clientOfficeId": 2, - "loanProductId": 1, - "loanProductName": "Kampala Product (with cash accounting)", - "loanProductDescription": "Typical Kampala loan product with cash accounting enabled for testing.", - "loanPurposeId": 22, - "loanPurposeName": "option.HousingImprovement", - "loanOfficerId": 2, - "loanOfficerName": "LoanOfficer, Kampala", - "loanType": { - "id": 1, - "code": "loanType.individual", - "value": "Individual" - }, - "currency": { - "code": "UGX", - "name": "Uganda Shilling", - "decimalPlaces": 2, - "displaySymbol": "USh", - "nameCode": "currency.UGX", - "displayLabel": "Uganda Shilling (USh)" - }, - "principal": 1000000, - "termFrequency": 12, - "termPeriodFrequencyType": { - "id": 2, - "code": "termFrequency.periodFrequencyType.months", - "value": "Months" - }, - "numberOfRepayments": 12, - "repaymentEvery": 1, - "repaymentFrequencyType": { - "id": 2, - "code": "repaymentFrequency.periodFrequencyType.months", - "value": "Months" - }, - "interestRatePerPeriod": 24, - "interestRateFrequencyType": { - "id": 3, - "code": "interestRateFrequency.periodFrequencyType.years", - "value": "Per year" - }, - "annualInterestRate": 24, - "amortizationType": { - "id": 1, - "code": "amortizationType.equal.installments", - "value": "Equal installments" - }, - "interestType": { - "id": 1, - "code": "interestType.flat", - "value": "Flat" - }, - "interestCalculationPeriodType": { - "id": 1, - "code": "interestCalculationPeriodType.same.as.repayment.period", - "value": "Same as repayment period" - }, - "transactionProcessingStrategyCode": "mifos-standard-strategy", - "timeline": { - "submittedOnDate": [ - 2012, - 4, - 3 - ], - "submittedByUsername": "admin", - "submittedByFirstname": "App", - "submittedByLastname": "Administrator", - "approvedOnDate": [ - 2012, - 4, - 3 - ], - "approvedByUsername": "admin", - "approvedByFirstname": "App", - "approvedByLastname": "Administrator", - "expectedDisbursementDate": [ - 2012, - 4, - 10 - ], - "actualDisbursementDate": [ - 2012, - 4, - 10 - ], - "disbursedByUsername": "admin", - "disbursedByFirstname": "App", - "disbursedByLastname": "Administrator", - "expectedMaturityDate": [ - 2013, - 4, - 10 - ] - }, - "summary": { - "currency": { - "code": "UGX", - "name": "Uganda Shilling", - "decimalPlaces": 2, - "displaySymbol": "USh", - "nameCode": "currency.UGX", - "displayLabel": "Uganda Shilling (USh)" - }, - "principalDisbursed": 1000000, - "principalPaid": 0, - "principalWrittenOff": 0, - "principalOutstanding": 1000000, - "principalOverdue": 833333.3, - "interestCharged": 240000, - "interestPaid": 0, - "interestWaived": 0, - "interestWrittenOff": 0, - "interestOutstanding": 240000, - "interestOverdue": 200000, - "feeChargesCharged": 18000, - "feeChargesDueAtDisbursementCharged": 0, - "feeChargesPaid": 0, - "feeChargesWaived": 0, - "feeChargesWrittenOff": 0, - "feeChargesOutstanding": 18000, - "feeChargesOverdue": 15000, - "penaltyChargesCharged": 0, - "penaltyChargesPaid": 0, - "penaltyChargesWaived": 0, - "penaltyChargesWrittenOff": 0, - "penaltyChargesOutstanding": 0, - "penaltyChargesOverdue": 0, - "totalExpectedRepayment": 1258000, - "totalRepayment": 0, - "totalExpectedCostOfLoan": 258000, - "totalCostOfLoan": 0, - "totalWaived": 0, - "totalWrittenOff": 0, - "totalOutstanding": 1258000, - "totalOverdue": 1048333.3, - "overdueSinceDate": [ - 2012, - 5, - 10 - ], - "linkedAccount":{ - "id":1, - "accountNo":"000000001" - }, - "disbursementDetails":[{"id":71,"expectedDisbursementDate":[2013,11,1],"principal":22000.000000,"approvedPrincipal":22000.000000}], - "fixedEmiAmount":1100.000000, - "maxOutstandingLoanBalance":35000, - "canDisburse":false, - "emiAmountVariations": [], - "inArrears": true, - "isNPA":false, - "overdueCharges": [ - { - "id": 20, - "name": "overdraft penality", - "active": true, - "penalty": true, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 3.000000, - "chargeTimeType": { - "id": 9, - "code": "chargeTimeType.overdueInstallment", - "value": "overdue fees" - }, - "chargeAppliesTo": { - "id": 1, - "code": "chargeAppliesTo.loan", - "value": "Loan" - }, - "chargeCalculationType": { - "id": 2, - "code": "chargeCalculationType.percent.of.amount", - "value": "% Amount" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - }, - "feeInterval": 2, - "feeFrequency": { - "id": 1, - "code": "feeFrequencyperiodFrequencyType.weeks", - "value": "Weeks" - } - } - ] - } -} - -
-
+   +
+
+

Upload client image (Multi-part Form data)

+ + + + + + + +
+
Mandatory Fields
+
file +
+

+ The form should contain a required named body part with the + name "file".

+ If you are using a HTML form, a snippet like + <input type="file" name="file"></input> + can be used for uploading the image file +

+
+
+ + POST https://DomainName/api/v1/self/clients/{clientId}/images + + + POST self/clients/14/images + Content-Type: multipart/form-data + Request Body: Not shown + + + { + "resourceId": 14, + "changes": {}, + "resourceIdentifier": "14" + } + +
+
+   +
+
+

Delete an client's Image

+
+
+ + DELETE https://DomainName/api/v1/self/clients/{clientId}/images + + + DELETE self/clients/14/images + Content-Type: application/json + No Request Body: + + + { + "resourceId": 14, + "changes": {}, + "resourceIdentifier": "14" + } +
+
-   -
-
-

Update a Loan Application

-

Loan 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.

-
-
- PUT https://Domain Name/api/v1/self/loans/{loanId} - PUT self/loans/1 -Content-Type: application/json -No Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "productId": 1, - "principal": "5000", - "loanTermFrequency": 10, - "loanTermFrequencyType": 0, - "numberOfRepayments": 10, - "repaymentEvery": 1, - "repaymentFrequencyType": 0, - "interestRatePerPeriod": 2, - "interestType": 0, - "interestCalculationPeriodType": 0, - "amortizationType": 1, - "expectedDisbursementDate": "04 March 2014", - "transactionProcessingStrategyCode": "mifos-standard-strategy" -} - - -{ - "officeId": 2, - "clientId": 1, - "loanId": 1, - "resourceId": 1, - "changes": { - "principal": 5000, - "locale": "en" - } -} - -
-
+   +
+
+

Loan Products

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
name
Name associated with loan product on system.
shortName
Short name associated with a loan product.
+ An abbreviated version of the name, used in reports or menus where space is limited, such as + Collection Sheets. +
description
For providing helpful description of product offering.
fundId
For associating a loan product with a given fund by default.
includeInBorrowerCycle
It is a flag, Used to denote whether the loans should include in loan cycle + counter or not. +
useBorrowerCycle
It is a flag, Used to denote whether the loans should depend on
borrower + loan cycle counter or not. +
currencyCode
A three letter ISO code of currency.
digitsAfterDecimal
Override the currency default value for digitsAfterDecimal.
inMultiplesOf
Override the default value for rounding currency to multiples of value + provided. +
installmentAmountInMultiplesOf
Override the default value for rounding instalment amount to multiples of + value provided. +
principal
The loan amount to be disbursed to through loan.
numberOfRepayments
Number of installments to repay.
+ Used like: numberOfRepayments Every repaymentEvery + repaymentFrequencyType
e.g. 10 (repayments) Every 12 Weeks +
repaymentEvery
Used like: numberOfRepayments Every + repaymentEvery repaymentFrequencyType
e.g. 10 + (repayments) Every 12 Weeks +
repaymentFrequencyType
Used like: numberOfRepayments Every + repaymentEvery repaymentFrequencyType
e.g. 10 + (repayments) Every 12 Weeks
+ Example Values: 0=Days, 1=Weeks, 2=Months +
interestRatePerPeriod
Interest Rate.
Used like: + interestRatePerPeriod % interestRateFrequencyType - interestType
+ e.g. 12.0000% Per year - Declining Balance +
interestRateFrequencyType
Used like: interestRatePerPeriod% + interestRateFrequencyType - interestType
e.g. 12.0000% + Per year - Declining Balance
+ Example Values: 2=Per month, 3=Per year +
amortizationType
Example Values: 0=Equal + principle payments, 1=Equal installments +
interestType
Used like: interestRatePerPeriod% + interestRateFrequencyType - interestType
e.g. 12.0000% + Per year - Declining Balance
+ Example Values: 0=Declining Balance, 1=Flat +
interestCalculationPeriodType
Example Values: 0=Daily, 1=Same as repayment period
allowPartialPeriodInterestCalculation
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) +
inArrearsTolerance
The amount that can be 'waived' at end + of all loan payments because it is too small to worry about.
+ This is also the tolerance amount assessed when determining if a + loan is in arrears. +
principalVariationsForBorrowerCycle,interestRateVariationsForBorrowerCycle,
numberOfRepaymentVariationsForBorrowerCycle +
Variations for loan, based on borrower cycle number +
minimumDaysBetweenDisbursalAndFirstRepayment
The minimum number of days allowed between a Loan disbursal and its first + repayment. +
principalThresholdForLastInstalment
Field represents percentage of current instalment principal amount for + comparing against principal outstanding to add another repayment instalment. If the + outstanding principal amount is less then calculated amount, remaining outstanding amount + will be added to current instalment. Default value for multi disburse loan is 50% and + non-multi disburse loan is 0% +
canDefineInstallmentAmount
if provided as true, then fixed instalment amount can be provided from loan + account. +
transactionProcessingStrategyCode
+ An enumeration that indicates the type of transaction processing strategy to be used. This + relates to functionality that is also known as Payment Application Logic. + +

A number of out of the box approaches exist, some are custom to specific MFIs, some are + more general and indicate the order in which payments are processed.

+ +

Refer to the Payment Application Logic / Transaction + Processing Strategy section in the appendix for more detailed overview of each + available payment application logic provided out of the box.

+ + List of current approaches:
+
    +
  • 1 = Mifos style (Similar to Old Mifos)
  • +
  • 2 = Heavensfamily (Custom MFI approach)
  • +
  • 3 = Creocore (Custom MFI approach)
  • +
  • 4 = RBI (India)
  • +
  • 5 = Principal Interest Penalties Fees Order
  • +
  • 6 = Interest Principal Penalties Fees Order
  • +
  • 7 = Early Payment Strategy
  • +
+
graceOnPrincipalPayment
Optional: Integer - represents the number of repayment periods that grace + should apply to the principal component of a repayment period. +
graceOnInterestPayment
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. +
graceOnInterestCharged
Optional: Integer - represents the number of repayment periods that should + be interest-free. +
graceOnArrearsAgeing
Optional: Integer - Used in Arrears calculation to only take into account + loans that are more than graceOnArrearsAgeing days overdue. +
overdueDaysForNPA
Optional: Integer - represents the maximum number of days a Loan may + be overdue before being classified as a NPA (non performing asset) +
accountMovesOutOfNPAOnlyOnArrearsCompletion
Optional: Boolean - if provided as true, Loan Account moves out of NPA state + only when all arrears are cleared +
accountingRule
Specifies if accounting is enabled for the particular + product and the type of the accounting rule to be used + Example Values:1=NONE, 2=CASH_BASED, 3=ACCRUAL_PERIODIC, 4=ACCRUAL_UPFRONT +
isInterestRecalculationEnabled
It is a flag, Used to denote whether interest recalculation is enabled or + disabled for the particular product +
daysInYearType
Specifies the number of days in a year.
+ Example Values:1=ACTUAL(Actual number of days in year), 360=360 DAYS, 364=364 + DAYS(52 WEEKS), 365=365 DAYS +
daysInMonthType
Specifies the number of days in a month.
+ Example Values:1=ACTUAL(Actual number of days in month), 30=30 DAYS +
interestRecalculationCompoundingMethod
Specifies which amount portion should be added to principal for interest + recalculation.
+ Example Values:0=NONE(Only on principal), 1=INTEREST(Principal+Interest), + 2=FEE(Principal+Fee), 3=FEE And INTEREST (Principal+Fee+Interest) +
rescheduleStrategyMethod
Specifies what action should perform on loan repayment schedule for advance + payments.
+ Example Values:1=Reschedule next repayments, 2=Reduce number of installments, + 3=Reduce EMI amount, 4=Adjust last, unpaid period +
recalculationCompoundingFrequencyType
Specifies effective date from which the compounding of interest or fee + amounts will be considered in recalculation on late payment.
+ Example Values:1=Same as repayment period, 2=Daily, 3=Weekly, 4=Monthly +
recalculationCompoundingFrequencyInterval
Specifies compounding frequency interval for interest recalculation.
+
recalculationCompoundingFrequencyDate
Specifies compounding frequency start date for interest recalculation.
+
recalculationRestFrequencyType
Specifies effective date from which the late or advanced payment amounts + will be considered in recalculation.
+ Example Values:1=Same as repayment period, 2=Daily, 3=Weekly, 4=Monthly +
recalculationRestFrequencyInterval
Specifies rest frequency interval for interest recalculation.
+
recalculationRestFrequencyDate
Specifies rest frequency start date for interest recalculation.
+
preClosureInterestCalculationStrategy
Specifies applicable days for interest calculation on pre closure of a loan.
+ Example Values:1=Calculate till pre closure date, 2=Calculate till rest + frequency date +
isArrearsBasedOnOriginalSchedule
If Specified as true, arrears will be identified based on original schedule.
+
allowAttributeOverrides
Specifies if select attributes may be overridden for individual loan + accounts.
+
+
+
-   -
-
-

Applicant Withdraws from Loan Application

- - - - - - - -
Mandatory Fields
withdrawnOnDate
-
-
- -POST https://DomainName/api/v1/self/loans/{loanId}?command=withdrawnByApplicant - - -POST self/loans/1?command=withdrawnByApplicant -Content-Type: application/json -Request Body: -{ - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "withdrawnOnDate": "20 September 2011", - "note": "Reason loan applicant withdrew from application." -} - - -{ - "officeId": 1, - "clientId": 1, - "loanId": 2, - "resourceId": 2, - "changes": { - "status": { - "id": 400, - "code": "loanStatusType.withdrawn.by.client", - "value": "Withdrawn by applicant", - "pendingApproval": false, - "waitingForDisbursal": false, - "active": false, - "closedObligationsMet": false, - "closedWrittenOff": false, - "closedRescheduled": false, - "closed": false, - "overpaid": false - }, - "locale": "en", - "dateFormat": "dd MMMM yyyy", - "withdrawnOnDate": "20 September 2011", - "closedOnDate": "20 September 2011" - } -} - -
-
+   +
+
+

List Loan Products

+

Example Requests:

+
self/loanproducts?clientId=1
+
+
+
self/loanproducts?fields=name,description&clientId=1
+
+
+ + GET https://DomainName/api/v1/self/loanproducts?clientId={clientId} + + + [ + { + "name":"Personal loan", + "description":"Loan", + "useBorrowerCycle":false, + "status":"loanProduct.active", + "allowVariableInstallments":false, + "minimumGap":0, + "maximumGap":0, + "daysInMonthType":{ + "code":"DaysInMonthType.actual", + "value":"Actual" + }, + "daysInYearType":{ + "code":"DaysInYearType.actual", + "value":"Actual" + }, + "isInterestRecalculationEnabled":false, + "canDefineInstallmentAmount":false, + "installmentAmountInMultiplesOf":1, + "principalVariationsForBorrowerCycle":[ + + ], + "interestRateVariationsForBorrowerCycle":[ + + ], + "numberOfRepaymentVariationsForBorrowerCycle":[ + + ], + "multiDisburseLoan":false, + "maxTrancheCount":0, + "principalThresholdForLastInstallment":0, + "holdGuaranteeFunds":false, + "accountMovesOutOfNPAOnlyOnArrearsCompletion":false, + "allowAttributeOverrides":{ + "graceOnPrincipalAndInterestPayment":true, + "graceOnArrearsAgeing":true + }, + "syncExpectedWithDisbursementDate":false + } + ] + +
+
-   -
-
-

Retrieve a Loan Transaction Details

-

Example Request:

-
self/loans/5/transactions/3
-
-
- -GET https://DomainName/api/v1/self/loans/{loanId}/transactions/{transactionId} - - -{ - "id": 3, - "type": { - "id": 2, - "code": "loanTransactionType.repayment", - "value": "Repayment", - "disbursement": false, - "repaymentAtDisbursement": false, - "repayment": true, - "contra": false, - "waiveInterest": false, - "waiveCharges": false, - "writeOff": false, - "recoveryRepayment": false - }, - "date": [ - 2012, - 5, - 14 - ], - "manuallyReversed": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 559.88, - "interestPortion": 559.88 - } - -
-
+   +
+
+

Retrieve a Loan Product

+

Example Requests:

+
self/loanproducts/1?clientId=1
+
+
+
self/loanproducts/1?fields=name,description&clientId=1
+
+
+ + GET https://DomainName/api/v1/self/loanproducts/{productId}?clientId={clientId} + + + { + "id": 11, + "name": "advanced accounting", + "shortName": "ad11", + "includeInBorrowerCycle": true, + "useBorrowerCycle": true, + "status": "loanProduct.active", + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 0, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "principal": 10000.000000, + "minPrincipal": 2000.000000, + "maxPrincipal": 15000.000000, + "numberOfRepayments": 7, + "repaymentEvery": 7, + "repaymentFrequencyType": { + "id": 0, + "code": "repaymentFrequency.periodFrequencyType.days", + "value": "Days" + }, + "interestRatePerPeriod": 5.000000, + "interestRateFrequencyType": { + "id": 2, + "code": "interestRateFrequency.periodFrequencyType.months", + "value": "Per month" + }, + "annualInterestRate": 60.000000, + "amortizationType": { + "id": 1, + "code": "amortizationType.equal.installments", + "value": "Equal installments" + }, + "interestType": { + "id": 0, + "code": "interestType.declining.balance", + "value": "Declining Balance" + }, + "interestCalculationPeriodType": { + "id": 1, + "code": "interestCalculationPeriodType.same.as.repayment.period", + "value": "Same as repayment period" + }, + "transactionProcessingStrategyCode": "mifos-standard-strategy", + "transactionProcessingStrategyName": "Mifos style", + "charges": [], + "principalVariationsForBorrowerCycle": [ + { + "id": 21, + "borrowerCycleNumber": 1, + "paramType": { + "id": 1, + "code": "LoanProductParamType.principal", + "value": "principal" + }, + "valueConditionType": { + "id": 2, + "code": "LoanProductValueConditionType.equal", + "value": "equals" + }, + "minValue": 2000.000000, + "maxValue": 20000.000000, + "defaultValue": 15000.000000 + }, + { + "id": 20, + "borrowerCycleNumber": 1, + "paramType": { + "id": 1, + "code": "LoanProductParamType.principal", + "value": "principal" + }, + "valueConditionType": { + "id": 3, + "code": "LoanProductValueConditionType.greterthan", + "value": "greter than" + }, + "minValue": 3000.000000, + "maxValue": 25000.000000, + "defaultValue": 20000.000000 + } + ], + "interestRateVariationsForBorrowerCycle": [], + "numberOfRepaymentVariationsForBorrowerCycle": [], + "accountingRule": { + "id": 2, + "code": "accountingRuleType.cash", + "value": "CASH BASED" + }, + "accountingMappings": { + "fundSourceAccount": { + "id": 1, + "name": "fund source", + "glCode": "01" + }, + "loanPortfolioAccount": { + "id": 2, + "name": "Loan portfolio", + "glCode": "02" + }, + "transfersInSuspenseAccount": { + "id": 3, + "name": "transfers", + "glCode": "03" + }, + "interestOnLoanAccount": { + "id": 4, + "name": "income from interest", + "glCode": "04" + }, + "incomeFromFeeAccount": { + "id": 8, + "name": "income from fees 2", + "glCode": "10" + }, + "incomeFromPenaltyAccount": { + "id": 9, + "name": "income from penalities 2", + "glCode": "11" + }, + "writeOffAccount": { + "id": 10, + "name": "loans written off 2", + "glCode": "12" + }, + "overpaymentLiabilityAccount": { + "id": 11, + "name": "over payment", + "glCode": "13" + } + }, + "paymentChannelToFundSourceMappings": [ + { + "paymentType": { + "id": 10, + "name": "check" + }, + "fundSourceAccount": { + "id": 1, + "name": "fund source", + "glCode": "01" + } + } + ], + "feeToIncomeAccountMappings": [ + { + "charge": { + "id": 1, + "name": "flat install", + "active": false, + "penalty": false + }, + "incomeAccount": { + "id": 8, + "name": "income from fees 2", + "glCode": "10" + } + }, + { + "charge": { + "id": 2, + "name": "install per", + "active": false, + "penalty": false + }, + "incomeAccount": { + "id": 4, + "name": "income from interest", + "glCode": "04" + } + }, + { + "charge": { + "id": 5, + "name": "des charge", + "active": false, + "penalty": false + }, + "incomeAccount": { + "id": 9, + "name": "income from penalities 2", + "glCode": "11" + } + }, + "multiDisburseLoan":true,"maxTrancheCount":3,"outstandingLoanBalance":36000.000000, + "overdueDaysForNPA":2, + "principalThresholdForLastInstalment":50 + ] + } + +
+
-   -
-
-

List Loan Charges

-

Example Requests:

-
self/loans/1/charges
-
-
-
self/loans/1/charges?fields=name,amountOrPercentage
-
-
- -GET https://DomainName/api/v1/self/loans/{loanId}/charges - - -[ - { - "id": 1, - "chargeId": 1, - "name": "Loan Processing fee", - "chargeTimeType": { - "id": 1, - "code": "chargeTimeType.disbursement", - "value": "Disbursement" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "percentage": 0, - "amountPercentageAppliedTo": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100, - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 100, - "amountOrPercentage": 100, - "penalty": false - }, - { - "id": 7, - "chargeId": 2, - "name": "Collection Fee", - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "dueDate": [ - 2013, - 3, - 29 - ], - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "percentage": 0, - "amountPercentageAppliedTo": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100, - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 100, - "amountOrPercentage": 100, - "penalty": false - } -] - -
-
+   +
+
+

Savings Product:

+

An MFIs savings product offerings are modeled using this API.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
Field Descriptions
+
name
The name of the product offering.
shortName
Shortname associated with a saving product.
+ An abbreviated version of the name, used in reports or menus where space is limited. +
description
A description of the product offering.
currencyCode
Three letter ISO code representing currency.
digitsAfterDecimal
Override the currency default value for digitsAfterDecimal.
inMultiplesOf
Override the default value for rounding currency to multiples of provided + value. +
nominalAnnualInterestRate
The default interest rate set when creating savings accounts of this type of + product. e.g. 5% Per year - It number here is always expressed as the Nominal APR. +
interestCompoundingPeriodType
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end + of month) +
interestPostingPeriodType
The period at which interest rate is posted or credited to savings account. + 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, 30th Sep, + 31st Dec) +
interestCalculationType
The interest calculation method used: 1=Daily Balance or 2=Average Daily + Balance +
interestCalculationDaysInYearType
The setting for number of days in year to use: 360=360 Days, 365=365 Days +
minRequiredOpeningBalance
Optional: If provided, sets the minimum deposit amount required to + open a savings account e.g. 2,000
lockinPeriodFrequency
Optional: If provided, used along with + lockinPeriodFrequencyType to indicate the length of time that the savings account is + 'locked in' and withdrawals are not allowed. e.g. 6 Months +
lockinPeriodFrequencyType
Optional: If provided, used along with lockinPeriodFrequency + to indicate the length of time that the savings account is 'locked in' and withdrawals are + not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years + e.g. 6 Months
withdrawalFeeForTransfers
Optional: Used along with withdrawalFeeAmount to indicate + whether the withdrawal fee should be applied on the account for account transfers . +
accountingRule
Specifies if accounting is enabled for the particular + product and the type of the accounting rule to be used + Example Values:1=NONE,2=CASH_BASED +
allowOverdraft
Optional: If provided, depending on the value mark the savings + account as overdraft account +
overdraftLimit
Optional: If provided, sets the maximum allowed overdraft amount for + a savings account e.g. 5,000 else set the limit as zero +
minBalanceForInterestCalculation
Optional: If provided, balance must be greater than provided value + for calculation of interest e.g. 5,000
enforceMinRequiredBalance
Optional: If set to true, validates that the account + balance does not + fall below minRequiredBalance
minRequiredBalance
Optional: If provided, sets an indicator of the minimum required + balance of the savings account e.g. 5,000 else set the limit as zero. Note that + enforceMinRequiredBalance determines if the minimum required balance is + enforced +
withHoldTax
Optional: If provided, sets an indicator for applying withhold tax on + interest posting for savings account +
taxGroupId
Optional: If withhold tax set as true, with hold tax will be applied + as per the tax group provided +
+
+
-   -
-
-

Retrieve a Loan Charge

-

Example Requests:

-
self/loans/1/charges/1
-
-
-
self/loans/1/charges/1?fields=name,amountOrPercentage
-
-
- -GET https://DomainName/api/v1/self/loans/{loanId}/charges/{chargeId} - - -{ - "id": 1, - "chargeId": 1, - "name": "Loan Processing fee", - "chargeTimeType": { - "id": 1, - "code": "chargeTimeType.disbursement", - "value": "Disbursement" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "percentage": 0, - "amountPercentageAppliedTo": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100, - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 100, - "amountOrPercentage": 100, - "penalty": false -} -
-
+   +
+
+

List Savings Products

+

Example Requests:

+
self/savingsproducts?clientId=1
+
+
+ GET + https://domainname/api/v1/self/savingsproducts?clientid={clientid} + + [ + { + "id": 1, + "name": "Savings product", + "shortName": "sa1", + "description": "savings", + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "nominalAnnualInterestRate": 5.000000, + "interestCompoundingPeriodType": { + "id": 1, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", + "value": "Daily" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "withdrawalFeeForTransfers": false, + "accountingRule": { + "id": 2, + "code": "accountingRuleType.cash", + "value": "CASH BASED" + } + } + ] +
+
- -   -
-
-

Submit new savings application

-
- - - -
Mandatory Fields
clientId, productId, submittedOnDate
-
- - - -
Optional Fields
accountNo, externalId, fieldOfficerId
-
- - - - -
Inherited from Product (if not provided)
nominalAnnualInterestRate, interestCompoundingPeriodType, interestCalculationType, interestCalculationDaysInYearType, minRequiredOpeningBalance, lockinPeriodFrequency, lockinPeriodFrequencyType, withdrawalFeeForTransfers, allowOverdraft, overdraftLimit, withHoldTax
-
-
-
-

Minimal request: accountNo auto generated, remaining details inherited from savings product.

- POST https://Domain Name/api/v1/self/savingsaccounts - POST self/savingsaccount -Content-Type: application/json -Request Body: -{ - "productId":3, - "clientId":"14", - "locale":"en", - "dateFormat":"dd MMMM yyyy", - "submittedOnDate":"09 July 2018" -} - - -{ - "officeId":1, - "clientId":14, - "savingsId":10, - "resourceId":10 -} - - -

Full request:Below details override details from savings product (except currency).

- POST self/savingsaccount -Content-Type: application/json -Request Body: -{ - "productId":1, - "nominalAnnualInterestRate":9.5, - "minRequiredOpeningBalance":1000, - "lockinPeriodFrequency":1, - "withdrawalFeeForTransfers":true, - "allowOverdraft":true, - "overdraftLimit":"10000", - "nominalAnnualInterestRateOverdraft":"5", - "minOverdraftForInterestCalculation":"1000", - "enforceMinRequiredBalance":false, - "withHoldTax":false, - "interestCompoundingPeriodType":1, - "interestPostingPeriodType":4, - "interestCalculationType":1, - "interestCalculationDaysInYearType":365, - "lockinPeriodFrequencyType":1, - "fieldOfficerId":1, - "externalId":"126", - "submittedOnDate":"11 July 2018", - "locale":"en", - "dateFormat":"dd MMMM yyyy", - "monthDayFormat":"dd MMM", - "charges":[ - { - "chargeId":3, - "amount":2 - } - ], - "clientId":"14" -} - - -{ - "officeId":1, - "clientId":14, - "savingsId":9, - "resourceId":9 -} - -
-
- - -   -
-
-

Retrieve a savings account:

-

Arguments

-
-
associations
-
optional, a comma separated list of savings 'associations' (itemized below).
-

Associations are just extra pieces of data that you might or might not want to retrieve.

-
'transactions': Gets data related to transactions on the account e.g. ?associations=transactions
-
'charges':Savings Account charges data.
-
-

Example Requests :

-
self/savingsaccounts/1
-

-
self/savingsaccounts/1?associations=transactions
-
-
- GET https://DomainName/api/v1/self/savingsaccounts/{accountId} - -{ - "id": 1, - "accountNo": "000000001", - "clientId": 1, - "clientName": "small business", - "savingsProductId": 1, - "savingsProductName": "Passbook Savings", - "fieldOfficerId": 0, - "status": { - "id": 100, - "code": "savingsAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "withdrawnByApplicant": false, - "active": false, - "closed": false - }, - "timeline": { - "submittedOnDate": [ - 2013, - 3, - 1 - ] - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "nominalAnnualInterestRate": 5, - "interestCompoundingPeriodType": { - "id": 1, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", - "value": "Daily" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "summary": { - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "accountBalance": 0 - } -} - -
-
- -   -
-
-

Modify a savings application

-

Savings 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

-
-
- PUT https://Domain Name/api/v1/self/savingsaccounts/{accountsId} - PUT self/savingsaccounts/1 -Content-Type: application/json -No Request Body: -{ - "productId":1, - "clientId":14 -} - - -{ - "officeId": 1, - "clientId": 14, - "savingsId": 11, - "resourceId": 11, - "changes": { - "productId": 1 - } -} - -
-
- -   -
-
-

Retrieve Savings Account Template:

-

Arguments

-
-
clientId
-
Integer mandatory
-
productId
-
Integer optional
-
If entered, productId, productName and selectedProduct fields are returned.
-
-

Example Requests:

-
self/savingsaccounts/template?clientId=14
-

-
self/savingsaccounts/template?clientId=14&productId=2
-
-
- GET https://Domain Name/api/v1/self/savingsaccounts/template?clientId={clientId} - -{ - "clientId": 14, - "clientName": "Bheem", - "withdrawalFeeForTransfers": false, - "allowOverdraft": false, - "enforceMinRequiredBalance": false, - "withHoldTax": false, - "isDormancyTrackingActive": false, - "productOptions": [ - { - "id": 1, - "name": "Voluntary savings", - "withdrawalFeeForTransfers": false, - "allowOverdraft": false, - "enforceMinRequiredBalance": false, - "withHoldTax": false - }, - { - "id": 2, - "name": "Savings", - "withdrawalFeeForTransfers": false, - "allowOverdraft": false, - "enforceMinRequiredBalance": false, - "withHoldTax": false - }, - { - "id": 3, - "name": "Savings Product", - "withdrawalFeeForTransfers": false, - "allowOverdraft": false, - "enforceMinRequiredBalance": false, - "withHoldTax": false - } - ], - "chargeOptions": [ - { - "id": 3, - "name": "Saving Accounts Processing Fee", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 2, - "chargeTimeType": { - "id": 3, - "code": "chargeTimeType.savingsActivation", - "value": "Savings Activation" - }, - "chargeAppliesTo": { - "id": 2, - "code": "chargeAppliesTo.savings", - "value": "Savings" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - } - ] -} - -
- -
- GET https://Domain Name/api/v1/self/savingsaccounts/template?clientId={clientId}&productId={productId} - -{ - "clientId": 14, - "clientName": "Bheem", - "savingsProductId": 2, - "savingsProductName": "Savings", - "timeline": {}, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "nominalAnnualInterestRate": 5, - "interestCompoundingPeriodType": { - "id": 1, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", - "value": "Daily" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "minRequiredOpeningBalance": 1000, - "withdrawalFeeForTransfers": false, - "allowOverdraft": false, - "enforceMinRequiredBalance": false, - "withHoldTax": false, - "isDormancyTrackingActive": false, - "charges": [], - "productOptions": [ - { - "id": 1, - "name": "Voluntary savings", - "withdrawalFeeForTransfers": false, - "allowOverdraft": false, - "enforceMinRequiredBalance": false, - "withHoldTax": false - }, - { - "id": 2, - "name": "Savings", - "withdrawalFeeForTransfers": false, - "allowOverdraft": false, - "enforceMinRequiredBalance": false, - "withHoldTax": false - }, - { - "id": 3, - "name": "Savings Product", - "withdrawalFeeForTransfers": false, - "allowOverdraft": false, - "enforceMinRequiredBalance": false, - "withHoldTax": false - } - ], - "fieldOfficerOptions": [ - { - "id": 1, - "firstname": "Aliya", - "lastname": "A", - "displayName": "A, Aliya", - "officeId": 1, - "officeName": "Head Office", - "isLoanOfficer": true, - "isActive": true - } - ], - "interestCompoundingPeriodTypeOptions": [ - { - "id": 1, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", - "value": "Daily" - }, - { - "id": 4, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.monthly", - "value": "Monthly" - }, - { - "id": 5, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.quarterly", - "value": "Quarterly" - }, - { - "id": 6, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.biannual", - "value": "Semi-Annual" - }, - { - "id": 7, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.annual", - "value": "Annually" - } - ], - "interestPostingPeriodTypeOptions": [ - { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - { - "id": 5, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.quarterly", - "value": "Quarterly" - }, - { - "id": 6, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.biannual", - "value": "BiAnnual" - }, - { - "id": 7, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.annual", - "value": "Annually" - } - ], - "interestCalculationTypeOptions": [ - { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - { - "id": 2, - "code": "savingsInterestCalculationType.averagedailybalance", - "value": "Average Daily Balance" - } - ], - "interestCalculationDaysInYearTypeOptions": [ - { - "id": 360, - "code": "savingsInterestCalculationDaysInYearType.days360", - "value": "360 Days" - }, - { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - } - ], - "lockinPeriodFrequencyTypeOptions": [ - { - "id": 0, - "code": "savings.lockin.savingsPeriodFrequencyType.days", - "value": "Days" - }, - { - "id": 1, - "code": "savings.lockin.savingsPeriodFrequencyType.weeks", - "value": "Weeks" - }, - { - "id": 2, - "code": "savings.lockin.savingsPeriodFrequencyType.months", - "value": "Months" - }, - { - "id": 3, - "code": "savings.lockin.savingsPeriodFrequencyType.years", - "value": "Years" - } - ], - "withdrawalFeeTypeOptions": [ - { - "id": 1, - "code": "savingsWithdrawalFeesType.flat", - "value": "Flat" - }, - { - "id": 2, - "code": "savingsWithdrawalFeesType.percent.of.amount", - "value": "% of Amount" - } - ], - "chargeOptions": [ - { - "id": 3, - "name": "Saving Accounts Processing Fee", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 2, - "chargeTimeType": { - "id": 3, - "code": "chargeTimeType.savingsActivation", - "value": "Savings Activation" - }, - "chargeAppliesTo": { - "id": 2, - "code": "chargeAppliesTo.savings", - "value": "Savings" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - } - ] -} - -
-
- -  -
-
-

Retrieve Savings Account Transaction:

-

Example Requests:

-
self/savingsaccounts/1/transactions/1
-
-
-
- GET https://DomainName/api/v1/self/savingsaccounts/{accountId}/transactions/{transactionId} - - -{ - "id": 1, - "transactionType": { - "id": 2, - "code": "savingsAccountTransactionType.withdrawal", - "value": "Withdrawal", - "deposit": false, - "withdrawal": true, - "interestPosting": false, - "feeDeduction": false - }, - "accountId": 1, - "accountNo": "000000001", - "date": [ - 2013, - 8, - 7 - ], - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 0, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "paymentDetailData": { - "id": 62, - "paymentType": { - "id": 11, - "name": "cash" - }, - "accountNumber": "", - "checkNumber": "", - "routingCode": "", - "receiptNumber": "", - "bankNumber": "" - }, - "amount": 5000, - "runningBalance": 0, - "reversed": true -} - -
-
- -   -
-
-

List Savings Charges

-

Example Requests:

-
self/savingsaccounts/1/charges
-
-
self/savingsaccounts/1/charges?chargeStatus=inactive
-
-
self/savingsaccounts/1/charges?fields=name,amountOrPercentage
-
-
- -GET https://DomainName/api/v1/self/savingsaccounts/{accountId}/charges - - -[ - { - "id": 1, - "chargeId": 3, - "accountId": 57, - "name": "Savings account maintenance fee", - "chargeTimeType": { - "id": 1, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "percentage": 0, - "amountPercentageAppliedTo": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100, - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 100, - "amountOrPercentage": 100, - "penalty": false - }, - { - "id": 2, - "chargeId": 4, - "accountId": 57, - "name": "Pass book Fee", - "chargeTimeType": { - "id": 2, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "dueDate": [ - 2013, - 3, - 29 - ], - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "percentage": 0, - "amountPercentageAppliedTo": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100, - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 100, - "amountOrPercentage": 100, - "penalty": false - }, - { - "id": 9, - "chargeId": 4, - "accountId": 57, - "name": "Withdrawal fee percentage", - "chargeTimeType": { - "id": 5, - "code": "chargeTimeType.withdrawalFee", - "value": "Withdrawal Fee" - }, - "chargeCalculationType": { - "id": 2, - "code": "chargeCalculationType.percent.of.amount", - "value": "% Amount" - }, - "percentage": 0.25, - "amountPercentageAppliedTo": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 0, - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 0, - "amountOrPercentage": 0.25, - "penalty": false - }, - { - "id": 10, - "chargeId": 6, - "accountId": 57, - "name": "Annual fee - INR", - "chargeTimeType": { - "id": 6, - "code": "chargeTimeType.annualFee", - "value": "Annual Fee" - }, - "feeOnMonthDay": [ - 10, - 9 - ], - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "percentage": 0, - "amountPercentageAppliedTo": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 50, - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 50, - "amountOrPercentage": 50, - "penalty": false - } -] - -
-
+   +
+
+

Retrieve a Savings Product

+

Example Requests:

+
self/savingsproducts/1?clientId=1
+

+
self/savingsproducts/1?fields=name,description&clientId=1
+
+
+ GET + https://DomainName/api/v1/self/savingsproducts/{productId}&clientId={clientId} + + { + "id": 1, + "name": "savings product", + "shortName": "sa1", + "description": "savings", + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "nominalAnnualInterestRate": 5.000000, + "interestCompoundingPeriodType": { + "id": 1, + "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", + "value": "Daily" + }, + "interestPostingPeriodType": { + "id": 4, + "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", + "value": "Monthly" + }, + "interestCalculationType": { + "id": 1, + "code": "savingsInterestCalculationType.dailybalance", + "value": "Daily Balance" + }, + "interestCalculationDaysInYearType": { + "id": 365, + "code": "savingsInterestCalculationDaysInYearType.days365", + "value": "365 Days" + }, + "withdrawalFeeForTransfers": false, + "accountingRule": { + "id": 2, + "code": "accountingRuleType.cash", + "value": "CASH BASED" + }, + "accountingMappings": { + "savingsReferenceAccount": { + "id": 12, + "name": "savings ref", + "glCode": "20" + }, + "incomeFromFeeAccount": { + "id": 16, + "name": "income from savings fee", + "glCode": "24" + }, + "incomeFromPenaltyAccount": { + "id": 17, + "name": "income from sav penalites", + "glCode": "25" + }, + "interestOnSavingsAccount": { + "id": 15, + "name": "interest on savings", + "glCode": "23" + }, + "savingsControlAccount": { + "id": 13, + "name": "savings ref tool kit", + "glCode": "21" + }, + "transfersInSuspenseAccount": { + "id": 14, + "name": "saving transfers", + "glCode": "22" + } + }, + "paymentChannelToFundSourceMappings": [ + { + "paymentType": { + "id": 10, + "name": "check" + }, + "fundSourceAccount": { + "id": 12, + "name": "savings ref", + "glCode": "20" + } + } + ], + "feeToIncomeAccountMappings": [ + { + "charge": { + "id": 11, + "name": "sav charge", + "active": false, + "penalty": false + }, + "incomeAccount": { + "id": 16, + "name": "income from savings fee", + "glCode": "24" + } + } + ], + "penaltyToIncomeAccountMappings": [ + { + "charge": { + "id": 12, + "name": "sav 2", + "active": false, + "penalty": true + }, + "incomeAccount": { + "id": 17, + "name": "income from sav penalites", + "glCode": "25" + } + } + ], + "charges": [] + } + +
+
-   -
-
-

Retrieve a Savings account Charge

-

Example Requests:

-
self/savingsaccounts/1/charges/5
-
-
-
self/savingsaccounts/1/charges/5?fields=name,amountOrPercentage
-
-
- -GET https://DomainName/api/v1/self/savingsaccounts/{accountId}/charges/{savingsAccountChargeId} - - -{ - "id": 1, - "chargeId": 1, - "name": "Passbook fee", - "chargeTimeType": { - "id": 1, - "code": "chargeTimeType.specifiedDueDate", - "value": "Specified due date" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "percentage": 0, - "amountPercentageAppliedTo": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 100, - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 100, - "amountOrPercentage": 100, - "penalty": false -} -
-
+   +
+
+

List Share Products

+

Example Requests:

+
self/products/share?clientId=1
+
+
-   -
-
-

Retrieve Account Transfer Template

-

Returns list of loan/savings accounts that can be used for account transfer

-

Example Requests:

-
self/accounttransfers/template
-
-
- GET https://DomainName/api/v1/self/accounttransfers/template - - -{ - "fromAccountOptions": [ - { - "accountId": 1, - "accountNo": "00000001", - "accountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "clientId": 1, - "clientName": "ABC", - "officeId": 1, - "officeName": "HEAD OFFICE" - }, - { - "accountId": 5, - "accountNo": "00000005", - "accountType": { - "id": 1, - "code": "accountType.loan", - "value": "Loan Account" - }, - "clientId": 2, - "clientName": "XYZ", - "officeId": 3, - "officeName": "REGIONAL OFFICE" - } - ], - "toAccountOptions": [ - { - "accountId": 1, - "accountNo": "00000001", - "accountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "clientId": 1, - "clientName": "ABC", - "officeId": 1, - "officeName": "HEAD OFFICE" - }, - { - "accountId": 5, - "accountNo": "00000005", - "accountType": { - "id": 1, - "code": "accountType.loan", - "value": "Loan Account" - }, - "clientId": 2, - "clientName": "XYZ", - "officeId": 3, - "officeName": "REGIONAL OFFICE" - } - ] - -} - -
-
- -   -
-
-

Create new Transfer

-

Ability to create new transfer of monetary funds from one account to another.

-
-
- POST https://DomainName/api/v1/self/accounttransfers - POST self/accounttransfers/ -Content-Type: application/json -No Request Body: -{ -"fromOfficeId": 1, -"fromClientId": 1, -"fromAccountType": 2, -"fromAccountId": 1, -"toOfficeId": 1, -"toClientId": 1, -"toAccountType": 2, -"toAccountId": 2, -"dateFormat": "dd MMMM yyyy", -"locale": "en", -"transferDate": "01 August 2011", -"transferAmount": "112.45", -"transferDescription": "A description of the transfer" -} - - -{ - "savingsId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

Beneficiary Third Party Transfer Template

-

Returns Account Type enumerations. Self User is expected to know office name and account number to be able to add beneficiary.

-

Example Requests:

-
/self/beneficiaries/tpt/template
-
-
- GET https://DomainName/api/v1/self/beneficiaries/tpt/template - - - { - "accountTypeOptions": - [ - { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - { - "id": 1, - "code": "accountType.loan", - "value": "Loan Account" - } - ] - } - -
-
- -   -
-
-

Add TPT Beneficiary

-

Api to add third party beneficiary linked to current user.

-

Parameter Definitions

-

name : Nick name for beneficiary, should be unique for an self service user

-

officeName : Office Name of beneficiary(not id)

-

accountNumber : Account Number of beneficiary(not id)

-

transferLimit : Each transfer initiated to this account will not exceed this amount

-

Example Requests:

-
/self/beneficiaries/tpt
- - - - - - - -
Mandatory Fields
name, officeName, accountNumber, accountType
-
- - - - - - - -
Optional Fields
transferLimit -
-
- -
- POST https://DomainName/api/v1/self/beneficiaries/tpt - - -POST self/beneficiaries/tpt -Content-Type: application/json -Request Body: -{ - "locale": "en_GB", - "name": "beneficiary nick name", - "officeName": "HEAD OFFICE", - "accountNumber": "0000001", - "accountType": 1, - "transferLimit": 1000 - -} - - -{ - "resourceId": 5 -} - -
-
- -   -
-
-

Get All TPT Beneficiary

-

Api to get all third party beneficiary linked to current user.

-

Example Requests:

-
/self/beneficiaries/tpt
-
- -
- GET https://DomainName/api/v1/self/beneficiaries/tpt - - -GET self/beneficiaries/tpt -Content-Type: application/json - - -{ -[ - { - "id": 1, - "name": "Client2Savings", - "officeName": "Test Office", - "clientName": "FN2 LN2", - "accountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "accountNumber": "000000002", - "transferLimit": 0 - }, - { - "id": 4, - "name": "Client2Loan", - "officeName": "Test Office", - "clientName": "FN2 LN2", - "accountType": { - "id": 1, - "code": "accountType.loan", - "value": "Loan Account" - }, - "accountNumber": "000000002", - "transferLimit": 1000 - }] -} - -
-
- -   -
-
-

Update TPT Beneficiary

-

Api to update third party beneficiary linked to current user.

-

Example Requests:

-
/self/beneficiaries/tpt/{beneficiaryId}
-
- - - - - - - -
Optional Fields
name, transferLimit -
-
- -
- PUT https://DomainName/api/v1/self/beneficiaries/tpt/{beneficiaryId} - - -PUT self/beneficiaries/tpt/5 -Content-Type: application/json -Request Body: -{ - "name": "beneficiary nick name", - "transferLimit": 1000 + GET + https://DomainName/api/v1/self/products/share?clientId={clientId} + -} - - -{ - "resourceId": 5, - "changes": { - "transferLimit": 1000, - "name": "Client22" - } -} - -
-
- -   -
-
-

Delete TPT Beneficiary

-

Api to delete third party beneficiary linked to current user.

-

Example Requests:

-
/self/beneficiaries/tpt/{beneficiaryId}
-
- -
- DELETE https://DomainName/api/v1/self/beneficiaries/tpt/{beneficiaryId} - - -DELETE self/beneficiaries/tpt/5 -Content-Type: application/json - - -{ - "resourceId": 5 -} - -
-
- -   -
-
-

Third Party Account Transfer Template

-

Returns list of loan/savings accounts that can be used for third party account transfer

-

Example Requests:

-
self/accounttransfers/template?type="tpt"
-
-
- GET https://DomainName/api/v1/self/accounttransfers/template?type="tpt" - - -{ - "fromAccountOptions": [ - { - "accountId": 1, - "accountNo": "00000001", - "accountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "clientId": 1, - "clientName": "ABC", - "officeId": 1, - "officeName": "HEAD OFFICE" - }, - { - "accountId": 5, - "accountNo": "00000005", - "accountType": { - "id": 1, - "code": "accountType.loan", - "value": "Loan Account" - }, - "clientId": 2, - "clientName": "XYZ", - "officeId": 3, - "officeName": "REGIONAL OFFICE" - } - ], - "toAccountOptions": [ - { - "accountId": 2, - "accountNo": "00000002", - "accountType": { - "id": 2, - "code": "accountType.savings", - "value": "Savings Account" - }, - "clientId": 2, - "clientName": "ABC", - "officeId": 1, - "officeName": "HEAD OFFICE" - }, - { - "accountId": 6, - "accountNo": "00000006", - "accountType": { - "id": 1, - "code": "accountType.loan", - "value": "Loan Account" - }, - "clientId": 3, - "clientName": "XYZ", - "officeId": 4, - "officeName": "REGIONAL OFFICE" - } - ] - -} - -
-
- -   -
-
-

Third Party Account Transfer

-

Ability to create new third party transfer of monetary funds from one account to another.

-
-
- POST https://DomainName/api/v1/self/accounttransfers?type="tpt" - POST self/accounttransfers?type="tpt" -Content-Type: application/json -No Request Body: -{ -"fromOfficeId": 1, -"fromClientId": 1, -"fromAccountType": 2, -"fromAccountId": 1, -"toOfficeId": 1, -"toClientId": 2, -"toAccountType": 2, -"toAccountId": 2, -"dateFormat": "dd MMMM yyyy", -"locale": "en", -"transferDate": "01 August 2011", -"transferAmount": "112.45", -"transferDescription": "A description of the transfer" -} - - -{ - "savingsId": 1, - "resourceId": 1 -} - -
-
- -   -
-
-

Retrieve Share Account Template:

-

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
  • -
-

-

Arguments

-
-
clientId
-
Integer mandatory
-
productId
-
Integer optional
-
If entered, productId, productName and selectedProduct fields are returned.
-
-

Example Requests:

-
self/shareaccounts/template?clientId=14
-

-
self/shareaccounts/template?clientId=14&productId=3
-
-
- GET https://Domain Name/api/v1/self/shareaccounts/template?clientId={clientId} - -{ - "clientId": 14, - "productOptions": [ - { - "id": 3, - "name": "SP", - "shortName": "SP", - "totalShares": 1000 - }, - { - "id": 4, - "name": "Product1", - "shortName": "test", - "totalShares": 1000 - } - ], - "chargeOptions": [ - { - "id": 2, - "name": "Activation fee", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 2, - "chargeTimeType": { - "id": 14, - "code": "chargeTimeType.sharespurchase", - "value": "Share Purchase" - }, - "chargeAppliesTo": { - "id": 4, - "code": "chargeAppliesTo.shares", - "value": "Shares" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - } - ] -} - -
- -
- GET https://Domain Name/api/v1/self/shareaccounts/template?clientId={clientId}&productId={productId} - -{ - "clientId": 14, - "productOptions": [ - { - "id": 3, - "name": "SP", - "shortName": "SP", - "description": "SP1", - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "totalShares": 1000, - "totalSharesIssued": 900, - "unitPrice": 1, - "shareCapital": 900, - "minimumShares": 8, - "nominalShares": 500, - "maximumShares": 500, - "marketPrice": [], - "charges": [], - "allowDividendCalculationForInactiveClients": false, - "lockinPeriod": 50, - "lockPeriodTypeEnum": { - "id": 0, - "code": "shares.lockin.sharePeriodFrequencyType.days", - "value": "Days" - }, - "minimumActivePeriod": 10, - "minimumActivePeriodForDividendsTypeEnum": { - "id": 0, - "code": "shares.minimumactive.sharePeriodFrequencyType.days", - "value": "Days" - }, - "accountingRule": { - "id": 2, - "code": "accountingRuleType.cash", - "value": "CASH BASED" - }, - "accountingMappings": { - "shareReferenceId": { - "id": 32, - "name": "Cash In Hand", - "glCode": "20301" - }, - "incomeFromFeeAccountId": { - "id": 40, - "name": "Other Operating Income", - "glCode": "30105" - }, - "shareEquityId": { - "id": 56, - "name": "Share Equity", - "glCode": "00098" - }, - "shareSuspenseId": { + { + "totalFilteredRecords": 2, + "pageItems": [ + { + "id": 1, + "name": "Share P1", + "shortName": "shar", + "description": "Share", + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "totalShares": 1000, + "totalSharesIssued": 450, + "unitPrice": 5, + "shareCapital": 2250, + "minimumShares": 2, + "nominalShares": 5, + "maximumShares": 8, + "allowDividendCalculationForInactiveClients": false, + "lockinPeriod": 1, + "lockPeriodTypeEnum": { + "id": 1, + "code": "shares.lockin.sharePeriodFrequencyType.weeks", + "value": "Weeks" + }, + "minimumActivePeriod": 10, + "minimumActivePeriodForDividendsTypeEnum": { + "id": 0, + "code": "shares.minimumactive.sharePeriodFrequencyType.days", + "value": "Days" + }, + "accountingRule": { + "id": 1, + "code": "accountingRuleType.none", + "value": "NONE" + } + }, + { "id": 2, - "name": "Overpayment Liability", - "glCode": "10200" - } - }, - "currencyOptions": [ - { + "name": "ShareP2", + "shortName": "comp", + "description": "Company shares", + "currency": { + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "inMultiplesOf": 1, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" + }, + "totalShares": 500, + "totalSharesIssued": 200, + "unitPrice": 2, + "shareCapital": 400, + "nominalShares": 5, + "allowDividendCalculationForInactiveClients": false, + "lockinPeriod": 1, + "lockPeriodTypeEnum": { + "id": 0, + "code": "shares.lockin.sharePeriodFrequencyType.days", + "value": "Days" + }, + "minimumActivePeriod": 10, + "minimumActivePeriodForDividendsTypeEnum": { + "id": 0, + "code": "shares.minimumactive.sharePeriodFrequencyType.days", + "value": "Days" + }, + "accountingRule": { + "id": 2, + "code": "accountingRuleType.cash", + "value": "CASH BASED" + } + } + ] + } + +
+
+ +   +
+
+

Retrieve a Share Product

+

Example Requests:

+
self/products/share/2?clientId=1
+

+
self/products/share/2?clientId=1&template=true
+
+
+ GET + https://DomainName/api/v1/self/products/share/{productId}?clientId={clientId} + + { + "id": 2, + "name": "ShareP2", + "shortName": "comp", + "description": "Company shares", + "currency": { "code": "USD", "name": "US Dollar", "decimalPlaces": 2, + "inMultiplesOf": 1, "displaySymbol": "$", "nameCode": "currency.USD", "displayLabel": "US Dollar ($)" - } - ], - "chargeOptions": [ - { + }, + "totalShares": 500, + "totalSharesIssued": 200, + "unitPrice": 2, + "shareCapital": 400, + "nominalShares": 5, + "marketPrice": [ + { "id": 2, - "name": "Activation fee", + "fromDate": "May 27, 2018", + "shareValue": 1 + } + ], + "charges": [ + { + "id": 1, + "name": "Activation", "active": true, "penalty": false, "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" + "code": "USD", + "name": "US Dollar", + "decimalPlaces": 2, + "displaySymbol": "$", + "nameCode": "currency.USD", + "displayLabel": "US Dollar ($)" }, - "amount": 2, + "amount": 1, "chargeTimeType": { - "id": 14, - "code": "chargeTimeType.sharespurchase", - "value": "Share Purchase" + "id": 13, + "code": "chargeTimeType.activation", + "value": "Share Account Activate" }, "chargeAppliesTo": { - "id": 4, - "code": "chargeAppliesTo.shares", - "value": "Shares" + "id": 4, + "code": "chargeAppliesTo.shares", + "value": "Shares" }, "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" + "id": 1, + "code": "chargeCalculationType.flat", + "value": "Flat" }, "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - } - ], - "minimumActivePeriodFrequencyTypeOptions": [ - { + "id": 0, + "code": "chargepaymentmode.regular", + "value": "Regular" + } + } + ], + "allowDividendCalculationForInactiveClients": false, + "lockinPeriod": 1, + "lockPeriodTypeEnum": { "id": 0, "code": "shares.lockin.sharePeriodFrequencyType.days", "value": "Days" - } - ], - "lockinPeriodFrequencyTypeOptions": [ - { + }, + "minimumActivePeriod": 10, + "minimumActivePeriodForDividendsTypeEnum": { "id": 0, - "code": "shares.lockin.sharePeriodFrequencyType.days", + "code": "shares.minimumactive.sharePeriodFrequencyType.days", "value": "Days" - }, - { - "id": 1, - "code": "shares.lockin.sharePeriodFrequencyType.weeks", - "value": "Weeks" - }, - { + }, + "accountingRule": { "id": 2, - "code": "shares.lockin.sharePeriodFrequencyType.months", - "value": "Months" - }, - { + "code": "accountingRuleType.cash", + "value": "CASH BASED" + }, + "accountingMappings": { + "shareReferenceId": { + "id": 1, + "name": "GLAsset", + "glCode": "GL1" + }, + "incomeFromFeeAccountId": { + "id": 4, + "name": "GLIncome", + "glCode": "GL4" + }, + "shareEquityId": { "id": 3, - "code": "shares.lockin.sharePeriodFrequencyType.years", - "value": "Years" - } - ], - "accountingMappingOptions": { - "liabilityAccountOptions": [ - { - "id": 30, - "name": "Recurring Deposits", - "parentId": 1, - "glCode": "10104", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 2, - "code": "accountType.liability", - "value": "LIABILITY" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "....Recurring Deposits", - "tagId": { - "id": 0, - "active": false, - "mandatory": false - } + "name": "GLEquity", + "glCode": "GL3" + }, + "shareSuspenseId": { + "id": 2, + "name": "GL2Liabilities", + "glCode": "GL2" + } + } + } + +
+
+ +   +
+
+

Retrieve Active Surveys

+ +

Example Requests :

+
self/surveys?isActive=true
+
+
+ GET https://domainname/api/v1/self/surveys?isActive=true + + [ + { + "id":1, + "componentDatas":[ + + ], + "questionDatas":[ + { + "id":1, + "responseDatas":[ + { + "id":2, + "text":"Own", + "value":1, + "sequenceNo":1 }, { - "id": 2, - "name": "Overpayment Liability", - "glCode": "10200", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 2, - "code": "accountType.liability", - "value": "LIABILITY" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "Overpayment Liability", - "tagId": { - "id": 0, - "active": false, - "mandatory": false - } - }, + "id":1, + "text":"Rent", + "value":0, + "sequenceNo":2 + } + ], + "componentKey":Test, + "key":"t1", + "text":"Type of house", + "description":Test, + "sequenceNo":1 + } + ], + "key":"test", + "name":"test", + "description":"test", + "countryCode":"in", + "validFrom":1540233000000, + "validTo":4695906600000 + } + ] + +
+
+ +   +
+
+

Submit Survey

+ +

Example Requests :

+
self/surveys/scorecards/1
+
+
+ POST + https://domainname/api/v1/self/surveys/scorecards/{surveyId} + + { + "userId":3, + "clientId":"1", + "surveyId":1, + "scorecardValues":[ + { + "questionId":1, + "responseId":2, + "value":1, + "createdOn":1540291482379 + } + ], + "surveyName":"", + "username":"", + "id":0 + } + +
+
+ +   +
+
+

Retrieve Survey records

+ +

Example Requests :

+
self/surveys/scorecards/clients/1
+
+
+ GET + https://domainname/api/v1/self/surveys/scorecards/clients/{clientId} + + [ + { + "id":8, + "userId":, + "username":"mifos", + "clientId":3, + "surveyId":1, + "surveyName":"test", + "scorecardValues":[ { - "id": 55, - "name": "Liability Transfer (Temp)", - "glCode": "220004-Temp", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 2, - "code": "accountType.liability", - "value": "LIABILITY" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "description": "Temporary Liability account to track Account Transfers", - "nameDecorated": "Liability Transfer (Temp)", - "tagId": { - "id": 0, - "active": false, - "mandatory": false - } + "questionId":1, + "responseId":2, + "value":1, + "createdOn":1540233000000 } - ], - "assetAccountOptions": [ - { - "id": 31, - "name": "Furniture and Fixtures", - "parentId": 8, - "glCode": "20101", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "....Furniture and Fixtures", - "tagId": { - "id": 0, - "active": false, - "mandatory": false - } - }, + ] + } + ] +
+
+ +   +
+
+

Running a Report

+

This resource allows you to run and receive output from pre-defined Apache Fineract reports.

+

+ The default output is a JSON formatted "Generic Resultset". The Generic Resultset contains + Column Heading as well as Data information. However, you can + export to CSV format by simply adding "&exportCSV=true" to the end + of your URL.

+

If Pentaho reports have been pre-defined, they can also be + run through this resource. Pentaho reports can return HTML, PDF or + CSV formats.

+

The Apache Fineract reference application uses a + JQuery plugin called stretchyreporting which, itself, uses this + reports resource to provide a pretty flexible reporting User + Interface (UI).

+
Arguments
+
+
R_'parameter names' ...
+
+ optional, No defaults +
+
The number and names of the parameters depend on the + specific report and how it has been configured. R_officeId is an + example parameter name. +
+
Note: the prefix R_ stands for Reporting
+
genericResultSet
+
+ optional, defaults to true +
+
If 'true' an optimised JSON format is returned suitable for tabular display of data. +
If 'false' a simple JSON format is returned. +
parameterType
+
+ optional, The only valid value is 'true'. If any + other value is provided the argument will be ignored +
+
Determines whether the request looks in the list of + reports or the list of parameters for its data. Doesn't apply to + Pentaho reports. +
+
exportCSV
+
+ optional, The only valid value is 'true'. If any + other value is provided the argument will be ignored +
+
Output will be delivered as a CSV file instead of JSON. + Doesn't apply to Pentaho reports. +
+
output-type
+
+ optional, Defaults to HTML. +
+
Valid Values are HTML, XLS, XSLX, CSV and PDF for html, Excel, Excel 2007+, + CSV and PDF formats respectively. +
+
Only applies to Pentaho reports.
+
locale
+
+ optional +
+
Any valid locale Ex: en_US, en_IN, fr_FR etc
+
Only applies to Pentaho reports.
+
+

Example Requests:

+
self/runreports/Client%20Details?R_officeId=1
+
+
+
self/runreports/Client%20Details?R_officeId=1&exportCSV=true
+
+
+
+
+ + GET https://DomainName/api/v1/self/runreports/{reportName} + + { - "id": 32, - "name": "Cash In Hand", - "parentId": 10, - "glCode": "20301", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "....Cash In Hand", - "tagId": { - "id": 0, - "active": false, - "mandatory": false - } - }, + "columnHeaders": [ { - "id": 33, - "name": "Petty Cash", - "parentId": 10, - "glCode": "20302", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "....Petty Cash", - "tagId": { - "id": 0, - "active": false, - "mandatory": false - } + "columnName": "Office/Branch", + "columnType": "VARCHAR", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] }, { - "id": 34, - "name": "Loans to Customers", - "parentId": 12, - "glCode": "20501", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "....Loans to Customers", - "tagId": { - "id": 0, - "active": false, - "mandatory": false - } + "columnName": "Client Account No.", + "columnType": "VARCHAR", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] }, { - "id": 35, - "name": "Current Account Overdrafts", - "parentId": 12, - "glCode": "20502", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "....Current Account Overdrafts", - "tagId": { - "id": 0, - "active": false, - "mandatory": false - } + "columnName": "Name", + "columnType": "VARCHAR", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] }, { - "id": 17, - "name": "Suspense Account", - "glCode": "9999", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 1, - "code": "accountType.asset", - "value": "ASSET" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "Suspense Account", - "tagId": { - "id": 0, - "active": false, - "mandatory": false - } - } - ], - "incomeAccountOptions": [ - { - "id": 54, - "name": "Loan Recovery (Temp)", - "glCode": "220002-Temp", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 4, - "code": "accountType.income", - "value": "INCOME" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "description": "Temporary account to track income from Loan recovery", - "nameDecorated": "Loan Recovery (Temp)", - "tagId": { - "id": 0, - "active": false, - "mandatory": false - } + "columnName": "Joined", + "columnType": "DATE", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] }, { - "id": 36, - "name": "Fees and Charges", - "parentId": 18, - "glCode": "30101", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 4, - "code": "accountType.income", - "value": "INCOME" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "....Fees and Charges", - "tagId": { - "id": 0, - "active": false, - "mandatory": false - } - }, + "columnName": "External Id", + "columnType": "VARCHAR", + "isColumnNullable": false, + "isColumnPrimaryKey": false, + "columnValues": [] + } + ], + "data": [ { - "id": 37, - "name": "Penalties", - "parentId": 18, - "glCode": "30102", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 4, - "code": "accountType.income", - "value": "INCOME" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "....Penalties", - "tagId": { - "id": 0, - "active": false, - "mandatory": false - } - }, + "row": [ + "Head Office", + "000000001", + "John Doe", + "2017-03-04", + "786YYH7" + ] + } + ] + } + +
+
+ +   +
+
+

Link/delink accounts to/from pocket

+

Pockets behave as favourites. An user can link his/her Loan, Savings and Share accounts to pocket for + faster access. In a similar way linked accounts can be delinked from the pocket.

+

Link accounts to pocket

+

Example Requests:

+
self/pockets?command=linkAccounts
+
+
+ POST https://DomainName/api/v1/self/pockets?command=linkAccounts + POST self/pockets?command=linkAccounts + Content-Type: application/json + Request Body: + { - "id": 38, - "name": "Interest Received from Borrowers", - "parentId": 18, - "glCode": "30103", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 4, - "code": "accountType.income", - "value": "INCOME" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "....Interest Received from Borrowers", - "tagId": { - "id": 0, - "active": false, - "mandatory": false - } - }, + "accountsDetail":[ { - "id": 39, - "name": "Insurance Charges", - "parentId": 18, - "glCode": "30104", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 4, - "code": "accountType.income", - "value": "INCOME" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "....Insurance Charges", - "tagId": { - "id": 0, - "active": false, - "mandatory": false - } + "accountId":"11", + "accountType":"LOAN" }, { - "id": 40, - "name": "Other Operating Income", - "parentId": 18, - "glCode": "30105", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 4, - "code": "accountType.income", - "value": "INCOME" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "....Other Operating Income", - "tagId": { - "id": 0, - "active": false, - "mandatory": false - } + "accountId":"2", + "accountType":"SAVINGS" } - ], - "equityAccountOptions": [ - { - "id": 56, - "name": "Share Equity", - "parentId": 25, - "glCode": "00098", - "disabled": false, - "manualEntriesAllowed": true, - "type": { - "id": 3, - "code": "accountType.equity", - "value": "EQUITY" - }, - "usage": { - "id": 1, - "code": "accountUsage.detail", - "value": "DETAIL" - }, - "nameDecorated": "....Share Equity", - "tagId": { - "id": 0, - "active": false, - "mandatory": false - } + ] } - ] - } - } - ], - "chargeOptions": [ - { - "id": 2, - "name": "Activation fee", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 2, - "chargeTimeType": { - "id": 14, - "code": "chargeTimeType.sharespurchase", - "value": "Share Purchase" - }, - "chargeAppliesTo": { - "id": 4, - "code": "chargeAppliesTo.shares", - "value": "Shares" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - } - ] -} - -
-
+
+ + { + "resourceId": 6 + } + +
+
-  -
-
-

Submit new share application

-
- - - -
Mandatory Fields
clientId, productId, submittedDate, savingsAccountId, requestedShares, applicationDate
-
- - - -
Optional Fields
accountNo, externalId
-
- - - - -
Inherited from Product (if not provided)
minimumActivePeriod, minimumActivePeriodFrequencyType, lockinPeriodFrequency, lockinPeriodFrequencyType
-
-
-

Minimal request: accountNo auto generated, remaining details inherited from Share product.

- POST https://Domain Name/api/v1/self/shareaccounts - POST Share Account -Content-Type: application/json -Request Body: -{ - "productId":3, - "unitPrice":1, - "requestedShares":500, - "submittedDate":"31 July 2018", - "savingsAccountId":2, - "applicationDate":"31 July 2018", - "locale":"en", - "dateFormat":"dd MMMM yyyy", - "charges":[ - { - "chargeId":2, - "amount":2 - } - ], - "clientId":"14" -} - - -{ - "resourceId": 12 -} - -
-
+   +
+
+

Delink accounts from pocket

+

Example Requests:

+
self/pockets?command=delinkAccounts
+
+
+ POST + https://DomainName/api/v1/self/pockets?command=delinkAccounts + POST self/pockets?command=delinkAccounts + Content-Type: application/json + Request Body: + + { "pocketAccountMappingIds" :[8,9] + } + + + { + "resourceId":10 + } + +
+
-  -
-
-

Retrieve a share application/account:

- -

Example Requests :

-
self/shareaccounts/12
-
-
- GET https://DomainName/api/v1/self/shareaccounts/{accountId} - -{ - "id": 12, - "accountNo": "000000012", - "savingsAccountNumber": "000000002", - "clientId": 14, - "clientName": "Bheem", - "productId": 3, - "productName": "SP", - "status": { - "id": 100, - "code": "shareAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "active": false, - "closed": false - }, - "timeline": { - "submittedOnDate": [ - 2018, - 7, - 31 - ], - "submittedByUsername": "self", - "submittedByFirstname": "self", - "submittedByLastname": "self" - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "summary": { - "id": 12, - "accountNo": "000000012", - "totalApprovedShares": 0, - "totalPendingForApprovalShares": 500, - "productId": 3, - "productName": "SP", - "status": { - "id": 100, - "code": "shareAccountStatusType.submitted.and.pending.approval", - "value": "Submitted and pending approval", - "submittedAndPendingApproval": true, - "approved": false, - "rejected": false, - "active": false, - "closed": false - }, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "timeline": { - "submittedOnDate": [ - 2018, - 7, - 31 - ], - "submittedByUsername": "self", - "submittedByFirstname": "self", - "submittedByLastname": "self" - } - }, - "purchasedShares": [ - { - "id": 13, - "accountId": 12, - "purchasedDate": [ - 2018, - 7, - 31 - ], - "numberOfShares": 500, - "purchasedPrice": 1, - "status": { - "id": 100, - "code": "purchasedSharesStatusType.applied", - "value": "Pending Approval" - }, - "type": { - "id": 500, - "code": "purchasedSharesType.purchased", - "value": "Purchase" - }, - "amount": 502, - "chargeAmount": 2, - "amountPaid": 500 - } - ], - "savingsAccountId": 2, - "currentMarketPrice": 1, - "lockPeriodTypeEnum": { - "id": 4, - "code": "sharePeriodFrequencyType.invalid", - "value": "Invalid" - }, - "minimumActivePeriodTypeEnum": { - "id": 4, - "code": "sharePeriodFrequencyType.invalid", - "value": "Invalid" - }, - "allowDividendCalculationForInactiveClients": false, - "charges": [ - { - "id": 9, - "chargeId": 2, - "accountId": 12, - "name": "Activation fee", - "chargeTimeType": { - "id": 14, - "code": "chargeTimeType.sharespurchase", - "value": "Share Purchase" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "percentage": 0, - "amountPercentageAppliedTo": 0, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 2, - "amountPaid": 0, - "amountWaived": 0, - "amountWrittenOff": 0, - "amountOutstanding": 2, - "amountOrPercentage": 2, - "isActive": true - } - ], - "dividends": [] -} - -
-
+   +
+
+

Retrieve accounts linked to pocket

+

All linked loan

+

Example Requests:

+
self/pockets
+
+
+ POST https://DomainName/api/v1/self/pockets + + { + "loanAccounts": [ + { + "pocketId": 6, + "accountId": 11, + "accountType": 2, + "accountNumber": "000000011", + "id": 10 + } + ], + "savingsAccounts": [ + { + "pocketId": 6, + "accountId": 2, + "accountType": 3, + "accountNumber": "000000002", + "id": 11 + } + ], + "shareAccounts": [] + } + +
+
+ +
+ + +   +
+
+
+
+ + + + +

+ Full API Matrix +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -  -
-
-

List Guarantors

-

Example Requests:

-
self/loans/33/guarantors
-
-
-
- -GET https://DomainName/api/v1/self/loans/{loanId}/guarantors - - -[ - { - "id":6, - "loanId":33, - "guarantorType":{ - "id":1, - "code":"guarantor.existing.customer", - "value":"CUSTOMER" - }, - "firstname":"Abhishek v", - "lastname":"M", - "entityId":12, - "officeName":"Head Office", - "joinedDate":[ - 2014, - 7, - 5 - ], - "guarantorFundingDetails":[ - { - "id":7, - "status":{ - "id":100, - "code":"guarantorFundStatusType.active", - "value":"ACTIVE" - }, - "savingsAccount":{ - "id":28, - "accountNo":"000000028" - }, - "amount":2000, - "amountReleased":0, - "amountRemaining":2000, - "amountTransfered":0, - "guarantorTransactions":[ - { - "id":6, - "onHoldTransactionData":{ - "id":6, - "amount":2000, - "transactionType":{ - "id":1, - "code":"deposutAccountOnHoldTransactionType.hold", - "value":"hold" - }, - "transactionDate":[ - 2018, - 10, - 10 - ], - "reversed":false, - "savingsId":0, - "loanId":0 - }, - "reversed":false - } - ] - } - ], - "status":true - }, - { - "id":7, - "loanId":33, - "clientRelationshipType":{ - "id":6, - "name":"Parent", - "active":false, - "mandatory":false - }, - "guarantorType":{ - "id":1, - "code":"guarantor.existing.customer", - "value":"CUSTOMER" - }, - "firstname":"Bheem", - "lastname":"Test", - "entityId":14, - "officeName":"Head Office", - "joinedDate":[ - 2013, - 7, - 3 - ], - "guarantorFundingDetails":[ - { - "id":8, - "status":{ - "id":100, - "code":"guarantorFundStatusType.active", - "value":"ACTIVE" - }, - "savingsAccount":{ - "id":37, - "accountNo":"000000037" - }, - "amount":1000, - "amountReleased":0, - "amountRemaining":1000, - "amountTransfered":0, - "guarantorTransactions":[ - { - "id":7, - "onHoldTransactionData":{ - "id":7, - "amount":1000, - "transactionType":{ - "id":1, - "code":"deposutAccountOnHoldTransactionType.hold", - "value":"hold" - }, - "transactionDate":[ - 2018, - 10, - 10 - ], - "reversed":false, - "savingsId":0, - "loanId":0 - }, - "reversed":false - } - ] - } - ], - "status":true - } -] - -
-
-   -
-
-

Obligee List

-

Obligee list provides list of clients and other details, to whom the user has agreed to be a guarantor.

- -
+
+ + + + +
RESOURCES
+
+
+ + + + + + + +
+
POST
+
+
create/complex update
+
+
+ + + + + + + +
+
GET
+
+
read
+
+
+ + + + + + + +
+
PUT
+
+
update
+
+
+ + + + + + + +
+
DELETE
+
+
delete
+
+
ClientsclientsCreate a ClientList Clients
clients/templateRetrieve Client Template
clients/{clientId}Retrieve a ClientUpdate a ClientDelete a Client
clients/{clientId}?command=activateActivate a Client
clients/{clientId}?command=closeClose a Client
clients/{clientId}?command=assignStaffAssign Staff
clients/{clientId}?command=unassignStaffUnassign Staff
clients/{clientId}/accountsRetrieve client accounts overview
clients/{clientId}?command=transferTransfer Client
clients/{clientId}?command=updateSavingsAccountUpdate Default Savings Account
- - - - - - - - - - - - - -
Field Descriptions
clientId
The client id of the self service user.
firstName, lastName, displayName
The first name, last name and display name of the obligee
accountNumber, loanAmount
The loan account number and principal amount of the obligee
guaranteeAmount, amountReleased, amountTransferred
Guranteed amount, released and transferred amount of the client
- -

Example Requests:

-
self/clients/14/obligeedetails
-
-
-
- -GET https://DomainName/api/v1/self/clients/{clientId}/obligeedetails - - - [ - { - "firstName":"App", - "lastName":"Test", - "displayName":"App Test", - "accountNumber":"000000005", - "loanAmount":50000, - "guaranteeAmount":10000, - "amountReleased":0, - "amountTransferred":0 - }, - { - "firstName":"App", - "lastName":"Test", - "displayName":"App Test", - "accountNumber":"000000005", - "loanAmount":50000, - "guaranteeAmount":5000, - "amountReleased":0, - "amountTransferred":0 - }, - { - "firstName":"App", - "lastName":"Test", - "displayName":"App Test", - "accountNumber":"000000006", - "loanAmount":50000, - "guaranteeAmount":10000, - "amountReleased":0, - "amountTransferred":0 - }, - { - "firstName":"Abhishek v", - "lastName":"M", - "displayName":"Abhishek v M", - "accountNumber":"000000032", - "loanAmount":10000, - "guaranteeAmount":1000, - "amountReleased":1000, - "amountTransferred":0 - }, - { - "firstName":"Abhishek v", - "lastName":"M", - "displayName":"Abhishek v M", - "accountNumber":"000000033", - "loanAmount":10000, - "guaranteeAmount":1000, - "amountReleased":0, - "amountTransferred":0 - } -] - -
-
- -   -
-
-

Upload client image (Data URI)

-
-
- -POST https://DomainName/api/v1/self/clients/{clientId}/images - - -POST self/clients/14/images -Content-Type: text/plain -Request Body: -data:image/png;base64,iVBORw0KGgoAA -AANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0l -EQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6 -P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC - - -{ - "resourceId": 14, - "changes": {}, - "resourceIdentifier": "14" -} - -
-
- -   -
-
-

Upload client image (Multi-part Form data)

- - - - - - - -
Mandatory Fields
file -
-

- The form should contain a required named body part with the - name "file".

- If you are using a HTML form, a snippet like - <input type="file" name="file"></input> - can be used for uploading the image file -

-
-
- -POST https://DomainName/api/v1/self/clients/{clientId}/images - - -POST self/clients/14/images -Content-Type: multipart/form-data -Request Body: Not shown - - -{ - "resourceId": 14, - "changes": {}, - "resourceIdentifier": "14" -} - -
-
-   -
-
-

Delete an client's Image

-
-
- -DELETE https://DomainName/api/v1/self/clients/{clientId}/images - - -DELETE self/clients/14/images -Content-Type: application/json -No Request Body: - - -{ - "resourceId": 14, - "changes": {}, - "resourceIdentifier": "14" -} -
-
- -  -
-
-

Loan Products

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
name
Name associated with loan product on system.
shortName
Short name associated with a loan product.
- An abbreviated version of the name, used in reports or menus where space is limited, such as Collection Sheets. -
description
For providing helpful description of product offering.
fundId
For associating a loan product with a given fund by default.
includeInBorrowerCycle
It is a flag, Used to denote whether the loans should include in loan cycle counter or not.
useBorrowerCycle
It is a flag, Used to denote whether the loans should depend on
borrower loan cycle counter or not.
currencyCode
A three letter ISO code of currency.
digitsAfterDecimal
Override the currency default value for digitsAfterDecimal.
inMultiplesOf
Override the default value for rounding currency to multiples of value provided.
installmentAmountInMultiplesOf
Override the default value for rounding instalment amount to multiples of value provided.
principal
The loan amount to be disbursed to through loan.
numberOfRepayments
Number of installments to repay.
- Used like: numberOfRepayments Every repaymentEvery - repaymentFrequencyType
e.g. 10 (repayments) Every 12 Weeks -
repaymentEvery
Used like: numberOfRepayments Every - repaymentEvery repaymentFrequencyType
e.g. 10 - (repayments) Every 12 Weeks -
repaymentFrequencyType
Used like: numberOfRepayments Every - repaymentEvery repaymentFrequencyType
e.g. 10 - (repayments) Every 12 Weeks
- Example Values: 0=Days, 1=Weeks, 2=Months -
interestRatePerPeriod
Interest Rate.
Used like: - interestRatePerPeriod % interestRateFrequencyType - interestType
- e.g. 12.0000% Per year - Declining Balance -
interestRateFrequencyType
Used like: interestRatePerPeriod% - interestRateFrequencyType - interestType
e.g. 12.0000% - Per year - Declining Balance
- Example Values: 2=Per month, 3=Per year -
amortizationType
Example Values: 0=Equal - principle payments, 1=Equal installments
interestType
Used like: interestRatePerPeriod% - interestRateFrequencyType - interestType
e.g. 12.0000% - Per year - Declining Balance
- Example Values: 0=Declining Balance, 1=Flat -
interestCalculationPeriodType
Example Values: 0=Daily, 1=Same as repayment period
allowPartialPeriodInterestCalculation
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) -
inArrearsTolerance
The amount that can be 'waived' at end - of all loan payments because it is too small to worry about.
- This is also the tolerance amount assessed when determining if a - loan is in arrears. -
principalVariationsForBorrowerCycle,interestRateVariationsForBorrowerCycle,
numberOfRepaymentVariationsForBorrowerCycle
Variations for loan, based on borrower cycle number -
minimumDaysBetweenDisbursalAndFirstRepayment
The minimum number of days allowed between a Loan disbursal and its first repayment. -
principalThresholdForLastInstalment
Field represents percentage of current instalment principal amount for comparing against principal outstanding to add another repayment instalment. If the outstanding principal amount is less then calculated amount, remaining outstanding amount will be added to current instalment. Default value for multi disburse loan is 50% and non-multi disburse loan is 0% -
canDefineInstallmentAmount
if provided as true, then fixed instalment amount can be provided from loan account. -
transactionProcessingStrategyCode
-An enumeration that indicates the type of transaction processing strategy to be used. This relates to functionality that is also known as Payment Application Logic. - -

A number of out of the box approaches exist, some are custom to specific MFIs, some are more general and indicate the order in which payments are processed.

- -

Refer to the Payment Application Logic / Transaction Processing Strategy section in the appendix for more detailed overview of each available payment application logic provided out of the box.

- -List of current approaches:
-
    -
  • 1 = Mifos style (Similar to Old Mifos)
  • -
  • 2 = Heavensfamily (Custom MFI approach)
  • -
  • 3 = Creocore (Custom MFI approach)
  • -
  • 4 = RBI (India)
  • -
  • 5 = Principal Interest Penalties Fees Order
  • -
  • 6 = Interest Principal Penalties Fees Order
  • -
  • 7 = Early Payment Strategy
  • -
-
graceOnPrincipalPayment
Optional: Integer - represents the number of repayment periods that grace should apply to the principal component of a repayment period. -
graceOnInterestPayment
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. -
graceOnInterestCharged
Optional: Integer - represents the number of repayment periods that should be interest-free. -
graceOnArrearsAgeing
Optional: Integer - Used in Arrears calculation to only take into account loans that are more than graceOnArrearsAgeing days overdue. -
overdueDaysForNPA
Optional: Integer - represents the maximum number of days a Loan may - be overdue before being classified as a NPA (non performing asset) -
accountMovesOutOfNPAOnlyOnArrearsCompletion
Optional: Boolean - if provided as true, Loan Account moves out of NPA state only when all arrears are cleared -
accountingRule
Specifies if accounting is enabled for the particular - product and the type of the accounting rule to be used - Example Values:1=NONE, 2=CASH_BASED, 3=ACCRUAL_PERIODIC, 4=ACCRUAL_UPFRONT
isInterestRecalculationEnabled
It is a flag, Used to denote whether interest recalculation is enabled or disabled for the particular product
daysInYearType
Specifies the number of days in a year.
- Example Values:1=ACTUAL(Actual number of days in year), 360=360 DAYS, 364=364 DAYS(52 WEEKS), 365=365 DAYS
daysInMonthType
Specifies the number of days in a month.
- Example Values:1=ACTUAL(Actual number of days in month), 30=30 DAYS
interestRecalculationCompoundingMethod
Specifies which amount portion should be added to principal for interest recalculation.
- Example Values:0=NONE(Only on principal), 1=INTEREST(Principal+Interest), 2=FEE(Principal+Fee), 3=FEE And INTEREST (Principal+Fee+Interest)
rescheduleStrategyMethod
Specifies what action should perform on loan repayment schedule for advance payments.
- Example Values:1=Reschedule next repayments, 2=Reduce number of installments, 3=Reduce EMI amount, 4=Adjust last, unpaid period
recalculationCompoundingFrequencyType
Specifies effective date from which the compounding of interest or fee amounts will be considered in recalculation on late payment.
- Example Values:1=Same as repayment period, 2=Daily, 3=Weekly, 4=Monthly
recalculationCompoundingFrequencyInterval
Specifies compounding frequency interval for interest recalculation.
-
recalculationCompoundingFrequencyDate
Specifies compounding frequency start date for interest recalculation.
-
recalculationRestFrequencyType
Specifies effective date from which the late or advanced payment amounts will be considered in recalculation.
- Example Values:1=Same as repayment period, 2=Daily, 3=Weekly, 4=Monthly
recalculationRestFrequencyInterval
Specifies rest frequency interval for interest recalculation.
-
recalculationRestFrequencyDate
Specifies rest frequency start date for interest recalculation.
-
preClosureInterestCalculationStrategy
Specifies applicable days for interest calculation on pre closure of a loan.
- Example Values:1=Calculate till pre closure date, 2=Calculate till rest frequency date
isArrearsBasedOnOriginalSchedule
If Specified as true, arrears will be identified based on original schedule.
-
allowAttributeOverrides
Specifies if select attributes may be overridden for individual loan accounts.
-
-
-
+ + Client Identifiers + clients/{clientId}/identifiers + Create an Identifier for a Client + List all Identifiers for a Client + + + + + + clients/{clientId}/identifiers/{identifierId} + + Retrieve a Client Identifier + Update a Client Identifier + Delete a Client Identifier + + + Client Images + clients/{clientId}/images + Upload an Image for a Client (as DATA URI) + Get Client Image (DATA URI) + Update Client Image (DATA URI) + Delete Client Image + + + + + + Upload an Image for a Client (Multi-part form data) + + Get Client Image (Binary file) + + Update Client Image (Multi-part form data) + + + + + Standing Instructions + standinginstructions + Create Standing Instruction + List Standing Instructions + + + + + + standinginstructions/{standingInstructionId} + + Retrive a Standing Instruction + Update Standing Instruction + Delete Standing Instruction(status change) + + + + standinginstructionrunhistory + + Standinginstructions History + + + + + + standinginstructions/template + + Retrive Standing Instruction Template + + + + + Account Transfers + accounttransfers/ + Create new Transfer + List Transfers + + + + + + accounttransfers/template + + Retrieve Template + + + + + + accounttransfers/{transferId} + + Retrieve Transfer + + + + + Group + groups + Create a Group + List Groups + + + + + + groups/template + + Retrieve Group Template + + + + + + groups/{groupId} + + Retrieve a Group + Update a Group + Delete a Group + + + + groups/{groupId}?command=activate + Activate a Group + + + + + + + groups/{groupId}?command=associateClients + Associate Clients + + + + + + + groups/{groupId}?command=disassociateClients + Disassociate Clients + + + + + + + groups/{groupId}/accounts + + Retrive Group accounts summary + + + + + + groups/{groupId}?command=transferClients + Bulk Transfer Clients across Groups + + + + + + + groups/{groupId}?command=generateCollectionSheet + Generate Collection Sheet + + + + + + + groups/{groupId}?command=saveCollectionSheet + Save Collection Sheet + + + + + + + groups/{groupId}?command=unassignStaff + Unassign Staff + + + + + + + groups/{groupId}?command=assignStaff + Assign Staff + + + + + + + groups/{groupId}?command=close + Close Group + + + + + + + groups/{groupId}?command=assignRole + Assign Role + + + + + + + groups/{groupId}?command=unassignRole + Unassign Role + + + + + + + groups/{groupId}?command=updateRole + Update Role + + + + + + Center + centers + Create a Center + List Centers + + + + + + centers/template + + Retrieve Center Template + + + + + + centers/{centerId} + + Retrieve a Center + Update a Center + Delete a Center + + + + centers/{centerId}?command=activate + Activate a Center + + + + + + + centers/{centerId}?command=close + Close Center + + + + + + + centers/{centerId}?command=associateGroups + Associate Groups + + + + + + + centers/{centerId}?command=disassociateGroups + Disassociate Groups + + + + + + + centers/{centerId}/accounts + + Retrive Center accounts summary + + + + + + centers/{centerId}?command=generateCollectionSheet + Generate Collection Sheet + + + + + + + centers/{centerId}?command=saveCollectionSheet + Save Collection Sheet + + + + + + Loan Product + loanproducts + Create a Loan Product + List Loan Products + + + + + + loanproducts/template + + Retrieve Loan Product Template + + + + + + loanproducts/{productId} + + Retrieve a Loan Product + Update a Loan Product + + + + Loan Product Mix + loanproducts/template?isProductMixTemplate=true + + Retrieve Loan Product Mix Template + + + + + + loanproducts?associations=productMixes + + List Loan Products Mix + + + + + + loanproducts/{productId}/productmix + Create a Loan Product Mix + Retrieve Loan Products Mix + Update Loan Product Mix + Delete Loan Products Mix + + + Loans + loans?calculateLoanSchedule + Calculate Loan Repayment Schedule + + + + + + + loans + Submit a new Loan Application + List Loans/Loan Applications + + + + + + loans/template?clientId={clientId} + + Retrieve Loan Template + + + + + + loans/{loanId} + + Retrieve a Loan + + Delete a Loan Application + + + + loans/{loanId}?command=approve + Approve Loan Application + + + + + + + loans/{loanId}?command=undoApproval + Undo Loan Application Approval + + + + + + + loans/{loanId}?command=assignLoanOfficer + Assign a Loan Officer + + + + + + + loans/{loanId}?command=unassignLoanOfficer + Unassign a Loan Officer + + + + + + + loans/{loanId}?command=reject + Reject Loan Application + + + + + + + loans/{loanId}?command=withdraw + Withdraw Loan Application + + + + + + + loans/{loanId}?command=disburse + Disburse Loan + + + + + + + loans/{loanId}?command=disburseToSavings + Disburse Loan To Savings Account + + + + + + + loans/{loanId}?command=undoDisbursal + Undo Loan Application Disbursal + + + + + + + loans/{loanId}?command=recoverGuarantees + Recover From Guarantors + + + + + + + loans/{loanId}/transactions/template + + Retrieve Loan Transaction Template + + + + + Loan Transactions + loans/{loanId}/transactions?command=repayment + Enter a repayment + + + + + + + loans/{loanId}/transactions?command=waiveInterest + Waive Interest + + + + + + + loans/{loanId}/transactions?command=writeoff + Write-off Loan + + + + + + + + loans/{loanId}/transactions?command=recoverypayment + Make Recovery Payment + + + + + + + + loans/{loanId}/transactions?command=undowriteoff + Undo Loan Write-off Transaction + + + + + + + loans/{loanId}/transactions/{transactionId} + + Retrieve a transactions details + + + + + + loans/{loanId}/transactions/{transactionId} + Adjust a Transaction + + + + + + Loan Charges + loans/{loanId}/charges + Add a Loan Charge + + + + + + + loans/{loanId}/charges/{loanChargeId} + Pay Loan Charge from Linked Savings + Retrieve a Loan Charge + Modify a Loan Charge + Delete a Loan Charge + + + Loan Guarantors + loans/{loanId}/guarantors + Create a Guarantor + + List Guarantors + + + + + + + loans/{loanId}/guarantors/{guarantorId} + + Retrieve a Guarantor + Update a Guarantor + Delete a Guarantor + + + Loan Collateral + loans/{loanId}/collaterals + Create a Collateral + + List collaterals + + + + + + + loans/{loanId}/collaterals/{collateralId} + + Retrieve a Collateral + Update a Collateral + Delete a Collateral + + + Loan Rescheduling + rescheduleloans + Create a Loan Reschedule Request + + + + + + + rescheduleloans/{requestId} + + Retrieve a Loan Reschedule Request + + + + + + rescheduleloans/{requestId}?command=previewLoanReschedule + + Retrieve a Preview of The New Loan Repayment + Schedule + + + + + + rescheduleloans/{requestId}?command=reject + Reject Loan Reschedule Request + + + + + + + rescheduleloans/{requestId}?command=approve + Approve Loan Reschedule Request + + + + + + Loan Term Variations + /loans/{loanId}/schedule?command=calculateLoanSchedule + Calculate Schedule with Loan Term Variations + + + + + + + /loans/{loanId}/schedule?command=addVariations + Create Loan Term Variations + + + + + + + /loans/{loanId}/schedule?command=deleteVariations + Remove All Loan Term Variations + + + + + + General Ledger Account + glaccounts + Create a New Ledger Account + List Ledger Accounts + + + + + + glaccounts/{glaccountId} + + Retrieve a Ledger Account + Update a Ledger Account + Delete a Ledger Account + + + Accounting Closure + glclosures + Create an Accounting Closure + List Accounting Closures + + + + + + glclosures/{glclosureId} + + Retrieve an Accounting Closure + Update an Accounting Closure + Delete an Accounting Closure + + + Journal Entries + journalentries + Create Journal Entries + List Journal Entries + + + + + + journalentries?command=updateRunningBalance + Update Running Balance for Journal Entries + + + + + + + journalentries/{entryId} + + Retrieve a single Entry + + + + + + journalentries/{transactionId}/reversal + Reverse Journal Entries + + + + + + Accounting Rules + accountingrules + Create a Accounting Rule + List Accounting Rules + + + + + + accountingrules/{accountingrulesId} + + Retrieve a Accounting Rule + Update a Accounting Rule + Delete a Accounting Rule + + + Report + reports + Create a Report + List Reports + + + + + + reports/template + + Retrieve Report Template + + + + + + reports/{id} + + Retrieve a Report + Update a Report + Delete a Report + + + Run Report + runreports/{reportName} + + Run a Report + + + + + Search + search + + Search Resources + + + + + Office + offices + Create an Office + List Offices + + + + + + offices/template + + Retrieve Office Template + + + + + + offices/{officeId} + + Retrieve an Office + Update an Office + + + + Currency + currencies + + Retrieve Currency + Configuration + Update Currency + Configuration + + + + Funds + funds + Create a Fund + List Funds + + + + + + funds/{fundId} + + Retrieve a Fund + Update a Fund + + + + Staff + staff + Create a Staff + List Staff + + + + + + staff/{staffId} + + Retrieve a Staff Member + Update a Staff Member + + + + Staff Images + staff/{staffId}/images + Upload an Image for a Staff Member (as DATA URI) + Get Staff Image (DATA URI) + Update Staff Image (DATA URI) + Delete Staff Image + + + + + + Upload an Image for a Staff Member (Multi-part form data) + + Get Staff Image (Binary file) + + Update Staff Image (Multi-part form data) + + + + + Charges + charges + Create a Charge + List Charges + + + + + + charges/{chargeId} + + Retrieve a Charge + Update a Charge + Delete a Charge + + + Data Table + datatables + Create Data Table + List Data Tables + + + + + + datatables/{datatable} + + Retrieve Data Table Details + Update Data Table + Delete Data Table + + + + datatables/register/{datatable}/{apptable} + Register Data Table + + + + + + + datatables/deregister/{datatable} + Deregister Data Table + + + + + + + datatables/{datatable}/{apptableId} + Create Entry in Data + Table + Retrieve Entry(s) from + Data Table + Update Entry in Data + Table (One to One) + Delete Entry(s) in Data + Table + + + + datatables/{datatable}/{apptableId}/{datatableId} + + Update Entry in Data + Table (One to Many) + + Delete Entry in Data + Table (One to Many) + + + Documents + {entityType}/{entityId}/documents + Create a Document + List All Document Details + + + + + + {entityType}/{entityId}/documents/{documentId} + + Retrieve a Documents Details + Update a Document + Delete a Document + + + + {entityType}/{entityId}/documents/{documentId}/attachment + + Retrieve + binary file associated with a + Document + + + + + + Notes + {resource}/{resourceId}/notes + Add a Resource Note + Retrieve a Resource's Notes + + + + + + {resource}/{resourceId}/notes/{noteId} + + List All + Notes for a Resource + Update a Resource Note + Delete a Resource Note + + + Authentication + authentication + Verify Authentication + + + + + + User + users + Create a User + List Users + + + + + + users/template + + Retrieve User Template + + + + + + users/{userId} + + Retrieve a User + Update a User + Delete a User + + + Role + roles + Create a New Role + List Roles + + + + + + roles/{roleId} + + Retrieve a Role + Update a Role + + + + + roles/{roleId}/permissions + + Retrieve a Role's + Permissions + Update a Role's + Permissions + + + + Permission + permissions + + List Application Permissions + Enable/Disable Permissions for Maker Checker + + + + Global Configuration + configurations + + List Global Configuration + + + + + + configurations/{configId} + + Retrieve a Global Configuration + Update Global Configuration + + + + + + + Retrieve Surveys Global Configuration + + + + + Codes + codes + Create a Code + List Codes + + + + + + codes/{codeId} + + Retrieve a Code + Update a Code + Delete a Code + + + Code Values + codes/{codeId}/codevalues + Create a Code Value + List Code Values + + + + + + codes/{codeId}/codevalues/{codevalueId} + + Retrieve a Code Value + Update a Code Value + Delete a Code Value + + + Audits + audits + + List Audits + + + + + + audits/searchtemplate + + Retrieve Audit Search Template + + + + + + audits/{auditId} + + Retrieve an Audit Entry + + + + + Makercheckers + makercheckers + + List Maker Checker Entries + + + + + + makercheckers/searchtemplate + + Retrieve Maker Checker Search Template + + + + + + makercheckers/{auditId} + + + + Delete Maker Checker Entry + + + + makercheckers/{auditId}?command=approve + Approve Maker Checker Entry + + + + + + + makercheckers/{auditId}?command=reject + Reject Maker Checker Entry + + + + + + Scheduler jobs + jobs + + List Scheduler jobs + + + + + + jobs/{jobId} + + Retrieve a job + Update a job + + + + + jobs/{jobId}?command=executeJob + Run a job + + + + + + + jobs/{jobid}/runhistory?offset=0&limit=200 + + Retrieve job history + + + + + + scheduler + + Retrieve scheduler status + + + + + + scheduler?command=start + Activate a scheduler service + + + + + + + scheduler?command=stop + Suspend a scheduler service + + + + + + Savings Product + savingsproducts + Create a Savings product + List Savings products + + + + + + savingproducts/template + + Retrieve Savings Product Template + + + + + + savingsproducts/{productId} + + Retrieve a savings product + Update a savings product + Delete a savings product + + + Savings Accounts + savingsaccounts + Submit new savings application + List savings application/accounts + + + + + + savingsaccounts/template?clientId={clientId} + + Retrieve savings template + + + + + + savingsaccounts/{accountId} + + Retrieve a savings application/account + Modify a savings application + Delete a savings application + + + + savingsaccounts/{accountId}?command=updateWithHoldTax + + + Modify savings application withhold tax + + + + + savingsaccounts/{accountId}?command=approve + Approve a savings application + + + + + + + savingsaccounts/{accountId}?command=undoApproval + Undo savings application approval + + + + + + + savingsaccounts/{accountId}?command=assignSavingsOfficer + Assign Savings Officer + + + + + + + savingsaccounts/{accountId}?command=unassignSavingsOfficer + Unassign Savings Officer + + + + + + + savingsaccounts/{accountId}?command=reject + Reject a savings application + + + + + + + savingsaccounts/{accountId}?command=withdraw + Withdraw savings application + + + + + + + savingsaccounts/{accountId}?command=activate + Activate a savings account + + + + + + + savingsaccounts/{accountId}?command=close + Close a savings account + + + + + + + savingsaccounts/{accountId}?command=calculateInterest + Calculate interest on a savings account + + + + + + + savingsaccounts/{accountId}?command=postInterest + Post interest on a savings account + + + + + + + savingsaccounts/{accountId}?command=block + Block savings account + + + + + + + savingsaccounts/{accountId}?command=unblock + UnBlock savings account + + + + + + + savingsaccounts/{accountId}?command=blockCredit + Block Savings Account Credit transactions + + + + + + + savingsaccounts/{accountId}?command=unblockCredit + Unblock Savings Account Credit transactions + + + + + + + savingsaccounts/{accountId}?command=blockDebit + Block Savings Account Debit transactions + + + + + + + savingsaccounts/{accountId}?command=unblockDebit + Unblock Savings Account Debit transactions + + + + + + Savings Transactions + savingsaccounts/{accountId}/transactions?command=deposit + Make a deposit + + + + + + + savingsaccounts/{accountId}/transactions?command=withdrawal + Make a withdrawal + + + + + + + savingsaccounts/{accountId}/transactions/{transactionId}?command=undo + Undo transaction + + + + + + + savingsaccounts/{accountId}/transactions/{transactionId}?command=modify + Adjust transaction + + + + + + + savingsaccounts/{accountId}/transactions/{transactionId}?command=holdAmount + Hold Amount + + + + + + + savingsaccounts/{accountId}/transactions/{transactionId}?command=releaseAmount + Release Amount + + + + + + + savingsaccounts/{accountId}/transactions/template + + Retrieve savings account transaction template + + + + + + + savingsaccounts/{accountId}/transactions/{transactionId} + + Retrieve savings account transaction + + + + + Savings Account Charges + savingsaccounts/{accountId}/charges + Add a Savings Account Charge + List Savings Account Charges + + + + + + savingsaccounts/{accountId}/charges/{savingsAccountChargeId} + + Retrieve a Savings Account Charge + Modify a Savings Account Charge + Delete a Savings Account Charge + + + + savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=paycharge + Pay a Savings Account Charge + + + + + + + savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=waive + Waive a Savings Account Charge + + + + + + + savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=inactivate + Inactivate a Savings Account Charge + + + + + + Fixed Deposit Product + fixeddepositproducts + Create a Fixed Deposit product + List Fixed Deposit products + + + + + + fixeddepositproducts/{productId} + + Retrieve a Fixed Deposit product + Update a Fixed Deposit product + Delete a Fixed Deposit product + + + Fixed Deposit Accounts + fixeddepositaccounts + Submit new fixed deposit application + List fixed deposit application/accounts + + + + + + fixeddepositaccounts/{accountId} + + Retrieve a fixed deposit application/account + Modify a fixed deposit application + Delete a fixed deposit application + + + + fixeddepositaccounts/{accountId}?command=approve + Approve a fixed deposit application + + + + + + + fixeddepositaccounts/{accountId}?command=undoApproval + Undo fixed deposit application approval + + + + + + + fixeddepositaccounts/{accountId}?command=reject + Reject a fixed deposit application + + + + + + + fixeddepositaccounts/{accountId}?command=withdraw + Withdraw fixed deposit application + + + + + + + fixeddepositaccounts/{accountId}?command=activate + Activate a fixed deposit account + + + + + + + fixeddepositaccounts/{accountId}?command=close + Close a fixed deposit account + + + + + + + fixeddepositaccounts/{accountId}?command=prematureClose + Premature Close a fixed deposit account + + + + + + + fixeddepositaccounts/{accountId}?command=calculatePrematureAmount + Calculate Premature amount on a fixed deposit + account + + + + + + + fixeddepositaccounts/{accountId}?command=calculateInterest + Calculate interest on a fixed deposit account + + + + + + + fixeddepositaccounts/{accountId}?command=postInterest + Post interest on a fixed deposit account + + + + + + Recurring Deposit Product + recurringdepositproducts + Create a Recurring Deposit product + List Recurring Deposit products + + + + + + recurringdepositproducts/{productId} + + Retrieve a Recurring Deposit product + Update a Recurring Deposit product + Delete a Recurring Deposit product + + + Recurring Deposit Accounts + recurringdepositaccounts + Submit new recurring deposit application + List recurring deposit application/accounts + + + + + + recurringdepositaccounts/{accountId} + + Retrieve a recurring deposit application/account + Modify a recurring deposit application + Delete a recurring deposit application + + + + recurringdepositaccounts/{accountId}?command=approve + Approve a recurring deposit application + + + + + + + recurringdepositaccounts/{accountId}?command=undoApproval + Undo recurring deposit application approval + + + + + + + recurringdepositaccounts/{accountId}?command=reject + Reject a recurring deposit application + + + + + + + recurringdepositaccounts/{accountId}?command=withdraw + Withdraw recurring deposit application + + + + + + + recurringdepositaccounts/{accountId}?command=activate + Activate a recurring deposit account + + + + + + + recurringdepositaccounts/{accountId}?command=close + Close a recurring deposit account + + + + + + + recurringdepositaccounts/{accountId}?command=prematureClose + Premature Close a recurring deposit account + + + + + + + recurringdepositaccounts/{accountId}?command=calculatePrematureAmount + Calculate Premature amount on a recurring deposit + account + + + + + + + recurringdepositaccounts/{accountId}?command=calculateInterest + Calculate interest on a recurring deposit account + + + + + + + recurringdepositaccounts/{accountId}?command=postInterest + Post interest on a recurring deposit account + + + + + + Recurring Deposit Transactions + recurringdepositaccounts/{accountId}/transactions?command=deposit + Make a deposit + + + + + + + recurringdepositaccounts/{accountId}/transactions?command=withdrawal + Make a withdrawal + + + + + + + recurringdepositaccounts/{accountId}/transactions/{transactionId}?command=undo + Undo transaction + + + + + + + recurringdepositaccounts/{accountId}/transactions/{transactionId}?command=modify + Adjust transaction + + + + + + + recurringdepositaccounts/{accountId}/transactions/template + + Retrieve Deposit account transaction + template + + + + + + recurringdepositaccounts/{accountId}/transactions/{transactionId} + + Retrieve Deposit account transaction + + + + + Share Product + shareproducts + Create a Share product + List Share products + + + -   -
-
-

List Loan Products

-

Example Requests:

-
self/loanproducts?clientId=1
-
-
-
self/loanproducts?fields=name,description&clientId=1
-
-
- -GET https://DomainName/api/v1/self/loanproducts?clientId={clientId} - - -[ - { - "name":"Personal loan", - "description":"Loan", - "useBorrowerCycle":false, - "status":"loanProduct.active", - "allowVariableInstallments":false, - "minimumGap":0, - "maximumGap":0, - "daysInMonthType":{ - "code":"DaysInMonthType.actual", - "value":"Actual" - }, - "daysInYearType":{ - "code":"DaysInYearType.actual", - "value":"Actual" - }, - "isInterestRecalculationEnabled":false, - "canDefineInstallmentAmount":false, - "installmentAmountInMultiplesOf":1, - "principalVariationsForBorrowerCycle":[ - - ], - "interestRateVariationsForBorrowerCycle":[ - - ], - "numberOfRepaymentVariationsForBorrowerCycle":[ - - ], - "multiDisburseLoan":false, - "maxTrancheCount":0, - "principalThresholdForLastInstallment":0, - "holdGuaranteeFunds":false, - "accountMovesOutOfNPAOnlyOnArrearsCompletion":false, - "allowAttributeOverrides":{ - "graceOnPrincipalAndInterestPayment":true, - "graceOnArrearsAgeing":true - }, - "syncExpectedWithDisbursementDate":false - } -] - -
-
- -   -
-
-

Retrieve a Loan Product

-

Example Requests:

-
self/loanproducts/1?clientId=1
-
-
-
self/loanproducts/1?fields=name,description&clientId=1
-
-
- -GET https://DomainName/api/v1/self/loanproducts/{productId}?clientId={clientId} - - -{ - "id": 11, - "name": "advanced accounting", - "shortName": "ad11", - "includeInBorrowerCycle": true, - "useBorrowerCycle": true, - "status": "loanProduct.active", - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 0, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "principal": 10000.000000, - "minPrincipal": 2000.000000, - "maxPrincipal": 15000.000000, - "numberOfRepayments": 7, - "repaymentEvery": 7, - "repaymentFrequencyType": { - "id": 0, - "code": "repaymentFrequency.periodFrequencyType.days", - "value": "Days" - }, - "interestRatePerPeriod": 5.000000, - "interestRateFrequencyType": { - "id": 2, - "code": "interestRateFrequency.periodFrequencyType.months", - "value": "Per month" - }, - "annualInterestRate": 60.000000, - "amortizationType": { - "id": 1, - "code": "amortizationType.equal.installments", - "value": "Equal installments" - }, - "interestType": { - "id": 0, - "code": "interestType.declining.balance", - "value": "Declining Balance" - }, - "interestCalculationPeriodType": { - "id": 1, - "code": "interestCalculationPeriodType.same.as.repayment.period", - "value": "Same as repayment period" - }, - "transactionProcessingStrategyCode": "mifos-standard-strategy", - "transactionProcessingStrategyName": "Mifos style", - "charges": [], - "principalVariationsForBorrowerCycle": [ - { - "id": 21, - "borrowerCycleNumber": 1, - "paramType": { - "id": 1, - "code": "LoanProductParamType.principal", - "value": "principal" - }, - "valueConditionType": { - "id": 2, - "code": "LoanProductValueConditionType.equal", - "value": "equals" - }, - "minValue": 2000.000000, - "maxValue": 20000.000000, - "defaultValue": 15000.000000 - }, - { - "id": 20, - "borrowerCycleNumber": 1, - "paramType": { - "id": 1, - "code": "LoanProductParamType.principal", - "value": "principal" - }, - "valueConditionType": { - "id": 3, - "code": "LoanProductValueConditionType.greterthan", - "value": "greter than" - }, - "minValue": 3000.000000, - "maxValue": 25000.000000, - "defaultValue": 20000.000000 - } - ], - "interestRateVariationsForBorrowerCycle": [], - "numberOfRepaymentVariationsForBorrowerCycle": [], - "accountingRule": { - "id": 2, - "code": "accountingRuleType.cash", - "value": "CASH BASED" - }, - "accountingMappings": { - "fundSourceAccount": { - "id": 1, - "name": "fund source", - "glCode": "01" - }, - "loanPortfolioAccount": { - "id": 2, - "name": "Loan portfolio", - "glCode": "02" - }, - "transfersInSuspenseAccount": { - "id": 3, - "name": "transfers", - "glCode": "03" - }, - "interestOnLoanAccount": { - "id": 4, - "name": "income from interest", - "glCode": "04" - }, - "incomeFromFeeAccount": { - "id": 8, - "name": "income from fees 2", - "glCode": "10" - }, - "incomeFromPenaltyAccount": { - "id": 9, - "name": "income from penalities 2", - "glCode": "11" - }, - "writeOffAccount": { - "id": 10, - "name": "loans written off 2", - "glCode": "12" - }, - "overpaymentLiabilityAccount": { - "id": 11, - "name": "over payment", - "glCode": "13" - } - }, - "paymentChannelToFundSourceMappings": [ - { - "paymentType": { - "id": 10, - "name": "check" - }, - "fundSourceAccount": { - "id": 1, - "name": "fund source", - "glCode": "01" - } - } - ], - "feeToIncomeAccountMappings": [ - { - "charge": { - "id": 1, - "name": "flat install", - "active": false, - "penalty": false - }, - "incomeAccount": { - "id": 8, - "name": "income from fees 2", - "glCode": "10" - } - }, - { - "charge": { - "id": 2, - "name": "install per", - "active": false, - "penalty": false - }, - "incomeAccount": { - "id": 4, - "name": "income from interest", - "glCode": "04" - } - }, - { - "charge": { - "id": 5, - "name": "des charge", - "active": false, - "penalty": false - }, - "incomeAccount": { - "id": 9, - "name": "income from penalities 2", - "glCode": "11" - } - }, - "multiDisburseLoan":true,"maxTrancheCount":3,"outstandingLoanBalance":36000.000000, - "overdueDaysForNPA":2, - "principalThresholdForLastInstalment":50 - ] -} - -
-
- -  -
-
-

Savings Product:

-

An MFIs savings product offerings are modeled using this API.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Field Descriptions
name
The name of the product offering.
shortName
Shortname associated with a saving product.
- An abbreviated version of the name, used in reports or menus where space is limited. -
description
A description of the product offering.
currencyCode
Three letter ISO code representing currency.
digitsAfterDecimal
Override the currency default value for digitsAfterDecimal.
inMultiplesOf
Override the default value for rounding currency to multiples of provided value.
nominalAnnualInterestRate
The default interest rate set when creating savings accounts of this type of product. e.g. 5% Per year - It number here is always expressed as the Nominal APR.
interestCompoundingPeriodType
The period at which interest rate is compounded. 1=Daily, 4=Monthly (at end of month)
interestPostingPeriodType
The period at which interest rate is posted or credited to savings account. 4=Monthly (at end of month), 5=Quarterly (at end of quarter, 31st Mar, 30th Jun, 30th Sep, 31st Dec)
interestCalculationType
The interest calculation method used: 1=Daily Balance or 2=Average Daily Balance
interestCalculationDaysInYearType
The setting for number of days in year to use: 360=360 Days, 365=365 Days
minRequiredOpeningBalance
Optional: If provided, sets the minimum deposit amount required to open a savings account e.g. 2,000
lockinPeriodFrequency
Optional: If provided, used along with lockinPeriodFrequencyType to indicate the length of time that the savings account is 'locked in' and withdrawals are not allowed. e.g. 6 Months
lockinPeriodFrequencyType
Optional: If provided, used along with lockinPeriodFrequency to indicate the length of time that the savings account is 'locked in' and withdrawals are not allowed. 0=Days, 1=Weeks, 2=Months, 3=Years - e.g. 6 Months
withdrawalFeeForTransfers
Optional: Used along with withdrawalFeeAmount to indicate whether the withdrawal fee should be applied on the account for account transfers .
accountingRule
Specifies if accounting is enabled for the particular - product and the type of the accounting rule to be used - Example Values:1=NONE,2=CASH_BASED
allowOverdraft
Optional: If provided, depending on the value mark the savings account as overdraft account
overdraftLimit
Optional: If provided, sets the maximum allowed overdraft amount for a savings account e.g. 5,000 else set the limit as zero
minBalanceForInterestCalculation
Optional: If provided, balance must be greater than provided value for calculation of interest e.g. 5,000
enforceMinRequiredBalance
Optional: If set to true, validates that the account balance does not - fall below minRequiredBalance
minRequiredBalance
Optional: If provided, sets an indicator of the minimum required balance of the savings account e.g. 5,000 else set the limit as zero. Note that enforceMinRequiredBalance determines if the minimum required balance is enforced
withHoldTax
Optional: If provided, sets an indicator for applying withhold tax on interest posting for savings account
taxGroupId
Optional: If withhold tax set as true, with hold tax will be applied as per the tax group provided
-
-
- -   -
-
-

List Savings Products

-

Example Requests:

-
self/savingsproducts?clientId=1
-
-
- GET https://domainname/api/v1/self/savingsproducts?clientid={clientid} - -[ - { - "id": 1, - "name": "Savings product", - "shortName": "sa1", - "description": "savings", - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "nominalAnnualInterestRate": 5.000000, - "interestCompoundingPeriodType": { - "id": 1, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", - "value": "Daily" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "withdrawalFeeForTransfers": false, - "accountingRule": { - "id": 2, - "code": "accountingRuleType.cash", - "value": "CASH BASED" - } - } -] -
-
- -   -
-
-

Retrieve a Savings Product

-

Example Requests:

-
self/savingsproducts/1?clientId=1
-

-
self/savingsproducts/1?fields=name,description&clientId=1
-
-
- GET https://DomainName/api/v1/self/savingsproducts/{productId}&clientId={clientId} - -{ - "id": 1, - "name": "savings product", - "shortName": "sa1", - "description": "savings", - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "nominalAnnualInterestRate": 5.000000, - "interestCompoundingPeriodType": { - "id": 1, - "code": "savings.interest.period.savingsCompoundingInterestPeriodType.daily", - "value": "Daily" - }, - "interestPostingPeriodType": { - "id": 4, - "code": "savings.interest.posting.period.savingsPostingInterestPeriodType.monthly", - "value": "Monthly" - }, - "interestCalculationType": { - "id": 1, - "code": "savingsInterestCalculationType.dailybalance", - "value": "Daily Balance" - }, - "interestCalculationDaysInYearType": { - "id": 365, - "code": "savingsInterestCalculationDaysInYearType.days365", - "value": "365 Days" - }, - "withdrawalFeeForTransfers": false, - "accountingRule": { - "id": 2, - "code": "accountingRuleType.cash", - "value": "CASH BASED" - }, - "accountingMappings": { - "savingsReferenceAccount": { - "id": 12, - "name": "savings ref", - "glCode": "20" - }, - "incomeFromFeeAccount": { - "id": 16, - "name": "income from savings fee", - "glCode": "24" - }, - "incomeFromPenaltyAccount": { - "id": 17, - "name": "income from sav penalites", - "glCode": "25" - }, - "interestOnSavingsAccount": { - "id": 15, - "name": "interest on savings", - "glCode": "23" - }, - "savingsControlAccount": { - "id": 13, - "name": "savings ref tool kit", - "glCode": "21" - }, - "transfersInSuspenseAccount": { - "id": 14, - "name": "saving transfers", - "glCode": "22" - } - }, - "paymentChannelToFundSourceMappings": [ - { - "paymentType": { - "id": 10, - "name": "check" - }, - "fundSourceAccount": { - "id": 12, - "name": "savings ref", - "glCode": "20" - } - } - ], - "feeToIncomeAccountMappings": [ - { - "charge": { - "id": 11, - "name": "sav charge", - "active": false, - "penalty": false - }, - "incomeAccount": { - "id": 16, - "name": "income from savings fee", - "glCode": "24" - } - } - ], - "penaltyToIncomeAccountMappings": [ - { - "charge": { - "id": 12, - "name": "sav 2", - "active": false, - "penalty": true - }, - "incomeAccount": { - "id": 17, - "name": "income from sav penalites", - "glCode": "25" - } - } - ], - "charges": [] -} - -
+ + + shareproducts/template + + Retrieve Share Product Template + + + + + + shareproducts/{productId} + + Retrieve a share product + Update a share product + +
- -   -
-
-

List Share Products

-

Example Requests:

-
self/products/share?clientId=1
-
-
- - GET https://DomainName/api/v1/self/products/share?clientId={clientId} - - -{ - "totalFilteredRecords": 2, - "pageItems": [ - { - "id": 1, - "name": "Share P1", - "shortName": "shar", - "description": "Share", - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "totalShares": 1000, - "totalSharesIssued": 450, - "unitPrice": 5, - "shareCapital": 2250, - "minimumShares": 2, - "nominalShares": 5, - "maximumShares": 8, - "allowDividendCalculationForInactiveClients": false, - "lockinPeriod": 1, - "lockPeriodTypeEnum": { - "id": 1, - "code": "shares.lockin.sharePeriodFrequencyType.weeks", - "value": "Weeks" - }, - "minimumActivePeriod": 10, - "minimumActivePeriodForDividendsTypeEnum": { - "id": 0, - "code": "shares.minimumactive.sharePeriodFrequencyType.days", - "value": "Days" - }, - "accountingRule": { - "id": 1, - "code": "accountingRuleType.none", - "value": "NONE" - } - }, - { - "id": 2, - "name": "ShareP2", - "shortName": "comp", - "description": "Company shares", - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "totalShares": 500, - "totalSharesIssued": 200, - "unitPrice": 2, - "shareCapital": 400, - "nominalShares": 5, - "allowDividendCalculationForInactiveClients": false, - "lockinPeriod": 1, - "lockPeriodTypeEnum": { - "id": 0, - "code": "shares.lockin.sharePeriodFrequencyType.days", - "value": "Days" - }, - "minimumActivePeriod": 10, - "minimumActivePeriodForDividendsTypeEnum": { - "id": 0, - "code": "shares.minimumactive.sharePeriodFrequencyType.days", - "value": "Days" - }, - "accountingRule": { - "id": 2, - "code": "accountingRuleType.cash", - "value": "CASH BASED" - } - } - ] -} - -
-
- -   -
-
-

Retrieve a Share Product

-

Example Requests:

-
self/products/share/2?clientId=1
-

-
self/products/share/2?clientId=1&template=true
-
-
- GET https://DomainName/api/v1/self/products/share/{productId}?clientId={clientId} - -{ - "id": 2, - "name": "ShareP2", - "shortName": "comp", - "description": "Company shares", - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "inMultiplesOf": 1, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "totalShares": 500, - "totalSharesIssued": 200, - "unitPrice": 2, - "shareCapital": 400, - "nominalShares": 5, - "marketPrice": [ - { - "id": 2, - "fromDate": "May 27, 2018", - "shareValue": 1 - } - ], - "charges": [ - { - "id": 1, - "name": "Activation", - "active": true, - "penalty": false, - "currency": { - "code": "USD", - "name": "US Dollar", - "decimalPlaces": 2, - "displaySymbol": "$", - "nameCode": "currency.USD", - "displayLabel": "US Dollar ($)" - }, - "amount": 1, - "chargeTimeType": { - "id": 13, - "code": "chargeTimeType.activation", - "value": "Share Account Activate" - }, - "chargeAppliesTo": { - "id": 4, - "code": "chargeAppliesTo.shares", - "value": "Shares" - }, - "chargeCalculationType": { - "id": 1, - "code": "chargeCalculationType.flat", - "value": "Flat" - }, - "chargePaymentMode": { - "id": 0, - "code": "chargepaymentmode.regular", - "value": "Regular" - } - } - ], - "allowDividendCalculationForInactiveClients": false, - "lockinPeriod": 1, - "lockPeriodTypeEnum": { - "id": 0, - "code": "shares.lockin.sharePeriodFrequencyType.days", - "value": "Days" - }, - "minimumActivePeriod": 10, - "minimumActivePeriodForDividendsTypeEnum": { - "id": 0, - "code": "shares.minimumactive.sharePeriodFrequencyType.days", - "value": "Days" - }, - "accountingRule": { - "id": 2, - "code": "accountingRuleType.cash", - "value": "CASH BASED" - }, - "accountingMappings": { - "shareReferenceId": { - "id": 1, - "name": "GLAsset", - "glCode": "GL1" - }, - "incomeFromFeeAccountId": { - "id": 4, - "name": "GLIncome", - "glCode": "GL4" - }, - "shareEquityId": { - "id": 3, - "name": "GLEquity", - "glCode": "GL3" - }, - "shareSuspenseId": { - "id": 2, - "name": "GL2Liabilities", - "glCode": "GL2" - } - } -} - -
-
- -  -
-
-

Retrieve Active Surveys

- -

Example Requests :

-
self/surveys?isActive=true
-
-
- GET https://domainname/api/v1/self/surveys?isActive=true - -[ - { - "id":1, - "componentDatas":[ - - ], - "questionDatas":[ - { - "id":1, - "responseDatas":[ - { - "id":2, - "text":"Own", - "value":1, - "sequenceNo":1 - }, - { - "id":1, - "text":"Rent", - "value":0, - "sequenceNo":2 - } - ], - "componentKey":Test, - "key":"t1", - "text":"Type of house", - "description":Test, - "sequenceNo":1 - } - ], - "key":"test", - "name":"test", - "description":"test", - "countryCode":"in", - "validFrom":1540233000000, - "validTo":4695906600000 - } -] - -
-
- -  -
-
-

Submit Survey

- -

Example Requests :

-
self/surveys/scorecards/1
-
-
- POST https://domainname/api/v1/self/surveys/scorecards/{surveyId} - -{ - "userId":3, - "clientId":"1", - "surveyId":1, - "scorecardValues":[ - { - "questionId":1, - "responseId":2, - "value":1, - "createdOn":1540291482379 - } - ], - "surveyName":"", - "username":"", - "id":0 -} - -
-
-  -
-
-

Retrieve Survey records

- -

Example Requests :

-
self/surveys/scorecards/clients/1
-
-
- GET https://domainname/api/v1/self/surveys/scorecards/clients/{clientId} - -[ - { - "id":8, - "userId":, - "username":"mifos", - "clientId":3, - "surveyId":1, - "surveyName":"test", - "scorecardValues":[ - { - "questionId":1, - "responseId":2, - "value":1, - "createdOn":1540233000000 - } - ] - } -] -
-
- -   -
-
-

Running a Report

-

This resource allows you to run and receive output from pre-defined Apache Fineract reports.

-

- The default output is a JSON formatted "Generic Resultset". The Generic Resultset contains - Column Heading as well as Data information. However, you can - export to CSV format by simply adding "&exportCSV=true" to the end - of your URL.

-

If Pentaho reports have been pre-defined, they can also be - run through this resource. Pentaho reports can return HTML, PDF or - CSV formats.

-

The Apache Fineract reference application uses a - JQuery plugin called stretchyreporting which, itself, uses this - reports resource to provide a pretty flexible reporting User - Interface (UI).

-
Arguments
-
-
R_'parameter names' ...
-
- optional, No defaults -
-
The number and names of the parameters depend on the - specific report and how it has been configured. R_officeId is an - example parameter name.
-
Note: the prefix R_ stands for Reporting
-
genericResultSet
-
- optional, defaults to true -
-
If 'true' an optimised JSON format is returned suitable for tabular display of data. -
If 'false' a simple JSON format is returned. -
parameterType
-
- optional, The only valid value is 'true'. If any - other value is provided the argument will be ignored -
-
Determines whether the request looks in the list of - reports or the list of parameters for its data. Doesn't apply to - Pentaho reports.
-
exportCSV
-
- optional, The only valid value is 'true'. If any - other value is provided the argument will be ignored -
-
Output will be delivered as a CSV file instead of JSON. - Doesn't apply to Pentaho reports.
-
output-type
-
- optional, Defaults to HTML. -
-
Valid Values are HTML, XLS, XSLX, CSV and PDF for html, Excel, Excel 2007+, - CSV and PDF formats respectively.
-
Only applies to Pentaho reports.
-
locale
-
- optional -
-
Any valid locale Ex: en_US, en_IN, fr_FR etc
-
Only applies to Pentaho reports.
-
-

Example Requests:

-
self/runreports/Client%20Details?R_officeId=1
-
-
-
self/runreports/Client%20Details?R_officeId=1&exportCSV=true
-
-
-
-
- -GET https://DomainName/api/v1/self/runreports/{reportName} - - -{ - "columnHeaders": [ - { - "columnName": "Office/Branch", - "columnType": "VARCHAR", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "Client Account No.", - "columnType": "VARCHAR", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "Name", - "columnType": "VARCHAR", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "Joined", - "columnType": "DATE", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - }, - { - "columnName": "External Id", - "columnType": "VARCHAR", - "isColumnNullable": false, - "isColumnPrimaryKey": false, - "columnValues": [] - } - ], - "data": [ - { - "row": [ - "Head Office", - "000000001", - "John Doe", - "2017-03-04", - "786YYH7" - ] - } - ] -} - -
-
- -   -
-
-

Link/delink accounts to/from pocket

-

Pockets behave as favourites. An user can link his/her Loan, Savings and Share accounts to pocket for faster access. In a similar way linked accounts can be delinked from the pocket.

-

Link accounts to pocket

-

Example Requests:

-
self/pockets?command=linkAccounts
-
-
- POST https://DomainName/api/v1/self/pockets?command=linkAccounts - POST self/pockets?command=linkAccounts -Content-Type: application/json -Request Body: - -{ - "accountsDetail":[ - { - "accountId":"11", - "accountType":"LOAN" - }, - { - "accountId":"2", - "accountType":"SAVINGS" - } - ] -} - - -{ - "resourceId": 6 -} - -
-
- -   -
-
-

Delink accounts from pocket

-

Example Requests:

-
self/pockets?command=delinkAccounts
-
-
- POST https://DomainName/api/v1/self/pockets?command=delinkAccounts - POST self/pockets?command=delinkAccounts -Content-Type: application/json -Request Body: - -{ "pocketAccountMappingIds" :[8,9] -} - - -{ - "resourceId":10 -} - -
-
- -   -
-
-

Retrieve accounts linked to pocket

-

All linked loan

-

Example Requests:

-
self/pockets
-
-
- POST https://DomainName/api/v1/self/pockets - -{ - "loanAccounts": [ - { - "pocketId": 6, - "accountId": 11, - "accountType": 2, - "accountNumber": "000000011", - "id": 10 - } - ], - "savingsAccounts": [ - { - "pocketId": 6, - "accountId": 2, - "accountType": 3, - "accountNumber": "000000002", - "id": 11 - } - ], - "shareAccounts": [] -} - -
-
- -
- - -   -
-
-
-
- - - - -

- Full API Matrix -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +   +
+
- - - - -
RESOURCES
-
- - - - - - -
POST
create/complex update
- - - - - - -
GET
read
- - - - - - -
PUT
update
- - - - - - -
DELETE
delete
ClientsclientsCreate a ClientList Clients
clients/templateRetrieve Client Template
clients/{clientId}Retrieve a ClientUpdate a ClientDelete a Client
clients/{clientId}?command=activateActivate a Client
clients/{clientId}?command=closeClose a Client
clients/{clientId}?command=assignStaffAssign Staff
clients/{clientId}?command=unassignStaffUnassign Staff
clients/{clientId}/accountsRetrieve client accounts overview
clients/{clientId}?command=transferTransfer Client
clients/{clientId}?command=updateSavingsAccountUpdate Default Savings Account
Client Identifiersclients/{clientId}/identifiersCreate an Identifier for a ClientList all Identifiers for a Client
clients/{clientId}/identifiers/{identifierId}Retrieve a Client IdentifierUpdate a Client IdentifierDelete a Client Identifier
Client Imagesclients/{clientId}/imagesUpload an Image for a Client (as DATA URI)Get Client Image (DATA URI)Update Client Image (DATA URI)Delete Client Image
- Upload an Image for a Client (Multi-part form data) - Get Client Image (Binary file) - Update Client Image (Multi-part form data) -
Standing InstructionsstandinginstructionsCreate Standing InstructionList Standing Instructions
standinginstructions/{standingInstructionId}Retrive a Standing InstructionUpdate Standing InstructionDelete Standing Instruction(status change)
standinginstructionrunhistoryStandinginstructions History
standinginstructions/templateRetrive Standing Instruction Template
Account Transfersaccounttransfers/Create new TransferList Transfers
accounttransfers/templateRetrieve Template
accounttransfers/{transferId}Retrieve Transfer
GroupgroupsCreate a GroupList Groups
groups/templateRetrieve Group Template
groups/{groupId}Retrieve a GroupUpdate a GroupDelete a Group
groups/{groupId}?command=activateActivate a Group
groups/{groupId}?command=associateClientsAssociate Clients
groups/{groupId}?command=disassociateClientsDisassociate Clients
groups/{groupId}/accountsRetrive Group accounts summary
groups/{groupId}?command=transferClientsBulk Transfer Clients across Groups
groups/{groupId}?command=generateCollectionSheetGenerate Collection Sheet
groups/{groupId}?command=saveCollectionSheetSave Collection Sheet
groups/{groupId}?command=unassignStaffUnassign Staff
groups/{groupId}?command=assignStaffAssign Staff
groups/{groupId}?command=closeClose Group
groups/{groupId}?command=assignRoleAssign Role
groups/{groupId}?command=unassignRoleUnassign Role
groups/{groupId}?command=updateRoleUpdate Role
CentercentersCreate a CenterList Centers
centers/templateRetrieve Center Template
centers/{centerId}Retrieve a CenterUpdate a CenterDelete a Center
centers/{centerId}?command=activateActivate a Center
centers/{centerId}?command=closeClose Center
centers/{centerId}?command=associateGroupsAssociate Groups
centers/{centerId}?command=disassociateGroupsDisassociate Groups
centers/{centerId}/accountsRetrive Center accounts summary
centers/{centerId}?command=generateCollectionSheetGenerate Collection Sheet
centers/{centerId}?command=saveCollectionSheetSave Collection Sheet
Loan ProductloanproductsCreate a Loan ProductList Loan Products
loanproducts/templateRetrieve Loan Product Template
loanproducts/{productId}Retrieve a Loan ProductUpdate a Loan Product
Loan Product Mixloanproducts/template?isProductMixTemplate=trueRetrieve Loan Product Mix Template
loanproducts?associations=productMixesList Loan Products Mix
loanproducts/{productId}/productmixCreate a Loan Product MixRetrieve Loan Products MixUpdate Loan Product MixDelete Loan Products Mix
Loansloans?calculateLoanScheduleCalculate Loan Repayment Schedule
loansSubmit a new Loan ApplicationList Loans/Loan Applications
loans/template?clientId={clientId}Retrieve Loan Template
loans/{loanId}Retrieve a LoanDelete a Loan Application
loans/{loanId}?command=approveApprove Loan Application
loans/{loanId}?command=undoApprovalUndo Loan Application Approval
loans/{loanId}?command=assignLoanOfficerAssign a Loan Officer
loans/{loanId}?command=unassignLoanOfficerUnassign a Loan Officer
loans/{loanId}?command=rejectReject Loan Application
loans/{loanId}?command=withdrawWithdraw Loan Application
loans/{loanId}?command=disburseDisburse Loan
loans/{loanId}?command=disburseToSavingsDisburse Loan To Savings Account
loans/{loanId}?command=undoDisbursalUndo Loan Application Disbursal
loans/{loanId}?command=recoverGuaranteesRecover From Guarantors
loans/{loanId}/transactions/templateRetrieve Loan Transaction Template
Loan Transactionsloans/{loanId}/transactions?command=repaymentEnter a repayment
loans/{loanId}/transactions?command=waiveInterestWaive Interest
loans/{loanId}/transactions?command=writeoffWrite-off Loan
loans/{loanId}/transactions?command=recoverypaymentMake Recovery Payment
loans/{loanId}/transactions?command=undowriteoffUndo Loan Write-off Transaction
loans/{loanId}/transactions/{transactionId}Retrieve a transactions details
loans/{loanId}/transactions/{transactionId}Adjust a Transaction
Loan Chargesloans/{loanId}/chargesAdd a Loan Charge
loans/{loanId}/charges/{loanChargeId}Pay Loan Charge from Linked SavingsRetrieve a Loan ChargeModify a Loan ChargeDelete a Loan Charge
Loan Guarantorsloans/{loanId}/guarantorsCreate a Guarantor - List Guarantors -
loans/{loanId}/guarantors/{guarantorId}Retrieve a GuarantorUpdate a GuarantorDelete a Guarantor
Loan Collateralloans/{loanId}/collateralsCreate a Collateral - List collaterals -
loans/{loanId}/collaterals/{collateralId}Retrieve a CollateralUpdate a CollateralDelete a Collateral
Loan ReschedulingrescheduleloansCreate a Loan Reschedule Request
rescheduleloans/{requestId}Retrieve a Loan Reschedule Request
rescheduleloans/{requestId}?command=previewLoanRescheduleRetrieve a Preview of The New Loan Repayment Schedule
rescheduleloans/{requestId}?command=rejectReject Loan Reschedule Request
rescheduleloans/{requestId}?command=approveApprove Loan Reschedule Request
Loan Term Variations/loans/{loanId}/schedule?command=calculateLoanScheduleCalculate Schedule with Loan Term Variations
/loans/{loanId}/schedule?command=addVariationsCreate Loan Term Variations
/loans/{loanId}/schedule?command=deleteVariationsRemove All Loan Term Variations
General Ledger AccountglaccountsCreate a New Ledger AccountList Ledger Accounts
glaccounts/{glaccountId}Retrieve a Ledger AccountUpdate a Ledger AccountDelete a Ledger Account
Accounting ClosureglclosuresCreate an Accounting ClosureList Accounting Closures
glclosures/{glclosureId}Retrieve an Accounting ClosureUpdate an Accounting ClosureDelete an Accounting Closure
Journal EntriesjournalentriesCreate Journal EntriesList Journal Entries
journalentries?command=updateRunningBalanceUpdate Running Balance for Journal Entries
journalentries/{entryId}Retrieve a single Entry
journalentries/{transactionId}/reversalReverse Journal Entries
Accounting RulesaccountingrulesCreate a Accounting RuleList Accounting Rules
accountingrules/{accountingrulesId}Retrieve a Accounting RuleUpdate a Accounting RuleDelete a Accounting Rule
ReportreportsCreate a ReportList Reports
reports/templateRetrieve Report Template
reports/{id}Retrieve a ReportUpdate a ReportDelete a Report
Run Reportrunreports/{reportName}Run a Report
SearchsearchSearch Resources
OfficeofficesCreate an OfficeList Offices
offices/templateRetrieve Office Template
offices/{officeId}Retrieve an OfficeUpdate an Office
CurrencycurrenciesRetrieve Currency - ConfigurationUpdate Currency - Configuration
FundsfundsCreate a FundList Funds
funds/{fundId}Retrieve a FundUpdate a Fund
StaffstaffCreate a StaffList Staff
staff/{staffId}Retrieve a Staff MemberUpdate a Staff Member
Staff Imagesstaff/{staffId}/imagesUpload an Image for a Staff Member (as DATA URI)Get Staff Image (DATA URI)Update Staff Image (DATA URI)Delete Staff Image
- Upload an Image for a Staff Member (Multi-part form data) - Get Staff Image (Binary file) - Update Staff Image (Multi-part form data) -
ChargeschargesCreate a ChargeList Charges
charges/{chargeId}Retrieve a ChargeUpdate a ChargeDelete a Charge
Data TabledatatablesCreate Data TableList Data Tables
datatables/{datatable}Retrieve Data Table DetailsUpdate Data TableDelete Data Table
datatables/register/{datatable}/{apptable}Register Data Table
datatables/deregister/{datatable}Deregister Data Table
datatables/{datatable}/{apptableId}Create Entry in Data - TableRetrieve Entry(s) from - Data TableUpdate Entry in Data - Table (One to One)Delete Entry(s) in Data - Table
datatables/{datatable}/{apptableId}/{datatableId}Update Entry in Data - Table (One to Many)Delete Entry in Data - Table (One to Many)
Documents{entityType}/{entityId}/documentsCreate a DocumentList All Document Details
{entityType}/{entityId}/documents/{documentId}Retrieve a Documents DetailsUpdate a DocumentDelete a Document
{entityType}/{entityId}/documents/{documentId}/attachmentRetrieve - binary file associated with a - Document -
Notes{resource}/{resourceId}/notesAdd a Resource NoteRetrieve a Resource's Notes
{resource}/{resourceId}/notes/{noteId}List All - Notes for a ResourceUpdate a Resource NoteDelete a Resource Note
AuthenticationauthenticationVerify Authentication
UserusersCreate a UserList Users
users/templateRetrieve User Template
users/{userId}Retrieve a UserUpdate a UserDelete a User
RolerolesCreate a New RoleList Roles
roles/{roleId}Retrieve a RoleUpdate a Role
roles/{roleId}/permissionsRetrieve a Role's - PermissionsUpdate a Role's - Permissions
PermissionpermissionsList Application PermissionsEnable/Disable Permissions for Maker Checker
Global ConfigurationconfigurationsList Global Configuration
configurations/{configId}Retrieve a Global ConfigurationUpdate Global Configuration
Retrieve Surveys Global Configuration
CodescodesCreate a CodeList Codes
codes/{codeId}Retrieve a CodeUpdate a CodeDelete a Code
Code Valuescodes/{codeId}/codevaluesCreate a Code ValueList Code Values
codes/{codeId}/codevalues/{codevalueId}Retrieve a Code ValueUpdate a Code ValueDelete a Code Value
AuditsauditsList Audits
audits/searchtemplateRetrieve Audit Search Template
audits/{auditId}Retrieve an Audit Entry
MakercheckersmakercheckersList Maker Checker Entries
makercheckers/searchtemplateRetrieve Maker Checker Search Template
makercheckers/{auditId}Delete Maker Checker Entry
makercheckers/{auditId}?command=approveApprove Maker Checker Entry
makercheckers/{auditId}?command=rejectReject Maker Checker Entry
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Scheduler jobsjobsList Scheduler jobs
jobs/{jobId}Retrieve a jobUpdate a job
jobs/{jobId}?command=executeJobRun a job
jobs/{jobid}/runhistory?offset=0&limit=200Retrieve job history
schedulerRetrieve scheduler status
scheduler?command=startActivate a scheduler service
scheduler?command=stopSuspend a scheduler service
Savings ProductsavingsproductsCreate a Savings productList Savings products
savingproducts/templateRetrieve Savings Product Template
savingsproducts/{productId}Retrieve a savings productUpdate a savings productDelete a savings product
Savings AccountssavingsaccountsSubmit new savings applicationList savings application/accounts
savingsaccounts/template?clientId={clientId}Retrieve savings template
savingsaccounts/{accountId}Retrieve a savings application/accountModify a savings applicationDelete a savings application
savingsaccounts/{accountId}?command=updateWithHoldTaxModify savings application withhold tax
savingsaccounts/{accountId}?command=approveApprove a savings application
savingsaccounts/{accountId}?command=undoApprovalUndo savings application approval
savingsaccounts/{accountId}?command=assignSavingsOfficerAssign Savings Officer
savingsaccounts/{accountId}?command=unassignSavingsOfficerUnassign Savings Officer
savingsaccounts/{accountId}?command=rejectReject a savings application
savingsaccounts/{accountId}?command=withdrawWithdraw savings application
savingsaccounts/{accountId}?command=activateActivate a savings account
savingsaccounts/{accountId}?command=closeClose a savings account
savingsaccounts/{accountId}?command=calculateInterestCalculate interest on a savings account
savingsaccounts/{accountId}?command=postInterestPost interest on a savings account
savingsaccounts/{accountId}?command=blockBlock savings account
savingsaccounts/{accountId}?command=unblockUnBlock savings account
savingsaccounts/{accountId}?command=blockCreditBlock Savings Account Credit transactions
savingsaccounts/{accountId}?command=unblockCreditUnblock Savings Account Credit transactions
savingsaccounts/{accountId}?command=blockDebitBlock Savings Account Debit transactions
savingsaccounts/{accountId}?command=unblockDebitUnblock Savings Account Debit transactions
Savings Transactionssavingsaccounts/{accountId}/transactions?command=depositMake a deposit
savingsaccounts/{accountId}/transactions?command=withdrawalMake a withdrawal
savingsaccounts/{accountId}/transactions/{transactionId}?command=undoUndo transaction
savingsaccounts/{accountId}/transactions/{transactionId}?command=modifyAdjust transaction
savingsaccounts/{accountId}/transactions/{transactionId}?command=holdAmountHold Amount
savingsaccounts/{accountId}/transactions/{transactionId}?command=releaseAmountRelease Amount
savingsaccounts/{accountId}/transactions/templateRetrieve savings account transaction template
savingsaccounts/{accountId}/transactions/{transactionId}Retrieve savings account transaction
Savings Account Chargessavingsaccounts/{accountId}/chargesAdd a Savings Account ChargeList Savings Account Charges
savingsaccounts/{accountId}/charges/{savingsAccountChargeId}Retrieve a Savings Account ChargeModify a Savings Account ChargeDelete a Savings Account Charge
savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=paychargePay a Savings Account Charge
savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=waiveWaive a Savings Account Charge
savingsaccounts/{accountId}/charges/{savingsAccountChargeId}?command=inactivateInactivate a Savings Account Charge
Fixed Deposit ProductfixeddepositproductsCreate a Fixed Deposit productList Fixed Deposit products
fixeddepositproducts/{productId}Retrieve a Fixed Deposit productUpdate a Fixed Deposit productDelete a Fixed Deposit product
Fixed Deposit AccountsfixeddepositaccountsSubmit new fixed deposit applicationList fixed deposit application/accounts
fixeddepositaccounts/{accountId}Retrieve a fixed deposit application/accountModify a fixed deposit applicationDelete a fixed deposit application
fixeddepositaccounts/{accountId}?command=approveApprove a fixed deposit application
fixeddepositaccounts/{accountId}?command=undoApprovalUndo fixed deposit application approval
fixeddepositaccounts/{accountId}?command=rejectReject a fixed deposit application
fixeddepositaccounts/{accountId}?command=withdrawWithdraw fixed deposit application
fixeddepositaccounts/{accountId}?command=activateActivate a fixed deposit account
fixeddepositaccounts/{accountId}?command=closeClose a fixed deposit account
fixeddepositaccounts/{accountId}?command=prematureClosePremature Close a fixed deposit account
fixeddepositaccounts/{accountId}?command=calculatePrematureAmountCalculate Premature amount on a fixed deposit account
fixeddepositaccounts/{accountId}?command=calculateInterestCalculate interest on a fixed deposit account
fixeddepositaccounts/{accountId}?command=postInterestPost interest on a fixed deposit account
Recurring Deposit ProductrecurringdepositproductsCreate a Recurring Deposit productList Recurring Deposit products
recurringdepositproducts/{productId}Retrieve a Recurring Deposit productUpdate a Recurring Deposit productDelete a Recurring Deposit product
Recurring Deposit AccountsrecurringdepositaccountsSubmit new recurring deposit applicationList recurring deposit application/accounts
recurringdepositaccounts/{accountId}Retrieve a recurring deposit application/accountModify a recurring deposit applicationDelete a recurring deposit application
recurringdepositaccounts/{accountId}?command=approveApprove a recurring deposit application
recurringdepositaccounts/{accountId}?command=undoApprovalUndo recurring deposit application approval
recurringdepositaccounts/{accountId}?command=rejectReject a recurring deposit application
recurringdepositaccounts/{accountId}?command=withdrawWithdraw recurring deposit application
recurringdepositaccounts/{accountId}?command=activateActivate a recurring deposit account
recurringdepositaccounts/{accountId}?command=closeClose a recurring deposit account
recurringdepositaccounts/{accountId}?command=prematureClosePremature Close a recurring deposit account
recurringdepositaccounts/{accountId}?command=calculatePrematureAmountCalculate Premature amount on a recurring deposit account
recurringdepositaccounts/{accountId}?command=calculateInterestCalculate interest on a recurring deposit account
recurringdepositaccounts/{accountId}?command=postInterestPost interest on a recurring deposit account
Recurring Deposit Transactionsrecurringdepositaccounts/{accountId}/transactions?command=depositMake a deposit
recurringdepositaccounts/{accountId}/transactions?command=withdrawalMake a withdrawal
recurringdepositaccounts/{accountId}/transactions/{transactionId}?command=undoUndo transaction
recurringdepositaccounts/{accountId}/transactions/{transactionId}?command=modifyAdjust transaction
recurringdepositaccounts/{accountId}/transactions/templateRetrieve Deposit account transaction template
recurringdepositaccounts/{accountId}/transactions/{transactionId}Retrieve Deposit account transaction
Share ProductshareproductsCreate a Share productList Share products
shareproducts/templateRetrieve Share Product Template
shareproducts/{productId}Retrieve a share productUpdate a share product
-
- -   -
- - - - -

Beta API Matrix

- - - - - - - - - - - - - - - - -
- - - - -
RESOURCES
-
- - - - - - -
POST
create/complex update
- - - - - - -
GET
read
- - - - - - -
PUT
update
- - - - - - -
DELETE
delete
-
CachecachesList Cache TypesSwitch Cache
-
- -  -
-

Payment Application Logic / Transaction Processing Strategy

- -

The way payments (transactions) are handled and the effect they have on the loan is an area that can differ widely from MFI to MFI. Mifos allows for transaction processing strategies to be developed that are associated with a loan product. Several approaches are provided out-of-the-box. If these approaches dont meet exactly your needs a custom approach can be developed and released with the platform.

- -

In general the the following areas are handled by any given transaction processing strategy: -

    -
  • Payment order: What component of a loan installment should be paid of frist interest, principal, fees, penalties?
  • -
  • Early payment: What qualifies a payment as an early payment and what impact should this have on the loan schedule?
  • -
  • On time payment: What qualifies a payment as on time?
  • -
  • Late payment: What qualifies a payment as a late payment and what impact should this have on the loan schedule?
  • -
-

- -

Penalties, Fees, Interest, Principal order

-

- Payment order: -

    -
  1. Overdue and due penalties
  2. -
  3. Overdue and due fees
  4. -
  5. Overdue and due interest
  6. -
  7. Overdue and due principal
  8. -
-

-

Early payment: Any payment that pays off an installment that occurs before the due date of the installment. There is no incentive/advantage to making an early payment as theres no decrease in cost of the loan.

- -

On time payment: Any payment that pays off an installment that occurs exactly on the due date of the installment.

- -

Late payment: Any payment that pays off an installment that occurs after the due date of the installment. There is no penalization for late payment. The total cost of the loan does not automatically increase, no penalties are automatically applied to the loan.

- -

Principal Interest Penalties Fees Order

-

The key aspect of this strategy is the payment order.

-

- Payment order: -

    -
  1. Overdue and due principal
  2. -
  3. Overdue and due interest
  4. -
  5. Overdue and due penalties
  6. -
  7. Overdue and due fees
  8. -
-

-

Early payment: Any payment that pays off an installment that occurs before the due date of the installment. There is no incentive/advantage to making an early payment as theres no decrease in cost of the loan.

- -

On time payment: Any payment that pays off an installment that occurs exactly on the due date of the installment.

- -

Late payment: Any payment that pays off an installment that occurs after the due date of the installment. There is no penalization for late payment. The total cost of the loan does not automatically increase, no penalties are automatically applied to the loan.

- -

Interest Principal Penalties Fees Order

-

The key aspect of this strategy is the payment order.

-

- Payment order: -

    -
  1. Overdue and due interest
  2. -
  3. Overdue and due principal
  4. -
  5. Overdue and due penalties
  6. -
  7. Overdue and due fees
  8. -
-

-

Early payment: Any payment that pays off an installment that occurs before the due date of the installment. There is no incentive/advantage to making an early payment as theres no decrease in cost of the loan.

- -

On time payment: Any payment that pays off an installment that occurs exactly on the due date of the installment.

- -

Late payment: Any payment that pays off an installment that occurs after the due date of the installment. There is no penalization for late payment. The total cost of the loan does not automatically increase, no penalties are automatically applied to the loan.

- -

RBI (India)

-

Per RBI regulations, all interest must be paid (both current and overdue) before principal is paid.

-

For example taking a loan with two installments due (one current and one overdue) of 220 each (200 principal + 20 interest) - A partial payment of 40 results in payment been broken up as 20 interest on installment #1 (200 principal remaining) and 20 payment to interest on installment #2 (200 principal remaining)

-

- Payment order: -

    -
  1. Overdue and due interest
  2. -
  3. Overdue and due principal
  4. -
  5. Overdue and due penalties
  6. -
  7. Overdue and due fees
  8. -
-

-

Early payment: Any payment that pays off an installment that occurs before the due date of the installment. There is no incentive/advantage to making an early payment as theres no decrease in cost of the loan.

- -

On time payment: Any payment that pays off an installment that occurs exactly on the due date of the installment.

- -

Late payment: Any payment that pays off an installment that occurs after the due date of the installment. There is no penalization for late payment. The total cost of the loan does not automatically increase, no penalties are automatically applied to the loan.

- -

Early Payment Strategy

-

This strategy works similar to the Interest Principal Penalties Fees Order for on-time and late payments, i.e

-

- Payment order: -

    -
  1. Overdue and due interest
  2. -
  3. Overdue and due principal
  4. -
  5. Overdue and due penalties
  6. -
  7. Overdue and due fees
  8. -
-

-

Early payment: Any payment that pays off an installment that occurs before the due date of the installment. There is no incentive/advantage to making an early payment as theres no decrease in cost of the loan. However, early payments are allocated only towards principal payments of future installments. Interest and fees/penalties of future installments are not paid and may be waived - manually if required

- -

On time payment: Any payment that pays off an installment that occurs exactly on the due date of the installment.

+

Beta API Matrix

+ + + + + + + + + + + + + + + + + + +
+
+ + + + +
RESOURCES
+
+
+ + + + + + + +
+
POST
+
+
create/complex update
+
+
+ + + + + + + +
+
GET
+
+
read
+
+
+ + + + + + + +
+
PUT
+
+
update
+
+
+ + + + + + + +
+
DELETE
+
+
delete
+
+
CachecachesList Cache TypesSwitch Cache
+
-

Late payment: Any payment that pays off an installment that occurs after the due date of the installment. There is no penalization for late payment. The total cost of the loan does not automatically increase, no penalties are automatically applied to the loan.

+   +
+

Payment Application Logic / Transaction Processing Strategy

+ +

The way payments (transactions) are handled and the effect they have on the loan is an area that can differ + widely from MFI to MFI. Mifos allows for transaction processing strategies to be developed + that are associated with a loan product. Several approaches are provided out-of-the-box. If these approaches + dont meet exactly your needs a custom approach can be developed and released with the platform.

+ +

In general the the following areas are handled by any given transaction processing strategy: +

    +
  • Payment order: What component of a loan installment should be paid of frist interest, + principal, fees, penalties? +
  • +
  • Early payment: What qualifies a payment as an early payment and what impact should this + have on the loan schedule? +
  • +
  • On time payment: What qualifies a payment as on time?
  • +
  • Late payment: What qualifies a payment as a late payment and what impact should this + have on the loan schedule? +
  • +
+

+ +

Penalties, Fees, Interest, Principal order

+

+ Payment order: +

    +
  1. Overdue and due penalties
  2. +
  3. Overdue and due fees
  4. +
  5. Overdue and due interest
  6. +
  7. Overdue and due principal
  8. +
+

+

Early payment: Any payment that pays off an installment that occurs before the due date of + the installment. There is no incentive/advantage to making an early payment as theres no decrease in cost of + the loan.

+ +

On time payment: Any payment that pays off an installment that occurs exactly on the due + date of the installment.

+ +

Late payment: Any payment that pays off an installment that occurs after the due date of the + installment. There is no penalization for late payment. The total cost of the loan does not automatically + increase, no penalties are automatically applied to the loan.

+ +

Principal Interest Penalties Fees Order

+

The key aspect of this strategy is the payment order.

+

+ Payment order: +

    +
  1. Overdue and due principal
  2. +
  3. Overdue and due interest
  4. +
  5. Overdue and due penalties
  6. +
  7. Overdue and due fees
  8. +
+

+

Early payment: Any payment that pays off an installment that occurs before the due date of + the installment. There is no incentive/advantage to making an early payment as theres no decrease in cost of + the loan.

+ +

On time payment: Any payment that pays off an installment that occurs exactly on the due + date of the installment.

+ +

Late payment: Any payment that pays off an installment that occurs after the due date of the + installment. There is no penalization for late payment. The total cost of the loan does not automatically + increase, no penalties are automatically applied to the loan.

+ +

Interest Principal Penalties Fees Order

+

The key aspect of this strategy is the payment order.

+

+ Payment order: +

    +
  1. Overdue and due interest
  2. +
  3. Overdue and due principal
  4. +
  5. Overdue and due penalties
  6. +
  7. Overdue and due fees
  8. +
+

+

Early payment: Any payment that pays off an installment that occurs before the due date of + the installment. There is no incentive/advantage to making an early payment as theres no decrease in cost of + the loan.

+ +

On time payment: Any payment that pays off an installment that occurs exactly on the due + date of the installment.

+ +

Late payment: Any payment that pays off an installment that occurs after the due date of the + installment. There is no penalization for late payment. The total cost of the loan does not automatically + increase, no penalties are automatically applied to the loan.

+ +

RBI (India)

+

Per RBI regulations, all interest must be paid (both current and overdue) before principal is paid.

+

For example taking a loan with two installments due (one current and one overdue) of 220 each (200 principal + + 20 interest) - A partial payment of 40 results in payment been broken up as 20 interest on installment #1 + (200 principal remaining) and 20 payment to interest on installment #2 (200 principal remaining)

+

+ Payment order: +

    +
  1. Overdue and due interest
  2. +
  3. Overdue and due principal
  4. +
  5. Overdue and due penalties
  6. +
  7. Overdue and due fees
  8. +
+

+

Early payment: Any payment that pays off an installment that occurs before the due date of + the installment. There is no incentive/advantage to making an early payment as theres no decrease in cost of + the loan.

+ +

On time payment: Any payment that pays off an installment that occurs exactly on the due + date of the installment.

+ +

Late payment: Any payment that pays off an installment that occurs after the due date of the + installment. There is no penalization for late payment. The total cost of the loan does not automatically + increase, no penalties are automatically applied to the loan.

+

Early Payment Strategy

+

This strategy works similar to the Interest Principal Penalties Fees Order for on-time and late payments, + i.e

+

+ Payment order: +

    +
  1. Overdue and due interest
  2. +
  3. Overdue and due principal
  4. +
  5. Overdue and due penalties
  6. +
  7. Overdue and due fees
  8. +
+

+

Early payment: Any payment that pays off an installment that occurs before the due date of + the installment. There is no incentive/advantage to making an early payment as theres no decrease in cost of + the loan. However, early payments are allocated only towards principal payments of future installments. + Interest and fees/penalties of future installments are not paid and may be waived + manually if required

+ +

On time payment: Any payment that pays off an installment that occurs exactly on the due + date of the installment.

+ +

Late payment: Any payment that pays off an installment that occurs after the due date of the + installment. There is no penalization for late payment. The total cost of the loan does not automatically + increase, no penalties are automatically applied to the loan.

+
+
- -
- - + diff --git a/fineract-provider/src/main/resources/templates/login.html b/fineract-provider/src/main/resources/templates/login.html index 63e40597d04..62b295b4b06 100644 --- a/fineract-provider/src/main/resources/templates/login.html +++ b/fineract-provider/src/main/resources/templates/login.html @@ -1,7 +1,7 @@ - + Sign In